|
|
@@ -324,10 +324,14 @@ empty or only contain files inside the META-INF directory.</p> |
|
|
|
If a JAR file has more that one implementation of the service, a number of |
|
|
|
nested <provider> elements may be used. |
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<h3>Examples</h3> |
|
|
|
|
|
|
|
<pre> <jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/></pre> |
|
|
|
<p>jars all files in the <code>${build}/classes</code> directory into a file |
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> |
|
|
|
|
|
|
|
<pre> <jar destfile="${dist}/lib/app.jar" |
|
|
|
basedir="${build}/classes" |
|
|
|
excludes="**/Test.class" |
|
|
@@ -335,6 +339,7 @@ called <code>app.jar</code> in the <code>${dist}/lib</code> directory.</p> |
|
|
|
<p>jars all files in the <code>${build}/classes</code> directory into a file |
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Files |
|
|
|
with the name <code>Test.class</code> are excluded.</p> |
|
|
|
|
|
|
|
<pre> <jar destfile="${dist}/lib/app.jar" |
|
|
|
basedir="${build}/classes" |
|
|
|
includes="mypackage/test/**" |
|
|
@@ -344,6 +349,7 @@ with the name <code>Test.class</code> are excluded.</p> |
|
|
|
called <code>app.jar</code> in the <code>${dist}/lib</code> directory. Only |
|
|
|
files under the directory <code>mypackage/test</code> are used, and files with |
|
|
|
the name <code>Test.class</code> are excluded.</p> |
|
|
|
|
|
|
|
<pre> <jar destfile="${dist}/lib/app.jar"> |
|
|
|
<fileset dir="${build}/classes" |
|
|
|
excludes="**/Test.class" |
|
|
@@ -363,6 +369,7 @@ by Java).</p> |
|
|
|
<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 @@ produced by the above would look like this: |
|
|
|
</p> |
|
|
|
<pre><code>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 @@ Sealed: false</code></pre> |
|
|
|
provider="org.acme.PinkyLanguage"/> |
|
|
|
</jar> |
|
|
|
</pre></blockquote> |
|
|
|
|
|
|
|
<p> |
|
|
|
The following shows how to create a jar file specifing a service |
|
|
|
with two implementations of the JDK6 scripting interface: |
|
|
@@ -404,5 +413,8 @@ Sealed: false</code></pre> |
|
|
|
</service> |
|
|
|
</jar> |
|
|
|
</pre></blockquote> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</body> |
|
|
|
</html> |