Maven - is there a command to load parent priests of all dependency jars?

I know that we can load dependency banks ... but can we load the parent posts of all dependency banks?

For example, Project A brings library B as a dependency, but library B has a parent pom C.xml.

I want to find a command that loads all pom.xml in Bs and C.xml.

ideally, if C.xml has another parent pom D.xml, I also want to download it.

+4
source share
3 answers

Maven dependency plugin with add parent POMs .

mvn dependency:copy-dependencies -Dmdep.addParentPoms=true -Dmdep.copyPom=true

- Maven, ( 2.8 addParentPoms), :

mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:copy-dependencies -Dmdep.addParentPoms=true -Dmdep.copyPom=true

( ), POM POM .

+1

. , maven . .m2/repoistory, -pom. .pom pom.xml

+1

-

mvn org.apache.maven.plugins:maven-dependency-plugin:2.9:resolve

:

mvn dependency:resolve

he will resolve all dependencies, including. estate, etc. After that, you can build using this repository. They will be uploaded to the local repository. If you like these artifacts, including. their letters to a specific directory than you should use the suggestions made by @punge.

+1
source

All Articles