I know that you can configure a section in the parent POM and apply it to submodules in a project with several modules. However, I would like to have a separate POM for reference as a dependency, so I can have a report configuration that I can βmixβ with different projects without the need to replicate the report configuration in multiple projects. (See Dependent POM here: http://sonatype.com/books/maven-book/reference/pom-relationships-sect-pom-best-practice.html )
For example, for my Widget project, I have a parent POM (widget-parent) with two submodules, widget-core and widget-web. I would like to have a separate POM, static analysis, on which the widget element depends. static-analysis will have a block that will determine the Checkstyle and FindBugs reports. When I create a Widget, I would expect Checkstyle and FindBugs to run on widgets and widgets.
If your solution only works on a specific version of Maven, let me know. We have not upgraded to 3.x.
source share