在Jenkins中编译GWT

时间:2014-07-01 13:41:00

标签: 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 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>

1 个答案:

答案 0 :(得分:1)

我想你应该重新安排arg个选项,然后在{/ strong> <arg line="-style OBFUSCATE"/>之前放置<arg value="${gwt.modules}${gwt.module}"/>

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