Skip to content

Commit 8abe83e

Browse files
authored
Merge pull request #968 from microsoft/fix_poms
fix spring boot starter pom
2 parents 82532e3 + 218164e commit 8abe83e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

azure-application-insights-spring-boot-starter/build.gradle

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,20 @@ projectPomDescription = "This is the Spring Boot starter of " + project.msftAppI
122122
whenPomConfigured = { p ->
123123
def agentArtifactId = project(":agent").jar.baseName
124124
def loggerArtifactId = project(":ApplicationInsightsInternalLogger").jar.baseName
125-
p.dependencies = p.dependencies.findAll { dep -> dep.scope == "test" ||
125+
p.dependencies = p.dependencies.findAll { dep -> dep.scope != 'test' &&
126126
dep.artifactId != agentArtifactId && dep.artifactId != loggerArtifactId &&
127127
!(dep.groupId in ['org.apache.http', 'eu.infomas', 'org.apache.commons', 'commons-io',
128128
'com.google.guava', 'com.google.code.gson', 'org.apache.httpcomponents',
129129
'io.grpc', 'com.google.protobuf'])}
130+
p.dependencies += project.configurations.compileOnly.allDependencies
131+
.findAll { it.group != 'com.microsoft.azure' }
132+
.collect {
133+
def d = p.dependencies[0].class.newInstance() // related to https://issues.gradle.org/browse/GRADLE-1497
134+
d.artifactId = it.name
135+
d.groupId = it.group
136+
d.version = it.version
137+
d.scope = 'provided'
138+
d.type = null
139+
d
140+
}
130141
}

0 commit comments

Comments
 (0)