mirror of https://github.com/apache/maven.git
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:
parent
cfd5e074ec
commit
e1baefaaf0
|
@ -28,6 +28,7 @@ import java.util.Properties;
|
||||||
public class MavenITmng3600DeploymentModeDefaultsTest
|
public class MavenITmng3600DeploymentModeDefaultsTest
|
||||||
extends AbstractMavenIntegrationTestCase
|
extends AbstractMavenIntegrationTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
public MavenITmng3600DeploymentModeDefaultsTest()
|
public MavenITmng3600DeploymentModeDefaultsTest()
|
||||||
{
|
{
|
||||||
super( "(2.1.0-M1,3.0-alpha-1),[3.0-alpha-7,)" );
|
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" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" );
|
||||||
|
|
||||||
Verifier verifier;
|
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
|
|
||||||
|
|
||||||
|
new File( testDir, "wagon.properties" ).delete();
|
||||||
verifier.setLogFileName( "log-no-settings.txt" );
|
verifier.setLogFileName( "log-no-settings.txt" );
|
||||||
verifier.executeGoal( "deploy" );
|
verifier.executeGoal( "validate" );
|
||||||
|
|
||||||
verifier.assertFilePresent( "target/wagon.properties" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
|
|
||||||
verifier.resetStreams();
|
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( "directory.mode" ) );
|
||||||
assertNull( props.get( "file.mode" ) );
|
assertNull( props.get( "file.mode" ) );
|
||||||
}
|
}
|
||||||
|
@ -60,21 +58,18 @@ public class MavenITmng3600DeploymentModeDefaultsTest
|
||||||
{
|
{
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" );
|
||||||
|
|
||||||
Verifier verifier;
|
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
|
|
||||||
|
|
||||||
|
new File( testDir, "wagon.properties" ).delete();
|
||||||
verifier.getCliOptions().add( "--settings" );
|
verifier.getCliOptions().add( "--settings" );
|
||||||
verifier.getCliOptions().add( "settings-server-defaults.xml" );
|
verifier.getCliOptions().add( "settings-server-defaults.xml" );
|
||||||
verifier.setLogFileName( "log-server-defaults.txt" );
|
verifier.setLogFileName( "log-server-defaults.txt" );
|
||||||
verifier.executeGoal( "deploy" );
|
verifier.executeGoal( "validate" );
|
||||||
|
|
||||||
verifier.assertFilePresent( "target/wagon.properties" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
|
|
||||||
verifier.resetStreams();
|
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( "directory.mode" ) );
|
||||||
assertNull( props.get( "file.mode" ) );
|
assertNull( props.get( "file.mode" ) );
|
||||||
}
|
}
|
||||||
|
@ -86,22 +81,20 @@ public class MavenITmng3600DeploymentModeDefaultsTest
|
||||||
|
|
||||||
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" );
|
File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-3600" );
|
||||||
|
|
||||||
Verifier verifier;
|
Verifier verifier = newVerifier( testDir.getAbsolutePath() );
|
||||||
|
|
||||||
verifier = newVerifier( testDir.getAbsolutePath(), "remote" );
|
|
||||||
|
|
||||||
|
new File( testDir, "wagon.properties" ).delete();
|
||||||
verifier.getCliOptions().add( "--settings" );
|
verifier.getCliOptions().add( "--settings" );
|
||||||
verifier.getCliOptions().add( "settings-modes-set.xml" );
|
verifier.getCliOptions().add( "settings-modes-set.xml" );
|
||||||
verifier.setLogFileName( "log-modes-set.txt" );
|
verifier.setLogFileName( "log-modes-set.txt" );
|
||||||
verifier.executeGoal( "deploy" );
|
verifier.executeGoal( "validate" );
|
||||||
|
|
||||||
verifier.assertFilePresent( "target/wagon.properties" );
|
|
||||||
verifier.verifyErrorFreeLog();
|
verifier.verifyErrorFreeLog();
|
||||||
|
|
||||||
verifier.resetStreams();
|
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( "700", props.get( "directory.mode" ) );
|
||||||
assertEquals( "600", props.get( "file.mode" ) );
|
assertEquals( "600", props.get( "file.mode" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>org.apache.maven.its.mng3600</groupId>
|
<groupId>org.apache.maven.its.mng3600</groupId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<artifactId>test-project</artifactId>
|
<artifactId>test</artifactId>
|
||||||
<name>test-project</name>
|
|
||||||
<dependencies>
|
<name>Maven Integration Test :: MNG-3600</name>
|
||||||
<dependency>
|
<description>
|
||||||
<groupId>junit</groupId>
|
Verify that file/group permissions configured for deployment are properly handled.
|
||||||
<artifactId>junit</artifactId>
|
</description>
|
||||||
<version>3.8.1</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
<build>
|
||||||
<extensions>
|
<extensions>
|
||||||
<extension>
|
<extension>
|
||||||
|
@ -20,7 +39,29 @@
|
||||||
<version>2.1-SNAPSHOT</version>
|
<version>2.1-SNAPSHOT</version>
|
||||||
</extension>
|
</extension>
|
||||||
</extensions>
|
</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>
|
</build>
|
||||||
|
|
||||||
<distributionManagement>
|
<distributionManagement>
|
||||||
<repository>
|
<repository>
|
||||||
<id>id</id>
|
<id>id</id>
|
||||||
|
|
Loading…
Reference in New Issue