Author: bentmann
Date: Fri Nov 7 16:05:07 2008
New Revision: 712315
URL: http://svn.apache.org/viewvc?rev=712315&view=rev
Log:
o Extended IT to check for missing influence of build configuration on report
goals
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
(with props)
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0469ReportConfigTest.java
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0469ReportConfigTest.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0469ReportConfigTest.java?rev=712315&r1=712314&r2=712315&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0469ReportConfigTest.java
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng0469ReportConfigTest.java
Fri Nov 7 16:05:07 2008
@@ -42,20 +42,29 @@
/**
* Test that <reporting> configuration also affects build plugins unless
<build> configuration is also given.
*/
- public void testitMNG0469()
+ public void testitReportConfigOverridesBuildDefaults()
throws Exception
{
- File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-0469" );
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-0469/test0" );
- Verifier verifier = new Verifier( new File( testDir, "test0"
).getAbsolutePath() );
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteDirectory( "target" );
verifier.setAutoclean( false );
verifier.executeGoal(
"org.apache.maven.its.plugins:maven-it-plugin-file:2.1-SNAPSHOT:file" );
verifier.assertFilePresent( "target/reporting.txt" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+ }
- verifier = new Verifier( new File( testDir, "test1"
).getAbsolutePath() );
+ /**
+ * Test that <build> configuration dominates <reporting> configuration for
build goals.
+ */
+ public void testitBuildConfigDominantDuringBuild()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-0469/test1" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
verifier.deleteDirectory( "target" );
verifier.setAutoclean( false );
verifier.executeGoal(
"org.apache.maven.its.plugins:maven-it-plugin-file:2.1-SNAPSHOT:file" );
@@ -64,4 +73,21 @@
verifier.resetStreams();
}
+ /**
+ * Test that <build> configuration does not affect report goals.
+ */
+ public void testitBuildConfigIrrelevantForReports()
+ throws Exception
+ {
+ File testDir = ResourceExtractor.simpleExtractResources( getClass(),
"/mng-0469/test2" );
+
+ Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+ verifier.deleteDirectory( "target" );
+ verifier.setAutoclean( false );
+ verifier.executeGoal(
"org.apache.maven.its.plugins:maven-it-plugin-site:2.1-SNAPSHOT:generate" );
+ verifier.assertFilePresent( "target/site/info.properties" );
+ verifier.verifyErrorFreeLog();
+ verifier.resetStreams();
+ }
+
}
Added:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml?rev=712315&view=auto
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
(added)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
Fri Nov 7 16:05:07 2008
@@ -0,0 +1,71 @@
+<?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.mng469</groupId>
+ <artifactId>maven-it-mng469</artifactId>
+ <version>1.1</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: MNG-469</name>
+ <description>
+ Test that build configuration does not affect report goals.
+ </description>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-site</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <configuration>
+ <!-- should not affect report goal -->
+ <infoFile>fail.properties</infoFile>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.its.plugins</groupId>
+ <artifactId>maven-it-plugin-site</artifactId>
+ <version>2.1-SNAPSHOT</version>
+ <!-- info report should still use default value "info.properties" -->
+ </plugin>
+ <plugin>
+ <!-- that's a default report plugin, just disable to prevent
interferences -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>2.0.1</version>
+ <reportSets>
+ <reportSet>
+ <reports>
+ </reports>
+ </reportSet>
+ </reportSets>
+ </plugin>
+ </plugins>
+ </reporting>
+</project>
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-0469/test2/pom.xml
------------------------------------------------------------------------------
svn:keywords = Author Date Id Revision