You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/11/28 19:10:47 UTC

svn commit: r721545 - in /maven/core-integration-testing/trunk/core-it-suite/src/test: java/org/apache/maven/it/ resources/it0117-testUsesOfPropertiesInAMojo/ resources/mng-2843/

Author: bentmann
Date: Fri Nov 28 10:10:47 2008
New Revision: 721545

URL: http://svn.apache.org/viewvc?rev=721545&view=rev
Log:
o Added test controller for orphaned IT project

Added:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java   (with props)
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/   (props changed)
      - copied from r721435, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/
Removed:
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0117-testUsesOfPropertiesInAMojo/
Modified:
    maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
    maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/pom.xml

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java?rev=721545&r1=721544&r2=721545&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java Fri Nov 28 10:10:47 2008
@@ -168,6 +168,7 @@
         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 );

Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java?rev=721545&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java Fri Nov 28 10:10:47 2008
@@ -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" ) );
+    }
+
+}

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng2843PluginConfigPropertiesInjectionTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/pom.xml?rev=721545&r1=721435&r2=721545&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-2843/pom.xml Fri Nov 28 10:10:47 2008
@@ -1,8 +1,36 @@
+<?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.it0117</groupId>
+
+  <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>
@@ -20,8 +48,8 @@
       </plugin>      
     </plugins>
   </build>
+
   <properties>
-    <name>bastille</name>
-    <occupation>sonambulist</occupation>
+    <key>PASSED</key>
   </properties> 
 </project>