2011-09-13 13 views
0

私はビルドgwtアプリにantを使用しています。設定Antビルドパス

次のコードはant configです。ビルドされたファイル(nocache.jsなど)はC:\ WebServers \ home \ tcl.lc \ www \

に配置され、war wolderにビルドされます。

<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> 

答えて

0

あなたのターゲットのJavaのタスクにこれらを追加し、短い中http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#DevGuideCompilerOptions(とDevModeを用http://code.google.com/webtoolkit/doc/latest/DevGuideCompilingAndDebugging.html#What_options_can_be_passed_to_development_mode

参照してください:

<arg value="-war" /> 
<arg value="${build.dir}" /> 
+0

のjavaタスクコンパイラクラスでそれを追加した場合それはモジュール名として取得し、Invalidaのモジュール名を与えます:( – Elbek

+0

ドキュメントによれば、モジュール名は最後の引数でなければならないので、 "-war $ { build.dir} "前に(の直後) –

+0

おかげでBroyer。それは働いた、私はちょうどそれについて書くことを忘れた。ごめんなさい – Elbek

関連する問題