[MNG-5563] Ensuring only the available parameters are allowed
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 5c78f9a..4c4cfad 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
@@ -107,6 +107,7 @@
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5563UnknownParameters.class );
suite.addTestSuite( MavenITmng6566ExecuteAnnotationShouldNotReExecuteGoalsTest.class );
suite.addTestSuite( MavenITmng6754TimestampInMultimoduleProject.class );
suite.addTestSuite( MavenITmng6981ProjectListShouldIncludeChildrenTest.class );
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5563UnknownParameters.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5563UnknownParameters.java
new file mode 100644
index 0000000..2d675e5
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5563UnknownParameters.java
@@ -0,0 +1,57 @@
+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.Arrays;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Warn about unknown parameters
+ */
+public class MavenITmng5563UnknownParameters
+ extends AbstractMavenIntegrationTestCase
+{
+ public MavenITmng5563UnknownParameters()
+ {
+ super( "[4.0.0-alpha-1,)" );
+ }
+
+ /**
+ * One executionblock may contain multiple goals.
+ * Ensure that the parameters exist in at least one of the goals
+ *
+ * @throws Exception
+ */
+ public void testPluginExecutionConfiguration()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5563-unknown-parameters/execution" );
+ Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+
+ verifier.setMavenDebug( false );
+ verifier.setAutoclean( false );
+ verifier.executeGoals( Arrays.asList( "compile" ) );
+ verifier.verifyTextInLog( "Unknown parameters for org.apache.maven.plugins:maven-compiler-plugin:0.1-stub-SNAPSHOT (default-compile):" );
+ verifier.verifyTextInLog( " <unknown> @ org.apache.maven.its.mng5563:mng5563-execution:0.0.1-SNAPSHOT, line 40" );
+ verifier.resetStreams();
+ }
+}
diff --git a/core-it-suite/src/test/resources/mng-5563-unknown-parameters/execution/pom.xml b/core-it-suite/src/test/resources/mng-5563-unknown-parameters/execution/pom.xml
new file mode 100644
index 0000000..d10f7b7
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5563-unknown-parameters/execution/pom.xml
@@ -0,0 +1,47 @@
+<?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 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.mng5563</groupId>
+ <artifactId>mng5563-execution</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>0.1-stub-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>default-compile</id>
+ <configuration>
+ <unknown>VALUE</unknown>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>