Results 1 to 2 of 2

Thread: Compile w/ ANT File

  1. #1
    Ext JS Premium Member firejack's Avatar
    Join Date
    Apr 2007
    Location
    Baltimore, MD
    Posts
    22

    Exclamation Compile w/ ANT File

    I am attempting to get a GWT-compile working properly through my ANT file with the following target:

    <!-- This target calls Demo-compile to create
    all the content in the ./www directory -->
    <target name="gwt-compile" depends="compile.production.classes" description="use gwt's compiler">
    <!-- delete the files in the web deployment directory -->
    <delete>
    <fileset dir="${web.deploy.location}" includes="**/*"/>
    </delete>
    <!-- execute the compile script generated for the project -->
    <exec executable="${module.gwtproj.basedir}/Demo-compile" failonerror="true"/>
    <!-- copy files from /www location to the web deployment location -->
    <copy todir="${web.deploy.location}">
    <fileset dir="${module.gwtproj.basedir}/www"></fileset>
    </copy>
    </target>

    My Demo-compile file looks like this:

    #!/bin/sh
    java -XstartOnFirstThread -Xmx256M -cp "/home/wkspace/proj/gxt-test/src:/home/wkspace/proj/gxt-test/bin:/home/libs/gwt-mac-1.5.0/gwt-user.jar:/home/libs/gwt-mac-1.5.0/gwt-dev-mac.jar:/home/libs/gxt-1.1.2/gxt.jar:/home/libs/gxt-1.1.2/samples/resources/src" com.google.gwt.dev.GWTCompiler -out "/home/wkspace/proj/gxt-test/www" "[email protected]" demo.Demo;

    And my module depends on the Resources module for some images, etc. Right now, I am getting NullPointer and ClassNotFound exceptions when I invoke the compiler. Specifically - BeanModelLookup

  2. #2

    Default

    you can compile directly with ant. I use this:

    Code:
    <target name="GWTcompile" depends="init">
       <javac target="1.5" srcdir="./src" destdir="${builddir}/www/WEB-INF/classes" classpathref="project.class.path">
       </javac>
       <java classpathref="project.class.path"  classname="com.google.gwt.dev.GWTCompiler" fork="true">
          <jvmarg line="-Xmx512M"/>
          <arg value="-out"/>
          <arg value="${builddir}/www"/>
          <arg value="${Module}"/>
       </java>
       <move todir="${builddir}/www">
         <fileset dir="${builddir}/www/${Module}">
                           <include name="**/*.*"/>
                     </fileset>
               </move>
               <delete dir="${builddir}/www/${module}"/>
        </target>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •