You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2021/12/25 18:57:24 UTC
[maven-integration-testing] branch MNG-5561 created (now fdfff08)
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a change to branch MNG-5561
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git.
at fdfff08 Add projects
This branch includes the following new commits:
new fdfff08 Add projects
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: Add projects
Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
michaelo pushed a commit to branch MNG-5561
in repository https://gitbox.apache.org/repos/asf/maven-integration-testing.git
commit fdfff08fd76651ac765dbde3d8fa8a9b07138a88
Author: Michael Osipov <mi...@siemens.com>
AuthorDate: Sat Dec 25 19:57:14 2021 +0100
Add projects
---
.../new-plugin/pom.xml | 35 ++++++++++++++++++
.../org/apache/maven/its/mng5561/EchoMojo.java | 28 +++++++++++++++
.../old-plugin-with-relocation/pom.xml | 42 ++++++++++++++++++++++
.../org/apache/maven/its/mng5561/EchoMojo.java | 28 +++++++++++++++
.../project/pom.xml | 37 +++++++++++++++++++
5 files changed, 170 insertions(+)
diff --git a/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml
new file mode 100644
index 0000000..1376232
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/pom.xml
@@ -0,0 +1,35 @@
+<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.mng5561.plugins</groupId>
+ <artifactId>enhanced-echo-maven-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>
+ <mavenVersion>3.0</mavenVersion>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.6.0</version>
+ <scope>provided</scope><!-- annotations are needed only to build the plugin -->
+ </dependency>
+ </dependencies>
+</project>
diff --git a/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java
new file mode 100644
index 0000000..8fc7696
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/new-plugin/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java
@@ -0,0 +1,28 @@
+package org.apache.maven.its.mng5561;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import org.apache.maven.plugins.annotations.Execute;
+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-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/pom.xml
new file mode 100644
index 0000000..c76a6ee
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/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.mng5561</groupId>
+ <artifactId>echo-maven-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>
+ <mavenVersion>3.0</mavenVersion>
+ </properties>
+
+ <distributionManagement>
+ <relocation>
+ <groupId>org.apache.maven.its.mng5561.plugins</groupId>
+ <artifactId>enhanced-echo-maven-plugin</artifactId>
+ </relocation>
+ </distributionManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>${mavenVersion}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.plugin-tools</groupId>
+ <artifactId>maven-plugin-annotations</artifactId>
+ <version>3.6.0</version>
+ <scope>provided</scope><!-- annotations are needed only to build the plugin -->
+ </dependency>
+ </dependencies>
+</project>
diff --git a/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java
new file mode 100644
index 0000000..8fc7696
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/old-plugin-with-relocation/src/main/java/org/apache/maven/its/mng5561/EchoMojo.java
@@ -0,0 +1,28 @@
+package org.apache.maven.its.mng5561;
+
+import org.apache.maven.plugin.AbstractMojo;
+import org.apache.maven.plugin.MojoExecutionException;
+
+import org.apache.maven.plugins.annotations.Execute;
+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-5561-plugin-relocation-loses-configuration/project/pom.xml b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/pom.xml
new file mode 100644
index 0000000..76fc2cc
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5561-plugin-relocation-loses-configuration/project/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.mng5561</groupId>
+ <artifactId>project</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>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.mng5561</groupId>
+ <artifactId>echo-maven-plugin</artifactId>
+ <version>1.0.0-SNAPSHOT</version>
+ <configuration>
+ <helloString>from Maven!</helloString>
+ </configuration>
+ <executions>
+ <execution>
+ <id>echoMojo</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>echoMojo</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>