From 2c7d19caa49453caba7bfa8afa9bca2f1c77ccba Mon Sep 17 00:00:00 2001 From: Benjamin Bentmann Date: Fri, 28 Nov 2008 18:10:47 +0000 Subject: [PATCH] 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 --- .../apache/maven/it/IntegrationTestSuite.java | 1 + ...43PluginConfigPropertiesInjectionTest.java | 61 +++++++++++++++++++ .../pom.xml | 27 -------- .../src/test/resources/mng-2843/pom.xml | 55 +++++++++++++++++ 4 files changed, 117 insertions(+), 27 deletions(-) create mode 100644 its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java delete mode 100644 its/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/pom.xml create mode 100644 its/core-it-suite/src/test/resources/mng-2843/pom.xml diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java index d3907bf048..71f39f0771 100644 --- a/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java @@ -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 ); diff --git a/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java new file mode 100644 index 0000000000..8f668aee5d --- /dev/null +++ b/its/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java @@ -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 MNG-2843. + * + * @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" ) ); + } + +} diff --git a/its/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/pom.xml b/its/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/pom.xml deleted file mode 100644 index 889e30c9d3..0000000000 --- a/its/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - 4.0.0 - org.apache.maven.its.it0117 - parent - 1.0-SNAPSHOT - - - - org.apache.maven.its.plugins - maven-it-plugin-uses-properties - 2.1-SNAPSHOT - - - validate - - generate-properties - - - - - - - - bastille - sonambulist - - diff --git a/its/core-it-suite/src/test/resources/mng-2843/pom.xml b/its/core-it-suite/src/test/resources/mng-2843/pom.xml new file mode 100644 index 0000000000..01eb250728 --- /dev/null +++ b/its/core-it-suite/src/test/resources/mng-2843/pom.xml @@ -0,0 +1,55 @@ + + + + + + 4.0.0 + + org.apache.maven.its.mng2843 + parent + 1.0-SNAPSHOT + + Maven Integration Test :: MNG-2843 + + Test that plugins can have the project properties injected via ${project.properties}. + + + + + + org.apache.maven.its.plugins + maven-it-plugin-uses-properties + 2.1-SNAPSHOT + + + validate + + generate-properties + + + + + + + + + PASSED + +