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.Verifier;
23 import org.apache.maven.it.util.ResourceExtractor;
24
25 import java.io.File;
26 import java.util.Properties;
27
28
29
30
31
32
33 public class MavenITmng4474PerLookupWagonInstantiationTest
34 extends AbstractMavenIntegrationTestCase
35 {
36
37 public MavenITmng4474PerLookupWagonInstantiationTest()
38 {
39 super( "[2.0.5,3.0-alpha-1),[3.0-alpha-6,)" );
40 }
41
42
43
44
45 public void testit()
46 throws Exception
47 {
48 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4474" );
49
50 Verifier verifier = newVerifier( testDir.getAbsolutePath() );
51 verifier.setAutoclean( false );
52 verifier.deleteDirectory( "target" );
53 verifier.executeGoal( "validate" );
54 verifier.verifyErrorFreeLog();
55 verifier.resetStreams();
56
57 Properties props = verifier.loadProperties( "target/wagon.properties" );
58 String hash1 = props.getProperty( "coreit://one.hash" );
59 assertNotNull( hash1 );
60 String hash2 = props.getProperty( "coreit://two.hash" );
61 assertNotNull( hash2 );
62 assertFalse( hash1.equals( hash2 ) );
63 }
64
65 }