Skip to content

Commit 6299519

Browse files
authored
Merge pull request #806 from tobias-johansson/maven-pom-fields
Extract pom config and set fields required by maven central
2 parents 9b5e7c4 + 4e804fd commit 6299519

File tree

1 file changed

+15
-31
lines changed

1 file changed

+15
-31
lines changed

build.publishing.gradle

Lines changed: 15 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,10 @@ subprojects {
2222

2323
publications {
2424

25-
dev(MavenPublication) {
26-
from components.java
27-
28-
afterEvaluate {
29-
artifacts = pub.dev.artifacts
30-
.findResults { tasks.findByName(it) }
31-
.findAll { it.enabled }
32-
}
33-
34-
pom {
25+
def pomConfig = {
26+
name = project.description
27+
description = project.description
28+
url = 'https://www.opencypher.org'
3529
licenses {
3630
license {
3731
name = 'Apache License, Version 2.0'
@@ -49,37 +43,27 @@ subprojects {
4943
scm {
5044
url = 'https://github.com/opencypher/cypher-for-apache-spark'
5145
}
46+
}
47+
48+
dev(MavenPublication) {
49+
from components.java
50+
51+
afterEvaluate {
52+
pom pomConfig
53+
artifacts = pub.dev.artifacts
54+
.findResults { tasks.findByName(it) }
55+
.findAll { it.enabled }
5256
}
5357
}
5458

5559
full(MavenPublication) {
5660
from components.java
5761

5862
afterEvaluate {
63+
pom pomConfig
5964
artifacts = pub.full.artifacts
6065
.findResults { tasks.findByName(it) }
6166
.findAll { it.enabled }
62-
63-
}
64-
65-
pom {
66-
licenses {
67-
license {
68-
name = 'Apache License, Version 2.0'
69-
url = 'http://www.apache.org/licenses/LICENSE-2.0'
70-
}
71-
}
72-
developers {
73-
developer {
74-
id = 'caps'
75-
name = 'The CAPS team'
76-
77-
url = 'https://www.opencypher.org'
78-
}
79-
}
80-
scm {
81-
url = 'https://github.com/opencypher/cypher-for-apache-spark'
82-
}
8367
}
8468
}
8569
}

0 commit comments

Comments
 (0)