Add xstream

Julien LepillerSat Sep 16 12:31:41+0200 2017

51c1b3a

Add xstream

more/packages/java.scm

41854185
              (file-name (string-append name "-" version ".tar.gz"))
41864186
              (sha256
41874187
               (base32
4188-
                "0djdw7j66lqjx8bx9zja0hsx10c6nsj3z0z20jmavwfr6bpp0345"))))
4188+
                "04dp7hx84c955w5g4ry7kbjaz74appczia8fz5r8pydwhwzl8fgw"))))
41894189
    (build-system ant-build-system)
41904190
    (arguments
41914191
     `(#:jar-name (string-append ,name "-" ,version ".jar")

47054705
    (description "")
47064706
    (license license:asl2.0)))
47074707
4708+
(define-public java-jettison
4709+
  (package
4710+
    (name "java-jettison")
4711+
    (version "1.3.7")
4712+
    (source (origin
4713+
              (method url-fetch)
4714+
              (uri (string-append "https://github.com/codehaus/jettison/archive/"
4715+
                                  "jettison-" version ".tar.gz"))
4716+
              (sha256
4717+
               (base32
4718+
                "0rdhfyxywvga5wiwasc04iqnxyixn3rd8wj01c9ymhvwc3h6dpqg"))))
4719+
    (build-system ant-build-system)
4720+
    (arguments
4721+
     `(#:jar-name "jettison.jar"
4722+
       #:source-dir "src/main/java"
4723+
       #:test-exclude (list "**/Abstract*.java"
4724+
                            ;; Abstract class
4725+
                            "**/DOMTest.java"
4726+
                            "**/BadgerFishDOMTest.java"
4727+
                            "**/MappedDOMTest.java")))
