Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Skip submodule during maven release

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.

like image 331
Oliver Gondža Avatar asked Oct 23 '25 17:10

Oliver Gondža


1 Answers

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.

like image 159
Robert Scholte Avatar answered Oct 27 '25 04:10

Robert Scholte



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!