Commit c5921479 authored by Andy Wilkinson's avatar Andy Wilkinson

Verify that bootJar and bootWar handle duplicates gracefully

Closes gh-9573
parent f0b7e7cf
...@@ -115,4 +115,10 @@ public abstract class AbstractBootArchiveIntegrationTests { ...@@ -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);
}
} }
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"
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment