Return-Path:
Delivered-To: apmail-ant-dev-archive@www.apache.org
Received: (qmail 88684 invoked from network); 4 Jan 2007 12:49:21 -0000
Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2)
by minotaur.apache.org with SMTP; 4 Jan 2007 12:49:21 -0000
Received: (qmail 39773 invoked by uid 500); 4 Jan 2007 12:49:28 -0000
Delivered-To: apmail-ant-dev-archive@ant.apache.org
Received: (qmail 39448 invoked by uid 500); 4 Jan 2007 12:49:27 -0000
Mailing-List: contact dev-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Unsubscribe:
List-Help:
List-Post:
List-Id: "Ant Developers List"
Reply-To: "Ant Developers List"
Delivered-To: mailing list dev@ant.apache.org
Received: (qmail 39437 invoked by uid 500); 4 Jan 2007 12:49:27 -0000
Received: (qmail 39434 invoked by uid 99); 4 Jan 2007 12:49:27 -0000
Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 04:49:27 -0800
X-ASF-Spam-Status: No, hits=-9.4 required=10.0
tests=ALL_TRUSTED,NO_REAL_NAME
X-Spam-Check-By: apache.org
Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Jan 2007 04:49:19 -0800
Received: by eris.apache.org (Postfix, from userid 65534)
id CA48C1A981A; Thu, 4 Jan 2007 04:48:22 -0800 (PST)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: svn commit: r492552 - /ant/core/trunk/docs/manual/CoreTasks/jar.html
Date: Thu, 04 Jan 2007 12:48:22 -0000
To: ant-cvs@apache.org
From: jhm@apache.org
X-Mailer: svnmailer-1.1.0
Message-Id: <20070104124822.CA48C1A981A@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Author: jhm
Date: Thu Jan 4 04:48:22 2007
New Revision: 492552
URL: http://svn.apache.org/viewvc?view=rev&rev=492552
Log:
Add an example how to store a program-version info in the manifest. Make the code more readable.
Modified:
ant/core/trunk/docs/manual/CoreTasks/jar.html
Modified: ant/core/trunk/docs/manual/CoreTasks/jar.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/CoreTasks/jar.html?view=diff&rev=492552&r1=492551&r2=492552
==============================================================================
--- ant/core/trunk/docs/manual/CoreTasks/jar.html (original)
+++ ant/core/trunk/docs/manual/CoreTasks/jar.html Thu Jan 4 04:48:22 2007
@@ -324,10 +324,14 @@
If a JAR file has more that one implementation of the service, a number of
nested <provider> elements may be used.
+
+
Examples
+
<jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>
jars all files in the ${build}/classes
directory into a file
called app.jar
in the ${dist}/lib
directory.
+
<jar destfile="${dist}/lib/app.jar"
basedir="${build}/classes"
excludes="**/Test.class"
@@ -335,6 +339,7 @@
jars all files in the ${build}/classes
directory into a file
called app.jar
in the ${dist}/lib
directory. Files
with the name Test.class
are excluded.
+
<jar destfile="${dist}/lib/app.jar"
basedir="${build}/classes"
includes="mypackage/test/**"
@@ -344,6 +349,7 @@
called app.jar
in the ${dist}/lib
directory. Only
files under the directory mypackage/test
are used, and files with
the name Test.class
are excluded.
+
<jar destfile="${dist}/lib/app.jar">
<fileset dir="${build}/classes"
excludes="**/Test.class"
@@ -363,6 +369,7 @@
<include name="build"/>
<manifest>
<attribute name="Built-By" value="${user.name}"/>
+ <attribute name="Program-Version" value="1.0.0beta2"/>
<section name="common/class1.class">
<attribute name="Sealed" value="false"/>
</section>
@@ -375,6 +382,7 @@
Manifest-Version: 1.0
Built-By: conor
+Program-Version: 1.0.0beta2
Created-By: Apache Ant 1.6.5
Name: common/MyClass.class
@@ -391,6 +399,7 @@
provider="org.acme.PinkyLanguage"/>
</jar>
+
The following shows how to create a jar file specifing a service
with two implementations of the JDK6 scripting interface:
@@ -404,5 +413,8 @@
</service>
</jar>
+
+
+