This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch MNG-7504
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git

commit 5f519c38d1650aa10bfbdde21c75cb265f776a98
Author: Slawomir Jaranowski <s.jaranow...@gmail.com>
AuthorDate: Sun Jun 19 22:08:47 2022 +0200

    [MNG-7504] Don't print warning unsupported reportPlugins for m-site-p
---
 .../org/apache/maven/it/IntegrationTestSuite.java  |  1 +
 ...mng7504NotWarnUnsupportedReportPluginsTest.java | 61 ++++++++++++++++++++++
 .../pom.xml                                        | 28 ++++++++++
 3 files changed, 90 insertions(+)

diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java 
b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
index 16c722efd..3eb9bdc36 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
@@ -106,6 +106,7 @@ public class IntegrationTestSuite
         // Tests that don't run stable and need to be fixed
         // 
-------------------------------------------------------------------------------------------------------------
         // suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- 
MNG-3137
+        suite.addTestSuite( 
MavenITmng7504NotWarnUnsupportedReportPluginsTest.class );
         suite.addTestSuite( MavenITmng7160ExtensionClassloader.class );
         suite.addTestSuite( 
MavenITmng7468UnsupportedPluginsParametersTest.class );
         suite.addTestSuite( MavenITmng7487DeadlockTest.class );
diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7504NotWarnUnsupportedReportPluginsTest.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7504NotWarnUnsupportedReportPluginsTest.java
new file mode 100644
index 000000000..39af92484
--- /dev/null
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7504NotWarnUnsupportedReportPluginsTest.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.it;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test for
+ * <a href="https://issues.apache.org/jira/browse/MNG-7504";>MNG-7504</a>
+ *
+ * Warning about unsupported reportPlugins should not be printed for m-site-p.
+ *
+ * @author Slawomir Jaranowski
+ */
+public class MavenITmng7504NotWarnUnsupportedReportPluginsTest extends 
AbstractMavenIntegrationTestCase
+{
+    private static final String PROJECT_PATH = 
"/mng-7504-warn-unsupported-report-plugins";
+
+    public MavenITmng7504NotWarnUnsupportedReportPluginsTest()
+    {
+        super( "[3.9.0,)" );
+    }
+
+    public void testWarnNotPresent() throws IOException, VerificationException
+    {
+        File rootDir = ResourceExtractor.simpleExtractResources( getClass(), 
PROJECT_PATH );
+
+        Verifier verifier = newVerifier( rootDir.getAbsolutePath() );
+        verifier.setAutoclean( false );
+        verifier.deleteDirectory( "target" );
+        verifier.executeGoal( "site" );
+        verifier.resetStreams();
+
+        List<String> logLines = verifier.loadFile( verifier.getBasedir(), 
verifier.getLogFileName(), false );
+
+        for ( String line : logLines )
+        {
+            assertFalse( line.contains( "[WARNING] Parameter 'reportPlugins' 
is unknown for plugin 'maven-site-plugin:0.1-stub-SNAPSHOT:site 
(default-site)'" ) );
+        }
+    }
+}
diff --git 
a/core-it-suite/src/test/resources/mng-7504-warn-unsupported-report-plugins/pom.xml
 
b/core-it-suite/src/test/resources/mng-7504-warn-unsupported-report-plugins/pom.xml
new file mode 100644
index 000000000..0c4c39f63
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7504-warn-unsupported-report-plugins/pom.xml
@@ -0,0 +1,28 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>
+    <modelVersion>4.0.0</modelVersion>
+
+    <groupId>org.apache.maven.its.7504</groupId>
+    <artifactId>warn-unsupported-report-plugins</artifactId>
+    <packaging>pom</packaging>
+    <version>1.0</version>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-site-plugin</artifactId>
+                <version>0.1-stub-SNAPSHOT</version>
+                <executions>
+                    <execution>
+                        <id>site</id>
+                        <phase>site</phase>
+                        <goals>
+                            <goal>site</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

Reply via email to