0

I Have very complex Maven project with multiple Feature file , for below POM.XML , I cannot create jar file MAven Install Package is failing as below: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:testCompile

If I change jre version to 1.7 , am getting error for dimond symbol <>

Could someone help to build Jar file ?

POM.XML :

<plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.3</version>
            <configuration>
              <source>1.8</source>
              <target>1.8</target>
              <maven.compiler.source>1.8</maven.compiler.source>
              <maven.compiler.target>1.8</maven.compiler.target> 
              <fork>true</fork>
                <executable>C:\Program Files\Java\jre1.8.0_161\bin\javac</executable>
            </configuration>   

        </plugin>
3
  • I'm pretty sure that the javac file is in the jdk directory, not the jre directory. I'm not sure if that's a typo or not?
    – user628985
    Jun 12, 2018 at 15:56
  • I tried even with jdk , same error
    – Itsmeg3
    Jun 12, 2018 at 15:58
  • <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.8</source> <target>1.8</target> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> <fork>true</fork> <executable>C:\Program Files\Java\jdk1.8.0_111\bin</executable> </configuration> </plugin>
    – Itsmeg3
    Jun 12, 2018 at 15:59

1 Answer 1

0

I think your maven compiler section is using an out of date plug in. You're using 3.3, the latest is version 3.7.0 so I'd update to that.

For example my pom.xml contains:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <version>3.7.0</version>
    <configuration>
       <source>1.8</source>
       <target>1.8</target>
    </configuration>
</plugin>

I'm also running the latest version of Maven on my development box too, which I think is 3.5.3 but I could be very much mistaken on that front.

Maven Central is a great place to look stuff like this up. The link for the compiler plugins is provided below:

https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin

Hope that helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.