|
|
@ -75,11 +75,12 @@ public class ChangeableUrlsTests {
|
|
|
|
@Test
|
|
|
|
@Test
|
|
|
|
public void urlsFromJarClassPathAreConsidered() throws Exception {
|
|
|
|
public void urlsFromJarClassPathAreConsidered() throws Exception {
|
|
|
|
File relative = this.temporaryFolder.newFolder();
|
|
|
|
File relative = this.temporaryFolder.newFolder();
|
|
|
|
File absolute = this.temporaryFolder.newFolder();
|
|
|
|
File absoluteFile = this.temporaryFolder.newFolder();
|
|
|
|
|
|
|
|
URL absoluteUrl = this.temporaryFolder.newFolder().toURI().toURL();
|
|
|
|
File jarWithClassPath = makeJarFileWithUrlsInManifestClassPath(
|
|
|
|
File jarWithClassPath = makeJarFileWithUrlsInManifestClassPath(
|
|
|
|
"project-core/target/classes/", "project-web/target/classes/",
|
|
|
|
"project-core/target/classes/", "project-web/target/classes/",
|
|
|
|
"does-not-exist/target/classes", relative.getName() + "/",
|
|
|
|
"does-not-exist/target/classes", relative.getName() + "/",
|
|
|
|
absolute.getAbsolutePath() + "/");
|
|
|
|
absoluteFile.getAbsolutePath() + "/", absoluteUrl);
|
|
|
|
new File(jarWithClassPath.getParentFile(), "project-core/target/classes")
|
|
|
|
new File(jarWithClassPath.getParentFile(), "project-core/target/classes")
|
|
|
|
.mkdirs();
|
|
|
|
.mkdirs();
|
|
|
|
new File(jarWithClassPath.getParentFile(), "project-web/target/classes").mkdirs();
|
|
|
|
new File(jarWithClassPath.getParentFile(), "project-web/target/classes").mkdirs();
|
|
|
@ -89,7 +90,7 @@ public class ChangeableUrlsTests {
|
|
|
|
assertThat(urls.toList()).containsExactly(
|
|
|
|
assertThat(urls.toList()).containsExactly(
|
|
|
|
new URL(jarWithClassPath.toURI().toURL(), "project-core/target/classes/"),
|
|
|
|
new URL(jarWithClassPath.toURI().toURL(), "project-core/target/classes/"),
|
|
|
|
new URL(jarWithClassPath.toURI().toURL(), "project-web/target/classes/"),
|
|
|
|
new URL(jarWithClassPath.toURI().toURL(), "project-web/target/classes/"),
|
|
|
|
relative.toURI().toURL(), absolute.toURI().toURL());
|
|
|
|
relative.toURI().toURL(), absoluteFile.toURI().toURL(), absoluteUrl);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private URL makeUrl(String name) throws IOException {
|
|
|
|
private URL makeUrl(String name) throws IOException {
|
|
|
|