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
32
33
34
35 public class MavenITmng3530DynamicPOMInterpolationTest
36 extends AbstractMavenIntegrationTestCase
37 {
38 private static final String BASEDIR = "/mng-3530/";
39
40 public MavenITmng3530DynamicPOMInterpolationTest()
41 {
42 super( "[2.1.0-M1,3.0-alpha-1)" );
43 }
44
45 public void testitMNG3530_BuildPath()
46 throws Exception
47 {
48 File testDir = ResourceExtractor.simpleExtractResources( getClass(), BASEDIR + "build-path" );
49 File pluginDir = new File( testDir, "plugin" );
50 File projectDir = new File( testDir, "project" );
51
52
53
54
55
56 Verifier verifier = newVerifier( pluginDir.getAbsolutePath(), "remote" );
57 verifier.executeGoal( "install" );
58
59 verifier.verifyErrorFreeLog();
60 verifier.resetStreams();
61
62
63
64 verifier = newVerifier( projectDir.getAbsolutePath(), "remote" );
65
66 verifier.executeGoal( "package" );
67 verifier.verifyErrorFreeLog();
68 verifier.resetStreams();
69 }
70
71 public void testitMNG3530_POMProperty()
72 throws Exception
73 {
74 File testDir = ResourceExtractor.simpleExtractResources( getClass(), BASEDIR
75 + "pom-property" );
76 File pluginDir = new File( testDir, "plugin" );
77 File projectDir = new File( testDir, "project" );
78
79
80
81
82
83 Verifier verifier = newVerifier( pluginDir.getAbsolutePath(), "remote" );
84 verifier.executeGoal( "install" );
85
86 verifier.verifyErrorFreeLog();
87 verifier.resetStreams();
88
89
90
91 verifier = newVerifier( projectDir.getAbsolutePath(), "remote" );
92
93 verifier.executeGoal( "package" );
94 verifier.verifyErrorFreeLog();
95 verifier.resetStreams();
96 }
97
98 public void testitMNG3530_ResourceDirectoryInterpolation()
99 throws Exception
100 {
101 File testDir = ResourceExtractor.simpleExtractResources( getClass(), BASEDIR
102 + "resource-object" );
103 File pluginDir = new File( testDir, "plugin" );
104 File projectDir = new File( testDir, "project" );
105
106
107
108 Verifier verifier = newVerifier( pluginDir.getAbsolutePath(), "remote" );
109 verifier.executeGoal( "install" );
110
111 verifier.verifyErrorFreeLog();
112 verifier.resetStreams();
113
114
115
116 verifier = newVerifier( projectDir.getAbsolutePath(), "remote" );
117
118 verifier.executeGoal( "package" );
119 verifier.verifyErrorFreeLog();
120 verifier.resetStreams();
121 }
122 }