Skip to content

Commit

Permalink
Extract pom config and set fields required my maven central
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-johansson committed Feb 14, 2019
1 parent 9b5e7c4 commit 4e804fd
Showing 1 changed file with 15 additions and 31 deletions.
46 changes: 15 additions & 31 deletions build.publishing.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,10 @@ subprojects {

publications {

dev(MavenPublication) {
from components.java

afterEvaluate {
artifacts = pub.dev.artifacts
.findResults { tasks.findByName(it) }
.findAll { it.enabled }
}

pom {
def pomConfig = {
name = project.description
description = project.description
url = 'https://www.opencypher.org'
licenses {
license {
name = 'Apache License, Version 2.0'
Expand All @@ -49,37 +43,27 @@ subprojects {
scm {
url = 'https://github.com/opencypher/cypher-for-apache-spark'
}
}

dev(MavenPublication) {
from components.java

afterEvaluate {
pom pomConfig
artifacts = pub.dev.artifacts
.findResults { tasks.findByName(it) }
.findAll { it.enabled }
}
}

full(MavenPublication) {
from components.java

afterEvaluate {
pom pomConfig
artifacts = pub.full.artifacts
.findResults { tasks.findByName(it) }
.findAll { it.enabled }

}

pom {
licenses {
license {
name = 'Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0'
}
}
developers {
developer {
id = 'caps'
name = 'The CAPS team'
email = 'opencypher@neo4j.com'
url = 'https://www.opencypher.org'
}
}
scm {
url = 'https://github.com/opencypher/cypher-for-apache-spark'
}
}
}
}
Expand Down

0 comments on commit 4e804fd

Please sign in to comment.