1
我需要从我的Ant构建文件编译我的GWT 1.7项目编译....任何人都知道该怎么做???GWT 1.7从Ant构建文件
我能在我的Ant文件用下面的代码来做到这一点在GWT 1.5:
<target name="compile">
<exec executable="${root.dir}/HelloWorld-compile.cmd" failonerror="true"/>
我需要从我的Ant构建文件编译我的GWT 1.7项目编译....任何人都知道该怎么做???GWT 1.7从Ant构建文件
我能在我的Ant文件用下面的代码来做到这一点在GWT 1.5:
<target name="compile">
<exec executable="${root.dir}/HelloWorld-compile.cmd" failonerror="true"/>
这里是我用来在托管模式下运行,并使用编译一些Ant目标gwt 1.7.1。
<property name="src.dir" value="src/main/java" />
<property name="build.dir" value="war" />
<path id="compile.classpath">
<fileset dir="${build.dir}/WEB-INF/lib">
<include name="**/*.jar" />
<include name="**/*.xml" />
</fileset>
</path>
<target name="hosted" depends="javac" description="Starts gwt project in a standalone hosted browser and runs embedded jetty on port 8888">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.HostedMode">
<classpath>
<pathelement location="${src.dir}" />
<path refid="compile.classpath" />
</classpath>
<jvmarg value="-Xms256M" />
<jvmarg value="-Xmx256M" />
<arg value="-startupUrl" />
<arg value="index.html" />
<arg value="com.gwt-example.ModuleName" />
</java>
</target>
<target name="gwtc" depends="javac" description="GWT compile to JavaScript">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${src.dir}" />
<path refid="compile.classpath" />
</classpath>
<jvmarg value="-Xmx256M" />
<arg value="com.gwt-example.ModuleName" />
</java>
</target>
喜戴夫, 什么做以下事情: <路径REFID = “compile.classpath”/> –
Rafael
2009-11-03 22:46:54
戴夫, 我现在得到下面的代码: compile: [java] java.lang.NoClassDefFoundError:com/google/gwt/dev/Compiler [java] Exception in thread“main” – Rafael 2009-11-03 22:59:35
好像我缺少对gwt jars的引用。顺便说一句,这一切都在Windows上。 – Rafael 2009-11-03 23:00:39