[ http://jira.codehaus.org/browse/MNGECLIPSE-89?page=comments#action_65670 ]
Charlie Dobbie commented on MNGECLIPSE-89: ------------------------------------------ Just had the same problem - also fixed by changing Eclipse to use a JDK rather than a JRE, many thanks! For anyone who has this problem, the workaround is as follows: In Eclipse select Window > Preferences > Java > Installed JREs. Click Add. Browse to the root of the JDK directory (e.g. C:\Program Files\Java\jdk1.5.0_05) Give the "JRE" a name (e.g. JDK 1.5.0_05) OK the dialog. Check the JDK, uncheck the JRE. OK the dialog. Your project should automatically switch to using this new JDK. If it does not: Right click the project directory, select Properties > Java Build Path > Libraries. Select the JRE System Library, click Edit. Select Alternate JRE, select the JDK, OK all dialogs. > Compile goal fails with exception > --------------------------------- > > Key: MNGECLIPSE-89 > URL: http://jira.codehaus.org/browse/MNGECLIPSE-89 > Project: Maven 2.x Extension for Eclipse > Type: Bug > Components: Maven Launcher > Versions: 0.0.5 > Environment: Windows XP, Eclipse 3.1.2 > Reporter: Dale King > Assignee: Dmitri Maximovich > > > Used archetype to generate project as specified in Maven documentation and > use that generated folder as Eclipse project. Enable Maven for the project. > Can build from the command line, but trying to compile from Maven in Eclipse > fails: > [INFO] > ---------------------------------------------------------------------------- > [INFO] Building Maven Quick Start Archetype > [INFO] task-segment: [clean, compile] > [INFO] > ---------------------------------------------------------------------------- > [INFO] clean:clean > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target\classes > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target\test-classes > [INFO] resources:resources > [INFO] Using default encoding to copy filtered resources. > [INFO] compiler:compile > Compiling 1 source file to C:\EclipseWorkspace\my-app\target\classes > [ERROR] mojo-execute : compiler:compile > Diagnosis: Compilation failure > FATAL ERROR: Error executing Maven for a project > [ERROR] project-execute : com.mycompany.app:my-app:jar:1.0-SNAPSHOT ( > task-segment: [clean, compile] ) > Diagnosis: Compilation failure > FATAL ERROR: Error executing Maven for a project > org.apache.maven.BuildFailureException: Compilation failure > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:552) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:472) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:451) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:303) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:270) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:139) > at > org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:472) > at > org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:413) > at org.maven.ide.eclipse.Maven2Executor.main(Maven2Executor.java:68) > Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation > failure > at > org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:429) > at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:110) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:415) > at > org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:531) > ... 8 more > Here is the command line output from doing the same thing: > C:\EclipseWorkspace\my-app>mvn clean compile > [INFO] Scanning for projects... > [INFO] > ------------------------------------------------------------------------- > --- > [INFO] Building Maven Quick Start Archetype > [INFO] task-segment: [clean, compile] > [INFO] > ------------------------------------------------------------------------- > --- > [INFO] [clean:clean] > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target\classes > [INFO] Deleting directory C:\EclipseWorkspace\my-app\target\test-classes > [INFO] [resources:resources] > [INFO] Using default encoding to copy filtered resources. > [INFO] [compiler:compile] > Compiling 1 source file to C:\EclipseWorkspace\my-app\target\classes > [INFO] > ------------------------------------------------------------------------- > --- > [INFO] BUILD SUCCESSFUL > [INFO] > ------------------------------------------------------------------------- > --- > [INFO] Total time: 7 seconds > [INFO] Finished at: Tue Mar 21 20:38:54 EST 2006 > [INFO] Final Memory: 2M/8M > [INFO] > ------------------------------------------------------------------------- > --- -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira