Rudimentary jar watching

New options watchJars takes a colon separated list of jars
(just the jar names, not paths).  For example:

-Dspringloaded=watchJars=foo.jar:bar.jar

Committed some very basic tests that are passing, they are in
the SpringLoadedTestsInSeparateJVM test class, see the
tests with 'jar' in the name.
This commit is contained in:
Andy Clement
2015-05-05 17:50:57 -07:00
parent d313c506ca
commit 56d0c00822
32 changed files with 503 additions and 126 deletions

1
testdata/jars/README vendored Normal file
View File

@@ -0,0 +1 @@
For the watching/updating from jars feature, these are the jar testdata

6
testdata/jars/one/Bar.java vendored Normal file
View File

@@ -0,0 +1,6 @@
package test;
public class Bar {
public static void run() {
new Wibble().foo();
}
}

BIN
testdata/jars/one/Foo.class vendored Normal file

Binary file not shown.

8
testdata/jars/one/Foo.java vendored Normal file
View File

@@ -0,0 +1,8 @@
public class Foo {
public static void run() {
m();
}
public static void m() {
System.out.println("m() running");
}
}

6
testdata/jars/one/Wibble.java vendored Normal file
View File

@@ -0,0 +1,6 @@
package test;
public class Wibble {
public void foo() {
System.out.println("Wibble.foo() running, version 1");
}
}

BIN
testdata/jars/one/bar.jar vendored Normal file

Binary file not shown.

4
testdata/jars/one/build.sh vendored Executable file
View File

@@ -0,0 +1,4 @@
javac -d . *.java
jar -cvMf foo.jar Foo.class
jar -cvMf bar.jar test/*.class

BIN
testdata/jars/one/foo.jar vendored Normal file

Binary file not shown.

BIN
testdata/jars/one/test/Bar.class vendored Normal file

Binary file not shown.

BIN
testdata/jars/one/test/Wibble.class vendored Normal file

Binary file not shown.

6
testdata/jars/two/Bar.java vendored Normal file
View File

@@ -0,0 +1,6 @@
package test;
public class Bar {
public static void run() {
new Wibble().foo();
}
}

BIN
testdata/jars/two/Foo.class vendored Normal file

Binary file not shown.

8
testdata/jars/two/Foo.java vendored Normal file
View File

@@ -0,0 +1,8 @@
public class Foo {
public static void run() {
n();
}
public static void n() {
System.out.println("n() running");
}
}

6
testdata/jars/two/Wibble.java vendored Normal file
View File

@@ -0,0 +1,6 @@
package test;
public class Wibble {
public void foo() {
System.out.println("Wibble.foo() running, version 2");
}
}

BIN
testdata/jars/two/bar.jar vendored Normal file

Binary file not shown.

4
testdata/jars/two/build.sh vendored Executable file
View File

@@ -0,0 +1,4 @@
javac -d . *.java
jar -cvMf foo.jar Foo.class
jar -cvMf bar.jar test/*.class

BIN
testdata/jars/two/foo.jar vendored Normal file

Binary file not shown.

BIN
testdata/jars/two/test/Bar.class vendored Normal file

Binary file not shown.

BIN
testdata/jars/two/test/Wibble.class vendored Normal file

Binary file not shown.