Author: bentmann Date: Thu Nov 11 16:35:33 2010 New Revision: 1033987 URL: http://svn.apache.org/viewvc?rev=1033987&view=rev Log: o Decoupled IT from production plugins
Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3600DeploymentModeDefaultsTest.java maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3600/pom.xml Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3600DeploymentModeDefaultsTest.java URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3600DeploymentModeDefaultsTest.java?rev=1033987&r1=1033986&r2=1033987&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3600DeploymentModeDefaultsTest.java (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/java/org/apache/maven/it/MavenITmng3600DeploymentModeDefaultsTest.java Thu Nov 11 16:35:33 2010 @@ -28,6 +28,7 @@ import java.util.Properties; public class MavenITmng3600DeploymentModeDefaultsTest extends AbstractMavenIntegrationTestCase { + public MavenITmng3600DeploymentModeDefaultsTest() { super( "(2.1.0-M1,3.0-alpha-1),[3.0-alpha-7,)" ); @@ -38,19 +39,16 @@ public class MavenITmng3600DeploymentMod { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" ); - Verifier verifier; - - verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + new File( testDir, "wagon.properties" ).delete(); verifier.setLogFileName( "log-no-settings.txt" ); - verifier.executeGoal( "deploy" ); - - verifier.assertFilePresent( "target/wagon.properties" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); - verifier.resetStreams(); - Properties props = verifier.loadProperties( "target/wagon.properties" ); + verifier.assertFilePresent( "wagon.properties" ); + Properties props = verifier.loadProperties( "wagon.properties" ); assertNull( props.get( "directory.mode" ) ); assertNull( props.get( "file.mode" ) ); } @@ -60,21 +58,18 @@ public class MavenITmng3600DeploymentMod { File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" ); - Verifier verifier; - - verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + new File( testDir, "wagon.properties" ).delete(); verifier.getCliOptions().add( "--settings" ); verifier.getCliOptions().add( "settings-server-defaults.xml" ); verifier.setLogFileName( "log-server-defaults.txt" ); - verifier.executeGoal( "deploy" ); - - verifier.assertFilePresent( "target/wagon.properties" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); - verifier.resetStreams(); - Properties props = verifier.loadProperties( "target/wagon.properties" ); + verifier.assertFilePresent( "wagon.properties" ); + Properties props = verifier.loadProperties( "wagon.properties" ); assertNull( props.get( "directory.mode" ) ); assertNull( props.get( "file.mode" ) ); } @@ -86,22 +81,20 @@ public class MavenITmng3600DeploymentMod File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" ); - Verifier verifier; - - verifier = newVerifier( testDir.getAbsolutePath(), "remote" ); + Verifier verifier = newVerifier( testDir.getAbsolutePath() ); + new File( testDir, "wagon.properties" ).delete(); verifier.getCliOptions().add( "--settings" ); verifier.getCliOptions().add( "settings-modes-set.xml" ); verifier.setLogFileName( "log-modes-set.txt" ); - verifier.executeGoal( "deploy" ); - - verifier.assertFilePresent( "target/wagon.properties" ); + verifier.executeGoal( "validate" ); verifier.verifyErrorFreeLog(); - verifier.resetStreams(); - Properties props = verifier.loadProperties( "target/wagon.properties" ); + verifier.assertFilePresent( "wagon.properties" ); + Properties props = verifier.loadProperties( "wagon.properties" ); assertEquals( "700", props.get( "directory.mode" ) ); assertEquals( "600", props.get( "file.mode" ) ); } + } Modified: maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3600/pom.xml URL: http://svn.apache.org/viewvc/maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3600/pom.xml?rev=1033987&r1=1033986&r2=1033987&view=diff ============================================================================== --- maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3600/pom.xml (original) +++ maven/core-integration-testing/trunk/core-it-suite/src/test/resources/mng-3600/pom.xml Thu Nov 11 16:35:33 2010 @@ -1,17 +1,36 @@ -<?xml version="1.0"?><project> +<?xml version="1.0"?> + +<!-- +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.mng3600</groupId> <version>1.0-SNAPSHOT</version> - <artifactId>test-project</artifactId> - <name>test-project</name> - <dependencies> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <version>3.8.1</version> - <scope>test</scope> - </dependency> - </dependencies> + <artifactId>test</artifactId> + + <name>Maven Integration Test :: MNG-3600</name> + <description> + Verify that file/group permissions configured for deployment are properly handled. + </description> + <build> <extensions> <extension> @@ -20,7 +39,29 @@ <version>2.1-SNAPSHOT</version> </extension> </extensions> + <plugins> + <plugin> + <groupId>org.apache.maven.its.plugins</groupId> + <artifactId>maven-it-plugin-artifact</artifactId> + <version>2.1-SNAPSHOT</version> + <configuration> + <mainFile>pom.xml</mainFile> + </configuration> + <executions> + <execution> + <id>test</id> + <phase>validate</phase> + <goals> + <goal>set</goal> + <goal>install</goal> + <goal>deploy</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> </build> + <distributionManagement> <repository> <id>id</id>