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

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


The following commit(s) were added to refs/heads/master by this push:
     new e97d16d  [MNG-7349] Limit relocation warning message to direct 
dependencies only
e97d16d is described below

commit e97d16d472662c9e0047334187983f3a11f3ac8d
Author: Guillaume Nodet <[email protected]>
AuthorDate: Mon Jan 24 07:52:54 2022 +0100

    [MNG-7349] Limit relocation warning message to direct dependencies only
---
 .../org/apache/maven/it/IntegrationTestSuite.java  |  1 +
 .../it/MavenITmng7349RelocationWarningTest.java    | 70 ++++++++++++++++++++++
 .../artifacts/new-dep-dep/pom.xml                  | 37 ++++++++++++
 .../artifacts/new-dep/pom.xml                      | 42 +++++++++++++
 .../artifacts/new-plugin-dep/pom.xml               | 37 ++++++++++++
 .../artifacts/new-plugin/pom.xml                   | 42 +++++++++++++
 .../org/apache/maven/its/mng7349/EchoMojo.java     | 27 +++++++++
 .../artifacts/old-dep-dep/pom.xml                  | 45 ++++++++++++++
 .../artifacts/old-dep/pom.xml                      | 45 ++++++++++++++
 .../artifacts/old-plugin-dep/pom.xml               | 45 ++++++++++++++
 .../artifacts/old-plugin/pom.xml                   | 45 ++++++++++++++
 .../org/apache/maven/its/mng7349/EchoMojo.java     | 27 +++++++++
 .../mng-7349-relocation-warning/artifacts/pom.xml  | 27 +++++++++
 .../mng-7349-relocation-warning/project/pom.xml    | 45 ++++++++++++++
 14 files changed, 535 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 5d2297d..92e471e 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( MavenITmng7349RelocationWarningTest.class );
         suite.addTestSuite( MavenITmng6326CoreExtensionsNotFoundTest.class );
         suite.addTestSuite( 
MavenITmng5561PluginRelocationLosesConfigurationTest.class );
         suite.addTestSuite( MavenITmng7335MissingJarInParallelBuild.class );
diff --git 
a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7349RelocationWarningTest.java
 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7349RelocationWarningTest.java
