In Maven, how do I build modules, but not the aggregator project itself?

I would like to create modules through the aggregator, but not build the aggregator itself. In my use case, the aggregator is a dummy shell that is simply used to group the assembly, and does not matter as a project in its own way.

Can the unit be removed from the reactor in any way?

+8
maven maven-3
source share
1 answer

AFAIK there is no way to do this. But I believe that your real problem is that this aggregator artifact is deployed to a remote repository along with other modules, and, as you said, this does not make sense. Then I recommend installing <skip>true</skip> for the maven-deploy-plugin in the pom.xml aggregator to disable its deployment, for example:

 <plugin> <artifactId>maven-deploy-plugin</artifactId> <configuration> <skip>true</skip> </configuration> </plugin> 

Support starts with <version>2.4</version> ref deploy-mojo install-mojo

+11
source share

All Articles