[MNG-2097] add integration test for the prepare-package phase

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@727667 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2008-12-18 07:22:49 +00:00
parent 336363bc10
commit 9fc44a740a
2 changed files with 84 additions and 0 deletions

View File

@ -0,0 +1,58 @@
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 org.apache.maven.it.Verifier;
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
import java.util.Properties;
/**
* This is a test set for <a href="http://jira.codehaus.org/browse/MNG-2097">MNG-2097</a>.
*
* @author Brett Porter
* @version $Id: MavenITmng3906MergedPluginClassPathOrderingTest.java 726432 2008-12-14 13:20:02Z bentmann $
*/
public class MavenITmng2097PreparePackagePhaseTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng2097PreparePackagePhaseTest()
{
super( "(2.1.0-M1,)" ); // Maven 2.1.0-M2 +
}
/**
* Test that the prepare package phase can be bound to and executed.
*/
public void testPreparePackagePhase()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2097" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.executeGoal( "prepare-package" );
verifier.assertFilePresent( "target/touch.txt" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
}
}

View File

@ -0,0 +1,26 @@
<project>
<modelVersion>4.0.0</modelVersion>
<name>Maven Integration Test :: MNG-2097</name>
<groupId>org.apache.maven.its.mng2097</groupId>
<artifactId>maven-it-mng-2097</artifactId>
<description>Test plugin configuration that executes in the prepare-package phase.
</description>
<version>1.0</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-touch</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>touch</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>