0

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

但是在 maven compile 我总是得到

[错误] 无法在项目 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:生成时间戳时出错:时间戳请求被拒绝。无法识别或不受支持的算法标识符。

由于这个错误,我将我的 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>  
4

1 回答 1

-1

当我删除时构建工作

<tsaLocation>${tsaLocation}</tsaLocation>

从签名配置-> 没有从时间戳服务器获取时间戳,但是对 jars 进行了签名。

于 2018-05-04T13:30:32.630 回答