Cleaned up Javadocs

This commit is contained in:
Erik C. Thauvin 2023-11-27 14:40:18 -08:00
parent 5167ce1c81
commit 26654821bf
11 changed files with 263 additions and 10 deletions

View file

@ -60,13 +60,24 @@ public class SpringBootBuild extends Project {
.artifactId("bld-spring-boot")
.description("bld Extension for Spring Boot")
.url("https://github.com/rife2/bld-spring-boot")
.developer(new PublishDeveloper().id("ethauvin").name("Erik C. Thauvin").email("erik@thauvin.net")
.url("https://erik.thauvin.net/"))
.license(new PublishLicense().name("The Apache License, Version 2.0")
.url("http://www.apache.org/licenses/LICENSE-2.0.txt"))
.scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-spring-boot.git")
.developerConnection("scm:git:git@github.com:rife2/bld-spring-boot.git")
.url("https://github.com/rife2/bld-spring-boot"))
.developer(
new PublishDeveloper()
.id("ethauvin")
.name("Erik C. Thauvin")
.email("erik@thauvin.net")
.url("https://erik.thauvin.net/")
)
.license(
new PublishLicense()
.name("The Apache License, Version 2.0")
.url("http://www.apache.org/licenses/LICENSE-2.0.txt")
)
.scm(
new PublishScm()
.connection("scm:git:https://github.com/rife2/bld-spring-boot.git")
.developerConnection("scm:git:git@github.com:rife2/bld-spring-boot.git")
.url("https://github.com/rife2/bld-spring-boot")
)
.signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase"));
}

View file

@ -38,6 +38,7 @@ import java.util.spi.ToolProvider;
* Implements common methods used by Spring Boot operations, such as {@link BootJarOperation} and
* {@link BootWarOperation}.
*
* @param <T> the type parameter
* @author <a href="https://erik.thauvin.net/">Erik C. Thauvin</a>
* @since 1.0
*/
@ -67,6 +68,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param directory the destination directory
* @return this operation instance
* @throws IOException if an error occurs
*/
public T destinationDirectory(File directory) throws IOException {
destinationDirectory_ = directory;
@ -80,6 +82,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param directory the destination directory
* @return this operation instance
* @throws IOException if an error occurs
*/
public T destinationDirectory(String directory) throws IOException {
return destinationDirectory(new File(directory));
@ -111,6 +114,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* staging directory.
*
* @param stagingDirectory the staging directory
* @throws FileUtilsErrorException if an error occurs
*/
protected void executeCopyBootLoader(File stagingDirectory) throws FileUtilsErrorException {
if (launcherLibs_.isEmpty()) {
@ -134,6 +138,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* Part of the {@link #execute execute} operation, copies the {@code BOOT-INF} or {@code WEB-INF} classes.
*
* @param stagingInfDirectory Tte staging {@code INF} directory
* @throws IOException if an error occurs
*/
protected void executeCopyInfClassesFiles(File stagingInfDirectory) throws IOException {
var inf_classes_dir = new File(stagingInfDirectory, "classes");
@ -154,6 +159,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* Part of the {@link #execute execute} operation, copies the {@code BOOT-INF} or (@code WEB-INF) libs.
*
* @param stagingInfDirectory the staging {@code INF} directory
* @throws IOException if an error occurs
*/
protected void executeCopyInfLibs(File stagingInfDirectory) throws IOException {
var inf_lib_dir = new File(stagingInfDirectory, "lib");
@ -173,6 +179,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param stagingDirectory the staging directory
* @return the archive
* @throws IOException if an error occurs
*/
protected File executeCreateArchive(File stagingDirectory) throws IOException {
executeCreateManifest(stagingDirectory);
@ -223,6 +230,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* Part of the {@link #execute execute} operation, creates the manifest for the archive.
*
* @param stagingDirectory the staging directory
* @throws IOException if an error occurs
*/
protected void executeCreateManifest(File stagingDirectory) throws IOException {
var meta_inf_dir = new File(stagingDirectory, "META-INF");
@ -242,6 +250,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param project the project
* @return this operation instance
* @throws IOException if an error occurs
*/
public abstract T fromProject(Project project) throws IOException;
@ -323,6 +332,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
*
* @param jars a collection of Java archives
* @return this operation instance
* @throws IOException if an error occurs
*/
public T launcherLibs(Collection<File> jars) throws IOException {
if (!jars.isEmpty()) {
@ -420,6 +430,7 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
* {@link IllegalArgumentException} otherwise.
*
* @return {@code true} or an {@link IllegalArgumentException}
* @throws IllegalArgumentException if an error occurs
*/
@SuppressWarnings("SameReturnValue")
protected boolean verifyExecute() throws IllegalArgumentException {

View file

@ -66,6 +66,7 @@ public class BootJarOperation extends AbstractBootOperation<BootJarOperation> {
*
* @param stagingDirectory the staging directory
* @return the {@code BOOT-INF} directory location
* @throws IOException if an error occurs
*/
protected File executeCreateBootInfDirectory(File stagingDirectory) throws IOException {
var boot_inf = new File(stagingDirectory, "BOOT-INF");

View file

@ -38,6 +38,7 @@ public final class BootUtils {
* Deletes the given directories.
*
* @param directories one or more directories to delete
* @throws FileUtilsErrorException if an error occurs
*/
public static void deleteDirectories(File... directories) throws FileUtilsErrorException {
for (var d : directories) {
@ -68,6 +69,7 @@ public final class BootUtils {
* Makes a directory for the given path, including any necessary but nonexistent parent directories.
*
* @param path the directory path
* @throws IOException if an error occurs
*/
public static void mkDirs(File path) throws IOException {
if (!path.exists() && !path.mkdirs()) {

View file

@ -69,6 +69,7 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
* Part of the {@link #execute execute} operation, copies the {@code WEB-INF/lib-provided} libraries.
*
* @param stagingWebInfDirectory the staging {@code WEB-INF/lib-provided} directory
* @throws IOException if an error occurs
*/
protected void executeCopyWebInfProvidedLib(File stagingWebInfDirectory) throws IOException {
var lib_provided_dir = new File(stagingWebInfDirectory, "lib-provided");
@ -86,7 +87,9 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
/**
* Part of the {@link #execute execute} operation, creates the {@code WEB-INF} staging directory.
*
* @param stagingDirectory the staging directory
* @return the {@code WEB-INF} directory location
* @throws IOException if an error occurs
*/
protected File executeCreateWebInfDirectory(File stagingDirectory) throws IOException {
var boot_inf = new File(stagingDirectory, "WEB-INF");