projects/guix·blob python-team · refs

1023 lines · 39.5 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;;; Copyright © 2024, 2025 Hartmut Goebel <[email protected]>
11;;; Copyright © 2026 Arun Isaac <[email protected]>
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages java-xml)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages base)
31 #:use-module (gnu packages check)
32 #:use-module (gnu packages compression)
33 #:use-module (gnu packages gtk)
34 #:use-module (gnu packages java)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix gexp)
37 #:use-module (guix packages)
38 #:use-module (guix bzr-download)
39 #:use-module (guix download)
40 #:use-module (guix git-download)
41 #:use-module (guix build-system ant)
42 #:use-module (guix utils)
43 #:use-module ((srfi srfi-1) #:select (alist-delete)))
44
45(define-public java-jericho-html
46 (package
47 (name "java-jericho-html")
48 (version "3.4")
49 (source (origin
50 (method bzr-fetch)
51 (uri (bzr-reference (url (string-append
52 "http://jerichohtml.bzr.sourceforge.net/"
53 "bzr/jerichohtml"))
54 (revision (string-append "tag:" version))))
55 (file-name (string-append name "-" version "-checkout"))
56 (sha256
57 (base32
58 "1zsf4i33jn05pma4y1658d6avhw7x4c12ggs96szhc06b7bxs8j0"))
59 (modules '((guix build utils)))
60 (snippet '(begin
61 (format #t "~%~a~%" "Removing sourced jar files.")
62 (for-each (lambda (jarf)
63 (delete-file jarf)
64 (format #t "Deleted: ~a~%" jarf))
65 (find-files "." "\\.jar$"))))))
66 (build-system ant-build-system)
67 (arguments
68 `(#:jar-name (string-append ,name ".jar")
69 #:phases (modify-phases %standard-phases
70 (add-before 'build 'add-ant-env-options
71 (lambda* _
72 (setenv "ANT_OPTS" "-Dfile.encoding=iso-8859-1")
73 (let ((match-str (string-append "jerichohtml-"
74 ,version)))
75 (substitute* "build.xml"
76 ((match-str)
77 "")))))
78 (add-after 'build 'check-prep
79 (lambda* (#:key source #:allow-other-keys)
80 (mkdir-p "src/test/java"))))))
81 (native-inputs (list
82 java-commons-logging-minimal
83 java-junit
84 java-log4j-api
85 java-slf4j-api))
86 (home-page "http://jericho.htmlparser.net/docs/index.html")
87 (synopsis "Java HTML Parser library")
88 (description
89 "This Java library allowing analysis and manipulation of
90parts of an HTML document, including server-side tags, while
91reproducing verbatim any unrecognised or invalid HTML. It also
92provides high-level HTML form manipulation functions.")
93 (license (list license:lgpl2.1+ license:asl2.0 license:epl1.0))))
94
95(define-public java-simple-xml
96 (package
97 (name "java-simple-xml")
98 (version "2.7.1")
99 (source (origin
100 (method url-fetch)
101 (uri (string-append "mirror://sourceforge/simple/simple-xml-"
102 version ".zip"))
103 (sha256
104 (base32
105 "0w19k1awslmihpwsxwjbg89hv0vjhk4k3i0vrfchy3mqknd988y5"))
106 (patches (search-patches "java-simple-xml-fix-tests.patch"))))
107 (build-system ant-build-system)
108 (arguments
109 `(#:build-target "build"
110 #:test-target "test"
111 #:phases
112 (modify-phases %standard-phases
113 (replace 'install (install-jars "jar"))
114 (add-before 'check 'disable-failing-test
115 (lambda _
116 ;; This test sometimes fails with an out of memory exception
117 (delete-file
118 "test/src/org/simpleframework/xml/core/NoAnnotationsRequiredTest.java"))))))
119 (native-inputs
120 (list unzip))
121 (home-page "https://simple.sourceforge.net/")
122 (synopsis "XML serialization framework for Java")
123 (description "Simple is a high performance XML serialization and
124configuration framework for Java. Its goal is to provide an XML framework
125that enables rapid development of XML configuration and communication systems.
126This framework aids the development of XML systems with minimal effort and
127reduced errors. It offers full object serialization and deserialization,
128maintaining each reference encountered.")
129 (license license:asl2.0)))
130
131;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
132;; xml-apis.jar and xml-apis-1.4.01.jar.
133(define-public java-jaxp
134 (package
135 (name "java-jaxp")
136 (version "1.4.01")
137 (source
138 (origin
139 (method url-fetch)
140 (uri (string-append "mirror://apache/xerces/xml-commons/source/"
141 "xml-commons-external-" version "-src.tar.gz"))
142 (sha256
143 (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
144 (build-system ant-build-system)
145 (arguments
146 `(#:jar-name "jaxp.jar"
147 #:jdk ,icedtea-8
148 #:source-dir ".."
149 #:tests? #f)); no tests
150 (home-page "https://xerces.apache.org/xml-commons/")
151 (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
152 (description "Jaxp from the Apache XML Commons project is used by
153the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
154
155@itemize
156@item Document Object Model (DOM)
157@item Simple API for XML (SAX)
158@item Java APIs for XML Processing (JAXP)
159@item Transformation API for XML (TrAX)
160@item Document Object Model (DOM) Load and Save
161@item JSR 206 Java API for XML Processing
162@end itemize")
163 (license (list license:asl2.0
164 license:w3c ;; Files under org.w3c
165 license:public-domain)))) ;; org.xml.sax
166
167(define-public java-apache-xml-commons-resolver
168 (package
169 (name "java-apache-xml-commons-resolver")
170 (version "1.2")
171 (source
172 (origin
173 (method url-fetch)
174 (uri (string-append "mirror://apache/xerces/xml-commons/"
175 "xml-commons-resolver-" version ".tar.gz"))
176 (sha256
177 (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
178 (modules '((guix build utils)))
179 (snippet
180 '(begin
181 (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
182 #t))))
183 (build-system ant-build-system)
184 (arguments
185 `(#:jar-name (string-append "xml-resolver.jar")
186 #:tests? #f)); no tests
187 (inputs
188 (list java-junit))
189 (home-page "https://xerces.apache.org/xml-commons/")
190 (synopsis "Catalog-based entity and URI resolution")
191 (description "The resolver class implements the full semantics of OASIS Technical
192Resolution 9401:1997 (Amendment 2 to TR 9401) catalogs and the 06 Aug
1932001 Committee Specification of OASIS XML Catalogs.
194
195It also includes a framework of classes designed to read catalog files
196in a number of formats:
197
198@itemize
199@item The plain-text flavor described by TR9401.
200@item The XCatalog XML format defined by John Cowan
201@item The XML Catalog format defined by the OASIS Entity Resolution
202 Technical Committee.
203@end itemize")
204 (license license:asl2.0)))
205
206;; Jaxen requires java-dom4j and java-xom that in turn require jaxen.
207;; This package is a bootstrap version without dependencies on dom4j and xom.
208(define-public java-jaxen-bootstrap
209 (package
210 (name "java-jaxen-bootstrap")
211 (version "1.1.6")
212 (source (origin
213 (method url-fetch)
214 ;; No release on github
215 (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
216 version "/jaxen-" version "-sources.jar"))
217 (sha256
218 (base32
219 "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
220 (build-system ant-build-system)
221 (arguments
222 `(#:jar-name "jaxen.jar"
223 #:source-dir "src"
224 #:tests? #f; no tests
225 #:phases
226 (modify-phases %standard-phases
227 (add-before 'build 'remove-dom4j
228 (lambda _
229 (delete-file-recursively "src/org/jaxen/dom4j")
230 (delete-file-recursively "src/org/jaxen/xom")
231 #t)))))
232 (inputs
233 `(("java-jdom" ,java-jdom)))
234 (home-page "https://github.com/jaxen-xpath/jaxen")
235 (synopsis "XPath library")
236 (description "Jaxen is an XPath library written in Java. It is adaptable
237to many different object models, including DOM, XOM, dom4j, and JDOM. It is
238also possible to write adapters that treat non-XML trees such as compiled
239Java byte code or Java beans as XML, thus enabling you to query these trees
240with XPath too.")
241 (properties '((hidden? . #t))) ;for bootstrapping purposes only
242 (license license:bsd-3)))
243
244(define-public java-jaxen
245 (package
246 (inherit java-jaxen-bootstrap)
247 (name "java-jaxen")
248 (arguments
249 (strip-keyword-arguments
250 '(#:phases) ;; remove any phases added by java-jaxen-bootstrap
251 (package-arguments java-jaxen-bootstrap)))
252 (inputs
253 (list java-jdom java-xom java-dom4j))
254 (properties
255 (alist-delete 'hidden? (package-properties java-jaxen-bootstrap)))))
256
257(define-public java-xom
258 (package
259 (name "java-xom")
260 (version "127")
261 (source (origin
262 (method git-fetch)
263 (uri (git-reference
264 (url "https://github.com/elharo/xom")
265 (commit (string-append "XOM_" version))))
266 (file-name (git-file-name name version))
267 (sha256
268 (base32
269 "1jh6y03g5zzdhsb5jm6ms1xnamr460qmn96y3w6aw0ikfwqlg0bq"))
270 (modules '((guix build utils)))
271 (snippet
272 '(begin
273 (for-each delete-file
274 (find-files "." "\\.jar$"))
275 #t))))
276 (build-system ant-build-system)
277 (arguments
278 `(#:jar-name "xom.jar"
279 #:jdk ,icedtea-8
280 #:tests? #f ; no tests
281 #:phases
282 (modify-phases %standard-phases
283 (add-after 'unpack 'make-git-checkout-writable
284 (lambda _
285 (for-each make-file-writable (find-files "."))
286 #t))
287 (add-before 'configure 'fix-tagsoup-dep
288 (lambda _
289 ;; FIXME: Where is tagsoup source?
290 (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java")
291 #t)))))
292 (inputs
293 (list java-jdom java-junit java-classpathx-servletapi
294 java-jaxen-bootstrap java-xerces))
295 (home-page "https://xom.nu/")
296 (synopsis "XML Object Model")
297 (description "XOM is a new XML Object Model for processing XML with Java
298that strives for correctness and simplicity.")
299 ;; 2.1 only
300 (license license:lgpl2.1)))
301
302(define-public java-xsdlib
303 (package
304 (name "java-xsdlib")
305 (version "2013.2")
306 (source (origin
307 (method url-fetch)
308 (uri (string-append "https://repo1.maven.org/maven2/com/sun/msv/"
309 "datatype/xsd/xsdlib/" version "/xsdlib-"
310 version "-sources.jar"))
311 (sha256
312 (base32
313 "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
314 (build-system ant-build-system)
315 (arguments
316 `(#:tests? #f; no tests
317 #:jar-name "xsdlib.jar"
318 #:jdk ,icedtea-8))
319 (inputs
320 (list java-xerces))
321 (home-page (string-append "https://web.archive.org/web/20161127144537/"
322 "https://msv.java.net//"))
323 (synopsis "Sun Multi-Schema Validator")
324 (description "Xsdlib contains an implementation of sun.com.msv, an XML
325validator.")
326 (license license:bsd-2)))
327
328(define-public java-xpp3
329 (package
330 (name "java-xpp3")
331 (version "1.1.4")
332 (source (origin
333 (method url-fetch)
334 (uri (string-append
335 "https://ci.guix.gnu.org/file/"
336 "xpp3-1.1.4_src.tgz"
337 "/sha256/"
338 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
339 (file-name (string-append name "-" version "_src.tgz"))
340 (sha256
341 (base32
342 "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
343 (modules '((guix build utils)))
344 (snippet
345 '(begin ;; Delete bundled jar archives.
346 (for-each delete-file (find-files "." ".*\\.jar"))
347 #t))))
348 (build-system ant-build-system)
349 (arguments
350 `(#:tests? #f; no tests
351 #:build-target "jar"
352 #:phases
353 (modify-phases %standard-phases
354 (replace 'install (install-jars "build")))))
355 (home-page "http://www.extreme.indiana.edu/xgws/xsoap/xpp/")
356 (synopsis "Streaming pull XML parser")
357 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
358parser and should be used when there is a need to process quickly and
359efficiently all input elements (for example in SOAP processors). This
360package is a stable XmlPull parsing engine that is based on ideas from XPP
361and in particular XPP2 but completely revised and rewritten to take the best
362advantage of JIT JVMs.")
363 (license (license:non-copyleft "file://LICENSE.txt"))))
364
365(define-public java-xmlpull2
366 (package
367 (name "java-xmlpull2")
368 (version "2.1.10")
369 (source (origin
370 (method url-fetch)
371 ;; Unfortunately, archive.org does not have a copy of this file.
372 (uri (string-append "https://ftp.fau.de/gentoo/distfiles/"
373 "PullParser" version ".tgz"))
374 (sha256
375 (base32
376 "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
377 (modules '((guix build utils)))
378 (snippet
379 '(begin ;; Delete bundled jar archives.
380 (for-each delete-file (find-files "." ".*\\.jar"))
381 #t))))
382 (build-system ant-build-system)
383 (arguments
384 `(#:tests? #f; no tests
385 #:build-target "impl"
386 #:phases
387 (modify-phases %standard-phases
388 (replace 'install (install-jars "build/lib")))))
389 (home-page (string-append "https://web.archive.org/web/20210225153105/"
390 "https://www.extreme.indiana.edu/"))
391 (synopsis "Streaming pull XML parser")
392 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
393parser and should be used when there is a need to process quickly and
394efficiently all input elements (for example in SOAP processors). This
395package is in maintenance mode.")
396 (license (license:non-copyleft "file:///LICENSE.txt"))))
397
398(define-public java-xmlpull-api-v1
399 (package
400 (name "java-xmlpull-api-v1")
401 (version "1.1.3.4b")
402 (source (origin
403 ;; The package is originally from Extreme! Lab, but the website
404 ;; is now gone. This repositories contains the sources of the
405 ;; latest version.
406 (method git-fetch)
407 (uri (git-reference
408 (url "https://github.com/aslom/xmlpull-api-v1")
409 ;; No releases, this is the latest commit
410 (commit "abeaa4aa87b2625af70c32f658f44e11355fe568")))
411 (file-name (git-file-name name version))
412 (sha256
413 (base32
414 "15bdqxfncnakskna4m9gsh4f9iczxy83qxn2anqiqd15z406a5ih"))
415 (modules '((guix build utils)))
416 (snippet
417 `(begin
418 (delete-file-recursively "lib")
419 (mkdir-p "lib")
420 ;; prevents a failure in "dist_lite"
421 (substitute* "build.xml"
422 (("README.html") "README.md"))))))
423 (build-system ant-build-system)
424 (arguments
425 `(#:test-target "junit"
426 #:build-target "dist"
427 #:phases
428 (modify-phases %standard-phases
429 (replace 'install
430 (lambda* (#:key outputs #:allow-other-keys)
431 (let* ((out (assoc-ref outputs "out"))
432 (doc (string-append out "/share/doc/" ,name "-" ,version))
433 (java (string-append out "/share/java"))
434 (project (string-append
435 "xmlpull_"
436 ,(string-join (string-split version #\.) "_"))))
437 (mkdir-p doc)
438 (copy-recursively (string-append "build/dist/" project "/doc/")
439 doc)
440 (mkdir-p java)
441 (copy-file (string-append "build/dist/" project "/" project ".jar")
442 (string-append java "/" project ".jar")))
443 )))))
444 (home-page "https://github.com/aslom/xmlpull-api-v1")
445 (synopsis "XML pull parsing API")
446 (description "XmlPull v1 API is a simple to use XML pull parsing API. XML
447pull parsing allows incremental (sometimes called streaming) parsing of XML
448where application is in control - the parsing can be interrupted at any given
449moment and resumed when application is ready to consume more input.")
450 (license license:public-domain)))
451
452(define-public java-dom4j
453 (package
454 (name "java-dom4j")
455 (version "2.1.1")
456 (source (origin
457 (method git-fetch)
458 (uri (git-reference
459 (url "https://github.com/dom4j/dom4j")
460 (commit (string-append "version-" version))))
461 (file-name (git-file-name name version))
462 (sha256
463 (base32
464 "0q907srj9v4hwicpcrn4slyld5npf2jv7hzchsgrg29q2xmbwkdl"))
465 (modules '((guix build utils)))
466 (snippet
467 '(begin ;; Delete bundled jar archives.
468 (for-each delete-file (find-files "." ".*\\.jar"))
469 #t))))
470 (build-system ant-build-system)
471 (arguments
472 `(#:jar-name "dom4j.jar"
473 #:jdk ,icedtea-8
474 #:source-dir "src/main/java"
475 ;; FIXME: Requires xalan, but xalan depends on java-cup which has a
476 ;; dependency on itself through jflex.
477 #:tests? #f
478 #:phases
479 (modify-phases %standard-phases
480 (add-before 'build 'copy-jaxen-sources
481 ;; java-jaxen-bootstrap is not enough. These files have a circular
482 ;; dependency and there is no subset of dom4j that would allow
483 ;; breaking the circle.
484 (lambda* (#:key inputs #:allow-other-keys)
485 (mkdir-p "jaxen-sources")
486 (with-directory-excursion "jaxen-sources"
487 (system* "jar" "xf" (assoc-ref inputs "java-jaxen-sources")))
488 (mkdir-p "src/main/java/org/jaxen/dom4j")
489 (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
490 "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
491 (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
492 "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")
493 #t))
494 (add-before 'build 'fix-old-xpp2
495 (lambda _
496 ;; This package normally depends on xpp2 2.0, but version 2.1.10
497 ;; is the only version whose source code is published.
498 (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
499 (("public void resetStartTag")
500 "public boolean removeAttributeByRawName(String name) {\n
501 return false;\n
502}\n
503public boolean removeAttributeByName(String name, String name2) {\n
504 return false;\n
505}\n\npublic void resetStartTag")
506 (("Atttribute") "Attribute"))
507 #t)))))
508 (inputs
509 `(("java-jaxen-bootstrap" ,java-jaxen-bootstrap)
510 ("java-jaxen-sources" ,(package-source java-jaxen-bootstrap))
511 ("java-xmlpull2" ,java-xmlpull2)
512 ("java-xpp3" ,java-xpp3)
513 ("java-xsdlib" ,java-xsdlib)))
514 (native-inputs
515 (list java-testng java-xerces))
516 (home-page "https://dom4j.github.io/")
517 (synopsis "Flexible XML framework for Java")
518 (description "Dom4j is a flexible XML framework for Java. DOM4J works
519with DOM, SAX, XPath, and XSLT. It can parse large XML documents with very
520low memory footprint.")
521 ;; some BSD-like 5-clause license
522 (license (license:non-copyleft "file://LICENSE"))))
523
524(define-public java-kxml2
525 (package
526 (name "java-kxml2")
527 (version "2.4.2")
528 (source (origin
529 (method git-fetch)
530 (uri (git-reference
531 (url "https://github.com/stefanhaustein/kxml2")
532 (commit (string-append "v" version))))
533 (file-name (git-file-name name version))
534 (sha256
535 (base32
536 "0g6d8c9r9sh3x04sf4wdpgwvhkqvk11k3kq9skx91i60h4vn01hg"))))
537 (build-system ant-build-system)
538 (arguments
539 `(#:jar-name "kxml2.jar"
540 #:source-dir "src/main/java"
541 #:test-include (list "TestWb.java")
542 ;; Test failure: it was expected to get an XML entity but got the
543 ;; equivalent Unicode character instead.
544 #:tests? #f
545 #:phases
546 (modify-phases %standard-phases
547 (add-after 'unpack 'make-git-checkout-writable
548 (lambda _
549 (for-each make-file-writable (find-files "."))
550 #t))
551 (add-before 'build 'copy-resources
552 (lambda _
553 (copy-recursively "src/main/resources" "build/classes")
554 #t)))))
555 (inputs
556 (list java-xpp3))
557 (native-inputs
558 (list java-junit))
559 (home-page "http://kxml.org")
560 (synopsis "XML pull parser")
561 (description "kXML is a small XML pull parser, specially designed for
562constrained environments such as Applets, Personal Java or devices compliant
563with the Mobile Information Device Profile (MIDP).")
564 (license license:expat)))
565
566(define-public java-stax
567 (package
568 (name "java-stax")
569 (version "1.2.0")
570 (source (origin
571 (method url-fetch)
572 (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
573 version "/stax-" version "-sources.jar"))
574 (sha256
575 (base32
576 "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
577 (build-system ant-build-system)
578 (arguments
579 `(#:jar-name "stax.jar"
580 #:tests? #f; no tests
581 #:phases
582 (modify-phases %standard-phases
583 (add-before 'configure 'fix-utf8
584 (lambda _
585 ;; This file is ISO-8859-1 but java expects UTF-8.
586 ;; Remove special characters in comments.
587 (with-fluids ((%default-port-encoding "ISO-8859-1"))
588 (substitute* "src/com/wutka/dtd/Scanner.java"
589 (("//.*") "\n")))
590 #t)))))
591 (home-page "https://repo1.maven.org/maven2/stax/stax/")
592 (synopsis "Streaming API for XML")
593 (description "This package provides the reference implementation of the
594@dfn{Streaming API for XML} (StAX). It is used for streaming XML data to
595and from a Java application. It provides a standard pull parser interface.")
596 (license license:asl2.0)))
597
598(define-public java-jettison
599 (package
600 (name "java-jettison")
601 (version "1.3.7")
602 (source (origin
603 (method git-fetch)
604 (uri (git-reference
605 (url "https://github.com/codehaus/jettison")
606 (commit (string-append "jettison-" version))))
607 (file-name (git-file-name name version))
608 (sha256
609 (base32
610 "15sydmi5chdh4126qc7v8bsrp7fp4ldaya8a05iby4pq2324q0qw"))))
611 (build-system ant-build-system)
612 (arguments
613 `(#:jar-name "jettison.jar"
614 #:source-dir "src/main/java"
615 #:test-exclude (list "**/Abstract*.java"
616 ;; Abstract classes
617 "**/DOMTest.java"
618 "**/BadgerFishDOMTest.java"
619 "**/MappedDOMTest.java")))
620 (native-inputs
621 (list java-junit))
622 (home-page "https://github.com/codehaus/jettison")
623 (synopsis "StAX implementation for JSON")
624 (description "Jettison is a Java library for converting XML to JSON and
625vice-versa with the help of the @dfn{Streaming API for XML} (StAX). It
626implements @code{XMLStreamWriter} and @code{XMLStreamReader} and supports
627@code{Mapped} and @code{BadgerFish} conventions.")
628 (license license:asl2.0)))
629
630(define-public java-jdom2
631 (package
632 (name "java-jdom")
633 (version "2.0.6.1")
634 (source (origin
635 (method git-fetch)
636 (uri (git-reference
637 (url "https://github.com/hunterhacker/jdom")
638 (commit (string-append "JDOM-" version))))
639 (file-name (git-file-name name version))
640 (sha256
641 (base32
642 "1r4pwl0z7hm45v9l2wbq3fjmqi13zmwzbrggyqizrwv31kghhx56"))))
643 (build-system ant-build-system)
644 (arguments
645 `(#:build-target "package"
646 #:tests? #f ; tests are run as part of the build process
647 #:phases
648 (modify-phases %standard-phases
649 (replace 'install
650 (install-jars "build")))))
651 (home-page "http://jdom.org/")
652 (synopsis "Access, manipulate, and output XML data")
653 (description "Jdom is a Java-based solution for accessing, manipulating, and
654outputting XML data from Java code.")
655 (license license:bsd-4)))
656
657(define-public java-xstream
658 (package
659 (name "java-xstream")
660 (version "1.4.16")
661 (source
662 (origin
663 (method git-fetch)
664 (uri (git-reference
665 (url "https://github.com/x-stream/xstream")
666 (commit (string-append
667 "XSTREAM_"
668 (string-map (lambda (x) (if (eq? x #\.) #\_ x))
669 version)))))
670 (file-name (git-file-name name version))
671 (sha256
672 (base32 "16k2mc63h2fw7lxv74qmhg4p8q9hfrw114daa6nxwnpv08cnq755"))))
673 (build-system ant-build-system)
674 (arguments
675 `(#:jar-name "xstream.jar"
676 ;; FIXME: Tests are not in a java subdirectory as assumed by ant-build-system.
677 #:tests? #f
678 #:jdk ,icedtea-8
679 #:source-dir "xstream/src/java"))
680 (inputs
681 `(("java-jdom" ,java-jdom)
682 ("java-jdom2" ,java-jdom2)
683 ("java-cglib" ,java-cglib)
684 ("java-joda-time" ,java-joda-time)
685 ("java-jettison" ,java-jettison)
686 ("java-xom" ,java-xom)
687 ("java-mxparser" ,java-mxparser)
688 ("java-xpp3" ,java-xpp3)
689 ("java-dom4j" ,java-dom4j)
690 ("java-stax2-api" ,java-stax2-api)
691 ("java-woodstox-core" ,java-woodstox-core)
692 ("java-kxml2" ,java-kxml2)
693 ("java-stax" ,java-stax)))
694 (home-page "https://x-stream.github.io")
695 (synopsis "XML serialization library")
696 (description "XStream is a simple library to serialize Java objects to XML
697and back again.")
698 (license license:bsd-3)))
699
700(define-public java-mxparser
701 (package
702 (name "java-mxparser")
703 (version "1.2.1")
704 (source
705 (origin
706 (method git-fetch)
707 (uri (git-reference
708 (url "https://github.com/x-stream/mxparser")
709 (commit (string-append "v-" version))))
710 (file-name (git-file-name name version))
711 (sha256
712 (base32 "0i3jrjbz4hgf62fm1ix7nlcmhi4kcv4flqsfvh7a3l2v7nsp5ryb"))))
713 (build-system ant-build-system)
714 (arguments
715 `(#:jar-name "mxparser.jar"
716 #:source-dir "src/main/java"
717 #:test-dir "src/test"
718 #:phases
719 (modify-phases %standard-phases
720 (add-before 'build 'copy-resources
721 (lambda _
722 (copy-recursively "src/main/resources" "build/classes")
723 #t)))))
724 (propagated-inputs
725 (list java-xmlpull-api-v1))
726 (native-inputs
727 (list java-junit))
728 (home-page "https://github.com/x-stream/mxparser")
729 (synopsis "Streaming pull XML parser forked from @code{java-xpp3}")
730 (description "Xml Pull Parser (in short XPP) is a streaming pull XML
731parser and should be used when there is a need to process quickly and
732efficiently all input elements (for example in SOAP processors). This
733package is a stable XmlPull parsing engine that is based on ideas from XPP
734and in particular XPP2 but completely revised and rewritten to take the best
735advantage of JIT JVMs.
736
737MXParser is a fork of xpp3_min 1.1.7 containing only the parser with merged
738changes of the Plexus fork. It is an implementation of the XMLPULL V1 API
739(parser only).")
740 (license (license:non-copyleft "file://LICENSE.txt"))))
741
742;;; ----- Apache Axiom ------
743
744(define %axiom-version "1.4.0")
745
746(define axiom-source
747 (let ((version %axiom-version))
748 (origin
749 (method url-fetch)
750 (uri (string-append "mirror://apache/ws/axiom/" version
751 "/axiom-" version "-src.zip"))
752 (sha256
753 (base32
754 "0wig9s1s089d0zq8kjny1f34za23vb47k515iab72bnkq62bbm8y")))))
755
756(define-public java-axiom-api
757 (package
758 (name "java-axiom-api")
759 (version %axiom-version)
760 (source axiom-source)
761 (build-system ant-build-system)
762 (arguments
763 `(#:source-dir "axiom-api/src/main"
764 #:test-dir "axiom-api/src/test"
765 #:tests? #f ;; tests requre too many yet unpackaged packages
766 #:jar-name "axiom-api.jar"))
767 (native-inputs
768 (list java-axiom-base64-utils
769 java-axiom-xml-utils
770 java-commons-logging-minimal
771 java-jakarta-activation-api
772 java-jaxen
773 java-mime4j-core
774 java-osgi-framework
775 java-osgi-util-tracker
776 java-stax2-api
777 unzip))
778 (home-page "https://ws.apache.org/axiom/")
779 (synopsis "API for Apache Axiom – StAX-based XML Infoset compliant object model")
780 (description "Apache Axiom provides an XML Infoset compliant object model
781implementation which supports on-demand building of the object tree. It
782supports a novel \"pull-through\" model which allows one to turn off the tree
783building and directly access the underlying pull event stream using the StAX
784API. It also has built in support for XML Optimized Packaging (XOP) and MTOM,
785the combination of which allows XML to carry binary data efficiently and in a
786transparent manner. The combination of these is an easy to use API with a very
787high performant architecture.
788
789This package provides the API for Apache Axiom.")
790 (license license:asl2.0)))
791
792(define-public java-axiom-base64-utils
793 (package
794 (name "java-axiom-base64-utils")
795 (version %axiom-version)
796 (source axiom-source)
797 (build-system ant-build-system)
798 (arguments
799 `(#:source-dir "components/base64-utils/src/main"
800 #:tests? #f ;; has no tests
801 #:jar-name "axiom-base64-utils.jar"))
802 (native-inputs
803 (list unzip))
804 (home-page "https://ws.apache.org/axiom/")
805 (synopsis "Apache Axiom base64 decoder and encoder")
806 (description "This package provides utility methods to work with base64
807encoded data.")
808 (license license:asl2.0)))
809
810(define-public java-axiom-core-mixins
811 (package
812 (name "java-axiom-core-mixins")
813 (version %axiom-version)
814 (source axiom-source)
815 (build-system ant-build-system)
816 (arguments
817 `(#:source-dir "mixins/core-mixins/src/main"
818 #:tests? #f ;; has no tests
819 #:jar-name "axiom-core-mixins.jar"))
820 (native-inputs
821 (list java-axiom-api
822 java-axiom-core-streams
823 java-axiom-xml-utils
824 java-axiom-weaver-annotations
825 unzip))
826 (home-page "https://ws.apache.org/axiom/")
827 (synopsis "Common classes for Apache Axiom core.")
828 (description "This package contains mixins and implementation classes used
829by core of Apache Axiom.")
830 (license license:asl2.0)))
831
832(define-public java-axiom-core-streams
833 (package
834 (name "java-axiom-core-streams")
835 (version %axiom-version)
836 (source axiom-source)
837 (build-system ant-build-system)
838 (arguments
839 `(#:source-dir "components/core-streams/src/main"
840 #:test-dir "components/core-streams/src/test"
841 #:tests? #f ;; require too many yet unpackaged packages
842 #:jar-name "axiom-core-streams.jar"))
843 (inputs
844 (list java-axiom-base64-utils
845 java-axiom-xml-utils
846 java-commons-logging-minimal
847 unzip))
848 (home-page "https://ws.apache.org/axiom/")
849 (synopsis "Stream classes used by Apache Axiom")
850 (description "This package provides stream classes used by the core or
851Apache Axiom.")
852 (license license:asl2.0)))
853
854(define-public java-axiom-dom-mixins
855 (package
856 (name "java-axiom-dom-mixins")
857 (version %axiom-version)
858 (source axiom-source)
859 (build-system ant-build-system)
860 (arguments
861 `(#:source-dir "mixins/dom-mixins/src/main"
862 #:test-dir "mixins/dom-mixins/src/test"
863 #:tests? #f ;; require too many yet unpackaged packages
864 #:jar-name "axiom-dom-mixins.jar"))
865 (native-inputs
866 (list java-axiom-api
867 java-axiom-core-mixins
868 java-axiom-om-mixins
869 java-axiom-xml-utils
870 java-axiom-weaver-annotations
871 unzip))
872 (home-page "https://ws.apache.org/axiom/")
873 (synopsis "Implementation of the Axiom API that also implements DOM")
874 (description "This package contains mixins and implementation classes for Apache Axiom that
875also implement DOM.")
876 (license license:asl2.0)))
877
878(define-public java-axiom-impl
879 (package
880 (name "java-axiom-impl")
881 (version %axiom-version)
882 (source axiom-source)
883 (build-system ant-build-system)
884 (arguments
885 `(#:source-dir "implementations/axiom-impl/src/main"
886 #:test-dir "implementations/axiom-impl/src/test"
887 #:tests? #f ;; tests require too many yet unpackaged packages
888 #:jar-name "axiom-impl.jar"))
889 (native-inputs
890 (list java-axiom-api
891 java-axiom-core-mixins
892 java-axiom-core-streams
893 java-axiom-om-mixins
894 java-axiom-weaver-annotations
895 java-commons-logging-minimal
896 java-woodstox-core
897 unzip))
898 (propagated-inputs
899 (list java-axiom-api))
900 (home-page "https://ws.apache.org/axiom/")
901 (synopsis "Default implementation of the Axiom API")
902 (description "Apache Axiom provides an XML Infoset compliant object model
903implementation which supports on-demand building of the object tree. It
904supports a novel \"pull-through\" model which allows one to turn off the tree
905building and directly access the underlying pull event stream using the StAX
906API. It also has built in support for XML Optimized Packaging (XOP) and MTOM,
907the combination of which allows XML to carry binary data efficiently and in a
908transparent manner. The combination of these is an easy to use API with a
909very high performant architecture.
910
911This package provides the API for Apache Axiom.")
912 (license license:asl2.0)))
913
914(define-public java-axiom-om-mixins
915 (package
916 (name "java-axiom-om-mixins")
917 (version %axiom-version)
918 (source axiom-source)
919 (build-system ant-build-system)
920 (arguments
921 `(#:source-dir "mixins/om-mixins/src/main"
922 #:test-dir "mixins/om-mixins/src/test"
923 #:tests? #f ;; tests requre too many yet unpackaged packages
924 #:jar-name "axiom-om-mixins.jar"))
925 (native-inputs
926 (list java-axiom-api
927 java-axiom-base64-utils
928 java-axiom-core-streams
929 java-axiom-core-mixins
930 java-axiom-xml-utils
931 java-axiom-weaver-annotations
932 java-commons-logging-minimal
933 unzip))
934 (home-page "https://ws.apache.org/axiom/")
935 (synopsis "Common classes for Apache Axiom LLOM and DOOM.")
936 (description "This package contains mixins and implementation classes
937shared by the object model implementations LLOM and DOOM.")
938 (license license:asl2.0)))
939
940(define-public java-axiom-weaver-annotations
941 (package
942 (name "java-axiom-weaver-annotations")
943 (version %axiom-version)
944 (source axiom-source)
945 (build-system ant-build-system)
946 (arguments
947 `(#:source-dir "axiom-weaver-annotations/src/main"
948 #:tests? #f ;; has no tests
949 #:jar-name "axiom-weaver-annotations.jar"))
950 (native-inputs
951 (list unzip))
952 (home-page "https://ws.apache.org/axiom/")
953 (synopsis "Annotation for Apache Axiom Weaver")
954 (description "This package provides annotation classes for Apache Axiom
955Weaver.")
956 (license license:asl2.0)))
957
958(define-public java-axiom-xml-utils
959 (package
960 (name "java-axiom-xml-utils")
961 (version %axiom-version)
962 (source axiom-source)
963 (build-system ant-build-system)
964 (arguments
965 `(#:source-dir "components/xml-utils/src/main"
966 #:test-dir "components/xml-utils/src/test"
967 #:tests? #f ;; require too many yet unpackaged packages
968 #:jar-name "axiom-xml-utils.jar"))
969 (native-inputs
970 (list unzip))
971 (home-page "https://ws.apache.org/axiom/")
972 (synopsis "XML utilities for Apache Axiom Weaver")
973 (description "This package provides XML utilities used by Apache Axiom
974Weaver, anyhow not depending on depending on the Axiom API.")
975 (license license:asl2.0)))
976
977;;; ----- Saxon HE ------
978
979(define-public java-saxon-he-10
980 ;; This is the last version not depending (indirectly via
981 ;; org.xmlresolver.xmlresolver and jing) on itself.
982 (package
983 (name "java-saxon-he")
984 (version "10.9")
985 ;; See <https://codeberg.org/guix/guix/pulls/5264#issuecomment-9492950> on
986 ;; why Maven Central is used in favor of
987 ;; <https://github.com/Saxonica/Saxon-HE> or
988 ;; <https://saxonica.plan.io/projects/saxonmirrorhe/repository>.
989 (source (origin
990 (method url-fetch)
991 (uri (string-append "https://repo1.maven.org/maven2/"
992 "net/sf/saxon/Saxon-HE/" version
993 "/Saxon-HE-" version "-sources.jar"))
994 (sha256
995 (base32
996 "17dx6w48ka3d1g20qisvafbc1rmnvfg0vnm8zfz4vkhqfjbkp6j8"))))
997 (build-system ant-build-system)
998 (arguments
999 (list #:tests? #f ;; tests are not included in release archives
1000 #:jar-name "saxon-he.jar"
1001 #:phases
1002 #~(modify-phases %standard-phases
1003 (add-before 'build 'copy-resources
1004 (lambda _
1005 (copy-recursively "src/net/sf/saxon/data"
1006 "build/classes/net/sf/saxon/data"))))))
1007 (native-inputs (list unzip))
1008 (inputs
1009 (list java-axiom-impl
1010 java-dom4j
1011 java-jdom2
1012 java-xom))
1013 (propagated-inputs ;; upstream delivers these in its distribution archive
1014 (list java-apache-xml-commons-resolver
1015 java-jline-2))
1016 (home-page "https://www.saxonica.com/")
1017 (synopsis "Saxon XSLT and XQuery Processor")
1018 (description "Saxon provides a XSLT 3.0, XQuery 3.1, and XPath 3.1
1019processor. This package provides the open source edition, called
1020\"Home Edition (HE)\" for Java. The Home Edition implements
1021aforementioned standards at the basic level of conformance defined by
1022W3C.")
1023 (license license:mpl2.0)))