Make "." be the CLI's default classpath
Previously, the default classpath was empty. Now, in the absence of the user providing a classpath via the -cp option, the default classpath will be ".". If the user does specify a classpath, the classpath that's used will be exactly what they have specified, i.e. "." will no longer be on the classpath unless specified by the user. The app sample integration test has been updated to verify that "." is only the classpath by default. Fixes #115
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.springframework.boot.cli;
|
||||
|
||||
import java.io.File;
|
||||
import java.net.URI;
|
||||
|
||||
import org.codehaus.plexus.util.FileUtils;
|
||||
import org.junit.BeforeClass;
|
||||
@@ -48,7 +49,9 @@ public class SampleIntegrationTests {
|
||||
@Test
|
||||
public void appSample() throws Exception {
|
||||
String output = this.cli.run("app.groovy");
|
||||
assertTrue("Wrong output: " + output, output.contains("Hello World"));
|
||||
URI scriptUri = new File("samples/app.groovy").toURI();
|
||||
assertTrue("Wrong output: " + output,
|
||||
output.contains("Hello World! From " + scriptUri));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user