0

如何修改以下 maven 插件,使其将对所有以“test”示例开头的 jar 进行签名:

  • test-123.jar ojdbc6.jar not-me.jar

应该只签名 test-123.jar

  <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jarsigner-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>sign</id>
                        <phase>install</phase>
                        <goals>
                            <goal>sign</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <!--path to the app jar folder-->
                    <archiveDirectory>${project.basedir}/target</archiveDirectory>
                    <includes>
                        <include>**/*.jar</include>
                    </includes>
                    <!--path to keystore-->
                    <keystore>keystore.jks</keystore>
                    <alias>test</alias>
                    <storepass>test</storepass>
                    <keypass>test</keypass>
                    <verbose>true</verbose>
                    <processMainArtifact>false</processMainArtifact>                        <removeExistingSignatures>true</removeExistingSignatures>
                </configuration>
            </plugin>

**/*.jar 应该编辑为 **/test+*.jar 或类似的东西,我不知道如何。

4

1 回答 1

1

<include>**/test*.jar</include> 应该与您的文件匹配

于 2017-07-13T12:28:16.980 回答