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. 
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With