You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by "Demetrio Cruz M." <dc...@seiton.com.mx> on 2007/11/29 20:43:29 UTC
Hi
Hi.
Yesterday I needed that the SignerJar had the providerclass and
providerarg attributes, but they weren't implemented, so my wife and I
came with this patch; I hope it'll be useful.
--
apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
2006-12-13 06:16:21.000000000 -0600
+++
apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/AbstractJarSignerTask.java
2007-11-28 20:15:00.000000000 -0600
@@ -61,6 +61,12 @@
* password for the key in the store
*/
protected String keypass;
+
+
+ protected String providerClass;
+
+ protected String providerArg;
+
/**
* verbose output
*/
@@ -175,6 +181,16 @@
public void setVerbose(final boolean verbose) {
this.verbose = verbose;
}
+
+ public void
+ setProviderClass(final String providerClass){
+ this.providerClass = providerClass;
+ }
+
+ public void
+ setProviderArg(final String providerArg){
+ this.providerArg = providerArg;
+ }
/**
* Adds a set of files to sign
###########################################
###########################################
--- apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SignJar.java
2006-12-13 06:16:18.000000000 -0600
+++ apache-ant-1.7.0/src/main/org/apache/tools/ant/taskdefs/SignJar.java
2007-11-28 21:44:19.000000000 -0600
@@ -389,6 +389,16 @@
addValue(cmd, "-sectionsonly");
}
+ if(providerClass != null && !providerClass.trim().equals("")){
+ addValue(cmd,"-providerClass");
+ addValue(cmd,providerClass);
+ }
+
+ if(providerArg != null && !providerArg.trim().equals("")){
+ addValue(cmd,"-providerArg");
+ addValue(cmd,providerArg);
+ }
+
//add -tsa operations if declared
addTimestampAuthorityCommands(cmd);
@@ -397,6 +407,7 @@
//alias is required for signing
addValue(cmd, alias);
+
log("Signing JAR: "
+ jarSource.getAbsolutePath()
Greetings
-----------
Demetrio Cruz Modesto
dcruz (at) seiton (dot) com (dot) mx
Seiton Nova Mentis
http://www.seiton.com.mx
LainSoft Foundation
http://www.lainsoft.org
"My feeling is that when we prepare a program, the experience can be just
like composing poetry or music"
-- Donald Knuth
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org