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 public class MavenITmng2124PomInterpolationWithParentValuesTest
32 extends AbstractMavenIntegrationTestCase
33 {
34 public MavenITmng2124PomInterpolationWithParentValuesTest()
35 {
36 super( ALL_MAVEN_VERSIONS );
37 }
38
39
40
41
42 public void testitMNG2124()
43 throws Exception
44 {
45 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-2124" );
46 File child = new File( testDir, "parent/child" );
47
48 Verifier verifier = newVerifier( child.getAbsolutePath() );
49 verifier.setAutoclean( false );
50 verifier.deleteDirectory( "target" );
51 verifier.executeGoal( "initialize" );
52 verifier.verifyErrorFreeLog();
53 verifier.resetStreams();
54
55 Properties props = verifier.loadProperties( "target/parent.properties" );
56 assertEquals( "parent, child, parent, child", props.getProperty( "project.description" ) );
57 }
58
59 }