maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1789855 - in /maven/plugins/trunk/maven-site-plugin: ./ src/it/MSITE-484/ src/it/MSITE-484/parent-usage-test/ src/it/MSITE-627/ src/it/new-configuration/ src/main/java/org/apache/maven/plugins/site/render/ src/site/apt/
Date Sun, 02 Apr 2017 06:52:23 GMT
Author: hboutemy
Date: Sun Apr  2 06:52:23 2017
New Revision: 1789855

URL: http://svn.apache.org/viewvc?rev=1789855&view=rev
Log:
[MSITE-782] removed reportPlugins parameter: use project.reporting.plugins

Modified:
    maven/plugins/trunk/maven-site-plugin/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/parent-usage-test/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/MSITE-627/pom.xml
    maven/plugins/trunk/maven-site-plugin/src/it/new-configuration/verify.groovy
    maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
    maven/plugins/trunk/maven-site-plugin/src/site/apt/maven-3.apt.vm

Modified: maven/plugins/trunk/maven-site-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/pom.xml?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/pom.xml Sun Apr  2 06:52:23 2017
@@ -213,7 +213,7 @@ under the License.
     <dependency>
       <groupId>org.apache.maven.reporting</groupId>
       <artifactId>maven-reporting-exec</artifactId>
-      <version>1.3</version>
+      <version>1.4-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>org.apache.maven.shared</groupId>

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/parent-usage-test/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/parent-usage-test/pom.xml?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/parent-usage-test/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/parent-usage-test/pom.xml Sun Apr
 2 06:52:23 2017
@@ -41,39 +41,30 @@ under the License.
       <scope>test</scope>
     </dependency>
   </dependencies>
-  <build>
+  <reporting>
     <plugins>
+      <!-- Adding an additional plugin -->
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-site-plugin</artifactId>
-        <version>@project.version@</version>
+        <artifactId>maven-jxr-plugin</artifactId>
+        <version>2.1</version>
+      </plugin>
+      <!-- Overriding an inherited plugin -->
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.6.1</version>
         <configuration>
-          <reportPlugins combine.children="append">
-            <!-- Adding an additional plugin -->
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-jxr-plugin</artifactId>
-              <version>2.1</version>
-            </plugin>
-            <!-- Overriding an inherited plugin -->
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-javadoc-plugin</artifactId>
-              <version>2.6.1</version>
-              <configuration>
-                <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
-              </configuration>
-              <reportSets>
-                <reportSet>
-                  <reports>
-                    <report>javadoc</report>
-                  </reports>
-                </reportSet>
-              </reportSets>
-            </plugin>
-          </reportPlugins>
+          <stylesheetfile>${basedir}/src/main/javadoc/stylesheet.css</stylesheetfile>
         </configuration>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>javadoc</report>
+            </reports>
+          </reportSet>
+        </reportSets>
       </plugin>
     </plugins>
-  </build>
+  </reporting>
 </project>

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/pom.xml?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-484/pom.xml Sun Apr  2 06:52:23 2017
@@ -34,41 +34,6 @@ under the License.
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
         <version>@project.version@</version>
-        <configuration>
-          <reportPlugins>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-project-info-reports-plugin</artifactId>
-              <version>2.2</version>
-              <configuration>
-                <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
-              </configuration>
-              <reportSets>
-                <reportSet>
-                  <reports>
-                    <report>summary</report>
-                    <report>index</report>
-                    <report>cim</report>
-                    <report>issue-tracking</report>
-                    <report>scm</report>
-                  </reports>
-                </reportSet>
-              </reportSets>
-            </plugin>
-            <plugin>
-              <groupId>org.apache.maven.plugins</groupId>
-              <artifactId>maven-javadoc-plugin</artifactId>
-              <version>2.6.1</version>
-              <reportSets>
-                <reportSet>
-                  <reports>
-                    <report>javadoc</report>
-                  </reports>
-                </reportSet>
-              </reportSets>
-            </plugin>
-          </reportPlugins>
-        </configuration>
       </plugin>
     </plugins>
   </build>
@@ -76,4 +41,40 @@ under the License.
   <modules>
     <module>parent-usage-test</module>
   </modules>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-project-info-reports-plugin</artifactId>
+        <version>2.2</version>
+        <configuration>
+          <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
+        </configuration>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>summary</report>
+              <report>index</report>
+              <report>cim</report>
+              <report>issue-tracking</report>
+              <report>scm</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-javadoc-plugin</artifactId>
+        <version>2.6.1</version>
+        <reportSets>
+          <reportSet>
+            <reports>
+              <report>javadoc</report>
+            </reports>
+          </reportSet>
+        </reportSets>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>

