0

次の maven-script を使用して、webstart アプリケーションの jar に署名したいと考えています。

<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>

私はプロキシの背後にいるので、settings.xmlでプロキシを構成し、mavenはインターネットにアクセスできます。ここで、認証局の tsaurl に連絡する必要があります。しかし、特定の ant タスクでは、これは機能しません。

  [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>

Ant タスクにプロキシ情報を提供しようとしましたが、うまくいきませんでした。Ant Signjar Taskのマニュアルで、 Antはこの署名プロセスのプロキシ設定をまだサポートしていません。

どうすればこれを機能させることができますか? または、フォルダー内のすべての jar に署名する別の方法を提案しますか? もちろん、プロキシ サポートを使用しますか?

4

1 に答える 1

0

http の代わりに https を試してください。例: -Dhttps.proxyHost= -Dhttps.proxyPort=

于 2014-02-12T13:45:10.037 に答える