Open jayasimhagithub opened 3 years ago
@jayasimhagithub The maven-compiler-plugin
version is inherited from Super POM. Please check your project's effective POM -
You can also set specific source and target java versions by adding properties -
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
Hi ,
We are trying to build the ear using the mvn package command on BW6.6.1 - project with maven plugin 2.7.1 and apache maven - 3.6.3
As I understand with below error while the build is running , some how mvn considering the maven-compiler-plugin:2.0.2 instead of maven-compiler-plugin:3.8.1.
Please see below error and advise us , if any explicit configuration need to be done to fix the issue.
[INFO] Compiling 2 source files to /tibco/Yard_Maven_project/com.tibco.custom.jms.provider/target/classes [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for YardBroker.application.parent 1.0.0-SNAPSHOT: [INFO] [INFO] YardBroker.application.parent ...................... SUCCESS [ 0.131 s] [INFO] com.tibco.custom.jms.provider ...................... FAILURE [ 1.157 s] [INFO] YardBroker ......................................... SKIPPED [INFO] YardBroker.application ............................. SKIPPED [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 01:14 min [INFO] Finished at: 2020-12-17T14:40:29Z [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project com.tibco.custom.jms.provider: Compilation failure: Compilation failure: [ERROR] /tibco/Yard_Maven_project/com.tibco.custom.jms.provider/src/com/tibco/custom/jms/provider/Activator.java:[21,2] error: annotations are not supported in -source 1.3 [ERROR] [ERROR] (use -source 5 or higher to enable annotations) [ERROR] /tibco/Yard_Maven_project/com.tibco.custom.jms.provider/src/com/tibco/custom/jms/provider/CustomJMSProvider.java:[20,2] error: annotations are not supported in -source 1.3 [ERROR] -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project com.tibco.custom.jms.provider: Compilation failure at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156) at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305) at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192) at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105) at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957) at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)