From 4e804fd9bdf769d794df3e037c59bbf8d3ef6358 Mon Sep 17 00:00:00 2001 From: Tobias Johansson Date: Thu, 14 Feb 2019 15:56:06 +0100 Subject: [PATCH] Extract pom config and set fields required my maven central --- build.publishing.gradle | 46 ++++++++++++++--------------------------- 1 file changed, 15 insertions(+), 31 deletions(-) diff --git a/build.publishing.gradle b/build.publishing.gradle index 8a5bfdfc0..7a344b730 100644 --- a/build.publishing.gradle +++ b/build.publishing.gradle @@ -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' @@ -49,6 +43,16 @@ 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 } } } @@ -56,30 +60,10 @@ subprojects { 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' - } } } }