I would like to install all the dependencies of a given module (without the module itself), followed by a deploy of just the module.
mvn --file aggregator.xml clean install --also-make --projects :my-module-id
mvn --file aggregator.xml clean deploy --projects :my-module-id
Note 1: I cannot call just the deploy:deploy-goal on the module, because sometimes other goals are bound to the deploy-phase.
Note 2: I also need to avoid packaging :my-module-id twice, because it takes a long time.
Maven command line options help
Example aggregator.xml (reactor pom):
<project>
<name>aggregator</name>
<modules>
<module>common-module-id</module>
<module>my-module-id</module>
</module>
</project>
In case you never want to actually
deploythose other modules (justinstallthem to use them in the build), it would make more sense to set<maven.deploy.skip>true</maven.deploy.skip>in the modules that should not be deployed. Then you can safely call
mvn deploy --also-make --projects :my-module-idwithout deploying stuff you do not need later.