Reputation: 3511
I intend to use one of my maven submodules to distribute shared test code and resources. The submodule is built and injected as test-scoped dependency to the rest of the submodules. How do I prevent the test jar to be released while releasing the rest correctly?
I use maven release plugin as release:prepare
and release:perform
pair.
Upvotes: 4
Views: 3861
Reputation: 12335
The best option I can think of is http://maven.apache.org/plugins/maven-deploy-plugin/deploy-mojo.html#skip . So in the pom of this specific module include the maven-dependency-plugin like this:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
This will ensure that it will never be deployed; no SNAPSHOT nor released version.
Upvotes: 5