o Decoupled IT from assumption that reporting config => build config

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@785729 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-06-17 17:05:40 +00:00
parent d0f6936bbc
commit c6ba6e5741
2 changed files with 15 additions and 9 deletions

View File

@ -55,11 +55,13 @@ public class MavenITmng3811ReportingPluginConfigurationInheritanceTest
verifier.verifyErrorFreeLog(); verifier.verifyErrorFreeLog();
verifier.resetStreams(); verifier.resetStreams();
Properties props = verifier.loadProperties( "target/pom.properties" ); Properties props = verifier.loadProperties( "target/config.properties" );
assertEquals( "2", props.getProperty( "stringParams" ) ); String p = "project.reporting.plugins.0.configuration.children.";
assertEquals( "parentParam", props.getProperty( "stringParams.0" ) );
assertEquals( "childParam", props.getProperty( "stringParams.1" ) ); assertEquals( "2", props.getProperty( p + "stringParams.0.children" ) );
assertEquals( "true", props.getProperty( "booleanParam" ) ); assertEquals( "parentParam", props.getProperty( p + "stringParams.0.children.stringParam.0.value" ) );
assertEquals( "childParam", props.getProperty( p + "stringParams.0.children.stringParam.1.value" ) );
assertEquals( "true", props.getProperty( p + "booleanParam.0.value" ) );
} }
} }

View File

@ -33,22 +33,27 @@
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.its.plugins</groupId> <groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-configuration</artifactId> <artifactId>maven-it-plugin-expression</artifactId>
<version>2.1-SNAPSHOT</version> <version>2.1-SNAPSHOT</version>
<configuration> <configuration>
<propertiesFile>target/pom.properties</propertiesFile> <outputFile>target/config.properties</outputFile>
<expressions>
<expression>project/reporting/plugins/0/configuration</expression>
</expressions>
</configuration> </configuration>
<executions> <executions>
<execution> <execution>
<id>test</id> <id>test</id>
<phase>validate</phase>
<goals> <goals>
<goal>config</goal> <goal>eval</goal>
</goals> </goals>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
<plugins> <plugins>
<plugin> <plugin>
@ -64,4 +69,3 @@
</plugins> </plugins>
</reporting> </reporting>
</project> </project>