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/10/03 21:42:05 UTC
svn commit: r701509 - in
/maven/core-integration-testing/trunk/core-it-suite/src/test:
java/org/apache/maven/it/MavenIT0095Test.java
resources/it0095/parent/pom.xml resources/it0095/sub1/pom.xml
resources/it0095/sub1/src/
Author: bentmann
Date: Fri Oct 3 12:42:05 2008
New Revision: 701509
URL: http://svn.apache.org/viewvc?rev=701509&view=rev
Log:
o Decoupled it0095 from production plugins
Removed:
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/src/
Modified:
maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0095Test.java
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/parent/pom.xml
maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/pom.xml
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0095Test.java
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0095Test.java?rev=701509&r1=701508&r2=701509&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0095Test.java (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenIT0095Test.java Fri Oct 3 12:42:05 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 MavenIT0095Test
extends AbstractMavenIntegrationTestCase
@@ -40,25 +39,25 @@
public void testit0095()
throws Exception
{
- // TODO: This is WRONG! Need to run only sub1 to effective-pom, then run all to verify.
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0095" );
File sub1 = new File( testDir, "sub1" );
Verifier verifier = new Verifier( sub1.getAbsolutePath() );
-
- List options = new ArrayList();
- options.add( "-Doutput=\"" + new File( sub1, "target/effective-pom.xml" ).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" );
-
- verifier.executeGoals( goals );
+ Properties systemProperties = new Properties();
+ systemProperties.put( "expression.expressions", "project/scm" );
+ 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" );
+ assertEquals( "scm:svn:http://svn.apache.org/repos/asf/maven/it0095/sub1",
+ props.getProperty( "project.scm.connection" ) );
+ assertEquals( "scm:svn:https://svn.apache.org/repos/asf/maven/it0095/sub1",
+ props.getProperty( "project.scm.developerConnection" ) );
+ assertEquals( "http://svn.apache.org/repos/asf/maven/it0095/sub1",
+ props.getProperty( "project.scm.url" ) );
}
-}
+}
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/parent/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/parent/pom.xml?rev=701509&r1=701508&r2=701509&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/parent/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/parent/pom.xml Fri Oct 3 12:42:05 2008
@@ -1,15 +1,42 @@
+<?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.it0095</groupId>
<artifactId>parent</artifactId>
<version>1</version>
<packaging>pom</packaging>
+
+ <name>Maven Integration Test :: it0095</name>
+ <description>Test URL calculation when modules are in sibling dirs of parent. (MNG-2006)</description>
<url>http://host/path/parent</url>
+
<scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/maven-core-it/it0095/parent</connection>
- <developerConnection>scm:svn:https://dev.svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/maven-core-it/it0095/parent</developerConnection>
- <url>http://svn.apache.org/repos/asf/maven/components/branches/maven-2.0.x/maven-core-it/it0095/parent</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/maven/it0095/parent</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/maven/it0095/parent</developerConnection>
+ <url>http://svn.apache.org/repos/asf/maven/it0095/parent</url>
</scm>
+
<modules>
<module>../sub1</module>
</modules>
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/pom.xml
URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/pom.xml?rev=701509&r1=701508&r2=701509&view=diff
==============================================================================
--- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/pom.xml (original)
+++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/it0095/sub1/pom.xml Fri Oct 3 12:42:05 2008
@@ -1,43 +1,36 @@
+<?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>
+
<parent>
<groupId>org.apache.maven.its.it0095</groupId>
<artifactId>parent</artifactId>
<version>1</version>
<relativePath>../parent</relativePath>
</parent>
+
<artifactId>sub1</artifactId>
- <build>
- <defaultGoal>integration-test</defaultGoal>
- <plugins>
- <!--
- <plugin>
- <artifactId>maven-help-plugin</artifactId>
- <configuration>
- <output>${project.build.directory}/effective-pom.xml</output>
- </configuration>
- <executions>
- <execution>
- <id>effective-pom</id>
- <phase>generate-resources</phase>
- <goals>
- <goal>effective-pom</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- -->
- <plugin>
- <artifactId>maven-verifier-plugin</artifactId>
- <executions>
- <execution>
- <id>verify</id>
- <goals>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+
+ <name>Maven Integration Test :: it0095</name>
+ <description>Test URL calculation when modules are in sibling dirs of parent. (MNG-2006)</description>
</project>