jars) throws IOException {
- return (BootJarOperation) super.launcherJars(jars);
- }
-
- /**
- * Provides the fully-qualified main class name.
- */
- @Override
- public BootJarOperation mainClass(String className) {
- return (BootJarOperation) super.mainClass(className);
- }
-
- /**
- * Provides an attribute to put in the JAR manifest.
- *
- * @param name the attribute name to put in the manifest
- * @param value the attribute value to put in the manifest
- * @return this operation instance
- */
- @Override
- public BootJarOperation manifestAttribute(String name, String value) {
- return (BootJarOperation) super.manifestAttribute(name, value);
- }
-
- /**
- * Provides a map of attributes to put in the jar manifest.
- *
- * A copy will be created to allow this map to be independently modifiable.
- *
- * @param attributes the attributes to put in the manifest
- * @return this operation instance
- */
- @Override
- public BootJarOperation manifestAttributes(Collection attributes) {
- return (BootJarOperation) super.manifestAttributes(attributes);
- }
-
- /**
- * Provides the bld project.
- */
- @Override
- public BootJarOperation project(Project project) {
- return (BootJarOperation) super.project(project);
- }
-
- /**
- * Provides source directories that will be used for the jar archive creation.
- *
- * @param directories source directories
- * @return this operation instance
- */
- @Override
- public BootJarOperation sourceDirectories(File... directories) {
- return (BootJarOperation) super.sourceDirectories(directories);
- }
-
/**
* Performs the BootJar operation.
*/
@@ -174,7 +61,6 @@ public class BootJarOperation extends AbstractBootOperation {
}
}
-
/**
* Part of the {@link #execute} operation, creates the {@code BOOT-INF} staging directory.
*/
@@ -188,7 +74,6 @@ public class BootJarOperation extends AbstractBootOperation {
* Configures the operation from a {@link Project}.
*/
public BootJarOperation fromProject(Project project) throws IOException {
- project(project);
mainClass(project.mainClass());
return destinationDirectory(project.buildDistDirectory())
diff --git a/src/main/java/rife/bld/extension/BootWarOperation.java b/src/main/java/rife/bld/extension/BootWarOperation.java
index 80e17e2..505590f 100644
--- a/src/main/java/rife/bld/extension/BootWarOperation.java
+++ b/src/main/java/rife/bld/extension/BootWarOperation.java
@@ -34,122 +34,10 @@ import java.util.logging.Logger;
* @author Erik C. Thauvin
* @since 1.0
*/
-public class BootWarOperation extends AbstractBootOperation {
+public class BootWarOperation extends AbstractBootOperation {
private static final Logger LOGGER = Logger.getLogger(BootWarOperation.class.getName());
private final List webInfProvidedLibs_ = new ArrayList<>();
- /**
- * Provides the destination file name that will be used for the WAR creation.
- *
- * @param name the wAR archive destination file name
- * @return this operation instance
- */
- @Override
- public BootWarOperation destinationArchiveFileName(String name) {
- return (BootWarOperation) super.destinationArchiveFileName(name);
- }
-
- /**
- * Provides the destination directory in which the WAR will be created.
- *
- * @param directory the WAR destination directory
- * @return this operation instance
- */
- @Override
- public BootWarOperation destinationDirectory(File directory) throws IOException {
- return (BootWarOperation) super.destinationDirectory(directory);
- }
-
- /**
- * Provides JAR libraries that will be used for the WAR creation.
- *
- * @param jars Java archive files
- * @return this operation instance
- */
- @Override
- public BootWarOperation infLibs(List jars) {
- return (BootWarOperation) super.infLibs(jars);
- }
-
- /**
- * Provides JAR libraries that will be used for the WAR creation.
- *
- * @param jar Java archive file
- * @return this operation instance
- */
- @Override
- public BootWarOperation infLibs(File... jar) {
- return (BootWarOperation) super.infLibs(jar);
- }
-
- /**
- * Part of the {@link #execute} operation, configure the JAR launcher ({@code spring-boot-loader}) class.
- */
- @Override
- public BootWarOperation launcherClass(String className) {
- return (BootWarOperation) super.launcherClass(className);
- }
-
- /**
- * Part of the {@link #execute} operation, configure the launcher ({@code spring-boot-loader}) JAR(s).
- */
- @Override
- public BootWarOperation launcherJars(List jars) throws IOException {
- return (BootWarOperation) super.launcherJars(jars);
- }
-
- /**
- * Provides the fully-qualified main class name.
- */
- @Override
- public BootWarOperation mainClass(String className) {
- return (BootWarOperation) super.mainClass(className);
- }
-
- /**
- * Provides an attribute to put in the JAR manifest.
- *
- * @param name the attribute name to put in the manifest
- * @param value the attribute value to put in the manifest
- * @return this operation instance
- */
- @Override
- public BootWarOperation manifestAttribute(String name, String value) {
- return (BootWarOperation) super.manifestAttribute(name, value);
- }
-
- /**
- * Provides a map of attributes to put in the jar manifest.
- *
- * A copy will be created to allow this map to be independently modifiable.
- *
- * @param attributes the attributes to put in the manifest
- * @return this operation instance
- */
- @Override
- public BootWarOperation manifestAttributes(Collection attributes) {
- return (BootWarOperation) super.manifestAttributes(attributes);
- }
-
- /**
- * Provides the bld project.
- */
- @Override
- public BootWarOperation project(Project project) {
- return (BootWarOperation) super.project(project);
- }
-
- /**
- * Provides source directories that will be used for the jar archive creation.
- *
- * @param directories source directories
- * @return this operation instance
- */
- @Override
- public BootWarOperation sourceDirectories(File... directories) {
- return (BootWarOperation) super.sourceDirectories(directories);
- }
-
/**
* Performs the BootJar operation.
*/
@@ -204,7 +92,6 @@ public class BootWarOperation extends AbstractBootOperation {
* @param project the project to configure the operation from
*/
public BootWarOperation fromProject(Project project) throws IOException {
- project(project);
mainClass(project.mainClass());
return destinationDirectory(project.buildDistDirectory())
@@ -224,7 +111,6 @@ public class BootWarOperation extends AbstractBootOperation {
.sourceDirectories(project.buildMainDirectory(), project.srcMainResourcesDirectory());
}
-
/**
* Provides JAR libraries that will be used for the WAR creation in {@code /WEB-INF/lib-provided}.
*
diff --git a/src/test/java/rife/bld/extension/BootJarOperationTest.java b/src/test/java/rife/bld/extension/BootJarOperationTest.java
index cc48e56..ef28039 100644
--- a/src/test/java/rife/bld/extension/BootJarOperationTest.java
+++ b/src/test/java/rife/bld/extension/BootJarOperationTest.java
@@ -177,9 +177,7 @@ class BootJarOperationTest {
"BOOT-INF/classes/rife/\n" +
"BOOT-INF/classes/rife/bld/\n" +
"BOOT-INF/classes/rife/bld/extension/\n" +
- "BOOT-INF/classes/rife/bld/extension/AbstractBootOperation$ManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/AbstractBootOperation.class\n" +
- "BOOT-INF/classes/rife/bld/extension/BootJarOperation$ManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootJarOperation.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootWarOperation.class\n" +
@@ -187,7 +185,7 @@ class BootJarOperationTest {
"BOOT-INF/lib/" + SPRING_BOOT + '\n' +
"BOOT-INF/lib/" + SPRING_BOOT_ACTUATOR + '\n' +
"META-INF/\n" +
- "META-INF/MANIFEST.MF" + LAUNCHER_JARS);
+ "META-INF/MANIFEST.MF\n" + LAUNCHER_JARS);
FileUtils.deleteDirectory(tmp_dir);
}
@@ -213,9 +211,7 @@ class BootJarOperationTest {
"BOOT-INF/classes/rife/\n" +
"BOOT-INF/classes/rife/bld/\n" +
"BOOT-INF/classes/rife/bld/extension/\n" +
- "BOOT-INF/classes/rife/bld/extension/AbstractBootOperation$ManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/AbstractBootOperation.class\n" +
- "BOOT-INF/classes/rife/bld/extension/BootJarOperation$ManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootJarOperation.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootManifestAttribute.class\n" +
"BOOT-INF/classes/rife/bld/extension/BootWarOperation.class\n" +
@@ -224,7 +220,7 @@ class BootJarOperationTest {
"BOOT-INF/lib/" + SPRING_BOOT + '\n' +
"BOOT-INF/lib/" + SPRING_BOOT_ACTUATOR + '\n' +
"META-INF/\n" +
- "META-INF/MANIFEST.MF" + LAUNCHER_JARS);
+ "META-INF/MANIFEST.MF\n" + LAUNCHER_JARS);
FileUtils.deleteDirectory(tmp_dir);
}
@@ -235,7 +231,6 @@ class BootJarOperationTest {
var project = new CustomProject(tmp_dir);
var bootJar = new BootJarOperation().fromProject(project);
- assertThat(bootJar.project()).as("project").isEqualTo(project);
assertThat(bootJar.mainClass()).as("mainClass").isEqualTo(MAIN_CLASS);
assertThat(bootJar.sourceDirectories()).as("sourceDirectories.size").hasSize(2);
assertThat(bootJar.manifestAttributes()).as("manifestAttributes.size").hasSize(3);
@@ -280,9 +275,7 @@ class BootJarOperationTest {
"WEB-INF/classes/rife/\n" +
"WEB-INF/classes/rife/bld/\n" +
"WEB-INF/classes/rife/bld/extension/\n" +
- "WEB-INF/classes/rife/bld/extension/AbstractBootOperation$ManifestAttribute.class\n" +
"WEB-INF/classes/rife/bld/extension/AbstractBootOperation.class\n" +
- "WEB-INF/classes/rife/bld/extension/BootJarOperation$ManifestAttribute.class\n" +
"WEB-INF/classes/rife/bld/extension/BootJarOperation.class\n" +
"WEB-INF/classes/rife/bld/extension/BootManifestAttribute.class\n" +
"WEB-INF/classes/rife/bld/extension/BootWarOperation.class\n" +