From 8fde08857436388ba6a1036c7e768136cd6c853f Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Wed, 15 Jan 2020 21:11:16 -0800 Subject: [PATCH] Add layered jar layout support to the maven plugin Update the Maven plugin with a new `LAYERED_JAR` layout option. See gh-19768 --- .../springframework/boot/maven/RepackageMojo.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java index c1945a052c7..642cf96587c 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/RepackageMojo.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -44,6 +44,7 @@ import org.springframework.boot.loader.tools.Layout; import org.springframework.boot.loader.tools.LayoutFactory; import org.springframework.boot.loader.tools.Layouts.Expanded; import org.springframework.boot.loader.tools.Layouts.Jar; +import org.springframework.boot.loader.tools.Layouts.LayeredJar; import org.springframework.boot.loader.tools.Layouts.None; import org.springframework.boot.loader.tools.Layouts.War; import org.springframework.boot.loader.tools.Libraries; @@ -140,8 +141,8 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { /** * The type of archive (which corresponds to how the dependencies are laid out inside - * it). Possible values are JAR, WAR, ZIP, DIR, NONE. Defaults to a guess based on the - * archive type. + * it). Possible values are JAR, LAYERED_JAR, WAR, ZIP, DIR, NONE. Defaults to a guess + * based on the archive type. * @since 1.0.0 */ @Parameter(property = "spring-boot.repackage.layout") @@ -380,6 +381,11 @@ public class RepackageMojo extends AbstractDependencyFilterMojo { */ JAR(new Jar()), + /** + * Layered Jar Layout. + */ + LAYERED_JAR(new LayeredJar()), + /** * War Layout. */