Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/gwt/3.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
Ant、Groovy、GWT使用AntBuilder调用GWT编译_Gwt_Ant_Groovy_Antbuilder - Fatal编程技术网

Ant、Groovy、GWT使用AntBuilder调用GWT编译

Ant、Groovy、GWT使用AntBuilder调用GWT编译,gwt,ant,groovy,antbuilder,Gwt,Ant,Groovy,Antbuilder,大家好,我正在通过创建groovy脚本来自动构建和打包gwt应用程序 AntBuilder是Groovy的一部分,我非常喜欢这个概念。它确实有助于结果脚本的可读性 但是,我在让脚本调用GWT编译器时遇到了一些问题。代码如下: ant.sequential{ path( id:"gwt.path" , location:"src", { fileset (dir:"${GWT_HOME}", includes:"gwt-dev.jar" ) } ) ant.jav

大家好,我正在通过创建groovy脚本来自动构建和打包gwt应用程序

AntBuilder是Groovy的一部分,我非常喜欢这个概念。它确实有助于结果脚本的可读性

但是,我在让脚本调用GWT编译器时遇到了一些问题。代码如下:

ant.sequential{

    path( id:"gwt.path" , location:"src", { fileset (dir:"${GWT_HOME}", includes:"gwt-dev.jar" )   }      )

    ant.java ( fork:true,  maxmemory:"256M", classpathref:"gwt.path", classname:"com.google.gwt.dev.Compiler"
        ,  {    classpath { pathelement location:"src" }
                classpath { pathelement location:"${GWT_HOME}/gwt-user.jar" }
                classpath { pathelement location:"${WEB_INF}/classes" }
                arg (value:"-war")
                arg (value:"bin/www")
                arg (value:"com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder")
                }
        )
}
据我所知,我已经正确地转换了等效的ant脚本(粘贴自另一个gwt项目中使用的先前build.xml文件)

<target name="web" depends="compile" description="GWT Web Compilation">
    <mkdir dir="${gwt.web.out.dir}"/>
    <java fork="true" maxmemory="256M" classpathref="gwt.path" classname="com.google.gwt.dev.Compiler">
     <classpath>
          <pathelement location="src"/>
           <!-- Note the reference to the compiled java classes -->
          <pathelement location="war/WEB-INF/classes"/>
        </classpath>

      <arg value="-war"/>
      <arg value="bin/www"/>
      <arg value="com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder"/>
    </java>
  </target>

谁能告诉我哪里出了问题。

由于GWT编译器看不到
GWT\u DuplicateFinder.GWT.xml
文件,路径一定有问题。路径中确实有
src
文件夹,这很好。因此,可能基本目录或工作目录不正确(或者根本没有设置)

[java] [ERROR] Unable to find 'com/xxx/xxx/xx/xxx/xxx/GWT_DuplicateFinder.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?