projects/guix·blob librewolf-updates · refs

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