Error Builds with Maven

285 views Asked by At

Under Eclipse, I have just made some changes in the Java code and after, i make a Clean / Build automatically (clean my 4 projects), then make a GWT compile of the project who contains the entry point (GWT Compile of this project), and finally make an export of the WAR of the project who contains the entry point (Export / War File). I have to put the WAR on directory webapps/autoload of the Jonas server. I stop Jonas server and then restart Jonas server.

The problem is : my last changes of code are not present, when i go via Internet Explorer to the application server. However, they are present when i execute the application in localhost:8080.

I suspect my WAR is created from the precedent compilation. Do you think it is the problem ? And i have seen a problem : when i make the clean of the projects, for 3 projects, i have this very general error :

27/09/12 20:16:36 CEST: Build errors for my_project;
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project alizesWeb: Compilation failure

First, how can i resolve this very general and not explained error ?

Second, do you think that this error is the cause of my problem (an application without my last changes).

Third, if not, what can i do to have my modifications located, integrated in the application?

This is the entire content of the Maven Console :

 

    27/09/12 21:24:39 CEST:         D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesWeb
    27/09/12 21:24:39 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml clean
    27/09/12 21:24:47 CEST: Maven Builder: AUTO_BUILD 
    27/09/12 21:24:54 CEST: Using existing launch configuration
    27/09/12 21:24:59 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesWeb
    27/09/12 21:24:59 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml 
    27/09/12 21:25:13 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreGwt
    27/09/12 21:25:13 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml clean
    27/09/12 21:25:16 CEST: Maven Builder: AUTO_BUILD 
    27/09/12 21:25:21 CEST: Using existing launch configuration
    27/09/12 21:25:22 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreGwt
    27/09/12 21:25:22 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml 
    27/09/12 21:25:31 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreServer
    27/09/12 21:25:31 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml clean
    27/09/12 21:25:32 CEST: Maven Builder: AUTO_BUILD 
    27/09/12 21:25:40 CEST: Using existing launch configuration
    27/09/12 21:25:42 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreServer
    27/09/12 21:25:42 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml 
    27/09/12 21:25:49 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesServices
    27/09/12 21:25:49 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml clean
    27/09/12 21:25:59 CEST: Using existing launch configuration
    27/09/12 21:26:01 CEST: D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesServices
    27/09/12 21:26:01 CEST:  mvn -B -s D:\utilisateurs\tcampos\Desktop\MavenRepository\settings.xml 
    27/09/12 21:26:06 CEST: Maven Builder: AUTO_BUILD 
    27/09/12 21:31:20 CEST: Maven Builder: FULL_BUILD requireFullBuild
    27/09/12 21:31:20 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:31:20 CEST: [INFO] skip non existing resourceDirectory D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreServer\src\main\resources
    27/09/12 21:31:20 CEST: [INFO] Nothing to compile - all classes are up to date
    27/09/12 21:31:20 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:31:20 CEST: [INFO] skip non existing resourceDirectory D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreServer\src\test\resources
    27/09/12 21:31:24 CEST: Maven Builder: FULL_BUILD requireFullBuild
    27/09/12 21:31:24 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:31:24 CEST: [INFO] Copying 175 resources
    27/09/12 21:31:25 CEST: [INFO] Compiling 174 source files to D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\clas2CoreGwt\target\classes
    27/09/12 21:31:27 CEST: Build errors for clas2CoreGwt; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project clas2CoreGwt: Compilation failure 
    27/09/12 21:31:50 CEST: Maven Builder: FULL_BUILD requireFullBuild
    27/09/12 21:31:50 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:31:50 CEST: [INFO] Copying 5 resources
    27/09/12 21:31:50 CEST: [INFO] Copying 144 resources
    27/09/12 21:31:50 CEST: [INFO] Copying 95 resources
    27/09/12 21:31:50 CEST: [INFO] No sources to compile
    27/09/12 21:31:50 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:31:50 CEST: [INFO] skip non existing resourceDirectory D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesServices\src\test\resources
    27/09/12 21:33:46 CEST: Maven Builder: FULL_BUILD requireFullBuild
    27/09/12 21:33:46 CEST: [INFO] Using 'UTF-8' encoding to copy filtered resources.
    27/09/12 21:33:46 CEST: [INFO] skip non existing resourceDirectory D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesWeb\src\main\resources
    27/09/12 21:33:46 CEST: [INFO] Compiling 175 source files to D:\utilisateurs\tcampos\Desktop\workspaceHeadAlizesVM\alizesWeb\target\classes
     27/09/12 21:33:47 CEST: Build errors for alizesWeb; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project alizesWeb: Compilation failure 
    27/09/12 21:34:08 CEST: Maven Builder: AUTO_BUILD 

 

It stops before building the 4 projects of my workspace.
In this Maven console, in bold, one can see that for at least 2 projects of my workspace, alizesWeb and clas2coreGwt, one has building errors.
And i ask me if these errors are not responsible for my problem described above (mys last changes not put in my application server)

This is the error written in the 'log error' view :

 
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project alizesWeb: Compilation failure
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:581)
    at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:324)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:247)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:104)
    at org.maven.ide.eclipse.internal.embedder.MavenImpl.execute(MavenImpl.java:233)
    at org.maven.ide.eclipse.internal.project.GenericBuildParticipant.executePostBuild(GenericBuildParticipant.java:139)
    at org.maven.ide.eclipse.internal.project.GenericBuildParticipant.build(GenericBuildParticipant.java:78)
    at org.maven.ide.eclipse.internal.builder.MavenBuilder.build(MavenBuilder.java:153)
    at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:627)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:170)
    at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:201)
    at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:253)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

1

There are 1 answers

4
eis On

Compilation failure means that your code is something that cannot be compiled, so it is a reason not to have a workable jar/war, yes.

Eclipse should tell you in the 'problems' view (window -> open view) where the issue is. The message is general, like you say, so you need to find out the details to be able to fix it.