2014-07-01 243 views
0

我试图建立詹金斯建立一个GWT编译项目GWT,但我得到这个错误在詹金斯

gwt-compile-module: 
[java] Jul 01, 2014 2:08:59 PM java.util.prefs.FileSystemPreferences$1 run 
[java] INFO: Created user preferences directory. 
[java] Loading inherited module 'OBFUSCATE' 
[java] [ERROR] Unable to find 'OBFUSCATE.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source? 

我有GWT-user.jar,GWT-dev.jar,验证的API -1.0.0.GA-sources.jar和validation-api-1.0.0.GA.jar在类路径中。

OBFUSCATE.gwt.xml必须是一些GWT基础模块,但无法在任何地方找到它。

这里是build.xml中的片段:

<target name="gwt-compile-module" description="Build one GWT module - java to javascript"> 
    <java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"> 
     <classpath> 
      <pathelement location="${src.dir}"/>     
      <pathelement location="${build.dir}"/> 
      <path refid="project.classpath"/> 
     </classpath> 
     <jvmarg value="-Xmx1024M"/> 
     <arg value="-optimize"/> 
     <arg value="${optimize}"/> 
     <arg value="-localWorkers"/> 
     <arg value="${localWorkers}"/> 
     <arg value="-war" /> 
     <arg value="${gwt.output.dir}" /> 
     <arg value="${draftCompile}" /> 
     <arg value="${gwt.modules}${gwt.module}"/> 
     <arg line="-style OBFUSCATE"/> 
    </java> 
</target> 
+0

显然,问题是由引起争论'-style OBFUSCATE'传递给GWT编译器。 当我在eclipse中运行ant build时工作正常,但在Jenkins GWT中运行时认为它是一个模块。 – algiogia

+0

不同版本的Ant具有不同的行为? (假设你正在使用Ant)从调用GWT编译器的构建脚本中发布代码片段。 –

回答

1

我想你应该重新安排你的arg选择和放置<arg line="-style OBFUSCATE"/>以前<arg value="${gwt.modules}${gwt.module}"/>

<arg line="-style OBFUSCATE"/> 
<arg value="${gwt.modules}${gwt.module}"/> 
+0

按照您的建议移动该行。我只是不明白为什么在Eclipse中都不错。 – algiogia