Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>An alternative to making a template is to evolve one by gradually generalising your current project's Ant script so that there are fewer changes to make the next time you copy it for use on a new project. There are several things you can do.</p> <p>Use ${ant.project.name} in file names, so you only have to mention your application name in the project element. For example, if you generate myapp.jar:</p> <pre><code>&lt;project name="myapp"&gt; ... &lt;target name="jar"&gt; ... &lt;jar jarfile="${ant.project.name}.jar" ... </code></pre> <p>Structure your source directory structure so that you can package your build by copying whole directories, rather than naming individual files. For example, if you are copying JAR files to a web application archive, do something like:</p> <pre><code>&lt;copy todir="${war}/WEB-INF/lib" flatten="true"&gt; &lt;fileset dir="lib" includes="**/*.jar"&gt; &lt;/copy&gt; </code></pre> <p>Use properties files for machine-specific and project-specific build file properties.</p> <pre><code>&lt;!-- Machine-specific property over-rides --&gt; &lt;property file="/etc/ant/build.properties" /&gt; &lt;!-- Project-specific property over-rides --&gt; &lt;property file="build.properties" /&gt; &lt;!-- Default property values, used if not specified in properties files --&gt; &lt;property name="jboss.home" value="/usr/share/jboss" /&gt; ... </code></pre> <p>Note that Ant properties cannot be changed once set, so you override a value by defining a new value <em>before</em> the default value.</p>
 

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