o Decoupled IT from production plugins

git-svn-id: https://svn.apache.org/repos/asf/maven/core-integration-testing/trunk@1033987 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2010-11-11 16:35:33 +00:00
parent cfd5e074ec
commit e1baefaaf0
2 changed files with 69 additions and 35 deletions

View File

@ -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 MavenITmng3600DeploymentModeDefaultsTest
{
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 MavenITmng3600DeploymentModeDefaultsTest
{
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 MavenITmng3600DeploymentModeDefaultsTest
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" ) );
}
}

View File

@ -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>