Merge branch 'master' into staging
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 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, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018 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, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix hg-download)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages certs)
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages java-compression)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages linux) ;alsa
66 #:use-module (gnu packages maths)
67 #:use-module (gnu packages nss)
68 #:use-module (gnu packages onc-rpc)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages popt)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (gnu packages texinfo)
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
81
82 \f
83 ;;;
84 ;;; Java bootstrap toolchain.
85 ;;;
86
87 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
88 ;; use it to build a simple version of GNU Classpath, the Java standard
89 ;; library. We chose version 0.93 because it is the last version that can be
90 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
91 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92 ;; the last version of JamVM that works with a version of GNU classpath that
93 ;; does not require ECJ. These three packages make up the bootstrap JDK.
94
95 ;; This is sufficient to build an older version of Ant, which is needed to
96 ;; build an older version of ECJ, an incremental Java compiler, both of which
97 ;; are written in Java.
98 ;;
99 ;; ECJ is needed to build the latest release (0.99) and the development
100 ;; version of GNU Classpath. The development version of GNU Classpath has
101 ;; much more support for Java 1.6 than the latest release, but we need to
102 ;; build 0.99 first to get a working version of javah. ECJ, the development
103 ;; version of GNU Classpath, and the latest version of JamVM make up the
104 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
106 ;; Icedtea 3.x.
107
108 (define jikes
109 (package
110 (name "jikes")
111 (version "1.22")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
116 (sha256
117 (base32
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123 defined in The Java Language Specification into the bytecoded instruction set
124 and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
126
127 ;; This is the last version of GNU Classpath that can be built without ECJ.
128 (define classpath-bootstrap
129 (package
130 (name "classpath")
131 (version "0.93")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/classpath/classpath-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:configure-flags
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
145 "/bin/jikes")
146 "--disable-Werror"
147 "--disable-gmp"
148 "--disable-gtk-peer"
149 "--disable-gconf-peer"
150 "--disable-plugin"
151 "--disable-dssi"
152 "--disable-alsa"
153 "--disable-gjdoc")
154 #:phases
155 (modify-phases %standard-phases
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
162 (lambda _
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
166 #t))
167 (add-after 'install 'install-data
168 (lambda _ (invoke "make" "install-data"))))))
169 (native-inputs
170 `(("jikes" ,jikes)
171 ("fastjar" ,fastjar)
172 ("libltdl" ,libltdl)
173 ("pkg-config" ,pkg-config)))
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177 for use with runtimes, compilers and tools for the Java programming
178 language.")
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
181
182 ;; This is the last version of JamVM that works with a version of GNU
183 ;; classpath that does not require ECJ.
184 (define jamvm-1-bootstrap
185 (package
186 (name "jamvm")
187 (version "1.5.1")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
192 version ".tar.gz"))
193 (patches (search-patches "jamvm-arm.patch"))
194 (sha256
195 (base32
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
197 (build-system gnu-build-system)
198 (arguments
199 `(#:configure-flags
200 (list (string-append "--with-classpath-install-dir="
201 (assoc-ref %build-inputs "classpath"))
202 "--disable-int-caching"
203 "--enable-runtime-reloc-checks"
204 "--enable-ffi")))
205 (inputs
206 `(("classpath" ,classpath-bootstrap)
207 ("jikes" ,jikes)
208 ("libffi" ,libffi)
209 ("zlib" ,zlib)))
210 ;; When built with a recent GCC and glibc the configure step of icedtea-6
211 ;; fails with an invalid instruction error.
212 (native-inputs
213 `(("gcc" ,gcc-5)
214 ("libc" ,glibc-2.28)))
215 (home-page "http://jamvm.sourceforge.net/")
216 (synopsis "Small Java Virtual Machine")
217 (description "JamVM is a Java Virtual Machine conforming to the JVM
218 specification edition 2 (blue book). It is extremely small. However, unlike
219 other small VMs it supports the full spec, including object finalisation and
220 JNI.")
221 (license license:gpl2+)))
222
223 (define ant-bootstrap
224 (package
225 (name "ant-bootstrap")
226 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
227 ;; are not supported. The 1.8.x series is the last to use only features
228 ;; supported by Jikes.
229 (version "1.8.4")
230 (source (origin
231 (method url-fetch)
232 (uri (string-append "http://archive.apache.org/dist/"
233 "ant/source/apache-ant-"
234 version "-src.tar.bz2"))
235 (sha256
236 (base32
237 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
238 (build-system gnu-build-system)
239 (arguments
240 `(#:imported-modules ((guix build syscalls)
241 ,@%gnu-build-system-modules)
242 #:modules ((srfi srfi-1)
243 (guix build gnu-build-system)
244 (guix build utils)
245 (guix build syscalls))
246 #:tests? #f ; no "check" target
247 #:phases
248 (modify-phases %standard-phases
249 (delete 'bootstrap)
250 (delete 'configure)
251 (replace 'build
252 (lambda* (#:key inputs #:allow-other-keys)
253 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
254 (setenv "JAVACMD"
255 (string-append (assoc-ref inputs "jamvm")
256 "/bin/jamvm"))
257 (setenv "JAVAC"
258 (string-append (assoc-ref inputs "jikes")
259 "/bin/jikes"))
260 (setenv "CLASSPATH"
261 (string-append (assoc-ref inputs "jamvm")
262 "/lib/rt.jar"))
263
264 ;; Ant complains if this file doesn't exist.
265 (setenv "HOME" "/tmp")
266 (with-output-to-file "/tmp/.ant.properties"
267 (lambda _ (display "")))
268
269 ;; Use jikes instead of javac for <javac ...> tags in build.xml
270 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
271
272 ;; jikes produces lots of warnings, but they are not very
273 ;; interesting, so we silence them.
274 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
275
276 ;; Without these JamVM options the build may freeze.
277 (substitute* "bootstrap.sh"
278 (("^\"\\$\\{JAVACMD\\}\" " m)
279 ,@(if (string-prefix? "armhf" (or (%current-system)
280 (%current-target-system)))
281 `((string-append m "-Xnocompact "))
282 `((string-append m "-Xnocompact -Xnoinlining ")))))
283
284 ;; Disable tests because we are bootstrapping and thus don't have
285 ;; any of the dependencies required to build and run the tests.
286 (substitute* "build.xml"
287 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
288 (invoke "bash" "bootstrap.sh"
289 (string-append "-Ddist.dir="
290 (assoc-ref %outputs "out")))))
291 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
292 (lambda* (#:key outputs #:allow-other-keys)
293 (define (repack-archive jar)
294 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
295 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
296 (with-directory-excursion dir
297 (invoke "unzip" jar))
298 (delete-file jar)
299 ;; XXX: copied from (gnu build install)
300 (for-each (lambda (file)
301 (let ((s (lstat file)))
302 (unless (eq? (stat:type s) 'symlink)
303 (utime file 0 0 0 0))))
304 (find-files dir #:directories? #t))
305 ;; It is important that the manifest appears first.
306 (with-directory-excursion dir
307 (let* ((files (find-files "." ".*" #:directories? #t))
308 ;; To ensure that the reference scanner can
309 ;; detect all store references in the jars
310 ;; we disable compression with the "-0" option.
311 (command (if (file-exists? manifest)
312 `("zip" "-0" "-X" ,jar ,manifest
313 ,@files)
314 `("zip" "-0" "-X" ,jar ,@files))))
315 (apply invoke command)))))
316 (for-each repack-archive
317 (find-files
318 (string-append (assoc-ref %outputs "out") "/lib")
319 "\\.jar$"))
320 #t))
321 (delete 'install))))
322 (native-inputs
323 `(("jikes" ,jikes)
324 ("jamvm" ,jamvm-1-bootstrap)
325 ("unzip" ,unzip)
326 ("zip" ,zip)))
327 (home-page "http://ant.apache.org")
328 (synopsis "Build tool for Java")
329 (description
330 "Ant is a platform-independent build tool for Java. It is similar to
331 make but is implemented using the Java language, requires the Java platform,
332 and is best suited to building Java projects. Ant uses XML to describe the
333 build process and its dependencies, whereas Make uses Makefile format.")
334 (license license:asl2.0)))
335
336 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
337 ;; compiler for Java 1.5.
338 (define ecj-bootstrap
339 (package
340 (name "ecj-bootstrap")
341 (version "3.2.2")
342 (source (origin
343 (method url-fetch)
344 (uri (string-append "http://archive.eclipse.org/eclipse/"
345 "downloads/drops/R-" version
346 "-200702121330/ecjsrc.zip"))
347 (sha256
348 (base32
349 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
350 ;; It would be so much easier if we could use the ant-build-system, but we
351 ;; cannot as we don't have ant at this point. We use ecj for
352 ;; bootstrapping the JDK.
353 (build-system gnu-build-system)
354 (arguments
355 `(#:modules ((guix build gnu-build-system)
356 (guix build utils)
357 (srfi srfi-1))
358 #:tests? #f ; there are no tests
359 #:phases
360 (modify-phases %standard-phases
361 (replace 'configure
362 (lambda* (#:key inputs #:allow-other-keys)
363 (setenv "CLASSPATH"
364 (string-join
365 (cons (string-append (assoc-ref inputs "jamvm")
366 "/lib/rt.jar")
367 (find-files (string-append
368 (assoc-ref inputs "ant-bootstrap")
369 "/lib")
370 "\\.jar$"))
371 ":"))
372 #t))
373 (replace 'build
374 (lambda* (#:key inputs #:allow-other-keys)
375 ;; The unpack phase enters the "org" directory by mistake.
376 (chdir "..")
377
378 ;; Create a simple manifest to make ecj executable.
379 (with-output-to-file "manifest"
380 (lambda _
381 (display "Manifest-Version: 1.0
382 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
383
384 ;; Compile it all!
385 (and (apply invoke "jikes"
386 (find-files "." "\\.java$"))
387 (invoke "fastjar" "cvfm"
388 "ecj-bootstrap.jar" "manifest" "."))))
389 (replace 'install
390 (lambda* (#:key outputs #:allow-other-keys)
391 (let ((share (string-append (assoc-ref outputs "out")
392 "/share/java/")))
393 (mkdir-p share)
394 (install-file "ecj-bootstrap.jar" share)
395 #t))))))
396 (native-inputs
397 `(("ant-bootstrap" ,ant-bootstrap)
398 ("unzip" ,unzip)
399 ("jikes" ,jikes)
400 ("jamvm" ,jamvm-1-bootstrap)
401 ("fastjar" ,fastjar)))
402 (home-page "https://eclipse.org")
403 (synopsis "Eclipse Java development tools core batch compiler")
404 (description "This package provides the Eclipse Java core batch compiler
405 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
406 requirement for all GNU Classpath releases after version 0.93.")
407 (license license:epl1.0)))
408
409 (define ecj-javac-wrapper
410 (package (inherit ecj-bootstrap)
411 (name "ecj-javac-wrapper")
412 (source #f)
413 (build-system trivial-build-system)
414 (arguments
415 `(#:modules ((guix build utils))
416 #:builder
417 (begin
418 (use-modules (guix build utils))
419 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
420 (target (string-append bin "/javac"))
421 (guile (string-append (assoc-ref %build-inputs "guile")
422 "/bin/guile"))
423 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
424 "/share/java/ecj-bootstrap.jar"))
425 (java (string-append (assoc-ref %build-inputs "jamvm")
426 "/bin/jamvm"))
427 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
428 "/share/classpath")))
429 (string-append jvmlib "/glibj.zip:"
430 jvmlib "/tools.zip"))))
431 (mkdir-p bin)
432 (with-output-to-file target
433 (lambda _
434 (format #t "#!~a --no-auto-compile\n!#\n" guile)
435 (write
436 `(begin (use-modules (ice-9 match)
437 (ice-9 receive)
438 (ice-9 hash-table)
439 (srfi srfi-1)
440 (srfi srfi-26))
441 (define defaults
442 '(("-bootclasspath" ,bootcp)
443 ("-source" "1.5")
444 ("-target" "1.5")
445 ("-cp" ".")))
446 (define (main args)
447 (let ((classpath (getenv "CLASSPATH")))
448 (setenv "CLASSPATH"
449 (string-join (list ,ecj
450 ,(string-append (assoc-ref %build-inputs "jamvm")
451 "/lib/rt.jar")
452 (or classpath ""))
453 ":")))
454 (receive (vm-args other-args)
455 ;; Separate VM arguments from arguments to ECJ.
456 (partition (cut string-prefix? "-J" <>)
457 (fold (lambda (default acc)
458 (if (member (first default) acc)
459 acc (append default acc)))
460 args defaults))
461 (apply system* ,java
462 (append
463 ;; Remove "-J" prefix
464 (map (cut string-drop <> 2) vm-args)
465 '("org.eclipse.jdt.internal.compiler.batch.Main")
466 (cons "-nowarn" other-args)))))
467 ;; Entry point
468 (let ((args (cdr (command-line))))
469 (if (null? args)
470 (format (current-error-port) "javac: no arguments given!\n")
471 (main args)))))))
472 (chmod target #o755)
473 #t))))
474 (native-inputs
475 `(("guile" ,guile-2.2)
476 ("ecj-bootstrap" ,ecj-bootstrap)
477 ("jamvm" ,jamvm-1-bootstrap)
478 ("classpath" ,classpath-bootstrap)))
479 (description "This package provides a wrapper around the @dfn{Eclipse
480 compiler for Java} (ecj) with a command line interface that is compatible with
481 the standard javac executable.")))
482
483 ;; The classpath-bootstrap was built without a virtual machine, so it does not
484 ;; provide a wrapper for javah. We cannot build the development version of
485 ;; Classpath without javah.
486 (define classpath-0.99
487 (package (inherit classpath-bootstrap)
488 (version "0.99")
489 (source (origin
490 (method url-fetch)
491 (uri (string-append "mirror://gnu/classpath/classpath-"
492 version ".tar.gz"))
493 (sha256
494 (base32
495 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
496 (patches (search-patches "classpath-aarch64-support.patch"))))
497 (arguments
498 `(#:configure-flags
499 (list (string-append "--with-ecj-jar="
500 (assoc-ref %build-inputs "ecj-bootstrap")
501 "/share/java/ecj-bootstrap.jar")
502 (string-append "JAVAC="
503 (assoc-ref %build-inputs "ecj-javac-wrapper")
504 "/bin/javac")
505 (string-append "JAVA="
506 (assoc-ref %build-inputs "jamvm")
507 "/bin/jamvm")
508 "GCJ_JAVAC_TRUE=no"
509 "ac_cv_prog_java_works=yes" ; trust me
510 "--disable-Werror"
511 "--disable-gmp"
512 "--disable-gtk-peer"
513 "--disable-gconf-peer"
514 "--disable-plugin"
515 "--disable-dssi"
516 "--disable-alsa"
517 "--disable-gjdoc")
518 #:phases
519 (modify-phases %standard-phases
520 (add-after 'install 'install-data
521 (lambda _ (invoke "make" "install-data"))))))
522 (native-inputs
523 `(("ecj-bootstrap" ,ecj-bootstrap)
524 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
525 ("fastjar" ,fastjar)
526 ("jamvm" ,jamvm-1-bootstrap)
527 ("classpath" ,classpath-bootstrap)
528 ("libltdl" ,libltdl)
529 ("pkg-config" ,pkg-config)))))
530
531 ;; We need this because classpath-bootstrap does not provide all of the tools
532 ;; we need to build classpath-devel.
533 (define classpath-jamvm-wrappers
534 (package (inherit classpath-0.99)
535 (name "classpath-jamvm-wrappers")
536 (source #f)
537 (build-system trivial-build-system)
538 (arguments
539 `(#:modules ((guix build utils))
540 #:builder
541 (begin
542 (use-modules (guix build utils))
543 (let* ((bash (assoc-ref %build-inputs "bash"))
544 (jamvm (assoc-ref %build-inputs "jamvm"))
545 (classpath (assoc-ref %build-inputs "classpath"))
546 (bin (string-append (assoc-ref %outputs "out")
547 "/bin/")))
548 (mkdir-p bin)
549 (for-each (lambda (tool)
550 (with-output-to-file (string-append bin tool)
551 (lambda _
552 ,@(if (string-prefix? "armhf" (or (%current-system)
553 (%current-target-system)))
554 `((format #t "#!~a/bin/sh
555 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
556 gnu.classpath.tools.~a.~a $@"
557 bash jamvm classpath tool
558 (if (string=? "native2ascii" tool)
559 "Native2ASCII" "Main")))
560 `((format #t "#!~a/bin/sh
561 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
562 gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main"))))))
566 (chmod (string-append bin tool) #o755))
567 (list "javah"
568 "rmic"
569 "rmid"
570 "orbd"
571 "rmiregistry"
572 "native2ascii"))
573 #t))))
574 (native-inputs
575 `(("bash" ,bash)
576 ("jamvm" ,jamvm-1-bootstrap)
577 ("classpath" ,classpath-0.99)))
578 (inputs '())
579 (synopsis "Executables from GNU Classpath")
580 (description "This package provides wrappers around the tools provided by
581 the GNU Classpath library. They are executed by the JamVM virtual
582 machine.")))
583
584 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
585 ;; then Classpath has gained much more support for Java 1.6.
586 (define-public classpath-devel
587 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
588 (revision "1"))
589 (package (inherit classpath-bootstrap)
590 (version (string-append "0.99-" revision "." (string-take commit 9)))
591 (source (origin
592 (method git-fetch)
593 (uri (git-reference
594 (url "https://git.savannah.gnu.org/git/classpath.git")
595 (commit commit)))
596 (file-name (string-append "classpath-" version "-checkout"))
597 (sha256
598 (base32
599 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
600 (arguments
601 `(#:make-flags
602 ;; Ensure that the initial heap size is smaller than the maximum
603 ;; size. By default only Xmx is set, which can lead to invalid
604 ;; memory settings on some machines with a lot of memory.
605 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
606 #:configure-flags
607 (list (string-append "--with-ecj-jar="
608 (assoc-ref %build-inputs "ecj-bootstrap")
609 "/share/java/ecj-bootstrap.jar")
610 (string-append "--with-javac="
611 (assoc-ref %build-inputs "ecj-javac-wrapper")
612 "/bin/javac")
613 (string-append "JAVA="
614 (assoc-ref %build-inputs "jamvm")
615 "/bin/jamvm")
616 "GCJ_JAVAC_TRUE=no"
617 "ac_cv_prog_java_works=yes" ; trust me
618 "--disable-Werror"
619 "--disable-gmp"
620 "--disable-gtk-peer"
621 "--disable-gconf-peer"
622 "--disable-plugin"
623 "--disable-dssi"
624 "--disable-alsa"
625 "--disable-gjdoc")
626 #:phases
627 (modify-phases %standard-phases
628 ;; XXX The bootstrap phase executes autogen.sh, which fails after
629 ;; complaining about the lack of gettext.
630 (replace 'bootstrap
631 (lambda _ (invoke "autoreconf" "-vif")))
632 (add-after 'unpack 'remove-unsupported-annotations
633 (lambda _
634 (substitute* (find-files "java" "\\.java$")
635 (("@Override") ""))
636 #t))
637 (add-after 'install 'install-data
638 (lambda _ (invoke "make" "install-data"))))))
639 (native-inputs
640 `(("autoconf" ,autoconf)
641 ("automake" ,automake)
642 ("libtool" ,libtool)
643 ("gettext" ,gettext-minimal)
644 ("texinfo" ,texinfo)
645 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
646 ("ecj-bootstrap" ,ecj-bootstrap)
647 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
648 ("fastjar" ,fastjar)
649 ("jamvm" ,jamvm-1-bootstrap)
650 ("libltdl" ,libltdl)
651 ("pkg-config" ,pkg-config))))))
652
653 (define jamvm
654 (package (inherit jamvm-1-bootstrap)
655 (version "2.0.0")
656 (source (origin
657 (method url-fetch)
658 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
659 "JamVM%20" version "/jamvm-"
660 version ".tar.gz"))
661 (sha256
662 (base32
663 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
664 (build-system gnu-build-system)
665 (arguments
666 `(#:configure-flags
667 (list (string-append "--with-classpath-install-dir="
668 (assoc-ref %build-inputs "classpath")))))
669 (inputs
670 `(("classpath" ,classpath-devel)
671 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
672 ("zlib" ,zlib)))))
673
674 (define ecj-javac-wrapper-final
675 (package (inherit ecj-javac-wrapper)
676 (native-inputs
677 `(("guile" ,guile-2.2)
678 ("ecj-bootstrap" ,ecj-bootstrap)
679 ("jamvm" ,jamvm)
680 ("classpath" ,classpath-devel)))))
681
682 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
683 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
684 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
685 ;; which uses Java 6 only.
686 (define-public icedtea-6
687 (package
688 (name "icedtea")
689 (version "1.13.13")
690 (source (origin
691 (method url-fetch)
692 (uri (string-append
693 "http://icedtea.wildebeest.org/download/source/icedtea6-"
694 version ".tar.xz"))
695 (sha256
696 (base32
697 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
698 (modules '((guix build utils)))
699 (snippet
700 '(begin
701 (substitute* "Makefile.in"
702 ;; do not leak information about the build host
703 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
704 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
705 #t))))
706 (build-system gnu-build-system)
707 (outputs '("out" ; Java Runtime Environment
708 "jdk" ; Java Development Kit
709 "doc")) ; all documentation
710 (arguments
711 `(;; There are many failing tests and many are known to fail upstream.
712 #:tests? #f
713
714 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
715 ;; gremlin) doesn't support it yet, so skip this phase.
716 #:validate-runpath? #f
717
718 #:modules ((guix build utils)
719 (guix build gnu-build-system)
720 (srfi srfi-19))
721
722 #:configure-flags
723 `("--enable-bootstrap"
724 "--enable-nss"
725 "--without-rhino"
726 "--with-parallel-jobs"
727 "--disable-downloading"
728 "--disable-tests"
729 ,(string-append "--with-ecj="
730 (assoc-ref %build-inputs "ecj")
731 "/share/java/ecj-bootstrap.jar")
732 ,(string-append "--with-jar="
733 (assoc-ref %build-inputs "fastjar")
734 "/bin/fastjar")
735 ,(string-append "--with-jdk-home="
736 (assoc-ref %build-inputs "classpath"))
737 ,(string-append "--with-java="
738 (assoc-ref %build-inputs "jamvm")
739 "/bin/jamvm"))
740 #:phases
741 (modify-phases %standard-phases
742 (replace 'unpack
743 (lambda* (#:key source inputs #:allow-other-keys)
744 (invoke "tar" "xvf" source)
745 (chdir (string-append "icedtea6-" ,version))
746 (mkdir "openjdk")
747 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
748 ;; The convenient OpenJDK source bundle is no longer
749 ;; available for download, so we have to take the sources
750 ;; from the Mercurial repositories and change the Makefile
751 ;; to avoid tests for the OpenJDK zip archive.
752 (with-directory-excursion "openjdk"
753 (for-each (lambda (part)
754 (mkdir part)
755 (copy-recursively
756 (assoc-ref inputs
757 (string-append part "-src"))
758 part))
759 '("jdk" "corba"
760 "langtools" "jaxp" "jaxws")))
761 (with-directory-excursion "openjdk"
762 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
763 (rename-file "hg-checkout" "hotspot"))
764 (substitute* "patches/freetypeversion.patch"
765 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
766 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
767 (substitute* "Makefile.in"
768 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
769 "echo \"trust me\";")
770 ;; The contents of the bootstrap directory must be
771 ;; writeable but when copying from the store they are
772 ;; not.
773 (("mkdir -p lib/rt" line)
774 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
775 (invoke "chmod" "-R" "u+w" "openjdk")))
776 (add-after 'unpack 'use-classpath
777 (lambda* (#:key inputs #:allow-other-keys)
778 (let ((jvmlib (assoc-ref inputs "classpath"))
779 (jamvm (assoc-ref inputs "jamvm")))
780 ;; Classpath does not provide rt.jar.
781 (substitute* "Makefile.in"
782 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
783 (string-append jvmlib "/share/classpath/glibj.zip")))
784 ;; Make sure we can find all classes.
785 (setenv "CLASSPATH"
786 (string-append jvmlib "/share/classpath/glibj.zip:"
787 jvmlib "/share/classpath/tools.zip:"
788 jamvm "/lib/rt.jar"))
789 (setenv "JAVACFLAGS"
790 (string-append "-cp "
791 jvmlib "/share/classpath/glibj.zip:"
792 jvmlib "/share/classpath/tools.zip")))
793 #t))
794 (add-after 'unpack 'patch-patches
795 (lambda _
796 ;; shebang in patches so that they apply cleanly
797 (substitute* '("patches/jtreg-jrunscript.patch"
798 "patches/hotspot/hs23/drop_unlicensed_test.patch")
799 (("#!/bin/sh") (string-append "#!" (which "sh"))))
800 #t))
801 (add-after 'unpack 'patch-paths
802 (lambda* (#:key inputs #:allow-other-keys)
803 ;; buildtree.make generates shell scripts, so we need to replace
804 ;; the generated shebang
805 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
806 (("/bin/sh") (which "bash")))
807
808 (let ((corebin (string-append
809 (assoc-ref inputs "coreutils") "/bin/"))
810 (binbin (string-append
811 (assoc-ref inputs "binutils") "/bin/"))
812 (grepbin (string-append
813 (assoc-ref inputs "grep") "/bin/")))
814 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
815 "openjdk/corba/make/common/shared/Defs-linux.gmk")
816 (("UNIXCOMMAND_PATH = /bin/")
817 (string-append "UNIXCOMMAND_PATH = " corebin))
818 (("USRBIN_PATH = /usr/bin/")
819 (string-append "USRBIN_PATH = " corebin))
820 (("DEVTOOLS_PATH *= */usr/bin/")
821 (string-append "DEVTOOLS_PATH = " corebin))
822 (("COMPILER_PATH *= */usr/bin/")
823 (string-append "COMPILER_PATH = "
824 (assoc-ref inputs "gcc") "/bin/"))
825 (("DEF_OBJCOPY *=.*objcopy")
826 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
827
828 ;; fix path to alsa header
829 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
830 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
831 (string-append "ALSA_INCLUDE="
832 (assoc-ref inputs "alsa-lib")
833 "/include/alsa/version.h")))
834
835 ;; fix hard-coded utility paths
836 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
837 "openjdk/corba/make/common/shared/Defs-utils.gmk")
838 (("ECHO *=.*echo")
839 (string-append "ECHO = " (which "echo")))
840 (("^GREP *=.*grep")
841 (string-append "GREP = " (which "grep")))
842 (("EGREP *=.*egrep")
843 (string-append "EGREP = " (which "egrep")))
844 (("CPIO *=.*cpio")
845 (string-append "CPIO = " (which "cpio")))
846 (("READELF *=.*readelf")
847 (string-append "READELF = " (which "readelf")))
848 (("^ *AR *=.*ar")
849 (string-append "AR = " (which "ar")))
850 (("^ *TAR *=.*tar")
851 (string-append "TAR = " (which "tar")))
852 (("AS *=.*as")
853 (string-append "AS = " (which "as")))
854 (("LD *=.*ld")
855 (string-append "LD = " (which "ld")))
856 (("STRIP *=.*strip")
857 (string-append "STRIP = " (which "strip")))
858 (("NM *=.*nm")
859 (string-append "NM = " (which "nm")))
860 (("^SH *=.*sh")
861 (string-append "SH = " (which "bash")))
862 (("^FIND *=.*find")
863 (string-append "FIND = " (which "find")))
864 (("LDD *=.*ldd")
865 (string-append "LDD = " (which "ldd")))
866 (("NAWK *=.*(n|g)awk")
867 (string-append "NAWK = " (which "gawk")))
868 (("XARGS *=.*xargs")
869 (string-append "XARGS = " (which "xargs")))
870 (("UNZIP *=.*unzip")
871 (string-append "UNZIP = " (which "unzip")))
872 (("ZIPEXE *=.*zip")
873 (string-append "ZIPEXE = " (which "zip")))
874 (("SED *=.*sed")
875 (string-append "SED = " (which "sed"))))
876
877 ;; Some of these timestamps cause problems as they are more than
878 ;; 10 years ago, failing the build process.
879 (substitute*
880 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
881 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
882 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
883 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
884 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
885 #t)))
886 (add-before 'configure 'set-additional-paths
887 (lambda* (#:key inputs #:allow-other-keys)
888 (setenv "CPATH"
889 (string-append (assoc-ref inputs "libxrender")
890 "/include/X11/extensions" ":"
891 (assoc-ref inputs "libxtst")
892 "/include/X11/extensions" ":"
893 (assoc-ref inputs "libxinerama")
894 "/include/X11/extensions" ":"
895 (or (getenv "CPATH") "")))
896 (setenv "ALT_CUPS_HEADERS_PATH"
897 (string-append (assoc-ref inputs "cups")
898 "/include"))
899 (setenv "ALT_FREETYPE_HEADERS_PATH"
900 (string-append (assoc-ref inputs "freetype")
901 "/include"))
902 (setenv "ALT_FREETYPE_LIB_PATH"
903 (string-append (assoc-ref inputs "freetype")
904 "/lib"))
905 #t))
906 (add-before 'build 'disable-os-version-check
907 ;; allow build on linux major version change
908 (lambda _
909 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
910 #t))
911 (replace 'install
912 (lambda* (#:key outputs #:allow-other-keys)
913 (let ((doc (string-append (assoc-ref outputs "doc")
914 "/share/doc/icedtea"))
915 (jre (assoc-ref outputs "out"))
916 (jdk (assoc-ref outputs "jdk")))
917 (copy-recursively "openjdk.build/docs" doc)
918 (copy-recursively "openjdk.build/j2re-image" jre)
919 (copy-recursively "openjdk.build/j2sdk-image" jdk))
920 #t)))))
921 (native-inputs
922 `(("ant" ,ant-bootstrap)
923 ("alsa-lib" ,alsa-lib)
924 ("attr" ,attr)
925 ("classpath" ,classpath-devel)
926 ("coreutils" ,coreutils)
927 ("cpio" ,cpio)
928 ("cups" ,cups)
929 ("ecj" ,ecj-bootstrap)
930 ("ecj-javac" ,ecj-javac-wrapper-final)
931 ("fastjar" ,fastjar)
932 ("fontconfig" ,fontconfig)
933 ("freetype" ,freetype)
934 ("gtk" ,gtk+-2)
935 ("gawk" ,gawk)
936 ("giflib" ,giflib)
937 ("grep" ,grep)
938 ("jamvm" ,jamvm)
939 ("lcms" ,lcms)
940 ("libjpeg" ,libjpeg)
941 ("libnsl" ,libnsl)
942 ("libpng" ,libpng)
943 ("libtool" ,libtool)
944 ("libx11" ,libx11)
945 ("libxcomposite" ,libxcomposite)
946 ("libxi" ,libxi)
947 ("libxinerama" ,libxinerama)
948 ("libxrender" ,libxrender)
949 ("libxslt" ,libxslt) ;for xsltproc
950 ("libxt" ,libxt)
951 ("libxtst" ,libxtst)
952 ("mit-krb5" ,mit-krb5)
953 ("nss" ,nss)
954 ("nss-certs" ,nss-certs)
955 ("perl" ,perl)
956 ("pkg-config" ,pkg-config)
957 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
958 ("unzip" ,unzip)
959 ("wget" ,wget)
960 ("which" ,which)
961 ("zip" ,zip)
962 ("zlib" ,zlib)
963 ("openjdk-src"
964 ,(origin
965 (method hg-fetch)
966 (uri (hg-reference
967 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
968 (changeset "jdk6-b41")))
969 (sha256
970 (base32
971 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
972 ("jdk-src"
973 ,(origin
974 (method hg-fetch)
975 (uri (hg-reference
976 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
977 (changeset "jdk6-b41")))
978 (sha256
979 (base32
980 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
981 ("hotspot-src"
982 ,(origin
983 (method hg-fetch)
984 (uri (hg-reference
985 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
986 (changeset "jdk6-b41")))
987 (sha256
988 (base32
989 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
990 (patches
991 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
992 ("corba-src"
993 ,(origin
994 (method hg-fetch)
995 (uri (hg-reference
996 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
997 (changeset "jdk6-b41")))
998 (sha256
999 (base32
1000 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1001 ("langtools-src"
1002 ,(origin
1003 (method hg-fetch)
1004 (uri (hg-reference
1005 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1006 (changeset "jdk6-b41")))
1007 (sha256
1008 (base32
1009 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1010 ("jaxp-src"
1011 ,(origin
1012 (method hg-fetch)
1013 (uri (hg-reference
1014 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1015 (changeset "jdk6-b41")))
1016 (sha256
1017 (base32
1018 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1019 ("jaxws-src"
1020 ,(origin
1021 (method hg-fetch)
1022 (uri (hg-reference
1023 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1024 (changeset "jdk6-b41")))
1025 (sha256
1026 (base32
1027 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1028 (home-page "http://icedtea.classpath.org")
1029 (synopsis "Java development kit")
1030 (description
1031 "This package provides the OpenJDK built with the IcedTea build harness.
1032 This version of the OpenJDK is no longer maintained and is only used for
1033 bootstrapping purposes.")
1034 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1035 ;; same license as both GNU Classpath and OpenJDK.
1036 (license license:gpl2+)))
1037
1038 (define-public icedtea-7
1039 (let* ((version "2.6.13")
1040 (drop (lambda (name hash)
1041 (origin
1042 (method url-fetch)
1043 (uri (string-append
1044 "http://icedtea.classpath.org/download/drops"
1045 "/icedtea7/" version "/" name ".tar.bz2"))
1046 (sha256 (base32 hash))))))
1047 (package
1048 (name "icedtea")
1049 (version version)
1050 (source (origin
1051 (method url-fetch)
1052 (uri (string-append
1053 "http://icedtea.wildebeest.org/download/source/icedtea-"
1054 version ".tar.xz"))
1055 (sha256
1056 (base32
1057 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1058 (modules '((guix build utils)))
1059 (snippet
1060 '(begin
1061 (substitute* "Makefile.in"
1062 ;; do not leak information about the build host
1063 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1064 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1065 #t))))
1066 (build-system gnu-build-system)
1067 (outputs '("out" ; Java Runtime Environment
1068 "jdk" ; Java Development Kit
1069 "doc")) ; all documentation
1070 (arguments
1071 `(;; There are many test failures. Some are known to
1072 ;; fail upstream, others relate to not having an X
1073 ;; server running at test time, yet others are a
1074 ;; complete mystery to me.
1075
1076 ;; hotspot: passed: 241; failed: 45; error: 2
1077 ;; langtools: passed: 1,934; failed: 26
1078 ;; jdk: unknown
1079 #:tests? #f
1080
1081 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1082 ;; gremlin) doesn't support it yet, so skip this phase.
1083 #:validate-runpath? #f
1084
1085 ;; Apparently, the C locale is needed for some of the tests.
1086 #:locale "C"
1087
1088 #:modules ((guix build utils)
1089 (guix build gnu-build-system)
1090 (ice-9 match)
1091 (ice-9 popen)
1092 (srfi srfi-19)
1093 (srfi srfi-26))
1094
1095 #:configure-flags
1096 ;; TODO: package pcsc and sctp, and add to inputs
1097 `("--disable-system-pcsc"
1098 "--disable-system-sctp"
1099 "--enable-bootstrap"
1100 "--enable-nss"
1101 "--without-rhino"
1102 "--disable-downloading"
1103 "--disable-tests" ;they are run in the check phase instead
1104 "--with-openjdk-src-dir=./openjdk.src"
1105 ,(string-append "--with-jdk-home="
1106 (assoc-ref %build-inputs "jdk")))
1107
1108 #:phases
1109 (modify-phases %standard-phases
1110 (replace 'unpack
1111 (lambda* (#:key source inputs #:allow-other-keys)
1112 (let ((target (string-append "icedtea-" ,version))
1113 (unpack (lambda* (name #:optional dir)
1114 (let ((dir (or dir
1115 (string-drop-right name 5))))
1116 (mkdir dir)
1117 (invoke "tar" "xvf"
1118 (assoc-ref inputs name)
1119 "-C" dir
1120 "--strip-components=1")))))
1121 (mkdir target)
1122 (invoke "tar" "xvf" source
1123 "-C" target "--strip-components=1")
1124 (chdir target)
1125 (unpack "openjdk-src" "openjdk.src")
1126 (with-directory-excursion "openjdk.src"
1127 (for-each unpack
1128 (filter (cut string-suffix? "-drop" <>)
1129 (map (match-lambda
1130 ((name . _) name))
1131 inputs))))
1132 #t)))
1133 (add-after 'unpack 'patch-bitrot
1134 (lambda _
1135 (substitute* '("patches/boot/revert-6973616.patch"
1136 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1137 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1138 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1139 ;; As of attr 2.4.48 this header is no longer
1140 ;; included. It is provided by the libc instead.
1141 (substitute* '("configure"
1142 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1143 (("attr/xattr.h") "sys/xattr.h"))
1144 #t))
1145 (add-after 'unpack 'fix-x11-extension-include-path
1146 (lambda* (#:key inputs #:allow-other-keys)
1147 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1148 (((string-append "\\$\\(firstword \\$\\(wildcard "
1149 "\\$\\(OPENWIN_HOME\\)"
1150 "/include/X11/extensions\\).*$"))
1151 (string-append (assoc-ref inputs "libxrender")
1152 "/include/X11/extensions"
1153 " -I" (assoc-ref inputs "libxtst")
1154 "/include/X11/extensions"
1155 " -I" (assoc-ref inputs "libxinerama")
1156 "/include/X11/extensions"))
1157 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1158 #t))
1159 (add-after 'unpack 'patch-paths
1160 (lambda _
1161 ;; buildtree.make generates shell scripts, so we need to replace
1162 ;; the generated shebang
1163 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1164 (("/bin/sh") (which "bash")))
1165
1166 (let ((corebin (string-append
1167 (assoc-ref %build-inputs "coreutils") "/bin/"))
1168 (binbin (string-append
1169 (assoc-ref %build-inputs "binutils") "/bin/"))
1170 (grepbin (string-append
1171 (assoc-ref %build-inputs "grep") "/bin/")))
1172 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1173 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1174 (("UNIXCOMMAND_PATH = /bin/")
1175 (string-append "UNIXCOMMAND_PATH = " corebin))
1176 (("USRBIN_PATH = /usr/bin/")
1177 (string-append "USRBIN_PATH = " corebin))
1178 (("DEVTOOLS_PATH *= */usr/bin/")
1179 (string-append "DEVTOOLS_PATH = " corebin))
1180 (("COMPILER_PATH *= */usr/bin/")
1181 (string-append "COMPILER_PATH = "
1182 (assoc-ref %build-inputs "gcc") "/bin/"))
1183 (("DEF_OBJCOPY *=.*objcopy")
1184 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1185
1186 ;; fix path to alsa header
1187 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1188 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1189 (string-append "ALSA_INCLUDE="
1190 (assoc-ref %build-inputs "alsa-lib")
1191 "/include/alsa/version.h")))
1192
1193 ;; fix hard-coded utility paths
1194 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1195 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1196 (("ECHO *=.*echo")
1197 (string-append "ECHO = " (which "echo")))
1198 (("^GREP *=.*grep")
1199 (string-append "GREP = " (which "grep")))
1200 (("EGREP *=.*egrep")
1201 (string-append "EGREP = " (which "egrep")))
1202 (("CPIO *=.*cpio")
1203 (string-append "CPIO = " (which "cpio")))
1204 (("READELF *=.*readelf")
1205 (string-append "READELF = " (which "readelf")))
1206 (("^ *AR *=.*ar")
1207 (string-append "AR = " (which "ar")))
1208 (("^ *TAR *=.*tar")
1209 (string-append "TAR = " (which "tar")))
1210 (("AS *=.*as")
1211 (string-append "AS = " (which "as")))
1212 (("LD *=.*ld")
1213 (string-append "LD = " (which "ld")))
1214 (("STRIP *=.*strip")
1215 (string-append "STRIP = " (which "strip")))
1216 (("NM *=.*nm")
1217 (string-append "NM = " (which "nm")))
1218 (("^SH *=.*sh")
1219 (string-append "SH = " (which "bash")))
1220 (("^FIND *=.*find")
1221 (string-append "FIND = " (which "find")))
1222 (("LDD *=.*ldd")
1223 (string-append "LDD = " (which "ldd")))
1224 (("NAWK *=.*(n|g)awk")
1225 (string-append "NAWK = " (which "gawk")))
1226 (("XARGS *=.*xargs")
1227 (string-append "XARGS = " (which "xargs")))
1228 (("UNZIP *=.*unzip")
1229 (string-append "UNZIP = " (which "unzip")))
1230 (("ZIPEXE *=.*zip")
1231 (string-append "ZIPEXE = " (which "zip")))
1232 (("SED *=.*sed")
1233 (string-append "SED = " (which "sed"))))
1234
1235 ;; Some of these timestamps cause problems as they are more than
1236 ;; 10 years ago, failing the build process.
1237 (substitute*
1238 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1239 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1240 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1241 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1242 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1243 #t))
1244 (add-before 'configure 'set-additional-paths
1245 (lambda* (#:key inputs #:allow-other-keys)
1246 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1247 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1248 (string-append "ALSA_INCLUDE="
1249 (assoc-ref inputs "alsa-lib")
1250 "/include/alsa/version.h")))
1251 (setenv "CC" "gcc")
1252 (setenv "CPATH"
1253 (string-append (assoc-ref inputs "libxcomposite")
1254 "/include/X11/extensions" ":"
1255 (assoc-ref inputs "libxrender")
1256 "/include/X11/extensions" ":"
1257 (assoc-ref inputs "libxtst")
1258 "/include/X11/extensions" ":"
1259 (assoc-ref inputs "libxinerama")
1260 "/include/X11/extensions" ":"
1261 (or (getenv "CPATH") "")))
1262 (setenv "ALT_OBJCOPY" (which "objcopy"))
1263 (setenv "ALT_CUPS_HEADERS_PATH"
1264 (string-append (assoc-ref inputs "cups")
1265 "/include"))
1266 (setenv "ALT_FREETYPE_HEADERS_PATH"
1267 (string-append (assoc-ref inputs "freetype")
1268 "/include"))
1269 (setenv "ALT_FREETYPE_LIB_PATH"
1270 (string-append (assoc-ref inputs "freetype")
1271 "/lib"))
1272 #t))
1273 (add-before 'build 'disable-os-version-check
1274 ;; allow build on linux major version change
1275 (lambda _
1276 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1277 #t))
1278 (add-before 'check 'fix-test-framework
1279 (lambda _
1280 ;; Fix PATH in test environment
1281 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1282 (("PATH=/bin:/usr/bin")
1283 (string-append "PATH=" (getenv "PATH"))))
1284 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1285 (("/usr/bin/env") (which "env")))
1286 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1287 (("/bin/rm") (which "rm"))
1288 (("/bin/cp") (which "cp"))
1289 (("/bin/mv") (which "mv")))
1290 #t))
1291 (add-before 'check 'fix-hotspot-tests
1292 (lambda _
1293 (with-directory-excursion "openjdk.src/hotspot/test/"
1294 (substitute* "jprt.config"
1295 (("PATH=\"\\$\\{path4sdk\\}\"")
1296 (string-append "PATH=" (getenv "PATH")))
1297 (("make=/usr/bin/make")
1298 (string-append "make=" (which "make"))))
1299 (substitute* '("runtime/6626217/Test6626217.sh"
1300 "runtime/7110720/Test7110720.sh")
1301 (("/bin/rm") (which "rm"))
1302 (("/bin/cp") (which "cp"))
1303 (("/bin/mv") (which "mv"))))
1304 #t))
1305 (add-before 'check 'fix-jdk-tests
1306 (lambda _
1307 (with-directory-excursion "openjdk.src/jdk/test/"
1308 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1309 (("/bin/pwd") (which "pwd")))
1310 (substitute* "com/sun/jdi/ShellScaffold.sh"
1311 (("/bin/kill") (which "kill")))
1312 (substitute* "start-Xvfb.sh"
1313 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1314 (("/usr/bin/nohup") (which "nohup")))
1315 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1316 (("/bin/rm") (which "rm")))
1317 (substitute* "tools/launcher/MultipleJRE.sh"
1318 (("echo \"#!/bin/sh\"")
1319 (string-append "echo \"#!" (which "rm") "\""))
1320 (("/usr/bin/zip") (which "zip")))
1321 (substitute* "com/sun/jdi/OnThrowTest.java"
1322 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1323 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1324 (("/usr/bin/uptime") (which "uptime")))
1325 (substitute* "java/lang/ProcessBuilder/Basic.java"
1326 (("/usr/bin/env") (which "env"))
1327 (("/bin/false") (which "false"))
1328 (("/bin/true") (which "true"))
1329 (("/bin/cp") (which "cp"))
1330 (("/bin/sh") (which "sh")))
1331 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1332 (("/bin/sh") (which "sh")))
1333 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1334 (("/usr/bin/perl") (which "perl"))
1335 (("/bin/ps") (which "ps"))
1336 (("/bin/true") (which "true")))
1337 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1338 (("/usr/bin/tee") (which "tee")))
1339 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1340 (("/bin/true") (which "true")))
1341 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1342 (("/bin/cat") (which "cat")))
1343 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1344 (("/bin/sh") (which "sh"))
1345 (("/bin/true") (which "true"))
1346 (("/bin/kill") (which "kill")))
1347 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1348 (("/usr/bin/echo") (which "echo")))
1349 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1350 (("/usr/bin/cat") (which "cat")))
1351 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1352 (("/bin/cat") (which "cat"))
1353 (("/bin/sleep") (which "sleep"))
1354 (("/bin/sh") (which "sh")))
1355 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1356 (("/bin/cat") (which "cat")))
1357 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1358 (("/bin/chmod") (which "chmod")))
1359 (substitute* "java/util/zip/ZipFile/Assortment.java"
1360 (("/bin/sh") (which "sh"))))
1361 #t))
1362 (replace 'check
1363 (lambda _
1364 ;; The "make check-*" targets always return zero, so we need to
1365 ;; check for errors in the associated log files to determine
1366 ;; whether any tests have failed.
1367 (use-modules (ice-9 rdelim))
1368 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1369 (checker (lambda (port)
1370 (let loop ()
1371 (let ((line (read-line port)))
1372 (cond
1373 ((eof-object? line) #t)
1374 ((regexp-exec error-pattern line)
1375 (error "test failed"))
1376 (else (loop)))))))
1377 (run-test (lambda (test)
1378 (invoke "make" test)
1379 (call-with-input-file
1380 (string-append "test/" test ".log")
1381 checker))))
1382 (when #f ; skip tests
1383 (run-test "check-hotspot")
1384 (run-test "check-langtools")
1385 (run-test "check-jdk"))
1386 #t)))
1387 (replace 'install
1388 (lambda* (#:key outputs #:allow-other-keys)
1389 (let ((doc (string-append (assoc-ref outputs "doc")
1390 "/share/doc/icedtea"))
1391 (jre (assoc-ref outputs "out"))
1392 (jdk (assoc-ref outputs "jdk")))
1393 (copy-recursively "openjdk.build/docs" doc)
1394 (copy-recursively "openjdk.build/j2re-image" jre)
1395 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1396 #t))
1397 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1398 ;; But that shared object is located in the server/ folder, so it
1399 ;; cannot be found. This phase creates a symbolic link in the
1400 ;; lib/amd64 folder so that the other libraries can find it.
1401 ;;
1402 ;; See:
1403 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1404 ;;
1405 ;; FIXME: Find the bug in the build system, so that this symlink is
1406 ;; not needed.
1407 (add-after 'install 'install-libjvm
1408 (lambda* (#:key inputs outputs #:allow-other-keys)
1409 (let* ((lib-path (string-append (assoc-ref outputs "out")
1410 ;; See 'INSTALL_ARCH_DIR' in
1411 ;; 'configure'.
1412 ,(match (%current-system)
1413 ("i686-linux"
1414 "/lib/i386")
1415 ("x86_64-linux"
1416 "/lib/amd64")
1417 ("armhf-linux"
1418 "/lib/arm")
1419 ("aarch64-linux"
1420 "/lib/aarch64")))))
1421 (symlink (string-append lib-path "/server/libjvm.so")
1422 (string-append lib-path "/libjvm.so")))
1423 #t))
1424 ;; By default IcedTea only generates an empty keystore. In order to
1425 ;; be able to use certificates in Java programs we need to generate a
1426 ;; keystore from a set of certificates. For convenience we use the
1427 ;; certificates from the nss-certs package.
1428 (add-after 'install 'install-keystore
1429 (lambda* (#:key inputs outputs #:allow-other-keys)
1430 (let* ((keystore "cacerts")
1431 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1432 "/etc/ssl/certs"))
1433 (keytool (string-append (assoc-ref outputs "jdk")
1434 "/bin/keytool")))
1435 (define (extract-cert file target)
1436 (call-with-input-file file
1437 (lambda (in)
1438 (call-with-output-file target
1439 (lambda (out)
1440 (let loop ((line (read-line in 'concat))
1441 (copying? #f))
1442 (cond
1443 ((eof-object? line) #t)
1444 ((string-prefix? "-----BEGIN" line)
1445 (display line out)
1446 (loop (read-line in 'concat) #t))
1447 ((string-prefix? "-----END" line)
1448 (display line out)
1449 #t)
1450 (else
1451 (when copying? (display line out))
1452 (loop (read-line in 'concat) copying?)))))))))
1453 (define (import-cert cert)
1454 (format #t "Importing certificate ~a\n" (basename cert))
1455 (let ((temp "tmpcert"))
1456 (extract-cert cert temp)
1457 (let ((port (open-pipe* OPEN_WRITE keytool
1458 "-import"
1459 "-alias" (basename cert)
1460 "-keystore" keystore
1461 "-storepass" "changeit"
1462 "-file" temp)))
1463 (display "yes\n" port)
1464 (when (not (zero? (status:exit-val (close-pipe port))))
1465 (format #t "failed to import ~a\n" cert)))
1466 (delete-file temp)))
1467
1468 ;; This is necessary because the certificate directory contains
1469 ;; files with non-ASCII characters in their names.
1470 (setlocale LC_ALL "en_US.utf8")
1471 (setenv "LC_ALL" "en_US.utf8")
1472
1473 (for-each import-cert (find-files certs-dir "\\.pem$"))
1474 (mkdir-p (string-append (assoc-ref outputs "out")
1475 "/lib/security"))
1476 (mkdir-p (string-append (assoc-ref outputs "jdk")
1477 "/jre/lib/security"))
1478
1479 ;; The cacerts files we are going to overwrite are chmod'ed as
1480 ;; read-only (444) in icedtea-8 (which derives from this
1481 ;; package). We have to change this so we can overwrite them.
1482 (chmod (string-append (assoc-ref outputs "out")
1483 "/lib/security/" keystore) #o644)
1484 (chmod (string-append (assoc-ref outputs "jdk")
1485 "/jre/lib/security/" keystore) #o644)
1486
1487 (install-file keystore
1488 (string-append (assoc-ref outputs "out")
1489 "/lib/security"))
1490 (install-file keystore
1491 (string-append (assoc-ref outputs "jdk")
1492 "/jre/lib/security"))
1493 #t))))))
1494 (native-inputs
1495 `(("openjdk-src"
1496 ,(drop "openjdk"
1497 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1498 ("corba-drop"
1499 ,(drop "corba"
1500 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1501 ("jaxp-drop"
1502 ,(drop "jaxp"
1503 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1504 ("jaxws-drop"
1505 ,(drop "jaxws"
1506 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1507 ("jdk-drop"
1508 ,(drop "jdk"
1509 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1510 ("langtools-drop"
1511 ,(drop "langtools"
1512 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1513 ("hotspot-drop"
1514 ,(origin
1515 (method url-fetch)
1516 (uri (string-append
1517 "http://icedtea.classpath.org/downloads/drops"
1518 "/icedtea7/" version "/hotspot.tar.bz2"))
1519 (sha256
1520 (base32
1521 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1522 (patches (search-patches
1523 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1524 ("ant" ,ant-bootstrap)
1525 ("attr" ,attr)
1526 ("coreutils" ,coreutils)
1527 ("diffutils" ,diffutils) ;for tests
1528 ("gawk" ,gawk)
1529 ("grep" ,grep)
1530 ("libtool" ,libtool)
1531 ("pkg-config" ,pkg-config)
1532 ("wget" ,wget)
1533 ("which" ,which)
1534 ("cpio" ,cpio)
1535 ("zip" ,zip)
1536 ("unzip" ,unzip)
1537 ("fastjar" ,fastjar)
1538 ("libxslt" ,libxslt) ;for xsltproc
1539 ("nss-certs" ,nss-certs)
1540 ("perl" ,perl)
1541 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1542 ("jdk" ,icedtea-6 "jdk")))
1543 (inputs
1544 `(("alsa-lib" ,alsa-lib)
1545 ("cups" ,cups)
1546 ("libx11" ,libx11)
1547 ("libxcomposite" ,libxcomposite)
1548 ("libxt" ,libxt)
1549 ("libxtst" ,libxtst)
1550 ("libxi" ,libxi)
1551 ("libxinerama" ,libxinerama)
1552 ("libxrender" ,libxrender)
1553 ("libjpeg" ,libjpeg)
1554 ("libpng" ,libpng)
1555 ("mit-krb5" ,mit-krb5)
1556 ("nss" ,nss)
1557 ("giflib" ,giflib)
1558 ("fontconfig" ,fontconfig)
1559 ("freetype" ,freetype)
1560 ("lcms" ,lcms)
1561 ("zlib" ,zlib)
1562 ("gtk" ,gtk+-2)))
1563 (home-page "http://icedtea.classpath.org")
1564 (synopsis "Java development kit")
1565 (description
1566 "This package provides the Java development kit OpenJDK built with the
1567 IcedTea build harness.")
1568
1569 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1570 (supported-systems (delete "mips64el-linux" %supported-systems))
1571
1572 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1573 ;; same license as both GNU Classpath and OpenJDK.
1574 (license license:gpl2+))))
1575
1576 (define-public icedtea-8
1577 (let* ((version "3.7.0")
1578 (drop (lambda (name hash)
1579 (origin
1580 (method url-fetch)
1581 (uri (string-append
1582 "http://icedtea.classpath.org/download/drops"
1583 "/icedtea8/" version "/" name ".tar.xz"))
1584 (sha256 (base32 hash))))))
1585 (package (inherit icedtea-7)
1586 (version "3.7.0")
1587 (source (origin
1588 (method url-fetch)
1589 (uri (string-append
1590 "http://icedtea.wildebeest.org/download/source/icedtea-"
1591 version ".tar.xz"))
1592 (sha256
1593 (base32
1594 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1595 (modules '((guix build utils)))
1596 (snippet
1597 '(begin
1598 (substitute* '("configure"
1599 "acinclude.m4")
1600 ;; Do not embed build time
1601 (("(DIST_ID=\"Custom build).*$" _ prefix)
1602 (string-append prefix "\"\n"))
1603 ;; Do not leak information about the build host
1604 (("DIST_NAME=\"\\$build_os\"")
1605 "DIST_NAME=\"guix\""))
1606 #t))))
1607 (arguments
1608 `(#:imported-modules
1609 ((guix build ant-build-system)
1610 (guix build syscalls)
1611 ,@%gnu-build-system-modules)
1612 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1613 ((#:modules modules)
1614 `((guix build utils)
1615 (guix build gnu-build-system)
1616 ((guix build ant-build-system) #:prefix ant:)
1617 (ice-9 match)
1618 (ice-9 popen)
1619 (srfi srfi-19)
1620 (srfi srfi-26)))
1621 ((#:configure-flags flags)
1622 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1623 `( ;;"--disable-bootstrap"
1624 "--enable-bootstrap"
1625 "--enable-nss"
1626 "--disable-downloading"
1627 "--disable-system-pcsc"
1628 "--disable-system-sctp"
1629 "--disable-tests" ;they are run in the check phase instead
1630 "--with-openjdk-src-dir=./openjdk.src"
1631 ,(string-append "--with-jdk-home=" jdk))))
1632 ((#:phases phases)
1633 `(modify-phases ,phases
1634 (delete 'fix-x11-extension-include-path)
1635 (delete 'patch-paths)
1636 (delete 'set-additional-paths)
1637 (delete 'patch-patches)
1638 (delete 'patch-bitrot)
1639 ;; Prevent the keytool from recording the current time when
1640 ;; adding certificates at build time.
1641 (add-after 'unpack 'patch-keystore
1642 (lambda _
1643 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1644 (("date = new Date\\(\\);")
1645 "\
1646 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1647 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1648 new Date();"))
1649 #t))
1650 (add-after 'unpack 'patch-jni-libs
1651 ;; Hardcode dynamically loaded libraries.
1652 (lambda _
1653 (let* ((library-path (search-path-as-string->list
1654 (getenv "LIBRARY_PATH")))
1655 (find-library (lambda (name)
1656 (search-path
1657 library-path
1658 (string-append "lib" name ".so")))))
1659 (for-each
1660 (lambda (file)
1661 (catch 'decoding-error
1662 (lambda ()
1663 (substitute* file
1664 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1665 _ name version)
1666 (format #f "\"~a\"" (find-library name)))
1667 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1668 (format #f "\"~a\"" (find-library name)))))
1669 (lambda _
1670 ;; Those are safe to skip.
1671 (format (current-error-port)
1672 "warning: failed to substitute: ~a~%"
1673 file))))
1674 (find-files "openjdk.src/jdk/src/solaris/native"
1675 "\\.c|\\.h"))
1676 #t)))
1677 (replace 'install
1678 (lambda* (#:key outputs #:allow-other-keys)
1679 (let ((doc (string-append (assoc-ref outputs "doc")
1680 "/share/doc/icedtea"))
1681 (jre (assoc-ref outputs "out"))
1682 (jdk (assoc-ref outputs "jdk")))
1683 (copy-recursively "openjdk.build/docs" doc)
1684 (copy-recursively "openjdk.build/images/j2re-image" jre)
1685 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1686 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1687 ;; support via NSS.
1688 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1689 (string-append jre "/lib/security/nss.cfg"))
1690 #t)))
1691 (add-after 'install 'strip-jar-timestamps
1692 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1693 (native-inputs
1694 `(("jdk" ,icedtea-7 "jdk")
1695 ("openjdk-src"
1696 ,(drop "openjdk"
1697 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1698 ("aarch32-drop"
1699 ,(drop "aarch32"
1700 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1701 ("corba-drop"
1702 ,(drop "corba"
1703 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1704 ("jaxp-drop"
1705 ,(drop "jaxp"
1706 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1707 ("jaxws-drop"
1708 ,(drop "jaxws"
1709 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1710 ("jdk-drop"
1711 ,(drop "jdk"
1712 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1713 ("langtools-drop"
1714 ,(drop "langtools"
1715 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1716 ("hotspot-drop"
1717 ,(origin
1718 (method url-fetch)
1719 (uri (string-append
1720 "http://icedtea.classpath.org/download/drops"
1721 "/icedtea8/" version "/hotspot.tar.xz"))
1722 (sha256
1723 (base32
1724 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1725 (patches (search-patches
1726 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1727 ("nashorn-drop"
1728 ,(drop "nashorn"
1729 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1730 ("shenandoah-drop"
1731 ,(drop "shenandoah"
1732 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1733 ,@(fold alist-delete (package-native-inputs icedtea-7)
1734 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1735 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1736
1737 (define-public openjdk9
1738 (package
1739 (name "openjdk")
1740 (version "9.181")
1741 (source (origin
1742 (method url-fetch)
1743 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1744 (file-name (string-append name "-" version ".tar.bz2"))
1745 (sha256
1746 (base32
1747 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1748 (modules '((guix build utils)))
1749 (snippet
1750 `(begin
1751 (for-each delete-file (find-files "." ".*.bin$"))
1752 (for-each delete-file (find-files "." ".*.exe$"))
1753 (for-each delete-file (find-files "." ".*.jar$"))
1754 #t))))
1755 (build-system gnu-build-system)
1756 (outputs '("out" "jdk" "doc"))
1757 (arguments
1758 `(#:tests? #f; require jtreg
1759 #:imported-modules
1760 ((guix build syscalls)
1761 ,@%gnu-build-system-modules)
1762 #:phases
1763 (modify-phases %standard-phases
1764 (add-after 'patch-source-shebangs 'fix-java-shebangs
1765 (lambda _
1766 ;; This file was "fixed" by patch-source-shebangs, but it requires
1767 ;; this exact first line.
1768 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1769 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1770 #t))
1771 (replace 'configure
1772 (lambda* (#:key inputs outputs #:allow-other-keys)
1773 ;; TODO: unbundle libpng and lcms
1774 (invoke "bash" "./configure"
1775 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1776 "--disable-freetype-bundling"
1777 "--disable-warnings-as-errors"
1778 "--disable-hotspot-gtest"
1779 "--with-giflib=system"
1780 "--with-libjpeg=system"
1781 (string-append "--prefix=" (assoc-ref outputs "out")))
1782 #t))
1783 (replace 'build
1784 (lambda _
1785 (with-output-to-file ".src-rev"
1786 (lambda _
1787 (display ,version)))
1788 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1789 (invoke "make" "all")
1790 #t))
1791 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1792 ;; But that shared object is located in the server/ folder, so it
1793 ;; cannot be found. This phase creates a symbolic link in the
1794 ;; lib/ folder so that the other libraries can find it.
1795 ;;
1796 ;; See:
1797 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1798 ;;
1799 ;; FIXME: Find the bug in the build system, so that this symlink is
1800 ;; not needed.
1801 (add-after 'install 'install-libjvm
1802 (lambda* (#:key inputs outputs #:allow-other-keys)
1803 (let* ((lib-out (string-append (assoc-ref outputs "out")
1804 "/lib"))
1805 (lib-jdk (string-append (assoc-ref outputs "jdk")
1806 "/lib")))
1807 (symlink (string-append lib-jdk "/server/libjvm.so")
1808 (string-append lib-jdk "/libjvm.so"))
1809 (symlink (string-append lib-out "/server/libjvm.so")
1810 (string-append lib-out "/libjvm.so")))
1811 #t))
1812 (replace 'install
1813 (lambda* (#:key outputs #:allow-other-keys)
1814 (let ((out (assoc-ref outputs "out"))
1815 (jdk (assoc-ref outputs "jdk"))
1816 (doc (assoc-ref outputs "doc"))
1817 (images (car (find-files "build" ".*-server-release"
1818 #:directories? #t))))
1819 (copy-recursively (string-append images "/images/jdk") jdk)
1820 (copy-recursively (string-append images "/images/jre") out)
1821 (copy-recursively (string-append images "/images/docs") doc))
1822 #t))
1823 (add-after 'install 'strip-zip-timestamps
1824 (lambda* (#:key outputs #:allow-other-keys)
1825 (use-modules (guix build syscalls))
1826 (for-each (lambda (zip)
1827 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1828 (with-directory-excursion dir
1829 (invoke "unzip" zip))
1830 (delete-file zip)
1831 (for-each (lambda (file)
1832 (let ((s (lstat file)))
1833 (unless (eq? (stat:type s) 'symlink)
1834 (format #t "reset ~a~%" file)
1835 (utime file 0 0 0 0))))
1836 (find-files dir #:directories? #t))
1837 (with-directory-excursion dir
1838 (let ((files (find-files "." ".*" #:directories? #t)))
1839 (apply invoke "zip" "-0" "-X" zip files)))))
1840 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1841 #t)))))
1842 (inputs
1843 `(("alsa-lib" ,alsa-lib)
1844 ("cups" ,cups)
1845 ("fontconfig" ,fontconfig)
1846 ("freetype" ,freetype)
1847 ("giflib" ,giflib)
1848 ("lcms" ,lcms)
1849 ("libelf" ,libelf)
1850 ("libjpeg" ,libjpeg)
1851 ("libice" ,libice)
1852 ("libpng" ,libpng)
1853 ("libx11" ,libx11)
1854 ("libxcomposite" ,libxcomposite)
1855 ("libxi" ,libxi)
1856 ("libxinerama" ,libxinerama)
1857 ("libxrender" ,libxrender)
1858 ("libxt" ,libxt)
1859 ("libxtst" ,libxtst)))
1860 (native-inputs
1861 `(("icedtea-8" ,icedtea-8)
1862 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1863 ("unzip" ,unzip)
1864 ("which" ,which)
1865 ("zip" ,zip)))
1866 (home-page "https://openjdk.java.net/projects/jdk9/")
1867 (synopsis "Java development kit")
1868 (description
1869 "This package provides the Java development kit OpenJDK.")
1870 (license license:gpl2+)))
1871
1872 (define-public openjdk10
1873 (package
1874 (inherit openjdk9)
1875 (name "openjdk")
1876 (version "10.46")
1877 (source (origin
1878 (method url-fetch)
1879 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1880 (file-name (string-append name "-" version ".tar.bz2"))
1881 (sha256
1882 (base32
1883 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1884 (patches (search-patches
1885 "openjdk-10-idlj-reproducibility.patch"))
1886 (modules '((guix build utils)))
1887 (snippet
1888 `(begin
1889 (for-each delete-file (find-files "." ".*.bin$"))
1890 (for-each delete-file (find-files "." ".*.exe$"))
1891 (for-each delete-file (find-files "." ".*.jar$"))
1892 #t))))
1893 (arguments
1894 (substitute-keyword-arguments (package-arguments openjdk9)
1895 ((#:phases phases)
1896 `(modify-phases ,phases
1897 (replace 'fix-java-shebangs
1898 (lambda _
1899 ;; This file was "fixed" by patch-source-shebangs, but it requires
1900 ;; this exact first line.
1901 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1902 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1903 #t))
1904 (replace 'configure
1905 (lambda* (#:key inputs outputs #:allow-other-keys)
1906 (invoke "bash" "./configure"
1907 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1908 "--disable-freetype-bundling"
1909 "--disable-warnings-as-errors"
1910 "--disable-hotspot-gtest"
1911 "--with-giflib=system"
1912 "--with-libjpeg=system"
1913 "--with-native-debug-symbols=zipped"
1914 (string-append "--prefix=" (assoc-ref outputs "out")))
1915 #t))))))
1916 (native-inputs
1917 `(("openjdk9" ,openjdk9)
1918 ("openjdk9:jdk" ,openjdk9 "jdk")
1919 ("unzip" ,unzip)
1920 ("which" ,which)
1921 ("zip" ,zip)))))
1922
1923 (define-public openjdk11
1924 (package
1925 (name "openjdk")
1926 (version "11.28")
1927 (source (origin
1928 (method url-fetch)
1929 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1930 (file-name (string-append name "-" version ".tar.bz2"))
1931 (sha256
1932 (base32
1933 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1934 (modules '((guix build utils)))
1935 (snippet
1936 `(begin
1937 (for-each delete-file (find-files "." ".*.bin$"))
1938 (for-each delete-file (find-files "." ".*.exe$"))
1939 (for-each delete-file (find-files "." ".*.jar$"))
1940 #t))))
1941 (build-system gnu-build-system)
1942 (outputs '("out" "jdk" "doc"))
1943 (arguments
1944 `(#:imported-modules
1945 ((guix build syscalls)
1946 (ice-9 binary-ports)
1947 (rnrs bytevectors)
1948 ,@%gnu-build-system-modules)
1949 #:tests? #f; requires jtreg
1950 ;; TODO package jtreg
1951 ;; disable parallel builds, as the openjdk build system does not like -j
1952 #:parallel-build? #f
1953 #:parallel-tests? #f
1954 ;; reenable parallel builds and tests by adding the flags manually
1955 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1956 #:configure-flags
1957 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1958 "--disable-warnings-as-errors"
1959 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1960 "--with-native-debug-symbols=zipped"
1961 ;; do not use the bundled libraries
1962 "--with-giflib=system"
1963 "--with-lcms=system"
1964 "--with-libjpeg=system"
1965 "--with-libpng=system"
1966 "--with-version-pre="
1967 ;; allow the build system to locate the system freetype
1968 ,(string-append "--with-freetype-include="
1969 (assoc-ref %build-inputs "freetype") "/include")
1970 ,(string-append "--with-freetype-lib="
1971 (assoc-ref %build-inputs "freetype") "/lib"))
1972 ;; TODO
1973 #:phases
1974 (modify-phases %standard-phases
1975 (add-after 'patch-source-shebangs 'fix-java-shebangs
1976 (lambda _
1977 ;; This file was "fixed" by patch-source-shebangs, but it requires
1978 ;; this exact first line.
1979 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1980 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1981 #t))
1982 (replace 'build
1983 (lambda _
1984 (with-output-to-file ".src-rev"
1985 (lambda _
1986 (display ,version)))
1987 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1988 (invoke "make" "all")
1989 #t))
1990 ;; jdk 11 does not build jre by default any more
1991 ;; building it anyways
1992 ;; for further information see:
1993 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1994 (add-after 'build 'build-jre
1995 (lambda _
1996 (invoke "make" "legacy-jre-image")
1997 #t))
1998 (replace 'install
1999 (lambda* (#:key outputs #:allow-other-keys)
2000 (let ((out (assoc-ref outputs "out"))
2001 (jdk (assoc-ref outputs "jdk"))
2002 (doc (assoc-ref outputs "doc"))
2003 (images (car (find-files "build" ".*-server-release"
2004 #:directories? #t))))
2005 (copy-recursively (string-append images "/images/jdk") jdk)
2006 (copy-recursively (string-append images "/images/jre") out)
2007 (copy-recursively (string-append images "/images/docs") doc))
2008 #t))
2009 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2010 ;; But that shared object is located in the server/ folder, so it
2011 ;; cannot be found. This phase creates a symbolic link in the
2012 ;; lib/ folder so that the other libraries can find it.
2013 ;;
2014 ;; See:
2015 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2016 ;;
2017 ;; FIXME: Find the bug in the build system, so that this symlink is
2018 ;; not needed.
2019 (add-after 'install 'install-libjvm
2020 (lambda* (#:key inputs outputs #:allow-other-keys)
2021 (let* ((lib-out (string-append (assoc-ref outputs "out")
2022 "/lib"))
2023 (lib-jdk (string-append (assoc-ref outputs "jdk")
2024 "/lib")))
2025 (symlink (string-append lib-jdk "/server/libjvm.so")
2026 (string-append lib-jdk "/libjvm.so"))
2027 (symlink (string-append lib-out "/server/libjvm.so")
2028 (string-append lib-out "/libjvm.so")))
2029 #t))
2030 (add-after 'install 'strip-character-data-timestamps
2031 (lambda* (#:key outputs #:allow-other-keys)
2032 (use-modules (guix build syscalls))
2033 (let ((archive (string-append
2034 (assoc-ref outputs "jdk") "/lib/src.zip"))
2035 (dir (mkdtemp! "zip-contents.XXXXXX")))
2036 (with-directory-excursion dir
2037 (invoke "unzip" archive))
2038 (delete-file archive)
2039 (with-directory-excursion dir
2040 (let ((char-data-files (find-files "." "CharacterData.*")))
2041 (for-each (lambda (file)
2042 (substitute* file
2043 (((string-append "This file was generated "
2044 "AUTOMATICALLY from a template "
2045 "file.*"))
2046 (string-append "This file was generated "
2047 "AUTOMATICALLY from a template "
2048 "file"))))
2049 char-data-files)))
2050 (with-directory-excursion dir
2051 (let ((files (find-files "." ".*" #:directories? #t)))
2052 (apply invoke "zip" "-0" "-X" archive files))))))
2053 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2054 (lambda* (#:key outputs #:allow-other-keys)
2055 (use-modules (guix build syscalls)
2056 (ice-9 binary-ports)
2057 (rnrs bytevectors))
2058 (letrec ((repack-archive
2059 (lambda (archive)
2060 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2061 (with-directory-excursion dir
2062 (invoke "unzip" archive))
2063 (delete-file archive)
2064 (for-each (compose repack-archive canonicalize-path)
2065 (find-files dir "(ct.sym|.*.jar)$"))
2066 (let ((reset-file-timestamp
2067 (lambda (file)
2068 (let ((s (lstat file)))
2069 (unless (eq? (stat:type s) 'symlink)
2070 (format #t "reset ~a~%" file)
2071 (utime file 0 0 0 0))))))
2072 (for-each reset-file-timestamp
2073 (find-files dir #:directories? #t)))
2074 (with-directory-excursion dir
2075 (let ((files (find-files "." ".*" #:directories? #t)))
2076 (apply invoke "zip" "-0" "-X" archive files)))))))
2077 (for-each repack-archive
2078 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2079 (for-each repack-archive
2080 (find-files (assoc-ref outputs "jdk")
2081 ".*.(zip|jar|diz)$"))
2082 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2083 (let ((repack-jmod
2084 (lambda (file-name)
2085 (call-with-input-file file-name
2086 (lambda (file)
2087 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2088 (if (equal? (get-bytevector-n
2089 file (bytevector-length header))
2090 header)
2091 (let* ((header-length (bytevector-length header))
2092 (temp-file (mkstemp!
2093 (string-copy
2094 "temp-file.XXXXXX")))
2095 (temp-filename (port-filename temp-file))
2096 (content-length
2097 (- (stat:size (stat file))
2098 header-length)))
2099 (sendfile temp-file file content-length header-length)
2100 (delete-file file-name)
2101 (close-port temp-file)
2102 (repack-archive (canonicalize-path temp-filename))
2103 (call-with-output-file file-name
2104 (lambda (file)
2105 (put-bytevector file header)
2106 (call-with-input-file temp-filename
2107 (lambda (temp-file)
2108 (sendfile
2109 file temp-file
2110 (stat:size (stat temp-file)) 0)))))))))))))
2111 (for-each repack-jmod
2112 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2113 #t)))
2114 (add-after 'install 'remove-timestamp-from-api-summary
2115 (lambda* (#:key outputs #:allow-other-keys)
2116 (substitute* (string-append (assoc-ref outputs "doc")
2117 "/api/overview-summary.html")
2118 (("Generated by javadoc \\(11-internal\\).*$")
2119 "Generated by javadoc (11-internal) -->\n"))
2120 #t)))))
2121 (inputs
2122 `(("alsa-lib" ,alsa-lib)
2123 ("cups" ,cups)
2124 ("fontconfig" ,fontconfig)
2125 ("freetype" ,freetype)
2126 ("giflib" ,giflib)
2127 ("lcms" ,lcms)
2128 ("libjpeg" ,libjpeg)
2129 ("libpng" ,libpng)
2130 ("libx11" ,libx11)
2131 ("libxext" ,libxext)
2132 ("libxrender" ,libxrender)
2133 ("libxt" ,libxt)
2134 ("libxtst" ,libxtst)))
2135 (native-inputs
2136 `(("autoconf" ,autoconf)
2137 ("openjdk10" ,openjdk10)
2138 ("openjdk10:jdk" ,openjdk10 "jdk")
2139 ("pkg-config" ,pkg-config)
2140 ("unzip" ,unzip)
2141 ("which" ,which)
2142 ("zip" ,zip)))
2143 (home-page "https://openjdk.java.net/projects/jdk/11/")
2144 (synopsis "Java development kit")
2145 (description
2146 "This package provides the Java development kit OpenJDK.")
2147 (license license:gpl2+)))
2148
2149 (define-public openjdk12
2150 (package
2151 (inherit openjdk11)
2152 (name "openjdk")
2153 (version "12.33")
2154 (source (origin
2155 (method url-fetch)
2156 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2157 (file-name (string-append name "-" version ".tar.bz2"))
2158 (sha256
2159 (base32
2160 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2161 (modules '((guix build utils)))
2162 (snippet
2163 `(begin
2164 (for-each delete-file (find-files "." ".*.bin$"))
2165 (for-each delete-file (find-files "." ".*.exe$"))
2166 (for-each delete-file (find-files "." ".*.jar$"))
2167 #t))))
2168 (inputs
2169 `(("alsa-lib" ,alsa-lib)
2170 ("cups" ,cups)
2171 ("fontconfig" ,fontconfig)
2172 ("freetype" ,freetype)
2173 ("giflib" ,giflib)
2174 ("lcms" ,lcms)
2175 ("libjpeg" ,libjpeg)
2176 ("libpng" ,libpng)
2177 ("libx11" ,libx11)
2178 ("libxext" ,libxext)
2179 ("libxrandr" ,libxrandr)
2180 ("libxrender" ,libxrender)
2181 ("libxt" ,libxt)
2182 ("libxtst" ,libxtst)))
2183 (native-inputs
2184 `(("autoconf" ,autoconf)
2185 ("openjdk11" ,openjdk11)
2186 ("openjdk11:jdk" ,openjdk11 "jdk")
2187 ("pkg-config" ,pkg-config)
2188 ("unzip" ,unzip)
2189 ("which" ,which)
2190 ("zip" ,zip)))
2191 (home-page "https://openjdk.java.net/projects/jdk/12")))
2192
2193 (define-public icedtea icedtea-8)
2194
2195 \f
2196 (define-public ant/java8
2197 (package (inherit ant-bootstrap)
2198 (name "ant")
2199 (version "1.10.1")
2200 (source (origin
2201 (method url-fetch)
2202 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2203 version "-src.tar.gz"))
2204 (sha256
2205 (base32
2206 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2207 (modules '((guix build utils)))
2208 (snippet
2209 '(begin
2210 (for-each delete-file
2211 (find-files "lib/optional" "\\.jar$"))
2212 #t))))
2213 (arguments
2214 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2215 ((#:phases phases)
2216 `(modify-phases ,phases
2217 (add-after 'unpack 'remove-scripts
2218 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2219 ;; wrappers.
2220 (lambda _
2221 (for-each delete-file
2222 (find-files "src/script"
2223 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2224 #t))
2225 (replace 'build
2226 (lambda* (#:key inputs outputs #:allow-other-keys)
2227 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2228
2229 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2230 ;; Ant to build. This is necessary in addition to disabling the
2231 ;; "check" phase, because the dependency on "test-jar" would always
2232 ;; result in the tests to be run.
2233 (substitute* "build.xml"
2234 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2235 (invoke "bash" "bootstrap.sh"
2236 (string-append "-Ddist.dir="
2237 (assoc-ref outputs "out")))))))))
2238 (native-inputs
2239 `(("jdk" ,icedtea-8 "jdk")
2240 ("zip" ,zip)
2241 ("unzip" ,unzip)))))
2242
2243 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2244 ;; requires Java 8.
2245 (define-public ant
2246 (package (inherit ant/java8)
2247 (version "1.9.9")
2248 (source (origin
2249 (method url-fetch)
2250 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2251 version "-src.tar.gz"))
2252 (sha256
2253 (base32
2254 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2255 (native-inputs
2256 `(("jdk" ,icedtea-7 "jdk")
2257 ("zip" ,zip)
2258 ("unzip" ,unzip)))))
2259
2260 (define-public ant-apache-bcel
2261 (package
2262 (inherit ant/java8)
2263 (name "ant-apache-bcel")
2264 (arguments
2265 (substitute-keyword-arguments (package-arguments ant/java8)
2266 ((#:phases phases)
2267 `(modify-phases ,phases
2268 (add-after 'unpack 'link-bcel
2269 (lambda* (#:key inputs #:allow-other-keys)
2270 (for-each (lambda (file)
2271 (symlink file
2272 (string-append "lib/optional/"
2273 (basename file))))
2274 (find-files (assoc-ref inputs "java-commons-bcel")
2275 "\\.jar$"))
2276 #t))
2277 (add-after 'build 'install
2278 (lambda* (#:key outputs #:allow-other-keys)
2279 (let* ((out (assoc-ref outputs "out"))
2280 (share (string-append out "/share/java"))
2281 (bin (string-append out "/bin"))
2282 (lib (string-append out "/lib")))
2283 (mkdir-p share)
2284 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2285 (delete-file-recursively bin)
2286 (delete-file-recursively lib)
2287 #t)))))))
2288 (inputs
2289 `(("java-commons-bcel" ,java-commons-bcel)
2290 ,@(package-inputs ant/java8)))))
2291
2292 (define-public ant-junit
2293 (package
2294 (inherit ant/java8)
2295 (name "ant-junit")
2296 (arguments
2297 (substitute-keyword-arguments (package-arguments ant/java8)
2298 ((#:phases phases)
2299 `(modify-phases ,phases
2300 (add-after 'unpack 'link-junit
2301 (lambda* (#:key inputs #:allow-other-keys)
2302 (for-each (lambda (file)
2303 (symlink file
2304 (string-append "lib/optional/"
2305 (basename file))))
2306 (find-files (assoc-ref inputs "java-junit")
2307 "\\.jar$"))
2308 #t))
2309 (add-after 'build 'install
2310 (lambda* (#:key outputs #:allow-other-keys)
2311 (let* ((out (assoc-ref outputs "out"))
2312 (share (string-append out "/share/java"))
2313 (bin (string-append out "/bin"))
2314 (lib (string-append out "/lib")))
2315 (mkdir-p share)
2316 (install-file (string-append lib "/ant-junit.jar") share)
2317 (delete-file-recursively bin)
2318 (delete-file-recursively lib)
2319 #t)))))))
2320 (inputs
2321 `(("java-junit" ,java-junit)
2322 ,@(package-inputs ant/java8)))))
2323
2324 (define-public javacc-4
2325 (package
2326 (name "javacc")
2327 (version "4.1")
2328 (source (origin
2329 (method git-fetch)
2330 (uri (git-reference
2331 (url "https://github.com/javacc/javacc.git")
2332 (commit "release_41")))
2333 (file-name (string-append "javacc-" version "-checkout"))
2334 (sha256
2335 (base32
2336 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2337 (modules '((guix build utils)))
2338 ;; delete bundled jars
2339 (snippet '(begin (delete-file-recursively "lib") #t))))
2340 (build-system ant-build-system)
2341 ;; Tests fail with
2342 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2343 ;; JAVACODE failed
2344 (arguments
2345 `(#:tests? #f
2346 #:phases
2347 (modify-phases %standard-phases
2348 ;; Delete tests to avoid build failure (we don't run them anyway).
2349 (add-after 'unpack 'delete-tests
2350 (lambda _
2351 (for-each delete-file
2352 '("src/org/javacc/JavaCCTestCase.java"
2353 "src/org/javacc/parser/ExpansionTest.java"
2354 "src/org/javacc/parser/OptionsTest.java"
2355 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2356 (for-each delete-file-recursively
2357 '("src/org/javacc/parser/test"
2358 "src/org/javacc/jjdoc/test"))
2359 #t))
2360 (replace 'install (install-jars "bin/lib")))))
2361 (home-page "https://javacc.org/")
2362 (synopsis "Java parser generator")
2363 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2364 generator for use with Java applications. A parser generator is a tool that
2365 reads a grammar specification and converts it to a Java program that can
2366 recognize matches to the grammar. In addition to the parser generator itself,
2367 JavaCC provides other standard capabilities related to parser generation such
2368 as tree building (via a tool called JJTree included with JavaCC), actions,
2369 debugging, etc.")
2370 (license license:bsd-3)))
2371
2372 (define-public javacc
2373 (package
2374 (inherit javacc-4)
2375 (version "7.0.4")
2376 (source
2377 (origin
2378 (method git-fetch)
2379 (uri (git-reference
2380 (url "https://github.com/javacc/javacc.git")
2381 (commit version)))
2382 (file-name (git-file-name "javacc" version))
2383 (sha256
2384 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2385 (modules '((guix build utils)))
2386 ;; Delete bundled jars.
2387 (snippet '(begin (for-each delete-file-recursively
2388 '("bootstrap" "lib"))
2389 #t))))
2390 (arguments
2391 `(#:make-flags ; bootstrap from javacc-4
2392 (list (string-append "-Dbootstrap-jar="
2393 (assoc-ref %build-inputs "javacc")
2394 "/share/java/javacc.jar"))
2395 #:test-target "test"
2396 #:phases
2397 (modify-phases %standard-phases
2398 (replace 'install (install-jars "target")))))
2399 (native-inputs
2400 `(("javacc" ,javacc-4)))))
2401
2402 ;; This is the last 3.x release of ECJ
2403 (define-public java-ecj-3
2404 (package
2405 (name "java-ecj")
2406 (version "3.8.2")
2407 (source (origin
2408 (method url-fetch)
2409 (uri (string-append "http://archive.eclipse.org/eclipse/"
2410 "downloads/drops/R-" version
2411 "-201301310800/ecjsrc-" version ".jar"))
2412 (sha256
2413 (base32
2414 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2415 (build-system ant-build-system)
2416 (arguments
2417 `(#:tests? #f ; none included
2418 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2419 #:make-flags (list "-f" "src/build.xml")
2420 #:build-target "build"
2421 #:phases
2422 (modify-phases %standard-phases
2423 (add-after 'unpack 'fix-manifest
2424 (lambda _
2425 ;; Record the main class to make ecj executable.
2426 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2427 (lambda (in out)
2428 (display "Manifest-Version: 1.0
2429 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2430 out)))
2431 #t))
2432 (replace 'install (install-jars ".")))))
2433 (home-page "https://eclipse.org")
2434 (synopsis "Eclipse Java development tools core batch compiler")
2435 (description "This package provides the Eclipse Java core batch compiler.")
2436 (license license:epl1.0)))
2437
2438 ;; This is needed for java-cisd-args4j
2439 (define-public java-ecj-3.5
2440 (package (inherit java-ecj-3)
2441 (version "3.5.1")
2442 (source (origin
2443 (method url-fetch/zipbomb)
2444 (uri (string-append "http://archive.eclipse.org/eclipse/"
2445 "downloads/drops/R-" version
2446 "-200909170800/ecjsrc-" version ".zip"))
2447 (sha256
2448 (base32
2449 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2450 (build-system ant-build-system)
2451 (arguments
2452 `(#:tests? #f ; none included
2453 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2454 #:build-target "build"
2455 #:phases
2456 (modify-phases %standard-phases
2457 (add-after 'unpack 'fix-manifest
2458 (lambda _
2459 ;; Record the main class to make ecj executable.
2460 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2461 (lambda (in out)
2462 (dump-port in out)
2463 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2464 out)))
2465 #t))
2466 (replace 'install (install-jars ".")))))
2467 (native-inputs
2468 `(("unzip" ,unzip)))))
2469
2470 (define-public java-ecj
2471 (package (inherit java-ecj-3)
2472 (version "4.6.3")
2473 (source
2474 (origin
2475 (method url-fetch)
2476 (uri (string-append
2477 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2478 version
2479 "-201703010400/ecjsrc-"
2480 version
2481 ".jar"))
2482 (sha256
2483 (base32
2484 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2485 (arguments
2486 `(#:tests? #f ; none included
2487 #:build-target "build"
2488 #:phases
2489 (modify-phases %standard-phases
2490 (add-after 'unpack 'fix-build.xml
2491 (lambda _
2492 (substitute* "src/build.xml"
2493 (("^.*MANIFEST.*$")
2494 ""))
2495 #t))
2496 (add-after 'unpack 'fix-prop
2497 (lambda _
2498 (substitute* "src/build.xml"
2499 (("^.*properties.*$")
2500 "<include name=\"**/*.properties\"/>
2501 <include name=\"**/*.props\"/>"))
2502 #t))
2503 (add-before 'build 'chdir
2504 (lambda _
2505 (chdir "src")
2506 #t))
2507 (replace 'install (install-jars ".")))))))
2508
2509 (define-public java-cisd-base
2510 (let ((revision 38938)
2511 (base-version "14.12.0"))
2512 (package
2513 (name "java-cisd-base")
2514 (version (string-append base-version "-" (number->string revision)))
2515 (source (origin
2516 (method svn-fetch)
2517 (uri (svn-reference
2518 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2519 "base/tags/release/"
2520 (version-major+minor base-version)
2521 ".x/" base-version "/base/"))
2522 (revision revision)))
2523 (file-name (string-append "java-cisd-base-" version "-checkout"))
2524 (sha256
2525 (base32
2526 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2527 (modules '((guix build utils)))
2528 (snippet
2529 '(begin
2530 ;; Delete included gradle jar
2531 (delete-file-recursively "gradle/wrapper")
2532 ;; Delete pre-built native libraries
2533 (delete-file-recursively "libs")
2534 #t))))
2535 (build-system ant-build-system)
2536 (arguments
2537 `(#:make-flags '("-file" "build/build.xml")
2538 #:test-target "jar-test"
2539 #:jdk ,icedtea-8
2540 #:phases
2541 (modify-phases %standard-phases
2542 (add-after 'unpack 'unpack-build-resources
2543 (lambda* (#:key inputs #:allow-other-keys)
2544 (copy-recursively (assoc-ref inputs "build-resources")
2545 "../build_resources")
2546 #t))
2547 (add-after 'unpack-build-resources 'fix-dependencies
2548 (lambda* (#:key inputs #:allow-other-keys)
2549 (substitute* "build/build.xml"
2550 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2551 (string-append (assoc-ref inputs "java-testng")
2552 "/share/java/java-testng.jar"))
2553 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2554 (string-append (assoc-ref inputs "java-commons-lang")
2555 "/share/java/commons-lang-"
2556 ,(package-version java-commons-lang) ".jar"))
2557 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2558 (string-append (assoc-ref inputs "java-commons-io")
2559 "/share/java/commons-io-"
2560 ,(package-version java-commons-io)
2561 "-SNAPSHOT.jar"))
2562 ;; Remove dependency on svn
2563 (("<build-info.*") "")
2564 (("\\$\\{revision.number\\}")
2565 ,(number->string revision))
2566 (("\\$\\{version.number\\}") ,base-version))
2567 ;; Remove dependency on classycle
2568 (substitute* "../build_resources/ant/build-common.xml"
2569 (("<taskdef name=\"dependency-checker.*") "")
2570 (("classname=\"classycle.*") "")
2571 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2572 #t))
2573 ;; A few tests fail because of the lack of a proper /etc/groups and
2574 ;; /etc/passwd file in the build container.
2575 (add-after 'unpack 'disable-broken-tests
2576 (lambda _
2577 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2578 (("Unix.isOperational\\(\\)") "false"))
2579 #t))
2580 ;; These decorators are almost useless and pull in an unpackaged
2581 ;; dependency.
2582 (add-after 'unpack 'remove-useless-decorators
2583 (lambda _
2584 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2585 (("@Private") "")
2586 (("import ch.rinn.restrictions.Private;") ""))
2587 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2588 (("@Friend.*") "")
2589 (("import ch.rinn.restrictions.Friend;") ""))
2590 #t))
2591 (add-before 'configure 'build-native-code
2592 (lambda* (#:key inputs #:allow-other-keys)
2593 (let ((jdk (assoc-ref inputs "jdk"))
2594 (dir ,(match (%current-system)
2595 ("i686-linux"
2596 "i386-Linux")
2597 ((or "armhf-linux" "aarch64-linux")
2598 "arm-Linux")
2599 ((or "x86_64-linux")
2600 "amd64-Linux")
2601 (_ "unknown-Linux"))))
2602 (with-directory-excursion "source/c"
2603 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2604 (string-append "-I" jdk "/include")
2605 (string-append "-I" jdk "/include/linux")
2606 "-o" "libunix.so")
2607 (invoke "gcc" "-shared" "-O3" "-fPIC"
2608 "-DMACHINE_BYTE_ORDER=1"
2609 "copyCommon.c"
2610 "copyByteChar.c"
2611 "copyByteDouble.c"
2612 "copyByteFloat.c"
2613 "copyByteInt.c"
2614 "copyByteLong.c"
2615 "copyByteShort.c"
2616 (string-append "-I" jdk "/include")
2617 (string-append "-I" jdk "/include/linux")
2618 "-o" "libnativedata.so"))
2619 (install-file "source/c/libunix.so"
2620 (string-append "libs/native/unix/" dir))
2621 (install-file "source/c/libnativedata.so"
2622 (string-append "libs/native/nativedata/" dir))
2623 #t)))
2624 ;; In the "check" phase we only build the test executable.
2625 (add-after 'check 'run-tests
2626 (lambda _
2627 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2628 (delete-file "targets/dist/sis-base-test.jar")
2629 #t))
2630 (replace 'install (install-jars "targets/dist")))))
2631 (native-inputs
2632 `(("jdk" ,icedtea-8)
2633 ("java-commons-lang" ,java-commons-lang)
2634 ("java-commons-io" ,java-commons-io)
2635 ("java-testng" ,java-testng)
2636 ("build-resources"
2637 ,(origin
2638 (method svn-fetch)
2639 (uri (svn-reference
2640 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2641 "base/tags/release/"
2642 (version-major+minor base-version)
2643 ".x/" base-version
2644 "/build_resources/"))
2645 (revision revision)))
2646 (sha256
2647 (base32
2648 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2649 (home-page "http://svnsis.ethz.ch")
2650 (synopsis "Utility classes for libraries from ETH Zurich")
2651 (description "This library supplies some utility classes needed for
2652 libraries from the SIS division at ETH Zurich like jHDF5.")
2653 ;; The C sources are under a non-copyleft license, which looks like a
2654 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2655 (license (list license:asl2.0
2656 (license:non-copyleft "file://source/c/COPYING"))))))
2657
2658 (define-public java-cisd-args4j
2659 (let ((revision 39162)
2660 (base-version "9.11.2"))
2661 (package
2662 (name "java-cisd-args4j")
2663 (version (string-append base-version "-" (number->string revision)))
2664 (source (origin
2665 (method svn-fetch)
2666 (uri (svn-reference
2667 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2668 "args4j/tags/release/"
2669 (version-major+minor base-version)
2670 ".x/" base-version "/args4j/"))
2671 (revision revision)))
2672 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2673 (sha256
2674 (base32
2675 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2676 (build-system ant-build-system)
2677 (arguments
2678 `(#:make-flags '("-file" "build/build.xml")
2679 #:tests? #f ; there are no tests
2680 ;; There are weird build failures with JDK8, such as: "The type
2681 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2682 ;; referenced from required .class files"
2683 #:jdk ,icedtea-7
2684 #:modules ((guix build ant-build-system)
2685 (guix build utils)
2686 (guix build java-utils)
2687 (sxml simple)
2688 (sxml transform)
2689 (sxml xpath))
2690 #:phases
2691 (modify-phases %standard-phases
2692 (add-after 'unpack 'unpack-build-resources
2693 (lambda* (#:key inputs #:allow-other-keys)
2694 (mkdir-p "../build_resources")
2695 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2696 "-C" "../build_resources"
2697 "--strip-components=1")
2698 (mkdir-p "../build_resources/lib")
2699 #t))
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 ;; FIXME: There should be a more convenient abstraction for
2703 ;; editing XML files.
2704 (with-directory-excursion "../build_resources/ant/"
2705 (chmod "build-common.xml" #o664)
2706 (call-with-output-file "build-common.xml.new"
2707 (lambda (port)
2708 (sxml->xml
2709 (pre-post-order
2710 (with-input-from-file "build-common.xml"
2711 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2712 `(;; Remove dependency on classycle and custom ant tasks
2713 (taskdef . ,(lambda (tag . kids)
2714 (let ((name ((sxpath '(name *text*)) kids)))
2715 (if (or (member "build-info" name)
2716 (member "dependency-checker" name)
2717 (member "build-java-subprojects" name)
2718 (member "project-classpath" name))
2719 '() ; skip
2720 `(,tag ,@kids)))))
2721 (typedef . ,(lambda (tag . kids)
2722 (let ((name ((sxpath '(name *text*)) kids)))
2723 (if (member "recursive-jar" name)
2724 '() ; skip
2725 `(,tag ,@kids)))))
2726 (build-java-subprojects . ,(lambda _ '()))
2727 ;; Ignore everything else
2728 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2729 (*text* . ,(lambda (_ txt) txt))))
2730 port)))
2731 (rename-file "build-common.xml.new" "build-common.xml"))
2732 (substitute* "build/build.xml"
2733 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2734 (string-append (assoc-ref inputs "java-cisd-base")
2735 "/share/java/sis-base.jar"))
2736 ;; Remove dependency on svn
2737 (("<build-info.*") "")
2738 (("\\$\\{revision.number\\}")
2739 ,(number->string revision))
2740 (("\\$\\{version.number\\}") ,base-version)
2741 ;; Don't use custom ant tasks.
2742 (("recursive-jar") "jar")
2743 (("<project-classpath.*") ""))
2744 #t))
2745 (replace 'install (install-jars "targets/dist")))))
2746 (inputs
2747 `(("java-cisd-base" ,java-cisd-base)))
2748 (native-inputs
2749 `(("ecj" ,java-ecj-3.5)
2750 ("build-resources"
2751 ,(origin
2752 (method svn-fetch)
2753 (uri (svn-reference
2754 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2755 "args4j/tags/release/"
2756 (version-major+minor base-version)
2757 ".x/" base-version
2758 "/build_resources/"))
2759 (revision revision)))
2760 (sha256
2761 (base32
2762 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2763 (modules '((guix build utils)))
2764 ;; Delete bundled pre-built jars.
2765 (snippet
2766 '(begin (delete-file-recursively "lib/") #t))))))
2767 (home-page "http://svnsis.ethz.ch")
2768 (synopsis "Command line parser library")
2769 (description "This package provides a parser for command line arguments.")
2770 (license license:asl2.0))))
2771
2772 (define-public java-cisd-jhdf5
2773 (let ((revision 39162)
2774 (base-version "14.12.6"))
2775 (package
2776 (name "java-cisd-jhdf5")
2777 (version (string-append base-version "-" (number->string revision)))
2778 (source (origin
2779 (method svn-fetch)
2780 (uri (svn-reference
2781 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2782 "jhdf5/tags/release/"
2783 (version-major+minor base-version)
2784 ".x/" base-version "/jhdf5/"))
2785 (revision revision)))
2786 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2787 (sha256
2788 (base32
2789 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2790 (modules '((guix build utils)))
2791 (snippet
2792 '(begin
2793 ;; Delete included gradle jar
2794 (delete-file-recursively "gradle/wrapper")
2795 ;; Delete pre-built native libraries
2796 (delete-file-recursively "libs")
2797 #t))))
2798 (build-system ant-build-system)
2799 (arguments
2800 `(#:make-flags '("-file" "build/build.xml")
2801 #:build-target "jar-all"
2802 #:test-target "jar-test"
2803 #:jdk ,icedtea-8
2804 #:phases
2805 (modify-phases %standard-phases
2806 ;; FIXME: this build phase fails.
2807 (delete 'generate-jar-indices)
2808 ;; Don't erase results from the build phase when building tests.
2809 (add-after 'unpack 'separate-test-target-from-clean
2810 (lambda _
2811 (substitute* "build/build.xml"
2812 (("\"jar-test\" depends=\"clean, ")
2813 "\"jar-test\" depends=\""))
2814 #t))
2815 (add-after 'unpack 'unpack-build-resources
2816 (lambda* (#:key inputs #:allow-other-keys)
2817 (copy-recursively (assoc-ref inputs "build-resources")
2818 "../build_resources")
2819 (delete-file-recursively "../build_resources/lib/")
2820 (mkdir-p "../build_resources/lib")
2821 ;; Remove dependency on classycle
2822 (substitute* "../build_resources/ant/build-common.xml"
2823 (("<taskdef name=\"dependency-checker.*") "")
2824 (("classname=\"classycle.*") "")
2825 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2826 ;; Remove dependency on svn
2827 (substitute* "build/build.xml"
2828 (("<build-info.*") "")
2829 (("\\$\\{revision.number\\}")
2830 ,(number->string revision))
2831 (("\\$\\{version.number\\}") ,base-version))
2832 #t))
2833 (add-after 'unpack-build-resources 'fix-dependencies
2834 (lambda* (#:key inputs #:allow-other-keys)
2835 (substitute* "../build_resources/ant/build-common.xml"
2836 (("../libraries/testng/testng-jdk15.jar")
2837 (string-append (assoc-ref inputs "java-testng")
2838 "/share/java/java-testng.jar")))
2839 (substitute* "build/build.xml"
2840 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2841 (string-append (assoc-ref inputs "java-cisd-base")
2842 "/share/java/sis-base.jar"))
2843 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2844 (string-append (assoc-ref inputs "java-cisd-args4j")
2845 "/share/java/cisd-args4j.jar"))
2846 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2847 (string-append (assoc-ref inputs "java-commons-lang")
2848 "/share/java/commons-lang-"
2849 ,(package-version java-commons-lang) ".jar"))
2850 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2851 (string-append (assoc-ref inputs "java-commons-io")
2852 "/share/java/commons-io-"
2853 ,(package-version java-commons-io)
2854 "-SNAPSHOT.jar"))
2855 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2856 (string-append (assoc-ref inputs "java-testng")
2857 "/share/java/java-testng.jar"))
2858 (("\\$\\{lib\\}/junit4/junit.jar")
2859 (string-append (assoc-ref inputs "java-junit")
2860 "/share/java/junit.jar"))
2861 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2862 (string-append (assoc-ref inputs "java-hamcrest-core")
2863 "/share/java/hamcrest-core.jar")))
2864 ;; Remove dependency on ch.rinn.restrictions
2865 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2866 (substitute* '("BitSetConversionUtils.java"
2867 "HDF5Utils.java")
2868 (("import ch.rinn.restrictions.Private;") "")
2869 (("@Private") "")))
2870 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2871 (substitute* '("BitSetConversionTest.java"
2872 "h5ar/HDF5ArchiverTest.java")
2873 (("import ch.rinn.restrictions.Friend;") "")
2874 (("@Friend.*") ""))
2875 ;; Remove leftovers from removing @Friend
2876 (substitute* "h5ar/HDF5ArchiverTest.java"
2877 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2878 "")))
2879 #t))
2880 (add-before 'configure 'build-native-library
2881 (lambda* (#:key inputs #:allow-other-keys)
2882 (let ((jdk (assoc-ref inputs "jdk"))
2883 (hdf5 (assoc-ref inputs "hdf5"))
2884 (dir ,(match (%current-system)
2885 ("i686-linux"
2886 "i386-Linux")
2887 ((or "armhf-linux" "aarch64-linux")
2888 "arm-Linux")
2889 ((or "x86_64-linux")
2890 "amd64-Linux")
2891 (_ "unknown-Linux"))))
2892 (with-directory-excursion "source/c"
2893 (apply invoke `("gcc" "-shared" "-O3"
2894 "-fPIC"
2895 "-Wl,--exclude-libs,ALL"
2896 ,@(find-files "jhdf5" "\\.c$")
2897 ,@(find-files "hdf-java" "\\.c$")
2898 ,(string-append "-I" hdf5 "/include")
2899 ,(string-append "-I" jdk "/include")
2900 ,(string-append "-I" jdk "/include/linux")
2901 ,(string-append hdf5 "/lib/libhdf5.a")
2902 "-o" "libjhdf5.so" "-lz")))
2903 (install-file "source/c/libjhdf5.so"
2904 (string-append "libs/native/jhdf5/" dir))
2905 #t)))
2906 ;; In the "check" phase we only build the test executable.
2907 (add-after 'check 'run-tests
2908 (lambda _
2909 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2910 (delete-file "targets/dist/sis-jhdf5-test.jar")
2911 #t))
2912 (replace 'install
2913 (install-jars "targets/dist")))))
2914 (inputs
2915 `(("java-cisd-base" ,java-cisd-base)
2916 ("java-cisd-args4j" ,java-cisd-args4j)
2917 ("java-commons-lang" ,java-commons-lang)
2918 ("java-commons-io" ,java-commons-io)
2919 ("hdf5" ,hdf5)
2920 ("zlib" ,zlib)))
2921 (native-inputs
2922 `(("jdk" ,icedtea-8)
2923 ("java-testng" ,java-testng)
2924 ("java-junit" ,java-junit)
2925 ("java-jmock" ,java-jmock)
2926 ("java-hamcrest-core" ,java-hamcrest-core)
2927 ("build-resources"
2928 ,(origin
2929 (method svn-fetch)
2930 (uri (svn-reference
2931 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2932 "jhdf5/tags/release/"
2933 (version-major+minor base-version)
2934 ".x/" base-version
2935 "/build_resources/"))
2936 (revision revision)))
2937 (sha256
2938 (base32
2939 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2940 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2941 (synopsis "Java binding for HDF5")
2942 (description "JHDF5 is a high-level API in Java for reading and writing
2943 HDF5 files, building on the libraries provided by the HDF Group.")
2944 ;; The C sources are under a non-copyleft license, which looks like a
2945 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2946 (license (list license:asl2.0
2947 (license:non-copyleft "file://source/c/COPYING"))))))
2948
2949 (define-public java-classpathx-servletapi
2950 (package
2951 (name "java-classpathx-servletapi")
2952 (version "3.0.1")
2953 (source (origin
2954 (method url-fetch)
2955 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2956 "servletapi-" version ".tar.gz"))
2957 (sha256
2958 (base32
2959 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2960 (build-system ant-build-system)
2961 (arguments
2962 `(#:tests? #f ; there is no test target
2963 #:build-target "compile"
2964 #:make-flags
2965 (list "-Dbuild.compiler=javac1.8"
2966 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2967 #:phases
2968 (modify-phases %standard-phases
2969 (replace 'install
2970 (lambda* (#:key make-flags #:allow-other-keys)
2971 (apply invoke `("ant" "dist" ,@make-flags)))))))
2972 (home-page "https://www.gnu.org/software/classpathx/")
2973 (synopsis "Java servlet API implementation")
2974 (description "This is the GNU servlet API distribution, part of the
2975 ClasspathX project. It provides implementations of version 3.0 of the servlet
2976 API and version 2.1 of the Java ServerPages API.")
2977 (license license:gpl3+)))
2978
2979 (define-public java-javaee-servletapi
2980 (package
2981 (name "java-javaee-servletapi")
2982 (version "3.1.0")
2983 (source (origin
2984 (method git-fetch)
2985 (uri (git-reference
2986 (url "https://github.com/javaee/servlet-spec.git")
2987 (commit version)))
2988 (file-name (git-file-name name version))
2989 (sha256
2990 (base32
2991 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
2992 (build-system ant-build-system)
2993 (arguments
2994 `(#:jar-name "javax-servletapi.jar"
2995 ;; no tests
2996 #:tests? #f
2997 #:source-dir "src/main/java"
2998 #:phases
2999 (modify-phases %standard-phases
3000 (add-before 'build 'copy-resources
3001 (lambda _
3002 (mkdir-p "build/classes/javax/servlet/http")
3003 (let ((from-prefix "src/main/java/javax/servlet/")
3004 (to-prefix "build/classes/javax/servlet/"))
3005 (for-each (lambda (f)
3006 (copy-file (string-append from-prefix f)
3007 (string-append to-prefix f)))
3008 (list "LocalStrings_ja.properties"
3009 "LocalStrings.properties"
3010 "LocalStrings_fr.properties"
3011 "http/LocalStrings_es.properties"
3012 "http/LocalStrings_ja.properties"
3013 "http/LocalStrings.properties"
3014 "http/LocalStrings_fr.properties")))
3015 #t)))))
3016 (native-inputs
3017 `(("unzip" ,unzip)))
3018 (home-page "https://javaee.github.io/servlet-spec/")
3019 (synopsis "Java servlet API")
3020 (description "Java Servlet is the foundation web specification in the
3021 Java Enterprise Platform. Developers can build web applications using the
3022 Servlet API to interact with the request/response workflow. This project
3023 provides information on the continued development of the Java Servlet
3024 specification.")
3025 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3026 ;; Some files are licensed under ASL 2.0.
3027 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3028
3029 (define-public java-swt
3030 (package
3031 (name "java-swt")
3032 (version "4.7.1a")
3033 (source
3034 ;; The types of many variables and procedures differ in the sources
3035 ;; dependent on whether the target architecture is a 32-bit system or a
3036 ;; 64-bit system. Instead of patching the sources on demand in a build
3037 ;; phase we download either the 32-bit archive (which mostly uses "int"
3038 ;; types) or the 64-bit archive (which mostly uses "long" types).
3039 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3040 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3041 (file32 "x86")
3042 (file64 "x86_64"))
3043 (let-values (((hash file)
3044 (match (or (%current-target-system) (%current-system))
3045 ("x86_64-linux" (values hash64 file64))
3046 (_ (values hash32 file32)))))
3047 (origin
3048 (method url-fetch)
3049 (uri (string-append
3050 "http://download.eclipse.org/eclipse/downloads/drops4/"
3051 "R-" version "-201710090410/swt-" version
3052 "-gtk-linux-" file ".zip"))
3053 (sha256 (base32 hash))))))
3054 (build-system ant-build-system)
3055 (arguments
3056 `(#:jar-name "swt.jar"
3057 #:jdk ,icedtea-8
3058 #:tests? #f ; no "check" target
3059 #:phases
3060 (modify-phases %standard-phases
3061 (replace 'unpack
3062 (lambda* (#:key source #:allow-other-keys)
3063 (mkdir "swt")
3064 (invoke "unzip" source "-d" "swt")
3065 (chdir "swt")
3066 (mkdir "src")
3067 (invoke "unzip" "src.zip" "-d" "src")))
3068 ;; The classpath contains invalid icecat jars. Since we don't need
3069 ;; anything other than the JDK on the classpath, we can simply unset
3070 ;; it.
3071 (add-after 'configure 'unset-classpath
3072 (lambda _ (unsetenv "CLASSPATH") #t))
3073 (add-before 'build 'build-native
3074 (lambda* (#:key inputs outputs #:allow-other-keys)
3075 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3076 ;; Build shared libraries. Users of SWT have to set the system
3077 ;; property swt.library.path to the "lib" directory of this
3078 ;; package output.
3079 (mkdir-p lib)
3080 (setenv "OUTPUT_DIR" lib)
3081 (with-directory-excursion "src"
3082 (invoke "bash" "build.sh")))))
3083 (add-after 'install 'install-native
3084 (lambda* (#:key outputs #:allow-other-keys)
3085 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3086 (for-each (lambda (file)
3087 (install-file file lib))
3088 (find-files "." "\\.so$"))
3089 #t))))))
3090 (inputs
3091 `(("gtk" ,gtk+-2)
3092 ("libxtst" ,libxtst)
3093 ("libxt" ,libxt)
3094 ("mesa" ,mesa)
3095 ("glu" ,glu)))
3096 (native-inputs
3097 `(("pkg-config" ,pkg-config)
3098 ("unzip" ,unzip)))
3099 (home-page "https://www.eclipse.org/swt/")
3100 (synopsis "Widget toolkit for Java")
3101 (description
3102 "SWT is a widget toolkit for Java designed to provide efficient, portable
3103 access to the user-interface facilities of the operating systems on which it
3104 is implemented.")
3105 ;; SWT code is licensed under EPL1.0
3106 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3107 ;; Cairo bindings contain code under MPL1.1
3108 ;; XULRunner 1.9 bindings contain code under MPL2.0
3109 (license (list
3110 license:epl1.0
3111 license:mpl1.1
3112 license:mpl2.0
3113 license:lgpl2.1+))))
3114
3115 (define-public java-xz
3116 (package
3117 (name "java-xz")
3118 (version "1.6")
3119 (source (origin
3120 (method url-fetch)
3121 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3122 (sha256
3123 (base32
3124 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3125 (build-system ant-build-system)
3126 (arguments
3127 `(#:tests? #f ; There are no tests to run.
3128 #:jar-name ,(string-append "xz-" version ".jar")
3129 #:phases
3130 (modify-phases %standard-phases
3131 ;; The unpack phase enters the "maven" directory by accident.
3132 (add-after 'unpack 'chdir
3133 (lambda _ (chdir "..") #t)))))
3134 (native-inputs
3135 `(("unzip" ,unzip)))
3136 (home-page "https://tukaani.org/xz/java.html")
3137 (synopsis "Implementation of XZ data compression in pure Java")
3138 (description "This library aims to be a complete implementation of XZ data
3139 compression in pure Java. Single-threaded streamed compression and
3140 decompression and random access decompression have been fully implemented.")
3141 (license license:public-domain)))
3142
3143 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3144 ;; of the latest release.
3145 (define-public java-qdox-1.12
3146 (package
3147 (name "java-qdox")
3148 (version "1.12.1")
3149 (source (origin
3150 (method url-fetch)
3151 (uri (string-append "http://central.maven.org/maven2/"
3152 "com/thoughtworks/qdox/qdox/" version
3153 "/qdox-" version "-sources.jar"))
3154 (sha256
3155 (base32
3156 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3157 (build-system ant-build-system)
3158 (arguments
3159 `(;; Tests require junit
3160 #:tests? #f
3161 #:jar-name "qdox.jar"
3162 #:phases
3163 (modify-phases %standard-phases
3164 (replace 'unpack
3165 (lambda* (#:key source #:allow-other-keys)
3166 (mkdir "src")
3167 (with-directory-excursion "src"
3168 (invoke "jar" "-xf" source))))
3169 ;; At this point we don't have junit, so we must remove the API
3170 ;; tests.
3171 (add-after 'unpack 'delete-tests
3172 (lambda _
3173 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3174 #t)))))
3175 (home-page "http://qdox.codehaus.org/")
3176 (synopsis "Parse definitions from Java source files")
3177 (description
3178 "QDox is a high speed, small footprint parser for extracting
3179 class/interface/method definitions from source files complete with JavaDoc
3180 @code{@@tags}. It is designed to be used by active code generators or
3181 documentation tools.")
3182 (license license:asl2.0)))
3183
3184 (define-public java-jarjar
3185 (package
3186 (name "java-jarjar")
3187 (version "1.4")
3188 (source (origin
3189 (method url-fetch)
3190 (uri (string-append
3191 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3192 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3193 (sha256
3194 (base32
3195 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3196 (modules '((guix build utils)))
3197 (snippet
3198 '(begin
3199 ;; Delete bundled thirds-party jar archives.
3200 ;; TODO: unbundle maven-plugin-api.
3201 (delete-file "lib/asm-4.0.jar")
3202 (delete-file "lib/asm-commons-4.0.jar")
3203 (delete-file "lib/junit-4.8.1.jar")
3204 #t))))
3205 (build-system ant-build-system)
3206 (arguments
3207 `(;; Tests require junit, which ultimately depends on this package.
3208 #:tests? #f
3209 #:build-target "jar"
3210 #:phases
3211 (modify-phases %standard-phases
3212 (add-before 'build 'do-not-use-bundled-asm
3213 (lambda* (#:key inputs #:allow-other-keys)
3214 (substitute* "build.xml"
3215 (("<path id=\"path.build\">")
3216 (string-append "<path id=\"path.build\"><fileset dir=\""
3217 (assoc-ref inputs "java-asm-bootstrap")
3218 "/share/java\" includes=\"**/*.jar\"/>"))
3219 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3220 (("lib/asm-commons-4.0.jar")
3221 (string-append (assoc-ref inputs "java-asm-bootstrap")
3222 "/share/java/asm-6.0.jar"))
3223 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3224 (string-append "<include name=\"org/objectweb/asm/"
3225 "commons/Remap*.class\"/>"
3226 "<include name=\"org/objectweb/asm/*.class\"/>"
3227 "<include name=\"org/objectweb/asm/"
3228 "signature/*.class\"/>"
3229 "<include name=\"org/objectweb/asm/"
3230 "commons/SignatureRemapper.class\"/>")))
3231 #t))
3232 (replace 'install
3233 (lambda* (#:key outputs #:allow-other-keys)
3234 (let ((target (string-append (assoc-ref outputs "out")
3235 "/share/java")))
3236 (install-file (string-append "dist/jarjar-" ,version ".jar")
3237 target))
3238 #t)))))
3239 (inputs
3240 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3241 (native-inputs
3242 `(("unzip" ,unzip)))
3243 (home-page "https://code.google.com/archive/p/jarjar/")
3244 (synopsis "Repackage Java libraries")
3245 (description
3246 "Jar Jar Links is a utility that makes it easy to repackage Java
3247 libraries and embed them into your own distribution. Jar Jar Links includes
3248 an Ant task that extends the built-in @code{jar} task.")
3249 (license license:asl2.0)))
3250
3251 (define-public java-hamcrest-core
3252 (package
3253 (name "java-hamcrest-core")
3254 (version "1.3")
3255 (source (origin
3256 (method url-fetch)
3257 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3258 "archive/hamcrest-java-" version ".tar.gz"))
3259 (sha256
3260 (base32
3261 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3262 (modules '((guix build utils)))
3263 (snippet
3264 '(begin
3265 ;; Delete bundled thirds-party jar archives.
3266 (delete-file-recursively "lib")
3267 #t))))
3268 (build-system ant-build-system)
3269 (arguments
3270 `(#:tests? #f ; Tests require junit
3271 #:modules ((guix build ant-build-system)
3272 (guix build utils)
3273 (srfi srfi-1))
3274 #:make-flags (list (string-append "-Dversion=" ,version))
3275 #:test-target "unit-test"
3276 #:build-target "core"
3277 #:phases
3278 (modify-phases %standard-phases
3279 ;; Disable unit tests, because they require junit, which requires
3280 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3281 ;; attribute from the manifest for reproducibility.
3282 (add-before 'configure 'patch-build.xml
3283 (lambda _
3284 (substitute* "build.xml"
3285 (("unit-test, ") "")
3286 (("\\$\\{build.timestamp\\}") "guix"))
3287 #t))
3288 ;; Java's "getMethods()" returns methods in an unpredictable order.
3289 ;; To make the output of the generated code deterministic we must
3290 ;; sort the array of methods.
3291 (add-after 'unpack 'make-method-order-deterministic
3292 (lambda _
3293 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3294 (("import java\\.util\\.Iterator;" line)
3295 (string-append line "\n"
3296 "import java.util.Arrays; import java.util.Comparator;"))
3297 (("allMethods = cls\\.getMethods\\(\\);" line)
3298 (string-append "_" line
3299 "
3300 private Method[] getSortedMethods() {
3301 Arrays.sort(_allMethods, new Comparator<Method>() {
3302 @Override
3303 public int compare(Method a, Method b) {
3304 return a.toString().compareTo(b.toString());
3305 }
3306 });
3307 return _allMethods;
3308 }
3309
3310 private Method[] allMethods = getSortedMethods();")))
3311 #t))
3312 (add-before 'build 'do-not-use-bundled-qdox
3313 (lambda* (#:key inputs #:allow-other-keys)
3314 (substitute* "build.xml"
3315 (("lib/generator/qdox-1.12.jar")
3316 (string-append (assoc-ref inputs "java-qdox-1.12")
3317 "/share/java/qdox.jar")))
3318 #t))
3319 ;; build.xml searches for .jar files in this directoy, which
3320 ;; we remove from the source archive.
3321 (add-before 'build 'create-dummy-directories
3322 (lambda _
3323 (mkdir-p "lib/integration")
3324 #t))
3325 (replace 'install
3326 (lambda* (#:key outputs #:allow-other-keys)
3327 (let* ((target (string-append (assoc-ref outputs "out")
3328 "/share/java/"))
3329 (version-suffix ,(string-append "-" version ".jar"))
3330 (install-without-version-suffix
3331 (lambda (jar)
3332 (copy-file jar
3333 (string-append target
3334 (basename jar version-suffix)
3335 ".jar")))))
3336 (mkdir-p target)
3337 (for-each
3338 install-without-version-suffix
3339 (find-files "build"
3340 (lambda (name _)
3341 (and (string-suffix? ".jar" name)
3342 (not (string-suffix? "-sources.jar" name)))))))
3343 #t)))))
3344 (native-inputs
3345 `(("java-qdox-1.12" ,java-qdox-1.12)
3346 ("java-jarjar" ,java-jarjar)))
3347 (home-page "http://hamcrest.org/")
3348 (synopsis "Library of matchers for building test expressions")
3349 (description
3350 "This package provides a library of matcher objects (also known as
3351 constraints or predicates) allowing @code{match} rules to be defined
3352 declaratively, to be used in other frameworks. Typical scenarios include
3353 testing frameworks, mocking libraries and UI validation rules.")
3354 (license license:bsd-2)))
3355
3356 (define-public java-junit
3357 (package
3358 (name "java-junit")
3359 (version "4.12")
3360 (source (origin
3361 (method url-fetch)
3362 (uri (string-append "https://github.com/junit-team/junit/"
3363 "archive/r" version ".tar.gz"))
3364 (file-name (string-append name "-" version ".tar.gz"))
3365 (sha256
3366 (base32
3367 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3368 (modules '((guix build utils)))
3369 (snippet
3370 '(begin
3371 ;; Delete bundled jar archives.
3372 (delete-file-recursively "lib")
3373 #t))))
3374 (build-system ant-build-system)
3375 (arguments
3376 `(#:tests? #f ; no tests
3377 #:jar-name "junit.jar"))
3378 (inputs
3379 `(("java-hamcrest-core" ,java-hamcrest-core)))
3380 (home-page "http://junit.org/")
3381 (synopsis "Test framework for Java")
3382 (description
3383 "JUnit is a simple framework to write repeatable tests for Java projects.
3384 JUnit provides assertions for testing expected results, test fixtures for
3385 sharing common test data, and test runners for running tests.")
3386 (license license:epl1.0)))
3387
3388 (define-public java-plexus-utils
3389 (package
3390 (name "java-plexus-utils")
3391 (version "3.2.0")
3392 (source (origin
3393 (method url-fetch)
3394 (uri (string-append "https://github.com/codehaus-plexus/"
3395 "plexus-utils/archive/plexus-utils-"
3396 version ".tar.gz"))
3397 (sha256
3398 (base32
3399 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3400 (build-system ant-build-system)
3401 ;; FIXME: The default build.xml does not include a target to install
3402 ;; javadoc files.
3403 (arguments
3404 `(#:jar-name "plexus-utils.jar"
3405 #:source-dir "src/main"
3406 #:phases
3407 (modify-phases %standard-phases
3408 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3409 (lambda _
3410 (substitute* "src/main/java/org/codehaus/plexus/util/\
3411 cli/shell/BourneShell.java"
3412 (("/bin/sh") (which "sh"))
3413 (("/usr/") (getcwd)))
3414 #t))
3415 (add-after 'unpack 'fix-or-disable-broken-tests
3416 (lambda _
3417 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3418 (substitute* '("cli/CommandlineTest.java"
3419 "cli/shell/BourneShellTest.java")
3420 (("/bin/sh") (which "sh"))
3421 (("/bin/echo") (which "echo")))
3422
3423 ;; This test depends on MavenProjectStub, but we don't have
3424 ;; a package for Maven.
3425 (delete-file "introspection/ReflectionValueExtractorTest.java")
3426
3427 ;; FIXME: The command line tests fail, maybe because they use
3428 ;; absolute paths.
3429 (delete-file "cli/CommandlineTest.java"))
3430 #t)))))
3431 (native-inputs
3432 `(("java-hamcrest-core" ,java-hamcrest-core)
3433 ("java-junit" ,java-junit)))
3434 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3435 (synopsis "Common utilities for the Plexus framework")
3436 (description "This package provides various Java utility classes for the
3437 Plexus framework to ease working with strings, files, command lines, XML and
3438 more.")
3439 (license license:asl2.0)))
3440
3441 (define-public java-plexus-interpolation
3442 (package
3443 (name "java-plexus-interpolation")
3444 (version "1.23")
3445 (source (origin
3446 (method url-fetch)
3447 (uri (string-append "https://github.com/codehaus-plexus/"
3448 "plexus-interpolation/archive/"
3449 "plexus-interpolation-" version ".tar.gz"))
3450 (sha256
3451 (base32
3452 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3453 (build-system ant-build-system)
3454 (arguments
3455 `(#:jar-name "plexus-interpolation.jar"
3456 #:source-dir "src/main"))
3457 (native-inputs
3458 `(("java-junit" ,java-junit)
3459 ("java-hamcrest-core" ,java-hamcrest-core)))
3460 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3461 (synopsis "Java components for interpolating ${} strings and the like")
3462 (description "Plexus interpolator is a modular, flexible interpolation
3463 framework for the expression language style commonly seen in Maven, Plexus,
3464 and other related projects.
3465
3466 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3467 package within @code{plexus-utils}, but has been separated in order to allow
3468 these two libraries to vary independently of one another.")
3469 (license license:asl2.0)))
3470
3471 (define-public java-plexus-classworlds
3472 (package
3473 (name "java-plexus-classworlds")
3474 (version "2.5.2")
3475 (source (origin
3476 (method url-fetch)
3477 (uri (string-append "https://github.com/codehaus-plexus/"
3478 "plexus-classworlds/archive/plexus-classworlds-"
3479 version ".tar.gz"))
3480 (sha256
3481 (base32
3482 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3483 (build-system ant-build-system)
3484 (arguments
3485 `(#:jar-name "plexus-classworlds.jar"
3486 #:source-dir "src/main"
3487 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3488 (native-inputs
3489 `(("java-junit" ,java-junit)))
3490 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3491 (synopsis "Java class loader framework")
3492 (description "Plexus classworlds replaces the native @code{ClassLoader}
3493 mechanism of Java. It is especially useful for dynamic loading of application
3494 components.")
3495 (license license:asl2.0)))
3496
3497 (define java-plexus-container-default-bootstrap
3498 (package
3499 (name "java-plexus-container-default-bootstrap")
3500 (version "1.7.1")
3501 (source (origin
3502 (method url-fetch)
3503 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3504 "/archive/plexus-containers-" version ".tar.gz"))
3505 (sha256
3506 (base32
3507 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3508 (build-system ant-build-system)
3509 (arguments
3510 `(#:jar-name "container-default.jar"
3511 #:source-dir "plexus-container-default/src/main/java"
3512 #:test-dir "plexus-container-default/src/test"
3513 #:jdk ,icedtea-8
3514 #:tests? #f; requires plexus-archiver, which depends on this package
3515 #:phases
3516 (modify-phases %standard-phases
3517 (add-before 'build 'copy-resources
3518 (lambda _
3519 (copy-recursively
3520 "plexus-container-default/src/main/resources/"
3521 "build/classes")
3522 #t)))))
3523 (inputs
3524 `(("worldclass" ,java-plexus-classworlds)
3525 ("xbean" ,java-geronimo-xbean-reflect)
3526 ("utils" ,java-plexus-utils)
3527 ("junit" ,java-junit)
3528 ("guava" ,java-guava)))
3529 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3530 (synopsis "Inversion-of-control container")
3531 (description "Plexus-default-container is Plexus' inversion-of-control
3532 (@dfn{IoC}) container. It is composed of its public API and its default
3533 implementation.")
3534 (license license:asl2.0)))
3535
3536 (define-public java-plexus-io
3537 (package
3538 (name "java-plexus-io")
3539 (version "3.0.0")
3540 (source (origin
3541 (method url-fetch)
3542 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3543 "/archive/plexus-io-" version ".tar.gz"))
3544 (sha256
3545 (base32
3546 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3547 (build-system ant-build-system)
3548 (arguments
3549 `(#:jar-name "plexus-io.jar"
3550 #:source-dir "src/main/java"
3551 #:test-dir "src/test"
3552 #:jdk ,icedtea-8
3553 #:phases
3554 (modify-phases %standard-phases
3555 (add-before 'build 'copy-resources
3556 (lambda _
3557 (mkdir-p "build/classes/META-INF/plexus")
3558 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3559 "build/classes/META-INF/plexus/components.xml")
3560 #t)))))
3561 (inputs
3562 `(("utils" ,java-plexus-utils)
3563 ("commons-io" ,java-commons-io)
3564 ("java-jsr305" ,java-jsr305)))
3565 (native-inputs
3566 `(("junit" ,java-junit)
3567 ("hamcrest" ,java-hamcrest-core)
3568 ("guava" ,java-guava)
3569 ("classworlds" ,java-plexus-classworlds)
3570 ("xbean" ,java-geronimo-xbean-reflect)
3571 ("container-default" ,java-plexus-container-default-bootstrap)))
3572 (home-page "https://github.com/codehaus-plexus/plexus-io")
3573 (synopsis "I/O plexus components")
3574 (description "Plexus IO is a set of plexus components, which are designed
3575 for use in I/O operations. This implementation using plexus components allows
3576 reusing it in maven.")
3577 (license license:asl2.0)))
3578
3579 (define-public java-plexus-archiver
3580 (package
3581 (name "java-plexus-archiver")
3582 (version "4.1.0")
3583 (source (origin
3584 (method url-fetch)
3585 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3586 "/archive/plexus-archiver-" version ".tar.gz"))
3587 (sha256
3588 (base32
3589 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3590 (build-system ant-build-system)
3591 (arguments
3592 `(#:jar-name "plexus-archiver.jar"
3593 #:source-dir "src/main/java"
3594 #:jdk ,icedtea-8
3595 #:test-dir "src/test"
3596 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3597 #:phases
3598 (modify-phases %standard-phases
3599 (add-before 'check 'remove-failing
3600 (lambda _
3601 ;; Requires an older version of plexus container
3602 (delete-file
3603 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3604 #t))
3605 (add-before 'check 'fix-test-building
3606 (lambda _
3607 (substitute* "build.xml"
3608 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3609 #t))
3610 (add-before 'build 'copy-resources
3611 (lambda _
3612 (mkdir-p "build/classes/META-INF/plexus")
3613 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3614 "build/classes/META-INF/plexus/components.xml")
3615 #t)))))
3616 (inputs
3617 `(("utils" ,java-plexus-utils)
3618 ("commons-io" ,java-commons-io)
3619 ("snappy" ,java-iq80-snappy)
3620 ("io" ,java-plexus-io)
3621 ("compress" ,java-commons-compress)
3622 ("container-default" ,java-plexus-container-default-bootstrap)
3623 ("snappy" ,java-snappy)
3624 ("java-jsr305" ,java-jsr305)))
3625 (native-inputs
3626 `(("java-hamcrest-core" ,java-hamcrest-core)
3627 ("junit" ,java-junit)
3628 ("classworld" ,java-plexus-classworlds)
3629 ("xbean" ,java-geronimo-xbean-reflect)
3630 ("xz" ,java-tukaani-xz)
3631 ("guava" ,java-guava)))
3632 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3633 (synopsis "Archiver component of the Plexus project")
3634 (description "Plexus-archiver contains a component to deal with project
3635 archives (jar).")
3636 (license license:asl2.0)))
3637
3638 (define-public java-plexus-container-default
3639 (package
3640 (inherit java-plexus-container-default-bootstrap)
3641 (name "java-plexus-container-default")
3642 (arguments
3643 `(#:jar-name "container-default.jar"
3644 #:source-dir "plexus-container-default/src/main/java"
3645 #:test-dir "plexus-container-default/src/test"
3646 #:test-exclude (list ;"**/*Test.java"
3647 "**/Abstract*.java"
3648 ;; Requires plexus-hierarchy
3649 "**/PlexusHierarchyTest.java"
3650 ;; Failures
3651 "**/ComponentRealmCompositionTest.java"
3652 "**/PlexusContainerTest.java")
3653 #:jdk ,icedtea-8
3654 #:phases
3655 (modify-phases %standard-phases
3656 (add-before 'build 'copy-resources
3657 (lambda _
3658 (copy-recursively
3659 "plexus-container-default/src/main/resources/"
3660 "build/classes")
3661 #t))
3662 (add-before 'check 'fix-paths
3663 (lambda _
3664 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3665 (substitute*
3666 (string-append
3667 dir "/plexus/component/composition/"
3668 "ComponentRealmCompositionTest.java")
3669 (("src/test") "plexus-container-default/src/test"))
3670 #t))))))
3671 (inputs
3672 `(("worldclass" ,java-plexus-classworlds)
3673 ("xbean" ,java-geronimo-xbean-reflect)
3674 ("utils" ,java-plexus-utils)
3675 ("junit" ,java-junit)
3676 ("guava" ,java-guava)))
3677 (native-inputs
3678 `(("archiver" ,java-plexus-archiver)
3679 ("hamcrest" ,java-hamcrest-core)))))
3680
3681 (define-public java-plexus-component-annotations
3682 (package
3683 (inherit java-plexus-container-default)
3684 (name "java-plexus-component-annotations")
3685 (arguments
3686 `(#:jar-name "plexus-component-annotations.jar"
3687 #:source-dir "plexus-component-annotations/src/main/java"
3688 #:tests? #f)); no tests
3689 (inputs '())
3690 (native-inputs '())
3691 (synopsis "Plexus descriptors generator")
3692 (description "This package is a Maven plugin to generate Plexus descriptors
3693 from source tags and class annotations.")))
3694
3695 (define-public java-plexus-cipher
3696 (package
3697 (name "java-plexus-cipher")
3698 (version "1.7")
3699 (source (origin
3700 (method url-fetch)
3701 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3702 "/archive/plexus-cipher-" version ".tar.gz"))
3703 (sha256
3704 (base32
3705 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3706 (build-system ant-build-system)
3707 (arguments
3708 `(#:jar-name "plexus-cipher.jar"
3709 #:source-dir "src/main/java"
3710 #:jdk ,icedtea-8
3711 #:tests? #f; FIXME: requires sisu-inject-bean
3712 #:phases
3713 (modify-phases %standard-phases
3714 (add-before 'build 'copy-resources
3715 (lambda _
3716 (copy-recursively "src/main/resources" "build/classes")
3717 (mkdir-p "build/classes/META-INF/sisu")
3718 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3719 (lambda _
3720 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3721 #t)))))
3722 (inputs
3723 `(("java-cdi-api" ,java-cdi-api)
3724 ("java-javax-inject" ,java-javax-inject)))
3725 (home-page "https://github.com/sonatype/plexus-cipher")
3726 (synopsis "Encryption/decryption Component")
3727 (description "Plexus-cipher contains a component to deal with encryption
3728 and decryption.")
3729 (license license:asl2.0)))
3730
3731 (define-public java-plexus-compiler-api
3732 (package
3733 (name "java-plexus-compiler-api")
3734 (version "2.8.4")
3735 (source (origin
3736 (method url-fetch)
3737 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3738 "/archive/plexus-compiler-" version ".tar.gz"))
3739 (sha256
3740 (base32
3741 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3742 (build-system ant-build-system)
3743 (arguments
3744 `(#:jar-name "plexus-compiler-api.jar"
3745 #:source-dir "plexus-compiler-api/src/main/java"
3746 #:jdk ,icedtea-8
3747 #:test-dir "plexus-compiler-api/src/test"))
3748 (inputs
3749 `(("java-plexus-container-default" ,java-plexus-container-default)
3750 ("java-plexus-util" ,java-plexus-utils)))
3751 (native-inputs
3752 `(("java-junit" ,java-junit)))
3753 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3754 (synopsis "Plexus Compilers component's API to manipulate compilers")
3755 (description "This package contains the API used by components to manipulate
3756 compilers.")
3757 (license (list license:asl2.0
3758 license:expat))))
3759
3760 (define-public java-plexus-compiler-javac
3761 (package
3762 (inherit java-plexus-compiler-api)
3763 (name "java-plexus-compiler-javac")
3764 (arguments
3765 `(#:jar-name "plexus-compiler-javac.jar"
3766 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3767 #:jdk ,icedtea-8
3768 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3769 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3770 (inputs
3771 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3772 ("java-plexus-utils" ,java-plexus-utils)
3773 ("java-plexus-container-default" ,java-plexus-container-default)))
3774 (native-inputs
3775 `(("java-junit" ,java-junit)))
3776 (synopsis "Javac Compiler support for Plexus Compiler component")
3777 (description "This package contains the Javac Compiler support for Plexus
3778 Compiler component.")))
3779
3780 (define-public java-plexus-sec-dispatcher
3781 (package
3782 (name "java-plexus-sec-dispatcher")
3783 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3784 (source (origin
3785 ;; This project doesn't tag releases or publish tarballs, so we take
3786 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3787 (method url-fetch)
3788 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3789 "archive/7db8f88048.tar.gz"))
3790 (sha256
3791 (base32
3792 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3793 (file-name (string-append name "-" version ".tar.gz"))))
3794 (arguments
3795 `(#:jar-name "plexus-sec-dispatcher.jar"
3796 #:source-dir "src/main/java"
3797 #:jdk ,icedtea-8
3798 #:phases
3799 (modify-phases %standard-phases
3800 (add-before 'build 'generate-models
3801 (lambda* (#:key inputs #:allow-other-keys)
3802 (define (modello-single-mode file version mode)
3803 (invoke "java"
3804 "org.codehaus.modello.ModelloCli"
3805 file mode "src/main/java" version
3806 "false" "true"))
3807 (let ((file "src/main/mdo/settings-security.mdo"))
3808 (modello-single-mode file "1.0.0" "java")
3809 (modello-single-mode file "1.0.0" "xpp3-reader")
3810 (modello-single-mode file "1.0.0" "xpp3-writer"))
3811 #t))
3812 (add-before 'build 'generate-components.xml
3813 (lambda _
3814 (mkdir-p "build/classes/META-INF/plexus")
3815 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3816 (lambda _
3817 (display
3818 "<component-set>\n
3819 <components>\n
3820 <component>\n
3821 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3822 <role-hint>default</role-hint>\n
3823 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3824 <description></description>\n
3825 <requirements>\n
3826 <requirement>\n
3827 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3828 <field-name>_cipher</field-name>\n
3829 </requirement>\n
3830 <requirement>\n
3831 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3832 <field-name>_decryptors</field-name>\n
3833 </requirement>\n
3834 </requirements>\n
3835 <configuration>\n
3836 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3837 </configuration>\n
3838 </component>\n
3839 </components>\n
3840 </component-set>\n")))
3841 #t))
3842 (add-before 'check 'fix-paths
3843 (lambda _
3844 (copy-recursively "src/test/resources" "target")
3845 #t)))))
3846 (inputs
3847 `(("java-plexus-cipher" ,java-plexus-cipher)))
3848 (native-inputs
3849 `(("java-modello-core" ,java-modello-core)
3850 ;; for modello:
3851 ("java-plexus-container-default" ,java-plexus-container-default)
3852 ("java-plexus-classworlds" ,java-plexus-classworlds)
3853 ("java-plexus-utils" ,java-plexus-utils)
3854 ("java-guava" ,java-guava)
3855 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3856 ("java-sisu-build-api" ,java-sisu-build-api)
3857 ;; modello plugins:
3858 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3859 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3860 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3861 ;; for tests
3862 ("java-junit" ,java-junit)))
3863 (build-system ant-build-system)
3864 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3865 (synopsis "Plexus Security Dispatcher Component")
3866 (description "This package is the Plexus Security Dispatcher Component.
3867 This component decrypts a string passed to it.")
3868 (license license:asl2.0)))
3869
3870 (define-public java-plexus-cli
3871 (package
3872 (name "java-plexus-cli")
3873 (version "1.7")
3874 (source (origin
3875 (method git-fetch)
3876 (uri (git-reference
3877 (url "https://github.com/sonatype/plexus-cli")
3878 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3879 (file-name (string-append name "-" version))
3880 (sha256
3881 (base32
3882 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3883 (build-system ant-build-system)
3884 (arguments
3885 `(#:jar-name "plexus-cli.jar"
3886 #:source-dir "src/main/java"
3887 #:jdk ,icedtea-8
3888 #:test-dir "src/test"))
3889 (inputs
3890 `(("java-commons-cli" ,java-commons-cli)
3891 ("java-plexus-container-default" ,java-plexus-container-default)
3892 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3893 (native-inputs
3894 `(("java-plexus-utils" ,java-plexus-utils)
3895 ("java-junit" ,java-junit)
3896 ("java-guava" ,java-guava)))
3897 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3898 (synopsis "CLI building library for plexus")
3899 (description "This package is a library to help creating CLI around
3900 Plexus components.")
3901 (license license:asl2.0)))
3902
3903 (define-public java-sisu-build-api
3904 (package
3905 (name "java-sisu-build-api")
3906 (version "0.0.7")
3907 (source (origin
3908 (method url-fetch)
3909 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3910 "archive/plexus-build-api-" version ".tar.gz"))
3911 (sha256
3912 (base32
3913 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3914 (build-system ant-build-system)
3915 (arguments
3916 `(#:jar-name "sisu-build-api.jar"
3917 #:source-dir "src/main/java"
3918 #:jdk ,icedtea-8
3919 #:tests? #f; FIXME: how to run the tests?
3920 #:phases
3921 (modify-phases %standard-phases
3922 (add-before 'build 'copy-resources
3923 (lambda _
3924 (copy-recursively "src/main/resources" "build/classes")
3925 (substitute* (find-files "build/classes")
3926 (("\\$\\{project.version\\}") ,version))
3927 #t))
3928 (add-before 'build 'generate-plexus-compontent
3929 (lambda _
3930 (mkdir-p "build/classes/META-INF/plexus")
3931 ;; This file is required for plexus to inject this package.
3932 ;; FIXME: how is it generated?
3933 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3934 (lambda _
3935 (display
3936 "<component-set>\n
3937 <components>\n
3938 <component>\n
3939 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3940 <role-hint>default</role-hint>\n
3941 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3942 <description>Filesystem based non-incremental build context implementation\n
3943 which behaves as if all files were just created.</description>\n
3944 </component>\n
3945 </components>\n
3946 </component-set>\n")))
3947 #t)))))
3948 (inputs
3949 `(("java-plexus-utils" ,java-plexus-utils)
3950 ("java-plexus-container-default" ,java-plexus-container-default)))
3951 (home-page "https://github.com/sonatype/sisu-build-api/")
3952 (synopsis "Base build API for maven")
3953 (description "This package contains the base build API for maven and
3954 a default implementation of it. This API is about scanning files in a
3955 project and determining what files need to be rebuilt.")
3956 (license license:asl2.0)))
3957
3958 (define-public java-modello-core
3959 (package
3960 (name "java-modello-core")
3961 (version "1.9.1")
3962 (source (origin
3963 (method url-fetch)
3964 (uri (string-append "https://github.com/codehaus-plexus/modello"
3965 "/archive/modello-" version ".tar.gz"))
3966 (sha256
3967 (base32
3968 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3969 (build-system ant-build-system)
3970 (arguments
3971 `(#:jar-name "modello-core.jar"
3972 #:source-dir "modello-core/src/main/java"
3973 #:test-dir "modello-core/src/test"
3974 #:main-class "org.codehaus.modello.ModelloCli"
3975 #:jdk ,icedtea-8
3976 #:phases
3977 (modify-phases %standard-phases
3978 (add-before 'build 'copy-resources
3979 (lambda _
3980 (mkdir-p "build/classes/META-INF/plexus")
3981 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3982 "build/classes/META-INF/plexus/components.xml")
3983 #t))
3984 (add-before 'check 'fix-tests
3985 (lambda _
3986 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3987 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3988 "modello/core/io/ModelReaderTest.java")
3989 (("src/test") "modello-core/src/test")))
3990 #t)))))
3991 (inputs
3992 `(("java-plexus-utils" ,java-plexus-utils)
3993 ("java-plexus-container-default" ,java-plexus-container-default)
3994 ("java-sisu-build-api" ,java-sisu-build-api)))
3995 (native-inputs
3996 `(("java-junit" ,java-junit)
3997 ("java-plexus-classworlds" ,java-plexus-classworlds)
3998 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3999 ("java-guava" ,java-guava)))
4000 (home-page "http://codehaus-plexus.github.io/modello/")
4001 (synopsis "Framework for code generation from a simple model")
4002 (description "Modello is a framework for code generation from a simple model.
4003
4004 Modello generates code from a simple model format: based on a plugin
4005 architecture, various types of code and descriptors can be generated from the
4006 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4007 XSD and documentation.")
4008 (license (list
4009 license:expat
4010 ;; Although this package uses only files licensed under expat,
4011 ;; other parts of the source are licensed under different
4012 ;; licenses. We include them to be inherited by other packages.
4013 license:asl2.0
4014 ;; Some files in modello-plugin-java are licensed under a
4015 ;; 5-clause BSD license.
4016 (license:non-copyleft
4017 (string-append "file:///modello-plugins/modello-plugin-java/"
4018 "src/main/java/org/codehaus/modello/plugin/"
4019 "java/javasource/JNaming.java"))))))
4020
4021 (define-public java-modello-plugins-java
4022 (package
4023 (inherit java-modello-core)
4024 (name "java-modello-plugins-java")
4025 (arguments
4026 `(#:jar-name "modello-plugins-java.jar"
4027 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4028 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4029 #:jdk ,icedtea-8
4030 #:tests? #f; requires maven-model, which depends on this package
4031 #:phases
4032 (modify-phases %standard-phases
4033 (add-before 'build 'copy-resources
4034 (lambda _
4035 (mkdir-p "build/classes")
4036 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4037 "build/classes")
4038 #t)))))
4039 (inputs
4040 `(("java-modello-core" ,java-modello-core)
4041 ,@(package-inputs java-modello-core)))
4042 (synopsis "Modello Java Plugin")
4043 (description "Modello Java Plugin generates Java objects for the model.")))
4044
4045 (define-public java-modello-plugins-xml
4046 (package
4047 (inherit java-modello-core)
4048 (name "java-modello-plugins-xml")
4049 (arguments
4050 `(#:jar-name "modello-plugins-xml.jar"
4051 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4052 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4053 #:jdk ,icedtea-8
4054 #:phases
4055 (modify-phases %standard-phases
4056 (add-before 'build 'copy-resources
4057 (lambda _
4058 (mkdir-p "build/classes")
4059 (copy-recursively
4060 "modello-plugins/modello-plugin-xml/src/main/resources"
4061 "build/classes")
4062 #t))
4063 (add-before 'check 'fix-paths
4064 (lambda _
4065 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4066 (substitute*
4067 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4068 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4069 #t)))))
4070 (inputs
4071 `(("java-modello-core" ,java-modello-core)
4072 ("java-modello-plugins-java" ,java-modello-plugins-java)
4073 ,@(package-inputs java-modello-core)))
4074 (synopsis "Modello XML Plugin")
4075 (description "Modello XML Plugin contains shared code for every plugins
4076 working on XML representation of the model.")))
4077
4078 (define-public java-modello-test
4079 (package
4080 (inherit java-modello-core)
4081 (name "java-modello-test")
4082 (arguments
4083 `(#:jar-name "modello-test.jar"
4084 #:source-dir "modello-test/src/main/java"
4085 #:tests? #f; no tests
4086 #:jdk ,icedtea-8))
4087 (inputs
4088 `(("java-plexus-utils" ,java-plexus-utils)
4089 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4090 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4091 ("java-plexus-container-default" ,java-plexus-container-default)))
4092 (synopsis "Modello test package")
4093 (description "The modello test package contains the basis to create
4094 Modello generator unit-tests, including sample models and xml files to test
4095 every feature for every plugin.")))
4096
4097 (define-public java-modello-plugins-xpp3
4098 (package
4099 (inherit java-modello-core)
4100 (name "java-modello-plugins-xpp3")
4101 (arguments
4102 `(#:jar-name "modello-plugins-xpp3.jar"
4103 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4104 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4105 ;; One of the test dependencies is maven-model which depends on this package.
4106 #:tests? #f
4107 #:jdk ,icedtea-8
4108 #:phases
4109 (modify-phases %standard-phases
4110 (add-before 'build 'copy-resources
4111 (lambda _
4112 (mkdir-p "build/classes")
4113 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4114 "build/classes")
4115 #t)))))
4116 (inputs
4117 `(("java-modello-core" ,java-modello-core)
4118 ("java-modello-plugins-java" ,java-modello-plugins-java)
4119 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4120 ,@(package-inputs java-modello-core)))
4121 (native-inputs
4122 `(("java-xmlunit" ,java-xmlunit)
4123 ("java-modello-test" ,java-modello-test)
4124 ,@(package-native-inputs java-modello-core)))
4125 (synopsis "Modello XPP3 Plugin")
4126 (description "The modello XPP3 plugin generates XML readers and writers based
4127 on the XPP3 API (XML Pull Parser).")))
4128
4129 (define-public java-asm
4130 (package
4131 (name "java-asm")
4132 (version "6.0")
4133 (source (origin
4134 (method url-fetch)
4135 (uri (string-append "http://download.forge.ow2.org/asm/"
4136 "asm-" version ".tar.gz"))
4137 (sha256
4138 (base32
4139 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4140 (build-system ant-build-system)
4141 (propagated-inputs
4142 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4143 ("java-aqute-libg" ,java-aqute-libg)))
4144 (arguments
4145 `(#:build-target "compile"
4146 ;; The tests require an old version of Janino, which no longer compiles
4147 ;; with the JDK7.
4148 #:tests? #f
4149 #:make-flags
4150 (list
4151 ;; We don't need these extra ant tasks, but the build system asks us to
4152 ;; provide a path anyway.
4153 "-Dobjectweb.ant.tasks.path=dummy-path"
4154 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4155 ;; used during the build automatically by ant-build-system, but
4156 ;; java-asm's build.xml fails unless we provide something here.
4157 "-Dbiz.aQute.bnd.path=dummy-path")
4158 #:phases
4159 (modify-phases %standard-phases
4160 (add-before 'install 'build-jars
4161 (lambda* (#:key make-flags #:allow-other-keys)
4162 ;; We cannot use the "jar" target because it depends on a couple
4163 ;; of unpackaged, complicated tools.
4164 (mkdir "dist")
4165 (invoke "jar"
4166 "-cf" (string-append "dist/asm-" ,version ".jar")
4167 "-C" "output/build/tmp" ".")))
4168 (replace 'install
4169 (install-jars "dist")))))
4170 (native-inputs
4171 `(("java-junit" ,java-junit)))
4172 (home-page "http://asm.ow2.org/")
4173 (synopsis "Very small and fast Java bytecode manipulation framework")
4174 (description "ASM is an all purpose Java bytecode manipulation and
4175 analysis framework. It can be used to modify existing classes or dynamically
4176 generate classes, directly in binary form. The provided common
4177 transformations and analysis algorithms allow to easily assemble custom
4178 complex transformations and code analysis tools.")
4179 (license license:bsd-3)))
4180
4181 (define java-asm-bootstrap
4182 (package
4183 (inherit java-asm)
4184 (name "java-asm-bootstrap")
4185 (arguments
4186 (substitute-keyword-arguments (package-arguments java-asm)
4187 ((#:tests? _) #f)))
4188 (native-inputs `())
4189 (propagated-inputs
4190 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4191 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4192 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4193 (delete `("java-aqute-libg" ,java-aqute-libg)
4194 (package-inputs java-asm)))))))
4195
4196 (define-public java-cglib
4197 (package
4198 (name "java-cglib")
4199 (version "3.2.4")
4200 (source
4201 (origin
4202 (method git-fetch)
4203 (uri (git-reference
4204 (url "https://github.com/cglib/cglib.git")
4205 (commit (string-append
4206 "RELEASE_"
4207 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4208 version)))))
4209 (file-name (git-file-name name version))
4210 (sha256
4211 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4212 (build-system ant-build-system)
4213 (arguments
4214 `(;; FIXME: tests fail because junit runs
4215 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4216 ;; to describe a test at all.
4217 #:tests? #f
4218 #:jar-name "cglib.jar"
4219 #:phases
4220 (modify-phases %standard-phases
4221 (add-after 'unpack 'chdir
4222 (lambda _ (chdir "cglib") #t)))))
4223 (inputs
4224 `(("java-asm" ,java-asm)
4225 ("java-junit" ,java-junit)))
4226 (home-page "https://github.com/cglib/cglib/")
4227 (synopsis "Java byte code generation library")
4228 (description "The byte code generation library CGLIB is a high level API
4229 to generate and transform Java byte code.")
4230 (license license:asl2.0)))
4231
4232 (define-public java-objenesis
4233 (package
4234 (name "java-objenesis")
4235 (version "2.5.1")
4236 (source (origin
4237 (method url-fetch)
4238 (uri (string-append "https://github.com/easymock/objenesis/"
4239 "archive/" version ".tar.gz"))
4240 (file-name (string-append "objenesis-" version ".tar.gz"))
4241 (sha256
4242 (base32
4243 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4244 (build-system ant-build-system)
4245 (arguments
4246 `(#:jar-name "objenesis.jar"
4247 #:source-dir "main/src/"
4248 #:test-dir "main/src/test/"))
4249 (native-inputs
4250 `(("java-junit" ,java-junit)
4251 ("java-hamcrest-core" ,java-hamcrest-core)))
4252 (home-page "http://objenesis.org/")
4253 (synopsis "Bypass the constructor when creating an object")
4254 (description "Objenesis is a small Java library that serves one purpose:
4255 to instantiate a new object of a particular class. It is common to see
4256 restrictions in libraries stating that classes must require a default
4257 constructor. Objenesis aims to overcome these restrictions by bypassing the
4258 constructor on object instantiation.")
4259 (license license:asl2.0)))
4260
4261 (define-public java-easymock
4262 (package
4263 (name "java-easymock")
4264 (version "3.4")
4265 (source (origin
4266 (method url-fetch)
4267 (uri (string-append "https://github.com/easymock/easymock/"
4268 "archive/easymock-" version ".tar.gz"))
4269 (sha256
4270 (base32
4271 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4272 (build-system ant-build-system)
4273 (arguments
4274 `(#:jar-name "easymock.jar"
4275 #:source-dir "core/src/main"
4276 #:test-dir "core/src/test"
4277 #:phases
4278 (modify-phases %standard-phases
4279 ;; FIXME: Android support requires the following packages to be
4280 ;; available: com.google.dexmaker.stock.ProxyBuilder
4281 (add-after 'unpack 'delete-android-support
4282 (lambda _
4283 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4284 (substitute* "MocksControl.java"
4285 (("AndroidSupport.isAndroid\\(\\)") "false")
4286 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4287 (delete-file "AndroidClassProxyFactory.java"))
4288 #t))
4289 (add-after 'unpack 'delete-broken-tests
4290 (lambda _
4291 (with-directory-excursion "core/src/test/java/org/easymock"
4292 ;; This test depends on dexmaker.
4293 (delete-file "tests2/ClassExtensionHelperTest.java")
4294
4295 ;; This is not a test.
4296 (delete-file "tests/BaseEasyMockRunnerTest.java")
4297
4298 ;; This test should be executed with a different runner...
4299 (delete-file "tests2/EasyMockAnnotationsTest.java")
4300 ;; ...but deleting it means that we also have to delete these
4301 ;; dependent files.
4302 (delete-file "tests2/EasyMockRunnerTest.java")
4303 (delete-file "tests2/EasyMockRuleTest.java")
4304
4305 ;; This test fails because the file "easymock.properties" does
4306 ;; not exist.
4307 (delete-file "tests2/EasyMockPropertiesTest.java"))
4308 #t)))))
4309 (inputs
4310 `(("java-asm" ,java-asm)
4311 ("java-cglib" ,java-cglib)
4312 ("java-objenesis" ,java-objenesis)))
4313 (native-inputs
4314 `(("java-junit" ,java-junit)
4315 ("java-hamcrest-core" ,java-hamcrest-core)))
4316 (home-page "http://easymock.org")
4317 (synopsis "Java library providing mock objects for unit tests")
4318 (description "EasyMock is a Java library that provides an easy way to use
4319 mock objects in unit testing.")
4320 (license license:asl2.0)))
4321
4322 (define-public java-jmock-1
4323 (package
4324 (name "java-jmock")
4325 (version "1.2.0")
4326 (source (origin
4327 (method url-fetch)
4328 (uri (string-append "https://github.com/jmock-developers/"
4329 "jmock-library/archive/" version ".tar.gz"))
4330 (file-name (string-append "jmock-" version ".tar.gz"))
4331 (sha256
4332 (base32
4333 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4334 (build-system ant-build-system)
4335 (arguments
4336 `(#:build-target "jars"
4337 #:test-target "run.tests"
4338 #:phases
4339 (modify-phases %standard-phases
4340 (replace 'install (install-jars "build")))))
4341 (home-page "http://www.jmock.org")
4342 (synopsis "Mock object library for test-driven development")
4343 (description "JMock is a library that supports test-driven development of
4344 Java code with mock objects. Mock objects help you design and test the
4345 interactions between the objects in your programs.
4346
4347 The jMock library
4348
4349 @itemize
4350 @item makes it quick and easy to define mock objects
4351 @item lets you precisely specify the interactions between
4352 your objects, reducing the brittleness of your tests
4353 @item plugs into your favourite test framework
4354 @item is easy to extend.
4355 @end itemize\n")
4356 (license license:bsd-3)))
4357
4358 (define-public java-jmock
4359 (package
4360 (inherit java-jmock-1)
4361 (name "java-jmock")
4362 (version "2.8.2")
4363 (source (origin
4364 (method url-fetch)
4365 (uri (string-append "https://github.com/jmock-developers/"
4366 "jmock-library/archive/" version ".tar.gz"))
4367 (file-name (string-append name "-" version ".tar.gz"))
4368 (sha256
4369 (base32
4370 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4371 (inputs
4372 `(("java-hamcrest-all" ,java-hamcrest-all)
4373 ("java-asm" ,java-asm)
4374 ("java-bsh" ,java-bsh)
4375 ("java-junit" ,java-junit)))
4376 (native-inputs
4377 `(("cglib" ,java-cglib)))
4378 (arguments
4379 `(#:jar-name "java-jmock.jar"
4380 #:source-dir "jmock/src/main/java"
4381 #:test-dir "jmock/src/test"))))
4382
4383 (define-public java-jmock-junit4
4384 (package
4385 (inherit java-jmock)
4386 (name "java-jmock-junit4")
4387 (arguments
4388 `(#:jar-name "java-jmock-junit4.jar"
4389 #:source-dir "jmock-junit4/src/main/java"
4390 #:test-dir "jmock-junit4/src/test"))
4391 (inputs
4392 `(("java-hamcrest-all" ,java-hamcrest-all)
4393 ("java-asm" ,java-asm)
4394 ("java-bsh" ,java-bsh)
4395 ("java-jmock" ,java-jmock)
4396 ("java-jumit" ,java-junit)))))
4397
4398 (define-public java-jmock-legacy
4399 (package
4400 (inherit java-jmock)
4401 (name "java-jmock-legacy")
4402 (arguments
4403 `(#:jar-name "java-jmock-legacy.jar"
4404 #:source-dir "jmock-legacy/src/main/java"
4405 #:test-dir "jmock-legacy/src/test"
4406 #:phases
4407 (modify-phases %standard-phases
4408 (add-before 'check 'copy-tests
4409 (lambda _
4410 ;; This file is a dependancy of some tests
4411 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4412 (copy-file (string-append "jmock/src/test/java/" file)
4413 (string-append "jmock-legacy/src/test/java/" file))
4414 #t))))))
4415 (inputs
4416 `(("java-hamcrest-all" ,java-hamcrest-all)
4417 ("java-objenesis" ,java-objenesis)
4418 ("java-cglib" ,java-cglib)
4419 ("java-jmock" ,java-jmock)
4420 ("java-asm" ,java-asm)
4421 ("java-bsh" ,java-bsh)
4422 ("java-junit" ,java-junit)))
4423 (native-inputs
4424 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4425
4426 (define-public java-hamcrest-all
4427 (package (inherit java-hamcrest-core)
4428 (name "java-hamcrest-all")
4429 (arguments
4430 `(#:jdk ,icedtea-8
4431 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4432 ((#:build-target _) "bigjar")
4433 ((#:phases phases)
4434 `(modify-phases ,phases
4435 ;; Some build targets override the classpath, so we need to patch
4436 ;; the build.xml to ensure that required dependencies are on the
4437 ;; classpath.
4438 (add-after 'unpack 'patch-classpath-for-integration
4439 (lambda* (#:key inputs #:allow-other-keys)
4440 (substitute* "build.xml"
4441 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4442 (string-join
4443 (cons line
4444 (append
4445 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4446 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4447 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4448 ";"))
4449 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4450 (string-append (assoc-ref inputs "java-hamcrest-core")
4451 "/share/java/hamcrest-core.jar")))
4452 #t)))))))
4453 (inputs
4454 `(("java-junit" ,java-junit)
4455 ("java-jmock" ,java-jmock-1)
4456 ;; This is necessary because of what seems to be a race condition.
4457 ;; This package would sometimes fail to build because hamcrest-core.jar
4458 ;; could not be found, even though it is built as part of this package.
4459 ;; Adding java-hamcrest-core appears to fix this problem. See
4460 ;; https://debbugs.gnu.org/31390 for more information.
4461 ("java-hamcrest-core" ,java-hamcrest-core)
4462 ("java-easymock" ,java-easymock)
4463 ,@(package-inputs java-hamcrest-core)))))
4464
4465 (define-public java-jopt-simple
4466 (package
4467 (name "java-jopt-simple")
4468 (version "5.0.3")
4469 (source (origin
4470 (method url-fetch)
4471 (uri (string-append "http://repo1.maven.org/maven2/"
4472 "net/sf/jopt-simple/jopt-simple/"
4473 version "/jopt-simple-"
4474 version "-sources.jar"))
4475 (sha256
4476 (base32
4477 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4478 (build-system ant-build-system)
4479 (arguments
4480 `(#:tests? #f ; there are no tests
4481 #:jar-name "jopt-simple.jar"))
4482 (home-page "https://pholser.github.io/jopt-simple/")
4483 (synopsis "Java library for parsing command line options")
4484 (description "JOpt Simple is a Java library for parsing command line
4485 options, such as those you might pass to an invocation of @code{javac}. In
4486 the interest of striving for simplicity, as closely as possible JOpt Simple
4487 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4488 GNU @code{getopt_long}. It also aims to make option parser configuration and
4489 retrieval of options and their arguments simple and expressive, without being
4490 overly clever.")
4491 (license license:expat)))
4492
4493 (define-public java-commons-math3
4494 (package
4495 (name "java-commons-math3")
4496 (version "3.6.1")
4497 (source (origin
4498 (method url-fetch)
4499 (uri (string-append "mirror://apache/commons/math/source/"
4500 "commons-math3-" version "-src.tar.gz"))
4501 (sha256
4502 (base32
4503 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4504 (build-system ant-build-system)
4505 (arguments
4506 `(#:build-target "jar"
4507 #:test-target "test"
4508 #:make-flags
4509 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4510 (junit (assoc-ref %build-inputs "java-junit")))
4511 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4512 (string-append "-Dhamcrest.jar=" hamcrest
4513 "/share/java/hamcrest-core.jar")))
4514 #:phases
4515 (modify-phases %standard-phases
4516 ;; We want to build the jar in the build phase and run the tests
4517 ;; later in a separate phase.
4518 (add-after 'unpack 'untangle-targets
4519 (lambda _
4520 (substitute* "build.xml"
4521 (("name=\"jar\" depends=\"test\"")
4522 "name=\"jar\" depends=\"compile\""))
4523 #t))
4524 ;; There is no install target.
4525 (replace 'install
4526 (install-jars "target")))))
4527 (native-inputs
4528 `(("java-junit" ,java-junit)
4529 ("java-hamcrest-core" ,java-hamcrest-core)))
4530 (home-page "http://commons.apache.org/math/")
4531 (synopsis "Apache Commons mathematics library")
4532 (description "Commons Math is a library of lightweight, self-contained
4533 mathematics and statistics components addressing the most common problems not
4534 available in the Java programming language or Commons Lang.")
4535 (license license:asl2.0)))
4536
4537 (define-public java-jmh
4538 (package
4539 (name "java-jmh")
4540 (version "1.17.5")
4541 (source (origin
4542 (method hg-fetch)
4543 (uri (hg-reference
4544 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4545 (changeset version)))
4546 (file-name (string-append name "-" version "-checkout"))
4547 (sha256
4548 (base32
4549 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4550 (build-system ant-build-system)
4551 (arguments
4552 `(#:jar-name "jmh-core.jar"
4553 #:source-dir "jmh-core/src/main"
4554 #:test-dir "jmh-core/src/test"
4555 #:phases
4556 (modify-phases %standard-phases
4557 ;; This seems to be a bug in the JDK. It may not be necessary in
4558 ;; future versions of the JDK.
4559 (add-after 'unpack 'fix-bug
4560 (lambda _
4561 (with-directory-excursion
4562 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4563 (substitute* '("IntegerValueConverter.java"
4564 "ThreadsValueConverter.java")
4565 (("public Class<Integer> valueType")
4566 "public Class<? extends Integer> valueType")))
4567 #t)))))
4568 (inputs
4569 `(("java-jopt-simple" ,java-jopt-simple)
4570 ("java-commons-math3" ,java-commons-math3)))
4571 (native-inputs
4572 `(("java-junit" ,java-junit)
4573 ("java-hamcrest-core" ,java-hamcrest-core)))
4574 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4575 (synopsis "Benchmark harness for the JVM")
4576 (description "JMH is a Java harness for building, running, and analysing
4577 nano/micro/milli/macro benchmarks written in Java and other languages
4578 targeting the JVM.")
4579 ;; GPLv2 only
4580 (license license:gpl2)))
4581
4582 (define-public java-commons-collections4
4583 (package
4584 (name "java-commons-collections4")
4585 (version "4.1")
4586 (source (origin
4587 (method url-fetch)
4588 (uri (string-append "mirror://apache/commons/collections/source/"
4589 "commons-collections4-" version "-src.tar.gz"))
4590 (sha256
4591 (base32
4592 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4593 (build-system ant-build-system)
4594 (arguments
4595 `(#:test-target "test"
4596 #:make-flags
4597 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4598 (junit (assoc-ref %build-inputs "java-junit"))
4599 (easymock (assoc-ref %build-inputs "java-easymock")))
4600 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4601 (string-append "-Dhamcrest.jar=" hamcrest
4602 "/share/java/hamcrest-core.jar")
4603 (string-append "-Deasymock.jar=" easymock
4604 "/share/java/easymock.jar")))
4605 #:phases
4606 (modify-phases %standard-phases
4607 (replace 'install
4608 (install-jars "target")))))
4609 (native-inputs
4610 `(("java-junit" ,java-junit)
4611 ("java-hamcrest-core" ,java-hamcrest-core)
4612 ("java-easymock" ,java-easymock)))
4613 (home-page "http://commons.apache.org/collections/")
4614 (synopsis "Collections framework")
4615 (description "The Java Collections Framework is the recognised standard
4616 for collection handling in Java. Commons-Collections seek to build upon the
4617 JDK classes by providing new interfaces, implementations and utilities. There
4618 are many features, including:
4619
4620 @itemize
4621 @item @code{Bag} interface for collections that have a number of copies of
4622 each object
4623 @item @code{BidiMap} interface for maps that can be looked up from value to
4624 key as well and key to value
4625 @item @code{MapIterator} interface to provide simple and quick iteration over
4626 maps
4627 @item Transforming decorators that alter each object as it is added to the
4628 collection
4629 @item Composite collections that make multiple collections look like one
4630 @item Ordered maps and sets that retain the order elements are added in,
4631 including an LRU based map
4632 @item Reference map that allows keys and/or values to be garbage collected
4633 under close control
4634 @item Many comparator implementations
4635 @item Many iterator implementations
4636 @item Adapter classes from array and enumerations to collections
4637 @item Utilities to test or create typical set-theory properties of collections
4638 such as union, intersection, and closure.
4639 @end itemize\n")
4640 (license license:asl2.0)))
4641
4642 (define-public java-commons-collections
4643 (package
4644 (inherit java-commons-collections4)
4645 (name "java-commons-collections")
4646 (version "3.2.2")
4647 (source (origin
4648 (method url-fetch)
4649 (uri (string-append "mirror://apache/commons/collections/source/"
4650 "commons-collections-" version "-src.tar.gz"))
4651 (sha256
4652 (base32
4653 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4654 (patches
4655 (search-patches "java-commons-collections-fix-java8.patch"))))
4656 (arguments
4657 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4658 ((#:phases phases)
4659 `(modify-phases ,phases
4660 ;; The manifest is required by the build procedure
4661 (add-before 'build 'add-manifest
4662 (lambda _
4663 (mkdir-p "build/conf")
4664 (call-with-output-file "build/conf/MANIFEST.MF"
4665 (lambda (file)
4666 (format file "Manifest-Version: 1.0\n")))
4667 #t))
4668 (replace 'install
4669 (install-jars "build"))))))))
4670
4671 (define java-commons-collections-test-classes
4672 (package
4673 (inherit java-commons-collections)
4674 (arguments
4675 `(#:jar-name "commons-collections-test-classes.jar"
4676 #:source-dir "src/test"
4677 #:tests? #f))
4678 (inputs
4679 `(("collection" ,java-commons-collections)))))
4680
4681 (define-public java-commons-beanutils
4682 (package
4683 (name "java-commons-beanutils")
4684 (version "1.9.3")
4685 (source (origin
4686 (method url-fetch)
4687 (uri (string-append "mirror://apache/commons/beanutils/source/"
4688 "commons-beanutils-" version "-src.tar.gz"))
4689 (sha256
4690 (base32
4691 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4692 (build-system ant-build-system)
4693 (arguments
4694 `(#:test-target "test"
4695 #:tests? #f
4696 #:phases
4697 (modify-phases %standard-phases
4698 (replace 'install
4699 (lambda* (#:key outputs #:allow-other-keys)
4700 (rename-file (string-append "dist/commons-beanutils-" ,version
4701 "-SNAPSHOT.jar")
4702 "commons-beanutils.jar")
4703 (install-file "commons-beanutils.jar"
4704 (string-append (assoc-ref outputs "out") "/share/java/"))
4705 #t)))))
4706 (inputs
4707 `(("logging" ,java-commons-logging-minimal)
4708 ("collections" ,java-commons-collections)))
4709 (native-inputs
4710 `(("junit" ,java-junit)
4711 ("collections-test" ,java-commons-collections-test-classes)))
4712 (home-page "http://commons.apache.org/beanutils/")
4713 (synopsis "Dynamically set or get properties in Java")
4714 (description "BeanUtils provides a simplified interface to reflection and
4715 introspection to set or get dynamically determined properties through their
4716 setter and getter method.")
4717 (license license:asl2.0)))
4718
4719 (define-public java-commons-io
4720 (package
4721 (name "java-commons-io")
4722 (version "2.5")
4723 (source
4724 (origin
4725 (method url-fetch)
4726 (uri (string-append "mirror://apache/commons/io/source/"
4727 "commons-io-" version "-src.tar.gz"))
4728 (sha256
4729 (base32
4730 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4731 (build-system ant-build-system)
4732 (outputs '("out" "doc"))
4733 (arguments
4734 `(#:test-target "test"
4735 #:make-flags
4736 (list (string-append "-Djunit.jar="
4737 (assoc-ref %build-inputs "java-junit")
4738 "/share/java/junit.jar"))
4739 #:phases
4740 (modify-phases %standard-phases
4741 (add-after 'build 'build-javadoc ant-build-javadoc)
4742 (replace 'install (install-jars "target"))
4743 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4744 (native-inputs
4745 `(("java-junit" ,java-junit)
4746 ("java-hamcrest-core" ,java-hamcrest-core)))
4747 (home-page "http://commons.apache.org/io/")
4748 (synopsis "Common useful IO related classes")
4749 (description "Commons-IO contains utility classes, stream implementations,
4750 file filters and endian classes.")
4751 (license license:asl2.0)))
4752
4753 (define-public java-commons-exec-1.1
4754 (package
4755 (name "java-commons-exec")
4756 (version "1.1")
4757 (source
4758 (origin
4759 (method url-fetch)
4760 (uri (string-append "mirror://apache/commons/exec/source/"
4761 "commons-exec-" version "-src.tar.gz"))
4762 (sha256
4763 (base32
4764 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4765 (build-system ant-build-system)
4766 (arguments
4767 `(#:test-target "test"
4768 #:make-flags
4769 (list (string-append "-Dmaven.junit.jar="
4770 (assoc-ref %build-inputs "java-junit")
4771 "/share/java/junit.jar"))
4772 #:phases
4773 (modify-phases %standard-phases
4774 (add-before 'build 'delete-network-tests
4775 (lambda _
4776 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4777 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4778 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4779 #t))
4780 ;; The "build" phase automatically tests.
4781 (delete 'check)
4782 (replace 'install (install-jars "target")))))
4783 (native-inputs
4784 `(("java-junit" ,java-junit)))
4785 (home-page "http://commons.apache.org/proper/commons-exec/")
4786 (synopsis "Common program execution related classes")
4787 (description "Commons-Exec simplifies executing external processes.")
4788 (license license:asl2.0)))
4789
4790 (define-public java-commons-exec
4791 (package
4792 (inherit java-commons-exec-1.1)
4793 (version "1.3")
4794 (source
4795 (origin
4796 (method url-fetch)
4797 (uri (string-append "mirror://apache/commons/exec/source/"
4798 "commons-exec-" version "-src.tar.gz"))
4799 (sha256
4800 (base32
4801 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4802 (arguments
4803 `(#:test-target "test"
4804 #:make-flags
4805 (list (string-append "-Dmaven.junit.jar="
4806 (assoc-ref %build-inputs "java-junit")
4807 "/share/java/junit.jar")
4808 "-Dmaven.compiler.source=1.7"
4809 "-Dmaven.compiler.target=1.7")
4810 #:phases
4811 (modify-phases %standard-phases
4812 (add-before 'build 'delete-network-tests
4813 (lambda* (#:key inputs #:allow-other-keys)
4814 ;; This test hangs indefinitely.
4815 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4816 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4817 (("ping -c 10 127.0.0.1") "sleep 10"))
4818 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4819 (("/bin/ls") "ls"))
4820 (call-with-output-file "src/test/scripts/ping.sh"
4821 (lambda (port)
4822 (format port "#!~a/bin/sh\nsleep $1\n"
4823 (assoc-ref inputs "bash"))))
4824 #t))
4825 ;; The "build" phase automatically tests.
4826 (delete 'check)
4827 (replace 'install (install-jars "target")))))
4828 (native-inputs
4829 `(("java-junit" ,java-junit)
4830 ("java-hamcrest-core" ,java-hamcrest-core)))))
4831
4832 (define-public java-commons-lang
4833 (package
4834 (name "java-commons-lang")
4835 (version "2.6")
4836 (source
4837 (origin
4838 (method url-fetch)
4839 (uri (string-append "mirror://apache/commons/lang/source/"
4840 "commons-lang-" version "-src.tar.gz"))
4841 (sha256
4842 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4843 (build-system ant-build-system)
4844 (outputs '("out" "doc"))
4845 (arguments
4846 `(#:test-target "test"
4847 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4848 #:phases
4849 (modify-phases %standard-phases
4850 (add-after 'build 'build-javadoc ant-build-javadoc)
4851 (add-before 'check 'disable-failing-test
4852 (lambda _
4853 ;; Disable a failing test
4854 (substitute* "src/test/java/org/apache/commons/lang/\
4855 time/FastDateFormatTest.java"
4856 (("public void testFormat\\(\\)")
4857 "public void disabled_testFormat()"))
4858 #t))
4859 (replace 'install (install-jars "target"))
4860 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4861 (native-inputs
4862 `(("java-junit" ,java-junit)))
4863 (home-page "http://commons.apache.org/lang/")
4864 (synopsis "Extension of the java.lang package")
4865 (description "The Commons Lang components contains a set of Java classes
4866 that provide helper methods for standard Java classes, especially those found
4867 in the @code{java.lang} package in the Sun JDK. The following classes are
4868 included:
4869
4870 @itemize
4871 @item StringUtils - Helper for @code{java.lang.String}.
4872 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4873 of characters such as @code{[a-z]} and @code{[abcdez]}.
4874 @item RandomStringUtils - Helper for creating randomised strings.
4875 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4876 @item NumberRange - A range of numbers with an upper and lower bound.
4877 @item ObjectUtils - Helper for @code{java.lang.Object}.
4878 @item SerializationUtils - Helper for serializing objects.
4879 @item SystemUtils - Utility class defining the Java system properties.
4880 @item NestedException package - A sub-package for the creation of nested
4881 exceptions.
4882 @item Enum package - A sub-package for the creation of enumerated types.
4883 @item Builder package - A sub-package for the creation of @code{equals},
4884 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4885 @end itemize\n")
4886 (license license:asl2.0)))
4887
4888 (define-public java-commons-lang3
4889 (package
4890 (name "java-commons-lang3")
4891 (version "3.4")
4892 (source
4893 (origin
4894 (method url-fetch)
4895 (uri (string-append "mirror://apache/commons/lang/source/"
4896 "commons-lang3-" version "-src.tar.gz"))
4897 (sha256
4898 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4899 (build-system ant-build-system)
4900 (outputs '("out" "doc"))
4901 (arguments
4902 `(#:test-target "test"
4903 #:make-flags
4904 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4905 (junit (assoc-ref %build-inputs "java-junit"))
4906 (easymock (assoc-ref %build-inputs "java-easymock"))
4907 (io (assoc-ref %build-inputs "java-commons-io")))
4908 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4909 (string-append "-Dhamcrest.jar=" hamcrest
4910 "/share/java/hamcrest-all.jar")
4911 (string-append "-Dcommons-io.jar=" io
4912 "/share/java/commons-io-"
4913 ,(package-version java-commons-io)
4914 "-SNAPSHOT.jar")
4915 (string-append "-Deasymock.jar=" easymock
4916 "/share/java/easymock.jar")))
4917 #:phases
4918 (modify-phases %standard-phases
4919 (add-after 'build 'build-javadoc ant-build-javadoc)
4920 (replace 'install (install-jars "target"))
4921 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4922 (native-inputs
4923 `(("java-junit" ,java-junit)
4924 ("java-commons-io" ,java-commons-io)
4925 ("java-hamcrest-all" ,java-hamcrest-all)
4926 ("java-easymock" ,java-easymock)))
4927 (home-page "http://commons.apache.org/lang/")
4928 (synopsis "Extension of the java.lang package")
4929 (description "The Commons Lang components contains a set of Java classes
4930 that provide helper methods for standard Java classes, especially those found
4931 in the @code{java.lang} package. The following classes are included:
4932
4933 @itemize
4934 @item StringUtils - Helper for @code{java.lang.String}.
4935 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4936 characters such as @code{[a-z]} and @code{[abcdez]}.
4937 @item RandomStringUtils - Helper for creating randomised strings.
4938 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4939 @item NumberRange - A range of numbers with an upper and lower bound.
4940 @item ObjectUtils - Helper for @code{java.lang.Object}.
4941 @item SerializationUtils - Helper for serializing objects.
4942 @item SystemUtils - Utility class defining the Java system properties.
4943 @item NestedException package - A sub-package for the creation of nested
4944 exceptions.
4945 @item Enum package - A sub-package for the creation of enumerated types.
4946 @item Builder package - A sub-package for the creation of @code{equals},
4947 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4948 @end itemize\n")
4949 (license license:asl2.0)))
4950
4951 (define-public java-commons-bsf
4952 (package
4953 (name "java-commons-bsf")
4954 (version "2.4.0")
4955 (source (origin
4956 (method url-fetch)
4957 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4958 version ".tar.gz"))
4959 (sha256
4960 (base32
4961 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4962 (modules '((guix build utils)))
4963 (snippet
4964 '(begin
4965 (for-each delete-file
4966 (find-files "." "\\.jar$"))
4967 #t))))
4968 (build-system ant-build-system)
4969 (arguments
4970 `(#:build-target "jar"
4971 #:tests? #f; No test file
4972 #:modules ((guix build ant-build-system)
4973 (guix build utils)
4974 (guix build java-utils)
4975 (sxml simple))
4976 #:phases
4977 (modify-phases %standard-phases
4978 (add-before 'build 'create-properties
4979 (lambda _
4980 ;; This file is missing from the distribution
4981 (call-with-output-file "build-properties.xml"
4982 (lambda (port)
4983 (sxml->xml
4984 `(project (@ (basedir ".") (name "build-properties") (default ""))
4985 (property (@ (name "project.name") (value "bsf")))
4986 (property (@ (name "source.level") (value "1.5")))
4987 (property (@ (name "build.lib") (value "build/jar")))
4988 (property (@ (name "src.dir") (value "src")))
4989 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4990 (property (@ (name "build.tests") (value "build/test-classes")))
4991 (property (@ (name "build.dest") (value "build/classes"))))
4992 port)))
4993 #t))
4994 (replace 'install (install-jars "build")))))
4995 (native-inputs
4996 `(("java-junit" ,java-junit)))
4997 (inputs
4998 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4999 (home-page "https://commons.apache.org/proper/commons-bsf")
5000 (synopsis "Bean Scripting Framework")
5001 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5002 which provides scripting language support within Java applications, and access
5003 to Java objects and methods from scripting languages. BSF allows one to write
5004 JSPs in languages other than Java while providing access to the Java class
5005 library. In addition, BSF permits any Java application to be implemented in
5006 part (or dynamically extended) by a language that is embedded within it. This
5007 is achieved by providing an API that permits calling scripting language engines
5008 from within Java, as well as an object registry that exposes Java objects to
5009 these scripting language engines.")
5010 (license license:asl2.0)))
5011
5012 (define-public java-commons-jxpath
5013 (package
5014 (name "java-commons-jxpath")
5015 (version "1.3")
5016 (source (origin
5017 (method url-fetch)
5018 (uri (string-append "mirror://apache/commons/jxpath/source/"
5019 "commons-jxpath-" version "-src.tar.gz"))
5020 (sha256
5021 (base32
5022 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5023 (build-system ant-build-system)
5024 (arguments
5025 `(#:jar-name "commons-jxpath.jar"
5026 ;; tests require more dependencies, including mockrunner which depends on old software
5027 #:tests? #f
5028 #:source-dir "src/java"))
5029 (inputs
5030 `(("servlet" ,java-classpathx-servletapi)
5031 ("java-jdom" ,java-jdom)
5032 ("java-commons-beanutils" ,java-commons-beanutils)))
5033 (native-inputs
5034 `(("java-junit" ,java-junit)))
5035 (home-page "http://commons.apache.org/jxpath/")
5036 (synopsis "Simple interpreter of an expression language called XPath.")
5037 (description "The org.apache.commons.jxpath package defines a simple
5038 interpreter of an expression language called XPath. JXPath applies XPath
5039 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5040 contexts, DOM etc, including mixtures thereof.")
5041 (license license:asl2.0)))
5042
5043 (define-public java-jsr250
5044 (package
5045 (name "java-jsr250")
5046 (version "1.3")
5047 (source (origin
5048 (method url-fetch)
5049 (uri (string-append "https://repo1.maven.org/maven2/"
5050 "javax/annotation/javax.annotation-api/"
5051 version "/javax.annotation-api-"
5052 version "-sources.jar"))
5053 (sha256
5054 (base32
5055 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5056 (build-system ant-build-system)
5057 (arguments
5058 `(#:tests? #f ; no tests included
5059 #:jdk ,icedtea-8
5060 #:jar-name "jsr250.jar"))
5061 (home-page "https://jcp.org/en/jsr/detail?id=250")
5062 (synopsis "Security-related annotations")
5063 (description "This package provides annotations for security. It provides
5064 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5065 namespaces.")
5066 ;; either cddl or gpl2 only, with classpath exception
5067 (license (list license:cddl1.0
5068 license:gpl2))))
5069
5070 (define-public java-jsr305
5071 (package
5072 (name "java-jsr305")
5073 (version "3.0.1")
5074 (source (origin
5075 (method url-fetch)
5076 (uri (string-append "https://repo1.maven.org/maven2/"
5077 "com/google/code/findbugs/"
5078 "jsr305/" version "/jsr305-"
5079 version "-sources.jar"))
5080 (sha256
5081 (base32
5082 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5083 (build-system ant-build-system)
5084 (arguments
5085 `(#:tests? #f ; no tests included
5086 #:jar-name "jsr305.jar"))
5087 (home-page "http://findbugs.sourceforge.net/")
5088 (synopsis "Annotations for the static analyzer called findbugs")
5089 (description "This package provides annotations for the findbugs package.
5090 It provides packages in the @code{javax.annotations} namespace.")
5091 (license license:asl2.0)))
5092
5093 (define-public java-guava
5094 (package
5095 (name "java-guava")
5096 ;; This is the last release of Guava that can be built with Java 7.
5097 (version "20.0")
5098 (source (origin
5099 (method url-fetch)
5100 (uri (string-append "https://github.com/google/guava/"
5101 "releases/download/v" version
5102 "/guava-" version "-sources.jar"))
5103 (sha256
5104 (base32
5105 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5106 (build-system ant-build-system)
5107 (arguments
5108 `(#:tests? #f ; no tests included
5109 #:jar-name "guava.jar"
5110 #:phases
5111 (modify-phases %standard-phases
5112 (add-after 'unpack 'trim-sources
5113 (lambda _
5114 (with-directory-excursion "src/com/google/common"
5115 ;; Remove annotations to avoid extra dependencies:
5116 ;; * "j2objc" annotations are used when converting Java to
5117 ;; Objective C;
5118 ;; * "errorprone" annotations catch common Java mistakes at
5119 ;; compile time;
5120 ;; * "IgnoreJRERequirement" is used for Android.
5121 (substitute* (find-files "." "\\.java$")
5122 (("import com.google.j2objc.*") "")
5123 (("import com.google.errorprone.annotation.*") "")
5124 (("import org.codehaus.mojo.animal_sniffer.*") "")
5125 (("@CanIgnoreReturnValue") "")
5126 (("@LazyInit") "")
5127 (("@WeakOuter") "")
5128 (("@RetainedWith") "")
5129 (("@Weak") "")
5130 (("@ForOverride") "")
5131 (("@J2ObjCIncompatible") "")
5132 (("@IgnoreJRERequirement") "")))
5133 #t)))))
5134 (inputs
5135 `(("java-jsr305" ,java-jsr305)))
5136 (home-page "https://github.com/google/guava")
5137 (synopsis "Google core libraries for Java")
5138 (description "Guava is a set of core libraries that includes new
5139 collection types (such as multimap and multiset), immutable collections, a
5140 graph library, functional types, an in-memory cache, and APIs/utilities for
5141 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5142 more!")
5143 (license license:asl2.0)))
5144
5145 ;; The java-commons-logging package provides adapters to many different
5146 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5147 ;; it with only a minimal set of adapters.
5148 (define-public java-commons-logging-minimal
5149 (package
5150 (name "java-commons-logging-minimal")
5151 (version "1.2")
5152 (source (origin
5153 (method url-fetch)
5154 (uri (string-append "mirror://apache/commons/logging/source/"
5155 "commons-logging-" version "-src.tar.gz"))
5156 (sha256
5157 (base32
5158 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5159 (build-system ant-build-system)
5160 (arguments
5161 `(#:tests? #f ; avoid dependency on logging frameworks
5162 #:jar-name "commons-logging-minimal.jar"
5163 #:phases
5164 (modify-phases %standard-phases
5165 (add-after 'unpack 'delete-adapters-and-tests
5166 (lambda _
5167 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5168 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5169 ;; is used by applications; SimpleLog is the only actually usable
5170 ;; implementation that does not depend on another logging
5171 ;; framework.
5172 (for-each
5173 (lambda (file)
5174 (delete-file (string-append
5175 "src/main/java/org/apache/commons/logging/impl/" file)))
5176 (list "Jdk13LumberjackLogger.java"
5177 "WeakHashtable.java"
5178 "Log4JLogger.java"
5179 "ServletContextCleaner.java"
5180 "Jdk14Logger.java"
5181 "AvalonLogger.java"
5182 "LogKitLogger.java"))
5183 (delete-file-recursively "src/test")
5184 #t)))))
5185 (home-page "http://commons.apache.org/logging/")
5186 (synopsis "Common API for logging implementations")
5187 (description "The Logging package is a thin bridge between different
5188 logging implementations. A library that uses the commons-logging API can be
5189 used with any logging implementation at runtime.")
5190 (license license:asl2.0)))
5191
5192 ;; This is the last release of the 1.x series.
5193 (define-public java-mockito-1
5194 (package
5195 (name "java-mockito")
5196 (version "1.10.19")
5197 (source (origin
5198 (method url-fetch)
5199 (uri (string-append "http://repo1.maven.org/maven2/"
5200 "org/mockito/mockito-core/" version
5201 "/mockito-core-" version "-sources.jar"))
5202 (sha256
5203 (base32
5204 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5205 (build-system ant-build-system)
5206 (arguments
5207 `(#:jar-name "mockito.jar"
5208 #:tests? #f ; no tests included
5209 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5210 ;; patches in build phases.
5211 #:phases
5212 (modify-phases %standard-phases
5213 ;; Mockito was developed against a different version of hamcrest,
5214 ;; which does not require matcher implementations to provide an
5215 ;; implementation of the "describeMismatch" method. We add this
5216 ;; simple definition to pass the build with our version of hamcrest.
5217 (add-after 'unpack 'fix-hamcrest-build-error
5218 (lambda _
5219 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5220 (("public Matcher getActualMatcher\\(\\) .*" line)
5221 (string-append "
5222 public void describeMismatch(Object item, Description description) {
5223 actualMatcher.describeMismatch(item, description);
5224 }"
5225 line)))
5226 #t))
5227 ;; Mockito bundles cglib. We have a cglib package, so let's use
5228 ;; that instead.
5229 (add-after 'unpack 'use-system-libraries
5230 (lambda _
5231 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5232 (substitute* '("CGLIBHacker.java"
5233 "CglibMockMaker.java"
5234 "ClassImposterizer.java"
5235 "DelegatingMockitoMethodProxy.java"
5236 "MethodInterceptorFilter.java"
5237 "MockitoNamingPolicy.java"
5238 "SerializableMockitoMethodProxy.java"
5239 "SerializableNoOp.java")
5240 (("import org.mockito.cglib") "import net.sf.cglib")))
5241 #t)))))
5242 (inputs
5243 `(("java-junit" ,java-junit)
5244 ("java-objenesis" ,java-objenesis)
5245 ("java-cglib" ,java-cglib)
5246 ("java-hamcrest-core" ,java-hamcrest-core)))
5247 (home-page "http://mockito.org")
5248 (synopsis "Mockito is a mock library for Java")
5249 (description "Mockito is a mocking library for Java which lets you write
5250 tests with a clean and simple API. It generates mocks using reflection, and
5251 it records all mock invocations, including methods arguments.")
5252 (license license:asl2.0)))
5253
5254 (define-public java-httpcomponents-httpcore
5255 (package
5256 (name "java-httpcomponents-httpcore")
5257 (version "4.4.6")
5258 (source (origin
5259 (method url-fetch)
5260 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5261 "source/httpcomponents-core-"
5262 version "-src.tar.gz"))
5263 (sha256
5264 (base32
5265 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5266 (build-system ant-build-system)
5267 (arguments
5268 `(#:jar-name "httpcomponents-httpcore.jar"
5269 #:phases
5270 (modify-phases %standard-phases
5271 (add-after 'unpack 'chdir
5272 (lambda _ (chdir "httpcore") #t)))))
5273 (inputs
5274 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5275 ("java-commons-lang3" ,java-commons-lang3)))
5276 (native-inputs
5277 `(("java-junit" ,java-junit)
5278 ("java-mockito" ,java-mockito-1)))
5279 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5280 (synopsis "Low level HTTP transport components")
5281 (description "HttpCore is a set of low level HTTP transport components
5282 that can be used to build custom client and server side HTTP services with a
5283 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5284 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5285 NIO.
5286
5287 This package provides the blocking I/O model library.")
5288 (license license:asl2.0)))
5289
5290 (define-public java-httpcomponents-httpcore-nio
5291 (package (inherit java-httpcomponents-httpcore)
5292 (name "java-httpcomponents-httpcore-nio")
5293 (arguments
5294 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5295 #:phases
5296 (modify-phases %standard-phases
5297 (add-after 'unpack 'chdir
5298 (lambda _ (chdir "httpcore-nio") #t)))))
5299 (inputs
5300 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5301 ("java-hamcrest-core" ,java-hamcrest-core)
5302 ,@(package-inputs java-httpcomponents-httpcore)))
5303 (description "HttpCore is a set of low level HTTP transport components
5304 that can be used to build custom client and server side HTTP services with a
5305 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5306 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5307 NIO.
5308
5309 This package provides the non-blocking I/O model library based on Java
5310 NIO.")))
5311
5312 (define-public java-httpcomponents-httpcore-ab
5313 (package (inherit java-httpcomponents-httpcore)
5314 (name "java-httpcomponents-httpcore-ab")
5315 (arguments
5316 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5317 #:phases
5318 (modify-phases %standard-phases
5319 (add-after 'unpack 'chdir
5320 (lambda _ (chdir "httpcore-ab") #t)))))
5321 (inputs
5322 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5323 ("java-commons-cli" ,java-commons-cli)
5324 ("java-hamcrest-core" ,java-hamcrest-core)
5325 ,@(package-inputs java-httpcomponents-httpcore)))
5326 (synopsis "Apache HttpCore benchmarking tool")
5327 (description "This package provides the HttpCore benchmarking tool. It is
5328 an Apache AB clone based on HttpCore.")))
5329
5330 (define-public java-httpcomponents-httpclient
5331 (package
5332 (name "java-httpcomponents-httpclient")
5333 (version "4.5.3")
5334 (source (origin
5335 (method url-fetch)
5336 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5337 "source/httpcomponents-client-"
5338 version "-src.tar.gz"))
5339 (sha256
5340 (base32
5341 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5342 (build-system ant-build-system)
5343 (arguments
5344 `(#:jar-name "httpcomponents-httpclient.jar"
5345 #:phases
5346 (modify-phases %standard-phases
5347 (add-after 'unpack 'chdir
5348 (lambda _ (chdir "httpclient") #t)))))
5349 (inputs
5350 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5351 ("java-commons-codec" ,java-commons-codec)
5352 ("java-hamcrest-core" ,java-hamcrest-core)
5353 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5354 ("java-mockito" ,java-mockito-1)
5355 ("java-junit" ,java-junit)))
5356 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5357 (synopsis "HTTP client library for Java")
5358 (description "Although the @code{java.net} package provides basic
5359 functionality for accessing resources via HTTP, it doesn't provide the full
5360 flexibility or functionality needed by many applications. @code{HttpClient}
5361 seeks to fill this void by providing an efficient, up-to-date, and
5362 feature-rich package implementing the client side of the most recent HTTP
5363 standards and recommendations.")
5364 (license license:asl2.0)))
5365
5366 (define-public java-httpcomponents-httpmime
5367 (package (inherit java-httpcomponents-httpclient)
5368 (name "java-httpcomponents-httpmime")
5369 (arguments
5370 `(#:jar-name "httpcomponents-httpmime.jar"
5371 #:phases
5372 (modify-phases %standard-phases
5373 (add-after 'unpack 'chdir
5374 (lambda _ (chdir "httpmime") #t)))))
5375 (inputs
5376 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5377 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5378 ("java-junit" ,java-junit)
5379 ("java-hamcrest-core" ,java-hamcrest-core)))))
5380
5381 (define-public java-commons-net
5382 (package
5383 (name "java-commons-net")
5384 (version "3.6")
5385 (source (origin
5386 (method url-fetch)
5387 (uri (string-append "mirror://apache/commons/net/source/"
5388 "commons-net-" version "-src.tar.gz"))
5389 (sha256
5390 (base32
5391 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5392 (build-system ant-build-system)
5393 (arguments
5394 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5395 ;; should be "resources/examples/examples.properties"), but gets "null"
5396 ;; instead.
5397 #:tests? #f
5398 #:jar-name "commons-net.jar"))
5399 (native-inputs
5400 `(("java-junit" ,java-junit)
5401 ("java-hamcrest-core" ,java-hamcrest-core)))
5402 (home-page "http://commons.apache.org/net/")
5403 (synopsis "Client library for many basic Internet protocols")
5404 (description "The Apache Commons Net library implements the client side of
5405 many basic Internet protocols. The purpose of the library is to provide
5406 fundamental protocol access, not higher-level abstractions.")
5407 (license license:asl2.0)))
5408
5409 (define-public java-jsch
5410 (package
5411 (name "java-jsch")
5412 (version "0.1.55")
5413 (source (origin
5414 (method url-fetch)
5415 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5416 version "/jsch-" version ".zip"))
5417 (sha256
5418 (base32
5419 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5420 (build-system ant-build-system)
5421 (arguments
5422 `(#:build-target "dist"
5423 #:tests? #f ; no tests included
5424 #:phases
5425 (modify-phases %standard-phases
5426 (replace 'install (install-jars "dist")))))
5427 (native-inputs
5428 `(("unzip" ,unzip)))
5429 (home-page "http://www.jcraft.com/jsch/")
5430 (synopsis "Pure Java implementation of SSH2")
5431 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5432 to connect to an SSH server and use port forwarding, X11 forwarding, file
5433 transfer, etc., and you can integrate its functionality into your own Java
5434 programs.")
5435 (license license:bsd-3)))
5436
5437 (define-public java-commons-compress
5438 (package
5439 (name "java-commons-compress")
5440 (version "1.13")
5441 (source (origin
5442 (method url-fetch)
5443 (uri (string-append "mirror://apache/commons/compress/source/"
5444 "commons-compress-" version "-src.tar.gz"))
5445 (sha256
5446 (base32
5447 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5448 (build-system ant-build-system)
5449 (arguments
5450 `(#:jar-name "commons-compress.jar"
5451 #:phases
5452 (modify-phases %standard-phases
5453 (add-after 'unpack 'delete-bad-tests
5454 (lambda _
5455 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5456 ;; FIXME: These tests really should not fail. Maybe they are
5457 ;; indicative of problems with our Java packaging work.
5458
5459 ;; This test fails with a null pointer exception.
5460 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5461 ;; This test fails to open test resources.
5462 (delete-file "archivers/zip/ExplodeSupportTest.java")
5463
5464 ;; FIXME: This test adds a dependency on powermock, which is hard to
5465 ;; package at this point.
5466 ;; https://github.com/powermock/powermock
5467 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5468 #t)))))
5469 (inputs
5470 `(("java-junit" ,java-junit)
5471 ("java-hamcrest-core" ,java-hamcrest-core)
5472 ("java-mockito" ,java-mockito-1)
5473 ("java-xz" ,java-xz)))
5474 (home-page "https://commons.apache.org/proper/commons-compress/")
5475 (synopsis "Java library for working with compressed files")
5476 (description "The Apache Commons Compress library defines an API for
5477 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5478 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5479 (license license:asl2.0)))
5480
5481 (define-public java-commons-csv
5482 (package
5483 (name "java-commons-csv")
5484 (version "1.4")
5485 (source (origin
5486 (method url-fetch)
5487 (uri (string-append "mirror://apache/commons/csv/source/"
5488 "commons-csv-" version "-src.tar.gz"))
5489 (sha256
5490 (base32
5491 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5492 (build-system ant-build-system)
5493 (arguments
5494 `(#:jar-name "commons-csv.jar"
5495 #:source-dir "src/main/java"
5496 #:tests? #f)); FIXME: requires java-h2
5497 (inputs
5498 `(("java-hamcrest-core" ,java-hamcrest-core)
5499 ("java-commons-io" ,java-commons-io)
5500 ("java-commons-lang3" ,java-commons-lang3)
5501 ("junit" ,java-junit)))
5502 (home-page "https://commons.apache.org/proper/commons-csv/")
5503 (synopsis "Read and write CSV documents")
5504 (description "Commons CSV reads and writes files in variations of the Comma
5505 Separated Value (CSV) format. The most common CSV formats are predefined in the
5506 CSVFormat class:
5507
5508 @itemize
5509 @item Microsoft Excel
5510 @item Informix UNLOAD
5511 @item Informix UNLOAD CSV
5512 @item MySQL
5513 @item RFC 4180
5514 @item TDF
5515 @end itemize
5516
5517 Custom formats can be created using a fluent style API.")
5518 (license license:asl2.0)))
5519
5520 (define-public java-osgi-annotation
5521 (package
5522 (name "java-osgi-annotation")
5523 (version "6.0.0")
5524 (source (origin
5525 (method url-fetch)
5526 (uri (string-append "https://repo1.maven.org/maven2/"
5527 "org/osgi/org.osgi.annotation/" version "/"
5528 "org.osgi.annotation-" version "-sources.jar"))
5529 (sha256
5530 (base32
5531 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5532 (build-system ant-build-system)
5533 (arguments
5534 `(#:tests? #f ; no tests
5535 #:jar-name "osgi-annotation.jar"))
5536 (home-page "https://www.osgi.org")
5537 (synopsis "Annotation module of OSGi framework")
5538 (description
5539 "OSGi, for Open Services Gateway initiative framework, is a module system
5540 and service platform for the Java programming language. This package contains
5541 the OSGi annotation module, providing additional services to help dynamic
5542 components.")
5543 (license license:asl2.0)))
5544
5545 (define-public java-osgi-core
5546 (package
5547 (name "java-osgi-core")
5548 (version "6.0.0")
5549 (source (origin
5550 (method url-fetch)
5551 (uri (string-append "https://repo1.maven.org/maven2/"
5552 "org/osgi/org.osgi.core/" version "/"
5553 "org.osgi.core-" version "-sources.jar"))
5554 (sha256
5555 (base32
5556 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5557 (build-system ant-build-system)
5558 (arguments
5559 `(#:tests? #f ; no tests
5560 #:jar-name "osgi-core.jar"))
5561 (inputs
5562 `(("java-osgi-annotation" ,java-osgi-annotation)))
5563 (home-page "https://www.osgi.org")
5564 (synopsis "Core module of OSGi framework")
5565 (description
5566 "OSGi, for Open Services Gateway initiative framework, is a module system
5567 and service platform for the Java programming language. This package contains
5568 the OSGi Core module.")
5569 (license license:asl2.0)))
5570
5571 (define-public java-osgi-service-event
5572 (package
5573 (name "java-osgi-service-event")
5574 (version "1.3.1")
5575 (source (origin
5576 (method url-fetch)
5577 (uri (string-append "https://repo1.maven.org/maven2/"
5578 "org/osgi/org.osgi.service.event/"
5579 version "/org.osgi.service.event-"
5580 version "-sources.jar"))
5581 (sha256
5582 (base32
5583 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5584 (build-system ant-build-system)
5585 (arguments
5586 `(#:tests? #f ; no tests
5587 #:jar-name "osgi-service-event.jar"))
5588 (inputs
5589 `(("java-osgi-annotation" ,java-osgi-annotation)
5590 ("java-osgi-core" ,java-osgi-core)))
5591 (home-page "https://www.osgi.org")
5592 (synopsis "OSGi service event module")
5593 (description
5594 "OSGi, for Open Services Gateway initiative framework, is a module system
5595 and service platform for the Java programming language. This package contains
5596 the OSGi @code{org.osgi.service.event} module.")
5597 (license license:asl2.0)))
5598
5599 (define-public java-eclipse-osgi
5600 (package
5601 (name "java-eclipse-osgi")
5602 (version "3.11.3")
5603 (source (origin
5604 (method url-fetch)
5605 (uri (string-append "https://repo1.maven.org/maven2/"
5606 "org/eclipse/platform/org.eclipse.osgi/"
5607 version "/org.eclipse.osgi-"
5608 version "-sources.jar"))
5609 (sha256
5610 (base32
5611 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5612 (build-system ant-build-system)
5613 (arguments
5614 `(#:tests? #f ; no tests included
5615 #:jar-name "eclipse-equinox-osgi.jar"))
5616 (inputs
5617 `(("java-osgi-annotation" ,java-osgi-annotation)))
5618 (home-page "http://www.eclipse.org/equinox/")
5619 (synopsis "Eclipse Equinox OSGi framework")
5620 (description "This package provides an implementation of the OSGi Core
5621 specification.")
5622 (license license:epl1.0)))
5623
5624 (define-public java-eclipse-equinox-common
5625 (package
5626 (name "java-eclipse-equinox-common")
5627 (version "3.10.200")
5628 (source (origin
5629 (method url-fetch)
5630 (uri (string-append "https://repo1.maven.org/maven2/"
5631 "org/eclipse/platform/org.eclipse.equinox.common/"
5632 version "/org.eclipse.equinox.common-"
5633 version "-sources.jar"))
5634 (sha256
5635 (base32
5636 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5637 (build-system ant-build-system)
5638 (arguments
5639 `(#:tests? #f ; no tests included
5640 #:jar-name "eclipse-equinox-common.jar"))
5641 (inputs
5642 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5643 (home-page "http://www.eclipse.org/equinox/")
5644 (synopsis "Common Eclipse runtime")
5645 (description "This package provides the common Eclipse runtime.")
5646 (license license:epl1.0)))
5647
5648 (define-public java-eclipse-core-jobs
5649 (package
5650 (name "java-eclipse-core-jobs")
5651 (version "3.8.0")
5652 (source (origin
5653 (method url-fetch)
5654 (uri (string-append "https://repo1.maven.org/maven2/"
5655 "org/eclipse/platform/org.eclipse.core.jobs/"
5656 version "/org.eclipse.core.jobs-"
5657 version "-sources.jar"))
5658 (sha256
5659 (base32
5660 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5661 (build-system ant-build-system)
5662 (arguments
5663 `(#:tests? #f ; no tests included
5664 #:jar-name "eclipse-core-jobs.jar"))
5665 (inputs
5666 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5667 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5668 (home-page "http://www.eclipse.org/equinox/")
5669 (synopsis "Eclipse jobs mechanism")
5670 (description "This package provides the Eclipse jobs mechanism.")
5671 (license license:epl1.0)))
5672
5673 (define-public java-eclipse-equinox-registry
5674 (package
5675 (name "java-eclipse-equinox-registry")
5676 (version "3.6.100")
5677 (source (origin
5678 (method url-fetch)
5679 (uri (string-append "https://repo1.maven.org/maven2/"
5680 "org/eclipse/platform/org.eclipse.equinox.registry/"
5681 version "/org.eclipse.equinox.registry-"
5682 version "-sources.jar"))
5683 (sha256
5684 (base32
5685 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5686 (build-system ant-build-system)
5687 (arguments
5688 `(#:tests? #f ; no tests included
5689 #:jar-name "eclipse-equinox-registry.jar"))
5690 (inputs
5691 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5692 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5693 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5694 (home-page "http://www.eclipse.org/equinox/")
5695 (synopsis "Eclipse extension registry support")
5696 (description "This package provides support for the Eclipse extension
5697 registry.")
5698 (license license:epl1.0)))
5699
5700 (define-public java-eclipse-equinox-app
5701 (package
5702 (name "java-eclipse-equinox-app")
5703 (version "1.3.400")
5704 (source (origin
5705 (method url-fetch)
5706 (uri (string-append "https://repo1.maven.org/maven2/"
5707 "org/eclipse/platform/org.eclipse.equinox.app/"
5708 version "/org.eclipse.equinox.app-"
5709 version "-sources.jar"))
5710 (sha256
5711 (base32
5712 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5713 (build-system ant-build-system)
5714 (arguments
5715 `(#:tests? #f ; no tests included
5716 #:jar-name "eclipse-equinox-app.jar"))
5717 (inputs
5718 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5719 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5720 ("java-eclipse-osgi" ,java-eclipse-osgi)
5721 ("java-osgi-service-event" ,java-osgi-service-event)))
5722 (home-page "http://www.eclipse.org/equinox/")
5723 (synopsis "Equinox application container")
5724 (description "This package provides the Equinox application container for
5725 Eclipse.")
5726 (license license:epl1.0)))
5727
5728 (define-public java-eclipse-equinox-preferences
5729 (package
5730 (name "java-eclipse-equinox-preferences")
5731 (version "3.6.1")
5732 (source (origin
5733 (method url-fetch)
5734 (uri (string-append "https://repo1.maven.org/maven2/"
5735 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5736 version "/org.eclipse.equinox.preferences-"
5737 version "-sources.jar"))
5738 (sha256
5739 (base32
5740 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5741 (build-system ant-build-system)
5742 (arguments
5743 `(#:tests? #f ; no tests included
5744 #:jar-name "eclipse-equinox-preferences.jar"))
5745 (inputs
5746 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5747 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5748 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5749 (home-page "http://www.eclipse.org/equinox/")
5750 (synopsis "Eclipse preferences mechanism")
5751 (description "This package provides the Eclipse preferences mechanism with
5752 the module @code{org.eclipse.equinox.preferences}.")
5753 (license license:epl1.0)))
5754
5755 (define-public java-eclipse-core-contenttype
5756 (package
5757 (name "java-eclipse-core-contenttype")
5758 (version "3.5.100")
5759 (source (origin
5760 (method url-fetch)
5761 (uri (string-append "https://repo1.maven.org/maven2/"
5762 "org/eclipse/platform/org.eclipse.core.contenttype/"
5763 version "/org.eclipse.core.contenttype-"
5764 version "-sources.jar"))
5765 (sha256
5766 (base32
5767 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5768 (build-system ant-build-system)
5769 (arguments
5770 `(#:tests? #f ; no tests included
5771 #:jar-name "eclipse-core-contenttype.jar"))
5772 (inputs
5773 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5774 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5775 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5776 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5777 (home-page "http://www.eclipse.org/")
5778 (synopsis "Eclipse content mechanism")
5779 (description "This package provides the Eclipse content mechanism in the
5780 @code{org.eclipse.core.contenttype} module.")
5781 (license license:epl1.0)))
5782
5783 (define-public java-eclipse-core-runtime
5784 (package
5785 (name "java-eclipse-core-runtime")
5786 (version "3.15.100")
5787 (source (origin
5788 (method url-fetch)
5789 (uri (string-append "https://repo1.maven.org/maven2/"
5790 "org/eclipse/platform/org.eclipse.core.runtime/"
5791 version "/org.eclipse.core.runtime-"
5792 version "-sources.jar"))
5793 (sha256
5794 (base32
5795 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5796 (build-system ant-build-system)
5797 (arguments
5798 `(#:tests? #f ; no tests included
5799 #:jar-name "eclipse-core-runtime.jar"))
5800 (inputs
5801 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5802 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5803 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5804 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5805 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5806 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5807 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5808 (home-page "https://www.eclipse.org/")
5809 (synopsis "Eclipse core runtime")
5810 (description "This package provides the Eclipse core runtime with the
5811 module @code{org.eclipse.core.runtime}.")
5812 (license license:epl1.0)))
5813
5814 (define-public java-eclipse-core-filesystem
5815 (package
5816 (name "java-eclipse-core-filesystem")
5817 (version "1.6.1")
5818 (source (origin
5819 (method url-fetch)
5820 (uri (string-append "https://repo1.maven.org/maven2/"
5821 "org/eclipse/platform/org.eclipse.core.filesystem/"
5822 version "/org.eclipse.core.filesystem-"
5823 version "-sources.jar"))
5824 (sha256
5825 (base32
5826 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5827 (build-system ant-build-system)
5828 (arguments
5829 `(#:tests? #f ; no tests included
5830 #:jar-name "eclipse-core-filesystem.jar"))
5831 (inputs
5832 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5833 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5834 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5835 (home-page "https://www.eclipse.org/")
5836 (synopsis "Eclipse core file system")
5837 (description "This package provides the Eclipse core file system with the
5838 module @code{org.eclipse.core.filesystem}.")
5839 (license license:epl1.0)))
5840
5841 (define-public java-eclipse-core-expressions
5842 (package
5843 (name "java-eclipse-core-expressions")
5844 (version "3.5.100")
5845 (source (origin
5846 (method url-fetch)
5847 (uri (string-append "https://repo1.maven.org/maven2/"
5848 "org/eclipse/platform/org.eclipse.core.expressions/"
5849 version "/org.eclipse.core.expressions-"
5850 version "-sources.jar"))
5851 (sha256
5852 (base32
5853 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5854 (build-system ant-build-system)
5855 (arguments
5856 `(#:tests? #f ; no tests included
5857 #:jar-name "eclipse-core-expressions.jar"))
5858 (inputs
5859 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5860 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5861 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5862 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5863 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5864 (home-page "https://www.eclipse.org/")
5865 (synopsis "Eclipse core expression language")
5866 (description "This package provides the Eclipse core expression language
5867 with the @code{org.eclipse.core.expressions} module.")
5868 (license license:epl1.0)))
5869
5870 (define-public java-eclipse-core-variables
5871 (package
5872 (name "java-eclipse-core-variables")
5873 (version "3.3.0")
5874 (source (origin
5875 (method url-fetch)
5876 (uri (string-append "https://repo1.maven.org/maven2/"
5877 "org/eclipse/platform/org.eclipse.core.variables/"
5878 version "/org.eclipse.core.variables-"
5879 version "-sources.jar"))
5880 (sha256
5881 (base32
5882 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5883 (build-system ant-build-system)
5884 (arguments
5885 `(#:tests? #f ; no tests included
5886 #:jar-name "eclipse-core-variables.jar"))
5887 (inputs
5888 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5889 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5890 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5891 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5892 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5893 (home-page "https://www.eclipse.org/platform")
5894 (synopsis "Eclipse core variables")
5895 (description "This package provides the Eclipse core variables module
5896 @code{org.eclipse.core.variables}.")
5897 (license license:epl1.0)))
5898
5899 (define-public java-eclipse-ant-core
5900 (package
5901 (name "java-eclipse-ant-core")
5902 (version "3.4.100")
5903 (source (origin
5904 (method url-fetch)
5905 (uri (string-append "https://repo1.maven.org/maven2/"
5906 "org/eclipse/platform/org.eclipse.ant.core/"
5907 version "/org.eclipse.ant.core-"
5908 version "-sources.jar"))
5909 (sha256
5910 (base32
5911 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5912 (build-system ant-build-system)
5913 (arguments
5914 `(#:tests? #f ; no tests included
5915 #:jar-name "eclipse-ant-core.jar"))
5916 (inputs
5917 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5918 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5919 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5920 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5921 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5922 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5923 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5924 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5925 (home-page "https://www.eclipse.org/platform")
5926 (synopsis "Ant build tool core libraries")
5927 (description "This package provides the ant build tool core libraries with
5928 the module @code{org.eclipse.ant.core}.")
5929 (license license:epl1.0)))
5930
5931 (define-public java-eclipse-core-resources
5932 (package
5933 (name "java-eclipse-core-resources")
5934 (version "3.13.200")
5935 (source (origin
5936 (method url-fetch)
5937 (uri (string-append "https://repo1.maven.org/maven2/"
5938 "org/eclipse/platform/org.eclipse.core.resources/"
5939 version "/org.eclipse.core.resources-"
5940 version "-sources.jar"))
5941 (sha256
5942 (base32
5943 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5944 (build-system ant-build-system)
5945 (arguments
5946 `(#:tests? #f ; no tests included
5947 #:jar-name "eclipse-core-resources.jar"))
5948 (inputs
5949 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5950 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5951 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5952 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5953 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5954 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5955 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5956 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5957 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5958 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5959 (home-page "https://www.eclipse.org/")
5960 (synopsis "Eclipse core resource management")
5961 (description "This package provides the Eclipse core resource management
5962 module @code{org.eclipse.core.resources}.")
5963 (license license:epl1.0)))
5964
5965 (define-public java-eclipse-compare-core
5966 (package
5967 (name "java-eclipse-compare-core")
5968 (version "3.6.0")
5969 (source (origin
5970 (method url-fetch)
5971 (uri (string-append "https://repo1.maven.org/maven2/"
5972 "org/eclipse/platform/org.eclipse.compare.core/"
5973 version "/org.eclipse.compare.core-"
5974 version "-sources.jar"))
5975 (sha256
5976 (base32
5977 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5978 (build-system ant-build-system)
5979 (arguments
5980 `(#:tests? #f ; no tests included
5981 #:jar-name "eclipse-compare-core.jar"))
5982 (inputs
5983 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5984 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5985 ("java-eclipse-osgi" ,java-eclipse-osgi)
5986 ("java-icu4j" ,java-icu4j)))
5987 (home-page "https://www.eclipse.org/")
5988 (synopsis "Eclipse core compare support")
5989 (description "This package provides the Eclipse core compare support
5990 module @code{org.eclipse.compare.core}.")
5991 (license license:epl1.0)))
5992
5993 (define-public java-eclipse-team-core
5994 (package
5995 (name "java-eclipse-team-core")
5996 (version "3.8.0")
5997 (source (origin
5998 (method url-fetch)
5999 (uri (string-append "https://repo1.maven.org/maven2/"
6000 "org/eclipse/platform/org.eclipse.team.core/"
6001 version "/org.eclipse.team.core-"
6002 version "-sources.jar"))
6003 (sha256
6004 (base32
6005 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6006 (build-system ant-build-system)
6007 (arguments
6008 `(#:tests? #f ; no tests included
6009 #:jar-name "eclipse-team-core.jar"))
6010 (inputs
6011 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6012 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6013 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6014 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6015 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6016 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6017 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6018 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6019 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6020 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6021 (home-page "https://www.eclipse.org/platform")
6022 (synopsis "Eclipse team support core")
6023 (description "This package provides the Eclipse team support core module
6024 @code{org.eclipse.team.core}.")
6025 (license license:epl1.0)))
6026
6027 (define-public java-eclipse-core-commands
6028 (package
6029 (name "java-eclipse-core-commands")
6030 (version "3.8.1")
6031 (source (origin
6032 (method url-fetch)
6033 (uri (string-append "https://repo1.maven.org/maven2/"
6034 "org/eclipse/platform/org.eclipse.core.commands/"
6035 version "/org.eclipse.core.commands-"
6036 version "-sources.jar"))
6037 (sha256
6038 (base32
6039 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6040 (build-system ant-build-system)
6041 (arguments
6042 `(#:tests? #f ; no tests included
6043 #:jar-name "eclipse-core-commands.jar"))
6044 (inputs
6045 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6046 (home-page "https://www.eclipse.org/platform")
6047 (synopsis "Eclipse core commands")
6048 (description "This package provides Eclipse core commands in the module
6049 @code{org.eclipse.core.commands}.")
6050 (license license:epl1.0)))
6051
6052 (define-public java-eclipse-text
6053 (package
6054 (name "java-eclipse-text")
6055 (version "3.6.0")
6056 (source (origin
6057 (method url-fetch)
6058 (uri (string-append "https://repo1.maven.org/maven2/"
6059 "org/eclipse/platform/org.eclipse.text/"
6060 version "/org.eclipse.text-"
6061 version "-sources.jar"))
6062 (sha256
6063 (base32
6064 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6065 (build-system ant-build-system)
6066 (arguments
6067 `(#:tests? #f ; no tests included
6068 #:jar-name "eclipse-text.jar"
6069 #:phases
6070 (modify-phases %standard-phases
6071 ;; When creating a new category we must make sure that the new list
6072 ;; matches List<Position>. By default it seems to be too generic
6073 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6074 ;; Without this we get this error:
6075 ;;
6076 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6077 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6078 ;; [javac] fPositions.put(category, new ArrayList<>());
6079 ;; [javac] ^
6080 ;; [javac] required: String,List<Position>
6081 ;; [javac] found: String,ArrayList<Object>
6082 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6083 ;; to List<Position> by method invocation conversion
6084 ;; [javac] where K,V are type-variables:
6085 ;; [javac] K extends Object declared in interface Map
6086 ;; [javac] V extends Object declared in interface Map
6087 ;;
6088 ;; I don't know if this is a good fix. I suspect it is not, but it
6089 ;; seems to work.
6090 (add-after 'unpack 'fix-compilation-error
6091 (lambda _
6092 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6093 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6094 "Positions.put(category, new ArrayList<Position>());"))
6095 #t)))))
6096 (inputs
6097 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6098 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6099 ("java-icu4j" ,java-icu4j)))
6100 (home-page "http://www.eclipse.org/platform")
6101 (synopsis "Eclipse text library")
6102 (description "Platform Text is part of the Platform UI project and
6103 provides the basic building blocks for text and text editors within Eclipse
6104 and contributes the Eclipse default text editor.")
6105 (license license:epl1.0)))
6106
6107 (define-public java-eclipse-jdt-core
6108 (package
6109 (name "java-eclipse-jdt-core")
6110 (version "3.16.0")
6111 (source (origin
6112 (method url-fetch)
6113 (uri (string-append "https://repo1.maven.org/maven2/"
6114 "org/eclipse/jdt/org.eclipse.jdt.core/"
6115 version "/org.eclipse.jdt.core-"
6116 version "-sources.jar"))
6117 (sha256
6118 (base32
6119 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6120 (build-system ant-build-system)
6121 (arguments
6122 `(#:tests? #f ; no tests included
6123 #:jar-name "eclipse-jdt-core.jar"
6124 #:phases
6125 (modify-phases %standard-phases
6126 (add-after 'unpack 'move-sources
6127 (lambda _
6128 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6129 (for-each (lambda (file)
6130 (install-file file (string-append "../" (dirname file))))
6131 (find-files "." ".*")))
6132 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6133 #t))
6134 (add-before 'build 'copy-resources
6135 (lambda _
6136 (with-directory-excursion "src"
6137 (for-each (lambda (file)
6138 (install-file file (string-append "../build/classes/" (dirname file))))
6139 (find-files "." ".*.(props|properties|rsc)")))
6140 #t)))))
6141 (inputs
6142 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6143 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6144 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6145 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6146 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6147 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6148 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6149 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6150 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6151 ("java-eclipse-osgi" ,java-eclipse-osgi)
6152 ("java-eclipse-text" ,java-eclipse-text)))
6153 (home-page "https://www.eclipse.org/jdt")
6154 (synopsis "Java development tools core libraries")
6155 (description "This package provides the core libraries of the Eclipse Java
6156 development tools.")
6157 (license license:epl1.0)))
6158
6159 (define-public java-eclipse-jdt-compiler-apt
6160 (package
6161 (name "java-eclipse-jdt-compiler-apt")
6162 (version "1.3.400")
6163 (source (origin
6164 (method url-fetch)
6165 (uri (string-append "https://repo1.maven.org/maven2/"
6166 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6167 version "/org.eclipse.jdt.compiler.apt-"
6168 version "-sources.jar"))
6169 (sha256
6170 (base32
6171 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6172 (build-system ant-build-system)
6173 (arguments
6174 `(#:tests? #f ; no tests included
6175 #:jar-name "eclipse-jdt-compiler-apt.jar"
6176 #:jdk ,openjdk11))
6177 (inputs
6178 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6179 (home-page "https://www.eclipse.org/jdt/apt/")
6180 (synopsis "Annotation processing tool")
6181 (description "APT stands for Annotation Processing Tool. APT provides a
6182 means for generating files and compiling new Java classes based on annotations
6183 found in your source code.")
6184 (license license:epl2.0)))
6185
6186 (define-public java-javax-mail
6187 (package
6188 (name "java-javax-mail")
6189 (version "1.5.6")
6190 (source (origin
6191 (method url-fetch)
6192 (uri (string-append "https://repo1.maven.org/maven2/"
6193 "com/sun/mail/javax.mail/"
6194 version "/javax.mail-"
6195 version "-sources.jar"))
6196 (sha256
6197 (base32
6198 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6199 (build-system ant-build-system)
6200 (arguments
6201 `(#:tests? #f ; no tests
6202 #:jar-name "javax-mail.jar"))
6203 (home-page "https://javamail.java.net")
6204 (synopsis "Reference implementation of the JavaMail API")
6205 (description
6206 "This package provides versions of the JavaMail API implementation, IMAP,
6207 SMTP, and POP3 service providers, some examples, and documentation for the
6208 JavaMail API.")
6209 ;; GPLv2 only with "classpath exception".
6210 (license license:gpl2)))
6211
6212 (define-public java-log4j-api
6213 (package
6214 (name "java-log4j-api")
6215 (version "2.4.1")
6216 (source (origin
6217 (method url-fetch)
6218 (uri (string-append "mirror://apache/logging/log4j/" version
6219 "/apache-log4j-" version "-src.tar.gz"))
6220 (sha256
6221 (base32
6222 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6223 (build-system ant-build-system)
6224 (arguments
6225 `(#:tests? #f ; tests require unpackaged software
6226 #:jar-name "log4j-api.jar"
6227 #:make-flags
6228 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6229 "/share/java"))
6230 #:phases
6231 (modify-phases %standard-phases
6232 (add-after 'unpack 'enter-dir
6233 (lambda _ (chdir "log4j-api") #t))
6234 ;; FIXME: The tests require additional software that has not been
6235 ;; packaged yet, such as
6236 ;; * org.apache.maven
6237 ;; * org.apache.felix
6238 (add-after 'enter-dir 'delete-tests
6239 (lambda _ (delete-file-recursively "src/test") #t)))))
6240 (inputs
6241 `(("java-osgi-core" ,java-osgi-core)
6242 ("java-hamcrest-core" ,java-hamcrest-core)
6243 ("java-junit" ,java-junit)))
6244 (home-page "http://logging.apache.org/log4j/2.x/")
6245 (synopsis "API module of the Log4j logging framework for Java")
6246 (description
6247 "This package provides the API module of the Log4j logging framework for
6248 Java.")
6249 (license license:asl2.0)))
6250
6251 (define-public java-log4j-core
6252 (package
6253 (inherit java-log4j-api)
6254 (name "java-log4j-core")
6255 (inputs
6256 `(("java-osgi-core" ,java-osgi-core)
6257 ("java-hamcrest-core" ,java-hamcrest-core)
6258 ("java-log4j-api" ,java-log4j-api)
6259 ("java-mail" ,java-mail)
6260 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6261 ("java-lmax-disruptor" ,java-lmax-disruptor)
6262 ("java-kafka" ,java-kafka-clients)
6263 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6264 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6265 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6266 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6267 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6268 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6269 ("java-commons-compress" ,java-commons-compress)
6270 ("java-commons-csv" ,java-commons-csv)
6271 ("java-jeromq" ,java-jeromq)
6272 ("java-junit" ,java-junit)))
6273 (native-inputs
6274 `(("hamcrest" ,java-hamcrest-all)
6275 ("java-commons-io" ,java-commons-io)
6276 ("java-commons-lang3" ,java-commons-lang3)
6277 ("slf4j" ,java-slf4j-api)))
6278 (arguments
6279 `(#:tests? #f ; tests require more dependencies
6280 #:test-dir "src/test"
6281 #:source-dir "src/main/java"
6282 #:jar-name "log4j-core.jar"
6283 #:jdk ,icedtea-8
6284 #:make-flags
6285 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6286 "/share/java"))
6287 #:phases
6288 (modify-phases %standard-phases
6289 (add-after 'unpack 'enter-dir
6290 (lambda _ (chdir "log4j-core") #t)))))
6291 (synopsis "Core component of the Log4j framework")
6292 (description "This package provides the core component of the Log4j
6293 logging framework for Java.")))
6294
6295 (define-public java-log4j-1.2-api
6296 (package
6297 (inherit java-log4j-api)
6298 (name "java-log4j-1.2-api")
6299 (arguments
6300 `(#:jar-name "java-log4j-1.2-api.jar"
6301 #:source-dir "log4j-1.2-api/src/main/java"
6302 #:jdk ,icedtea-8
6303 ;; Tests require maven-model (and other maven subprojects), which is a
6304 ;; cyclic dependency.
6305 #:tests? #f))
6306 (inputs
6307 `(("log4j-api" ,java-log4j-api)
6308 ("log4j-core" ,java-log4j-core)
6309 ("osgi-core" ,java-osgi-core)
6310 ("eclipse-osgi" ,java-eclipse-osgi)
6311 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6312
6313 (define-public java-commons-cli
6314 (package
6315 (name "java-commons-cli")
6316 (version "1.4")
6317 (source (origin
6318 (method url-fetch)
6319 (uri (string-append "mirror://apache/commons/cli/source/"
6320 "commons-cli-" version "-src.tar.gz"))
6321 (sha256
6322 (base32
6323 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6324 (build-system ant-build-system)
6325 ;; TODO: javadoc
6326 (arguments
6327 `(#:jar-name "commons-cli.jar"))
6328 (native-inputs
6329 `(("java-junit" ,java-junit)
6330 ("java-hamcrest-core" ,java-hamcrest-core)))
6331 (home-page "http://commons.apache.org/cli/")
6332 (synopsis "Command line arguments and options parsing library")
6333 (description "The Apache Commons CLI library provides an API for parsing
6334 command line options passed to programs. It is also able to print help
6335 messages detailing the options available for a command line tool.
6336
6337 Commons CLI supports different types of options:
6338
6339 @itemize
6340 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6341 @item GNU like long options (ie. du --human-readable --max-depth=1)
6342 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6343 @item Short options with value attached (ie. gcc -O2 foo.c)
6344 @item long options with single hyphen (ie. ant -projecthelp)
6345 @end itemize
6346
6347 This is a part of the Apache Commons Project.")
6348 (license license:asl2.0)))
6349
6350 (define-public java-commons-codec
6351 (package
6352 (name "java-commons-codec")
6353 (version "1.10")
6354 (source (origin
6355 (method url-fetch)
6356 (uri (string-append "mirror://apache/commons/codec/source/"
6357 "commons-codec-" version "-src.tar.gz"))
6358 (sha256
6359 (base32
6360 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6361 (build-system ant-build-system)
6362 (outputs '("out" "doc"))
6363 (arguments
6364 `(#:test-target "test"
6365 #:make-flags
6366 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6367 (junit (assoc-ref %build-inputs "java-junit")))
6368 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6369 (string-append "-Dhamcrest.jar=" hamcrest
6370 "/share/java/hamcrest-core.jar")
6371 ;; Do not append version to jar.
6372 "-Dfinal.name=commons-codec"))
6373 #:phases
6374 (modify-phases %standard-phases
6375 (add-after 'build 'build-javadoc ant-build-javadoc)
6376 (replace 'install (install-jars "dist"))
6377 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6378 (native-inputs
6379 `(("java-junit" ,java-junit)
6380 ("java-hamcrest-core" ,java-hamcrest-core)))
6381 (home-page "http://commons.apache.org/codec/")
6382 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6383 (description "The codec package contains simple encoder and decoders for
6384 various formats such as Base64 and Hexadecimal. In addition to these widely
6385 used encoders and decoders, the codec package also maintains a collection of
6386 phonetic encoding utilities.
6387
6388 This is a part of the Apache Commons Project.")
6389 (license license:asl2.0)))
6390
6391 (define-public java-commons-daemon
6392 (package
6393 (name "java-commons-daemon")
6394 (version "1.1.0")
6395 (source (origin
6396 (method url-fetch)
6397 (uri (string-append "mirror://apache/commons/daemon/source/"
6398 "commons-daemon-" version "-src.tar.gz"))
6399 (sha256
6400 (base32
6401 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6402 (build-system ant-build-system)
6403 (arguments
6404 `(#:test-target "test"
6405 #:phases
6406 (modify-phases %standard-phases
6407 (add-after 'build 'build-javadoc ant-build-javadoc)
6408 (replace 'install (install-jars "dist"))
6409 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6410 (native-inputs
6411 `(("java-junit" ,java-junit)))
6412 (home-page "http://commons.apache.org/daemon/")
6413 (synopsis "Library to launch Java applications as daemons")
6414 (description "The Daemon package from Apache Commons can be used to
6415 implement Java applications which can be launched as daemons. For example the
6416 program will be notified about a shutdown so that it can perform cleanup tasks
6417 before its process of execution is destroyed by the operation system.
6418
6419 This package contains the Java library. You will also need the actual binary
6420 for your architecture which is provided by the jsvc package.
6421
6422 This is a part of the Apache Commons Project.")
6423 (license license:asl2.0)))
6424
6425 (define-public java-javaewah
6426 (package
6427 (name "java-javaewah")
6428 (version "1.1.6")
6429 (source (origin
6430 (method url-fetch)
6431 (uri (string-append "https://github.com/lemire/javaewah/"
6432 "archive/JavaEWAH-" version ".tar.gz"))
6433 (sha256
6434 (base32
6435 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6436 (build-system ant-build-system)
6437 (arguments `(#:jar-name "javaewah.jar"))
6438 (inputs
6439 `(("java-junit" ,java-junit)
6440 ("java-hamcrest-core" ,java-hamcrest-core)))
6441 (home-page "https://github.com/lemire/javaewah")
6442 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6443 (description "This is a word-aligned compressed variant of the Java
6444 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6445 compression scheme. It can be used to implement bitmap indexes.
6446
6447 The goal of word-aligned compression is not to achieve the best compression,
6448 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6449 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6450 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6451 @code{BitSet} class by Sun).")
6452 ;; GPL2.0 derivates are explicitly allowed.
6453 (license license:asl2.0)))
6454
6455 (define-public java-slf4j-api
6456 (package
6457 (name "java-slf4j-api")
6458 (version "1.7.25")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6462 version ".tar.gz"))
6463 (sha256
6464 (base32
6465 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6466 (modules '((guix build utils)))
6467 ;; Delete bundled jars.
6468 (snippet
6469 '(begin
6470 (for-each delete-file (find-files "." "\\.jar$"))
6471 #t))))
6472 (build-system ant-build-system)
6473 (arguments
6474 `(#:jar-name "slf4j-api.jar"
6475 #:source-dir "slf4j-api/src/main"
6476 #:test-dir "slf4j-api/src/test"
6477 #:phases
6478 (modify-phases %standard-phases
6479 (add-after 'build 'regenerate-jar
6480 (lambda _
6481 ;; pom.xml ignores these files in the jar creation process. If we don't,
6482 ;; we get the error "This code should have never made it into slf4j-api.jar"
6483 (delete-file-recursively "build/classes/org/slf4j/impl")
6484 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6485 "build/classes" ".")))
6486 (add-before 'check 'dont-test-abstract-classes
6487 (lambda _
6488 ;; abstract classes are not meant to be run with junit
6489 (substitute* "build.xml"
6490 (("<include name=\"\\*\\*/\\*Test.java\" />")
6491 (string-append "<include name=\"**/*Test.java\" />"
6492 "<exclude name=\"**/MultithreadedInitializationTest"
6493 ".java\" />")))
6494 #t)))))
6495 (inputs
6496 `(("java-junit" ,java-junit)
6497 ("java-hamcrest-core" ,java-hamcrest-core)))
6498 (home-page "https://www.slf4j.org/")
6499 (synopsis "Simple logging facade for Java")
6500 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6501 simple facade or abstraction for various logging
6502 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6503 allowing the end user to plug in the desired logging framework at deployment
6504 time.")
6505 (license license:expat)))
6506
6507 (define java-slf4j-api-bootstrap
6508 (package
6509 (inherit java-slf4j-api)
6510 (name "java-slf4j-api-bootstrap")
6511 (inputs `())
6512 (arguments
6513 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6514 ((#:tests? _ #f) #f)))))
6515
6516 (define-public java-slf4j-simple
6517 (package
6518 (name "java-slf4j-simple")
6519 (version "1.7.25")
6520 (source (package-source java-slf4j-api))
6521 (build-system ant-build-system)
6522 (arguments
6523 `(#:jar-name "slf4j-simple.jar"
6524 #:source-dir "slf4j-simple/src/main"
6525 #:test-dir "slf4j-simple/src/test"
6526 #:phases
6527 (modify-phases %standard-phases
6528 ;; The tests need some test classes from slf4j-api
6529 (add-before 'check 'build-slf4j-api-test-helpers
6530 (lambda _
6531 ;; Add current dir to CLASSPATH ...
6532 (setenv "CLASSPATH"
6533 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6534 ;; ... and build test helper classes here:
6535 (apply invoke
6536 `("javac" "-d" "."
6537 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6538 (inputs
6539 `(("java-junit" ,java-junit)
6540 ("java-hamcrest-core" ,java-hamcrest-core)
6541 ("java-slf4j-api" ,java-slf4j-api)))
6542 (home-page "https://www.slf4j.org/")
6543 (synopsis "Simple implementation of simple logging facade for Java")
6544 (description "SLF4J binding for the Simple implementation, which outputs
6545 all events to System.err. Only messages of level INFO and higher are
6546 printed.")
6547 (license license:expat)))
6548
6549 (define-public antlr2
6550 (package
6551 (name "antlr2")
6552 (version "2.7.7")
6553 (source (origin
6554 (method url-fetch)
6555 (uri (string-append "http://www.antlr2.org/download/antlr-"
6556 version ".tar.gz"))
6557 (sha256
6558 (base32
6559 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6560 (modules '((guix build utils)))
6561 (snippet
6562 '(begin
6563 (delete-file "antlr.jar")
6564 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6565 (("#include <map>")
6566 (string-append
6567 "#include <map>\n"
6568 "#define EOF (-1)\n"
6569 "#include <strings.h>")))
6570 (substitute* "configure"
6571 (("/bin/sh") "sh"))
6572 #t))))
6573 (build-system gnu-build-system)
6574 (arguments
6575 `(#:tests? #f ; no test target
6576 #:imported-modules ((guix build ant-build-system)
6577 (guix build syscalls)
6578 ,@%gnu-build-system-modules)
6579 #:modules (((guix build ant-build-system) #:prefix ant:)
6580 (guix build gnu-build-system)
6581 (guix build utils))
6582 #:phases
6583 (modify-phases %standard-phases
6584 (add-after 'install 'strip-jar-timestamps
6585 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6586 (add-before 'configure 'fix-timestamp
6587 (lambda _
6588 (substitute* "configure"
6589 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6590 #t))
6591 (add-after 'configure 'fix-bin-ls
6592 (lambda _
6593 (substitute* (find-files "." "Makefile")
6594 (("/bin/ls") "ls"))
6595 #t)))))
6596 (native-inputs
6597 `(("which" ,which)
6598 ("zip" ,zip)
6599 ("java" ,icedtea "jdk")))
6600 (inputs
6601 `(("java" ,icedtea)))
6602 (home-page "http://www.antlr2.org")
6603 (synopsis "Framework for constructing recognizers, compilers, and translators")
6604 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6605 is a language tool that provides a framework for constructing recognizers,
6606 compilers, and translators from grammatical descriptions containing Java, C#,
6607 C++, or Python actions. ANTLR provides excellent support for tree construction,
6608 tree walking, and translation.")
6609 (license license:public-domain)))
6610
6611 (define-public java-stringtemplate-3
6612 (package
6613 (name "java-stringtemplate")
6614 (version "3.2.1")
6615 (source (origin
6616 (method url-fetch)
6617 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6618 "gh-pages/download/stringtemplate-"
6619 version ".tar.gz"))
6620 (sha256
6621 (base32
6622 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6623 (build-system ant-build-system)
6624 (arguments
6625 `(#:jar-name (string-append ,name "-" ,version ".jar")
6626 #:test-dir "test"
6627 #:modules ((guix build ant-build-system)
6628 (guix build utils)
6629 (srfi srfi-1))
6630 #:phases
6631 (modify-phases %standard-phases
6632 (add-before 'check 'fix-tests
6633 (lambda _
6634 (substitute* "build.xml"
6635 (("\\$\\{test.home\\}/java")
6636 "${test.home}/org"))
6637 #t))
6638 (add-before 'build 'generate-grammar
6639 (lambda _
6640 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6641 (for-each (lambda (file)
6642 (format #t "~a\n" file)
6643 (invoke "antlr" file))
6644 '("template.g" "angle.bracket.template.g" "action.g"
6645 "eval.g" "group.g" "interface.g")))
6646 #t)))))
6647 (native-inputs
6648 `(("antlr" ,antlr2)
6649 ("java-junit" ,java-junit)))
6650 (home-page "http://www.stringtemplate.org")
6651 (synopsis "Template engine to generate formatted text output")
6652 (description "StringTemplate is a java template engine (with ports for C#,
6653 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6654 or any other formatted text output. StringTemplate is particularly good at
6655 code generators, multiple site skins, and internationalization / localization.
6656 StringTemplate also powers ANTLR.")
6657 (license license:bsd-3)))
6658
6659 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6660 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6661 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6662 ;; of antlr3 at runtime.
6663 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6664 ;; This version of ST4 is sufficient for the latest antlr3.
6665 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6666 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6667 ;; against the latest ST4.
6668 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6669 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6670 ;; only grammar files with the antlr2 syntax.
6671 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6672
6673 (define-public java-stringtemplate
6674 (package (inherit java-stringtemplate-3)
6675 (name "java-stringtemplate")
6676 (version "4.0.8")
6677 (source (origin
6678 (method url-fetch)
6679 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6680 version ".tar.gz"))
6681 (file-name (string-append name "-" version ".tar.gz"))
6682 (sha256
6683 (base32
6684 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6685 (build-system ant-build-system)
6686 (arguments
6687 `(#:jar-name (string-append ,name "-" ,version ".jar")
6688 #:tests? #f ; FIXME: tests fail for unknown reasons
6689 #:test-dir "test"
6690 #:modules ((guix build ant-build-system)
6691 (guix build utils)
6692 (srfi srfi-1))
6693 #:phases
6694 (modify-phases %standard-phases
6695 (add-before 'check 'fix-test-target
6696 (lambda _
6697 (substitute* "build.xml"
6698 (("\\$\\{test.home\\}/java") "${test.home}/")
6699 (("\\*Test.java") "Test*.java"))
6700 #t))
6701 (add-before 'build 'generate-grammar
6702 (lambda _
6703 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6704 (for-each (lambda (file)
6705 (format #t "~a\n" file)
6706 (invoke "antlr3" file))
6707 '("STParser.g" "Group.g" "CodeGenerator.g")))
6708 #t)))))
6709 (inputs
6710 `(("antlr3" ,antlr3-bootstrap)
6711 ("antlr2" ,antlr2)
6712 ("java-stringtemplate" ,java-stringtemplate-3)
6713 ("java-junit" ,java-junit)))))
6714
6715 (define java-stringtemplate-4.0.6
6716 (package (inherit java-stringtemplate)
6717 (name "java-stringtemplate")
6718 (version "4.0.6")
6719 (source (origin
6720 (method url-fetch)
6721 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6722 version ".tar.gz"))
6723 (file-name (string-append name "-" version ".tar.gz"))
6724 (sha256
6725 (base32
6726 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6727 (inputs
6728 `(("antlr3" ,antlr3-3.3)
6729 ("antlr2" ,antlr2)
6730 ("java-stringtemplate" ,java-stringtemplate-3)))))
6731
6732 (define-public antlr3
6733 (package
6734 (name "antlr3")
6735 (version "3.5.2")
6736 (source (origin
6737 (method url-fetch)
6738 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6739 version ".tar.gz"))
6740 (file-name (string-append name "-" version ".tar.gz"))
6741 (sha256
6742 (base32
6743 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6744 (build-system ant-build-system)
6745 (arguments
6746 `(#:jar-name (string-append ,name "-" ,version ".jar")
6747 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6748 #:tests? #f
6749 #:phases
6750 (modify-phases %standard-phases
6751 (add-after 'install 'bin-install
6752 (lambda* (#:key inputs outputs #:allow-other-keys)
6753 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6754 (bin (string-append (assoc-ref outputs "out") "/bin")))
6755 (mkdir-p bin)
6756 (with-output-to-file (string-append bin "/antlr3")
6757 (lambda _
6758 (display
6759 (string-append "#!" (which "sh") "\n"
6760 "java -cp " jar "/" ,name "-" ,version ".jar:"
6761 (string-concatenate
6762 (find-files (assoc-ref inputs "stringtemplate")
6763 ".*\\.jar"))
6764 ":"
6765 (string-concatenate
6766 (find-files (assoc-ref inputs "stringtemplate4")
6767 ".*\\.jar"))
6768 ":"
6769 (string-concatenate
6770 (find-files (string-append
6771 (assoc-ref inputs "antlr")
6772 "/lib")
6773 ".*\\.jar"))
6774 " org.antlr.Tool $*"))))
6775 (chmod (string-append bin "/antlr3") #o755))
6776 #t))
6777 (add-before 'build 'generate-grammar
6778 (lambda _
6779 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6780 (for-each (lambda (file)
6781 (display file)
6782 (newline)
6783 (invoke "antlr3" file))
6784 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6785 "AssignTokenTypesWalker.g"
6786 "ActionTranslator.g" "TreeToNFAConverter.g"
6787 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6788 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6789 (substitute* "ANTLRParser.java"
6790 (("public Object getTree") "public GrammarAST getTree"))
6791 (substitute* "ANTLRv3Parser.java"
6792 (("public Object getTree") "public CommonTree getTree"))
6793 (chdir "../../../../../java")
6794 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6795 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6796 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6797 (substitute* "org/antlr/tool/ErrorManager.java"
6798 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6799 (chdir "../../../..")
6800 #t))
6801 (add-before 'build 'fix-build-xml
6802 (lambda _
6803 (substitute* "build.xml"
6804 (("<exec") "<copy todir=\"${classes.dir}\">
6805 <fileset dir=\"tool/src/main/resources\">
6806 <include name=\"**/*.stg\"/>
6807 <include name=\"**/*.st\"/>
6808 <include name=\"**/*.sti\"/>
6809 <include name=\"**/STLexer.tokens\"/>
6810 </fileset>
6811 </copy><exec"))
6812 #t)))))
6813 (native-inputs
6814 `(("antlr" ,antlr2)
6815 ("antlr3" ,antlr3-bootstrap)))
6816 (inputs
6817 `(("junit" ,java-junit)
6818 ("stringtemplate" ,java-stringtemplate-3)
6819 ("stringtemplate4" ,java-stringtemplate)))
6820 (propagated-inputs
6821 `(("stringtemplate" ,java-stringtemplate-3)
6822 ("antlr" ,antlr2)
6823 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6824 (home-page "http://www.antlr3.org")
6825 (synopsis "Framework for constructing recognizers, compilers, and translators")
6826 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6827 is a language tool that provides a framework for constructing recognizers,
6828 compilers, and translators from grammatical descriptions containing Java, C#,
6829 C++, or Python actions. ANTLR provides excellent support for tree construction,
6830 tree walking, and translation.")
6831 (license license:bsd-3)))
6832
6833 (define antlr3-bootstrap
6834 (package
6835 (inherit antlr3)
6836 (name "antlr3-bootstrap")
6837 (native-inputs
6838 `(("antlr" ,antlr2)
6839 ("antlr3" ,antlr3-3.3)))
6840 (inputs
6841 `(("junit" ,java-junit)))))
6842
6843 (define antlr3-3.3
6844 (package
6845 (inherit antlr3)
6846 (name "antlr3")
6847 (version "3.3")
6848 (source (origin
6849 (method url-fetch)
6850 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6851 "gh-pages/download/antlr-"
6852 version ".tar.gz"))
6853 (sha256
6854 (base32
6855 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6856 (patches
6857 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6858 (arguments
6859 `(#:jar-name (string-append ,name "-" ,version ".jar")
6860 #:source-dir (string-join '("tool/src/main/java"
6861 "runtime/Java/src/main/java"
6862 "tool/src/main/antlr2"
6863 "tool/src/main/antlr3")
6864 ":")
6865 #:tests? #f ; FIXME: tests seem to require maven plugin
6866 #:modules ((guix build ant-build-system)
6867 (guix build utils)
6868 (srfi srfi-1))
6869 #:phases
6870 (modify-phases %standard-phases
6871 (add-after 'install 'bin-install
6872 (lambda* (#:key inputs outputs #:allow-other-keys)
6873 (let* ((out (assoc-ref outputs "out"))
6874 (jar (string-append out "/share/java"))
6875 (bin (string-append out "/bin")))
6876 (mkdir-p bin)
6877 (with-output-to-file (string-append bin "/antlr3")
6878 (lambda _
6879 (display
6880 (string-append
6881 "#!" (which "sh") "\n"
6882 "java -cp " jar "/antlr3-3.3.jar:"
6883 (string-join
6884 (append (find-files (assoc-ref inputs "java-stringtemplate")
6885 ".*\\.jar$")
6886 (find-files (string-append (assoc-ref inputs "antlr")
6887 "/lib")
6888 ".*\\.jar$"))
6889 ":")
6890 " org.antlr.Tool $*"))))
6891 (chmod (string-append bin "/antlr3") #o755)
6892 #t)))
6893 (add-before 'build 'generate-grammar
6894 (lambda _
6895 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6896 (("import org.antlr.grammar.v2.\\*;")
6897 "import org.antlr.grammar.v2.*;\n
6898 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6899 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6900 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6901 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6902 (for-each (lambda (file)
6903 (format #t "~a\n" file)
6904 (invoke "antlr" file))
6905 '("antlr.g" "antlr.print.g" "assign.types.g"
6906 "buildnfa.g" "codegen.g" "define.g")))
6907 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6908 (for-each (lambda (file)
6909 (format #t "~a\n" file)
6910 (invoke "antlr3" file))
6911 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6912 "ANTLRv3Tree.g")))
6913 #t))
6914 (add-before 'build 'fix-build-xml
6915 (lambda _
6916 (substitute* "build.xml"
6917 (("<exec") "<copy todir=\"${classes.dir}\">
6918 <fileset dir=\"tool/src/main/resources\">
6919 <include name=\"**/*.stg\"/>
6920 <include name=\"**/*.st\"/>
6921 <include name=\"**/*.sti\"/>
6922 <include name=\"**/STLexer.tokens\"/>
6923 </fileset>
6924 </copy><exec"))
6925 #t)))))
6926 (native-inputs
6927 `(("antlr" ,antlr2)
6928 ("antlr3" ,antlr3-3.1)))
6929 (inputs
6930 `(("junit" ,java-junit)))
6931 (propagated-inputs
6932 `(("java-stringtemplate" ,java-stringtemplate-3)
6933 ("antlr" ,antlr2)
6934 ("antlr3" ,antlr3-3.1)))))
6935
6936 (define antlr3-3.1
6937 (package
6938 (inherit antlr3)
6939 (version "3.1")
6940 (source (origin
6941 (method url-fetch)
6942 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6943 "gh-pages/download/antlr-"
6944 version ".tar.gz"))
6945 (sha256
6946 (base32
6947 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6948 (patches
6949 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6950 (arguments
6951 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6952 #:source-dir "src:runtime/Java/src"
6953 #:tests? #f
6954 #:phases
6955 (modify-phases %standard-phases
6956 (add-after 'install 'bin-install
6957 (lambda* (#:key inputs outputs #:allow-other-keys)
6958 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6959 (bin (string-append (assoc-ref outputs "out") "/bin")))
6960 (mkdir-p bin)
6961 (with-output-to-file (string-append bin "/antlr3")
6962 (lambda _
6963 (display
6964 (string-append "#!" (which "sh") "\n"
6965 "java -cp " jar "/antlr3-3.1.jar:"
6966 (string-concatenate
6967 (find-files (assoc-ref inputs "stringtemplate")
6968 ".*\\.jar"))
6969 ":"
6970 (string-concatenate
6971 (find-files (string-append
6972 (assoc-ref inputs "antlr")
6973 "/lib")
6974 ".*\\.jar"))
6975 " org.antlr.Tool $*"))))
6976 (chmod (string-append bin "/antlr3") #o755))
6977 #t))
6978 (add-before 'build 'generate-grammar
6979 (lambda _
6980 (let ((dir "src/org/antlr/tool/"))
6981 (for-each (lambda (file)
6982 (display file)
6983 (newline)
6984 (invoke "antlr" "-o" dir (string-append dir file)))
6985 '("antlr.g" "antlr.print.g" "assign.types.g"
6986 "buildnfa.g" "define.g")))
6987 (format #t "codegen.g\n")
6988 (invoke "antlr" "-o" "src/org/antlr/codegen"
6989 "src/org/antlr/codegen/codegen.g")
6990 #t))
6991 (add-before 'build 'fix-build-xml
6992 (lambda _
6993 (substitute* "build.xml"
6994 (("<exec") "<copy todir=\"${classes.dir}\">
6995 <fileset dir=\"src\">
6996 <include name=\"**/*.stg\"/>
6997 <include name=\"**/*.st\"/>
6998 <include name=\"**/*.sti\"/>
6999 <include name=\"**/STLexer.tokens\"/>
7000 </fileset>
7001 </copy><exec"))
7002 #t)))))
7003 (native-inputs
7004 `(("antlr" ,antlr2)))
7005 (inputs
7006 `(("junit" ,java-junit)))
7007 (propagated-inputs
7008 `(("stringtemplate" ,java-stringtemplate-3)))))
7009
7010 (define-public java-commons-cli-1.2
7011 ;; This is a bootstrap dependency for Maven2.
7012 (package
7013 (inherit java-commons-cli)
7014 (version "1.2")
7015 (source (origin
7016 (method url-fetch)
7017 (uri (string-append "mirror://apache/commons/cli/source/"
7018 "commons-cli-" version "-src.tar.gz"))
7019 (sha256
7020 (base32
7021 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7022 (arguments
7023 `(#:jar-name "commons-cli.jar"
7024 #:phases
7025 (modify-phases %standard-phases
7026 (add-before 'check 'fix-build-xml
7027 (lambda* (#:key inputs #:allow-other-keys)
7028 (substitute* "build.xml"
7029 (("dir=\"\\$\\{test.home\\}/java\"")
7030 "dir=\"${test.home}\""))
7031 #t)))))
7032 (native-inputs
7033 `(("java-junit" ,java-junit)))))
7034
7035 (define-public java-microemulator-cldc
7036 (package
7037 (name "java-microemulator-cldc")
7038 (version "2.0.4")
7039 (source (origin
7040 (method url-fetch)
7041 (uri (string-append "https://github.com/barteo/microemu/archive/"
7042 "microemulator_"
7043 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7044 version)
7045 ".tar.gz"))
7046 (file-name (string-append name "-" version ".tar.gz"))
7047 (sha256
7048 (base32
7049 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7050 (build-system ant-build-system)
7051 (arguments
7052 `(#:jar-name "microemulator-cldc.jar"
7053 #:source-dir "microemu-cldc/src/main/java"
7054 #:tests? #f)); Requires even older software
7055 (home-page "https://github.com/barteo/microemu")
7056 (synopsis "J2ME CLDC emulator")
7057 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7058 Emulator. It allows to demonstrate MIDlet based applications in web browser
7059 applet and can be run as a standalone java application.")
7060 (license (list license:asl2.0
7061 ;; or altenatively:
7062 license:lgpl2.1+))))
7063
7064 (define-public java-datanucleus-javax-persistence
7065 (package
7066 (name "java-datanucleus-javax-persistence")
7067 (version "2.2.0")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (string-append "https://github.com/datanucleus/"
7071 "javax.persistence/archive/javax.persistence-"
7072 version "-release.tar.gz"))
7073 (sha256
7074 (base32
7075 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7076 (build-system ant-build-system)
7077 (arguments
7078 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7079 #:jdk ,icedtea-8
7080 #:source-dir "src/main/java"
7081 #:tests? #f)); no tests
7082 (home-page "https://github.com/datanucleus/javax.persistence")
7083 (synopsis "JPA API")
7084 (description "This package contains a clean definition of JPA API intended
7085 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7086 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7087 used to generate this API.")
7088 (license (list license:edl1.0 license:epl1.0))))
7089
7090 (define-public java-osgi-cmpn
7091 (package
7092 (name "java-osgi-cmpn")
7093 (version "6.0.0")
7094 (source (origin
7095 (method url-fetch)
7096 (uri (string-append "http://central.maven.org/maven2/"
7097 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7098 version "-sources.jar"))
7099 (sha256
7100 (base32
7101 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7102 (build-system ant-build-system)
7103 (arguments
7104 `(#:jar-name "osgi-cmpn.jar"
7105 #:tests? #f)); no tests
7106 (inputs
7107 `(("annotation" ,java-osgi-annotation)
7108 ("core" ,java-osgi-core)
7109 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7110 ("microemulator" ,java-microemulator-cldc)
7111 ("servlet" ,java-classpathx-servletapi)))
7112 (home-page "https://www.osgi.org")
7113 (synopsis "Compendium specification module of OSGi framework")
7114 (description
7115 "OSGi, for Open Services Gateway initiative framework, is a module system
7116 and service platform for the Java programming language. This package contains
7117 the compendium specification module, providing interfaces and classes for use
7118 in compiling bundles.")
7119 (license license:asl2.0)))
7120
7121 (define-public java-osgi-service-component-annotations
7122 (package
7123 (name "java-osgi-service-component-annotations")
7124 (version "1.3.0")
7125 (source (origin
7126 (method url-fetch)
7127 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7128 "org.osgi.service.component.annotations/"
7129 version "/org.osgi.service.component.annotations-"
7130 version "-sources.jar"))
7131 (sha256
7132 (base32
7133 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7134 (build-system ant-build-system)
7135 (arguments
7136 `(#:jar-name "osgi-service-component-annotations.jar"
7137 #:tests? #f)); no tests
7138 (inputs
7139 `(("annotation" ,java-osgi-annotation)))
7140 (home-page "https://www.osgi.org")
7141 (synopsis "Support annotations for osgi-service-component")
7142 (description
7143 "OSGi, for Open Services Gateway initiative framework, is a module system
7144 and service platform for the Java programming language. This package contains
7145 the support annotations for osgi-service-component.")
7146 (license license:asl2.0)))
7147
7148 (define-public java-osgi-dto
7149 (package
7150 (name "java-osgi-dto")
7151 (version "1.0.0")
7152 (source (origin
7153 (method url-fetch)
7154 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7155 "org.osgi.dto/" version "/org.osgi.dto-"
7156 version "-sources.jar"))
7157 (sha256
7158 (base32
7159 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7160 (build-system ant-build-system)
7161 (arguments
7162 `(#:jar-name "osgi-dto.jar"
7163 #:tests? #f)); no tests
7164 (inputs
7165 `(("annotation" ,java-osgi-annotation)))
7166 (home-page "https://www.osgi.org")
7167 (synopsis "Data Transfer Objects")
7168 (description
7169 "OSGi, for Open Services Gateway initiative framework, is a module system
7170 and service platform for the Java programming language. This package contains
7171 the Data Transfer Objects. It is easily serializable having only public fields
7172 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7173 Map and array aggregates may also be used. The aggregates must only hold
7174 objects of the listed types or aggregates.")
7175 (license license:asl2.0)))
7176
7177 (define-public java-osgi-resource
7178 (package
7179 (name "java-osgi-resource")
7180 (version "1.0.0")
7181 (source (origin
7182 (method url-fetch)
7183 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7184 "org.osgi.resource/"
7185 version "/org.osgi.resource-"
7186 version "-sources.jar"))
7187 (sha256
7188 (base32
7189 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7190 (build-system ant-build-system)
7191 (arguments
7192 `(#:jar-name "osgi-resource.jar"
7193 #:tests? #f)); no tests
7194 (inputs
7195 `(("annotation" ,java-osgi-annotation)
7196 ("dto" ,java-osgi-dto)))
7197 (home-page "https://www.osgi.org")
7198 (synopsis "OSGI Resource")
7199 (description
7200 "OSGi, for Open Services Gateway initiative framework, is a module system
7201 and service platform for the Java programming language. This package contains
7202 the definition of common types in osgi packages.")
7203 (license license:asl2.0)))
7204
7205 (define-public java-osgi-namespace-contract
7206 (package
7207 (name "java-osgi-namespace-contract")
7208 (version "1.0.0")
7209 (source (origin
7210 (method url-fetch)
7211 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7212 "org.osgi.namespace.contract/"
7213 version "/org.osgi.namespace.contract-"
7214 version "-sources.jar"))
7215 (sha256
7216 (base32
7217 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7218 (build-system ant-build-system)
7219 (inputs
7220 `(("resource" ,java-osgi-resource)
7221 ("annotation" ,java-osgi-annotation)))
7222 (arguments
7223 `(#:jar-name "osgi-namespace-contract.jar"
7224 #:tests? #f)); no tests
7225 (home-page "https://www.osgi.org")
7226 (synopsis "Contract Capability and Requirement Namespace")
7227 (description
7228 "OSGi, for Open Services Gateway initiative framework, is a module system
7229 and service platform for the Java programming language. This package contains
7230 the names for the attributes and directives for a namespace with contracts.")
7231 (license license:asl2.0)))
7232
7233 (define-public java-osgi-namespace-extender
7234 (package
7235 (name "java-osgi-namespace-extender")
7236 (version "1.0.1")
7237 (source (origin
7238 (method url-fetch)
7239 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7240 "org.osgi.namespace.extender/"
7241 version "/org.osgi.namespace.extender-"
7242 version "-sources.jar"))
7243 (sha256
7244 (base32
7245 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7246 (build-system ant-build-system)
7247 (inputs
7248 `(("resource" ,java-osgi-resource)
7249 ("annotation" ,java-osgi-annotation)))
7250 (arguments
7251 `(#:jar-name "osgi-namespace-extendent.jar"
7252 #:tests? #f)); no tests
7253 (home-page "https://www.osgi.org")
7254 (synopsis "Extender Capability and Requirement Namespace")
7255 (description
7256 "OSGi, for Open Services Gateway initiative framework, is a module system
7257 and service platform for the Java programming language. This package contains
7258 the names for the attributes and directives for an extender namespace.")
7259 (license license:asl2.0)))
7260
7261 (define-public java-osgi-namespace-service
7262 (package
7263 (name "java-osgi-namespace-service")
7264 (version "1.0.0")
7265 (source (origin
7266 (method url-fetch)
7267 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7268 "org.osgi.namespace.service/"
7269 version "/org.osgi.namespace.service-"
7270 version "-sources.jar"))
7271 (sha256
7272 (base32
7273 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7274 (build-system ant-build-system)
7275 (inputs
7276 `(("resource" ,java-osgi-resource)
7277 ("annotation" ,java-osgi-annotation)))
7278 (arguments
7279 `(#:jar-name "osgi-namespace-service.jar"
7280 #:tests? #f)); no tests
7281 (home-page "https://www.osgi.org")
7282 (synopsis "Service Capability and Requirement Namespace")
7283 (description
7284 "OSGi, for Open Services Gateway initiative framework, is a module system
7285 and service platform for the Java programming language. This package contains
7286 the names for the attributes and directives for a service namespace.")
7287 (license license:asl2.0)))
7288
7289 (define-public java-osgi-util-function
7290 (package
7291 (name "java-osgi-util-function")
7292 (version "1.0.0")
7293 (source (origin
7294 (method url-fetch)
7295 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7296 "org.osgi.util.function/"
7297 version "/org.osgi.util.function-"
7298 version "-sources.jar"))
7299 (sha256
7300 (base32
7301 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7302 (build-system ant-build-system)
7303 (arguments
7304 `(#:jar-name "osgi-util-function.jar"
7305 #:tests? #f)); no tests
7306 (inputs
7307 `(("annotation" ,java-osgi-annotation)))
7308 (home-page "https://www.osgi.org")
7309 (synopsis "OSGI Util Function")
7310 (description
7311 "OSGi, for Open Services Gateway initiative framework, is a module system
7312 and service platform for the Java programming language. This package contains
7313 an interface for a function that accepts a single argument and produces a result.")
7314 (license license:asl2.0)))
7315
7316 (define-public java-osgi-util-promise
7317 (package
7318 (name "java-osgi-util-promise")
7319 (version "1.0.0")
7320 (source (origin
7321 (method url-fetch)
7322 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7323 "org.osgi.util.promise/"
7324 version "/org.osgi.util.promise-"
7325 version "-sources.jar"))
7326 (sha256
7327 (base32
7328 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7329 (build-system ant-build-system)
7330 (arguments
7331 `(#:jar-name "osgi-util-promise.jar"
7332 #:tests? #f)); no tests
7333 (inputs
7334 `(("annotation" ,java-osgi-annotation)
7335 ("function" ,java-osgi-util-function)))
7336 (home-page "https://www.osgi.org")
7337 (synopsis "Promise of a value")
7338 (description
7339 "OSGi, for Open Services Gateway initiative framework, is a module system
7340 and service platform for the Java programming language. This package contains
7341 an interface and utilitary classes for promises. A Promise represents a future
7342 value. It handles the interactions for asynchronous processing.")
7343 (license license:asl2.0)))
7344
7345 (define-public java-osgi-service-metatype-annotations
7346 (package
7347 (name "java-osgi-service-metatype-annotations")
7348 (version "1.3.0")
7349 (source (origin
7350 (method url-fetch)
7351 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7352 "org.osgi.service.metatype.annotations/"
7353 version "/org.osgi.service.metatype.annotations-"
7354 version "-sources.jar"))
7355 (sha256
7356 (base32
7357 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7358 (build-system ant-build-system)
7359 (arguments
7360 `(#:jar-name "osgi-service-metatype-annotations.jar"
7361 #:tests? #f)); no tests
7362 (inputs
7363 `(("annotation" ,java-osgi-annotation)))
7364 (home-page "https://www.osgi.org")
7365 (synopsis "Support annotations for metatype")
7366 (description
7367 "OSGi, for Open Services Gateway initiative framework, is a module system
7368 and service platform for the Java programming language. This package contains
7369 the support annotations for metatype.")
7370 (license license:asl2.0)))
7371
7372 (define-public java-osgi-service-repository
7373 (package
7374 (name "java-osgi-service-repository")
7375 (version "1.1.0")
7376 (source (origin
7377 (method url-fetch)
7378 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7379 "org.osgi.service.repository/"
7380 version "/org.osgi.service.repository-"
7381 version "-sources.jar"))
7382 (sha256
7383 (base32
7384 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7385 (build-system ant-build-system)
7386 (arguments
7387 `(#:jar-name "osgi-service-repository.jar"
7388 #:tests? #f)); no tests
7389 (inputs
7390 `(("annotation" ,java-osgi-annotation)
7391 ("promise" ,java-osgi-util-promise)
7392 ("resource" ,java-osgi-resource)))
7393 (home-page "https://www.osgi.org")
7394 (synopsis "OSGI service repository")
7395 (description
7396 "OSGi, for Open Services Gateway initiative framework, is a module system
7397 and service platform for the Java programming language. This package contains
7398 a repository service that contains resources.")
7399 (license license:asl2.0)))
7400
7401 (define-public java-osgi-framework
7402 (package
7403 (name "java-osgi-framework")
7404 (version "1.8.0")
7405 (source (origin
7406 (method url-fetch)
7407 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7408 "org.osgi.framework/" version "/org.osgi.framework-"
7409 version "-sources.jar"))
7410 (sha256
7411 (base32
7412 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7413 (build-system ant-build-system)
7414 (arguments
7415 `(#:jar-name "osgi-framework.jar"
7416 #:tests? #f)); no tests
7417 (inputs
7418 `(("annotation" ,java-osgi-annotation)
7419 ("resource" ,java-osgi-resource)
7420 ("dto" ,java-osgi-dto)))
7421 (home-page "https://www.osgi.org")
7422 (synopsis "OSGi framework")
7423 (description
7424 "OSGi, for Open Services Gateway initiative framework, is a module system
7425 and service platform for the Java programming language.")
7426 (license license:asl2.0)))
7427
7428 (define-public java-osgi-service-log
7429 (package
7430 (name "java-osgi-service-log")
7431 (version "1.3.0")
7432 (source (origin
7433 (method url-fetch)
7434 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7435 "org.osgi.service.log/"
7436 version "/org.osgi.service.log-"
7437 version "-sources.jar"))
7438 (sha256
7439 (base32
7440 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7441 (build-system ant-build-system)
7442 (arguments
7443 `(#:jar-name "osgi-service-log.jar"
7444 #:tests? #f)); no tests
7445 (inputs
7446 `(("java-osgi-framework" ,java-osgi-framework)))
7447 (home-page "https://www.osgi.org")
7448 (synopsis "Provides methods for bundles to write messages to the log")
7449 (description
7450 "OSGi, for Open Services Gateway initiative framework, is a module system
7451 and service platform for the Java programming language. This package contains
7452 the log service.")
7453 (license license:asl2.0)))
7454
7455 (define-public java-osgi-service-jdbc
7456 (package
7457 (name "java-osgi-service-jdbc")
7458 (version "1.0.0")
7459 (source (origin
7460 (method url-fetch)
7461 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7462 "org.osgi.service.jdbc/"
7463 version "/org.osgi.service.jdbc-"
7464 version "-sources.jar"))
7465 (sha256
7466 (base32
7467 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7468 (build-system ant-build-system)
7469 (arguments
7470 `(#:jar-name "osgi-service-jdbc.jar"
7471 #:tests? #f)); no tests
7472 (home-page "https://www.osgi.org")
7473 (synopsis "Factory for JDBC connection factories")
7474 (description
7475 "OSGi, for Open Services Gateway initiative framework, is a module system
7476 and service platform for the Java programming language. This package contains
7477 a factory for JDBC connection factories. There are 3 preferred connection
7478 factories for getting JDBC connections:
7479
7480 @itemize
7481 @item @code{javax.sql.DataSource};
7482 @item @code{javax.sql.ConnectionPoolDataSource};
7483 @item @code{javax.sql.XADataSource}.
7484 @end itemize")
7485 (license license:asl2.0)))
7486
7487 (define-public java-osgi-service-resolver
7488 (package
7489 (name "java-osgi-service-resolver")
7490 (version "1.0.1")
7491 (source (origin
7492 (method url-fetch)
7493 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7494 "org.osgi.service.resolver/"
7495 version "/org.osgi.service.resolver-"
7496 version "-sources.jar"))
7497 (sha256
7498 (base32
7499 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7500 (build-system ant-build-system)
7501 (arguments
7502 `(#:jar-name "osgi-service-resolver.jar"
7503 #:tests? #f)); no tests
7504 (inputs
7505 `(("annotation" ,java-osgi-annotation)
7506 ("resource" ,java-osgi-resource)))
7507 (home-page "https://www.osgi.org")
7508 (synopsis "OSGI Resolver service")
7509 (description
7510 "OSGi, for Open Services Gateway initiative framework, is a module system
7511 and service platform for the Java programming language. This package contains
7512 a resolver service that resolves the specified resources in the context supplied
7513 by the caller.")
7514 (license license:asl2.0)))
7515
7516 (define-public java-osgi-util-tracker
7517 (package
7518 (name "java-osgi-util-tracker")
7519 (version "1.5.1")
7520 (source (origin
7521 (method url-fetch)
7522 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7523 "org.osgi.util.tracker/"
7524 version "/org.osgi.util.tracker-"
7525 version "-sources.jar"))
7526 (sha256
7527 (base32
7528 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7529 (build-system ant-build-system)
7530 (arguments
7531 `(#:jar-name "osgi-util-tracker.jar"
7532 #:tests? #f)); no tests
7533 (inputs
7534 `(("framework" ,java-osgi-framework)
7535 ("annotation" ,java-osgi-annotation)))
7536 (home-page "https://www.osgi.org")
7537 (synopsis "Bundle tracking")
7538 (description
7539 "OSGi, for Open Services Gateway initiative framework, is a module system
7540 and service platform for the Java programming language. This package contains
7541 bundle tracking utility classes.")
7542 (license license:asl2.0)))
7543
7544 (define-public java-osgi-service-cm
7545 (package
7546 (name "java-osgi-service-cm")
7547 (version "1.5.0")
7548 (source (origin
7549 (method url-fetch)
7550 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7551 "org.osgi.service.cm/"
7552 version "/org.osgi.service.cm-"
7553 version "-sources.jar"))
7554 (sha256
7555 (base32
7556 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7557 (build-system ant-build-system)
7558 (arguments
7559 `(#:jar-name "osgi-service-cm.jar"
7560 #:tests? #f)); no tests
7561 (inputs
7562 `(("framework" ,java-osgi-framework)
7563 ("annotation" ,java-osgi-annotation)))
7564 (home-page "https://www.osgi.org")
7565 (synopsis "OSGI Configuration Management")
7566 (description
7567 "OSGi, for Open Services Gateway initiative framework, is a module system
7568 and service platform for the Java programming language. This package contains
7569 utility classes for the configuration of services.")
7570 (license license:asl2.0)))
7571
7572 (define-public java-osgi-service-packageadmin
7573 (package
7574 (name "java-osgi-service-packageadmin")
7575 (version "1.2.0")
7576 (source (origin
7577 (method url-fetch)
7578 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7579 "org.osgi.service.packageadmin/"
7580 version "/org.osgi.service.packageadmin-"
7581 version "-sources.jar"))
7582 (sha256
7583 (base32
7584 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7585 (build-system ant-build-system)
7586 (arguments
7587 `(#:jar-name "osgi-service-packageadmin.jar"
7588 #:tests? #f)); no tests
7589 (inputs
7590 `(("framework" ,java-osgi-framework)))
7591 (home-page "https://www.osgi.org")
7592 (synopsis "OSGI Package Administration")
7593 (description
7594 "OSGi, for Open Services Gateway initiative framework, is a module system
7595 and service platform for the Java programming language. This package contains
7596 the packageadmin service.")
7597 (license license:asl2.0)))
7598
7599 (define-public java-ops4j-base-lang
7600 (package
7601 (name "java-ops4j-base-lang")
7602 (version "1.5.0")
7603 (source (origin
7604 (method url-fetch)
7605 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7606 "archive/base-" version ".tar.gz"))
7607 (sha256
7608 (base32
7609 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7610 (build-system ant-build-system)
7611 (arguments
7612 `(#:jar-name "java-ops4j-base-lang.jar"
7613 #:source-dir "ops4j-base-lang/src/main/java"
7614 #:tests? #f; no tests
7615 #:phases
7616 (modify-phases %standard-phases
7617 (add-before 'build 'add-test-file
7618 (lambda _
7619 ;; That file is required by a test in ops4j-pax-exam-core-spi
7620 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7621 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7622 (lambda _
7623 (display
7624 (string-append
7625 "version=" ,version "\n"
7626 "groupId=org.ops4j.base"
7627 "artifactId=ops4j-base-lang\n"))))
7628 #t)))))
7629 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7630 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7631 (description "OPS4J stands for Open Participation Software for Java. This
7632 package contains utilities and extensions related to @code{java.lang}.")
7633 (license license:asl2.0)))
7634
7635 (define-public java-ops4j-base-monitors
7636 (package
7637 (inherit java-ops4j-base-lang)
7638 (name "java-ops4j-base-monitors")
7639 (arguments
7640 `(#:jar-name "java-ops4j-base-monitors.jar"
7641 #:source-dir "ops4j-base-monitors/src/main/java"
7642 #:tests? #f)); no tests
7643 (inputs
7644 `(("lang" ,java-ops4j-base-lang)))
7645 (description "OPS4J stands for Open Participation Software for Java. This
7646 package contains utilities and extensions related to monitoring.")))
7647
7648 (define-public java-ops4j-base-io
7649 (package
7650 (inherit java-ops4j-base-lang)
7651 (name "java-ops4j-base-io")
7652 (arguments
7653 `(#:jar-name "java-ops4j-base-io.jar"
7654 #:source-dir "ops4j-base-io/src/main/java"
7655 #:test-dir "ops4j-base-io/src/test"
7656 #:test-exclude
7657 (list "**/ListerTest.java")))
7658 (inputs
7659 `(("lang" ,java-ops4j-base-monitors)
7660 ("lang" ,java-ops4j-base-lang)))
7661 (native-inputs
7662 `(("junit" ,java-junit)
7663 ("hamcrest" ,java-hamcrest-core)))
7664 (description "OPS4J stands for Open Participation Software for Java. This
7665 package contains utilities and extensions related to handling streams and files.")))
7666
7667 (define-public java-ops4j-base-util
7668 (package
7669 (inherit java-ops4j-base-lang)
7670 (name "java-ops4j-base-util")
7671 (arguments
7672 `(#:jar-name "java-ops4j-base-util.jar"
7673 #:source-dir "ops4j-base-util/src/main/java"
7674 #:test-dir "ops4j-base-util/src/test"))
7675 (inputs
7676 `(("lang" ,java-ops4j-base-lang)))
7677 (native-inputs
7678 `(("junit" ,java-junit)))
7679 (description "OPS4J stands for Open Participation Software for Java. This
7680 package contains utilities and extensions related to environment, i18n and
7681 mime types.")))
7682
7683 (define-public java-ops4j-base-util-property
7684 (package
7685 (inherit java-ops4j-base-lang)
7686 (name "java-ops4j-base-util-property")
7687 (arguments
7688 `(#:jar-name "java-ops4j-base-util-property.jar"
7689 #:source-dir "ops4j-base-util-property/src/main/java"
7690 #:tests? #f)); no tests
7691 (inputs
7692 `(("lang" ,java-ops4j-base-lang)
7693 ("util" ,java-ops4j-base-util)))
7694 (description "OPS4J stands for Open Participation Software for Java. This
7695 package contains utilities and extensions related to resolving properties from
7696 different sources.")))
7697
7698 (define-public java-ops4j-base-store
7699 (package
7700 (inherit java-ops4j-base-lang)
7701 (name "java-ops4j-base-store")
7702 (arguments
7703 `(#:jar-name "java-ops4j-base-store.jar"
7704 #:source-dir "ops4j-base-store/src/main/java"
7705 #:tests? #f)); no tests
7706 (inputs
7707 `(("lang" ,java-ops4j-base-lang)
7708 ("slf4j" ,java-slf4j-api)
7709 ("io" ,java-ops4j-base-io)))
7710 (description "OPS4J stands for Open Participation Software for Java. This
7711 package contains utilities for storing and retrieving data from an
7712 @code{InputStream}.")))
7713
7714 (define-public java-ops4j-base-spi
7715 (package
7716 (inherit java-ops4j-base-lang)
7717 (name "java-ops4j-base-spi")
7718 (arguments
7719 `(#:jar-name "java-ops4j-base-spi.jar"
7720 #:source-dir "ops4j-base-spi/src/main/java"
7721 #:test-dir "ops4j-base-spi/src/test"))
7722 (native-inputs
7723 `(("junit" ,java-junit)
7724 ("hamcrest" ,java-hamcrest-core)))
7725 (description "OPS4J stands for Open Participation Software for Java. This
7726 package contains utilities for obtaining services via the Java SE 6
7727 @code{ServiceLoader}.")))
7728
7729 (define-public java-aqute-bnd-annotation
7730 (package
7731 (name "java-aqute-bnd-annotation")
7732 (version "3.5.0")
7733 (source (origin
7734 (method url-fetch)
7735 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7736 version ".REL.tar.gz"))
7737 (file-name (string-append name "-" version ".tar.gz"))
7738 (sha256
7739 (base32
7740 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7741 (build-system ant-build-system)
7742 (arguments
7743 `(#:jar-name "java-aqute-bnd-annotation.jar"
7744 #:source-dir "biz.aQute.bnd.annotation/src"
7745 #:tests? #f)); empty test dir
7746 (home-page "http://bnd.bndtools.org/")
7747 (synopsis "Tools for OSGi")
7748 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7749 headers based on analyzing the class code, it verifies the project settings,
7750 it manages project dependencies, gives diffs jars, and much more.")
7751 (license license:asl2.0)))
7752
7753 (define-public java-aqute-libg
7754 (package
7755 (inherit java-aqute-bnd-annotation)
7756 (name "java-aqute-libg")
7757 (arguments
7758 `(#:jar-name "java-aqute-libg.jar"
7759 ;; The build fails when source/target more recent than 1.7. This
7760 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7761 ;;
7762 ;; It is closed as won't fix. There is no way to change the source
7763 ;; so that it works on 1.8, and still works on 1.6, the upstream
7764 ;; target. It work fine on 1.7, so we use 1.7.
7765 #:make-flags (list "-Dant.build.javac.source=1.7"
7766 "-Dant.build.javac.target=1.7")
7767 #:phases
7768 (modify-phases %standard-phases
7769 (add-before 'configure 'chdir
7770 ;; Change to aQute.libg directory, so that the relative
7771 ;; paths in the tests aren't broken.
7772 (lambda _
7773 (chdir "aQute.libg")
7774 #t))
7775 (add-before 'check 'create-test-directory
7776 ;; Copy the test directory to test/java, since that's where
7777 ;; ant-build-system's default project in build.xml expects to find
7778 ;; the test classes. Leave a copy in the original place to not
7779 ;; break paths in tests.
7780 (lambda _
7781 (mkdir "src/test")
7782 (copy-recursively "test" "src/test/java")
7783 #t)))))
7784 (inputs
7785 `(("slf4j" ,java-slf4j-api)
7786 ("osgi-annot" ,java-osgi-annotation)
7787 ("java-osgi-cmpn" ,java-osgi-cmpn)
7788 ("osgi" ,java-osgi-core)))
7789 (native-inputs
7790 `(("hamcrest" ,java-hamcrest-core)
7791 ("java-junit" ,java-junit)))))
7792
7793 (define java-aqute-libg-bootstrap
7794 (package
7795 (inherit java-aqute-libg)
7796 (name "java-aqute-libg-bootstrap")
7797 (arguments
7798 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7799 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7800 ((#:tests? _ #f) #f)))
7801 (inputs
7802 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7803 ,@(delete `("slf4j" ,java-slf4j-api)
7804 (package-inputs java-aqute-libg))))
7805 (native-inputs '())))
7806
7807 (define-public java-aqute-bndlib
7808 (package
7809 (inherit java-aqute-bnd-annotation)
7810 (name "java-aqute-bndlib")
7811 (arguments
7812 `(#:jar-name "java-bndlib.jar"
7813 #:source-dir "biz.aQute.bndlib/src"
7814 #:tests? #f)); no tests
7815 (inputs
7816 `(("slf4j" ,java-slf4j-api)
7817 ("osgi-annot" ,java-osgi-annotation)
7818 ("java-aqute-libg" ,java-aqute-libg)
7819 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7820 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7821 ("java-osgi-service-repository" ,java-osgi-service-repository)
7822 ("java-osgi-service-log" ,java-osgi-service-log)
7823 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7824 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7825 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7826 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7827 ("promise" ,java-osgi-util-promise)
7828 ("osgi" ,java-osgi-core)))))
7829
7830 (define java-aqute-bndlib-bootstrap
7831 (package
7832 (inherit java-aqute-bndlib)
7833 (name "java-aqute-bndlib-bootstrap")
7834 (inputs
7835 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7836 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7837 ,@(delete `("slf4j" ,java-slf4j-api)
7838 (delete `("java-aqute-libg" ,java-aqute-libg)
7839 (package-inputs java-aqute-bndlib)))))))
7840
7841 (define-public java-ops4j-pax-tinybundles
7842 (package
7843 (name "java-ops4j-pax-tinybundles")
7844 (version "2.1.1")
7845 (source (origin
7846 (method url-fetch)
7847 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7848 "archive/tinybundles-" version ".tar.gz"))
7849 (sha256
7850 (base32
7851 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7852 (arguments
7853 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7854 #:source-dir "src/main/java"
7855 #:test-exclude
7856 ;; Abstract base classes for other tests
7857 (list "**/BndTest.java" "**/CoreTest.java")
7858 #:phases
7859 (modify-phases %standard-phases
7860 (add-before 'check 'fix-version
7861 (lambda _
7862 ;; This test has a reference to an old version of bndlib we are not
7863 ;; packaging. It uses the version referenced in pom.xml. We replace
7864 ;; it with our own version.
7865 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7866 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7867 ,(package-version java-aqute-bndlib)))
7868 #t)))))
7869 (inputs
7870 `(("lang" ,java-ops4j-base-lang)
7871 ("io" ,java-ops4j-base-io)
7872 ("store" ,java-ops4j-base-store)
7873 ("slf4j" ,java-slf4j-api)
7874 ("libg" ,java-aqute-libg)
7875 ("bndlib" ,java-aqute-bndlib)))
7876 (native-inputs
7877 `(("junit" ,java-junit)
7878 ("hamcrest" ,java-hamcrest-core)
7879 ("log4j" ,java-log4j-api)
7880 ("bndannotation" ,java-aqute-bnd-annotation)
7881 ("framework" ,java-osgi-framework)))
7882 (build-system ant-build-system)
7883 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7884 (synopsis "Java APIs to create OSGi related artifacts")
7885 (description "Tinybundles is all about creating OSGi related artifacts like
7886 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7887 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7888 other hand, this library can be a foundation of real end user tools that need
7889 to create those artifacts.")
7890 (license license:asl2.0)))
7891
7892 (define-public java-ops4j-pax-exam-core
7893 (package
7894 (name "java-ops4j-pax-exam-core")
7895 (version "4.11.0")
7896 (source (origin
7897 (method url-fetch)
7898 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7899 "archive/exam-reactor-" version ".tar.gz"))
7900 (sha256
7901 (base32
7902 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7903 (arguments
7904 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7905 #:source-dir "core/pax-exam/src/main/java"
7906 #:test-dir "core/pax-exam/src/test"))
7907 (inputs
7908 `(("slf4j" ,java-slf4j-api)
7909 ("lang" ,java-ops4j-base-lang)
7910 ("io" ,java-ops4j-base-io)
7911 ("util-property" ,java-ops4j-base-util-property)
7912 ("util-store" ,java-ops4j-base-store)
7913 ("java-osgi-core" ,java-osgi-core)))
7914 (native-inputs
7915 `(("junit" ,java-junit)
7916 ("hamcrest" ,java-hamcrest-core)))
7917 (build-system ant-build-system)
7918 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7919 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7920 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7921 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7922 the system under test at the same time.")
7923 (license license:asl2.0)))
7924
7925 (define-public java-ops4j-pax-exam-core-spi
7926 (package
7927 (inherit java-ops4j-pax-exam-core)
7928 (name "java-ops4j-pax-exam-core-spi")
7929 (arguments
7930 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7931 #:source-dir "src/main/java"
7932 #:test-exclude
7933 (list
7934 ;; Abstract base class, not a test
7935 "**/BaseStagedReactorTest.java"
7936 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7937 "**/WarBuilderTest.java")
7938 #:phases
7939 (modify-phases %standard-phases
7940 (add-before 'configure 'chdir
7941 (lambda _
7942 ;; Tests assume we are in this directory
7943 (chdir "core/pax-exam-spi")
7944 #t))
7945 (add-before 'check 'fix-tests
7946 (lambda _
7947 ;; One test checks that this file is present.
7948 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7949 (with-output-to-file
7950 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7951 (lambda _
7952 (display
7953 (string-append "artifactId = pax-exam-spi\n"
7954 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7955 ;; Maven puts compilation results in the target directory, while we
7956 ;; put them in the build directory.
7957 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7958 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7959 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7960 (("target") "build"))
7961 ;; One test is expected to fail, but it doesn't throw the expected exception
7962 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7963 (("AssertionError") "IllegalArgumentException"))
7964 #t)))))
7965 (inputs
7966 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7967 ("lang" ,java-ops4j-base-lang)
7968 ("monitors" ,java-ops4j-base-monitors)
7969 ("store" ,java-ops4j-base-store)
7970 ("io" ,java-ops4j-base-io)
7971 ("spi" ,java-ops4j-base-spi)
7972 ("osgi" ,java-osgi-core)
7973 ("slf4j" ,java-slf4j-api)
7974 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7975 (native-inputs
7976 `(("mockito" ,java-mockito-1)
7977 ("junit" ,java-junit)
7978 ("hamcrest" ,java-hamcrest-core)
7979 ("cglib" ,java-cglib)
7980 ("objenesis" ,java-objenesis)
7981 ("asm" ,java-asm)))))
7982
7983 (define-public java-ops4j-pax-exam-core-junit
7984 (package
7985 (inherit java-ops4j-pax-exam-core)
7986 (name "java-ops4j-pax-exam-core-junit")
7987 (arguments
7988 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7989 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7990 #:tests? #f)); no tests
7991 (inputs
7992 `(("junit" ,java-junit)
7993 ("slf4j" ,java-slf4j-api)
7994 ("core" ,java-ops4j-pax-exam-core)
7995 ("spi" ,java-ops4j-pax-exam-core-spi)))
7996 (native-inputs '())))
7997
7998 (define-public java-fasterxml-jackson-annotations
7999 (package
8000 (name "java-fasterxml-jackson-annotations")
8001 (version "2.9.4")
8002 (source (origin
8003 (method url-fetch)
8004 (uri (string-append "https://github.com/FasterXML/"
8005 "jackson-annotations/archive/"
8006 "jackson-annotations-" version ".tar.gz"))
8007 (sha256
8008 (base32
8009 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8010 (build-system ant-build-system)
8011 (arguments
8012 `(#:jar-name "jackson-annotations.jar"
8013 #:source-dir "src/main/java"
8014 #:test-dir "src/test"))
8015 (native-inputs
8016 `(("junit" ,java-junit)))
8017 (home-page "https://github.com/FasterXML/jackson-annotations")
8018 (synopsis "General purpose annotations for the Jackson Data Processor")
8019 (description "This package contains general purpose annotations for the
8020 Jackson Data Processor, used on value and handler types. The only annotations
8021 not included are ones that require dependency to the Databind package.")
8022 (license license:asl2.0)))
8023
8024 (define-public java-fasterxml-jackson-core
8025 (package
8026 (name "java-fasterxml-jackson-core")
8027 (version "2.9.4")
8028 (source (origin
8029 (method url-fetch)
8030 (uri (string-append "https://github.com/FasterXML/"
8031 "jackson-core/archive/"
8032 "jackson-core-" version ".tar.gz"))
8033 (sha256
8034 (base32
8035 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8036 (build-system ant-build-system)
8037 (arguments
8038 `(#:jar-name "jackson-core.jar"
8039 #:source-dir "src/main/java"
8040 #:test-dir "src/test"
8041 #:test-exclude
8042 (list
8043 ;; Expected failure. pom.xml excludes these
8044 "**/failing/**"
8045 ;; Base classes that have no constructor for junit
8046 "**/BaseTest.java"
8047 "**/ConcurrencyReadTest.java"
8048 "**/ManualCharAccessTest.java"
8049 "**/ManualCharAccessTest.java"
8050 "**/TrailingCommasTest.java"
8051 "**/AsyncMissingValuesInObjectTest.java"
8052 "**/AsyncMissingValuesInArrayTest.java")
8053 #:phases
8054 (modify-phases %standard-phases
8055 (add-before 'configure 'generate-PackageVersion.java
8056 (lambda _
8057 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8058 (in (string-append out ".in")))
8059 (copy-file in out)
8060 (substitute* out
8061 (("@package@") "com.fasterxml.jackson.core.json")
8062 (("@projectversion@") ,version)
8063 (("@projectgroupid@") "com.fasterxml.jackson.core")
8064 (("@projectartifactid@") "jackson-core")))
8065 #t))
8066 (add-before 'build 'copy-resources
8067 (lambda _
8068 (copy-recursively "src/main/resources"
8069 "build/classes")
8070 #t))
8071 (add-before 'check 'copy-test-resources
8072 (lambda _
8073 (copy-recursively "src/test/resources"
8074 "build/test-classes")
8075 #t)))))
8076 (native-inputs
8077 `(("junit" ,java-junit)
8078 ("hamcrest" ,java-hamcrest-core)))
8079 (home-page "https://github.com/FasterXML/jackson-core")
8080 (synopsis "")
8081 (description "")
8082 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8083
8084 (define-public java-fasterxml-jackson-databind
8085 (package
8086 (name "java-fasterxml-jackson-databind")
8087 (version "2.9.4")
8088 (source (origin
8089 (method url-fetch)
8090 (uri (string-append "https://github.com/FasterXML/"
8091 "jackson-databind/archive/"
8092 "jackson-databind-" version ".tar.gz"))
8093 (sha256
8094 (base32
8095 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8096 (build-system ant-build-system)
8097 (arguments
8098 `(#:jar-name "jackson-databind.jar"
8099 #:source-dir "src/main/java"
8100 #:tests? #f; requires javax.measures for which I can't find a free implementation
8101 #:phases
8102 (modify-phases %standard-phases
8103 (add-before 'configure 'generate-PackageVersion.java
8104 (lambda _
8105 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8106 (in (string-append out ".in")))
8107 (copy-file in out)
8108 (substitute* out
8109 (("@package@") "com.fasterxml.jackson.databind.cfg")
8110 (("@projectversion@") ,version)
8111 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8112 (("@projectartifactid@") "jackson-databind")))
8113 #t))
8114 (add-before 'build 'copy-resources
8115 (lambda _
8116 (copy-recursively "src/main/resources" "build/classes")
8117 #t)))))
8118 (inputs
8119 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8120 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8121 (home-page "https://github.com/FasterXML/jackson-databind")
8122 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8123 (description "This package contains the general-purpose data-binding
8124 functionality and tree-model for Jackson Data Processor. It builds on core
8125 streaming parser/generator package, and uses Jackson Annotations for
8126 configuration.")
8127 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8128
8129 (define-public java-fasterxml-jackson-modules-base-jaxb
8130 (package
8131 (name "java-fasterxml-jackson-modules-base-jaxb")
8132 (version "2.9.4")
8133 (source (origin
8134 (method url-fetch)
8135 (uri (string-append "https://github.com/FasterXML/"
8136 "jackson-modules-base/archive/"
8137 "jackson-modules-base-" version ".tar.gz"))
8138 (sha256
8139 (base32
8140 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8141 (build-system ant-build-system)
8142 (arguments
8143 `(#:jar-name "jackson-modules-base-jaxb.jar"
8144 #:source-dir "jaxb/src/main/java"
8145 #:test-dir "jaxb/src/test"
8146 #:test-exclude
8147 ;; Base class for tests
8148 (list "**/BaseJaxbTest.java")
8149 #:phases
8150 (modify-phases %standard-phases
8151 (add-before 'configure 'generate-PackageVersion.java
8152 (lambda _
8153 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8154 "jackson/module/jaxb/PackageVersion.java"))
8155 (in (string-append out ".in")))
8156 (copy-file in out)
8157 (substitute* out
8158 (("@package@") "com.fasterxml.jackson.module.jaxb")
8159 (("@projectversion@") ,version)
8160 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8161 (("@projectartifactid@") "jackson-module-jaxb")))
8162 #t))
8163 (add-before 'build 'copy-resources
8164 (lambda _
8165 (copy-recursively "jaxb/src/main/resources" "build/classes")
8166 #t)))))
8167 (inputs
8168 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8169 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8170 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8171 (native-inputs
8172 `(("java-junit" ,java-junit)))
8173 (home-page "https://github.com/FasterXML/jackson-modules-base")
8174 (synopsis "Jaxb annotations jackson module")
8175 (description "This package is the jaxb annotations module for jackson.")
8176 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8177
8178 (define-public java-fasterxml-jackson-modules-base-mrbean
8179 (package
8180 (name "java-fasterxml-jackson-modules-base-mrbean")
8181 (version "2.9.4")
8182 (source (origin
8183 (method url-fetch)
8184 (uri (string-append "https://github.com/FasterXML/"
8185 "jackson-modules-base/archive/"
8186 "jackson-modules-base-" version ".tar.gz"))
8187 (sha256
8188 (base32
8189 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8190 (build-system ant-build-system)
8191 (arguments
8192 `(#:jar-name "jackson-modules-base-mrbean.jar"
8193 #:source-dir "mrbean/src/main/java"
8194 #:test-dir "mrbean/src/test"
8195 #:test-exclude
8196 ;; Base class for tests
8197 (list "**/BaseTest.java")
8198 #:phases
8199 (modify-phases %standard-phases
8200 (add-before 'configure 'generate-PackageVersion.java
8201 (lambda _
8202 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8203 "jackson/module/mrbean/PackageVersion.java"))
8204 (in (string-append out ".in")))
8205 (copy-file in out)
8206 (substitute* out
8207 (("@package@") "com.fasterxml.jackson.module.mrbean")
8208 (("@projectversion@") ,version)
8209 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8210 (("@projectartifactid@") "jackson-module-mrbean")))
8211 #t)))))
8212 (inputs
8213 `(("java-asm" ,java-asm)
8214 ("java-fasterxml-jackson-annotations"
8215 ,java-fasterxml-jackson-annotations)
8216 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8217 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8218 (native-inputs
8219 `(("java-junit" ,java-junit)))
8220 (home-page "https://github.com/FasterXML/jackson-modules-base")
8221 (synopsis "POJO type materialization for Java")
8222 (description "This package implements POJO type materialization.
8223 Databinders can construct implementation classes for Java interfaces as part
8224 of deserialization.")
8225 (license license:asl2.0)))
8226
8227 (define-public java-snakeyaml
8228 (package
8229 (name "java-snakeyaml")
8230 (version "1.18")
8231 (source (origin
8232 (method url-fetch)
8233 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8234 version ".tar.gz"))
8235 (file-name (string-append name "-" version ".tar.gz"))
8236 (sha256
8237 (base32
8238 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8239 (build-system ant-build-system)
8240 (arguments
8241 `(#:jar-name "java-snakeyaml.jar"
8242 #:source-dir "src/main/java"
8243 ;; Tests require velocity, a cyclic dependency, and
8244 ;; java-spring-framework-context which is not packaged.
8245 #:tests? #f))
8246 (home-page "https://bitbucket.org/asomov/snakeyaml")
8247 (synopsis "YAML processor")
8248 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8249 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8250
8251 (define-public java-fasterxml-jackson-dataformat-yaml
8252 (package
8253 (name "java-fasterxml-jackson-dataformat-yaml")
8254 (version "2.9.4")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (string-append "https://github.com/FasterXML/"
8258 "jackson-dataformats-text/archive/"
8259 "jackson-dataformats-text-" version ".tar.gz"))
8260 (sha256
8261 (base32
8262 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8263 (build-system ant-build-system)
8264 (arguments
8265 `(#:jar-name "jackson-dataformat-yaml.jar"
8266 #:source-dir "yaml/src/main/java"
8267 #:test-dir "yaml/src/test"
8268 #:test-exclude (list "**/failing/**.java")
8269 #:phases
8270 (modify-phases %standard-phases
8271 (add-before 'configure 'generate-PackageVersion.java
8272 (lambda _
8273 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8274 (in (string-append out ".in")))
8275 (copy-file in out)
8276 (substitute* out
8277 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8278 (("@projectversion@") ,version)
8279 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8280 (("@projectartifactid@") "jackson-dataformat-yaml")))
8281 #t)))))
8282 (inputs
8283 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8284 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8285 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8286 ("java-snakeyaml" ,java-snakeyaml)))
8287 (native-inputs
8288 `(("junit" ,java-junit)
8289 ("hamcrest" ,java-hamcrest-core)
8290 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8291 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8292 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8293 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8294 (synopsis "Yaml backend for Jackson")
8295 (description "Dataformat backends are used to support format alternatives
8296 to JSON, supported by default. This is done by sub-classing Jackson core
8297 abstractions.")
8298 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8299
8300 (define-public java-stax2-api
8301 (package
8302 (name "java-stax2-api")
8303 (version "4.0.0")
8304 (source (origin
8305 (method url-fetch)
8306 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8307 "stax2-api-" version ".tar.gz"))
8308 (sha256
8309 (base32
8310 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8311 (build-system ant-build-system)
8312 (arguments
8313 `(#:jar-name "java-stax2-api.jar"
8314 #:source-dir "src/main/java"
8315 #:tests? #f)); no tests
8316 (home-page "https://github.com/FasterXML/stax2-api")
8317 (synopsis "Stax2 API")
8318 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8319 significant new functionalities, such as full-featured bi-direction validation
8320 interface and high-performance Typed Access API.")
8321 (license license:bsd-2)))
8322
8323 (define-public java-woodstox-core
8324 (package
8325 (name "java-woodstox-core")
8326 (version "5.0.3")
8327 (source (origin
8328 (method url-fetch)
8329 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8330 "woodstox-core-" version ".tar.gz"))
8331 (sha256
8332 (base32
8333 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8334 (build-system ant-build-system)
8335 (arguments
8336 `(#:jar-name "woodstox.jar"
8337 #:test-exclude
8338 (list "**/Base*.java" "failing/**")
8339 #:phases
8340 (modify-phases %standard-phases
8341 (add-before 'build 'remove-msv-dep
8342 (lambda _
8343 ;; we don't need osgi, and it depends on msv
8344 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8345 ;; msv's latest release is from 2011 and we don't need it
8346 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8347 (delete-file-recursively "src/test/java/wstxtest/osgi")
8348 (delete-file-recursively "src/test/java/wstxtest/msv")
8349 #t))
8350 (add-before 'build 'copy-resources
8351 (lambda _
8352 (copy-recursively "src/main/resources" "build/classes")
8353 #t)))))
8354 (inputs
8355 `(("stax2" ,java-stax2-api)))
8356 (native-inputs
8357 `(("junit" ,java-junit)))
8358 (home-page "https://github.com/FasterXML/woodstox")
8359 (synopsis "Stax XML API implementation")
8360 (description "Woodstox is a stax XML API implementation.")
8361 (license license:asl2.0)))
8362
8363 (define-public java-fasterxml-jackson-dataformat-xml
8364 (package
8365 (name "java-fasterxml-jackson-dataformat-xml")
8366 (version "2.9.4")
8367 (source (origin
8368 (method url-fetch)
8369 (uri (string-append "https://github.com/FasterXML/"
8370 "jackson-dataformat-xml/archive/"
8371 "jackson-dataformat-xml-" version ".tar.gz"))
8372 (sha256
8373 (base32
8374 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8375 (build-system ant-build-system)
8376 (arguments
8377 `(#:jar-name "jackson-dataformat-xml.jar"
8378 #:source-dir "src/main/java"
8379 #:test-exclude
8380 (list "**/failing/**")
8381 #:phases
8382 (modify-phases %standard-phases
8383 (add-before 'configure 'generate-PackageVersion.java
8384 (lambda _
8385 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8386 (in (string-append out ".in")))
8387 (copy-file in out)
8388 (newline)
8389 (substitute* out
8390 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8391 (("@projectversion@") ,version)
8392 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8393 (("@projectartifactid@") "jackson-dataformat-xml")))
8394 #t))
8395 (add-before 'build 'copy-resources
8396 (lambda _
8397 (copy-recursively "src/main/resources" "build/classes")
8398 #t)))))
8399 (inputs
8400 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8401 ("jackson-core" ,java-fasterxml-jackson-core)
8402 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8403 ("jackson-databind" ,java-fasterxml-jackson-databind)
8404 ("stax2-api" ,java-stax2-api)
8405 ("woodstox" ,java-woodstox-core)))
8406 (native-inputs
8407 `(("junit" ,java-junit)
8408 ("hamcrest" ,java-hamcrest-core)))
8409 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8410 (synopsis "Read and write XML")
8411 (description "This package contains Jackson extension component for reading
8412 and writing XML encoded data.
8413
8414 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8415 approach (that is, no support is added for \"Schema-first\" approach). Support
8416 for JAXB annotations is provided by JAXB annotation module; this module
8417 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8418 @code{JsonFactory}) as well as small number of higher level overrides needed to
8419 make data-binding work.")
8420 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8421
8422 (define-public java-hdrhistogram
8423 (package
8424 (name "java-hdrhistogram")
8425 (version "2.1.9")
8426 (source (origin
8427 (method url-fetch)
8428 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8429 "archive/HdrHistogram-" version ".tar.gz"))
8430 (sha256
8431 (base32
8432 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8433 (build-system ant-build-system)
8434 (arguments
8435 `(#:jar-name "java-hdrhistogram.jar"
8436 #:source-dir "src/main/java"
8437 #:phases
8438 (modify-phases %standard-phases
8439 (add-before 'configure 'set-version
8440 (lambda _
8441 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8442 (template (string-append version-java ".template")))
8443 (copy-file template version-java)
8444 (substitute* version-java
8445 (("\\$VERSION\\$") ,version)
8446 (("\\$BUILD_TIME\\$") "0"))
8447 #t))))))
8448 (native-inputs
8449 `(("junit" ,java-junit)
8450 ("hamcrest" ,java-hamcrest-core)))
8451 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8452 (synopsis "High dynamic range histogram")
8453 (description "Hdrhistogram allows to create histograms that support
8454 recording and analyzing sampled data value counts across a configurable integer
8455 value range with configurable value precision within the range. Value precision
8456 is expressed as the number of significant digits in the value recording, and
8457 provides control over value quantization behavior across the value range and
8458 the subsequent value resolution at any given level.")
8459 (license license:public-domain)))
8460
8461 (define-public java-cofoja
8462 (package
8463 (name "java-cofoja")
8464 (version "1.3")
8465 (source (origin
8466 (method git-fetch)
8467 (uri (git-reference
8468 (url "https://github.com/nhatminhle/cofoja.git")
8469 (commit (string-append "v" version))))
8470 (file-name (string-append "java-cofoja-" version "-checkout"))
8471 (sha256
8472 (base32
8473 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8474 (build-system ant-build-system)
8475 (arguments
8476 `(#:build-target "dist"
8477 #:test-target "test"
8478 #:jdk ,icedtea-8
8479 #:make-flags
8480 (list "-Ddist.dir=dist")
8481 #:modules ((guix build ant-build-system)
8482 (guix build java-utils)
8483 (guix build utils)
8484 (srfi srfi-1)
8485 (ice-9 match))
8486 #:phases
8487 (modify-phases %standard-phases
8488 ;; The bulid system ignores the class path the ant-build-system sets
8489 ;; up and instead expects to find all dependencies in the "lib"
8490 ;; directory.
8491 (add-after 'unpack 'create-libdir
8492 (lambda* (#:key inputs #:allow-other-keys)
8493 (mkdir-p "lib")
8494 (for-each
8495 (lambda (file)
8496 (let ((target (string-append "lib/" (basename file))))
8497 (unless (file-exists? target)
8498 (symlink file target))))
8499 (append-map (match-lambda
8500 ((label . dir)
8501 (find-files dir "\\.jar$")))
8502 inputs))
8503 #t))
8504 (replace 'install (install-jars "dist")))))
8505 (inputs
8506 `(("java-asm" ,java-asm)))
8507 (native-inputs
8508 `(("java-junit" ,java-junit)))
8509 (home-page "https://github.com/nhatminhle/cofoja")
8510 (synopsis "Contracts for Java")
8511 (description "Contracts for Java, or Cofoja for short, is a contract
8512 programming framework and test tool for Java, which uses annotation processing
8513 and bytecode instrumentation to provide run-time checking. (In particular,
8514 this is not a static analysis tool.)")
8515 (license license:lgpl3+)))
8516
8517 (define-public java-aopalliance
8518 (package
8519 (name "java-aopalliance")
8520 (version "1.0")
8521 (source (origin
8522 (method git-fetch)
8523 ;; Note: this git repository is not official, but contains the
8524 ;; source code that is in the CVS repository. Downloading the
8525 ;; tarball from sourceforge is undeterministic, and the cvs download
8526 ;; fails.
8527 (uri (git-reference
8528 (url "https://github.com/hoverruan/aopalliance")
8529 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8530 (file-name (string-append name "-" version))
8531 (sha256
8532 (base32
8533 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8534 (build-system ant-build-system)
8535 (arguments
8536 `(#:jar-name "java-aopalliance.jar"
8537 #:jdk ,icedtea-8
8538 #:tests? #f; no tests
8539 #:source-dir "aopalliance/src/main"))
8540 (home-page "http://aopalliance.sourceforge.net")
8541 (synopsis "Aspect-Oriented Programming")
8542 (description "The AOP Alliance project is a joint project between several
8543 software engineering people who are interested in Aspect-Oriented Programming
8544 (AOP) and Java.")
8545 (license license:public-domain)))
8546
8547 (define-public java-javax-inject
8548 (package
8549 (name "java-javax-inject")
8550 (version "tck-1")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8554 "archive/javax.inject-" version ".tar.gz"))
8555 (sha256
8556 (base32
8557 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8558 (build-system ant-build-system)
8559 (arguments
8560 `(#:jar-name "java-javax-inject.jar"
8561 #:jdk ,icedtea-8
8562 #:tests? #f)); no tests
8563 (home-page "http://github.com/javax-inject/javax-inject")
8564 (synopsis "JSR-330: Dependency Injection for Java")
8565 (description "This package specifies a means for obtaining objects in such
8566 a way as to maximize reusability, testability and maintainability compared to
8567 traditional approaches such as constructors, factories, and service locators
8568 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8569 most nontrivial applications.
8570
8571 Many types depend on other types. For example, a @var{Stopwatch} might depend
8572 on a @var{TimeSource}. The types on which a type depends are known as its
8573 dependencies. The process of finding an instance of a dependency to use at run
8574 time is known as resolving the dependency. If no such instance can be found,
8575 the dependency is said to be unsatisfied, and the application is broken.")
8576 (license license:asl2.0)))
8577
8578 (define-public java-guice
8579 (package
8580 (name "java-guice")
8581 (version "4.1")
8582 (source (origin
8583 (method url-fetch)
8584 (uri (string-append "https://github.com/google/guice/archive/"
8585 version ".tar.gz"))
8586 (file-name (string-append name "-" version ".tar.gz"))
8587 (modules '((guix build utils)))
8588 (snippet
8589 `(begin
8590 (for-each delete-file (find-files "." ".*.jar"))))
8591 (sha256
8592 (base32
8593 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8594 (build-system ant-build-system)
8595 (arguments
8596 `(#:jar-name "java-guice.jar"
8597 #:jdk ,icedtea-8
8598 #:tests? #f; FIXME: tests are not in a java sub directory
8599 #:source-dir "core/src"))
8600 (inputs
8601 `(("guava" ,java-guava)
8602 ("java-cglib" ,java-cglib)
8603 ("java-aopalliance" ,java-aopalliance)
8604 ("java-javax-inject" ,java-javax-inject)
8605 ("java-asm" ,java-asm)))
8606 (home-page "https://github.com/google/guice")
8607 (synopsis "Lightweight dependency injection framework")
8608 (description "Guice is a lightweight dependency injection framework fo
8609 Java 6 and above.")
8610 (license license:asl2.0)))
8611
8612 (define-public java-guice-servlet
8613 (package
8614 (inherit java-guice)
8615 (name "java-guice-servlet")
8616 (arguments
8617 `(#:jar-name "guice-servlet.jar"
8618 #:source-dir "extensions/servlet/src/"
8619 #:jdk ,icedtea-8
8620 #:tests? #f)); FIXME: not in a java subdir
8621 (inputs
8622 `(("guice" ,java-guice)
8623 ("servlet" ,java-classpathx-servletapi)
8624 ,@(package-inputs java-guice)))))
8625
8626 (define-public java-assertj
8627 (package
8628 (name "java-assertj")
8629 (version "3.8.0")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (string-append "https://github.com/joel-costigliola/"
8633 "assertj-core/archive/"
8634 "assertj-core-" version ".tar.gz"))
8635 (sha256
8636 (base32
8637 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8638 (build-system ant-build-system)
8639 (arguments
8640 `(#:jar-name "java-assertj.jar"
8641 #:jdk ,icedtea-8
8642 #:source-dir "src/main/java"
8643 #:tests? #f)); depends on tng-junit which depends on assertj
8644 (inputs
8645 `(("cglib" ,java-cglib)
8646 ("junit" ,java-junit)
8647 ("hamcrest" ,java-hamcrest-core)))
8648 (native-inputs
8649 `(("mockito" ,java-mockito-1)))
8650 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8651 (synopsis "Fluent assertions for java")
8652 (description "AssertJ core is a Java library that provides a fluent
8653 interface for writing assertions. Its main goal is to improve test code
8654 readability and make maintenance of tests easier.")
8655 (license license:asl2.0)))
8656
8657 (define-public java-jboss-javassist
8658 (package
8659 (name "java-jboss-javassist")
8660 (version "3.21.0")
8661 (source (origin
8662 (method url-fetch)
8663 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8664 "archive/rel_"
8665 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8666 "_ga.tar.gz"))
8667 (sha256
8668 (base32
8669 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8670 (build-system ant-build-system)
8671 (arguments
8672 `(#:jar-name "java-jboss-javassist.jar"
8673 #:jdk ,icedtea-8
8674 #:source-dir "src/main"
8675 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8676 #:phases
8677 (modify-phases %standard-phases
8678 (add-before 'configure 'remove-binary
8679 (lambda _
8680 (delete-file "javassist.jar")
8681 #t)))))
8682 (native-inputs
8683 `(("junit" ,java-junit)))
8684 (home-page "https://github.com/jboss-javassist/javassist")
8685 (synopsis "Java bytecode engineering toolkit")
8686 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8687 manipulation simple. It is a class library for editing bytecodes in Java; it
8688 enables Java programs to define a new class at runtime and to modify a class
8689 file when the JVM loads it.")
8690 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8691
8692 (define-public java-jcommander
8693 (package
8694 (name "java-jcommander")
8695 (version "1.71")
8696 (source (origin
8697 (method url-fetch)
8698 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8699 version ".tar.gz"))
8700 (file-name (string-append name "-" version ".tar.gz"))
8701 (sha256
8702 (base32
8703 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8704 (build-system ant-build-system)
8705 (arguments
8706 `(#:jar-name "java-jcommander.jar"
8707 #:jdk ,icedtea-8
8708 #:tests? #f; requires testng which depends on jcommander
8709 #:source-dir "src/main/java"))
8710 (home-page "http://jcommander.org")
8711 (synopsis "Command line parameters parser")
8712 (description "JCommander is a very small Java framework that makes it
8713 trivial to parse command line parameters. Parameters are declared with
8714 annotations.")
8715 (license license:asl2.0)))
8716
8717 (define-public java-bsh
8718 (package
8719 (name "java-bsh")
8720 (version "2.0b6")
8721 (source (origin
8722 (method url-fetch)
8723 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8724 version ".tar.gz"))
8725 (file-name (string-append name "-" version ".tar.gz"))
8726 (sha256
8727 (base32
8728 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8729 (build-system ant-build-system)
8730 (arguments
8731 `(#:build-target "jarall"
8732 #:test-target "junit-tests-all"
8733 #:phases
8734 (modify-phases %standard-phases
8735 (replace 'install
8736 (lambda* (#:key outputs #:allow-other-keys)
8737 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8738 (mkdir-p share)
8739 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8740 #t))))))
8741 (home-page "http://beanshell.org/")
8742 (synopsis "Lightweight Scripting for Java")
8743 (description "BeanShell is a small, free, embeddable Java source
8744 interpreter with object scripting language features, written in Java.
8745 BeanShell dynamically executes standard Java syntax and extends it with common
8746 scripting conveniences such as loose types, commands, and method closures like
8747 those in Perl and JavaScript.")
8748 (license license:asl2.0)))
8749
8750 (define-public java-fest-util
8751 (package
8752 (name "java-fest-util")
8753 (version "1.2.5")
8754 (source (origin
8755 (method url-fetch)
8756 (uri (string-append "https://github.com/alexruiz/fest-util/"
8757 "archive/fest-util-" version ".tar.gz"))
8758 (sha256
8759 (base32
8760 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8761 (build-system ant-build-system)
8762 (arguments
8763 `(#:jar-name "java-fest-util.jar"
8764 #:source-dir "src/main/java"))
8765 (native-inputs
8766 `(("junit" ,java-junit)
8767 ("hamcrest" ,java-hamcrest-core)))
8768 (home-page "https://github.com/alexruiz/fest-util")
8769 (synopsis "FEST common utilities")
8770 (description "Common utilities used in all FEST module.")
8771 (license license:asl2.0)))
8772
8773 (define-public java-fest-test
8774 (package
8775 (name "java-fest-test")
8776 (version "2.1.0")
8777 (source (origin
8778 (method url-fetch)
8779 (uri (string-append "https://github.com/alexruiz/fest-test/"
8780 "archive/fest-test-" version ".tar.gz"))
8781 (sha256
8782 (base32
8783 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8784 (build-system ant-build-system)
8785 (arguments
8786 `(#:jar-name "java-fest-test.jar"
8787 #:source-dir "src/main/java"
8788 #:tests? #f)); no tests
8789 (inputs
8790 `(("junit" ,java-junit)))
8791 (home-page "https://github.com/alexruiz/fest-test")
8792 (synopsis "Common FEST testing infrastructure")
8793 (description "Fest-test contains the common FEST testing infrastructure.")
8794 (license license:asl2.0)))
8795
8796 (define-public java-fest-assert
8797 (package
8798 (name "java-fest-assert")
8799 (version "2.0M10")
8800 (source (origin
8801 (method url-fetch)
8802 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8803 "archive/fest-assert-core-" version ".tar.gz"))
8804 (sha256
8805 (base32
8806 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8807 (build-system ant-build-system)
8808 (arguments
8809 `(#:jar-name "java-fest-assert.jar"
8810 #:source-dir "src/main/java"
8811 #:test-exclude
8812 (list
8813 "**/Abstract*.java"
8814 "**/*BaseTest.java"
8815 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8816 "**/MessageFormatter_format_Test.java"
8817 "**/internal/*/*_assert*_Test.java")))
8818 (inputs
8819 `(("java-fest-util" ,java-fest-util)))
8820 (native-inputs
8821 `(("java-junit" ,java-junit)
8822 ("java-fest-test" ,java-fest-test)
8823 ("java-hamcrest-core" ,java-hamcrest-core)
8824 ("java-mockito" ,java-mockito-1)
8825 ("java-cglib" ,java-cglib)
8826 ("java-objenesis" ,java-objenesis)
8827 ("java-asm" ,java-asm)))
8828 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8829 (synopsis "FEST fluent assertions")
8830 (description "FEST-Assert provides a fluent interface for assertions.")
8831 (license license:asl2.0)))
8832
8833 (define-public java-testng
8834 (package
8835 (name "java-testng")
8836 (version "6.14.3")
8837 (source (origin
8838 (method git-fetch)
8839 (uri (git-reference
8840 (url "https://github.com/cbeust/testng.git")
8841 (commit version)))
8842 (file-name (string-append name "-" version "-checkout"))
8843 (sha256
8844 (base32
8845 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8846 (build-system ant-build-system)
8847 (arguments
8848 `(#:jdk ,icedtea-8; java.util.function
8849 #:jar-name "java-testng.jar"
8850 #:source-dir "src/main/java"
8851 #:phases
8852 (modify-phases %standard-phases
8853 ;; FIXME: I don't know why these tests fail
8854 (add-after 'unpack 'delete-failing-tests
8855 (lambda _
8856 (substitute* "src/test/resources/testng.xml"
8857 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8858 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8859 #t))
8860 ;; We don't have groovy
8861 (add-after 'unpack 'delete-groovy-tests
8862 (lambda _
8863 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8864 (substitute* "src/test/resources/testng.xml"
8865 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8866 #t))
8867 (add-before 'build 'copy-resources
8868 (lambda _
8869 (copy-recursively "src/main/resources" "build/classes")
8870 #t))
8871 (add-before 'check 'copy-test-resources
8872 (lambda _
8873 (copy-recursively "src/test/resources" "build/test-classes")
8874 #t))
8875 (replace 'check
8876 (lambda _
8877 (invoke "ant" "compile-tests")
8878 ;; we don't have groovy
8879 (substitute* "src/test/resources/testng.xml"
8880 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8881 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8882 ":build/classes"
8883 ":build/test-classes")
8884 "-Dtest.resources.dir=src/test/resources"
8885 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8886 (propagated-inputs
8887 `(("junit" ,java-junit)
8888 ("java-jsr305" ,java-jsr305)
8889 ("java-bsh" ,java-bsh)
8890 ("java-jcommander" ,java-jcommander)
8891 ("java-guice" ,java-guice)
8892 ("snakeyaml" ,java-snakeyaml)))
8893 (native-inputs
8894 `(("guava" ,java-guava)
8895 ("java-javax-inject" ,java-javax-inject)
8896 ("java-hamcrest" ,java-hamcrest-all)
8897 ("java-assertj" ,java-assertj)
8898 ("java-mockito" ,java-mockito-1)
8899 ("cglib" ,java-cglib)
8900 ("asm" ,java-asm)
8901 ("aopalliance" ,java-aopalliance)))
8902 (home-page "http://testng.org")
8903 (synopsis "Testing framework")
8904 (description "TestNG is a testing framework inspired from JUnit and NUnit
8905 but introducing some new functionalities that make it more powerful and easier
8906 to use.")
8907 (license license:asl2.0)))
8908
8909 (define-public java-jnacl
8910 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8911 (revision "2"))
8912 (package
8913 (name "java-jnacl")
8914 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8915 (source (origin
8916 (method git-fetch)
8917 (uri (git-reference
8918 (url "https://github.com/neilalexander/jnacl.git")
8919 (commit commit)))
8920 (file-name (git-file-name name version))
8921 (sha256
8922 (base32
8923 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8924 (build-system ant-build-system)
8925 (arguments
8926 `(#:jar-name "jnacl.jar"
8927 #:source-dir "src/main/java"
8928 #:jdk ,icedtea-8
8929 #:phases
8930 (modify-phases %standard-phases
8931 (add-before 'build 'fix-tests
8932 (lambda _
8933 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8934 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8935 (("assertions.Assertions") "assertions.api.Assertions"))
8936 #t))
8937 (replace 'check
8938 (lambda _
8939 (invoke "ant" "compile-tests")
8940 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8941 ":build/classes"
8942 ":build/test-classes")
8943 "org.testng.TestNG" "-testclass"
8944 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8945 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8946 ":build/classes"
8947 ":build/test-classes")
8948 "org.testng.TestNG" "-testclass"
8949 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8950 (native-inputs
8951 `(("java-testng" ,java-testng)
8952 ("java-fest-util" ,java-fest-util)
8953 ("java-fest-assert" ,java-fest-assert)))
8954 (home-page "https://github.com/neilalexander/jnacl")
8955 (synopsis "Java implementation of NaCl")
8956 (description "Pure Java implementation of the NaCl: Networking and
8957 Cryptography library.")
8958 (license license:bsd-2))))
8959
8960 (define-public java-mvel2
8961 (package
8962 (name "java-mvel2")
8963 (version "2.3.1")
8964 (source (origin
8965 (method url-fetch)
8966 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8967 version ".Final.tar.gz"))
8968 (sha256
8969 (base32
8970 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8971 (build-system ant-build-system)
8972 (arguments
8973 `(#:jar-name "mvel2.jar"
8974 #:source-dir "src/main/java"
8975 #:test-exclude
8976 (list "**/Abstract*.java"
8977 ;; Base class with no tests
8978 "**/MVELThreadTest.java")
8979 #:phases
8980 (modify-phases %standard-phases
8981 (add-after 'install 'install-bin
8982 (lambda* (#:key outputs #:allow-other-keys)
8983 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8984 (mkdir-p bin)
8985 (with-output-to-file (string-append bin "/mvel2")
8986 (lambda _
8987 (display
8988 (string-append
8989 "#!" (which "bash") "\n"
8990 "if [ \"$#\" -ne \"2\" ]; then\n"
8991 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8992 "exit\n"
8993 "fi\n"
8994 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8995 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8996 " org.mvel2.sh.Main $1"))))
8997 (chmod (string-append bin "/mvel2") #o755))
8998 #t)))))
8999 (native-inputs
9000 `(("junit" ,java-junit)
9001 ("hamcrest" ,java-hamcrest-core)))
9002 (home-page "https://github.com/mvel/mvel")
9003 (synopsis "MVFLEX Expression Language")
9004 (description "MVEL has largely been inspired by Java syntax, but has some
9005 fundamental differences aimed at making it more efficient as an expression
9006 language, such as operators that directly support collection, array and string
9007 matching, as well as regular expressions. MVEL is used to evaluate expressions
9008 written using Java syntax.
9009
9010 In addition to the expression language, MVEL serves as a templating language for
9011 configuration and string construction.")
9012 (license license:asl2.0)))
9013
9014 (define-public java-commons-jexl-2
9015 (package
9016 (name "java-commons-jexl")
9017 (version "2.1.1")
9018 (source (origin
9019 (method url-fetch)
9020 (uri (string-append "mirror://apache/commons/jexl/source/"
9021 "commons-jexl-" version "-src.tar.gz"))
9022 (sha256
9023 (base32
9024 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9025 (build-system ant-build-system)
9026 (arguments
9027 `(#:jar-name "commons-jexl-2.jar"
9028 #:jdk ,icedtea-8
9029 #:source-dir "src/main/java"
9030 #:phases
9031 (modify-phases %standard-phases
9032 (add-before 'check 'disable-broken-tests
9033 (lambda* (#:key inputs #:allow-other-keys)
9034 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9035 (substitute* "ArithmeticTest.java"
9036 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9037 (("asserter.assertExpression\\(\"imanull") "//"))
9038 ;; This test fails with "ambiguous method invocation"
9039 (delete-file "CacheTest.java")
9040 ;; This test doesn't have access to the temp directory
9041 (substitute* "ClassCreatorTest.java"
9042 (("java.io.tmpdir") "user.dir"))
9043 ;; This test fails in trying to detect whether it can run.
9044 (substitute* "ClassCreator.java"
9045 (("boolean canRun =.*") "boolean canRun = false;\n"))
9046 ;; ...and these tests depend on it.
9047 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9048 (delete-file "scripting/JexlScriptEngineTest.java"))
9049 #t))
9050 (add-before 'build 'run-javacc
9051 (lambda _
9052 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9053 (invoke "java" "jjtree" "Parser.jjt")
9054 (invoke "java" "javacc" "Parser.jj"))
9055 #t)))))
9056 (inputs
9057 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9058 (native-inputs
9059 `(("java-junit" ,java-junit)
9060 ("java-hamcrest-core" ,java-hamcrest-core)
9061 ("javacc" ,javacc-4)))
9062 (home-page "https://commons.apache.org/proper/commons-jexl/")
9063 (synopsis "Java Expression Language ")
9064 (description "JEXL is a library intended to facilitate the implementation
9065 of dynamic and scripting features in applications and frameworks written in
9066 Java. JEXL implements an Expression Language based on some extensions to the
9067 JSTL Expression Language supporting most of the constructs seen in
9068 shell-script or ECMAScript. Its goal is to expose scripting features usable
9069 by technical operatives or consultants working with enterprise platforms.")
9070 (license license:asl2.0)))
9071
9072 (define-public java-lz4
9073 (package
9074 (name "java-lz4")
9075 (version "1.4.0")
9076 (source (origin
9077 (method url-fetch)
9078 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9079 version ".tar.gz"))
9080 (file-name (string-append name "-" version ".tar.gz"))
9081 (sha256
9082 (base32
9083 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9084 (build-system ant-build-system)
9085 (arguments
9086 `(#:jar-name "lz4.jar"
9087 #:jdk ,icedtea-8
9088 #:source-dir "src/java:src/java-unsafe"
9089 #:tests? #f; FIXME: requires more dependencies
9090 #:phases
9091 (modify-phases %standard-phases
9092 (add-before 'configure 'generate-source
9093 (lambda _
9094 (with-directory-excursion "src/build/source_templates"
9095 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9096 #t)))))
9097 (native-inputs
9098 `(("mvel" ,java-mvel2)))
9099 (home-page "https://jpountz.github.io/lz4-java")
9100 (synopsis "Compression algorithm")
9101 (description "LZ4 - Java is a Java port of the popular lz4 compression
9102 algorithms and xxHash hashing algorithm.")
9103 (license license:asl2.0)))
9104
9105 (define-public java-bouncycastle
9106 (package
9107 (name "java-bouncycastle")
9108 (version "1.60")
9109 (source (origin
9110 (method url-fetch)
9111 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9112 (substring version 0 1) "v"
9113 (substring version 2 4) ".tar.gz"))
9114 (sha256
9115 (base32
9116 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9117 (modules '((guix build utils)))
9118 (snippet
9119 '(begin
9120 (for-each delete-file
9121 (find-files "." "\\.jar$"))
9122 #t))))
9123 (build-system ant-build-system)
9124 (arguments
9125 `(#:jdk ,icedtea-8
9126 #:tests? #f
9127 #:phases
9128 (modify-phases %standard-phases
9129 (replace 'build
9130 (lambda _
9131 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9132 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9133 ;; FIXME: the tests freeze.
9134 ;; (replace 'check
9135 ;; (lambda _
9136 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9137 (replace 'install
9138 (install-jars "build/artifacts/jdk1.5/jars")))))
9139 (inputs
9140 `(("java-javax-mail" ,java-javax-mail)))
9141 (native-inputs
9142 `(("unzip" ,unzip)
9143 ("junit" ,java-junit)
9144 ("java-native-access" ,java-native-access)
9145 ("java-native-access-platform" ,java-native-access-platform)))
9146 (home-page "https://www.bouncycastle.org")
9147 (synopsis "Cryptographic library")
9148 (description "Bouncy Castle is a cryptographic library for the Java
9149 programming language.")
9150 (license license:expat)))
9151
9152 (define-public java-lmax-disruptor
9153 (package
9154 (name "java-lmax-disruptor")
9155 (version "3.3.7")
9156 (source (origin
9157 (method url-fetch)
9158 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9159 "archive/" version ".tar.gz"))
9160 (file-name (string-append name "-" version ".tar.gz"))
9161 (sha256
9162 (base32
9163 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9164 (build-system ant-build-system)
9165 (arguments
9166 `(#:jar-name "java-lmax-disruptor.jar"
9167 #:jdk ,icedtea-8
9168 #:tests? #f)); tests hang
9169 (inputs
9170 `(("junit" ,java-junit)
9171 ("java-hdrhistogram" ,java-hdrhistogram)
9172 ("java-jmock" ,java-jmock)
9173 ("java-jmock-legacy" ,java-jmock-legacy)
9174 ("java-jmock-junit4" ,java-jmock-junit4)
9175 ("java-hamcrest-all" ,java-hamcrest-all)))
9176 (native-inputs
9177 `(("cglib" ,java-cglib)
9178 ("objenesis" ,java-objenesis)
9179 ("asm" ,java-asm)))
9180 (home-page "https://www.lmax.com/disruptor")
9181 (synopsis "High performance inter-thread communication")
9182 (description "LMAX Disruptor is a software pattern and software component
9183 for high performance inter-thread communication that avoids the need for
9184 message queues or resource locking.")
9185 (license license:asl2.0)))
9186
9187 (define-public java-commons-bcel
9188 (package
9189 (name "java-commons-bcel")
9190 (version "6.1")
9191 (source (origin
9192 (method url-fetch)
9193 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9194 version "-src.tar.gz"))
9195 (sha256
9196 (base32
9197 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9198 (build-system ant-build-system)
9199 (arguments
9200 `(#:jar-name "bcel.jar"
9201 #:jdk ,icedtea-8
9202 #:source-dir "src/main/java"
9203 #:test-dir "src/test/java"
9204 ;; FIXME: Tests require the unpackaged jna.
9205 #:tests? #f))
9206 (home-page "https://commons.apache.org/proper/commons-bcel/")
9207 (synopsis "Byte code engineering library")
9208 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9209 intended to give users a convenient way to analyze, create, and
9210 manipulate (binary) Java class files. Classes are represented by objects
9211 which contain all the symbolic information of the given class: methods, fields
9212 and byte code instructions, in particular.
9213
9214 Such objects can be read from an existing file, be transformed by a
9215 program (e.g. a class loader at run-time) and written to a file again. An
9216 even more interesting application is the creation of classes from scratch at
9217 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9218 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9219 of Java @code{.class} files.")
9220 (license license:asl2.0)))
9221
9222 (define-public java-xerial-core
9223 (package
9224 (name "java-xerial-core")
9225 (version "2.1")
9226 (source (origin
9227 (method url-fetch)
9228 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9229 version ".tar.gz"))
9230 (file-name (string-append name "-" version ".tar.gz"))
9231 (sha256
9232 (base32
9233 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9234 (build-system ant-build-system)
9235 (arguments
9236 `(#:jar-name "xerial-core.jar"
9237 #:source-dir "xerial-core/src/main/java"
9238 #:test-dir "xerial-core/src/test"
9239 #:phases
9240 (modify-phases %standard-phases
9241 (add-before 'build 'copy-resources
9242 (lambda _
9243 (copy-recursively "xerial-core/src/main/resources"
9244 "build/classes")
9245 #t)))))
9246 (native-inputs
9247 `(("junit" ,java-junit)
9248 ("hamcrest" ,java-hamcrest-core)))
9249 (home-page "https://github.com/xerial/xerial-java")
9250 (synopsis "Data management libraries for Java")
9251 (description "Xerial is a set of data management libraries for the Java
9252 programming language. The ultimate goal of the Xerial project is to manage
9253 everything as database, including class objects, text format data, data
9254 streams, etc.")
9255 (license license:asl2.0)))
9256
9257 (define-public java-powermock-reflect
9258 (package
9259 (name "java-powermock-reflect")
9260 (version "1.7.3")
9261 (source (origin
9262 (method url-fetch)
9263 (uri (string-append "https://github.com/powermock/powermock/"
9264 "archive/powermock-" version ".tar.gz"))
9265 (file-name (string-append name "-" version ".tar.gz"))
9266 (sha256
9267 (base32
9268 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9269 (patches
9270 (search-patches "java-powermock-fix-java-files.patch"))))
9271 (build-system ant-build-system)
9272 (arguments
9273 `(#:jar-name "java-powermock-reflect.jar"
9274 #:jdk ,icedtea-8
9275 #:source-dir "powermock-reflect/src/main/java"
9276 #:test-dir "powermock-reflect/src/test"))
9277 (inputs
9278 `(("java-objenesis" ,java-objenesis)))
9279 (native-inputs
9280 `(("junit" ,java-junit)
9281 ("cglib" ,java-cglib)
9282 ("asm" ,java-asm)
9283 ("hamcrest" ,java-hamcrest-core)
9284 ("assertj" ,java-assertj)))
9285 (home-page "https://github.com/powermock/powermock")
9286 (synopsis "Mock library extension framework")
9287 (description "PowerMock is a framework that extends other mock libraries
9288 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9289 classloader and bytecode manipulation to enable mocking of static methods,
9290 constructors, final classes and methods, private methods, removal of static
9291 initializers and more. By using a custom classloader no changes need to be
9292 done to the IDE or continuous integration servers which simplifies adoption.")
9293 (license license:asl2.0)))
9294
9295 (define-public java-powermock-core
9296 (package
9297 (inherit java-powermock-reflect)
9298 (name "java-powermock-core")
9299 (arguments
9300 `(#:jar-name "java-powermock-core.jar"
9301 #:source-dir "powermock-core/src/main/java"
9302 #:test-dir "powermock-core/src/test"
9303 #:tests? #f; requires powermock-api
9304 #:jdk ,icedtea-8
9305 #:phases
9306 (modify-phases %standard-phases
9307 (add-before 'build 'copy-resources
9308 (lambda _
9309 (copy-recursively "powermock-core/src/main/resources"
9310 "build/classes")
9311 #t)))))
9312 (inputs
9313 `(("reflect" ,java-powermock-reflect)
9314 ("javassist" ,java-jboss-javassist)))
9315 (native-inputs
9316 `(("junit" ,java-junit)
9317 ("assertj" ,java-assertj)
9318 ("mockito" ,java-mockito-1)))))
9319
9320 (define-public java-powermock-api-support
9321 (package
9322 (inherit java-powermock-reflect)
9323 (name "java-powermock-api-support")
9324 (build-system ant-build-system)
9325 (arguments
9326 `(#:jar-name "java-powermock-api-support.jar"
9327 #:jdk ,icedtea-8
9328 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9329 #:tests? #f)); no tests
9330 (inputs
9331 `(("core" ,java-powermock-core)
9332 ("reflect" ,java-powermock-reflect)))))
9333
9334 (define-public java-powermock-modules-junit4-common
9335 (package
9336 (inherit java-powermock-reflect)
9337 (name "java-powermock-modules-junit4-common")
9338 (build-system ant-build-system)
9339 (arguments
9340 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9341 #:jdk ,icedtea-8
9342 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9343 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9344 (inputs
9345 `(("core" ,java-powermock-core)
9346 ("easymock" ,java-easymock)
9347 ("reflect" ,java-powermock-reflect)
9348 ("hamcrest" ,java-hamcrest-core)
9349 ("cglib" ,java-cglib)))))
9350
9351 (define-public java-powermock-modules-junit4
9352 (package
9353 (inherit java-powermock-reflect)
9354 (name "java-powermock-modules-junit4")
9355 (build-system ant-build-system)
9356 (arguments
9357 `(#:jar-name "java-powermock-modules-junit4.jar"
9358 #:jdk ,icedtea-8
9359 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9360 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9361 #:phases
9362 (modify-phases %standard-phases
9363 (add-before 'build 'fix-junit-detection
9364 (lambda _
9365 ;; Our junit version is 4.12-SNAPSHOT
9366 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9367 "PowerMockJUnit4MethodValidator.java")
9368 (("4.12") "4.12-SNAPSHOT"))
9369 #t)))))
9370 (inputs
9371 `(("core" ,java-powermock-core)
9372 ("reflect" ,java-powermock-reflect)
9373 ("common" ,java-powermock-modules-junit4-common)
9374 ("cglib" ,java-cglib)))
9375 (native-inputs
9376 `(("easymock" ,java-easymock)
9377 ("hamcrest" ,java-hamcrest-core)
9378 ("objenesis" ,java-objenesis)
9379 ("asm" ,java-asm)
9380 ("junit" ,java-junit)))))
9381
9382 (define-public java-powermock-api-easymock
9383 (package
9384 (inherit java-powermock-reflect)
9385 (name "java-powermock-api-easymock")
9386 (build-system ant-build-system)
9387 (arguments
9388 `(#:jar-name "java-powermock-api-easymock.jar"
9389 #:jdk ,icedtea-8
9390 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9391 #:tests? #f; no tests
9392 #:phases
9393 (modify-phases %standard-phases
9394 (add-before 'build 'fix-file
9395 (lambda _
9396 ;; FIXME: This looks wrong, but it fixes a build error.
9397 (with-directory-excursion "powermock-api/powermock-api-easymock"
9398 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9399 (("classLoader instanceof MockClassLoader") "false")
9400 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9401 #t)))))
9402 (inputs
9403 `(("core" ,java-powermock-core)
9404 ("easymock" ,java-easymock)
9405 ("reflect" ,java-powermock-reflect)
9406 ("support" ,java-powermock-api-support)
9407 ("cglib" ,java-cglib)))))
9408
9409 (define-public java-jboss-jms-api-spec
9410 (package
9411 (name "java-jboss-jms-api-spec")
9412 (version "2.0")
9413 (source (origin
9414 (method url-fetch)
9415 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9416 "archive/jboss-jms-api_" version
9417 "_spec-1.0.1.Final.tar.gz"))
9418 (sha256
9419 (base32
9420 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9421 (build-system ant-build-system)
9422 (arguments
9423 `(#:jar-name "java-jboss-jms-api_spec.jar"
9424 #:jdk ,icedtea-8
9425 #:source-dir "."
9426 #:tests? #f)); no tests
9427 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9428 (synopsis "Java Message Service API specification")
9429 (description "Java Message Service (JMS) API is used to send messages
9430 messages between two or more clients. It is a messaging standard that allows
9431 application components to create, send, receive, and read messages.")
9432 ; either gpl2 only with GPL Classpath Exception, or cddl.
9433 (license (list license:gpl2 license:cddl1.0))))
9434
9435 (define-public java-mail
9436 (package
9437 (name "java-mail")
9438 (version "1.6.0")
9439 (source (origin
9440 (method url-fetch)
9441 (uri (string-append "https://github.com/javaee/javamail/archive/"
9442 "JAVAMAIL-1_6_0.tar.gz"))
9443 (sha256
9444 (base32
9445 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9446 (build-system ant-build-system)
9447 (arguments
9448 `(#:jar-name "java-mail.jar"
9449 #:jdk ,icedtea-8
9450 #:source-dir "mail/src/main/java"
9451 #:test-dir "mail/src/test"
9452 #:test-exclude
9453 (list "**/CollectorFormatterTest.java"
9454 "**/CompactFormatterTest.java"
9455 "**/DurationFilterTest.java"
9456 "**/MailHandlerTest.java"
9457 "**/GetLocalAddressTest.java"
9458 ;; FIXME: both end with:
9459 ;; java.lang.ClassNotFoundException:
9460 ;; javax.mail.internet.MimeMultipartParseTest
9461 "**/MimeMultipartParseTest.java"
9462 "**/SearchTermSerializationTest.java")
9463 #:phases
9464 (modify-phases %standard-phases
9465 (add-before 'configure 'move-version.java
9466 (lambda _
9467 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9468 "mail/src/main/java/javax/mail/Version.java")
9469 #t))
9470 (add-before 'build 'copy-resources
9471 (lambda _
9472 (copy-recursively "mail/src/main/resources/META-INF"
9473 "build/classes/META-INF")
9474 #t)))))
9475 (native-inputs
9476 `(("junit" ,java-junit)
9477 ("hamcrest" ,java-hamcrest-core)))
9478 (home-page "https://javaee.github.io/javamail/")
9479 (synopsis "Mail-related functionnalities in Java")
9480 (description "The JavaMail API provides a platform-independent and
9481 protocol-independent framework to build mail and messaging applications.")
9482 ;; General Public License Version 2 only ("GPL") or the Common Development
9483 ;; and Distribution License("CDDL")
9484 (license (list license:cddl1.1
9485 license:gpl2)))); with classpath exception
9486
9487 (define-public java-jeromq
9488 (package
9489 (name "java-jeromq")
9490 (version "0.4.3")
9491 (source (origin
9492 (method git-fetch)
9493 (uri (git-reference
9494 (url "https://github.com/zeromq/jeromq.git")
9495 (commit (string-append "v" version))))
9496 (file-name (string-append name "-" version "-checkout"))
9497 (sha256
9498 (base32
9499 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9500 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9501 (build-system ant-build-system)
9502 (arguments
9503 `(#:jar-name "java-jeromq.jar"
9504 #:source-dir "src/main/java"
9505 #:jdk ,icedtea-8
9506 #:test-exclude
9507 (list
9508 "**/Abstract*.java"
9509 ;; Requires network
9510 "**/ZBeaconTest.java"
9511 ;; Failures
9512 "**/DealerSpecTest.java"
9513 "**/CustomDecoderTest.java"
9514 "**/CustomEncoderTest.java"
9515 "**/ConnectRidTest.java"
9516 "**/ReqSpecTest.java"
9517 "**/PushPullSpecTest.java"
9518 "**/PubSubHwmTest.java"
9519 "**/RouterSpecTest.java"
9520 "**/ProxyTest.java")))
9521 (inputs
9522 `(("java-jnacl" ,java-jnacl)))
9523 (native-inputs
9524 `(("java-hamcrest-core" ,java-hamcrest-core)
9525 ("junit" ,java-junit)))
9526 (home-page "http://zeromq.org/bindings:java")
9527 (synopsis "Java binding for 0MQ")
9528 (description "Jeromq provides the java bindings for 0MQ.")
9529 (license license:mpl2.0)))
9530
9531 (define-public java-kafka-clients
9532 (package
9533 (name "java-kafka-clients")
9534 (version "1.0.0")
9535 (source (origin
9536 (method url-fetch)
9537 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9538 version "-src.tgz"))
9539 (sha256
9540 (base32
9541 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9542 (build-system ant-build-system)
9543 (arguments
9544 `(#:jar-name "java-kafka-clients.jar"
9545 #:jdk ,icedtea-8
9546 #:source-dir "clients/src/main/java"
9547 #:test-dir "clients/src/test"
9548 #:test-exclude
9549 (list
9550 ;; This file does not contain a class
9551 "**/IntegrationTest.java"
9552 ;; Requires network
9553 "**/ClientUtilsTest.java"
9554 ;; End with errors that seem related to our powermock
9555 "**/KafkaProducerTest.java"
9556 "**/BufferPoolTest.java")))
9557 (inputs
9558 `(("java-slf4j-api" ,java-slf4j-api)
9559 ("java-lz4" ,java-lz4)))
9560 (native-inputs
9561 `(("junit" ,java-junit)
9562 ("hamcrest" ,java-hamcrest-all)
9563 ("objenesis" ,java-objenesis)
9564 ("asm" ,java-asm)
9565 ("cglib" ,java-cglib)
9566 ("javassist" ,java-jboss-javassist)
9567 ("snappy" ,java-snappy)
9568 ("easymock" ,java-easymock)
9569 ("powermock" ,java-powermock-core)
9570 ("powermock-easymock" ,java-powermock-api-easymock)
9571 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9572 ("powermock-junit4" ,java-powermock-modules-junit4)
9573 ("powermock-support" ,java-powermock-api-support)
9574 ("java-bouncycastle" ,java-bouncycastle)))
9575 (home-page "https://kafka.apache.org")
9576 (synopsis "Distributed streaming platform")
9577 (description "Kafka is a distributed streaming platform, which means:
9578 @itemize
9579 @item it can publish and subscribe to streams of records;
9580 @item it can store streams of records in a fault-tolerant way;
9581 @item it can process streams of records as they occur.
9582 @end itemize")
9583 ;; Either cddl or gpl2 only.
9584 (license (list license:cddl1.1; actually cddl1.1
9585 license:gpl2)))); with classpath exception
9586
9587 (define-public java-jdom
9588 (package
9589 (name "java-jdom")
9590 (version "1.1.3")
9591 (source (origin
9592 (method url-fetch)
9593 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9594 version ".tar.gz"))
9595 (sha256
9596 (base32
9597 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9598 (build-system ant-build-system)
9599 (arguments
9600 `(#:build-target "package"
9601 #:tests? #f; tests are run as part of the build process
9602 #:phases
9603 (modify-phases %standard-phases
9604 (replace 'install
9605 (install-jars "build")))))
9606 (home-page "http://jdom.org/")
9607 (synopsis "Access, manipulate, and output XML data")
9608 (description "Java-based solution for accessing, manipulating, and
9609 outputting XML data from Java code.")
9610 (license license:bsd-4)))
9611
9612 (define-public java-geronimo-xbean-reflect
9613 (package
9614 (name "java-geronimo-xbean-reflect")
9615 (version "4.5")
9616 (source (origin
9617 (method svn-fetch)
9618 (uri (svn-reference
9619 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9620 (revision 1807396)))
9621 (file-name (string-append name "-" version))
9622 (sha256
9623 (base32
9624 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9625 (build-system ant-build-system)
9626 (arguments
9627 `(#:jar-name "geronimo-xbean-reflect.jar"
9628 #:source-dir "xbean-reflect/src/main/java"
9629 #:test-dir "xbean-reflect/src/test"
9630 #:jdk ,icedtea-8
9631 #:test-exclude
9632 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9633 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9634 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9635 #:phases
9636 (modify-phases %standard-phases
9637 (add-before 'build 'fix-source
9638 (lambda _
9639 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9640 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9641 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9642 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9643 #t))))))
9644 (inputs
9645 `(("asm" ,java-asm)
9646 ("log4j" ,java-log4j-api)
9647 ("log4j-1.2" ,java-log4j-1.2-api)
9648 ("log4j-core" ,java-log4j-core)
9649 ("logging" ,java-commons-logging-minimal)))
9650 (native-inputs
9651 `(("junit" ,java-junit)))
9652 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9653 (synopsis "Dependency injection helper")
9654 (description "Xbean-reflect provides very flexible ways to create objects
9655 and graphs of objects for dependency injection frameworks")
9656 (license license:asl2.0)))
9657
9658 (define-public java-geronimo-xbean-bundleutils
9659 (package
9660 (inherit java-geronimo-xbean-reflect)
9661 (name "java-geronimo-xbean-bundleutils")
9662 (arguments
9663 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9664 #:source-dir "xbean-bundleutils/src/main/java"
9665 #:test-dir "xbean-bundleutils/src/test"
9666 #:phases
9667 (modify-phases %standard-phases
9668 (add-before 'build 'fix-java
9669 (lambda _
9670 ;; We use a more recent version of osgi, so this file requires
9671 ;; more interface method implementations.
9672 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9673 (("import org.osgi.framework.ServiceRegistration;")
9674 "import org.osgi.framework.ServiceRegistration;
9675 import org.osgi.framework.ServiceFactory;
9676 import java.util.Collection;
9677 import org.osgi.framework.ServiceObjects;")
9678 (("public Bundle getBundle\\(\\)")
9679 "@Override
9680 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9681 throw new UnsupportedOperationException();
9682 }
9683 @Override
9684 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9685 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9686 throw new UnsupportedOperationException();
9687 }
9688 public Bundle getBundle()"))
9689 #t)))))
9690 (inputs
9691 `(("java-slf4j" ,java-slf4j-api)
9692 ("java-asm" ,java-asm)
9693 ("java-osgi-framework" ,java-osgi-framework)
9694 ("java-eclipse-osgi" ,java-eclipse-osgi)
9695 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9696
9697 (define-public java-geronimo-xbean-asm-util
9698 (package
9699 (inherit java-geronimo-xbean-reflect)
9700 (name "java-geronimo-xbean-asm-util")
9701 (arguments
9702 `(#:jar-name "geronimo-xbean-asm-util.jar"
9703 #:source-dir "xbean-asm-util/src/main/java"
9704 #:tests? #f)); no tests
9705 (inputs
9706 `(("java-asm" ,java-asm)))
9707 (native-inputs '())))
9708
9709 (define-public java-geronimo-xbean-finder
9710 (package
9711 (inherit java-geronimo-xbean-reflect)
9712 (name "java-geronimo-xbean-finder")
9713 (arguments
9714 `(#:jar-name "geronimo-xbean-finder.jar"
9715 #:source-dir "xbean-finder/src/main/java"
9716 #:test-dir "xbean-finder/src/test"))
9717 (inputs
9718 `(("java-slf4j-api" ,java-slf4j-api)
9719 ("java-asm" ,java-asm)
9720 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9721 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9722 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9723 ("java-osgi-framework" ,java-osgi-framework)))
9724 (native-inputs
9725 `(("java-junit" ,java-junit)
9726 ("java-hamcrest-core" ,java-hamcrest-core)))))
9727
9728 (define-public java-gson
9729 (package
9730 (name "java-gson")
9731 (version "2.8.2")
9732 (source (origin
9733 (method url-fetch)
9734 (uri (string-append "https://github.com/google/gson/archive/"
9735 "gson-parent-" version ".tar.gz"))
9736 (sha256
9737 (base32
9738 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9739 (build-system ant-build-system)
9740 (arguments
9741 `(#:jar-name "gson.jar"
9742 #:source-dir "gson/src/main/java"
9743 #:test-dir "gson/src/test"))
9744 (native-inputs
9745 `(("java-junit" ,java-junit)
9746 ("java-hamcrest-core" ,java-hamcrest-core)))
9747 (home-page "https://github.com/google/gson")
9748 (synopsis "Java serialization/deserialization library from/to JSON")
9749 (description "Gson is a Java library that can be used to convert Java
9750 Objects into their JSON representation. It can also be used to convert a JSON
9751 string to an equivalent Java object. Gson can work with arbitrary Java objects
9752 including pre-existing objects that you do not have source-code of.")
9753 (license license:asl2.0)))
9754
9755 (define-public java-hawtjni
9756 (package
9757 (name "java-hawtjni")
9758 (version "1.15")
9759 (source (origin
9760 (method url-fetch)
9761 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9762 "hawtjni-project-" version ".tar.gz"))
9763 (sha256
9764 (base32
9765 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9766 (build-system ant-build-system)
9767 (arguments
9768 `(#:jar-name "hawtjni.jar"
9769 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9770 #:tests? #f; no tests
9771 #:phases
9772 (modify-phases %standard-phases
9773 (add-before 'build 'build-native
9774 (lambda* (#:key inputs #:allow-other-keys)
9775 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9776 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9777 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9778 "-fPIC" "-O2" include)
9779 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9780 "-fPIC" "-O2" include)
9781 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9782 "hawtjni.o" "hawtjni-callback.o")))
9783 #t))
9784 (add-after 'install 'install-native
9785 (lambda* (#:key outputs #:allow-other-keys)
9786 (let* ((out (assoc-ref outputs "out"))
9787 (lib (string-append out "/lib"))
9788 (inc (string-append out "/include")))
9789 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9790 (install-file "libhawtjni.so" lib)
9791 (install-file "hawtjni.h" inc)))
9792 #t)))))
9793 (inputs
9794 `(("java-commons-cli" ,java-commons-cli)
9795 ("java-asm" ,java-asm)
9796 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9797 (home-page "https://fusesource.github.io/hawtjni/")
9798 (synopsis "JNI code generator")
9799 (description "HawtJNI is a code generator that produces the JNI code needed
9800 to implement Java native methods. It is based on the jnigen code generator
9801 that is part of the SWT Tools project.")
9802 (license license:asl2.0)))
9803
9804 (define-public java-jansi-native
9805 (package
9806 (name "java-jansi-native")
9807 (version "1.7")
9808 (source (origin
9809 (method url-fetch)
9810 (uri (string-append "https://github.com/fusesource/jansi-native/"
9811 "archive/jansi-native-" version ".tar.gz"))
9812 (sha256
9813 (base32
9814 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9815 (build-system ant-build-system)
9816 (arguments
9817 `(#:jar-name "jansi-native.jar"
9818 #:source-dir "src/main/java"
9819 #:tests? #f; no tests
9820 #:phases
9821 (modify-phases %standard-phases
9822 (add-before 'build 'build-native
9823 (lambda* (#:key inputs #:allow-other-keys)
9824 ;; there are more required files for windows in windows/
9825 (with-directory-excursion "src/main/native-package/src"
9826 (substitute* "jansi_ttyname.c"
9827 (("#include \"jansi_.*") ""))
9828 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9829 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9830 "/include")
9831 (string-append "-I" (assoc-ref inputs "jdk")
9832 "/include/linux")
9833 "-fPIC" "-O2")
9834 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9835 (add-before 'build 'install-native
9836 (lambda _
9837 (let ((dir (string-append "build/classes/META-INF/native/"
9838 ,(match (%current-system)
9839 ((or "i686-linux" "armhf-linux")
9840 "linux32")
9841 ((or "x86_64-linux" "aarch64-linux"
9842 "mips64el-linux")
9843 "linux64")))))
9844 (install-file "src/main/native-package/src/libjansi.so" dir))
9845 #t))
9846 (add-after 'install 'install-native
9847 (lambda* (#:key outputs #:allow-other-keys)
9848 (install-file "src/main/native-package/src/jansi.h"
9849 (string-append (assoc-ref outputs "out") "/include"))
9850 #t)))))
9851 (inputs
9852 `(("java-hawtjni" ,java-hawtjni)))
9853 (home-page "https://fusesource.github.io/jansi/")
9854 (synopsis "Native library for jansi")
9855 (description "This package provides the native library for jansi, a small
9856 Java library that allows you to use ANSI escape sequences to format your
9857 console output.")
9858 (license license:asl2.0)))
9859
9860 (define-public java-jansi
9861 (package
9862 (name "java-jansi")
9863 (version "1.16")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9867 "jansi-project-" version ".tar.gz"))
9868 (sha256
9869 (base32
9870 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9871 (build-system ant-build-system)
9872 (arguments
9873 `(#:jar-name "jansi.jar"
9874 #:source-dir "jansi/src/main/java"
9875 #:test-dir "jansi/src/test"
9876 #:phases
9877 (modify-phases %standard-phases
9878 (add-after 'check 'clear-term
9879 (lambda _
9880 (invoke "echo" "-e" "\\e[0m"))))))
9881 (inputs
9882 `(("java-jansi-native" ,java-jansi-native)))
9883 (native-inputs
9884 `(("java-junit" ,java-junit)
9885 ("java-hamcrest-core" ,java-hamcrest-core)))
9886 (home-page "https://fusesource.github.io/jansi/")
9887 (synopsis "Portable ANSI escape sequences")
9888 (description "Jansi is a Java library that allows you to use ANSI escape
9889 sequences to format your console output which works on every platform.")
9890 (license license:asl2.0)))
9891
9892 (define-public java-jboss-el-api-spec
9893 (package
9894 (name "java-jboss-el-api-spec")
9895 (version "3.0")
9896 (source (origin
9897 (method url-fetch)
9898 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9899 "archive/jboss-el-api_" version
9900 "_spec-1.0.7.Final.tar.gz"))
9901 (sha256
9902 (base32
9903 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9904 (build-system ant-build-system)
9905 (arguments
9906 `(#:jar-name "java-jboss-el-api_spec.jar"
9907 #:jdk ,icedtea-8))
9908 (inputs
9909 `(("java-junit" ,java-junit)))
9910 (home-page "https://github.com/jboss/jboss-el-api_spec")
9911 (synopsis "JSR-341 expression language 3.0 API")
9912 (description "This package contains an implementation of the JSR-341
9913 specification for the expression language 3.0. It implements an expression
9914 language inspired by ECMAScript and XPath. This language is used with
9915 JavaServer Pages (JSP).")
9916 ;; Either GPL2 only or CDDL.
9917 (license (list license:gpl2 license:cddl1.1))))
9918
9919 (define-public java-jboss-interceptors-api-spec
9920 (package
9921 (name "java-jboss-interceptors-api-spec")
9922 (version "1.2")
9923 (source (origin
9924 (method url-fetch)
9925 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9926 "archive/jboss-interceptors-api_" version
9927 "_spec-1.0.0.Final.tar.gz"))
9928 (sha256
9929 (base32
9930 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9931 (build-system ant-build-system)
9932 (arguments
9933 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9934 #:jdk ,icedtea-8
9935 #:source-dir "."
9936 #:tests? #f)); no tests
9937 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9938 (synopsis "Interceptors 1.2 API classes from JSR 318")
9939 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9940 API. Interceptors are used to interpose on business method invocations and
9941 specific events.")
9942 ;; Either GPL2 only or CDDL.
9943 (license (list license:gpl2 license:cddl1.1))))
9944
9945 (define-public java-cdi-api
9946 (package
9947 (name "java-cdi-api")
9948 (version "2.0")
9949 (source (origin
9950 (method url-fetch)
9951 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9952 version ".tar.gz"))
9953 (file-name (string-append name "-" version ".tar.gz"))
9954 (sha256
9955 (base32
9956 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9957 (build-system ant-build-system)
9958 (arguments
9959 `(#:source-dir "api/src/main/java"
9960 #:jar-name "java-cdi-api.jar"
9961 #:test-dir "api/src/test"
9962 #:jdk ,icedtea-8
9963 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9964 (inputs
9965 `(("java-javax-inject" ,java-javax-inject)
9966 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9967 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9968 (native-inputs
9969 `(("java-testng" ,java-testng)
9970 ("java-hamcrest-core" ,java-hamcrest-core)))
9971 (home-page "http://cdi-spec.org/")
9972 (synopsis "Contexts and Dependency Injection APIs")
9973 (description "Java-cdi-api contains the required APIs for Contexts and
9974 Dependency Injection (CDI).")
9975 (license license:asl2.0)))
9976
9977 (define-public java-joda-convert
9978 (package
9979 (name "java-joda-convert")
9980 (version "1.9.2")
9981 (source (origin
9982 (method url-fetch)
9983 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9984 version ".tar.gz"))
9985 (file-name (string-append name "-" version ".tar.gz"))
9986 (sha256
9987 (base32
9988 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9989 (build-system ant-build-system)
9990 (arguments
9991 `(#:jar-name (string-append ,name "-" ,version ".jar")
9992 #:source-dir "src/main/java"
9993 #:test-include (list "**/Test*.java")
9994 ;; Contains only interfaces and base classes (no test)
9995 #:test-exclude (list "**/test*/**.java")))
9996 (inputs
9997 `(("java-guava" ,java-guava)))
9998 (native-inputs
9999 `(("java-junit" ,java-junit)
10000 ("java-hamcrest-core" ,java-hamcrest-core)))
10001 (home-page "http://www.joda.org/joda-convert/")
10002 (synopsis "Conversion between Objects and Strings")
10003 (description "Joda-Convert provides a small set of classes to aid
10004 conversion between Objects and Strings. It is not intended to tackle the
10005 wider problem of Object to Object transformation.")
10006 (license license:asl2.0)))
10007
10008 (define-public java-joda-time
10009 (package
10010 (name "java-joda-time")
10011 (version "2.9.9")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10015 version ".tar.gz"))
10016 (file-name (string-append name "-" version ".tar.gz"))
10017 (sha256
10018 (base32
10019 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10020 (build-system ant-build-system)
10021 (arguments
10022 `(#:jar-name "java-joda-time.jar"
10023 #:source-dir "src/main/java"
10024 #:test-include (list "**/Test*.java")
10025 ;; There is no runnable test in these files
10026 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10027 #:phases
10028 (modify-phases %standard-phases
10029 (add-after 'build 'build-resources
10030 (lambda _
10031 (mkdir-p "build/classes/org/joda/time/tz/data")
10032 (mkdir-p "build/classes/org/joda/time/format")
10033 ;; This will produce the following exception:
10034 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10035 ;; which is normal, because it doesn't exist yet. It still generates
10036 ;; the same file as in the binary one can find on maven.
10037 (invoke "java" "-cp"
10038 (string-append "build/classes:" (getenv "CLASSPATH"))
10039 "org.joda.time.tz.ZoneInfoCompiler"
10040 "-src" "src/main/java/org/joda/time/tz/src"
10041 "-dst" "build/classes/org/joda/time/tz/data"
10042 "africa" "antarctica" "asia" "australasia"
10043 "europe" "northamerica" "southamerica"
10044 "pacificnew" "etcetera" "backward" "systemv")
10045 (for-each (lambda (f)
10046 (copy-file f (string-append
10047 "build/classes/org/joda/time/format/"
10048 (basename f))))
10049 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10050 #t))
10051 (add-before 'install 'regenerate-jar
10052 (lambda _
10053 ;; We need to regenerate the jar file to add generated data.
10054 (delete-file "build/jar/java-joda-time.jar")
10055 (invoke "ant" "jar")))
10056 (add-before 'check 'copy-test-resources
10057 (lambda _
10058 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10059 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10060 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10061 (copy-recursively "src/test/resources" "build/test-classes")
10062 #t)))))
10063 (inputs
10064 `(("java-joda-convert" ,java-joda-convert)))
10065 (native-inputs
10066 `(("java-junit" ,java-junit)
10067 ("java-hamcrest-core" ,java-hamcrest-core)
10068 ("tzdata" ,tzdata)))
10069 (home-page "http://www.joda.org/joda-time/")
10070 (synopsis "Replacement for the Java date and time classes")
10071 (description "Joda-Time is a replacement for the Java date and time
10072 classes prior to Java SE 8.")
10073 (license license:asl2.0)))
10074
10075 (define-public java-xerces
10076 (package
10077 (name "java-xerces")
10078 (version "2.11.0")
10079 (source
10080 (origin
10081 (method url-fetch)
10082 (uri (string-append "mirror://apache/xerces/j/source/"
10083 "Xerces-J-src." version ".tar.gz"))
10084 (sha256
10085 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10086 (patches (search-patches
10087 "java-xerces-xjavac_taskdef.patch"
10088 "java-xerces-build_dont_unzip.patch"
10089 "java-xerces-bootclasspath.patch"))))
10090 (build-system ant-build-system)
10091 (arguments
10092 `(#:tests? #f;; Test files are not present
10093 #:test-target "test"
10094 #:jdk ,icedtea-8
10095 #:phases
10096 (modify-phases %standard-phases
10097 (add-after 'unpack 'create-build.properties
10098 (lambda* (#:key inputs #:allow-other-keys)
10099 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10100 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10101 (with-output-to-file "build.properties"
10102 (lambda _
10103 (format #t
10104 "jar.jaxp = ~a/share/java/jaxp.jar~@
10105 jar.apis-ext = ~a/share/java/jaxp.jar~@
10106 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10107 jaxp jaxp resolver)))
10108 ;; Make xerces use our version of jaxp in tests
10109 (substitute* "build.xml"
10110 (("xml-apis.jar")
10111 (string-append jaxp "/share/java/jaxp.jar"))
10112 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10113 "${jar.apis}")))
10114 #t))
10115 (replace 'install (install-jars "build")))))
10116 (inputs
10117 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10118 ("java-jaxp" ,java-jaxp)))
10119 (home-page "https://xerces.apache.org/xerces2-j/")
10120 (synopsis "Validating XML parser for Java with DOM level 3 support")
10121 (description "The Xerces2 Java parser is the reference implementation of
10122 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10123 processor.
10124
10125 Xerces2-J supports the following standards and APIs:
10126
10127 @itemize
10128 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10129 @item Namespaces in XML Recommendation
10130 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10131 Range Recommendations
10132 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10133 @item Java APIs for XML Processing (JAXP) 1.2.01
10134 @item XML Schema 1.0 Structures and Datatypes Recommendations
10135 @item Experimental implementation of the Document Object Model (DOM) Level 3
10136 Core and Load/Save Working Drafts
10137 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10138 Candidate Recommendation
10139 @end itemize
10140
10141 Xerces is now able to parse documents written according to the XML 1.1
10142 Candidate Recommendation, except that it does not yet provide an option to
10143 enable normalization checking as described in section 2.13 of this
10144 specification. It also handles namespaces according to the XML Namespaces 1.1
10145 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10146 the DOM level 3 load/save API's are in use.")
10147 (license license:asl2.0)))
10148
10149 (define-public java-jakarta-regexp
10150 (package
10151 (name "java-jakarta-regexp")
10152 (version "1.5")
10153 (source
10154 (origin
10155 (method url-fetch)
10156 (uri (string-append
10157 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10158 version ".tar.gz"))
10159 (sha256
10160 (base32
10161 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10162 (build-system ant-build-system)
10163 (arguments
10164 `(#:test-target "test"
10165 #:phases
10166 (modify-phases %standard-phases
10167 (replace 'install
10168 (lambda* (#:key outputs #:allow-other-keys)
10169 (let* ((out (assoc-ref outputs "out"))
10170 (out-share (string-append out "/share/java")))
10171 (mkdir-p out-share)
10172 (for-each (lambda (name)
10173 (install-file name out-share))
10174 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10175 #t))))))
10176 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10177 (synopsis "Regular expression parser generator for Java.")
10178 (description "@code{jakarta-regexp} is an old regular expression parser
10179 generator for Java.")
10180 (license license:asl2.0)))
10181
10182 (define-public java-jline
10183 (package
10184 (name "java-jline")
10185 (version "1.0")
10186 (source (origin
10187 (method url-fetch)
10188 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10189 version ".tar.gz"))
10190 (sha256
10191 (base32
10192 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10193 (build-system ant-build-system)
10194 (arguments
10195 `(#:jar-name "jline.jar"
10196 #:source-dir "src/main/java"
10197 #:test-dir "src/test"
10198 #:phases
10199 (modify-phases %standard-phases
10200 (add-before 'build 'copy-resources
10201 (lambda _
10202 (copy-recursively "src/main/resources" "build/classes")
10203 #t)))))
10204 (native-inputs
10205 `(("java-junit" ,java-junit)))
10206 (home-page "https://jline.github.io")
10207 (synopsis "Console input handling library")
10208 (description "JLine is a Java library for handling console input. It is
10209 similar in functionality to BSD editline and GNU readline but with additional
10210 features that bring it on par with the Z shell line editor.")
10211 (license license:bsd-3)))
10212
10213 (define-public java-jline-2
10214 (package
10215 (inherit java-jline)
10216 (version "2.14.5")
10217 (source (origin
10218 (method url-fetch)
10219 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10220 version ".tar.gz"))
10221 (sha256
10222 (base32
10223 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10224 (arguments
10225 `(#:jdk ,icedtea-8
10226 ,@(package-arguments java-jline)))
10227 (inputs
10228 `(("java-jansi" ,java-jansi)
10229 ("java-jansi-native" ,java-jansi-native)))
10230 (native-inputs
10231 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10232 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10233 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10234 ("java-powermock-api-support" ,java-powermock-api-support)
10235 ("java-powermock-core" ,java-powermock-core)
10236 ("java-powermock-reflect" ,java-powermock-reflect)
10237 ("java-easymock" ,java-easymock)
10238 ("java-jboss-javassist" ,java-jboss-javassist)
10239 ("java-objenesis" ,java-objenesis)
10240 ("java-asm" ,java-asm)
10241 ("java-hamcrest-core" ,java-hamcrest-core)
10242 ("java-cglib" ,java-cglib)
10243 ("java-junit" ,java-junit)
10244 ("java-hawtjni" ,java-hawtjni)))))
10245
10246 (define-public java-xmlunit
10247 (package
10248 (name "java-xmlunit")
10249 (version "2.5.1")
10250 (source (origin
10251 (method url-fetch)
10252 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10253 version ".tar.gz"))
10254 (file-name (string-append name "-" version ".tar.gz"))
10255 (sha256
10256 (base32
10257 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10258 (build-system ant-build-system)
10259 (arguments
10260 `(#:jar-name "java-xmlunit.jar"
10261 #:source-dir "xmlunit-core/src/main/java"
10262 #:test-dir "xmlunit-core/src/test"
10263 #:phases
10264 (modify-phases %standard-phases
10265 (add-before 'check 'copy-test-resources
10266 (lambda* (#:key inputs #:allow-other-keys)
10267 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10268 #t)))))
10269 (native-inputs
10270 `(("java-junit" ,java-junit)
10271 ("java-mockito-1" ,java-mockito-1)
10272 ("java-hamcrest-all" ,java-hamcrest-all)
10273 ("java-objenesis" ,java-objenesis)
10274 ("java-asm" ,java-asm)
10275 ("java-cglib" ,java-cglib)
10276 ("resources"
10277 ,(origin
10278 (method git-fetch)
10279 (uri (git-reference
10280 (url "https://github.com/xmlunit/test-resources.git")
10281 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10282 (file-name "java-xmlunit-test-resources")
10283 (sha256
10284 (base32
10285 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10286 (home-page "http://www.xmlunit.org/")
10287 (synopsis "XML output testing")
10288 (description "XMLUnit provides you with the tools to verify the XML you
10289 emit is the one you want to create. It provides helpers to validate against
10290 an XML Schema, assert the values of XPath queries or compare XML documents
10291 against expected outcomes.")
10292 (license license:asl2.0)))
10293
10294 (define-public java-xmlunit-legacy
10295 (package
10296 (inherit java-xmlunit)
10297 (name "java-xmlunit-legacy")
10298 (arguments
10299 `(#:jar-name "java-xmlunit-legacy.jar"
10300 #:source-dir "xmlunit-legacy/src/main/java"
10301 #:test-dir "xmlunit-legacy/src/test"))
10302 (inputs
10303 `(("java-xmlunit" ,java-xmlunit)
10304 ("java-junit" ,java-junit)))
10305 (native-inputs
10306 `(("java-mockito-1" ,java-mockito-1)))))
10307
10308 (define-public java-xmlunit-matchers
10309 (package
10310 (inherit java-xmlunit)
10311 (name "java-xmlunit-matchers")
10312 (arguments
10313 `(#:jar-name "java-xmlunit-matchers.jar"
10314 #:source-dir "xmlunit-matchers/src/main/java"
10315 #:test-dir "xmlunit-matchers/src/test"
10316 #:test-exclude
10317 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10318 (list "**/ValidationMatcherTest.java")
10319 #:phases
10320 (modify-phases %standard-phases
10321 (add-before 'build 'copy-test-class
10322 (lambda _
10323 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10324 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10325 #t))
10326 (add-before 'build 'fix-test-resources-path
10327 (lambda _
10328 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10329 (("../test-resources") "test-resources"))
10330 #t))
10331 (add-before 'check 'copy-test-resources
10332 (lambda* (#:key inputs #:allow-other-keys)
10333 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10334 #t)))))
10335 (inputs
10336 `(("java-xmlunit" ,java-xmlunit)
10337 ("java-junit" ,java-junit)))))
10338
10339 (define-public java-openchart2
10340 (package
10341 (name "java-openchart2")
10342 (version "1.4.3")
10343 (source (origin
10344 (method url-fetch)
10345 (uri (string-append "http://download.approximatrix.com/openchart2/"
10346 "openchart2-" version ".source.zip"))
10347 (sha256
10348 (base32
10349 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10350 (build-system ant-build-system)
10351 (arguments
10352 `(#:test-target "test"
10353 #:phases
10354 (modify-phases %standard-phases
10355 (add-after 'unpack 'fix-junit-errors
10356 (lambda _
10357 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10358 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10359 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10360 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10361 "model/DefaultChartDataModelConstraintsTest.java"
10362 "model/MultiScatterDataModelConstraintsTest.java"
10363 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10364 (("(assertEquals[^;]+);" before _)
10365 (string-append (string-drop-right before 2) ", 1E-6);"))))
10366 #t))
10367 (replace 'install (install-jars ".")))))
10368 (native-inputs
10369 `(("unzip" ,unzip)
10370 ("java-junit" ,java-junit)
10371 ("java-hamcrest-core" ,java-hamcrest-core)))
10372 (home-page "http://approximatrix.com/products/openchart2/")
10373 (synopsis "Simple plotting for Java")
10374 (description "Openchart2 provides a simple, yet powerful, interface for
10375 Java programmers to create two-dimensional charts and plots. The library
10376 features an assortment of graph styles, including advanced scatter plots, bar
10377 graphs, and pie charts.")
10378 (license license:lgpl2.1+)))
10379
10380 (define-public java-commons-httpclient
10381 (package
10382 (name "java-commons-httpclient")
10383 (version "3.1")
10384 (source (origin
10385 (method url-fetch)
10386 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10387 "commons-httpclient/source/commons-httpclient-"
10388 version "-src.tar.gz"))
10389 (sha256
10390 (base32
10391 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10392 (build-system ant-build-system)
10393 (arguments
10394 `(#:build-target "compile"
10395 #:test-target "test"
10396 #:tests? #f; requires junit-textui (junit 3)
10397 #:phases
10398 (modify-phases %standard-phases
10399 (add-before 'build 'fix-accent
10400 (lambda _
10401 (for-each (lambda (file)
10402 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10403 (substitute* file
10404 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10405 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10406 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10407 "src/test/org/apache/commons/httpclient/TestHttps.java"
10408 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10409 #t))
10410 (replace 'install
10411 (lambda* (#:key outputs #:allow-other-keys)
10412 (invoke "ant" "dist"
10413 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10414 "/share/java"))
10415 #t)))))
10416 (propagated-inputs
10417 `(("java-commons-logging" ,java-commons-logging-minimal)
10418 ("java-commons-codec" ,java-commons-codec)))
10419 (home-page "https://hc.apache.org")
10420 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10421 (description "This package contains an HTTP/1.1 compliant HTTP agent
10422 implementation. It also provides reusable components for client-side
10423 authentication, HTTP state management, and HTTP connection management.")
10424 (license license:asl2.0)))
10425
10426 (define-public java-commons-vfs
10427 (package
10428 (name "java-commons-vfs")
10429 (version "2.2")
10430 (source (origin
10431 (method url-fetch)
10432 (uri (string-append "mirror://apache/commons/vfs/source/"
10433 "commons-vfs2-distribution-" version "-src.tar.gz"))
10434 (file-name (string-append name "-" version ".tar.gz"))
10435 (sha256
10436 (base32
10437 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10438 (modules '((guix build utils)))
10439 (snippet
10440 '(begin
10441 (for-each delete-file
10442 (find-files "." "\\.jar$"))
10443 #t))))
10444 (build-system ant-build-system)
10445 (arguments
10446 `(#:jar-name "commons-vfs.jar"
10447 #:source-dir "commons-vfs2/src/main/java"
10448 #:test-dir "commons-vfs2/src/test"
10449 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10450 #:tests? #f
10451 #:phases
10452 (modify-phases %standard-phases
10453 (add-before 'build 'remove-hadoop-and-webdav
10454 ; Remove these files as they are not required and depend on difficult
10455 ; packages.
10456 (lambda _
10457 (for-each delete-file-recursively
10458 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10459 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10460 #t)))))
10461 (inputs
10462 `(("java-commons-collections4" ,java-commons-collections4)
10463 ("java-commons-compress" ,java-commons-compress)
10464 ("java-commons-httpclient" ,java-commons-httpclient)
10465 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10466 ("java-commons-net" ,java-commons-net)
10467 ("java-jsch" ,java-jsch)))
10468 (home-page "http://commons.apache.org/proper/commons-vfs/")
10469 (synopsis "Java file system library")
10470 (description "Commons VFS provides a single API for accessing various
10471 different file systems. It presents a uniform view of the files from various
10472 different sources, such as the files on local disk, on an HTTP server, or
10473 inside a Zip archive.")
10474 (license license:asl2.0)))
10475
10476 (define-public java-jakarta-oro
10477 (package
10478 (name "java-jakarta-oro")
10479 (version "2.0.8")
10480 (source (origin
10481 (method url-fetch)
10482 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10483 "jakarta-oro-" version ".tar.gz"))
10484 (sha256
10485 (base32
10486 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10487 (modules '((guix build utils)))
10488 (snippet
10489 `(begin
10490 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10491 #t))))
10492 (build-system ant-build-system)
10493 (arguments
10494 `(#:build-target "package"
10495 #:tests? #f; tests are run as part of the build process
10496 #:phases
10497 (modify-phases %standard-phases
10498 (replace 'install
10499 (install-jars ,(string-append "jakarta-oro-" version))))))
10500 (home-page "https://jakarta.apache.org/oro/")
10501 (synopsis "Text-processing for Java")
10502 (description "The Jakarta-ORO Java classes are a set of text-processing
10503 Java classes that provide Perl5 compatible regular expressions, AWK-like
10504 regular expressions, glob expressions, and utility classes for performing
10505 substitutions, splits, filtering filenames, etc. This library is the successor
10506 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10507 from ORO, Inc.")
10508 (license license:asl1.1)))
10509
10510 (define-public java-native-access
10511 (package
10512 (name "java-native-access")
10513 (version "4.5.1")
10514 (source (origin
10515 (method url-fetch)
10516 (uri (string-append "https://github.com/java-native-access/jna/"
10517 "archive/" version ".tar.gz"))
10518 (file-name (string-append name "-" version ".tar.gz"))
10519 (sha256
10520 (base32
10521 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10522 (modules '((guix build utils)))
10523 (snippet
10524 `(begin
10525 (for-each delete-file (find-files "." ".*.jar"))
10526 (delete-file-recursively "native/libffi")
10527 (delete-file-recursively "dist")
10528 #t))))
10529 (build-system ant-build-system)
10530 (arguments
10531 `(#:tests? #f; FIXME: tests require reflections.jar
10532 #:test-target "test"
10533 #:make-flags (list "-Ddynlink.native=true")
10534 #:phases
10535 (modify-phases %standard-phases
10536 (add-before 'build 'fix-build.xml
10537 (lambda* (#:key inputs #:allow-other-keys)
10538 (substitute* "build.xml"
10539 ;; Since we removed the bundled ant.jar, give the correct path
10540 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10541 ;; We removed generated native libraries. We can only rebuild one
10542 ;; so don't fail if we can't find a native library for another architecture.
10543 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10544 ;; Copy test dependencies
10545 (copy-file (string-append (assoc-ref inputs "java-junit")
10546 "/share/java/junit.jar")
10547 "lib/junit.jar")
10548 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10549 "/share/java/hamcrest-core.jar")
10550 "lib/hamcrest-core.jar")
10551 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10552 #t))
10553 (add-before 'build 'build-native
10554 (lambda _
10555 (invoke "ant" "-Ddynlink.native=true" "native")
10556 #t))
10557 (replace 'install
10558 (install-jars "build")))))
10559 (inputs
10560 `(("libffi" ,libffi)
10561 ("libx11" ,libx11)
10562 ("libxt" ,libxt)))
10563 (native-inputs
10564 `(("java-junit" ,java-junit)
10565 ("java-hamcrest-core" ,java-hamcrest-core)))
10566 (home-page "https://github.com/java-native-access/jna")
10567 (synopsis "Access to native shared libraries from Java")
10568 (description "JNA provides Java programs easy access to native shared
10569 libraries without writing anything but Java code - no JNI or native code is
10570 required. JNA allows you to call directly into native functions using natural
10571 Java method invocation.")
10572 ;; Java Native Access project (JNA) is dual-licensed under 2
10573 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10574 (license (list
10575 license:asl2.0
10576 license:lgpl2.1+))))
10577
10578 (define-public java-native-access-platform
10579 (package
10580 (inherit java-native-access)
10581 (name "java-native-access-platform")
10582 (arguments
10583 `(#:test-target "test"
10584 #:tests? #f; require jna-test.jar
10585 #:phases
10586 (modify-phases %standard-phases
10587 (add-before 'build 'chdir
10588 (lambda _
10589 (chdir "contrib/platform")
10590 #t))
10591 (add-after 'chdir 'fix-ant
10592 (lambda* (#:key inputs #:allow-other-keys)
10593 (substitute* "nbproject/project.properties"
10594 (("../../build/jna.jar")
10595 (string-append (assoc-ref inputs "java-native-access")
10596 "/share/java/jna.jar"))
10597 (("../../lib/hamcrest-core-.*.jar")
10598 (string-append (assoc-ref inputs "java-hamcrest-core")
10599 "/share/java/hamcrest-core.jar"))
10600 (("../../lib/junit.jar")
10601 (string-append (assoc-ref inputs "java-junit")
10602 "/share/java/junit.jar")))
10603 #t))
10604 (replace 'install
10605 (install-jars "dist")))))
10606 (inputs
10607 `(("java-native-access" ,java-native-access)))
10608 (synopsis "Cross-platform mappings for jna")
10609 (description "java-native-access-platfrom has cross-platform mappings
10610 and mappings for a number of commonly used platform functions, including a
10611 large number of Win32 mappings as well as a set of utility classes that
10612 simplify native access.")))
10613
10614 (define-public java-jsch-agentproxy-core
10615 (package
10616 (name "java-jsch-agentproxy-core")
10617 (version "0.0.8")
10618 (source (origin
10619 (method url-fetch)
10620 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10621 version ".tar.gz"))
10622 (file-name (string-append name "-" version ".tar.gz"))
10623 (sha256
10624 (base32
10625 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10626 (build-system ant-build-system)
10627 (arguments
10628 `(#:jar-name "jsch-agentproxy-core.jar"
10629 #:source-dir "jsch-agent-proxy-core/src/main/java"
10630 #:tests? #f)); no tests
10631 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10632 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10633 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10634 and Pageant included Putty. It will be easily integrated into JSch, and users
10635 will be allowed to use these programs for authentication.")
10636 (license license:bsd-3)))
10637
10638 (define-public java-jsch-agentproxy-sshagent
10639 (package
10640 (inherit java-jsch-agentproxy-core)
10641 (name "java-jsch-agentproxy-sshagent")
10642 (arguments
10643 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10644 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10645 #:tests? #f)); no tests
10646 (inputs
10647 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10648 (synopsis "Proxy to ssh-agent")
10649 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10650 and Pageant included in Putty. This component contains the code for a proxy to
10651 ssh-agent.")))
10652
10653 (define-public java-jsch-agentproxy-usocket-jna
10654 (package
10655 (inherit java-jsch-agentproxy-core)
10656 (name "java-jsch-agentproxy-usocket-jna")
10657 (arguments
10658 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10659 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10660 #:tests? #f)); no tests
10661 (inputs
10662 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10663 ("java-native-access" ,java-native-access)))
10664 (synopsis "USocketFactory implementation using JNA")
10665 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10666 and Pageant included in Putty. This component contains an implementation of
10667 USocketFactory using @dfn{JNA} (Java Native Access).")))
10668
10669 (define-public java-jsch-agentproxy-pageant
10670 (package
10671 (inherit java-jsch-agentproxy-core)
10672 (name "java-jsch-agentproxy-pageant")
10673 (arguments
10674 `(#:jar-name "jsch-agentproxy-pageant.jar"
10675 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10676 #:tests? #f)); no tests
10677 (inputs
10678 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10679 ("java-native-access" ,java-native-access)
10680 ("java-native-access-platform" ,java-native-access-platform)))
10681 (synopsis "Proxy to pageant")
10682 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10683 and Pageant included in Putty. This component contains the code for a proxy to
10684 pageant.")))
10685
10686 (define-public java-jsch-agentproxy-usocket-nc
10687 (package
10688 (inherit java-jsch-agentproxy-core)
10689 (name "java-jsch-agentproxy-usocket-nc")
10690 (arguments
10691 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10692 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10693 #:tests? #f)); no tests
10694 (inputs
10695 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10696 (synopsis "USocketFactory implementation using netcat")
10697 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10698 and Pageant included in Putty. This component contains an implementation of
10699 USocketFactory using netcat.")))
10700
10701 (define-public java-jsch-agentproxy-connector-factory
10702 (package
10703 (inherit java-jsch-agentproxy-core)
10704 (name "java-jsch-agentproxy-connector-factory")
10705 (arguments
10706 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10707 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10708 #:tests? #f)); no tests
10709 (inputs
10710 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10711 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10712 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10713 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10714 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10715 (synopsis "Connector factory for jsch agent proxy")
10716 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10717 and Pageant included in Putty. This component contains a connector factory.")))
10718
10719 (define-public java-jsch-agentproxy-jsch
10720 (package
10721 (inherit java-jsch-agentproxy-core)
10722 (name "java-jsch-agentproxy-jsch")
10723 (arguments
10724 `(#:jar-name "jsch-agentproxy-jsch.jar"
10725 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10726 #:tests? #f)); no tests
10727 (inputs
10728 `(("java-jsch" ,java-jsch)
10729 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10730 (synopsis "JSch integration library for agentproxy")
10731 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10732 and Pageant included in Putty. This component contains a library to use
10733 jsch-agent-proxy with JSch.")))
10734
10735 (define-public java-apache-ivy
10736 (package
10737 (name "java-apache-ivy")
10738 (version "2.4.0")
10739 (source (origin
10740 (method url-fetch)
10741 (uri (string-append "mirror://apache//ant/ivy/" version
10742 "/apache-ivy-" version "-src.tar.gz"))
10743 (sha256
10744 (base32
10745 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10746 (patches
10747 (search-patches
10748 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10749 (build-system ant-build-system)
10750 (arguments
10751 `(#:jar-name "ivy.jar"
10752 #:tests? #f
10753 #:phases
10754 (modify-phases %standard-phases
10755 (add-before 'build 'remove-example
10756 (lambda _
10757 (delete-file-recursively "src/example")
10758 #t))
10759 (add-before 'build 'copy-resources
10760 (lambda _
10761 (with-directory-excursion "src/java"
10762 (for-each (lambda (file)
10763 (install-file file (string-append "../../build/classes/" (dirname file))))
10764 (append
10765 (find-files "." ".*.css")
10766 (find-files "." ".*.ent")
10767 (find-files "." ".*.html")
10768 (find-files "." ".*.properties")
10769 (find-files "." ".*.xsd")
10770 (find-files "." ".*.xsl")
10771 (find-files "." ".*.xml"))))
10772 #t))
10773 (add-before 'build 'fix-vfs
10774 (lambda _
10775 (substitute*
10776 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10777 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10778 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10779 #t))
10780 (add-before 'install 'copy-manifest
10781 (lambda _
10782 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10783 #t))
10784 (add-before 'install 'repack
10785 (lambda _
10786 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10787 "-C" "build/classes" ".")))
10788 (add-after 'install 'install-bin
10789 (lambda* (#:key outputs #:allow-other-keys)
10790 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10791 (ivy (string-append bin "/ivy"))
10792 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10793 (mkdir-p bin)
10794 (with-output-to-file ivy
10795 (lambda _
10796 (display (string-append
10797 "#!" (which "sh") "\n"
10798 "if [[ -z $CLASSPATH ]]; then\n"
10799 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10800 "else\n"
10801 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10802 "fi\n"
10803 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10804 (chmod ivy #o755)
10805 #t))))))
10806 (inputs
10807 `(("java-bouncycastle" ,java-bouncycastle)
10808 ("java-commons-cli" ,java-commons-cli)
10809 ("java-commons-collections" ,java-commons-collections)
10810 ("java-commons-httpclient" ,java-commons-httpclient)
10811 ("java-commons-lang" ,java-commons-lang)
10812 ("java-commons-vfs" ,java-commons-vfs)
10813 ("java-jakarta-oro" ,java-jakarta-oro)
10814 ("java-jsch" ,java-jsch)
10815 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10816 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10817 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10818 ("java-junit" ,java-junit)))
10819 (home-page "https://ant.apache.org/ivy")
10820 (synopsis "Dependency manager for the Java programming language")
10821 (description "Ivy is a tool for managing (recording, tracking, resolving
10822 and reporting) project dependencies. It is characterized by the following:
10823
10824 @itemize
10825 @item flexibility and configurability - Ivy is essentially process agnostic
10826 and is not tied to any methodology or structure. Instead it provides the
10827 necessary flexibility and configurability to be adapted to a broad range
10828 of dependency management and build processes.
10829 @item tight integration with Apache Ant - while available as a standalone tool,
10830 Ivy works particularly well with Apache Ant providing a number of
10831 powerful Ant tasks ranging from dependency resolution to dependency
10832 reporting and publication.
10833 @end itemize")
10834 (license license:asl2.0)))
10835
10836 (define-public java-eclipse-sisu-inject
10837 (package
10838 (name "java-eclipse-sisu-inject")
10839 (version "0.3.3")
10840 (source (origin
10841 (method git-fetch)
10842 (uri (git-reference
10843 (url "https://github.com/eclipse/sisu.inject/")
10844 (commit "releases/0.3.3")))
10845 (file-name (git-file-name name version))
10846 (sha256
10847 (base32
10848 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10849 (build-system ant-build-system)
10850 (arguments
10851 `(#:jar-name "eclipse-sisu-inject.jar"
10852 #:source-dir "org.eclipse.sisu.inject/src"
10853 #:jdk ,icedtea-8
10854 #:tests? #f)); no tests
10855 (inputs
10856 `(("java-guice" ,java-guice)
10857 ("java-guice-servlet" ,java-guice-servlet)
10858 ("java-javax-inject" ,java-javax-inject)
10859 ("java-javaee-servletapi" ,java-javaee-servletapi)
10860 ("java-junit" ,java-junit)
10861 ("java-slf4j-api" ,java-slf4j-api)
10862 ("java-jsr305" ,java-jsr305)
10863 ("java-jsr250" ,java-jsr250)
10864 ("java-cdi-api" ,java-cdi-api)
10865 ("java-osgi-framework" ,java-osgi-framework)
10866 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10867 ("java-testng" ,java-testng)))
10868 (home-page "https://www.eclipse.org/sisu/")
10869 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10870 (description "Sisu is a modular JSR330-based container that supports
10871 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10872 Google-Guice to perform dependency injection and provide the core JSR330
10873 support, but removes the need to write explicit bindings in Guice modules.
10874 Integration with other containers via the Eclipse Extension Registry and the
10875 OSGi Service Registry is a goal of this project.")
10876 (license license:epl1.0)))
10877
10878 (define-public java-eclipse-sisu-plexus
10879 (package
10880 (name "java-eclipse-sisu-plexus")
10881 (version "0.3.3")
10882 (source (origin
10883 (method url-fetch)
10884 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10885 "archive/releases/" version ".tar.gz"))
10886 (sha256
10887 (base32
10888 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10889 (modules '((guix build utils)))
10890 (snippet
10891 '(begin
10892 (for-each delete-file (find-files "." ".*.jar"))
10893 (rename-file "org.eclipse.sisu.plexus.tests/src"
10894 "org.eclipse.sisu.plexus.tests/java")
10895 #t))))
10896 (build-system ant-build-system)
10897 (arguments
10898 `(#:jar-name "eclipse-sisu-plexus.jar"
10899 #:source-dir "org.eclipse.sisu.plexus/src"
10900 #:test-dir "org.eclipse.sisu.plexus.tests"
10901 #:test-exclude
10902 (list
10903 ;; This test fails probably because we can't generate the necessary
10904 ;; meta-inf files.
10905 "**/PlexusLoggingTest.*"
10906 ;; FIXME: This test fails because of some injection error
10907 "**/PlexusRequirementTest.*")
10908 #:jdk ,icedtea-8
10909 #:phases
10910 (modify-phases %standard-phases
10911 (add-before 'build 'copy-resources
10912 (lambda _
10913 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10914 "build/classes/META-INF/plexus")
10915 #t))
10916 (add-before 'check 'build-test-jar
10917 (lambda _
10918 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10919 (mkdir "build")
10920 (with-directory-excursion "java"
10921 (apply invoke "javac" "-cp"
10922 (string-append (getenv "CLASSPATH")
10923 ":../../../../../build/classes")
10924 (find-files "." ".*.java"))
10925 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10926 (find-files "." ".*.jar")))
10927 (mkdir-p "build/META-INF/plexus")
10928 (copy-file "resources/META-INF/plexus/components.xml"
10929 "build/META-INF/plexus/components.xml")
10930 (with-directory-excursion "build"
10931 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10932 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10933 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10934 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10935 (("resources/component-jar")
10936 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10937 #t)))))
10938 (inputs
10939 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10940 ("java-plexus-util" ,java-plexus-utils)
10941 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10942 ("java-osgi-framework" ,java-osgi-framework)
10943 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10944 ("java-guice" ,java-guice)
10945 ("java-javax-inject" ,java-javax-inject)
10946 ("java-slf4j-api" ,java-slf4j-api)
10947 ("java-junit" ,java-junit)))
10948 (native-inputs
10949 `(("java-guava" ,java-guava)
10950 ("java-aopalliance" ,java-aopalliance)
10951 ("java-cglib" ,java-cglib)
10952 ("java-asm" ,java-asm)))
10953 (home-page "https://www.eclipse.org/sisu/")
10954 (synopsis "Plexus support for the sisu container")
10955 (description "Sisu is a modular JSR330-based container that supports
10956 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10957 adds Plexus support to the Sisu-Inject container.")
10958 (license license:epl1.0)))
10959
10960 (define-public java-commons-compiler
10961 (package
10962 (name "java-commons-compiler")
10963 (version "3.0.8")
10964 (source (origin
10965 (method git-fetch)
10966 (uri (git-reference
10967 (url "https://github.com/janino-compiler/janino")
10968 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10969 (file-name (string-append name "-" version))
10970 (sha256
10971 (base32
10972 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10973 (modules '((guix build utils)))
10974 (snippet
10975 '(begin
10976 (for-each delete-file
10977 (find-files "." "\\.jar$"))
10978 #t))))
10979 (build-system ant-build-system)
10980 (arguments
10981 `(#:jar-name "commons-compiler.jar"
10982 #:source-dir "commons-compiler/src/main"
10983 #:tests? #f)); no tests
10984 (home-page "https://github.com/janino-compiler/janino")
10985 (synopsis "Java compiler")
10986 (description "Commons-compiler contains an API for janino, including the
10987 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10988 and @code{ISimpleCompiler} interfaces.")
10989 (license license:bsd-3)))
10990
10991 (define-public java-janino
10992 (package
10993 (inherit java-commons-compiler)
10994 (name "java-janino")
10995 (arguments
10996 `(#:jar-name "janino.jar"
10997 #:source-dir "src/main/java"
10998 #:phases
10999 (modify-phases %standard-phases
11000 (add-before 'configure 'chdir
11001 (lambda _
11002 (chdir "janino")
11003 #t)))))
11004 (inputs
11005 `(("java-commons-compiler" ,java-commons-compiler)))
11006 (native-inputs
11007 `(("java-junit" ,java-junit)
11008 ("java-hamcrest-core" ,java-hamcrest-core)))
11009 (description "Janino is a Java compiler. Janino can compile a set of
11010 source files to a set of class files like @code{javac}, but also compile a
11011 Java expression, block, class body or source file in memory, load the bytecode
11012 and execute it directly in the same JVM. @code{janino} can also be used for
11013 static code analysis or code manipulation.")))
11014
11015 (define-public java-logback-core
11016 (package
11017 (name "java-logback-core")
11018 (version "1.2.3")
11019 (source (origin
11020 (method url-fetch)
11021 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11022 version ".tar.gz"))
11023 (file-name (string-append name "-" version ".tar.gz"))
11024 (sha256
11025 (base32
11026 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11027 (modules '((guix build utils)))
11028 (snippet
11029 '(begin
11030 (delete-file-recursively "logback-access/lib")
11031 #t))))
11032 (build-system ant-build-system)
11033 (arguments
11034 `(#:jar-name "logback.jar"
11035 #:source-dir "src/main/java"
11036 #:test-dir "src/test"
11037 #:test-exclude
11038 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11039 ;; which creates FastClasses
11040 (list "**/AllCoreTest.*"
11041 "**/AutoFlushingObjectWriterTest.*"
11042 "**/PackageTest.*"
11043 "**/ResilientOutputStreamTest.*"
11044 ;; And we still don't want to run abstract classes
11045 "**/Abstract*.*")
11046 #:phases
11047 (modify-phases %standard-phases
11048 (add-before 'configure 'chdir
11049 (lambda _
11050 (chdir "logback-core")
11051 #t)))))
11052 (inputs
11053 `(("java-javax-mail" ,java-javax-mail)
11054 ("servlet" ,java-javaee-servletapi)
11055 ("java-commons-compiler" ,java-commons-compiler)
11056 ("java-janino" ,java-janino)))
11057 (native-inputs
11058 `(("java-junit" ,java-junit)
11059 ("java-hamcrest-core" ,java-hamcrest-core)
11060 ("java-mockito-1" ,java-mockito-1)
11061 ("java-cglib" ,java-cglib)
11062 ("java-asm" ,java-asm)
11063 ("java-objenesis" ,java-objenesis)
11064 ("java-joda-time" ,java-joda-time)))
11065 (home-page "https://logback.qos.ch")
11066 (synopsis "Logging for java")
11067 (description "Logback is intended as a successor to the popular log4j project.
11068 This module lays the groundwork for the other two modules.")
11069 ;; Either epl1.0 or lgpl2.1
11070 (license (list license:epl1.0
11071 license:lgpl2.1))))
11072
11073 (define-public java-logback-classic
11074 (package
11075 (inherit java-logback-core)
11076 (name "java-logback-classic")
11077 (arguments
11078 `(#:jar-name "logback-classic.jar"
11079 #:source-dir "src/main/java"
11080 #:test-dir "src/test"
11081 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11082 #:jdk ,icedtea-8
11083 #:phases
11084 (modify-phases %standard-phases
11085 (add-before 'configure 'chdir
11086 (lambda _
11087 (chdir "logback-classic")
11088 #t))
11089 (replace 'build
11090 (lambda* (#:key inputs #:allow-other-keys)
11091 (mkdir-p "build/classes")
11092 (setenv "CLASSPATH"
11093 (string-join
11094 (apply append (map (lambda (input)
11095 (find-files (assoc-ref inputs input)
11096 ".*.jar"))
11097 '("java-logback-core" "java-slf4j-api"
11098 "java-commons-compiler" "servlet"
11099 "groovy")))
11100 ":"))
11101 (apply invoke "groovyc" "-d" "build/classes" "-j"
11102 (find-files "src/main/" ".*\\.(groovy|java)$"))
11103 (invoke "ant" "jar")
11104 #t)))))
11105 (inputs
11106 `(("java-logback-core" ,java-logback-core)
11107 ("java-slf4j-api" ,java-slf4j-api)
11108 ,@(package-inputs java-logback-core)))
11109 (native-inputs
11110 `(("groovy" ,groovy)))
11111 (description "Logback is intended as a successor to the popular log4j project.
11112 This module can be assimilated to a significantly improved version of log4j.
11113 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11114 can readily switch back and forth between logback and other logging frameworks
11115 such as log4j or @code{java.util.logging} (JUL).")))
11116
11117 (define-public java-qdox
11118 (package
11119 (name "java-qdox")
11120 ; Newer version exists, but this version is required by java-plexus-component-metadata
11121 (version "2.0-M2")
11122 (source (origin
11123 (method url-fetch)
11124 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11125 ;; Older releases at https://github.com/codehaus/qdox/
11126 ;; Note: The release at maven is pre-generated. The release at
11127 ;; github requires jflex.
11128 (uri (string-append "http://central.maven.org/maven2/"
11129 "com/thoughtworks/qdox/qdox/" version
11130 "/qdox-" version "-sources.jar"))
11131 (sha256
11132 (base32
11133 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11134 (build-system ant-build-system)
11135 (arguments
11136 `(#:jar-name "qdox.jar"
11137 #:tests? #f)); no tests
11138 (home-page "http://qdox.codehaus.org/")
11139 (synopsis "Parse definitions from Java source files")
11140 (description "QDox is a high speed, small footprint parser for extracting
11141 class/interface/method definitions from source files complete with JavaDoc
11142 @code{@@tags}. It is designed to be used by active code generators or
11143 documentation tools.")
11144 (license license:asl2.0)))
11145
11146 (define-public java-jgit
11147 (package
11148 (name "java-jgit")
11149 (version "4.7.0.201704051617-r")
11150 (source (origin
11151 (method url-fetch)
11152 (uri (string-append "https://repo1.maven.org/maven2/"
11153 "org/eclipse/jgit/org.eclipse.jgit/"
11154 version "/org.eclipse.jgit-"
11155 version "-sources.jar"))
11156 (sha256
11157 (base32
11158 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11159 (build-system ant-build-system)
11160 (arguments
11161 `(#:tests? #f ; There are no tests to run.
11162 #:jar-name "jgit.jar"
11163 ;; JGit must be built with a JDK supporting Java 8.
11164 #:jdk ,icedtea-8
11165 ;; Target our older default JDK.
11166 #:make-flags (list "-Dtarget=1.7")
11167 #:phases
11168 (modify-phases %standard-phases
11169 ;; The jar file generated by the default build.xml does not include
11170 ;; the text properties files, so we need to add them.
11171 (add-after 'build 'add-properties
11172 (lambda* (#:key jar-name #:allow-other-keys)
11173 (with-directory-excursion "src"
11174 (apply invoke "jar" "-uf"
11175 (string-append "../build/jar/" jar-name)
11176 (find-files "." "\\.properties$")))
11177 #t)))))
11178 (inputs
11179 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11180 ("java-javaewah" ,java-javaewah)
11181 ("java-jsch" ,java-jsch)
11182 ("java-slf4j-api" ,java-slf4j-api)))
11183 (home-page "https://eclipse.org/jgit/")
11184 (synopsis "Java library implementing the Git version control system")
11185 (description "JGit is a lightweight, pure Java library implementing the
11186 Git version control system, providing repository access routines, support for
11187 network protocols, and core version control algorithms.")
11188 (license license:edl1.0)))
11189
11190 ;; For axoloti. This package can still be built with icedtea-7, which is
11191 ;; currently used as the default JDK.
11192 (define-public java-jgit-4.2
11193 (package (inherit java-jgit)
11194 (version "4.2.0.201601211800-r")
11195 (source (origin
11196 (method url-fetch)
11197 (uri (string-append "https://repo1.maven.org/maven2/"
11198 "org/eclipse/jgit/org.eclipse.jgit/"
11199 version "/org.eclipse.jgit-"
11200 version "-sources.jar"))
11201 (sha256
11202 (base32
11203 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11204 (build-system ant-build-system)
11205 (arguments
11206 (substitute-keyword-arguments (package-arguments java-jgit)
11207 ;; Build for default JDK.
11208 ((#:jdk _) icedtea-7)
11209 ((#:phases phases)
11210 `(modify-phases ,phases
11211 (add-after 'unpack 'use-latest-javaewah-API
11212 (lambda _
11213 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11214 (("wordinbits") "WORD_IN_BITS"))
11215 #t))))))
11216 (inputs
11217 `(("java-javaewah" ,java-javaewah)
11218 ("java-jsch" ,java-jsch)
11219 ("java-slf4j-api" ,java-slf4j-api)))))
11220
11221 (define-public abcl
11222 (package
11223 (name "abcl")
11224 (version "1.5.0")
11225 (source
11226 (origin
11227 (method url-fetch)
11228 (uri (string-append "https://abcl.org/releases/"
11229 version "/abcl-src-" version ".tar.gz"))
11230 (sha256
11231 (base32
11232 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11233 (patches
11234 (search-patches
11235 "abcl-fix-build-xml.patch"))))
11236 (build-system ant-build-system)
11237 (native-inputs
11238 `(("java-junit" ,java-junit)))
11239 (arguments
11240 `(#:build-target "abcl.jar"
11241 #:test-target "abcl.test"
11242 #:phases
11243 (modify-phases %standard-phases
11244 (replace 'install
11245 (lambda* (#:key outputs #:allow-other-keys)
11246 (let ((share (string-append (assoc-ref outputs "out")
11247 "/share/java/"))
11248 (bin (string-append (assoc-ref outputs "out")
11249 "/bin/")))
11250 (mkdir-p share)
11251 (install-file "dist/abcl.jar" share)
11252 (install-file "dist/abcl-contrib.jar" share)
11253 (mkdir-p bin)
11254 (with-output-to-file (string-append bin "abcl")
11255 (lambda _
11256 (let ((classpath (string-append
11257 share "abcl.jar"
11258 ":"
11259 share "abcl-contrib.jar")))
11260 (display (string-append
11261 "#!" (which "sh") "\n"
11262 "if [[ -z $CLASSPATH ]]; then\n"
11263 " cp=\"" classpath "\"\n"
11264 "else\n"
11265 " cp=\"" classpath ":$CLASSPATH\"\n"
11266 "fi\n"
11267 "exec " (which "java")
11268 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11269 (chmod (string-append bin "abcl") #o755)
11270 #t))))))
11271 (home-page "https://abcl.org/")
11272 (synopsis "Common Lisp Implementation on the JVM")
11273 (description
11274 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11275 Lisp language featuring both an interpreter and a compiler, running in the
11276 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11277 in any Java application. Additionally, it can be used to implement (parts of)
11278 the application using Java to Lisp integration APIs.")
11279 (license (list license:gpl2+
11280 ;; named-readtables is released under 3 clause BSD
11281 license:bsd-3
11282 ;; jfli is released under CPL 1.0
11283 license:cpl1.0))))