You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sc...@apache.org on 2017/01/16 01:37:42 UTC
[3/3] maven-integration-testing git commit: [MNG-5958] restore binary
compatibility of Lifecycle.setPhases
[MNG-5958] restore binary compatibility of Lifecycle.setPhases
Modify tests for MNG-5805
This closes #13 #18
Project: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/commit/2fd74ac6
Tree: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/tree/2fd74ac6
Diff: http://git-wip-us.apache.org/repos/asf/maven-integration-testing/diff/2fd74ac6
Branch: refs/heads/MNG-5958
Commit: 2fd74ac6d4747b11d50b78965f0d2c229fb46773
Parents: 6c86dc6
Author: Anton Tanasenko <at...@gmail.com>
Authored: Thu Jan 7 04:01:28 2016 +0200
Committer: Christian Schulte <sc...@apache.org>
Committed: Mon Jan 16 02:37:07 2017 +0100
----------------------------------------------------------------------
.../apache/maven/it/IntegrationTestSuite.java | 2 +
.../MavenITmng5805PkgTypeMojoConfiguration.java | 2 +-
...MavenITmng5805PkgTypeMojoConfiguration2.java | 30 +++++++++
...avenITmng5958LifecyclePhaseBinaryCompat.java | 45 +++++++++++++
.../test/resources/bootstrap/group-3/pom.xml | 12 ++++
.../pom.xml | 40 +++++++++++
.../mng-5958-lifecycle-phases/bad/pom.xml | 53 +++++++++++++++
.../mng-5958-lifecycle-phases/good/pom.xml | 53 +++++++++++++++
.../core-it-plugins/mng5805-extension2/pom.xml | 37 ++++++++++
.../resources/META-INF/plexus/components.xml | 71 ++++++++++++++++++++
.../core-it-plugins/mng5958-extension/pom.xml | 45 +++++++++++++
.../its/mng5958/AbstractLifecycleMapping.java | 71 ++++++++++++++++++++
.../maven/its/mng5958/BadLifecycleMapping.java | 45 +++++++++++++
.../maven/its/mng5958/GoodLifecycleMapping.java | 40 +++++++++++
.../resources/META-INF/plexus/components.xml | 62 +++++++++++++++++
core-it-support/core-it-plugins/pom.xml | 2 +
16 files changed, 609 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
----------------------------------------------------------------------
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 5536620..a91eeb0 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,10 +106,12 @@ public class IntegrationTestSuite
// -------------------------------------------------------------------------------------------------------------
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
+ suite.addTestSuite( MavenITmng5958LifecyclePhaseBinaryCompat.class );
suite.addTestSuite( MavenITmng5898BuildMultimoduleWithEARFailsToResolveWARTest.class );
suite.addTestSuite( MavenITmng5840ParentVersionRanges.class );
suite.addTestSuite( MavenITmng5840RelativePathReactorMatching.class );
suite.addTestSuite( MavenITmng5805PkgTypeMojoConfiguration.class );
+ suite.addTestSuite( MavenITmng5805PkgTypeMojoConfiguration2.class );
suite.addTestSuite( MavenITmng5783PluginDependencyFiltering.class );
suite.addTestSuite( MavenITmng5774ConfigurationProcessorsTest.class );
suite.addTestSuite( MavenITmng5771CoreExtensionsTest.class );
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration.java
index ada7448..5335677 100644
--- a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration.java
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration.java
@@ -10,7 +10,7 @@ public class MavenITmng5805PkgTypeMojoConfiguration
public MavenITmng5805PkgTypeMojoConfiguration()
{
- super( "(3.3.3,)" );
+ super( "(3.3.3,3.5.0)" );
}
public void testPkgTypeMojoConfiguration()
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration2.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration2.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration2.java
new file mode 100644
index 0000000..ca1c0e3
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5805PkgTypeMojoConfiguration2.java
@@ -0,0 +1,30 @@
+package org.apache.maven.it;
+
+import java.io.File;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+public class MavenITmng5805PkgTypeMojoConfiguration2
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5805PkgTypeMojoConfiguration2()
+ {
+ super( "(3.3.3,)" );
+ }
+
+ public void testPkgTypeMojoConfiguration()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5805-pkg-type-mojo-configuration2" );
+
+ Verifier verifier;
+
+
+ verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.verifyTextInLog( "CLASS_NAME=org.apache.maven.its.mng5805.TestClass1" );
+ verifier.resetStreams();
+ }
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java
new file mode 100644
index 0000000..3ee3fe1
--- /dev/null
+++ b/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng5958LifecyclePhaseBinaryCompat.java
@@ -0,0 +1,45 @@
+package org.apache.maven.it;
+
+import java.io.File;
+
+import org.apache.maven.it.util.ResourceExtractor;
+
+public class MavenITmng5958LifecyclePhaseBinaryCompat
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng5958LifecyclePhaseBinaryCompat()
+ {
+ super( "(3.3.9,)" );
+ }
+
+ public void testGood()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5958-lifecycle-phases/good" );
+
+ Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.verifyTextInLog( "CLASS_NAME=java.lang.String" );
+ verifier.resetStreams();
+ }
+
+ public void testBad()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-5958-lifecycle-phases/bad" );
+
+ Verifier verifier = newVerifier( testDir.getAbsolutePath() );
+ try
+ {
+ verifier.executeGoal( "validate" );
+ }
+ catch ( VerificationException e )
+ {
+ verifier.verifyTextInLog( "[ERROR] Internal error: java.lang.ClassCastException: "
+ + "org.apache.maven.lifecycle.mapping.LifecyclePhase cannot be cast to java.lang.String -> [Help 1]" );
+ }
+ verifier.resetStreams();
+ }
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/resources/bootstrap/group-3/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/bootstrap/group-3/pom.xml b/core-it-suite/src/test/resources/bootstrap/group-3/pom.xml
index bcaaca6..9731869 100644
--- a/core-it-suite/src/test/resources/bootstrap/group-3/pom.xml
+++ b/core-it-suite/src/test/resources/bootstrap/group-3/pom.xml
@@ -136,6 +136,18 @@ under the License.
<version>${itPluginVersion}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-extension2</artifactId>
+ <version>${itPluginVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5958-pkg-type-extension</artifactId>
+ <version>${itPluginVersion}</version>
+ <scope>runtime</scope>
+ </dependency>
<dependency>
<groupId>org.apache.maven.its.plugins</groupId>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/resources/mng-5805-pkg-type-mojo-configuration2/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5805-pkg-type-mojo-configuration2/pom.xml b/core-it-suite/src/test/resources/mng-5805-pkg-type-mojo-configuration2/pom.xml
new file mode 100644
index 0000000..b7e12f1
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5805-pkg-type-mojo-configuration2/pom.xml
@@ -0,0 +1,40 @@
+<?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>mng-5805-pkg-type-mojo-configuration</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-project2</artifactId>
+ <version>0.1</version>
+ <packaging>mng5805</packaging>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-extension2</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </extension>
+ </extensions>
+ </build>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/bad/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/bad/pom.xml b/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/bad/pom.xml
new file mode 100644
index 0000000..d565ae0
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/bad/pom.xml
@@ -0,0 +1,53 @@
+<?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>mng-5958-lifecycle-phases</groupId>
+ <artifactId>mng-5958-lifecycle-phases-project</artifactId>
+ <version>0.1</version>
+ <packaging>mng5958-bad</packaging>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5958-pkg-type-extension</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-plugin</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <className>java.lang.String</className>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/good/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/good/pom.xml b/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/good/pom.xml
new file mode 100644
index 0000000..0419dcd
--- /dev/null
+++ b/core-it-suite/src/test/resources/mng-5958-lifecycle-phases/good/pom.xml
@@ -0,0 +1,53 @@
+<?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>mng-5958-lifecycle-phases</groupId>
+ <artifactId>mng-5958-lifecycle-phases-project</artifactId>
+ <version>0.1</version>
+ <packaging>mng5958-good</packaging>
+
+ <build>
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5958-pkg-type-extension</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </extension>
+ </extensions>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-plugin</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <className>java.lang.String</className>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5805-extension2/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5805-extension2/pom.xml b/core-it-support/core-it-plugins/mng5805-extension2/pom.xml
new file mode 100644
index 0000000..c6a24f6
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5805-extension2/pom.xml
@@ -0,0 +1,37 @@
+<?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>
+
+ <parent>
+ <artifactId>maven-it-plugins</artifactId>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <version>2.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mng-5805-pkg-type-mojo-configuration-extension2</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Maven IT Plugin :: mng-5805 extension mk2</name>
+
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5805-extension2/src/main/resources/META-INF/plexus/components.xml
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5805-extension2/src/main/resources/META-INF/plexus/components.xml b/core-it-support/core-it-plugins/mng5805-extension2/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 0000000..a07744d
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5805-extension2/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,71 @@
+<?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.
+-->
+<component-set>
+ <components>
+
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>mng5805</role-hint>
+ <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
+ <configuration>
+ <lifecycles>
+ <lifecycle>
+ <id>default</id>
+ <lifecyclePhases>
+ <validate>
+ <mojos>
+ <mojo>
+ <goal>
+ org.apache.maven.its.plugins:mng-5805-pkg-type-mojo-configuration-plugin:2.1-SNAPSHOT:test
+ </goal>
+ <configuration>
+ <className>org.apache.maven.its.mng5805.TestClass1</className>
+ </configuration>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>mng-5805-pkg-type-mojo-configuration-plugin-dep</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+ </mojo>
+ </mojos>
+ </validate>
+ </lifecyclePhases>
+ </lifecycle>
+ </lifecycles>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>mng5805</role-hint>
+ <implementation>
+ org.apache.maven.artifact.handler.DefaultArtifactHandler
+ </implementation>
+ <configuration>
+ <extension>zip</extension>
+ <type>mng5805</type>
+ <packaging>mng5805</packaging>
+ </configuration>
+ </component>
+
+ </components>
+</component-set>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5958-extension/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5958-extension/pom.xml b/core-it-support/core-it-plugins/mng5958-extension/pom.xml
new file mode 100644
index 0000000..5f41294
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5958-extension/pom.xml
@@ -0,0 +1,45 @@
+<?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>
+
+ <parent>
+ <artifactId>maven-it-plugins</artifactId>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <version>2.1-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>mng-5958-pkg-type-extension</artifactId>
+ <packaging>jar</packaging>
+
+ <name>Maven IT Plugin :: mng-5958 extension</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-core</artifactId>
+ <version>3.3.9</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/AbstractLifecycleMapping.java
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/AbstractLifecycleMapping.java b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/AbstractLifecycleMapping.java
new file mode 100644
index 0000000..9a9db7a
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/AbstractLifecycleMapping.java
@@ -0,0 +1,71 @@
+package org.apache.maven.its.mng5958;
+
+/*
+ * 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.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.maven.lifecycle.mapping.Lifecycle;
+import org.apache.maven.lifecycle.mapping.LifecycleMapping;
+
+/**
+ * @author Anton Tanasenko
+ */
+public abstract class AbstractLifecycleMapping implements LifecycleMapping
+{
+
+ private Map<String, Lifecycle> lifecycleMap;
+
+ public Map<String, Lifecycle> getLifecycles()
+ {
+ if ( lifecycleMap != null )
+ {
+ return lifecycleMap;
+ }
+
+ lifecycleMap = new LinkedHashMap<>();
+ Lifecycle lifecycle = new Lifecycle();
+
+ lifecycle.setId( "default" );
+ lifecycle.setPhases( initPhases() );
+
+ lifecycleMap.put( "default", lifecycle );
+ return lifecycleMap;
+ }
+
+ public Map<String, String> getPhases( String lifecycle )
+ {
+ Lifecycle lifecycleMapping = getLifecycles().get( lifecycle );
+ if ( lifecycleMapping != null )
+ {
+ return lifecycleMapping.getPhases();
+ }
+ return null;
+ }
+
+ public List<String> getOptionalMojos( String lifecycle )
+ {
+ return null;
+ }
+
+ // raw map on purpose
+ protected abstract Map initPhases();
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/BadLifecycleMapping.java
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/BadLifecycleMapping.java b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/BadLifecycleMapping.java
new file mode 100644
index 0000000..7dbf2b5
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/BadLifecycleMapping.java
@@ -0,0 +1,45 @@
+package org.apache.maven.its.mng5958;
+
+/*
+ * 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.util.LinkedHashMap;
+import java.util.Map;
+
+import org.apache.maven.lifecycle.mapping.LifecyclePhase;
+
+/**
+ * @author Anton Tanasenko
+ */
+public class BadLifecycleMapping extends AbstractLifecycleMapping
+{
+
+ @Override
+ protected Map<String, String> initPhases()
+ {
+ Map phases = new LinkedHashMap<>();
+
+ LifecyclePhase lp = new LifecyclePhase();
+ lp.set( "org.apache.maven.its.plugins:mng-5805-pkg-type-mojo-configuration-plugin:2.1-SNAPSHOT:test" );
+
+ phases.put( "validate", lp );
+ return phases;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/GoodLifecycleMapping.java
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/GoodLifecycleMapping.java b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/GoodLifecycleMapping.java
new file mode 100644
index 0000000..c14099d
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5958-extension/src/main/java/org/apache/maven/its/mng5958/GoodLifecycleMapping.java
@@ -0,0 +1,40 @@
+package org.apache.maven.its.mng5958;
+
+/*
+ * 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.util.LinkedHashMap;
+import java.util.Map;
+
+/**
+ * @author Anton Tanasenko
+ */
+public class GoodLifecycleMapping extends AbstractLifecycleMapping
+{
+
+ @Override
+ protected Map<String, String> initPhases()
+ {
+ Map<String, String> phases = new LinkedHashMap<>();
+ phases.put( "validate",
+ "org.apache.maven.its.plugins:mng-5805-pkg-type-mojo-configuration-plugin:2.1-SNAPSHOT:test" );
+ return phases;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/mng5958-extension/src/main/resources/META-INF/plexus/components.xml
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/mng5958-extension/src/main/resources/META-INF/plexus/components.xml b/core-it-support/core-it-plugins/mng5958-extension/src/main/resources/META-INF/plexus/components.xml
new file mode 100644
index 0000000..e61d294
--- /dev/null
+++ b/core-it-support/core-it-plugins/mng5958-extension/src/main/resources/META-INF/plexus/components.xml
@@ -0,0 +1,62 @@
+<?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.
+-->
+<component-set>
+ <components>
+
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>mng5958-good</role-hint>
+ <implementation>org.apache.maven.its.mng5958.GoodLifecycleMapping</implementation>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>mng5958</role-hint>
+ <implementation>
+ org.apache.maven.artifact.handler.DefaultArtifactHandler
+ </implementation>
+ <configuration>
+ <extension>zip</extension>
+ <type>mng5858-good</type>
+ <packaging>mng5858-good</packaging>
+ </configuration>
+ </component>
+
+ <component>
+ <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
+ <role-hint>mng5958-bad</role-hint>
+ <implementation>org.apache.maven.its.mng5958.BadLifecycleMapping</implementation>
+ </component>
+
+ <component>
+ <role>org.apache.maven.artifact.handler.ArtifactHandler</role>
+ <role-hint>mng5958-bad</role-hint>
+ <implementation>
+ org.apache.maven.artifact.handler.DefaultArtifactHandler
+ </implementation>
+ <configuration>
+ <extension>zip</extension>
+ <type>mng5858-bad</type>
+ <packaging>mng5858-bad</packaging>
+ </configuration>
+ </component>
+
+ </components>
+</component-set>
http://git-wip-us.apache.org/repos/asf/maven-integration-testing/blob/2fd74ac6/core-it-support/core-it-plugins/pom.xml
----------------------------------------------------------------------
diff --git a/core-it-support/core-it-plugins/pom.xml b/core-it-support/core-it-plugins/pom.xml
index 83b5f79..c301aae 100644
--- a/core-it-support/core-it-plugins/pom.xml
+++ b/core-it-support/core-it-plugins/pom.xml
@@ -79,8 +79,10 @@ under the License.
<module>maven-it-plugin-plexus-lifecycle</module>
<module>maven-it-plugin-settings</module>
<module>mng5805-extension</module>
+ <module>mng5805-extension2</module>
<module>mng5805-plugin</module>
<module>mng5805-plugin-dep</module>
+ <module>mng5958-extension</module>
</modules>
<scm>