I have a Maven project with several modules, but I only want one to be deployed to my remote repository server. I tried to put the distributionManagement
in the pom of my module that I want to deploy, but it can only be put in the main pom. How could I do this?
Thank you.
Edit: Fixed by putting
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
to the modules that I don't want to be deployed.
You can do that by setting the skip property of the maven deploy plugin to true in all other modules.
But: Why is it multi-module project if you only need one of the modules later? Shouldn't it be split up?