Skip to content

Instantly share code, notes, and snippets.

@dnene
Created January 25, 2012 15:56
Show Gist options
  • Save dnene/1676918 to your computer and use it in GitHub Desktop.
Save dnene/1676918 to your computer and use it in GitHub Desktop.
gradle snippet to modify pom contents
install.repositories.mavenInstaller.pom.whenConfigured { pom ->
excludedJars = project.bnd.exclusions.tokenize(",").collect{ dep ->
splitDep = dep.split(':')
[splitDep[0],splitDep[1]]
}
deps = project.configurations['compile'].dependencies.collect {dep ->[dep.group,dep.name]}
pom.dependencies.removeAll {dep -> !excludedJars.contains([dep.groupId,dep.artifactId])}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment