Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to programmatically build the effective model of a pom file?

I would create programmatically the effective model from a pom file to get all inherited attributes in the pom model instance. I would analyze some attributes of a pom - but I need for it all attributes - incl. inhertied.

What have I to do? I have tried Sonatype Aether but I did not find a example.

like image 362
Conny Kreyßel Avatar asked Oct 19 '25 08:10

Conny Kreyßel


1 Answers

You could just run mvn help:effective-pom to get the pom that maven is actually using, including all default inherited and parent pom inherited attributes. I don't believe this would give you all the transitive dependencies of listed dependencies, but it should give you what you are asking for here.

like image 96
dlawrence Avatar answered Oct 20 '25 22:10

dlawrence