Current directory (lodaer.path=.) pathology workaround

It turns out that loader.path=. was pathological and before this
change ended up making the classpath empty (loader.path=.,lib/
would have fixed it). With this change the old behaviour is still
supported, but if the only user-supplied path entry is "." (or
empty) then it is now kept, and translates into the root of the
current archive if running as "java -jar ...".

Fixes gh-270
This commit is contained in:
Dave Syer
2014-02-25 10:44:33 +00:00
parent 083cb388c0
commit f0f73a4ead
4 changed files with 22 additions and 9 deletions

View File

@@ -64,7 +64,7 @@ public class JarCommandIT {
Invocation invocation = this.cli.invoke("jar", jar.getAbsolutePath(),
"jar.groovy");
invocation.await();
assertEquals(0, invocation.getErrorOutput().length());
assertEquals(invocation.getErrorOutput(), 0, invocation.getErrorOutput().length());
assertTrue(jar.exists());
Process process = new JavaExecutable().processBuilder("-jar",