diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 115bbeef1..b28cbc824 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -20,6 +20,7 @@ Balazs Fejes 2
Benjamin Burgess
Ben Galbraith
Benoit Moussaud
+Bernd Dutkowski
Brad Clark
Brant Langer Gurganus
Brian Deitte
diff --git a/WHATSNEW b/WHATSNEW
index 50c9cfb55..734ac03c2 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -34,6 +34,8 @@ Other changes:
* Add
The whenmanifestonly
parameter controls what happens when no
-files, apart from the manifest file, match.
+files, apart from the manifest file, or nested services, match.
If skip
, the JAR is not created and a warning is issued.
If fail
, the JAR is not created and the build is halted with an error.
-If create
, (default) an empty JAR file (only containing a manifest)
+If create
, (default) an empty JAR file (only containing a manifest and services)
is created.
(The Jar task is a shortcut for specifying the manifest file of a JAR file.
@@ -82,7 +82,7 @@ being wrapped and continued on the next line.
fully-qualified name to exist within a single archive. This has been
documented as causing various problems for unsuspecting users. If you wish
to avoid this behavior you must set the duplicate
attribute
-to a value other than its default, "add"
.
"add"
.
Attribute | +Description | +Required | +
type | +The name of the service. | +Yes | +
provider | ++ The classname of the class implemening the service. + | +Yes, unless there is a nested
+ <provider> element. |
+
+ The provider classname is specified either by the "provider" attribute, or + by a nested <provider> element, which has a single "classname" attribute. + If a JAR file has more that one implementation of the service, a number of + nested <provider> elements may be used. +
<jar destfile="${dist}/lib/app.jar" basedir="${build}/classes"/>
jars all files in the ${build}/classes
directory into a file
@@ -336,6 +381,28 @@ Name: common/MyClass.class
Sealed: false
-
+
+ The following shows how to create a jar file specifing a service + with an implementation of the JDK6 scripting interface: +
++<jar jarfile="pinky.jar"> + <fileset dir="build/classes"/> + <service type="javax.script.ScriptEngineFactory" + 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: +
++<jar jarfile="pinkyandbrain.jar"> + <fileset dir="classes"/> + <service type="javax.script.ScriptEngineFactory"> + <provider classname="org.acme.PinkyLanguage"/> + <provider classname="org.acme.BrainLanguage"/> + </service> +</jar> +