How to use POMs as a dependency in Maven?

后端 未结 5 1882
醉酒成梦
醉酒成梦 2020-11-29 22:16

Is there a way to add a pom type dependency to my POM and get all its modules?

JavaMail is a good example. Maven Central Repo has a parent POM called:

5条回答
  •  隐瞒了意图╮
    2020-11-29 22:52

    As someone already wrote above : You can't do it . But this is what i did and it worked . Lets assume you have some pom file (JavaMail in your example) with following :

    pom
    
    

    And You want copy all jars mentioned in this pom to some place . This is what i did and it is fast working solution
    Open original pom and just copy-paste all dependencies section from original pom file to your new pom as is . Of course use maven dependency plugin to copy all .

提交回复
热议问题