2009-11-03 9 views
1

J'ai besoin de compiler mon projet GWT 1.7 à partir de mon fichier de construction ant .... quelqu'un sait comment faire ça ???gwt 1.7 compiler à partir du fichier de construction ant

j'ai pu le faire en GWT 1.5 avec le code suivant dans mon fichier ant:

<target name="compile"> 
    <exec executable="${root.dir}/HelloWorld-compile.cmd" failonerror="true"/> 

Répondre

7

ici sont des cibles de fourmis que j'utilise pour fonctionner en mode hébergé et de compiler en utilisant 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> 
+0

Salut Dave, Que font les choses suivantes avez: Rafael

+0

Dave, I [java] Exception dans le fil "principal" – Rafael

+0

semble avoir manqué une référence aux pots de gwt. btw, tout est sur les fenêtres. – Rafael

Questions connexes