-sourcepath /home/sam/imac-files/work/NetBeansProjects/Client/ForestsurfClient/ForestsurfClient-web/src/main/java:/home/sam/imac-files/work/NetBeansProjects/Client/ForestsurfClient/ForestsurfClient-web/target/generated-sources/annotations: -s /home/sam/imac-files/work/NetBeansProjects/Client/ForestsurfClient/ForestsurfClient-web/target/generated-sources/annotations -g -nowarn -target 1.7 -source 1.7 -endorseddirs
[WARNING] File encoding has not been set, using platform encoding US-ASCII, i.e. build is platform dependent!
[DEBUG] incrementalBuildHelper#beforeRebuildExecution
[INFO] Compiling 93 source files to /home/sam/imac-files/work/NetBeansProjects/Client/ForestsurfClient/ForestsurfClient-web/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.151 s
[INFO] Finished at: 2015-03-09T11:51:32+11:00
[INFO] Final Memory: 19M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project ForestsurfClient-web: Fatal error compiling: -endorseddirs -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project ForestsurfClient-web: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:216)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:355)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:216)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:160)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:834)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
... 19 more
Caused by: org.codehaus.plexus.compiler.CompilerException: -endorseddirs
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:172)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:823)
... 22 more
Caused by: java.lang.IllegalArgumentException: -endorseddirs
at com.sun.tools.javac.util.BaseFileManager.handleOption(BaseFileManager.java:148)
at com.sun.tools.javac.api.JavacTool.processOptions(JavacTool.java:227)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:199)
at com.sun.tools.javac.api.JavacTool.getTask(JavacTool.java:68)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:123)
... 24 more
[ERROR]
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[sam@DellWS ~/imac-files/work/NetBeansProjects/Client/ForestsurfClient/ForestsurfClient-web]$
Jayesh A Lalwani wrote:Have you tried to specify the maven-compiler-plugin in your pom? Can you post it here?
Jayesh A Lalwani wrote:1) Where have you set the endorsed.dir property? Is it specified in your settings.xml? As far as I know, it's not an inbuilt property. You can run mvn help:effective-pom, it will print out the pom with the property replaced with the value. Can you check if enorder.dir is being replaced with the folder you want the endorsed dir to point to
2) WHy are you doing it this way? You are using maven-dependency-plugin to download it to endorsed-dir, and then specifiying it in endorsed dirs during compilation. WHy don't you just add the jar into the list of dependencies?
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
Jayesh A Lalwani wrote:You had endorsed.dir set in the old machine.
Which leads to my second question. Why are you doing things this way. If you are doing is because you want that jar for compilation and not during runtime, you can look at the scope element of the dependency tag
Jayesh A Lalwani wrote:What do you mean couldn't find it? Couldn't find it during compilation? Packaging? Deploy? Run?
sam White wrote:
Jayesh A Lalwani wrote:What do you mean couldn't find it? Couldn't find it during compilation? Packaging? Deploy? Run?
The war moudle coulding find the ejb jar file in .m2/repository/xyz-ejb/1.0/ folder.
How to define it in settings.xml file so that all my modules in different project find its dependant ejb modules in the .m2/repository/.... ?
Very appreciate for your help.
sam White wrote:
sam White wrote:
Jayesh A Lalwani wrote:What do you mean couldn't find it? Couldn't find it during compilation? Packaging? Deploy? Run?
The war moudle coulding find the ejb jar file in .m2/repository/xyz-ejb/1.0/ folder.
How to define it in settings.xml file so that all my modules in different project find its dependant ejb modules in the .m2/repository/.... ?
Very appreciate for your help.
Should I confiure ejb module to save its jar file to .m2/repository folder or configure the war module to read from the target/ folder in ejb module rather than referring to the .m2 / repository ?
Self destruct mode activated. Instructions for deactivation encoded in this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|