gwt-maven-plugin:编译失败“状态1” [英] gwt-maven-plugin: Compile fails "with status 1"

查看:621
本文介绍了gwt-maven-plugin:编译失败“状态1”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究GWT项目一段时间,并且我相信自从添加了新的依赖关系之后,我得到了下面的错误。


无法执行目标org.codehaus.mojo:gwt-maven-plugin:2.6.1:在项目项目上编译(默认):Command [[/ b]

/ bin / sh -c / usr / lib / jvm / java-7 -openjdk -i386 / jre / bin / java -Xmx512m -classpath /home/user/git/project/target/project-0.0.1-SNAPSHOT/ WEB-INF / classes:/home/user/.m2/repository/A.jar:/home/user/.m2/repository/B.jar:... 更多依赖关系 .. 。com.google.gwt.dev.Compiler -logLevel INFO样式的OBF -war /home/user/git/project/target/project-0.0.1-SNAPSHOT -localWorkers 1 -XfragmentCount -1 -sourceLevel 1.6 -gen / home /user/git/project/target/.generated my.project.Project





  1. 当我运行在Windows 7的错误中给出的命令我得到输入太长。
  2. 当我在Ubuntu上运行该命令时,没有显示任何错误。 echo $?但是显示1的返回状态。

mvn包-X 看起来像


at org.apache.maven.lifecycle .internal.MojoExecutor.execute(MojoExecutor.java:217)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle .internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle .internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle .internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
在org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
在org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
在org.apache.maven .cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native方法)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect .Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher .Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher .Launcher.main(Launcher.java:352)



由于:org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException:Command [[
/ bin / sh -c / usr / lib / jvm / java-7-openjdk-i386 / jre / bin / java -Xmx512m -classpath /home/user/git/project/target/project-0.0.1-SNAPSHOT/WEB-INF/classes:/home/user/.m2/repository/A.jar:/home/user/。 m2 / repository / B.jar:... 更多依赖关系 ... com.google.gwt.dev.Compiler -logLevel INFO样式的OBF -war / home / user / git / project /target/project-0.0.1-SNAPSHOT -localWorkers 1 -XfragmentCount -1 -sourceLevel 1.6 -gen /home/user/git/project/target/.generated my.project.Project
]]失败,状态为1
at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo $ JavaCommand.execute(AbstractGwtShellMojo.java:485)
at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java: 446)
在org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:351)
在org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
... 19 more


mvn包输出看起来像

  [信息] 
[信息] ------------------- -------------------------------------------------- ---
[INFO]构建项目0.0.1-SNAPSHOT
[INFO] -------------------------- ----------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources(default-resources)@project ---
[debug] execute contextualize
[INFO] UTF-8'编码来复制过滤的资源。
[INFO]复制6资源
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile(default-compile)@project ---
[INFO]无法编译 - 所有类都是最新的
[INFO]
[INFO] --- maven-war-plugin:2.1.1:爆炸(默认)@ project - -
[INFO]爆炸webapp
[INFO]在[/home/user/git/project/target/project-0.0.1-SNAPSHOT]中组装webapp [项目]
[信息]处理战争项目
[信息]复制Web应用程序资源[b / b] [b] [b] [b] [b]
[INFO] --- maven-resources-plugin:2.5:testResources(default-testResources)@project ---
[debug] execute contextualize
[INFO]使用'UTF-8 '编码来复制过滤的资源。
[INFO]复制2资源
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile(default-testCompile)@project ---
[INFO]无法编译 - 所有类都是最新的
[INFO]
[INFO] --- maven-surefire-plugin:2.10:test(default-test)@project - -
[INFO] Surefire报告目录:/ home / user / git / project / target / surefire-reports

---------------- ---------------------------------------
测试
- -------------------------------------------------- ---

结果:

测试运行:0,失败:0,错误:0,跳过:0

