File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes ANT & Jarsigner error:  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "ANT & Jarsigner error:  "not a private key"" Watch "ANT & Jarsigner error:  "not a private key"" New topic
Author

ANT & Jarsigner error: "not a private key"

Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
I'm trying to sign my jars, and re-using portions of an ANT script that I know works to do the same thing, but I am getting this error from the build.xml:

[signjar] jarsigner: key associated with Alias not a private key

Basically, the build script creates a dummy keystore if not being done on the main build machine (where secure keystore is stored.) I'm generating those files, so the script's working up to a point. Below is the section in the script where I"m trying to sign the jar, as well as its dependent targets dealing with the signing/keystore:

Tom Katz
Ranch Hand

Joined: Aug 19, 2002
Posts: 169
Ahhh, crikeys.. nevermind, I deleted the old generated files, and when run again, the script works to sign the jar.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ANT & Jarsigner error: "not a private key"
 
Similar Threads
how to find jarsigner in ant make file
Is this the correct way to compile code that uses classes in another jar file
How do I sign "jars" in the target directory using Maven?
Clarification in sign jar task in ant
signjar with ant from eclipse - BUILD FAILED: java.io.IOException