Thursday, September 22, 2011

Maven: Exclude a specific module's artifact deployment during deploy phase

There are cases, we might be intested to exclude some of the module's artifact upload to remote repository during deployment phase. This can be achieved through the maven-deploy-plugin. Here is an example:
Upon including the above plugin, you should see the following after running mvn deploy in your build output:
[INFO] [deploy:deploy]
[INFO]  skipping artifact deployement
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------