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
26
27
28
29
30
31 public class MavenITmng4036ParentResolutionFromSettingsRepoTest
32 extends AbstractMavenIntegrationTestCase
33 {
34
35 public MavenITmng4036ParentResolutionFromSettingsRepoTest()
36 {
37 super( ALL_MAVEN_VERSIONS );
38 }
39
40
41
42
43
44
45 public void testitDefaultLayout()
46 throws Exception
47 {
48 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4036/default" );
49
50 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
51 verifier.setAutoclean( false );
52 verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
53 verifier.deleteArtifacts( "org.apache.maven.its.mng4036" );
54 verifier.addCliOption( "-s" );
55 verifier.addCliOption( "settings.xml" );
56 verifier.executeGoal( "validate" );
57 verifier.verifyErrorFreeLog();
58 verifier.resetStreams();
59
60 verifier.assertArtifactPresent( "org.apache.maven.its.mng4036", "parent", "0.2", "pom" );
61 }
62
63
64
65
66
67
68 public void testitLegacyLayout()
69 throws Exception
70 {
71
72 requiresMavenVersion( "[2.0,3.0-alpha-3)" );
73
74 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4036/legacy" );
75
76 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
77 verifier.setAutoclean( false );
78 verifier.filterFile( "settings.xml", "settings.xml", "UTF-8", verifier.newDefaultFilterProperties() );
79 verifier.deleteArtifacts( "org.apache.maven.its.mng4036" );
80 verifier.addCliOption( "-s" );
81 verifier.addCliOption( "settings.xml" );
82 verifier.executeGoal( "validate" );
83 verifier.verifyErrorFreeLog();
84 verifier.resetStreams();
85
86 verifier.assertArtifactPresent( "org.apache.maven.its.mng4036", "parent", "0.1", "pom" );
87 }
88
89 }