[信息]
[INFO] --- gwt-maven-plugin:2.6.0:compile(默认)@project ---
[INFO]自动发现的模块[my.module.Module,my.project.Project]
[INFO] my.module.Module没有EntryPoint - 编译跳过
[INFO]编译模块my.project.Project
[INFO]验证单元:
[INFO]忽略第一阶段编译错误的115个单元。
[INFO]使用-strict编译或使用-logLevel设置为TRACE或DEBUG以查看所有错误。
[INFO]计算'com.google.gwt.useragent.client.UserAgentAsserter'的所有可能重新绑定结果'
[INFO]重新绑定com.google.gwt.useragent.client.UserAgentAsserter
[ INFO]正在检查规则< generate-with class ='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.shared.RequestFactory'
[INFO]正在检查规则< generate-with class ='com .google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver'
[INFO]正在检查规则< generate-with class = 'com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[信息] [警告]检测到与com.google.gwt.editor.client.SimpleBeanEditorDriver相关的警告。在类路径中验证-api-< version> .jar和validation-api-< version> -sources.jar?
[信息]指定-logLevel DEBUG以查看所有错误。
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.gwt.editor.client.SimpleBeanEditorDriver'
[INFO]重新绑定com.google.gwt.useragent.client.UserAgentAsserter
[INFO]正在检查规则< generate-with class ='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.shared.RequestFactory'
[INFO]正在检查规则< generate-with class ='com .google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver'
[INFO]重新绑定com.google.gwt.useragent。 client.UserAgentAsserter
[INFO]正在检查规则< generate-with class ='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO] [WARN]在延迟绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.shared.RequestFactory'
[INFO]正在检查规则< generate-with class ='com .google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO] [WARN]在延期绑定规则中指定的未知类型'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver'

...很多重新绑定类似于以上...

[信息] ----------------------------------- -------------------------------------
[INFO] BUILD FAILURE
[INFO] ----------------------------------------------- -------------------------
[信息]总时间:30.074s
[信息]完成时间:03年6月星期二09:18:19 MST 2014
[INFO] Final Memory:17M / 436M
[INFO] ----------------------- -------------------------------------------------
[错误]无法执行目标org.codehaus.mojo:gwt-maven-plugin:2.6.0:项目项目上的编译(默认):Command [[
[错误] / usr / bin / java -Xmx512m -classpath * long classpath * com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war /home/user/git/project/target/project-0.0.1-SNAPSHOT -localWorkers 8 -XfragmentCount -1 -sourceLevel 1.6 -gen / home / user / git / proj ect / target / .generated my.project.Project
[ERROR]]]失败,状态为1


解决方案

我运行了mvn包-X,发现以下错误:
$ b

[INFO] [ERROR ]'gwtupload / client / DecoratedFileUpload.java'中的错误
[INFO] [错误]第371行:重新绑定结果'gwtupload.client.DecoratedFileUpload.DecoratedFileUploadImpl'不能是抽象的



因此,我将依赖项 gwtupload 更新为解决了我的问题的新版本。



在之前的尝试中,我忽略了这个错误的原因是, mvn package 之前是成功的,在此特定版本中使用此依赖关系。所以我认为这个错误一定会一直存在,仍然会导致一个成功的包装。


I've been working on a GWT project for a while, and I believe since I've added new dependencies, I get the error below.

Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.1:compile (default) on project project: Command [[

/bin/sh -c /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java -Xmx512m -classpath /home/user/git/project/target/project-0.0.1-SNAPSHOT/WEB-INF/classes:/home/user/.m2/repository/A.jar:/home/user/.m2/repository/B.jar:... a lot more dependencies ... com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war /home/user/git/project/target/project-0.0.1-SNAPSHOT -localWorkers 1 -XfragmentCount -1 -sourceLevel 1.6 -gen /home/user/git/project/target/.generated my.project.Project

  1. When I run the command given in the error on Windows 7 I get "The input is too long".
  2. When I run the command on Ubuntu, no errors shown. echo $? however shows the returned status of 1.

The stacktrace given by mvn package -X looks like

at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)

Caused by: org.codehaus.mojo.gwt.shell.ForkedProcessExecutionException: Command [[ /bin/sh -c /usr/lib/jvm/java-7-openjdk-i386/jre/bin/java -Xmx512m -classpath /home/user/git/project/target/project-0.0.1-SNAPSHOT/WEB-INF/classes:/home/user/.m2/repository/A.jar:/home/user/.m2/repository/B.jar:... a lot more dependencies ... com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war /home/user/git/project/target/project-0.0.1-SNAPSHOT -localWorkers 1 -XfragmentCount -1 -sourceLevel 1.6 -gen /home/user/git/project/target/.generated my.project.Project ]] failed with status 1 at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo$JavaCommand.execute(AbstractGwtShellMojo.java:485) at org.codehaus.mojo.gwt.shell.CompileMojo.compile(CompileMojo.java:446) at org.codehaus.mojo.gwt.shell.CompileMojo.doExecute(CompileMojo.java:351) at org.codehaus.mojo.gwt.shell.AbstractGwtShellMojo.execute(AbstractGwtShellMojo.java:172) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) ... 19 more

