From 095c0b1594c2ab23e7e88c3a1872a43d7b064a3b Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Tue, 18 Nov 2014 21:55:39 +0100 Subject: [PATCH 1/3] Test case for nebula-plugins#14 Transitive dependencies in provided scope should not be included in war archives --- .../ProvidedBasePluginIntegrationTest.groovy | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy index bc99445..4b5731d 100644 --- a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy +++ b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy @@ -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"() { @@ -245,4 +246,49 @@ publishing { commonsLang.@rev.text() == '3.3.2' commonsLang.@conf.text() == 'provided' } + + @Ignore("Test case for issue: nebula-plugins#14") + def "Transitive dependencies in scope provided are not insluded 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() + } } From 8414570574ca248dc5e22a5d2073077981fa8e97 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 20 Nov 2014 00:14:55 +0100 Subject: [PATCH 2/3] Fixing link to issue nebula-plugins#14 Changing issue# to github issue url. Fixing typo and line spacing. --- .../ProvidedBasePluginIntegrationTest.groovy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy index 4b5731d..eb10d10 100644 --- a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy +++ b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy @@ -247,12 +247,12 @@ publishing { commonsLang.@conf.text() == 'provided' } - @Ignore("Test case for issue: nebula-plugins#14") - def "Transitive dependencies in scope provided are not insluded in WAR archive"() { + @Ignore("Test case for issue: 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' @@ -268,7 +268,7 @@ dependencies { helper.addSubproject( "webapp-component", - """ +""" apply plugin: 'war' apply plugin: 'provided-base' From 545c56836e2dcb9519a755fc553fdb03527eb374 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 20 Nov 2014 00:48:48 +0100 Subject: [PATCH 3/3] Fixing @Ignore message --- .../ProvidedBasePluginIntegrationTest.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy index eb10d10..d0982f2 100644 --- a/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy +++ b/src/test/groovy/nebula/plugin/extraconfigurations/ProvidedBasePluginIntegrationTest.groovy @@ -247,7 +247,7 @@ publishing { commonsLang.@conf.text() == 'provided' } - @Ignore("Test case for issue: https://github.com/nebula-plugins/gradle-extra-configurations-plugin/issues/14") + @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(