Eclipse: 3.3.1.1
Maven 2.0 Integration : 0.0.9

Hi All,

Following is my observation with Maven2-Eclipse plugin.

*Problem description:* For a web project in eclipse running *package* phase
after *clean* fails saying
________________________________________________________________
 [INFO] compiler:compile
[INFO] Compiling 1 source file to
C:\D\Workspace\MAVEN_WORKSPACE\eclipse\Maven\FirstMaven\target\classes
[ERROR] mojo-execute : compiler:compile
Diagnosis: Compilation failure
FATAL ERROR: Error executing Maven for a project
[ERROR] project-execute : FirstMaven:FirstMaven:war:1.0 (  task-segment:
[package] )
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 :555)
 at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
DefaultLifecycleExecutor.java:475)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
DefaultLifecycleExecutor.java :454)
 at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
DefaultLifecycleExecutor.java:306)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
DefaultLifecycleExecutor.java :273)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
DefaultLifecycleExecutor.java :140)
 at org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:441)
 at org.apache.maven.embedder.MavenEmbedder.execute (MavenEmbedder.java:382)
 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:516)
 at org.apache.maven.plugin.CompilerMojo.execute (CompilerMojo.java:114)
 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
DefaultPluginManager.java:412)
 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals (
DefaultLifecycleExecutor.java :534)
 ... 8 more
 ________________________________________________________________


*Analysis: *As per the analysis done, my understanding is that "mvn package"
needs class files to be compiled by elipse and made available in eclipse
project's *output *folder (in my case is FirstMaven/target/classes. Once
they are available, maven plugin is able to execute mvn package phase
successfully.

*Question(s):*
1. Is this the desired behavior? My gut feeling is that maven2 plugin should
be independent of eclipse compilation process. Meaning "mvn package" should
pass through even if the eclipse is not compiled the classes. This also
makes sense as compilation is an intermediary phase whle executing package
phase.

2. Is there a way to tell eclipse to use maven's output folder (i.e *
FirstMaven\target\FirstMaven-1.0\WEB-INF\classes*) instead of *
FirstMaven/target/classes* folder.

Need your inputs/thoughts...

 Thanks a bunch in advance,
Ari Jeremy.

-- 
Thanks and Warm regards,
Ari Jeremy

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Complexity is a symptom of confusion, not a cause. -- Jeff Hawkins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reply via email to