首页 文章

由于时间戳请求拒绝,webstart-maven-plugin无法对jar进行签名

提问于
浏览
0

我们有一个使用webstart-maven-plugin创建Java Webstart JNLP工件的项目 .

但是在maven编译中我总是得到

[错误]无法在项目webstart上执行目标org.codehaus.mojo:webstart-maven-plugin:1.0-beta-6:jnlp-download-servlet(默认):无法签署jar ... \ target \ jnlp \ libs \ unprocessed_commons-codec-1.10.jar,使用-X来获取错误的详细信息

使用-X运行显示:

jarsigner:无法签名jar:java.io.IOException:生成时间戳时出错:时间戳请求被拒绝 . 无法识别或不支持的算法标识符 .

由于this bug我将JDK更新为1.8(仅用于测试目的,因为我目前仍需要1.7产品):

java -version  
java version "1.8.0_172"  
Java(TM) SE Runtime    Environment (build 1.8.0_172-b11)

但我仍然得到上面的错误 .

要获取我们使用URL http://sha1timestamp.ws.symantec.com/sha1/timestamp的时间戳,请参阅下面的maven插件配置 .

我的问题是:对于我的同事它是有效的,他们有相同的Java版本,相同的maven项目设置等 . 因此它必须是我的本地环境中的问题 . 有任何想法吗?

<plugin>
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>webstart-maven-plugin</artifactId>
    <version>1.0-beta-6</version>
    <executions>
        <execution>
            <phase>process-resources</phase>
            <goals>
                <goal>jnlp-download-servlet</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <outputJarVersions>true</outputJarVersions>
        <outputDirectoryName>webstart</outputDirectoryName>
        <excludeTransitive>false</excludeTransitive>
        <templateDirectory>src/main/resources/jnlp</templateDirectory>
        <libPath>libs</libPath>
        <verbose>true</verbose>
        <unsignAlreadySignedJars>true</unsignAlreadySignedJars>
        <jnlpFiles>
            <jnlpFile>
                <templateFilename>abc.vm</templateFilename>
                <outputFilename>abc.jnlp</outputFilename>
                <jarResources>
                    ...
                </jarResources>
            </jnlpFile>
        </jnlpFiles>
        <sign>
            <keystore>${pathKeystore}</keystore>
            <storepass>${passstore}</storepass>
            <keypass>${passkey}</keypass>
            <alias>${alias}</alias>
            <tsaLocation>${tsaLocation}</tsaLocation>
            <arguments>
                <argument>-J-Djavax.net.ssl.trustStore=${project.build.directory}/../myTruststore.jks</argument>
                <argument>-J-Djavax.net.ssl.trustStorePassword=myPassword</argument>
                <argument>-J-Djavax.net.ssl.keyStore=${project.build.directory}/../myTruststore.jks</argument>
                <argument>-J-Djavax.net.ssl.keyStorePassword=myPassword</argument>
                <argument>-J-Dhttps.proxyHost=proxy.mycompany.com</argument>
                <argument>-J-Dhttps.proxyPort=3128</argument>
                <argument>-J-Dhttp.proxyHost=proxy.mycompany.com</argument>
                <argument>-J-Dhttp.proxyPort=3128</argument>
            </arguments>

        </sign>
        <unsign>true</unsign> <!-- unsign already signed packages and sign them with own key -->
    </configuration>
</plugin>

...         
<tsaLocation>http://sha1timestamp.ws.symantec.com/sha1/timestamp</tsaLocation>

1 回答

  • 0

    我删除时构建工作

    <tsaLocation>${tsaLocation}</tsaLocation>
    

    从符号配置 - >没有从时间戳服务器获取时间戳,但是 jar 已签名 .

相关问题