You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/11/09 19:47:18 UTC
svn commit: r712531 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/MavenIT0104Test.java resources/it0104/pom.xml
resources/it0104/src/
Author: bentmann
Date: Sun Nov 9 10:47:18 2008
New Revision: 712531
URL: http://svn.apache.org/viewvc?rev=712531&view=rev
Log:
o Fixed it0104 which previously didn't check the plugin configuration at all
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/src/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java?rev=712531&r1=712530&r2=712531&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0104Test.java Sun Nov 9 10:47:18 2008
@@ -23,6 +23,7 @@
import org.apache.maven.it.util.ResourceExtractor;
import java.io.File;
+import java.util.Properties;
public class MavenIT0104Test
extends AbstractMavenIntegrationTestCase
@@ -36,10 +37,22 @@
{
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0104" );
Verifier verifier = new Verifier( testDir.getAbsolutePath() );
- verifier.executeGoal( "test" );
+ verifier.setAutoclean( false );
+ verifier.deleteDirectory( "target" );
+ verifier.executeGoal( "validate" );
verifier.verifyErrorFreeLog();
verifier.resetStreams();
+ Properties props = verifier.loadProperties( "target/config.properties" );
+ assertEquals( new File( testDir, "target" ), new File( props.getProperty( "stringParam" ) ) );
+ assertEquals( "4.0.0", props.getProperty( "domParam.children.modelVersion.0.value" ) );
+ assertEquals( "org.apache.maven.its.it0104", props.getProperty( "domParam.children.groupId.0.value" ) );
+ assertEquals( "1.0-SNAPSHOT", props.getProperty( "domParam.children.version.0.value" ) );
+ assertEquals( "jar", props.getProperty( "domParam.children.packaging.0.value" ) );
+ assertEquals( "http://maven.apache.org", props.getProperty( "domParam.children.url.0.value" ) );
+ assertEquals( "Apache", props.getProperty( "domParam.children.organization.0.children.name.0.value" ) );
+ assertEquals( new File( testDir, "target" ), new File( props.getProperty( "domParam.children.build.0.children.directory.0.value" ) ) );
+ assertEquals( new File( testDir, "target/classes" ), new File( props.getProperty( "domParam.children.build.0.children.outputDirectory.0.value" ) ) );
}
-}
+}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/pom.xml?rev=712531&r1=712530&r2=712531&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0104/pom.xml Sun Nov 9 10:47:18 2008
@@ -1,44 +1,41 @@
-<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 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>
- <name>Maven Integration Test :: it0104</name>
+
<groupId>org.apache.maven.its.it0104</groupId>
- <artifactId>maven-it-it0104</artifactId>
+ <artifactId>test</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: it0104</name>
<description>
Verify that plugin configurations are interpolated correctly.
</description>
+
<organization>
<name>Apache</name>
</organization>
- <packaging>jar</packaging>
- <version>1.0-SNAPSHOT</version>
<url>http://maven.apache.org</url>
-
- <repositories>
- <repository>
- <id>test-plugins</id>
- <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
- <releases><enabled>false</enabled></releases>
- <snapshots><enabled>true</enabled></snapshots>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>test-plugins</id>
- <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
- <releases><enabled>false</enabled></releases>
- <snapshots><enabled>true</enabled></snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
<build>
<pluginManagement>
@@ -48,8 +45,9 @@
<artifactId>maven-it-plugin-configuration</artifactId>
<version>2.1-SNAPSHOT</version>
<configuration>
- <directory>${project.build.directory}</directory>
- <dom>
+ <propertiesFile>${project.build.directory}/config.properties</propertiesFile>
+ <stringParam>${project.build.directory}</stringParam>
+ <domParam>
<basedir>${basedir}</basedir>
<modelVersion>${project.modelVersion}</modelVersion>
<name>${project.name}</name>
@@ -65,7 +63,7 @@
<directory>${project.build.directory}</directory>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
</build>
- </dom>
+ </domParam>
</configuration>
<executions>
<execution>
@@ -81,7 +79,7 @@
<plugin>
<groupId>org.apache.maven.its.plugins</groupId>
<artifactId>maven-it-plugin-configuration</artifactId>
- </plugin>
+ </plugin>
</plugins>
</build>
</project>