mirror of https://github.com/apache/maven.git
[MNG-3833] POM interpolation fails to fully interpolate chain of dependent properties
o Added IT git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@713126 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
939a927dbe
commit
132a1e76db
|
@ -88,6 +88,7 @@ public class IntegrationTestSuite
|
||||||
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
// suite.addTestSuite( MavenIT0109ReleaseUpdateTest.class );
|
||||||
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
// suite.addTestSuite( MavenIT0108SnapshotUpdateTest.class ); -- MNG-3137
|
||||||
|
|
||||||
|
suite.addTestSuite( MavenITmng3833PomInterpolationDataFlowChainTest.class );
|
||||||
suite.addTestSuite( MavenITmng3831PomInterpolationTest.class );
|
suite.addTestSuite( MavenITmng3831PomInterpolationTest.class );
|
||||||
suite.addTestSuite( MavenITmng3827PluginConfigTest.class );
|
suite.addTestSuite( MavenITmng3827PluginConfigTest.class );
|
||||||
suite.addTestSuite( MavenITmng3822BasedirAlignedInterpolationTest.class );
|
suite.addTestSuite( MavenITmng3822BasedirAlignedInterpolationTest.class );
|
||||||
|
|
|
@ -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 ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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>
|
Loading…
Reference in New Issue