Compare commits
2 commits
bd9b44a782
...
b81fff3d19
Author | SHA1 | Date | |
---|---|---|---|
b81fff3d19 | |||
82480dbcff |
3 changed files with 14 additions and 5 deletions
|
@ -16,6 +16,7 @@
|
|||
|
||||
package rife.bld.extension;
|
||||
|
||||
import rife.bld.Project;
|
||||
import rife.bld.operations.AbstractOperation;
|
||||
import rife.tools.FileUtils;
|
||||
import rife.tools.exceptions.FileUtilsErrorException;
|
||||
|
@ -264,6 +265,14 @@ public abstract class AbstractBootOperation<T extends AbstractBootOperation<T>>
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the operation from a {@link Project}.
|
||||
*
|
||||
* @param project the project
|
||||
* @return this operation instance
|
||||
*/
|
||||
public abstract T fromProject(Project project) throws IOException;
|
||||
|
||||
/**
|
||||
* Provides the libraries that will be stored in {@code BOOT-INF} or {@code WEB-INF}.
|
||||
*
|
||||
|
|
|
@ -79,15 +79,15 @@ public class BootJarOperation extends AbstractBootOperation<BootJarOperation> {
|
|||
* @param project the project
|
||||
* @return this operation instance
|
||||
*/
|
||||
@Override
|
||||
public BootJarOperation fromProject(Project project) throws IOException {
|
||||
mainClass(project.mainClass());
|
||||
|
||||
return destinationDirectory(project.buildDistDirectory())
|
||||
.destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.jar")
|
||||
.infLibs(project.compileClasspathJars())
|
||||
.infLibs(project.runtimeClasspathJars())
|
||||
.launcherClass("org.springframework.boot.loader.JarLauncher")
|
||||
.launcherLibs(project.standaloneClasspathJars())
|
||||
.mainClass(project.mainClass())
|
||||
.manifestAttributes(
|
||||
List.of(
|
||||
new BootManifestAttribute("Manifest-Version", "1.0"),
|
||||
|
|
|
@ -97,12 +97,11 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
|
|||
/**
|
||||
* Configures the operation from a {@link Project}.
|
||||
*
|
||||
* @param project the project to configure the operation from
|
||||
* @param project the project
|
||||
* @return this operation instance
|
||||
*/
|
||||
@Override
|
||||
public BootWarOperation fromProject(Project project) throws IOException {
|
||||
mainClass(project.mainClass());
|
||||
|
||||
return destinationDirectory(project.buildDistDirectory())
|
||||
.destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.war")
|
||||
.infLibs(project.compileClasspathJars())
|
||||
|
@ -111,6 +110,7 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
|
|||
// TODO add provided libs
|
||||
.launcherClass("org.springframework.boot.loader.WarLauncher")
|
||||
.launcherLibs(project.standaloneClasspathJars())
|
||||
.mainClass(project.mainClass())
|
||||
.manifestAttributes(
|
||||
List.of(
|
||||
new BootManifestAttribute("Manifest-Version", "1.0"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue