@@ -12,6 +12,7 @@ buildscript {
12
12
apply plugin : ' ml-gradle'
13
13
apply plugin : ' java'
14
14
apply plugin : ' eclipse'
15
+ apply plugin : ' maven-publish'
15
16
apply plugin : ' maven'
16
17
17
18
@@ -46,7 +47,6 @@ sourceSets {
46
47
}
47
48
}
48
49
49
-
50
50
task javadocJar (type : Jar , dependsOn : javadoc) {
51
51
classifier = ' javadoc'
52
52
from javadoc. destinationDir
@@ -57,54 +57,69 @@ task sourcesJar(type: Jar, dependsOn: classes) {
57
57
from sourceSets. main. allSource
58
58
}
59
59
60
-
61
- artifacts {
62
- archives sourcesJar
63
- archives javadocJar
64
-
65
- }
66
-
67
60
javadoc {
68
61
options. overview = " src/main/java/com/marklogic/semantics/jena/overview.html"
69
62
}
70
63
71
- task createPom << {
72
- pom {
73
- project {
74
- name ' marklogic-jena'
75
- packaging ' jar'
76
- description ' Adapter for using MarkLogic with the Jena RDF Framework'
77
- url ' https://github.com/marklogic/marklogic-jena'
78
-
79
- scm {
80
- url
' [email protected] :marklogic/marklogic-jena.git'
81
- connection
' scm:[email protected] :marklogic/marklogic-jena.git'
82
- developerConnection
' scm:[email protected] :marklogic/marklogic-jena.git'
83
- }
84
-
85
- licenses {
86
- license {
87
- name ' The Apache Software License, Version 2.0'
88
- url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
89
- }
90
- }
64
+ Node pomCustomizations = new NodeBuilder (). project {
65
+ name ' marklogic-jena'
66
+ packaging ' jar'
67
+ textdescription ' Adapter for using MarkLogic with the jena RDF Framework'
68
+ url ' https://github.com/marklogic/marklogic-jena'
69
+
70
+ scm {
71
+ url
' [email protected] :marklogic/marklogic-jena.git'
72
+ connection
' scm:[email protected] :marklogic/marklogic-jena.git'
73
+ developerConnection
' scm:[email protected] :marklogic/marklogic-jena.git'
74
+ }
75
+
76
+ licenses {
77
+ license {
78
+ name ' The Apache Software License, Version 2.0'
79
+ url ' http://www.apache.org/licenses/LICENSE-2.0.txt'
80
+ }
81
+ }
91
82
92
- developers {
93
- developer {
94
- name ' MarkLogic'
95
-
96
- organization ' MarkLogic'
97
- organizationUrl ' https://www.marklogic.com'
98
- }
99
- developer {
100
- name ' MarkLogic Github Contributors'
101
-
102
- organization ' Github Contributors'
103
- organizationUrl ' https://github.com/marklogic/marklogic-jena/graphs/contributors'
104
- }
105
- }
83
+ developers {
84
+ developer {
85
+ name ' MarkLogic'
86
+
87
+ organization ' MarkLogic'
88
+ organizationUrl ' https://www.marklogic.com'
89
+ }
90
+ developer {
91
+ name ' MarkLogic Github Contributors'
92
+
93
+ organization ' Github Contributors'
94
+ organizationUrl ' https://github.com/marklogic/marklogic-jena/graphs/contributors'
95
+ }
106
96
}
107
- }. writeTo(" pom.xml" )
108
97
}
109
98
99
+ publishing {
100
+ publications {
101
+ mainJava(MavenPublication ) {
102
+ from components. java
103
+
104
+ pom. withXml {
105
+ asNode(). append(pomCustomizations. developers)
106
+ asNode(). append(pomCustomizations. name)
107
+ asNode(). append(pomCustomizations. packaging)
108
+ asNode(). append(pomCustomizations. url)
109
+ asNode(). append(pomCustomizations. scm)
110
+ asNode(). append(pomCustomizations. licenses)
111
+ asNode(). appendNode(" description" , pomCustomizations. textdescription. text)
112
+ }
113
+
114
+ artifact sourcesJar
115
+
116
+ artifact javadocJar
110
117
118
+ }
119
+ }
120
+ repositories {
121
+ maven {
122
+ url publishUrl
123
+ }
124
+ }
125
+ }
0 commit comments