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 MavenITmng4262MakeLikeReactorDottedPath370Test
32 extends AbstractMavenIntegrationTestCase
33 {
34
35 public MavenITmng4262MakeLikeReactorDottedPath370Test()
36 {
37 super( "[4.0.0-alpha-1,)" );
38 }
39
40 private void clean( Verifier verifier )
41 throws Exception
42 {
43 verifier.deleteDirectory( "target" );
44 verifier.deleteDirectory( "../sub-a/target" );
45 }
46
47
48
49
50
51
52 public void testitMakeRoot()
53 throws Exception
54 {
55 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4262" );
56
57 Verifier verifier = newVerifier( new File( testDir, "parent" ).getAbsolutePath() );
58 verifier.setAutoclean( false );
59 clean( verifier );
60 verifier.addCliOption( "-pl" );
61 verifier.addCliOption( "." );
62 verifier.setLogFileName( "log-root.txt" );
63 verifier.executeGoal( "validate" );
64 verifier.verifyErrorFreeLog();
65 verifier.resetStreams();
66
67 verifier.assertFilePresent( "target/touch.txt" );
68 verifier.assertFilePresent( "../sub-a/target/touch.txt" );
69 }
70
71
72
73
74
75
76 public void testitMakeModule()
77 throws Exception
78 {
79 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-4262" );
80
81 Verifier verifier = newVerifier( new File( testDir, "parent" ).getAbsolutePath() );
82 verifier.setAutoclean( false );
83 clean( verifier );
84 verifier.addCliOption( "-pl" );
85 verifier.addCliOption( "../sub-a" );
86 verifier.setLogFileName( "log-module.txt" );
87 verifier.executeGoal( "validate" );
88 verifier.verifyErrorFreeLog();
89 verifier.resetStreams();
90
91 verifier.assertFileNotPresent( "target/touch.txt" );
92 verifier.assertFilePresent( "../sub-a/target/touch.txt" );
93 }
94
95 }