The mvn package output looks like

[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building project 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ project ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) @ project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-war-plugin:2.1.1:exploded (default) @ project ---
[INFO] Exploding webapp
[INFO] Assembling webapp [project] in [/home/user/git/project/target/project-0.0.1-SNAPSHOT]
[INFO] Processing war project
[INFO] Copying webapp resources [/home/user/git/project/src/main/webapp]
[INFO] Webapp assembled in [475 msecs]
[INFO] 
[INFO] --- maven-resources-plugin:2.5:testResources (default-testResources) @ project ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ project ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.10:test (default-test) @ project ---
[INFO] Surefire report directory: /home/user/git/project/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- gwt-maven-plugin:2.6.0:compile (default) @ project ---
[INFO] auto discovered modules [my.module.Module, my.project.Project]
[INFO] my.module.Module has no EntryPoint - compilation skipped
[INFO] Compiling module my.project.Project
[INFO]    Validating units:
[INFO]       Ignored 115 units with compilation errors in first pass.
[INFO] Compile with -strict or with -logLevel set to TRACE or DEBUG to see all errors.
[INFO]    Computing all possible rebind results for 'com.google.gwt.useragent.client.UserAgentAsserter'
[INFO]       Rebinding com.google.gwt.useragent.client.UserAgentAsserter
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.shared.RequestFactory' specified in deferred binding rule
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver' specified in deferred binding rule
[INFO]          Checking rule <generate-with class='com.google.gwt.editor.rebind.SimpleBeanEditorDriverGenerator'/>
[INFO]             [WARN] Detected warnings related to 'com.google.gwt.editor.client.SimpleBeanEditorDriver'.   Are validation-api-<version>.jar and validation-api-<version>-sources.jar on the classpath?
[INFO]             Specify -logLevel DEBUG to see all errors.
[INFO]             [WARN] Unknown type 'com.google.gwt.editor.client.SimpleBeanEditorDriver' specified in deferred binding rule
[INFO]       Rebinding com.google.gwt.useragent.client.UserAgentAsserter
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.shared.RequestFactory' specified in deferred binding rule
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver' specified in deferred binding rule
[INFO]       Rebinding com.google.gwt.useragent.client.UserAgentAsserter
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.shared.RequestFactory' specified in deferred binding rule
[INFO]          Checking rule <generate-with class='com.google.web.bindery.requestfactory.gwt.rebind.RequestFactoryEditorDriverGenerator'/>
[INFO]             [WARN] Unknown type 'com.google.web.bindery.requestfactory.gwt.client.RequestFactoryEditorDriver' specified in deferred binding rule

... Lots of Rebinding similar to above...

[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 30.074s
[INFO] Finished at: Tue Jun 03 09:18:19 MST 2014
[INFO] Final Memory: 17M/436M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:gwt-maven-plugin:2.6.0:compile (default) on project project: Command [[
[ERROR] /usr/bin/java -Xmx512m -classpath *long classpath* com.google.gwt.dev.Compiler -logLevel INFO -style OBF -war /home/user/git/project/target/project-0.0.1-SNAPSHOT -localWorkers 8 -XfragmentCount -1 -sourceLevel 1.6 -gen /home/user/git/project/target/.generated my.project.Project
[ERROR] ]] failed with status 1

解决方案

I ran mvn package -X and found the following errors

[INFO] [ERROR] Errors in 'gwtupload/client/DecoratedFileUpload.java' [INFO] [ERROR] Line 371: Rebind result 'gwtupload.client.DecoratedFileUpload.DecoratedFileUploadImpl' cannot be abstract

So I updated the dependency gwtupload to a newer version which resolved my problem.

The reason I had ignored this error in a previous attempt, was that mvn package was successful before, using this dependency in this specific version. So I thought this error must have always been there, still leading to a successful package.

这篇关于gwt-maven-plugin:编译失败“状态1”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