Is there a way for a Maven project to inherit report configurations from a pom dependency?

后端 未结 2 579
天命终不由人
天命终不由人 2021-01-19 21:13

I know that it\'s possible to configure the section in a parent POM and have it apply to the sub-modules in a multi-module project. However, I\'d like to have a separate P

相关标签:
2条回答
  • 2021-01-19 22:06

    This supposedly works since Maven 3.5, which was released in spring of 2017; see the related issue.

    Configuration defined in plugins under <build><pluginManagement> will be used under <reporting> too now.

    Refer to the documentation for further info, if you don't know how plugin-management works in Maven.

    0 讨论(0)
  • 2021-01-19 22:07

    With Maven 3 the reporting element in the pom is gone and replaced by a configuration element for the site plugin. You can then use the usual pluginManagement to define a configuration that is used everywhere. I would suggest to upgrade to Maven 3 in general anyway and this gives you another good reason..

    Update: The reporting element has been brought back and works again with latest versions of the site plugin.

    0 讨论(0)
提交回复
热议问题