0
我使用ant來構建gwt應用程序。設置Ant構建路徑
以下代碼是ant config。我希望建立的文件(nocache.js等)被放置到C:\ WebServers \ home \ tcl.lc \ www \
現在它建立到war war。
<project name="MyProject" default="gwtc" basedir=".">
<property name="build.dir" value="C:\WebServers\home\tcl.lc\www\"/>
<property name="src.dir" value="src"/>
<path id="compile.classpath">
<fileset dir="C:\gwt-2.2.0" includes="*.jar"/>
</path>
<target name="hosted" 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.typingApplication.TypingApplication"/>
</java>
</target>
<target name="gwtc" 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.typingApplication.TypingApplication"/>
</java>
</target>
如果在Java中任務的編譯器類添加它得到它作爲模塊名稱不路徑然後給Invalida模塊名稱:( – Elbek
正如文檔所說,模塊名稱必須是最後一個參數,因此將「-war $ { build.dir}「之前(只需在您的 即可) –
謝謝Broyer。它的工作,我忘了寫這個。抱歉 – Elbek