How to use POMs as a dependency in Maven?

后端 未结 5 1886
醉酒成梦
醉酒成梦 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

    The short answer: You cannot do this in Maven.

    The other answers make only the "all" POM a dependency. Does not solve the issue. Another answer tries to import the dependencies of the "all" POM. I don't need the dependencies; I need the (child) modules of the "all" POM. Again, does not solve the issue.

    Side note: I was using the JavaMail library incorrectly. I only needed to add one dependency: com.sun.mail:javax.mail:1.5.0

提交回复
热议问题