Bumped bld to version 2.1.0

This commit is contained in:
Erik C. Thauvin 2024-08-29 22:18:16 -07:00
parent f340aed106
commit eb4699d84b
Signed by: erik
GPG key ID: 776702A6A2DA330E
19 changed files with 95 additions and 59 deletions

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -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"
]
}

View file

@ -2,7 +2,7 @@
[![License](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Java](https://img.shields.io/badge/java-17%2B-blue)](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[![bld](https://img.shields.io/badge/2.0.1-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![bld](https://img.shields.io/badge/2.1.0-FA9052?label=bld&labelColor=2392FF)](https://rife2.com/bld)
[![Release](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/releases/com/uwyn/rife2/bld-spring-boot/maven-metadata.xml?color=blue)](https://repo.rife2.com/#/releases/com/uwyn/rife2/bld-spring-boot)
[![Snapshot](https://flat.badgen.net/maven/v/metadata-url/repo.rife2.com/snapshots/com/uwyn/rife2/bld-spring-boot/maven-metadata.xml?label=snapshot)](https://repo.rife2.com/#/snapshots/com/uwyn/rife2/bld-spring-boot)
[![GitHub CI](https://github.com/rife2/bld-spring-boot/actions/workflows/bld.yml/badge.svg)](https://github.com/rife2/bld-spring-boot/actions/workflows/bld.yml)

View file

@ -2,12 +2,12 @@
<library name="bld">
<CLASSES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/bld" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.0.1-sources.jar!/" />
<root url="jar://$USER_HOME$/.bld/dist/bld-2.1.0-sources.jar!/" />
</SOURCES>
<excluded>
<root url="jar://$PROJECT_DIR$/lib/bld/bld-wrapper.jar!/" />

View file

@ -7,7 +7,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/compile" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/compile" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/runtime" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/runtime" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -8,7 +8,7 @@
<SOURCES>
<root url="file://$PROJECT_DIR$/lib/test" />
</SOURCES>
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="false" type="SOURCES" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" />
<jarDirectory url="file://$PROJECT_DIR$/lib/test" recursive="true" type="SOURCES" />
</library>
</component>

View file

@ -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"
]
}

Binary file not shown.

View file

@ -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

Binary file not shown.

View file

@ -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

View file

@ -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)))

View file

@ -275,6 +275,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param jars a collection of Java archive files
* @return this operation instance
* @see #infLibs(File...)
*/
public T infLibs(Collection<File> jars) {
infLibs_.addAll(jars);
@ -287,6 +288,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @param jars one or more Java archive files
* @return this operation instance
* @see #infLibs(Path...)
*/
public T infLibsPaths(Collection<Path> jars) {
return infLibs(jars.stream().map(Path::toFile).toList());
@ -336,6 +341,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param jars one or more Java archive files
* @return this operation instance
* @see #infLibs(String...)
*/
public T infLibsStrings(Collection<String> jars) {
return infLibs(jars.stream().map(File::new).toList());
@ -387,6 +393,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* @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<File> jars) throws IOException {
for (var j : jars) {
@ -406,6 +413,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* @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<T extends AbstractBootOperation<T>>
* @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<T extends AbstractBootOperation<T>>
* @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<T extends AbstractBootOperation<T>>
* @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<Path> jars) throws IOException {
return launcherLibs(jars.stream().map(Path::toFile).toList());
@ -450,6 +461,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* @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<String> jars) throws IOException {
return launcherLibs(jars.stream().map(File::new).toList());
@ -516,6 +528,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param directories one or more source directories
* @return this operation instance
* @see #sourceDirectories(File...)
*/
public T sourceDirectories(Collection<File> directories) {
sourceDirectories_.addAll(directories);
@ -528,6 +541,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @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<T extends AbstractBootOperation<T>>
*
* @param directories one or more source directories
* @return this operation instance
* @see #sourceDirectories(Path...)
*/
public T sourceDirectoriesPaths(Collection<Path> directories) {
return sourceDirectories(directories.stream().map(Path::toFile).toList());
@ -577,6 +594,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param directories one or more source directories
* @return this operation instance
* @see #sourceDirectories(String...)
*/
public T sourceDirectoriesStrings(Collection<String> directories) {
return sourceDirectories(directories.stream().map(File::new).toList());

View file

@ -146,6 +146,7 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
*
* @param jars a collection of Java archive files
* @return this operation instance
* @see #providedLibs(File...)
*/
public BootWarOperation providedLibs(Collection<File> jars) {
providedLibs_.addAll(jars);
@ -157,6 +158,7 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
*
* @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<BootWarOperation> {
*
* @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<BootWarOperation> {
*
* @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<BootWarOperation> {
*
* @param jars one or more Java archive files
* @return this operation instance
* @see #providedLibs(Path...)
*/
public BootWarOperation providedLibsPaths(Collection<Path> 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<BootWarOperation> {
*
* @param jars one or more Java archive files
* @return this operation instance
* @see #providedLibs(String...)
*/
public BootWarOperation providedLibsStrings(Collection<String> jars) {
providedLibs_.addAll(jars.stream().map(File::new).toList());
return this;
return providedLibs(jars.stream().map(File::new).toList());
}
}

View file

@ -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();
}