Note that there are some explanatory texts on larger screens.

plurals
  1. POAnt don't start war target
    primarykey
    data
    text
    <p>I have three targets in build.xml. </p> <p>There are not errors in process.</p> <p>First two runned successfully, but third don't start and there are not war file in result.</p> <p>This is my buid.xml</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;project name="LoginProject" basedir="." default="compile"&gt; &lt;property name="src.dir" value="src"/&gt; &lt;property name="classes.dir" value="build/classes"/&gt; &lt;property name="war.dir" value="build/war"/&gt; &lt;target name="clean"&gt; &lt;delete dir="build"/&gt; &lt;/target&gt; &lt;target name="compile" depends="clean"&gt; &lt;mkdir dir="${classes.dir}"/&gt; &lt;javac srcdir="${src.dir}" destdir="${classes.dir}" includeantruntime="false"&gt; &lt;classpath location="lib/myfaces-api-2.0.2.jar"/&gt; &lt;classpath location="lib/servlet-api.jar"/&gt; &lt;/javac&gt; &lt;/target&gt; &lt;target name="war" depends="compile"&gt; &lt;mkdir dir="${war.dir}"/&gt; &lt;war destfile="${war.dir}/loginproject.war" webxml="web/WEB-INF/web.xml"&gt; &lt;fileset dir="WebContent"/&gt; &lt;lib dir="lib"/&gt; &lt;classes dir="${classes.dir}"/&gt; &lt;/war&gt; &lt;/target&gt; &lt;/project&gt; </code></pre> <p>And this is log from command line</p> <pre><code>D:\Work\Java\AntLoginProject&gt;ant Buildfile: D:\Work\Java\AntLoginProject\build.xml clean: [delete] Deleting directory D:\Work\Java\AntLoginProject\build compile: [mkdir] Created dir: D:\Work\Java\AntLoginProject\build\classes [javac] Compiling 3 source files to D:\Work\Java\AntLoginProject\build\classes BUILD SUCCESSFUL Total time: 1 second </code></pre> <p>What wrong i do? </p> <p>I change default target to war. But now get error.</p> <pre><code>D:\Work\Java\AntLoginProject&gt;ant war Buildfile: D:\Work\Java\AntLoginProject\build.xml BUILD FAILED D:\Work\Java\AntLoginProject\build.xml:30: Content is not allowed in trailing section. Total time: 0 seconds </code></pre>
    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.
 

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