diff --git a/.idea/libraries/bld.xml b/.idea/libraries/bld.xml
index f1a7e2b..969b816 100644
--- a/.idea/libraries/bld.xml
+++ b/.idea/libraries/bld.xml
@@ -2,12 +2,12 @@
-
+
-
+
diff --git a/.idea/libraries/compile.xml b/.idea/libraries/compile.xml
index 9bd86aa..99cc0c0 100644
--- a/.idea/libraries/compile.xml
+++ b/.idea/libraries/compile.xml
@@ -7,7 +7,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/.idea/libraries/runtime.xml b/.idea/libraries/runtime.xml
index 2ae5c4b..d4069f2 100644
--- a/.idea/libraries/runtime.xml
+++ b/.idea/libraries/runtime.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/.idea/libraries/test.xml b/.idea/libraries/test.xml
index b80486a..57ed5ef 100644
--- a/.idea/libraries/test.xml
+++ b/.idea/libraries/test.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/.vscode/settings.json b/.vscode/settings.json
index 5b2667b..4c33beb 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -9,7 +9,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
- "${HOME}/.bld/dist/bld-2.0.1.jar",
+ "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar"
]
}
diff --git a/README.md b/README.md
index 7dccc08..1646bc3 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[](https://opensource.org/licenses/Apache-2.0)
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
-[](https://rife2.com/bld)
+[](https://rife2.com/bld)
[](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-spring-boot)
[](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-spring-boot)
[](https://github.com/rife2/bld-spring-boot/actions/workflows/bld.yml)
diff --git a/examples/.idea/libraries/bld.xml b/examples/.idea/libraries/bld.xml
index 867d049..8105a64 100644
--- a/examples/.idea/libraries/bld.xml
+++ b/examples/.idea/libraries/bld.xml
@@ -2,12 +2,12 @@
-
+
-
+
diff --git a/examples/.idea/libraries/compile.xml b/examples/.idea/libraries/compile.xml
index 9bd86aa..99cc0c0 100644
--- a/examples/.idea/libraries/compile.xml
+++ b/examples/.idea/libraries/compile.xml
@@ -7,7 +7,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/.idea/libraries/runtime.xml b/examples/.idea/libraries/runtime.xml
index 2ae5c4b..d4069f2 100644
--- a/examples/.idea/libraries/runtime.xml
+++ b/examples/.idea/libraries/runtime.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/.idea/libraries/test.xml b/examples/.idea/libraries/test.xml
index b80486a..57ed5ef 100644
--- a/examples/.idea/libraries/test.xml
+++ b/examples/.idea/libraries/test.xml
@@ -8,7 +8,7 @@
-
-
+
+
\ No newline at end of file
diff --git a/examples/.vscode/settings.json b/examples/.vscode/settings.json
index 5b2667b..4c33beb 100644
--- a/examples/.vscode/settings.json
+++ b/examples/.vscode/settings.json
@@ -9,7 +9,7 @@
],
"java.configuration.updateBuildConfiguration": "automatic",
"java.project.referencedLibraries": [
- "${HOME}/.bld/dist/bld-2.0.1.jar",
+ "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar"
]
}
diff --git a/examples/lib/bld/bld-wrapper.jar b/examples/lib/bld/bld-wrapper.jar
index 0868dec..d768b08 100644
Binary files a/examples/lib/bld/bld-wrapper.jar and b/examples/lib/bld/bld-wrapper.jar differ
diff --git a/examples/lib/bld/bld-wrapper.properties b/examples/lib/bld/bld-wrapper.properties
index ac0204d..7f39a1c 100644
--- a/examples/lib/bld/bld-wrapper.properties
+++ b/examples/lib/bld/bld-wrapper.properties
@@ -4,4 +4,4 @@ bld.downloadLocation=
bld.extension-boot=com.uwyn.rife2:bld-spring-boot:0.9.8-SNAPSHOT
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=2.0.1
+bld.version=2.1.0
diff --git a/lib/bld/bld-wrapper.jar b/lib/bld/bld-wrapper.jar
index e42fdfd..b91f0d5 100644
Binary files a/lib/bld/bld-wrapper.jar and b/lib/bld/bld-wrapper.jar differ
diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties
index b5847eb..e0ee3fb 100644
--- a/lib/bld/bld-wrapper.properties
+++ b/lib/bld/bld-wrapper.properties
@@ -1,7 +1,7 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.downloadLocation=
-bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.4
+bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5
bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_RELEASES
bld.sourceDirectories=
-bld.version=2.0.1
+bld.version=2.1.0
diff --git a/src/bld/java/rife/bld/extension/SpringBootBuild.java b/src/bld/java/rife/bld/extension/SpringBootBuild.java
index 7592868..f854204 100644
--- a/src/bld/java/rife/bld/extension/SpringBootBuild.java
+++ b/src/bld/java/rife/bld/extension/SpringBootBuild.java
@@ -43,7 +43,7 @@ public class SpringBootBuild extends Project {
repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS);
scope(compile)
- .include(dependency("com.uwyn.rife2", "bld", version(2, 0, 1)));
+ .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0)));
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0)))
diff --git a/src/main/java/rife/bld/extension/AbstractBootOperation.java b/src/main/java/rife/bld/extension/AbstractBootOperation.java
index be62db4..d6b4d2c 100644
--- a/src/main/java/rife/bld/extension/AbstractBootOperation.java
+++ b/src/main/java/rife/bld/extension/AbstractBootOperation.java
@@ -275,6 +275,7 @@ public abstract class AbstractBootOperation>
*
* @param jars a collection of Java archive files
* @return this operation instance
+ * @see #infLibs(File...)
*/
public T infLibs(Collection jars) {
infLibs_.addAll(jars);
@@ -287,6 +288,7 @@ public abstract class AbstractBootOperation>
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #infLibs(Collection)
*/
public T infLibs(File... jars) {
return infLibs(List.of(jars));
@@ -297,6 +299,7 @@ public abstract class AbstractBootOperation>
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #infLibsPaths(Collection)
*/
public T infLibs(Path... jars) {
return infLibsPaths(List.of(jars));
@@ -307,6 +310,7 @@ public abstract class AbstractBootOperation>
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #infLibsStrings(Collection)
*/
public T infLibs(String... jars) {
return infLibsStrings(List.of(jars));
@@ -326,6 +330,7 @@ public abstract class AbstractBootOperation>
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #infLibs(Path...)
*/
public T infLibsPaths(Collection jars) {
return infLibs(jars.stream().map(Path::toFile).toList());
@@ -336,6 +341,7 @@ public abstract class AbstractBootOperation>
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #infLibs(String...)
*/
public T infLibsStrings(Collection jars) {
return infLibs(jars.stream().map(File::new).toList());
@@ -387,6 +393,7 @@ public abstract class AbstractBootOperation>
* @param jars a collection of Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #infLibs(File...)
*/
public T launcherLibs(Collection jars) throws IOException {
for (var j : jars) {
@@ -406,6 +413,7 @@ public abstract class AbstractBootOperation>
* @param jars one or more Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #infLibs(Collection)
*/
public T launcherLibs(File... jars) throws IOException {
return launcherLibs(List.of(jars));
@@ -417,6 +425,7 @@ public abstract class AbstractBootOperation>
* @param jars one or more Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #launcherLibsStrings(Collection)
*/
public T launcherLibs(String... jars) throws IOException {
return launcherLibsStrings(List.of(jars));
@@ -428,6 +437,7 @@ public abstract class AbstractBootOperation>
* @param jars one or more Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #launcherLibsPaths(Collection)
*/
public T launcherLibs(Path... jars) throws IOException {
return launcherLibsPaths(List.of(jars));
@@ -439,6 +449,7 @@ public abstract class AbstractBootOperation>
* @param jars one or more Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #launcherLibs(Path...)
*/
public T launcherLibsPaths(Collection jars) throws IOException {
return launcherLibs(jars.stream().map(Path::toFile).toList());
@@ -450,6 +461,7 @@ public abstract class AbstractBootOperation>
* @param jars one or more Java archives
* @return this operation instance
* @throws IOException if a JAR could not be found
+ * @see #launcherLibs(String...)
*/
public T launcherLibsStrings(Collection jars) throws IOException {
return launcherLibs(jars.stream().map(File::new).toList());
@@ -516,6 +528,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectories(File...)
*/
public T sourceDirectories(Collection directories) {
sourceDirectories_.addAll(directories);
@@ -528,6 +541,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectories(Collection)
*/
public T sourceDirectories(File... directories) {
return sourceDirectories(List.of(directories));
@@ -538,6 +552,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectoriesStrings(Collection)
*/
public T sourceDirectories(String... directories) {
return sourceDirectoriesStrings(List.of(directories));
@@ -548,6 +563,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectoriesPaths(Collection)
*/
public T sourceDirectories(Path... directories) {
return sourceDirectoriesPaths(List.of(directories));
@@ -567,6 +583,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectories(Path...)
*/
public T sourceDirectoriesPaths(Collection directories) {
return sourceDirectories(directories.stream().map(Path::toFile).toList());
@@ -577,6 +594,7 @@ public abstract class AbstractBootOperation>
*
* @param directories one or more source directories
* @return this operation instance
+ * @see #sourceDirectories(String...)
*/
public T sourceDirectoriesStrings(Collection directories) {
return sourceDirectories(directories.stream().map(File::new).toList());
diff --git a/src/main/java/rife/bld/extension/BootWarOperation.java b/src/main/java/rife/bld/extension/BootWarOperation.java
index 320e5ae..e08ae1c 100644
--- a/src/main/java/rife/bld/extension/BootWarOperation.java
+++ b/src/main/java/rife/bld/extension/BootWarOperation.java
@@ -146,6 +146,7 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars a collection of Java archive files
* @return this operation instance
+ * @see #providedLibs(File...)
*/
public BootWarOperation providedLibs(Collection jars) {
providedLibs_.addAll(jars);
@@ -157,6 +158,7 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #providedLibsStrings(Collection)
*/
public BootWarOperation providedLibs(String... jars) {
return providedLibsStrings(List.of(jars));
@@ -167,6 +169,7 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #providedLibs(Collection)
*/
public BootWarOperation providedLibs(File... jars) {
return providedLibs(List.of(jars));
@@ -177,6 +180,7 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #providedLibsPaths(Collection)
*/
public BootWarOperation providedLibs(Path... jars) {
return providedLibsPaths(List.of(jars));
@@ -196,10 +200,10 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #providedLibs(Path...)
*/
public BootWarOperation providedLibsPaths(Collection jars) {
- providedLibs_.addAll(jars.stream().map(Path::toFile).toList());
- return this;
+ return providedLibs(jars.stream().map(Path::toFile).toList());
}
/**
@@ -207,9 +211,9 @@ public class BootWarOperation extends AbstractBootOperation {
*
* @param jars one or more Java archive files
* @return this operation instance
+ * @see #providedLibs(String...)
*/
public BootWarOperation providedLibsStrings(Collection jars) {
- providedLibs_.addAll(jars.stream().map(File::new).toList());
- return this;
+ return providedLibs(jars.stream().map(File::new).toList());
}
}
diff --git a/src/test/java/rife/bld/extension/BootJarOperationTest.java b/src/test/java/rife/bld/extension/BootJarOperationTest.java
index 0e4f5e5..716f250 100644
--- a/src/test/java/rife/bld/extension/BootJarOperationTest.java
+++ b/src/test/java/rife/bld/extension/BootJarOperationTest.java
@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatCode;
class BootJarOperationTest {
- private static final String BLD = "bld-2.0.1.jar";
+ private static final String BLD = "bld-2.1.0.jar";
private static final String BOOT_VERSION = "3.3.3";
private static final String EXAMPLES_LIB_COMPILE = "examples/lib/compile/";
private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/";
@@ -161,6 +161,7 @@ class BootJarOperationTest {
private static final String SPRING_BOOT_ACTUATOR = "spring-boot-actuator-" + BOOT_VERSION + ".jar";
private static final String SPRING_BOOT_LOADER = "spring-boot-loader-" + BOOT_VERSION + ".jar";
private static final String SRC_MAIN_JAVA = "src/main/java";
+ private static final String SRC_TEST_JAVA = "src/test/java";
private StringBuilder readJarEntries(File jar) throws IOException {
var jarEntries = new StringBuilder();
@@ -207,29 +208,30 @@ class BootJarOperationTest {
var op = new BootWarOperation();
var foo = new File(EXAMPLES_LIB_COMPILE + SPRING_BOOT);
- op = op.infLibs(EXAMPLES_LIB_COMPILE + SPRING_BOOT);
- assertThat(op.infLibs()).containsExactly(foo);
- op.infLibs().clear();
-
- op = op.infLibs(foo);
- assertThat(op.infLibs()).containsExactly(foo);
- op.infLibs().clear();
-
- op = op.infLibs(foo.toPath());
- assertThat(op.infLibs()).containsExactly(foo);
- op.infLibs().clear();
-
var bar = new File(EXAMPLES_LIB_COMPILE + SPRING_BOOT_ACTUATOR);
+
op.infLibs(EXAMPLES_LIB_COMPILE + SPRING_BOOT, EXAMPLES_LIB_COMPILE + SPRING_BOOT_ACTUATOR);
- assertThat(op.infLibs()).containsExactly(foo, bar);
+ assertThat(op.infLibs()).as("String...").containsExactly(foo, bar);
op.infLibs().clear();
op.infLibs(foo, bar);
- assertThat(op.infLibs()).containsExactly(foo, bar);
+ assertThat(op.infLibs()).as("File...").containsExactly(foo, bar);
op.infLibs().clear();
op.infLibs(foo.toPath(), bar.toPath());
- assertThat(op.infLibs()).containsExactly(foo, bar);
+ assertThat(op.infLibs()).as("Path...").containsExactly(foo, bar);
+ op.infLibs().clear();
+
+ op.infLibsStrings(List.of(EXAMPLES_LIB_COMPILE + SPRING_BOOT, EXAMPLES_LIB_COMPILE + SPRING_BOOT_ACTUATOR));
+ assertThat(op.infLibs()).as("List(String...)").containsExactly(foo, bar);
+ op.infLibs().clear();
+
+ op.infLibs(List.of(foo, bar));
+ assertThat(op.infLibs()).as("List(File...)").containsExactly(foo, bar);
+ op.infLibs().clear();
+
+ op.infLibsPaths(List.of(foo.toPath(), bar.toPath()));
+ assertThat(op.infLibs()).as("List(Path...)").containsExactly(foo, bar);
op.infLibs().clear();
}
@@ -313,15 +315,27 @@ class BootJarOperationTest {
var launcher = new File(EXAMPLES_LIB_STANDALONE + SPRING_BOOT_LOADER);
op = op.launcherLibs(EXAMPLES_LIB_STANDALONE + SPRING_BOOT_LOADER);
- assertThat(op.launcherLibs()).containsExactly(launcher);
+ assertThat(op.launcherLibs()).as("String...").containsExactly(launcher);
op.launcherLibs().clear();
op = op.launcherLibs(launcher);
- assertThat(op.launcherLibs()).containsExactly(launcher);
+ assertThat(op.launcherLibs()).as("File...").containsExactly(launcher);
op.launcherLibs().clear();
op = op.launcherLibs(launcher.toPath());
- assertThat(op.launcherLibs()).containsExactly(launcher);
+ assertThat(op.launcherLibs()).as("Path...").containsExactly(launcher);
+ op.launcherLibs().clear();
+
+ op = op.launcherLibsStrings(List.of(EXAMPLES_LIB_STANDALONE + SPRING_BOOT_LOADER));
+ assertThat(op.launcherLibs()).as("List(String...)").containsExactly(launcher);
+ op.launcherLibs().clear();
+
+ op = op.launcherLibs(List.of(launcher));
+ assertThat(op.launcherLibs()).as("List(File...)").containsExactly(launcher);
+ op.launcherLibs().clear();
+
+ op = op.launcherLibsPaths(List.of(launcher.toPath()));
+ assertThat(op.launcherLibs()).as("List(Path...)").containsExactly(launcher);
op.launcherLibs().clear();
}
@@ -355,29 +369,29 @@ class BootJarOperationTest {
var op = new BootJarOperation();
var src = new File(SRC_MAIN_JAVA);
- op = op.sourceDirectories(SRC_MAIN_JAVA);
- assertThat(op.sourceDirectories()).containsExactly(src);
+ var test = new File(SRC_TEST_JAVA);
+ op = op.sourceDirectories(SRC_MAIN_JAVA, SRC_TEST_JAVA);
+ assertThat(op.sourceDirectories()).as("String...").containsExactly(src, test);
op.sourceDirectories().clear();
- op = op.sourceDirectories(src);
- assertThat(op.sourceDirectories()).containsExactly(src);
+ op = op.sourceDirectories(src, test);
+ assertThat(op.sourceDirectories()).as("File...").containsExactly(src, test);
op.sourceDirectories().clear();
- op = op.sourceDirectories(src.toPath());
- assertThat(op.sourceDirectories()).containsExactly(src);
+ op = op.sourceDirectories(src.toPath(), test.toPath());
+ assertThat(op.sourceDirectories()).as("Path...").containsExactly(src, test);
op.sourceDirectories().clear();
- var test = new File("src/test/java");
- op.sourceDirectories(SRC_MAIN_JAVA, "src/test/java");
- assertThat(op.sourceDirectories()).containsExactly(src, test);
+ op.sourceDirectoriesStrings(List.of(SRC_MAIN_JAVA, SRC_TEST_JAVA));
+ assertThat(op.sourceDirectories()).as("List(String...").containsExactly(src, test);
op.sourceDirectories().clear();
- op.sourceDirectories(src, test);
- assertThat(op.sourceDirectories()).containsExactly(src, test);
+ op.sourceDirectories(List.of(src, test));
+ assertThat(op.sourceDirectories()).as("List(File...)").containsExactly(src, test);
op.sourceDirectories().clear();
- op.sourceDirectories(src.toPath(), test.toPath());
- assertThat(op.sourceDirectories()).containsExactly(src, test);
+ op.sourceDirectoriesPaths(List.of(src.toPath(), test.toPath()));
+ assertThat(op.sourceDirectories()).as("List(Path...)").containsExactly(src, test);
op.sourceDirectories().clear();
}