projects/guix·blob graal · refs

744 lines · 28.9 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2017, 2021, 2023 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2017, 2018, 2021 Julien Lepiller <[email protected]>
4;;; Copyright © 2018 Gábor Boskovits <[email protected]>
5;;; Copyright © 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
6;;; Copyright © 2020 Vincent Legoll <[email protected]>
7;;; Copyright © 2021 Léo Le Bouter <[email protected]>
8;;; Copyright © 2022 Christopher Baines <[email protected]>
9;;; Copyright © 2023 Frank Pursel <[email protected]>
10;;;
11;;; This file is part of GNU Guix.
12;;;
13;;; GNU Guix is free software; you can redistribute it and/or modify it
14;;; under the terms of the GNU General Public License as published by
15;;; the Free Software Foundation; either version 3 of the License, or (at
16;;; your option) any later version.
17;;;
18;;; GNU Guix is distributed in the hope that it will be useful, but
19;;; WITHOUT ANY WARRANTY; without even the implied warranty of
20;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21;;; GNU General Public License for more details.
22;;;
23;;; You should have received a copy of the GNU General Public License
24;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
25
26(define-module (gnu packages java-xml)
27 #:use-module (gnu packages)
28 #:use-module (gnu packages base)
29 #:use-module (gnu packages check)
30 #:use-module (gnu packages compression)
31 #:use-module (gnu packages gtk)
32 #:use-module (gnu packages java)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix gexp)
35 #:use-module (guix packages)
36 #:use-module (guix bzr-download)
37 #:use-module (guix download)
38 #:use-module (guix git-download)
39 #:use-module (guix build-system ant)
40 #:use-module (guix utils))
41
42(define-public java-jericho-html
43 (package
44 (name "java-jericho-html")
45 (version "3.4")
46 (source (origin
47 (method bzr-fetch)
48 (uri (bzr-reference (url (string-append
49 "http://jerichohtml.bzr.sourceforge.net/"
50 "bzr/jerichohtml"))
51 (revision (string-append "tag:" version))))
52 (file-name (string-append name "-" version "-checkout"))
53 (sha256
54 (base32
55 "1zsf4i33jn05pma4y1658d6avhw7x4c12ggs96szhc06b7bxs8j0"))
56 (modules '((guix build utils)))
57 (snippet '(begin
58 (format #t "~%~a~%" "Removing sourced jar files.")
59 (for-each (lambda (jarf)
60 (delete-file jarf)
61 (format #t "Deleted: ~a~%" jarf))
62 (find-files "." "\\.jar$"))))))
63 (build-system ant-build-system)
64 (arguments
65 `(#:jar-name (string-append ,name ".jar")
66 #:phases (modify-phases %standard-phases
67 (add-before 'build 'add-ant-env-options
68 (lambda* _
69 (setenv "ANT_OPTS" "-Dfile.encoding=iso-8859-1")
70 (let ((match-str (string-append "jerichohtml-"
71 ,version)))
72 (substitute* "build.xml"
73 ((match-str)
74 "")))))
75 (add-after 'build 'check-prep
76 (lambda* (#:key source #:allow-other-keys)
77 (mkdir-p "src/test/java"))))))
78 (native-inputs (list
79 java-commons-logging-minimal
80 java-junit
81 java-log4j-api
82 java-slf4j-api))
83 (home-page "http://jericho.htmlparser.net/docs/index.html")
84 (synopsis "Java HTML Parser library")
85 (description
86 "This Java library allowing analysis and manipulation of
87parts of an HTML document, including server-side tags, while
88reproducing verbatim any unrecognised or invalid HTML. It also
89provides high-level HTML form manipulation functions.")
90 (license (list license:lgpl2.1+ license:asl2.0 license:epl1.0))))
91
92(define-public java-simple-xml
93 (package
94 (name "java-simple-xml")
95 (version "2.7.1")
96 (source (origin
97 (method url-fetch)
98 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
99 version ".zip"))
100 (sha256
101 (base32
102 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
103 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
104 (build-system ant-build-system)
105 (arguments
106 `(#:build-target "build"
107 #:test-target "test"
108 #:phases
109 (modify-phases %standard-phases
110 (replace 'install (install-jars "jar"))
111 (add-before 'check 'disable-failing-test
112 (lambda _
113 ;; This test sometimes fails with an out of memory exception
114 (delete-file
115 "test/src/org/simpleframework/xml/core/NoAnnotationsRequiredTest.java"))))))
116 (native-inputs
117 (list unzip))
118 (home-page "https://simple.sourceforge.net/")
119 (synopsis "XML serialization framework for Java")
120 (description "Simple is a high performance XML serialization and
121configuration framework for Java. Its goal is to provide an XML framework
122that enables rapid development of XML configuration and communication systems.
123This framework aids the development of XML systems with minimal effort and
124reduced errors. It offers full object serialization and deserialization,
125maintaining each reference encountered.")
126 (license license:asl2.0)))
127
128;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
129;; xml-apis.jar and xml-apis-1.4.01.jar.
130(define-public java-jaxp
131 (package
132 (name "java-jaxp")
133 (version "1.4.01")
134 (source
135 (origin
136 (method url-fetch)
137 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
138 "xml-commons-external-" version "-src.tar.gz"))
139 (sha256
140 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
141 (build-system ant-build-system)
142 (arguments
143 `(#:jar-name "jaxp.jar"
144 #:jdk ,icedtea-8
145 #:source-dir ".."
146 #:tests? #f)); no tests
147 (home-page "https://xerces.apache.org/xml-commons/")
148 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
149 (description "Jaxp from the Apache XML Commons project is used by
150the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
151
152@itemize
153@item Document Object Model (DOM)
154@item Simple API for XML (SAX)
155@item Java APIs for XML Processing (JAXP)
156@item Transformation API for XML (TrAX)
157@item Document Object Model (DOM) Load and Save
158@item JSR 206 Java API for XML Processing
159@end itemize")
160 (license (list license:asl2.0
161 license:w3c ;; Files under org.w3c
162 license:public-domain)))) ;; org.xml.sax
163
164(define-public java-apache-xml-commons-resolver
165 (package
166 (name "java-apache-xml-commons-resolver")
167 (version "1.2")
168 (source
169 (origin
170 (method url-fetch)
171 (uri (string-append "mirror://apache/xerces/xml-commons/"
172 "xml-commons-resolver-" version ".tar.gz"))
173 (sha256
174 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
175 (modules '((guix build utils)))
176 (snippet
177 '(begin
178 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
179 #t))))
180 (build-system ant-build-system)
181 (arguments
182 `(#:jar-name (string-append "xml-resolver.jar")
183 #:tests? #f)); no tests
184 (inputs
185 (list java-junit))
186 (home-page "https://xerces.apache.org/xml-commons/")
187 (synopsis "Catalog-based entity and URI resolution")
188 (description "The resolver class implements the full semantics of OASIS Technical
189Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1902001 Committee Specification of OASIS XML Catalogs.
191
192It also includes a framework of classes designed to read catalog files
193in a number of formats:
194
195@itemize
196@item The plain-text flavor described by TR9401.
197@item The XCatalog XML format defined by John Cowan
198@item The XML Catalog format defined by the OASIS Entity Resolution
199 Technical Committee.
200@end itemize")
201 (license license:asl2.0)))
202
203;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
204;; This package is a bootstrap version without dependencies on dom4j and xom.
205(define java-jaxen-bootstrap
206 (package
207 (name "java-jaxen-bootstrap")
208 (version "1.1.6")
209 (source (origin
210 (method url-fetch)
211 ;; No release on github
212 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
213 version "/jaxen-" version "-sources.jar"))
214 (sha256
215 (base32
216 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
217 (build-system ant-build-system)
218 (arguments
219 `(#:jar-name "jaxen.jar"
220 #:source-dir "src"
221 #:tests? #f; no tests
222 #:phases
223 (modify-phases %standard-phases
224 (add-before 'build 'remove-dom4j
225 (lambda _
226 (delete-file-recursively "src/org/jaxen/dom4j")
227 (delete-file-recursively "src/org/jaxen/xom")
228 #t)))))
229 (inputs
230 `(("java-jdom" ,java-jdom)))
231 (home-page "https://github.com/jaxen-xpath/jaxen")
232 (synopsis "XPath library")
233 (description "Jaxen is an XPath library written in Java. It is adaptable
234to many different object models, including DOM, XOM, dom4j, and JDOM. It is
235also possible to write adapters that treat non-XML trees such as compiled
236Java byte code or Java beans as XML, thus enabling you to query these trees
237with XPath too.")
238 (license license:bsd-3)))
239
240(define-public java-jaxen
241 (package
242 (inherit java-jaxen-bootstrap)
243 (name "java-jaxen")
244 (arguments
245 (strip-keyword-arguments
246 '(#:phases) ;; remove any phases added by java-jaxen-bootstrap
247 (package-arguments java-jaxen-bootstrap)))
248 (inputs
249 (list java-jdom java-xom java-dom4j))))
250
251(define-public java-xom
252 (package
253 (name "java-xom")
254 (version "127")
255 (source (origin
256 (method git-fetch)
257 (uri (git-reference
258 (url "https://github.com/elharo/xom")
259 (commit (string-append "XOM_" version))))
260 (file-name (git-file-name name version))
261 (sha256
262 (base32
263 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
264 (modules '((guix build utils)))
265 (snippet
266 '(begin
267 (for-each delete-file
268 (find-files "." "\\.jar$"))
269 #t))))
270 (build-system ant-build-system)
271 (arguments
272 `(#:jar-name "xom.jar"
273 #:jdk ,icedtea-8
274 #:tests? #f ; no tests
275 #:phases
276 (modify-phases %standard-phases
277 (add-after 'unpack 'make-git-checkout-writable
278 (lambda _
279 (for-each make-file-writable (find-files "."))
280 #t))
281 (add-before 'configure 'fix-tagsoup-dep
282 (lambda _
283 ;; FIXME: Where is tagsoup source?
284 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
285 #t)))))
286 (inputs
287 (list java-jdom java-junit java-classpathx-servletapi
288 java-jaxen-bootstrap java-xerces))
289 (home-page "https://xom.nu/")
290 (synopsis "XML Object Model")
291 (description "XOM is a new XML Object Model for processing XML with Java
292that strives for correctness and simplicity.")
293 ;; 2.1 only
294 (license license:lgpl2.1)))
295
296(define-public java-xsdlib
297 (package
298 (name "java-xsdlib")
299 (version "2013.2")
300 (source (origin
301 (method url-fetch)
302 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
303 "datatype/xsd/xsdlib/" version "/xsdlib-"
304 version "-sources.jar"))
305 (sha256
306 (base32
307 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
308 (build-system ant-build-system)
309 (arguments
310 `(#:tests? #f; no tests
311 #:jar-name "xsdlib.jar"
312 #:jdk ,icedtea-8))
313 (inputs
314 (list java-xerces))
315 (home-page (string-append "https://web.archive.org/web/20161127144537/"
316 "https://msv.java.net//"))
317 (synopsis "Sun Multi-Schema Validator")
318 (description "Xsdlib contains an implementation of sun.com.msv, an XML
319validator.")
320 (license license:bsd-2)))
321
322(define-public java-xpp3
323 (package
324 (name "java-xpp3")
325 (version "1.1.4")
326 (source (origin
327 (method url-fetch)
328 (uri (string-append
329 "https://ci.guix.gnu.org/file/"
330 "xpp3-1.1.4_src.tgz"
331 "/sha256/"
332 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
333 (file-name (string-append name "-" version "_src.tgz"))
334 (sha256
335 (base32
336 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
337 (modules '((guix build utils)))
338 (snippet
339 '(begin ;; Delete bundled jar archives.
340 (for-each delete-file (find-files "." ".*\\.jar"))
341 #t))))
342 (build-system ant-build-system)
343 (arguments
344 `(#:tests? #f; no tests
345 #:build-target "jar"
346 #:phases
347 (modify-phases %standard-phases
348 (replace 'install (install-jars "build")))))
349 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
350 (synopsis "Streaming pull XML parser")
351 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
352parser and should be used when there is a need to process quickly and
353efficiently all input elements (for example in SOAP processors). This
354package is a stable XmlPull parsing engine that is based on ideas from XPP
355and in particular XPP2 but completely revised and rewritten to take the best
356advantage of JIT JVMs.")
357 (license (license:non-copyleft "file://LICENSE.txt"))))
358
359(define-public java-xmlpull2
360 (package
361 (name "java-xmlpull2")
362 (version "2.1.10")
363 (source (origin
364 (method url-fetch)
365 ;; Unfortunately, archive.org does not have a copy of this file.
366 (uri (string-append "https://ftp.fau.de/gentoo/distfiles/"
367 "PullParser" version ".tgz"))
368 (sha256
369 (base32
370 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
371 (modules '((guix build utils)))
372 (snippet
373 '(begin ;; Delete bundled jar archives.
374 (for-each delete-file (find-files "." ".*\\.jar"))
375 #t))))
376 (build-system ant-build-system)
377 (arguments
378 `(#:tests? #f; no tests
379 #:build-target "impl"
380 #:phases
381 (modify-phases %standard-phases
382 (replace 'install (install-jars "build/lib")))))
383 (home-page (string-append "https://web.archive.org/web/20210225153105/"
384 "https://www.extreme.indiana.edu/"))
385 (synopsis "Streaming pull XML parser")
386 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
387parser and should be used when there is a need to process quickly and
388efficiently all input elements (for example in SOAP processors). This
389package is in maintenance mode.")
390 (license (license:non-copyleft "file:///LICENSE.txt"))))
391
392(define-public java-xmlpull-api-v1
393 (package
394 (name "java-xmlpull-api-v1")
395 (version "1.1.3.4b")
396 (source (origin
397 ;; The package is originally from Extreme! Lab, but the website
398 ;; is now gone. This repositories contains the sources of the
399 ;; latest version.
400 (method git-fetch)
401 (uri (git-reference
402 (url "https://github.com/aslom/xmlpull-api-v1")
403 ;; No releases, this is the latest commit
404 (commit "abeaa4aa87b2625af70c32f658f44e11355fe568")))
405 (file-name (git-file-name name version))
406 (sha256
407 (base32
408 "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih"))
409 (modules '((guix build utils)))
410 (snippet
411 `(begin
412 (delete-file-recursively "lib")
413 (mkdir-p "lib")
414 ;; prevents a failure in "dist_lite"
415 (substitute* "build.xml"
416 (("README.html") "README.md"))))))
417 (build-system ant-build-system)
418 (arguments
419 `(#:test-target "junit"
420 #:build-target "dist"
421 #:phases
422 (modify-phases %standard-phases
423 (replace 'install
424 (lambda* (#:key outputs #:allow-other-keys)
425 (let* ((out (assoc-ref outputs "out"))
426 (doc (string-append out "/share/doc/" ,name "-" ,version))
427 (java (string-append out "/share/java"))
428 (project (string-append
429 "xmlpull_"
430 ,(string-join (string-split version #\.) "_"))))
431 (mkdir-p doc)
432 (copy-recursively (string-append "build/dist/" project "/doc/")
433 doc)
434 (mkdir-p java)
435 (copy-file (string-append "build/dist/" project "/" project ".jar")
436 (string-append java "/" project ".jar")))
437 )))))
438 (home-page "https://github.com/aslom/xmlpull-api-v1")
439 (synopsis "XML pull parsing API")
440 (description "XmlPull v1 API is a simple to use XML pull parsing API. XML
441pull parsing allows incremental (sometimes called streaming) parsing of XML
442where application is in control - the parsing can be interrupted at any given
443moment and resumed when application is ready to consume more input.")
444 (license license:public-domain)))
445
446(define-public java-dom4j
447 (package
448 (name "java-dom4j")
449 (version "2.1.1")
450 (source (origin
451 (method git-fetch)
452 (uri (git-reference
453 (url "https://github.com/dom4j/dom4j")
454 (commit (string-append "version-" version))))
455 (file-name (git-file-name name version))
456 (sha256
457 (base32
458 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
459 (modules '((guix build utils)))
460 (snippet
461 '(begin ;; Delete bundled jar archives.
462 (for-each delete-file (find-files "." ".*\\.jar"))
463 #t))))
464 (build-system ant-build-system)
465 (arguments
466 `(#:jar-name "dom4j.jar"
467 #:jdk ,icedtea-8
468 #:source-dir "src/main/java"
469 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
470 ;; dependency on itself through jflex.
471 #:tests? #f
472 #:phases
473 (modify-phases %standard-phases
474 (add-before 'build 'copy-jaxen-sources
475 ;; java-jaxen-bootstrap is not enough. These files have a circular
476 ;; dependency and there is no subset of dom4j that would allow
477 ;; breaking the circle.
478 (lambda* (#:key inputs #:allow-other-keys)
479 (mkdir-p "jaxen-sources")
480 (with-directory-excursion "jaxen-sources"
481 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
482 (mkdir-p "src/main/java/org/jaxen/dom4j")
483 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
484 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
485 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
486 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
487 #t))
488 (add-before 'build 'fix-old-xpp2
489 (lambda _
490 ;; This package normally depends on xpp2 2.0, but version 2.1.10
491 ;; is the only version whose source code is published.
492 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
493 (("public void resetStartTag")
494 "public boolean removeAttributeByRawName(String name) {\n
495 return false;\n
496}\n
497public boolean removeAttributeByName(String name, String name2) {\n
498 return false;\n
499}\n\npublic void resetStartTag")
500 (("Atttribute") "Attribute"))
501 #t)))))
502 (inputs
503 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
504 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
505 ("java-xmlpull2" ,java-xmlpull2)
506 ("java-xpp3" ,java-xpp3)
507 ("java-xsdlib" ,java-xsdlib)))
508 (native-inputs
509 (list java-testng java-xerces))
510 (home-page "https://dom4j.github.io/")
511 (synopsis "Flexible XML framework for Java")
512 (description "Dom4j is a flexible XML framework for Java. DOM4J works
513with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
514low memory footprint.")
515 ;; some BSD-like 5-clause license
516 (license (license:non-copyleft "file://LICENSE"))))
517
518(define-public java-kxml2
519 (package
520 (name "java-kxml2")
521 (version "2.4.2")
522 (source (origin
523 (method git-fetch)
524 (uri (git-reference
525 (url "https://github.com/stefanhaustein/kxml2")
526 (commit (string-append "v" version))))
527 (file-name (git-file-name name version))
528 (sha256
529 (base32
530 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
531 (build-system ant-build-system)
532 (arguments
533 `(#:jar-name "kxml2.jar"
534 #:source-dir "src/main/java"
535 #:test-include (list "TestWb.java")
536 ;; Test failure: it was expected to get an XML entity but got the
537 ;; equivalent Unicode character instead.
538 #:tests? #f
539 #:phases
540 (modify-phases %standard-phases
541 (add-after 'unpack 'make-git-checkout-writable
542 (lambda _
543 (for-each make-file-writable (find-files "."))
544 #t))
545 (add-before 'build 'copy-resources
546 (lambda _
547 (copy-recursively "src/main/resources" "build/classes")
548 #t)))))
549 (inputs
550 (list java-xpp3))
551 (native-inputs
552 (list java-junit))
553 (home-page "http://kxml.org")
554 (synopsis "XML pull parser")
555 (description "kXML is a small XML pull parser, specially designed for
556constrained environments such as Applets, Personal Java or devices compliant
557with the Mobile Information Device Profile (MIDP).")
558 (license license:expat)))
559
560(define-public java-stax
561 (package
562 (name "java-stax")
563 (version "1.2.0")
564 (source (origin
565 (method url-fetch)
566 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
567 version "/stax-" version "-sources.jar"))
568 (sha256
569 (base32
570 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
571 (build-system ant-build-system)
572 (arguments
573 `(#:jar-name "stax.jar"
574 #:tests? #f; no tests
575 #:phases
576 (modify-phases %standard-phases
577 (add-before 'configure 'fix-utf8
578 (lambda _
579 ;; This file is ISO-8859-1 but java expects UTF-8.
580 ;; Remove special characters in comments.
581 (with-fluids ((%default-port-encoding "ISO-8859-1"))
582 (substitute* "src/com/wutka/dtd/Scanner.java"
583 (("//.*") "\n")))
584 #t)))))
585 (home-page "https://repo1.maven.org/maven2/stax/stax/")
586 (synopsis "Streaming API for XML")
587 (description "This package provides the reference implementation of the
588@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
589and from a Java application. It provides a standard pull parser interface.")
590 (license license:asl2.0)))
591
592(define-public java-jettison
593 (package
594 (name "java-jettison")
595 (version "1.3.7")
596 (source (origin
597 (method git-fetch)
598 (uri (git-reference
599 (url "https://github.com/codehaus/jettison")
600 (commit (string-append "jettison-" version))))
601 (file-name (git-file-name name version))
602 (sha256
603 (base32
604 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
605 (build-system ant-build-system)
606 (arguments
607 `(#:jar-name "jettison.jar"
608 #:source-dir "src/main/java"
609 #:test-exclude (list "**/Abstract*.java"
610 ;; Abstract classes
611 "**/DOMTest.java"
612 "**/BadgerFishDOMTest.java"
613 "**/MappedDOMTest.java")))
614 (native-inputs
615 (list java-junit))
616 (home-page "https://github.com/codehaus/jettison")
617 (synopsis "StAX implementation for JSON")
618 (description "Jettison is a Java library for converting XML to JSON and
619vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
620implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
621@code{Mapped} and @code{BadgerFish} conventions.")
622 (license license:asl2.0)))
623
624(define-public java-jdom2
625 (package
626 (name "java-jdom")
627 (version "2.0.6.1")
628 (source (origin
629 (method git-fetch)
630 (uri (git-reference
631 (url "https://github.com/hunterhacker/jdom")
632 (commit (string-append "JDOM-" version))))
633 (file-name (git-file-name name version))
634 (sha256
635 (base32
636 "1r4pwl0z7hm45v9l2wbq3fjmqi13zmwzbrggyqizrwv31kghhx56"))))
637 (build-system ant-build-system)
638 (arguments
639 `(#:build-target "package"
640 #:tests? #f ; tests are run as part of the build process
641 #:phases
642 (modify-phases %standard-phases
643 (replace 'install
644 (install-jars "build")))))
645 (home-page "http://jdom.org/")
646 (synopsis "Access, manipulate, and output XML data")
647 (description "Jdom is a Java-based solution for accessing, manipulating, and
648outputting XML data from Java code.")
649 (license license:bsd-4)))
650
651(define-public java-xstream
652 (package
653 (name "java-xstream")
654 (version "1.4.16")
655 (source
656 (origin
657 (method git-fetch)
658 (uri (git-reference
659 (url "https://github.com/x-stream/xstream")
660 (commit (string-append
661 "XSTREAM_"
662 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
663 version)))))
664 (file-name (git-file-name name version))
665 (sha256
666 (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755"))))
667 (build-system ant-build-system)
668 (arguments
669 `(#:jar-name "xstream.jar"
670 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
671 #:tests? #f
672 #:jdk ,icedtea-8
673 #:source-dir "xstream/src/java"))
674 (inputs
675 `(("java-jdom" ,java-jdom)
676 ("java-jdom2" ,java-jdom2)
677 ("java-cglib" ,java-cglib)
678 ("java-joda-time" ,java-joda-time)
679 ("java-jettison" ,java-jettison)
680 ("java-xom" ,java-xom)
681 ("java-mxparser" ,java-mxparser)
682 ("java-xpp3" ,java-xpp3)
683 ("java-dom4j" ,java-dom4j)
684 ("java-stax2-api" ,java-stax2-api)
685 ("java-woodstox-core" ,java-woodstox-core)
686 ("java-kxml2" ,java-kxml2)
687 ("java-stax" ,java-stax)))
688 (home-page "https://x-stream.github.io")
689 (synopsis "XML serialization library")
690 (description "XStream is a simple library to serialize Java objects to XML
691and back again.")
692 (license license:bsd-3)))
693
694(define-public java-mxparser
695 (package
696 (name "java-mxparser")
697 (version "1.2.1")
698 (source
699 (origin
700 (method git-fetch)
701 (uri (git-reference
702 (url "https://github.com/x-stream/mxparser")
703 (commit (string-append "v-" version))))
704 (file-name (git-file-name name version))
705 (sha256
706 (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb"))))
707 (build-system ant-build-system)
708 (arguments
709 `(#:jar-name "mxparser.jar"
710 #:source-dir "src/main/java"
711 #:test-dir "src/test"
712 #:phases
713 (modify-phases %standard-phases
714 (add-before 'build 'copy-resources
715 (lambda _
716 (copy-recursively "src/main/resources" "build/classes")
717 #t)))))
718 (propagated-inputs
719 (list java-xmlpull-api-v1))
720 (native-inputs
721 (list java-junit))
722 (home-page "https://github.com/x-stream/mxparser")
723 (synopsis "Streaming pull XML parser forked from @code{java-xpp3}")
724 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
725parser and should be used when there is a need to process quickly and
726efficiently all input elements (for example in SOAP processors). This
727package is a stable XmlPull parsing engine that is based on ideas from XPP
728and in particular XPP2 but completely revised and rewritten to take the best
729advantage of JIT JVMs.
730
731MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged
732changes of the Plexus fork. It is an implementation of the XMLPULL V1 API
733(parser only).")
734 (license (license:non-copyleft "file://LICENSE.txt"))))
735
736
737
738
739
740
741
742
743
744