new file mode 100644
index 0000000..62e2da4
--- /dev/null
+++ 
b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng7349RelocationWarningTest.java
@@ -0,0 +1,70 @@
+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 org.apache.maven.it.util.ResourceExtractor;
+
+public class MavenITmng7349RelocationWarningTest
+    extends AbstractMavenIntegrationTestCase
+{
+
+    public MavenITmng7349RelocationWarningTest()
+    {
+        super( "[3.8.5,)" );
+    }
+
+    public void testit()
+            throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(),
+                    "/mng-7349-relocation-warning" );
+        File artifactsDir = new File( testDir, "artifacts" );
+        File projectDir = new File( testDir, "project" );
+
+        Verifier verifier;
+
+        verifier = newVerifier( artifactsDir.getAbsolutePath() );
+        verifier.executeGoal( "install" );
+        verifier.resetStreams();
+        verifier.verifyErrorFreeLog();
+
+        verifier = newVerifier( projectDir.getAbsolutePath() );
+        verifier.executeGoal( "verify" );
+        verifier.resetStreams();
+        verifier.verifyErrorFreeLog();
+        List<String> lines = verifier.loadLines( verifier.getLogFileName(), 
"UTF-8" );
+        List<String> relocated = new ArrayList<>();
+        for (String line : lines) {
+            if (line.contains("has been relocated")) {
+                relocated.add(line);
+            }
+        }
+        assertEquals("Expected 2 relocations, but found multiple",
+                     2, relocated.size());
+        assertTrue("Expected the relocation messages to be logged",
+                    relocated.get(0).contains("Test relocation reason for 
old-plugin"));
+        assertTrue("Expected the relocation messages to be logged",
+                    relocated.get(1).contains("Test relocation reason for 
old-dep"));
+    }
+}
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml
new file mode 100644
index 0000000..a1107d5
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep-dep/pom.xml
@@ -0,0 +1,37 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>new-dep-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml
new file mode 100644
index 0000000..871fc3d
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-dep/pom.xml
@@ -0,0 +1,42 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>new-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>old-dep-dep</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml
new file mode 100644
index 0000000..b58258b
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin-dep/pom.xml
@@ -0,0 +1,37 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>new-plugin-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml
new file mode 100644
index 0000000..ed11692
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/pom.xml
@@ -0,0 +1,42 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>new-plugin</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>old-plugin-dep</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
new file mode 100644
index 0000000..f89cb79
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/new-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
@@ -0,0 +1,27 @@
+package org.apache.maven.its.mng7349;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.project.MavenProject;
+
+@Mojo( name = "echoMojo", defaultPhase = LifecyclePhase.INITIALIZE, threadSafe 
= true )
+public class EchoMojo extends AbstractMojo
+{
+    @Parameter( defaultValue = "World!" )
+    String helloString;
+
+    @Parameter( defaultValue = "${project}", readonly = true )
+    protected MavenProject mavenProject;
+
+    @Override
+    public void execute() throws MojoExecutionException
+    {
+        getLog().warn( 
"====================================================================================="
 );
+        getLog().warn( "Hello " + helloString );
+        getLog().warn( 
"====================================================================================="
 );
+    }
+}
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml
new file mode 100644
index 0000000..a8b9d35
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep-dep/pom.xml
@@ -0,0 +1,45 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>old-dep-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <distributionManagement>
+    <relocation>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>new-dep-dep</artifactId>
+      <message>Test relocation reason for old-dep-dep</message>
+    </relocation>
+  </distributionManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml
new file mode 100644
index 0000000..c47fa1a
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-dep/pom.xml
@@ -0,0 +1,45 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>old-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <distributionManagement>
+    <relocation>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>new-dep</artifactId>
+      <message>Test relocation reason for old-dep</message>
+    </relocation>
+  </distributionManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml
new file mode 100644
index 0000000..4362075
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin-dep/pom.xml
@@ -0,0 +1,45 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>old-plugin-dep</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <distributionManagement>
+    <relocation>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>new-plugin-dep</artifactId>
+      <message>Test relocation reason for old-plugin-dep</message>
+    </relocation>
+  </distributionManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml
new file mode 100644
index 0000000..7e53351
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/pom.xml
@@ -0,0 +1,45 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>old-plugin</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>maven-plugin</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <distributionManagement>
+    <relocation>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>new-plugin</artifactId>
+      <message>Test relocation reason for old-plugin</message>
+    </relocation>
+  </distributionManagement>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-plugin-api</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
+      <artifactId>maven-core</artifactId>
+      <version>${maven-version}</version>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven.plugin-tools</groupId>
+      <artifactId>maven-plugin-annotations</artifactId>
+      <version>3.3</version>
+      <scope>provided</scope>
+    </dependency>
+  </dependencies>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
new file mode 100644
index 0000000..f89cb79
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/old-plugin/src/main/java/org/apache/maven/its/mng7349/EchoMojo.java
@@ -0,0 +1,27 @@
+package org.apache.maven.its.mng7349;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import org.apache.maven.plugins.annotations.Parameter;
+import org.apache.maven.plugins.annotations.LifecyclePhase;
+import org.apache.maven.plugins.annotations.Mojo;
+import org.apache.maven.project.MavenProject;
+
+@Mojo( name = "echoMojo", defaultPhase = LifecyclePhase.INITIALIZE, threadSafe 
= true )
+public class EchoMojo extends AbstractMojo
+{
+    @Parameter( defaultValue = "World!" )
+    String helloString;
+
+    @Parameter( defaultValue = "${project}", readonly = true )
+    protected MavenProject mavenProject;
+
+    @Override
+    public void execute() throws MojoExecutionException
+    {
+        getLog().warn( 
"====================================================================================="
 );
+        getLog().warn( "Hello " + helloString );
+        getLog().warn( 
"====================================================================================="
 );
+    }
+}
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml
 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml
new file mode 100644
index 0000000..de9de10
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/artifacts/pom.xml
@@ -0,0 +1,27 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>artifacts</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>pom</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+    <maven-version>3.1.1</maven-version>
+  </properties>
+
+  <modules>
+    <module>new-dep</module>
+    <module>new-dep-dep</module>
+    <module>new-plugin</module>
+    <module>new-plugin-dep</module>
+    <module>old-dep-dep</module>
+    <module>old-dep</module>
+    <module>old-plugin-dep</module>
+    <module>old-plugin</module>
+  </modules>
+</project>
diff --git 
a/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml
new file mode 100644
index 0000000..fe9b0e1
--- /dev/null
+++ 
b/core-it-suite/src/test/resources/mng-7349-relocation-warning/project/pom.xml
@@ -0,0 +1,45 @@
+<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 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.its.mng7349</groupId>
+  <artifactId>project</artifactId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <maven.compiler.source>1.7</maven.compiler.source>
+    <maven.compiler.target>1.7</maven.compiler.target>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.maven.its.mng7349</groupId>
+      <artifactId>old-dep</artifactId>
+      <version>1.0.0-SNAPSHOT</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.its.mng7349</groupId>
+        <artifactId>old-plugin</artifactId>
+        <version>1.0.0-SNAPSHOT</version>
+        <configuration>
+          <helloString>from Maven!</helloString>
+        </configuration>
+        <executions>
+          <execution>
+            <id>echoMojo</id>
+            <phase>initialize</phase>
+            <goals>
+              <goal>echoMojo</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Reply via email to