Skip to content

Commit

Permalink
Merge pull request #15 from michal-nowak/issue-14-war-provided
Browse files Browse the repository at this point in the history
Test case for #14
  • Loading branch information
bmuschko committed Nov 20, 2014
2 parents 324b3df + 545c568 commit 3f279ee
Showing 1 changed file with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
package nebula.plugin.extraconfigurations

import nebula.test.IntegrationSpec
import spock.lang.Ignore

class ProvidedBasePluginIntegrationTest extends IntegrationSpec {
def "Can compile production code dependent on dependency declared as provided"() {
Expand Down Expand Up @@ -245,4 +246,49 @@ publishing {
commonsLang.@rev.text() == '3.3.2'
commonsLang.@conf.text() == 'provided'
}

@Ignore("https://github.com/nebula-plugins/gradle-extra-configurations-plugin/issues/14")
def "Transitive dependencies in scope provided are not included in WAR archive"() {
when:
helper.addSubproject(
"shared-component",
"""
apply plugin: 'java'
apply plugin: 'provided-base'
repositories {
mavenCentral()
}
dependencies {
provided 'org.apache.commons:commons-lang3:3.3.2'
}
"""
)

helper.addSubproject(
"webapp-component",
"""
apply plugin: 'war'
apply plugin: 'provided-base'
repositories {
mavenCentral()
}
dependencies {
compile project(":shared-component")
}
task explodedWar(type: Copy) {
into "\$buildDir/libs/exploded"
with war
}
"""
)

runTasksSuccessfully('explodedWar')
then:
!new File(projectDir, 'webapp-component/build/libs/exploded/WEB-INF/lib/commons-lang3-3.3.2.jar').exists()
}
}

0 comments on commit 3f279ee

Please sign in to comment.