I want to use the following maven-script to sign my jars for a webstart application:
<plugin>
<inherited>false</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>signWebJars</id>
<phase>package</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<mkdir dir="${project.build.directory}/signedjars" />
<signjar destDir="${project.build.directory}/signedjars"
tsaurl="http://timestamp.my-tsa-url.com"
alias="server" keystore="src/main/assembly/MyKeystore.jks"
storepass="password" preservelastmodified="true" lazy="true">
<path>
<fileset dir="${project.build.directory}/dependenciesForSign"
includes="*.jar" />
</path>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
As I am behind a proxy I configured one in the settings.xml and maven can access to the internet. Now I need to contact the tsaurl of the certificate authority. But for the given ant tasks this is not working:
[signjar] jarsigner: unable to sign jar: no response from the Timestamping Authority. When connecting from behind a firewall then an HTTP proxy may need to be specified. Supply the following options to jarsigner:
[signjar] -J-Dhttp.proxyHost=<hostname>
[signjar] -J-Dhttp.proxyPort=<portnumber>
I tried to provide the proxy information to the ant task but this was not working. In the manual of the Ant Signjar Task I just found: Ant does not yet support proxy setup for this signing process.
How may I get this working? Or do you suggest another way to sign all jars in a folder - of course with proxy support?
尝试使用https而不是http,例如-Dhttps.proxyHost = -Dhttps.proxyPort =
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.