You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2022/05/21 14:07:15 UTC

[maven-integration-testing] branch MNG-7468 created (now fb5940a65)

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

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


      at fb5940a65 [MNG-7468] Check unsupported plugins parameters in configuration

This branch includes the following new commits:

     new fb5940a65 [MNG-7468] Check unsupported plugins parameters in configuration

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-integration-testing] 01/01: [MNG-7468] Check unsupported plugins parameters in configuration

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fb5940a65833e5e32d8a1fac492bf84b41ff7d82
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sat May 21 16:06:38 2022 +0200

    [MNG-7468] Check unsupported plugins parameters in configuration
---
 .../org/apache/maven/it/IntegrationTestSuite.java  |   1 +
 ...nITmng7468UnsupportedPluginsParametersTest.java | 183 +++++++++++++++++++++
 .../config-build-execution/pom.xml                 |  57 +++++++
 .../config-build-mixed/pom.xml                     |  59 +++++++
 .../config-build-plugin/pom.xml                    |  57 +++++++
 .../config-plugin-management-parent/module/pom.xml |  55 +++++++
 .../config-plugin-management-parent/pom.xml        |  54 ++++++
 .../config-plugin-management/pom.xml               |  69 ++++++++
 .../config-with-fork-goal/pom.xml                  |  59 +++++++
 .../mng-7468-unsupported-params/no-config/pom.xml  |  51 ++++++
 .../valid-parameter-alias/pom.xml                  |  54 ++++++
 .../valid-parameter-other-goal/pom.xml             |  54 ++++++
 .../valid-parameter/pom.xml                        |  54 ++++++
 .../org/apache/maven/plugin/coreit/TouchMojo.java  |  82 +++++++++
 14 files changed, 889 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 2e6462554..6111404b2 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( MavenITmng7468UnsupportedPluginsParametersTest.class );
         suite.addTestSuite( MavenITmng7470ResolverTransportTest.class );
         suite.addTestSuite( MavenITmng7464ReadOnlyMojoParametersWarningTest.class );
         suite.addTestSuite( MavenITmng7404IgnorePrefixlessExpressionsTest.class );
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7468UnsupportedPluginsParametersTest.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7468UnsupportedPluginsParametersTest.java
new file mode 100644
index 000000000..78b4364ef
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7468UnsupportedPluginsParametersTest.java
@@ -0,0 +1,183 @@
+package org.apache.maven.it;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Pattern;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test for
+ * <a href="https://issues.apache.org/jira/browse/MNG-7468">MNG-7468</a>
+ *
+ * @author Slawomir Jaranowski
+ */
+public class MavenITmng7468UnsupportedPluginsParametersTest extends AbstractMavenIntegrationTestCase
+{
+    public MavenITmng7468UnsupportedPluginsParametersTest()
+    {
+        super( "[4.0.0-alpha-1,)" );
+    }
+
+    /**
+     * Test that ensures that warning is not printed for empty configuration
+     */
+    public void testNoConfiguration() throws Exception
+    {
+        List<String> warnLines = performTest( "no-config" );
+        assertTrue( "Unwanted warnings: " + warnLines, warnLines.isEmpty() );
+    }
+
+    /**
+     * Test that ensures that warning is not printed for valid parameters
+     */
+    public void testValidParameter() throws Exception
+    {
+        List<String> warnLines = performTest( "valid-parameter" );
+        assertTrue( "Unwanted warnings: " + warnLines, warnLines.isEmpty() );
+    }
+
+    /**
+     * Test that ensures that warning is not printed for valid parameters
+     */
+    public void testValidParameterAlias() throws Exception
+    {
+        List<String> warnLines = performTest( "valid-parameter-alias" );
+        assertTrue( "Unwanted warnings: " + warnLines, warnLines.isEmpty() );
+    }
+
+    /**
+     * Test that ensures that warning is not printed for valid parameters
+     */
+    public void testValidParameterForOtherGoal() throws Exception
+    {
+        List<String> warnLines = performTest( "valid-parameter-other-goal" );
+        assertTrue( "Unwanted warnings: " + warnLines, warnLines.isEmpty() );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testInBuildPlugin() throws Exception
+    {
+        List<String> warnLines = performTest( "config-build-plugin" );
+        assertWarningPresents( warnLines );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testInBuildExecution() throws Exception
+    {
+        List<String> warnLines = performTest( "config-build-execution" );
+        assertWarningPresents( warnLines );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testInBuildMixed() throws Exception
+    {
+        List<String> warnLines = performTest( "config-build-mixed" );
+        assertWarningPresents( warnLines );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testInPluginManagement() throws Exception
+    {
+        List<String> warnLines = performTest( "config-plugin-management" );
+        assertWarningPresents( warnLines );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testInPluginManagementParent() throws Exception
+    {
+        List<String> warnLines = performTest( "config-plugin-management-parent" );
+        assertWarningPresents( warnLines );
+    }
+
+    /**
+     * Test that ensures that warning is printed for configuration
+     */
+    public void testWithForkedGoalExecution() throws Exception
+    {
+        List<String> warnLines = performTest( "config-with-fork-goal" );
+
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidXml' is unknown for plugin: 'maven-it-plugin-fork:2.1-SNAPSHOT:fork-goal (fork)" ) );
+
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidValue' is unknown for plugin: 'maven-it-plugin-fork:2.1-SNAPSHOT:fork-goal (fork)" ) );
+
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidXml' is unknown for plugin: 'maven-it-plugin-fork:2.1-SNAPSHOT:touch (touch)" ) );
+
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidValue' is unknown for plugin: 'maven-it-plugin-fork:2.1-SNAPSHOT:touch (touch)" ) );
+
+        assertTrue( "Not verified line: " + warnLines, warnLines.isEmpty() );
+    }
+
+    private List<String> performTest( String project ) throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-7468-unsupported-params" );
+
+        Verifier verifier = newVerifier( new File( testDir, project ).getAbsolutePath() );
+        verifier.executeGoal( "validate" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+
+        List<String> logLines = verifier.loadFile( verifier.getBasedir(), verifier.getLogFileName(), false );
+        return findUnknownWarning( logLines );
+    }
+
+    private void assertWarningPresents( List<String> warnLines )
+    {
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidValue' is unknown for plugin: 'maven-it-plugin-configuration:2.1-SNAPSHOT:touch (default)" ) );
+
+        assertTrue( warnLines.remove(
+            "[WARNING] Parameter 'invalidXml' is unknown for plugin: 'maven-it-plugin-configuration:2.1-SNAPSHOT:touch (default)" ) );
+
+        assertTrue( "Not verified line: " + warnLines, warnLines.isEmpty() );
+    }
+
+    private List<String> findUnknownWarning( List<String> logLines )
+    {
+        Pattern pattern = Pattern.compile( "\\[WARNING] Parameter .* is unknown.*" );
+        List<String> result = new ArrayList<>();
+        for ( String line : logLines )
+        {
+            if ( pattern.matcher( line ).matches() )
+            {
+                result.add( line );
+            }
+        }
+
+        return result;
+    }
+}
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-execution/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-execution/pom.xml
new file mode 100644
index 000000000..009475c51
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-execution/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+            <configuration>
+              <invalidValue>value</invalidValue>
+              <invalidXml>
+                <item>value</item>
+              </invalidXml>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-mixed/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-mixed/pom.xml
new file mode 100644
index 000000000..a03e55d64
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-mixed/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+            <configuration>
+              <invalidXml>
+                <item>value</item>
+              </invalidXml>
+            </configuration>
+          </execution>
+        </executions>
+        <configuration>
+          <invalidValue>value</invalidValue>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-plugin/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-plugin/pom.xml
new file mode 100644
index 000000000..73064d87a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-build-plugin/pom.xml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <invalidValue>value</invalidValue>
+          <invalidXml>
+            <item>value</item>
+          </invalidXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/module/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/module/pom.xml
new file mode 100644
index 000000000..f6378d051
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/module/pom.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.maven.its.mng7464</groupId>
+    <artifactId>maven-it-mng7468</artifactId>
+    <version>1.0</version>
+  </parent>
+
+  <artifactId>module</artifactId>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+            <phase>validate</phase>
+          </execution>
+        </executions>
+        <configuration>
+          <invalidXml>
+            <item>value</item>
+          </invalidXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/pom.xml
new file mode 100644
index 000000000..012a9f479
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management-parent/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <modules>
+    <module>module</module>
+  </modules>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-configuration</artifactId>
+          <version>2.1-SNAPSHOT</version>
+          <configuration>
+            <invalidValue>value</invalidValue>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management/pom.xml
new file mode 100644
index 000000000..888f92a22
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-plugin-management/pom.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.apache.maven.its.plugins</groupId>
+          <artifactId>maven-it-plugin-configuration</artifactId>
+          <version>2.1-SNAPSHOT</version>
+          <configuration>
+            <invalidValue>value</invalidValue>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+            <phase>validate</phase>
+          </execution>
+        </executions>
+        <configuration>
+          <invalidXml>
+            <item>value</item>
+          </invalidXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-with-fork-goal/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-with-fork-goal/pom.xml
new file mode 100644
index 000000000..a352cfe23
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/config-with-fork-goal/pom.xml
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7468</groupId>
+  <artifactId>test</artifactId>
+  <version>0.1</version>
+  <packaging>pom</packaging>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-fork</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <id>fork</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>fork-goal</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <invalidValue>value</invalidValue>
+          <invalidXml>
+            <item>value</item>
+          </invalidXml>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/no-config/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/no-config/pom.xml
new file mode 100644
index 000000000..ac7841dd1
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/no-config/pom.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-alias/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-alias/pom.xml
new file mode 100644
index 000000000..b2b5700a9
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-alias/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <validParameterAlias>value</validParameterAlias>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-other-goal/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-other-goal/pom.xml
new file mode 100644
index 000000000..b135caed4
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter-other-goal/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <booleanParam>true</booleanParam>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter/pom.xml b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter/pom.xml
new file mode 100644
index 000000000..fca9bb05a
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-7468-unsupported-params/valid-parameter/pom.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+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.
+-->
+
+<project>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7464</groupId>
+  <artifactId>maven-it-mng7468</artifactId>
+  <version>1.0</version>
+
+  <name>Maven Integration Test :: mng7468</name>
+  <description>
+    Test that ensures that warning about unsupported mojo parameters are generated.
+  </description>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.plugins</groupId>
+        <artifactId>maven-it-plugin-configuration</artifactId>
+        <version>2.1-SNAPSHOT</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>touch</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <validParameter>value</validParameter>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+</project>
diff --git a/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java b/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java
new file mode 100644
index 000000000..cb3f7b533
--- /dev/null
+++ b/core-it-support/core-it-plugins/maven-it-plugin-configuration/src/main/java/org/apache/maven/plugin/coreit/TouchMojo.java
@@ -0,0 +1,82 @@
+package org.apache.maven.plugin.coreit;
+
+/*
+ * 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.
+ */
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStreamWriter;
+import java.nio.charset.StandardCharsets;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.plugins.annotations.Parameter;
+
+/**
+ * simple Touch Mojo
+ *
+ * @author Slawomir Jaranowski
+ */
+@Mojo( name = "touch", defaultPhase = LifecyclePhase.VALIDATE )
+public class TouchMojo
+    extends AbstractMojo
+{
+    @Parameter( defaultValue = "${project.build.directory}" )
+    private File outputDirectory;
+
+    @Parameter( alias = "validParameterAlias" )
+    private String validParameter;
+
+    public void execute()
+        throws MojoExecutionException
+    {
+
+        getLog().info( "[MAVEN-CORE-IT-LOG] Using output directory " + outputDirectory );
+        touch( outputDirectory, "touch.txt" );
+
+    }
+
+    static void touch( File dir, String file )
+        throws MojoExecutionException
+    {
+        try
+        {
+            if ( !dir.exists() )
+            {
+                dir.mkdirs();
+            }
+
+            File touch = new File( dir, file );
+
+            try ( OutputStreamWriter w = new OutputStreamWriter(
+                new FileOutputStream( touch, true ), StandardCharsets.UTF_8 ) )
+            {
+                w.write( file );
+                w.write( "\n" );
+            }
+        }
+        catch ( IOException e )
+        {
+            throw new MojoExecutionException( "Error touching file", e );
+        }
+    }
+}