I'm using the following command
mvn package -DskipTests -q -pl <<my list of projects>> -am exec:exec -Dexec.executable="echo" -Dexec.args='${project.artifact.file}'
to print the list of jar files produced by my build. This is useful on Jenkins where my archive command does not have explicit knowledge about which build it's running.
But I've noticed a problem. If I've defined a test-jar this approach does not detect it. e.g.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Is there any property that'll allow me to retrieve the name of the test-jar? i.e. Similar to ${project.artifact.file}