You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Pilquist (JIRA)" <ji...@codehaus.org> on 2010/06/02 19:50:12 UTC

[jira] Created: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
------------------------------------------------------------------------------------------------------------

                 Key: MSITE-484
                 URL: http://jira.codehaus.org/browse/MSITE-484
             Project: Maven 2.x Site Plugin
          Issue Type: Bug
          Components: inheritance
    Affects Versions: 3.0-alpha-1
         Environment: 3.0-beta-1-SNAPSHOT
            Reporter: Michael Pilquist
         Attachments: site-cfg-inheritance.zip

When using the new configuration format for reportPlugins, it appears that there's no way to:
- Add a report plugin to a submodule
- Override the configuration of a report plugin in a submodule

Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.

Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
{code}
[INFO] ------------------------------------------------------------------------
[INFO] Building parent 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
[INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
[INFO] 
[INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
[INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
[INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
...
[INFO] ------------------------------------------------------------------------
[INFO] Building parent-usage-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
[INFO] 
[INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
[INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
[INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
{code}

Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MSITE-484:
-------------------------------

    Fix Version/s: 3.0-beta-3
         Assignee: Olivier Lamy

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 3.0-beta-1
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-3
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=273106#comment-273106 ] 

Herve Boutemy commented on MSITE-484:
-------------------------------------

yes, a new mecanism is to be defined in Maven core, since plugin configuration inheritance works at DOM level, without any interpretation of any content.

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MSITE-484:
----------------------------------

    Fix Version/s:     (was: 3.1)
                   backlog
    
> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: backlog
>
>         Attachments: MSITE-484.patch, MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Lukas Theussl (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukas Theussl updated MSITE-484:
--------------------------------

    Component/s: Maven 3

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237713#action_237713 ] 

Olivier Lamy edited comment on MSITE-484 at 10/6/10 3:00 PM:
-------------------------------------------------------------

What you have to do is to add to indicate how to merge site plugin configuration when maven build the model 
in the child pom, you can change to ( attribute combine.children="append" )
{code:xml}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-site-plugin</artifactId>
  <version>version</version>
  <configuration>
    <reportPlugins combine.children="append">
{code}
btw this doesn't fix overriding configuration, with this trick some plugins can be executed more than one time :-(

      was (Author: olamy):
    What you have to do is to add to indicate how to merge site plugin configuration when maven build the model 
in the child pom, you can change to ( attribute combine.children="append" )
{code:xml}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-site-plugin</artifactId>
  <version>version</version>
  <configuration>
    <reportPlugins combine.children="append">
{code}
  
> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 3.0-beta-1
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-3
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Dalquist updated MSITE-484:
--------------------------------

    Attachment: MSITE-484.patch

Updated patch, replaces mergePolicy. prefix with merge: xml namespace. In my testing you can specify whatever you want for the namespace URI since I don't actually have an XSD to go with it, I used xmlns:merge="http://maven.apache.org/plugin-merge" in my test pom.

This patch should be complete, all integration tests pass and the copyright headers are correct. I do have an Apache ICLA on file and am an active committer in the portals project: http://people.apache.org/committer-index.html

I would love this to become a core feature of Maven itself for merging plugin configurations. I'm not sure where to go with getting that requested as a feature. I'm hoping that this this seems to affect the site plugin more than others it would be faster to get the fix in here so it could be used as soon as possible.

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=237713#action_237713 ] 

Olivier Lamy commented on MSITE-484:
------------------------------------

What you have to do is to add to indicate how to merge site plugin configuration when maven build the model 
in the child pom, you can change to ( attribute combine.children="append" )
{code:xml}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-site-plugin</artifactId>
  <version>version</version>
  <configuration>
    <reportPlugins combine.children="append">
{code}

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 3.0-beta-1
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-3
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279703#comment-279703 ] 

Eric Dalquist commented on MSITE-484:
-------------------------------------

I just realized the patch is incomplete, I'll get the final version posted tomorrow.

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279696#comment-279696 ] 

Eric Dalquist edited comment on MSITE-484 at 9/22/11 3:25 PM:
--------------------------------------------------------------

This patch provides robust support for merging PlexusConfiguration objects. I've included a unit test which demonstrates the functionality and have tested it locally with various plugin overlays with great success.

For example if the parent pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <reportPlugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

And the child project pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

The runtime effective result is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

      was (Author: edalquist):
    This patch provides robust support for merging PlexusConfiguration objects. I've included a unit test which demonstrates the functionality and have tested it locally with various plugin overlays with great success.

For example if the parent pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <reportPlugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

And the child project pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code:xml}

The runtime effective result is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}
  
> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Issue Comment Edited: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279696#comment-279696 ] 

Eric Dalquist edited comment on MSITE-484 at 9/22/11 3:26 PM:
--------------------------------------------------------------

This patch (against r1170684) provides robust support for merging PlexusConfiguration objects. I've included a unit test which demonstrates the functionality and have tested it locally with various plugin overlays with great success.

For example if the parent pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <reportPlugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

And the child project pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

The runtime effective result is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

      was (Author: edalquist):
    This patch provides robust support for merging PlexusConfiguration objects. I've included a unit test which demonstrates the functionality and have tested it locally with various plugin overlays with great success.

For example if the parent pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <reportPlugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

And the child project pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

The runtime effective result is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}
  
> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MSITE-484:
-------------------------------

    Affects Version/s: 3.0-beta-3
                       3.0-beta-2
        Fix Version/s:     (was: 3.0-beta-3)
                       3.0-beta-4

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Andreas Sewe (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279743#comment-279743 ] 

Andreas Sewe commented on MSITE-484:
------------------------------------

FWIW, it would be great if the {{mergePolicy.children}} and {{mergePolicy.removeDuplicates}} attributes (and also {{combine.children}}) could finally become part of the POM's XML Schema: http://maven.apache.org/xsd/maven-4.0.0.xsd. It's quite annoying to see validation errors on elements like {{developers}}, which would benefit from this feature and are specified by the XSD (unlike, e.g., the plugins' {{configuration}} which is {{xsd:any}}), because these attributes are not part of the XSD.

On a related note: Why not use XML Namespaces for {{mergePolicy.*}}? Verbosity can't be the only reason; after all, it's one {{xmlns}} declaration + a short prefix like {{mp}} vs. the longer {{mergePolicy}} on every attribute.

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Herve Boutemy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279822#comment-279822 ] 

Herve Boutemy commented on MSITE-484:
-------------------------------------

I didn't have time to check for the moment, but yes, this seems interesting at Maven core level: there have already been discussion about having more flexible merge policy for some pom content
see MNG-3124 and MNG-2807

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279697#comment-279697 ] 

Eric Dalquist commented on MSITE-484:
-------------------------------------

Note that I tried to implement this feature in a way such that it could be used by any plugin. It operates on the PlexusConfiguration interface and the merging logic has no direct ties to the maven-site-plugin

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Dennis Lundberg (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Lundberg updated MSITE-484:
----------------------------------

    Fix Version/s:     (was: 3.0-beta-4)
                   3.0.0

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0.0
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279426#comment-279426 ] 

Eric Dalquist commented on MSITE-484:
-------------------------------------

Just a note that this affects the 3.0 release of the plugin as well. Perhaps until the Maven core modifications are done the logic in the maven-site-plugin that handles the reportPlugins could be made configurable in the situation where the same reportPlugin groupId & artifactId exist.

Perhaps something like:

{code:xml}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-site-plugin</artifactId>
  <version>version</version>
  <configuration>
    <duplicatePluginPolicy>USE_LAST</duplicatePluginPolicy>
    <reportPlugins combine.children="append">
{code}

The duplicatePluginPolicy option could be an enum with USE_FIRST, USE_LAST, USE_BOTH options, allowing the site plugin to know what to do if there are multiple plugins with the same groupId:artifactId in the list. This would at least allow for overrides of a single plugin without having to list every plugin the parent defines.


> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=279698#comment-279698 ] 

Olivier Lamy commented on MSITE-484:
------------------------------------

looks interesting patch. Could you please fix license header and use correct ASF attribution (I see :"....Licensed to Jasig...." )

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=239879#action_239879 ] 

Olivier Lamy commented on MSITE-484:
------------------------------------

so this will probably need a hack in maven core for site plugin regarding plugin configuration inheritance.

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: http://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.0-beta-4
>
>         Attachments: site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (MSITE-484) Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format

Posted by "Eric Dalquist (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MSITE-484?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Dalquist updated MSITE-484:
--------------------------------

    Attachment: MSITE-484.patch

This patch provides robust support for merging PlexusConfiguration objects. I've included a unit test which demonstrates the functionality and have tested it locally with various plugin overlays with great success.

For example if the parent pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <reportPlugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <configuration>
          <links>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

And the child project pom's maven-site-plugin is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
          </links>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code:xml}

The runtime effective result is:
{code:xml}
<plugin>
  <artifactId>maven-site-plugin</artifactId>
  <configuration>
    <defaultMergePolicy>MERGE</defaultMergePolicy>
    <reportPlugins combine.children="append">
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links mergePolicy.children="BOTH" mergePolicy.removeDuplicates="true">
            <link>http://static.springsource.org/spring/docs/3.0.x/api/</link>
            <link>http://ehcache.org/apidocs/</link>
            <link>http://aopalliance.sourceforge.net/doc/</link>
            <link>http://java.sun.com/javase/6/docs/api/</link>
            <link>http://java.sun.com/javaee/5/docs/api/</link>
          </links>
          <source>1.6</source>
          <maxmemory>768m</maxmemory>
        </configuration>
      </plugin>
    </reportPlugins>
  </configuration>
</plugin>
{code}

> Support adding and overriding report plugins in new maven-site-plugin 3.x reportPlugins configuration format
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: MSITE-484
>                 URL: https://jira.codehaus.org/browse/MSITE-484
>             Project: Maven 2.x and 3.x Site Plugin
>          Issue Type: Bug
>          Components: inheritance, Maven 3
>    Affects Versions: 3.0-beta-1, 3.0-beta-2, 3.0-beta-3
>         Environment: 3.0-beta-1-SNAPSHOT
>            Reporter: Michael Pilquist
>            Assignee: Olivier Lamy
>             Fix For: 3.1
>
>         Attachments: MSITE-484.patch, site-cfg-inheritance.zip
>
>
> When using the new configuration format for reportPlugins, it appears that there's no way to:
> - Add a report plugin to a submodule
> - Override the configuration of a report plugin in a submodule
> Using the old <reporting> section, both of these use cases were supported.  For large, multi-module builds, it is problematic having to respecify all reporting plugins in any submodule pom that needs to either add an additional reporting plugin or change the configuration of a reporting plugin.
> Attached is a sample project that has a parent POM configured with project-info-reports and javadoc plugin and a submodule configured with jxr plugin and javadoc plugin.  The relevant output is here:
> {code}
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent ---
> [INFO] Deleting file set: /Users/mpilquist/Downloads/site-parent-issue/target (included: [**], excluded: [])
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-project-info-reports-plugin:2.2
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> ...
> [INFO] ------------------------------------------------------------------------
> [INFO] Building parent-usage-test 1.0-SNAPSHOT
> [INFO] ------------------------------------------------------------------------
> [INFO] 
> [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ parent-usage-test ---
> [INFO] 
> [INFO] --- maven-site-plugin:3.0-beta-1-SNAPSHOT:site (default-site) @ parent-usage-test ---
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-jxr-plugin:2.1
> [INFO] configuring reportPlugin org.apache.maven.plugins:maven-javadoc-plugin:2.6.1
> {code}
> Looking at the maven-site-plugin code, it appears the the reportPlugins parameter is just a regular array parameter.  AFAIK, there's no way to merge list configuration items.  Other plugins have worked around this by defining additional mojo parameters (e.g., maven-eclipse-plugin and buildCommands / additionalBuildCommands -- http://maven.apache.org/plugins/maven-eclipse-plugin/eclipse-mojo.html).  This isn't the most flexible option though as it only solves 1 level inheritance.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira