Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-11-06 16:19:02 -08:00
parent c36d4a949d
commit 5167ce1c81
5 changed files with 17 additions and 2 deletions

View file

@ -25,6 +25,7 @@ public void bootjar() throws Exception {
```text
./bld compile bootjar
```
- [View Examples Project](https://github.com/rife2/bld-spring-boot/tree/main/examples)
To create a [Spring Boot executable Web Archive](https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html#appendix.executable-jar.nested-jars.war-structure)
(WAR) from the current project:
@ -41,6 +42,7 @@ public void bootwar() throws Exception {
```text
./bld compile bootwar
```
- [View Examples Project](https://github.com/rife2/bld-spring-boot/tree/main/examples)
Please check the [BootJarOperation documentation](https://rife2.github.io/bld-spring-boot/rife/bld/extension/BootJarOperation.html#method-summary)
or [BootWarOperation documentation](https://rife2.github.io/bld-spring-boot/rife/bld/extension/BootWarOperation.html#method-summary)

View file

@ -43,8 +43,8 @@ public class SpringBootBuild extends Project {
scope(compile)
.include(dependency("com.uwyn.rife2", "bld", version(1, 7, 5)));
scope(test)
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 0)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 0)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 1)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 1)))
.include(dependency("org.assertj", "assertj-core", version(3, 24, 2)));
javadocOperation()

View file

@ -75,6 +75,16 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
return (T) this;
}
/**
* Provides the destination directory in which the archive will be created.
*
* @param directory the destination directory
* @return this operation instance
*/
public T destinationDirectory(String directory) throws IOException {
return destinationDirectory(new File(directory));
}
/**
* Provides the file name that will be used for the archive creation.
*

View file

@ -21,6 +21,8 @@ package rife.bld.extension;
*
* @param name The attribute name
* @param value The attribute value
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
*/
public record BootManifestAttribute(String name, String value) {
}

View file

@ -155,6 +155,7 @@ class BootJarOperationTest {
}
@Test
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
void testJarExecute() throws Exception {
var tmp_dir = Files.createTempDirectory("bootjartmp").toFile();
var jar = "foo-1.1.1.jar";