I have a few projects with LOTS of maven dependencies. When I invoke the command mvn deploy (or some variation of it), I would like to not only have the project itself depl
I propose the following solution which looks a lot less like trial and error for resolving dependencies compared to the existing answers.
What you can do is to call mvn -Dmdep.copyPom=true dependency:copy-dependencies after deploying the main project. This will copy transitively all dependencies of your project to target/dependency including their respective pom files.
You can then iterate through all of the dependencies and deploy them to the repository using deploy:deploy-file, e.g. with such a bash loop:
for pom in target/dependency/*.pom; do mvn deploy:deploy-file -Durl=http://your/repo -Dfile="${pom%%.pom}.jar" -DgeneratePom=false -DpomFile="$pom"