mirror of https://github.com/apache/maven.git
[MNG-3811] Report plugins don't inherit configuration
git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@748148 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bfa9ba303e
commit
06d7f93e6c
|
@ -151,6 +151,7 @@ public class IntegrationTestSuite
|
|||
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 );
|
||||
|
|
|
@ -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" ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
<?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>
|
||||
|
||||
<parent>
|
||||
<groupId>org.apache.maven.its.mng3811</groupId>
|
||||
<artifactId>test-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<artifactId>test-child</artifactId>
|
||||
|
||||
<name>MNG-3811 :: Child</name>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.its.plugins</groupId>
|
||||
<artifactId>maven-it-plugin-configuration</artifactId>
|
||||
<version>2.1-SNAPSHOT</version>
|
||||
<configuration>
|
||||
<propertiesFile>target/pom.properties</propertiesFile>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>test</id>
|
||||
<goals>
|
||||
<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>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<?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.mng3811</groupId>
|
||||
<artifactId>test-parent</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>MNG-3811 :: Parent</name>
|
||||
<description>Test inheritance of reporting plugin configuration</description>
|
||||
|
||||
<modules>
|
||||
<module>child</module>
|
||||
</modules>
|
||||
|
||||
<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>
|
||||
|
Loading…
Reference in New Issue