You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by br...@apache.org on 2009/02/26 14:39:39 UTC
svn commit: r748148 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/ resources/mng-3811/ resources/mng-3811/child/
Author: brett
Date: Thu Feb 26 13:39:38 2009
New Revision: 748148
URL: http://svn.apache.org/viewvc?rev=748148&view=rev
Log:
[MNG-3811] Report plugins don't inherit configuration
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java (with props)
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/ (props changed)
- copied from r748115, maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3621/
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-3811/child/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/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=748148&r1=748147&r2=748148&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 Thu Feb 26 13:39:38 2009
@@ -151,6 +151,7 @@
suite.addTestSuite( MavenITmng3821EqualPluginExecIdsTest.class );
suite.addTestSuite( MavenITmng3819PluginDepPlexusUtilsTest.class );
suite.addTestSuite( MavenITmng3813PluginClassPathOrderingTest.class );
+ suite.addTestSuite( MavenITmng3811ReportingPluginConfigurationInheritanceTest.class );
suite.addTestSuite( MavenITmng3810BadProfileActivationTest.class );
suite.addTestSuite( MavenITmng3808ReportInheritenceOrderingTest.class );
suite.addTestSuite( MavenITmng3805ExtensionClassPathOrderingTest.class );
Added: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java?rev=748148&view=auto
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java (added)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java Thu Feb 26 13:39:38 2009
@@ -0,0 +1,65 @@
+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-3811">MNG-3811</a>.
+ *
+ * @author Brett Porter
+ * @version $Id: MavenIT0072Test.java 744504 2009-02-14 14:49:27Z brett $
+ */
+public class MavenITmng3811ReportingPluginConfigurationInheritanceTest
+ extends AbstractMavenIntegrationTestCase
+{
+ public MavenITmng3811ReportingPluginConfigurationInheritanceTest()
+ {
+ // TODO: fix for 3.0+
+ super( "[2.0.11,2.1.0-M1),[2.1.0,)" );
+ }
+
+ /**
+ * Verifies that reporting configuration is inherited properly.
+ */
+ public void testitMNG3811()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3811" );
+
+ Verifier verifier = new Verifier( new File( testDir, "child" ).getAbsolutePath() );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+
+ Properties props = verifier.loadProperties( "target/pom.properties" );
+ assertEquals( "2", props.getProperty( "stringParams" ) );
+ assertEquals( "parentParam", props.getProperty( "stringParams.0" ) );
+ assertEquals( "childParam", props.getProperty( "stringParams.1" ) );
+ assertEquals( "true", props.getProperty( "booleanParam" ) );
+ }
+
+}
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3811ReportingPluginConfigurationInheritanceTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/
------------------------------------------------------------------------------
svn:mergeinfo =
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/child/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/child/pom.xml?rev=748148&r1=748115&r2=748148&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/child/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/child/pom.xml Thu Feb 26 13:39:38 2009
@@ -21,37 +21,47 @@
<modelVersion>4.0.0</modelVersion>
<parent>
- <groupId>org.apache.maven.its.mng3621</groupId>
+ <groupId>org.apache.maven.its.mng3811</groupId>
<artifactId>test-parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<artifactId>test-child</artifactId>
- <name>MNG-3621 :: Child</name>
+ <name>MNG-3811 :: Child</name>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
- <artifactId>maven-it-plugin-expression</artifactId>
+ <artifactId>maven-it-plugin-configuration</artifactId>
<version>2.1-SNAPSHOT</version>
<configuration>
- <outputFile>target/pom.properties</outputFile>
- <expressions>
- <expression>project/distributionManagement/site/url</expression>
- </expressions>
+ <propertiesFile>target/pom.properties</propertiesFile>
</configuration>
<executions>
<execution>
<id>test</id>
- <phase>validate</phase>
<goals>
- <goal>eval</goal>
+ <goal>config</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-configuration</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <stringParams combine.children="append">
+ <stringParam>childParam</stringParam>
+ </stringParams>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/pom.xml?rev=748148&r1=748115&r2=748148&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3811/pom.xml Thu Feb 26 13:39:38 2009
@@ -20,22 +20,32 @@
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.mng3621</groupId>
+ <groupId>org.apache.maven.its.mng3811</groupId>
<artifactId>test-parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
- <name>MNG-3621 :: Parent</name>
- <description>Test inheritance of UNC paths</description>
+ <name>MNG-3811 :: Parent</name>
+ <description>Test inheritance of reporting plugin configuration</description>
<modules>
<module>child</module>
</modules>
- <distributionManagement>
- <site>
- <id>site</id>
- <url>file:////host/site/</url>
- </site>
- </distributionManagement>
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-configuration</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <booleanParam>true</booleanParam>
+ <stringParams>
+ <stringParam>parentParam</stringParam>
+ </stringParams>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
</project>
+