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.Arrays;
26
27
28
29
30
31
32
33
34
35 public class MavenITmng6090CIFriendlyTest
36 extends AbstractMavenIntegrationTestCase
37 {
38
39 public MavenITmng6090CIFriendlyTest()
40 {
41
42
43 super( "[3.5.0-alpha-2,)" );
44 }
45
46
47
48
49
50
51
52
53
54 public void testitShouldResolveTheDependenciesWithoutBuildConsumer()
55 throws Exception
56 {
57 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6090-ci-friendly" );
58
59 Verifier verifier = newVerifier( testDir.getAbsolutePath(), false );
60 verifier.setMavenDebug( false );
61 verifier.setAutoclean( false );
62
63 verifier.addCliOption( "-Drevision=1.2" );
64 verifier.addCliOption( "-Dmaven.experimental.buildconsumer=false" );
65 verifier.setLogFileName( "install-log.txt" );
66 verifier.executeGoals( Arrays.asList( "clean", "install" ) );
67 verifier.verifyErrorFreeLog();
68 verifier.resetStreams();
69
70 verifier = newVerifier( testDir.getAbsolutePath(), false );
71 verifier.setMavenDebug( false );
72 verifier.setAutoclean( false );
73
74 verifier.addCliOption( "-Drevision=1.2" );
75 verifier.addCliOption( "-pl module-3" );
76 verifier.executeGoal( "package" );
77 verifier.verifyErrorFreeLog();
78 verifier.resetStreams();
79 }
80
81 public void testitShouldResolveTheDependenciesWithBuildConsumer()
82 throws Exception
83 {
84 File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/mng-6090-ci-friendly" );
85
86 Verifier verifier = newVerifier( testDir.getAbsolutePath(), false );
87 verifier.setMavenDebug( false );
88 verifier.setAutoclean( false );
89 verifier.setForkJvm(true);
90
91 verifier.addCliOption( "-Drevision=1.2" );
92 verifier.addCliOption( "-Dmaven.experimental.buildconsumer=true" );
93 verifier.setLogFileName( "install-log.txt" );
94 verifier.executeGoals( Arrays.asList( "clean", "install" ) );
95 verifier.verifyErrorFreeLog();
96 verifier.resetStreams();
97
98 verifier = newVerifier( testDir.getAbsolutePath(), false );
99 verifier.setMavenDebug( false );
100 verifier.setAutoclean( false );
101 verifier.setForkJvm(true);
102
103 verifier.addCliOption( "-Drevision=1.2" );
104 verifier.addCliOption( "-pl module-3" );
105 verifier.executeGoal( "package" );
106 verifier.verifyErrorFreeLog();
107 verifier.resetStreams();
108 }
109
110 }