You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Nikolas Everett <ni...@gmail.com> on 2008/10/31 14:10:31 UTC

Fwd: Reporting plugin configuration not inheriting

Developers,

I was having a problem yesterday getting the configuration for reporting
plugins to inherit like the configuration for build plugins does.  My emails
didn't get any traction on the users mailing list so I'm trying here.  I'm
sorry if this is the wrong place to bring this up.  If it is, please let me
know where to go.

Thanks so much,

--Nik

---------- Forwarded message ----------
From: Nikolas Everett <ni...@gmail.com>
Date: Thu, Oct 30, 2008 at 12:49 PM
Subject: Reporting plugin configuration no inheriting
To: users@maven.apache.org


I'm trying to set up reporting plugin inheritance and not having any luck.
I'm using Maven 2.0.9 on Java 1.6.0_07.  Here is my problem:
parent/pom.xml has
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <silent>true</silent>
          <links>
            <link>parentLink</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

child/pom.xml has
  <reporting>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links>
            <link>childLink</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

After installing the parent, mvn help:effective-pom for the child yeilds:
 <reporting>
    <outputDirectory>target/site</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <links>
            <link>childLink</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

I expected it to look like:
 <reporting>
    <outputDirectory>target/site</outputDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <silent>true</silent>
          <links>
            <link>parentLink</link>
            <link>childLink</link>
          </links>
        </configuration>
      </plugin>
    </plugins>
  </reporting>

Is there any way to convince maven to do that?

I've attached both projects in case this is not clear.

Thanks very much,

--Nik Everett

Re: Reporting plugin configuration not inheriting

Posted by Nikolas Everett <ni...@gmail.com>.
Thanks for pointing me in the right direction.  10-RC2 doesn't fix it, but
this patch on the head of

http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x

does:
Index: maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
===================================================================
--- maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
(revision 709447)
+++ maven-project/src/main/java/org/apache/maven/project/ModelUtils.java
(working copy)
@@ -431,7 +431,17 @@
         String parentInherited = parent.getInherited();

         boolean parentIsInherited = ( parentInherited == null ) ||
Boolean.valueOf( parentInherited ).booleanValue();
+
+    if (parentIsInherited)
+    {
+            Xpp3Dom childConfiguration = (Xpp3Dom)
child.getConfiguration();
+            Xpp3Dom parentConfiguration = (Xpp3Dom)
parent.getConfiguration();

+            childConfiguration = Xpp3Dom.mergeXpp3Dom( childConfiguration,
parentConfiguration );
+
+        child.setConfiguration(childConfiguration);
+    }
+
         List parentReportSets = parent.getReportSets();

         if ( ( parentReportSets != null ) && !parentReportSets.isEmpty() )


END PATCH

I'm not sure if it breaks any other behavior, though.  I'll create a bug for
this and submit it.

--Nik

On Fri, Oct 31, 2008 at 11:21 AM, Wendy Smoak <ws...@gmail.com> wrote:

> The users list is the right place... give it a bit more time, it
> hasn't even been 24 hours yet. :)
>
> You can also search JIRA to see if this problem has already been
> reported.  Is this it?  http://jira.codehaus.org/browse/MNG-1999
> (Reporting inheritance does not work properly)
>
> If so, it's marked fixed in 2.0.10, so try the release candidate that
> Brian posted recently:
> http://www.nabble.com/-RC%7D-2.0.10-RC2-td20239269.html
>
> --
> Wendy
>
> On Fri, Oct 31, 2008 at 6:10 AM, Nikolas Everett <ni...@gmail.com>
> wrote:
> > I was having a problem yesterday getting the configuration for reporting
> > plugins to inherit like the configuration for build plugins does.  My
> emails
> > didn't get any traction on the users mailing list so I'm trying here.
>  I'm
> > sorry if this is the wrong place to bring this up.  If it is, please let
> me
> > know where to go.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Reporting plugin configuration not inheriting

Posted by Wendy Smoak <ws...@gmail.com>.
The users list is the right place... give it a bit more time, it
hasn't even been 24 hours yet. :)

You can also search JIRA to see if this problem has already been
reported.  Is this it?  http://jira.codehaus.org/browse/MNG-1999
(Reporting inheritance does not work properly)

If so, it's marked fixed in 2.0.10, so try the release candidate that
Brian posted recently:
http://www.nabble.com/-RC%7D-2.0.10-RC2-td20239269.html

-- 
Wendy

On Fri, Oct 31, 2008 at 6:10 AM, Nikolas Everett <ni...@gmail.com> wrote:
> I was having a problem yesterday getting the configuration for reporting
> plugins to inherit like the configuration for build plugins does.  My emails
> didn't get any traction on the users mailing list so I'm trying here.  I'm
> sorry if this is the wrong place to bring this up.  If it is, please let me
> know where to go.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org