Verify that bootJar and bootWar handle duplicates gracefully
Closes gh-9573
This commit is contained in:
parent
f0b7e7cf56
commit
c59214792b
|
@ -115,4 +115,10 @@ public abstract class AbstractBootArchiveIntegrationTests {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void duplicatesAreHandledGracefully() throws IOException {
|
||||
assertThat(this.gradleBuild.build(this.taskName).task(":" + this.taskName)
|
||||
.getOutcome()).isEqualTo(TaskOutcome.SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
buildscript {
|
||||
dependencies {
|
||||
classpath files(pluginClasspath.split(','))
|
||||
}
|
||||
}
|
||||
|
||||
apply plugin: 'java'
|
||||
apply plugin: 'org.springframework.boot'
|
||||
|
||||
bootJar {
|
||||
mainClass = 'com.example.CustomMain'
|
||||
duplicatesStrategy = "exclude"
|
||||
}
|
||||
|
||||
configurations {
|
||||
provided
|
||||
}
|
||||
|
||||
sourceSets.all {
|
||||
compileClasspath += configurations.provided
|
||||
runtimeClasspath += configurations.provided
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url "https://repo.spring.io/libs-snapshot" }
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile "org.apache.commons:commons-lang3:3.6"
|
||||
provided "org.apache.commons:commons-lang3:3.6"
|
||||
}
|
Loading…
Reference in New Issue