Skip to content

Commit

Permalink
Merge pull request #1097 from mattrjacobs/exclude-wars-from-pom-rewri…
Browse files Browse the repository at this point in the history
…ting

Special casing the 2 WAR artifacts to not have POMs rewritten
  • Loading branch information
mattrjacobs committed Feb 11, 2016
2 parents bc86bdb + 40d0146 commit 5bf9d30
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,25 @@ subprojects {
publishing {
publications {
nebula(MavenPublication) {
pom.withXml {
configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each { dep ->
if (dep.moduleName == "servlet-api") {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'provided'
} else {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'compile'
}
}
}
}
println("project.name -> " + project.name)
if (!project.name.equals("hystrix-dashboard") && !project.name.equals("hystrix-examples-webapp")) {
pom.withXml {
configurations.compile.resolvedConfiguration.firstLevelModuleDependencies.each { dep ->
if (dep.moduleName == "servlet-api") {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'provided'
} else {
asNode().dependencies[0].dependency.find {
it.artifactId[0].text() == dep.moduleName &&
it.groupId[0].text() == dep.moduleGroup
}.scope[0].value = 'compile'
}
}
}
}
}
}
}
}

0 comments on commit 5bf9d30

Please sign in to comment.