Is it possible to include several smaller pom files to create the parent pom file. (e.g. I would like to split the reporting, build sections into their own poms and include them in the parent pom) for managing them effectively
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you are using Maven 2, you can simply create several parent levels. The first
pom.xml(pom1) will define the basic properties (such as repositories for example). The secondpom.xml(pom2), which has pom1 as<parent>, will define the reporting information. And so on… Finally, the “real”pom.xmlwill inherit from the pom2 and will define its own properties.You can create as many parent levels as you want (of course, it will be harder to maintain if you have 5 parent levels).
Note that Maven 3 talked about introducing the mixin concept, which will allow you to fragment your
pom.xmlinto several files, but it looks like that is not happening now until maven 4