Maven Compiler Plugin & Java VM

105 views
Skip to first unread message

Claudio Di Vita

unread,
Apr 20, 2008, 6:32:42 AM4/20/08
to Q for Eclipse users list
When I try to package my artifact with the latest development version
of Q4E 0.6.0 I get the following error:

org.apache.maven.ProjectBuildFailureException: Build for project:
com.example:example:war:2.0-SNAPSHOT failed during execution of mojo:
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
339)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:
149)
at org.apache.maven.DefaultMaven.execute_aroundBody0(DefaultMaven.java:
223)
at
org.apache.maven.DefaultMaven.execute_aroundBody1$advice(DefaultMaven.java:
304)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:1)
at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody4(MavenEmbedder.java:
880)
at
org.apache.maven.embedder.MavenEmbedder.execute_aroundBody5$advice(MavenEmbedder.java:
304)
at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:
1)
at
org.devzuz.q.maven.embedder.internal.EclipseMaven.executeRequest(EclipseMaven.java:
286)
at
org.devzuz.q.maven.embedder.internal.EclipseMavenRequest.run(EclipseMavenRequest.java:
71)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.apache.maven.plugin.CompilationFailureException:
Compilation failure
Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre1.6.0_04\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.
at
org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:
516)
at
org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:
102)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:
549)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:
544)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:
332)
... 10 more

It seems a problem with the Virtual Machine used for running Eclipse,
but my session data are:

eclipse.buildId=M20080221-1800
java.version=1.6.0_04
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=it_IT
Framework arguments: -vm C:\Program Files\Java\jdk1.6.0_04\bin
\javaw.exe
Command-line arguments: -os win32 -ws win32 -arch x86 -vm C:\Program
Files\Java\jdk1.6.0_04\bin\javaw.exe

Thus I take a look to Eclipse configuration:

*** System properties:
awt.toolkit=sun.awt.windows.WToolkit
eclipse.buildId=M20080221-1800
eclipse.commands=-os
win32
-ws
win32
-arch
x86
-showsplash
-launcher
C:\Program Files\Eclipse\eclipse.exe
-name
Eclipse
--launcher.library
C:\Program Files\Eclipse\plugins
\org.eclipse.equinox.launcher.win32.win32.x86_1.0.3.R33x_v20080118\eclipse_1023.dll
-startup
C:\Program Files\Eclipse\plugins
\org.eclipse.equinox.launcher_1.0.1.R33x_v20080118.jar
-vm C:\Program Files\Java\jdk1.6.0_04\bin\javaw.exe
-vm
C:\Program Files\Java\jre1.6.0_04\bin\client\jvm.dll
eclipse.ee.install.verify=false
eclipse.product=org.eclipse.platform.ide
eclipse.startTime=1208687071327
eclipse.vm=C:\Program Files\Java\jre1.6.0_04\bin\client\jvm.dll
eclipse.vmargs=-Dsun.lang.ClassLoader.allowArraySyntax=true
..........

I don't know why but the option -vm is overwritten. Maybe Q4E or
another Eclipse plugin modify this property ??

Thank you for the help,

Claudio

Abel Muiño Vizcaino

unread,
Apr 20, 2008, 7:21:09 AM4/20/08
to q4e-...@googlegroups.com
I've seen some issues setting options in the eclipse.ini try placing each option/argument in a single line. For example:

-vm
C:\Program Files\Java\jdk1.6.0_04\bin\javaw.exe

Claudio Di Vita

unread,
Apr 20, 2008, 10:46:23 AM4/20/08
to Q for Eclipse users list
> I've seen some issues setting options in the eclipse.ini try placing
> each option/argument in a single line. For example:
>
> -vm
> C:\Program Files\Java\jdk1.6.0_04\bin\javaw.exe
>
> Hope that helps!

Your advice solves the problem, thank you

Claudio
Reply all
Reply to author
Forward
0 new messages