Skip to content

Commit b9d15f1

Browse files
author
Charles Greer
committed
Maven publishing artifacts
1 parent ed8dc8d commit b9d15f1

File tree

2 files changed

+60
-44
lines changed

2 files changed

+60
-44
lines changed

marklogic-jena/build.gradle

Lines changed: 58 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ buildscript {
1212
apply plugin: 'ml-gradle'
1313
apply plugin: 'java'
1414
apply plugin: 'eclipse'
15+
apply plugin: 'maven-publish'
1516
apply plugin: 'maven'
1617

1718

@@ -46,7 +47,6 @@ sourceSets {
4647
}
4748
}
4849

49-
5050
task javadocJar(type: Jar, dependsOn: javadoc) {
5151
classifier = 'javadoc'
5252
from javadoc.destinationDir
@@ -57,54 +57,69 @@ task sourcesJar(type: Jar, dependsOn: classes) {
5757
from sourceSets.main.allSource
5858
}
5959

60-
61-
artifacts {
62-
archives sourcesJar
63-
archives javadocJar
64-
65-
}
66-
6760
javadoc {
6861
options.overview = "src/main/java/com/marklogic/semantics/jena/overview.html"
6962
}
7063

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+
}
9182

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+
}
10696
}
107-
}.writeTo("pom.xml")
10897
}
10998

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
110117

118+
}
119+
}
120+
repositories {
121+
maven {
122+
url publishUrl
123+
}
124+
}
125+
}

marklogic-jena/gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
group=com.marklogic
22
version=1.0.0
33

4+
publishUrl=file:../marklogic-java/releases
5+
46
mlConfigDir=marklogic-jena/src/test/ml-config
57
mlHost=localhost
68
mlUsername=admin
@@ -16,4 +18,3 @@ validPassword=x
1618
mlAppName=marklogic-jena-test
1719
mlRestPort=8922
1820

19-
jmhTestData=src/test/resources/testdata/test.owl

0 commit comments

Comments
 (0)