o Added test controller for orphaned IT project

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@721545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2008-11-28 18:10:47 +00:00
parent 19d3d90c50
commit 2c7d19caa4
4 changed files with 117 additions and 27 deletions

View File

@ -168,6 +168,7 @@ public class IntegrationTestSuite
suite.addTestSuite( MavenITmng2878DefaultReportXmlImportTest.class );
suite.addTestSuite( MavenITmng2871PrePackageSubartifactResolutionTest.class );
suite.addTestSuite( MavenITmng2861RelocationsAndRangesTest.class );
suite.addTestSuite( MavenITmng2843PluginConfigPropertiesInjectionTest.class );
suite.addTestSuite( MavenITmng2790LastUpdatedMetadataTest.class );
suite.addTestSuite( MavenITmng2749ExtensionAvailableToPluginTest.class );
suite.addTestSuite( MavenITmng2744checksumVerificationTest.class );

View File

@ -0,0 +1,61 @@
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-2843">MNG-2843</a>.
*
* @author Benjamin Bentmann
* @version $Id$
*/
public class MavenITmng2843PluginConfigPropertiesInjectionTest
extends AbstractMavenIntegrationTestCase
{
public MavenITmng2843PluginConfigPropertiesInjectionTest()
{
}
/**
* Test that plugins can have the project properties injected via ${project.properties}.
*/
public void testitMNG2843()
throws Exception
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2843" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.setAutoclean( false );
verifier.deleteDirectory( "target" );
verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
Properties props = verifier.loadProperties( "target/project.properties" );
assertEquals( "PASSED", props.getProperty( "key" ) );
}
}

View File

@ -1,27 +0,0 @@
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.it0117</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-uses-properties</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>generate-properties</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<name>bastille</name>
<occupation>sonambulist</occupation>
</properties>
</project>

View File

@ -0,0 +1,55 @@
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.its.mng2843</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Maven Integration Test :: MNG-2843</name>
<description>
Test that plugins can have the project properties injected via ${project.properties}.
</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-uses-properties</artifactId>
<version>2.1-SNAPSHOT</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>generate-properties</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
<key>PASSED</key>
</properties>
</project>