1 package org.apache.maven.it;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import org.apache.maven.it.util.ResourceExtractor;
23
24 import java.io.File;
25 import java.util.Properties;
26
27 public class MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest
28 extends AbstractMavenIntegrationTestCase
29 {
30 public MavenIT0113ServerAuthzAvailableToWagonMgrInPluginTest()
31 {
32 super( "[2.0,3.0-alpha-1),[3.0-alpha-7,)" );
33 }
34
35
36
37
38
39
40
41 public void testit0113()
42 throws Exception
43 {
44 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/it0113" );
45
46 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
47 verifier.setAutoclean( false );
48 verifier.deleteDirectory( "target" );
49 verifier.addCliOption( "--settings" );
50 verifier.addCliOption( "settings.xml" );
51 verifier.executeGoal( "validate" );
52 verifier.verifyErrorFreeLog();
53 verifier.resetStreams();
54
55 Properties props = verifier.loadProperties( "target/auth.properties" );
56 assertEquals( "testuser", props.getProperty( "test.username" ) );
57 assertEquals( "testtest", props.getProperty( "test.password" ) );
58 }
59
60 }