Author: bentmann
Date: Tue Nov 11 11:35:12 2008
New Revision: 713126
URL: http://svn.apache.org/viewvc?rev=713126&view=rev
Log:
[MNG-3833] POM interpolation fails to fully interpolate chain of dependent
properties
o Added IT
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
(with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
(with props)
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/IntegrationTestSuite.java
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=713126&r1=713125&r2=713126&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
Tue Nov 11 11:35:12 2008
@@ -88,6 +88,7 @@
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); --
MNG-3137
+ suite.addTestSuite(
MavenITmng3833PomInterpolationDataFlowChainTest.class );
suite.addTestSuite( MavenITmng3831PomInterpolationTest.class );
suite.addTestSuite( MavenITmng3827PluginConfigTest.class );
suite.addTestSuite(
MavenITmng3822BasedirAlignedInterpolationTest.class );
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java?rev=713126&view=auto
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
(added)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
Tue Nov 11 11:35:12 2008
@@ -0,0 +1,67 @@
+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-3833">MNG-3833</a>.
+ *
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class MavenITmng3833PomInterpolationDataFlowChainTest
+ extends AbstractMavenIntegrationTestCase
+{
+
+ public MavenITmng3833PomInterpolationDataFlowChainTest()
+ {
+ }
+
+ /**
+ * Test that POM interpolation fully interpolates all properties in data
flow chain, i.e. where property
+ * A depends on property B, and property B depends on property C and so on.
+ */
+ public void testitMNG3833()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-3833" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ Properties props = verifier.loadProperties(
"target/interpolated.properties" );
+
+ for ( int i = 0; i < 24; i++ )
+ {
+ String index = ( ( i < 10 ) ? "0" : "" ) + i;
+ assertEquals( "PASSED", props.getProperty(
"project.properties.property" + index ) );
+ }
+ }
+
+}
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3833PomInterpolationDataFlowChainTest.java
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml?rev=713126&view=auto
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
(added)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
Tue Nov 11 11:35:12 2008
@@ -0,0 +1,90 @@
+<?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>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.mng3833</groupId>
+ <artifactId>coreit</artifactId>
+ <version>0.1</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-3833</name>
+ <description>
+ Test that POM interpolation fully interpolates all properties in data flow
chain, i.e. where property
+ A depends on property B, and property B depends on property C and so on.
+ </description>
+
+ <properties>
+ <!--
+ NOTE: Both the ordering (i.e. neither ascending nor descending) and the
number of properties is crucial to
+ exhibit the bug.
+ -->
+ <property23>${property22}</property23>
+ <property21>${property20}</property21>
+ <property19>${property18}</property19>
+ <property17>${property16}</property17>
+ <property15>${property14}</property15>
+ <property13>${property12}</property13>
+ <property11>${property10}</property11>
+ <property09>${property08}</property09>
+ <property07>${property06}</property07>
+ <property05>${property04}</property05>
+ <property03>${property02}</property03>
+ <property01>${property00}</property01>
+ <property00>PASSED</property00>
+ <property02>${property01}</property02>
+ <property04>${property03}</property04>
+ <property06>${property05}</property06>
+ <property10>${property09}</property10>
+ <property12>${property11}</property12>
+ <property08>${property07}</property08>
+ <property14>${property13}</property14>
+ <property16>${property15}</property16>
+ <property18>${property17}</property18>
+ <property20>${property19}</property20>
+ <property22>${property21}</property22>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-expression</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>eval</goal>
+ </goals>
+ <configuration>
+ <outputFile>target/interpolated.properties</outputFile>
+ <expressions>
+ <expression>project/properties</expression>
+ </expressions>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3833/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision