1
+ /*******************************************************************************
2
+ * Copyright (c) 2022 Joe Shannon and others.
3
+ * This program and the accompanying materials
4
+ * are made available under the terms of the Eclipse Public License 2.0
5
+ * which accompanies this distribution, and is available at
6
+ * https://www.eclipse.org/legal/epl-2.0/
7
+ *
8
+ * SPDX-License-Identifier: EPL-2.0
9
+ *
10
+ * Contributors:
11
+ * Joe Shannon - initial API and implementation
12
+ *******************************************************************************/
1
13
package org .eclipse .tycho .test .reactor .makeBehaviour ;
2
14
3
15
import static org .junit .Assert .fail ;
4
16
17
+ import java .util .List ;
18
+
5
19
import org .apache .maven .it .VerificationException ;
6
20
import org .apache .maven .it .Verifier ;
7
21
import org .eclipse .tycho .test .AbstractTychoIntegrationTest ;
@@ -26,12 +40,12 @@ public class MavenReactorMakeOptionsTest extends AbstractTychoIntegrationTest {
26
40
@ Before
27
41
public void setUp () throws Exception {
28
42
verifier = getVerifier ("reactor.makeBehaviour" );
29
- verifier .executeGoal ( "clean " );
43
+ verifier .addCliOption ( "-T1C " );
30
44
}
31
45
32
46
@ Test
33
47
public void testCompleteBuild () throws Exception {
34
- verifier .executeGoal ( " verify" );
48
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
35
49
verifier .verifyErrorFreeLog ();
36
50
verifier .assertFilePresent ("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar" );
37
51
verifier .assertFilePresent ("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar" );
@@ -44,7 +58,7 @@ public void testAlsoMake() throws Exception {
44
58
// REACTOR_MAKE_UPSTREAM
45
59
verifier .addCliOption ("-am" );
46
60
verifier .addCliOption ("-pl feature1" );
47
- verifier .executeGoal ( " verify" );
61
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
48
62
verifier .verifyErrorFreeLog ();
49
63
verifier .assertFilePresent ("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar" );
50
64
verifier .assertFileNotPresent ("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar" );
@@ -57,7 +71,7 @@ public void testAlsoMakeDependents() throws Exception {
57
71
// REACTOR_MAKE_DOWNSTREAM
58
72
verifier .addCliOption ("-amd" );
59
73
verifier .addCliOption ("-pl bundle1,bundle2" );
60
- verifier .executeGoal ( " verify" );
74
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
61
75
verifier .verifyErrorFreeLog ();
62
76
verifier .assertFilePresent ("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar" );
63
77
verifier .assertFilePresent ("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar" );
@@ -71,7 +85,7 @@ public void testBoth() throws Exception {
71
85
verifier .addCliOption ("-am" );
72
86
verifier .addCliOption ("-amd" );
73
87
verifier .addCliOption ("-pl feature1,bundle2" );
74
- verifier .executeGoal ( " verify" );
88
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
75
89
verifier .verifyErrorFreeLog ();
76
90
verifier .assertFilePresent ("bundle1/target/bundle1-1.0.0-SNAPSHOT.jar" );
77
91
verifier .assertFilePresent ("bundle2/target/bundle2-1.0.0-SNAPSHOT.jar" );
@@ -83,7 +97,7 @@ public void testBoth() throws Exception {
83
97
public void testSingleProjectNoOptionFails () throws Exception {
84
98
try {
85
99
verifier .addCliOption ("-pl feature1" );
86
- verifier .executeGoal ( " verify" );
100
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
87
101
fail ("Build should fail due to missing reactor dependency" );
88
102
} catch (VerificationException e ) {
89
103
verifier .verifyTextInLog (
@@ -98,7 +112,7 @@ public void testDownstreamFailsIfMissingDownstreamDependency() throws Exception
98
112
try {
99
113
verifier .addCliOption ("-amd" );
100
114
verifier .addCliOption ("-pl bundle1,feature1" );
101
- verifier .executeGoal ( " verify" );
115
+ verifier .executeGoals ( List . of ( "clean" , " verify") );
102
116
fail ("Build should fail due to missing reactor dependency" );
103
117
} catch (VerificationException e ) {
104
118
verifier .verifyTextInLog (
0 commit comments