ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r987373 - /ant/core/trunk/docs/manual/Tasks/jar.html
Date Fri, 20 Aug 2010 03:42:43 GMT
Author: bodewig
Date: Fri Aug 20 03:42:43 2010
New Revision: 987373

URL: http://svn.apache.org/viewvc?rev=987373&view=rev
Log:
the zipfileset example is simply wrong

Modified:
    ant/core/trunk/docs/manual/Tasks/jar.html

Modified: ant/core/trunk/docs/manual/Tasks/jar.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/Tasks/jar.html?rev=987373&r1=987372&r2=987373&view=diff
==============================================================================
--- ant/core/trunk/docs/manual/Tasks/jar.html (original)
+++ ant/core/trunk/docs/manual/Tasks/jar.html Fri Aug 20 03:42:43 2010
@@ -468,13 +468,31 @@ and <code>${src}/resources/mypackage/ima
 in the same directory in the JAR (and thus be considered in the same package
 by Java).</p>
 
-<h4>Using zipfileset</h4>
+<h4>Merging archives</h4>
 
 <blockquote><pre> &lt;jar destfile="build/main/checksites.jar"&gt;
     &lt;fileset dir="build/main/classes"/&gt;
-    &lt;zipfileset includes="**/*.class"&gt;
-      &lt;fileset dir="lib/main" includes="**/*.jar"/&gt;
-    &lt;/zipfileset&gt;
+    &lt;zipfileset includes="**/*.class" src="lib/main/some.jar"/&gt;
+    &lt;manifest&gt;
+      &lt;attribute name="Main-Class"
+            value="com.acme.checksites.Main"/&gt;
+    &lt;/manifest&gt;
+  &lt;/jar&gt;</pre></blockquote>
+<p>
+  Creates an executable jar file with a main class "com.acme.checksites.Main", and
+  embeds all the classes from the jar <code>lib/main/some.jar</code>.
+</p>
+
+<blockquote><pre> &lt;jar destfile="build/main/checksites.jar"&gt;
+    &lt;fileset dir="build/main/classes"/&gt;
+    &lt;restrict&gt;
+     &lt;name name="**/*.class"/&gt;
+     &lt;archives&gt;
+       &lt;zips&gt;
+         &lt;fileset dir="lib/main" includes="**/*.jar"/&gt;
+       &lt;/zips&gt;
+     &lt;/archives&gt;
+    &lt;/restrict&gt;
     &lt;manifest&gt;
       &lt;attribute name="Main-Class"
             value="com.acme.checksites.Main"/&gt;



Mime
View raw message