12
12
*/
13
13
public class IntegrationTest {
14
14
15
+ String maven = System .getProperty ("os.name" ).contains ("Windows" ) ? "mvn.bat" : "mvn" ;
16
+
15
17
protected String execute (String dir , String ... args ) throws IOException , InterruptedException {
16
18
InputStream stdErr , stdOut ;
17
19
Process process = Runtime .getRuntime ().exec (args , new String []{"JAVA_HOME=" + System .getProperty ("java.home" )}, new File (dir ));
@@ -41,7 +43,7 @@ public void shouldCompileProjectWithSingleLessFile() throws IOException, Interru
41
43
42
44
String root = "target/test-project" ;
43
45
44
- String output = execute (root , "mvn" , "clean" );
46
+ String output = execute (root , maven , "clean" );
45
47
the (output ).shouldContain ("BUILD SUCCESS" );
46
48
output = execute (root , "mvn" , "install" , "-o" );
47
49
the (output ).shouldContain ("BUILD SUCCESS" );
@@ -53,9 +55,9 @@ public void shouldCompileProjectWithSingleLessFile() throws IOException, Interru
53
55
@ Test
54
56
public void shouldCompileProjectWithMultipleLessFile () throws IOException , InterruptedException {
55
57
String root = "target/test-project-list" ;
56
- String output = execute (root , "mvn" , "clean" );
58
+ String output = execute (root , maven , "clean" );
57
59
the (output ).shouldContain ("BUILD SUCCESS" );
58
- output = execute (root , "mvn" , "install" , "-o" );
60
+ output = execute (root , maven , "install" , "-o" );
59
61
the (output ).shouldContain ("BUILD SUCCESS" );
60
62
61
63
File f = new File (root + "/target/web1/bootstrap.css" );
0 commit comments