Skip to content

Commit

Permalink
Merge pull request #968 from microsoft/fix_poms
Browse files Browse the repository at this point in the history
fix spring boot starter pom
  • Loading branch information
littleaj authored Jul 9, 2019
2 parents 82532e3 + 218164e commit 8abe83e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion azure-application-insights-spring-boot-starter/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,20 @@ projectPomDescription = "This is the Spring Boot starter of " + project.msftAppI
whenPomConfigured = { p ->
def agentArtifactId = project(":agent").jar.baseName
def loggerArtifactId = project(":ApplicationInsightsInternalLogger").jar.baseName
p.dependencies = p.dependencies.findAll { dep -> dep.scope == "test" ||
p.dependencies = p.dependencies.findAll { dep -> dep.scope != 'test' &&
dep.artifactId != agentArtifactId && dep.artifactId != loggerArtifactId &&
!(dep.groupId in ['org.apache.http', 'eu.infomas', 'org.apache.commons', 'commons-io',
'com.google.guava', 'com.google.code.gson', 'org.apache.httpcomponents',
'io.grpc', 'com.google.protobuf'])}
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
d
}
}

0 comments on commit 8abe83e

Please sign in to comment.