简体   繁体   English

使用Maven进行错误构建

[英]Error Builds with Maven

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). 在Eclipse下,我刚刚对Java代码进行了一些更改,然后,我自动进行了Clean / Build(清理我的4个项目),然后对包含入口点的项目进行GWT编译(该项目的GWT编译) ,最后导出包含入口点(导出/战争文件)的项目的WAR。 I have to put the WAR on directory webapps/autoload of the Jonas server. 我必须将WAR放在Jonas服务器的目录webapps / autoload中。 I stop Jonas server and then restart Jonas server. 我停止Jonas服务器,然后重新启动Jonas服务器。

The problem is : my last changes of code are not present, when i go via Internet Explorer to the application server. 问题是:当我通过Internet Explorer到达应用程序服务器时,我的代码的最新更改不存在。 However, they are present when i execute the application in localhost:8080. 但是,当我在localhost:8080中执行应用程序时,它们存在。

I suspect my WAR is created from the precedent compilation. 我怀疑我的WAR是根据先例编译创建的。 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 : 而且我看到一个问题:当我清理项目时,对于3个项目,我有这个非常普遍的错误:

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 : 这是Maven控制台的全部内容:

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. 在构建我的工作区的4个项目之前,它会停止。
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. 在此Maven控制台中,以粗体显示的是,我的工作区中至少有两个项目alizesWeb和clas2coreGwt,其中一个存在构建错误。
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)

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. 编译失败意味着您的代码无法编译,因此这是没有可行的jar / war的原因,是的。

Eclipse should tell you in the 'problems' view (window -> open view) where the issue is. Eclipse应该在问题所在的“问题”视图(窗口->打开视图)中告诉您。 The message is general, like you say, so you need to find out the details to be able to fix it. 该消息很笼统,就像您说的那样,因此您需要找出详细信息才能进行修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM