Browse Source

add a new example

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@942767 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Reilly 15 years ago
parent
commit
18e948f211
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      docs/manual/CoreTasks/jar.html

+ 12
- 0
docs/manual/CoreTasks/jar.html View File

@@ -463,6 +463,18 @@ and <code>${src}/resources/mypackage/image.gif</code>, they will appear
in the same directory in the JAR (and thus be considered in the same package
by Java).</p>

<pre> &lt;jar destfile="build/main/checksites.jar"&gt;
&lt;fileset dir="build/main/classes"/&gt;
&lt;zipfileset src="lib/main/util.jar"&gt;
&lt;manifest&gt;
&lt;attribute name="Main-Class"
value="com.acme.checksites.Main"/&gt;
&lt;/manifest&gt;
&lt;/jar&gt;</pre>
<p>
Creates an executable jar file with a main class "com.acme.checksites.Main", and
embeds all the classes from util.jar.
</p>
<pre> &lt;jar destfile=&quot;test.jar&quot; basedir=&quot;.&quot;&gt;
&lt;include name=&quot;build&quot;/&gt;
&lt;manifest&gt;


Loading…
Cancel
Save