Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-10-31 16:10:53 -07:00
parent 82480dbcff
commit b81fff3d19
2 changed files with 5 additions and 5 deletions

View file

@ -79,15 +79,15 @@ public class BootJarOperation extends AbstractBootOperation<BootJarOperation> {
* @param project the project * @param project the project
* @return this operation instance * @return this operation instance
*/ */
@Override
public BootJarOperation fromProject(Project project) throws IOException { public BootJarOperation fromProject(Project project) throws IOException {
mainClass(project.mainClass());
return destinationDirectory(project.buildDistDirectory()) return destinationDirectory(project.buildDistDirectory())
.destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.jar") .destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.jar")
.infLibs(project.compileClasspathJars()) .infLibs(project.compileClasspathJars())
.infLibs(project.runtimeClasspathJars()) .infLibs(project.runtimeClasspathJars())
.launcherClass("org.springframework.boot.loader.JarLauncher") .launcherClass("org.springframework.boot.loader.JarLauncher")
.launcherLibs(project.standaloneClasspathJars()) .launcherLibs(project.standaloneClasspathJars())
.mainClass(project.mainClass())
.manifestAttributes( .manifestAttributes(
List.of( List.of(
new BootManifestAttribute("Manifest-Version", "1.0"), new BootManifestAttribute("Manifest-Version", "1.0"),

View file

@ -97,12 +97,11 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
/** /**
* Configures the operation from a {@link Project}. * Configures the operation from a {@link Project}.
* *
* @param project the project to configure the operation from * @param project the project
* @return this operation instance * @return this operation instance
*/ */
@Override
public BootWarOperation fromProject(Project project) throws IOException { public BootWarOperation fromProject(Project project) throws IOException {
mainClass(project.mainClass());
return destinationDirectory(project.buildDistDirectory()) return destinationDirectory(project.buildDistDirectory())
.destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.war") .destinationFileName(project.archiveBaseName() + "-" + project.version() + "-boot.war")
.infLibs(project.compileClasspathJars()) .infLibs(project.compileClasspathJars())
@ -111,6 +110,7 @@ public class BootWarOperation extends AbstractBootOperation<BootWarOperation> {
// TODO add provided libs // TODO add provided libs
.launcherClass("org.springframework.boot.loader.WarLauncher") .launcherClass("org.springframework.boot.loader.WarLauncher")
.launcherLibs(project.standaloneClasspathJars()) .launcherLibs(project.standaloneClasspathJars())
.mainClass(project.mainClass())
.manifestAttributes( .manifestAttributes(
List.of( List.of(
new BootManifestAttribute("Manifest-Version", "1.0"), new BootManifestAttribute("Manifest-Version", "1.0"),