0

How to modify the following maven plugin, so it will sign all jars that start with "test" example:

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

should sign only 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 should be edited to **/test+*.jar or something like this i dont know how.

xMilos
  • 1,519
  • 4
  • 21
  • 36

1 Answers1

1

<include>**/test*.jar</include> should match your files

gtosto
  • 1,381
  • 1
  • 14
  • 18