Skip to content

Commit

Permalink
Add <repositories> section to generated poms
Browse files Browse the repository at this point in the history
Issue: GRADLE-48
  • Loading branch information
cbeams committed Mar 13, 2011
1 parent 308ed0e commit a31d9e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions maven-deployment.gradle
Expand Up @@ -157,6 +157,20 @@ task generatePom {
properties {
setProperty('project.build.sourceEncoding', 'UTF8')
}
// iterate through all repositories declared in the gradle
// script(s) and render each in the generated pom
repositories {
project.repositories.each { repo ->
if (repo.name == 'MavenRepo') {
// do not include the Maven Central repository
return
}
repository {
id = repo.name
url = repo.repository
}
}
}
build {
plugins {
plugin {
Expand Down

0 comments on commit a31d9e7

Please sign in to comment.