@@ -11,24 +11,33 @@ publishing {
1111 rhino(MavenPublication ) {
1212 from components. java
1313 artifacts = [jar, sourceJar, javadocJar]
14- pom {
15- description = " Rhino JavaScript runtime jar, excludes XML, tools ScriptEngine wrapper"
16- url = " https://mozilla.github.io/rhino/"
17- licenses {
18- license {
19- name = " Mozilla Public License, Version 2.0"
20- url = " http://www.mozilla.org/MPL/2.0/index.txt"
21- }
22- }
23- scm {
24- connection = " scm:git:git@github.com:mozilla/rhino.git"
25- developerConnection = " scm:git:git@github.com:mozilla/rhino.git"
26- url = " git@github.com:mozilla/rhino.git"
27- }
28- organization {
29- name = " The Mozilla Foundation"
30- url = " http://www.mozilla.org"
31- }
14+ // We need to use the "withXml" method here, rather than the
15+ // "pom" element in Gradle, because we can't add the "parent"
16+ // attribute otherwise, and without it Maven Central verification
17+ // will fail.
18+ pom. withXml {
19+ def root = asNode()
20+
21+ root. appendNode(' description' , " Rhino JavaScript runtime jar, excludes XML, tools, and ScriptEngine wrapper" )
22+ root. appendNode(" url" , " https://mozilla.github.io/rhino/" )
23+
24+ def p = root. appendNode(" parent" )
25+ p. appendNode(" groupId" , " org.sonatype.oss" )
26+ p. appendNode(" artifactId" , " oss-parent" )
27+ p. appendNode(" version" , " 7" )
28+
29+ def l = root. appendNode(" licenses" ). appendNode(" license" )
30+ l. appendNode(" name" , " Mozilla Public License, Version 2.0" )
31+ l. appendNode(" url" , " http://www.mozilla.org/MPL/2.0/index.txt" )
32+
33+ def scm = root. appendNode(" scm" )
34+ scm. appendNode(" connection" , " scm:git:git@github.com:mozilla/rhino.git" )
35+ scm. appendNode(" developerConnection" , " scm:git:git@github.com:mozilla/rhino.git" )
36+ scm. appendNode(" url" , " git@github.com:mozilla/rhino.git" )
37+
38+ def o = root. appendNode(" organization" )
39+ o. appendNode(" name" , " The Mozilla Foundation" )
40+ o. appendNode(" url" , " http://www.mozilla.org" )
3241 }
3342 }
3443 }
0 commit comments