Modified: maven/plugins/trunk/maven-site-plugin/src/it/MSITE-627/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/MSITE-627/pom.xml?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/MSITE-627/pom.xml (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/MSITE-627/pom.xml Sun Apr  2 06:52:23 2017
@@ -50,17 +50,18 @@ under the License.
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-site-plugin</artifactId>
           <version>@project.version@</version>
-          <configuration>
-            <reportPlugins>
-              <plugin>
-                <groupId>org.apache.maven.plugins.site.its</groupId>
-                <artifactId>MSITE-627</artifactId>
-                <version>${project.version}</version>
-              </plugin>
-            </reportPlugins>
-          </configuration>
         </plugin>
       </plugins>
     </pluginManagement>
   </build>
+
+  <reporting>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins.site.its</groupId>
+        <artifactId>MSITE-627</artifactId>
+        <version>${project.version}</version>
+      </plugin>
+    </plugins>
+  </reporting>
 </project>

Modified: maven/plugins/trunk/maven-site-plugin/src/it/new-configuration/verify.groovy
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/it/new-configuration/verify.groovy?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/it/new-configuration/verify.groovy (original)
+++ maven/plugins/trunk/maven-site-plugin/src/it/new-configuration/verify.groovy Sun Apr 
2 06:52:23 2017
@@ -17,6 +17,10 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+ 
+// since maven-site-plugin 3.7, this IT is not expected to be successful any more: back to
reporting section
+return true;
+
 assert !new File( basedir, 'target/surefire-reports' ).exists();
 assert !new File( basedir, 'target/surefire-reports/org.apache.maven.plugins.site.its.AppTest.txt'
).exists();
 

Modified: maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
(original)
+++ maven/plugins/trunk/maven-site-plugin/src/main/java/org/apache/maven/plugins/site/render/AbstractSiteRenderingMojo.java
Sun Apr  2 06:52:23 2017
@@ -41,6 +41,7 @@ import org.apache.maven.doxia.siterender
 import org.apache.maven.doxia.siterenderer.SiteRenderingContext;
 import org.apache.maven.doxia.tools.SiteToolException;
 import org.apache.maven.execution.MavenSession;
+import org.apache.maven.model.ReportPlugin;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.plugin.MojoFailureException;
 import org.apache.maven.plugins.annotations.Component;
@@ -50,7 +51,6 @@ import org.apache.maven.reporting.MavenR
 import org.apache.maven.reporting.exec.MavenReportExecution;
 import org.apache.maven.reporting.exec.MavenReportExecutor;
 import org.apache.maven.reporting.exec.MavenReportExecutorRequest;
-import org.apache.maven.reporting.exec.ReportPlugin;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -140,18 +140,12 @@ public abstract class AbstractSiteRender
     protected MavenSession mavenSession;
 
     /**
-     * <p>Configuration section <b>used internally</b> by Maven 3.</p>
-     * <p>More details available here:
-     * <a href="http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats"
target="_blank">
-     * http://maven.apache.org/plugins/maven-site-plugin/maven-3.html#Configuration_formats</a>
-     * </p>
-     * <p><b>Note:</b> using this field is not mandatory with Maven 3 as
Maven core injects usual
-     * <code>&lt;reporting&gt;</code> section into this field.</p>
-     *
-     * @since 3.0-beta-1 (and read-only since 3.3)
+     * replaces previous reportPlugins parameter, that was injected by Maven core from
+     * reporting section: but this new configuration format has been abandoned.
+     * @since 3.7
      */
-    @Parameter( readonly = true )
-    private ReportPlugin[] reportPlugins;
+    @Parameter( defaultValue = "${project.reporting.plugins}", readonly = true )
+    private ReportPlugin[] reportingPlugins;
 
     private PlexusContainer container;
 
@@ -236,7 +230,7 @@ public abstract class AbstractSiteRender
             mavenReportExecutorRequest.setLocalRepository( localRepository );
             mavenReportExecutorRequest.setMavenSession( mavenSession );
             mavenReportExecutorRequest.setProject( project );
-            mavenReportExecutorRequest.setReportPlugins( reportPlugins );
+            mavenReportExecutorRequest.setReportPlugins( reportingPlugins );
 
             MavenReportExecutor mavenReportExecutor;
             try

Modified: maven/plugins/trunk/maven-site-plugin/src/site/apt/maven-3.apt.vm
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-site-plugin/src/site/apt/maven-3.apt.vm?rev=1789855&r1=1789854&r2=1789855&view=diff
==============================================================================
--- maven/plugins/trunk/maven-site-plugin/src/site/apt/maven-3.apt.vm (original)
+++ maven/plugins/trunk/maven-site-plugin/src/site/apt/maven-3.apt.vm Sun Apr  2 06:52:23
2017
@@ -282,9 +282,11 @@ Using maven-site-plugin with Maven 3
   
   <<This new configuration format is not actually ready for end-users: please don't
use it for the moment.>>
 
-  As a consequence, with <<<maven-site-plugin>>> 3.3, the <<<\<reportPlugins\>>>>
configuration has simply been removed
-  (more precisely marked private/internal), since it should not be used directly. This documentation
has been kept
-  public only to help people who used it in previous versions understand why they need to
migrate back to classic configuration.
+  As a consequence, with <<<maven-site-plugin>>> 3.7, the <<<\<reportPlugins\>>>>
configuration has simply been removed
+  (and marked marked private/internal since 3.3), and
+  {{{https://issues.apache.org/jira/browse/MNG-6189}Maven 3.5.0 prints a warning if it is
used}}.
+  This documentation is kept public only to help people who used it in previous versions
+  understand why they need to migrate back to classic configuration.
 
   <Explanation:> The (former) new format did not support report plugins configuration
inheritance, which is crucial for
   usability: see {{{https://issues.apache.org/jira/browse/MSITE-484}MSITE-484}}. This field
is technically necessary to remove
@@ -303,7 +305,7 @@ Using maven-site-plugin with Maven 3
         <version>3.2</version><!-- last maven-site-plugin version supporting
this reportPlugins configuration -->
         <configuration>
           ...
-          <reportPlugins><!-- not supported any more... (now kept internal) -->
+          <reportPlugins><!-- not supported any more... (removed in 3.7, kept internal
in 3.3) -->
             <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-project-info-reports-plugin</artifactId>



Mime
View raw message