Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Jenkins中编译GWT_Gwt_Ant_Jenkins - Fatal编程技术网

在Jenkins中编译GWT

在Jenkins中编译GWT,gwt,ant,jenkins,Gwt,Ant,Jenkins,我试图设置Jenkins来构建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

我试图设置Jenkins来构建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、validation-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>

我想你应该重新安排你的
arg
选项,并将
放在
之前:



显然,问题是由传递给GWT编译器的参数'-style OBFUSCATE'引起的。当我在eclipse中运行ant构建时,这很好,但在Jenkins中运行时,GWT认为这是一个模块。不同版本的ant有不同的行为?(假设您使用的是Ant)发布构建脚本中调用GWT编译器的代码段。按照您的建议移动该行是可行的。我只是不明白为什么在Eclipse中这样做是好的。
<arg line="-style OBFUSCATE"/>
<arg value="${gwt.modules}${gwt.module}"/>