maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r686058 - in /maven/plugins/trunk/maven-javadoc-plugin/src: it/MJAVADOC-110/test-module/ main/java/org/apache/maven/plugin/javadoc/ test/java/org/apache/maven/plugin/javadoc/
Date Thu, 14 Aug 2008 22:06:43 GMT
Author: vsiveton
Date: Thu Aug 14 15:06:43 2008
New Revision: 686058

URL: http://svn.apache.org/viewvc?rev=686058&view=rev
Log:
MJAVADOC-212: AggregatorJavadocReport/AggregatorTestJavadocReport are used by default in aggregator
and no reports are generated
Submitted by: Benjamin Bentmann
Reviewed by: Vincent Siveton

o updated code due to several discussions with Benjamin on IRC

Modified:
    maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-110/test-module/pom.xml
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocJar.java
    maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
    maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-110/test-module/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-110/test-module/pom.xml?rev=686058&r1=686057&r2=686058&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-110/test-module/pom.xml (original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/it/MJAVADOC-110/test-module/pom.xml Thu Aug
14 15:06:43 2008
@@ -31,4 +31,15 @@
   <packaging>jar</packaging>
   <version>1.0-SNAPSHOT</version>
   <name>Test Module</name>
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <inherited>false</inherited>
+        <configuration>
+          <debug>true</debug>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
 </project>
\ No newline at end of file

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java?rev=686058&r1=686057&r2=686058&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/AbstractJavadocMojo.java
Thu Aug 14 15:06:43 2008
@@ -329,10 +329,10 @@
 
     /**
      * Whether to build an aggregated report at the root, or build individual reports.
-     * Since 2.5, you could use <code>javadoc:aggregate</code> goal as an alternative.
-     * <br/>
-     *
+     * 
      * @parameter expression="${aggregate}" default-value="false"
+     * @deprecated As of version 2.5, use the goals <code>javadoc:aggregate</code>
and
+     *             <code>javadoc:test-aggregate</code> instead.
      */
     protected boolean aggregate;
 
@@ -1310,8 +1310,7 @@
     // ----------------------------------------------------------------------
 
     /**
-     * Indicates whether this goal is flagged with <code>@aggregator</code> or
the value of the <code>aggregate</code>
-     * parameter.
+     * Indicates whether this goal is flagged with <code>@aggregator</code>.
      *
      * @return <code>true</code> if the goal is designed as an aggregator, <code>false</code>
otherwise.
      * @see AggregatorJavadocReport
@@ -1319,7 +1318,7 @@
      */
     protected boolean isAggregator()
     {
-        return aggregate;
+        return false;
     }
 
     /**

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocJar.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocJar.java?rev=686058&r1=686057&r2=686058&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocJar.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocJar.java
Thu Aug 14 15:06:43 2008
@@ -166,9 +166,6 @@
             innerDestDir = new File( getOutputDirectory() );
         }
 
-        // The JAR does not operate in aggregation mode - individual Javadoc JARs are always
distributed.
-        aggregate = false;
-
         ArtifactHandler artifactHandler = project.getArtifact().getArtifactHandler();
         if ( !"java".equals( artifactHandler.getLanguage() ) )
         {

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java?rev=686058&r1=686057&r2=686058&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/main/java/org/apache/maven/plugin/javadoc/JavadocReport.java
Thu Aug 14 15:06:43 2008
@@ -230,6 +230,13 @@
         }
     }
 
+    /** {@inheritDoc} */
+    protected boolean isAggregator()
+    {
+        // only here for backward compatibility, this flag does not work reliably
+        return aggregate;
+    }
+
     /**
      * Gets the resource bundle for the specified locale.
      *

Modified: maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java?rev=686058&r1=686057&r2=686058&view=diff
==============================================================================
--- maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
(original)
+++ maven/plugins/trunk/maven-javadoc-plugin/src/test/java/org/apache/maven/plugin/javadoc/JavadocReportTest.java
Thu Aug 14 15:06:43 2008
@@ -465,7 +465,7 @@
     {
         File testPom = new File( getBasedir(),
                                  "src/test/resources/unit/aggregate-test/aggregate-test-plugin-config.xml"
);
-        JavadocReport mojo = (JavadocReport) lookupMojo( "javadoc", testPom );
+        JavadocReport mojo = (JavadocReport) lookupMojo( "aggregate", testPom );
         mojo.execute();
 
         // check if project1 api files exist
@@ -720,7 +720,7 @@
     {
         File testPom = new File( getBasedir(),
                                  "src/test/resources/unit/aggregate-resources-test/aggregate-resources-test-plugin-config.xml"
);
-        JavadocReport mojo = (JavadocReport) lookupMojo( "javadoc", testPom );
+        JavadocReport mojo = (JavadocReport) lookupMojo( "aggregate", testPom );
         mojo.execute();
 
         // Test overview



Mime
View raw message