projects/guix·blob wip-postfix · refs

740 lines · 28.7 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 (inputs
245 (list java-jdom java-xom java-dom4j))))
246
247(define-public java-xom
248 (package
249 (name "java-xom")
250 (version "127")
251 (source (origin
252 (method git-fetch)
253 (uri (git-reference
254 (url "https://github.com/elharo/xom")
255 (commit (string-append "XOM_" version))))
256 (file-name (git-file-name name version))
257 (sha256
258 (base32
259 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
260 (modules '((guix build utils)))
261 (snippet
262 '(begin
263 (for-each delete-file
264 (find-files "." "\\.jar$"))
265 #t))))
266 (build-system ant-build-system)
267 (arguments
268 `(#:jar-name "xom.jar"
269 #:jdk ,icedtea-8
270 #:tests? #f ; no tests
271 #:phases
272 (modify-phases %standard-phases
273 (add-after 'unpack 'make-git-checkout-writable
274 (lambda _
275 (for-each make-file-writable (find-files "."))
276 #t))
277 (add-before 'configure 'fix-tagsoup-dep
278 (lambda _
279 ;; FIXME: Where is tagsoup source?
280 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
281 #t)))))
282 (inputs
283 (list java-jdom java-junit java-classpathx-servletapi
284 java-jaxen-bootstrap java-xerces))
285 (home-page "https://xom.nu/")
286 (synopsis "XML Object Model")
287 (description "XOM is a new XML Object Model for processing XML with Java
288that strives for correctness and simplicity.")
289 ;; 2.1 only
290 (license license:lgpl2.1)))
291
292(define-public java-xsdlib
293 (package
294 (name "java-xsdlib")
295 (version "2013.2")
296 (source (origin
297 (method url-fetch)
298 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
299 "datatype/xsd/xsdlib/" version "/xsdlib-"
300 version "-sources.jar"))
301 (sha256
302 (base32
303 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
304 (build-system ant-build-system)
305 (arguments
306 `(#:tests? #f; no tests
307 #:jar-name "xsdlib.jar"
308 #:jdk ,icedtea-8))
309 (inputs
310 (list java-xerces))
311 (home-page (string-append "https://web.archive.org/web/20161127144537/"
312 "https://msv.java.net//"))
313 (synopsis "Sun Multi-Schema Validator")
314 (description "Xsdlib contains an implementation of sun.com.msv, an XML
315validator.")
316 (license license:bsd-2)))
317
318(define-public java-xpp3
319 (package
320 (name "java-xpp3")
321 (version "1.1.4")
322 (source (origin
323 (method url-fetch)
324 (uri (string-append
325 "https://ci.guix.gnu.org/file/"
326 "xpp3-1.1.4_src.tgz"
327 "/sha256/"
328 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
329 (file-name (string-append name "-" version "_src.tgz"))
330 (sha256
331 (base32
332 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
333 (modules '((guix build utils)))
334 (snippet
335 '(begin ;; Delete bundled jar archives.
336 (for-each delete-file (find-files "." ".*\\.jar"))
337 #t))))
338 (build-system ant-build-system)
339 (arguments
340 `(#:tests? #f; no tests
341 #:build-target "jar"
342 #:phases
343 (modify-phases %standard-phases
344 (replace 'install (install-jars "build")))))
345 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
346 (synopsis "Streaming pull XML parser")
347 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
348parser and should be used when there is a need to process quickly and
349efficiently all input elements (for example in SOAP processors). This
350package is a stable XmlPull parsing engine that is based on ideas from XPP
351and in particular XPP2 but completely revised and rewritten to take the best
352advantage of JIT JVMs.")
353 (license (license:non-copyleft "file://LICENSE.txt"))))
354
355(define-public java-xmlpull2
356 (package
357 (name "java-xmlpull2")
358 (version "2.1.10")
359 (source (origin
360 (method url-fetch)
361 ;; Unfortunately, archive.org does not have a copy of this file.
362 (uri (string-append "https://ftp.fau.de/gentoo/distfiles/"
363 "PullParser" version ".tgz"))
364 (sha256
365 (base32
366 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
367 (modules '((guix build utils)))
368 (snippet
369 '(begin ;; Delete bundled jar archives.
370 (for-each delete-file (find-files "." ".*\\.jar"))
371 #t))))
372 (build-system ant-build-system)
373 (arguments
374 `(#:tests? #f; no tests
375 #:build-target "impl"
376 #:phases
377 (modify-phases %standard-phases
378 (replace 'install (install-jars "build/lib")))))
379 (home-page (string-append "https://web.archive.org/web/20210225153105/"
380 "https://www.extreme.indiana.edu/"))
381 (synopsis "Streaming pull XML parser")
382 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
383parser and should be used when there is a need to process quickly and
384efficiently all input elements (for example in SOAP processors). This
385package is in maintenance mode.")
386 (license (license:non-copyleft "file:///LICENSE.txt"))))
387
388(define-public java-xmlpull-api-v1
389 (package
390 (name "java-xmlpull-api-v1")
391 (version "1.1.3.4b")
392 (source (origin
393 ;; The package is originally from Extreme! Lab, but the website
394 ;; is now gone. This repositories contains the sources of the
395 ;; latest version.
396 (method git-fetch)
397 (uri (git-reference
398 (url "https://github.com/aslom/xmlpull-api-v1")
399 ;; No releases, this is the latest commit
400 (commit "abeaa4aa87b2625af70c32f658f44e11355fe568")))
401 (file-name (git-file-name name version))
402 (sha256
403 (base32
404 "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih"))
405 (modules '((guix build utils)))
406 (snippet
407 `(begin
408 (delete-file-recursively "lib")
409 (mkdir-p "lib")
410 ;; prevents a failure in "dist_lite"
411 (substitute* "build.xml"
412 (("README.html") "README.md"))))))
413 (build-system ant-build-system)
414 (arguments
415 `(#:test-target "junit"
416 #:build-target "dist"
417 #:phases
418 (modify-phases %standard-phases
419 (replace 'install
420 (lambda* (#:key outputs #:allow-other-keys)
421 (let* ((out (assoc-ref outputs "out"))
422 (doc (string-append out "/share/doc/" ,name "-" ,version))
423 (java (string-append out "/share/java"))
424 (project (string-append
425 "xmlpull_"
426 ,(string-join (string-split version #\.) "_"))))
427 (mkdir-p doc)
428 (copy-recursively (string-append "build/dist/" project "/doc/")
429 doc)
430 (mkdir-p java)
431 (copy-file (string-append "build/dist/" project "/" project ".jar")
432 (string-append java "/" project ".jar")))
433 )))))
434 (home-page "https://github.com/aslom/xmlpull-api-v1")
435 (synopsis "XML pull parsing API")
436 (description "XmlPull v1 API is a simple to use XML pull parsing API. XML
437pull parsing allows incremental (sometimes called streaming) parsing of XML
438where application is in control - the parsing can be interrupted at any given
439moment and resumed when application is ready to consume more input.")
440 (license license:public-domain)))
441
442(define-public java-dom4j
443 (package
444 (name "java-dom4j")
445 (version "2.1.1")
446 (source (origin
447 (method git-fetch)
448 (uri (git-reference
449 (url "https://github.com/dom4j/dom4j")
450 (commit (string-append "version-" version))))
451 (file-name (git-file-name name version))
452 (sha256
453 (base32
454 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
455 (modules '((guix build utils)))
456 (snippet
457 '(begin ;; Delete bundled jar archives.
458 (for-each delete-file (find-files "." ".*\\.jar"))
459 #t))))
460 (build-system ant-build-system)
461 (arguments
462 `(#:jar-name "dom4j.jar"
463 #:jdk ,icedtea-8
464 #:source-dir "src/main/java"
465 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
466 ;; dependency on itself through jflex.
467 #:tests? #f
468 #:phases
469 (modify-phases %standard-phases
470 (add-before 'build 'copy-jaxen-sources
471 ;; java-jaxen-bootstrap is not enough. These files have a circular
472 ;; dependency and there is no subset of dom4j that would allow
473 ;; breaking the circle.
474 (lambda* (#:key inputs #:allow-other-keys)
475 (mkdir-p "jaxen-sources")
476 (with-directory-excursion "jaxen-sources"
477 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
478 (mkdir-p "src/main/java/org/jaxen/dom4j")
479 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
480 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
481 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
482 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
483 #t))
484 (add-before 'build 'fix-old-xpp2
485 (lambda _
486 ;; This package normally depends on xpp2 2.0, but version 2.1.10
487 ;; is the only version whose source code is published.
488 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
489 (("public void resetStartTag")
490 "public boolean removeAttributeByRawName(String name) {\n
491 return false;\n
492}\n
493public boolean removeAttributeByName(String name, String name2) {\n
494 return false;\n
495}\n\npublic void resetStartTag")
496 (("Atttribute") "Attribute"))
497 #t)))))
498 (inputs
499 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
500 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
501 ("java-xmlpull2" ,java-xmlpull2)
502 ("java-xpp3" ,java-xpp3)
503 ("java-xsdlib" ,java-xsdlib)))
504 (native-inputs
505 (list java-testng java-xerces))
506 (home-page "https://dom4j.github.io/")
507 (synopsis "Flexible XML framework for Java")
508 (description "Dom4j is a flexible XML framework for Java. DOM4J works
509with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
510low memory footprint.")
511 ;; some BSD-like 5-clause license
512 (license (license:non-copyleft "file://LICENSE"))))
513
514(define-public java-kxml2
515 (package
516 (name "java-kxml2")
517 (version "2.4.2")
518 (source (origin
519 (method git-fetch)
520 (uri (git-reference
521 (url "https://github.com/stefanhaustein/kxml2")
522 (commit (string-append "v" version))))
523 (file-name (git-file-name name version))
524 (sha256
525 (base32
526 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
527 (build-system ant-build-system)
528 (arguments
529 `(#:jar-name "kxml2.jar"
530 #:source-dir "src/main/java"
531 #:test-include (list "TestWb.java")
532 ;; Test failure: it was expected to get an XML entity but got the
533 ;; equivalent Unicode character instead.
534 #:tests? #f
535 #:phases
536 (modify-phases %standard-phases
537 (add-after 'unpack 'make-git-checkout-writable
538 (lambda _
539 (for-each make-file-writable (find-files "."))
540 #t))
541 (add-before 'build 'copy-resources
542 (lambda _
543 (copy-recursively "src/main/resources" "build/classes")
544 #t)))))
545 (inputs
546 (list java-xpp3))
547 (native-inputs
548 (list java-junit))
549 (home-page "http://kxml.org")
550 (synopsis "XML pull parser")
551 (description "kXML is a small XML pull parser, specially designed for
552constrained environments such as Applets, Personal Java or devices compliant
553with the Mobile Information Device Profile (MIDP).")
554 (license license:expat)))
555
556(define-public java-stax
557 (package
558 (name "java-stax")
559 (version "1.2.0")
560 (source (origin
561 (method url-fetch)
562 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
563 version "/stax-" version "-sources.jar"))
564 (sha256
565 (base32
566 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
567 (build-system ant-build-system)
568 (arguments
569 `(#:jar-name "stax.jar"
570 #:tests? #f; no tests
571 #:phases
572 (modify-phases %standard-phases
573 (add-before 'configure 'fix-utf8
574 (lambda _
575 ;; This file is ISO-8859-1 but java expects UTF-8.
576 ;; Remove special characters in comments.
577 (with-fluids ((%default-port-encoding "ISO-8859-1"))
578 (substitute* "src/com/wutka/dtd/Scanner.java"
579 (("//.*") "\n")))
580 #t)))))
581 (home-page "https://repo1.maven.org/maven2/stax/stax/")
582 (synopsis "Streaming API for XML")
583 (description "This package provides the reference implementation of the
584@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
585and from a Java application. It provides a standard pull parser interface.")
586 (license license:asl2.0)))
587
588(define-public java-jettison
589 (package
590 (name "java-jettison")
591 (version "1.3.7")
592 (source (origin
593 (method git-fetch)
594 (uri (git-reference
595 (url "https://github.com/codehaus/jettison")
596 (commit (string-append "jettison-" version))))
597 (file-name (git-file-name name version))
598 (sha256
599 (base32
600 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
601 (build-system ant-build-system)
602 (arguments
603 `(#:jar-name "jettison.jar"
604 #:source-dir "src/main/java"
605 #:test-exclude (list "**/Abstract*.java"
606 ;; Abstract classes
607 "**/DOMTest.java"
608 "**/BadgerFishDOMTest.java"
609 "**/MappedDOMTest.java")))
610 (native-inputs
611 (list java-junit))
612 (home-page "https://github.com/codehaus/jettison")
613 (synopsis "StAX implementation for JSON")
614 (description "Jettison is a Java library for converting XML to JSON and
615vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
616implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
617@code{Mapped} and @code{BadgerFish} conventions.")
618 (license license:asl2.0)))
619
620(define-public java-jdom2
621 (package
622 (name "java-jdom")
623 (version "2.0.6.1")
624 (source (origin
625 (method git-fetch)
626 (uri (git-reference
627 (url "https://github.com/hunterhacker/jdom")
628 (commit (string-append "JDOM-" version))))
629 (file-name (git-file-name name version))
630 (sha256
631 (base32
632 "1r4pwl0z7hm45v9l2wbq3fjmqi13zmwzbrggyqizrwv31kghhx56"))))
633 (build-system ant-build-system)
634 (arguments
635 `(#:build-target "package"
636 #:tests? #f ; tests are run as part of the build process
637 #:phases
638 (modify-phases %standard-phases
639 (replace 'install
640 (install-jars "build")))))
641 (home-page "http://jdom.org/")
642 (synopsis "Access, manipulate, and output XML data")
643 (description "Jdom is a Java-based solution for accessing, manipulating, and
644outputting XML data from Java code.")
645 (license license:bsd-4)))
646
647(define-public java-xstream
648 (package
649 (name "java-xstream")
650 (version "1.4.16")
651 (source
652 (origin
653 (method git-fetch)
654 (uri (git-reference
655 (url "https://github.com/x-stream/xstream")
656 (commit (string-append
657 "XSTREAM_"
658 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
659 version)))))
660 (file-name (git-file-name name version))
661 (sha256
662 (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755"))))
663 (build-system ant-build-system)
664 (arguments
665 `(#:jar-name "xstream.jar"
666 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
667 #:tests? #f
668 #:jdk ,icedtea-8
669 #:source-dir "xstream/src/java"))
670 (inputs
671 `(("java-jdom" ,java-jdom)
672 ("java-jdom2" ,java-jdom2)
673 ("java-cglib" ,java-cglib)
674 ("java-joda-time" ,java-joda-time)
675 ("java-jettison" ,java-jettison)
676 ("java-xom" ,java-xom)
677 ("java-mxparser" ,java-mxparser)
678 ("java-xpp3" ,java-xpp3)
679 ("java-dom4j" ,java-dom4j)
680 ("java-stax2-api" ,java-stax2-api)
681 ("java-woodstox-core" ,java-woodstox-core)
682 ("java-kxml2" ,java-kxml2)
683 ("java-stax" ,java-stax)))
684 (home-page "https://x-stream.github.io")
685 (synopsis "XML serialization library")
686 (description "XStream is a simple library to serialize Java objects to XML
687and back again.")
688 (license license:bsd-3)))
689
690(define-public java-mxparser
691 (package
692 (name "java-mxparser")
693 (version "1.2.1")
694 (source
695 (origin
696 (method git-fetch)
697 (uri (git-reference
698 (url "https://github.com/x-stream/mxparser")
699 (commit (string-append "v-" version))))
700 (file-name (git-file-name name version))
701 (sha256
702 (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb"))))
703 (build-system ant-build-system)
704 (arguments
705 `(#:jar-name "mxparser.jar"
706 #:source-dir "src/main/java"
707 #:test-dir "src/test"
708 #:phases
709 (modify-phases %standard-phases
710 (add-before 'build 'copy-resources
711 (lambda _
712 (copy-recursively "src/main/resources" "build/classes")
713 #t)))))
714 (propagated-inputs
715 (list java-xmlpull-api-v1))
716 (native-inputs
717 (list java-junit))
718 (home-page "https://github.com/x-stream/mxparser")
719 (synopsis "Streaming pull XML parser forked from @code{java-xpp3}")
720 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
721parser and should be used when there is a need to process quickly and
722efficiently all input elements (for example in SOAP processors). This
723package is a stable XmlPull parsing engine that is based on ideas from XPP
724and in particular XPP2 but completely revised and rewritten to take the best
725advantage of JIT JVMs.
726
727MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged
728changes of the Plexus fork. It is an implementation of the XMLPULL V1 API
729(parser only).")
730 (license (license:non-copyleft "file://LICENSE.txt"))))
731
732
733
734
735
736
737
738
739
740