gnu: classpath: Add aarch64-linux support.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;;
13 ;;; This file is part of GNU Guix.
14 ;;;
15 ;;; GNU Guix is free software; you can redistribute it and/or modify it
16 ;;; under the terms of the GNU General Public License as published by
17 ;;; the Free Software Foundation; either version 3 of the License, or (at
18 ;;; your option) any later version.
19 ;;;
20 ;;; GNU Guix is distributed in the hope that it will be useful, but
21 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;;; GNU General Public License for more details.
24 ;;;
25 ;;; You should have received a copy of the GNU General Public License
26 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28 (define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages gtk)
57 #:use-module (gnu packages guile)
58 #:use-module (gnu packages icu4c)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages libffi)
61 #:use-module (gnu packages linux) ;alsa
62 #:use-module (gnu packages maths)
63 #:use-module (gnu packages web)
64 #:use-module (gnu packages wget)
65 #:use-module (gnu packages pkg-config)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages popt)
68 #:use-module (gnu packages kerberos)
69 #:use-module (gnu packages xml)
70 #:use-module (gnu packages xorg)
71 #:use-module (gnu packages texinfo)
72 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
73 #:use-module (srfi srfi-11)
74 #:use-module (ice-9 match))
75
76 \f
77 ;;;
78 ;;; Java bootstrap toolchain.
79 ;;;
80
81 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
82 ;; use it to build a simple version of GNU Classpath, the Java standard
83 ;; library. We chose version 0.93 because it is the last version that can be
84 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
85 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
86 ;; the last version of JamVM that works with a version of GNU classpath that
87 ;; does not require ECJ. These three packages make up the bootstrap JDK.
88
89 ;; This is sufficient to build an older version of Ant, which is needed to
90 ;; build an older version of ECJ, an incremental Java compiler, both of which
91 ;; are written in Java.
92 ;;
93 ;; ECJ is needed to build the latest release (0.99) and the development
94 ;; version of GNU Classpath. The development version of GNU Classpath has
95 ;; much more support for Java 1.6 than the latest release, but we need to
96 ;; build 0.99 first to get a working version of javah. ECJ, the development
97 ;; version of GNU Classpath, and the latest version of JamVM make up the
98 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
99 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
100 ;; Icedtea 3.x.
101
102 (define jikes
103 (package
104 (name "jikes")
105 (version "1.22")
106 (source (origin
107 (method url-fetch)
108 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
109 version "/jikes-" version ".tar.bz2"))
110 (sha256
111 (base32
112 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
113 (build-system gnu-build-system)
114 (home-page "http://jikes.sourceforge.net/")
115 (synopsis "Compiler for the Java language")
116 (description "Jikes is a compiler that translates Java source files as
117 defined in The Java Language Specification into the bytecoded instruction set
118 and binary format defined in The Java Virtual Machine Specification.")
119 (license license:ibmpl1.0)))
120
121 ;; This is the last version of GNU Classpath that can be built without ECJ.
122 (define classpath-bootstrap
123 (package
124 (name "classpath")
125 (version "0.93")
126 (source (origin
127 (method url-fetch)
128 (uri (string-append "mirror://gnu/classpath/classpath-"
129 version ".tar.gz"))
130 (sha256
131 (base32
132 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
133 (patches (search-patches "classpath-aarch64-support.patch"))))
134 (build-system gnu-build-system)
135 (arguments
136 `(#:configure-flags
137 (list (string-append "JAVAC="
138 (assoc-ref %build-inputs "jikes")
139 "/bin/jikes")
140 "--disable-Werror"
141 "--disable-gmp"
142 "--disable-gtk-peer"
143 "--disable-gconf-peer"
144 "--disable-plugin"
145 "--disable-dssi"
146 "--disable-alsa"
147 "--disable-gjdoc")
148 #:phases
149 (modify-phases %standard-phases
150 (add-after 'install 'install-data
151 (lambda _ (zero? (system* "make" "install-data")))))))
152 (native-inputs
153 `(("jikes" ,jikes)
154 ("fastjar" ,fastjar)
155 ("libltdl" ,libltdl)
156 ("pkg-config" ,pkg-config)))
157 (home-page "https://www.gnu.org/software/classpath/")
158 (synopsis "Essential libraries for Java")
159 (description "GNU Classpath is a project to create core class libraries
160 for use with runtimes, compilers and tools for the Java programming
161 language.")
162 ;; GPLv2 or later, with special linking exception.
163 (license license:gpl2+)))
164
165 ;; This is the last version of JamVM that works with a version of GNU
166 ;; classpath that does not require ECJ.
167 (define jamvm-1-bootstrap
168 (package
169 (name "jamvm")
170 (version "1.5.1")
171 (source (origin
172 (method url-fetch)
173 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
174 "JamVM%20" version "/jamvm-"
175 version ".tar.gz"))
176 (sha256
177 (base32
178 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
179 (build-system gnu-build-system)
180 (arguments
181 `(#:configure-flags
182 (list (string-append "--with-classpath-install-dir="
183 (assoc-ref %build-inputs "classpath")))))
184 (inputs
185 `(("classpath" ,classpath-bootstrap)
186 ("jikes" ,jikes)
187 ("zlib" ,zlib)))
188 (home-page "http://jamvm.sourceforge.net/")
189 (synopsis "Small Java Virtual Machine")
190 (description "JamVM is a Java Virtual Machine conforming to the JVM
191 specification edition 2 (blue book). It is extremely small. However, unlike
192 other small VMs it supports the full spec, including object finalisation and
193 JNI.")
194 (license license:gpl2+)))
195
196 (define ant-bootstrap
197 (package
198 (name "ant-bootstrap")
199 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
200 ;; are not supported. The 1.8.x series is the last to use only features
201 ;; supported by Jikes.
202 (version "1.8.4")
203 (source (origin
204 (method url-fetch)
205 (uri (string-append "http://archive.apache.org/dist/"
206 "ant/source/apache-ant-"
207 version "-src.tar.bz2"))
208 (sha256
209 (base32
210 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
211 (build-system gnu-build-system)
212 (arguments
213 `(#:tests? #f ; no "check" target
214 #:phases
215 (modify-phases %standard-phases
216 (delete 'bootstrap)
217 (delete 'configure)
218 (replace 'build
219 (lambda* (#:key inputs #:allow-other-keys)
220 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
221 (setenv "JAVACMD"
222 (string-append (assoc-ref inputs "jamvm")
223 "/bin/jamvm"))
224 (setenv "JAVAC"
225 (string-append (assoc-ref inputs "jikes")
226 "/bin/jikes"))
227 (setenv "CLASSPATH"
228 (string-append (assoc-ref inputs "jamvm")
229 "/lib/rt.jar"))
230
231 ;; Ant complains if this file doesn't exist.
232 (setenv "HOME" "/tmp")
233 (with-output-to-file "/tmp/.ant.properties"
234 (lambda _ (display "")))
235
236 ;; Use jikes instead of javac for <javac ...> tags in build.xml
237 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
238
239 ;; jikes produces lots of warnings, but they are not very
240 ;; interesting, so we silence them.
241 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
242
243 ;; Without these JamVM options the build may freeze.
244 (substitute* "bootstrap.sh"
245 (("^\"\\$\\{JAVACMD\\}\" " m)
246 (string-append m "-Xnocompact -Xnoinlining ")))
247
248 ;; Disable tests because we are bootstrapping and thus don't have
249 ;; any of the dependencies required to build and run the tests.
250 (substitute* "build.xml"
251 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
252 (zero? (system* "bash" "bootstrap.sh"
253 (string-append "-Ddist.dir="
254 (assoc-ref %outputs "out"))))))
255 (delete 'install))))
256 (native-inputs
257 `(("jikes" ,jikes)
258 ("jamvm" ,jamvm-1-bootstrap)))
259 (home-page "http://ant.apache.org")
260 (synopsis "Build tool for Java")
261 (description
262 "Ant is a platform-independent build tool for Java. It is similar to
263 make but is implemented using the Java language, requires the Java platform,
264 and is best suited to building Java projects. Ant uses XML to describe the
265 build process and its dependencies, whereas Make uses Makefile format.")
266 (license license:asl2.0)))
267
268 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
269 ;; compiler for Java 1.5.
270 (define ecj-bootstrap
271 (package
272 (name "ecj-bootstrap")
273 (version "3.2.2")
274 (source (origin
275 (method url-fetch)
276 (uri (string-append "http://archive.eclipse.org/eclipse/"
277 "downloads/drops/R-" version
278 "-200702121330/ecjsrc.zip"))
279 (sha256
280 (base32
281 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
282 ;; It would be so much easier if we could use the ant-build-system, but we
283 ;; cannot as we don't have ant at this point. We use ecj for
284 ;; bootstrapping the JDK.
285 (build-system gnu-build-system)
286 (arguments
287 `(#:modules ((guix build gnu-build-system)
288 (guix build utils)
289 (srfi srfi-1))
290 #:tests? #f ; there are no tests
291 #:phases
292 (modify-phases %standard-phases
293 (replace 'configure
294 (lambda* (#:key inputs #:allow-other-keys)
295 (setenv "CLASSPATH"
296 (string-join
297 (cons (string-append (assoc-ref inputs "jamvm")
298 "/lib/rt.jar")
299 (find-files (string-append
300 (assoc-ref inputs "ant-bootstrap")
301 "/lib")
302 "\\.jar$"))
303 ":"))
304 #t))
305 (replace 'build
306 (lambda* (#:key inputs #:allow-other-keys)
307 ;; The unpack phase enters the "org" directory by mistake.
308 (chdir "..")
309
310 ;; Create a simple manifest to make ecj executable.
311 (with-output-to-file "manifest"
312 (lambda _
313 (display "Manifest-Version: 1.0
314 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
315
316 ;; Compile it all!
317 (and (zero? (apply system* "jikes"
318 (find-files "." "\\.java$")))
319 (zero? (system* "fastjar" "cvfm"
320 "ecj-bootstrap.jar" "manifest" ".")))))
321 (replace 'install
322 (lambda* (#:key outputs #:allow-other-keys)
323 (let ((share (string-append (assoc-ref outputs "out")
324 "/share/java/")))
325 (mkdir-p share)
326 (install-file "ecj-bootstrap.jar" share)
327 #t))))))
328 (native-inputs
329 `(("ant-bootstrap" ,ant-bootstrap)
330 ("unzip" ,unzip)
331 ("jikes" ,jikes)
332 ("jamvm" ,jamvm-1-bootstrap)
333 ("fastjar" ,fastjar)))
334 (home-page "https://eclipse.org")
335 (synopsis "Eclipse Java development tools core batch compiler")
336 (description "This package provides the Eclipse Java core batch compiler
337 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
338 requirement for all GNU Classpath releases after version 0.93.")
339 (license license:epl1.0)))
340
341 (define ecj-javac-wrapper
342 (package (inherit ecj-bootstrap)
343 (name "ecj-javac-wrapper")
344 (source #f)
345 (build-system trivial-build-system)
346 (arguments
347 `(#:modules ((guix build utils))
348 #:builder
349 (begin
350 (use-modules (guix build utils))
351 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
352 (target (string-append bin "/javac"))
353 (guile (string-append (assoc-ref %build-inputs "guile")
354 "/bin/guile"))
355 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
356 "/share/java/ecj-bootstrap.jar"))
357 (java (string-append (assoc-ref %build-inputs "jamvm")
358 "/bin/jamvm"))
359 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
360 "/share/classpath")))
361 (string-append jvmlib "/glibj.zip:"
362 jvmlib "/tools.zip"))))
363 (mkdir-p bin)
364 (with-output-to-file target
365 (lambda _
366 (format #t "#!~a --no-auto-compile\n!#\n" guile)
367 (write
368 `(begin (use-modules (ice-9 match)
369 (ice-9 receive)
370 (ice-9 hash-table)
371 (srfi srfi-1)
372 (srfi srfi-26))
373 (define defaults
374 '(("-bootclasspath" ,bootcp)
375 ("-source" "1.5")
376 ("-target" "1.5")
377 ("-cp" ".")))
378 (define (main args)
379 (let ((classpath (getenv "CLASSPATH")))
380 (setenv "CLASSPATH"
381 (string-join (list ,ecj
382 ,(string-append (assoc-ref %build-inputs "jamvm")
383 "/lib/rt.jar")
384 (or classpath ""))
385 ":")))
386 (receive (vm-args other-args)
387 ;; Separate VM arguments from arguments to ECJ.
388 (partition (cut string-prefix? "-J" <>)
389 (fold (lambda (default acc)
390 (if (member (first default) acc)
391 acc (append default acc)))
392 args defaults))
393 (apply system* ,java
394 (append
395 (list "-Xnocompact" "-Xnoinlining")
396 ;; Remove "-J" prefix
397 (map (cut string-drop <> 2) vm-args)
398 '("org.eclipse.jdt.internal.compiler.batch.Main")
399 (cons "-nowarn" other-args)))))
400 ;; Entry point
401 (let ((args (cdr (command-line))))
402 (if (null? args)
403 (format (current-error-port) "javac: no arguments given!\n")
404 (main args)))))))
405 (chmod target #o755)
406 #t))))
407 (native-inputs
408 `(("guile" ,guile-2.2)
409 ("ecj-bootstrap" ,ecj-bootstrap)
410 ("jamvm" ,jamvm-1-bootstrap)
411 ("classpath" ,classpath-bootstrap)))
412 (description "This package provides a wrapper around the @dfn{Eclipse
413 compiler for Java} (ecj) with a command line interface that is compatible with
414 the standard javac executable.")))
415
416 ;; The classpath-bootstrap was built without a virtual machine, so it does not
417 ;; provide a wrapper for javah. We cannot build the development version of
418 ;; Classpath without javah.
419 (define classpath-0.99
420 (package (inherit classpath-bootstrap)
421 (version "0.99")
422 (source (origin
423 (method url-fetch)
424 (uri (string-append "mirror://gnu/classpath/classpath-"
425 version ".tar.gz"))
426 (sha256
427 (base32
428 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
429 (patches (search-patches "classpath-aarch64-support.patch"))))
430 (arguments
431 `(#:configure-flags
432 (list (string-append "--with-ecj-jar="
433 (assoc-ref %build-inputs "ecj-bootstrap")
434 "/share/java/ecj-bootstrap.jar")
435 (string-append "JAVAC="
436 (assoc-ref %build-inputs "ecj-javac-wrapper")
437 "/bin/javac")
438 (string-append "JAVA="
439 (assoc-ref %build-inputs "jamvm")
440 "/bin/jamvm")
441 "GCJ_JAVAC_TRUE=no"
442 "ac_cv_prog_java_works=yes" ; trust me
443 "--disable-Werror"
444 "--disable-gmp"
445 "--disable-gtk-peer"
446 "--disable-gconf-peer"
447 "--disable-plugin"
448 "--disable-dssi"
449 "--disable-alsa"
450 "--disable-gjdoc")
451 #:phases
452 (modify-phases %standard-phases
453 (add-after 'install 'install-data
454 (lambda _ (zero? (system* "make" "install-data")))))))
455 (native-inputs
456 `(("ecj-bootstrap" ,ecj-bootstrap)
457 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
458 ("fastjar" ,fastjar)
459 ("jamvm" ,jamvm-1-bootstrap)
460 ("classpath" ,classpath-bootstrap)
461 ("libltdl" ,libltdl)
462 ("pkg-config" ,pkg-config)))))
463
464 ;; We need this because classpath-bootstrap does not provide all of the tools
465 ;; we need to build classpath-devel.
466 (define classpath-jamvm-wrappers
467 (package (inherit classpath-0.99)
468 (name "classpath-jamvm-wrappers")
469 (source #f)
470 (build-system trivial-build-system)
471 (arguments
472 `(#:modules ((guix build utils))
473 #:builder
474 (begin
475 (use-modules (guix build utils))
476 (let* ((bash (assoc-ref %build-inputs "bash"))
477 (jamvm (assoc-ref %build-inputs "jamvm"))
478 (classpath (assoc-ref %build-inputs "classpath"))
479 (bin (string-append (assoc-ref %outputs "out")
480 "/bin/")))
481 (mkdir-p bin)
482 (for-each (lambda (tool)
483 (with-output-to-file (string-append bin tool)
484 (lambda _
485 (format #t "#!~a/bin/sh
486 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
487 gnu.classpath.tools.~a.~a $@"
488 bash jamvm classpath tool
489 (if (string=? "native2ascii" tool)
490 "Native2ASCII" "Main"))))
491 (chmod (string-append bin tool) #o755))
492 (list "javah"
493 "rmic"
494 "rmid"
495 "orbd"
496 "rmiregistry"
497 "native2ascii"))
498 #t))))
499 (native-inputs
500 `(("bash" ,bash)
501 ("jamvm" ,jamvm-1-bootstrap)
502 ("classpath" ,classpath-0.99)))
503 (inputs '())
504 (synopsis "Executables from GNU Classpath")
505 (description "This package provides wrappers around the tools provided by
506 the GNU Classpath library. They are executed by the JamVM virtual
507 machine.")))
508
509 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
510 ;; then Classpath has gained much more support for Java 1.6.
511 (define-public classpath-devel
512 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
513 (revision "1"))
514 (package (inherit classpath-bootstrap)
515 (version (string-append "0.99-" revision "." (string-take commit 9)))
516 (source (origin
517 (method git-fetch)
518 (uri (git-reference
519 (url "https://git.savannah.gnu.org/git/classpath.git")
520 (commit commit)))
521 (file-name (string-append "classpath-" version "-checkout"))
522 (sha256
523 (base32
524 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
525 (arguments
526 `(#:make-flags
527 ;; Ensure that the initial heap size is smaller than the maximum
528 ;; size. By default only Xmx is set, which can lead to invalid
529 ;; memory settings on some machines with a lot of memory.
530 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
531 #:configure-flags
532 (list (string-append "--with-ecj-jar="
533 (assoc-ref %build-inputs "ecj-bootstrap")
534 "/share/java/ecj-bootstrap.jar")
535 (string-append "--with-javac="
536 (assoc-ref %build-inputs "ecj-javac-wrapper")
537 "/bin/javac")
538 (string-append "JAVA="
539 (assoc-ref %build-inputs "jamvm")
540 "/bin/jamvm")
541 "GCJ_JAVAC_TRUE=no"
542 "ac_cv_prog_java_works=yes" ; trust me
543 "--disable-Werror"
544 "--disable-gmp"
545 "--disable-gtk-peer"
546 "--disable-gconf-peer"
547 "--disable-plugin"
548 "--disable-dssi"
549 "--disable-alsa"
550 "--disable-gjdoc")
551 #:phases
552 (modify-phases %standard-phases
553 (add-after 'unpack 'bootstrap
554 (lambda _
555 (zero? (system* "autoreconf" "-vif"))))
556 (add-after 'unpack 'remove-unsupported-annotations
557 (lambda _
558 (substitute* (find-files "java" "\\.java$")
559 (("@Override") ""))
560 #t))
561 (add-after 'install 'install-data
562 (lambda _ (zero? (system* "make" "install-data")))))))
563 (native-inputs
564 `(("autoconf" ,autoconf)
565 ("automake" ,automake)
566 ("libtool" ,libtool)
567 ("gettext" ,gettext-minimal)
568 ("texinfo" ,texinfo)
569 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
570 ("ecj-bootstrap" ,ecj-bootstrap)
571 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
572 ("fastjar" ,fastjar)
573 ("jamvm" ,jamvm-1-bootstrap)
574 ("libltdl" ,libltdl)
575 ("pkg-config" ,pkg-config))))))
576
577 (define jamvm
578 (package (inherit jamvm-1-bootstrap)
579 (version "2.0.0")
580 (source (origin
581 (method url-fetch)
582 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
583 "JamVM%20" version "/jamvm-"
584 version ".tar.gz"))
585 (sha256
586 (base32
587 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
588 (build-system gnu-build-system)
589 (arguments
590 `(#:configure-flags
591 (list (string-append "--with-classpath-install-dir="
592 (assoc-ref %build-inputs "classpath")))))
593 (inputs
594 `(("classpath" ,classpath-devel)
595 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
596 ("zlib" ,zlib)))))
597
598 (define ecj-javac-wrapper-final
599 (package (inherit ecj-javac-wrapper)
600 (native-inputs
601 `(("guile" ,guile-2.2)
602 ("ecj-bootstrap" ,ecj-bootstrap)
603 ("jamvm" ,jamvm)
604 ("classpath" ,classpath-devel)))))
605
606 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
607 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
608 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
609 ;; which uses Java 6 only.
610 (define-public icedtea-6
611 (package
612 (name "icedtea")
613 (version "1.13.13")
614 (source (origin
615 (method url-fetch)
616 (uri (string-append
617 "http://icedtea.wildebeest.org/download/source/icedtea6-"
618 version ".tar.xz"))
619 (sha256
620 (base32
621 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
622 (modules '((guix build utils)))
623 (snippet
624 '(substitute* "Makefile.in"
625 ;; do not leak information about the build host
626 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
627 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
628 (build-system gnu-build-system)
629 (outputs '("out" ; Java Runtime Environment
630 "jdk" ; Java Development Kit
631 "doc")) ; all documentation
632 (arguments
633 `(;; There are many failing tests and many are known to fail upstream.
634 #:tests? #f
635
636 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
637 ;; gremlin) doesn't support it yet, so skip this phase.
638 #:validate-runpath? #f
639
640 #:modules ((guix build utils)
641 (guix build gnu-build-system)
642 (srfi srfi-19))
643
644 #:configure-flags
645 `("--enable-bootstrap"
646 "--enable-nss"
647 "--without-rhino"
648 "--with-parallel-jobs"
649 "--disable-downloading"
650 "--disable-tests"
651 ,(string-append "--with-ecj="
652 (assoc-ref %build-inputs "ecj")
653 "/share/java/ecj-bootstrap.jar")
654 ,(string-append "--with-jar="
655 (assoc-ref %build-inputs "fastjar")
656 "/bin/fastjar")
657 ,(string-append "--with-jdk-home="
658 (assoc-ref %build-inputs "classpath"))
659 ,(string-append "--with-java="
660 (assoc-ref %build-inputs "jamvm")
661 "/bin/jamvm"))
662 #:phases
663 (modify-phases %standard-phases
664 (replace 'unpack
665 (lambda* (#:key source inputs #:allow-other-keys)
666 (and (zero? (system* "tar" "xvf" source))
667 (begin
668 (chdir (string-append "icedtea6-" ,version))
669 (mkdir "openjdk")
670 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
671 ;; The convenient OpenJDK source bundle is no longer
672 ;; available for download, so we have to take the sources
673 ;; from the Mercurial repositories and change the Makefile
674 ;; to avoid tests for the OpenJDK zip archive.
675 (with-directory-excursion "openjdk"
676 (for-each (lambda (part)
677 (mkdir part)
678 (copy-recursively
679 (assoc-ref inputs
680 (string-append part "-src"))
681 part))
682 '("jdk" "hotspot" "corba"
683 "langtools" "jaxp" "jaxws")))
684 (substitute* "Makefile.in"
685 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
686 "echo \"trust me\";")
687 ;; The contents of the bootstrap directory must be
688 ;; writeable but when copying from the store they are
689 ;; not.
690 (("mkdir -p lib/rt" line)
691 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
692 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
693 #t))))
694 (add-after 'unpack 'use-classpath
695 (lambda* (#:key inputs #:allow-other-keys)
696 (let ((jvmlib (assoc-ref inputs "classpath"))
697 (jamvm (assoc-ref inputs "jamvm")))
698 ;; Classpath does not provide rt.jar.
699 (substitute* "Makefile.in"
700 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
701 (string-append jvmlib "/share/classpath/glibj.zip")))
702 ;; Make sure we can find all classes.
703 (setenv "CLASSPATH"
704 (string-append jvmlib "/share/classpath/glibj.zip:"
705 jvmlib "/share/classpath/tools.zip:"
706 jamvm "/lib/rt.jar"))
707 (setenv "JAVACFLAGS"
708 (string-append "-cp "
709 jvmlib "/share/classpath/glibj.zip:"
710 jvmlib "/share/classpath/tools.zip")))
711 #t))
712 (add-after 'unpack 'patch-patches
713 (lambda _
714 ;; shebang in patches so that they apply cleanly
715 (substitute* '("patches/jtreg-jrunscript.patch"
716 "patches/hotspot/hs23/drop_unlicensed_test.patch")
717 (("#!/bin/sh") (string-append "#!" (which "sh"))))
718 #t))
719 (add-after 'unpack 'patch-paths
720 (lambda* (#:key inputs #:allow-other-keys)
721 ;; buildtree.make generates shell scripts, so we need to replace
722 ;; the generated shebang
723 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
724 (("/bin/sh") (which "bash")))
725
726 (let ((corebin (string-append
727 (assoc-ref inputs "coreutils") "/bin/"))
728 (binbin (string-append
729 (assoc-ref inputs "binutils") "/bin/"))
730 (grepbin (string-append
731 (assoc-ref inputs "grep") "/bin/")))
732 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
733 "openjdk/corba/make/common/shared/Defs-linux.gmk")
734 (("UNIXCOMMAND_PATH = /bin/")
735 (string-append "UNIXCOMMAND_PATH = " corebin))
736 (("USRBIN_PATH = /usr/bin/")
737 (string-append "USRBIN_PATH = " corebin))
738 (("DEVTOOLS_PATH *= */usr/bin/")
739 (string-append "DEVTOOLS_PATH = " corebin))
740 (("COMPILER_PATH *= */usr/bin/")
741 (string-append "COMPILER_PATH = "
742 (assoc-ref inputs "gcc") "/bin/"))
743 (("DEF_OBJCOPY *=.*objcopy")
744 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
745
746 ;; fix path to alsa header
747 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
748 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
749 (string-append "ALSA_INCLUDE="
750 (assoc-ref inputs "alsa-lib")
751 "/include/alsa/version.h")))
752
753 ;; fix hard-coded utility paths
754 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
755 "openjdk/corba/make/common/shared/Defs-utils.gmk")
756 (("ECHO *=.*echo")
757 (string-append "ECHO = " (which "echo")))
758 (("^GREP *=.*grep")
759 (string-append "GREP = " (which "grep")))
760 (("EGREP *=.*egrep")
761 (string-append "EGREP = " (which "egrep")))
762 (("CPIO *=.*cpio")
763 (string-append "CPIO = " (which "cpio")))
764 (("READELF *=.*readelf")
765 (string-append "READELF = " (which "readelf")))
766 (("^ *AR *=.*ar")
767 (string-append "AR = " (which "ar")))
768 (("^ *TAR *=.*tar")
769 (string-append "TAR = " (which "tar")))
770 (("AS *=.*as")
771 (string-append "AS = " (which "as")))
772 (("LD *=.*ld")
773 (string-append "LD = " (which "ld")))
774 (("STRIP *=.*strip")
775 (string-append "STRIP = " (which "strip")))
776 (("NM *=.*nm")
777 (string-append "NM = " (which "nm")))
778 (("^SH *=.*sh")
779 (string-append "SH = " (which "bash")))
780 (("^FIND *=.*find")
781 (string-append "FIND = " (which "find")))
782 (("LDD *=.*ldd")
783 (string-append "LDD = " (which "ldd")))
784 (("NAWK *=.*(n|g)awk")
785 (string-append "NAWK = " (which "gawk")))
786 (("XARGS *=.*xargs")
787 (string-append "XARGS = " (which "xargs")))
788 (("UNZIP *=.*unzip")
789 (string-append "UNZIP = " (which "unzip")))
790 (("ZIPEXE *=.*zip")
791 (string-append "ZIPEXE = " (which "zip")))
792 (("SED *=.*sed")
793 (string-append "SED = " (which "sed"))))
794
795 ;; Some of these timestamps cause problems as they are more than
796 ;; 10 years ago, failing the build process.
797 (substitute*
798 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
799 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
800 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
801 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
802 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
803 #t)))
804 (add-before 'configure 'set-additional-paths
805 (lambda* (#:key inputs #:allow-other-keys)
806 (setenv "CPATH"
807 (string-append (assoc-ref inputs "libxrender")
808 "/include/X11/extensions" ":"
809 (assoc-ref inputs "libxtst")
810 "/include/X11/extensions" ":"
811 (assoc-ref inputs "libxinerama")
812 "/include/X11/extensions" ":"
813 (or (getenv "CPATH") "")))
814 (setenv "ALT_CUPS_HEADERS_PATH"
815 (string-append (assoc-ref inputs "cups")
816 "/include"))
817 (setenv "ALT_FREETYPE_HEADERS_PATH"
818 (string-append (assoc-ref inputs "freetype")
819 "/include"))
820 (setenv "ALT_FREETYPE_LIB_PATH"
821 (string-append (assoc-ref inputs "freetype")
822 "/lib"))
823 #t))
824 (replace 'install
825 (lambda* (#:key outputs #:allow-other-keys)
826 (let ((doc (string-append (assoc-ref outputs "doc")
827 "/share/doc/icedtea"))
828 (jre (assoc-ref outputs "out"))
829 (jdk (assoc-ref outputs "jdk")))
830 (copy-recursively "openjdk.build/docs" doc)
831 (copy-recursively "openjdk.build/j2re-image" jre)
832 (copy-recursively "openjdk.build/j2sdk-image" jdk))
833 #t)))))
834 (native-inputs
835 `(("ant" ,ant-bootstrap)
836 ("alsa-lib" ,alsa-lib)
837 ("attr" ,attr)
838 ("classpath" ,classpath-devel)
839 ("coreutils" ,coreutils)
840 ("cpio" ,cpio)
841 ("cups" ,cups)
842 ("ecj" ,ecj-bootstrap)
843 ("ecj-javac" ,ecj-javac-wrapper-final)
844 ("fastjar" ,fastjar)
845 ("fontconfig" ,fontconfig)
846 ("freetype" ,freetype)
847 ("gtk" ,gtk+-2)
848 ("gawk" ,gawk)
849 ("giflib" ,giflib)
850 ("grep" ,grep)
851 ("jamvm" ,jamvm)
852 ("lcms" ,lcms)
853 ("libjpeg" ,libjpeg)
854 ("libpng" ,libpng)
855 ("libtool" ,libtool)
856 ("libx11" ,libx11)
857 ("libxcomposite" ,libxcomposite)
858 ("libxi" ,libxi)
859 ("libxinerama" ,libxinerama)
860 ("libxrender" ,libxrender)
861 ("libxslt" ,libxslt) ;for xsltproc
862 ("libxt" ,libxt)
863 ("libxtst" ,libxtst)
864 ("mit-krb5" ,mit-krb5)
865 ("nss" ,nss)
866 ("nss-certs" ,nss-certs)
867 ("perl" ,perl)
868 ("pkg-config" ,pkg-config)
869 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
870 ("unzip" ,unzip)
871 ("wget" ,wget)
872 ("which" ,which)
873 ("zip" ,zip)
874 ("zlib" ,zlib)
875 ("openjdk-src"
876 ,(origin
877 (method hg-fetch)
878 (uri (hg-reference
879 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
880 (changeset "jdk6-b41")))
881 (sha256
882 (base32
883 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
884 ("jdk-src"
885 ,(origin
886 (method hg-fetch)
887 (uri (hg-reference
888 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
889 (changeset "jdk6-b41")))
890 (sha256
891 (base32
892 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
893 ("hotspot-src"
894 ,(origin
895 (method hg-fetch)
896 (uri (hg-reference
897 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
898 (changeset "jdk6-b41")))
899 (sha256
900 (base32
901 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
902 ("corba-src"
903 ,(origin
904 (method hg-fetch)
905 (uri (hg-reference
906 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
907 (changeset "jdk6-b41")))
908 (sha256
909 (base32
910 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
911 ("langtools-src"
912 ,(origin
913 (method hg-fetch)
914 (uri (hg-reference
915 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
916 (changeset "jdk6-b41")))
917 (sha256
918 (base32
919 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
920 ("jaxp-src"
921 ,(origin
922 (method hg-fetch)
923 (uri (hg-reference
924 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
925 (changeset "jdk6-b41")))
926 (sha256
927 (base32
928 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
929 ("jaxws-src"
930 ,(origin
931 (method hg-fetch)
932 (uri (hg-reference
933 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
934 (changeset "jdk6-b41")))
935 (sha256
936 (base32
937 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
938 (home-page "http://icedtea.classpath.org")
939 (synopsis "Java development kit")
940 (description
941 "This package provides the OpenJDK built with the IcedTea build harness.
942 This version of the OpenJDK is no longer maintained and is only used for
943 bootstrapping purposes.")
944 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
945 ;; same license as both GNU Classpath and OpenJDK.
946 (license license:gpl2+)))
947
948 (define-public icedtea-7
949 (let* ((version "2.6.13")
950 (drop (lambda (name hash)
951 (origin
952 (method url-fetch)
953 (uri (string-append
954 "http://icedtea.classpath.org/download/drops"
955 "/icedtea7/" version "/" name ".tar.bz2"))
956 (sha256 (base32 hash))))))
957 (package
958 (name "icedtea")
959 (version version)
960 (source (origin
961 (method url-fetch)
962 (uri (string-append
963 "http://icedtea.wildebeest.org/download/source/icedtea-"
964 version ".tar.xz"))
965 (sha256
966 (base32
967 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
968 (modules '((guix build utils)))
969 (snippet
970 '(substitute* "Makefile.in"
971 ;; do not leak information about the build host
972 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
973 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
974 (build-system gnu-build-system)
975 (outputs '("out" ; Java Runtime Environment
976 "jdk" ; Java Development Kit
977 "doc")) ; all documentation
978 (arguments
979 `(;; There are many test failures. Some are known to
980 ;; fail upstream, others relate to not having an X
981 ;; server running at test time, yet others are a
982 ;; complete mystery to me.
983
984 ;; hotspot: passed: 241; failed: 45; error: 2
985 ;; langtools: passed: 1,934; failed: 26
986 ;; jdk: unknown
987 #:tests? #f
988
989 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
990 ;; gremlin) doesn't support it yet, so skip this phase.
991 #:validate-runpath? #f
992
993 ;; Apparently, the C locale is needed for some of the tests.
994 #:locale "C"
995
996 #:modules ((guix build utils)
997 (guix build gnu-build-system)
998 (ice-9 match)
999 (ice-9 popen)
1000 (srfi srfi-19)
1001 (srfi srfi-26))
1002
1003 #:configure-flags
1004 ;; TODO: package pcsc and sctp, and add to inputs
1005 `("--disable-system-pcsc"
1006 "--disable-system-sctp"
1007 "--enable-bootstrap"
1008 "--enable-nss"
1009 "--without-rhino"
1010 "--disable-downloading"
1011 "--disable-tests" ;they are run in the check phase instead
1012 "--with-openjdk-src-dir=./openjdk.src"
1013 ,(string-append "--with-jdk-home="
1014 (assoc-ref %build-inputs "jdk")))
1015
1016 #:phases
1017 (modify-phases %standard-phases
1018 (replace 'unpack
1019 (lambda* (#:key source inputs #:allow-other-keys)
1020 (let ((target (string-append "icedtea-" ,version))
1021 (unpack (lambda* (name #:optional dir)
1022 (let ((dir (or dir
1023 (string-drop-right name 5))))
1024 (mkdir dir)
1025 (zero? (system* "tar" "xvf"
1026 (assoc-ref inputs name)
1027 "-C" dir
1028 "--strip-components=1"))))))
1029 (mkdir target)
1030 (and
1031 (zero? (system* "tar" "xvf" source
1032 "-C" target "--strip-components=1"))
1033 (chdir target)
1034 (unpack "openjdk-src" "openjdk.src")
1035 (with-directory-excursion "openjdk.src"
1036 (for-each unpack
1037 (filter (cut string-suffix? "-drop" <>)
1038 (map (match-lambda
1039 ((name . _) name))
1040 inputs))))
1041 #t))))
1042 (add-after 'unpack 'fix-x11-extension-include-path
1043 (lambda* (#:key inputs #:allow-other-keys)
1044 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1045 (((string-append "\\$\\(firstword \\$\\(wildcard "
1046 "\\$\\(OPENWIN_HOME\\)"
1047 "/include/X11/extensions\\).*$"))
1048 (string-append (assoc-ref inputs "libxrender")
1049 "/include/X11/extensions"
1050 " -I" (assoc-ref inputs "libxtst")
1051 "/include/X11/extensions"
1052 " -I" (assoc-ref inputs "libxinerama")
1053 "/include/X11/extensions"))
1054 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1055 #t))
1056 (add-after 'unpack 'patch-paths
1057 (lambda _
1058 ;; buildtree.make generates shell scripts, so we need to replace
1059 ;; the generated shebang
1060 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1061 (("/bin/sh") (which "bash")))
1062
1063 (let ((corebin (string-append
1064 (assoc-ref %build-inputs "coreutils") "/bin/"))
1065 (binbin (string-append
1066 (assoc-ref %build-inputs "binutils") "/bin/"))
1067 (grepbin (string-append
1068 (assoc-ref %build-inputs "grep") "/bin/")))
1069 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1070 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1071 (("UNIXCOMMAND_PATH = /bin/")
1072 (string-append "UNIXCOMMAND_PATH = " corebin))
1073 (("USRBIN_PATH = /usr/bin/")
1074 (string-append "USRBIN_PATH = " corebin))
1075 (("DEVTOOLS_PATH *= */usr/bin/")
1076 (string-append "DEVTOOLS_PATH = " corebin))
1077 (("COMPILER_PATH *= */usr/bin/")
1078 (string-append "COMPILER_PATH = "
1079 (assoc-ref %build-inputs "gcc") "/bin/"))
1080 (("DEF_OBJCOPY *=.*objcopy")
1081 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1082
1083 ;; fix path to alsa header
1084 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1085 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1086 (string-append "ALSA_INCLUDE="
1087 (assoc-ref %build-inputs "alsa-lib")
1088 "/include/alsa/version.h")))
1089
1090 ;; fix hard-coded utility paths
1091 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1092 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1093 (("ECHO *=.*echo")
1094 (string-append "ECHO = " (which "echo")))
1095 (("^GREP *=.*grep")
1096 (string-append "GREP = " (which "grep")))
1097 (("EGREP *=.*egrep")
1098 (string-append "EGREP = " (which "egrep")))
1099 (("CPIO *=.*cpio")
1100 (string-append "CPIO = " (which "cpio")))
1101 (("READELF *=.*readelf")
1102 (string-append "READELF = " (which "readelf")))
1103 (("^ *AR *=.*ar")
1104 (string-append "AR = " (which "ar")))
1105 (("^ *TAR *=.*tar")
1106 (string-append "TAR = " (which "tar")))
1107 (("AS *=.*as")
1108 (string-append "AS = " (which "as")))
1109 (("LD *=.*ld")
1110 (string-append "LD = " (which "ld")))
1111 (("STRIP *=.*strip")
1112 (string-append "STRIP = " (which "strip")))
1113 (("NM *=.*nm")
1114 (string-append "NM = " (which "nm")))
1115 (("^SH *=.*sh")
1116 (string-append "SH = " (which "bash")))
1117 (("^FIND *=.*find")
1118 (string-append "FIND = " (which "find")))
1119 (("LDD *=.*ldd")
1120 (string-append "LDD = " (which "ldd")))
1121 (("NAWK *=.*(n|g)awk")
1122 (string-append "NAWK = " (which "gawk")))
1123 (("XARGS *=.*xargs")
1124 (string-append "XARGS = " (which "xargs")))
1125 (("UNZIP *=.*unzip")
1126 (string-append "UNZIP = " (which "unzip")))
1127 (("ZIPEXE *=.*zip")
1128 (string-append "ZIPEXE = " (which "zip")))
1129 (("SED *=.*sed")
1130 (string-append "SED = " (which "sed"))))
1131
1132 ;; Some of these timestamps cause problems as they are more than
1133 ;; 10 years ago, failing the build process.
1134 (substitute*
1135 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1136 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1137 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1138 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1139 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1140 #t))
1141 (add-before 'configure 'set-additional-paths
1142 (lambda* (#:key inputs #:allow-other-keys)
1143 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1144 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1145 (string-append "ALSA_INCLUDE="
1146 (assoc-ref inputs "alsa-lib")
1147 "/include/alsa/version.h")))
1148 (setenv "CC" "gcc")
1149 (setenv "CPATH"
1150 (string-append (assoc-ref inputs "libxcomposite")
1151 "/include/X11/extensions" ":"
1152 (assoc-ref inputs "libxrender")
1153 "/include/X11/extensions" ":"
1154 (assoc-ref inputs "libxtst")
1155 "/include/X11/extensions" ":"
1156 (assoc-ref inputs "libxinerama")
1157 "/include/X11/extensions" ":"
1158 (or (getenv "CPATH") "")))
1159 (setenv "ALT_OBJCOPY" (which "objcopy"))
1160 (setenv "ALT_CUPS_HEADERS_PATH"
1161 (string-append (assoc-ref inputs "cups")
1162 "/include"))
1163 (setenv "ALT_FREETYPE_HEADERS_PATH"
1164 (string-append (assoc-ref inputs "freetype")
1165 "/include"))
1166 (setenv "ALT_FREETYPE_LIB_PATH"
1167 (string-append (assoc-ref inputs "freetype")
1168 "/lib"))
1169 #t))
1170 (add-before 'check 'fix-test-framework
1171 (lambda _
1172 ;; Fix PATH in test environment
1173 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1174 (("PATH=/bin:/usr/bin")
1175 (string-append "PATH=" (getenv "PATH"))))
1176 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1177 (("/usr/bin/env") (which "env")))
1178 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1179 (("/bin/rm") (which "rm"))
1180 (("/bin/cp") (which "cp"))
1181 (("/bin/mv") (which "mv")))
1182 #t))
1183 (add-before 'check 'fix-hotspot-tests
1184 (lambda _
1185 (with-directory-excursion "openjdk.src/hotspot/test/"
1186 (substitute* "jprt.config"
1187 (("PATH=\"\\$\\{path4sdk\\}\"")
1188 (string-append "PATH=" (getenv "PATH")))
1189 (("make=/usr/bin/make")
1190 (string-append "make=" (which "make"))))
1191 (substitute* '("runtime/6626217/Test6626217.sh"
1192 "runtime/7110720/Test7110720.sh")
1193 (("/bin/rm") (which "rm"))
1194 (("/bin/cp") (which "cp"))
1195 (("/bin/mv") (which "mv"))))
1196 #t))
1197 (add-before 'check 'fix-jdk-tests
1198 (lambda _
1199 (with-directory-excursion "openjdk.src/jdk/test/"
1200 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1201 (("/bin/pwd") (which "pwd")))
1202 (substitute* "com/sun/jdi/ShellScaffold.sh"
1203 (("/bin/kill") (which "kill")))
1204 (substitute* "start-Xvfb.sh"
1205 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1206 (("/usr/bin/nohup") (which "nohup")))
1207 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1208 (("/bin/rm") (which "rm")))
1209 (substitute* "tools/launcher/MultipleJRE.sh"
1210 (("echo \"#!/bin/sh\"")
1211 (string-append "echo \"#!" (which "rm") "\""))
1212 (("/usr/bin/zip") (which "zip")))
1213 (substitute* "com/sun/jdi/OnThrowTest.java"
1214 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1215 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1216 (("/usr/bin/uptime") (which "uptime")))
1217 (substitute* "java/lang/ProcessBuilder/Basic.java"
1218 (("/usr/bin/env") (which "env"))
1219 (("/bin/false") (which "false"))
1220 (("/bin/true") (which "true"))
1221 (("/bin/cp") (which "cp"))
1222 (("/bin/sh") (which "sh")))
1223 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1224 (("/bin/sh") (which "sh")))
1225 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1226 (("/usr/bin/perl") (which "perl"))
1227 (("/bin/ps") (which "ps"))
1228 (("/bin/true") (which "true")))
1229 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1230 (("/usr/bin/tee") (which "tee")))
1231 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1232 (("/bin/true") (which "true")))
1233 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1234 (("/bin/cat") (which "cat")))
1235 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1236 (("/bin/sh") (which "sh"))
1237 (("/bin/true") (which "true"))
1238 (("/bin/kill") (which "kill")))
1239 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1240 (("/usr/bin/echo") (which "echo")))
1241 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1242 (("/usr/bin/cat") (which "cat")))
1243 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1244 (("/bin/cat") (which "cat"))
1245 (("/bin/sleep") (which "sleep"))
1246 (("/bin/sh") (which "sh")))
1247 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1248 (("/bin/cat") (which "cat")))
1249 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1250 (("/bin/chmod") (which "chmod")))
1251 (substitute* "java/util/zip/ZipFile/Assortment.java"
1252 (("/bin/sh") (which "sh"))))
1253 #t))
1254 (replace 'check
1255 (lambda _
1256 ;; The "make check-*" targets always return zero, so we need to
1257 ;; check for errors in the associated log files to determine
1258 ;; whether any tests have failed.
1259 (use-modules (ice-9 rdelim))
1260 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1261 (checker (lambda (port)
1262 (let loop ()
1263 (let ((line (read-line port)))
1264 (cond
1265 ((eof-object? line) #t)
1266 ((regexp-exec error-pattern line) #f)
1267 (else (loop)))))))
1268 (run-test (lambda (test)
1269 (system* "make" test)
1270 (call-with-input-file
1271 (string-append "test/" test ".log")
1272 checker))))
1273 (or #t ; skip tests
1274 (and (run-test "check-hotspot")
1275 (run-test "check-langtools")
1276 (run-test "check-jdk"))))))
1277 (replace 'install
1278 (lambda* (#:key outputs #:allow-other-keys)
1279 (let ((doc (string-append (assoc-ref outputs "doc")
1280 "/share/doc/icedtea"))
1281 (jre (assoc-ref outputs "out"))
1282 (jdk (assoc-ref outputs "jdk")))
1283 (copy-recursively "openjdk.build/docs" doc)
1284 (copy-recursively "openjdk.build/j2re-image" jre)
1285 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1286 #t))
1287 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1288 ;; But that shared object is located in the server/ folder, so it
1289 ;; cannot be found. This phase creates a symbolic link in the
1290 ;; lib/amd64 folder so that the other libraries can find it.
1291 ;;
1292 ;; See:
1293 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1294 ;;
1295 ;; FIXME: Find the bug in the build system, so that this symlink is
1296 ;; not needed.
1297 (add-after 'install 'install-libjvm
1298 (lambda* (#:key inputs outputs #:allow-other-keys)
1299 (let* ((lib-path (string-append (assoc-ref outputs "out")
1300 "/lib/amd64")))
1301 (symlink (string-append lib-path "/server/libjvm.so")
1302 (string-append lib-path "/libjvm.so")))
1303 #t))
1304 ;; By default IcedTea only generates an empty keystore. In order to
1305 ;; be able to use certificates in Java programs we need to generate a
1306 ;; keystore from a set of certificates. For convenience we use the
1307 ;; certificates from the nss-certs package.
1308 (add-after 'install 'install-keystore
1309 (lambda* (#:key inputs outputs #:allow-other-keys)
1310 (let* ((keystore "cacerts")
1311 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1312 "/etc/ssl/certs"))
1313 (keytool (string-append (assoc-ref outputs "jdk")
1314 "/bin/keytool")))
1315 (define (extract-cert file target)
1316 (call-with-input-file file
1317 (lambda (in)
1318 (call-with-output-file target
1319 (lambda (out)
1320 (let loop ((line (read-line in 'concat))
1321 (copying? #f))
1322 (cond
1323 ((eof-object? line) #t)
1324 ((string-prefix? "-----BEGIN" line)
1325 (display line out)
1326 (loop (read-line in 'concat) #t))
1327 ((string-prefix? "-----END" line)
1328 (display line out)
1329 #t)
1330 (else
1331 (when copying? (display line out))
1332 (loop (read-line in 'concat) copying?)))))))))
1333 (define (import-cert cert)
1334 (format #t "Importing certificate ~a\n" (basename cert))
1335 (let ((temp "tmpcert"))
1336 (extract-cert cert temp)
1337 (let ((port (open-pipe* OPEN_WRITE keytool
1338 "-import"
1339 "-alias" (basename cert)
1340 "-keystore" keystore
1341 "-storepass" "changeit"
1342 "-file" temp)))
1343 (display "yes\n" port)
1344 (when (not (zero? (status:exit-val (close-pipe port))))
1345 (format #t "failed to import ~a\n" cert)))
1346 (delete-file temp)))
1347
1348 ;; This is necessary because the certificate directory contains
1349 ;; files with non-ASCII characters in their names.
1350 (setlocale LC_ALL "en_US.utf8")
1351 (setenv "LC_ALL" "en_US.utf8")
1352
1353 (for-each import-cert (find-files certs-dir "\\.pem$"))
1354 (mkdir-p (string-append (assoc-ref outputs "out")
1355 "/lib/security"))
1356 (mkdir-p (string-append (assoc-ref outputs "jdk")
1357 "/jre/lib/security"))
1358
1359 ;; The cacerts files we are going to overwrite are chmod'ed as
1360 ;; read-only (444) in icedtea-8 (which derives from this
1361 ;; package). We have to change this so we can overwrite them.
1362 (chmod (string-append (assoc-ref outputs "out")
1363 "/lib/security/" keystore) #o644)
1364 (chmod (string-append (assoc-ref outputs "jdk")
1365 "/jre/lib/security/" keystore) #o644)
1366
1367 (install-file keystore
1368 (string-append (assoc-ref outputs "out")
1369 "/lib/security"))
1370 (install-file keystore
1371 (string-append (assoc-ref outputs "jdk")
1372 "/jre/lib/security"))
1373 #t))))))
1374 (native-inputs
1375 `(("openjdk-src"
1376 ,(drop "openjdk"
1377 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1378 ("corba-drop"
1379 ,(drop "corba"
1380 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1381 ("jaxp-drop"
1382 ,(drop "jaxp"
1383 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1384 ("jaxws-drop"
1385 ,(drop "jaxws"
1386 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1387 ("jdk-drop"
1388 ,(drop "jdk"
1389 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1390 ("langtools-drop"
1391 ,(drop "langtools"
1392 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1393 ("hotspot-drop"
1394 ,(drop "hotspot"
1395 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1396 ("ant" ,ant-bootstrap)
1397 ("attr" ,attr)
1398 ("coreutils" ,coreutils)
1399 ("diffutils" ,diffutils) ;for tests
1400 ("gawk" ,gawk)
1401 ("grep" ,grep)
1402 ("libtool" ,libtool)
1403 ("pkg-config" ,pkg-config)
1404 ("wget" ,wget)
1405 ("which" ,which)
1406 ("cpio" ,cpio)
1407 ("zip" ,zip)
1408 ("unzip" ,unzip)
1409 ("fastjar" ,fastjar)
1410 ("libxslt" ,libxslt) ;for xsltproc
1411 ("nss-certs" ,nss-certs)
1412 ("perl" ,perl)
1413 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1414 ("jdk" ,icedtea-6 "jdk")))
1415 (inputs
1416 `(("alsa-lib" ,alsa-lib)
1417 ("cups" ,cups)
1418 ("libx11" ,libx11)
1419 ("libxcomposite" ,libxcomposite)
1420 ("libxt" ,libxt)
1421 ("libxtst" ,libxtst)
1422 ("libxi" ,libxi)
1423 ("libxinerama" ,libxinerama)
1424 ("libxrender" ,libxrender)
1425 ("libjpeg" ,libjpeg)
1426 ("libpng" ,libpng)
1427 ("mit-krb5" ,mit-krb5)
1428 ("nss" ,nss)
1429 ("giflib" ,giflib)
1430 ("fontconfig" ,fontconfig)
1431 ("freetype" ,freetype)
1432 ("lcms" ,lcms)
1433 ("zlib" ,zlib)
1434 ("gtk" ,gtk+-2)))
1435 (home-page "http://icedtea.classpath.org")
1436 (synopsis "Java development kit")
1437 (description
1438 "This package provides the Java development kit OpenJDK built with the
1439 IcedTea build harness.")
1440 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1441 ;; same license as both GNU Classpath and OpenJDK.
1442 (license license:gpl2+))))
1443
1444 (define-public icedtea-8
1445 (let* ((version "3.7.0")
1446 (drop (lambda (name hash)
1447 (origin
1448 (method url-fetch)
1449 (uri (string-append
1450 "http://icedtea.classpath.org/download/drops"
1451 "/icedtea8/" version "/" name ".tar.xz"))
1452 (sha256 (base32 hash))))))
1453 (package (inherit icedtea-7)
1454 (version "3.7.0")
1455 (source (origin
1456 (method url-fetch)
1457 (uri (string-append
1458 "http://icedtea.wildebeest.org/download/source/icedtea-"
1459 version ".tar.xz"))
1460 (sha256
1461 (base32
1462 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1463 (modules '((guix build utils)))
1464 (snippet
1465 '(begin
1466 (substitute* '("configure"
1467 "acinclude.m4")
1468 ;; Do not embed build time
1469 (("(DIST_ID=\"Custom build).*$" _ prefix)
1470 (string-append prefix "\"\n"))
1471 ;; Do not leak information about the build host
1472 (("DIST_NAME=\"\\$build_os\"")
1473 "DIST_NAME=\"guix\""))
1474 #t))))
1475 (arguments
1476 `(#:imported-modules
1477 ((guix build ant-build-system)
1478 (guix build syscalls)
1479 ,@%gnu-build-system-modules)
1480 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1481 ((#:modules modules)
1482 `((guix build utils)
1483 (guix build gnu-build-system)
1484 ((guix build ant-build-system) #:prefix ant:)
1485 (ice-9 match)
1486 (ice-9 popen)
1487 (srfi srfi-19)
1488 (srfi srfi-26)))
1489 ((#:configure-flags flags)
1490 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1491 `( ;;"--disable-bootstrap"
1492 "--enable-bootstrap"
1493 "--enable-nss"
1494 "--disable-downloading"
1495 "--disable-system-pcsc"
1496 "--disable-system-sctp"
1497 "--disable-tests" ;they are run in the check phase instead
1498 "--with-openjdk-src-dir=./openjdk.src"
1499 ,(string-append "--with-jdk-home=" jdk))))
1500 ((#:phases phases)
1501 `(modify-phases ,phases
1502 (delete 'fix-x11-extension-include-path)
1503 (delete 'patch-paths)
1504 (delete 'set-additional-paths)
1505 (delete 'patch-patches)
1506 ;; Prevent the keytool from recording the current time when
1507 ;; adding certificates at build time.
1508 (add-after 'unpack 'patch-keystore
1509 (lambda _
1510 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1511 (("date = new Date\\(\\);")
1512 "\
1513 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1514 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1515 new Date();"))
1516 #t))
1517 (add-after 'unpack 'patch-jni-libs
1518 ;; Hardcode dynamically loaded libraries.
1519 (lambda _
1520 (let* ((library-path (search-path-as-string->list
1521 (getenv "LIBRARY_PATH")))
1522 (find-library (lambda (name)
1523 (search-path
1524 library-path
1525 (string-append "lib" name ".so")))))
1526 (for-each
1527 (lambda (file)
1528 (catch 'decoding-error
1529 (lambda ()
1530 (substitute* file
1531 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1532 _ name version)
1533 (format #f "\"~a\"" (find-library name)))
1534 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1535 (format #f "\"~a\"" (find-library name)))))
1536 (lambda _
1537 ;; Those are safe to skip.
1538 (format (current-error-port)
1539 "warning: failed to substitute: ~a~%"
1540 file))))
1541 (find-files "openjdk.src/jdk/src/solaris/native"
1542 "\\.c|\\.h"))
1543 #t)))
1544 (replace 'install
1545 (lambda* (#:key outputs #:allow-other-keys)
1546 (let ((doc (string-append (assoc-ref outputs "doc")
1547 "/share/doc/icedtea"))
1548 (jre (assoc-ref outputs "out"))
1549 (jdk (assoc-ref outputs "jdk")))
1550 (copy-recursively "openjdk.build/docs" doc)
1551 (copy-recursively "openjdk.build/images/j2re-image" jre)
1552 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1553 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1554 ;; support via NSS.
1555 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1556 (string-append jre "/lib/security/nss.cfg"))
1557 #t)))
1558 (add-after 'install 'strip-jar-timestamps
1559 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1560 (native-inputs
1561 `(("jdk" ,icedtea-7 "jdk")
1562 ("openjdk-src"
1563 ,(drop "openjdk"
1564 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1565 ("aarch32-drop"
1566 ,(drop "aarch32"
1567 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1568 ("corba-drop"
1569 ,(drop "corba"
1570 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1571 ("jaxp-drop"
1572 ,(drop "jaxp"
1573 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1574 ("jaxws-drop"
1575 ,(drop "jaxws"
1576 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1577 ("jdk-drop"
1578 ,(drop "jdk"
1579 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1580 ("langtools-drop"
1581 ,(drop "langtools"
1582 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1583 ("hotspot-drop"
1584 ,(drop "hotspot"
1585 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1586 ("nashorn-drop"
1587 ,(drop "nashorn"
1588 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1589 ("shenandoah-drop"
1590 ,(drop "shenandoah"
1591 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1592 ,@(fold alist-delete (package-native-inputs icedtea-7)
1593 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1594 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1595
1596 (define-public icedtea icedtea-7)
1597
1598 \f
1599 (define-public ant/java8
1600 (package (inherit ant-bootstrap)
1601 (name "ant")
1602 (version "1.10.1")
1603 (source (origin
1604 (method url-fetch)
1605 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1606 version "-src.tar.gz"))
1607 (sha256
1608 (base32
1609 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1610 (modules '((guix build utils)))
1611 (snippet
1612 '(begin
1613 (for-each delete-file
1614 (find-files "lib/optional" "\\.jar$"))
1615 #t))))
1616 (arguments
1617 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1618 ((#:phases phases)
1619 `(modify-phases ,phases
1620 (add-after 'unpack 'remove-scripts
1621 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1622 ;; wrappers.
1623 (lambda _
1624 (for-each delete-file
1625 (find-files "src/script"
1626 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1627 #t))
1628 (replace 'build
1629 (lambda* (#:key inputs outputs #:allow-other-keys)
1630 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1631
1632 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1633 ;; Ant to build. This is necessary in addition to disabling the
1634 ;; "check" phase, because the dependency on "test-jar" would always
1635 ;; result in the tests to be run.
1636 (substitute* "build.xml"
1637 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1638 (zero? (system* "bash" "bootstrap.sh"
1639 (string-append "-Ddist.dir="
1640 (assoc-ref outputs "out"))))))))))
1641 (native-inputs
1642 `(("jdk" ,icedtea-8 "jdk")))))
1643
1644 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1645 ;; requires Java 8.
1646 (define-public ant
1647 (package (inherit ant/java8)
1648 (version "1.9.9")
1649 (source (origin
1650 (method url-fetch)
1651 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1652 version "-src.tar.gz"))
1653 (sha256
1654 (base32
1655 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1656 (native-inputs
1657 `(("jdk" ,icedtea-7 "jdk")))))
1658
1659 (define-public ant-apache-bcel
1660 (package
1661 (inherit ant/java8)
1662 (name "ant-apache-bcel")
1663 (arguments
1664 (substitute-keyword-arguments (package-arguments ant/java8)
1665 ((#:phases phases)
1666 `(modify-phases ,phases
1667 (add-after 'unpack 'link-bcel
1668 (lambda* (#:key inputs #:allow-other-keys)
1669 (for-each (lambda (file)
1670 (symlink file
1671 (string-append "lib/optional/"
1672 (basename file))))
1673 (find-files (assoc-ref inputs "java-commons-bcel")
1674 "\\.jar$"))
1675 #t))
1676 (add-after 'build 'install
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let* ((out (assoc-ref outputs "out"))
1679 (share (string-append out "/share/java"))
1680 (bin (string-append out "/bin"))
1681 (lib (string-append out "/lib")))
1682 (mkdir-p share)
1683 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1684 (delete-file-recursively bin)
1685 (delete-file-recursively lib)
1686 #t)))))))
1687 (inputs
1688 `(("java-commons-bcel" ,java-commons-bcel)
1689 ,@(package-inputs ant/java8)))))
1690
1691 (define-public ant-junit
1692 (package
1693 (inherit ant/java8)
1694 (name "ant-junit")
1695 (arguments
1696 (substitute-keyword-arguments (package-arguments ant/java8)
1697 ((#:phases phases)
1698 `(modify-phases ,phases
1699 (add-after 'unpack 'link-junit
1700 (lambda* (#:key inputs #:allow-other-keys)
1701 (for-each (lambda (file)
1702 (symlink file
1703 (string-append "lib/optional/"
1704 (basename file))))
1705 (find-files (assoc-ref inputs "java-junit")
1706 "\\.jar$"))
1707 #t))
1708 (add-after 'build 'install
1709 (lambda* (#:key outputs #:allow-other-keys)
1710 (let* ((out (assoc-ref outputs "out"))
1711 (share (string-append out "/share/java"))
1712 (bin (string-append out "/bin"))
1713 (lib (string-append out "/lib")))
1714 (mkdir-p share)
1715 (install-file (string-append lib "/ant-junit.jar") share)
1716 (delete-file-recursively bin)
1717 (delete-file-recursively lib)
1718 #t)))))))
1719 (inputs
1720 `(("java-junit" ,java-junit)
1721 ,@(package-inputs ant/java8)))))
1722
1723 (define-public clojure
1724 (let* ((remove-archives '(begin
1725 (for-each delete-file
1726 (find-files "." ".*\\.(jar|zip)"))
1727 #t))
1728 (submodule (lambda (prefix version hash)
1729 (origin
1730 (method url-fetch)
1731 (uri (string-append "https://github.com/clojure/"
1732 prefix version ".tar.gz"))
1733 (sha256 (base32 hash))
1734 (modules '((guix build utils)))
1735 (snippet remove-archives)))))
1736 (package
1737 (name "clojure")
1738 (version "1.9.0")
1739 (source
1740 (origin
1741 (method url-fetch)
1742 (uri
1743 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1744 version ".tar.gz"))
1745 (sha256
1746 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1747 (modules '((guix build utils)))
1748 (snippet remove-archives)))
1749 (build-system ant-build-system)
1750 (arguments
1751 `(#:modules ((guix build ant-build-system)
1752 (guix build utils)
1753 (ice-9 ftw)
1754 (ice-9 regex)
1755 (srfi srfi-1)
1756 (srfi srfi-26))
1757 #:test-target "test"
1758 #:phases
1759 (modify-phases %standard-phases
1760 (add-after 'unpack 'unpack-submodule-sources
1761 (lambda* (#:key inputs #:allow-other-keys)
1762 (for-each
1763 (lambda (name)
1764 (mkdir-p name)
1765 (with-directory-excursion name
1766 (or (zero? (system* "tar"
1767 ;; Use xz for repacked tarball.
1768 "--xz"
1769 "--extract"
1770 "--verbose"
1771 "--file" (assoc-ref inputs name)
1772 "--strip-components=1"))
1773 (error "failed to unpack tarball" name)))
1774 (copy-recursively (string-append name "/src/main/clojure/")
1775 "src/clj/"))
1776 '("core-specs-alpha-src"
1777 "data-generators-src"
1778 "spec-alpha-src"
1779 "test-check-src"
1780 "test-generative-src"
1781 "tools-namespace-src"))
1782 #t))
1783 ;; The javadoc target is not built by default.
1784 (add-after 'build 'build-doc
1785 (lambda _
1786 (zero? (system* "ant" "javadoc"))))
1787 ;; Needed since no install target is provided.
1788 (replace 'install
1789 (lambda* (#:key outputs #:allow-other-keys)
1790 (let ((java-dir (string-append (assoc-ref outputs "out")
1791 "/share/java/")))
1792 ;; Install versioned to avoid collisions.
1793 (install-file (string-append "clojure-" ,version ".jar")
1794 java-dir)
1795 #t)))
1796 ;; Needed since no install-doc target is provided.
1797 (add-after 'install 'install-doc
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (let ((doc-dir (string-append (assoc-ref outputs "out")
1800 "/share/doc/clojure-"
1801 ,version "/")))
1802 (copy-recursively "doc/clojure" doc-dir)
1803 (copy-recursively "target/javadoc/"
1804 (string-append doc-dir "javadoc/"))
1805 (for-each (cut install-file <> doc-dir)
1806 (filter (cut string-match
1807 ".*\\.(html|markdown|md|txt)"
1808 <>)
1809 (scandir "./")))
1810 #t))))))
1811 ;; The native-inputs below are needed to run the tests.
1812 (native-inputs
1813 `(("core-specs-alpha-src"
1814 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1815 "0.1.24"
1816 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1817 ("data-generators-src"
1818 ,(submodule "data.generators/archive/data.generators-"
1819 "0.1.2"
1820 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1821 ("spec-alpha-src"
1822 ,(submodule "spec.alpha/archive/spec.alpha-"
1823 "0.1.143"
1824 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1825 ("test-check-src"
1826 ,(submodule "test.check/archive/test.check-"
1827 "0.9.0"
1828 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1829 ("test-generative-src"
1830 ,(submodule "test.generative/archive/test.generative-"
1831 "0.5.2"
1832 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1833 ("tools-namespace-src"
1834 ,(submodule "tools.namespace/archive/tools.namespace-"
1835 "0.2.11"
1836 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1837 (home-page "https://clojure.org/")
1838 (synopsis "Lisp dialect running on the JVM")
1839 (description "Clojure is a dynamic, general-purpose programming language,
1840 combining the approachability and interactive development of a scripting
1841 language with an efficient and robust infrastructure for multithreaded
1842 programming. Clojure is a compiled language, yet remains completely dynamic
1843 – every feature supported by Clojure is supported at runtime. Clojure
1844 provides easy access to the Java frameworks, with optional type hints and type
1845 inference, to ensure that calls to Java can avoid reflection.
1846
1847 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1848 and a powerful macro system. Clojure is predominantly a functional programming
1849 language, and features a rich set of immutable, persistent data structures.
1850 When mutable state is needed, Clojure offers a software transactional memory
1851 system and reactive Agent system that ensure clean, correct, multithreaded
1852 designs.")
1853 ;; Clojure is licensed under EPL1.0
1854 ;; ASM bytecode manipulation library is licensed under BSD-3
1855 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1856 ;; src/clj/repl.clj is licensed under CPL1.0
1857 ;;
1858 ;; See readme.html or readme.txt for details.
1859 (license (list license:epl1.0
1860 license:bsd-3
1861 license:asl2.0
1862 license:cpl1.0)))))
1863
1864 (define-public javacc
1865 (package
1866 (name "javacc")
1867 (version "7.0.3")
1868 (source (origin
1869 (method url-fetch)
1870 (uri (string-append "https://github.com/javacc/javacc/"
1871 "archive/" version ".tar.gz"))
1872 (file-name (string-append "javacc-" version ".tar.gz"))
1873 (sha256
1874 (base32
1875 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1876 (build-system ant-build-system)
1877 (arguments
1878 `(#:test-target "test"
1879 #:phases
1880 (modify-phases %standard-phases
1881 (add-after 'unpack 'delete-bundled-libs
1882 (lambda _
1883 (delete-file-recursively "lib") #t))
1884 (replace 'install (install-jars "target")))))
1885 (home-page "https://javacc.org/")
1886 (synopsis "Java parser generator")
1887 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1888 generator for use with Java applications. A parser generator is a tool that
1889 reads a grammar specification and converts it to a Java program that can
1890 recognize matches to the grammar. In addition to the parser generator itself,
1891 JavaCC provides other standard capabilities related to parser generation such
1892 as tree building (via a tool called JJTree included with JavaCC), actions,
1893 debugging, etc.")
1894 (license license:bsd-3)))
1895
1896 (define-public javacc-4
1897 (package (inherit javacc)
1898 (version "4.1")
1899 (source (origin
1900 (method git-fetch)
1901 (uri (git-reference
1902 (url "https://github.com/javacc/javacc.git")
1903 (commit "release_41")))
1904 (file-name (string-append "javacc-" version "-checkout"))
1905 (sha256
1906 (base32
1907 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1908 ;; Tests fail with
1909 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1910 ;; JAVACODE failed
1911 (arguments
1912 `(#:tests? #f
1913 #:phases
1914 (modify-phases %standard-phases
1915 (add-after 'unpack 'delete-bundled-libs
1916 (lambda _
1917 (delete-file-recursively "lib") #t))
1918 (replace 'install (install-jars "bin/lib")))))))
1919
1920 ;; This is the last 3.x release of ECJ
1921 (define-public java-ecj-3
1922 (package
1923 (name "java-ecj")
1924 (version "3.8.2")
1925 (source (origin
1926 (method url-fetch)
1927 (uri (string-append "http://archive.eclipse.org/eclipse/"
1928 "downloads/drops/R-" version
1929 "-201301310800/ecjsrc-" version ".jar"))
1930 (sha256
1931 (base32
1932 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1933 (build-system ant-build-system)
1934 (arguments
1935 `(#:tests? #f ; none included
1936 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1937 #:make-flags (list "-f" "src/build.xml")
1938 #:build-target "build"
1939 #:phases
1940 (modify-phases %standard-phases
1941 (add-after 'unpack 'fix-manifest
1942 (lambda _
1943 ;; Record the main class to make ecj executable.
1944 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1945 (lambda (in out)
1946 (display "Manifest-Version: 1.0
1947 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1948 out)))))
1949 (replace 'install (install-jars ".")))))
1950 (home-page "https://eclipse.org")
1951 (synopsis "Eclipse Java development tools core batch compiler")
1952 (description "This package provides the Eclipse Java core batch compiler.")
1953 (license license:epl1.0)))
1954
1955 ;; This is needed for java-cisd-args4j
1956 (define-public java-ecj-3.5
1957 (package (inherit java-ecj-3)
1958 (version "3.5.1")
1959 (source (origin
1960 (method url-fetch/zipbomb)
1961 (uri (string-append "http://archive.eclipse.org/eclipse/"
1962 "downloads/drops/R-" version
1963 "-200909170800/ecjsrc-" version ".zip"))
1964 (sha256
1965 (base32
1966 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1967 (build-system ant-build-system)
1968 (arguments
1969 `(#:tests? #f ; none included
1970 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1971 #:build-target "build"
1972 #:phases
1973 (modify-phases %standard-phases
1974 (add-after 'unpack 'fix-manifest
1975 (lambda _
1976 ;; Record the main class to make ecj executable.
1977 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1978 (lambda (in out)
1979 (dump-port in out)
1980 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1981 out)))))
1982 (replace 'install (install-jars ".")))))
1983 (native-inputs
1984 `(("unzip" ,unzip)))))
1985
1986 (define-public java-cisd-base
1987 (let ((revision 38938)
1988 (base-version "14.12.0"))
1989 (package
1990 (name "java-cisd-base")
1991 (version (string-append base-version "-" (number->string revision)))
1992 (source (origin
1993 (method svn-fetch)
1994 (uri (svn-reference
1995 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
1996 "base/tags/release/"
1997 (version-major+minor base-version)
1998 ".x/" base-version "/base/"))
1999 (revision revision)))
2000 (file-name (string-append "java-cisd-base-" version "-checkout"))
2001 (sha256
2002 (base32
2003 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2004 (modules '((guix build utils)))
2005 (snippet
2006 '(begin
2007 ;; Delete included gradle jar
2008 (delete-file-recursively "gradle/wrapper")
2009 ;; Delete pre-built native libraries
2010 (delete-file-recursively "libs")
2011 #t))))
2012 (build-system ant-build-system)
2013 (arguments
2014 `(#:make-flags '("-file" "build/build.xml")
2015 #:test-target "jar-test"
2016 #:jdk ,icedtea-8
2017 #:phases
2018 (modify-phases %standard-phases
2019 (add-after 'unpack 'unpack-build-resources
2020 (lambda* (#:key inputs #:allow-other-keys)
2021 (copy-recursively (assoc-ref inputs "build-resources")
2022 "../build_resources")
2023 #t))
2024 (add-after 'unpack-build-resources 'fix-dependencies
2025 (lambda* (#:key inputs #:allow-other-keys)
2026 (substitute* "build/build.xml"
2027 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2028 (string-append (assoc-ref inputs "java-testng")
2029 "/share/java/java-testng.jar"))
2030 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2031 (string-append (assoc-ref inputs "java-commons-lang")
2032 "/share/java/commons-lang-"
2033 ,(package-version java-commons-lang) ".jar"))
2034 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2035 (string-append (assoc-ref inputs "java-commons-io")
2036 "/share/java/commons-io-"
2037 ,(package-version java-commons-io)
2038 "-SNAPSHOT.jar"))
2039 ;; Remove dependency on svn
2040 (("<build-info.*") "")
2041 (("\\$\\{revision.number\\}")
2042 ,(number->string revision))
2043 (("\\$\\{version.number\\}") ,base-version))
2044 ;; Remove dependency on classycle
2045 (substitute* "../build_resources/ant/build-common.xml"
2046 (("<taskdef name=\"dependency-checker.*") "")
2047 (("classname=\"classycle.*") "")
2048 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2049 #t))
2050 ;; A few tests fail because of the lack of a proper /etc/groups and
2051 ;; /etc/passwd file in the build container.
2052 (add-after 'unpack 'disable-broken-tests
2053 (lambda _
2054 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2055 (("Unix.isOperational\\(\\)") "false"))
2056 #t))
2057 ;; These decorators are almost useless and pull in an unpackaged
2058 ;; dependency.
2059 (add-after 'unpack 'remove-useless-decorators
2060 (lambda _
2061 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2062 (("@Private") "")
2063 (("import ch.rinn.restrictions.Private;") ""))
2064 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2065 (("@Friend.*") "")
2066 (("import ch.rinn.restrictions.Friend;") ""))
2067 #t))
2068 (add-before 'configure 'build-native-code
2069 (lambda* (#:key inputs #:allow-other-keys)
2070 (let ((jdk (assoc-ref inputs "jdk"))
2071 (dir ,(match (%current-system)
2072 ("i686-linux"
2073 "i386-Linux")
2074 ((or "armhf-linux" "aarch64-linux")
2075 "arm-Linux")
2076 ((or "x86_64-linux")
2077 "amd64-Linux")
2078 (_ "unknown-Linux"))))
2079 (with-directory-excursion "source/c"
2080 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2081 (string-append "-I" jdk "/include")
2082 (string-append "-I" jdk "/include/linux")
2083 "-o" "libunix.so")
2084 (invoke "gcc" "-shared" "-O3" "-fPIC"
2085 "-DMACHINE_BYTE_ORDER=1"
2086 "copyCommon.c"
2087 "copyByteChar.c"
2088 "copyByteDouble.c"
2089 "copyByteFloat.c"
2090 "copyByteInt.c"
2091 "copyByteLong.c"
2092 "copyByteShort.c"
2093 (string-append "-I" jdk "/include")
2094 (string-append "-I" jdk "/include/linux")
2095 "-o" "libnativedata.so"))
2096 (install-file "source/c/libunix.so"
2097 (string-append "libs/native/unix/" dir))
2098 (install-file "source/c/libnativedata.so"
2099 (string-append "libs/native/nativedata/" dir))
2100 #t)))
2101 ;; In the "check" phase we only build the test executable.
2102 (add-after 'check 'run-tests
2103 (lambda _
2104 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2105 (delete-file "targets/dist/sis-base-test.jar")
2106 #t))
2107 (replace 'install (install-jars "targets/dist")))))
2108 (native-inputs
2109 `(("jdk" ,icedtea-8)
2110 ("java-commons-lang" ,java-commons-lang)
2111 ("java-commons-io" ,java-commons-io)
2112 ("java-testng" ,java-testng)
2113 ("build-resources"
2114 ,(origin
2115 (method svn-fetch)
2116 (uri (svn-reference
2117 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2118 "base/tags/release/"
2119 (version-major+minor base-version)
2120 ".x/" base-version
2121 "/build_resources/"))
2122 (revision revision)))
2123 (sha256
2124 (base32
2125 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2126 (home-page "http://svnsis.ethz.ch")
2127 (synopsis "Utility classes for libraries from ETH Zurich")
2128 (description "This library supplies some utility classes needed for
2129 libraries from the SIS division at ETH Zurich like jHDF5.")
2130 ;; The C sources are under a non-copyleft license, which looks like a
2131 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2132 (license (list license:asl2.0
2133 (license:non-copyleft "file://source/c/COPYING"))))))
2134
2135 (define-public java-cisd-args4j
2136 (let ((revision 39162)
2137 (base-version "9.11.2"))
2138 (package
2139 (name "java-cisd-args4j")
2140 (version (string-append base-version "-" (number->string revision)))
2141 (source (origin
2142 (method svn-fetch)
2143 (uri (svn-reference
2144 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2145 "args4j/tags/release/"
2146 (version-major+minor base-version)
2147 ".x/" base-version "/args4j/"))
2148 (revision revision)))
2149 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2150 (sha256
2151 (base32
2152 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2153 (build-system ant-build-system)
2154 (arguments
2155 `(#:make-flags '("-file" "build/build.xml")
2156 #:tests? #f ; there are no tests
2157 ;; There are weird build failures with JDK8, such as: "The type
2158 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2159 ;; referenced from required .class files"
2160 #:jdk ,icedtea-7
2161 #:modules ((guix build ant-build-system)
2162 (guix build utils)
2163 (guix build java-utils)
2164 (sxml simple)
2165 (sxml transform)
2166 (sxml xpath))
2167 #:phases
2168 (modify-phases %standard-phases
2169 (add-after 'unpack 'unpack-build-resources
2170 (lambda* (#:key inputs #:allow-other-keys)
2171 (mkdir-p "../build_resources")
2172 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2173 "-C" "../build_resources"
2174 "--strip-components=1")
2175 (mkdir-p "../build_resources/lib")
2176 #t))
2177 (add-after 'unpack-build-resources 'fix-dependencies
2178 (lambda* (#:key inputs #:allow-other-keys)
2179 ;; FIXME: There should be a more convenient abstraction for
2180 ;; editing XML files.
2181 (with-directory-excursion "../build_resources/ant/"
2182 (chmod "build-common.xml" #o664)
2183 (call-with-output-file "build-common.xml.new"
2184 (lambda (port)
2185 (sxml->xml
2186 (pre-post-order
2187 (with-input-from-file "build-common.xml"
2188 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2189 `(;; Remove dependency on classycle and custom ant tasks
2190 (taskdef . ,(lambda (tag . kids)
2191 (let ((name ((sxpath '(name *text*)) kids)))
2192 (if (or (member "build-info" name)
2193 (member "dependency-checker" name)
2194 (member "build-java-subprojects" name)
2195 (member "project-classpath" name))
2196 '() ; skip
2197 `(,tag ,@kids)))))
2198 (typedef . ,(lambda (tag . kids)
2199 (let ((name ((sxpath '(name *text*)) kids)))
2200 (if (member "recursive-jar" name)
2201 '() ; skip
2202 `(,tag ,@kids)))))
2203 (build-java-subprojects . ,(lambda _ '()))
2204 ;; Ignore everything else
2205 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2206 (*text* . ,(lambda (_ txt) txt))))
2207 port)))
2208 (rename-file "build-common.xml.new" "build-common.xml"))
2209 (substitute* "build/build.xml"
2210 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2211 (string-append (assoc-ref inputs "java-cisd-base")
2212 "/share/java/sis-base.jar"))
2213 ;; Remove dependency on svn
2214 (("<build-info.*") "")
2215 (("\\$\\{revision.number\\}")
2216 ,(number->string revision))
2217 (("\\$\\{version.number\\}") ,base-version)
2218 ;; Don't use custom ant tasks.
2219 (("recursive-jar") "jar")
2220 (("<project-classpath.*") ""))
2221 #t))
2222 (replace 'install (install-jars "targets/dist")))))
2223 (inputs
2224 `(("java-cisd-base" ,java-cisd-base)))
2225 (native-inputs
2226 `(("ecj" ,java-ecj-3.5)
2227 ("build-resources"
2228 ,(origin
2229 (method svn-fetch)
2230 (uri (svn-reference
2231 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2232 "args4j/tags/release/"
2233 (version-major+minor base-version)
2234 ".x/" base-version
2235 "/build_resources/"))
2236 (revision revision)))
2237 (sha256
2238 (base32
2239 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2240 (modules '((guix build utils)))
2241 ;; Delete bundled pre-built jars.
2242 (snippet
2243 '(begin (delete-file-recursively "lib/") #t))))))
2244 (home-page "http://svnsis.ethz.ch")
2245 (synopsis "Command line parser library")
2246 (description "This package provides a parser for command line arguments.")
2247 (license license:asl2.0))))
2248
2249 (define-public java-cisd-jhdf5
2250 (let ((revision 39162)
2251 (base-version "14.12.6"))
2252 (package
2253 (name "java-cisd-jhdf5")
2254 (version (string-append base-version "-" (number->string revision)))
2255 (source (origin
2256 (method svn-fetch)
2257 (uri (svn-reference
2258 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2259 "jhdf5/tags/release/"
2260 (version-major+minor base-version)
2261 ".x/" base-version "/jhdf5/"))
2262 (revision revision)))
2263 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2264 (sha256
2265 (base32
2266 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2267 (modules '((guix build utils)))
2268 (snippet
2269 '(begin
2270 ;; Delete included gradle jar
2271 (delete-file-recursively "gradle/wrapper")
2272 ;; Delete pre-built native libraries
2273 (delete-file-recursively "libs")
2274 #t))))
2275 (build-system ant-build-system)
2276 (arguments
2277 `(#:make-flags '("-file" "build/build.xml")
2278 #:build-target "jar-all"
2279 #:test-target "jar-test"
2280 #:jdk ,icedtea-8
2281 #:phases
2282 (modify-phases %standard-phases
2283 ;; Don't erase results from the build phase when building tests.
2284 (add-after 'unpack 'separate-test-target-from-clean
2285 (lambda _
2286 (substitute* "build/build.xml"
2287 (("\"jar-test\" depends=\"clean, ")
2288 "\"jar-test\" depends=\""))
2289 #t))
2290 (add-after 'unpack 'unpack-build-resources
2291 (lambda* (#:key inputs #:allow-other-keys)
2292 (copy-recursively (assoc-ref inputs "build-resources")
2293 "../build_resources")
2294 (delete-file-recursively "../build_resources/lib/")
2295 (mkdir-p "../build_resources/lib")
2296 ;; Remove dependency on classycle
2297 (substitute* "../build_resources/ant/build-common.xml"
2298 (("<taskdef name=\"dependency-checker.*") "")
2299 (("classname=\"classycle.*") "")
2300 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2301 ;; Remove dependency on svn
2302 (substitute* "build/build.xml"
2303 (("<build-info.*") "")
2304 (("\\$\\{revision.number\\}")
2305 ,(number->string revision))
2306 (("\\$\\{version.number\\}") ,base-version))
2307 #t))
2308 (add-after 'unpack-build-resources 'fix-dependencies
2309 (lambda* (#:key inputs #:allow-other-keys)
2310 (substitute* "../build_resources/ant/build-common.xml"
2311 (("../libraries/testng/testng-jdk15.jar")
2312 (string-append (assoc-ref inputs "java-testng")
2313 "/share/java/java-testng.jar")))
2314 (substitute* "build/build.xml"
2315 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2316 (string-append (assoc-ref inputs "java-cisd-base")
2317 "/share/java/sis-base.jar"))
2318 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2319 (string-append (assoc-ref inputs "java-cisd-args4j")
2320 "/share/java/cisd-args4j.jar"))
2321 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2322 (string-append (assoc-ref inputs "java-commons-lang")
2323 "/share/java/commons-lang-"
2324 ,(package-version java-commons-lang) ".jar"))
2325 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2326 (string-append (assoc-ref inputs "java-commons-io")
2327 "/share/java/commons-io-"
2328 ,(package-version java-commons-io)
2329 "-SNAPSHOT.jar"))
2330 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2331 (string-append (assoc-ref inputs "java-testng")
2332 "/share/java/java-testng.jar"))
2333 (("\\$\\{lib\\}/junit4/junit.jar")
2334 (string-append (assoc-ref inputs "java-junit")
2335 "/share/java/junit.jar"))
2336 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2337 (string-append (assoc-ref inputs "java-hamcrest-core")
2338 "/share/java/hamcrest-core.jar")))
2339 ;; Remove dependency on ch.rinn.restrictions
2340 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2341 (substitute* '("BitSetConversionUtils.java"
2342 "HDF5Utils.java")
2343 (("import ch.rinn.restrictions.Private;") "")
2344 (("@Private") "")))
2345 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2346 (substitute* '("BitSetConversionTest.java"
2347 "h5ar/HDF5ArchiverTest.java")
2348 (("import ch.rinn.restrictions.Friend;") "")
2349 (("@Friend.*") ""))
2350 ;; Remove leftovers from removing @Friend
2351 (substitute* "h5ar/HDF5ArchiverTest.java"
2352 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2353 "")))
2354 #t))
2355 (add-before 'configure 'build-native-library
2356 (lambda* (#:key inputs #:allow-other-keys)
2357 (let ((jdk (assoc-ref inputs "jdk"))
2358 (hdf5 (assoc-ref inputs "hdf5"))
2359 (dir ,(match (%current-system)
2360 ("i686-linux"
2361 "i386-Linux")
2362 ((or "armhf-linux" "aarch64-linux")
2363 "arm-Linux")
2364 ((or "x86_64-linux")
2365 "amd64-Linux")
2366 (_ "unknown-Linux"))))
2367 (with-directory-excursion "source/c"
2368 (apply invoke `("gcc" "-shared" "-O3"
2369 "-fPIC"
2370 "-Wl,--exclude-libs,ALL"
2371 ,@(find-files "jhdf5" "\\.c$")
2372 ,@(find-files "hdf-java" "\\.c$")
2373 ,(string-append "-I" hdf5 "/include")
2374 ,(string-append "-I" jdk "/include")
2375 ,(string-append "-I" jdk "/include/linux")
2376 ,(string-append hdf5 "/lib/libhdf5.a")
2377 "-o" "libjhdf5.so" "-lz")))
2378 (install-file "source/c/libjhdf5.so"
2379 (string-append "libs/native/jhdf5/" dir))
2380 #t)))
2381 ;; In the "check" phase we only build the test executable.
2382 (add-after 'check 'run-tests
2383 (lambda _
2384 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2385 (delete-file "targets/dist/sis-jhdf5-test.jar")
2386 #t))
2387 (replace 'install
2388 (install-jars "targets/dist")))))
2389 (inputs
2390 `(("java-cisd-base" ,java-cisd-base)
2391 ("java-cisd-args4j" ,java-cisd-args4j)
2392 ("java-commons-lang" ,java-commons-lang)
2393 ("java-commons-io" ,java-commons-io)
2394 ("hdf5" ,hdf5)
2395 ("zlib" ,zlib)))
2396 (native-inputs
2397 `(("jdk" ,icedtea-8)
2398 ("java-testng" ,java-testng)
2399 ("java-junit" ,java-junit)
2400 ("java-jmock" ,java-jmock)
2401 ("java-hamcrest-core" ,java-hamcrest-core)
2402 ("build-resources"
2403 ,(origin
2404 (method svn-fetch)
2405 (uri (svn-reference
2406 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2407 "jhdf5/tags/release/"
2408 (version-major+minor base-version)
2409 ".x/" base-version
2410 "/build_resources/"))
2411 (revision revision)))
2412 (sha256
2413 (base32
2414 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2415 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2416 (synopsis "Java binding for HDF5")
2417 (description "JHDF5 is a high-level API in Java for reading and writing
2418 HDF5 files, building on the libraries provided by the HDF Group.")
2419 ;; The C sources are under a non-copyleft license, which looks like a
2420 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2421 (license (list license:asl2.0
2422 (license:non-copyleft "file://source/c/COPYING"))))))
2423
2424 (define-public java-classpathx-servletapi
2425 (package
2426 (name "java-classpathx-servletapi")
2427 (version "3.0.1")
2428 (source (origin
2429 (method url-fetch)
2430 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2431 "servletapi-" version ".tar.gz"))
2432 (sha256
2433 (base32
2434 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2435 (build-system ant-build-system)
2436 (arguments
2437 `(#:tests? #f ; there is no test target
2438 #:build-target "compile"
2439 #:make-flags
2440 (list "-Dbuild.compiler=javac1.8"
2441 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2442 #:phases
2443 (modify-phases %standard-phases
2444 (replace 'install
2445 (lambda* (#:key make-flags #:allow-other-keys)
2446 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2447 (home-page "https://www.gnu.org/software/classpathx/")
2448 (synopsis "Java servlet API implementation")
2449 (description "This is the GNU servlet API distribution, part of the
2450 ClasspathX project. It provides implementations of version 3.0 of the servlet
2451 API and version 2.1 of the Java ServerPages API.")
2452 (license license:gpl3+)))
2453
2454 (define-public java-swt
2455 (package
2456 (name "java-swt")
2457 (version "4.7.1a")
2458 (source
2459 ;; The types of many variables and procedures differ in the sources
2460 ;; dependent on whether the target architecture is a 32-bit system or a
2461 ;; 64-bit system. Instead of patching the sources on demand in a build
2462 ;; phase we download either the 32-bit archive (which mostly uses "int"
2463 ;; types) or the 64-bit archive (which mostly uses "long" types).
2464 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2465 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2466 (file32 "x86")
2467 (file64 "x86_64"))
2468 (let-values (((hash file)
2469 (match (or (%current-target-system) (%current-system))
2470 ("x86_64-linux" (values hash64 file64))
2471 (_ (values hash32 file32)))))
2472 (origin
2473 (method url-fetch)
2474 (uri (string-append
2475 "http://download.eclipse.org/eclipse/downloads/drops4/"
2476 "R-" version "-201710090410/swt-" version
2477 "-gtk-linux-" file ".zip"))
2478 (sha256 (base32 hash))))))
2479 (build-system ant-build-system)
2480 (arguments
2481 `(#:jar-name "swt.jar"
2482 #:jdk ,icedtea-8
2483 #:tests? #f ; no "check" target
2484 #:phases
2485 (modify-phases %standard-phases
2486 (replace 'unpack
2487 (lambda* (#:key source #:allow-other-keys)
2488 (and (mkdir "swt")
2489 (zero? (system* "unzip" source "-d" "swt"))
2490 (chdir "swt")
2491 (mkdir "src")
2492 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2493 ;; The classpath contains invalid icecat jars. Since we don't need
2494 ;; anything other than the JDK on the classpath, we can simply unset
2495 ;; it.
2496 (add-after 'configure 'unset-classpath
2497 (lambda _ (unsetenv "CLASSPATH") #t))
2498 (add-before 'build 'build-native
2499 (lambda* (#:key inputs outputs #:allow-other-keys)
2500 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2501 ;; Build shared libraries. Users of SWT have to set the system
2502 ;; property swt.library.path to the "lib" directory of this
2503 ;; package output.
2504 (mkdir-p lib)
2505 (setenv "OUTPUT_DIR" lib)
2506 (with-directory-excursion "src"
2507 (zero? (system* "bash" "build.sh"))))))
2508 (add-after 'install 'install-native
2509 (lambda* (#:key outputs #:allow-other-keys)
2510 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2511 (for-each (lambda (file)
2512 (install-file file lib))
2513 (find-files "." "\\.so$"))
2514 #t))))))
2515 (inputs
2516 `(("gtk" ,gtk+-2)
2517 ("libxtst" ,libxtst)
2518 ("libxt" ,libxt)
2519 ("mesa" ,mesa)
2520 ("glu" ,glu)))
2521 (native-inputs
2522 `(("pkg-config" ,pkg-config)
2523 ("unzip" ,unzip)))
2524 (home-page "https://www.eclipse.org/swt/")
2525 (synopsis "Widget toolkit for Java")
2526 (description
2527 "SWT is a widget toolkit for Java designed to provide efficient, portable
2528 access to the user-interface facilities of the operating systems on which it
2529 is implemented.")
2530 ;; SWT code is licensed under EPL1.0
2531 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2532 ;; Cairo bindings contain code under MPL1.1
2533 ;; XULRunner 1.9 bindings contain code under MPL2.0
2534 (license (list
2535 license:epl1.0
2536 license:mpl1.1
2537 license:mpl2.0
2538 license:lgpl2.1+))))
2539
2540 (define-public java-xz
2541 (package
2542 (name "java-xz")
2543 (version "1.6")
2544 (source (origin
2545 (method url-fetch)
2546 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2547 (sha256
2548 (base32
2549 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2550 (build-system ant-build-system)
2551 (arguments
2552 `(#:tests? #f ; There are no tests to run.
2553 #:jar-name ,(string-append "xz-" version ".jar")
2554 #:phases
2555 (modify-phases %standard-phases
2556 ;; The unpack phase enters the "maven" directory by accident.
2557 (add-after 'unpack 'chdir
2558 (lambda _ (chdir "..") #t)))))
2559 (native-inputs
2560 `(("unzip" ,unzip)))
2561 (home-page "https://tukaani.org/xz/java.html")
2562 (synopsis "Implementation of XZ data compression in pure Java")
2563 (description "This library aims to be a complete implementation of XZ data
2564 compression in pure Java. Single-threaded streamed compression and
2565 decompression and random access decompression have been fully implemented.")
2566 (license license:public-domain)))
2567
2568 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2569 ;; of the latest release.
2570 (define-public java-qdox-1.12
2571 (package
2572 (name "java-qdox")
2573 (version "1.12.1")
2574 (source (origin
2575 (method url-fetch)
2576 (uri (string-append "http://central.maven.org/maven2/"
2577 "com/thoughtworks/qdox/qdox/" version
2578 "/qdox-" version "-sources.jar"))
2579 (sha256
2580 (base32
2581 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2582 (build-system ant-build-system)
2583 (arguments
2584 `(;; Tests require junit
2585 #:tests? #f
2586 #:jar-name "qdox.jar"
2587 #:phases
2588 (modify-phases %standard-phases
2589 (replace 'unpack
2590 (lambda* (#:key source #:allow-other-keys)
2591 (mkdir "src")
2592 (with-directory-excursion "src"
2593 (zero? (system* "jar" "-xf" source)))))
2594 ;; At this point we don't have junit, so we must remove the API
2595 ;; tests.
2596 (add-after 'unpack 'delete-tests
2597 (lambda _
2598 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2599 #t)))))
2600 (home-page "http://qdox.codehaus.org/")
2601 (synopsis "Parse definitions from Java source files")
2602 (description
2603 "QDox is a high speed, small footprint parser for extracting
2604 class/interface/method definitions from source files complete with JavaDoc
2605 @code{@@tags}. It is designed to be used by active code generators or
2606 documentation tools.")
2607 (license license:asl2.0)))
2608
2609 (define-public java-jarjar
2610 (package
2611 (name "java-jarjar")
2612 (version "1.4")
2613 (source (origin
2614 (method url-fetch)
2615 (uri (string-append
2616 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2617 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2618 (sha256
2619 (base32
2620 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
2621 (build-system ant-build-system)
2622 (arguments
2623 `(;; Tests require junit, which ultimately depends on this package.
2624 #:tests? #f
2625 #:build-target "jar"
2626 #:phases
2627 (modify-phases %standard-phases
2628 (replace 'install
2629 (lambda* (#:key outputs #:allow-other-keys)
2630 (let ((target (string-append (assoc-ref outputs "out")
2631 "/share/java")))
2632 (install-file (string-append "dist/jarjar-" ,version ".jar")
2633 target))
2634 #t)))))
2635 (native-inputs
2636 `(("unzip" ,unzip)))
2637 (home-page "https://code.google.com/archive/p/jarjar/")
2638 (synopsis "Repackage Java libraries")
2639 (description
2640 "Jar Jar Links is a utility that makes it easy to repackage Java
2641 libraries and embed them into your own distribution. Jar Jar Links includes
2642 an Ant task that extends the built-in @code{jar} task.")
2643 (license license:asl2.0)))
2644
2645 (define-public java-hamcrest-core
2646 (package
2647 (name "java-hamcrest-core")
2648 (version "1.3")
2649 (source (origin
2650 (method url-fetch)
2651 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2652 "archive/hamcrest-java-" version ".tar.gz"))
2653 (sha256
2654 (base32
2655 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2656 (modules '((guix build utils)))
2657 (snippet
2658 '(begin
2659 ;; Delete bundled thirds-party jar archives.
2660 (delete-file-recursively "lib")
2661 #t))))
2662 (build-system ant-build-system)
2663 (arguments
2664 `(#:tests? #f ; Tests require junit
2665 #:modules ((guix build ant-build-system)
2666 (guix build utils)
2667 (srfi srfi-1))
2668 #:make-flags (list (string-append "-Dversion=" ,version))
2669 #:test-target "unit-test"
2670 #:build-target "core"
2671 #:phases
2672 (modify-phases %standard-phases
2673 ;; Disable unit tests, because they require junit, which requires
2674 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2675 ;; attribute from the manifest for reproducibility.
2676 (add-before 'configure 'patch-build.xml
2677 (lambda _
2678 (substitute* "build.xml"
2679 (("unit-test, ") "")
2680 (("\\$\\{build.timestamp\\}") "guix"))
2681 #t))
2682 ;; Java's "getMethods()" returns methods in an unpredictable order.
2683 ;; To make the output of the generated code deterministic we must
2684 ;; sort the array of methods.
2685 (add-after 'unpack 'make-method-order-deterministic
2686 (lambda _
2687 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2688 (("import java\\.util\\.Iterator;" line)
2689 (string-append line "\n"
2690 "import java.util.Arrays; import java.util.Comparator;"))
2691 (("allMethods = cls\\.getMethods\\(\\);" line)
2692 (string-append "_" line
2693 "
2694 private Method[] getSortedMethods() {
2695 Arrays.sort(_allMethods, new Comparator<Method>() {
2696 @Override
2697 public int compare(Method a, Method b) {
2698 return a.toString().compareTo(b.toString());
2699 }
2700 });
2701 return _allMethods;
2702 }
2703
2704 private Method[] allMethods = getSortedMethods();")))))
2705 (add-before 'build 'do-not-use-bundled-qdox
2706 (lambda* (#:key inputs #:allow-other-keys)
2707 (substitute* "build.xml"
2708 (("lib/generator/qdox-1.12.jar")
2709 (string-append (assoc-ref inputs "java-qdox-1.12")
2710 "/share/java/qdox.jar")))
2711 #t))
2712 ;; build.xml searches for .jar files in this directoy, which
2713 ;; we remove from the source archive.
2714 (add-before 'build 'create-dummy-directories
2715 (lambda _
2716 (mkdir-p "lib/integration")
2717 #t))
2718 (replace 'install
2719 (lambda* (#:key outputs #:allow-other-keys)
2720 (let* ((target (string-append (assoc-ref outputs "out")
2721 "/share/java/"))
2722 (version-suffix ,(string-append "-" version ".jar"))
2723 (install-without-version-suffix
2724 (lambda (jar)
2725 (copy-file jar
2726 (string-append target
2727 (basename jar version-suffix)
2728 ".jar")))))
2729 (mkdir-p target)
2730 (for-each
2731 install-without-version-suffix
2732 (find-files "build"
2733 (lambda (name _)
2734 (and (string-suffix? ".jar" name)
2735 (not (string-suffix? "-sources.jar" name)))))))
2736 #t)))))
2737 (native-inputs
2738 `(("java-qdox-1.12" ,java-qdox-1.12)
2739 ("java-jarjar" ,java-jarjar)))
2740 (home-page "http://hamcrest.org/")
2741 (synopsis "Library of matchers for building test expressions")
2742 (description
2743 "This package provides a library of matcher objects (also known as
2744 constraints or predicates) allowing @code{match} rules to be defined
2745 declaratively, to be used in other frameworks. Typical scenarios include
2746 testing frameworks, mocking libraries and UI validation rules.")
2747 (license license:bsd-2)))
2748
2749 (define-public java-junit
2750 (package
2751 (name "java-junit")
2752 (version "4.12")
2753 (source (origin
2754 (method url-fetch)
2755 (uri (string-append "https://github.com/junit-team/junit/"
2756 "archive/r" version ".tar.gz"))
2757 (file-name (string-append name "-" version ".tar.gz"))
2758 (sha256
2759 (base32
2760 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2761 (modules '((guix build utils)))
2762 (snippet
2763 '(begin
2764 ;; Delete bundled jar archives.
2765 (delete-file-recursively "lib")
2766 #t))))
2767 (build-system ant-build-system)
2768 (arguments
2769 `(#:tests? #f ; no tests
2770 #:jar-name "junit.jar"))
2771 (inputs
2772 `(("java-hamcrest-core" ,java-hamcrest-core)))
2773 (home-page "http://junit.org/")
2774 (synopsis "Test framework for Java")
2775 (description
2776 "JUnit is a simple framework to write repeatable tests for Java projects.
2777 JUnit provides assertions for testing expected results, test fixtures for
2778 sharing common test data, and test runners for running tests.")
2779 (license license:epl1.0)))
2780
2781 (define-public java-plexus-utils
2782 (package
2783 (name "java-plexus-utils")
2784 (version "3.0.24")
2785 (source (origin
2786 (method url-fetch)
2787 (uri (string-append "https://github.com/codehaus-plexus/"
2788 "plexus-utils/archive/plexus-utils-"
2789 version ".tar.gz"))
2790 (sha256
2791 (base32
2792 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2793 (build-system ant-build-system)
2794 ;; FIXME: The default build.xml does not include a target to install
2795 ;; javadoc files.
2796 (arguments
2797 `(#:jar-name "plexus-utils.jar"
2798 #:source-dir "src/main"
2799 #:phases
2800 (modify-phases %standard-phases
2801 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2802 (lambda _
2803 (substitute* "src/main/java/org/codehaus/plexus/util/\
2804 cli/shell/BourneShell.java"
2805 (("/bin/sh") (which "sh"))
2806 (("/usr/") (getcwd)))
2807 #t))
2808 (add-after 'unpack 'fix-or-disable-broken-tests
2809 (lambda _
2810 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2811 (substitute* '("cli/CommandlineTest.java"
2812 "cli/shell/BourneShellTest.java")
2813 (("/bin/sh") (which "sh"))
2814 (("/bin/echo") (which "echo")))
2815
2816 ;; This test depends on MavenProjectStub, but we don't have
2817 ;; a package for Maven.
2818 (delete-file "introspection/ReflectionValueExtractorTest.java")
2819
2820 ;; FIXME: The command line tests fail, maybe because they use
2821 ;; absolute paths.
2822 (delete-file "cli/CommandlineTest.java"))
2823 #t)))))
2824 (native-inputs
2825 `(("java-junit" ,java-junit)))
2826 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2827 (synopsis "Common utilities for the Plexus framework")
2828 (description "This package provides various Java utility classes for the
2829 Plexus framework to ease working with strings, files, command lines, XML and
2830 more.")
2831 (license license:asl2.0)))
2832
2833 (define-public java-plexus-interpolation
2834 (package
2835 (name "java-plexus-interpolation")
2836 (version "1.23")
2837 (source (origin
2838 (method url-fetch)
2839 (uri (string-append "https://github.com/codehaus-plexus/"
2840 "plexus-interpolation/archive/"
2841 "plexus-interpolation-" version ".tar.gz"))
2842 (sha256
2843 (base32
2844 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2845 (build-system ant-build-system)
2846 (arguments
2847 `(#:jar-name "plexus-interpolation.jar"
2848 #:source-dir "src/main"))
2849 (native-inputs
2850 `(("java-junit" ,java-junit)
2851 ("java-hamcrest-core" ,java-hamcrest-core)))
2852 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2853 (synopsis "Java components for interpolating ${} strings and the like")
2854 (description "Plexus interpolator is a modular, flexible interpolation
2855 framework for the expression language style commonly seen in Maven, Plexus,
2856 and other related projects.
2857
2858 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2859 package within @code{plexus-utils}, but has been separated in order to allow
2860 these two libraries to vary independently of one another.")
2861 (license license:asl2.0)))
2862
2863 (define-public java-plexus-classworlds
2864 (package
2865 (name "java-plexus-classworlds")
2866 (version "2.5.2")
2867 (source (origin
2868 (method url-fetch)
2869 (uri (string-append "https://github.com/codehaus-plexus/"
2870 "plexus-classworlds/archive/plexus-classworlds-"
2871 version ".tar.gz"))
2872 (sha256
2873 (base32
2874 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2875 (build-system ant-build-system)
2876 (arguments
2877 `(#:jar-name "plexus-classworlds.jar"
2878 #:source-dir "src/main"
2879 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2880 (native-inputs
2881 `(("java-junit" ,java-junit)))
2882 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2883 (synopsis "Java class loader framework")
2884 (description "Plexus classworlds replaces the native @code{ClassLoader}
2885 mechanism of Java. It is especially useful for dynamic loading of application
2886 components.")
2887 (license license:asl2.0)))
2888
2889 (define java-plexus-container-default-bootstrap
2890 (package
2891 (name "java-plexus-container-default-bootstrap")
2892 (version "1.7.1")
2893 (source (origin
2894 (method url-fetch)
2895 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2896 "/archive/plexus-containers-" version ".tar.gz"))
2897 (sha256
2898 (base32
2899 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2900 (build-system ant-build-system)
2901 (arguments
2902 `(#:jar-name "container-default.jar"
2903 #:source-dir "plexus-container-default/src/main/java"
2904 #:test-dir "plexus-container-default/src/test"
2905 #:jdk ,icedtea-8
2906 #:tests? #f; requires plexus-archiver, which depends on this package
2907 #:phases
2908 (modify-phases %standard-phases
2909 (add-before 'build 'copy-resources
2910 (lambda _
2911 (copy-recursively
2912 "plexus-container-default/src/main/resources/"
2913 "build/classes")
2914 #t)))))
2915 (inputs
2916 `(("worldclass" ,java-plexus-classworlds)
2917 ("xbean" ,java-geronimo-xbean-reflect)
2918 ("utils" ,java-plexus-utils)
2919 ("junit" ,java-junit)
2920 ("guava" ,java-guava)))
2921 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2922 (synopsis "Inversion-of-control container")
2923 (description "Plexus-default-container is Plexus' inversion-of-control
2924 (@dfn{IoC}) container. It is composed of its public API and its default
2925 implementation.")
2926 (license license:asl2.0)))
2927
2928 (define-public java-plexus-io
2929 (package
2930 (name "java-plexus-io")
2931 (version "3.0.0")
2932 (source (origin
2933 (method url-fetch)
2934 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2935 "/archive/plexus-io-" version ".tar.gz"))
2936 (sha256
2937 (base32
2938 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2939 (build-system ant-build-system)
2940 (arguments
2941 `(#:jar-name "plexus-io.jar"
2942 #:source-dir "src/main/java"
2943 #:test-dir "src/test"
2944 #:jdk ,icedtea-8
2945 #:phases
2946 (modify-phases %standard-phases
2947 (add-before 'build 'copy-resources
2948 (lambda _
2949 (mkdir-p "build/classes/META-INF/plexus")
2950 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2951 "build/classes/META-INF/plexus/components.xml")
2952 #t)))))
2953 (inputs
2954 `(("utils" ,java-plexus-utils)
2955 ("commons-io" ,java-commons-io)
2956 ("java-jsr305" ,java-jsr305)))
2957 (native-inputs
2958 `(("junit" ,java-junit)
2959 ("hamcrest" ,java-hamcrest-core)
2960 ("guava" ,java-guava)
2961 ("classworlds" ,java-plexus-classworlds)
2962 ("xbean" ,java-geronimo-xbean-reflect)
2963 ("container-default" ,java-plexus-container-default-bootstrap)))
2964 (home-page "https://github.com/codehaus-plexus/plexus-io")
2965 (synopsis "I/O plexus components")
2966 (description "Plexus IO is a set of plexus components, which are designed
2967 for use in I/O operations. This implementation using plexus components allows
2968 reusing it in maven.")
2969 (license license:asl2.0)))
2970
2971 (define-public java-plexus-archiver
2972 (package
2973 (name "java-plexus-archiver")
2974 (version "3.5")
2975 (source (origin
2976 (method url-fetch)
2977 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
2978 "/archive/plexus-archiver-" version ".tar.gz"))
2979 (sha256
2980 (base32
2981 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
2982 (build-system ant-build-system)
2983 (arguments
2984 `(#:jar-name "plexus-archiver.jar"
2985 #:source-dir "src/main/java"
2986 #:jdk ,icedtea-8
2987 #:test-dir "src/test"
2988 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
2989 #:phases
2990 (modify-phases %standard-phases
2991 (add-before 'check 'remove-failing
2992 (lambda _
2993 ;; Requires an older version of plexus container
2994 (delete-file
2995 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
2996 (add-before 'build 'copy-resources
2997 (lambda _
2998 (mkdir-p "build/classes/META-INF/plexus")
2999 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3000 "build/classes/META-INF/plexus/components.xml")
3001 #t)))))
3002 (inputs
3003 `(("utils" ,java-plexus-utils)
3004 ("commons-io" ,java-commons-io)
3005 ("snappy" ,java-iq80-snappy)
3006 ("io" ,java-plexus-io)
3007 ("compress" ,java-commons-compress)
3008 ("container-default" ,java-plexus-container-default-bootstrap)
3009 ("snappy" ,java-snappy)
3010 ("java-jsr305" ,java-jsr305)))
3011 (native-inputs
3012 `(("junit" ,java-junit)
3013 ("classworld" ,java-plexus-classworlds)
3014 ("xbean" ,java-geronimo-xbean-reflect)
3015 ("xz" ,java-tukaani-xz)
3016 ("guava" ,java-guava)))
3017 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3018 (synopsis "Archiver component of the Plexus project")
3019 (description "Plexus-archiver contains a component to deal with project
3020 archives (jar).")
3021 (license license:asl2.0)))
3022
3023 (define-public java-plexus-container-default
3024 (package
3025 (inherit java-plexus-container-default-bootstrap)
3026 (name "java-plexus-container-default")
3027 (arguments
3028 `(#:jar-name "container-default.jar"
3029 #:source-dir "plexus-container-default/src/main/java"
3030 #:test-dir "plexus-container-default/src/test"
3031 #:test-exclude (list ;"**/*Test.java"
3032 "**/Abstract*.java"
3033 ;; Requires plexus-hierarchy
3034 "**/PlexusHierarchyTest.java"
3035 ;; Failures
3036 "**/ComponentRealmCompositionTest.java"
3037 "**/PlexusContainerTest.java")
3038 #:jdk ,icedtea-8
3039 #:phases
3040 (modify-phases %standard-phases
3041 (add-before 'build 'copy-resources
3042 (lambda _
3043 (copy-recursively
3044 "plexus-container-default/src/main/resources/"
3045 "build/classes")
3046 #t))
3047 (add-before 'check 'fix-paths
3048 (lambda _
3049 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3050 (substitute*
3051 (string-append
3052 dir "/plexus/component/composition/"
3053 "ComponentRealmCompositionTest.java")
3054 (("src/test") "plexus-container-default/src/test"))
3055 #t))))))
3056 (inputs
3057 `(("worldclass" ,java-plexus-classworlds)
3058 ("xbean" ,java-geronimo-xbean-reflect)
3059 ("utils" ,java-plexus-utils)
3060 ("junit" ,java-junit)
3061 ("guava" ,java-guava)))
3062 (native-inputs
3063 `(("archiver" ,java-plexus-archiver)
3064 ("hamcrest" ,java-hamcrest-core)))))
3065
3066 (define-public java-plexus-component-annotations
3067 (package
3068 (inherit java-plexus-container-default)
3069 (name "java-plexus-component-annotations")
3070 (arguments
3071 `(#:jar-name "plexus-component-annotations.jar"
3072 #:source-dir "plexus-component-annotations/src/main/java"
3073 #:tests? #f)); no tests
3074 (inputs '())
3075 (native-inputs '())
3076 (synopsis "Plexus descriptors generator")
3077 (description "This package is a Maven plugin to generate Plexus descriptors
3078 from source tags and class annotations.")))
3079
3080 (define-public java-plexus-cipher
3081 (package
3082 (name "java-plexus-cipher")
3083 (version "1.7")
3084 (source (origin
3085 (method url-fetch)
3086 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3087 "/archive/plexus-cipher-" version ".tar.gz"))
3088 (sha256
3089 (base32
3090 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3091 (build-system ant-build-system)
3092 (arguments
3093 `(#:jar-name "plexus-cipher.jar"
3094 #:source-dir "src/main/java"
3095 #:jdk ,icedtea-8
3096 #:tests? #f; FIXME: requires sisu-inject-bean
3097 #:phases
3098 (modify-phases %standard-phases
3099 (add-before 'build 'copy-resources
3100 (lambda _
3101 (copy-recursively "src/main/resources" "build/classes")
3102 (mkdir-p "build/classes/META-INF/sisu")
3103 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3104 (lambda _
3105 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3106 #t)))))
3107 (inputs
3108 `(("java-cdi-api" ,java-cdi-api)
3109 ("java-javax-inject" ,java-javax-inject)))
3110 (home-page "https://github.com/sonatype/plexus-cipher")
3111 (synopsis "Encryption/decryption Component")
3112 (description "Plexus-cipher contains a component to deal with encryption
3113 and decryption.")
3114 (license license:asl2.0)))
3115
3116 (define-public java-plexus-compiler-api
3117 (package
3118 (name "java-plexus-compiler-api")
3119 (version "2.8.2")
3120 (source (origin
3121 (method url-fetch)
3122 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3123 "/archive/plexus-compiler-" version ".tar.gz"))
3124 (sha256
3125 (base32
3126 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3127 (build-system ant-build-system)
3128 (arguments
3129 `(#:jar-name "plexus-compiler-api.jar"
3130 #:source-dir "plexus-compiler-api/src/main/java"
3131 #:jdk ,icedtea-8
3132 #:test-dir "plexus-compiler-api/src/test"))
3133 (inputs
3134 `(("java-plexus-container-default" ,java-plexus-container-default)
3135 ("java-plexus-util" ,java-plexus-utils)))
3136 (native-inputs
3137 `(("java-junit" ,java-junit)))
3138 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3139 (synopsis "Plexus Compilers component's API to manipulate compilers")
3140 (description "This package contains the API used by components to manipulate
3141 compilers.")
3142 (license (list license:asl2.0
3143 license:expat))))
3144
3145 (define-public java-plexus-compiler-javac
3146 (package
3147 (inherit java-plexus-compiler-api)
3148 (name "java-plexus-compiler-javac")
3149 (arguments
3150 `(#:jar-name "plexus-compiler-javac.jar"
3151 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3152 #:jdk ,icedtea-8
3153 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3154 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3155 (inputs
3156 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3157 ("java-plexus-utils" ,java-plexus-utils)
3158 ("java-plexus-container-default" ,java-plexus-container-default)))
3159 (native-inputs
3160 `(("java-junit" ,java-junit)))
3161 (synopsis "Javac Compiler support for Plexus Compiler component")
3162 (description "This package contains the Javac Compiler support for Plexus
3163 Compiler component.")))
3164
3165 (define-public java-plexus-sec-dispatcher
3166 (package
3167 (name "java-plexus-sec-dispatcher")
3168 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3169 (source (origin
3170 ;; This project doesn't tag releases or publish tarballs, so we take
3171 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3172 (method url-fetch)
3173 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3174 "archive/7db8f88048.tar.gz"))
3175 (sha256
3176 (base32
3177 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3178 (file-name (string-append name "-" version ".tar.gz"))))
3179 (arguments
3180 `(#:jar-name "plexus-sec-dispatcher.jar"
3181 #:source-dir "src/main/java"
3182 #:jdk ,icedtea-8
3183 #:phases
3184 (modify-phases %standard-phases
3185 (add-before 'build 'generate-models
3186 (lambda* (#:key inputs #:allow-other-keys)
3187 (define (modello-single-mode file version mode)
3188 (zero? (system* "java"
3189 "org.codehaus.modello.ModelloCli"
3190 file mode "src/main/java" version
3191 "false" "true")))
3192 (let ((file "src/main/mdo/settings-security.mdo"))
3193 (and
3194 (modello-single-mode file "1.0.0" "java")
3195 (modello-single-mode file "1.0.0" "xpp3-reader")
3196 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3197 (add-before 'build 'generate-components.xml
3198 (lambda _
3199 (mkdir-p "build/classes/META-INF/plexus")
3200 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3201 (lambda _
3202 (display
3203 "<component-set>\n
3204 <components>\n
3205 <component>\n
3206 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3207 <role-hint>default</role-hint>\n
3208 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3209 <description></description>\n
3210 <requirements>\n
3211 <requirement>\n
3212 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3213 <field-name>_cipher</field-name>\n
3214 </requirement>\n
3215 <requirement>\n
3216 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3217 <field-name>_decryptors</field-name>\n
3218 </requirement>\n
3219 </requirements>\n
3220 <configuration>\n
3221 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3222 </configuration>\n
3223 </component>\n
3224 </components>\n
3225 </component-set>\n")))))
3226 (add-before 'check 'fix-paths
3227 (lambda _
3228 (copy-recursively "src/test/resources" "target"))))))
3229 (inputs
3230 `(("java-plexus-cipher" ,java-plexus-cipher)))
3231 (native-inputs
3232 `(("java-modello-core" ,java-modello-core)
3233 ;; for modello:
3234 ("java-plexus-container-default" ,java-plexus-container-default)
3235 ("java-plexus-classworlds" ,java-plexus-classworlds)
3236 ("java-plexus-utils" ,java-plexus-utils)
3237 ("java-guava" ,java-guava)
3238 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3239 ("java-sisu-build-api" ,java-sisu-build-api)
3240 ;; modello plugins:
3241 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3242 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3243 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3244 ;; for tests
3245 ("java-junit" ,java-junit)))
3246 (build-system ant-build-system)
3247 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3248 (synopsis "Plexus Security Dispatcher Component")
3249 (description "This package is the Plexus Security Dispatcher Component.
3250 This component decrypts a string passed to it.")
3251 (license license:asl2.0)))
3252
3253 (define-public java-sisu-build-api
3254 (package
3255 (name "java-sisu-build-api")
3256 (version "0.0.7")
3257 (source (origin
3258 (method url-fetch)
3259 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3260 "archive/plexus-build-api-" version ".tar.gz"))
3261 (sha256
3262 (base32
3263 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3264 (build-system ant-build-system)
3265 (arguments
3266 `(#:jar-name "sisu-build-api.jar"
3267 #:source-dir "src/main/java"
3268 #:jdk ,icedtea-8
3269 #:tests? #f; FIXME: how to run the tests?
3270 #:phases
3271 (modify-phases %standard-phases
3272 (add-before 'build 'copy-resources
3273 (lambda _
3274 (copy-recursively "src/main/resources" "build/classes")
3275 (substitute* (find-files "build/classes")
3276 (("\\$\\{project.version\\}") ,version))
3277 #t))
3278 (add-before 'build 'generate-plexus-compontent
3279 (lambda _
3280 (mkdir-p "build/classes/META-INF/plexus")
3281 ;; This file is required for plexus to inject this package.
3282 ;; FIXME: how is it generated?
3283 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3284 (lambda _
3285 (display
3286 "<component-set>\n
3287 <components>\n
3288 <component>\n
3289 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3290 <role-hint>default</role-hint>\n
3291 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3292 <description>Filesystem based non-incremental build context implementation\n
3293 which behaves as if all files were just created.</description>\n
3294 </component>\n
3295 </components>\n
3296 </component-set>\n")))
3297 #t)))))
3298 (inputs
3299 `(("java-plexus-utils" ,java-plexus-utils)
3300 ("java-plexus-container-default" ,java-plexus-container-default)))
3301 (home-page "https://github.com/sonatype/sisu-build-api/")
3302 (synopsis "Base build API for maven")
3303 (description "This package contains the base build API for maven and
3304 a default implementation of it. This API is about scanning files in a
3305 project and determining what files need to be rebuilt.")
3306 (license license:asl2.0)))
3307
3308 (define-public java-modello-core
3309 (package
3310 (name "java-modello-core")
3311 (version "1.9.1")
3312 (source (origin
3313 (method url-fetch)
3314 (uri (string-append "https://github.com/codehaus-plexus/modello"
3315 "/archive/modello-" version ".tar.gz"))
3316 (sha256
3317 (base32
3318 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3319 (build-system ant-build-system)
3320 (arguments
3321 `(#:jar-name "modello-core.jar"
3322 #:source-dir "modello-core/src/main/java"
3323 #:test-dir "modello-core/src/test"
3324 #:main-class "org.codehaus.modello.ModelloCli"
3325 #:jdk ,icedtea-8
3326 #:phases
3327 (modify-phases %standard-phases
3328 (add-before 'build 'copy-resources
3329 (lambda _
3330 (mkdir-p "build/classes/META-INF/plexus")
3331 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3332 "build/classes/META-INF/plexus/components.xml")
3333 #t))
3334 (add-before 'check 'fix-tests
3335 (lambda _
3336 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3337 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3338 "modello/core/io/ModelReaderTest.java")
3339 (("src/test") "modello-core/src/test")))
3340 #t)))))
3341 (inputs
3342 `(("java-plexus-utils" ,java-plexus-utils)
3343 ("java-plexus-container-default" ,java-plexus-container-default)
3344 ("java-sisu-build-api" ,java-sisu-build-api)))
3345 (native-inputs
3346 `(("java-junit" ,java-junit)
3347 ("java-plexus-classworlds" ,java-plexus-classworlds)
3348 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3349 ("java-guava" ,java-guava)))
3350 (home-page "http://codehaus-plexus.github.io/modello/")
3351 (synopsis "Framework for code generation from a simple model")
3352 (description "Modello is a framework for code generation from a simple model.
3353
3354 Modello generates code from a simple model format: based on a plugin
3355 architecture, various types of code and descriptors can be generated from the
3356 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3357 XSD and documentation.")
3358 (license (list
3359 license:expat
3360 ;; Although this package uses only files licensed under expat,
3361 ;; other parts of the source are licensed under different
3362 ;; licenses. We include them to be inherited by other packages.
3363 license:asl2.0
3364 ;; Some files in modello-plugin-java are licensed under a
3365 ;; 5-clause BSD license.
3366 (license:non-copyleft
3367 (string-append "file:///modello-plugins/modello-plugin-java/"
3368 "src/main/java/org/codehaus/modello/plugin/"
3369 "java/javasource/JNaming.java"))))))
3370
3371 (define-public java-modello-plugins-java
3372 (package
3373 (inherit java-modello-core)
3374 (name "java-modello-plugins-java")
3375 (arguments
3376 `(#:jar-name "modello-plugins-java.jar"
3377 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3378 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3379 #:jdk ,icedtea-8
3380 #:tests? #f; requires maven-model, which depends on this package
3381 #:phases
3382 (modify-phases %standard-phases
3383 (add-before 'build 'copy-resources
3384 (lambda _
3385 (mkdir-p "build/classes")
3386 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3387 "build/classes")
3388 #t)))))
3389 (inputs
3390 `(("java-modello-core" ,java-modello-core)
3391 ,@(package-inputs java-modello-core)))
3392 (synopsis "Modello Java Plugin")
3393 (description "Modello Java Plugin generates Java objects for the model.")))
3394
3395 (define-public java-modello-plugins-xml
3396 (package
3397 (inherit java-modello-core)
3398 (name "java-modello-plugins-xml")
3399 (arguments
3400 `(#:jar-name "modello-plugins-xml.jar"
3401 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3402 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3403 #:jdk ,icedtea-8
3404 #:phases
3405 (modify-phases %standard-phases
3406 (add-before 'build 'copy-resources
3407 (lambda _
3408 (mkdir-p "build/classes")
3409 (copy-recursively
3410 "modello-plugins/modello-plugin-xml/src/main/resources"
3411 "build/classes")
3412 #t))
3413 (add-before 'check 'fix-paths
3414 (lambda _
3415 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3416 (substitute*
3417 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3418 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3419 (inputs
3420 `(("java-modello-core" ,java-modello-core)
3421 ("java-modello-plugins-java" ,java-modello-plugins-java)
3422 ,@(package-inputs java-modello-core)))
3423 (synopsis "Modello XML Plugin")
3424 (description "Modello XML Plugin contains shared code for every plugins
3425 working on XML representation of the model.")))
3426
3427 (define-public java-modello-test
3428 (package
3429 (inherit java-modello-core)
3430 (name "java-modello-test")
3431 (arguments
3432 `(#:jar-name "modello-test.jar"
3433 #:source-dir "modello-test/src/main/java"
3434 #:tests? #f; no tests
3435 #:jdk ,icedtea-8))
3436 (inputs
3437 `(("java-plexus-utils" ,java-plexus-utils)
3438 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3439 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3440 ("java-plexus-container-default" ,java-plexus-container-default)))
3441 (synopsis "Modello test package")
3442 (description "The modello test package contains the basis to create
3443 Modello generator unit-tests, including sample models and xml files to test
3444 every feature for every plugin.")))
3445
3446 (define-public java-modello-plugins-xpp3
3447 (package
3448 (inherit java-modello-core)
3449 (name "java-modello-plugins-xpp3")
3450 (arguments
3451 `(#:jar-name "modello-plugins-xpp3.jar"
3452 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3453 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3454 ;; One of the test dependencies is maven-model which depends on this package.
3455 #:tests? #f
3456 #:jdk ,icedtea-8
3457 #:phases
3458 (modify-phases %standard-phases
3459 (add-before 'build 'copy-resources
3460 (lambda _
3461 (mkdir-p "build/classes")
3462 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3463 "build/classes")
3464 #t)))))
3465 (inputs
3466 `(("java-modello-core" ,java-modello-core)
3467 ("java-modello-plugins-java" ,java-modello-plugins-java)
3468 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3469 ,@(package-inputs java-modello-core)))
3470 (native-inputs
3471 `(("java-xmlunit" ,java-xmlunit)
3472 ("java-modello-test" ,java-modello-test)
3473 ,@(package-native-inputs java-modello-core)))
3474 (synopsis "Modello XPP3 Plugin")
3475 (description "The modello XPP3 plugin generates XML readers and writers based
3476 on the XPP3 API (XML Pull Parser).")))
3477
3478 (define-public java-asm
3479 (package
3480 (name "java-asm")
3481 (version "6.0")
3482 (source (origin
3483 (method url-fetch)
3484 (uri (string-append "http://download.forge.ow2.org/asm/"
3485 "asm-" version ".tar.gz"))
3486 (sha256
3487 (base32
3488 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3489 (build-system ant-build-system)
3490 (propagated-inputs
3491 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3492 (arguments
3493 `(#:build-target "compile"
3494 ;; The tests require an old version of Janino, which no longer compiles
3495 ;; with the JDK7.
3496 #:tests? #f
3497 #:make-flags
3498 (list
3499 ;; We don't need these extra ant tasks, but the build system asks us to
3500 ;; provide a path anyway.
3501 "-Dobjectweb.ant.tasks.path=dummy-path"
3502 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3503 ;; used during the build automatically by ant-build-system, but
3504 ;; java-asm's build.xml fails unless we provide something here.
3505 "-Dbiz.aQute.bnd.path=dummy-path")
3506 #:phases
3507 (modify-phases %standard-phases
3508 (add-before 'install 'build-jars
3509 (lambda* (#:key make-flags #:allow-other-keys)
3510 ;; We cannot use the "jar" target because it depends on a couple
3511 ;; of unpackaged, complicated tools.
3512 (mkdir "dist")
3513 (zero? (system* "jar"
3514 "-cf" (string-append "dist/asm-" ,version ".jar")
3515 "-C" "output/build/tmp" "."))))
3516 (replace 'install
3517 (install-jars "dist")))))
3518 (native-inputs
3519 `(("java-junit" ,java-junit)))
3520 (home-page "http://asm.ow2.org/")
3521 (synopsis "Very small and fast Java bytecode manipulation framework")
3522 (description "ASM is an all purpose Java bytecode manipulation and
3523 analysis framework. It can be used to modify existing classes or dynamically
3524 generate classes, directly in binary form. The provided common
3525 transformations and analysis algorithms allow to easily assemble custom
3526 complex transformations and code analysis tools.")
3527 (license license:bsd-3)))
3528
3529 (define-public java-cglib
3530 (package
3531 (name "java-cglib")
3532 (version "3.2.4")
3533 (source (origin
3534 (method url-fetch)
3535 (uri (string-append
3536 "https://github.com/cglib/cglib/archive/RELEASE_"
3537 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3538 ".tar.gz"))
3539 (file-name (string-append "cglib-" version ".tar.gz"))
3540 (sha256
3541 (base32
3542 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3543 (build-system ant-build-system)
3544 (arguments
3545 `(;; FIXME: tests fail because junit runs
3546 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3547 ;; to describe a test at all.
3548 #:tests? #f
3549 #:jar-name "cglib.jar"
3550 #:phases
3551 (modify-phases %standard-phases
3552 (add-after 'unpack 'chdir
3553 (lambda _ (chdir "cglib") #t)))))
3554 (inputs
3555 `(("java-asm" ,java-asm)
3556 ("java-junit" ,java-junit)))
3557 (home-page "https://github.com/cglib/cglib/")
3558 (synopsis "Java byte code generation library")
3559 (description "The byte code generation library CGLIB is a high level API
3560 to generate and transform Java byte code.")
3561 (license license:asl2.0)))
3562
3563 (define-public java-objenesis
3564 (package
3565 (name "java-objenesis")
3566 (version "2.5.1")
3567 (source (origin
3568 (method url-fetch)
3569 (uri (string-append "https://github.com/easymock/objenesis/"
3570 "archive/" version ".tar.gz"))
3571 (file-name (string-append "objenesis-" version ".tar.gz"))
3572 (sha256
3573 (base32
3574 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3575 (build-system ant-build-system)
3576 (arguments
3577 `(#:jar-name "objenesis.jar"
3578 #:source-dir "main/src/"
3579 #:test-dir "main/src/test/"))
3580 (native-inputs
3581 `(("java-junit" ,java-junit)
3582 ("java-hamcrest-core" ,java-hamcrest-core)))
3583 (home-page "http://objenesis.org/")
3584 (synopsis "Bypass the constructor when creating an object")
3585 (description "Objenesis is a small Java library that serves one purpose:
3586 to instantiate a new object of a particular class. It is common to see
3587 restrictions in libraries stating that classes must require a default
3588 constructor. Objenesis aims to overcome these restrictions by bypassing the
3589 constructor on object instantiation.")
3590 (license license:asl2.0)))
3591
3592 (define-public java-easymock
3593 (package
3594 (name "java-easymock")
3595 (version "3.4")
3596 (source (origin
3597 (method url-fetch)
3598 (uri (string-append "https://github.com/easymock/easymock/"
3599 "archive/easymock-" version ".tar.gz"))
3600 (sha256
3601 (base32
3602 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3603 (build-system ant-build-system)
3604 (arguments
3605 `(#:jar-name "easymock.jar"
3606 #:source-dir "core/src/main"
3607 #:test-dir "core/src/test"
3608 #:phases
3609 (modify-phases %standard-phases
3610 ;; FIXME: Android support requires the following packages to be
3611 ;; available: com.google.dexmaker.stock.ProxyBuilder
3612 (add-after 'unpack 'delete-android-support
3613 (lambda _
3614 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3615 (substitute* "MocksControl.java"
3616 (("AndroidSupport.isAndroid\\(\\)") "false")
3617 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3618 (delete-file "AndroidClassProxyFactory.java"))
3619 #t))
3620 (add-after 'unpack 'delete-broken-tests
3621 (lambda _
3622 (with-directory-excursion "core/src/test/java/org/easymock"
3623 ;; This test depends on dexmaker.
3624 (delete-file "tests2/ClassExtensionHelperTest.java")
3625
3626 ;; This is not a test.
3627 (delete-file "tests/BaseEasyMockRunnerTest.java")
3628
3629 ;; This test should be executed with a different runner...
3630 (delete-file "tests2/EasyMockAnnotationsTest.java")
3631 ;; ...but deleting it means that we also have to delete these
3632 ;; dependent files.
3633 (delete-file "tests2/EasyMockRunnerTest.java")
3634 (delete-file "tests2/EasyMockRuleTest.java")
3635
3636 ;; This test fails because the file "easymock.properties" does
3637 ;; not exist.
3638 (delete-file "tests2/EasyMockPropertiesTest.java"))
3639 #t)))))
3640 (inputs
3641 `(("java-asm" ,java-asm)
3642 ("java-cglib" ,java-cglib)
3643 ("java-objenesis" ,java-objenesis)))
3644 (native-inputs
3645 `(("java-junit" ,java-junit)
3646 ("java-hamcrest-core" ,java-hamcrest-core)))
3647 (home-page "http://easymock.org")
3648 (synopsis "Java library providing mock objects for unit tests")
3649 (description "EasyMock is a Java library that provides an easy way to use
3650 mock objects in unit testing.")
3651 (license license:asl2.0)))
3652
3653 (define-public java-jmock-1
3654 (package
3655 (name "java-jmock")
3656 (version "1.2.0")
3657 (source (origin
3658 (method url-fetch)
3659 (uri (string-append "https://github.com/jmock-developers/"
3660 "jmock-library/archive/" version ".tar.gz"))
3661 (file-name (string-append "jmock-" version ".tar.gz"))
3662 (sha256
3663 (base32
3664 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3665 (build-system ant-build-system)
3666 (arguments
3667 `(#:build-target "jars"
3668 #:test-target "run.tests"
3669 #:phases
3670 (modify-phases %standard-phases
3671 (replace 'install (install-jars "build")))))
3672 (home-page "http://www.jmock.org")
3673 (synopsis "Mock object library for test-driven development")
3674 (description "JMock is a library that supports test-driven development of
3675 Java code with mock objects. Mock objects help you design and test the
3676 interactions between the objects in your programs.
3677
3678 The jMock library
3679
3680 @itemize
3681 @item makes it quick and easy to define mock objects
3682 @item lets you precisely specify the interactions between
3683 your objects, reducing the brittleness of your tests
3684 @item plugs into your favourite test framework
3685 @item is easy to extend.
3686 @end itemize\n")
3687 (license license:bsd-3)))
3688
3689 (define-public java-jmock
3690 (package
3691 (inherit java-jmock-1)
3692 (name "java-jmock")
3693 (version "2.8.2")
3694 (source (origin
3695 (method url-fetch)
3696 (uri (string-append "https://github.com/jmock-developers/"
3697 "jmock-library/archive/" version ".tar.gz"))
3698 (file-name (string-append name "-" version ".tar.gz"))
3699 (sha256
3700 (base32
3701 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3702 (inputs
3703 `(("java-hamcrest-all" ,java-hamcrest-all)
3704 ("java-asm" ,java-asm)
3705 ("java-bsh" ,java-bsh)
3706 ("java-junit" ,java-junit)))
3707 (native-inputs
3708 `(("cglib" ,java-cglib)))
3709 (arguments
3710 `(#:jar-name "java-jmock.jar"
3711 #:source-dir "jmock/src/main/java"
3712 #:test-dir "jmock/src/test"))))
3713
3714 (define-public java-jmock-junit4
3715 (package
3716 (inherit java-jmock)
3717 (name "java-jmock-junit4")
3718 (arguments
3719 `(#:jar-name "java-jmock-junit4.jar"
3720 #:source-dir "jmock-junit4/src/main/java"
3721 #:test-dir "jmock-junit4/src/test"))
3722 (inputs
3723 `(("java-hamcrest-all" ,java-hamcrest-all)
3724 ("java-asm" ,java-asm)
3725 ("java-bsh" ,java-bsh)
3726 ("java-jmock" ,java-jmock)
3727 ("java-jumit" ,java-junit)))))
3728
3729 (define-public java-jmock-legacy
3730 (package
3731 (inherit java-jmock)
3732 (name "java-jmock-legacy")
3733 (arguments
3734 `(#:jar-name "java-jmock-legacy.jar"
3735 #:source-dir "jmock-legacy/src/main/java"
3736 #:test-dir "jmock-legacy/src/test"
3737 #:phases
3738 (modify-phases %standard-phases
3739 (add-before 'check 'copy-tests
3740 (lambda _
3741 ;; This file is a dependancy of some tests
3742 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3743 (copy-file (string-append "jmock/src/test/java/" file)
3744 (string-append "jmock-legacy/src/test/java/" file))
3745 #t))))))
3746 (inputs
3747 `(("java-hamcrest-all" ,java-hamcrest-all)
3748 ("java-objenesis" ,java-objenesis)
3749 ("java-cglib" ,java-cglib)
3750 ("java-jmock" ,java-jmock)
3751 ("java-asm" ,java-asm)
3752 ("java-bsh" ,java-bsh)
3753 ("java-junit" ,java-junit)))
3754 (native-inputs
3755 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3756
3757 (define-public java-hamcrest-all
3758 (package (inherit java-hamcrest-core)
3759 (name "java-hamcrest-all")
3760 (arguments
3761 `(#:jdk ,icedtea-8
3762 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3763 ((#:build-target _) "bigjar")
3764 ((#:phases phases)
3765 `(modify-phases ,phases
3766 ;; Some build targets override the classpath, so we need to patch
3767 ;; the build.xml to ensure that required dependencies are on the
3768 ;; classpath.
3769 (add-after 'unpack 'patch-classpath-for-integration
3770 (lambda* (#:key inputs #:allow-other-keys)
3771 (substitute* "build.xml"
3772 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3773 (string-join
3774 (cons line
3775 (append
3776 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3777 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3778 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3779 ";")))
3780 #t)))))))
3781 (inputs
3782 `(("java-junit" ,java-junit)
3783 ("java-jmock" ,java-jmock-1)
3784 ("java-easymock" ,java-easymock)
3785 ,@(package-inputs java-hamcrest-core)))))
3786
3787 (define-public java-jopt-simple
3788 (package
3789 (name "java-jopt-simple")
3790 (version "5.0.3")
3791 (source (origin
3792 (method url-fetch)
3793 (uri (string-append "http://repo1.maven.org/maven2/"
3794 "net/sf/jopt-simple/jopt-simple/"
3795 version "/jopt-simple-"
3796 version "-sources.jar"))
3797 (sha256
3798 (base32
3799 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3800 (build-system ant-build-system)
3801 (arguments
3802 `(#:tests? #f ; there are no tests
3803 #:jar-name "jopt-simple.jar"))
3804 (home-page "https://pholser.github.io/jopt-simple/")
3805 (synopsis "Java library for parsing command line options")
3806 (description "JOpt Simple is a Java library for parsing command line
3807 options, such as those you might pass to an invocation of @code{javac}. In
3808 the interest of striving for simplicity, as closely as possible JOpt Simple
3809 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3810 GNU @code{getopt_long}. It also aims to make option parser configuration and
3811 retrieval of options and their arguments simple and expressive, without being
3812 overly clever.")
3813 (license license:expat)))
3814
3815 (define-public java-commons-math3
3816 (package
3817 (name "java-commons-math3")
3818 (version "3.6.1")
3819 (source (origin
3820 (method url-fetch)
3821 (uri (string-append "mirror://apache/commons/math/source/"
3822 "commons-math3-" version "-src.tar.gz"))
3823 (sha256
3824 (base32
3825 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3826 (build-system ant-build-system)
3827 (arguments
3828 `(#:build-target "jar"
3829 #:test-target "test"
3830 #:make-flags
3831 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3832 (junit (assoc-ref %build-inputs "java-junit")))
3833 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3834 (string-append "-Dhamcrest.jar=" hamcrest
3835 "/share/java/hamcrest-core.jar")))
3836 #:phases
3837 (modify-phases %standard-phases
3838 ;; We want to build the jar in the build phase and run the tests
3839 ;; later in a separate phase.
3840 (add-after 'unpack 'untangle-targets
3841 (lambda _
3842 (substitute* "build.xml"
3843 (("name=\"jar\" depends=\"test\"")
3844 "name=\"jar\" depends=\"compile\""))
3845 #t))
3846 ;; There is no install target.
3847 (replace 'install
3848 (install-jars "target")))))
3849 (native-inputs
3850 `(("java-junit" ,java-junit)
3851 ("java-hamcrest-core" ,java-hamcrest-core)))
3852 (home-page "http://commons.apache.org/math/")
3853 (synopsis "Apache Commons mathematics library")
3854 (description "Commons Math is a library of lightweight, self-contained
3855 mathematics and statistics components addressing the most common problems not
3856 available in the Java programming language or Commons Lang.")
3857 (license license:asl2.0)))
3858
3859 (define-public java-jmh
3860 (package
3861 (name "java-jmh")
3862 (version "1.17.5")
3863 (source (origin
3864 (method hg-fetch)
3865 (uri (hg-reference
3866 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3867 (changeset version)))
3868 (file-name (string-append name "-" version "-checkout"))
3869 (sha256
3870 (base32
3871 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3872 (build-system ant-build-system)
3873 (arguments
3874 `(#:jar-name "jmh-core.jar"
3875 #:source-dir "jmh-core/src/main"
3876 #:test-dir "jmh-core/src/test"
3877 #:phases
3878 (modify-phases %standard-phases
3879 ;; This seems to be a bug in the JDK. It may not be necessary in
3880 ;; future versions of the JDK.
3881 (add-after 'unpack 'fix-bug
3882 (lambda _
3883 (with-directory-excursion
3884 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3885 (substitute* '("IntegerValueConverter.java"
3886 "ThreadsValueConverter.java")
3887 (("public Class<Integer> valueType")
3888 "public Class<? extends Integer> valueType")))
3889 #t)))))
3890 (inputs
3891 `(("java-jopt-simple" ,java-jopt-simple)
3892 ("java-commons-math3" ,java-commons-math3)))
3893 (native-inputs
3894 `(("java-junit" ,java-junit)
3895 ("java-hamcrest-core" ,java-hamcrest-core)))
3896 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3897 (synopsis "Benchmark harness for the JVM")
3898 (description "JMH is a Java harness for building, running, and analysing
3899 nano/micro/milli/macro benchmarks written in Java and other languages
3900 targeting the JVM.")
3901 ;; GPLv2 only
3902 (license license:gpl2)))
3903
3904 (define-public java-commons-collections4
3905 (package
3906 (name "java-commons-collections4")
3907 (version "4.1")
3908 (source (origin
3909 (method url-fetch)
3910 (uri (string-append "mirror://apache/commons/collections/source/"
3911 "commons-collections4-" version "-src.tar.gz"))
3912 (sha256
3913 (base32
3914 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
3915 (build-system ant-build-system)
3916 (arguments
3917 `(#:test-target "test"
3918 #:make-flags
3919 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3920 (junit (assoc-ref %build-inputs "java-junit"))
3921 (easymock (assoc-ref %build-inputs "java-easymock")))
3922 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3923 (string-append "-Dhamcrest.jar=" hamcrest
3924 "/share/java/hamcrest-core.jar")
3925 (string-append "-Deasymock.jar=" easymock
3926 "/share/java/easymock.jar")))
3927 #:phases
3928 (modify-phases %standard-phases
3929 (replace 'install
3930 (install-jars "target")))))
3931 (native-inputs
3932 `(("java-junit" ,java-junit)
3933 ("java-hamcrest-core" ,java-hamcrest-core)
3934 ("java-easymock" ,java-easymock)))
3935 (home-page "http://commons.apache.org/collections/")
3936 (synopsis "Collections framework")
3937 (description "The Java Collections Framework is the recognised standard
3938 for collection handling in Java. Commons-Collections seek to build upon the
3939 JDK classes by providing new interfaces, implementations and utilities. There
3940 are many features, including:
3941
3942 @itemize
3943 @item @code{Bag} interface for collections that have a number of copies of
3944 each object
3945 @item @code{BidiMap} interface for maps that can be looked up from value to
3946 key as well and key to value
3947 @item @code{MapIterator} interface to provide simple and quick iteration over
3948 maps
3949 @item Transforming decorators that alter each object as it is added to the
3950 collection
3951 @item Composite collections that make multiple collections look like one
3952 @item Ordered maps and sets that retain the order elements are added in,
3953 including an LRU based map
3954 @item Reference map that allows keys and/or values to be garbage collected
3955 under close control
3956 @item Many comparator implementations
3957 @item Many iterator implementations
3958 @item Adapter classes from array and enumerations to collections
3959 @item Utilities to test or create typical set-theory properties of collections
3960 such as union, intersection, and closure.
3961 @end itemize\n")
3962 (license license:asl2.0)))
3963
3964 (define-public java-commons-collections
3965 (package
3966 (inherit java-commons-collections4)
3967 (name "java-commons-collections")
3968 (version "3.2.2")
3969 (source (origin
3970 (method url-fetch)
3971 (uri (string-append "mirror://apache/commons/collections/source/"
3972 "commons-collections-" version "-src.tar.gz"))
3973 (sha256
3974 (base32
3975 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))))
3976 (arguments
3977 (substitute-keyword-arguments (package-arguments java-commons-collections4)
3978 ((#:phases phases)
3979 `(modify-phases ,phases
3980 ;; The manifest is required by the build procedure
3981 (add-before 'build 'add-manifest
3982 (lambda _
3983 (mkdir-p "build/conf")
3984 (call-with-output-file "build/conf/MANIFEST.MF"
3985 (lambda (file)
3986 (format file "Manifest-Version: 1.0\n")))))
3987 (replace 'install
3988 (install-jars "build"))))))))
3989
3990 (define java-commons-collections-test-classes
3991 (package
3992 (inherit java-commons-collections)
3993 (arguments
3994 `(#:jar-name "commons-collections-test-classes.jar"
3995 #:source-dir "src/test"
3996 #:tests? #f))
3997 (inputs
3998 `(("collection" ,java-commons-collections)))))
3999
4000 (define-public java-commons-beanutils
4001 (package
4002 (name "java-commons-beanutils")
4003 (version "1.9.3")
4004 (source (origin
4005 (method url-fetch)
4006 (uri (string-append "mirror://apache/commons/beanutils/source/"
4007 "commons-beanutils-" version "-src.tar.gz"))
4008 (sha256
4009 (base32
4010 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4011 (build-system ant-build-system)
4012 (arguments
4013 `(#:test-target "test"
4014 #:tests? #f
4015 #:phases
4016 (modify-phases %standard-phases
4017 (replace 'install
4018 (lambda* (#:key outputs #:allow-other-keys)
4019 (rename-file (string-append "dist/commons-beanutils-" ,version
4020 "-SNAPSHOT.jar")
4021 "commons-beanutils.jar")
4022 (install-file "commons-beanutils.jar"
4023 (string-append (assoc-ref outputs "out") "/share/java/"))
4024 #t)))))
4025 (inputs
4026 `(("logging" ,java-commons-logging-minimal)
4027 ("collections" ,java-commons-collections)))
4028 (native-inputs
4029 `(("junit" ,java-junit)
4030 ("collections-test" ,java-commons-collections-test-classes)))
4031 (home-page "http://commons.apache.org/beanutils/")
4032 (synopsis "Dynamically set or get properties in Java")
4033 (description "BeanUtils provides a simplified interface to reflection and
4034 introspection to set or get dynamically determined properties through their
4035 setter and getter method.")
4036 (license license:asl2.0)))
4037
4038 (define-public java-commons-io
4039 (package
4040 (name "java-commons-io")
4041 (version "2.5")
4042 (source
4043 (origin
4044 (method url-fetch)
4045 (uri (string-append "mirror://apache/commons/io/source/"
4046 "commons-io-" version "-src.tar.gz"))
4047 (sha256
4048 (base32
4049 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4050 (build-system ant-build-system)
4051 (outputs '("out" "doc"))
4052 (arguments
4053 `(#:test-target "test"
4054 #:make-flags
4055 (list (string-append "-Djunit.jar="
4056 (assoc-ref %build-inputs "java-junit")
4057 "/share/java/junit.jar"))
4058 #:phases
4059 (modify-phases %standard-phases
4060 (add-after 'build 'build-javadoc ant-build-javadoc)
4061 (replace 'install (install-jars "target"))
4062 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4063 (native-inputs
4064 `(("java-junit" ,java-junit)
4065 ("java-hamcrest-core" ,java-hamcrest-core)))
4066 (home-page "http://commons.apache.org/io/")
4067 (synopsis "Common useful IO related classes")
4068 (description "Commons-IO contains utility classes, stream implementations,
4069 file filters and endian classes.")
4070 (license license:asl2.0)))
4071
4072 (define-public java-commons-lang
4073 (package
4074 (name "java-commons-lang")
4075 (version "2.6")
4076 (source
4077 (origin
4078 (method url-fetch)
4079 (uri (string-append "mirror://apache/commons/lang/source/"
4080 "commons-lang-" version "-src.tar.gz"))
4081 (sha256
4082 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4083 (build-system ant-build-system)
4084 (outputs '("out" "doc"))
4085 (arguments
4086 `(#:test-target "test"
4087 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4088 #:phases
4089 (modify-phases %standard-phases
4090 (add-after 'build 'build-javadoc ant-build-javadoc)
4091 (add-before 'check 'disable-failing-test
4092 (lambda _
4093 ;; Disable a failing test
4094 (substitute* "src/test/java/org/apache/commons/lang/\
4095 time/FastDateFormatTest.java"
4096 (("public void testFormat\\(\\)")
4097 "public void disabled_testFormat()"))
4098 #t))
4099 (replace 'install (install-jars "target"))
4100 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4101 (native-inputs
4102 `(("java-junit" ,java-junit)))
4103 (home-page "http://commons.apache.org/lang/")
4104 (synopsis "Extension of the java.lang package")
4105 (description "The Commons Lang components contains a set of Java classes
4106 that provide helper methods for standard Java classes, especially those found
4107 in the @code{java.lang} package in the Sun JDK. The following classes are
4108 included:
4109
4110 @itemize
4111 @item StringUtils - Helper for @code{java.lang.String}.
4112 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4113 of characters such as @code{[a-z]} and @code{[abcdez]}.
4114 @item RandomStringUtils - Helper for creating randomised strings.
4115 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4116 @item NumberRange - A range of numbers with an upper and lower bound.
4117 @item ObjectUtils - Helper for @code{java.lang.Object}.
4118 @item SerializationUtils - Helper for serializing objects.
4119 @item SystemUtils - Utility class defining the Java system properties.
4120 @item NestedException package - A sub-package for the creation of nested
4121 exceptions.
4122 @item Enum package - A sub-package for the creation of enumerated types.
4123 @item Builder package - A sub-package for the creation of @code{equals},
4124 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4125 @end itemize\n")
4126 (license license:asl2.0)))
4127
4128 (define-public java-commons-lang3
4129 (package
4130 (name "java-commons-lang3")
4131 (version "3.4")
4132 (source
4133 (origin
4134 (method url-fetch)
4135 (uri (string-append "mirror://apache/commons/lang/source/"
4136 "commons-lang3-" version "-src.tar.gz"))
4137 (sha256
4138 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4139 (build-system ant-build-system)
4140 (outputs '("out" "doc"))
4141 (arguments
4142 `(#:test-target "test"
4143 #:make-flags
4144 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4145 (junit (assoc-ref %build-inputs "java-junit"))
4146 (easymock (assoc-ref %build-inputs "java-easymock"))
4147 (io (assoc-ref %build-inputs "java-commons-io")))
4148 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4149 (string-append "-Dhamcrest.jar=" hamcrest
4150 "/share/java/hamcrest-all.jar")
4151 (string-append "-Dcommons-io.jar=" io
4152 "/share/java/commons-io-"
4153 ,(package-version java-commons-io)
4154 "-SNAPSHOT.jar")
4155 (string-append "-Deasymock.jar=" easymock
4156 "/share/java/easymock.jar")))
4157 #:phases
4158 (modify-phases %standard-phases
4159 (add-after 'build 'build-javadoc ant-build-javadoc)
4160 (replace 'install (install-jars "target"))
4161 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4162 (native-inputs
4163 `(("java-junit" ,java-junit)
4164 ("java-commons-io" ,java-commons-io)
4165 ("java-hamcrest-all" ,java-hamcrest-all)
4166 ("java-easymock" ,java-easymock)))
4167 (home-page "http://commons.apache.org/lang/")
4168 (synopsis "Extension of the java.lang package")
4169 (description "The Commons Lang components contains a set of Java classes
4170 that provide helper methods for standard Java classes, especially those found
4171 in the @code{java.lang} package. The following classes are included:
4172
4173 @itemize
4174 @item StringUtils - Helper for @code{java.lang.String}.
4175 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4176 characters such as @code{[a-z]} and @code{[abcdez]}.
4177 @item RandomStringUtils - Helper for creating randomised strings.
4178 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4179 @item NumberRange - A range of numbers with an upper and lower bound.
4180 @item ObjectUtils - Helper for @code{java.lang.Object}.
4181 @item SerializationUtils - Helper for serializing objects.
4182 @item SystemUtils - Utility class defining the Java system properties.
4183 @item NestedException package - A sub-package for the creation of nested
4184 exceptions.
4185 @item Enum package - A sub-package for the creation of enumerated types.
4186 @item Builder package - A sub-package for the creation of @code{equals},
4187 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4188 @end itemize\n")
4189 (license license:asl2.0)))
4190
4191 (define-public java-jsr305
4192 (package
4193 (name "java-jsr305")
4194 (version "3.0.1")
4195 (source (origin
4196 (method url-fetch)
4197 (uri (string-append "https://repo1.maven.org/maven2/"
4198 "com/google/code/findbugs/"
4199 "jsr305/" version "/jsr305-"
4200 version "-sources.jar"))
4201 (sha256
4202 (base32
4203 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4204 (build-system ant-build-system)
4205 (arguments
4206 `(#:tests? #f ; no tests included
4207 #:jar-name "jsr305.jar"))
4208 (home-page "http://findbugs.sourceforge.net/")
4209 (synopsis "Annotations for the static analyzer called findbugs")
4210 (description "This package provides annotations for the findbugs package.
4211 It provides packages in the @code{javax.annotations} namespace.")
4212 (license license:asl2.0)))
4213
4214 (define-public java-guava
4215 (package
4216 (name "java-guava")
4217 ;; This is the last release of Guava that can be built with Java 7.
4218 (version "20.0")
4219 (source (origin
4220 (method url-fetch)
4221 (uri (string-append "https://github.com/google/guava/"
4222 "releases/download/v" version
4223 "/guava-" version "-sources.jar"))
4224 (sha256
4225 (base32
4226 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4227 (build-system ant-build-system)
4228 (arguments
4229 `(#:tests? #f ; no tests included
4230 #:jar-name "guava.jar"
4231 #:phases
4232 (modify-phases %standard-phases
4233 (add-after 'unpack 'trim-sources
4234 (lambda _
4235 (with-directory-excursion "src/com/google/common"
4236 ;; Remove annotations to avoid extra dependencies:
4237 ;; * "j2objc" annotations are used when converting Java to
4238 ;; Objective C;
4239 ;; * "errorprone" annotations catch common Java mistakes at
4240 ;; compile time;
4241 ;; * "IgnoreJRERequirement" is used for Android.
4242 (substitute* (find-files "." "\\.java$")
4243 (("import com.google.j2objc.*") "")
4244 (("import com.google.errorprone.annotation.*") "")
4245 (("import org.codehaus.mojo.animal_sniffer.*") "")
4246 (("@CanIgnoreReturnValue") "")
4247 (("@LazyInit") "")
4248 (("@WeakOuter") "")
4249 (("@RetainedWith") "")
4250 (("@Weak") "")
4251 (("@ForOverride") "")
4252 (("@J2ObjCIncompatible") "")
4253 (("@IgnoreJRERequirement") "")))
4254 #t)))))
4255 (inputs
4256 `(("java-jsr305" ,java-jsr305)))
4257 (home-page "https://github.com/google/guava")
4258 (synopsis "Google core libraries for Java")
4259 (description "Guava is a set of core libraries that includes new
4260 collection types (such as multimap and multiset), immutable collections, a
4261 graph library, functional types, an in-memory cache, and APIs/utilities for
4262 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4263 more!")
4264 (license license:asl2.0)))
4265
4266 ;; The java-commons-logging package provides adapters to many different
4267 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4268 ;; it with only a minimal set of adapters.
4269 (define-public java-commons-logging-minimal
4270 (package
4271 (name "java-commons-logging-minimal")
4272 (version "1.2")
4273 (source (origin
4274 (method url-fetch)
4275 (uri (string-append "mirror://apache/commons/logging/source/"
4276 "commons-logging-" version "-src.tar.gz"))
4277 (sha256
4278 (base32
4279 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4280 (build-system ant-build-system)
4281 (arguments
4282 `(#:tests? #f ; avoid dependency on logging frameworks
4283 #:jar-name "commons-logging-minimal.jar"
4284 #:phases
4285 (modify-phases %standard-phases
4286 (add-after 'unpack 'delete-adapters-and-tests
4287 (lambda _
4288 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4289 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4290 ;; is used by applications; SimpleLog is the only actually usable
4291 ;; implementation that does not depend on another logging
4292 ;; framework.
4293 (for-each
4294 (lambda (file)
4295 (delete-file (string-append
4296 "src/main/java/org/apache/commons/logging/impl/" file)))
4297 (list "Jdk13LumberjackLogger.java"
4298 "WeakHashtable.java"
4299 "Log4JLogger.java"
4300 "ServletContextCleaner.java"
4301 "Jdk14Logger.java"
4302 "AvalonLogger.java"
4303 "LogKitLogger.java"))
4304 (delete-file-recursively "src/test")
4305 #t)))))
4306 (home-page "http://commons.apache.org/logging/")
4307 (synopsis "Common API for logging implementations")
4308 (description "The Logging package is a thin bridge between different
4309 logging implementations. A library that uses the commons-logging API can be
4310 used with any logging implementation at runtime.")
4311 (license license:asl2.0)))
4312
4313 ;; This is the last release of the 1.x series.
4314 (define-public java-mockito-1
4315 (package
4316 (name "java-mockito")
4317 (version "1.10.19")
4318 (source (origin
4319 (method url-fetch)
4320 (uri (string-append "http://repo1.maven.org/maven2/"
4321 "org/mockito/mockito-core/" version
4322 "/mockito-core-" version "-sources.jar"))
4323 (sha256
4324 (base32
4325 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4326 (build-system ant-build-system)
4327 (arguments
4328 `(#:jar-name "mockito.jar"
4329 #:tests? #f ; no tests included
4330 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4331 ;; patches in build phases.
4332 #:phases
4333 (modify-phases %standard-phases
4334 ;; Mockito was developed against a different version of hamcrest,
4335 ;; which does not require matcher implementations to provide an
4336 ;; implementation of the "describeMismatch" method. We add this
4337 ;; simple definition to pass the build with our version of hamcrest.
4338 (add-after 'unpack 'fix-hamcrest-build-error
4339 (lambda _
4340 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4341 (("public Matcher getActualMatcher\\(\\) .*" line)
4342 (string-append "
4343 public void describeMismatch(Object item, Description description) {
4344 actualMatcher.describeMismatch(item, description);
4345 }"
4346 line)))
4347 #t))
4348 ;; Mockito bundles cglib. We have a cglib package, so let's use
4349 ;; that instead.
4350 (add-after 'unpack 'use-system-libraries
4351 (lambda _
4352 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4353 (substitute* '("CGLIBHacker.java"
4354 "CglibMockMaker.java"
4355 "ClassImposterizer.java"
4356 "DelegatingMockitoMethodProxy.java"
4357 "MethodInterceptorFilter.java"
4358 "MockitoNamingPolicy.java"
4359 "SerializableMockitoMethodProxy.java"
4360 "SerializableNoOp.java")
4361 (("import org.mockito.cglib") "import net.sf.cglib")))
4362 #t)))))
4363 (inputs
4364 `(("java-junit" ,java-junit)
4365 ("java-objenesis" ,java-objenesis)
4366 ("java-cglib" ,java-cglib)
4367 ("java-hamcrest-core" ,java-hamcrest-core)))
4368 (home-page "http://mockito.org")
4369 (synopsis "Mockito is a mock library for Java")
4370 (description "Mockito is a mocking library for Java which lets you write
4371 tests with a clean and simple API. It generates mocks using reflection, and
4372 it records all mock invocations, including methods arguments.")
4373 (license license:asl2.0)))
4374
4375 (define-public java-httpcomponents-httpcore
4376 (package
4377 (name "java-httpcomponents-httpcore")
4378 (version "4.4.6")
4379 (source (origin
4380 (method url-fetch)
4381 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4382 "source/httpcomponents-core-"
4383 version "-src.tar.gz"))
4384 (sha256
4385 (base32
4386 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4387 (build-system ant-build-system)
4388 (arguments
4389 `(#:jar-name "httpcomponents-httpcore.jar"
4390 #:phases
4391 (modify-phases %standard-phases
4392 (add-after 'unpack 'chdir
4393 (lambda _ (chdir "httpcore") #t)))))
4394 (inputs
4395 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4396 ("java-commons-lang3" ,java-commons-lang3)))
4397 (native-inputs
4398 `(("java-junit" ,java-junit)
4399 ("java-mockito" ,java-mockito-1)))
4400 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4401 (synopsis "Low level HTTP transport components")
4402 (description "HttpCore is a set of low level HTTP transport components
4403 that can be used to build custom client and server side HTTP services with a
4404 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4405 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4406 NIO.
4407
4408 This package provides the blocking I/O model library.")
4409 (license license:asl2.0)))
4410
4411 (define-public java-httpcomponents-httpcore-nio
4412 (package (inherit java-httpcomponents-httpcore)
4413 (name "java-httpcomponents-httpcore-nio")
4414 (arguments
4415 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4416 #:phases
4417 (modify-phases %standard-phases
4418 (add-after 'unpack 'chdir
4419 (lambda _ (chdir "httpcore-nio") #t)))))
4420 (inputs
4421 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4422 ("java-hamcrest-core" ,java-hamcrest-core)
4423 ,@(package-inputs java-httpcomponents-httpcore)))
4424 (description "HttpCore is a set of low level HTTP transport components
4425 that can be used to build custom client and server side HTTP services with a
4426 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4427 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4428 NIO.
4429
4430 This package provides the non-blocking I/O model library based on Java
4431 NIO.")))
4432
4433 (define-public java-httpcomponents-httpcore-ab
4434 (package (inherit java-httpcomponents-httpcore)
4435 (name "java-httpcomponents-httpcore-ab")
4436 (arguments
4437 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4438 #:phases
4439 (modify-phases %standard-phases
4440 (add-after 'unpack 'chdir
4441 (lambda _ (chdir "httpcore-ab") #t)))))
4442 (inputs
4443 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4444 ("java-commons-cli" ,java-commons-cli)
4445 ("java-hamcrest-core" ,java-hamcrest-core)
4446 ,@(package-inputs java-httpcomponents-httpcore)))
4447 (synopsis "Apache HttpCore benchmarking tool")
4448 (description "This package provides the HttpCore benchmarking tool. It is
4449 an Apache AB clone based on HttpCore.")))
4450
4451 (define-public java-httpcomponents-httpclient
4452 (package
4453 (name "java-httpcomponents-httpclient")
4454 (version "4.5.3")
4455 (source (origin
4456 (method url-fetch)
4457 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4458 "source/httpcomponents-client-"
4459 version "-src.tar.gz"))
4460 (sha256
4461 (base32
4462 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4463 (build-system ant-build-system)
4464 (arguments
4465 `(#:jar-name "httpcomponents-httpclient.jar"
4466 #:phases
4467 (modify-phases %standard-phases
4468 (add-after 'unpack 'chdir
4469 (lambda _ (chdir "httpclient") #t)))))
4470 (inputs
4471 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4472 ("java-commons-codec" ,java-commons-codec)
4473 ("java-hamcrest-core" ,java-hamcrest-core)
4474 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4475 ("java-mockito" ,java-mockito-1)
4476 ("java-junit" ,java-junit)))
4477 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4478 (synopsis "HTTP client library for Java")
4479 (description "Although the @code{java.net} package provides basic
4480 functionality for accessing resources via HTTP, it doesn't provide the full
4481 flexibility or functionality needed by many applications. @code{HttpClient}
4482 seeks to fill this void by providing an efficient, up-to-date, and
4483 feature-rich package implementing the client side of the most recent HTTP
4484 standards and recommendations.")
4485 (license license:asl2.0)))
4486
4487 (define-public java-httpcomponents-httpmime
4488 (package (inherit java-httpcomponents-httpclient)
4489 (name "java-httpcomponents-httpmime")
4490 (arguments
4491 `(#:jar-name "httpcomponents-httpmime.jar"
4492 #:phases
4493 (modify-phases %standard-phases
4494 (add-after 'unpack 'chdir
4495 (lambda _ (chdir "httpmime") #t)))))
4496 (inputs
4497 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4498 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4499 ("java-junit" ,java-junit)
4500 ("java-hamcrest-core" ,java-hamcrest-core)))))
4501
4502 (define-public java-commons-net
4503 (package
4504 (name "java-commons-net")
4505 (version "3.6")
4506 (source (origin
4507 (method url-fetch)
4508 (uri (string-append "mirror://apache/commons/net/source/"
4509 "commons-net-" version "-src.tar.gz"))
4510 (sha256
4511 (base32
4512 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4513 (build-system ant-build-system)
4514 (arguments
4515 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4516 ;; should be "resources/examples/examples.properties"), but gets "null"
4517 ;; instead.
4518 #:tests? #f
4519 #:jar-name "commons-net.jar"))
4520 (native-inputs
4521 `(("java-junit" ,java-junit)
4522 ("java-hamcrest-core" ,java-hamcrest-core)))
4523 (home-page "http://commons.apache.org/net/")
4524 (synopsis "Client library for many basic Internet protocols")
4525 (description "The Apache Commons Net library implements the client side of
4526 many basic Internet protocols. The purpose of the library is to provide
4527 fundamental protocol access, not higher-level abstractions.")
4528 (license license:asl2.0)))
4529
4530 (define-public java-jsch
4531 (package
4532 (name "java-jsch")
4533 (version "0.1.54")
4534 (source (origin
4535 (method url-fetch)
4536 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4537 version "/jsch-" version ".zip"))
4538 (sha256
4539 (base32
4540 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4541 (build-system ant-build-system)
4542 (arguments
4543 `(#:build-target "dist"
4544 #:tests? #f ; no tests included
4545 #:phases
4546 (modify-phases %standard-phases
4547 (replace 'install (install-jars "dist")))))
4548 (native-inputs
4549 `(("unzip" ,unzip)))
4550 (home-page "http://www.jcraft.com/jsch/")
4551 (synopsis "Pure Java implementation of SSH2")
4552 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4553 to connect to an SSH server and use port forwarding, X11 forwarding, file
4554 transfer, etc., and you can integrate its functionality into your own Java
4555 programs.")
4556 (license license:bsd-3)))
4557
4558 (define-public java-commons-compress
4559 (package
4560 (name "java-commons-compress")
4561 (version "1.13")
4562 (source (origin
4563 (method url-fetch)
4564 (uri (string-append "mirror://apache/commons/compress/source/"
4565 "commons-compress-" version "-src.tar.gz"))
4566 (sha256
4567 (base32
4568 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4569 (build-system ant-build-system)
4570 (arguments
4571 `(#:jar-name "commons-compress.jar"
4572 #:phases
4573 (modify-phases %standard-phases
4574 (add-after 'unpack 'delete-bad-tests
4575 (lambda _
4576 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4577 ;; FIXME: These tests really should not fail. Maybe they are
4578 ;; indicative of problems with our Java packaging work.
4579
4580 ;; This test fails with a null pointer exception.
4581 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4582 ;; This test fails to open test resources.
4583 (delete-file "archivers/zip/ExplodeSupportTest.java")
4584
4585 ;; FIXME: This test adds a dependency on powermock, which is hard to
4586 ;; package at this point.
4587 ;; https://github.com/powermock/powermock
4588 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4589 #t)))))
4590 (inputs
4591 `(("java-junit" ,java-junit)
4592 ("java-hamcrest-core" ,java-hamcrest-core)
4593 ("java-mockito" ,java-mockito-1)
4594 ("java-xz" ,java-xz)))
4595 (home-page "https://commons.apache.org/proper/commons-compress/")
4596 (synopsis "Java library for working with compressed files")
4597 (description "The Apache Commons Compress library defines an API for
4598 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4599 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4600 (license license:asl2.0)))
4601
4602 (define-public java-commons-csv
4603 (package
4604 (name "java-commons-csv")
4605 (version "1.4")
4606 (source (origin
4607 (method url-fetch)
4608 (uri (string-append "mirror://apache/commons/csv/source/"
4609 "commons-csv-" version "-src.tar.gz"))
4610 (sha256
4611 (base32
4612 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4613 (build-system ant-build-system)
4614 (arguments
4615 `(#:jar-name "commons-csv.jar"
4616 #:source-dir "src/main/java"
4617 #:tests? #f)); FIXME: requires java-h2
4618 (inputs
4619 `(("java-hamcrest-core" ,java-hamcrest-core)
4620 ("java-commons-io" ,java-commons-io)
4621 ("java-commons-lang3" ,java-commons-lang3)
4622 ("junit" ,java-junit)))
4623 (home-page "https://commons.apache.org/proper/commons-csv/")
4624 (synopsis "Read and write CSV documents")
4625 (description "Commons CSV reads and writes files in variations of the Comma
4626 Separated Value (CSV) format. The most common CSV formats are predefined in the
4627 CSVFormat class:
4628
4629 @itemize
4630 @item Microsoft Excel
4631 @item Informix UNLOAD
4632 @item Informix UNLOAD CSV
4633 @item MySQL
4634 @item RFC 4180
4635 @item TDF
4636 @end itemize
4637
4638 Custom formats can be created using a fluent style API.")
4639 (license license:asl2.0)))
4640
4641 (define-public java-osgi-annotation
4642 (package
4643 (name "java-osgi-annotation")
4644 (version "6.0.0")
4645 (source (origin
4646 (method url-fetch)
4647 (uri (string-append "https://repo1.maven.org/maven2/"
4648 "org/osgi/org.osgi.annotation/" version "/"
4649 "org.osgi.annotation-" version "-sources.jar"))
4650 (sha256
4651 (base32
4652 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4653 (build-system ant-build-system)
4654 (arguments
4655 `(#:tests? #f ; no tests
4656 #:jar-name "osgi-annotation.jar"))
4657 (home-page "https://www.osgi.org")
4658 (synopsis "Annotation module of OSGi framework")
4659 (description
4660 "OSGi, for Open Services Gateway initiative framework, is a module system
4661 and service platform for the Java programming language. This package contains
4662 the OSGi annotation module, providing additional services to help dynamic
4663 components.")
4664 (license license:asl2.0)))
4665
4666 (define-public java-osgi-core
4667 (package
4668 (name "java-osgi-core")
4669 (version "6.0.0")
4670 (source (origin
4671 (method url-fetch)
4672 (uri (string-append "https://repo1.maven.org/maven2/"
4673 "org/osgi/org.osgi.core/" version "/"
4674 "org.osgi.core-" version "-sources.jar"))
4675 (sha256
4676 (base32
4677 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4678 (build-system ant-build-system)
4679 (arguments
4680 `(#:tests? #f ; no tests
4681 #:jar-name "osgi-core.jar"))
4682 (inputs
4683 `(("java-osgi-annotation" ,java-osgi-annotation)))
4684 (home-page "https://www.osgi.org")
4685 (synopsis "Core module of OSGi framework")
4686 (description
4687 "OSGi, for Open Services Gateway initiative framework, is a module system
4688 and service platform for the Java programming language. This package contains
4689 the OSGi Core module.")
4690 (license license:asl2.0)))
4691
4692 (define-public java-osgi-service-event
4693 (package
4694 (name "java-osgi-service-event")
4695 (version "1.3.1")
4696 (source (origin
4697 (method url-fetch)
4698 (uri (string-append "https://repo1.maven.org/maven2/"
4699 "org/osgi/org.osgi.service.event/"
4700 version "/org.osgi.service.event-"
4701 version "-sources.jar"))
4702 (sha256
4703 (base32
4704 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4705 (build-system ant-build-system)
4706 (arguments
4707 `(#:tests? #f ; no tests
4708 #:jar-name "osgi-service-event.jar"))
4709 (inputs
4710 `(("java-osgi-annotation" ,java-osgi-annotation)
4711 ("java-osgi-core" ,java-osgi-core)))
4712 (home-page "https://www.osgi.org")
4713 (synopsis "OSGi service event module")
4714 (description
4715 "OSGi, for Open Services Gateway initiative framework, is a module system
4716 and service platform for the Java programming language. This package contains
4717 the OSGi @code{org.osgi.service.event} module.")
4718 (license license:asl2.0)))
4719
4720 (define-public java-eclipse-osgi
4721 (package
4722 (name "java-eclipse-osgi")
4723 (version "3.11.3")
4724 (source (origin
4725 (method url-fetch)
4726 (uri (string-append "https://repo1.maven.org/maven2/"
4727 "org/eclipse/platform/org.eclipse.osgi/"
4728 version "/org.eclipse.osgi-"
4729 version "-sources.jar"))
4730 (sha256
4731 (base32
4732 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4733 (build-system ant-build-system)
4734 (arguments
4735 `(#:tests? #f ; no tests included
4736 #:jar-name "eclipse-equinox-osgi.jar"))
4737 (inputs
4738 `(("java-osgi-annotation" ,java-osgi-annotation)))
4739 (home-page "http://www.eclipse.org/equinox/")
4740 (synopsis "Eclipse Equinox OSGi framework")
4741 (description "This package provides an implementation of the OSGi Core
4742 specification.")
4743 (license license:epl1.0)))
4744
4745 (define-public java-eclipse-equinox-common
4746 (package
4747 (name "java-eclipse-equinox-common")
4748 (version "3.8.0")
4749 (source (origin
4750 (method url-fetch)
4751 (uri (string-append "https://repo1.maven.org/maven2/"
4752 "org/eclipse/platform/org.eclipse.equinox.common/"
4753 version "/org.eclipse.equinox.common-"
4754 version "-sources.jar"))
4755 (sha256
4756 (base32
4757 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4758 (build-system ant-build-system)
4759 (arguments
4760 `(#:tests? #f ; no tests included
4761 #:jar-name "eclipse-equinox-common.jar"))
4762 (inputs
4763 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4764 (home-page "http://www.eclipse.org/equinox/")
4765 (synopsis "Common Eclipse runtime")
4766 (description "This package provides the common Eclipse runtime.")
4767 (license license:epl1.0)))
4768
4769 (define-public java-eclipse-core-jobs
4770 (package
4771 (name "java-eclipse-core-jobs")
4772 (version "3.8.0")
4773 (source (origin
4774 (method url-fetch)
4775 (uri (string-append "https://repo1.maven.org/maven2/"
4776 "org/eclipse/platform/org.eclipse.core.jobs/"
4777 version "/org.eclipse.core.jobs-"
4778 version "-sources.jar"))
4779 (sha256
4780 (base32
4781 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4782 (build-system ant-build-system)
4783 (arguments
4784 `(#:tests? #f ; no tests included
4785 #:jar-name "eclipse-core-jobs.jar"))
4786 (inputs
4787 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4788 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4789 (home-page "http://www.eclipse.org/equinox/")
4790 (synopsis "Eclipse jobs mechanism")
4791 (description "This package provides the Eclipse jobs mechanism.")
4792 (license license:epl1.0)))
4793
4794 (define-public java-eclipse-equinox-registry
4795 (package
4796 (name "java-eclipse-equinox-registry")
4797 (version "3.6.100")
4798 (source (origin
4799 (method url-fetch)
4800 (uri (string-append "https://repo1.maven.org/maven2/"
4801 "org/eclipse/platform/org.eclipse.equinox.registry/"
4802 version "/org.eclipse.equinox.registry-"
4803 version "-sources.jar"))
4804 (sha256
4805 (base32
4806 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
4807 (build-system ant-build-system)
4808 (arguments
4809 `(#:tests? #f ; no tests included
4810 #:jar-name "eclipse-equinox-registry.jar"))
4811 (inputs
4812 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4813 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4814 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4815 (home-page "http://www.eclipse.org/equinox/")
4816 (synopsis "Eclipse extension registry support")
4817 (description "This package provides support for the Eclipse extension
4818 registry.")
4819 (license license:epl1.0)))
4820
4821 (define-public java-eclipse-equinox-app
4822 (package
4823 (name "java-eclipse-equinox-app")
4824 (version "1.3.400")
4825 (source (origin
4826 (method url-fetch)
4827 (uri (string-append "https://repo1.maven.org/maven2/"
4828 "org/eclipse/platform/org.eclipse.equinox.app/"
4829 version "/org.eclipse.equinox.app-"
4830 version "-sources.jar"))
4831 (sha256
4832 (base32
4833 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
4834 (build-system ant-build-system)
4835 (arguments
4836 `(#:tests? #f ; no tests included
4837 #:jar-name "eclipse-equinox-app.jar"))
4838 (inputs
4839 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4840 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4841 ("java-eclipse-osgi" ,java-eclipse-osgi)
4842 ("java-osgi-service-event" ,java-osgi-service-event)))
4843 (home-page "http://www.eclipse.org/equinox/")
4844 (synopsis "Equinox application container")
4845 (description "This package provides the Equinox application container for
4846 Eclipse.")
4847 (license license:epl1.0)))
4848
4849 (define-public java-eclipse-equinox-preferences
4850 (package
4851 (name "java-eclipse-equinox-preferences")
4852 (version "3.6.1")
4853 (source (origin
4854 (method url-fetch)
4855 (uri (string-append "https://repo1.maven.org/maven2/"
4856 "org/eclipse/platform/org.eclipse.equinox.preferences/"
4857 version "/org.eclipse.equinox.preferences-"
4858 version "-sources.jar"))
4859 (sha256
4860 (base32
4861 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
4862 (build-system ant-build-system)
4863 (arguments
4864 `(#:tests? #f ; no tests included
4865 #:jar-name "eclipse-equinox-preferences.jar"))
4866 (inputs
4867 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4868 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4869 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4870 (home-page "http://www.eclipse.org/equinox/")
4871 (synopsis "Eclipse preferences mechanism")
4872 (description "This package provides the Eclipse preferences mechanism with
4873 the module @code{org.eclipse.equinox.preferences}.")
4874 (license license:epl1.0)))
4875
4876 (define-public java-eclipse-core-contenttype
4877 (package
4878 (name "java-eclipse-core-contenttype")
4879 (version "3.5.100")
4880 (source (origin
4881 (method url-fetch)
4882 (uri (string-append "https://repo1.maven.org/maven2/"
4883 "org/eclipse/platform/org.eclipse.core.contenttype/"
4884 version "/org.eclipse.core.contenttype-"
4885 version "-sources.jar"))
4886 (sha256
4887 (base32
4888 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
4889 (build-system ant-build-system)
4890 (arguments
4891 `(#:tests? #f ; no tests included
4892 #:jar-name "eclipse-core-contenttype.jar"))
4893 (inputs
4894 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4895 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4896 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4897 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4898 (home-page "http://www.eclipse.org/")
4899 (synopsis "Eclipse content mechanism")
4900 (description "This package provides the Eclipse content mechanism in the
4901 @code{org.eclipse.core.contenttype} module.")
4902 (license license:epl1.0)))
4903
4904 (define-public java-eclipse-core-runtime
4905 (package
4906 (name "java-eclipse-core-runtime")
4907 (version "3.12.0")
4908 (source (origin
4909 (method url-fetch)
4910 (uri (string-append "https://repo1.maven.org/maven2/"
4911 "org/eclipse/platform/org.eclipse.core.runtime/"
4912 version "/org.eclipse.core.runtime-"
4913 version "-sources.jar"))
4914 (sha256
4915 (base32
4916 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
4917 (build-system ant-build-system)
4918 (arguments
4919 `(#:tests? #f ; no tests included
4920 #:jar-name "eclipse-core-runtime.jar"))
4921 (inputs
4922 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
4923 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
4924 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
4925 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4926 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4927 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4928 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4929 (home-page "https://www.eclipse.org/")
4930 (synopsis "Eclipse core runtime")
4931 (description "This package provides the Eclipse core runtime with the
4932 module @code{org.eclipse.core.runtime}.")
4933 (license license:epl1.0)))
4934
4935 (define-public java-eclipse-core-filesystem
4936 (package
4937 (name "java-eclipse-core-filesystem")
4938 (version "1.6.1")
4939 (source (origin
4940 (method url-fetch)
4941 (uri (string-append "https://repo1.maven.org/maven2/"
4942 "org/eclipse/platform/org.eclipse.core.filesystem/"
4943 version "/org.eclipse.core.filesystem-"
4944 version "-sources.jar"))
4945 (sha256
4946 (base32
4947 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
4948 (build-system ant-build-system)
4949 (arguments
4950 `(#:tests? #f ; no tests included
4951 #:jar-name "eclipse-core-filesystem.jar"))
4952 (inputs
4953 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4954 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4955 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4956 (home-page "https://www.eclipse.org/")
4957 (synopsis "Eclipse core file system")
4958 (description "This package provides the Eclipse core file system with the
4959 module @code{org.eclipse.core.filesystem}.")
4960 (license license:epl1.0)))
4961
4962 (define-public java-eclipse-core-expressions
4963 (package
4964 (name "java-eclipse-core-expressions")
4965 (version "3.5.100")
4966 (source (origin
4967 (method url-fetch)
4968 (uri (string-append "https://repo1.maven.org/maven2/"
4969 "org/eclipse/platform/org.eclipse.core.expressions/"
4970 version "/org.eclipse.core.expressions-"
4971 version "-sources.jar"))
4972 (sha256
4973 (base32
4974 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
4975 (build-system ant-build-system)
4976 (arguments
4977 `(#:tests? #f ; no tests included
4978 #:jar-name "eclipse-core-expressions.jar"))
4979 (inputs
4980 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4981 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
4982 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
4983 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
4984 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4985 (home-page "https://www.eclipse.org/")
4986 (synopsis "Eclipse core expression language")
4987 (description "This package provides the Eclipse core expression language
4988 with the @code{org.eclipse.core.expressions} module.")
4989 (license license:epl1.0)))
4990
4991 (define-public java-eclipse-core-variables
4992 (package
4993 (name "java-eclipse-core-variables")
4994 (version "3.3.0")
4995 (source (origin
4996 (method url-fetch)
4997 (uri (string-append "https://repo1.maven.org/maven2/"
4998 "org/eclipse/platform/org.eclipse.core.variables/"
4999 version "/org.eclipse.core.variables-"
5000 version "-sources.jar"))
5001 (sha256
5002 (base32
5003 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5004 (build-system ant-build-system)
5005 (arguments
5006 `(#:tests? #f ; no tests included
5007 #:jar-name "eclipse-core-variables.jar"))
5008 (inputs
5009 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5010 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5011 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5012 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5013 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5014 (home-page "https://www.eclipse.org/platform")
5015 (synopsis "Eclipse core variables")
5016 (description "This package provides the Eclipse core variables module
5017 @code{org.eclipse.core.variables}.")
5018 (license license:epl1.0)))
5019
5020 (define-public java-eclipse-ant-core
5021 (package
5022 (name "java-eclipse-ant-core")
5023 (version "3.4.100")
5024 (source (origin
5025 (method url-fetch)
5026 (uri (string-append "https://repo1.maven.org/maven2/"
5027 "org/eclipse/platform/org.eclipse.ant.core/"
5028 version "/org.eclipse.ant.core-"
5029 version "-sources.jar"))
5030 (sha256
5031 (base32
5032 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5033 (build-system ant-build-system)
5034 (arguments
5035 `(#:tests? #f ; no tests included
5036 #:jar-name "eclipse-ant-core.jar"))
5037 (inputs
5038 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5039 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5040 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5041 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5042 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5043 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5044 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5045 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5046 (home-page "https://www.eclipse.org/platform")
5047 (synopsis "Ant build tool core libraries")
5048 (description "This package provides the ant build tool core libraries with
5049 the module @code{org.eclipse.ant.core}.")
5050 (license license:epl1.0)))
5051
5052 (define-public java-eclipse-core-resources
5053 (package
5054 (name "java-eclipse-core-resources")
5055 (version "3.11.1")
5056 (source (origin
5057 (method url-fetch)
5058 (uri (string-append "https://repo1.maven.org/maven2/"
5059 "org/eclipse/platform/org.eclipse.core.resources/"
5060 version "/org.eclipse.core.resources-"
5061 version "-sources.jar"))
5062 (sha256
5063 (base32
5064 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5065 (build-system ant-build-system)
5066 (arguments
5067 `(#:tests? #f ; no tests included
5068 #:jar-name "eclipse-core-resources.jar"))
5069 (inputs
5070 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5071 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5072 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5073 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5074 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5075 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5076 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5077 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5078 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5079 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5080 (home-page "https://www.eclipse.org/")
5081 (synopsis "Eclipse core resource management")
5082 (description "This package provides the Eclipse core resource management
5083 module @code{org.eclipse.core.resources}.")
5084 (license license:epl1.0)))
5085
5086 (define-public java-eclipse-compare-core
5087 (package
5088 (name "java-eclipse-compare-core")
5089 (version "3.6.0")
5090 (source (origin
5091 (method url-fetch)
5092 (uri (string-append "https://repo1.maven.org/maven2/"
5093 "org/eclipse/platform/org.eclipse.compare.core/"
5094 version "/org.eclipse.compare.core-"
5095 version "-sources.jar"))
5096 (sha256
5097 (base32
5098 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5099 (build-system ant-build-system)
5100 (arguments
5101 `(#:tests? #f ; no tests included
5102 #:jar-name "eclipse-compare-core.jar"))
5103 (inputs
5104 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5105 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5106 ("java-eclipse-osgi" ,java-eclipse-osgi)
5107 ("java-icu4j" ,java-icu4j)))
5108 (home-page "https://www.eclipse.org/")
5109 (synopsis "Eclipse core compare support")
5110 (description "This package provides the Eclipse core compare support
5111 module @code{org.eclipse.compare.core}.")
5112 (license license:epl1.0)))
5113
5114 (define-public java-eclipse-team-core
5115 (package
5116 (name "java-eclipse-team-core")
5117 (version "3.8.0")
5118 (source (origin
5119 (method url-fetch)
5120 (uri (string-append "https://repo1.maven.org/maven2/"
5121 "org/eclipse/platform/org.eclipse.team.core/"
5122 version "/org.eclipse.team.core-"
5123 version "-sources.jar"))
5124 (sha256
5125 (base32
5126 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5127 (build-system ant-build-system)
5128 (arguments
5129 `(#:tests? #f ; no tests included
5130 #:jar-name "eclipse-team-core.jar"))
5131 (inputs
5132 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5133 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5134 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5135 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5136 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5137 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5138 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5139 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5140 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5141 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5142 (home-page "https://www.eclipse.org/platform")
5143 (synopsis "Eclipse team support core")
5144 (description "This package provides the Eclipse team support core module
5145 @code{org.eclipse.team.core}.")
5146 (license license:epl1.0)))
5147
5148 (define-public java-eclipse-core-commands
5149 (package
5150 (name "java-eclipse-core-commands")
5151 (version "3.8.1")
5152 (source (origin
5153 (method url-fetch)
5154 (uri (string-append "https://repo1.maven.org/maven2/"
5155 "org/eclipse/platform/org.eclipse.core.commands/"
5156 version "/org.eclipse.core.commands-"
5157 version "-sources.jar"))
5158 (sha256
5159 (base32
5160 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5161 (build-system ant-build-system)
5162 (arguments
5163 `(#:tests? #f ; no tests included
5164 #:jar-name "eclipse-core-commands.jar"))
5165 (inputs
5166 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5167 (home-page "https://www.eclipse.org/platform")
5168 (synopsis "Eclipse core commands")
5169 (description "This package provides Eclipse core commands in the module
5170 @code{org.eclipse.core.commands}.")
5171 (license license:epl1.0)))
5172
5173 (define-public java-eclipse-text
5174 (package
5175 (name "java-eclipse-text")
5176 (version "3.6.0")
5177 (source (origin
5178 (method url-fetch)
5179 (uri (string-append "https://repo1.maven.org/maven2/"
5180 "org/eclipse/platform/org.eclipse.text/"
5181 version "/org.eclipse.text-"
5182 version "-sources.jar"))
5183 (sha256
5184 (base32
5185 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5186 (build-system ant-build-system)
5187 (arguments
5188 `(#:tests? #f ; no tests included
5189 #:jar-name "eclipse-text.jar"
5190 #:phases
5191 (modify-phases %standard-phases
5192 ;; When creating a new category we must make sure that the new list
5193 ;; matches List<Position>. By default it seems to be too generic
5194 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5195 ;; Without this we get this error:
5196 ;;
5197 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5198 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5199 ;; [javac] fPositions.put(category, new ArrayList<>());
5200 ;; [javac] ^
5201 ;; [javac] required: String,List<Position>
5202 ;; [javac] found: String,ArrayList<Object>
5203 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5204 ;; to List<Position> by method invocation conversion
5205 ;; [javac] where K,V are type-variables:
5206 ;; [javac] K extends Object declared in interface Map
5207 ;; [javac] V extends Object declared in interface Map
5208 ;;
5209 ;; I don't know if this is a good fix. I suspect it is not, but it
5210 ;; seems to work.
5211 (add-after 'unpack 'fix-compilation-error
5212 (lambda _
5213 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5214 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5215 "Positions.put(category, new ArrayList<Position>());"))
5216 #t)))))
5217 (inputs
5218 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5219 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5220 ("java-icu4j" ,java-icu4j)))
5221 (home-page "http://www.eclipse.org/platform")
5222 (synopsis "Eclipse text library")
5223 (description "Platform Text is part of the Platform UI project and
5224 provides the basic building blocks for text and text editors within Eclipse
5225 and contributes the Eclipse default text editor.")
5226 (license license:epl1.0)))
5227
5228 (define-public java-eclipse-jdt-core
5229 (package
5230 (name "java-eclipse-jdt-core")
5231 (version "3.12.3")
5232 (source (origin
5233 (method url-fetch)
5234 (uri (string-append "https://repo1.maven.org/maven2/"
5235 "org/eclipse/jdt/org.eclipse.jdt.core/"
5236 version "/org.eclipse.jdt.core-"
5237 version "-sources.jar"))
5238 (sha256
5239 (base32
5240 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5241 (build-system ant-build-system)
5242 (arguments
5243 `(#:tests? #f ; no tests included
5244 #:jar-name "eclipse-jdt-core.jar"))
5245 (inputs
5246 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5247 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5248 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5249 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5250 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5251 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5252 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5253 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5254 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5255 ("java-eclipse-osgi" ,java-eclipse-osgi)
5256 ("java-eclipse-text" ,java-eclipse-text)))
5257 (home-page "https://www.eclipse.org/jdt")
5258 (synopsis "Java development tools core libraries")
5259 (description "This package provides the core libraries of the Eclipse Java
5260 development tools.")
5261 (license license:epl1.0)))
5262
5263 (define-public java-javax-mail
5264 (package
5265 (name "java-javax-mail")
5266 (version "1.5.6")
5267 (source (origin
5268 (method url-fetch)
5269 (uri (string-append "https://repo1.maven.org/maven2/"
5270 "com/sun/mail/javax.mail/"
5271 version "/javax.mail-"
5272 version "-sources.jar"))
5273 (sha256
5274 (base32
5275 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5276 (build-system ant-build-system)
5277 (arguments
5278 `(#:tests? #f ; no tests
5279 #:jar-name "javax-mail.jar"))
5280 (home-page "https://javamail.java.net")
5281 (synopsis "Reference implementation of the JavaMail API")
5282 (description
5283 "This package provides versions of the JavaMail API implementation, IMAP,
5284 SMTP, and POP3 service providers, some examples, and documentation for the
5285 JavaMail API.")
5286 ;; GPLv2 only with "classpath exception".
5287 (license license:gpl2)))
5288
5289 (define-public java-log4j-api
5290 (package
5291 (name "java-log4j-api")
5292 (version "2.4.1")
5293 (source (origin
5294 (method url-fetch)
5295 (uri (string-append "mirror://apache/logging/log4j/" version
5296 "/apache-log4j-" version "-src.tar.gz"))
5297 (sha256
5298 (base32
5299 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5300 (build-system ant-build-system)
5301 (arguments
5302 `(#:tests? #f ; tests require unpackaged software
5303 #:jar-name "log4j-api.jar"
5304 #:make-flags
5305 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5306 "/share/java"))
5307 #:phases
5308 (modify-phases %standard-phases
5309 (add-after 'unpack 'enter-dir
5310 (lambda _ (chdir "log4j-api") #t))
5311 ;; FIXME: The tests require additional software that has not been
5312 ;; packaged yet, such as
5313 ;; * org.apache.maven
5314 ;; * org.apache.felix
5315 (add-after 'enter-dir 'delete-tests
5316 (lambda _ (delete-file-recursively "src/test") #t)))))
5317 (inputs
5318 `(("java-osgi-core" ,java-osgi-core)
5319 ("java-hamcrest-core" ,java-hamcrest-core)
5320 ("java-junit" ,java-junit)))
5321 (home-page "http://logging.apache.org/log4j/2.x/")
5322 (synopsis "API module of the Log4j logging framework for Java")
5323 (description
5324 "This package provides the API module of the Log4j logging framework for
5325 Java.")
5326 (license license:asl2.0)))
5327
5328 (define-public java-log4j-core
5329 (package
5330 (inherit java-log4j-api)
5331 (name "java-log4j-core")
5332 (inputs
5333 `(("java-osgi-core" ,java-osgi-core)
5334 ("java-hamcrest-core" ,java-hamcrest-core)
5335 ("java-log4j-api" ,java-log4j-api)
5336 ("java-mail" ,java-mail)
5337 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5338 ("java-lmax-disruptor" ,java-lmax-disruptor)
5339 ("java-kafka" ,java-kafka-clients)
5340 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5341 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5342 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5343 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5344 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5345 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5346 ("java-commons-compress" ,java-commons-compress)
5347 ("java-commons-csv" ,java-commons-csv)
5348 ("java-jeromq" ,java-jeromq)
5349 ("java-junit" ,java-junit)))
5350 (native-inputs
5351 `(("hamcrest" ,java-hamcrest-all)
5352 ("java-commons-io" ,java-commons-io)
5353 ("java-commons-lang3" ,java-commons-lang3)
5354 ("slf4j" ,java-slf4j-api)))
5355 (arguments
5356 `(#:tests? #f ; tests require more dependencies
5357 #:test-dir "src/test"
5358 #:source-dir "src/main/java"
5359 #:jar-name "log4j-core.jar"
5360 #:jdk ,icedtea-8
5361 #:make-flags
5362 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5363 "/share/java"))
5364 #:phases
5365 (modify-phases %standard-phases
5366 (add-after 'unpack 'enter-dir
5367 (lambda _ (chdir "log4j-core") #t)))))
5368 (synopsis "Core component of the Log4j framework")
5369 (description "This package provides the core component of the Log4j
5370 logging framework for Java.")))
5371
5372 (define-public java-log4j-1.2-api
5373 (package
5374 (inherit java-log4j-api)
5375 (name "java-log4j-1.2-api")
5376 (arguments
5377 `(#:jar-name "java-log4j-1.2-api.jar"
5378 #:source-dir "log4j-1.2-api/src/main/java"
5379 #:jdk ,icedtea-8
5380 ;; Tests require maven-model (and other maven subprojects), which is a
5381 ;; cyclic dependency.
5382 #:tests? #f))
5383 (inputs
5384 `(("log4j-api" ,java-log4j-api)
5385 ("log4j-core" ,java-log4j-core)
5386 ("osgi-core" ,java-osgi-core)
5387 ("eclipse-osgi" ,java-eclipse-osgi)
5388 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5389
5390 (define-public java-commons-cli
5391 (package
5392 (name "java-commons-cli")
5393 (version "1.3.1")
5394 (source (origin
5395 (method url-fetch)
5396 (uri (string-append "mirror://apache/commons/cli/source/"
5397 "commons-cli-" version "-src.tar.gz"))
5398 (sha256
5399 (base32
5400 "1fkjn552i12vp3xxk21ws4p70fi0lyjm004vzxsdaz7gdpgyxxyl"))))
5401 (build-system ant-build-system)
5402 ;; TODO: javadoc
5403 (arguments
5404 `(#:jar-name "commons-cli.jar"))
5405 (native-inputs
5406 `(("java-junit" ,java-junit)
5407 ("java-hamcrest-core" ,java-hamcrest-core)))
5408 (home-page "http://commons.apache.org/cli/")
5409 (synopsis "Command line arguments and options parsing library")
5410 (description "The Apache Commons CLI library provides an API for parsing
5411 command line options passed to programs. It is also able to print help
5412 messages detailing the options available for a command line tool.
5413
5414 Commons CLI supports different types of options:
5415
5416 @itemize
5417 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5418 @item GNU like long options (ie. du --human-readable --max-depth=1)
5419 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5420 @item Short options with value attached (ie. gcc -O2 foo.c)
5421 @item long options with single hyphen (ie. ant -projecthelp)
5422 @end itemize
5423
5424 This is a part of the Apache Commons Project.")
5425 (license license:asl2.0)))
5426
5427 (define-public java-commons-codec
5428 (package
5429 (name "java-commons-codec")
5430 (version "1.10")
5431 (source (origin
5432 (method url-fetch)
5433 (uri (string-append "mirror://apache/commons/codec/source/"
5434 "commons-codec-" version "-src.tar.gz"))
5435 (sha256
5436 (base32
5437 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5438 (build-system ant-build-system)
5439 (outputs '("out" "doc"))
5440 (arguments
5441 `(#:test-target "test"
5442 #:make-flags
5443 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5444 (junit (assoc-ref %build-inputs "java-junit")))
5445 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5446 (string-append "-Dhamcrest.jar=" hamcrest
5447 "/share/java/hamcrest-core.jar")
5448 ;; Do not append version to jar.
5449 "-Dfinal.name=commons-codec"))
5450 #:phases
5451 (modify-phases %standard-phases
5452 (add-after 'build 'build-javadoc ant-build-javadoc)
5453 (replace 'install (install-jars "dist"))
5454 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5455 (native-inputs
5456 `(("java-junit" ,java-junit)
5457 ("java-hamcrest-core" ,java-hamcrest-core)))
5458 (home-page "http://commons.apache.org/codec/")
5459 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5460 (description "The codec package contains simple encoder and decoders for
5461 various formats such as Base64 and Hexadecimal. In addition to these widely
5462 used encoders and decoders, the codec package also maintains a collection of
5463 phonetic encoding utilities.
5464
5465 This is a part of the Apache Commons Project.")
5466 (license license:asl2.0)))
5467
5468 (define-public java-commons-daemon
5469 (package
5470 (name "java-commons-daemon")
5471 (version "1.0.15")
5472 (source (origin
5473 (method url-fetch)
5474 (uri (string-append "mirror://apache/commons/daemon/source/"
5475 "commons-daemon-" version "-src.tar.gz"))
5476 (sha256
5477 (base32
5478 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5479 (build-system ant-build-system)
5480 (arguments
5481 `(#:test-target "test"
5482 #:phases
5483 (modify-phases %standard-phases
5484 (add-after 'build 'build-javadoc ant-build-javadoc)
5485 (replace 'install (install-jars "dist"))
5486 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5487 (native-inputs
5488 `(("java-junit" ,java-junit)))
5489 (home-page "http://commons.apache.org/daemon/")
5490 (synopsis "Library to launch Java applications as daemons")
5491 (description "The Daemon package from Apache Commons can be used to
5492 implement Java applications which can be launched as daemons. For example the
5493 program will be notified about a shutdown so that it can perform cleanup tasks
5494 before its process of execution is destroyed by the operation system.
5495
5496 This package contains the Java library. You will also need the actual binary
5497 for your architecture which is provided by the jsvc package.
5498
5499 This is a part of the Apache Commons Project.")
5500 (license license:asl2.0)))
5501
5502 (define-public java-javaewah
5503 (package
5504 (name "java-javaewah")
5505 (version "1.1.6")
5506 (source (origin
5507 (method url-fetch)
5508 (uri (string-append "https://github.com/lemire/javaewah/"
5509 "archive/JavaEWAH-" version ".tar.gz"))
5510 (sha256
5511 (base32
5512 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5513 (build-system ant-build-system)
5514 (arguments `(#:jar-name "javaewah.jar"))
5515 (inputs
5516 `(("java-junit" ,java-junit)
5517 ("java-hamcrest-core" ,java-hamcrest-core)))
5518 (home-page "https://github.com/lemire/javaewah")
5519 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5520 (description "This is a word-aligned compressed variant of the Java
5521 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5522 compression scheme. It can be used to implement bitmap indexes.
5523
5524 The goal of word-aligned compression is not to achieve the best compression,
5525 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5526 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5527 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5528 @code{BitSet} class by Sun).")
5529 ;; GPL2.0 derivates are explicitly allowed.
5530 (license license:asl2.0)))
5531
5532 (define-public java-slf4j-api
5533 (package
5534 (name "java-slf4j-api")
5535 (version "1.7.25")
5536 (source (origin
5537 (method url-fetch)
5538 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5539 version ".tar.gz"))
5540 (sha256
5541 (base32
5542 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5543 (modules '((guix build utils)))
5544 ;; Delete bundled jars.
5545 (snippet
5546 '(begin
5547 (for-each delete-file (find-files "." "\\.jar$"))
5548 #t))))
5549 (build-system ant-build-system)
5550 (arguments
5551 `(#:jar-name "slf4j-api.jar"
5552 #:source-dir "slf4j-api/src/main"
5553 #:test-dir "slf4j-api/src/test"
5554 #:phases
5555 (modify-phases %standard-phases
5556 (add-after 'build 'regenerate-jar
5557 (lambda _
5558 ;; pom.xml ignores these files in the jar creation process. If we don't,
5559 ;; we get the error "This code should have never made it into slf4j-api.jar"
5560 (delete-file-recursively "build/classes/org/slf4j/impl")
5561 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5562 "build/classes" "."))))
5563 (add-before 'check 'dont-test-abstract-classes
5564 (lambda _
5565 ;; abstract classes are not meant to be run with junit
5566 (substitute* "build.xml"
5567 (("<include name=\"\\*\\*/\\*Test.java\" />")
5568 (string-append "<include name=\"**/*Test.java\" />"
5569 "<exclude name=\"**/MultithreadedInitializationTest"
5570 ".java\" />"))))))))
5571 (inputs
5572 `(("java-junit" ,java-junit)
5573 ("java-hamcrest-core" ,java-hamcrest-core)))
5574 (home-page "https://www.slf4j.org/")
5575 (synopsis "Simple logging facade for Java")
5576 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5577 simple facade or abstraction for various logging
5578 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5579 allowing the end user to plug in the desired logging framework at deployment
5580 time.")
5581 (license license:expat)))
5582
5583 (define-public java-slf4j-simple
5584 (package
5585 (name "java-slf4j-simple")
5586 (version "1.7.25")
5587 (source (package-source java-slf4j-api))
5588 (build-system ant-build-system)
5589 (arguments
5590 `(#:jar-name "slf4j-simple.jar"
5591 #:source-dir "slf4j-simple/src/main"
5592 #:test-dir "slf4j-simple/src/test"
5593 #:phases
5594 (modify-phases %standard-phases
5595 ;; The tests need some test classes from slf4j-api
5596 (add-before 'check 'build-slf4j-api-test-helpers
5597 (lambda _
5598 ;; Add current dir to CLASSPATH ...
5599 (setenv "CLASSPATH"
5600 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5601 ;; ... and build test helper classes here:
5602 (zero?
5603 (apply system*
5604 `("javac" "-d" "."
5605 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5606 (inputs
5607 `(("java-junit" ,java-junit)
5608 ("java-hamcrest-core" ,java-hamcrest-core)
5609 ("java-slf4j-api" ,java-slf4j-api)))
5610 (home-page "https://www.slf4j.org/")
5611 (synopsis "Simple implementation of simple logging facade for Java")
5612 (description "SLF4J binding for the Simple implementation, which outputs
5613 all events to System.err. Only messages of level INFO and higher are
5614 printed.")
5615 (license license:expat)))
5616
5617 (define-public antlr2
5618 (package
5619 (name "antlr2")
5620 (version "2.7.7")
5621 (source (origin
5622 (method url-fetch)
5623 (uri (string-append "http://www.antlr2.org/download/antlr-"
5624 version ".tar.gz"))
5625 (sha256
5626 (base32
5627 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5628 (modules '((guix build utils)))
5629 (snippet
5630 '(begin
5631 (delete-file "antlr.jar")
5632 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5633 (("#include <map>")
5634 (string-append
5635 "#include <map>\n"
5636 "#define EOF (-1)\n"
5637 "#include <strings.h>")))
5638 (substitute* "configure"
5639 (("/bin/sh") "sh"))
5640 #t))))
5641 (build-system gnu-build-system)
5642 (arguments
5643 `(#:tests? #f ; no test target
5644 #:imported-modules ((guix build ant-build-system)
5645 (guix build syscalls)
5646 ,@%gnu-build-system-modules)
5647 #:modules (((guix build ant-build-system) #:prefix ant:)
5648 (guix build gnu-build-system)
5649 (guix build utils))
5650 #:phases
5651 (modify-phases %standard-phases
5652 (add-after 'install 'strip-jar-timestamps
5653 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5654 (add-after 'configure 'fix-bin-ls
5655 (lambda _
5656 (substitute* (find-files "." "Makefile")
5657 (("/bin/ls") "ls"))
5658 #t)))))
5659 (native-inputs
5660 `(("which" ,which)
5661 ("zip" ,zip)
5662 ("java" ,icedtea "jdk")))
5663 (inputs
5664 `(("java" ,icedtea)))
5665 (home-page "http://www.antlr2.org")
5666 (synopsis "Framework for constructing recognizers, compilers, and translators")
5667 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5668 is a language tool that provides a framework for constructing recognizers,
5669 compilers, and translators from grammatical descriptions containing Java, C#,
5670 C++, or Python actions. ANTLR provides excellent support for tree construction,
5671 tree walking, and translation.")
5672 (license license:public-domain)))
5673
5674 (define-public java-stringtemplate-3
5675 (package
5676 (name "java-stringtemplate")
5677 (version "3.2.1")
5678 (source (origin
5679 (method url-fetch)
5680 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5681 "gh-pages/download/stringtemplate-"
5682 version ".tar.gz"))
5683 (sha256
5684 (base32
5685 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5686 (build-system ant-build-system)
5687 (arguments
5688 `(#:jar-name (string-append ,name "-" ,version ".jar")
5689 #:test-dir "test"
5690 #:modules ((guix build ant-build-system)
5691 (guix build utils)
5692 (srfi srfi-1))
5693 #:phases
5694 (modify-phases %standard-phases
5695 (add-before 'check 'fix-tests
5696 (lambda _
5697 (substitute* "build.xml"
5698 (("\\$\\{test.home\\}/java")
5699 "${test.home}/org"))
5700 #t))
5701 (add-before 'build 'generate-grammar
5702 (lambda _
5703 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5704 (every (lambda (file)
5705 (format #t "~a\n" file)
5706 (zero? (system* "antlr" file)))
5707 '("template.g" "angle.bracket.template.g" "action.g"
5708 "eval.g" "group.g" "interface.g"))))))))
5709 (native-inputs
5710 `(("antlr" ,antlr2)
5711 ("java-junit" ,java-junit)))
5712 (home-page "http://www.stringtemplate.org")
5713 (synopsis "Template engine to generate formatted text output")
5714 (description "StringTemplate is a java template engine (with ports for C#,
5715 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5716 or any other formatted text output. StringTemplate is particularly good at
5717 code generators, multiple site skins, and internationalization / localization.
5718 StringTemplate also powers ANTLR.")
5719 (license license:bsd-3)))
5720
5721 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5722 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5723 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5724 ;; of antlr3 at runtime.
5725 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5726 ;; This version of ST4 is sufficient for the latest antlr3.
5727 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5728 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5729 ;; against the latest ST4.
5730 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5731 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5732 ;; only grammar files with the antlr2 syntax.
5733 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5734
5735 (define-public java-stringtemplate
5736 (package (inherit java-stringtemplate-3)
5737 (name "java-stringtemplate")
5738 (version "4.0.8")
5739 (source (origin
5740 (method url-fetch)
5741 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5742 version ".tar.gz"))
5743 (file-name (string-append name "-" version ".tar.gz"))
5744 (sha256
5745 (base32
5746 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5747 (build-system ant-build-system)
5748 (arguments
5749 `(#:jar-name (string-append ,name "-" ,version ".jar")
5750 #:tests? #f ; FIXME: tests fail for unknown reasons
5751 #:test-dir "test"
5752 #:modules ((guix build ant-build-system)
5753 (guix build utils)
5754 (srfi srfi-1))
5755 #:phases
5756 (modify-phases %standard-phases
5757 (add-before 'check 'fix-test-target
5758 (lambda _
5759 (substitute* "build.xml"
5760 (("\\$\\{test.home\\}/java") "${test.home}/")
5761 (("\\*Test.java") "Test*.java"))
5762 #t))
5763 (add-before 'build 'generate-grammar
5764 (lambda _
5765 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5766 (every (lambda (file)
5767 (format #t "~a\n" file)
5768 (zero? (system* "antlr3" file)))
5769 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5770 (inputs
5771 `(("antlr3" ,antlr3-bootstrap)
5772 ("antlr2" ,antlr2)
5773 ("java-stringtemplate" ,java-stringtemplate-3)
5774 ("java-junit" ,java-junit)))))
5775
5776 (define java-stringtemplate-4.0.6
5777 (package (inherit java-stringtemplate)
5778 (name "java-stringtemplate")
5779 (version "4.0.6")
5780 (source (origin
5781 (method url-fetch)
5782 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
5783 version ".tar.gz"))
5784 (file-name (string-append name "-" version ".tar.gz"))
5785 (sha256
5786 (base32
5787 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
5788 (inputs
5789 `(("antlr3" ,antlr3-3.3)
5790 ("antlr2" ,antlr2)
5791 ("java-stringtemplate" ,java-stringtemplate-3)))))
5792
5793 (define-public antlr3
5794 (package
5795 (name "antlr3")
5796 (version "3.5.2")
5797 (source (origin
5798 (method url-fetch)
5799 (uri (string-append "https://github.com/antlr/antlr3/archive/"
5800 version ".tar.gz"))
5801 (file-name (string-append name "-" version ".tar.gz"))
5802 (sha256
5803 (base32
5804 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
5805 (build-system ant-build-system)
5806 (arguments
5807 `(#:jar-name (string-append ,name "-" ,version ".jar")
5808 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
5809 #:tests? #f
5810 #:phases
5811 (modify-phases %standard-phases
5812 (add-after 'install 'bin-install
5813 (lambda* (#:key inputs outputs #:allow-other-keys)
5814 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
5815 (bin (string-append (assoc-ref outputs "out") "/bin")))
5816 (mkdir-p bin)
5817 (with-output-to-file (string-append bin "/antlr3")
5818 (lambda _
5819 (display
5820 (string-append "#!" (which "sh") "\n"
5821 "java -cp " jar "/" ,name "-" ,version ".jar:"
5822 (string-concatenate
5823 (find-files (assoc-ref inputs "stringtemplate")
5824 ".*\\.jar"))
5825 ":"
5826 (string-concatenate
5827 (find-files (assoc-ref inputs "stringtemplate4")
5828 ".*\\.jar"))
5829 ":"
5830 (string-concatenate
5831 (find-files (string-append
5832 (assoc-ref inputs "antlr")
5833 "/lib")
5834 ".*\\.jar"))
5835 " org.antlr.Tool $*"))))
5836 (chmod (string-append bin "/antlr3") #o755))))
5837 (add-before 'build 'generate-grammar
5838 (lambda _
5839 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
5840 (for-each (lambda (file)
5841 (display file)
5842 (newline)
5843 (system* "antlr3" file))
5844 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
5845 "AssignTokenTypesWalker.g"
5846 "ActionTranslator.g" "TreeToNFAConverter.g"
5847 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
5848 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
5849 (substitute* "ANTLRParser.java"
5850 (("public Object getTree") "public GrammarAST getTree"))
5851 (substitute* "ANTLRv3Parser.java"
5852 (("public Object getTree") "public CommonTree getTree"))
5853 (chdir "../../../../../java")
5854 (system* "antlr" "-o" "org/antlr/tool"
5855 "org/antlr/tool/serialize.g")
5856 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
5857 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
5858 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
5859 (substitute* "org/antlr/tool/ErrorManager.java"
5860 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
5861 (chdir "../../../..")))
5862 (add-before 'build 'fix-build-xml
5863 (lambda _
5864 (substitute* "build.xml"
5865 (("<exec") "<copy todir=\"${classes.dir}\">
5866 <fileset dir=\"tool/src/main/resources\">
5867 <include name=\"**/*.stg\"/>
5868 <include name=\"**/*.st\"/>
5869 <include name=\"**/*.sti\"/>
5870 <include name=\"**/STLexer.tokens\"/>
5871 </fileset>
5872 </copy><exec")))))))
5873 (native-inputs
5874 `(("antlr" ,antlr2)
5875 ("antlr3" ,antlr3-bootstrap)))
5876 (inputs
5877 `(("junit" ,java-junit)
5878 ("stringtemplate" ,java-stringtemplate-3)
5879 ("stringtemplate4" ,java-stringtemplate)))
5880 (propagated-inputs
5881 `(("stringtemplate" ,java-stringtemplate-3)
5882 ("antlr" ,antlr2)
5883 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
5884 (home-page "http://www.antlr3.org")
5885 (synopsis "Framework for constructing recognizers, compilers, and translators")
5886 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5887 is a language tool that provides a framework for constructing recognizers,
5888 compilers, and translators from grammatical descriptions containing Java, C#,
5889 C++, or Python actions. ANTLR provides excellent support for tree construction,
5890 tree walking, and translation.")
5891 (license license:bsd-3)))
5892
5893 (define antlr3-bootstrap
5894 (package
5895 (inherit antlr3)
5896 (name "antlr3-bootstrap")
5897 (native-inputs
5898 `(("antlr" ,antlr2)
5899 ("antlr3" ,antlr3-3.3)))
5900 (inputs
5901 `(("junit" ,java-junit)))))
5902
5903 (define antlr3-3.3
5904 (package
5905 (inherit antlr3)
5906 (name "antlr3")
5907 (version "3.3")
5908 (source (origin
5909 (method url-fetch)
5910 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
5911 "gh-pages/download/antlr-"
5912 version ".tar.gz"))
5913 (sha256
5914 (base32
5915 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
5916 (patches
5917 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
5918 (arguments
5919 `(#:jar-name (string-append ,name "-" ,version ".jar")
5920 #:source-dir (string-join '("tool/src/main/java"
5921 "runtime/Java/src/main/java"
5922 "tool/src/main/antlr2"
5923 "tool/src/main/antlr3")
5924 ":")
5925 #:tests? #f ; FIXME: tests seem to require maven plugin
5926 #:modules ((guix build ant-build-system)
5927 (guix build utils)
5928 (srfi srfi-1))
5929 #:phases
5930 (modify-phases %standard-phases
5931 (add-after 'install 'bin-install
5932 (lambda* (#:key inputs outputs #:allow-other-keys)
5933 (let* ((out (assoc-ref outputs "out"))
5934 (jar (string-append out "/share/java"))
5935 (bin (string-append out "/bin")))
5936 (mkdir-p bin)
5937 (with-output-to-file (string-append bin "/antlr3")
5938 (lambda _
5939 (display
5940 (string-append
5941 "#!" (which "sh") "\n"
5942 "java -cp " jar "/antlr3-3.3.jar:"
5943 (string-join
5944 (append (find-files (assoc-ref inputs "java-stringtemplate")
5945 ".*\\.jar$")
5946 (find-files (string-append (assoc-ref inputs "antlr")
5947 "/lib")
5948 ".*\\.jar$"))
5949 ":")
5950 " org.antlr.Tool $*"))))
5951 (chmod (string-append bin "/antlr3") #o755)
5952 #t)))
5953 (add-before 'build 'generate-grammar
5954 (lambda _
5955 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
5956 (("import org.antlr.grammar.v2.\\*;")
5957 "import org.antlr.grammar.v2.*;\n
5958 import org.antlr.grammar.v2.TreeToNFAConverter;\n
5959 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
5960 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
5961 (and
5962 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
5963 (every (lambda (file)
5964 (format #t "~a\n" file)
5965 (zero? (system* "antlr" file)))
5966 '("antlr.g" "antlr.print.g" "assign.types.g"
5967 "buildnfa.g" "codegen.g" "define.g")))
5968 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
5969 (every (lambda (file)
5970 (format #t "~a\n" file)
5971 (zero? (system* "antlr3" file)))
5972 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
5973 "ANTLRv3Tree.g"))))))
5974 (add-before 'build 'fix-build-xml
5975 (lambda _
5976 (substitute* "build.xml"
5977 (("<exec") "<copy todir=\"${classes.dir}\">
5978 <fileset dir=\"tool/src/main/resources\">
5979 <include name=\"**/*.stg\"/>
5980 <include name=\"**/*.st\"/>
5981 <include name=\"**/*.sti\"/>
5982 <include name=\"**/STLexer.tokens\"/>
5983 </fileset>
5984 </copy><exec"))
5985 #t)))))
5986 (native-inputs
5987 `(("antlr" ,antlr2)
5988 ("antlr3" ,antlr3-3.1)))
5989 (inputs
5990 `(("junit" ,java-junit)))
5991 (propagated-inputs
5992 `(("java-stringtemplate" ,java-stringtemplate-3)
5993 ("antlr" ,antlr2)
5994 ("antlr3" ,antlr3-3.1)))))
5995
5996 (define antlr3-3.1
5997 (package
5998 (inherit antlr3)
5999 (version "3.1")
6000 (source (origin
6001 (method url-fetch)
6002 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6003 "gh-pages/download/antlr-"
6004 version ".tar.gz"))
6005 (sha256
6006 (base32
6007 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6008 (patches
6009 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6010 (arguments
6011 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6012 #:source-dir "src:runtime/Java/src"
6013 #:tests? #f
6014 #:phases
6015 (modify-phases %standard-phases
6016 (add-after 'install 'bin-install
6017 (lambda* (#:key inputs outputs #:allow-other-keys)
6018 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6019 (bin (string-append (assoc-ref outputs "out") "/bin")))
6020 (mkdir-p bin)
6021 (with-output-to-file (string-append bin "/antlr3")
6022 (lambda _
6023 (display
6024 (string-append "#!" (which "sh") "\n"
6025 "java -cp " jar "/antlr3-3.1-3.1.jar:"
6026 (string-concatenate
6027 (find-files (assoc-ref inputs "stringtemplate")
6028 ".*\\.jar"))
6029 ":"
6030 (string-concatenate
6031 (find-files (string-append
6032 (assoc-ref inputs "antlr")
6033 "/lib")
6034 ".*\\.jar"))
6035 " org.antlr.Tool $*"))))
6036 (chmod (string-append bin "/antlr3") #o755))))
6037 (add-before 'build 'generate-grammar
6038 (lambda _
6039 (let ((dir "src/org/antlr/tool/"))
6040 (for-each (lambda (file)
6041 (display file)
6042 (newline)
6043 (invoke "antlr" "-o" dir (string-append dir file)))
6044 '("antlr.g" "antlr.print.g" "assign.types.g"
6045 "buildnfa.g" "define.g")))
6046 (format #t "codegen.g\n")
6047 (invoke "antlr" "-o" "src/org/antlr/codegen"
6048 "src/org/antlr/codegen/codegen.g")
6049 #t))
6050 (add-before 'build 'fix-build-xml
6051 (lambda _
6052 (substitute* "build.xml"
6053 (("<exec") "<copy todir=\"${classes.dir}\">
6054 <fileset dir=\"src\">
6055 <include name=\"**/*.stg\"/>
6056 <include name=\"**/*.st\"/>
6057 <include name=\"**/*.sti\"/>
6058 <include name=\"**/STLexer.tokens\"/>
6059 </fileset>
6060 </copy><exec")))))))
6061 (native-inputs
6062 `(("antlr" ,antlr2)))
6063 (inputs
6064 `(("junit" ,java-junit)))
6065 (propagated-inputs
6066 `(("stringtemplate" ,java-stringtemplate-3)))))
6067
6068 (define-public java-commons-cli-1.2
6069 ;; This is a bootstrap dependency for Maven2.
6070 (package
6071 (inherit java-commons-cli)
6072 (version "1.2")
6073 (source (origin
6074 (method url-fetch)
6075 (uri (string-append "mirror://apache/commons/cli/source/"
6076 "commons-cli-" version "-src.tar.gz"))
6077 (sha256
6078 (base32
6079 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6080 (arguments
6081 `(#:jar-name "commons-cli.jar"
6082 #:phases
6083 (modify-phases %standard-phases
6084 (add-before 'check 'fix-build-xml
6085 (lambda* (#:key inputs #:allow-other-keys)
6086 (substitute* "build.xml"
6087 (("dir=\"\\$\\{test.home\\}/java\"")
6088 "dir=\"${test.home}\""))
6089 #t)))))
6090 (native-inputs
6091 `(("java-junit" ,java-junit)))))
6092
6093 (define-public java-microemulator-cldc
6094 (package
6095 (name "java-microemulator-cldc")
6096 (version "2.0.4")
6097 (source (origin
6098 (method url-fetch)
6099 (uri (string-append "https://github.com/barteo/microemu/archive/"
6100 "microemulator_"
6101 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6102 version)
6103 ".tar.gz"))
6104 (file-name (string-append name "-" version ".tar.gz"))
6105 (sha256
6106 (base32
6107 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6108 (build-system ant-build-system)
6109 (arguments
6110 `(#:jar-name "microemulator-cldc.jar"
6111 #:source-dir "microemu-cldc/src/main/java"
6112 #:tests? #f)); Requires even older software
6113 (home-page "https://github.com/barteo/microemu")
6114 (synopsis "J2ME CLDC emulator")
6115 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6116 Emulator. It allows to demonstrate MIDlet based applications in web browser
6117 applet and can be run as a standalone java application.")
6118 (license (list license:asl2.0
6119 ;; or altenatively:
6120 license:lgpl2.1+))))
6121
6122 (define-public java-datanucleus-javax-persistence
6123 (package
6124 (name "java-datanucleus-javax-persistence")
6125 (version "2.2.0")
6126 (source (origin
6127 (method url-fetch)
6128 (uri (string-append "https://github.com/datanucleus/"
6129 "javax.persistence/archive/javax.persistence-"
6130 version "-release.tar.gz"))
6131 (sha256
6132 (base32
6133 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6134 (build-system ant-build-system)
6135 (arguments
6136 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6137 #:jdk ,icedtea-8
6138 #:source-dir "src/main/java"
6139 #:tests? #f)); no tests
6140 (home-page "https://github.com/datanucleus/javax.persistence")
6141 (synopsis "JPA API")
6142 (description "This package contains a clean definition of JPA API intended
6143 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6144 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6145 used to generate this API.")
6146 (license (list license:edl1.0 license:epl1.0))))
6147
6148 (define-public java-osgi-cmpn
6149 (package
6150 (name "java-osgi-cmpn")
6151 (version "6.0.0")
6152 (source (origin
6153 (method url-fetch)
6154 (uri (string-append "http://central.maven.org/maven2/"
6155 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6156 version "-sources.jar"))
6157 (sha256
6158 (base32
6159 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6160 (build-system ant-build-system)
6161 (arguments
6162 `(#:jar-name "osgi-cmpn.jar"
6163 #:tests? #f)); no tests
6164 (inputs
6165 `(("annotation" ,java-osgi-annotation)
6166 ("core" ,java-osgi-core)
6167 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6168 ("microemulator" ,java-microemulator-cldc)
6169 ("servlet" ,java-classpathx-servletapi)))
6170 (home-page "https://www.osgi.org")
6171 (synopsis "Compendium specification module of OSGi framework")
6172 (description
6173 "OSGi, for Open Services Gateway initiative framework, is a module system
6174 and service platform for the Java programming language. This package contains
6175 the compendium specification module, providing interfaces and classes for use
6176 in compiling bundles.")
6177 (license license:asl2.0)))
6178
6179 (define-public java-osgi-service-component-annotations
6180 (package
6181 (name "java-osgi-service-component-annotations")
6182 (version "1.3.0")
6183 (source (origin
6184 (method url-fetch)
6185 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6186 "org.osgi.service.component.annotations/"
6187 version "/org.osgi.service.component.annotations-"
6188 version "-sources.jar"))
6189 (sha256
6190 (base32
6191 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6192 (build-system ant-build-system)
6193 (arguments
6194 `(#:jar-name "osgi-service-component-annotations.jar"
6195 #:tests? #f)); no tests
6196 (inputs
6197 `(("annotation" ,java-osgi-annotation)))
6198 (home-page "https://www.osgi.org")
6199 (synopsis "Support annotations for osgi-service-component")
6200 (description
6201 "OSGi, for Open Services Gateway initiative framework, is a module system
6202 and service platform for the Java programming language. This package contains
6203 the support annotations for osgi-service-component.")
6204 (license license:asl2.0)))
6205
6206 (define-public java-osgi-dto
6207 (package
6208 (name "java-osgi-dto")
6209 (version "1.0.0")
6210 (source (origin
6211 (method url-fetch)
6212 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6213 "org.osgi.dto/" version "/org.osgi.dto-"
6214 version "-sources.jar"))
6215 (sha256
6216 (base32
6217 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6218 (build-system ant-build-system)
6219 (arguments
6220 `(#:jar-name "osgi-dto.jar"
6221 #:tests? #f)); no tests
6222 (inputs
6223 `(("annotation" ,java-osgi-annotation)))
6224 (home-page "https://www.osgi.org")
6225 (synopsis "Data Transfer Objects")
6226 (description
6227 "OSGi, for Open Services Gateway initiative framework, is a module system
6228 and service platform for the Java programming language. This package contains
6229 the Data Transfer Objects. It is easily serializable having only public fields
6230 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6231 Map and array aggregates may also be used. The aggregates must only hold
6232 objects of the listed types or aggregates.")
6233 (license license:asl2.0)))
6234
6235 (define-public java-osgi-resource
6236 (package
6237 (name "java-osgi-resource")
6238 (version "1.0.0")
6239 (source (origin
6240 (method url-fetch)
6241 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6242 "org.osgi.resource/"
6243 version "/org.osgi.resource-"
6244 version "-sources.jar"))
6245 (sha256
6246 (base32
6247 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6248 (build-system ant-build-system)
6249 (arguments
6250 `(#:jar-name "osgi-resource.jar"
6251 #:tests? #f)); no tests
6252 (inputs
6253 `(("annotation" ,java-osgi-annotation)
6254 ("dto" ,java-osgi-dto)))
6255 (home-page "https://www.osgi.org")
6256 (synopsis "OSGI Resource")
6257 (description
6258 "OSGi, for Open Services Gateway initiative framework, is a module system
6259 and service platform for the Java programming language. This package contains
6260 the definition of common types in osgi packages.")
6261 (license license:asl2.0)))
6262
6263 (define-public java-osgi-namespace-contract
6264 (package
6265 (name "java-osgi-namespace-contract")
6266 (version "1.0.0")
6267 (source (origin
6268 (method url-fetch)
6269 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6270 "org.osgi.namespace.contract/"
6271 version "/org.osgi.namespace.contract-"
6272 version "-sources.jar"))
6273 (sha256
6274 (base32
6275 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6276 (build-system ant-build-system)
6277 (inputs
6278 `(("resource" ,java-osgi-resource)
6279 ("annotation" ,java-osgi-annotation)))
6280 (arguments
6281 `(#:jar-name "osgi-namespace-contract.jar"
6282 #:tests? #f)); no tests
6283 (home-page "https://www.osgi.org")
6284 (synopsis "Contract Capability and Requirement Namespace")
6285 (description
6286 "OSGi, for Open Services Gateway initiative framework, is a module system
6287 and service platform for the Java programming language. This package contains
6288 the names for the attributes and directives for a namespace with contracts.")
6289 (license license:asl2.0)))
6290
6291 (define-public java-osgi-namespace-extender
6292 (package
6293 (name "java-osgi-namespace-extender")
6294 (version "1.0.1")
6295 (source (origin
6296 (method url-fetch)
6297 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6298 "org.osgi.namespace.extender/"
6299 version "/org.osgi.namespace.extender-"
6300 version "-sources.jar"))
6301 (sha256
6302 (base32
6303 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6304 (build-system ant-build-system)
6305 (inputs
6306 `(("resource" ,java-osgi-resource)
6307 ("annotation" ,java-osgi-annotation)))
6308 (arguments
6309 `(#:jar-name "osgi-namespace-extendent.jar"
6310 #:tests? #f)); no tests
6311 (home-page "https://www.osgi.org")
6312 (synopsis "Extender Capability and Requirement Namespace")
6313 (description
6314 "OSGi, for Open Services Gateway initiative framework, is a module system
6315 and service platform for the Java programming language. This package contains
6316 the names for the attributes and directives for an extender namespace.")
6317 (license license:asl2.0)))
6318
6319 (define-public java-osgi-namespace-service
6320 (package
6321 (name "java-osgi-namespace-service")
6322 (version "1.0.0")
6323 (source (origin
6324 (method url-fetch)
6325 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6326 "org.osgi.namespace.service/"
6327 version "/org.osgi.namespace.service-"
6328 version "-sources.jar"))
6329 (sha256
6330 (base32
6331 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6332 (build-system ant-build-system)
6333 (inputs
6334 `(("resource" ,java-osgi-resource)
6335 ("annotation" ,java-osgi-annotation)))
6336 (arguments
6337 `(#:jar-name "osgi-namespace-service.jar"
6338 #:tests? #f)); no tests
6339 (home-page "https://www.osgi.org")
6340 (synopsis "Service Capability and Requirement Namespace")
6341 (description
6342 "OSGi, for Open Services Gateway initiative framework, is a module system
6343 and service platform for the Java programming language. This package contains
6344 the names for the attributes and directives for a service namespace.")
6345 (license license:asl2.0)))
6346
6347 (define-public java-osgi-util-function
6348 (package
6349 (name "java-osgi-util-function")
6350 (version "1.0.0")
6351 (source (origin
6352 (method url-fetch)
6353 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6354 "org.osgi.util.function/"
6355 version "/org.osgi.util.function-"
6356 version "-sources.jar"))
6357 (sha256
6358 (base32
6359 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6360 (build-system ant-build-system)
6361 (arguments
6362 `(#:jar-name "osgi-util-function.jar"
6363 #:tests? #f)); no tests
6364 (inputs
6365 `(("annotation" ,java-osgi-annotation)))
6366 (home-page "https://www.osgi.org")
6367 (synopsis "OSGI Util Function")
6368 (description
6369 "OSGi, for Open Services Gateway initiative framework, is a module system
6370 and service platform for the Java programming language. This package contains
6371 an interface for a function that accepts a single argument and produces a result.")
6372 (license license:asl2.0)))
6373
6374 (define-public java-osgi-util-promise
6375 (package
6376 (name "java-osgi-util-promise")
6377 (version "1.0.0")
6378 (source (origin
6379 (method url-fetch)
6380 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6381 "org.osgi.util.promise/"
6382 version "/org.osgi.util.promise-"
6383 version "-sources.jar"))
6384 (sha256
6385 (base32
6386 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6387 (build-system ant-build-system)
6388 (arguments
6389 `(#:jar-name "osgi-util-promise.jar"
6390 #:tests? #f)); no tests
6391 (inputs
6392 `(("annotation" ,java-osgi-annotation)
6393 ("function" ,java-osgi-util-function)))
6394 (home-page "https://www.osgi.org")
6395 (synopsis "Promise of a value")
6396 (description
6397 "OSGi, for Open Services Gateway initiative framework, is a module system
6398 and service platform for the Java programming language. This package contains
6399 an interface and utilitary classes for promises. A Promise represents a future
6400 value. It handles the interactions for asynchronous processing.")
6401 (license license:asl2.0)))
6402
6403 (define-public java-osgi-service-metatype-annotations
6404 (package
6405 (name "java-osgi-service-metatype-annotations")
6406 (version "1.3.0")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6410 "org.osgi.service.metatype.annotations/"
6411 version "/org.osgi.service.metatype.annotations-"
6412 version "-sources.jar"))
6413 (sha256
6414 (base32
6415 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6416 (build-system ant-build-system)
6417 (arguments
6418 `(#:jar-name "osgi-service-metatype-annotations.jar"
6419 #:tests? #f)); no tests
6420 (inputs
6421 `(("annotation" ,java-osgi-annotation)))
6422 (home-page "https://www.osgi.org")
6423 (synopsis "Support annotations for metatype")
6424 (description
6425 "OSGi, for Open Services Gateway initiative framework, is a module system
6426 and service platform for the Java programming language. This package contains
6427 the support annotations for metatype.")
6428 (license license:asl2.0)))
6429
6430 (define-public java-osgi-service-repository
6431 (package
6432 (name "java-osgi-service-repository")
6433 (version "1.1.0")
6434 (source (origin
6435 (method url-fetch)
6436 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6437 "org.osgi.service.repository/"
6438 version "/org.osgi.service.repository-"
6439 version "-sources.jar"))
6440 (sha256
6441 (base32
6442 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6443 (build-system ant-build-system)
6444 (arguments
6445 `(#:jar-name "osgi-service-repository.jar"
6446 #:tests? #f)); no tests
6447 (inputs
6448 `(("annotation" ,java-osgi-annotation)
6449 ("promise" ,java-osgi-util-promise)
6450 ("resource" ,java-osgi-resource)))
6451 (home-page "https://www.osgi.org")
6452 (synopsis "OSGI service repository")
6453 (description
6454 "OSGi, for Open Services Gateway initiative framework, is a module system
6455 and service platform for the Java programming language. This package contains
6456 a repository service that contains resources.")
6457 (license license:asl2.0)))
6458
6459 (define-public java-osgi-framework
6460 (package
6461 (name "java-osgi-framework")
6462 (version "1.8.0")
6463 (source (origin
6464 (method url-fetch)
6465 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6466 "org.osgi.framework/" version "/org.osgi.framework-"
6467 version "-sources.jar"))
6468 (sha256
6469 (base32
6470 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6471 (build-system ant-build-system)
6472 (arguments
6473 `(#:jar-name "osgi-framework.jar"
6474 #:tests? #f)); no tests
6475 (inputs
6476 `(("annotation" ,java-osgi-annotation)
6477 ("resource" ,java-osgi-resource)
6478 ("dto" ,java-osgi-dto)))
6479 (home-page "https://www.osgi.org")
6480 (synopsis "OSGi framework")
6481 (description
6482 "OSGi, for Open Services Gateway initiative framework, is a module system
6483 and service platform for the Java programming language.")
6484 (license license:asl2.0)))
6485
6486 (define-public java-osgi-service-log
6487 (package
6488 (name "java-osgi-service-log")
6489 (version "1.3.0")
6490 (source (origin
6491 (method url-fetch)
6492 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6493 "org.osgi.service.log/"
6494 version "/org.osgi.service.log-"
6495 version "-sources.jar"))
6496 (sha256
6497 (base32
6498 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6499 (build-system ant-build-system)
6500 (arguments
6501 `(#:jar-name "osgi-service-log.jar"
6502 #:tests? #f)); no tests
6503 (inputs
6504 `(("java-osgi-framework" ,java-osgi-framework)))
6505 (home-page "https://www.osgi.org")
6506 (synopsis "Provides methods for bundles to write messages to the log")
6507 (description
6508 "OSGi, for Open Services Gateway initiative framework, is a module system
6509 and service platform for the Java programming language. This package contains
6510 the log service.")
6511 (license license:asl2.0)))
6512
6513 (define-public java-osgi-service-jdbc
6514 (package
6515 (name "java-osgi-service-jdbc")
6516 (version "1.0.0")
6517 (source (origin
6518 (method url-fetch)
6519 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6520 "org.osgi.service.jdbc/"
6521 version "/org.osgi.service.jdbc-"
6522 version "-sources.jar"))
6523 (sha256
6524 (base32
6525 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6526 (build-system ant-build-system)
6527 (arguments
6528 `(#:jar-name "osgi-service-jdbc.jar"
6529 #:tests? #f)); no tests
6530 (home-page "https://www.osgi.org")
6531 (synopsis "Factory for JDBC connection factories")
6532 (description
6533 "OSGi, for Open Services Gateway initiative framework, is a module system
6534 and service platform for the Java programming language. This package contains
6535 a factory for JDBC connection factories. There are 3 preferred connection
6536 factories for getting JDBC connections:
6537
6538 @itemize
6539 @item @code{javax.sql.DataSource};
6540 @item @code{javax.sql.ConnectionPoolDataSource};
6541 @item @code{javax.sql.XADataSource}.
6542 @end itemize")
6543 (license license:asl2.0)))
6544
6545 (define-public java-osgi-service-resolver
6546 (package
6547 (name "java-osgi-service-resolver")
6548 (version "1.0.1")
6549 (source (origin
6550 (method url-fetch)
6551 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6552 "org.osgi.service.resolver/"
6553 version "/org.osgi.service.resolver-"
6554 version "-sources.jar"))
6555 (sha256
6556 (base32
6557 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6558 (build-system ant-build-system)
6559 (arguments
6560 `(#:jar-name "osgi-service-resolver.jar"
6561 #:tests? #f)); no tests
6562 (inputs
6563 `(("annotation" ,java-osgi-annotation)
6564 ("resource" ,java-osgi-resource)))
6565 (home-page "https://www.osgi.org")
6566 (synopsis "OSGI Resolver service")
6567 (description
6568 "OSGi, for Open Services Gateway initiative framework, is a module system
6569 and service platform for the Java programming language. This package contains
6570 a resolver service that resolves the specified resources in the context supplied
6571 by the caller.")
6572 (license license:asl2.0)))
6573
6574 (define-public java-osgi-util-tracker
6575 (package
6576 (name "java-osgi-util-tracker")
6577 (version "1.5.1")
6578 (source (origin
6579 (method url-fetch)
6580 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6581 "org.osgi.util.tracker/"
6582 version "/org.osgi.util.tracker-"
6583 version "-sources.jar"))
6584 (sha256
6585 (base32
6586 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6587 (build-system ant-build-system)
6588 (arguments
6589 `(#:jar-name "osgi-util-tracker.jar"
6590 #:tests? #f)); no tests
6591 (inputs
6592 `(("framework" ,java-osgi-framework)
6593 ("annotation" ,java-osgi-annotation)))
6594 (home-page "https://www.osgi.org")
6595 (synopsis "Bundle tracking")
6596 (description
6597 "OSGi, for Open Services Gateway initiative framework, is a module system
6598 and service platform for the Java programming language. This package contains
6599 bundle tracking utility classes.")
6600 (license license:asl2.0)))
6601
6602 (define-public java-osgi-service-cm
6603 (package
6604 (name "java-osgi-service-cm")
6605 (version "1.5.0")
6606 (source (origin
6607 (method url-fetch)
6608 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6609 "org.osgi.service.cm/"
6610 version "/org.osgi.service.cm-"
6611 version "-sources.jar"))
6612 (sha256
6613 (base32
6614 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6615 (build-system ant-build-system)
6616 (arguments
6617 `(#:jar-name "osgi-service-cm.jar"
6618 #:tests? #f)); no tests
6619 (inputs
6620 `(("framework" ,java-osgi-framework)
6621 ("annotation" ,java-osgi-annotation)))
6622 (home-page "https://www.osgi.org")
6623 (synopsis "OSGI Configuration Management")
6624 (description
6625 "OSGi, for Open Services Gateway initiative framework, is a module system
6626 and service platform for the Java programming language. This package contains
6627 utility classes for the configuration of services.")
6628 (license license:asl2.0)))
6629
6630 (define-public java-osgi-service-packageadmin
6631 (package
6632 (name "java-osgi-service-packageadmin")
6633 (version "1.2.0")
6634 (source (origin
6635 (method url-fetch)
6636 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6637 "org.osgi.service.packageadmin/"
6638 version "/org.osgi.service.packageadmin-"
6639 version "-sources.jar"))
6640 (sha256
6641 (base32
6642 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6643 (build-system ant-build-system)
6644 (arguments
6645 `(#:jar-name "osgi-service-packageadmin.jar"
6646 #:tests? #f)); no tests
6647 (inputs
6648 `(("framework" ,java-osgi-framework)))
6649 (home-page "https://www.osgi.org")
6650 (synopsis "OSGI Package Administration")
6651 (description
6652 "OSGi, for Open Services Gateway initiative framework, is a module system
6653 and service platform for the Java programming language. This package contains
6654 the packageadmin service.")
6655 (license license:asl2.0)))
6656
6657 (define-public java-ops4j-base-lang
6658 (package
6659 (name "java-ops4j-base-lang")
6660 (version "1.5.0")
6661 (source (origin
6662 (method url-fetch)
6663 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6664 "archive/base-" version ".tar.gz"))
6665 (sha256
6666 (base32
6667 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6668 (build-system ant-build-system)
6669 (arguments
6670 `(#:jar-name "java-ops4j-base-lang.jar"
6671 #:source-dir "ops4j-base-lang/src/main/java"
6672 #:tests? #f; no tests
6673 #:phases
6674 (modify-phases %standard-phases
6675 (add-before 'build 'add-test-file
6676 (lambda _
6677 ;; That file is required by a test in ops4j-pax-exam-core-spi
6678 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6679 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6680 (lambda _
6681 (display
6682 (string-append
6683 "version=" ,version "\n"
6684 "groupId=org.ops4j.base"
6685 "artifactId=ops4j-base-lang\n")))))))))
6686 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6687 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6688 (description "OPS4J stands for Open Participation Software for Java. This
6689 package contains utilities and extensions related to @code{java.lang}.")
6690 (license license:asl2.0)))
6691
6692 (define-public java-ops4j-base-monitors
6693 (package
6694 (inherit java-ops4j-base-lang)
6695 (name "java-ops4j-base-monitors")
6696 (arguments
6697 `(#:jar-name "java-ops4j-base-monitors.jar"
6698 #:source-dir "ops4j-base-monitors/src/main/java"
6699 #:tests? #f)); no tests
6700 (inputs
6701 `(("lang" ,java-ops4j-base-lang)))
6702 (description "OPS4J stands for Open Participation Software for Java. This
6703 package contains utilities and extensions related to monitoring.")))
6704
6705 (define-public java-ops4j-base-io
6706 (package
6707 (inherit java-ops4j-base-lang)
6708 (name "java-ops4j-base-io")
6709 (arguments
6710 `(#:jar-name "java-ops4j-base-io.jar"
6711 #:source-dir "ops4j-base-io/src/main/java"
6712 #:test-dir "ops4j-base-io/src/test"
6713 #:test-exclude
6714 (list "**/ListerTest.java")))
6715 (inputs
6716 `(("lang" ,java-ops4j-base-monitors)
6717 ("lang" ,java-ops4j-base-lang)))
6718 (native-inputs
6719 `(("junit" ,java-junit)
6720 ("hamcrest" ,java-hamcrest-core)))
6721 (description "OPS4J stands for Open Participation Software for Java. This
6722 package contains utilities and extensions related to handling streams and files.")))
6723
6724 (define-public java-ops4j-base-util
6725 (package
6726 (inherit java-ops4j-base-lang)
6727 (name "java-ops4j-base-util")
6728 (arguments
6729 `(#:jar-name "java-ops4j-base-util.jar"
6730 #:source-dir "ops4j-base-util/src/main/java"
6731 #:test-dir "ops4j-base-util/src/test"))
6732 (inputs
6733 `(("lang" ,java-ops4j-base-lang)))
6734 (native-inputs
6735 `(("junit" ,java-junit)))
6736 (description "OPS4J stands for Open Participation Software for Java. This
6737 package contains utilities and extensions related to environment, i18n and
6738 mime types.")))
6739
6740 (define-public java-ops4j-base-util-property
6741 (package
6742 (inherit java-ops4j-base-lang)
6743 (name "java-ops4j-base-util-property")
6744 (arguments
6745 `(#:jar-name "java-ops4j-base-util-property.jar"
6746 #:source-dir "ops4j-base-util-property/src/main/java"
6747 #:tests? #f)); no tests
6748 (inputs
6749 `(("lang" ,java-ops4j-base-lang)
6750 ("util" ,java-ops4j-base-util)))
6751 (description "OPS4J stands for Open Participation Software for Java. This
6752 package contains utilities and extensions related to resolving properties from
6753 different sources.")))
6754
6755 (define-public java-ops4j-base-store
6756 (package
6757 (inherit java-ops4j-base-lang)
6758 (name "java-ops4j-base-store")
6759 (arguments
6760 `(#:jar-name "java-ops4j-base-store.jar"
6761 #:source-dir "ops4j-base-store/src/main/java"
6762 #:tests? #f)); no tests
6763 (inputs
6764 `(("lang" ,java-ops4j-base-lang)
6765 ("slf4j" ,java-slf4j-api)
6766 ("io" ,java-ops4j-base-io)))
6767 (description "OPS4J stands for Open Participation Software for Java. This
6768 package contains utilities for storing and retrieving data from an
6769 @code{InputStream}.")))
6770
6771 (define-public java-ops4j-base-spi
6772 (package
6773 (inherit java-ops4j-base-lang)
6774 (name "java-ops4j-base-spi")
6775 (arguments
6776 `(#:jar-name "java-ops4j-base-spi.jar"
6777 #:source-dir "ops4j-base-spi/src/main/java"
6778 #:test-dir "ops4j-base-spi/src/test"))
6779 (native-inputs
6780 `(("junit" ,java-junit)
6781 ("hamcrest" ,java-hamcrest-core)))
6782 (description "OPS4J stands for Open Participation Software for Java. This
6783 package contains utilities for obtaining services via the Java SE 6
6784 @code{ServiceLoader}.")))
6785
6786 (define-public java-aqute-bnd-annotation
6787 (package
6788 (name "java-aqute-bnd-annotation")
6789 (version "3.5.0")
6790 (source (origin
6791 (method url-fetch)
6792 (uri (string-append "https://github.com/bndtools/bnd/archive/"
6793 version ".REL.tar.gz"))
6794 (file-name (string-append name "-" version ".tar.gz"))
6795 (sha256
6796 (base32
6797 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
6798 (build-system ant-build-system)
6799 (arguments
6800 `(#:jar-name "java-aqute-bnd-annotation.jar"
6801 #:source-dir "biz.aQute.bnd.annotation/src"
6802 #:tests? #f)); empty test dir
6803 (home-page "http://bnd.bndtools.org/")
6804 (synopsis "Tools for OSGi")
6805 (description "Bnd is a swiss army knife for OSGi, it creates manifest
6806 headers based on analyzing the class code, it verifies the project settings,
6807 it manages project dependencies, gives diffs jars, and much more.")
6808 (license license:asl2.0)))
6809
6810 (define-public java-aqute-libg
6811 (package
6812 (inherit java-aqute-bnd-annotation)
6813 (name "java-aqute-libg")
6814 (arguments
6815 `(#:jar-name "java-aqute-libg.jar"
6816 #:source-dir "aQute.libg/src"
6817 #:tests? #f)); FIXME: tests are in "aQute.libg/test", not in a java directory
6818 (inputs
6819 `(("slf4j" ,java-slf4j-api)
6820 ("osgi-annot" ,java-osgi-annotation)
6821 ("java-osgi-cmpn" ,java-osgi-cmpn)
6822 ("osgi" ,java-osgi-core)))))
6823
6824 (define-public java-aqute-bndlib
6825 (package
6826 (inherit java-aqute-bnd-annotation)
6827 (name "java-aqute-bndlib")
6828 (arguments
6829 `(#:jar-name "java-bndlib.jar"
6830 #:source-dir "biz.aQute.bndlib/src"
6831 #:tests? #f)); no tests
6832 (inputs
6833 `(("slf4j" ,java-slf4j-api)
6834 ("osgi-annot" ,java-osgi-annotation)
6835 ("java-aqute-libg" ,java-aqute-libg)
6836 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
6837 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
6838 ("java-osgi-service-repository" ,java-osgi-service-repository)
6839 ("java-osgi-service-log" ,java-osgi-service-log)
6840 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
6841 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
6842 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
6843 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
6844 ("promise" ,java-osgi-util-promise)
6845 ("osgi" ,java-osgi-core)))))
6846
6847 (define-public java-ops4j-pax-tinybundles
6848 (package
6849 (name "java-ops4j-pax-tinybundles")
6850 (version "2.1.1")
6851 (source (origin
6852 (method url-fetch)
6853 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
6854 "archive/tinybundles-" version ".tar.gz"))
6855 (sha256
6856 (base32
6857 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
6858 (arguments
6859 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
6860 #:source-dir "src/main/java"
6861 #:test-exclude
6862 ;; Abstract base classes for other tests
6863 (list "**/BndTest.java" "**/CoreTest.java")
6864 #:phases
6865 (modify-phases %standard-phases
6866 (add-before 'check 'fix-version
6867 (lambda _
6868 ;; This test has a reference to an old version of bndlib we are not
6869 ;; packaging. It uses the version referenced in pom.xml. We replace
6870 ;; it with our own version.
6871 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
6872 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
6873 ,(package-version java-aqute-bndlib))))))))
6874 (inputs
6875 `(("lang" ,java-ops4j-base-lang)
6876 ("io" ,java-ops4j-base-io)
6877 ("store" ,java-ops4j-base-store)
6878 ("slf4j" ,java-slf4j-api)
6879 ("libg" ,java-aqute-libg)
6880 ("bndlib" ,java-aqute-bndlib)))
6881 (native-inputs
6882 `(("junit" ,java-junit)
6883 ("hamcrest" ,java-hamcrest-core)
6884 ("log4j" ,java-log4j-api)
6885 ("bndannotation" ,java-aqute-bnd-annotation)
6886 ("framework" ,java-osgi-framework)))
6887 (build-system ant-build-system)
6888 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
6889 (synopsis "Java APIs to create OSGi related artifacts")
6890 (description "Tinybundles is all about creating OSGi related artifacts like
6891 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
6892 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
6893 other hand, this library can be a foundation of real end user tools that need
6894 to create those artifacts.")
6895 (license license:asl2.0)))
6896
6897 (define-public java-ops4j-pax-exam-core
6898 (package
6899 (name "java-ops4j-pax-exam-core")
6900 (version "4.11.0")
6901 (source (origin
6902 (method url-fetch)
6903 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
6904 "archive/exam-reactor-" version ".tar.gz"))
6905 (sha256
6906 (base32
6907 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
6908 (arguments
6909 `(#:jar-name "java-ops4j-pax-exam-core.jar"
6910 #:source-dir "core/pax-exam/src/main/java"
6911 #:test-dir "core/pax-exam/src/test"))
6912 (inputs
6913 `(("slf4j" ,java-slf4j-api)
6914 ("lang" ,java-ops4j-base-lang)
6915 ("io" ,java-ops4j-base-io)
6916 ("util-property" ,java-ops4j-base-util-property)
6917 ("util-store" ,java-ops4j-base-store)
6918 ("java-osgi-core" ,java-osgi-core)))
6919 (native-inputs
6920 `(("junit" ,java-junit)
6921 ("hamcrest" ,java-hamcrest-core)))
6922 (build-system ant-build-system)
6923 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
6924 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
6925 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
6926 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
6927 the system under test at the same time.")
6928 (license license:asl2.0)))
6929
6930 (define-public java-ops4j-pax-exam-core-spi
6931 (package
6932 (inherit java-ops4j-pax-exam-core)
6933 (name "java-ops4j-pax-exam-core-spi")
6934 (arguments
6935 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
6936 #:source-dir "src/main/java"
6937 #:test-exclude
6938 (list
6939 ;; Abstract base class, not a test
6940 "**/BaseStagedReactorTest.java"
6941 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
6942 "**/WarBuilderTest.java")
6943 #:phases
6944 (modify-phases %standard-phases
6945 (add-before 'configure 'chdir
6946 (lambda _
6947 ;; Tests assume we are in this directory
6948 (chdir "core/pax-exam-spi")))
6949 (add-before 'check 'fix-tests
6950 (lambda _
6951 ;; One test checks that this file is present.
6952 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
6953 (with-output-to-file
6954 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
6955 (lambda _
6956 (display
6957 (string-append "artifactId = pax-exam-spi\n"
6958 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
6959 ;; Maven puts compilation results in the target directory, while we
6960 ;; put them in the build directory.
6961 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
6962 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
6963 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
6964 (("target") "build"))
6965 ;; One test is expected to fail, but it doesn't throw the expected exception
6966 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
6967 (("AssertionError") "IllegalArgumentException")))))))
6968 (inputs
6969 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
6970 ("lang" ,java-ops4j-base-lang)
6971 ("monitors" ,java-ops4j-base-monitors)
6972 ("store" ,java-ops4j-base-store)
6973 ("io" ,java-ops4j-base-io)
6974 ("spi" ,java-ops4j-base-spi)
6975 ("osgi" ,java-osgi-core)
6976 ("slf4j" ,java-slf4j-api)
6977 ("tinybundles" ,java-ops4j-pax-tinybundles)))
6978 (native-inputs
6979 `(("mockito" ,java-mockito-1)
6980 ("junit" ,java-junit)
6981 ("hamcrest" ,java-hamcrest-core)
6982 ("cglib" ,java-cglib)
6983 ("objenesis" ,java-objenesis)
6984 ("asm" ,java-asm)))))
6985
6986 (define-public java-ops4j-pax-exam-core-junit
6987 (package
6988 (inherit java-ops4j-pax-exam-core)
6989 (name "java-ops4j-pax-exam-core-junit")
6990 (arguments
6991 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
6992 #:source-dir "drivers/pax-exam-junit4/src/main/java"
6993 #:tests? #f)); no tests
6994 (inputs
6995 `(("junit" ,java-junit)
6996 ("slf4j" ,java-slf4j-api)
6997 ("core" ,java-ops4j-pax-exam-core)
6998 ("spi" ,java-ops4j-pax-exam-core-spi)))
6999 (native-inputs '())))
7000
7001 (define-public java-fasterxml-jackson-annotations
7002 (package
7003 (name "java-fasterxml-jackson-annotations")
7004 (version "2.9.4")
7005 (source (origin
7006 (method url-fetch)
7007 (uri (string-append "https://github.com/FasterXML/"
7008 "jackson-annotations/archive/"
7009 "jackson-annotations-" version ".tar.gz"))
7010 (sha256
7011 (base32
7012 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7013 (build-system ant-build-system)
7014 (arguments
7015 `(#:jar-name "jackson-annotations.jar"
7016 #:source-dir "src/main/java"
7017 #:test-dir "src/test"))
7018 (native-inputs
7019 `(("junit" ,java-junit)))
7020 (home-page "https://github.com/FasterXML/jackson-annotations")
7021 (synopsis "General purpose annotations for the Jackson Data Processor")
7022 (description "This package contains general purpose annotations for the
7023 Jackson Data Processor, used on value and handler types. The only annotations
7024 not included are ones that require dependency to the Databind package.")
7025 (license license:asl2.0)))
7026
7027 (define-public java-fasterxml-jackson-core
7028 (package
7029 (name "java-fasterxml-jackson-core")
7030 (version "2.9.4")
7031 (source (origin
7032 (method url-fetch)
7033 (uri (string-append "https://github.com/FasterXML/"
7034 "jackson-core/archive/"
7035 "jackson-core-" version ".tar.gz"))
7036 (sha256
7037 (base32
7038 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7039 (build-system ant-build-system)
7040 (arguments
7041 `(#:jar-name "jackson-core.jar"
7042 #:source-dir "src/main/java"
7043 #:test-dir "src/test"
7044 #:test-exclude
7045 (list
7046 ;; Expected failure. pom.xml excludes these
7047 "**/failing/**"
7048 ;; Base classes that have no constructor for junit
7049 "**/BaseTest.java"
7050 "**/ConcurrencyReadTest.java"
7051 "**/ManualCharAccessTest.java"
7052 "**/ManualCharAccessTest.java"
7053 "**/TrailingCommasTest.java"
7054 "**/AsyncMissingValuesInObjectTest.java"
7055 "**/AsyncMissingValuesInArrayTest.java")
7056 #:phases
7057 (modify-phases %standard-phases
7058 (add-before 'configure 'generate-PackageVersion.java
7059 (lambda _
7060 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7061 (in (string-append out ".in")))
7062 (copy-file in out)
7063 (substitute* out
7064 (("@package@") "com.fasterxml.jackson.core.json")
7065 (("@projectversion@") ,version)
7066 (("@projectgroupid@") "com.fasterxml.jackson.core")
7067 (("@projectartifactid@") "jackson-core")))))
7068 (add-before 'build 'copy-resources
7069 (lambda _
7070 (copy-recursively "src/main/resources"
7071 "build/classes")))
7072 (add-before 'check 'copy-test-resources
7073 (lambda _
7074 (copy-recursively "src/test/resources"
7075 "build/test-classes"))))))
7076 (native-inputs
7077 `(("junit" ,java-junit)
7078 ("hamcrest" ,java-hamcrest-core)))
7079 (home-page "https://github.com/FasterXML/jackson-core")
7080 (synopsis "")
7081 (description "")
7082 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7083
7084 (define-public java-fasterxml-jackson-databind
7085 (package
7086 (name "java-fasterxml-jackson-databind")
7087 (version "2.9.4")
7088 (source (origin
7089 (method url-fetch)
7090 (uri (string-append "https://github.com/FasterXML/"
7091 "jackson-databind/archive/"
7092 "jackson-databind-" version ".tar.gz"))
7093 (sha256
7094 (base32
7095 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7096 (build-system ant-build-system)
7097 (arguments
7098 `(#:jar-name "jackson-databind.jar"
7099 #:source-dir "src/main/java"
7100 #:tests? #f; requires javax.measures for which I can't find a free implementation
7101 #:phases
7102 (modify-phases %standard-phases
7103 (add-before 'configure 'generate-PackageVersion.java
7104 (lambda _
7105 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7106 (in (string-append out ".in")))
7107 (copy-file in out)
7108 (substitute* out
7109 (("@package@") "com.fasterxml.jackson.databind.cfg")
7110 (("@projectversion@") ,version)
7111 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7112 (("@projectartifactid@") "jackson-databind")))))
7113 (add-before 'build 'copy-resources
7114 (lambda _
7115 (copy-recursively "src/main/resources" "build/classes"))))))
7116 (inputs
7117 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7118 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7119 (home-page "https://github.com/FasterXML/jackson-databind")
7120 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7121 (description "This package contains the general-purpose data-binding
7122 functionality and tree-model for Jackson Data Processor. It builds on core
7123 streaming parser/generator package, and uses Jackson Annotations for
7124 configuration.")
7125 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7126
7127 (define-public java-fasterxml-jackson-modules-base-jaxb
7128 (package
7129 (name "java-fasterxml-jackson-modules-base-jaxb")
7130 (version "2.9.4")
7131 (source (origin
7132 (method url-fetch)
7133 (uri (string-append "https://github.com/FasterXML/"
7134 "jackson-modules-base/archive/"
7135 "jackson-modules-base-" version ".tar.gz"))
7136 (sha256
7137 (base32
7138 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7139 (build-system ant-build-system)
7140 (arguments
7141 `(#:jar-name "jackson-modules-base-jaxb.jar"
7142 #:source-dir "jaxb/src/main/java"
7143 #:test-dir "jaxb/src/test"
7144 #:test-exclude
7145 ;; Base class for tests
7146 (list "**/BaseJaxbTest.java")
7147 #:phases
7148 (modify-phases %standard-phases
7149 (add-before 'configure 'generate-PackageVersion.java
7150 (lambda _
7151 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7152 "jackson/module/jaxb/PackageVersion.java"))
7153 (in (string-append out ".in")))
7154 (copy-file in out)
7155 (substitute* out
7156 (("@package@") "com.fasterxml.jackson.module.jaxb")
7157 (("@projectversion@") ,version)
7158 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7159 (("@projectartifactid@") "jackson-module-jaxb")))))
7160 (add-before 'build 'copy-resources
7161 (lambda _
7162 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7163 (inputs
7164 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7165 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7166 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7167 (native-inputs
7168 `(("java-junit" ,java-junit)))
7169 (home-page "https://github.com/FasterXML/jackson-modules-base")
7170 (synopsis "Jaxb annotations jackson module")
7171 (description "This package is the jaxb annotations module for jackson.")
7172 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7173
7174 (define-public java-snakeyaml
7175 (package
7176 (name "java-snakeyaml")
7177 (version "1.18")
7178 (source (origin
7179 (method url-fetch)
7180 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7181 version ".tar.gz"))
7182 (file-name (string-append name "-" version ".tar.gz"))
7183 (sha256
7184 (base32
7185 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7186 (build-system ant-build-system)
7187 (arguments
7188 `(#:jar-name "java-snakeyaml.jar"
7189 #:source-dir "src/main/java"
7190 ;; Tests require velocity, a cyclic dependency, and
7191 ;; java-spring-framework-context which is not packaged.
7192 #:tests? #f))
7193 (home-page "https://bitbucket.org/asomov/snakeyaml")
7194 (synopsis "YAML processor")
7195 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7196 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7197
7198 (define-public java-fasterxml-jackson-dataformat-yaml
7199 (package
7200 (name "java-fasterxml-jackson-dataformat-yaml")
7201 (version "2.9.4")
7202 (source (origin
7203 (method url-fetch)
7204 (uri (string-append "https://github.com/FasterXML/"
7205 "jackson-dataformats-text/archive/"
7206 "jackson-dataformats-text-" version ".tar.gz"))
7207 (sha256
7208 (base32
7209 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7210 (build-system ant-build-system)
7211 (arguments
7212 `(#:jar-name "jackson-dataformat-yaml.jar"
7213 #:source-dir "yaml/src/main/java"
7214 #:test-dir "yaml/src/test"
7215 #:test-exclude (list "**/failing/**.java")
7216 #:phases
7217 (modify-phases %standard-phases
7218 (add-before 'configure 'generate-PackageVersion.java
7219 (lambda _
7220 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7221 (in (string-append out ".in")))
7222 (copy-file in out)
7223 (substitute* out
7224 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7225 (("@projectversion@") ,version)
7226 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7227 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7228 (inputs
7229 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7230 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7231 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7232 ("java-snakeyaml" ,java-snakeyaml)))
7233 (native-inputs
7234 `(("junit" ,java-junit)
7235 ("hamcrest" ,java-hamcrest-core)
7236 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7237 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7238 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7239 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7240 (synopsis "Yaml backend for Jackson")
7241 (description "Dataformat backends are used to support format alternatives
7242 to JSON, supported by default. This is done by sub-classing Jackson core
7243 abstractions.")
7244 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7245
7246 (define-public java-stax2-api
7247 (package
7248 (name "java-stax2-api")
7249 (version "4.0.0")
7250 (source (origin
7251 (method url-fetch)
7252 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7253 "stax2-api-" version ".tar.gz"))
7254 (sha256
7255 (base32
7256 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7257 (build-system ant-build-system)
7258 (arguments
7259 `(#:jar-name "java-stax2-api.jar"
7260 #:source-dir "src/main/java"
7261 #:tests? #f)); no tests
7262 (home-page "https://github.com/FasterXML/stax2-api")
7263 (synopsis "Stax2 API")
7264 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7265 significant new functionalities, such as full-featured bi-direction validation
7266 interface and high-performance Typed Access API.")
7267 (license license:bsd-2)))
7268
7269 (define-public java-woodstox-core
7270 (package
7271 (name "java-woodstox-core")
7272 (version "5.0.3")
7273 (source (origin
7274 (method url-fetch)
7275 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7276 "woodstox-core-" version ".tar.gz"))
7277 (sha256
7278 (base32
7279 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7280 (build-system ant-build-system)
7281 (arguments
7282 `(#:jar-name "woodstox.jar"
7283 #:test-exclude
7284 (list "**/Base*.java" "failing/**")
7285 #:phases
7286 (modify-phases %standard-phases
7287 (add-before 'build 'remove-msv-dep
7288 (lambda _
7289 ;; we don't need osgi, and it depends on msv
7290 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7291 ;; msv's latest release is from 2011 and we don't need it
7292 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7293 (delete-file-recursively "src/test/java/wstxtest/osgi")
7294 (delete-file-recursively "src/test/java/wstxtest/msv")))
7295 (add-before 'build 'copy-resources
7296 (lambda _
7297 (copy-recursively "src/main/resources" "build/classes"))))))
7298 (inputs
7299 `(("stax2" ,java-stax2-api)))
7300 (native-inputs
7301 `(("junit" ,java-junit)))
7302 (home-page "https://github.com/FasterXML/woodstox")
7303 (synopsis "Stax XML API implementation")
7304 (description "Woodstox is a stax XML API implementation.")
7305 (license license:asl2.0)))
7306
7307 (define-public java-fasterxml-jackson-dataformat-xml
7308 (package
7309 (name "java-fasterxml-jackson-dataformat-xml")
7310 (version "2.9.4")
7311 (source (origin
7312 (method url-fetch)
7313 (uri (string-append "https://github.com/FasterXML/"
7314 "jackson-dataformat-xml/archive/"
7315 "jackson-dataformat-xml-" version ".tar.gz"))
7316 (sha256
7317 (base32
7318 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7319 (build-system ant-build-system)
7320 (arguments
7321 `(#:jar-name "jackson-dataformat-xml.jar"
7322 #:source-dir "src/main/java"
7323 #:test-exclude
7324 (list "**/failing/**")
7325 #:phases
7326 (modify-phases %standard-phases
7327 (add-before 'configure 'generate-PackageVersion.java
7328 (lambda _
7329 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7330 (in (string-append out ".in")))
7331 (copy-file in out)
7332 (newline)
7333 (substitute* out
7334 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7335 (("@projectversion@") ,version)
7336 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7337 (("@projectartifactid@") "jackson-dataformat-xml")))))
7338 (add-before 'build 'copy-resources
7339 (lambda _
7340 (copy-recursively "src/main/resources" "build/classes"))))))
7341 (inputs
7342 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7343 ("jackson-core" ,java-fasterxml-jackson-core)
7344 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7345 ("jackson-databind" ,java-fasterxml-jackson-databind)
7346 ("stax2-api" ,java-stax2-api)
7347 ("woodstox" ,java-woodstox-core)))
7348 (native-inputs
7349 `(("junit" ,java-junit)
7350 ("hamcrest" ,java-hamcrest-core)))
7351 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7352 (synopsis "Read and write XML")
7353 (description "This package contains Jackson extension component for reading
7354 and writing XML encoded data.
7355
7356 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7357 approach (that is, no support is added for \"Schema-first\" approach). Support
7358 for JAXB annotations is provided by JAXB annotation module; this module
7359 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7360 @code{JsonFactory}) as well as small number of higher level overrides needed to
7361 make data-binding work.")
7362 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7363
7364 (define-public java-hdrhistogram
7365 (package
7366 (name "java-hdrhistogram")
7367 (version "2.1.9")
7368 (source (origin
7369 (method url-fetch)
7370 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7371 "archive/HdrHistogram-" version ".tar.gz"))
7372 (sha256
7373 (base32
7374 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7375 (build-system ant-build-system)
7376 (arguments
7377 `(#:jar-name "java-hdrhistogram.jar"
7378 #:source-dir "src/main/java"
7379 #:phases
7380 (modify-phases %standard-phases
7381 (add-before 'configure 'set-version
7382 (lambda _
7383 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7384 (template (string-append version-java ".template")))
7385 (copy-file template version-java)
7386 (substitute* version-java
7387 (("\\$VERSION\\$") ,version)
7388 (("\\$BUILD_TIME\\$") "0"))
7389 #t))))))
7390 (native-inputs
7391 `(("junit" ,java-junit)
7392 ("hamcrest" ,java-hamcrest-core)))
7393 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7394 (synopsis "High dynamic range histogram")
7395 (description "Hdrhistogram allows to create histograms that support
7396 recording and analyzing sampled data value counts across a configurable integer
7397 value range with configurable value precision within the range. Value precision
7398 is expressed as the number of significant digits in the value recording, and
7399 provides control over value quantization behavior across the value range and
7400 the subsequent value resolution at any given level.")
7401 (license license:public-domain)))
7402
7403 (define-public java-cofoja
7404 (package
7405 (name "java-cofoja")
7406 (version "1.3")
7407 (source (origin
7408 (method git-fetch)
7409 (uri (git-reference
7410 (url "https://github.com/nhatminhle/cofoja.git")
7411 (commit (string-append "v" version))))
7412 (file-name (string-append "java-cofoja-" version "-checkout"))
7413 (sha256
7414 (base32
7415 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7416 (build-system ant-build-system)
7417 (arguments
7418 `(#:build-target "dist"
7419 #:test-target "test"
7420 #:jdk ,icedtea-8
7421 #:make-flags
7422 (list "-Ddist.dir=dist")
7423 #:modules ((guix build ant-build-system)
7424 (guix build java-utils)
7425 (guix build utils)
7426 (srfi srfi-1)
7427 (ice-9 match))
7428 #:phases
7429 (modify-phases %standard-phases
7430 ;; The bulid system ignores the class path the ant-build-system sets
7431 ;; up and instead expects to find all dependencies in the "lib"
7432 ;; directory.
7433 (add-after 'unpack 'create-libdir
7434 (lambda* (#:key inputs #:allow-other-keys)
7435 (mkdir-p "lib")
7436 (for-each
7437 (lambda (file)
7438 (let ((target (string-append "lib/" (basename file))))
7439 (unless (file-exists? target)
7440 (symlink file target))))
7441 (append-map (match-lambda
7442 ((label . dir)
7443 (find-files dir "\\.jar$")))
7444 inputs))
7445 #t))
7446 (replace 'install (install-jars "dist")))))
7447 (inputs
7448 `(("java-asm" ,java-asm)))
7449 (native-inputs
7450 `(("java-junit" ,java-junit)))
7451 (home-page "https://github.com/nhatminhle/cofoja")
7452 (synopsis "Contracts for Java")
7453 (description "Contracts for Java, or Cofoja for short, is a contract
7454 programming framework and test tool for Java, which uses annotation processing
7455 and bytecode instrumentation to provide run-time checking. (In particular,
7456 this is not a static analysis tool.)")
7457 (license license:lgpl3+)))
7458
7459 (define-public java-aopalliance
7460 (package
7461 (name "java-aopalliance")
7462 (version "1.0")
7463 (source (origin
7464 (method git-fetch)
7465 ;; Note: this git repository is not official, but contains the
7466 ;; source code that is in the CVS repository. Downloading the
7467 ;; tarball from sourceforge is undeterministic, and the cvs download
7468 ;; fails.
7469 (uri (git-reference
7470 (url "https://github.com/hoverruan/aopalliance")
7471 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7472 (file-name (string-append name "-" version))
7473 (sha256
7474 (base32
7475 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7476 (build-system ant-build-system)
7477 (arguments
7478 `(#:jar-name "java-aopalliance.jar"
7479 #:jdk ,icedtea-8
7480 #:tests? #f; no tests
7481 #:source-dir "aopalliance/src/main"))
7482 (home-page "http://aopalliance.sourceforge.net")
7483 (synopsis "Aspect-Oriented Programming")
7484 (description "The AOP Alliance project is a joint project between several
7485 software engineering people who are interested in Aspect-Oriented Programming
7486 (AOP) and Java.")
7487 (license license:public-domain)))
7488
7489 (define-public java-javax-inject
7490 (package
7491 (name "java-javax-inject")
7492 (version "tck-1")
7493 (source (origin
7494 (method url-fetch)
7495 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7496 "archive/javax.inject-" version ".tar.gz"))
7497 (sha256
7498 (base32
7499 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7500 (build-system ant-build-system)
7501 (arguments
7502 `(#:jar-name "java-javax-inject.jar"
7503 #:jdk ,icedtea-8
7504 #:tests? #f)); no tests
7505 (home-page "http://github.com/javax-inject/javax-inject")
7506 (synopsis "JSR-330: Dependency Injection for Java")
7507 (description "This package specifies a means for obtaining objects in such
7508 a way as to maximize reusability, testability and maintainability compared to
7509 traditional approaches such as constructors, factories, and service locators
7510 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7511 most nontrivial applications.
7512
7513 Many types depend on other types. For example, a @var{Stopwatch} might depend
7514 on a @var{TimeSource}. The types on which a type depends are known as its
7515 dependencies. The process of finding an instance of a dependency to use at run
7516 time is known as resolving the dependency. If no such instance can be found,
7517 the dependency is said to be unsatisfied, and the application is broken.")
7518 (license license:asl2.0)))
7519
7520 (define-public java-guice
7521 (package
7522 (name "java-guice")
7523 (version "4.1")
7524 (source (origin
7525 (method url-fetch)
7526 (uri (string-append "https://github.com/google/guice/archive/"
7527 version ".tar.gz"))
7528 (file-name (string-append name "-" version ".tar.gz"))
7529 (sha256
7530 (base32
7531 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7532 (build-system ant-build-system)
7533 (arguments
7534 `(#:jar-name "java-guice.jar"
7535 #:jdk ,icedtea-8
7536 #:tests? #f; FIXME: tests are not in a java sub directory
7537 #:source-dir "core/src"))
7538 (inputs
7539 `(("guava" ,java-guava)
7540 ("java-cglib" ,java-cglib)
7541 ("java-aopalliance" ,java-aopalliance)
7542 ("java-javax-inject" ,java-javax-inject)
7543 ("java-asm" ,java-asm)))
7544 (home-page "https://github.com/google/guice")
7545 (synopsis "Lightweight dependency injection framework")
7546 (description "Guice is a lightweight dependency injection framework fo
7547 Java 6 and above.")
7548 (license license:asl2.0)))
7549
7550 (define-public java-guice-servlet
7551 (package
7552 (inherit java-guice)
7553 (name "java-guice-servlet")
7554 (arguments
7555 `(#:jar-name "guice-servlet.jar"
7556 #:source-dir "extensions/servlet/src/"
7557 #:jdk ,icedtea-8
7558 #:tests? #f)); FIXME: not in a java subdir
7559 (inputs
7560 `(("guice" ,java-guice)
7561 ("servlet" ,java-tomcat)
7562 ,@(package-inputs java-guice)))))
7563
7564 (define-public java-assertj
7565 (package
7566 (name "java-assertj")
7567 (version "3.8.0")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (string-append "https://github.com/joel-costigliola/"
7571 "assertj-core/archive/"
7572 "assertj-core-" version ".tar.gz"))
7573 (sha256
7574 (base32
7575 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7576 (build-system ant-build-system)
7577 (arguments
7578 `(#:jar-name "java-assertj.jar"
7579 #:jdk ,icedtea-8
7580 #:source-dir "src/main/java"
7581 #:tests? #f)); depends on tng-junit which depends on assertj
7582 (inputs
7583 `(("cglib" ,java-cglib)
7584 ("junit" ,java-junit)
7585 ("hamcrest" ,java-hamcrest-core)))
7586 (native-inputs
7587 `(("mockito" ,java-mockito-1)))
7588 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7589 (synopsis "Fluent assertions for java")
7590 (description "AssertJ core is a Java library that provides a fluent
7591 interface for writing assertions. Its main goal is to improve test code
7592 readability and make maintenance of tests easier.")
7593 (license license:asl2.0)))
7594
7595 (define-public java-jboss-javassist
7596 (package
7597 (name "java-jboss-javassist")
7598 (version "3.21.0")
7599 (source (origin
7600 (method url-fetch)
7601 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7602 "archive/rel_"
7603 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7604 "_ga.tar.gz"))
7605 (sha256
7606 (base32
7607 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7608 (build-system ant-build-system)
7609 (arguments
7610 `(#:jar-name "java-jboss-javassist.jar"
7611 #:jdk ,icedtea-8
7612 #:source-dir "src/main"
7613 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7614 #:phases
7615 (modify-phases %standard-phases
7616 (add-before 'configure 'remove-binary
7617 (lambda _
7618 (delete-file "javassist.jar")
7619 #t)))))
7620 (native-inputs
7621 `(("junit" ,java-junit)))
7622 (home-page "https://github.com/jboss-javassist/javassist")
7623 (synopsis "Java bytecode engineering toolkit")
7624 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7625 manipulation simple. It is a class library for editing bytecodes in Java; it
7626 enables Java programs to define a new class at runtime and to modify a class
7627 file when the JVM loads it.")
7628 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7629
7630 (define-public java-jcommander
7631 (package
7632 (name "java-jcommander")
7633 (version "1.71")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7637 version ".tar.gz"))
7638 (file-name (string-append name "-" version ".tar.gz"))
7639 (sha256
7640 (base32
7641 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7642 (build-system ant-build-system)
7643 (arguments
7644 `(#:jar-name "java-jcommander.jar"
7645 #:jdk ,icedtea-8
7646 #:tests? #f; requires testng which depends on jcommander
7647 #:source-dir "src/main/java"))
7648 (home-page "http://jcommander.org")
7649 (synopsis "Command line parameters parser")
7650 (description "JCommander is a very small Java framework that makes it
7651 trivial to parse command line parameters. Parameters are declared with
7652 annotations.")
7653 (license license:asl2.0)))
7654
7655 (define-public java-bsh
7656 (package
7657 (name "java-bsh")
7658 (version "2.0b6")
7659 (source (origin
7660 (method url-fetch)
7661 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7662 version ".tar.gz"))
7663 (file-name (string-append name "-" version ".tar.gz"))
7664 (sha256
7665 (base32
7666 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7667 (build-system ant-build-system)
7668 (arguments
7669 `(#:build-target "jarall"
7670 #:test-target "junit-tests-all"
7671 #:phases
7672 (modify-phases %standard-phases
7673 (replace 'install
7674 (lambda* (#:key outputs #:allow-other-keys)
7675 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7676 (mkdir-p share)
7677 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7678 #t))))))
7679 (home-page "http://beanshell.org/")
7680 (synopsis "Lightweight Scripting for Java")
7681 (description "BeanShell is a small, free, embeddable Java source
7682 interpreter with object scripting language features, written in Java.
7683 BeanShell dynamically executes standard Java syntax and extends it with common
7684 scripting conveniences such as loose types, commands, and method closures like
7685 those in Perl and JavaScript.")
7686 (license license:asl2.0)))
7687
7688 (define-public java-fest-util
7689 (package
7690 (name "java-fest-util")
7691 (version "1.2.5")
7692 (source (origin
7693 (method url-fetch)
7694 (uri (string-append "https://github.com/alexruiz/fest-util/"
7695 "archive/fest-util-" version ".tar.gz"))
7696 (sha256
7697 (base32
7698 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7699 (build-system ant-build-system)
7700 (arguments
7701 `(#:jar-name "java-fest-util.jar"
7702 #:source-dir "src/main/java"))
7703 (native-inputs
7704 `(("junit" ,java-junit)
7705 ("hamcrest" ,java-hamcrest-core)))
7706 (home-page "https://github.com/alexruiz/fest-util")
7707 (synopsis "FEST common utilities")
7708 (description "Common utilities used in all FEST module.")
7709 (license license:asl2.0)))
7710
7711 (define-public java-fest-test
7712 (package
7713 (name "java-fest-test")
7714 (version "2.1.0")
7715 (source (origin
7716 (method url-fetch)
7717 (uri (string-append "https://github.com/alexruiz/fest-test/"
7718 "archive/fest-test-" version ".tar.gz"))
7719 (sha256
7720 (base32
7721 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7722 (build-system ant-build-system)
7723 (arguments
7724 `(#:jar-name "java-fest-test.jar"
7725 #:source-dir "src/main/java"
7726 #:tests? #f)); no tests
7727 (inputs
7728 `(("junit" ,java-junit)))
7729 (home-page "https://github.com/alexruiz/fest-test")
7730 (synopsis "Common FEST testing infrastructure")
7731 (description "Fest-test contains the common FEST testing infrastructure.")
7732 (license license:asl2.0)))
7733
7734 (define-public java-fest-assert
7735 (package
7736 (name "java-fest-assert")
7737 (version "2.0M10")
7738 (source (origin
7739 (method url-fetch)
7740 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
7741 "archive/fest-assert-core-" version ".tar.gz"))
7742 (sha256
7743 (base32
7744 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
7745 (build-system ant-build-system)
7746 (arguments
7747 `(#:jar-name "java-fest-assert.jar"
7748 #:source-dir "src/main/java"
7749 #:test-exclude
7750 (list
7751 "**/Abstract*.java"
7752 "**/*BaseTest.java"
7753 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
7754 "**/MessageFormatter_format_Test.java"
7755 "**/internal/*/*_assert*_Test.java")))
7756 (inputs
7757 `(("java-fest-util" ,java-fest-util)))
7758 (native-inputs
7759 `(("java-junit" ,java-junit)
7760 ("java-fest-test" ,java-fest-test)
7761 ("java-hamcrest-core" ,java-hamcrest-core)
7762 ("java-mockito" ,java-mockito-1)
7763 ("java-cglib" ,java-cglib)
7764 ("java-objenesis" ,java-objenesis)
7765 ("java-asm" ,java-asm)))
7766 (home-page "https://github.com/alexruiz/fest-assert-2.x")
7767 (synopsis "FEST fluent assertions")
7768 (description "FEST-Assert provides a fluent interface for assertions.")
7769 (license license:asl2.0)))
7770
7771 (define-public java-testng
7772 (package
7773 (name "java-testng")
7774 (version "6.14.3")
7775 (source (origin
7776 (method git-fetch)
7777 (uri (git-reference
7778 (url "https://github.com/cbeust/testng.git")
7779 (commit version)))
7780 (file-name (string-append name "-" version "-checkout"))
7781 (sha256
7782 (base32
7783 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
7784 (build-system ant-build-system)
7785 (arguments
7786 `(#:jdk ,icedtea-8; java.util.function
7787 #:jar-name "java-testng.jar"
7788 #:source-dir "src/main/java"
7789 #:phases
7790 (modify-phases %standard-phases
7791 ;; FIXME: I don't know why these tests fail
7792 (add-after 'unpack 'delete-failing-tests
7793 (lambda _
7794 (substitute* "src/test/resources/testng.xml"
7795 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
7796 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
7797 #t))
7798 ;; We don't have groovy
7799 (add-after 'unpack 'delete-groovy-tests
7800 (lambda _
7801 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
7802 (substitute* "src/test/resources/testng.xml"
7803 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
7804 #t))
7805 (add-before 'build 'copy-resources
7806 (lambda _
7807 (copy-recursively "src/main/resources" "build/classes")
7808 #t))
7809 (add-before 'check 'copy-test-resources
7810 (lambda _
7811 (copy-recursively "src/test/resources" "build/test-classes")
7812 #t))
7813 (replace 'check
7814 (lambda _
7815 (system* "ant" "compile-tests")
7816 ;; we don't have groovy
7817 (substitute* "src/test/resources/testng.xml"
7818 (("<class name=\"test.groovy.GroovyTest\" />") ""))
7819 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
7820 ":build/classes"
7821 ":build/test-classes")
7822 "-Dtest.resources.dir=src/test/resources"
7823 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
7824 (propagated-inputs
7825 `(("junit" ,java-junit)
7826 ("java-jsr305" ,java-jsr305)
7827 ("java-bsh" ,java-bsh)
7828 ("java-jcommander" ,java-jcommander)
7829 ("java-guice" ,java-guice)
7830 ("snakeyaml" ,java-snakeyaml)))
7831 (native-inputs
7832 `(("guava" ,java-guava)
7833 ("java-javax-inject" ,java-javax-inject)
7834 ("java-hamcrest" ,java-hamcrest-all)
7835 ("java-assertj" ,java-assertj)
7836 ("java-mockito" ,java-mockito-1)
7837 ("cglib" ,java-cglib)
7838 ("asm" ,java-asm)
7839 ("aopalliance" ,java-aopalliance)))
7840 (home-page "http://testng.org")
7841 (synopsis "Testing framework")
7842 (description "TestNG is a testing framework inspired from JUnit and NUnit
7843 but introducing some new functionalities that make it more powerful and easier
7844 to use.")
7845 (license license:asl2.0)))
7846
7847 (define-public java-jnacl
7848 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
7849 (revision "2"))
7850 (package
7851 (name "java-jnacl")
7852 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
7853 (source (origin
7854 (method git-fetch)
7855 (uri (git-reference
7856 (url "https://github.com/neilalexander/jnacl.git")
7857 (commit commit)))
7858 (file-name (git-file-name name version))
7859 (sha256
7860 (base32
7861 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
7862 (build-system ant-build-system)
7863 (arguments
7864 `(#:jar-name "jnacl.jar"
7865 #:source-dir "src/main/java"
7866 #:jdk ,icedtea-8
7867 #:phases
7868 (modify-phases %standard-phases
7869 (add-before 'build 'fix-tests
7870 (lambda _
7871 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
7872 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
7873 (("assertions.Assertions") "assertions.api.Assertions"))
7874 #t))
7875 (replace 'check
7876 (lambda _
7877 (invoke "ant" "compile-tests")
7878 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
7879 ":build/classes"
7880 ":build/test-classes")
7881 "org.testng.TestNG" "-testclass"
7882 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
7883 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
7884 ":build/classes"
7885 ":build/test-classes")
7886 "org.testng.TestNG" "-testclass"
7887 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
7888 #t)))))
7889 (native-inputs
7890 `(("java-testng" ,java-testng)
7891 ("java-fest-util" ,java-fest-util)
7892 ("java-fest-assert" ,java-fest-assert)))
7893 (home-page "https://github.com/neilalexander/jnacl")
7894 (synopsis "Java implementation of NaCl")
7895 (description "Pure Java implementation of the NaCl: Networking and
7896 Cryptography library.")
7897 (license license:bsd-2))))
7898
7899 (define-public java-mvel2
7900 (package
7901 (name "java-mvel2")
7902 (version "2.3.1")
7903 (source (origin
7904 (method url-fetch)
7905 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
7906 version ".Final.tar.gz"))
7907 (sha256
7908 (base32
7909 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
7910 (build-system ant-build-system)
7911 (arguments
7912 `(#:jar-name "mvel2.jar"
7913 #:source-dir "src/main/java"
7914 #:test-exclude
7915 (list "**/Abstract*.java"
7916 ;; Base class with no tests
7917 "**/MVELThreadTest.java")
7918 #:phases
7919 (modify-phases %standard-phases
7920 (add-after 'install 'install-bin
7921 (lambda* (#:key outputs #:allow-other-keys)
7922 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
7923 (mkdir-p bin)
7924 (with-output-to-file (string-append bin "/mvel2")
7925 (lambda _
7926 (display
7927 (string-append
7928 "#!" (which "bash") "\n"
7929 "if [ \"$#\" -ne \"2\" ]; then\n"
7930 "echo 'Usage: mvel2 <script> <out.dir>'\n"
7931 "exit\n"
7932 "fi\n"
7933 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
7934 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
7935 " org.mvel2.sh.Main $1"))))
7936 (chmod (string-append bin "/mvel2") #o755))
7937 #t)))))
7938 (native-inputs
7939 `(("junit" ,java-junit)
7940 ("hamcrest" ,java-hamcrest-core)))
7941 (home-page "https://github.com/mvel/mvel")
7942 (synopsis "MVFLEX Expression Language")
7943 (description "MVEL has largely been inspired by Java syntax, but has some
7944 fundamental differences aimed at making it more efficient as an expression
7945 language, such as operators that directly support collection, array and string
7946 matching, as well as regular expressions. MVEL is used to evaluate expressions
7947 written using Java syntax.
7948
7949 In addition to the expression language, MVEL serves as a templating language for
7950 configuration and string construction.")
7951 (license license:asl2.0)))
7952
7953 (define-public java-commons-jexl-2
7954 (package
7955 (name "java-commons-jexl")
7956 (version "2.1.1")
7957 (source (origin
7958 (method url-fetch)
7959 (uri (string-append "mirror://apache/commons/jexl/source/"
7960 "commons-jexl-" version "-src.tar.gz"))
7961 (sha256
7962 (base32
7963 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
7964 (build-system ant-build-system)
7965 (arguments
7966 `(#:jar-name "commons-jexl-2.jar"
7967 #:jdk ,icedtea-8
7968 #:source-dir "src/main/java"
7969 #:phases
7970 (modify-phases %standard-phases
7971 (add-before 'check 'disable-broken-tests
7972 (lambda* (#:key inputs #:allow-other-keys)
7973 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
7974 (substitute* "ArithmeticTest.java"
7975 (("asserter.assertExpression\\(\"3 / 0\"") "//")
7976 (("asserter.assertExpression\\(\"imanull") "//"))
7977 ;; This test fails with "ambiguous method invocation"
7978 (delete-file "CacheTest.java")
7979 ;; This test doesn't have access to the temp directory
7980 (substitute* "ClassCreatorTest.java"
7981 (("java.io.tmpdir") "user.dir"))
7982 ;; This test fails in trying to detect whether it can run.
7983 (substitute* "ClassCreator.java"
7984 (("boolean canRun =.*") "boolean canRun = false;\n"))
7985 ;; ...and these tests depend on it.
7986 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
7987 (delete-file "scripting/JexlScriptEngineTest.java"))
7988 #t))
7989 (add-before 'build 'run-javacc
7990 (lambda _
7991 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
7992 (invoke "java" "jjtree" "Parser.jjt")
7993 (invoke "java" "javacc" "Parser.jj"))
7994 #t)))))
7995 (inputs
7996 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
7997 (native-inputs
7998 `(("java-junit" ,java-junit)
7999 ("java-hamcrest-core" ,java-hamcrest-core)
8000 ("javacc" ,javacc-4)))
8001 (home-page "https://commons.apache.org/proper/commons-jexl/")
8002 (synopsis "Java Expression Language ")
8003 (description "JEXL is a library intended to facilitate the implementation
8004 of dynamic and scripting features in applications and frameworks written in
8005 Java. JEXL implements an Expression Language based on some extensions to the
8006 JSTL Expression Language supporting most of the constructs seen in
8007 shell-script or ECMAScript. Its goal is to expose scripting features usable
8008 by technical operatives or consultants working with enterprise platforms.")
8009 (license license:asl2.0)))
8010
8011 (define-public java-lz4
8012 (package
8013 (name "java-lz4")
8014 (version "1.4.0")
8015 (source (origin
8016 (method url-fetch)
8017 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8018 version ".tar.gz"))
8019 (file-name (string-append name "-" version ".tar.gz"))
8020 (sha256
8021 (base32
8022 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8023 (build-system ant-build-system)
8024 (arguments
8025 `(#:jar-name "lz4.jar"
8026 #:jdk ,icedtea-8
8027 #:source-dir "src/java:src/java-unsafe"
8028 #:tests? #f; FIXME: requires more dependencies
8029 #:phases
8030 (modify-phases %standard-phases
8031 (add-before 'configure 'generate-source
8032 (lambda _
8033 (with-directory-excursion "src/build/source_templates"
8034 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8035 #t)))))
8036 (native-inputs
8037 `(("mvel" ,java-mvel2)))
8038 (home-page "https://jpountz.github.io/lz4-java")
8039 (synopsis "Compression algorithm")
8040 (description "LZ4 - Java is a Java port of the popular lz4 compression
8041 algorithms and xxHash hashing algorithm.")
8042 (license license:asl2.0)))
8043
8044 (define-public java-bouncycastle-bcprov
8045 (package
8046 (name "java-bouncycastle-bcprov")
8047 (version "1.58")
8048 (source (origin
8049 (method url-fetch)
8050 (uri "https://bouncycastle.org/download/bcprov-jdk15on-158.tar.gz")
8051 (sha256
8052 (base32
8053 "1hgkg96llbvgs8i0krwz2n0j7wlg6jfnq8w8kg0cc899j0wfmf3n"))))
8054 (build-system ant-build-system)
8055 (arguments
8056 `(#:jar-name "bouncycastle-bcprov.jar"
8057 #:tests? #f; no tests
8058 #:source-dir "src"
8059 #:phases
8060 (modify-phases %standard-phases
8061 (add-before 'configure 'unzip-src
8062 (lambda _
8063 (mkdir-p "src")
8064 (with-directory-excursion "src"
8065 (invoke "unzip" "../src.zip"))
8066 #t)))))
8067 (native-inputs
8068 `(("unzip" ,unzip)
8069 ("junit" ,java-junit)))
8070 (home-page "https://www.bouncycastle.org")
8071 (synopsis "Cryptographic library")
8072 (description "Bouncy Castle Provider (bcprov) is a cryptographic library
8073 for the Java programming language.")
8074 (license license:expat)))
8075
8076 (define-public java-bouncycastle-bcpkix
8077 (package
8078 (name "java-bouncycastle-bcpkix")
8079 (version "1.58")
8080 (source (origin
8081 (method url-fetch)
8082 (uri "https://bouncycastle.org/download/bcpkix-jdk15on-158.tar.gz")
8083 (sha256
8084 (base32
8085 "0is7qay02803s9f7lhnfcjlz61ni3hq5d7apg0iil7nbqkbfbcq2"))))
8086 (build-system ant-build-system)
8087 (arguments
8088 `(#:jar-name "bouncycastle-bcpkix.jar"
8089 #:tests? #f; no tests
8090 #:source-dir "src"
8091 #:phases
8092 (modify-phases %standard-phases
8093 (add-before 'configure 'unzip-src
8094 (lambda _
8095 (mkdir-p "src")
8096 (with-directory-excursion "src"
8097 (invoke "unzip" "../src.zip"))
8098 #t)))))
8099 (native-inputs
8100 `(("unzip" ,unzip)
8101 ("junit" ,java-junit)))
8102 (inputs
8103 `(("bcprov" ,java-bouncycastle-bcprov)))
8104 (home-page "https://www.bouncycastle.org")
8105 (synopsis "Cryptographic library")
8106 (description "Bouncy Castle Java API for PKIX, CMS, EAC, TSP, PKCS, OCSP,
8107 CMP, and CRMF.")
8108 (license license:expat)))
8109
8110 (define-public java-lmax-disruptor
8111 (package
8112 (name "java-lmax-disruptor")
8113 (version "3.3.7")
8114 (source (origin
8115 (method url-fetch)
8116 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8117 "archive/" version ".tar.gz"))
8118 (file-name (string-append name "-" version ".tar.gz"))
8119 (sha256
8120 (base32
8121 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8122 (build-system ant-build-system)
8123 (arguments
8124 `(#:jar-name "java-lmax-disruptor.jar"
8125 #:jdk ,icedtea-8
8126 #:tests? #f)); tests hang
8127 (inputs
8128 `(("junit" ,java-junit)
8129 ("java-hdrhistogram" ,java-hdrhistogram)
8130 ("java-jmock" ,java-jmock)
8131 ("java-jmock-legacy" ,java-jmock-legacy)
8132 ("java-jmock-junit4" ,java-jmock-junit4)
8133 ("java-hamcrest-all" ,java-hamcrest-all)))
8134 (native-inputs
8135 `(("cglib" ,java-cglib)
8136 ("objenesis" ,java-objenesis)
8137 ("asm" ,java-asm)))
8138 (home-page "https://www.lmax.com/disruptor")
8139 (synopsis "High performance inter-thread communication")
8140 (description "LMAX Disruptor is a software pattern and software component
8141 for high performance inter-thread communication that avoids the need for
8142 message queues or resource locking.")
8143 (license license:asl2.0)))
8144
8145 (define-public java-commons-bcel
8146 (package
8147 (name "java-commons-bcel")
8148 (version "6.1")
8149 (source (origin
8150 (method url-fetch)
8151 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8152 version "-src.tar.gz"))
8153 (sha256
8154 (base32
8155 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8156 (build-system ant-build-system)
8157 (arguments
8158 `(#:jar-name "bcel.jar"
8159 #:jdk ,icedtea-8
8160 #:source-dir "src/main/java"
8161 #:test-dir "src/test/java"
8162 ;; FIXME: Tests require the unpackaged jna.
8163 #:tests? #f))
8164 (home-page "https://commons.apache.org/proper/commons-bcel/")
8165 (synopsis "Byte code engineering library")
8166 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8167 intended to give users a convenient way to analyze, create, and
8168 manipulate (binary) Java class files. Classes are represented by objects
8169 which contain all the symbolic information of the given class: methods, fields
8170 and byte code instructions, in particular.
8171
8172 Such objects can be read from an existing file, be transformed by a
8173 program (e.g. a class loader at run-time) and written to a file again. An
8174 even more interesting application is the creation of classes from scratch at
8175 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8176 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8177 of Java @code{.class} files.")
8178 (license license:asl2.0)))
8179
8180 (define-public java-xerial-core
8181 (package
8182 (name "java-xerial-core")
8183 (version "2.1")
8184 (source (origin
8185 (method url-fetch)
8186 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8187 version ".tar.gz"))
8188 (file-name (string-append name "-" version ".tar.gz"))
8189 (sha256
8190 (base32
8191 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8192 (build-system ant-build-system)
8193 (arguments
8194 `(#:jar-name "xerial-core.jar"
8195 #:source-dir "xerial-core/src/main/java"
8196 #:test-dir "xerial-core/src/test"
8197 #:phases
8198 (modify-phases %standard-phases
8199 (add-before 'build 'copy-resources
8200 (lambda _
8201 (copy-recursively "xerial-core/src/main/resources"
8202 "build/classes")
8203 #t)))))
8204 (native-inputs
8205 `(("junit" ,java-junit)
8206 ("hamcrest" ,java-hamcrest-core)))
8207 (home-page "https://github.com/xerial/xerial-java")
8208 (synopsis "Data management libraries for Java")
8209 (description "Xerial is a set of data management libraries for the Java
8210 programming language. The ultimate goal of the Xerial project is to manage
8211 everything as database, including class objects, text format data, data
8212 streams, etc.")
8213 (license license:asl2.0)))
8214
8215 (define-public java-powermock-reflect
8216 (package
8217 (name "java-powermock-reflect")
8218 (version "1.7.3")
8219 (source (origin
8220 (method url-fetch)
8221 (uri (string-append "https://github.com/powermock/powermock/"
8222 "archive/powermock-" version ".tar.gz"))
8223 (file-name (string-append name "-" version ".tar.gz"))
8224 (sha256
8225 (base32
8226 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8227 (patches
8228 (search-patches "java-powermock-fix-java-files.patch"))))
8229 (build-system ant-build-system)
8230 (arguments
8231 `(#:jar-name "java-powermock-reflect.jar"
8232 #:jdk ,icedtea-8
8233 #:source-dir "powermock-reflect/src/main/java"
8234 #:test-dir "powermock-reflect/src/test"))
8235 (inputs
8236 `(("java-objenesis" ,java-objenesis)))
8237 (native-inputs
8238 `(("junit" ,java-junit)
8239 ("cglib" ,java-cglib)
8240 ("asm" ,java-asm)
8241 ("hamcrest" ,java-hamcrest-core)
8242 ("assertj" ,java-assertj)))
8243 (home-page "https://github.com/powermock/powermock")
8244 (synopsis "Mock library extension framework")
8245 (description "PowerMock is a framework that extends other mock libraries
8246 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8247 classloader and bytecode manipulation to enable mocking of static methods,
8248 constructors, final classes and methods, private methods, removal of static
8249 initializers and more. By using a custom classloader no changes need to be
8250 done to the IDE or continuous integration servers which simplifies adoption.")
8251 (license license:asl2.0)))
8252
8253 (define-public java-powermock-core
8254 (package
8255 (inherit java-powermock-reflect)
8256 (name "java-powermock-core")
8257 (arguments
8258 `(#:jar-name "java-powermock-core.jar"
8259 #:source-dir "powermock-core/src/main/java"
8260 #:test-dir "powermock-core/src/test"
8261 #:tests? #f; requires powermock-api
8262 #:jdk ,icedtea-8
8263 #:phases
8264 (modify-phases %standard-phases
8265 (add-before 'build 'copy-resources
8266 (lambda _
8267 (copy-recursively "powermock-core/src/main/resources"
8268 "build/classes"))))))
8269 (inputs
8270 `(("reflect" ,java-powermock-reflect)
8271 ("javassist" ,java-jboss-javassist)))
8272 (native-inputs
8273 `(("junit" ,java-junit)
8274 ("assertj" ,java-assertj)
8275 ("mockito" ,java-mockito-1)))))
8276
8277 (define-public java-powermock-api-support
8278 (package
8279 (inherit java-powermock-reflect)
8280 (name "java-powermock-api-support")
8281 (build-system ant-build-system)
8282 (arguments
8283 `(#:jar-name "java-powermock-api-support.jar"
8284 #:jdk ,icedtea-8
8285 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8286 #:tests? #f)); no tests
8287 (inputs
8288 `(("core" ,java-powermock-core)
8289 ("reflect" ,java-powermock-reflect)))))
8290
8291 (define-public java-powermock-modules-junit4-common
8292 (package
8293 (inherit java-powermock-reflect)
8294 (name "java-powermock-modules-junit4-common")
8295 (build-system ant-build-system)
8296 (arguments
8297 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8298 #:jdk ,icedtea-8
8299 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8300 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8301 (inputs
8302 `(("core" ,java-powermock-core)
8303 ("easymock" ,java-easymock)
8304 ("reflect" ,java-powermock-reflect)
8305 ("hamcrest" ,java-hamcrest-core)
8306 ("cglib" ,java-cglib)))))
8307
8308 (define-public java-powermock-modules-junit4
8309 (package
8310 (inherit java-powermock-reflect)
8311 (name "java-powermock-modules-junit4")
8312 (build-system ant-build-system)
8313 (arguments
8314 `(#:jar-name "java-powermock-modules-junit4.jar"
8315 #:jdk ,icedtea-8
8316 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8317 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8318 #:phases
8319 (modify-phases %standard-phases
8320 (add-before 'build 'fix-junit-detection
8321 (lambda _
8322 ;; Our junit version is 4.12-SNAPSHOT
8323 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8324 "PowerMockJUnit4MethodValidator.java")
8325 (("4.12") "4.12-SNAPSHOT")))))))
8326 (inputs
8327 `(("core" ,java-powermock-core)
8328 ("reflect" ,java-powermock-reflect)
8329 ("common" ,java-powermock-modules-junit4-common)
8330 ("cglib" ,java-cglib)))
8331 (native-inputs
8332 `(("easymock" ,java-easymock)
8333 ("hamcrest" ,java-hamcrest-core)
8334 ("objenesis" ,java-objenesis)
8335 ("asm" ,java-asm)
8336 ("junit" ,java-junit)))))
8337
8338 (define-public java-powermock-api-easymock
8339 (package
8340 (inherit java-powermock-reflect)
8341 (name "java-powermock-api-easymock")
8342 (build-system ant-build-system)
8343 (arguments
8344 `(#:jar-name "java-powermock-api-easymock.jar"
8345 #:jdk ,icedtea-8
8346 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8347 #:tests? #f; no tests
8348 #:phases
8349 (modify-phases %standard-phases
8350 (add-before 'build 'fix-file
8351 (lambda _
8352 ;; FIXME: This looks wrong, but it fixes a build error.
8353 (with-directory-excursion "powermock-api/powermock-api-easymock"
8354 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8355 (("classLoader instanceof MockClassLoader") "false")
8356 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8357 #t)))))
8358 (inputs
8359 `(("core" ,java-powermock-core)
8360 ("easymock" ,java-easymock)
8361 ("reflect" ,java-powermock-reflect)
8362 ("support" ,java-powermock-api-support)
8363 ("cglib" ,java-cglib)))))
8364
8365 (define-public java-jboss-jms-api-spec
8366 (package
8367 (name "java-jboss-jms-api-spec")
8368 (version "2.0")
8369 (source (origin
8370 (method url-fetch)
8371 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8372 "archive/jboss-jms-api_" version
8373 "_spec-1.0.1.Final.tar.gz"))
8374 (sha256
8375 (base32
8376 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8377 (build-system ant-build-system)
8378 (arguments
8379 `(#:jar-name "java-jboss-jms-api_spec.jar"
8380 #:jdk ,icedtea-8
8381 #:source-dir "."
8382 #:tests? #f)); no tests
8383 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8384 (synopsis "Java Message Service API specification")
8385 (description "Java Message Service (JMS) API is used to send messages
8386 messages between two or more clients. It is a messaging standard that allows
8387 application components to create, send, receive, and read messages.")
8388 ; either gpl2 only with GPL Classpath Exception, or cddl.
8389 (license (list license:gpl2 license:cddl1.0))))
8390
8391 (define-public java-mail
8392 (package
8393 (name "java-mail")
8394 (version "1.6.0")
8395 (source (origin
8396 (method url-fetch)
8397 (uri (string-append "https://github.com/javaee/javamail/archive/"
8398 "JAVAMAIL-1_6_0.tar.gz"))
8399 (sha256
8400 (base32
8401 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8402 (build-system ant-build-system)
8403 (arguments
8404 `(#:jar-name "java-mail.jar"
8405 #:jdk ,icedtea-8
8406 #:source-dir "mail/src/main/java"
8407 #:test-dir "mail/src/test"
8408 #:test-exclude
8409 (list "**/CollectorFormatterTest.java"
8410 "**/CompactFormatterTest.java"
8411 "**/DurationFilterTest.java"
8412 "**/MailHandlerTest.java"
8413 "**/GetLocalAddressTest.java"
8414 ;; FIXME: both end with:
8415 ;; java.lang.ClassNotFoundException:
8416 ;; javax.mail.internet.MimeMultipartParseTest
8417 "**/MimeMultipartParseTest.java"
8418 "**/SearchTermSerializationTest.java")
8419 #:phases
8420 (modify-phases %standard-phases
8421 (add-before 'configure 'move-version.java
8422 (lambda _
8423 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8424 "mail/src/main/java/javax/mail/Version.java")
8425 #t))
8426 (add-before 'build 'copy-resources
8427 (lambda _
8428 (copy-recursively "mail/src/main/resources/META-INF"
8429 "build/classes/META-INF")
8430 #t)))))
8431 (native-inputs
8432 `(("junit" ,java-junit)
8433 ("hamcrest" ,java-hamcrest-core)))
8434 (home-page "https://javaee.github.io/javamail/")
8435 (synopsis "Mail-related functionnalities in Java")
8436 (description "The JavaMail API provides a platform-independent and
8437 protocol-independent framework to build mail and messaging applications.")
8438 ;; General Public License Version 2 only ("GPL") or the Common Development
8439 ;; and Distribution License("CDDL")
8440 (license (list license:cddl1.1
8441 license:gpl2)))); with classpath exception
8442
8443 (define-public java-jeromq
8444 (package
8445 (name "java-jeromq")
8446 (version "0.4.3")
8447 (source (origin
8448 (method git-fetch)
8449 (uri (git-reference
8450 (url "https://github.com/zeromq/jeromq.git")
8451 (commit (string-append "v" version))))
8452 (file-name (string-append name "-" version "-checkout"))
8453 (sha256
8454 (base32
8455 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8456 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8457 (build-system ant-build-system)
8458 (arguments
8459 `(#:jar-name "java-jeromq.jar"
8460 #:source-dir "src/main/java"
8461 #:jdk ,icedtea-8
8462 #:test-exclude
8463 (list
8464 "**/Abstract*.java"
8465 ;; Requires network
8466 "**/ZBeaconTest.java"
8467 ;; Failures
8468 "**/DealerSpecTest.java"
8469 "**/CustomDecoderTest.java"
8470 "**/CustomEncoderTest.java"
8471 "**/ConnectRidTest.java"
8472 "**/ReqSpecTest.java"
8473 "**/PushPullSpecTest.java"
8474 "**/PubSubHwmTest.java"
8475 "**/RouterSpecTest.java"
8476 "**/ProxyTest.java")))
8477 (inputs
8478 `(("java-jnacl" ,java-jnacl)))
8479 (native-inputs
8480 `(("java-hamcrest-core" ,java-hamcrest-core)
8481 ("junit" ,java-junit)))
8482 (home-page "http://zeromq.org/bindings:java")
8483 (synopsis "Java binding for 0MQ")
8484 (description "Jeromq provides the java bindings for 0MQ.")
8485 (license license:mpl2.0)))
8486
8487 (define-public java-kafka-clients
8488 (package
8489 (name "java-kafka-clients")
8490 (version "1.0.0")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8494 version "-src.tgz"))
8495 (sha256
8496 (base32
8497 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8498 (build-system ant-build-system)
8499 (arguments
8500 `(#:jar-name "java-kafka-clients.jar"
8501 #:jdk ,icedtea-8
8502 #:source-dir "clients/src/main/java"
8503 #:test-dir "clients/src/test"
8504 #:test-exclude
8505 (list
8506 ;; This file does not contain a class
8507 "**/IntegrationTest.java"
8508 ;; Requires network
8509 "**/ClientUtilsTest.java"
8510 ;; End with errors that seem related to our powermock
8511 "**/KafkaProducerTest.java"
8512 "**/BufferPoolTest.java")))
8513 (inputs
8514 `(("java-slf4j-api" ,java-slf4j-api)
8515 ("java-lz4" ,java-lz4)))
8516 (native-inputs
8517 `(("junit" ,java-junit)
8518 ("hamcrest" ,java-hamcrest-all)
8519 ("objenesis" ,java-objenesis)
8520 ("asm" ,java-asm)
8521 ("cglib" ,java-cglib)
8522 ("javassist" ,java-jboss-javassist)
8523 ("snappy" ,java-snappy)
8524 ("easymock" ,java-easymock)
8525 ("powermock" ,java-powermock-core)
8526 ("powermock-easymock" ,java-powermock-api-easymock)
8527 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8528 ("powermock-junit4" ,java-powermock-modules-junit4)
8529 ("powermock-support" ,java-powermock-api-support)
8530 ("bouncycastle" ,java-bouncycastle-bcprov)
8531 ("bouncycastle-bcpkix" ,java-bouncycastle-bcpkix)))
8532 (home-page "https://kafka.apache.org")
8533 (synopsis "Distributed streaming platform")
8534 (description "Kafka is a distributed streaming platform, which means:
8535 @itemize
8536 @item it can publish and subscribe to streams of records;
8537 @item it can store streams of records in a fault-tolerant way;
8538 @item it can process streams of records as they occur.
8539 @end itemize")
8540 ;; Either cddl or gpl2 only.
8541 (license (list license:cddl1.1; actually cddl1.1
8542 license:gpl2)))); with classpath exception
8543
8544 (define-public java-jdom
8545 (package
8546 (name "java-jdom")
8547 (version "1.1.3")
8548 (source (origin
8549 (method url-fetch)
8550 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8551 version ".tar.gz"))
8552 (sha256
8553 (base32
8554 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8555 (build-system ant-build-system)
8556 (arguments
8557 `(#:build-target "package"
8558 #:tests? #f; tests are run as part of the build process
8559 #:phases
8560 (modify-phases %standard-phases
8561 (replace 'install
8562 (install-jars "build")))))
8563 (home-page "http://jdom.org/")
8564 (synopsis "Access, manipulate, and output XML data")
8565 (description "Java-based solution for accessing, manipulating, and
8566 outputting XML data from Java code.")
8567 (license license:bsd-4)))
8568
8569 (define-public java-geronimo-xbean-reflect
8570 (package
8571 (name "java-geronimo-xbean-reflect")
8572 (version "4.5")
8573 (source (origin
8574 (method svn-fetch)
8575 (uri (svn-reference
8576 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8577 (revision 1807396)))
8578 (file-name (string-append name "-" version))
8579 (sha256
8580 (base32
8581 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8582 (build-system ant-build-system)
8583 (arguments
8584 `(#:jar-name "geronimo-xbean-reflect.jar"
8585 #:source-dir "xbean-reflect/src/main/java"
8586 #:test-dir "xbean-reflect/src/test"
8587 #:jdk ,icedtea-8
8588 #:test-exclude
8589 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8590 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8591 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8592 #:phases
8593 (modify-phases %standard-phases
8594 (add-before 'build 'fix-source
8595 (lambda _
8596 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8597 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8598 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8599 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8600 #t))))))
8601 (inputs
8602 `(("asm" ,java-asm)
8603 ("log4j" ,java-log4j-api)
8604 ("log4j-1.2" ,java-log4j-1.2-api)
8605 ("log4j-core" ,java-log4j-core)
8606 ("logging" ,java-commons-logging-minimal)))
8607 (native-inputs
8608 `(("junit" ,java-junit)))
8609 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8610 (synopsis "Dependency injection helper")
8611 (description "Xbean-reflect provides very flexible ways to create objects
8612 and graphs of objects for dependency injection frameworks")
8613 (license license:asl2.0)))
8614
8615 (define-public java-geronimo-xbean-bundleutils
8616 (package
8617 (inherit java-geronimo-xbean-reflect)
8618 (name "java-geronimo-xbean-bundleutils")
8619 (arguments
8620 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8621 #:source-dir "xbean-bundleutils/src/main/java"
8622 #:test-dir "xbean-bundleutils/src/test"
8623 #:phases
8624 (modify-phases %standard-phases
8625 (add-before 'build 'fix-java
8626 (lambda _
8627 ;; We use a more recent version of osgi, so this file requires
8628 ;; more interface method implementations.
8629 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8630 (("import org.osgi.framework.ServiceRegistration;")
8631 "import org.osgi.framework.ServiceRegistration;
8632 import org.osgi.framework.ServiceFactory;
8633 import java.util.Collection;
8634 import org.osgi.framework.ServiceObjects;")
8635 (("public Bundle getBundle\\(\\)")
8636 "@Override
8637 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8638 throw new UnsupportedOperationException();
8639 }
8640 @Override
8641 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8642 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8643 throw new UnsupportedOperationException();
8644 }
8645 public Bundle getBundle()"))
8646 #t)))))
8647 (inputs
8648 `(("java-slf4j" ,java-slf4j-api)
8649 ("java-asm" ,java-asm)
8650 ("java-osgi-framework" ,java-osgi-framework)
8651 ("java-eclipse-osgi" ,java-eclipse-osgi)
8652 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8653
8654 (define-public java-geronimo-xbean-asm-util
8655 (package
8656 (inherit java-geronimo-xbean-reflect)
8657 (name "java-geronimo-xbean-asm-util")
8658 (arguments
8659 `(#:jar-name "geronimo-xbean-asm-util.jar"
8660 #:source-dir "xbean-asm-util/src/main/java"
8661 #:tests? #f)); no tests
8662 (inputs
8663 `(("java-asm" ,java-asm)))
8664 (native-inputs '())))
8665
8666 (define-public java-geronimo-xbean-finder
8667 (package
8668 (inherit java-geronimo-xbean-reflect)
8669 (name "java-geronimo-xbean-finder")
8670 (arguments
8671 `(#:jar-name "geronimo-xbean-finder.jar"
8672 #:source-dir "xbean-finder/src/main/java"
8673 #:test-dir "xbean-finder/src/test"))
8674 (inputs
8675 `(("java-slf4j-api" ,java-slf4j-api)
8676 ("java-asm" ,java-asm)
8677 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8678 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8679 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8680 ("java-osgi-framework" ,java-osgi-framework)))
8681 (native-inputs
8682 `(("java-junit" ,java-junit)
8683 ("java-hamcrest-core" ,java-hamcrest-core)))))
8684
8685 (define-public java-gson
8686 (package
8687 (name "java-gson")
8688 (version "2.8.2")
8689 (source (origin
8690 (method url-fetch)
8691 (uri (string-append "https://github.com/google/gson/archive/"
8692 "gson-parent-" version ".tar.gz"))
8693 (sha256
8694 (base32
8695 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8696 (build-system ant-build-system)
8697 (arguments
8698 `(#:jar-name "gson.jar"
8699 #:source-dir "gson/src/main/java"
8700 #:test-dir "gson/src/test"))
8701 (native-inputs
8702 `(("java-junit" ,java-junit)
8703 ("java-hamcrest-core" ,java-hamcrest-core)))
8704 (home-page "https://github.com/google/gson")
8705 (synopsis "Java serialization/deserialization library from/to JSON")
8706 (description "Gson is a Java library that can be used to convert Java
8707 Objects into their JSON representation. It can also be used to convert a JSON
8708 string to an equivalent Java object. Gson can work with arbitrary Java objects
8709 including pre-existing objects that you do not have source-code of.")
8710 (license license:asl2.0)))
8711
8712 (define-public java-hawtjni
8713 (package
8714 (name "java-hawtjni")
8715 (version "1.15")
8716 (source (origin
8717 (method url-fetch)
8718 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8719 "hawtjni-project-" version ".tar.gz"))
8720 (sha256
8721 (base32
8722 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8723 (build-system ant-build-system)
8724 (arguments
8725 `(#:jar-name "hawtjni.jar"
8726 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8727 #:tests? #f; no tests
8728 #:phases
8729 (modify-phases %standard-phases
8730 (add-before 'build 'build-native
8731 (lambda* (#:key inputs #:allow-other-keys)
8732 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8733 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8734 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8735 "-fPIC" "-O2" include)
8736 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8737 "-fPIC" "-O2" include)
8738 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8739 "hawtjni.o" "hawtjni-callback.o")))
8740 #t))
8741 (add-after 'install 'install-native
8742 (lambda* (#:key outputs #:allow-other-keys)
8743 (let* ((out (assoc-ref outputs "out"))
8744 (lib (string-append out "/lib"))
8745 (inc (string-append out "/include")))
8746 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8747 (install-file "libhawtjni.so" lib)
8748 (install-file "hawtjni.h" inc)))
8749 #t)))))
8750 (inputs
8751 `(("java-commons-cli" ,java-commons-cli)
8752 ("java-asm" ,java-asm)
8753 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
8754 (home-page "https://fusesource.github.io/hawtjni/")
8755 (synopsis "JNI code generator")
8756 (description "HawtJNI is a code generator that produces the JNI code needed
8757 to implement Java native methods. It is based on the jnigen code generator
8758 that is part of the SWT Tools project.")
8759 (license license:asl2.0)))
8760
8761 (define-public java-jansi-native
8762 (package
8763 (name "java-jansi-native")
8764 (version "1.7")
8765 (source (origin
8766 (method url-fetch)
8767 (uri (string-append "https://github.com/fusesource/jansi-native/"
8768 "archive/jansi-native-" version ".tar.gz"))
8769 (sha256
8770 (base32
8771 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
8772 (build-system ant-build-system)
8773 (arguments
8774 `(#:jar-name "jansi-native.jar"
8775 #:source-dir "src/main/java"
8776 #:tests? #f; no tests
8777 #:phases
8778 (modify-phases %standard-phases
8779 (add-before 'build 'build-native
8780 (lambda* (#:key inputs #:allow-other-keys)
8781 ;; there are more required files for windows in windows/
8782 (with-directory-excursion "src/main/native-package/src"
8783 (substitute* "jansi_ttyname.c"
8784 (("#include \"jansi_.*") ""))
8785 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
8786 (string-append "-I" (assoc-ref inputs "java-hawtjni")
8787 "/include")
8788 (string-append "-I" (assoc-ref inputs "jdk")
8789 "/include/linux")
8790 "-fPIC" "-O2")
8791 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
8792 #t)))
8793 (add-before 'build 'install-native
8794 (lambda _
8795 (let ((dir (string-append "build/classes/META-INF/native/"
8796 ,(match (%current-system)
8797 ((or "i686-linux" "armhf-linux")
8798 "linux32")
8799 ((or "x86_64-linux" "aarch64-linux")
8800 "linux64")))))
8801 (install-file "src/main/native-package/src/libjansi.so" dir))
8802 #t))
8803 (add-after 'install 'install-native
8804 (lambda* (#:key outputs #:allow-other-keys)
8805 (install-file "src/main/native-package/src/jansi.h"
8806 (string-append (assoc-ref outputs "out") "/include"))
8807 #t)))))
8808 (inputs
8809 `(("java-hawtjni" ,java-hawtjni)))
8810 (home-page "https://fusesource.github.io/jansi/")
8811 (synopsis "Native library for jansi")
8812 (description "This package provides the native library for jansi, a small
8813 Java library that allows you to use ANSI escape sequences to format your
8814 console output.")
8815 (license license:asl2.0)))
8816
8817 (define-public java-jansi
8818 (package
8819 (name "java-jansi")
8820 (version "1.16")
8821 (source (origin
8822 (method url-fetch)
8823 (uri (string-append "https://github.com/fusesource/jansi/archive/"
8824 "jansi-project-" version ".tar.gz"))
8825 (sha256
8826 (base32
8827 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
8828 (build-system ant-build-system)
8829 (arguments
8830 `(#:jar-name "jansi.jar"
8831 #:source-dir "jansi/src/main/java"
8832 #:test-dir "jansi/src/test"
8833 #:phases
8834 (modify-phases %standard-phases
8835 (add-after 'check 'clear-term
8836 (lambda _
8837 (zero? (system* "echo" "-e" "\\e[0m")))))))
8838 (inputs
8839 `(("java-jansi-native" ,java-jansi-native)))
8840 (native-inputs
8841 `(("java-junit" ,java-junit)
8842 ("java-hamcrest-core" ,java-hamcrest-core)))
8843 (home-page "https://fusesource.github.io/jansi/")
8844 (synopsis "Portable ANSI escape sequences")
8845 (description "Jansi is a Java library that allows you to use ANSI escape
8846 sequences to format your console output which works on every platform.")
8847 (license license:asl2.0)))
8848
8849 (define-public java-jboss-el-api-spec
8850 (package
8851 (name "java-jboss-el-api-spec")
8852 (version "3.0")
8853 (source (origin
8854 (method url-fetch)
8855 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
8856 "archive/jboss-el-api_" version
8857 "_spec-1.0.7.Final.tar.gz"))
8858 (sha256
8859 (base32
8860 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
8861 (build-system ant-build-system)
8862 (arguments
8863 `(#:jar-name "java-jboss-el-api_spec.jar"
8864 #:jdk ,icedtea-8))
8865 (inputs
8866 `(("java-junit" ,java-junit)))
8867 (home-page "https://github.com/jboss/jboss-el-api_spec")
8868 (synopsis "JSR-341 expression language 3.0 API")
8869 (description "This package contains an implementation of the JSR-341
8870 specification for the expression language 3.0. It implements an expression
8871 language inspired by ECMAScript and XPath. This language is used with
8872 JavaServer Pages (JSP).")
8873 ;; Either GPL2 only or CDDL.
8874 (license (list license:gpl2 license:cddl1.1))))
8875
8876 (define-public java-jboss-interceptors-api-spec
8877 (package
8878 (name "java-jboss-interceptors-api-spec")
8879 (version "1.2")
8880 (source (origin
8881 (method url-fetch)
8882 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
8883 "archive/jboss-interceptors-api_" version
8884 "_spec-1.0.0.Final.tar.gz"))
8885 (sha256
8886 (base32
8887 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
8888 (build-system ant-build-system)
8889 (arguments
8890 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
8891 #:jdk ,icedtea-8
8892 #:source-dir "."
8893 #:tests? #f)); no tests
8894 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
8895 (synopsis "Interceptors 1.2 API classes from JSR 318")
8896 (description "Java-jboss-interceptors-api-spec implements the Interceptors
8897 API. Interceptors are used to interpose on business method invocations and
8898 specific events.")
8899 ;; Either GPL2 only or CDDL.
8900 (license (list license:gpl2 license:cddl1.1))))
8901
8902 (define-public java-cdi-api
8903 (package
8904 (name "java-cdi-api")
8905 (version "2.0")
8906 (source (origin
8907 (method url-fetch)
8908 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
8909 version ".tar.gz"))
8910 (file-name (string-append name "-" version ".tar.gz"))
8911 (sha256
8912 (base32
8913 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
8914 (build-system ant-build-system)
8915 (arguments
8916 `(#:source-dir "api/src/main/java"
8917 #:jar-name "java-cdi-api.jar"
8918 #:test-dir "api/src/test"
8919 #:jdk ,icedtea-8
8920 #:tests? #f)); Tests fail because we don't have a CDI provider yet
8921 (inputs
8922 `(("java-javax-inject" ,java-javax-inject)
8923 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
8924 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
8925 (native-inputs
8926 `(("java-testng" ,java-testng)
8927 ("java-hamcrest-core" ,java-hamcrest-core)))
8928 (home-page "http://cdi-spec.org/")
8929 (synopsis "Contexts and Dependency Injection APIs")
8930 (description "Java-cdi-api contains the required APIs for Contexts and
8931 Dependency Injection (CDI).")
8932 (license license:asl2.0)))
8933
8934 (define-public java-joda-convert
8935 (package
8936 (name "java-joda-convert")
8937 (version "1.9.2")
8938 (source (origin
8939 (method url-fetch)
8940 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
8941 version ".tar.gz"))
8942 (file-name (string-append name "-" version ".tar.gz"))
8943 (sha256
8944 (base32
8945 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
8946 (build-system ant-build-system)
8947 (arguments
8948 `(#:jar-name (string-append ,name "-" ,version ".jar")
8949 #:source-dir "src/main/java"
8950 #:test-include (list "**/Test*.java")
8951 ;; Contains only interfaces and base classes (no test)
8952 #:test-exclude (list "**/test*/**.java")))
8953 (inputs
8954 `(("java-guava" ,java-guava)))
8955 (native-inputs
8956 `(("java-junit" ,java-junit)
8957 ("java-hamcrest-core" ,java-hamcrest-core)))
8958 (home-page "http://www.joda.org/joda-convert/")
8959 (synopsis "Conversion between Objects and Strings")
8960 (description "Joda-Convert provides a small set of classes to aid
8961 conversion between Objects and Strings. It is not intended to tackle the
8962 wider problem of Object to Object transformation.")
8963 (license license:asl2.0)))
8964
8965 (define-public java-joda-time
8966 (package
8967 (name "java-joda-time")
8968 (version "2.9.9")
8969 (source (origin
8970 (method url-fetch)
8971 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
8972 version ".tar.gz"))
8973 (file-name (string-append name "-" version ".tar.gz"))
8974 (sha256
8975 (base32
8976 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
8977 (build-system ant-build-system)
8978 (arguments
8979 `(#:jar-name "java-joda-time.jar"
8980 #:source-dir "src/main/java"
8981 #:test-include (list "**/Test*.java")
8982 ;; There is no runnable test in these files
8983 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
8984 #:phases
8985 (modify-phases %standard-phases
8986 (add-after 'build 'build-resources
8987 (lambda _
8988 (mkdir-p "build/classes/org/joda/time/tz/data")
8989 (mkdir-p "build/classes/org/joda/time/format")
8990 ;; This will produce the following exception:
8991 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
8992 ;; which is normal, because it doesn't exist yet. It still generates
8993 ;; the same file as in the binary one can find on maven.
8994 (invoke "java" "-cp"
8995 (string-append "build/classes:" (getenv "CLASSPATH"))
8996 "org.joda.time.tz.ZoneInfoCompiler"
8997 "-src" "src/main/java/org/joda/time/tz/src"
8998 "-dst" "build/classes/org/joda/time/tz/data"
8999 "africa" "antarctica" "asia" "australasia"
9000 "europe" "northamerica" "southamerica"
9001 "pacificnew" "etcetera" "backward" "systemv")
9002 (for-each (lambda (f)
9003 (copy-file f (string-append
9004 "build/classes/org/joda/time/format/"
9005 (basename f))))
9006 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9007 #t))
9008 (add-before 'install 'regenerate-jar
9009 (lambda _
9010 ;; We need to regenerate the jar file to add generated data.
9011 (delete-file "build/jar/java-joda-time.jar")
9012 (invoke "ant" "jar")))
9013 (add-before 'check 'copy-test-resources
9014 (lambda _
9015 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9016 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9017 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9018 (copy-recursively "src/test/resources" "build/test-classes")
9019 #t)))))
9020 (inputs
9021 `(("java-joda-convert" ,java-joda-convert)))
9022 (native-inputs
9023 `(("java-junit" ,java-junit)
9024 ("java-hamcrest-core" ,java-hamcrest-core)
9025 ("tzdata" ,tzdata)))
9026 (home-page "http://www.joda.org/joda-time/")
9027 (synopsis "Replacement for the Java date and time classes")
9028 (description "Joda-Time is a replacement for the Java date and time
9029 classes prior to Java SE 8.")
9030 (license license:asl2.0)))
9031
9032 (define-public java-xerces
9033 (package
9034 (name "java-xerces")
9035 (version "2.11.0")
9036 (source
9037 (origin
9038 (method url-fetch)
9039 (uri (string-append "mirror://apache/xerces/j/source/"
9040 "Xerces-J-src." version ".tar.gz"))
9041 (sha256
9042 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9043 (patches (search-patches
9044 "java-xerces-xjavac_taskdef.patch"
9045 "java-xerces-build_dont_unzip.patch"
9046 "java-xerces-bootclasspath.patch"))))
9047 (build-system ant-build-system)
9048 (arguments
9049 `(#:tests? #f;; Test files are not present
9050 #:test-target "test"
9051 #:jdk ,icedtea-8
9052 #:phases
9053 (modify-phases %standard-phases
9054 (add-after 'unpack 'create-build.properties
9055 (lambda* (#:key inputs #:allow-other-keys)
9056 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9057 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9058 (with-output-to-file "build.properties"
9059 (lambda _
9060 (format #t
9061 "jar.jaxp = ~a/share/java/jaxp.jar~@
9062 jar.apis-ext = ~a/share/java/jaxp.jar~@
9063 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9064 jaxp jaxp resolver)))
9065 ;; Make xerces use our version of jaxp in tests
9066 (substitute* "build.xml"
9067 (("xml-apis.jar")
9068 (string-append jaxp "/share/java/jaxp.jar"))
9069 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9070 "${jar.apis}")))
9071 #t))
9072 (replace 'install (install-jars "build")))))
9073 (inputs
9074 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9075 ("java-jaxp" ,java-jaxp)))
9076 (home-page "https://xerces.apache.org/xerces2-j/")
9077 (synopsis "Validating XML parser for Java with DOM level 3 support")
9078 (description "The Xerces2 Java parser is the reference implementation of
9079 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9080 processor.
9081
9082 Xerces2-J supports the following standards and APIs:
9083
9084 @itemize
9085 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9086 @item Namespaces in XML Recommendation
9087 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9088 Range Recommendations
9089 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9090 @item Java APIs for XML Processing (JAXP) 1.2.01
9091 @item XML Schema 1.0 Structures and Datatypes Recommendations
9092 @item Experimental implementation of the Document Object Model (DOM) Level 3
9093 Core and Load/Save Working Drafts
9094 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9095 Candidate Recommendation
9096 @end itemize
9097
9098 Xerces is now able to parse documents written according to the XML 1.1
9099 Candidate Recommendation, except that it does not yet provide an option to
9100 enable normalization checking as described in section 2.13 of this
9101 specification. It also handles namespaces according to the XML Namespaces 1.1
9102 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9103 the DOM level 3 load/save API's are in use.")
9104 (license license:asl2.0)))
9105
9106 (define-public java-jline
9107 (package
9108 (name "java-jline")
9109 (version "1.0")
9110 (source (origin
9111 (method url-fetch)
9112 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9113 version ".tar.gz"))
9114 (sha256
9115 (base32
9116 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9117 (build-system ant-build-system)
9118 (arguments
9119 `(#:jar-name "jline.jar"
9120 #:source-dir "src/main/java"
9121 #:test-dir "src/test"
9122 #:phases
9123 (modify-phases %standard-phases
9124 (add-before 'build 'copy-resources
9125 (lambda _
9126 (copy-recursively "src/main/resources" "build/classes")
9127 #t)))))
9128 (native-inputs
9129 `(("java-junit" ,java-junit)))
9130 (home-page "https://jline.github.io")
9131 (synopsis "Console input handling library")
9132 (description "JLine is a Java library for handling console input. It is
9133 similar in functionality to BSD editline and GNU readline but with additional
9134 features that bring it on par with the Z shell line editor.")
9135 (license license:bsd-3)))
9136
9137 (define-public java-xmlunit
9138 (package
9139 (name "java-xmlunit")
9140 (version "2.5.1")
9141 (source (origin
9142 (method url-fetch)
9143 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9144 version ".tar.gz"))
9145 (file-name (string-append name "-" version ".tar.gz"))
9146 (sha256
9147 (base32
9148 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9149 (build-system ant-build-system)
9150 (arguments
9151 `(#:jar-name "java-xmlunit.jar"
9152 #:source-dir "xmlunit-core/src/main/java"
9153 #:test-dir "xmlunit-core/src/test"
9154 #:phases
9155 (modify-phases %standard-phases
9156 (add-before 'check 'copy-test-resources
9157 (lambda* (#:key inputs #:allow-other-keys)
9158 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9159 #t)))))
9160 (native-inputs
9161 `(("java-junit" ,java-junit)
9162 ("java-mockito-1" ,java-mockito-1)
9163 ("java-hamcrest-all" ,java-hamcrest-all)
9164 ("java-objenesis" ,java-objenesis)
9165 ("java-asm" ,java-asm)
9166 ("java-cglib" ,java-cglib)
9167 ("resources"
9168 ,(origin
9169 (method git-fetch)
9170 (uri (git-reference
9171 (url "https://github.com/xmlunit/test-resources.git")
9172 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9173 (file-name "java-xmlunit-test-resources")
9174 (sha256
9175 (base32
9176 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9177 (home-page "http://www.xmlunit.org/")
9178 (synopsis "XML output testing")
9179 (description "XMLUnit provides you with the tools to verify the XML you
9180 emit is the one you want to create. It provides helpers to validate against
9181 an XML Schema, assert the values of XPath queries or compare XML documents
9182 against expected outcomes.")
9183 (license license:asl2.0)))
9184
9185 (define-public java-xmlunit-legacy
9186 (package
9187 (inherit java-xmlunit)
9188 (name "java-xmlunit-legacy")
9189 (arguments
9190 `(#:jar-name "java-xmlunit-legacy.jar"
9191 #:source-dir "xmlunit-legacy/src/main/java"
9192 #:test-dir "xmlunit-legacy/src/test"))
9193 (inputs
9194 `(("java-xmlunit" ,java-xmlunit)
9195 ("java-junit" ,java-junit)))
9196 (native-inputs
9197 `(("java-mockito-1" ,java-mockito-1)))))
9198
9199 (define-public java-openchart2
9200 (package
9201 (name "java-openchart2")
9202 (version "1.4.3")
9203 (source (origin
9204 (method url-fetch)
9205 (uri (string-append "http://download.approximatrix.com/openchart2/"
9206 "openchart2-" version ".source.zip"))
9207 (sha256
9208 (base32
9209 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9210 (build-system ant-build-system)
9211 (arguments
9212 `(#:test-target "test"
9213 #:phases
9214 (modify-phases %standard-phases
9215 (add-after 'unpack 'fix-junit-errors
9216 (lambda _
9217 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9218 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9219 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9220 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9221 "model/DefaultChartDataModelConstraintsTest.java"
9222 "model/MultiScatterDataModelConstraintsTest.java"
9223 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9224 (("(assertEquals[^;]+);" before _)
9225 (string-append (string-drop-right before 2) ", 1E-6);"))))
9226 #t))
9227 (replace 'install (install-jars ".")))))
9228 (native-inputs
9229 `(("unzip" ,unzip)
9230 ("java-junit" ,java-junit)
9231 ("java-hamcrest-core" ,java-hamcrest-core)))
9232 (home-page "http://approximatrix.com/products/openchart2/")
9233 (synopsis "Simple plotting for Java")
9234 (description "Openchart2 provides a simple, yet powerful, interface for
9235 Java programmers to create two-dimensional charts and plots. The library
9236 features an assortment of graph styles, including advanced scatter plots, bar
9237 graphs, and pie charts.")
9238 (license license:lgpl2.1+)))