Skip to content

Commit 05eb906

Browse files
author
ehennum
committed
remove build dependency on XOM #997
1 parent 80fc33f commit 05eb906

File tree

2 files changed

+33
-9
lines changed

2 files changed

+33
-9
lines changed

marklogic-client-api/build.gradle

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,39 @@ dependencies {
2222
testCompile group: 'ch.qos.logback', name: 'logback-classic', version:'1.2.3'
2323
testCompile group: 'org.hsqldb', name: 'hsqldb', version:'2.4.0'
2424
compileOnly group: 'org.jdom', name: 'jdom2', version:'2.0.6'
25-
compileOnly group: 'com.io7m.xom', name: 'xom', version: '1.2.10'
2625
compileOnly group: 'dom4j', name: 'dom4j', version:'1.6.1'
2726
compileOnly group: 'com.google.code.gson', name: 'gson', version:'2.8.2'
2827
compileOnly group: 'net.sourceforge.htmlcleaner', name: 'htmlcleaner', version:'2.21'
2928
compileOnly group: 'com.opencsv', name: 'opencsv', version: '4.1'
3029
compileOnly group: 'org.geonames', name: 'geonames', version:'1.0'
3130
compileOnly group: 'org.springframework', name: 'spring-jdbc', version: '5.0.4.RELEASE'
32-
31+
// uncomment to build XOMHandle
32+
// compileOnly group: 'com.io7m.xom', name: 'xom', version: '1.2.10'
33+
}
34+
35+
// comment the exclusion to build XOMHandle
36+
compileJava {
37+
exclude (
38+
'com/marklogic/client/extra/xom/**',
39+
'com/marklogic/client/example/handle/XOMHandleExample.java'
40+
)
41+
}
42+
43+
// comment the exclusion to test XOMHandle
44+
compileTestJava {
45+
exclude (
46+
'com/marklogic/client/test/extra/XOMHandleTest.java'
47+
)
3348
}
3449

3550
jar {
36-
exclude ('search.xsd','search-bindings.xjb','query-options-template.xml',
37-
'com/marklogic/client/example/**', 'data/**', 'Example' +
38-
'.properties', 'example/**', 'scripts/**', '*.txt', 'property' +
39-
'.xsd', 'restapi-bindings.xjb', 'security.xsd')
51+
exclude (
52+
'search.xsd', 'search-bindings.xjb', 'query-options-template.xml',
53+
'com/marklogic/client/example/**', 'data/**', 'Example.properties',
54+
'example/**', 'scripts/**', '*.txt', 'property.xsd',
55+
'restapi-bindings.xjb', 'security.xsd',
56+
'com/marklogic/client/extra/xom/**'
57+
)
4058
}
4159
task sourcesJar(type: Jar) {
4260
classifier = 'sources'
@@ -53,7 +71,11 @@ javadoc {
5371
options.bottom = "Copyright © 2013-2018 MarkLogic Corporation."
5472
options.links = [ 'http://docs.oracle.com/javase/8/docs/api/' ]
5573
options.use = true
56-
exclude(['**/impl/**', '**/jaxb/**', '**/test/**'])
74+
exclude([
75+
'**/impl/**', '**/jaxb/**', '**/test/**',
76+
'com/marklogic/client/extra/xom/**',
77+
'com/marklogic/client/example/handle/XOMHandleExample.java'
78+
])
5779
}
5880

5981
task javadocJar (type: Jar, dependsOn: javadoc) {

marklogic-client-api/src/test/java/com/marklogic/client/test/ClosingHandlesTest.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
import com.marklogic.client.extra.dom4j.DOM4JHandle;
2929
import com.marklogic.client.extra.gson.GSONHandle;
3030
import com.marklogic.client.extra.jdom.JDOMHandle;
31-
import com.marklogic.client.extra.xom.XOMHandle;
31+
// NOTE: uncomment to test XOMHandle
32+
// import com.marklogic.client.extra.xom.XOMHandle;
3233
import com.marklogic.client.impl.HandleAccessor;
3334
import com.marklogic.client.io.DOMHandle;
3435
import com.marklogic.client.io.DocumentMetadataHandle;
@@ -98,7 +99,8 @@ public void closeHandles() throws Exception {
9899
new ValuesListHandle(), "<values-list xmlns='http://marklogic.com/rest-api'/>");
99100
validateClosingHandleClosesUnderlyingStream(new XMLEventReaderHandle(), "<xml/>");
100101
validateClosingHandleClosesUnderlyingStream(new XMLStreamReaderHandle(), "<xml/>");
101-
validateClosingHandleClosesUnderlyingStream(new XOMHandle(), "<xml/>");
102+
// NOTE: uncomment to test XOMHandle
103+
// validateClosingHandleClosesUnderlyingStream(new XOMHandle(), "<xml/>");
102104
}
103105

104106
private void validateClosingHandleClosesUnderlyingStream(AbstractReadHandle handle, String content)

0 commit comments

Comments
 (0)