Heyho,
I have a maven project with this scructure:
parent:
- List item
- API module
- module2
- ...
- module5
- test
- distribution/assembly
So first i run the parent module, then I run the module which builds the api, then the modules which depend on the api, then a test module which contains tools to test and at the end I run a assembly/distribution where I package some modules in a archive. Because of some problems I can not really change the way and it works so far perfect.
With the jenkins I release it to the maven repo, but I want only to release for example the API, and a few modules, not the test module and the distribution module. Is there a way to skip them? Dont't want to release stuff I dont really need :/
Aggregator projects' purpose is to combine building requirements for simple projects. If your basic projects have different building requirements, consider adding a new aggregator project.
Disable deployment to your Maven repository in your current aggregator project and create a new aggregator project containing only the modules you wish to deploy.
Add this new project to Jenkins, make it depend on your original project and configure it to be deployed to your repository.
To understand you correctly, you still want to run the test modules, but your don't want to deploy/release them. The maven-deploy-plugin to the rescue! To artifact will still be built, but not deployed.
However, the jenkins release plugin will still release all artifacts. Instead of using the jenkins release plugin, think about releasing with the maven-release-plugin, which is easy to do:
Since the default goals are
deploy
andsite
, all should be ok.Just make sure you have a
scm
tag in your root pom:and that your versioning tool command (git, svn, ...) is available on the PATH.
You could add a maven command line option to specify modules to be built in jenkins.