mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-07 17:59:02 +00:00
Allow jars to be marked as a development-tool to exclude from uber-jar
Closes gh-47320
This commit is contained in:
+5
@@ -283,6 +283,7 @@ abstract class AbstractBootArchiveIntegrationTests {
|
||||
void jarTypeFilteringIsApplied() throws IOException {
|
||||
File flatDirRepository = new File(this.gradleBuild.getProjectDir(), "repository");
|
||||
createDependenciesStarterJar(new File(flatDirRepository, "starter.jar"));
|
||||
createDependenciesDeveloperToolsJar(new File(flatDirRepository, "devonly.jar"));
|
||||
createStandardJar(new File(flatDirRepository, "standard.jar"));
|
||||
assertThat(this.gradleBuild.build(this.taskName).task(":" + this.taskName).getOutcome())
|
||||
.isEqualTo(TaskOutcome.SUCCESS);
|
||||
@@ -659,6 +660,10 @@ abstract class AbstractBootArchiveIntegrationTests {
|
||||
createJar(location, (attributes) -> attributes.putValue("Spring-Boot-Jar-Type", "dependencies-starter"));
|
||||
}
|
||||
|
||||
private void createDependenciesDeveloperToolsJar(File location) throws IOException {
|
||||
createJar(location, (attributes) -> attributes.putValue("Spring-Boot-Jar-Type", "development-tool"));
|
||||
}
|
||||
|
||||
private void createJar(File location, Consumer<Attributes> attributesConfigurer) throws IOException {
|
||||
location.getParentFile().mkdirs();
|
||||
Manifest manifest = new Manifest();
|
||||
|
||||
Reference in New Issue
Block a user