diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest.java
index 7f0c80f1d0..11f5affce2 100644
--- a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest.java
+++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest.java
@@ -28,35 +28,27 @@ public class MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest
extends AbstractMavenIntegrationTestCase
{
- public MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest() {
- super( "(2.0.1,2.0.5),(2.0.6,2.99.99)" );//extension support removed from 3.0
+ public MavenIT0115CustomArtifactHandlerAndCustomLifecycleTest()
+ {
+ super( "(2.0.1,2.0.5),(2.0.6,2.99.99)" ); //extension support removed from 3.0
}
- public void testit0115()
+ /**
+ * Test the use of a custom lifecycle from a plugin that is defined as a build extension.
+ */
+ public void testitMNG2831()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0115" );
- Verifier verifier;
-
- // Install the parent POM
- verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.deleteArtifact( "org.apache.maven.its.it0115", "test-extension", "1.0-SNAPSHOT", "jar" );
- verifier.deleteArtifact( "org.apache.maven.its.it0115", "test-project", "1.0-SNAPSHOT", "jar" );
-
- // Install the plugin to test for Authz info in the WagonManager
- verifier = new Verifier( new File( testDir.getAbsolutePath(), "test-extension" ).getAbsolutePath() );
- verifier.executeGoal( "install" );
- verifier.verifyErrorFreeLog();
- verifier.resetStreams();
-
- // Build the test project that uses the plugin.
- File testProject = new File( testDir.getAbsolutePath(), "test-project" );
- verifier = new Verifier( testProject.getAbsolutePath() );
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
verifier.executeGoal( "package" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
- verifier.assertFilePresent( new File( testProject, "target/test-project.xar" ).getAbsolutePath() );
+ verifier.assertFilePresent( "target/test-1.0-it.jar" );
}
+
}
diff --git a/its/core-it-suite/src/test/resources/it0115/pom.xml b/its/core-it-suite/src/test/resources/it0115/pom.xml
new file mode 100644
index 0000000000..ca9cdc6e80
--- /dev/null
+++ b/its/core-it-suite/src/test/resources/it0115/pom.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+ 4.0.0
+
+ org.apache.maven.its.mng2831
+ test
+ 1.0
+
+ it-packaging
+
+ Maven Integration Test :: MNG-2831
+
+ Test the use of a custom lifecycle from a plugin that is defined as a build extension.
+
+
+
+
+
+ org.apache.maven.its.plugins
+ maven-it-plugin-packaging
+ 2.1-SNAPSHOT
+
+
+
+
diff --git a/its/core-it-suite/src/test/resources/it0115/test-extension/pom.xml b/its/core-it-suite/src/test/resources/it0115/test-extension/pom.xml
deleted file mode 100644
index 4f8e3c3cb4..0000000000
--- a/its/core-it-suite/src/test/resources/it0115/test-extension/pom.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
- 4.0.0
- org.apache.maven.its.it0115
- test-extension
- Test Extension
- 1.0-SNAPSHOT
- 2007
- maven-plugin
-
-
-
- org.apache.maven
- maven-plugin-api
- 2.0
-
-
- org.apache.maven
- maven-archiver
- 2.2
-
-
- org.codehaus.plexus
- plexus-utils
- 1.4
-
-
- org.apache.maven
- maven-artifact
- 2.0
-
-
-
diff --git a/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/java/org/apache/maven/its/it0115/XarMojo.java b/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/java/org/apache/maven/its/it0115/XarMojo.java
deleted file mode 100644
index a856a4e53b..0000000000
--- a/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/java/org/apache/maven/its/it0115/XarMojo.java
+++ /dev/null
@@ -1,80 +0,0 @@
-package org.apache.maven.its.it0115;
-
-/*
- * Copyright 2007 The Apache Software Foundation.
- *
- * Licensed 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.IOException;
-
-import org.apache.maven.plugin.AbstractMojo;
-import org.apache.maven.plugin.MojoExecutionException;
-import org.apache.maven.plugin.MojoFailureException;
-import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.archiver.ArchiverException;
-import org.codehaus.plexus.archiver.zip.ZipArchiver;
-
-/**
- * Gather all resources in a XAR file (which is actually a ZIP file)
- *
- * @version $Id$
- * @goal xar
- * @phase package
- */
-public class XarMojo extends AbstractMojo
-{
- /**
- * The maven project.
- *
- * @parameter expression="${project}"
- * @required
- * @readonly
- */
- private MavenProject project;
-
- /**
- * @see org.apache.maven.plugin.Mojo#execute()
- */
- public void execute() throws MojoExecutionException, MojoFailureException
- {
- if (this.project.getResources().size() < 1)
- {
- this.getLog().warn("No XAR created as no resources were found");
- return;
- }
-
- try
- {
- performArchive();
- }
- catch (Exception e)
- {
- throw new MojoExecutionException("Error while creating XAR file", e );
- }
- }
-
- private void performArchive() throws ArchiverException, IOException
- {
- File xarFile = new File(this.project.getBuild().getDirectory(),
- this.project.getArtifactId() + ".xar" );
- ZipArchiver archiver = new ZipArchiver();
- archiver.setDestFile(xarFile);
- archiver.setIncludeEmptyDirs(false);
- archiver.setCompress(true);
- archiver.addDirectory(new File(this.project.getBuild().getOutputDirectory()));
- archiver.createArchive();
- this.project.getArtifact().setFile(xarFile);
- }
-}
diff --git a/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/resources/META-INF/plexus/components.xml b/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/resources/META-INF/plexus/components.xml
deleted file mode 100644
index 324ff4a7f0..0000000000
--- a/its/core-it-suite/src/test/resources/it0115/test-extension/src/main/resources/META-INF/plexus/components.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-
- org.apache.maven.lifecycle.mapping.LifecycleMapping
- xar
- org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
-
-
- org.apache.maven.plugins:maven-resources-plugin:resources
- org.apache.maven.its.it0115:test-extension:xar
- org.apache.maven.plugins:maven-install-plugin:install
- org.apache.maven.plugins:maven-deploy-plugin:deploy
-
-
-
-
- org.apache.maven.artifact.handler.ArtifactHandler
- xar
- org.apache.maven.artifact.handler.DefaultArtifactHandler
-
- xar
- xar
- xar
-
-
-
-
diff --git a/its/core-it-suite/src/test/resources/it0115/test-project/pom.xml b/its/core-it-suite/src/test/resources/it0115/test-project/pom.xml
deleted file mode 100644
index d409ddedeb..0000000000
--- a/its/core-it-suite/src/test/resources/it0115/test-project/pom.xml
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
- 4.0.0
- org.apache.maven.its.it0115
- test-project
- Test Project
- 1.0-SNAPSHOT
- 2007
-
- xar
-
-
-
-
- org.apache.maven.its.it0115
- test-extension
- 1.0-SNAPSHOT
-
-
-
-
-
-
\ No newline at end of file
diff --git a/its/core-it-suite/src/test/resources/it0115/test-project/src/main/resources/package.xml b/its/core-it-suite/src/test/resources/it0115/test-project/src/main/resources/package.xml
deleted file mode 100644
index 07caedcb3e..0000000000
--- a/its/core-it-suite/src/test/resources/it0115/test-project/src/main/resources/package.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
-
- Backup
- on Fri Jan 26 09:55:02 CET 2007 by XWiki.Admin
-
- XWiki.Admin
-
- true
-
-
-