Author: bentmann
Date: Fri Oct 3 12:44:17 2008
New Revision: 701511
URL: http://svn.apache.org/viewvc?rev=701511&view=rev
Log:
o Decoupled it0102 from production plugins
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/src/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/pom.xml
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java?rev=701511&r1=701510&r2=701511&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0102Test.java
Fri Oct 3 12:44:17 2008
@@ -23,8 +23,7 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
-import java.util.ArrayList;
-import java.util.List;
+import java.util.Properties;
public class MavenIT0102Test
extends AbstractMavenIntegrationTestCase
@@ -41,18 +40,18 @@
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- List options = new ArrayList();
- options.add( "-Doutput=" + new File( testDir,
"target/effective-pom.txt" ).getAbsolutePath() );
-
- verifier.setCliOptions( options );
-
- List goals = new ArrayList();
- goals.add(
"org.apache.maven.plugins:maven-help-plugin:2.0.2:effective-pom" );
- goals.add( "verify" );
-
+ Properties systemProperties = new Properties();
+ systemProperties.put( "expression.expressions", "project/properties" );
+ verifier.setSystemProperties( systemProperties );
+ verifier.executeGoal(
"org.apache.maven.its.plugins:maven-it-plugin-expression::eval" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+ verifier.assertFilePresent( "target/expression.properties" );
+ Properties props = verifier.loadProperties(
"target/expression.properties" );
+ assertNull( props.getProperty( "project.properties.it0102.testOutput"
) );
+ assertEquals( "Success", props.getProperty(
"project.properties.testOutput" ) );
+ assertEquals( "Present", props.getProperty(
"project.properties.profilesXmlValue" ) );
}
-}
+}
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/pom.xml
URL:
http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/pom.xml?rev=701511&r1=701510&r2=701511&view=diff
==============================================================================
---
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/pom.xml
(original)
+++
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0102/pom.xml
Fri Oct 3 12:44:17 2008
@@ -1,51 +1,37 @@
-<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">
+<?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>
- <name>Maven Integration Test :: it0102</name>
+
<groupId>org.apache.maven.its.it0102</groupId>
<artifactId>maven-it-it0102</artifactId>
- <description>Test that <activeByDefault/> calculations for profile
activation only
- use profiles defined in the POM. [MNG-2136]</description>
- <packaging>pom</packaging>
<version>1.0</version>
- <build>
- <plugins>
- <!--
- <plugin>
- <artifactId>maven-help-plugin</artifactId>
- <executions>
- <execution>
- <id>output-pom</id>
- <phase>generate-resources</phase>
- <configuration>
- <output>target/effective-pom.txt</output>
- </configuration>
- <goals>
- <goal>effective-pom</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- -->
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <configuration>
- <tasks>
- <echo>value from external profile: ${profilesXmlValue}</echo>
- <echo>test output: ${testOutput}</echo>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <packaging>pom</packaging>
+
+ <name>Maven Integration Test :: it0102</name>
+ <description>
+ Test that <activeByDefault/> calculations for profile activation only
+ use profiles defined in the POM. [MNG-2136]
+ </description>
<profiles>
<profile>
@@ -55,6 +41,7 @@
</activation>
<properties>
<testOutput>Failure</testOutput>
+ <it0102.testOutput>Failure</it0102.testOutput>
</properties>
</profile>
<profile>