4728+
    (native-inputs
4729+
     `(("junit" ,java-junit)))
4730+
    (home-page "")
4731+
    (synopsis "")
4732+
    (description "")
4733+
    (license license:asl2.0)))
4734+
4735+
;(define-public java-xml-commons
4736+
;  (package
4737+
;    (name "java-xml-commons")
4738+
;    (version "1.4.01")
4739+
;    (source (origin
4740+
;              (method url-fetch)
4741+
;              (uri (string-append "mirror://apache/xerces/xml-commons/source/"
4742+
;                                  "xml-commons-external-" version "-src.tar.gz"))
4743+
;              (sha256
4744+
;               (base32
4745+
;                "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
4746+
;    (build-system ant-build-system)
4747+
;    (arguments
4748+
;     `(#:jar-name "xml-commons.jar"
4749+
;       #:source-dir "."
4750+
;       #:tests? #f)); no tests
4751+
;    (home-page "")
4752+
;    (synopsis "")
4753+
;    (description "")
4754+
;    (license (list license:asl2.0; apache/...
4755+
;                   license:public-domain; sax/...
4756+
;                   license:bsd-3; w3c/...
4757+
;                   ))))
4758+
;;; actually http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
4759+
4760+
(define-public java-apache-xml-commons-resolver
4761+
  (package
4762+
    (name "java-apache-xml-commons-resolver")
4763+
    (version "1.2")
4764+
    (source
4765+
     (origin
4766+
       (method url-fetch)
4767+
       (uri (string-append "mirror://apache/xerces/xml-commons/"
4768+
                           "xml-commons-resolver-" version ".tar.gz"))
4769+
       (sha256
4770+
        (base32 "1zhy4anc3fg9f8y348bj88vmab15aavrg6nf419ifb25asyygnsm"))
4771+
       (modules '((guix build utils)))
4772+
       (snippet
4773+
        '(begin
4774+
           (for-each delete-file (find-files "." ".*\\.(jar|zip)"))
4775+
           #t))))
4776+
    (build-system ant-build-system)
4777+
    (arguments
4778+
     `(#:jar-name (string-append "xml-resolver.jar")
4779+
       #:tests? #f)); no tests
4780+
    (native-inputs
4781+
     `(("junit" ,java-junit)))
4782+
    (home-page "http://xerces.apache.org/xml-commons/")
4783+
    (synopsis "")
4784+
    (description "TODO")
4785+
    (license license:asl2.0)))
4786+
4787+
(define-public java-jaxp
4788+
  (package
4789+
    (name "java-jaxp")
4790+
    (version "1.4.01")
4791+
    (source
4792+
     (origin
4793+
       (method url-fetch)
4794+
       (uri (string-append "mirror://apache/xerces/xml-commons/source/"
4795+
                           "xml-commons-external-" version "-src.tar.gz"))
4796+
       (sha256
4797+
        (base32 "0rhq32a7dl9yik7zx9h0naz2iz068qgcdiayak91wp4wr26xhjyk"))))
4798+
    (build-system ant-build-system)
4799+
    (arguments
4800+
     `(#:jar-name "jaxp.jar"
4801+
       #:jdk ,icedtea-8
4802+
       #:source-dir "."
4803+
       #:tests? #f)); no tests
4804+
    ;; TODO: Debian builds several jars out of this: jaxp-1.4.jar,
4805+
    ;; xml-apis.jar and xml-apis-1.4.01.jar. Additionally it adds maven-repo
4806+
    ;; data (.pom). The poms get fetch directly using wget, see
4807+
    ;; <https://anonscm.debian.org/viewvc/pkg-java/trunk/libjaxp1.3-java/debian/rules?revision=15402&view=markup>
4808+
    (home-page "http://xerces.apache.org/xml-commons/")
4809+
    (synopsis "Java XML parser and transformer APIs (DOM, SAX, JAXP, TrAX)")
4810+
    (description "xml-apis.jar from the Apache XML Commons project is used by
4811+
the Xerces-J XML parser and Xalan-J XSLT processor and specifies these APIs:
4812+
4813+
@begin{itemize}
4814+
@item Document Object Model (DOM) level 3
4815+
@item Simple API for XML (SAX) 2.0.2
4816+
@item Java APIs for XML Processing (JAXP) 1.3.04
4817+
@item Transformation API for XML (TrAX) 1.3.04
4818+
@item Document Object Model (DOM) Level 3 Load and Save
4819+
@item JSR 206 Java API for XML Processing 1.3
4820+
@end{itemize}
4821+
4822+
These classes are also used in Sun's reference implementation. A GPL'ed
4823+
implementation of these APIs can be found in the java-gnujaxp package. ")
4824+
    (license license:asl2.0)))
4825+
4826+
(define-public java-xerces
4827+
  (package
4828+
    (name "java-xerces")
4829+
    (version "2.11.0")
4830+
    (source
4831+
     (origin
4832+
       (method url-fetch)
4833+
       (uri (string-append "mirror://apache/xerces/j/source/"
4834+
                           "Xerces-J-src." version ".tar.gz"))
4835+
       (sha256
4836+
        (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
4837+
       (patches (search-patches 
4838+
                 "java-xerces-xjavac_taskdef.patch"
4839+
                 "java-xerces-build_dont_unzip.patch"
4840+
                 "java-xerces-bootclasspath.patch"
4841+
                 "java-xerces-manifest_classpath.patch"))))
4842+
    (build-system ant-build-system)
4843+
    (arguments
4844+
     `(#:tests? #f
4845+
       #:jdk ,icedtea-8
4846+
       #:phases
4847+
       (modify-phases %standard-phases
4848+
         (add-after 'unpack 'create-build.properties
4849+
          (lambda* (#:key inputs #:allow-other-keys)
4850+
            (let ((jaxp (assoc-ref inputs "java-jaxp"))
4851+
                  (resolver (assoc-ref inputs "resolver")))
4852+
              (with-output-to-file "build.properties"
4853+
                (lambda _
4854+
                  (format #t
4855+
                   "jar.jaxp = ~a/share/java/jaxp.jar~@
4856+
                   jar.apis-ext = ~a/share/java/jaxp.jar~@
4857+
                   jar.resolver = ~a/share/java/xml-resolver.jar~%"
4858+
                   jaxp jaxp resolver))))))
4859+
         (replace 'install (install-jars "build")))))
4860+
    (native-inputs
4861+
     `(("resolver" ,java-apache-xml-commons-resolver)
4862+
       ("java-jaxp" ,java-jaxp)))
4863+
    (home-page "https://xerces.apache.org/xerces2-j/")
4864+
    (synopsis "Validating XML parser for Java with DOM level 3 support")
4865+
    (description "The Xerces2 Java parser is the reference implementation of
4866+
XNI, the Xerces Native Interface, and also a fully conforming XML Schema
4867+
processor.
4868+
4869+
Xerces2-J supports the following standards and APIs:
4870+
4871+
 * eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
4872+
 * Namespaces in XML Recommendation
4873+
 * Document Object Model (DOM) Level 2 Core, Events, and Traversal and
4874+
   Range Recommendations
4875+
 * Simple API for XML (SAX) 2.0.1 Core and Extension
4876+
 * Java APIs for XML Processing (JAXP) 1.2.01
4877+
 * XML Schema 1.0 Structures and Datatypes Recommendations
4878+
 * Experimental implementation of the Document Object Model (DOM) Level 3
4879+
   Core and Load/Save Working Drafts
4880+
 * Provides a partial implementation of the XML Inclusions (XInclude) W3C
4881+
   Candidate Recommendation
4882+
4883+
Xerces is now able to parse documents written according to the XML 1.1
4884+
Candidate Recommendation, except that it does not yet provide an option to
4885+
enable normalization checking as described in section 2.13 of this
4886+
specification. It also handles namespaces according to the XML Namespaces 1.1
4887+
Candidate Recommendation, and will correctly serialize XML 1.1 documents if
4888+
the DOM level 3 load/save API's are in use.
4889+
4890+
TODO Verify signature")
4891+
    (license license:asl2.0)))
4892+
4893+
;; This is very old (2002)!
4894+
(define-public java-xmlpull
4895+
  (package
4896+
    (name "java-xmlpull")
4897+
    (version "1.0.5")
4898+
    (source (origin
4899+
              (method url-fetch)
4900+
              (uri (string-append "http://www.xmlpull.org/v1/download/xmlpull_"
4901+
                                  (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
4902+
                                  "_src.tgz"))
4903+
              (sha256
4904+
               (base32
4905+
                "1m2gymkvvpclz6x6f3vz3xkh00p94d28iy6k1j54nklf5crm979p"))))
4906+
    (build-system ant-build-system)
4907+
    (arguments
4908+
     `(#:tests? #f; no tests
4909+
       #:phases
4910+
       (modify-phases %standard-phases
4911+
         (replace 'install
4912+
           (lambda* (#:key outputs #:allow-other-keys)
4913+
             (let ((out (string-append (assoc-ref outputs "out") "/share/java")))
4914+
               (mkdir-p out)
4915+
               (copy-file "build/lib/xmlpull_1_0_5.jar"
4916+
                          (string-append out "/xmlpull.jar"))))))))
4917+
    (home-page "http://www.xmlpull.org/")
4918+
    (synopsis "")
4919+
    (description "")
4920+
    (license license:public-domain)))
4921+
4922+
(define-public java-xmlpull2
4923+
  (package
4924+
    (name "java-xmlpull2")
4925+
    (version "2.1.10")
4926+
    (source (origin
4927+
              (method url-fetch)
4928+
              (uri (string-append "http://www.extreme.indiana.edu/xgws/xsoap/"
4929+
                                  "PullParser/PullParser" version ".tgz"))
4930+
              (sha256
4931+
               (base32
4932+
                "1kw9nhyqb7bzhn2zjbwlpi5vp5rzj89amzi3hadw2acyh2dmd0md"))
4933+
              (modules '((guix build utils)))
4934+
              (snippet
4935+
                '(begin ;; Delete bundled jar archives.
4936+
                   (for-each delete-file (find-files "." ".*\\.jar"))
4937+
                   #t))))
4938+
    (build-system ant-build-system)
4939+
    (arguments
4940+
     `(#:tests? #f; no tests
4941+
       #:build-target "impl"
4942+
       #:phases
4943+
       (modify-phases %standard-phases
4944+
         (replace 'install
4945+
           (lambda* (#:key outputs #:allow-other-keys)
4946+
             (let ((out (string-append (assoc-ref outputs "out") "/share/java")))
4947+
               (mkdir-p out)
4948+
               (copy-file "build/lib/PullParser-standard-2.1.10.jar"
4949+
                          (string-append out "/xmlpull2-standard.jar"))
4950+
               (copy-file "build/lib/PullParser-2.1.10.jar"
4951+
                          (string-append out "/xmlpull2.jar"))))))))
4952+
    (home-page ""); No available homepage
4953+
    (synopsis "")
4954+
    (description "")
4955+
    (license license:public-domain)))
4956+
4957+
(define-public java-xpp3
4958+
  (package
4959+
    (name "java-xpp3")
4960+
    (version "1.1.4")
4961+
    (source (origin
4962+
              (method url-fetch)
4963+
              (uri (string-append "http://www.extreme.indiana.edu/dist/"
4964+
                                  "java-repository/xpp3/distributions/xpp3-"
4965+
                                  version "_src.tgz"))
4966+
              (sha256
4967+
               (base32
4968+
                "1b99zrhyij5qwyhilyjdl1ykxvhk902vsvflh6gx4fir8hfvdl5p"))
4969+
              (modules '((guix build utils)))
4970+
              (snippet
4971+
                '(begin ;; Delete bundled jar archives.
4972+
                   (for-each delete-file (find-files "." ".*\\.jar"))
4973+
                   #t))))
4974+
    (build-system ant-build-system)
4975+
    (arguments
4976+
     `(#:tests? #f; no tests
4977+
       #:build-target "jar"
4978+
       #:phases
4979+
       (modify-phases %standard-phases
4980+
         (replace 'install
4981+
           (lambda* (#:key outputs #:allow-other-keys)
4982+
             (let ((out (string-append (assoc-ref outputs "out") "/share/java")))
4983+
               (mkdir-p out)
4984+
               (copy-file (string-append "build/xpp3-" ,version ".jar")
4985+
                          (string-append out "/xpp3.jar"))))))))
4986+
    (home-page ""); No available homepage
4987+
    (synopsis "")
4988+
    (description "")
4989+
    (license license:public-domain)))
4990+
4991+
;; for com.sun.msv
4992+
(define-public java-xsdlib
4993+
  (package
4994+
    (name "java-xsdlib")
4995+
    (version "2013.2")
4996+
    (source (origin
4997+
              (method url-fetch)
4998+
              (uri (string-append "http://central.maven.org/maven2/com/sun/msv/"
4999+
                                  "datatype/xsd/xsdlib/" version "/xsdlib-"
5000+
                                  version "-sources.jar"))
5001+
              (sha256
5002+
               (base32
5003+
                "185i48p1xp09wbq03i9zgfl701qa262rq46yf4cajzmk3336kqim"))))
5004+
    (build-system ant-build-system)
5005+
    (arguments
5006+
     `(#:tests? #f; no tests
5007+
       #:jar-name "xsdlib.jar"
5008+
       #:jdk ,icedtea-8))
5009+
    (inputs
5010+
     `(("xerces" ,java-xerces)))
5011+
    (home-page "")
5012+
    (synopsis "")
5013+
    (description "")
5014+
    (license license:bsd-2)))
5015+
5016+
(define-public java-commons-bcel
5017+
  (package
5018+
    (name "java-commons-bcel")
5019+
    (version "6.0")
5020+
    (source (origin
5021+
              (method url-fetch)
5022+
              (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
5023+
                                  version "-src.tar.gz"))
5024+
              (sha256
5025+
               (base32
5026+
                "0n39601zcj7ymjihfv53r260mf3n8kj6bqhxv90dw5sgc7qbjqxr"))))
5027+
    (build-system ant-build-system)
5028+
    (arguments
5029+
     `(#:jar-name "commons-bcel.jar"
5030+
       #:jdk ,icedtea-8
5031+
       #:source-dir "src/main/java"
5032+
       ;; FIXME: requires org.openjdk.jmh.* and com.sun.jna.platform.win32 for tests
5033+
       #:tests? #f))
5034+
    (native-inputs
5035+
     `(("junit" ,java-junit)
5036+
       ("collections" ,java-commons-collections4)
5037+
       ("lang3" ,java-commons-lang3)
5038+
       ("io" ,java-commons-io)))
5039+
    (home-page "https://commons.apache.org/proper/commons-bcel/")
5040+
    (synopsis "")
5041+
    (description "")
5042+
    (license license:asl2.0)))
5043+
5044+
;(define-public java-jflex
5045+
;  (package
5046+
;    (name "java-jflex")
5047+
;    (version "1.6.1")
5048+
;    (source (origin
5049+
;              (method url-fetch)
5050+
;              (uri (string-append "https://github.com/jflex-de/jflex/archive/"
5051+
;                                  version ".tar.gz"))
5052+
;              (sha256
5053+
;               (base32
5054+
;                "1wdfx4yl8cy2karbm4vpmk29xjlv6vn8y9b0sgfax26bl0bx7zxs"))))
5055+
;    (build-system ant-build-system)
5056+
;    (arguments
5057+
;     `(#:jar-name "jflex.jar"
5058+
;       #:jdk ,icedtea-8
5059+
;       #:source-dir "jflex/src/main/java"
5060+
;       #:test-dir "jflex/src/test"))
5061+
;    (home-page "jflex.de")
5062+
;    (synopsis "")
5063+
;    (description "")
5064+
;    (license license:bsd-3)))
5065+
5066+
(define-public java-cup-runtime
5067+
  (package
5068+
    (name "java-cup-runtime")
5069+
    (version "11b")
5070+
    (source (origin
5071+
              (method git-fetch)
5072+
              (uri (git-reference
5073+
                     (url "https://versioncontrolseidl.in.tum.de/parsergenerators/cup.git")
5074+
                     (commit "fe729fe8c27441f046dab19135a38b9dde4c4e5e")))
5075+
              (sha256
5076+
               (base32
5077+
                "09xigxm7b44hz79xhqpfykvjrk4q90p33j2l07w69izx9sn0y42b"))
5078+
              (modules '((guix build utils)))
5079+
              (snippet
5080+
                '(begin ;; Delete bundled jar archives.
5081+
                   (for-each delete-file (find-files "." ".*\\.jar"))
5082+
                   (for-each delete-file (find-files "." ".*\\.tar.gz"))
5083+
                   #t))))
5084+
    (build-system ant-build-system)
5085+
    (arguments
5086+
     `(#:jar-name "cup-runtime.jar"
5087+
       #:source-dir "src/java/java_cup/runtime"
5088+
       #:tests? #f; no tests for runtime
5089+
       #:phases
5090+
       (modify-phases %standard-phases
5091+
         (add-before 'configure 'remove-build-xml
5092+
           (lambda _
5093+
             (delete-file "build.xml"))))))
5094+
    (home-page "http://www2.cs.tum.edu/projects/cup")
5095+
    (synopsis "")
5096+
    (description "")
5097+
    (license license:expat))); http://www2.cs.tum.edu/projects/cup/licence.html
5098+
5099+
;; Requires java-cup, but it requires jflex which in turn requires java-cup.
5100+
(define-public java-xalan
5101+
  (package
5102+
    (name "java-xalan")
5103+
    (version "2.7.2")
5104+
    (source (origin
5105+
              (method url-fetch)
5106+
              (uri (string-append "mirror://apache/xalan/xalan-j/source/xalan-j_"
5107+
                                  (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
5108+
                                  "-src.tar.gz"))
5109+
              (sha256
5110+
               (base32
5111+
                "166vg9i11qzi0vbv09abfb50q8caq8wr6zrwg0cwqws9k394l62w"))
5112+
              (modules '((guix build utils)))
5113+
              (snippet
5114+
                '(begin ;; Delete bundled jar archives.
5115+
                   (for-each delete-file (find-files "." ".*\\.jar"))
5116+
                   (for-each delete-file (find-files "." ".*\\.tar.gz"))
5117+
                   #t))))
5118+
    (build-system ant-build-system)
5119+
    (arguments
5120+
     `(#:jar-name "xalan.jar"
5121+
       #:jdk ,icedtea-8
5122+
       #:tests? #f)); no tests
5123+
    (inputs
5124+
     `(("bcel" ,java-commons-bcel)
5125+
       ("xerces" ,java-xerces)))
5126+
    (home-page "")
5127+
    (synopsis "")
5128+
    (description "")
5129+
    (license license:bsd-2)))
5130+
5131+
(define-public java-dom4j
5132+
  (package
5133+
    (name "java-dom4j")
5134+
    (version "2.0.1")
5135+
    (source (origin
5136+
              (method url-fetch)
5137+
              (uri (string-append "https://github.com/dom4j/dom4j/archive/"
5138+
                                  "version-" version ".tar.gz"))
5139+
              (file-name (string-append name "-" version ".tar.gz"))
5140+
              (sha256
5141+
               (base32
5142+
                "04snvb8m4290l0z1nkzdhlgxhfzi36wfkk674fn90q75s80s72j6"))
5143+
              (modules '((guix build utils)))
5144+
              (snippet
5145+
                '(begin ;; Delete bundled jar archives.
5146+
                   (for-each delete-file (find-files "." ".*\\.jar"))
5147+
                   #t))))
5148+
    (build-system ant-build-system)
5149+
    (arguments
5150+
     `(#:jar-name "dom4j.jar"
5151+
       #:jdk ,icedtea-8
5152+
       #:source-dir "src/main/java"
5153+
       #:tests? #f; we can't build xalan
5154+
       #:phases
5155+
       (modify-phases %standard-phases
5156+
         (add-before 'build 'copy-jaxen-sources
5157+
           (lambda* (#:key inputs #:allow-other-keys)
5158+
             (mkdir-p "jaxen-sources")
5159+
             (with-directory-excursion "jaxen-sources"
5160+
               (system* "jar" "xf" (assoc-ref inputs "jaxen-sources")))
5161+
             (mkdir-p "src/main/java/org/jaxen/dom4j")
5162+
             (copy-file "jaxen-sources/org/jaxen/dom4j/DocumentNavigator.java"
5163+
                        "src/main/java/org/jaxen/dom4j/DocumentNavigator.java")
5164+
             (copy-file "jaxen-sources/org/jaxen/dom4j/Dom4jXPath.java"
5165+
                        "src/main/java/org/jaxen/dom4j/Dom4jXPath.java")))
5166+
         (add-before 'build 'fix-old-xpp2
5167+
           (lambda _
5168+
             ;; This package normally depends on xpp2 2.0, but we can only package
5169+
             ;; version 2.1.10.
5170+
             (substitute* "src/main/java/org/dom4j/xpp/ProxyXmlStartTag.java"
5171+
               (("public void resetStartTag")
5172+
                (string-append
5173+
                  "public boolean removeAttributeByRawName(String name) {\n"
5174+
                  "  return false;\n"
5175+
                  "}\n"
5176+
                  "public boolean removeAttributeByName(String name, String name2) {\n"
5177+
                  "  return false;\n"
5178+
                  "}\n"
5179+
                  "\n"
5180+
                  "public void resetStartTag"))
5181+
               (("Atttribute") "Attribute")))))))
5182+
    (inputs
5183+
     `(("jaxen" ,java-jaxen-no-rec-deps)
5184+
       ("jaxen-sources" ,(package-source java-jaxen-no-rec-deps))
5185+
       ("xmlpull" ,java-xmlpull)
5186+
       ("xmlpull2" ,java-xmlpull2)
5187+
       ("xsdlib" ,java-xsdlib)))
5188+
    (native-inputs
5189+
     `(("testng" ,java-testng)
5190+
       ("xerces" ,java-xerces)))
5191+
    (home-page "https://github.com/dom4j/dom4j/")
5192+
    ; Note: dom4j.org is outdated
5193+
    (synopsis "Flexible XML framework for Java")
5194+
    (description "")
5195+
    (license license:expat))) ;; TODO: some 4-clause license
5196+
5197+
(define-public java-jaxen-no-rec-deps
5198+
  (package
5199+
    (name "java-jaxen-no-rec-deps")
5200+
    (version "1.1.6")
5201+
    (source (origin
5202+
              (method url-fetch)
5203+
              (uri (string-append "https://repo1.maven.org/maven2/jaxen/jaxen/"
5204+
                                  version "/jaxen-" version "-sources.jar"))
5205+
              (sha256
5206+
               (base32
5207+
                "18pa8mks3gfhazmkyil8wsp6j1g1x7rggqxfv4k2mnixkrj5x1kx"))))
5208+
    (build-system ant-build-system)
5209+
    (arguments
5210+
     `(#:jar-name "jaxen.jar"
5211+
       #:source-dir "src"
5212+
       #:tests? #f; no tests
5213+
       #:phases
5214+
       (modify-phases %standard-phases
5215+
         (add-before 'build 'remove-dom4j
5216+
           (lambda _
5217+
             (delete-file-recursively "src/org/jaxen/dom4j")
5218+
             (delete-file-recursively "src/org/jaxen/xom"))))))
5219+
    (inputs
5220+
     `(("jdom" ,java-jdom)))
5221+
    (home-page "")
5222+
    (synopsis "")
5223+
    (description "")
5224+
    (license license:bsd-3)))
5225+
5226+
(define-public java-jaxen
5227+
  (package
5228+
    (inherit java-jaxen-no-rec-deps)
5229+
    (name "java-jaxen")
5230+
    (inputs
5231+
     `(("jodm" ,java-jdom)
5232+
       ("xom" ,java-xom)
5233+
       ("dom4j" ,java-dom4j)))))
5234+
5235+
(define-public java-xom
5236+
  (package
5237+
    (name "java-xom")
5238+
    (version "127")
5239+
    (source (origin
5240+
              (method url-fetch)
5241+
              (uri (string-append "https://github.com/elharo/xom/archive/XOM_"
5242+
                                  version ".tar.gz"))
5243+
              (sha256
5244+
               (base32
5245+
                "04m69db1irqja12a9rfxrac8cbn9psqa1k136wh4ls4pxfsdr5wg"))
5246+
              (modules '((guix build utils)))
5247+
              (snippet
5248+
               '(begin
5249+
                  (for-each delete-file
5250+
                            (find-files "." "\\.jar$"))
5251+
                  #t))))
5252+
    (build-system ant-build-system)
5253+
    (arguments
5254+
     `(#:jar-name "xom.jar"
5255+
       #:jdk ,icedtea-8
5256+
       #:tests? #f; no tests
5257+
       #:phases
5258+
       (modify-phases %standard-phases
5259+
         (add-before 'configure 'fix-tagsoup-dep
5260+
           (lambda _
5261+
             (delete-file "src/nu/xom/tools/XHTMLJavaDoc.java"))))))
5262+
    (inputs
5263+
     `(("jdom" ,java-jdom)
5264+
       ("junit" ,java-junit)
5265+
       ("servlet" ,java-tomcat)
5266+
       ("jaxen" ,java-jaxen-no-rec-deps)
5267+
       ("xerces" ,java-xerces)))
5268+
    (home-page "")
5269+
    (synopsis "")
5270+
    (description "")
5271+
    (license license:lgpl2.1)))
5272+
5273+
(define-public java-kxml2
5274+
  (package
5275+
    (name "java-kxml2")
5276+
    (version "2.4.1")
5277+
    (source (origin
5278+
              (method url-fetch)
5279+
              (uri (string-append "https://github.com/stefanhaustein/kxml2/archive/v"
5280+
                                  version ".tar.gz"))
5281+
              (file-name (string-append name "-" version ".tar.gz"))
5282+
              (sha256
5283+
               (base32
5284+
                "0afahxsifpxgwyp3ybr1ablfwswxw8n2msfhsrrj22rpb3yzai3x"))))
5285+
    (build-system ant-build-system)
5286+
    (arguments
5287+
     `(#:jar-name "kxml2.jar"
5288+
       #:tests? #f)); no tests
5289+
    (inputs
5290+
     `(("xmlpull" ,java-xpp3)))
5291+
    (home-page "http://kxml.org")
5292+
    (synopsis "")
5293+
    (description "")
5294+
    (license license:expat)))
5295+
5296+
(define-public java-stax
5297+
  (package
5298+
    (name "java-stax")
5299+
    (version "1.2.0")
5300+
    (source (origin
5301+
              (method url-fetch)
5302+
              (uri (string-append "https://repo1.maven.org/maven2/stax/stax/"
5303+
                                  version "/stax-" version "-sources.jar"))
5304+
              (sha256
5305+
               (base32
5306+
                "04ba4qvbrps45j8bldbakxq31k7gjlsay9pppa9yn13fr00q586z"))))
5307+
    (build-system ant-build-system)
5308+
    (arguments
5309+
     `(#:jar-name "stax.jar"
5310+
       #:tests? #f; no tests
5311+
       #:phases
5312+
       (modify-phases %standard-phases
5313+
         (add-before 'configure 'fix-utf8
5314+
           (lambda _
5315+
             (with-fluids ((%default-port-encoding "ISO-8859-1"))
5316+
               (substitute* "src/com/wutka/dtd/Scanner.java"
5317+
                 (("//.*") "\n"))))))))
5318+
    (home-page "")
5319+
    (synopsis "")
5320+
    (description "")
5321+
    (license license:asl2.0)))
5322+
47085323
(define-public java-xstream
47095324
  (package
47105325
    (name "java-xstream")

47225337
    (arguments
47235338
     `(#:jar-name (string-append ,name "-" ,version ".jar")
47245339
       #:tests? #f
5340+
       #:jdk ,icedtea-8
47255341
       #:source-dir "xstream/src/java"))
5342+
    (inputs
5343+
     `(("jdom" ,java-jdom)
5344+
       ("jdom2" ,java-jdom2)
5345+
       ("cglib" ,java-cglib)
5346+
       ("time" ,java-joda-time)
5347+
       ("jettison" ,java-jettison)
5348+
       ("xom" ,java-xom)
5349+
       ("xmlpull3" ,java-xpp3)
5350+
       ("dom4j" ,java-dom4j)
5351+
       ("stax2" ,java-stax2-api)
5352+
       ("woodstox" ,java-woodstox-core)
5353+
       ("kxml2" ,java-kxml2)
5354+
       ("stax" ,java-stax)))
47265355
    (native-inputs
47275356
     `(("unzip" ,unzip)))
47285357
    (home-page "https://x-stream.github.io")

47745403
     `(#:jar-name "groovy.jar"
47755404
       #:tests? #f))
47765405
    (native-inputs
4777-
     `(("junit" ,java-junit)))
5406+
     `(("junit" ,java-junit)
5407+
       ("antlr" ,antlr2)))
47785408
    (inputs
47795409
     `(("commons-cli" ,java-commons-cli)
4780-
       ("antlr" ,antlr3)
4781-
       ("asm" ,java-asm)))
5410+
       ("asm" ,java-asm)
5411+
       ("servlet" ,java-tomcat)
5412+
       ("xstream" ,java-xstream)))
47825413
    (home-page "")
47835414
    (synopsis "")
47845415
    (description "")

47865417
                   ;; actually CDDL 1.1
47875418
                   license:cddl1.0))))
47885419
4789-
;; requires jline, javax.servlet, org.fusesource.jansi, org.livetribe,
5420+
;; requires jline, org.fusesource.jansi, org.livetribe,
47905421
;;   com.thoughtworks.xstream, org.apache.ivy, bsf
4791-
;;   antlr
47925422
(define-public groovy-1.8.9
47935423
  (package
47945424
    (inherit groovy)

48115441
         (add-before 'build 'generate-parser
48125442
           (lambda _
48135443
             (with-directory-excursion "src/main/org/codehaus/groovy/antlr/java"
4814-
               (zero? (system* "antlr4" "java.g"))))))))))
5444+
               (zero? (system* "antlr" "java.g"))))))))))
48155445
48165446
(define-public groovy-1.0
48175447
  (package

48295459
    (arguments
48305460
     `(#:jar-name (string-append ,name "-" ,version ".jar")
48315461
       #:tests? #f
4832-
       #:source-dir "src/main/java"
5462+
       #:source-dir "src/main"
48335463
       #:phases
48345464
       (modify-phases %standard-phases
48355465
         (add-before 'build 'generate-parser
48365466
           (lambda _
48375467
             (with-directory-excursion "src/main/org/codehaus/groovy/antlr"
4838-
               (zero? (system* "antlr3" "groovy.g"))))))))))
5468+
               (zero? (system* "antlr" "groovy.g"))))))))))
48395469
48405470
48415471
;(define-public antlr3-3.4

49985628
              (file-name (string-append name "-" version ".tar.gz"))
49995629
              (sha256
50005630
               (base32
5001-
                "0y7lzkvx9wbbmwg45mb4icx7i66z6894qfygrbbs26sr5xxyml9h"))))
5631+
                "0y7lzkvx9wbbmwg45mb4icx7i66z6894qfygrbbs26sr5xxyml9h"))
5632+
              (patches
5633+
                (search-patches "java-antlr4-Add-standalone-generator.patch"))))
50025634
    (build-system ant-build-system)
50035635
    (arguments
50045636
     `(#:jar-name (string-append ,name "-" ,version ".jar")

50075639
       #:tests? #f
50085640
       #:phases
50095641
       (modify-phases %standard-phases
5642+
         (add-after 'install 'bin-install
5643+
           (lambda* (#:key inputs outputs #:allow-other-keys)
5644+
             (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5645+
                   (bin (string-append (assoc-ref outputs "out") "/bin")))
5646+
               (mkdir-p bin)
5647+
               (with-output-to-file (string-append bin "/antlr4")
5648+
                 (lambda _
5649+
                   (display
5650+
                     (string-append "#!" (which "sh") "\n"
5651+
                                    "java -cp " jar "/" ,name "-" ,version ".jar:"
5652+
                                    (string-concatenate
5653+
                                      (find-files (assoc-ref inputs "stringtemplate")
5654+
                                                  ".*\\.jar"))
5655+
                                    ":"
5656+
                                    (string-concatenate
5657+
                                      (find-files (assoc-ref inputs "stringtemplate4")
5658+
                                                  ".*\\.jar"))
5659+
                                    ":"
5660+
                                    (string-concatenate
5661+
                                      (find-files (assoc-ref inputs "antlr3")
5662+
                                                  ".*\\.jar"))
5663+
                                    " org.antlr.v4.Tool $*"))))
5664+
               (chmod (string-append bin "/antlr4") #o755))))
5665+
         (add-before 'build 'copy-resources
5666+
           (lambda _
5667+
             (copy-recursively "tool/resources/" "build/classes")))
5668+
         (add-before 'build 'generate-unicode
5669+
           (lambda _
5670+
             (and
5671+
               ;; First: build the generator
5672+
               (zero? (system*
5673+
                        "javac" "-cp" (getenv "CLASSPATH")
5674+
                        "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
5675+
                        "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java"))
5676+
               ;; Then use it
5677+
               (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
5678+
                                                           ":tool/src:runtime/Java")
5679+
                               "org.antlr.v4.unicode.UnicodeRenderer"
5680+
                               "tool/resources/org/antlr/v4/tool/templates"
5681+
                               "unicodedata"
5682+
                               "tool/src/org/antlr/v4/unicode/UnicodeData.java"))
5683+
               (begin
5684+
                 ;; It seems there is a bug with our ST4
5685+
                 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
5686+
                   (("\\\\>") ">"))
5687+
                 ;; Remove the additional file
5688+
                 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
5689+
                 #t))))
50105690
         (add-before 'build 'generate-grammar
50115691
           (lambda* (#:key inputs #:allow-other-keys)
50125692
             (with-directory-excursion "tool/src/org/antlr/v4/parse"

50265706
       ("java-json" ,java-json)
50275707
       ("treelayout" ,java-treelayout)
50285708
       ("stringtemplate4" ,java-stringtemplate)))
5709+
    (native-inputs
5710+
     `(("runtime" ,java-antlr4-runtime)))
50295711
    (home-page "https://antlr.org")
50305712
    (synopsis "")
50315713
    (description "")
50325714
    (license license:bsd-3)))
50335715
5716+
(define-public java-antlr4-runtime
5717+
  (package
5718+
    (inherit java-antlr4)
5719+
    (name "java-antlr4-runtime")
5720+
    (arguments
5721+
     `(#:jar-name "java-antlr4-runtime.jar"
5722+
       #:source-dir "runtime/Java/src/org"
5723+
       #:tests? #f
5724+
       #:jdk ,icedtea-8))
5725+
    (native-inputs '())))
5726+
50345727
;; requires groovy 2.4.7.
50355728
;(define-public gradle
50365729
;  (package