Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 36414 invoked from network); 1 Dec 2004 14:40:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Dec 2004 14:40:23 -0000 Received: (qmail 7113 invoked by uid 500); 1 Dec 2004 14:39:19 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 6914 invoked by uid 500); 1 Dec 2004 14:39:16 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 6876 invoked by uid 500); 1 Dec 2004 14:39:16 -0000 Received: (qmail 6803 invoked by uid 99); 1 Dec 2004 14:39:13 -0000 X-ASF-Spam-Status: No, hits=-10.0 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 01 Dec 2004 06:39:10 -0800 Received: (qmail 35595 invoked by uid 1539); 1 Dec 2004 14:39:07 -0000 Date: 1 Dec 2004 14:39:07 -0000 Message-ID: <20041201143907.35594.qmail@minotaur.apache.org> From: peterreilly@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs SignJar.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N peterreilly 2004/12/01 06:39:07 Modified: src/main/org/apache/tools/ant/taskdefs SignJar.java Log: stylecheck Revision Changes Path 1.42 +24 -5 ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java Index: SignJar.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/SignJar.java,v retrieving revision 1.41 retrieving revision 1.42 diff -u -r1.41 -r1.42 --- SignJar.java 26 Nov 2004 10:07:59 -0000 1.41 +++ SignJar.java 1 Dec 2004 14:39:07 -0000 1.42 @@ -18,10 +18,7 @@ import java.io.File; import java.io.IOException; -import java.util.Enumeration; import java.util.Vector; -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; @@ -95,6 +92,7 @@ /** * the jar file to sign; required + * @param jar the jar file to sign */ public void setJar(final File jar) { this.jar = jar; @@ -102,6 +100,7 @@ /** * the alias to sign under; required + * @param alias the alias to sign under */ public void setAlias(final String alias) { this.alias = alias; @@ -109,6 +108,7 @@ /** * keystore location; required + * @param keystore the keystore location */ public void setKeystore(final String keystore) { this.keystore = keystore; @@ -116,6 +116,7 @@ /** * password for keystore integrity; required + * @param storepass the password for the keystore */ public void setStorepass(final String storepass) { this.storepass = storepass; @@ -123,6 +124,7 @@ /** * keystore type; optional + * @param storetype the keystore type */ public void setStoretype(final String storetype) { this.storetype = storetype; @@ -130,6 +132,7 @@ /** * password for private key (if different); optional + * @param keypass the password for the key (if different) */ public void setKeypass(final String keypass) { this.keypass = keypass; @@ -137,6 +140,7 @@ /** * name of .SF/.DSA file; optional + * @param sigfile the name of the .SF/.DSA file */ public void setSigfile(final String sigfile) { this.sigfile = sigfile; @@ -144,6 +148,7 @@ /** * name of signed JAR file; optional + * @param signedjar the name of the signed jar file */ public void setSignedjar(final File signedjar) { this.signedjar = signedjar; @@ -152,6 +157,7 @@ /** * Enable verbose output when signing * ; optional: default false + * @param verbose if true enable verbose output */ public void setVerbose(final boolean verbose) { this.verbose = verbose; @@ -160,6 +166,7 @@ /** * Flag to include the .SF file inside the signature; * optional; default false + * @param internalsf if true include the .SF file inside the signature */ public void setInternalsf(final boolean internalsf) { this.internalsf = internalsf; @@ -168,6 +175,7 @@ /** * flag to compute hash of entire manifest; * optional, default false + * @param sectionsonly flag to compute hash of entire manifest */ public void setSectionsonly(final boolean sectionsonly) { this.sectionsonly = sectionsonly; @@ -177,6 +185,7 @@ * flag to control whether the presence of a signature * file means a JAR is signed; * optional, default false + * @param lazy flag to control whether the presence of a signature */ public void setLazy(final boolean lazy) { this.lazy = lazy; @@ -185,6 +194,7 @@ /** * Adds a set of files to sign * @since Ant 1.4 + * @param set a set of files to sign */ public void addFileset(final FileSet set) { filesets.addElement(set); @@ -193,6 +203,7 @@ /** * sign the jar(s) + * @throws BuildException on errors */ public void execute() throws BuildException { if (null == jar && filesets.size() == 0) { @@ -315,6 +326,15 @@ } } + /** + * Compare a jar file with its corresponding signed jar + * + * @param jarFile the unsigned jar file + * @param signedjarFile the result signed jar file + * @return true if the signedjarfile is newer than the jar file + * false if the signedjarfile is the same as the jarfile or if + * jarfile or the signedjar does not exist. + */ protected boolean isUpToDate(File jarFile, File signedjarFile) { if (null == jarFile) { return false; @@ -346,7 +366,7 @@ /** * test for a file being signed, by looking for a signature in the META-INF * directory - * @param file + * @param file the file to be checked * @return true if the file is signed */ protected boolean isSigned(File file) { @@ -366,4 +386,3 @@ this.preserveLastModified = preserveLastModified; } } - --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org