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
28
29
30
31
32
33 public class MavenITmng2865MirrorWildcardTest
34 extends AbstractMavenIntegrationTestCase
35 {
36
37 public MavenITmng2865MirrorWildcardTest()
38 {
39 super( "(2.0.4,)" );
40 }
41
42
43
44
45
46
47 public void testitFileRepo()
48 throws Exception
49 {
50 testit( "file" );
51 }
52
53
54
55
56
57
58 public void testitLocalhostRepo()
59 throws Exception
60 {
61 testit( "localhost" );
62 }
63
64
65
66
67
68
69 public void testitExternalRepo()
70 throws Exception
71 {
72 testit( "external" );
73 }
74
75
76
77
78
79
80 public void testitCentralRepo()
81 throws Exception
82 {
83 testit( "central" );
84 }
85
86 private void testit( String project )
87 throws Exception
88 {
89 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2865" );
90
91 Verifier verifier = newVerifier( new File( testDir, project ).getAbsolutePath() );
92 verifier.setAutoclean( false );
93 verifier.deleteArtifacts( "org.apache.maven.its.mng2865" );
94 Properties filterProps = verifier.newDefaultFilterProperties();
95 verifier.filterFile( "settings-template.xml", "settings.xml", "UTF-8", filterProps );
96 verifier.addCliOption( "--settings" );
97 verifier.addCliOption( "settings.xml" );
98 verifier.executeGoal( "validate" );
99 verifier.verifyErrorFreeLog();
100 verifier.resetStreams();
101
102 verifier.assertArtifactPresent( "org.apache.maven.its.mng2865", "a", "0.1", "jar" );
103 }
104
105 }