Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I always use Ant build file, so the project gets compiled and packaged as a war with one click.</p> <p>Add an xml-file to your project with the following content:</p> <pre><code>&lt;project name="test" basedir="." default="default"&gt; &lt;property name="src.dir" value="src" /&gt; &lt;property name="build.dir" value="war" /&gt; &lt;path id="compile.classpath"&gt; &lt;fileset dir="${build.dir}/WEB-INF/lib"&gt; &lt;include name="**/*.jar" /&gt; &lt;include name="**/*.xml" /&gt; &lt;/fileset&gt; &lt;/path&gt; &lt;target name="default" depends="gwtc, buildwar,deploy"&gt; &lt;/target&gt; &lt;target name="gwtc" description="GWT compile to JavaScript"&gt; &lt;java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler"&gt; &lt;classpath&gt; &lt;pathelement location="${src.dir}" /&gt; &lt;path refid="compile.classpath" /&gt; &lt;/classpath&gt; &lt;arg line="-logLevel INFO" /&gt; &lt;jvmarg value="-Xmx1024M" /&gt; &lt;arg value="YourProject.EntryPointClass" /&gt; &lt;/java&gt; &lt;/target&gt; &lt;target name="buildwar"&gt; &lt;war basedir="war" destfile="YourProject.war" webxml="war/WEB-INF/web.xml"&gt; &lt;exclude name="WEB-INF/**" /&gt; &lt;webinf dir="war/WEB-INF/"&gt; &lt;include name="**/gwt-servlet.jar" /&gt; &lt;include name="**/classes/**" /&gt; &lt;/webinf&gt; &lt;/war&gt; &lt;/target&gt; &lt;target name="deploy"&gt; &lt;copy file="YourProject.war" todir="." /&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>(Edit `YourProject.EntryPointClass to the path to your EntryPoint-class)</p> <p>You would need to add <code>gwt-user.jar</code> and <code>gwt-dev.jar</code>to your projects build path(right click on your project -> Build Path -> Add External Achives).</p> <p>If you now look at your "Problems"-view you get a warning that the two files are not available on the server's class path. You can use the QuickFix to either copy it to <code>WEB-INF/lib</code> or hide the warning. The build file will not include those two file in the war-file.</p> <p>All you need to do to compile and create the file is to right click the xml-file and select run as Ant Build.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload