gnu: Add java-xmlunit.
[jackhill/guix/guix.git] / gnu / packages / java.scm
index 8dd6356..edc6f2a 100644 (file)
@@ -5,7 +5,7 @@
 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
-;;; Copyright © 2016, 2017 Alex Vong <alexvong1995@gmail.com>
+;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -1833,15 +1833,15 @@ IcedTea build harness.")
                         (snippet remove-archives)))))
     (package
       (name "clojure")
-      (version "1.8.0")
+      (version "1.9.0")
       (source
        (origin
          (method url-fetch)
          (uri
-          (string-append "http://repo1.maven.org/maven2/org/clojure/clojure/"
-                         version "/clojure-" version ".zip"))
+          (string-append "https://github.com/clojure/clojure/archive/clojure-"
+                         version ".tar.gz"))
          (sha256
-          (base32 "1nip095fz5c492sw15skril60i1vd21ibg6szin4jcvyy3xr6cym"))
+          (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
          (modules '((guix build utils)))
          (snippet remove-archives)))
       (build-system ant-build-system)
@@ -1871,12 +1871,12 @@ IcedTea build harness.")
                         (error "failed to unpack tarball" name)))
                   (copy-recursively (string-append name "/src/main/clojure/")
                                     "src/clj/"))
-                '("data-generators-src"
-                  "java-classpath-src"
+                '("core-specs-alpha-src"
+                  "data-generators-src"
+                  "spec-alpha-src"
                   "test-check-src"
                   "test-generative-src"
-                  "tools-namespace-src"
-                  "tools-reader-src"))
+                  "tools-namespace-src"))
                #t))
            ;; The javadoc target is not built by default.
            (add-after 'build 'build-doc
@@ -1908,14 +1908,18 @@ IcedTea build harness.")
                  #t))))))
       ;; The native-inputs below are needed to run the tests.
       (native-inputs
-       `(("data-generators-src"
+       `(("core-specs-alpha-src"
+          ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
+                      "0.1.24"
+                      "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
+         ("data-generators-src"
           ,(submodule "data.generators/archive/data.generators-"
                       "0.1.2"
                       "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
-         ("java-classpath-src"
-          ,(submodule "java.classpath/archive/java.classpath-"
-                      "0.2.3"
-                      "0sjymly9xh1lkvwn5ygygpsfwz4dabblnlq0c9bx76rkvq62fyng"))
+         ("spec-alpha-src"
+          ,(submodule "spec.alpha/archive/spec.alpha-"
+                      "0.1.143"
+                      "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
          ("test-check-src"
           ,(submodule "test.check/archive/test.check-"
                       "0.9.0"
@@ -1927,11 +1931,7 @@ IcedTea build harness.")
          ("tools-namespace-src"
           ,(submodule "tools.namespace/archive/tools.namespace-"
                       "0.2.11"
-                      "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))
-         ("tools-reader-src"
-          ,(submodule "tools.reader/archive/tools.reader-"
-                      "1.0.0"
-                      "1lafblmmj4hkg0aqrf19qkdw9wdcsh3qxmn6cbkmnzbhffpyv2lv"))))
+                      "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
       (home-page "https://clojure.org/")
       (synopsis "Lisp dialect running on the JVM")
       (description "Clojure is a dynamic, general-purpose programming language,
@@ -3841,7 +3841,7 @@ Custom formats can be created using a fluent style API.")
     (arguments
      `(#:tests? #f ; no tests
        #:jar-name "osgi-annotation.jar"))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Annotation module of OSGi framework")
     (description
      "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -3868,7 +3868,7 @@ components.")
        #:jar-name "osgi-core.jar"))
     (inputs
      `(("java-osgi-annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Core module of OSGi framework")
     (description
      "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -3896,7 +3896,7 @@ the OSGi Core module.")
     (inputs
      `(("java-osgi-annotation" ,java-osgi-annotation)
        ("java-osgi-core" ,java-osgi-core)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGi service event module")
     (description
      "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5350,7 +5350,7 @@ used to generate this API.")
        ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
        ("microemulator" ,java-microemulator-cldc)
        ("servlet" ,java-classpathx-servletapi)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Compendium specification module of OSGi framework")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5378,7 +5378,7 @@ in compiling bundles.")
        #:tests? #f)); no tests
     (inputs
      `(("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Support annotations for osgi-service-component")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5404,7 +5404,7 @@ the support annotations for osgi-service-component.")
        #:tests? #f)); no tests
     (inputs
      `(("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Data Transfer Objects")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5435,7 +5435,7 @@ objects of the listed types or aggregates.")
     (inputs
      `(("annotation" ,java-osgi-annotation)
        ("dto" ,java-osgi-dto)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI Resource")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5463,7 +5463,7 @@ the definition of common types in osgi packages.")
     (arguments
      `(#:jar-name "osgi-namespace-contract.jar"
        #:tests? #f)); no tests
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Contract Capability and Requirement Namespace")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5491,7 +5491,7 @@ the names for the attributes and directives for a namespace with contracts.")
     (arguments
      `(#:jar-name "osgi-namespace-extendent.jar"
        #:tests? #f)); no tests
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Extender Capability and Requirement Namespace")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5519,7 +5519,7 @@ the names for the attributes and directives for an extender namespace.")
     (arguments
      `(#:jar-name "osgi-namespace-service.jar"
        #:tests? #f)); no tests
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Service Capability and Requirement Namespace")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5546,7 +5546,7 @@ the names for the attributes and directives for a service namespace.")
        #:tests? #f)); no tests
     (inputs
      `(("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI Util Function")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5574,7 +5574,7 @@ an interface for a function that accepts a single argument and produces a result
     (inputs
      `(("annotation" ,java-osgi-annotation)
        ("function" ,java-osgi-util-function)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Promise of a value")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5602,7 +5602,7 @@ value.  It handles the interactions for asynchronous processing.")
        #:tests? #f)); no tests
     (inputs
      `(("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Support annotations for metatype")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5631,7 +5631,7 @@ the support annotations for metatype.")
      `(("annotation" ,java-osgi-annotation)
        ("promise" ,java-osgi-util-promise)
        ("resource" ,java-osgi-resource)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI service repository")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5659,7 +5659,7 @@ a repository service that contains resources.")
      `(("annotation" ,java-osgi-annotation)
        ("resource" ,java-osgi-resource)
        ("dto" ,java-osgi-dto)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGi framework")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5685,7 +5685,7 @@ and service platform for the Java programming language.")
        #:tests? #f)); no tests
     (inputs
      `(("java-osgi-framework" ,java-osgi-framework)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Provides methods for bundles to write messages to the log")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5710,7 +5710,7 @@ the log service.")
     (arguments
      `(#:jar-name "osgi-service-jdbc.jar"
        #:tests? #f)); no tests
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Factory for JDBC connection factories")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5745,7 +5745,7 @@ factories for getting JDBC connections:
     (inputs
      `(("annotation" ,java-osgi-annotation)
        ("resource" ,java-osgi-resource)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI Resolver service")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5774,7 +5774,7 @@ by the caller.")
     (inputs
      `(("framework" ,java-osgi-framework)
        ("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "Bundle tracking")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5802,7 +5802,7 @@ bundle tracking utility classes.")
     (inputs
      `(("framework" ,java-osgi-framework)
        ("annotation" ,java-osgi-annotation)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI Configuration Management")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -5829,7 +5829,7 @@ utility classes for the configuration of services.")
        #:tests? #f)); no tests
     (inputs
      `(("framework" ,java-osgi-framework)))
-    (home-page "http://www.osgi.org")
+    (home-page "https://www.osgi.org")
     (synopsis "OSGI Package Administration")
     (description
       "OSGi, for Open Services Gateway initiative framework, is a module system
@@ -7418,7 +7418,13 @@ done to the IDE or continuous integration servers which simplifies adoption.")
        #:source-dir "powermock-core/src/main/java"
        #:test-dir "powermock-core/src/test"
        #:tests? #f; requires powermock-api
-       #:jdk ,icedtea-8))
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "powermock-core/src/main/resources"
+                               "build/classes"))))))
     (inputs
      `(("reflect" ,java-powermock-reflect)
        ("javassist" ,java-jboss-javassist)))
@@ -7467,7 +7473,15 @@ done to the IDE or continuous integration servers which simplifies adoption.")
      `(#:jar-name "java-powermock-modules-junit4.jar"
        #:jdk ,icedtea-8
        #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
-       #:test-dir "powermock-modules/powermock-module-junit4/src/test"))
+       #:test-dir "powermock-modules/powermock-module-junit4/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-junit-detection
+           (lambda _
+             ;; Our junit version is 4.12-SNAPSHOT
+             (substitute* (find-files "powermock-modules/powermock-module-junit4"
+                                      "PowerMockJUnit4MethodValidator.java")
+               (("4.12") "4.12-SNAPSHOT")))))))
     (inputs
      `(("core" ,java-powermock-core)
        ("reflect" ,java-powermock-reflect)
@@ -7747,3 +7761,576 @@ outputting XML data from Java code.")
     (description "Xbean-reflect provides very flexible ways to create objects
 and graphs of objects for dependency injection frameworks")
     (license license:asl2.0)))
+
+(define-public java-geronimo-xbean-bundleutils
+  (package
+    (inherit java-geronimo-xbean-reflect)
+    (name "java-geronimo-xbean-bundleutils")
+    (arguments
+     `(#:jar-name "geronimo-xbean-bundleutils.jar"
+       #:source-dir "xbean-bundleutils/src/main/java"
+       #:test-dir "xbean-bundleutils/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'fix-java
+           (lambda _
+             ;; We use a more recent version of osgi, so this file requires
+             ;; more interface method implementations.
+             (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
+               (("import org.osgi.framework.ServiceRegistration;")
+                "import org.osgi.framework.ServiceRegistration;
+import org.osgi.framework.ServiceFactory;
+import java.util.Collection;
+import org.osgi.framework.ServiceObjects;")
+               (("public Bundle getBundle\\(\\)")
+                "@Override
+public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
+ throw new UnsupportedOperationException();
+}
+@Override
+public <S> ServiceRegistration<S> registerService(Class<S> clazz,
+        ServiceFactory<S> factory, Dictionary<String, ?> properties) {
+ throw new UnsupportedOperationException();
+}
+public Bundle getBundle()"))
+             #t)))))
+    (inputs
+     `(("java-slf4j" ,java-slf4j-api)
+       ("java-asm" ,java-asm)
+       ("java-osgi-framework" ,java-osgi-framework)
+       ("java-eclipse-osgi" ,java-eclipse-osgi)
+       ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
+(define-public java-geronimo-xbean-asm-util
+  (package
+    (inherit java-geronimo-xbean-reflect)
+    (name "java-geronimo-xbean-asm-util")
+    (arguments
+     `(#:jar-name "geronimo-xbean-asm-util.jar"
+       #:source-dir "xbean-asm-util/src/main/java"
+       #:tests? #f)); no tests
+    (inputs
+     `(("java-asm" ,java-asm)))
+    (native-inputs '())))
+(define-public java-geronimo-xbean-finder
+  (package
+    (inherit java-geronimo-xbean-reflect)
+    (name "java-geronimo-xbean-finder")
+    (arguments
+     `(#:jar-name "geronimo-xbean-finder.jar"
+       #:source-dir "xbean-finder/src/main/java"
+       #:test-dir "xbean-finder/src/test"))
+    (inputs
+     `(("java-slf4j-api" ,java-slf4j-api)
+       ("java-asm" ,java-asm)
+       ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
+       ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
+       ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
+       ("java-osgi-framework" ,java-osgi-framework)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))))
+
+(define-public java-gson
+  (package
+    (name "java-gson")
+    (version "2.8.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/google/gson/archive/"
+                                  "gson-parent-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "gson.jar"
+       #:source-dir "gson/src/main/java"
+       #:test-dir "gson/src/test"))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (home-page "https://github.com/google/gson")
+    (synopsis "Java serialization/deserialization library from/to JSON")
+    (description "Gson is a Java library that can be used to convert Java
+Objects into their JSON representation.  It can also be used to convert a JSON
+string to an equivalent Java object.  Gson can work with arbitrary Java objects
+including pre-existing objects that you do not have source-code of.")
+    (license license:asl2.0)))
+
+(define-public java-hawtjni
+  (package
+    (name "java-hawtjni")
+    (version "1.15")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
+                                  "hawtjni-project-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "hawtjni.jar"
+       #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'build-native
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "hawtjni-generator/src/main/resources/"
+               (and
+                 (system* "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
+                          "-fPIC" "-O2"
+                          (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
+                 (system* "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
+                          "-fPIC" "-O2"
+                          (string-append "-I" (assoc-ref inputs "jdk") "/include/linux"))
+                 (system* "gcc" "-o" "libhawtjni.so" "-shared"
+                          "hawtjni.o" "hawtjni-callback.o")))))
+         (add-after 'install 'install-native
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (lib (string-append out "/lib"))
+                    (inc (string-append out "/include")))
+               (mkdir-p lib)
+               (mkdir-p inc)
+               (with-directory-excursion "hawtjni-generator/src/main/resources/"
+                 (copy-file "libhawtjni.so" (string-append lib "/libhawtjni.so"))
+                 (copy-file "hawtjni.h" (string-append inc "/hawtjni.h"))))
+             #t)))))
+    (inputs
+     `(("java-commons-cli" ,java-commons-cli)
+       ("java-asm" ,java-asm)
+       ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
+    (home-page "https://fusesource.github.io/hawtjni/")
+    (synopsis "JNI code generator")
+    (description "HawtJNI is a code generator that produces the JNI code needed
+to implement Java native methods.  It is based on the jnigen code generator
+that is part of the SWT Tools project.")
+    (license license:asl2.0)))
+
+(define-public java-jansi-native
+  (package
+    (name "java-jansi-native")
+    (version "1.7")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/fusesource/jansi-native/"
+                                  "archive/jansi-native-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "jansi-native.jar"
+       #:source-dir "src/main/java"
+       #:tests? #f; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'build-native
+           (lambda* (#:key inputs #:allow-other-keys)
+             ;; there are more required files for windows in windows/
+             (with-directory-excursion "src/main/native-package/src"
+               (substitute* "jansi_ttyname.c"
+                 (("#include \"jansi_.*") ""))
+               (and
+                 (system* "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
+                          (string-append "-I" (assoc-ref inputs "java-hawtjni")
+                                         "/include")
+                          (string-append "-I" (assoc-ref inputs "jdk")
+                                         "/include/linux")
+                          "-fPIC" "-O2")
+                 (system* "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")))))
+         (add-before 'build 'install-native
+           (lambda _
+             (let ((dir (string-append "build/classes/META-INF/native/"
+                                       ,(match (%current-system)
+                                          ((or "i686-linux" "armhf-linux")
+                                           "linux32")
+                                          ((or "x86_64-linux" "aarch64-linux")
+                                           "linux64")))))
+               (install-file "src/main/native-package/src/libjansi.so" dir))
+             #t))
+         (add-after 'install 'install-native
+           (lambda* (#:key outputs #:allow-other-keys)
+             (mkdir-p (string-append (assoc-ref outputs "out") "/include"))
+             (install-file "src/main/native-package/src/jansi.h"
+                           (string-append (assoc-ref outputs "out") "/include"))
+             #t)))))
+    (inputs
+     `(("java-hawtjni" ,java-hawtjni)))
+    (home-page "https://fusesource.github.io/jansi/")
+    (synopsis "Native library for jansi")
+    (description "Java-jansi-native contains the native library for the jansi
+frobnication library/framework.")
+    (license license:asl2.0)))
+
+(define-public java-jansi
+  (package
+    (name "java-jansi")
+    (version "1.16")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/fusesource/jansi/archive/"
+                                  "jansi-project-" version ".tar.gz"))
+              (sha256
+               (base32
+                "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "jansi.jar"
+       #:source-dir "jansi/src/main/java"
+       #:test-dir "jansi/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'check 'clear-term
+           (lambda _
+             (zero? (system* "echo" "-e" "\\e[0m")))))))
+    (inputs
+     `(("java-jansi-native" ,java-jansi-native)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (home-page "https://fusesource.github.io/jansi/")
+    (synopsis "Portable ANSI escape sequences")
+    (description "Jansi is a Java library that allows you to use ANSI escape
+sequences to format your console output which works on every platform.")
+    (license license:asl2.0)))
+
+(define-public java-jboss-el-api-spec
+  (package
+    (name "java-jboss-el-api-spec")
+    (version "3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
+                                  "archive/jboss-el-api_" version
+                                  "_spec-1.0.7.Final.tar.gz"))
+              (sha256
+               (base32
+                "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "java-jboss-el-api_spec.jar"
+       #:jdk ,icedtea-8))
+    (inputs
+     `(("java-junit" ,java-junit)))
+    (home-page "https://github.com/jboss/jboss-el-api_spec")
+    (synopsis "JSR-341 expression language 3.0 API")
+    (description "This package contains an implementation of the JSR-341
+specification for the expression language 3.0.  It implements an expression
+language inspired by ECMAScript and XPath.  This language is used with
+JavaServer Pages (JSP).")
+    ;; Either GPL2 only or CDDL.
+    (license (list license:gpl2 license:cddl1.1))))
+
+(define-public java-jboss-interceptors-api-spec
+  (package
+    (name "java-jboss-interceptors-api-spec")
+    (version "1.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
+                                  "archive/jboss-interceptors-api_" version
+                                  "_spec-1.0.0.Final.tar.gz"))
+              (sha256
+               (base32
+                "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "java-jboss-interceptors-api_spec.jar"
+       #:jdk ,icedtea-8
+       #:source-dir "."
+       #:tests? #f)); no tests
+    (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
+    (synopsis "Interceptors 1.2 API classes from JSR 318")
+    (description "Java-jboss-interceptors-api-spec implements the Interceptors
+API.  Interceptors are used to interpose on business method invocations and
+specific events.")
+    ;; Either GPL2 only or CDDL.
+    (license (list license:gpl2 license:cddl1.1))))
+
+(define-public java-cdi-api
+  (package
+    (name "java-cdi-api")
+    (version "2.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:source-dir "api/src/main/java"
+       #:jar-name "java-cdi-api.jar"
+       #:test-dir "api/src/test"
+       #:jdk ,icedtea-8
+       #:tests? #f)); Tests fail because we don't have a CDI provider yet
+    (inputs
+     `(("java-javax-inject" ,java-javax-inject)
+       ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
+       ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
+    (native-inputs
+     `(("java-testng" ,java-testng)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (home-page "http://cdi-spec.org/")
+    (synopsis "Contexts and Dependency Injection APIs")
+    (description "Java-cdi-api contains the required APIs for Contexts and
+Dependency Injection (CDI).")
+    (license license:asl2.0)))
+
+(define-public java-joda-convert
+  (package
+    (name "java-joda-convert")
+    (version "1.9.2")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name (string-append ,name "-" ,version ".jar")
+       #:source-dir "src/main/java"
+       #:test-include (list "**/Test*.java")
+       ;; Contains only interfaces and base classes (no test)
+       #:test-exclude (list "**/test*/**.java")))
+    (inputs
+     `(("java-guava" ,java-guava)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)))
+    (home-page "http://www.joda.org/joda-convert/")
+    (synopsis "Conversion between Objects and Strings")
+    (description "Joda-Convert provides a small set of classes to aid
+conversion between Objects and Strings.  It is not intended to tackle the
+wider problem of Object to Object transformation.")
+    (license license:asl2.0)))
+
+(define-public java-joda-time
+  (package
+    (name "java-joda-time")
+    (version "2.9.9")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "java-joda-time.jar"
+       #:source-dir "src/main/java"
+       #:test-include (list "**/Test*.java")
+       ;; There is no runnable test in these files
+       #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'build 'build-resources
+           (lambda _
+             (mkdir-p "build/classes/org/joda/time/tz/data")
+             (mkdir-p "build/classes/org/joda/time/format")
+             ;; This will produce the following exception:
+             ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
+             ;; which is normal, because it doesn't exist yet. It still generates
+             ;; the same file as in the binary one can find on maven.
+             (invoke "java" "-cp"
+                     (string-append "build/classes:" (getenv "CLASSPATH"))
+                     "org.joda.time.tz.ZoneInfoCompiler"
+                     "-src" "src/main/java/org/joda/time/tz/src"
+                     "-dst" "build/classes/org/joda/time/tz/data"
+                     "africa" "antarctica" "asia" "australasia"
+                     "europe" "northamerica" "southamerica"
+                     "pacificnew" "etcetera" "backward" "systemv")
+             (for-each (lambda (f)
+                         (copy-file f (string-append
+                                        "build/classes/org/joda/time/format/"
+                                        (basename f))))
+               (find-files "src/main/java/org/joda/time/format" ".*.properties"))
+             #t))
+         (add-before 'install 'regenerate-jar
+           (lambda _
+             ;; We need to regenerate the jar file to add generated data.
+             (delete-file "build/jar/java-joda-time.jar")
+             (invoke "ant" "jar")))
+         (add-before 'check 'copy-test-resources
+           (lambda _
+             (mkdir-p "build/test-classes/org/joda/time/tz/data")
+             (copy-file "src/test/resources/tzdata/ZoneInfoMap"
+                        "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
+             (copy-recursively "src/test/resources" "build/test-classes")
+             #t)))))
+    (inputs
+     `(("java-joda-convert" ,java-joda-convert)))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-hamcrest-core" ,java-hamcrest-core)
+       ("tzdata" ,tzdata)))
+    (home-page "http://www.joda.org/joda-time/")
+    (synopsis "Replacement for the Java date and time classes")
+    (description "Joda-Time is a replacement for the Java date and time
+classes prior to Java SE 8.")
+    (license license:asl2.0)))
+
+(define-public java-xerces
+  (package
+    (name "java-xerces")
+    (version "2.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://apache/xerces/j/source/"
+                           "Xerces-J-src." version ".tar.gz"))
+       (sha256
+        (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
+       (patches (search-patches
+                 "java-xerces-xjavac_taskdef.patch"
+                 "java-xerces-build_dont_unzip.patch"
+                 "java-xerces-bootclasspath.patch"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:tests? #f;; Test files are not present
+       #:test-target "test"
+       #:jdk ,icedtea-8
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'create-build.properties
+          (lambda* (#:key inputs #:allow-other-keys)
+            (let ((jaxp (assoc-ref inputs "java-jaxp"))
+                  (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
+              (with-output-to-file "build.properties"
+                (lambda _
+                  (format #t
+                   "jar.jaxp = ~a/share/java/jaxp.jar~@
+                   jar.apis-ext = ~a/share/java/jaxp.jar~@
+                   jar.resolver = ~a/share/java/xml-resolver.jar~%"
+                   jaxp jaxp resolver)))
+              ;; Make xerces use our version of jaxp in tests
+              (substitute* "build.xml"
+                (("xml-apis.jar")
+                 (string-append jaxp "/share/java/jaxp.jar"))
+                (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
+                 "${jar.apis}")))
+            #t))
+         (replace 'install (install-jars "build")))))
+    (inputs
+     `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
+       ("java-jaxp" ,java-jaxp)))
+    (home-page "https://xerces.apache.org/xerces2-j/")
+    (synopsis "Validating XML parser for Java with DOM level 3 support")
+    (description "The Xerces2 Java parser is the reference implementation of
+XNI, the Xerces Native Interface, and also a fully conforming XML Schema
+processor.
+
+Xerces2-J supports the following standards and APIs:
+
+@itemize
+@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
+@item Namespaces in XML Recommendation
+@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
+      Range Recommendations
+@item Simple API for XML (SAX) 2.0.1 Core and Extension
+@item Java APIs for XML Processing (JAXP) 1.2.01
+@item XML Schema 1.0 Structures and Datatypes Recommendations
+@item Experimental implementation of the Document Object Model (DOM) Level 3
+      Core and Load/Save Working Drafts
+@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
+      Candidate Recommendation
+@end itemize
+
+Xerces is now able to parse documents written according to the XML 1.1
+Candidate Recommendation, except that it does not yet provide an option to
+enable normalization checking as described in section 2.13 of this
+specification.  It also handles namespaces according to the XML Namespaces 1.1
+Candidate Recommendation, and will correctly serialize XML 1.1 documents if
+the DOM level 3 load/save API's are in use.")
+    (license license:asl2.0)))
+
+(define-public java-jline
+  (package
+    (name "java-jline")
+    (version "1.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/jline/jline1/archive/jline-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "jline.jar"
+       #:source-dir "src/main/java"
+       #:test-dir "src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'build 'copy-resources
+           (lambda _
+             (copy-recursively "src/main/resources" "build/classes")
+             #t)))))
+    (native-inputs
+     `(("java-junit" ,java-junit)))
+    (home-page "https://jline.github.io")
+    (synopsis "Console input handling library")
+    (description "JLine is a Java library for handling console input.  It is
+similar in functionality to BSD editline and GNU readline but with additional
+features that bring it on par with the Z shell line editor.")
+    (license license:bsd-3)))
+
+(define-public java-xmlunit
+  (package
+    (name "java-xmlunit")
+    (version "2.5.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
+                                  version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
+    (build-system ant-build-system)
+    (arguments
+     `(#:jar-name "java-xmlunit.jar"
+       #:source-dir "xmlunit-core/src/main/java"
+       #:test-dir "xmlunit-core/src/test"
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'copy-test-resources
+           (lambda* (#:key inputs #:allow-other-keys)
+             (copy-recursively (assoc-ref inputs "resources") "../test-resources")
+             #t)))))
+    (native-inputs
+     `(("java-junit" ,java-junit)
+       ("java-mockito-1" ,java-mockito-1)
+       ("java-hamcrest-all" ,java-hamcrest-all)
+       ("java-objenesis" ,java-objenesis)
+       ("java-asm" ,java-asm)
+       ("java-cglib" ,java-cglib)
+       ("resources"
+        ,(origin
+           (method git-fetch)
+           (uri (git-reference
+                  (url "https://github.com/xmlunit/test-resources.git")
+                  (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
+           (file-name "java-xmlunit-test-resources")
+           (sha256
+            (base32
+             "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
+    (home-page "http://www.xmlunit.org/")
+    (synopsis "XML output testing")
+    (description "XMLUnit provides you with the tools to verify the XML you
+emit is the one you want to create.  It provides helpers to validate against
+an XML Schema, assert the values of XPath queries or compare XML documents
+against expected outcomes.")
+    (license license:asl2.0)))