From 209beb168b511ea4bc42d1b5cb48fa8606f8999b Mon Sep 17 00:00:00 2001 From: littleaj <1690572+littleaj@users.noreply.github.com> Date: Tue, 9 Jul 2019 11:39:22 -0700 Subject: [PATCH] fix provided dependencies in web module pom --- web/build.gradle | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/web/build.gradle b/web/build.gradle index 307413bce4c..98621ff53df 100644 --- a/web/build.gradle +++ b/web/build.gradle @@ -75,7 +75,18 @@ projectPomName = project.msftAppInsights + " Java SDK Web Module" projectPomDescription = "This is the web module of " + project.msftAppInsightsJavaSdk whenPomConfigured = { p -> - p.dependencies = [] + p.dependencies = project.configurations.compileOnly.allDependencies + .findAll { it.group != 'com.microsoft.azure' } + .collect { + def d = p.dependencies[0].class.newInstance() // related to https://issues.gradle.org/browse/GRADLE-1497 + d.artifactId = it.name + d.groupId = it.group + d.version = it.version + d.scope = 'provided' + d.type = null + if (it.name == 'xwork' || it.name == 'spring-webmvc') d.optional = 'true' + d + } } // endregion Publishing properties