diff --git a/docs/manual/CoreTasks/signjar.html b/docs/manual/CoreTasks/signjar.html index 55b6e0662..30dade65c 100644 --- a/docs/manual/CoreTasks/signjar.html +++ b/docs/manual/CoreTasks/signjar.html @@ -14,8 +14,7 @@ tool detailed dependency checking: files are only signed if they are not signed. The signjar attribute can point to the file to generate; if this file exists then its modification date is used as a cue as to whether to resign any JAR file. -
-Note: Requires Java 1.2 or later.

+

Parameters

@@ -27,7 +26,8 @@ its modification date is used as a cue as to whether to resign any JAR file. - + @@ -102,7 +102,8 @@ block - +
jar the jar file to signYes.Yes, unless nested filesets have + been used.
alias
filesetfileset of JAR files to signfileset of JAR files to sign. Will be ignored if + the jar attribute of the task has been set. No
@@ -114,7 +115,7 @@ alias="apache-group" storepass="secret"/>

signs the ant.jar with alias "apache-group" accessing the keystore and private key via "secret" password.


-

Copyright © 2000-2002 Apache Software Foundation. All rights +

Copyright © 2000-2003 Apache Software Foundation. All rights Reserved.

diff --git a/src/main/org/apache/tools/ant/taskdefs/SignJar.java b/src/main/org/apache/tools/ant/taskdefs/SignJar.java index 461416190..9ff1ddef4 100644 --- a/src/main/org/apache/tools/ant/taskdefs/SignJar.java +++ b/src/main/org/apache/tools/ant/taskdefs/SignJar.java @@ -61,6 +61,7 @@ import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.apache.tools.ant.BuildException; import org.apache.tools.ant.DirectoryScanner; +import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; import org.apache.tools.ant.types.FileSet; import org.apache.tools.ant.util.JavaEnvUtils; @@ -235,16 +236,19 @@ public class SignJar extends Task { * sign the jar(s) */ public void execute() throws BuildException { - if (null == jar && null == filesets) { + if (null == jar && filesets.size() == 0) { throw new BuildException("jar must be set through jar attribute " + "or nested filesets"); } if (null != jar) { + if (filesets.size() != 0) { + log("nested filesets will be ignored if the jar attribute has" + + " been specified.", Project.MSG_WARN); + } + doOneJar(jar, signedjar); return; } else { - //Assume null != filesets - // deal with the filesets for (int i = 0; i < filesets.size(); i++) { FileSet fs = (FileSet) filesets.elementAt(i); @@ -262,10 +266,6 @@ public class SignJar extends Task { */ private void doOneJar(File jarSource, File jarTarget) throws BuildException { - if (JavaEnvUtils.isJavaVersion(JavaEnvUtils.JAVA_1_1)) { - throw new BuildException("The signjar task is only available on " - + "JDK versions 1.2 or greater"); - } if (null == alias) { throw new BuildException("alias attribute must be set"); @@ -276,7 +276,7 @@ public class SignJar extends Task { } if (isUpToDate(jarSource, jarTarget)) { - return; + return; } final ExecTask cmd = (ExecTask) getProject().createTask("exec");