gnu: Add java-svg-salamander.
[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, 2019 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, 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages java-compression)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages nss)
67 #:use-module (gnu packages onc-rpc)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages wget)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages texinfo)
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
80
81 \f
82 ;;;
83 ;;; Java bootstrap toolchain.
84 ;;;
85
86 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
87 ;; use it to build a simple version of GNU Classpath, the Java standard
88 ;; library. We chose version 0.93 because it is the last version that can be
89 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
90 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91 ;; the last version of JamVM that works with a version of GNU classpath that
92 ;; does not require ECJ. These three packages make up the bootstrap JDK.
93
94 ;; This is sufficient to build an older version of Ant, which is needed to
95 ;; build an older version of ECJ, an incremental Java compiler, both of which
96 ;; are written in Java.
97 ;;
98 ;; ECJ is needed to build the latest release (0.99) and the development
99 ;; version of GNU Classpath. The development version of GNU Classpath has
100 ;; much more support for Java 1.6 than the latest release, but we need to
101 ;; build 0.99 first to get a working version of javah. ECJ, the development
102 ;; version of GNU Classpath, and the latest version of JamVM make up the
103 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
105 ;; Icedtea 3.x.
106
107 (define jikes
108 (package
109 (name "jikes")
110 (version "1.22")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
115 (sha256
116 (base32
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122 defined in The Java Language Specification into the bytecoded instruction set
123 and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
125
126 ;; This is the last version of GNU Classpath that can be built without ECJ.
127 (define classpath-bootstrap
128 (package
129 (name "classpath")
130 (version "0.93")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append "mirror://gnu/classpath/classpath-"
134 version ".tar.gz"))
135 (sha256
136 (base32
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
139 (build-system gnu-build-system)
140 (arguments
141 `(#:configure-flags
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
144 "/bin/jikes")
145 "--disable-Werror"
146 "--disable-gmp"
147 "--disable-gtk-peer"
148 "--disable-gconf-peer"
149 "--disable-plugin"
150 "--disable-dssi"
151 "--disable-alsa"
152 "--disable-gjdoc")
153 #:phases
154 (modify-phases %standard-phases
155 ;; XXX: This introduces a memory leak as we remove a call to free up
156 ;; memory for the file name string. This was necessary because of a
157 ;; runtime error that would have prevented us from building
158 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
159 ;; for the gnarly details.
160 (add-after 'unpack 'remove-call-to-free
161 (lambda _
162 (substitute* "native/jni/java-io/java_io_VMFile.c"
163 (("result = cpio_isFileExists.*" m)
164 (string-append m "\n//")))
165 #t))
166 (add-after 'install 'install-data
167 (lambda _ (invoke "make" "install-data"))))))
168 (native-inputs
169 `(("jikes" ,jikes)
170 ("fastjar" ,fastjar)
171 ("libltdl" ,libltdl)
172 ("pkg-config" ,pkg-config)))
173 (home-page "https://www.gnu.org/software/classpath/")
174 (synopsis "Essential libraries for Java")
175 (description "GNU Classpath is a project to create core class libraries
176 for use with runtimes, compilers and tools for the Java programming
177 language.")
178 ;; GPLv2 or later, with special linking exception.
179 (license license:gpl2+)))
180
181 ;; This is the last version of JamVM that works with a version of GNU
182 ;; classpath that does not require ECJ.
183 (define jamvm-1-bootstrap
184 (package
185 (name "jamvm")
186 (version "1.5.1")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
190 "JamVM%20" version "/jamvm-"
191 version ".tar.gz"))
192 (patches (search-patches "jamvm-arm.patch"))
193 (sha256
194 (base32
195 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
196 (build-system gnu-build-system)
197 (arguments
198 `(#:configure-flags
199 (list (string-append "--with-classpath-install-dir="
200 (assoc-ref %build-inputs "classpath"))
201 "--disable-int-caching"
202 "--enable-runtime-reloc-checks"
203 "--enable-ffi")))
204 (inputs
205 `(("classpath" ,classpath-bootstrap)
206 ("jikes" ,jikes)
207 ("libffi" ,libffi)
208 ("zlib" ,zlib)))
209 ;; When built with a recent GCC and glibc the configure step of icedtea-6
210 ;; fails with an invalid instruction error.
211 (native-inputs
212 `(("gcc" ,gcc-5)
213 ("libc" ,glibc-2.28)))
214 (home-page "http://jamvm.sourceforge.net/")
215 (synopsis "Small Java Virtual Machine")
216 (description "JamVM is a Java Virtual Machine conforming to the JVM
217 specification edition 2 (blue book). It is extremely small. However, unlike
218 other small VMs it supports the full spec, including object finalisation and
219 JNI.")
220 (license license:gpl2+)))
221
222 (define ant-bootstrap
223 (package
224 (name "ant-bootstrap")
225 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
226 ;; are not supported. The 1.8.x series is the last to use only features
227 ;; supported by Jikes.
228 (version "1.8.4")
229 (source (origin
230 (method url-fetch)
231 (uri (string-append "http://archive.apache.org/dist/"
232 "ant/source/apache-ant-"
233 version "-src.tar.bz2"))
234 (sha256
235 (base32
236 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
237 (build-system gnu-build-system)
238 (arguments
239 `(#:imported-modules ((guix build syscalls)
240 ,@%gnu-build-system-modules)
241 #:modules ((srfi srfi-1)
242 (guix build gnu-build-system)
243 (guix build utils)
244 (guix build syscalls))
245 #:tests? #f ; no "check" target
246 #:phases
247 (modify-phases %standard-phases
248 (delete 'bootstrap)
249 (delete 'configure)
250 (replace 'build
251 (lambda* (#:key inputs #:allow-other-keys)
252 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
253 (setenv "JAVACMD"
254 (string-append (assoc-ref inputs "jamvm")
255 "/bin/jamvm"))
256 (setenv "JAVAC"
257 (string-append (assoc-ref inputs "jikes")
258 "/bin/jikes"))
259 (setenv "CLASSPATH"
260 (string-append (assoc-ref inputs "jamvm")
261 "/lib/rt.jar"))
262
263 ;; Ant complains if this file doesn't exist.
264 (setenv "HOME" "/tmp")
265 (with-output-to-file "/tmp/.ant.properties"
266 (lambda _ (display "")))
267
268 ;; Use jikes instead of javac for <javac ...> tags in build.xml
269 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
270
271 ;; jikes produces lots of warnings, but they are not very
272 ;; interesting, so we silence them.
273 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
274
275 ;; Without these JamVM options the build may freeze.
276 (substitute* "bootstrap.sh"
277 (("^\"\\$\\{JAVACMD\\}\" " m)
278 ,@(if (string-prefix? "armhf" (or (%current-system)
279 (%current-target-system)))
280 `((string-append m "-Xnocompact "))
281 `((string-append m "-Xnocompact -Xnoinlining ")))))
282
283 ;; Disable tests because we are bootstrapping and thus don't have
284 ;; any of the dependencies required to build and run the tests.
285 (substitute* "build.xml"
286 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
287 (invoke "bash" "bootstrap.sh"
288 (string-append "-Ddist.dir="
289 (assoc-ref %outputs "out")))))
290 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
291 (lambda* (#:key outputs #:allow-other-keys)
292 (define (repack-archive jar)
293 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
294 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
295 (with-directory-excursion dir
296 (invoke "unzip" jar))
297 (delete-file jar)
298 ;; XXX: copied from (gnu build install)
299 (for-each (lambda (file)
300 (let ((s (lstat file)))
301 (unless (eq? (stat:type s) 'symlink)
302 (utime file 0 0 0 0))))
303 (find-files dir #:directories? #t))
304 ;; It is important that the manifest appears first.
305 (with-directory-excursion dir
306 (let* ((files (find-files "." ".*" #:directories? #t))
307 ;; To ensure that the reference scanner can
308 ;; detect all store references in the jars
309 ;; we disable compression with the "-0" option.
310 (command (if (file-exists? manifest)
311 `("zip" "-0" "-X" ,jar ,manifest
312 ,@files)
313 `("zip" "-0" "-X" ,jar ,@files))))
314 (apply invoke command)))))
315 (for-each repack-archive
316 (find-files
317 (string-append (assoc-ref %outputs "out") "/lib")
318 "\\.jar$"))
319 #t))
320 (delete 'install))))
321 (native-inputs
322 `(("jikes" ,jikes)
323 ("jamvm" ,jamvm-1-bootstrap)
324 ("unzip" ,unzip)
325 ("zip" ,zip)))
326 (home-page "http://ant.apache.org")
327 (synopsis "Build tool for Java")
328 (description
329 "Ant is a platform-independent build tool for Java. It is similar to
330 make but is implemented using the Java language, requires the Java platform,
331 and is best suited to building Java projects. Ant uses XML to describe the
332 build process and its dependencies, whereas Make uses Makefile format.")
333 (license license:asl2.0)))
334
335 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
336 ;; compiler for Java 1.5.
337 (define ecj-bootstrap
338 (package
339 (name "ecj-bootstrap")
340 (version "3.2.2")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "http://archive.eclipse.org/eclipse/"
344 "downloads/drops/R-" version
345 "-200702121330/ecjsrc.zip"))
346 (sha256
347 (base32
348 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
349 ;; It would be so much easier if we could use the ant-build-system, but we
350 ;; cannot as we don't have ant at this point. We use ecj for
351 ;; bootstrapping the JDK.
352 (build-system gnu-build-system)
353 (arguments
354 `(#:modules ((guix build gnu-build-system)
355 (guix build utils)
356 (srfi srfi-1))
357 #:tests? #f ; there are no tests
358 #:phases
359 (modify-phases %standard-phases
360 (replace 'configure
361 (lambda* (#:key inputs #:allow-other-keys)
362 (setenv "CLASSPATH"
363 (string-join
364 (cons (string-append (assoc-ref inputs "jamvm")
365 "/lib/rt.jar")
366 (find-files (string-append
367 (assoc-ref inputs "ant-bootstrap")
368 "/lib")
369 "\\.jar$"))
370 ":"))
371 #t))
372 (replace 'build
373 (lambda* (#:key inputs #:allow-other-keys)
374 ;; The unpack phase enters the "org" directory by mistake.
375 (chdir "..")
376
377 ;; Create a simple manifest to make ecj executable.
378 (with-output-to-file "manifest"
379 (lambda _
380 (display "Manifest-Version: 1.0
381 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
382
383 ;; Compile it all!
384 (and (apply invoke "jikes"
385 (find-files "." "\\.java$"))
386 (invoke "fastjar" "cvfm"
387 "ecj-bootstrap.jar" "manifest" "."))))
388 (replace 'install
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((share (string-append (assoc-ref outputs "out")
391 "/share/java/")))
392 (mkdir-p share)
393 (install-file "ecj-bootstrap.jar" share)
394 #t))))))
395 (native-inputs
396 `(("ant-bootstrap" ,ant-bootstrap)
397 ("unzip" ,unzip)
398 ("jikes" ,jikes)
399 ("jamvm" ,jamvm-1-bootstrap)
400 ("fastjar" ,fastjar)))
401 (home-page "https://eclipse.org")
402 (synopsis "Eclipse Java development tools core batch compiler")
403 (description "This package provides the Eclipse Java core batch compiler
404 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
405 requirement for all GNU Classpath releases after version 0.93.")
406 (license license:epl1.0)))
407
408 (define ecj-javac-wrapper
409 (package (inherit ecj-bootstrap)
410 (name "ecj-javac-wrapper")
411 (source #f)
412 (build-system trivial-build-system)
413 (arguments
414 `(#:modules ((guix build utils))
415 #:builder
416 (begin
417 (use-modules (guix build utils))
418 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
419 (target (string-append bin "/javac"))
420 (guile (string-append (assoc-ref %build-inputs "guile")
421 "/bin/guile"))
422 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
423 "/share/java/ecj-bootstrap.jar"))
424 (java (string-append (assoc-ref %build-inputs "jamvm")
425 "/bin/jamvm"))
426 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
427 "/share/classpath")))
428 (string-append jvmlib "/glibj.zip:"
429 jvmlib "/tools.zip"))))
430 (mkdir-p bin)
431 (with-output-to-file target
432 (lambda _
433 (format #t "#!~a --no-auto-compile\n!#\n" guile)
434 (write
435 `(begin (use-modules (ice-9 match)
436 (ice-9 receive)
437 (ice-9 hash-table)
438 (srfi srfi-1)
439 (srfi srfi-26))
440 (define defaults
441 '(("-bootclasspath" ,bootcp)
442 ("-source" "1.5")
443 ("-target" "1.5")
444 ("-cp" ".")))
445 (define (main args)
446 (let ((classpath (getenv "CLASSPATH")))
447 (setenv "CLASSPATH"
448 (string-join (list ,ecj
449 ,(string-append (assoc-ref %build-inputs "jamvm")
450 "/lib/rt.jar")
451 (or classpath ""))
452 ":")))
453 (receive (vm-args other-args)
454 ;; Separate VM arguments from arguments to ECJ.
455 (partition (cut string-prefix? "-J" <>)
456 (fold (lambda (default acc)
457 (if (member (first default) acc)
458 acc (append default acc)))
459 args defaults))
460 (apply system* ,java
461 (append
462 ;; Remove "-J" prefix
463 (map (cut string-drop <> 2) vm-args)
464 '("org.eclipse.jdt.internal.compiler.batch.Main")
465 (cons "-nowarn" other-args)))))
466 ;; Entry point
467 (let ((args (cdr (command-line))))
468 (if (null? args)
469 (format (current-error-port) "javac: no arguments given!\n")
470 (main args)))))))
471 (chmod target #o755)
472 #t))))
473 (native-inputs
474 `(("guile" ,guile-2.2)
475 ("ecj-bootstrap" ,ecj-bootstrap)
476 ("jamvm" ,jamvm-1-bootstrap)
477 ("classpath" ,classpath-bootstrap)))
478 (description "This package provides a wrapper around the @dfn{Eclipse
479 compiler for Java} (ecj) with a command line interface that is compatible with
480 the standard javac executable.")))
481
482 ;; The classpath-bootstrap was built without a virtual machine, so it does not
483 ;; provide a wrapper for javah. We cannot build the development version of
484 ;; Classpath without javah.
485 (define classpath-0.99
486 (package (inherit classpath-bootstrap)
487 (version "0.99")
488 (source (origin
489 (method url-fetch)
490 (uri (string-append "mirror://gnu/classpath/classpath-"
491 version ".tar.gz"))
492 (sha256
493 (base32
494 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
495 (patches (search-patches "classpath-aarch64-support.patch"))))
496 (arguments
497 `(#:configure-flags
498 (list (string-append "--with-ecj-jar="
499 (assoc-ref %build-inputs "ecj-bootstrap")
500 "/share/java/ecj-bootstrap.jar")
501 (string-append "JAVAC="
502 (assoc-ref %build-inputs "ecj-javac-wrapper")
503 "/bin/javac")
504 (string-append "JAVA="
505 (assoc-ref %build-inputs "jamvm")
506 "/bin/jamvm")
507 "GCJ_JAVAC_TRUE=no"
508 "ac_cv_prog_java_works=yes" ; trust me
509 "--disable-Werror"
510 "--disable-gmp"
511 "--disable-gtk-peer"
512 "--disable-gconf-peer"
513 "--disable-plugin"
514 "--disable-dssi"
515 "--disable-alsa"
516 "--disable-gjdoc")
517 #:phases
518 (modify-phases %standard-phases
519 (add-after 'install 'install-data
520 (lambda _ (invoke "make" "install-data"))))))
521 (native-inputs
522 `(("ecj-bootstrap" ,ecj-bootstrap)
523 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
524 ("fastjar" ,fastjar)
525 ("jamvm" ,jamvm-1-bootstrap)
526 ("classpath" ,classpath-bootstrap)
527 ("libltdl" ,libltdl)
528 ("pkg-config" ,pkg-config)))))
529
530 ;; We need this because classpath-bootstrap does not provide all of the tools
531 ;; we need to build classpath-devel.
532 (define classpath-jamvm-wrappers
533 (package (inherit classpath-0.99)
534 (name "classpath-jamvm-wrappers")
535 (source #f)
536 (build-system trivial-build-system)
537 (arguments
538 `(#:modules ((guix build utils))
539 #:builder
540 (begin
541 (use-modules (guix build utils))
542 (let* ((bash (assoc-ref %build-inputs "bash"))
543 (jamvm (assoc-ref %build-inputs "jamvm"))
544 (classpath (assoc-ref %build-inputs "classpath"))
545 (bin (string-append (assoc-ref %outputs "out")
546 "/bin/")))
547 (mkdir-p bin)
548 (for-each (lambda (tool)
549 (with-output-to-file (string-append bin tool)
550 (lambda _
551 ,@(if (string-prefix? "armhf" (or (%current-system)
552 (%current-target-system)))
553 `((format #t "#!~a/bin/sh
554 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
555 gnu.classpath.tools.~a.~a $@"
556 bash jamvm classpath tool
557 (if (string=? "native2ascii" tool)
558 "Native2ASCII" "Main")))
559 `((format #t "#!~a/bin/sh
560 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
561 gnu.classpath.tools.~a.~a $@"
562 bash jamvm classpath tool
563 (if (string=? "native2ascii" tool)
564 "Native2ASCII" "Main"))))))
565 (chmod (string-append bin tool) #o755))
566 (list "javah"
567 "rmic"
568 "rmid"
569 "orbd"
570 "rmiregistry"
571 "native2ascii"))
572 #t))))
573 (native-inputs
574 `(("bash" ,bash)
575 ("jamvm" ,jamvm-1-bootstrap)
576 ("classpath" ,classpath-0.99)))
577 (inputs '())
578 (synopsis "Executables from GNU Classpath")
579 (description "This package provides wrappers around the tools provided by
580 the GNU Classpath library. They are executed by the JamVM virtual
581 machine.")))
582
583 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
584 ;; then Classpath has gained much more support for Java 1.6.
585 (define-public classpath-devel
586 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
587 (revision "1"))
588 (package (inherit classpath-bootstrap)
589 (version (string-append "0.99-" revision "." (string-take commit 9)))
590 (source (origin
591 (method git-fetch)
592 (uri (git-reference
593 (url "https://git.savannah.gnu.org/git/classpath.git")
594 (commit commit)))
595 (file-name (string-append "classpath-" version "-checkout"))
596 (sha256
597 (base32
598 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
599 (arguments
600 `(#:make-flags
601 ;; Ensure that the initial heap size is smaller than the maximum
602 ;; size. By default only Xmx is set, which can lead to invalid
603 ;; memory settings on some machines with a lot of memory.
604 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
605 #:configure-flags
606 (list (string-append "--with-ecj-jar="
607 (assoc-ref %build-inputs "ecj-bootstrap")
608 "/share/java/ecj-bootstrap.jar")
609 (string-append "--with-javac="
610 (assoc-ref %build-inputs "ecj-javac-wrapper")
611 "/bin/javac")
612 (string-append "JAVA="
613 (assoc-ref %build-inputs "jamvm")
614 "/bin/jamvm")
615 "GCJ_JAVAC_TRUE=no"
616 "ac_cv_prog_java_works=yes" ; trust me
617 "--disable-Werror"
618 "--disable-gmp"
619 "--disable-gtk-peer"
620 "--disable-gconf-peer"
621 "--disable-plugin"
622 "--disable-dssi"
623 "--disable-alsa"
624 "--disable-gjdoc")
625 #:phases
626 (modify-phases %standard-phases
627 ;; XXX The bootstrap phase executes autogen.sh, which fails after
628 ;; complaining about the lack of gettext.
629 (replace 'bootstrap
630 (lambda _ (invoke "autoreconf" "-vif")))
631 (add-after 'unpack 'remove-unsupported-annotations
632 (lambda _
633 (substitute* (find-files "java" "\\.java$")
634 (("@Override") ""))
635 #t))
636 (add-after 'install 'install-data
637 (lambda _ (invoke "make" "install-data"))))))
638 (native-inputs
639 `(("autoconf" ,autoconf)
640 ("automake" ,automake)
641 ("libtool" ,libtool)
642 ("gettext" ,gettext-minimal)
643 ("texinfo" ,texinfo)
644 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
645 ("ecj-bootstrap" ,ecj-bootstrap)
646 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
647 ("fastjar" ,fastjar)
648 ("jamvm" ,jamvm-1-bootstrap)
649 ("libltdl" ,libltdl)
650 ("pkg-config" ,pkg-config))))))
651
652 (define jamvm
653 (package (inherit jamvm-1-bootstrap)
654 (version "2.0.0")
655 (source (origin
656 (method url-fetch)
657 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
658 "JamVM%20" version "/jamvm-"
659 version ".tar.gz"))
660 (sha256
661 (base32
662 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
663 (build-system gnu-build-system)
664 (arguments
665 `(#:configure-flags
666 (list (string-append "--with-classpath-install-dir="
667 (assoc-ref %build-inputs "classpath")))))
668 (inputs
669 `(("classpath" ,classpath-devel)
670 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
671 ("zlib" ,zlib)))))
672
673 (define ecj-javac-wrapper-final
674 (package (inherit ecj-javac-wrapper)
675 (native-inputs
676 `(("guile" ,guile-2.2)
677 ("ecj-bootstrap" ,ecj-bootstrap)
678 ("jamvm" ,jamvm)
679 ("classpath" ,classpath-devel)))))
680
681 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
682 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
683 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
684 ;; which uses Java 6 only.
685 (define-public icedtea-6
686 (package
687 (name "icedtea")
688 (version "1.13.13")
689 (source (origin
690 (method url-fetch)
691 (uri (string-append
692 "http://icedtea.wildebeest.org/download/source/icedtea6-"
693 version ".tar.xz"))
694 (sha256
695 (base32
696 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
697 (modules '((guix build utils)))
698 (snippet
699 '(begin
700 (substitute* "Makefile.in"
701 ;; do not leak information about the build host
702 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
703 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
704 #t))))
705 (build-system gnu-build-system)
706 (outputs '("out" ; Java Runtime Environment
707 "jdk" ; Java Development Kit
708 "doc")) ; all documentation
709 (arguments
710 `(;; There are many failing tests and many are known to fail upstream.
711 #:tests? #f
712
713 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
714 ;; gremlin) doesn't support it yet, so skip this phase.
715 #:validate-runpath? #f
716
717 #:modules ((guix build utils)
718 (guix build gnu-build-system)
719 (srfi srfi-19))
720
721 #:configure-flags
722 `("--enable-bootstrap"
723 "--enable-nss"
724 "--without-rhino"
725 "--with-parallel-jobs"
726 "--disable-downloading"
727 "--disable-tests"
728 ,(string-append "--with-ecj="
729 (assoc-ref %build-inputs "ecj")
730 "/share/java/ecj-bootstrap.jar")
731 ,(string-append "--with-jar="
732 (assoc-ref %build-inputs "fastjar")
733 "/bin/fastjar")
734 ,(string-append "--with-jdk-home="
735 (assoc-ref %build-inputs "classpath"))
736 ,(string-append "--with-java="
737 (assoc-ref %build-inputs "jamvm")
738 "/bin/jamvm"))
739 #:phases
740 (modify-phases %standard-phases
741 (replace 'unpack
742 (lambda* (#:key source inputs #:allow-other-keys)
743 (invoke "tar" "xvf" source)
744 (chdir (string-append "icedtea6-" ,version))
745 (mkdir "openjdk")
746 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
747 ;; The convenient OpenJDK source bundle is no longer
748 ;; available for download, so we have to take the sources
749 ;; from the Mercurial repositories and change the Makefile
750 ;; to avoid tests for the OpenJDK zip archive.
751 (with-directory-excursion "openjdk"
752 (for-each (lambda (part)
753 (mkdir part)
754 (copy-recursively
755 (assoc-ref inputs
756 (string-append part "-src"))
757 part))
758 '("jdk" "corba"
759 "langtools" "jaxp" "jaxws")))
760 (with-directory-excursion "openjdk"
761 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
762 (rename-file "hg-checkout" "hotspot"))
763 (substitute* "patches/freetypeversion.patch"
764 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
765 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
766 (substitute* "Makefile.in"
767 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
768 "echo \"trust me\";")
769 ;; The contents of the bootstrap directory must be
770 ;; writeable but when copying from the store they are
771 ;; not.
772 (("mkdir -p lib/rt" line)
773 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
774 (invoke "chmod" "-R" "u+w" "openjdk")))
775 (add-after 'unpack 'use-classpath
776 (lambda* (#:key inputs #:allow-other-keys)
777 (let ((jvmlib (assoc-ref inputs "classpath"))
778 (jamvm (assoc-ref inputs "jamvm")))
779 ;; Classpath does not provide rt.jar.
780 (substitute* "Makefile.in"
781 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
782 (string-append jvmlib "/share/classpath/glibj.zip")))
783 ;; Make sure we can find all classes.
784 (setenv "CLASSPATH"
785 (string-append jvmlib "/share/classpath/glibj.zip:"
786 jvmlib "/share/classpath/tools.zip:"
787 jamvm "/lib/rt.jar"))
788 (setenv "JAVACFLAGS"
789 (string-append "-cp "
790 jvmlib "/share/classpath/glibj.zip:"
791 jvmlib "/share/classpath/tools.zip")))
792 #t))
793 (add-after 'unpack 'patch-patches
794 (lambda _
795 ;; shebang in patches so that they apply cleanly
796 (substitute* '("patches/jtreg-jrunscript.patch"
797 "patches/hotspot/hs23/drop_unlicensed_test.patch")
798 (("#!/bin/sh") (string-append "#!" (which "sh"))))
799 #t))
800 (add-after 'unpack 'patch-paths
801 (lambda* (#:key inputs #:allow-other-keys)
802 ;; buildtree.make generates shell scripts, so we need to replace
803 ;; the generated shebang
804 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
805 (("/bin/sh") (which "bash")))
806
807 (let ((corebin (string-append
808 (assoc-ref inputs "coreutils") "/bin/"))
809 (binbin (string-append
810 (assoc-ref inputs "binutils") "/bin/"))
811 (grepbin (string-append
812 (assoc-ref inputs "grep") "/bin/")))
813 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
814 "openjdk/corba/make/common/shared/Defs-linux.gmk")
815 (("UNIXCOMMAND_PATH = /bin/")
816 (string-append "UNIXCOMMAND_PATH = " corebin))
817 (("USRBIN_PATH = /usr/bin/")
818 (string-append "USRBIN_PATH = " corebin))
819 (("DEVTOOLS_PATH *= */usr/bin/")
820 (string-append "DEVTOOLS_PATH = " corebin))
821 (("COMPILER_PATH *= */usr/bin/")
822 (string-append "COMPILER_PATH = "
823 (assoc-ref inputs "gcc") "/bin/"))
824 (("DEF_OBJCOPY *=.*objcopy")
825 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
826
827 ;; fix path to alsa header
828 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
829 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
830 (string-append "ALSA_INCLUDE="
831 (assoc-ref inputs "alsa-lib")
832 "/include/alsa/version.h")))
833
834 ;; fix hard-coded utility paths
835 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
836 "openjdk/corba/make/common/shared/Defs-utils.gmk")
837 (("ECHO *=.*echo")
838 (string-append "ECHO = " (which "echo")))
839 (("^GREP *=.*grep")
840 (string-append "GREP = " (which "grep")))
841 (("EGREP *=.*egrep")
842 (string-append "EGREP = " (which "egrep")))
843 (("CPIO *=.*cpio")
844 (string-append "CPIO = " (which "cpio")))
845 (("READELF *=.*readelf")
846 (string-append "READELF = " (which "readelf")))
847 (("^ *AR *=.*ar")
848 (string-append "AR = " (which "ar")))
849 (("^ *TAR *=.*tar")
850 (string-append "TAR = " (which "tar")))
851 (("AS *=.*as")
852 (string-append "AS = " (which "as")))
853 (("LD *=.*ld")
854 (string-append "LD = " (which "ld")))
855 (("STRIP *=.*strip")
856 (string-append "STRIP = " (which "strip")))
857 (("NM *=.*nm")
858 (string-append "NM = " (which "nm")))
859 (("^SH *=.*sh")
860 (string-append "SH = " (which "bash")))
861 (("^FIND *=.*find")
862 (string-append "FIND = " (which "find")))
863 (("LDD *=.*ldd")
864 (string-append "LDD = " (which "ldd")))
865 (("NAWK *=.*(n|g)awk")
866 (string-append "NAWK = " (which "gawk")))
867 (("XARGS *=.*xargs")
868 (string-append "XARGS = " (which "xargs")))
869 (("UNZIP *=.*unzip")
870 (string-append "UNZIP = " (which "unzip")))
871 (("ZIPEXE *=.*zip")
872 (string-append "ZIPEXE = " (which "zip")))
873 (("SED *=.*sed")
874 (string-append "SED = " (which "sed"))))
875
876 ;; Some of these timestamps cause problems as they are more than
877 ;; 10 years ago, failing the build process.
878 (substitute*
879 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
880 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
881 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
882 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
883 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
884 #t)))
885 (add-before 'configure 'set-additional-paths
886 (lambda* (#:key inputs #:allow-other-keys)
887 (setenv "CPATH"
888 (string-append (assoc-ref inputs "libxrender")
889 "/include/X11/extensions" ":"
890 (assoc-ref inputs "libxtst")
891 "/include/X11/extensions" ":"
892 (assoc-ref inputs "libxinerama")
893 "/include/X11/extensions" ":"
894 (or (getenv "CPATH") "")))
895 (setenv "ALT_CUPS_HEADERS_PATH"
896 (string-append (assoc-ref inputs "cups")
897 "/include"))
898 (setenv "ALT_FREETYPE_HEADERS_PATH"
899 (string-append (assoc-ref inputs "freetype")
900 "/include"))
901 (setenv "ALT_FREETYPE_LIB_PATH"
902 (string-append (assoc-ref inputs "freetype")
903 "/lib"))
904 #t))
905 (add-before 'build 'disable-os-version-check
906 ;; allow build on linux major version change
907 (lambda _
908 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
909 #t))
910 (replace 'install
911 (lambda* (#:key outputs #:allow-other-keys)
912 (let ((doc (string-append (assoc-ref outputs "doc")
913 "/share/doc/icedtea"))
914 (jre (assoc-ref outputs "out"))
915 (jdk (assoc-ref outputs "jdk")))
916 (copy-recursively "openjdk.build/docs" doc)
917 (copy-recursively "openjdk.build/j2re-image" jre)
918 (copy-recursively "openjdk.build/j2sdk-image" jdk))
919 #t)))))
920 (native-inputs
921 `(("ant" ,ant-bootstrap)
922 ("alsa-lib" ,alsa-lib)
923 ("attr" ,attr)
924 ("classpath" ,classpath-devel)
925 ("coreutils" ,coreutils)
926 ("cpio" ,cpio)
927 ("cups" ,cups)
928 ("ecj" ,ecj-bootstrap)
929 ("ecj-javac" ,ecj-javac-wrapper-final)
930 ("fastjar" ,fastjar)
931 ("fontconfig" ,fontconfig)
932 ("freetype" ,freetype)
933 ("gtk" ,gtk+-2)
934 ("gawk" ,gawk)
935 ("giflib" ,giflib)
936 ("grep" ,grep)
937 ("jamvm" ,jamvm)
938 ("lcms" ,lcms)
939 ("libjpeg" ,libjpeg)
940 ("libnsl" ,libnsl)
941 ("libpng" ,libpng)
942 ("libtool" ,libtool)
943 ("libx11" ,libx11)
944 ("libxcomposite" ,libxcomposite)
945 ("libxi" ,libxi)
946 ("libxinerama" ,libxinerama)
947 ("libxrender" ,libxrender)
948 ("libxslt" ,libxslt) ;for xsltproc
949 ("libxt" ,libxt)
950 ("libxtst" ,libxtst)
951 ("mit-krb5" ,mit-krb5)
952 ("nss" ,nss)
953 ("nss-certs" ,nss-certs)
954 ("perl" ,perl)
955 ("pkg-config" ,pkg-config)
956 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
957 ("unzip" ,unzip)
958 ("wget" ,wget)
959 ("which" ,which)
960 ("zip" ,zip)
961 ("zlib" ,zlib)
962 ("openjdk-src"
963 ,(origin
964 (method hg-fetch)
965 (uri (hg-reference
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
967 (changeset "jdk6-b41")))
968 (sha256
969 (base32
970 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
971 ("jdk-src"
972 ,(origin
973 (method hg-fetch)
974 (uri (hg-reference
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
976 (changeset "jdk6-b41")))
977 (sha256
978 (base32
979 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
980 ("hotspot-src"
981 ,(origin
982 (method hg-fetch)
983 (uri (hg-reference
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
985 (changeset "jdk6-b41")))
986 (sha256
987 (base32
988 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
989 (patches
990 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
991 ("corba-src"
992 ,(origin
993 (method hg-fetch)
994 (uri (hg-reference
995 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
996 (changeset "jdk6-b41")))
997 (sha256
998 (base32
999 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1000 ("langtools-src"
1001 ,(origin
1002 (method hg-fetch)
1003 (uri (hg-reference
1004 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1005 (changeset "jdk6-b41")))
1006 (sha256
1007 (base32
1008 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1009 ("jaxp-src"
1010 ,(origin
1011 (method hg-fetch)
1012 (uri (hg-reference
1013 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1014 (changeset "jdk6-b41")))
1015 (sha256
1016 (base32
1017 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1018 ("jaxws-src"
1019 ,(origin
1020 (method hg-fetch)
1021 (uri (hg-reference
1022 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1023 (changeset "jdk6-b41")))
1024 (sha256
1025 (base32
1026 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1027 (home-page "http://icedtea.classpath.org")
1028 (synopsis "Java development kit")
1029 (description
1030 "This package provides the OpenJDK built with the IcedTea build harness.
1031 This version of the OpenJDK is no longer maintained and is only used for
1032 bootstrapping purposes.")
1033 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1034 ;; same license as both GNU Classpath and OpenJDK.
1035 (license license:gpl2+)))
1036
1037 (define-public icedtea-7
1038 (let* ((version "2.6.13")
1039 (drop (lambda (name hash)
1040 (origin
1041 (method url-fetch)
1042 (uri (string-append
1043 "http://icedtea.classpath.org/download/drops"
1044 "/icedtea7/" version "/" name ".tar.bz2"))
1045 (sha256 (base32 hash))))))
1046 (package
1047 (name "icedtea")
1048 (version version)
1049 (source (origin
1050 (method url-fetch)
1051 (uri (string-append
1052 "http://icedtea.wildebeest.org/download/source/icedtea-"
1053 version ".tar.xz"))
1054 (sha256
1055 (base32
1056 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1057 (modules '((guix build utils)))
1058 (snippet
1059 '(begin
1060 (substitute* "Makefile.in"
1061 ;; do not leak information about the build host
1062 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1063 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1064 #t))))
1065 (build-system gnu-build-system)
1066 (outputs '("out" ; Java Runtime Environment
1067 "jdk" ; Java Development Kit
1068 "doc")) ; all documentation
1069 (arguments
1070 `(;; There are many test failures. Some are known to
1071 ;; fail upstream, others relate to not having an X
1072 ;; server running at test time, yet others are a
1073 ;; complete mystery to me.
1074
1075 ;; hotspot: passed: 241; failed: 45; error: 2
1076 ;; langtools: passed: 1,934; failed: 26
1077 ;; jdk: unknown
1078 #:tests? #f
1079
1080 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1081 ;; gremlin) doesn't support it yet, so skip this phase.
1082 #:validate-runpath? #f
1083
1084 ;; Apparently, the C locale is needed for some of the tests.
1085 #:locale "C"
1086
1087 #:modules ((guix build utils)
1088 (guix build gnu-build-system)
1089 (ice-9 match)
1090 (ice-9 popen)
1091 (srfi srfi-19)
1092 (srfi srfi-26))
1093
1094 #:configure-flags
1095 ;; TODO: package pcsc and sctp, and add to inputs
1096 `("--disable-system-pcsc"
1097 "--disable-system-sctp"
1098 "--enable-bootstrap"
1099 "--enable-nss"
1100 "--without-rhino"
1101 "--disable-downloading"
1102 "--disable-tests" ;they are run in the check phase instead
1103 "--with-openjdk-src-dir=./openjdk.src"
1104 ,(string-append "--with-jdk-home="
1105 (assoc-ref %build-inputs "jdk")))
1106
1107 #:phases
1108 (modify-phases %standard-phases
1109 (replace 'unpack
1110 (lambda* (#:key source inputs #:allow-other-keys)
1111 (let ((target (string-append "icedtea-" ,version))
1112 (unpack (lambda* (name #:optional dir)
1113 (let ((dir (or dir
1114 (string-drop-right name 5))))
1115 (mkdir dir)
1116 (invoke "tar" "xvf"
1117 (assoc-ref inputs name)
1118 "-C" dir
1119 "--strip-components=1")))))
1120 (mkdir target)
1121 (invoke "tar" "xvf" source
1122 "-C" target "--strip-components=1")
1123 (chdir target)
1124 (unpack "openjdk-src" "openjdk.src")
1125 (with-directory-excursion "openjdk.src"
1126 (for-each unpack
1127 (filter (cut string-suffix? "-drop" <>)
1128 (map (match-lambda
1129 ((name . _) name))
1130 inputs))))
1131 #t)))
1132 (add-after 'unpack 'patch-bitrot
1133 (lambda _
1134 (substitute* '("patches/boot/revert-6973616.patch"
1135 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1136 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1137 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1138 ;; As of attr 2.4.48 this header is no longer
1139 ;; included. It is provided by the libc instead.
1140 (substitute* '("configure"
1141 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1142 (("attr/xattr.h") "sys/xattr.h"))
1143 #t))
1144 (add-after 'unpack 'fix-x11-extension-include-path
1145 (lambda* (#:key inputs #:allow-other-keys)
1146 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1147 (((string-append "\\$\\(firstword \\$\\(wildcard "
1148 "\\$\\(OPENWIN_HOME\\)"
1149 "/include/X11/extensions\\).*$"))
1150 (string-append (assoc-ref inputs "libxrender")
1151 "/include/X11/extensions"
1152 " -I" (assoc-ref inputs "libxtst")
1153 "/include/X11/extensions"
1154 " -I" (assoc-ref inputs "libxinerama")
1155 "/include/X11/extensions"))
1156 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1157 #t))
1158 (add-after 'unpack 'patch-paths
1159 (lambda _
1160 ;; buildtree.make generates shell scripts, so we need to replace
1161 ;; the generated shebang
1162 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1163 (("/bin/sh") (which "bash")))
1164
1165 (let ((corebin (string-append
1166 (assoc-ref %build-inputs "coreutils") "/bin/"))
1167 (binbin (string-append
1168 (assoc-ref %build-inputs "binutils") "/bin/"))
1169 (grepbin (string-append
1170 (assoc-ref %build-inputs "grep") "/bin/")))
1171 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1172 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1173 (("UNIXCOMMAND_PATH = /bin/")
1174 (string-append "UNIXCOMMAND_PATH = " corebin))
1175 (("USRBIN_PATH = /usr/bin/")
1176 (string-append "USRBIN_PATH = " corebin))
1177 (("DEVTOOLS_PATH *= */usr/bin/")
1178 (string-append "DEVTOOLS_PATH = " corebin))
1179 (("COMPILER_PATH *= */usr/bin/")
1180 (string-append "COMPILER_PATH = "
1181 (assoc-ref %build-inputs "gcc") "/bin/"))
1182 (("DEF_OBJCOPY *=.*objcopy")
1183 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1184
1185 ;; fix path to alsa header
1186 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1187 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1188 (string-append "ALSA_INCLUDE="
1189 (assoc-ref %build-inputs "alsa-lib")
1190 "/include/alsa/version.h")))
1191
1192 ;; fix hard-coded utility paths
1193 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1194 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1195 (("ECHO *=.*echo")
1196 (string-append "ECHO = " (which "echo")))
1197 (("^GREP *=.*grep")
1198 (string-append "GREP = " (which "grep")))
1199 (("EGREP *=.*egrep")
1200 (string-append "EGREP = " (which "egrep")))
1201 (("CPIO *=.*cpio")
1202 (string-append "CPIO = " (which "cpio")))
1203 (("READELF *=.*readelf")
1204 (string-append "READELF = " (which "readelf")))
1205 (("^ *AR *=.*ar")
1206 (string-append "AR = " (which "ar")))
1207 (("^ *TAR *=.*tar")
1208 (string-append "TAR = " (which "tar")))
1209 (("AS *=.*as")
1210 (string-append "AS = " (which "as")))
1211 (("LD *=.*ld")
1212 (string-append "LD = " (which "ld")))
1213 (("STRIP *=.*strip")
1214 (string-append "STRIP = " (which "strip")))
1215 (("NM *=.*nm")
1216 (string-append "NM = " (which "nm")))
1217 (("^SH *=.*sh")
1218 (string-append "SH = " (which "bash")))
1219 (("^FIND *=.*find")
1220 (string-append "FIND = " (which "find")))
1221 (("LDD *=.*ldd")
1222 (string-append "LDD = " (which "ldd")))
1223 (("NAWK *=.*(n|g)awk")
1224 (string-append "NAWK = " (which "gawk")))
1225 (("XARGS *=.*xargs")
1226 (string-append "XARGS = " (which "xargs")))
1227 (("UNZIP *=.*unzip")
1228 (string-append "UNZIP = " (which "unzip")))
1229 (("ZIPEXE *=.*zip")
1230 (string-append "ZIPEXE = " (which "zip")))
1231 (("SED *=.*sed")
1232 (string-append "SED = " (which "sed"))))
1233
1234 ;; Some of these timestamps cause problems as they are more than
1235 ;; 10 years ago, failing the build process.
1236 (substitute*
1237 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1238 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1239 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1240 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1241 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1242 #t))
1243 (add-before 'configure 'set-additional-paths
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1246 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1247 (string-append "ALSA_INCLUDE="
1248 (assoc-ref inputs "alsa-lib")
1249 "/include/alsa/version.h")))
1250 (setenv "CC" "gcc")
1251 (setenv "CPATH"
1252 (string-append (assoc-ref inputs "libxcomposite")
1253 "/include/X11/extensions" ":"
1254 (assoc-ref inputs "libxrender")
1255 "/include/X11/extensions" ":"
1256 (assoc-ref inputs "libxtst")
1257 "/include/X11/extensions" ":"
1258 (assoc-ref inputs "libxinerama")
1259 "/include/X11/extensions" ":"
1260 (or (getenv "CPATH") "")))
1261 (setenv "ALT_OBJCOPY" (which "objcopy"))
1262 (setenv "ALT_CUPS_HEADERS_PATH"
1263 (string-append (assoc-ref inputs "cups")
1264 "/include"))
1265 (setenv "ALT_FREETYPE_HEADERS_PATH"
1266 (string-append (assoc-ref inputs "freetype")
1267 "/include"))
1268 (setenv "ALT_FREETYPE_LIB_PATH"
1269 (string-append (assoc-ref inputs "freetype")
1270 "/lib"))
1271 #t))
1272 (add-before 'build 'disable-os-version-check
1273 ;; allow build on linux major version change
1274 (lambda _
1275 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1276 #t))
1277 (add-before 'check 'fix-test-framework
1278 (lambda _
1279 ;; Fix PATH in test environment
1280 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1281 (("PATH=/bin:/usr/bin")
1282 (string-append "PATH=" (getenv "PATH"))))
1283 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1284 (("/usr/bin/env") (which "env")))
1285 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1286 (("/bin/rm") (which "rm"))
1287 (("/bin/cp") (which "cp"))
1288 (("/bin/mv") (which "mv")))
1289 #t))
1290 (add-before 'check 'fix-hotspot-tests
1291 (lambda _
1292 (with-directory-excursion "openjdk.src/hotspot/test/"
1293 (substitute* "jprt.config"
1294 (("PATH=\"\\$\\{path4sdk\\}\"")
1295 (string-append "PATH=" (getenv "PATH")))
1296 (("make=/usr/bin/make")
1297 (string-append "make=" (which "make"))))
1298 (substitute* '("runtime/6626217/Test6626217.sh"
1299 "runtime/7110720/Test7110720.sh")
1300 (("/bin/rm") (which "rm"))
1301 (("/bin/cp") (which "cp"))
1302 (("/bin/mv") (which "mv"))))
1303 #t))
1304 (add-before 'check 'fix-jdk-tests
1305 (lambda _
1306 (with-directory-excursion "openjdk.src/jdk/test/"
1307 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1308 (("/bin/pwd") (which "pwd")))
1309 (substitute* "com/sun/jdi/ShellScaffold.sh"
1310 (("/bin/kill") (which "kill")))
1311 (substitute* "start-Xvfb.sh"
1312 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1313 (("/usr/bin/nohup") (which "nohup")))
1314 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1315 (("/bin/rm") (which "rm")))
1316 (substitute* "tools/launcher/MultipleJRE.sh"
1317 (("echo \"#!/bin/sh\"")
1318 (string-append "echo \"#!" (which "rm") "\""))
1319 (("/usr/bin/zip") (which "zip")))
1320 (substitute* "com/sun/jdi/OnThrowTest.java"
1321 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1322 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1323 (("/usr/bin/uptime") (which "uptime")))
1324 (substitute* "java/lang/ProcessBuilder/Basic.java"
1325 (("/usr/bin/env") (which "env"))
1326 (("/bin/false") (which "false"))
1327 (("/bin/true") (which "true"))
1328 (("/bin/cp") (which "cp"))
1329 (("/bin/sh") (which "sh")))
1330 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1331 (("/bin/sh") (which "sh")))
1332 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1333 (("/usr/bin/perl") (which "perl"))
1334 (("/bin/ps") (which "ps"))
1335 (("/bin/true") (which "true")))
1336 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1337 (("/usr/bin/tee") (which "tee")))
1338 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1339 (("/bin/true") (which "true")))
1340 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1341 (("/bin/cat") (which "cat")))
1342 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1343 (("/bin/sh") (which "sh"))
1344 (("/bin/true") (which "true"))
1345 (("/bin/kill") (which "kill")))
1346 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1347 (("/usr/bin/echo") (which "echo")))
1348 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1349 (("/usr/bin/cat") (which "cat")))
1350 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1351 (("/bin/cat") (which "cat"))
1352 (("/bin/sleep") (which "sleep"))
1353 (("/bin/sh") (which "sh")))
1354 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1355 (("/bin/cat") (which "cat")))
1356 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1357 (("/bin/chmod") (which "chmod")))
1358 (substitute* "java/util/zip/ZipFile/Assortment.java"
1359 (("/bin/sh") (which "sh"))))
1360 #t))
1361 (replace 'check
1362 (lambda _
1363 ;; The "make check-*" targets always return zero, so we need to
1364 ;; check for errors in the associated log files to determine
1365 ;; whether any tests have failed.
1366 (use-modules (ice-9 rdelim))
1367 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1368 (checker (lambda (port)
1369 (let loop ()
1370 (let ((line (read-line port)))
1371 (cond
1372 ((eof-object? line) #t)
1373 ((regexp-exec error-pattern line)
1374 (error "test failed"))
1375 (else (loop)))))))
1376 (run-test (lambda (test)
1377 (invoke "make" test)
1378 (call-with-input-file
1379 (string-append "test/" test ".log")
1380 checker))))
1381 (when #f ; skip tests
1382 (run-test "check-hotspot")
1383 (run-test "check-langtools")
1384 (run-test "check-jdk"))
1385 #t)))
1386 (replace 'install
1387 (lambda* (#:key outputs #:allow-other-keys)
1388 (let ((doc (string-append (assoc-ref outputs "doc")
1389 "/share/doc/icedtea"))
1390 (jre (assoc-ref outputs "out"))
1391 (jdk (assoc-ref outputs "jdk")))
1392 (copy-recursively "openjdk.build/docs" doc)
1393 (copy-recursively "openjdk.build/j2re-image" jre)
1394 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1395 #t))
1396 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1397 ;; But that shared object is located in the server/ folder, so it
1398 ;; cannot be found. This phase creates a symbolic link in the
1399 ;; lib/amd64 folder so that the other libraries can find it.
1400 ;;
1401 ;; See:
1402 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1403 ;;
1404 ;; FIXME: Find the bug in the build system, so that this symlink is
1405 ;; not needed.
1406 (add-after 'install 'install-libjvm
1407 (lambda* (#:key inputs outputs #:allow-other-keys)
1408 (let* ((lib-path (string-append (assoc-ref outputs "out")
1409 ;; See 'INSTALL_ARCH_DIR' in
1410 ;; 'configure'.
1411 ,(match (%current-system)
1412 ("i686-linux"
1413 "/lib/i386")
1414 ("x86_64-linux"
1415 "/lib/amd64")
1416 ("armhf-linux"
1417 "/lib/arm")
1418 ("aarch64-linux"
1419 "/lib/aarch64")))))
1420 (symlink (string-append lib-path "/server/libjvm.so")
1421 (string-append lib-path "/libjvm.so")))
1422 #t))
1423 ;; By default IcedTea only generates an empty keystore. In order to
1424 ;; be able to use certificates in Java programs we need to generate a
1425 ;; keystore from a set of certificates. For convenience we use the
1426 ;; certificates from the nss-certs package.
1427 (add-after 'install 'install-keystore
1428 (lambda* (#:key inputs outputs #:allow-other-keys)
1429 (let* ((keystore "cacerts")
1430 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1431 "/etc/ssl/certs"))
1432 (keytool (string-append (assoc-ref outputs "jdk")
1433 "/bin/keytool")))
1434 (define (extract-cert file target)
1435 (call-with-input-file file
1436 (lambda (in)
1437 (call-with-output-file target
1438 (lambda (out)
1439 (let loop ((line (read-line in 'concat))
1440 (copying? #f))
1441 (cond
1442 ((eof-object? line) #t)
1443 ((string-prefix? "-----BEGIN" line)
1444 (display line out)
1445 (loop (read-line in 'concat) #t))
1446 ((string-prefix? "-----END" line)
1447 (display line out)
1448 #t)
1449 (else
1450 (when copying? (display line out))
1451 (loop (read-line in 'concat) copying?)))))))))
1452 (define (import-cert cert)
1453 (format #t "Importing certificate ~a\n" (basename cert))
1454 (let ((temp "tmpcert"))
1455 (extract-cert cert temp)
1456 (let ((port (open-pipe* OPEN_WRITE keytool
1457 "-import"
1458 "-alias" (basename cert)
1459 "-keystore" keystore
1460 "-storepass" "changeit"
1461 "-file" temp)))
1462 (display "yes\n" port)
1463 (when (not (zero? (status:exit-val (close-pipe port))))
1464 (format #t "failed to import ~a\n" cert)))
1465 (delete-file temp)))
1466
1467 ;; This is necessary because the certificate directory contains
1468 ;; files with non-ASCII characters in their names.
1469 (setlocale LC_ALL "en_US.utf8")
1470 (setenv "LC_ALL" "en_US.utf8")
1471
1472 (for-each import-cert (find-files certs-dir "\\.pem$"))
1473 (mkdir-p (string-append (assoc-ref outputs "out")
1474 "/lib/security"))
1475 (mkdir-p (string-append (assoc-ref outputs "jdk")
1476 "/jre/lib/security"))
1477
1478 ;; The cacerts files we are going to overwrite are chmod'ed as
1479 ;; read-only (444) in icedtea-8 (which derives from this
1480 ;; package). We have to change this so we can overwrite them.
1481 (chmod (string-append (assoc-ref outputs "out")
1482 "/lib/security/" keystore) #o644)
1483 (chmod (string-append (assoc-ref outputs "jdk")
1484 "/jre/lib/security/" keystore) #o644)
1485
1486 (install-file keystore
1487 (string-append (assoc-ref outputs "out")
1488 "/lib/security"))
1489 (install-file keystore
1490 (string-append (assoc-ref outputs "jdk")
1491 "/jre/lib/security"))
1492 #t))))))
1493 (native-inputs
1494 `(("openjdk-src"
1495 ,(drop "openjdk"
1496 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1497 ("corba-drop"
1498 ,(drop "corba"
1499 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1500 ("jaxp-drop"
1501 ,(drop "jaxp"
1502 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1503 ("jaxws-drop"
1504 ,(drop "jaxws"
1505 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1506 ("jdk-drop"
1507 ,(drop "jdk"
1508 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1509 ("langtools-drop"
1510 ,(drop "langtools"
1511 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1512 ("hotspot-drop"
1513 ,(origin
1514 (method url-fetch)
1515 (uri (string-append
1516 "http://icedtea.classpath.org/downloads/drops"
1517 "/icedtea7/" version "/hotspot.tar.bz2"))
1518 (sha256
1519 (base32
1520 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1521 (patches (search-patches
1522 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1523 ("ant" ,ant-bootstrap)
1524 ("attr" ,attr)
1525 ("coreutils" ,coreutils)
1526 ("diffutils" ,diffutils) ;for tests
1527 ("gawk" ,gawk)
1528 ("grep" ,grep)
1529 ("libtool" ,libtool)
1530 ("pkg-config" ,pkg-config)
1531 ("wget" ,wget)
1532 ("which" ,which)
1533 ("cpio" ,cpio)
1534 ("zip" ,zip)
1535 ("unzip" ,unzip)
1536 ("fastjar" ,fastjar)
1537 ("libxslt" ,libxslt) ;for xsltproc
1538 ("nss-certs" ,nss-certs)
1539 ("perl" ,perl)
1540 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1541 ("jdk" ,icedtea-6 "jdk")))
1542 (inputs
1543 `(("alsa-lib" ,alsa-lib)
1544 ("cups" ,cups)
1545 ("libx11" ,libx11)
1546 ("libxcomposite" ,libxcomposite)
1547 ("libxt" ,libxt)
1548 ("libxtst" ,libxtst)
1549 ("libxi" ,libxi)
1550 ("libxinerama" ,libxinerama)
1551 ("libxrender" ,libxrender)
1552 ("libjpeg" ,libjpeg)
1553 ("libpng" ,libpng)
1554 ("mit-krb5" ,mit-krb5)
1555 ("nss" ,nss)
1556 ("giflib" ,giflib)
1557 ("fontconfig" ,fontconfig)
1558 ("freetype" ,freetype)
1559 ("lcms" ,lcms)
1560 ("zlib" ,zlib)
1561 ("gtk" ,gtk+-2)))
1562 (home-page "http://icedtea.classpath.org")
1563 (synopsis "Java development kit")
1564 (description
1565 "This package provides the Java development kit OpenJDK built with the
1566 IcedTea build harness.")
1567
1568 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1569 (supported-systems (delete "mips64el-linux" %supported-systems))
1570
1571 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1572 ;; same license as both GNU Classpath and OpenJDK.
1573 (license license:gpl2+))))
1574
1575 (define-public icedtea-8
1576 (let* ((version "3.7.0")
1577 (drop (lambda (name hash)
1578 (origin
1579 (method url-fetch)
1580 (uri (string-append
1581 "http://icedtea.classpath.org/download/drops"
1582 "/icedtea8/" version "/" name ".tar.xz"))
1583 (sha256 (base32 hash))))))
1584 (package (inherit icedtea-7)
1585 (version "3.7.0")
1586 (source (origin
1587 (method url-fetch)
1588 (uri (string-append
1589 "http://icedtea.wildebeest.org/download/source/icedtea-"
1590 version ".tar.xz"))
1591 (sha256
1592 (base32
1593 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1594 (modules '((guix build utils)))
1595 (snippet
1596 '(begin
1597 (substitute* '("configure"
1598 "acinclude.m4")
1599 ;; Do not embed build time
1600 (("(DIST_ID=\"Custom build).*$" _ prefix)
1601 (string-append prefix "\"\n"))
1602 ;; Do not leak information about the build host
1603 (("DIST_NAME=\"\\$build_os\"")
1604 "DIST_NAME=\"guix\""))
1605 #t))))
1606 (arguments
1607 `(#:imported-modules
1608 ((guix build ant-build-system)
1609 (guix build syscalls)
1610 ,@%gnu-build-system-modules)
1611 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1612 ((#:modules modules)
1613 `((guix build utils)
1614 (guix build gnu-build-system)
1615 ((guix build ant-build-system) #:prefix ant:)
1616 (ice-9 match)
1617 (ice-9 popen)
1618 (srfi srfi-19)
1619 (srfi srfi-26)))
1620 ((#:configure-flags flags)
1621 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1622 `( ;;"--disable-bootstrap"
1623 "--enable-bootstrap"
1624 "--enable-nss"
1625 "--disable-downloading"
1626 "--disable-system-pcsc"
1627 "--disable-system-sctp"
1628 "--disable-tests" ;they are run in the check phase instead
1629 "--with-openjdk-src-dir=./openjdk.src"
1630 ,(string-append "--with-jdk-home=" jdk))))
1631 ((#:phases phases)
1632 `(modify-phases ,phases
1633 (delete 'fix-x11-extension-include-path)
1634 (delete 'patch-paths)
1635 (delete 'set-additional-paths)
1636 (delete 'patch-patches)
1637 (delete 'patch-bitrot)
1638 ;; Prevent the keytool from recording the current time when
1639 ;; adding certificates at build time.
1640 (add-after 'unpack 'patch-keystore
1641 (lambda _
1642 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1643 (("date = new Date\\(\\);")
1644 "\
1645 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1646 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1647 new Date();"))
1648 #t))
1649 (add-after 'unpack 'patch-jni-libs
1650 ;; Hardcode dynamically loaded libraries.
1651 (lambda _
1652 (let* ((library-path (search-path-as-string->list
1653 (getenv "LIBRARY_PATH")))
1654 (find-library (lambda (name)
1655 (search-path
1656 library-path
1657 (string-append "lib" name ".so")))))
1658 (for-each
1659 (lambda (file)
1660 (catch 'decoding-error
1661 (lambda ()
1662 (substitute* file
1663 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1664 _ name version)
1665 (format #f "\"~a\"" (find-library name)))
1666 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1667 (format #f "\"~a\"" (find-library name)))))
1668 (lambda _
1669 ;; Those are safe to skip.
1670 (format (current-error-port)
1671 "warning: failed to substitute: ~a~%"
1672 file))))
1673 (find-files "openjdk.src/jdk/src/solaris/native"
1674 "\\.c|\\.h"))
1675 #t)))
1676 (replace 'install
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let ((doc (string-append (assoc-ref outputs "doc")
1679 "/share/doc/icedtea"))
1680 (jre (assoc-ref outputs "out"))
1681 (jdk (assoc-ref outputs "jdk")))
1682 (copy-recursively "openjdk.build/docs" doc)
1683 (copy-recursively "openjdk.build/images/j2re-image" jre)
1684 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1685 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1686 ;; support via NSS.
1687 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1688 (string-append jre "/lib/security/nss.cfg"))
1689 #t)))
1690 (add-after 'install 'strip-jar-timestamps
1691 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1692 (native-inputs
1693 `(("jdk" ,icedtea-7 "jdk")
1694 ("openjdk-src"
1695 ,(drop "openjdk"
1696 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1697 ("aarch32-drop"
1698 ,(drop "aarch32"
1699 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1700 ("corba-drop"
1701 ,(drop "corba"
1702 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1703 ("jaxp-drop"
1704 ,(drop "jaxp"
1705 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1706 ("jaxws-drop"
1707 ,(drop "jaxws"
1708 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1709 ("jdk-drop"
1710 ,(drop "jdk"
1711 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1712 ("langtools-drop"
1713 ,(drop "langtools"
1714 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1715 ("hotspot-drop"
1716 ,(origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "http://icedtea.classpath.org/download/drops"
1720 "/icedtea8/" version "/hotspot.tar.xz"))
1721 (sha256
1722 (base32
1723 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1724 (patches (search-patches
1725 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1726 ("nashorn-drop"
1727 ,(drop "nashorn"
1728 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1729 ("shenandoah-drop"
1730 ,(drop "shenandoah"
1731 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1732 ,@(fold alist-delete (package-native-inputs icedtea-7)
1733 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1734 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1735
1736 (define-public openjdk9
1737 (package
1738 (name "openjdk")
1739 (version "9.181")
1740 (source (origin
1741 (method url-fetch)
1742 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1743 (file-name (string-append name "-" version ".tar.bz2"))
1744 (sha256
1745 (base32
1746 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1747 (modules '((guix build utils)))
1748 (snippet
1749 `(begin
1750 (for-each delete-file (find-files "." ".*.bin$"))
1751 (for-each delete-file (find-files "." ".*.exe$"))
1752 (for-each delete-file (find-files "." ".*.jar$"))
1753 #t))))
1754 (build-system gnu-build-system)
1755 (outputs '("out" "jdk" "doc"))
1756 (arguments
1757 `(#:tests? #f; require jtreg
1758 #:imported-modules
1759 ((guix build syscalls)
1760 ,@%gnu-build-system-modules)
1761 #:phases
1762 (modify-phases %standard-phases
1763 (add-after 'patch-source-shebangs 'fix-java-shebangs
1764 (lambda _
1765 ;; This file was "fixed" by patch-source-shebangs, but it requires
1766 ;; this exact first line.
1767 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1768 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1769 #t))
1770 (replace 'configure
1771 (lambda* (#:key inputs outputs #:allow-other-keys)
1772 ;; TODO: unbundle libpng and lcms
1773 (invoke "bash" "./configure"
1774 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1775 "--disable-freetype-bundling"
1776 "--disable-warnings-as-errors"
1777 "--disable-hotspot-gtest"
1778 "--with-giflib=system"
1779 "--with-libjpeg=system"
1780 (string-append "--prefix=" (assoc-ref outputs "out")))
1781 #t))
1782 (replace 'build
1783 (lambda _
1784 (with-output-to-file ".src-rev"
1785 (lambda _
1786 (display ,version)))
1787 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1788 (invoke "make" "all")
1789 #t))
1790 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1791 ;; But that shared object is located in the server/ folder, so it
1792 ;; cannot be found. This phase creates a symbolic link in the
1793 ;; lib/ folder so that the other libraries can find it.
1794 ;;
1795 ;; See:
1796 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1797 ;;
1798 ;; FIXME: Find the bug in the build system, so that this symlink is
1799 ;; not needed.
1800 (add-after 'install 'install-libjvm
1801 (lambda* (#:key inputs outputs #:allow-other-keys)
1802 (let* ((lib-out (string-append (assoc-ref outputs "out")
1803 "/lib"))
1804 (lib-jdk (string-append (assoc-ref outputs "jdk")
1805 "/lib")))
1806 (symlink (string-append lib-jdk "/server/libjvm.so")
1807 (string-append lib-jdk "/libjvm.so"))
1808 (symlink (string-append lib-out "/server/libjvm.so")
1809 (string-append lib-out "/libjvm.so")))
1810 #t))
1811 (replace 'install
1812 (lambda* (#:key outputs #:allow-other-keys)
1813 (let ((out (assoc-ref outputs "out"))
1814 (jdk (assoc-ref outputs "jdk"))
1815 (doc (assoc-ref outputs "doc"))
1816 (images (car (find-files "build" ".*-server-release"
1817 #:directories? #t))))
1818 (copy-recursively (string-append images "/images/jdk") jdk)
1819 (copy-recursively (string-append images "/images/jre") out)
1820 (copy-recursively (string-append images "/images/docs") doc))
1821 #t))
1822 (add-after 'install 'strip-zip-timestamps
1823 (lambda* (#:key outputs #:allow-other-keys)
1824 (use-modules (guix build syscalls))
1825 (for-each (lambda (zip)
1826 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1827 (with-directory-excursion dir
1828 (invoke "unzip" zip))
1829 (delete-file zip)
1830 (for-each (lambda (file)
1831 (let ((s (lstat file)))
1832 (unless (eq? (stat:type s) 'symlink)
1833 (format #t "reset ~a~%" file)
1834 (utime file 0 0 0 0))))
1835 (find-files dir #:directories? #t))
1836 (with-directory-excursion dir
1837 (let ((files (find-files "." ".*" #:directories? #t)))
1838 (apply invoke "zip" "-0" "-X" zip files)))))
1839 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1840 #t)))))
1841 (inputs
1842 `(("alsa-lib" ,alsa-lib)
1843 ("cups" ,cups)
1844 ("fontconfig" ,fontconfig)
1845 ("freetype" ,freetype)
1846 ("giflib" ,giflib)
1847 ("lcms" ,lcms)
1848 ("libelf" ,libelf)
1849 ("libjpeg" ,libjpeg)
1850 ("libice" ,libice)
1851 ("libpng" ,libpng)
1852 ("libx11" ,libx11)
1853 ("libxcomposite" ,libxcomposite)
1854 ("libxi" ,libxi)
1855 ("libxinerama" ,libxinerama)
1856 ("libxrender" ,libxrender)
1857 ("libxt" ,libxt)
1858 ("libxtst" ,libxtst)))
1859 (native-inputs
1860 `(("icedtea-8" ,icedtea-8)
1861 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1862 ("unzip" ,unzip)
1863 ("which" ,which)
1864 ("zip" ,zip)))
1865 (home-page "https://openjdk.java.net/projects/jdk9/")
1866 (synopsis "Java development kit")
1867 (description
1868 "This package provides the Java development kit OpenJDK.")
1869 (license license:gpl2+)))
1870
1871 (define-public openjdk10
1872 (package
1873 (inherit openjdk9)
1874 (name "openjdk")
1875 (version "10.46")
1876 (source (origin
1877 (method url-fetch)
1878 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1879 (file-name (string-append name "-" version ".tar.bz2"))
1880 (sha256
1881 (base32
1882 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1883 (patches (search-patches
1884 "openjdk-10-idlj-reproducibility.patch"))
1885 (modules '((guix build utils)))
1886 (snippet
1887 `(begin
1888 (for-each delete-file (find-files "." ".*.bin$"))
1889 (for-each delete-file (find-files "." ".*.exe$"))
1890 (for-each delete-file (find-files "." ".*.jar$"))
1891 #t))))
1892 (arguments
1893 (substitute-keyword-arguments (package-arguments openjdk9)
1894 ((#:phases phases)
1895 `(modify-phases ,phases
1896 (replace 'fix-java-shebangs
1897 (lambda _
1898 ;; This file was "fixed" by patch-source-shebangs, but it requires
1899 ;; this exact first line.
1900 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1901 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1902 #t))
1903 (replace 'configure
1904 (lambda* (#:key inputs outputs #:allow-other-keys)
1905 (invoke "bash" "./configure"
1906 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1907 "--disable-freetype-bundling"
1908 "--disable-warnings-as-errors"
1909 "--disable-hotspot-gtest"
1910 "--with-giflib=system"
1911 "--with-libjpeg=system"
1912 "--with-native-debug-symbols=zipped"
1913 (string-append "--prefix=" (assoc-ref outputs "out")))
1914 #t))))))
1915 (native-inputs
1916 `(("openjdk9" ,openjdk9)
1917 ("openjdk9:jdk" ,openjdk9 "jdk")
1918 ("unzip" ,unzip)
1919 ("which" ,which)
1920 ("zip" ,zip)))))
1921
1922 (define-public openjdk11
1923 (package
1924 (name "openjdk")
1925 (version "11.28")
1926 (source (origin
1927 (method url-fetch)
1928 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1929 (file-name (string-append name "-" version ".tar.bz2"))
1930 (sha256
1931 (base32
1932 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1933 (modules '((guix build utils)))
1934 (snippet
1935 `(begin
1936 (for-each delete-file (find-files "." ".*.bin$"))
1937 (for-each delete-file (find-files "." ".*.exe$"))
1938 (for-each delete-file (find-files "." ".*.jar$"))
1939 #t))))
1940 (build-system gnu-build-system)
1941 (outputs '("out" "jdk" "doc"))
1942 (arguments
1943 `(#:imported-modules
1944 ((guix build syscalls)
1945 (ice-9 binary-ports)
1946 (rnrs bytevectors)
1947 ,@%gnu-build-system-modules)
1948 #:tests? #f; requires jtreg
1949 ;; TODO package jtreg
1950 ;; disable parallel builds, as the openjdk build system does not like -j
1951 #:parallel-build? #f
1952 #:parallel-tests? #f
1953 ;; reenable parallel builds and tests by adding the flags manually
1954 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1955 #:configure-flags
1956 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1957 "--disable-warnings-as-errors"
1958 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1959 "--with-native-debug-symbols=zipped"
1960 ;; do not use the bundled libraries
1961 "--with-giflib=system"
1962 "--with-lcms=system"
1963 "--with-libjpeg=system"
1964 "--with-libpng=system"
1965 "--with-version-pre="
1966 ;; allow the build system to locate the system freetype
1967 ,(string-append "--with-freetype-include="
1968 (assoc-ref %build-inputs "freetype") "/include")
1969 ,(string-append "--with-freetype-lib="
1970 (assoc-ref %build-inputs "freetype") "/lib"))
1971 ;; TODO
1972 #:phases
1973 (modify-phases %standard-phases
1974 (add-after 'patch-source-shebangs 'fix-java-shebangs
1975 (lambda _
1976 ;; This file was "fixed" by patch-source-shebangs, but it requires
1977 ;; this exact first line.
1978 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1979 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1980 #t))
1981 (replace 'build
1982 (lambda _
1983 (with-output-to-file ".src-rev"
1984 (lambda _
1985 (display ,version)))
1986 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1987 (invoke "make" "all")
1988 #t))
1989 ;; jdk 11 does not build jre by default any more
1990 ;; building it anyways
1991 ;; for further information see:
1992 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1993 (add-after 'build 'build-jre
1994 (lambda _
1995 (invoke "make" "legacy-jre-image")
1996 #t))
1997 (replace 'install
1998 (lambda* (#:key outputs #:allow-other-keys)
1999 (let ((out (assoc-ref outputs "out"))
2000 (jdk (assoc-ref outputs "jdk"))
2001 (doc (assoc-ref outputs "doc"))
2002 (images (car (find-files "build" ".*-server-release"
2003 #:directories? #t))))
2004 (copy-recursively (string-append images "/images/jdk") jdk)
2005 (copy-recursively (string-append images "/images/jre") out)
2006 (copy-recursively (string-append images "/images/docs") doc))
2007 #t))
2008 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2009 ;; But that shared object is located in the server/ folder, so it
2010 ;; cannot be found. This phase creates a symbolic link in the
2011 ;; lib/ folder so that the other libraries can find it.
2012 ;;
2013 ;; See:
2014 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2015 ;;
2016 ;; FIXME: Find the bug in the build system, so that this symlink is
2017 ;; not needed.
2018 (add-after 'install 'install-libjvm
2019 (lambda* (#:key inputs outputs #:allow-other-keys)
2020 (let* ((lib-out (string-append (assoc-ref outputs "out")
2021 "/lib"))
2022 (lib-jdk (string-append (assoc-ref outputs "jdk")
2023 "/lib")))
2024 (symlink (string-append lib-jdk "/server/libjvm.so")
2025 (string-append lib-jdk "/libjvm.so"))
2026 (symlink (string-append lib-out "/server/libjvm.so")
2027 (string-append lib-out "/libjvm.so")))
2028 #t))
2029 (add-after 'install 'strip-character-data-timestamps
2030 (lambda* (#:key outputs #:allow-other-keys)
2031 (use-modules (guix build syscalls))
2032 (let ((archive (string-append
2033 (assoc-ref outputs "jdk") "/lib/src.zip"))
2034 (dir (mkdtemp! "zip-contents.XXXXXX")))
2035 (with-directory-excursion dir
2036 (invoke "unzip" archive))
2037 (delete-file archive)
2038 (with-directory-excursion dir
2039 (let ((char-data-files (find-files "." "CharacterData.*")))
2040 (for-each (lambda (file)
2041 (substitute* file
2042 (((string-append "This file was generated "
2043 "AUTOMATICALLY from a template "
2044 "file.*"))
2045 (string-append "This file was generated "
2046 "AUTOMATICALLY from a template "
2047 "file"))))
2048 char-data-files)))
2049 (with-directory-excursion dir
2050 (let ((files (find-files "." ".*" #:directories? #t)))
2051 (apply invoke "zip" "-0" "-X" archive files))))))
2052 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2053 (lambda* (#:key outputs #:allow-other-keys)
2054 (use-modules (guix build syscalls)
2055 (ice-9 binary-ports)
2056 (rnrs bytevectors))
2057 (letrec ((repack-archive
2058 (lambda (archive)
2059 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2060 (with-directory-excursion dir
2061 (invoke "unzip" archive))
2062 (delete-file archive)
2063 (for-each (compose repack-archive canonicalize-path)
2064 (find-files dir "(ct.sym|.*.jar)$"))
2065 (let ((reset-file-timestamp
2066 (lambda (file)
2067 (let ((s (lstat file)))
2068 (unless (eq? (stat:type s) 'symlink)
2069 (format #t "reset ~a~%" file)
2070 (utime file 0 0 0 0))))))
2071 (for-each reset-file-timestamp
2072 (find-files dir #:directories? #t)))
2073 (with-directory-excursion dir
2074 (let ((files (find-files "." ".*" #:directories? #t)))
2075 (apply invoke "zip" "-0" "-X" archive files)))))))
2076 (for-each repack-archive
2077 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2078 (for-each repack-archive
2079 (find-files (assoc-ref outputs "jdk")
2080 ".*.(zip|jar|diz)$"))
2081 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2082 (let ((repack-jmod
2083 (lambda (file-name)
2084 (call-with-input-file file-name
2085 (lambda (file)
2086 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2087 (if (equal? (get-bytevector-n
2088 file (bytevector-length header))
2089 header)
2090 (let* ((header-length (bytevector-length header))
2091 (temp-file (mkstemp!
2092 (string-copy
2093 "temp-file.XXXXXX")))
2094 (temp-filename (port-filename temp-file))
2095 (content-length
2096 (- (stat:size (stat file))
2097 header-length)))
2098 (sendfile temp-file file content-length header-length)
2099 (delete-file file-name)
2100 (close-port temp-file)
2101 (repack-archive (canonicalize-path temp-filename))
2102 (call-with-output-file file-name
2103 (lambda (file)
2104 (put-bytevector file header)
2105 (call-with-input-file temp-filename
2106 (lambda (temp-file)
2107 (sendfile
2108 file temp-file
2109 (stat:size (stat temp-file)) 0)))))))))))))
2110 (for-each repack-jmod
2111 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2112 #t)))
2113 (add-after 'install 'remove-timestamp-from-api-summary
2114 (lambda* (#:key outputs #:allow-other-keys)
2115 (substitute* (string-append (assoc-ref outputs "doc")
2116 "/api/overview-summary.html")
2117 (("Generated by javadoc \\(11-internal\\).*$")
2118 "Generated by javadoc (11-internal) -->\n"))
2119 #t)))))
2120 (inputs
2121 `(("alsa-lib" ,alsa-lib)
2122 ("cups" ,cups)
2123 ("fontconfig" ,fontconfig)
2124 ("freetype" ,freetype)
2125 ("giflib" ,giflib)
2126 ("lcms" ,lcms)
2127 ("libjpeg" ,libjpeg)
2128 ("libpng" ,libpng)
2129 ("libx11" ,libx11)
2130 ("libxext" ,libxext)
2131 ("libxrender" ,libxrender)
2132 ("libxt" ,libxt)
2133 ("libxtst" ,libxtst)))
2134 (native-inputs
2135 `(("autoconf" ,autoconf)
2136 ("openjdk10" ,openjdk10)
2137 ("openjdk10:jdk" ,openjdk10 "jdk")
2138 ("pkg-config" ,pkg-config)
2139 ("unzip" ,unzip)
2140 ("which" ,which)
2141 ("zip" ,zip)))
2142 (home-page "https://openjdk.java.net/projects/jdk/11/")
2143 (synopsis "Java development kit")
2144 (description
2145 "This package provides the Java development kit OpenJDK.")
2146 (license license:gpl2+)))
2147
2148 (define-public openjdk12
2149 (package
2150 (inherit openjdk11)
2151 (name "openjdk")
2152 (version "12.33")
2153 (source (origin
2154 (method url-fetch)
2155 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2156 (file-name (string-append name "-" version ".tar.bz2"))
2157 (sha256
2158 (base32
2159 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2160 (modules '((guix build utils)))
2161 (snippet
2162 `(begin
2163 (for-each delete-file (find-files "." ".*.bin$"))
2164 (for-each delete-file (find-files "." ".*.exe$"))
2165 (for-each delete-file (find-files "." ".*.jar$"))
2166 #t))))
2167 (inputs
2168 `(("alsa-lib" ,alsa-lib)
2169 ("cups" ,cups)
2170 ("fontconfig" ,fontconfig)
2171 ("freetype" ,freetype)
2172 ("giflib" ,giflib)
2173 ("lcms" ,lcms)
2174 ("libjpeg" ,libjpeg)
2175 ("libpng" ,libpng)
2176 ("libx11" ,libx11)
2177 ("libxext" ,libxext)
2178 ("libxrandr" ,libxrandr)
2179 ("libxrender" ,libxrender)
2180 ("libxt" ,libxt)
2181 ("libxtst" ,libxtst)))
2182 (native-inputs
2183 `(("autoconf" ,autoconf)
2184 ("openjdk11" ,openjdk11)
2185 ("openjdk11:jdk" ,openjdk11 "jdk")
2186 ("pkg-config" ,pkg-config)
2187 ("unzip" ,unzip)
2188 ("which" ,which)
2189 ("zip" ,zip)))
2190 (home-page "https://openjdk.java.net/projects/jdk/12")))
2191
2192 (define-public icedtea icedtea-8)
2193
2194 \f
2195 (define-public ant/java8
2196 (package (inherit ant-bootstrap)
2197 (name "ant")
2198 (version "1.10.1")
2199 (source (origin
2200 (method url-fetch)
2201 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2202 version "-src.tar.gz"))
2203 (sha256
2204 (base32
2205 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2206 (modules '((guix build utils)))
2207 (snippet
2208 '(begin
2209 (for-each delete-file
2210 (find-files "lib/optional" "\\.jar$"))
2211 #t))))
2212 (arguments
2213 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2214 ((#:phases phases)
2215 `(modify-phases ,phases
2216 (add-after 'unpack 'remove-scripts
2217 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2218 ;; wrappers.
2219 (lambda _
2220 (for-each delete-file
2221 (find-files "src/script"
2222 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2223 #t))
2224 (replace 'build
2225 (lambda* (#:key inputs outputs #:allow-other-keys)
2226 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2227
2228 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2229 ;; Ant to build. This is necessary in addition to disabling the
2230 ;; "check" phase, because the dependency on "test-jar" would always
2231 ;; result in the tests to be run.
2232 (substitute* "build.xml"
2233 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2234 (invoke "bash" "bootstrap.sh"
2235 (string-append "-Ddist.dir="
2236 (assoc-ref outputs "out")))))))))
2237 (native-inputs
2238 `(("jdk" ,icedtea-8 "jdk")
2239 ("zip" ,zip)
2240 ("unzip" ,unzip)))))
2241
2242 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2243 ;; requires Java 8.
2244 (define-public ant
2245 (package (inherit ant/java8)
2246 (version "1.9.9")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2250 version "-src.tar.gz"))
2251 (sha256
2252 (base32
2253 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2254 (native-inputs
2255 `(("jdk" ,icedtea-7 "jdk")
2256 ("zip" ,zip)
2257 ("unzip" ,unzip)))))
2258
2259 (define-public ant-apache-bcel
2260 (package
2261 (inherit ant/java8)
2262 (name "ant-apache-bcel")
2263 (arguments
2264 (substitute-keyword-arguments (package-arguments ant/java8)
2265 ((#:phases phases)
2266 `(modify-phases ,phases
2267 (add-after 'unpack 'link-bcel
2268 (lambda* (#:key inputs #:allow-other-keys)
2269 (for-each (lambda (file)
2270 (symlink file
2271 (string-append "lib/optional/"
2272 (basename file))))
2273 (find-files (assoc-ref inputs "java-commons-bcel")
2274 "\\.jar$"))
2275 #t))
2276 (add-after 'build 'install
2277 (lambda* (#:key outputs #:allow-other-keys)
2278 (let* ((out (assoc-ref outputs "out"))
2279 (share (string-append out "/share/java"))
2280 (bin (string-append out "/bin"))
2281 (lib (string-append out "/lib")))
2282 (mkdir-p share)
2283 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2284 (delete-file-recursively bin)
2285 (delete-file-recursively lib)
2286 #t)))))))
2287 (inputs
2288 `(("java-commons-bcel" ,java-commons-bcel)
2289 ,@(package-inputs ant/java8)))))
2290
2291 (define-public ant-junit
2292 (package
2293 (inherit ant/java8)
2294 (name "ant-junit")
2295 (arguments
2296 (substitute-keyword-arguments (package-arguments ant/java8)
2297 ((#:phases phases)
2298 `(modify-phases ,phases
2299 (add-after 'unpack 'link-junit
2300 (lambda* (#:key inputs #:allow-other-keys)
2301 (for-each (lambda (file)
2302 (symlink file
2303 (string-append "lib/optional/"
2304 (basename file))))
2305 (find-files (assoc-ref inputs "java-junit")
2306 "\\.jar$"))
2307 #t))
2308 (add-after 'build 'install
2309 (lambda* (#:key outputs #:allow-other-keys)
2310 (let* ((out (assoc-ref outputs "out"))
2311 (share (string-append out "/share/java"))
2312 (bin (string-append out "/bin"))
2313 (lib (string-append out "/lib")))
2314 (mkdir-p share)
2315 (install-file (string-append lib "/ant-junit.jar") share)
2316 (delete-file-recursively bin)
2317 (delete-file-recursively lib)
2318 #t)))))))
2319 (inputs
2320 `(("java-junit" ,java-junit)
2321 ,@(package-inputs ant/java8)))))
2322
2323 (define-public java-openjfx-build
2324 (package
2325 (name "java-openjfx-build")
2326 ;; This is a java-8 version
2327 (version "8.202")
2328 (source (origin
2329 (method hg-fetch)
2330 (uri (hg-reference
2331 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2332 (changeset (string-append
2333 (string-join (string-split version #\.) "u")
2334 "-ga"))))
2335 (file-name (string-append name "-" version "-checkout"))
2336 (sha256
2337 (base32
2338 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2339 (build-system ant-build-system)
2340 (arguments
2341 `(#:jar-name "java-openjfx.jar"
2342 #:source-dir "buildSrc/src/main/java"
2343 #:test-dir "buildSrc/src/test"
2344 #:phases
2345 (modify-phases %standard-phases
2346 (add-before 'configure 'generate-jsl-parser
2347 (lambda _
2348 (invoke "antlr3" "-o"
2349 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2350 "buildSrc/src/main/antlr/JSL.g"))))))
2351 (inputs
2352 `(("antlr3" ,antlr3)
2353 ("java-stringtemplate" ,java-stringtemplate)))
2354 (native-inputs
2355 `(("java-junit" ,java-junit)
2356 ("java-hamcrest-core" ,java-hamcrest-core)))
2357 (home-page "https://openjfx.io")
2358 (synopsis "Graphical application toolkit in Java")
2359 (description "OpenJFX is a client application platform for desktop,
2360 mobile and embedded systems built on Java. Its goal is to produce a
2361 modern, efficient, and fully featured toolkit for developing rich client
2362 applications. This package contains base classes for the OpenJFX
2363 distribution and helper classes for building other parts of the
2364 distribution.")
2365 (license license:gpl2))) ;gpl2 only, with classpath exception
2366
2367 (define-public java-openjfx-base
2368 (package (inherit java-openjfx-build)
2369 (name "java-openjfx-base")
2370 (arguments
2371 `(#:jar-name "java-openjfx-base.jar"
2372 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2373 #:test-dir "modules/base/src/test"
2374 #:phases
2375 (modify-phases %standard-phases
2376 (add-before 'check 'remove-empty-file
2377 (lambda _
2378 (with-directory-excursion "modules/base/src/test/java"
2379 ;; These files are completely commented, but junit expects them to
2380 ;; contain a class, so tests fail.
2381 (delete-file
2382 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2383 (delete-file
2384 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2385 (delete-file "javafx/beans/property/PropertiesTest.java")
2386 (delete-file
2387 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2388 ;; This one fails
2389 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2390 #t)))))
2391 (propagated-inputs
2392 `(("java-openjfx-build" ,java-openjfx-build)))
2393 (description "OpenJFX is a client application platform for desktop,
2394 mobile and embedded systems built on Java. Its goal is to produce a
2395 modern, efficient, and fully featured toolkit for developing rich client
2396 applications. This package contains base classes for the OpenJFX
2397 distribution.")))
2398
2399 (define-public java-openjfx-graphics
2400 (package (inherit java-openjfx-build)
2401 (name "java-openjfx-graphics")
2402 (arguments
2403 `(#:jar-name "java-openjfx-graphics.jar"
2404 #:source-dir "modules/graphics/src/main/java"
2405 #:tests? #f; require X
2406 #:test-dir "modules/graphics/src/test"))
2407 (propagated-inputs
2408 `(("java-openjfx-base" ,java-openjfx-base)
2409 ("java-swt" ,java-swt)))
2410 (description "OpenJFX is a client application platform for desktop,
2411 mobile and embedded systems built on Java. Its goal is to produce a
2412 modern, efficient, and fully featured toolkit for developing rich client
2413 applications. This package contains graphics-related classes for the
2414 OpenJFX distribution.")))
2415
2416 (define-public java-openjfx-media
2417 (package (inherit java-openjfx-build)
2418 (name "java-openjfx-media")
2419 (propagated-inputs
2420 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2421 (arguments
2422 `(#:jar-name "java-openjfx-media.jar"
2423 #:source-dir "modules/media/src/main/java"
2424 #:tests? #f)); no tests
2425 (description "OpenJFX is a client application platform for desktop,
2426 mobile and embedded systems built on Java. Its goal is to produce a
2427 modern, efficient, and fully featured toolkit for developing rich client
2428 applications. This package contains media-related classes for the
2429 OpenJFX distribution.")))
2430
2431 (define-public javacc-4
2432 (package
2433 (name "javacc")
2434 (version "4.1")
2435 (source (origin
2436 (method git-fetch)
2437 (uri (git-reference
2438 (url "https://github.com/javacc/javacc.git")
2439 (commit "release_41")))
2440 (file-name (string-append "javacc-" version "-checkout"))
2441 (sha256
2442 (base32
2443 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2444 (modules '((guix build utils)))
2445 ;; delete bundled jars
2446 (snippet '(begin (delete-file-recursively "lib") #t))))
2447 (build-system ant-build-system)
2448 ;; Tests fail with
2449 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2450 ;; JAVACODE failed
2451 (arguments
2452 `(#:tests? #f
2453 #:phases
2454 (modify-phases %standard-phases
2455 ;; Delete tests to avoid build failure (we don't run them anyway).
2456 (add-after 'unpack 'delete-tests
2457 (lambda _
2458 (for-each delete-file
2459 '("src/org/javacc/JavaCCTestCase.java"
2460 "src/org/javacc/parser/ExpansionTest.java"
2461 "src/org/javacc/parser/OptionsTest.java"
2462 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2463 (for-each delete-file-recursively
2464 '("src/org/javacc/parser/test"
2465 "src/org/javacc/jjdoc/test"))
2466 #t))
2467 (replace 'install (install-jars "bin/lib")))))
2468 (home-page "https://javacc.org/")
2469 (synopsis "Java parser generator")
2470 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2471 generator for use with Java applications. A parser generator is a tool that
2472 reads a grammar specification and converts it to a Java program that can
2473 recognize matches to the grammar. In addition to the parser generator itself,
2474 JavaCC provides other standard capabilities related to parser generation such
2475 as tree building (via a tool called JJTree included with JavaCC), actions,
2476 debugging, etc.")
2477 (license license:bsd-3)))
2478
2479 (define-public javacc
2480 (package
2481 (inherit javacc-4)
2482 (version "7.0.4")
2483 (source
2484 (origin
2485 (method git-fetch)
2486 (uri (git-reference
2487 (url "https://github.com/javacc/javacc.git")
2488 (commit version)))
2489 (file-name (git-file-name "javacc" version))
2490 (sha256
2491 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2492 (modules '((guix build utils)))
2493 ;; Delete bundled jars.
2494 (snippet '(begin (for-each delete-file-recursively
2495 '("bootstrap" "lib"))
2496 #t))))
2497 (arguments
2498 `(#:make-flags ; bootstrap from javacc-4
2499 (list (string-append "-Dbootstrap-jar="
2500 (assoc-ref %build-inputs "javacc")
2501 "/share/java/javacc.jar"))
2502 #:test-target "test"
2503 #:phases
2504 (modify-phases %standard-phases
2505 (replace 'install (install-jars "target"))
2506 (add-after 'install 'install-bin
2507 (lambda* (#:key outputs inputs #:allow-other-keys)
2508 (let* ((out (assoc-ref outputs "out"))
2509 (dir (string-append out "/share/java"))
2510 (bin (string-append out "/bin"))
2511 (javacc (string-append bin "/javacc")))
2512 (mkdir-p bin)
2513 (with-output-to-file javacc
2514 (lambda _
2515 (display
2516 (string-append "#!/bin/sh\n"
2517 (assoc-ref inputs "jdk") "/bin/java"
2518 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2519 (chmod javacc #o755)
2520 ;; symlink to different names to affect the first argument and
2521 ;; change the behavior of the jar file.
2522 (symlink javacc (string-append bin "/jjdoc"))
2523 (symlink javacc (string-append bin "/jjtree"))
2524 #t))))))
2525
2526 (native-inputs
2527 `(("javacc" ,javacc-4)))))
2528
2529 ;; This is the last 3.x release of ECJ
2530 (define-public java-ecj-3
2531 (package
2532 (name "java-ecj")
2533 (version "3.8.2")
2534 (source (origin
2535 (method url-fetch)
2536 (uri (string-append "http://archive.eclipse.org/eclipse/"
2537 "downloads/drops/R-" version
2538 "-201301310800/ecjsrc-" version ".jar"))
2539 (sha256
2540 (base32
2541 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2542 (build-system ant-build-system)
2543 (arguments
2544 `(#:tests? #f ; none included
2545 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2546 #:make-flags (list "-f" "src/build.xml")
2547 #:build-target "build"
2548 #:phases
2549 (modify-phases %standard-phases
2550 (add-after 'unpack 'fix-manifest
2551 (lambda _
2552 ;; Record the main class to make ecj executable.
2553 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2554 (lambda (in out)
2555 (display "Manifest-Version: 1.0
2556 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2557 out)))
2558 #t))
2559 (replace 'install (install-jars ".")))))
2560 (home-page "https://eclipse.org")
2561 (synopsis "Eclipse Java development tools core batch compiler")
2562 (description "This package provides the Eclipse Java core batch compiler.")
2563 (license license:epl1.0)))
2564
2565 ;; This is needed for java-cisd-args4j
2566 (define-public java-ecj-3.5
2567 (package (inherit java-ecj-3)
2568 (version "3.5.1")
2569 (source (origin
2570 (method url-fetch/zipbomb)
2571 (uri (string-append "http://archive.eclipse.org/eclipse/"
2572 "downloads/drops/R-" version
2573 "-200909170800/ecjsrc-" version ".zip"))
2574 (sha256
2575 (base32
2576 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2577 (build-system ant-build-system)
2578 (arguments
2579 `(#:tests? #f ; none included
2580 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2581 #:build-target "build"
2582 #:phases
2583 (modify-phases %standard-phases
2584 (add-after 'unpack 'fix-manifest
2585 (lambda _
2586 ;; Record the main class to make ecj executable.
2587 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2588 (lambda (in out)
2589 (dump-port in out)
2590 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2591 out)))
2592 #t))
2593 (replace 'install (install-jars ".")))))
2594 (native-inputs
2595 `(("unzip" ,unzip)))))
2596
2597 (define-public java-cisd-base
2598 (let ((revision 38938)
2599 (base-version "14.12.0"))
2600 (package
2601 (name "java-cisd-base")
2602 (version (string-append base-version "-" (number->string revision)))
2603 (source (origin
2604 (method svn-fetch)
2605 (uri (svn-reference
2606 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2607 "base/tags/release/"
2608 (version-major+minor base-version)
2609 ".x/" base-version "/base/"))
2610 (revision revision)))
2611 (file-name (string-append "java-cisd-base-" version "-checkout"))
2612 (sha256
2613 (base32
2614 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2615 (modules '((guix build utils)))
2616 (snippet
2617 '(begin
2618 ;; Delete included gradle jar
2619 (delete-file-recursively "gradle/wrapper")
2620 ;; Delete pre-built native libraries
2621 (delete-file-recursively "libs")
2622 #t))))
2623 (build-system ant-build-system)
2624 (arguments
2625 `(#:make-flags '("-file" "build/build.xml")
2626 #:test-target "jar-test"
2627 #:jdk ,icedtea-8
2628 #:phases
2629 (modify-phases %standard-phases
2630 (add-after 'unpack 'unpack-build-resources
2631 (lambda* (#:key inputs #:allow-other-keys)
2632 (copy-recursively (assoc-ref inputs "build-resources")
2633 "../build_resources")
2634 #t))
2635 (add-after 'unpack-build-resources 'fix-dependencies
2636 (lambda* (#:key inputs #:allow-other-keys)
2637 (substitute* "build/build.xml"
2638 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2639 (string-append (assoc-ref inputs "java-testng")
2640 "/share/java/java-testng.jar"))
2641 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2642 (string-append (assoc-ref inputs "java-commons-lang")
2643 "/share/java/commons-lang-"
2644 ,(package-version java-commons-lang) ".jar"))
2645 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2646 (string-append (assoc-ref inputs "java-commons-io")
2647 "/share/java/commons-io-"
2648 ,(package-version java-commons-io)
2649 "-SNAPSHOT.jar"))
2650 ;; Remove dependency on svn
2651 (("<build-info.*") "")
2652 (("\\$\\{revision.number\\}")
2653 ,(number->string revision))
2654 (("\\$\\{version.number\\}") ,base-version))
2655 ;; Remove dependency on classycle
2656 (substitute* "../build_resources/ant/build-common.xml"
2657 (("<taskdef name=\"dependency-checker.*") "")
2658 (("classname=\"classycle.*") "")
2659 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2660 #t))
2661 ;; A few tests fail because of the lack of a proper /etc/groups and
2662 ;; /etc/passwd file in the build container.
2663 (add-after 'unpack 'disable-broken-tests
2664 (lambda _
2665 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2666 (("Unix.isOperational\\(\\)") "false"))
2667 #t))
2668 ;; These decorators are almost useless and pull in an unpackaged
2669 ;; dependency.
2670 (add-after 'unpack 'remove-useless-decorators
2671 (lambda _
2672 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2673 (("@Private") "")
2674 (("import ch.rinn.restrictions.Private;") ""))
2675 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2676 (("@Friend.*") "")
2677 (("import ch.rinn.restrictions.Friend;") ""))
2678 #t))
2679 (add-before 'configure 'build-native-code
2680 (lambda* (#:key inputs #:allow-other-keys)
2681 (let ((jdk (assoc-ref inputs "jdk"))
2682 (dir ,(match (%current-system)
2683 ("i686-linux"
2684 "i386-Linux")
2685 ((or "armhf-linux" "aarch64-linux")
2686 "arm-Linux")
2687 ((or "x86_64-linux")
2688 "amd64-Linux")
2689 (_ "unknown-Linux"))))
2690 (with-directory-excursion "source/c"
2691 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2692 (string-append "-I" jdk "/include")
2693 (string-append "-I" jdk "/include/linux")
2694 "-o" "libunix.so")
2695 (invoke "gcc" "-shared" "-O3" "-fPIC"
2696 "-DMACHINE_BYTE_ORDER=1"
2697 "copyCommon.c"
2698 "copyByteChar.c"
2699 "copyByteDouble.c"
2700 "copyByteFloat.c"
2701 "copyByteInt.c"
2702 "copyByteLong.c"
2703 "copyByteShort.c"
2704 (string-append "-I" jdk "/include")
2705 (string-append "-I" jdk "/include/linux")
2706 "-o" "libnativedata.so"))
2707 (install-file "source/c/libunix.so"
2708 (string-append "libs/native/unix/" dir))
2709 (install-file "source/c/libnativedata.so"
2710 (string-append "libs/native/nativedata/" dir))
2711 #t)))
2712 ;; In the "check" phase we only build the test executable.
2713 (add-after 'check 'run-tests
2714 (lambda _
2715 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2716 (delete-file "targets/dist/sis-base-test.jar")
2717 #t))
2718 (replace 'install (install-jars "targets/dist")))))
2719 (native-inputs
2720 `(("jdk" ,icedtea-8)
2721 ("java-commons-lang" ,java-commons-lang)
2722 ("java-commons-io" ,java-commons-io)
2723 ("java-testng" ,java-testng)
2724 ("build-resources"
2725 ,(origin
2726 (method svn-fetch)
2727 (uri (svn-reference
2728 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2729 "base/tags/release/"
2730 (version-major+minor base-version)
2731 ".x/" base-version
2732 "/build_resources/"))
2733 (revision revision)))
2734 (sha256
2735 (base32
2736 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2737 (home-page "http://svnsis.ethz.ch")
2738 (synopsis "Utility classes for libraries from ETH Zurich")
2739 (description "This library supplies some utility classes needed for
2740 libraries from the SIS division at ETH Zurich like jHDF5.")
2741 ;; The C sources are under a non-copyleft license, which looks like a
2742 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2743 (license (list license:asl2.0
2744 (license:non-copyleft "file://source/c/COPYING"))))))
2745
2746 (define-public java-cisd-args4j
2747 (let ((revision 39162)
2748 (base-version "9.11.2"))
2749 (package
2750 (name "java-cisd-args4j")
2751 (version (string-append base-version "-" (number->string revision)))
2752 (source (origin
2753 (method svn-fetch)
2754 (uri (svn-reference
2755 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2756 "args4j/tags/release/"
2757 (version-major+minor base-version)
2758 ".x/" base-version "/args4j/"))
2759 (revision revision)))
2760 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2761 (sha256
2762 (base32
2763 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2764 (build-system ant-build-system)
2765 (arguments
2766 `(#:make-flags '("-file" "build/build.xml")
2767 #:tests? #f ; there are no tests
2768 ;; There are weird build failures with JDK8, such as: "The type
2769 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2770 ;; referenced from required .class files"
2771 #:jdk ,icedtea-7
2772 #:modules ((guix build ant-build-system)
2773 (guix build utils)
2774 (guix build java-utils)
2775 (sxml simple)
2776 (sxml transform)
2777 (sxml xpath))
2778 #:phases
2779 (modify-phases %standard-phases
2780 (add-after 'unpack 'unpack-build-resources
2781 (lambda* (#:key inputs #:allow-other-keys)
2782 (mkdir-p "../build_resources")
2783 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2784 "-C" "../build_resources"
2785 "--strip-components=1")
2786 (mkdir-p "../build_resources/lib")
2787 #t))
2788 (add-after 'unpack-build-resources 'fix-dependencies
2789 (lambda* (#:key inputs #:allow-other-keys)
2790 ;; FIXME: There should be a more convenient abstraction for
2791 ;; editing XML files.
2792 (with-directory-excursion "../build_resources/ant/"
2793 (chmod "build-common.xml" #o664)
2794 (call-with-output-file "build-common.xml.new"
2795 (lambda (port)
2796 (sxml->xml
2797 (pre-post-order
2798 (with-input-from-file "build-common.xml"
2799 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2800 `(;; Remove dependency on classycle and custom ant tasks
2801 (taskdef . ,(lambda (tag . kids)
2802 (let ((name ((sxpath '(name *text*)) kids)))
2803 (if (or (member "build-info" name)
2804 (member "dependency-checker" name)
2805 (member "build-java-subprojects" name)
2806 (member "project-classpath" name))
2807 '() ; skip
2808 `(,tag ,@kids)))))
2809 (typedef . ,(lambda (tag . kids)
2810 (let ((name ((sxpath '(name *text*)) kids)))
2811 (if (member "recursive-jar" name)
2812 '() ; skip
2813 `(,tag ,@kids)))))
2814 (build-java-subprojects . ,(lambda _ '()))
2815 ;; Ignore everything else
2816 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2817 (*text* . ,(lambda (_ txt) txt))))
2818 port)))
2819 (rename-file "build-common.xml.new" "build-common.xml"))
2820 (substitute* "build/build.xml"
2821 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2822 (string-append (assoc-ref inputs "java-cisd-base")
2823 "/share/java/sis-base.jar"))
2824 ;; Remove dependency on svn
2825 (("<build-info.*") "")
2826 (("\\$\\{revision.number\\}")
2827 ,(number->string revision))
2828 (("\\$\\{version.number\\}") ,base-version)
2829 ;; Don't use custom ant tasks.
2830 (("recursive-jar") "jar")
2831 (("<project-classpath.*") ""))
2832 #t))
2833 (replace 'install (install-jars "targets/dist")))))
2834 (inputs
2835 `(("java-cisd-base" ,java-cisd-base)))
2836 (native-inputs
2837 `(("ecj" ,java-ecj-3.5)
2838 ("build-resources"
2839 ,(origin
2840 (method svn-fetch)
2841 (uri (svn-reference
2842 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2843 "args4j/tags/release/"
2844 (version-major+minor base-version)
2845 ".x/" base-version
2846 "/build_resources/"))
2847 (revision revision)))
2848 (sha256
2849 (base32
2850 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2851 (modules '((guix build utils)))
2852 ;; Delete bundled pre-built jars.
2853 (snippet
2854 '(begin (delete-file-recursively "lib/") #t))))))
2855 (home-page "http://svnsis.ethz.ch")
2856 (synopsis "Command line parser library")
2857 (description "This package provides a parser for command line arguments.")
2858 (license license:asl2.0))))
2859
2860 (define-public java-cisd-jhdf5
2861 (let ((revision 39162)
2862 (base-version "14.12.6"))
2863 (package
2864 (name "java-cisd-jhdf5")
2865 (version (string-append base-version "-" (number->string revision)))
2866 (source (origin
2867 (method svn-fetch)
2868 (uri (svn-reference
2869 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2870 "jhdf5/tags/release/"
2871 (version-major+minor base-version)
2872 ".x/" base-version "/jhdf5/"))
2873 (revision revision)))
2874 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2875 (sha256
2876 (base32
2877 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2878 (modules '((guix build utils)))
2879 (snippet
2880 '(begin
2881 ;; Delete included gradle jar
2882 (delete-file-recursively "gradle/wrapper")
2883 ;; Delete pre-built native libraries
2884 (delete-file-recursively "libs")
2885 #t))))
2886 (build-system ant-build-system)
2887 (arguments
2888 `(#:make-flags '("-file" "build/build.xml")
2889 #:build-target "jar-all"
2890 #:test-target "jar-test"
2891 #:jdk ,icedtea-8
2892 #:phases
2893 (modify-phases %standard-phases
2894 ;; FIXME: this build phase fails.
2895 (delete 'generate-jar-indices)
2896 ;; Don't erase results from the build phase when building tests.
2897 (add-after 'unpack 'separate-test-target-from-clean
2898 (lambda _
2899 (substitute* "build/build.xml"
2900 (("\"jar-test\" depends=\"clean, ")
2901 "\"jar-test\" depends=\""))
2902 #t))
2903 (add-after 'unpack 'unpack-build-resources
2904 (lambda* (#:key inputs #:allow-other-keys)
2905 (copy-recursively (assoc-ref inputs "build-resources")
2906 "../build_resources")
2907 (delete-file-recursively "../build_resources/lib/")
2908 (mkdir-p "../build_resources/lib")
2909 ;; Remove dependency on classycle
2910 (substitute* "../build_resources/ant/build-common.xml"
2911 (("<taskdef name=\"dependency-checker.*") "")
2912 (("classname=\"classycle.*") "")
2913 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2914 ;; Remove dependency on svn
2915 (substitute* "build/build.xml"
2916 (("<build-info.*") "")
2917 (("\\$\\{revision.number\\}")
2918 ,(number->string revision))
2919 (("\\$\\{version.number\\}") ,base-version))
2920 #t))
2921 (add-after 'unpack-build-resources 'fix-dependencies
2922 (lambda* (#:key inputs #:allow-other-keys)
2923 (substitute* "../build_resources/ant/build-common.xml"
2924 (("../libraries/testng/testng-jdk15.jar")
2925 (string-append (assoc-ref inputs "java-testng")
2926 "/share/java/java-testng.jar")))
2927 (substitute* "build/build.xml"
2928 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2929 (string-append (assoc-ref inputs "java-cisd-base")
2930 "/share/java/sis-base.jar"))
2931 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2932 (string-append (assoc-ref inputs "java-cisd-args4j")
2933 "/share/java/cisd-args4j.jar"))
2934 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2935 (string-append (assoc-ref inputs "java-commons-lang")
2936 "/share/java/commons-lang-"
2937 ,(package-version java-commons-lang) ".jar"))
2938 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2939 (string-append (assoc-ref inputs "java-commons-io")
2940 "/share/java/commons-io-"
2941 ,(package-version java-commons-io)
2942 "-SNAPSHOT.jar"))
2943 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2944 (string-append (assoc-ref inputs "java-testng")
2945 "/share/java/java-testng.jar"))
2946 (("\\$\\{lib\\}/junit4/junit.jar")
2947 (string-append (assoc-ref inputs "java-junit")
2948 "/share/java/junit.jar"))
2949 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2950 (string-append (assoc-ref inputs "java-hamcrest-core")
2951 "/share/java/hamcrest-core.jar")))
2952 ;; Remove dependency on ch.rinn.restrictions
2953 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2954 (substitute* '("BitSetConversionUtils.java"
2955 "HDF5Utils.java")
2956 (("import ch.rinn.restrictions.Private;") "")
2957 (("@Private") "")))
2958 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2959 (substitute* '("BitSetConversionTest.java"
2960 "h5ar/HDF5ArchiverTest.java")
2961 (("import ch.rinn.restrictions.Friend;") "")
2962 (("@Friend.*") ""))
2963 ;; Remove leftovers from removing @Friend
2964 (substitute* "h5ar/HDF5ArchiverTest.java"
2965 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2966 "")))
2967 #t))
2968 (add-before 'configure 'build-native-library
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (let ((jdk (assoc-ref inputs "jdk"))
2971 (hdf5 (assoc-ref inputs "hdf5"))
2972 (dir ,(match (%current-system)
2973 ("i686-linux"
2974 "i386-Linux")
2975 ((or "armhf-linux" "aarch64-linux")
2976 "arm-Linux")
2977 ((or "x86_64-linux")
2978 "amd64-Linux")
2979 (_ "unknown-Linux"))))
2980 (with-directory-excursion "source/c"
2981 (apply invoke `("gcc" "-shared" "-O3"
2982 "-fPIC"
2983 "-Wl,--exclude-libs,ALL"
2984 ,@(find-files "jhdf5" "\\.c$")
2985 ,@(find-files "hdf-java" "\\.c$")
2986 ,(string-append "-I" hdf5 "/include")
2987 ,(string-append "-I" jdk "/include")
2988 ,(string-append "-I" jdk "/include/linux")
2989 ,(string-append hdf5 "/lib/libhdf5.a")
2990 "-o" "libjhdf5.so" "-lz")))
2991 (install-file "source/c/libjhdf5.so"
2992 (string-append "libs/native/jhdf5/" dir))
2993 #t)))
2994 ;; In the "check" phase we only build the test executable.
2995 (add-after 'check 'run-tests
2996 (lambda _
2997 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2998 (delete-file "targets/dist/sis-jhdf5-test.jar")
2999 #t))
3000 (replace 'install
3001 (install-jars "targets/dist")))))
3002 (inputs
3003 `(("java-cisd-base" ,java-cisd-base)
3004 ("java-cisd-args4j" ,java-cisd-args4j)
3005 ("java-commons-lang" ,java-commons-lang)
3006 ("java-commons-io" ,java-commons-io)
3007 ("hdf5" ,hdf5)
3008 ("zlib" ,zlib)))
3009 (native-inputs
3010 `(("jdk" ,icedtea-8)
3011 ("java-testng" ,java-testng)
3012 ("java-junit" ,java-junit)
3013 ("java-jmock" ,java-jmock)
3014 ("java-hamcrest-core" ,java-hamcrest-core)
3015 ("build-resources"
3016 ,(origin
3017 (method svn-fetch)
3018 (uri (svn-reference
3019 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3020 "jhdf5/tags/release/"
3021 (version-major+minor base-version)
3022 ".x/" base-version
3023 "/build_resources/"))
3024 (revision revision)))
3025 (sha256
3026 (base32
3027 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3028 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3029 (synopsis "Java binding for HDF5")
3030 (description "JHDF5 is a high-level API in Java for reading and writing
3031 HDF5 files, building on the libraries provided by the HDF Group.")
3032 ;; The C sources are under a non-copyleft license, which looks like a
3033 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3034 (license (list license:asl2.0
3035 (license:non-copyleft "file://source/c/COPYING"))))))
3036
3037 (define-public java-classpathx-servletapi
3038 (package
3039 (name "java-classpathx-servletapi")
3040 (version "3.0.1")
3041 (source (origin
3042 (method url-fetch)
3043 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3044 "servletapi-" version ".tar.gz"))
3045 (sha256
3046 (base32
3047 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3048 (build-system ant-build-system)
3049 (arguments
3050 `(#:tests? #f ; there is no test target
3051 #:build-target "compile"
3052 #:make-flags
3053 (list "-Dbuild.compiler=javac1.8"
3054 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3055 #:phases
3056 (modify-phases %standard-phases
3057 (replace 'install
3058 (lambda* (#:key make-flags #:allow-other-keys)
3059 (apply invoke `("ant" "dist" ,@make-flags)))))))
3060 (home-page "https://www.gnu.org/software/classpathx/")
3061 (synopsis "Java servlet API implementation")
3062 (description "This is the GNU servlet API distribution, part of the
3063 ClasspathX project. It provides implementations of version 3.0 of the servlet
3064 API and version 2.1 of the Java ServerPages API.")
3065 (license license:gpl3+)))
3066
3067 (define-public java-javaee-servletapi
3068 (package
3069 (name "java-javaee-servletapi")
3070 (version "3.1.0")
3071 (source (origin
3072 (method url-fetch)
3073 (uri (string-append "https://github.com/javaee/servlet-spec/"
3074 "archive/" version ".zip"))
3075 (file-name (string-append name "-" version ".zip"))
3076 (sha256
3077 (base32
3078 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
3079 (build-system ant-build-system)
3080 (arguments
3081 `(#:jar-name "javax-servletapi.jar"
3082 ;; no tests
3083 #:tests? #f
3084 #:source-dir "src/main/java"))
3085 (native-inputs
3086 `(("unzip" ,unzip)))
3087 (home-page "https://javaee.github.io/servlet-spec/")
3088 (synopsis "Java servlet API")
3089 (description "Java Servlet is the foundation web specification in the
3090 Java Enterprise Platform. Developers can build web applications using the
3091 Servlet API to interact with the request/response workflow. This project
3092 provides information on the continued development of the Java Servlet
3093 specification.")
3094 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3095 ;; Some files are licensed under ASL 2.0.
3096 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3097
3098 (define-public java-swt
3099 (package
3100 (name "java-swt")
3101 (version "4.7.1a")
3102 (source
3103 ;; The types of many variables and procedures differ in the sources
3104 ;; dependent on whether the target architecture is a 32-bit system or a
3105 ;; 64-bit system. Instead of patching the sources on demand in a build
3106 ;; phase we download either the 32-bit archive (which mostly uses "int"
3107 ;; types) or the 64-bit archive (which mostly uses "long" types).
3108 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3109 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3110 (file32 "x86")
3111 (file64 "x86_64"))
3112 (let-values (((hash file)
3113 (match (or (%current-target-system) (%current-system))
3114 ("x86_64-linux" (values hash64 file64))
3115 (_ (values hash32 file32)))))
3116 (origin
3117 (method url-fetch)
3118 (uri (string-append
3119 "http://download.eclipse.org/eclipse/downloads/drops4/"
3120 "R-" version "-201710090410/swt-" version
3121 "-gtk-linux-" file ".zip"))
3122 (sha256 (base32 hash))))))
3123 (build-system ant-build-system)
3124 (arguments
3125 `(#:jar-name "swt.jar"
3126 #:jdk ,icedtea-8
3127 #:tests? #f ; no "check" target
3128 #:phases
3129 (modify-phases %standard-phases
3130 (replace 'unpack
3131 (lambda* (#:key source #:allow-other-keys)
3132 (mkdir "swt")
3133 (invoke "unzip" source "-d" "swt")
3134 (chdir "swt")
3135 (mkdir "src")
3136 (invoke "unzip" "src.zip" "-d" "src")))
3137 ;; The classpath contains invalid icecat jars. Since we don't need
3138 ;; anything other than the JDK on the classpath, we can simply unset
3139 ;; it.
3140 (add-after 'configure 'unset-classpath
3141 (lambda _ (unsetenv "CLASSPATH") #t))
3142 (add-before 'build 'build-native
3143 (lambda* (#:key inputs outputs #:allow-other-keys)
3144 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3145 ;; Build shared libraries. Users of SWT have to set the system
3146 ;; property swt.library.path to the "lib" directory of this
3147 ;; package output.
3148 (mkdir-p lib)
3149 (setenv "OUTPUT_DIR" lib)
3150 (with-directory-excursion "src"
3151 (invoke "bash" "build.sh")))))
3152 (add-after 'install 'install-native
3153 (lambda* (#:key outputs #:allow-other-keys)
3154 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3155 (for-each (lambda (file)
3156 (install-file file lib))
3157 (find-files "." "\\.so$"))
3158 #t))))))
3159 (inputs
3160 `(("gtk" ,gtk+-2)
3161 ("libxtst" ,libxtst)
3162 ("libxt" ,libxt)
3163 ("mesa" ,mesa)
3164 ("glu" ,glu)))
3165 (native-inputs
3166 `(("pkg-config" ,pkg-config)
3167 ("unzip" ,unzip)))
3168 (home-page "https://www.eclipse.org/swt/")
3169 (synopsis "Widget toolkit for Java")
3170 (description
3171 "SWT is a widget toolkit for Java designed to provide efficient, portable
3172 access to the user-interface facilities of the operating systems on which it
3173 is implemented.")
3174 ;; SWT code is licensed under EPL1.0
3175 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3176 ;; Cairo bindings contain code under MPL1.1
3177 ;; XULRunner 1.9 bindings contain code under MPL2.0
3178 (license (list
3179 license:epl1.0
3180 license:mpl1.1
3181 license:mpl2.0
3182 license:lgpl2.1+))))
3183
3184 (define-public java-xz
3185 (package
3186 (name "java-xz")
3187 (version "1.6")
3188 (source (origin
3189 (method url-fetch)
3190 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3191 (sha256
3192 (base32
3193 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3194 (build-system ant-build-system)
3195 (arguments
3196 `(#:tests? #f ; There are no tests to run.
3197 #:jar-name ,(string-append "xz-" version ".jar")
3198 #:phases
3199 (modify-phases %standard-phases
3200 ;; The unpack phase enters the "maven" directory by accident.
3201 (add-after 'unpack 'chdir
3202 (lambda _ (chdir "..") #t)))))
3203 (native-inputs
3204 `(("unzip" ,unzip)))
3205 (home-page "https://tukaani.org/xz/java.html")
3206 (synopsis "Implementation of XZ data compression in pure Java")
3207 (description "This library aims to be a complete implementation of XZ data
3208 compression in pure Java. Single-threaded streamed compression and
3209 decompression and random access decompression have been fully implemented.")
3210 (license license:public-domain)))
3211
3212 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3213 ;; of the latest release.
3214 (define-public java-qdox-1.12
3215 (package
3216 (name "java-qdox")
3217 (version "1.12.1")
3218 (source (origin
3219 (method url-fetch)
3220 (uri (string-append "http://central.maven.org/maven2/"
3221 "com/thoughtworks/qdox/qdox/" version
3222 "/qdox-" version "-sources.jar"))
3223 (sha256
3224 (base32
3225 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3226 (build-system ant-build-system)
3227 (arguments
3228 `(;; Tests require junit
3229 #:tests? #f
3230 #:jar-name "qdox.jar"
3231 #:phases
3232 (modify-phases %standard-phases
3233 (replace 'unpack
3234 (lambda* (#:key source #:allow-other-keys)
3235 (mkdir "src")
3236 (with-directory-excursion "src"
3237 (invoke "jar" "-xf" source))))
3238 ;; At this point we don't have junit, so we must remove the API
3239 ;; tests.
3240 (add-after 'unpack 'delete-tests
3241 (lambda _
3242 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3243 #t)))))
3244 (home-page "http://qdox.codehaus.org/")
3245 (synopsis "Parse definitions from Java source files")
3246 (description
3247 "QDox is a high speed, small footprint parser for extracting
3248 class/interface/method definitions from source files complete with JavaDoc
3249 @code{@@tags}. It is designed to be used by active code generators or
3250 documentation tools.")
3251 (license license:asl2.0)))
3252
3253 (define-public java-jarjar
3254 (package
3255 (name "java-jarjar")
3256 (version "1.4")
3257 (source (origin
3258 (method url-fetch)
3259 (uri (string-append
3260 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3261 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3262 (sha256
3263 (base32
3264 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3265 (modules '((guix build utils)))
3266 (snippet
3267 '(begin
3268 ;; Delete bundled thirds-party jar archives.
3269 ;; TODO: unbundle maven-plugin-api.
3270 (delete-file "lib/asm-4.0.jar")
3271 (delete-file "lib/asm-commons-4.0.jar")
3272 (delete-file "lib/junit-4.8.1.jar")
3273 #t))))
3274 (build-system ant-build-system)
3275 (arguments
3276 `(;; Tests require junit, which ultimately depends on this package.
3277 #:tests? #f
3278 #:build-target "jar"
3279 #:phases
3280 (modify-phases %standard-phases
3281 (add-before 'build 'do-not-use-bundled-asm
3282 (lambda* (#:key inputs #:allow-other-keys)
3283 (substitute* "build.xml"
3284 (("<path id=\"path.build\">")
3285 (string-append "<path id=\"path.build\"><fileset dir=\""
3286 (assoc-ref inputs "java-asm-bootstrap")
3287 "/share/java\" includes=\"**/*.jar\"/>"))
3288 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3289 (("lib/asm-commons-4.0.jar")
3290 (string-append (assoc-ref inputs "java-asm-bootstrap")
3291 "/share/java/asm-6.0.jar"))
3292 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3293 (string-append "<include name=\"org/objectweb/asm/"
3294 "commons/Remap*.class\"/>"
3295 "<include name=\"org/objectweb/asm/*.class\"/>"
3296 "<include name=\"org/objectweb/asm/"
3297 "signature/*.class\"/>"
3298 "<include name=\"org/objectweb/asm/"
3299 "commons/SignatureRemapper.class\"/>")))
3300 #t))
3301 (replace 'install
3302 (lambda* (#:key outputs #:allow-other-keys)
3303 (let ((target (string-append (assoc-ref outputs "out")
3304 "/share/java")))
3305 (install-file (string-append "dist/jarjar-" ,version ".jar")
3306 target))
3307 #t)))))
3308 (inputs
3309 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3310 (native-inputs
3311 `(("unzip" ,unzip)))
3312 (home-page "https://code.google.com/archive/p/jarjar/")
3313 (synopsis "Repackage Java libraries")
3314 (description
3315 "Jar Jar Links is a utility that makes it easy to repackage Java
3316 libraries and embed them into your own distribution. Jar Jar Links includes
3317 an Ant task that extends the built-in @code{jar} task.")
3318 (license license:asl2.0)))
3319
3320 (define-public java-hamcrest-core
3321 (package
3322 (name "java-hamcrest-core")
3323 (version "1.3")
3324 (source (origin
3325 (method url-fetch)
3326 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3327 "archive/hamcrest-java-" version ".tar.gz"))
3328 (sha256
3329 (base32
3330 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3331 (modules '((guix build utils)))
3332 (snippet
3333 '(begin
3334 ;; Delete bundled thirds-party jar archives.
3335 (delete-file-recursively "lib")
3336 #t))))
3337 (build-system ant-build-system)
3338 (arguments
3339 `(#:tests? #f ; Tests require junit
3340 #:modules ((guix build ant-build-system)
3341 (guix build utils)
3342 (srfi srfi-1))
3343 #:make-flags (list (string-append "-Dversion=" ,version))
3344 #:test-target "unit-test"
3345 #:build-target "core"
3346 #:phases
3347 (modify-phases %standard-phases
3348 ;; Disable unit tests, because they require junit, which requires
3349 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3350 ;; attribute from the manifest for reproducibility.
3351 (add-before 'configure 'patch-build.xml
3352 (lambda _
3353 (substitute* "build.xml"
3354 (("unit-test, ") "")
3355 (("\\$\\{build.timestamp\\}") "guix"))
3356 #t))
3357 ;; Java's "getMethods()" returns methods in an unpredictable order.
3358 ;; To make the output of the generated code deterministic we must
3359 ;; sort the array of methods.
3360 (add-after 'unpack 'make-method-order-deterministic
3361 (lambda _
3362 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3363 (("import java\\.util\\.Iterator;" line)
3364 (string-append line "\n"
3365 "import java.util.Arrays; import java.util.Comparator;"))
3366 (("allMethods = cls\\.getMethods\\(\\);" line)
3367 (string-append "_" line
3368 "
3369 private Method[] getSortedMethods() {
3370 Arrays.sort(_allMethods, new Comparator<Method>() {
3371 @Override
3372 public int compare(Method a, Method b) {
3373 return a.toString().compareTo(b.toString());
3374 }
3375 });
3376 return _allMethods;
3377 }
3378
3379 private Method[] allMethods = getSortedMethods();")))
3380 #t))
3381 (add-before 'build 'do-not-use-bundled-qdox
3382 (lambda* (#:key inputs #:allow-other-keys)
3383 (substitute* "build.xml"
3384 (("lib/generator/qdox-1.12.jar")
3385 (string-append (assoc-ref inputs "java-qdox-1.12")
3386 "/share/java/qdox.jar")))
3387 #t))
3388 ;; build.xml searches for .jar files in this directoy, which
3389 ;; we remove from the source archive.
3390 (add-before 'build 'create-dummy-directories
3391 (lambda _
3392 (mkdir-p "lib/integration")
3393 #t))
3394 (replace 'install
3395 (lambda* (#:key outputs #:allow-other-keys)
3396 (let* ((target (string-append (assoc-ref outputs "out")
3397 "/share/java/"))
3398 (version-suffix ,(string-append "-" version ".jar"))
3399 (install-without-version-suffix
3400 (lambda (jar)
3401 (copy-file jar
3402 (string-append target
3403 (basename jar version-suffix)
3404 ".jar")))))
3405 (mkdir-p target)
3406 (for-each
3407 install-without-version-suffix
3408 (find-files "build"
3409 (lambda (name _)
3410 (and (string-suffix? ".jar" name)
3411 (not (string-suffix? "-sources.jar" name)))))))
3412 #t)))))
3413 (native-inputs
3414 `(("java-qdox-1.12" ,java-qdox-1.12)
3415 ("java-jarjar" ,java-jarjar)))
3416 (home-page "http://hamcrest.org/")
3417 (synopsis "Library of matchers for building test expressions")
3418 (description
3419 "This package provides a library of matcher objects (also known as
3420 constraints or predicates) allowing @code{match} rules to be defined
3421 declaratively, to be used in other frameworks. Typical scenarios include
3422 testing frameworks, mocking libraries and UI validation rules.")
3423 (license license:bsd-2)))
3424
3425 (define-public java-junit
3426 (package
3427 (name "java-junit")
3428 (version "4.12")
3429 (source (origin
3430 (method url-fetch)
3431 (uri (string-append "https://github.com/junit-team/junit/"
3432 "archive/r" version ".tar.gz"))
3433 (file-name (string-append name "-" version ".tar.gz"))
3434 (sha256
3435 (base32
3436 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3437 (modules '((guix build utils)))
3438 (snippet
3439 '(begin
3440 ;; Delete bundled jar archives.
3441 (delete-file-recursively "lib")
3442 #t))))
3443 (build-system ant-build-system)
3444 (arguments
3445 `(#:tests? #f ; no tests
3446 #:jar-name "junit.jar"))
3447 (inputs
3448 `(("java-hamcrest-core" ,java-hamcrest-core)))
3449 (home-page "http://junit.org/")
3450 (synopsis "Test framework for Java")
3451 (description
3452 "JUnit is a simple framework to write repeatable tests for Java projects.
3453 JUnit provides assertions for testing expected results, test fixtures for
3454 sharing common test data, and test runners for running tests.")
3455 (license license:epl1.0)))
3456
3457 (define-public java-plexus-utils
3458 (package
3459 (name "java-plexus-utils")
3460 (version "3.2.0")
3461 (source (origin
3462 (method url-fetch)
3463 (uri (string-append "https://github.com/codehaus-plexus/"
3464 "plexus-utils/archive/plexus-utils-"
3465 version ".tar.gz"))
3466 (sha256
3467 (base32
3468 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3469 (build-system ant-build-system)
3470 ;; FIXME: The default build.xml does not include a target to install
3471 ;; javadoc files.
3472 (arguments
3473 `(#:jar-name "plexus-utils.jar"
3474 #:source-dir "src/main"
3475 #:phases
3476 (modify-phases %standard-phases
3477 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3478 (lambda _
3479 (substitute* "src/main/java/org/codehaus/plexus/util/\
3480 cli/shell/BourneShell.java"
3481 (("/bin/sh") (which "sh"))
3482 (("/usr/") (getcwd)))
3483 #t))
3484 (add-after 'unpack 'fix-or-disable-broken-tests
3485 (lambda _
3486 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3487 (substitute* '("cli/CommandlineTest.java"
3488 "cli/shell/BourneShellTest.java")
3489 (("/bin/sh") (which "sh"))
3490 (("/bin/echo") (which "echo")))
3491
3492 ;; This test depends on MavenProjectStub, but we don't have
3493 ;; a package for Maven.
3494 (delete-file "introspection/ReflectionValueExtractorTest.java")
3495
3496 ;; FIXME: The command line tests fail, maybe because they use
3497 ;; absolute paths.
3498 (delete-file "cli/CommandlineTest.java"))
3499 #t)))))
3500 (native-inputs
3501 `(("java-hamcrest-core" ,java-hamcrest-core)
3502 ("java-junit" ,java-junit)))
3503 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3504 (synopsis "Common utilities for the Plexus framework")
3505 (description "This package provides various Java utility classes for the
3506 Plexus framework to ease working with strings, files, command lines, XML and
3507 more.")
3508 (license license:asl2.0)))
3509
3510 (define-public java-plexus-interpolation
3511 (package
3512 (name "java-plexus-interpolation")
3513 (version "1.23")
3514 (source (origin
3515 (method url-fetch)
3516 (uri (string-append "https://github.com/codehaus-plexus/"
3517 "plexus-interpolation/archive/"
3518 "plexus-interpolation-" version ".tar.gz"))
3519 (sha256
3520 (base32
3521 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3522 (build-system ant-build-system)
3523 (arguments
3524 `(#:jar-name "plexus-interpolation.jar"
3525 #:source-dir "src/main"))
3526 (native-inputs
3527 `(("java-junit" ,java-junit)
3528 ("java-hamcrest-core" ,java-hamcrest-core)))
3529 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3530 (synopsis "Java components for interpolating ${} strings and the like")
3531 (description "Plexus interpolator is a modular, flexible interpolation
3532 framework for the expression language style commonly seen in Maven, Plexus,
3533 and other related projects.
3534
3535 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3536 package within @code{plexus-utils}, but has been separated in order to allow
3537 these two libraries to vary independently of one another.")
3538 (license license:asl2.0)))
3539
3540 (define-public java-plexus-classworlds
3541 (package
3542 (name "java-plexus-classworlds")
3543 (version "2.5.2")
3544 (source (origin
3545 (method url-fetch)
3546 (uri (string-append "https://github.com/codehaus-plexus/"
3547 "plexus-classworlds/archive/plexus-classworlds-"
3548 version ".tar.gz"))
3549 (sha256
3550 (base32
3551 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3552 (build-system ant-build-system)
3553 (arguments
3554 `(#:jar-name "plexus-classworlds.jar"
3555 #:source-dir "src/main"
3556 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3557 (native-inputs
3558 `(("java-junit" ,java-junit)))
3559 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3560 (synopsis "Java class loader framework")
3561 (description "Plexus classworlds replaces the native @code{ClassLoader}
3562 mechanism of Java. It is especially useful for dynamic loading of application
3563 components.")
3564 (license license:asl2.0)))
3565
3566 (define java-plexus-container-default-bootstrap
3567 (package
3568 (name "java-plexus-container-default-bootstrap")
3569 (version "1.7.1")
3570 (source (origin
3571 (method url-fetch)
3572 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3573 "/archive/plexus-containers-" version ".tar.gz"))
3574 (sha256
3575 (base32
3576 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3577 (build-system ant-build-system)
3578 (arguments
3579 `(#:jar-name "container-default.jar"
3580 #:source-dir "plexus-container-default/src/main/java"
3581 #:test-dir "plexus-container-default/src/test"
3582 #:jdk ,icedtea-8
3583 #:tests? #f; requires plexus-archiver, which depends on this package
3584 #:phases
3585 (modify-phases %standard-phases
3586 (add-before 'build 'copy-resources
3587 (lambda _
3588 (copy-recursively
3589 "plexus-container-default/src/main/resources/"
3590 "build/classes")
3591 #t)))))
3592 (inputs
3593 `(("worldclass" ,java-plexus-classworlds)
3594 ("xbean" ,java-geronimo-xbean-reflect)
3595 ("utils" ,java-plexus-utils)
3596 ("junit" ,java-junit)
3597 ("guava" ,java-guava)))
3598 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3599 (synopsis "Inversion-of-control container")
3600 (description "Plexus-default-container is Plexus' inversion-of-control
3601 (@dfn{IoC}) container. It is composed of its public API and its default
3602 implementation.")
3603 (license license:asl2.0)))
3604
3605 (define-public java-plexus-io
3606 (package
3607 (name "java-plexus-io")
3608 (version "3.0.0")
3609 (source (origin
3610 (method url-fetch)
3611 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3612 "/archive/plexus-io-" version ".tar.gz"))
3613 (sha256
3614 (base32
3615 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3616 (build-system ant-build-system)
3617 (arguments
3618 `(#:jar-name "plexus-io.jar"
3619 #:source-dir "src/main/java"
3620 #:test-dir "src/test"
3621 #:jdk ,icedtea-8
3622 #:phases
3623 (modify-phases %standard-phases
3624 (add-before 'build 'copy-resources
3625 (lambda _
3626 (mkdir-p "build/classes/META-INF/plexus")
3627 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3628 "build/classes/META-INF/plexus/components.xml")
3629 #t)))))
3630 (inputs
3631 `(("utils" ,java-plexus-utils)
3632 ("commons-io" ,java-commons-io)
3633 ("java-jsr305" ,java-jsr305)))
3634 (native-inputs
3635 `(("junit" ,java-junit)
3636 ("hamcrest" ,java-hamcrest-core)
3637 ("guava" ,java-guava)
3638 ("classworlds" ,java-plexus-classworlds)
3639 ("xbean" ,java-geronimo-xbean-reflect)
3640 ("container-default" ,java-plexus-container-default-bootstrap)))
3641 (home-page "https://github.com/codehaus-plexus/plexus-io")
3642 (synopsis "I/O plexus components")
3643 (description "Plexus IO is a set of plexus components, which are designed
3644 for use in I/O operations. This implementation using plexus components allows
3645 reusing it in maven.")
3646 (license license:asl2.0)))
3647
3648 (define-public java-plexus-archiver
3649 (package
3650 (name "java-plexus-archiver")
3651 (version "4.1.0")
3652 (source (origin
3653 (method url-fetch)
3654 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3655 "/archive/plexus-archiver-" version ".tar.gz"))
3656 (sha256
3657 (base32
3658 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3659 (build-system ant-build-system)
3660 (arguments
3661 `(#:jar-name "plexus-archiver.jar"
3662 #:source-dir "src/main/java"
3663 #:jdk ,icedtea-8
3664 #:test-dir "src/test"
3665 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3666 #:phases
3667 (modify-phases %standard-phases
3668 (add-before 'check 'remove-failing
3669 (lambda _
3670 ;; Requires an older version of plexus container
3671 (delete-file
3672 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3673 #t))
3674 (add-before 'check 'fix-test-building
3675 (lambda _
3676 (substitute* "build.xml"
3677 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3678 #t))
3679 (add-before 'build 'copy-resources
3680 (lambda _
3681 (mkdir-p "build/classes/META-INF/plexus")
3682 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3683 "build/classes/META-INF/plexus/components.xml")
3684 #t)))))
3685 (inputs
3686 `(("utils" ,java-plexus-utils)
3687 ("commons-io" ,java-commons-io)
3688 ("snappy" ,java-iq80-snappy)
3689 ("io" ,java-plexus-io)
3690 ("compress" ,java-commons-compress)
3691 ("container-default" ,java-plexus-container-default-bootstrap)
3692 ("snappy" ,java-snappy)
3693 ("java-jsr305" ,java-jsr305)))
3694 (native-inputs
3695 `(("java-hamcrest-core" ,java-hamcrest-core)
3696 ("junit" ,java-junit)
3697 ("classworld" ,java-plexus-classworlds)
3698 ("xbean" ,java-geronimo-xbean-reflect)
3699 ("xz" ,java-tukaani-xz)
3700 ("guava" ,java-guava)))
3701 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3702 (synopsis "Archiver component of the Plexus project")
3703 (description "Plexus-archiver contains a component to deal with project
3704 archives (jar).")
3705 (license license:asl2.0)))
3706
3707 (define-public java-plexus-container-default
3708 (package
3709 (inherit java-plexus-container-default-bootstrap)
3710 (name "java-plexus-container-default")
3711 (arguments
3712 `(#:jar-name "container-default.jar"
3713 #:source-dir "plexus-container-default/src/main/java"
3714 #:test-dir "plexus-container-default/src/test"
3715 #:test-exclude (list ;"**/*Test.java"
3716 "**/Abstract*.java"
3717 ;; Requires plexus-hierarchy
3718 "**/PlexusHierarchyTest.java"
3719 ;; Failures
3720 "**/ComponentRealmCompositionTest.java"
3721 "**/PlexusContainerTest.java")
3722 #:jdk ,icedtea-8
3723 #:phases
3724 (modify-phases %standard-phases
3725 (add-before 'build 'copy-resources
3726 (lambda _
3727 (copy-recursively
3728 "plexus-container-default/src/main/resources/"
3729 "build/classes")
3730 #t))
3731 (add-before 'check 'fix-paths
3732 (lambda _
3733 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3734 (substitute*
3735 (string-append
3736 dir "/plexus/component/composition/"
3737 "ComponentRealmCompositionTest.java")
3738 (("src/test") "plexus-container-default/src/test"))
3739 #t))))))
3740 (inputs
3741 `(("worldclass" ,java-plexus-classworlds)
3742 ("xbean" ,java-geronimo-xbean-reflect)
3743 ("utils" ,java-plexus-utils)
3744 ("junit" ,java-junit)
3745 ("guava" ,java-guava)))
3746 (native-inputs
3747 `(("archiver" ,java-plexus-archiver)
3748 ("hamcrest" ,java-hamcrest-core)))))
3749
3750 (define-public java-plexus-component-annotations
3751 (package
3752 (inherit java-plexus-container-default)
3753 (name "java-plexus-component-annotations")
3754 (arguments
3755 `(#:jar-name "plexus-component-annotations.jar"
3756 #:source-dir "plexus-component-annotations/src/main/java"
3757 #:tests? #f)); no tests
3758 (inputs '())
3759 (native-inputs '())
3760 (synopsis "Plexus descriptors generator")
3761 (description "This package is a Maven plugin to generate Plexus descriptors
3762 from source tags and class annotations.")))
3763
3764 (define-public java-plexus-cipher
3765 (package
3766 (name "java-plexus-cipher")
3767 (version "1.7")
3768 (source (origin
3769 (method url-fetch)
3770 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3771 "/archive/plexus-cipher-" version ".tar.gz"))
3772 (sha256
3773 (base32
3774 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3775 (build-system ant-build-system)
3776 (arguments
3777 `(#:jar-name "plexus-cipher.jar"
3778 #:source-dir "src/main/java"
3779 #:jdk ,icedtea-8
3780 #:tests? #f; FIXME: requires sisu-inject-bean
3781 #:phases
3782 (modify-phases %standard-phases
3783 (add-before 'build 'copy-resources
3784 (lambda _
3785 (copy-recursively "src/main/resources" "build/classes")
3786 (mkdir-p "build/classes/META-INF/sisu")
3787 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3788 (lambda _
3789 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3790 #t)))))
3791 (inputs
3792 `(("java-cdi-api" ,java-cdi-api)
3793 ("java-javax-inject" ,java-javax-inject)))
3794 (home-page "https://github.com/sonatype/plexus-cipher")
3795 (synopsis "Encryption/decryption Component")
3796 (description "Plexus-cipher contains a component to deal with encryption
3797 and decryption.")
3798 (license license:asl2.0)))
3799
3800 (define-public java-plexus-compiler-api
3801 (package
3802 (name "java-plexus-compiler-api")
3803 (version "2.8.4")
3804 (source (origin
3805 (method url-fetch)
3806 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3807 "/archive/plexus-compiler-" version ".tar.gz"))
3808 (sha256
3809 (base32
3810 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3811 (build-system ant-build-system)
3812 (arguments
3813 `(#:jar-name "plexus-compiler-api.jar"
3814 #:source-dir "plexus-compiler-api/src/main/java"
3815 #:jdk ,icedtea-8
3816 #:test-dir "plexus-compiler-api/src/test"))
3817 (inputs
3818 `(("java-plexus-container-default" ,java-plexus-container-default)
3819 ("java-plexus-util" ,java-plexus-utils)))
3820 (native-inputs
3821 `(("java-junit" ,java-junit)))
3822 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3823 (synopsis "Plexus Compilers component's API to manipulate compilers")
3824 (description "This package contains the API used by components to manipulate
3825 compilers.")
3826 (license (list license:asl2.0
3827 license:expat))))
3828
3829 (define-public java-plexus-compiler-javac
3830 (package
3831 (inherit java-plexus-compiler-api)
3832 (name "java-plexus-compiler-javac")
3833 (arguments
3834 `(#:jar-name "plexus-compiler-javac.jar"
3835 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3836 #:jdk ,icedtea-8
3837 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3838 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3839 (inputs
3840 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3841 ("java-plexus-utils" ,java-plexus-utils)
3842 ("java-plexus-container-default" ,java-plexus-container-default)))
3843 (native-inputs
3844 `(("java-junit" ,java-junit)))
3845 (synopsis "Javac Compiler support for Plexus Compiler component")
3846 (description "This package contains the Javac Compiler support for Plexus
3847 Compiler component.")))
3848
3849 (define-public java-plexus-sec-dispatcher
3850 (package
3851 (name "java-plexus-sec-dispatcher")
3852 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3853 (source (origin
3854 ;; This project doesn't tag releases or publish tarballs, so we take
3855 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3856 (method url-fetch)
3857 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3858 "archive/7db8f88048.tar.gz"))
3859 (sha256
3860 (base32
3861 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3862 (file-name (string-append name "-" version ".tar.gz"))))
3863 (arguments
3864 `(#:jar-name "plexus-sec-dispatcher.jar"
3865 #:source-dir "src/main/java"
3866 #:jdk ,icedtea-8
3867 #:phases
3868 (modify-phases %standard-phases
3869 (add-before 'build 'generate-models
3870 (lambda* (#:key inputs #:allow-other-keys)
3871 (define (modello-single-mode file version mode)
3872 (invoke "java"
3873 "org.codehaus.modello.ModelloCli"
3874 file mode "src/main/java" version
3875 "false" "true"))
3876 (let ((file "src/main/mdo/settings-security.mdo"))
3877 (modello-single-mode file "1.0.0" "java")
3878 (modello-single-mode file "1.0.0" "xpp3-reader")
3879 (modello-single-mode file "1.0.0" "xpp3-writer"))
3880 #t))
3881 (add-before 'build 'generate-components.xml
3882 (lambda _
3883 (mkdir-p "build/classes/META-INF/plexus")
3884 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3885 (lambda _
3886 (display
3887 "<component-set>\n
3888 <components>\n
3889 <component>\n
3890 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3891 <role-hint>default</role-hint>\n
3892 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3893 <description></description>\n
3894 <requirements>\n
3895 <requirement>\n
3896 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3897 <field-name>_cipher</field-name>\n
3898 </requirement>\n
3899 <requirement>\n
3900 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3901 <field-name>_decryptors</field-name>\n
3902 </requirement>\n
3903 </requirements>\n
3904 <configuration>\n
3905 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3906 </configuration>\n
3907 </component>\n
3908 </components>\n
3909 </component-set>\n")))
3910 #t))
3911 (add-before 'check 'fix-paths
3912 (lambda _
3913 (copy-recursively "src/test/resources" "target")
3914 #t)))))
3915 (inputs
3916 `(("java-plexus-cipher" ,java-plexus-cipher)))
3917 (native-inputs
3918 `(("java-modello-core" ,java-modello-core)
3919 ;; for modello:
3920 ("java-plexus-container-default" ,java-plexus-container-default)
3921 ("java-plexus-classworlds" ,java-plexus-classworlds)
3922 ("java-plexus-utils" ,java-plexus-utils)
3923 ("java-guava" ,java-guava)
3924 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3925 ("java-sisu-build-api" ,java-sisu-build-api)
3926 ;; modello plugins:
3927 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3928 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3929 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3930 ;; for tests
3931 ("java-junit" ,java-junit)))
3932 (build-system ant-build-system)
3933 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3934 (synopsis "Plexus Security Dispatcher Component")
3935 (description "This package is the Plexus Security Dispatcher Component.
3936 This component decrypts a string passed to it.")
3937 (license license:asl2.0)))
3938
3939 (define-public java-plexus-cli
3940 (package
3941 (name "java-plexus-cli")
3942 (version "1.7")
3943 (source (origin
3944 (method git-fetch)
3945 (uri (git-reference
3946 (url "https://github.com/sonatype/plexus-cli")
3947 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3948 (file-name (string-append name "-" version))
3949 (sha256
3950 (base32
3951 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3952 (build-system ant-build-system)
3953 (arguments
3954 `(#:jar-name "plexus-cli.jar"
3955 #:source-dir "src/main/java"
3956 #:jdk ,icedtea-8
3957 #:test-dir "src/test"))
3958 (inputs
3959 `(("java-commons-cli" ,java-commons-cli)
3960 ("java-plexus-container-default" ,java-plexus-container-default)
3961 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3962 (native-inputs
3963 `(("java-plexus-utils" ,java-plexus-utils)
3964 ("java-junit" ,java-junit)
3965 ("java-guava" ,java-guava)))
3966 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3967 (synopsis "CLI building library for plexus")
3968 (description "This package is a library to help creating CLI around
3969 Plexus components.")
3970 (license license:asl2.0)))
3971
3972 (define-public java-sisu-build-api
3973 (package
3974 (name "java-sisu-build-api")
3975 (version "0.0.7")
3976 (source (origin
3977 (method url-fetch)
3978 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3979 "archive/plexus-build-api-" version ".tar.gz"))
3980 (sha256
3981 (base32
3982 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3983 (build-system ant-build-system)
3984 (arguments
3985 `(#:jar-name "sisu-build-api.jar"
3986 #:source-dir "src/main/java"
3987 #:jdk ,icedtea-8
3988 #:tests? #f; FIXME: how to run the tests?
3989 #:phases
3990 (modify-phases %standard-phases
3991 (add-before 'build 'copy-resources
3992 (lambda _
3993 (copy-recursively "src/main/resources" "build/classes")
3994 (substitute* (find-files "build/classes")
3995 (("\\$\\{project.version\\}") ,version))
3996 #t))
3997 (add-before 'build 'generate-plexus-compontent
3998 (lambda _
3999 (mkdir-p "build/classes/META-INF/plexus")
4000 ;; This file is required for plexus to inject this package.
4001 ;; FIXME: how is it generated?
4002 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4003 (lambda _
4004 (display
4005 "<component-set>\n
4006 <components>\n
4007 <component>\n
4008 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4009 <role-hint>default</role-hint>\n
4010 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4011 <description>Filesystem based non-incremental build context implementation\n
4012 which behaves as if all files were just created.</description>\n
4013 </component>\n
4014 </components>\n
4015 </component-set>\n")))
4016 #t)))))
4017 (inputs
4018 `(("java-plexus-utils" ,java-plexus-utils)
4019 ("java-plexus-container-default" ,java-plexus-container-default)))
4020 (home-page "https://github.com/sonatype/sisu-build-api/")
4021 (synopsis "Base build API for maven")
4022 (description "This package contains the base build API for maven and
4023 a default implementation of it. This API is about scanning files in a
4024 project and determining what files need to be rebuilt.")
4025 (license license:asl2.0)))
4026
4027 (define-public java-modello-core
4028 (package
4029 (name "java-modello-core")
4030 (version "1.9.1")
4031 (source (origin
4032 (method url-fetch)
4033 (uri (string-append "https://github.com/codehaus-plexus/modello"
4034 "/archive/modello-" version ".tar.gz"))
4035 (sha256
4036 (base32
4037 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4038 (build-system ant-build-system)
4039 (arguments
4040 `(#:jar-name "modello-core.jar"
4041 #:source-dir "modello-core/src/main/java"
4042 #:test-dir "modello-core/src/test"
4043 #:main-class "org.codehaus.modello.ModelloCli"
4044 #:jdk ,icedtea-8
4045 #:phases
4046 (modify-phases %standard-phases
4047 (add-before 'build 'copy-resources
4048 (lambda _
4049 (mkdir-p "build/classes/META-INF/plexus")
4050 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4051 "build/classes/META-INF/plexus/components.xml")
4052 #t))
4053 (add-before 'check 'fix-tests
4054 (lambda _
4055 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4056 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4057 "modello/core/io/ModelReaderTest.java")
4058 (("src/test") "modello-core/src/test")))
4059 #t)))))
4060 (inputs
4061 `(("java-plexus-utils" ,java-plexus-utils)
4062 ("java-plexus-container-default" ,java-plexus-container-default)
4063 ("java-sisu-build-api" ,java-sisu-build-api)))
4064 (native-inputs
4065 `(("java-junit" ,java-junit)
4066 ("java-plexus-classworlds" ,java-plexus-classworlds)
4067 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4068 ("java-guava" ,java-guava)))
4069 (home-page "http://codehaus-plexus.github.io/modello/")
4070 (synopsis "Framework for code generation from a simple model")
4071 (description "Modello is a framework for code generation from a simple model.
4072
4073 Modello generates code from a simple model format: based on a plugin
4074 architecture, various types of code and descriptors can be generated from the
4075 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4076 XSD and documentation.")
4077 (license (list
4078 license:expat
4079 ;; Although this package uses only files licensed under expat,
4080 ;; other parts of the source are licensed under different
4081 ;; licenses. We include them to be inherited by other packages.
4082 license:asl2.0
4083 ;; Some files in modello-plugin-java are licensed under a
4084 ;; 5-clause BSD license.
4085 (license:non-copyleft
4086 (string-append "file:///modello-plugins/modello-plugin-java/"
4087 "src/main/java/org/codehaus/modello/plugin/"
4088 "java/javasource/JNaming.java"))))))
4089
4090 (define-public java-modello-plugins-java
4091 (package
4092 (inherit java-modello-core)
4093 (name "java-modello-plugins-java")
4094 (arguments
4095 `(#:jar-name "modello-plugins-java.jar"
4096 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4097 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4098 #:jdk ,icedtea-8
4099 #:tests? #f; requires maven-model, which depends on this package
4100 #:phases
4101 (modify-phases %standard-phases
4102 (add-before 'build 'copy-resources
4103 (lambda _
4104 (mkdir-p "build/classes")
4105 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4106 "build/classes")
4107 #t)))))
4108 (inputs
4109 `(("java-modello-core" ,java-modello-core)
4110 ,@(package-inputs java-modello-core)))
4111 (synopsis "Modello Java Plugin")
4112 (description "Modello Java Plugin generates Java objects for the model.")))
4113
4114 (define-public java-modello-plugins-xml
4115 (package
4116 (inherit java-modello-core)
4117 (name "java-modello-plugins-xml")
4118 (arguments
4119 `(#:jar-name "modello-plugins-xml.jar"
4120 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4121 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4122 #:jdk ,icedtea-8
4123 #:phases
4124 (modify-phases %standard-phases
4125 (add-before 'build 'copy-resources
4126 (lambda _
4127 (mkdir-p "build/classes")
4128 (copy-recursively
4129 "modello-plugins/modello-plugin-xml/src/main/resources"
4130 "build/classes")
4131 #t))
4132 (add-before 'check 'fix-paths
4133 (lambda _
4134 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4135 (substitute*
4136 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4137 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4138 #t)))))
4139 (inputs
4140 `(("java-modello-core" ,java-modello-core)
4141 ("java-modello-plugins-java" ,java-modello-plugins-java)
4142 ,@(package-inputs java-modello-core)))
4143 (synopsis "Modello XML Plugin")
4144 (description "Modello XML Plugin contains shared code for every plugins
4145 working on XML representation of the model.")))
4146
4147 (define-public java-modello-test
4148 (package
4149 (inherit java-modello-core)
4150 (name "java-modello-test")
4151 (arguments
4152 `(#:jar-name "modello-test.jar"
4153 #:source-dir "modello-test/src/main/java"
4154 #:tests? #f; no tests
4155 #:jdk ,icedtea-8))
4156 (inputs
4157 `(("java-plexus-utils" ,java-plexus-utils)
4158 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4159 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4160 ("java-plexus-container-default" ,java-plexus-container-default)))
4161 (synopsis "Modello test package")
4162 (description "The modello test package contains the basis to create
4163 Modello generator unit-tests, including sample models and xml files to test
4164 every feature for every plugin.")))
4165
4166 (define-public java-modello-plugins-xpp3
4167 (package
4168 (inherit java-modello-core)
4169 (name "java-modello-plugins-xpp3")
4170 (arguments
4171 `(#:jar-name "modello-plugins-xpp3.jar"
4172 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4173 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4174 ;; One of the test dependencies is maven-model which depends on this package.
4175 #:tests? #f
4176 #:jdk ,icedtea-8
4177 #:phases
4178 (modify-phases %standard-phases
4179 (add-before 'build 'copy-resources
4180 (lambda _
4181 (mkdir-p "build/classes")
4182 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4183 "build/classes")
4184 #t)))))
4185 (inputs
4186 `(("java-modello-core" ,java-modello-core)
4187 ("java-modello-plugins-java" ,java-modello-plugins-java)
4188 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4189 ,@(package-inputs java-modello-core)))
4190 (native-inputs
4191 `(("java-xmlunit" ,java-xmlunit)
4192 ("java-modello-test" ,java-modello-test)
4193 ,@(package-native-inputs java-modello-core)))
4194 (synopsis "Modello XPP3 Plugin")
4195 (description "The modello XPP3 plugin generates XML readers and writers based
4196 on the XPP3 API (XML Pull Parser).")))
4197
4198 (define-public java-asm
4199 (package
4200 (name "java-asm")
4201 (version "6.0")
4202 (source (origin
4203 (method url-fetch)
4204 (uri (string-append "http://download.forge.ow2.org/asm/"
4205 "asm-" version ".tar.gz"))
4206 (sha256
4207 (base32
4208 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4209 (build-system ant-build-system)
4210 (propagated-inputs
4211 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4212 ("java-aqute-libg" ,java-aqute-libg)))
4213 (arguments
4214 `(#:build-target "compile"
4215 ;; The tests require an old version of Janino, which no longer compiles
4216 ;; with the JDK7.
4217 #:tests? #f
4218 #:make-flags
4219 (list
4220 ;; We don't need these extra ant tasks, but the build system asks us to
4221 ;; provide a path anyway.
4222 "-Dobjectweb.ant.tasks.path=dummy-path"
4223 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4224 ;; used during the build automatically by ant-build-system, but
4225 ;; java-asm's build.xml fails unless we provide something here.
4226 "-Dbiz.aQute.bnd.path=dummy-path")
4227 #:phases
4228 (modify-phases %standard-phases
4229 (add-before 'install 'build-jars
4230 (lambda* (#:key make-flags #:allow-other-keys)
4231 ;; We cannot use the "jar" target because it depends on a couple
4232 ;; of unpackaged, complicated tools.
4233 (mkdir "dist")
4234 (invoke "jar"
4235 "-cf" (string-append "dist/asm-" ,version ".jar")
4236 "-C" "output/build/tmp" ".")))
4237 (replace 'install
4238 (install-jars "dist")))))
4239 (native-inputs
4240 `(("java-junit" ,java-junit)))
4241 (home-page "http://asm.ow2.org/")
4242 (synopsis "Very small and fast Java bytecode manipulation framework")
4243 (description "ASM is an all purpose Java bytecode manipulation and
4244 analysis framework. It can be used to modify existing classes or dynamically
4245 generate classes, directly in binary form. The provided common
4246 transformations and analysis algorithms allow to easily assemble custom
4247 complex transformations and code analysis tools.")
4248 (license license:bsd-3)))
4249
4250 (define java-asm-bootstrap
4251 (package
4252 (inherit java-asm)
4253 (name "java-asm-bootstrap")
4254 (arguments
4255 (substitute-keyword-arguments (package-arguments java-asm)
4256 ((#:tests? _) #f)))
4257 (native-inputs `())
4258 (propagated-inputs
4259 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4260 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4261 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4262 (delete `("java-aqute-libg" ,java-aqute-libg)
4263 (package-inputs java-asm)))))))
4264
4265 (define-public java-cglib
4266 (package
4267 (name "java-cglib")
4268 (version "3.2.4")
4269 (source
4270 (origin
4271 (method git-fetch)
4272 (uri (git-reference
4273 (url "https://github.com/cglib/cglib.git")
4274 (commit (string-append
4275 "RELEASE_"
4276 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4277 version)))))
4278 (file-name (git-file-name name version))
4279 (sha256
4280 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4281 (build-system ant-build-system)
4282 (arguments
4283 `(;; FIXME: tests fail because junit runs
4284 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4285 ;; to describe a test at all.
4286 #:tests? #f
4287 #:jar-name "cglib.jar"
4288 #:phases
4289 (modify-phases %standard-phases
4290 (add-after 'unpack 'chdir
4291 (lambda _ (chdir "cglib") #t)))))
4292 (inputs
4293 `(("java-asm" ,java-asm)
4294 ("java-junit" ,java-junit)))
4295 (home-page "https://github.com/cglib/cglib/")
4296 (synopsis "Java byte code generation library")
4297 (description "The byte code generation library CGLIB is a high level API
4298 to generate and transform Java byte code.")
4299 (license license:asl2.0)))
4300
4301 (define-public java-objenesis
4302 (package
4303 (name "java-objenesis")
4304 (version "2.5.1")
4305 (source (origin
4306 (method url-fetch)
4307 (uri (string-append "https://github.com/easymock/objenesis/"
4308 "archive/" version ".tar.gz"))
4309 (file-name (string-append "objenesis-" version ".tar.gz"))
4310 (sha256
4311 (base32
4312 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4313 (build-system ant-build-system)
4314 (arguments
4315 `(#:jar-name "objenesis.jar"
4316 #:source-dir "main/src/"
4317 #:test-dir "main/src/test/"))
4318 (native-inputs
4319 `(("java-junit" ,java-junit)
4320 ("java-hamcrest-core" ,java-hamcrest-core)))
4321 (home-page "http://objenesis.org/")
4322 (synopsis "Bypass the constructor when creating an object")
4323 (description "Objenesis is a small Java library that serves one purpose:
4324 to instantiate a new object of a particular class. It is common to see
4325 restrictions in libraries stating that classes must require a default
4326 constructor. Objenesis aims to overcome these restrictions by bypassing the
4327 constructor on object instantiation.")
4328 (license license:asl2.0)))
4329
4330 (define-public java-easymock
4331 (package
4332 (name "java-easymock")
4333 (version "3.4")
4334 (source (origin
4335 (method url-fetch)
4336 (uri (string-append "https://github.com/easymock/easymock/"
4337 "archive/easymock-" version ".tar.gz"))
4338 (sha256
4339 (base32
4340 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4341 (build-system ant-build-system)
4342 (arguments
4343 `(#:jar-name "easymock.jar"
4344 #:source-dir "core/src/main"
4345 #:test-dir "core/src/test"
4346 #:phases
4347 (modify-phases %standard-phases
4348 ;; FIXME: Android support requires the following packages to be
4349 ;; available: com.google.dexmaker.stock.ProxyBuilder
4350 (add-after 'unpack 'delete-android-support
4351 (lambda _
4352 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4353 (substitute* "MocksControl.java"
4354 (("AndroidSupport.isAndroid\\(\\)") "false")
4355 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4356 (delete-file "AndroidClassProxyFactory.java"))
4357 #t))
4358 (add-after 'unpack 'delete-broken-tests
4359 (lambda _
4360 (with-directory-excursion "core/src/test/java/org/easymock"
4361 ;; This test depends on dexmaker.
4362 (delete-file "tests2/ClassExtensionHelperTest.java")
4363
4364 ;; This is not a test.
4365 (delete-file "tests/BaseEasyMockRunnerTest.java")
4366
4367 ;; This test should be executed with a different runner...
4368 (delete-file "tests2/EasyMockAnnotationsTest.java")
4369 ;; ...but deleting it means that we also have to delete these
4370 ;; dependent files.
4371 (delete-file "tests2/EasyMockRunnerTest.java")
4372 (delete-file "tests2/EasyMockRuleTest.java")
4373
4374 ;; This test fails because the file "easymock.properties" does
4375 ;; not exist.
4376 (delete-file "tests2/EasyMockPropertiesTest.java"))
4377 #t)))))
4378 (inputs
4379 `(("java-asm" ,java-asm)
4380 ("java-cglib" ,java-cglib)
4381 ("java-objenesis" ,java-objenesis)))
4382 (native-inputs
4383 `(("java-junit" ,java-junit)
4384 ("java-hamcrest-core" ,java-hamcrest-core)))
4385 (home-page "http://easymock.org")
4386 (synopsis "Java library providing mock objects for unit tests")
4387 (description "EasyMock is a Java library that provides an easy way to use
4388 mock objects in unit testing.")
4389 (license license:asl2.0)))
4390
4391 (define-public java-jmock-1
4392 (package
4393 (name "java-jmock")
4394 (version "1.2.0")
4395 (source (origin
4396 (method url-fetch)
4397 (uri (string-append "https://github.com/jmock-developers/"
4398 "jmock-library/archive/" version ".tar.gz"))
4399 (file-name (string-append "jmock-" version ".tar.gz"))
4400 (sha256
4401 (base32
4402 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4403 (build-system ant-build-system)
4404 (arguments
4405 `(#:build-target "jars"
4406 #:test-target "run.tests"
4407 #:phases
4408 (modify-phases %standard-phases
4409 (replace 'install (install-jars "build")))))
4410 (home-page "http://www.jmock.org")
4411 (synopsis "Mock object library for test-driven development")
4412 (description "JMock is a library that supports test-driven development of
4413 Java code with mock objects. Mock objects help you design and test the
4414 interactions between the objects in your programs.
4415
4416 The jMock library
4417
4418 @itemize
4419 @item makes it quick and easy to define mock objects
4420 @item lets you precisely specify the interactions between
4421 your objects, reducing the brittleness of your tests
4422 @item plugs into your favourite test framework
4423 @item is easy to extend.
4424 @end itemize\n")
4425 (license license:bsd-3)))
4426
4427 (define-public java-jmock
4428 (package
4429 (inherit java-jmock-1)
4430 (name "java-jmock")
4431 (version "2.8.2")
4432 (source (origin
4433 (method url-fetch)
4434 (uri (string-append "https://github.com/jmock-developers/"
4435 "jmock-library/archive/" version ".tar.gz"))
4436 (file-name (string-append name "-" version ".tar.gz"))
4437 (sha256
4438 (base32
4439 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4440 (inputs
4441 `(("java-hamcrest-all" ,java-hamcrest-all)
4442 ("java-asm" ,java-asm)
4443 ("java-bsh" ,java-bsh)
4444 ("java-junit" ,java-junit)))
4445 (native-inputs
4446 `(("cglib" ,java-cglib)))
4447 (arguments
4448 `(#:jar-name "java-jmock.jar"
4449 #:source-dir "jmock/src/main/java"
4450 #:test-dir "jmock/src/test"))))
4451
4452 (define-public java-jmock-junit4
4453 (package
4454 (inherit java-jmock)
4455 (name "java-jmock-junit4")
4456 (arguments
4457 `(#:jar-name "java-jmock-junit4.jar"
4458 #:source-dir "jmock-junit4/src/main/java"
4459 #:test-dir "jmock-junit4/src/test"))
4460 (inputs
4461 `(("java-hamcrest-all" ,java-hamcrest-all)
4462 ("java-asm" ,java-asm)
4463 ("java-bsh" ,java-bsh)
4464 ("java-jmock" ,java-jmock)
4465 ("java-jumit" ,java-junit)))))
4466
4467 (define-public java-jmock-legacy
4468 (package
4469 (inherit java-jmock)
4470 (name "java-jmock-legacy")
4471 (arguments
4472 `(#:jar-name "java-jmock-legacy.jar"
4473 #:source-dir "jmock-legacy/src/main/java"
4474 #:test-dir "jmock-legacy/src/test"
4475 #:phases
4476 (modify-phases %standard-phases
4477 (add-before 'check 'copy-tests
4478 (lambda _
4479 ;; This file is a dependancy of some tests
4480 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4481 (copy-file (string-append "jmock/src/test/java/" file)
4482 (string-append "jmock-legacy/src/test/java/" file))
4483 #t))))))
4484 (inputs
4485 `(("java-hamcrest-all" ,java-hamcrest-all)
4486 ("java-objenesis" ,java-objenesis)
4487 ("java-cglib" ,java-cglib)
4488 ("java-jmock" ,java-jmock)
4489 ("java-asm" ,java-asm)
4490 ("java-bsh" ,java-bsh)
4491 ("java-junit" ,java-junit)))
4492 (native-inputs
4493 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4494
4495 (define-public java-hamcrest-all
4496 (package (inherit java-hamcrest-core)
4497 (name "java-hamcrest-all")
4498 (arguments
4499 `(#:jdk ,icedtea-8
4500 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4501 ((#:build-target _) "bigjar")
4502 ((#:phases phases)
4503 `(modify-phases ,phases
4504 ;; Some build targets override the classpath, so we need to patch
4505 ;; the build.xml to ensure that required dependencies are on the
4506 ;; classpath.
4507 (add-after 'unpack 'patch-classpath-for-integration
4508 (lambda* (#:key inputs #:allow-other-keys)
4509 (substitute* "build.xml"
4510 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4511 (string-join
4512 (cons line
4513 (append
4514 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4515 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4516 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4517 ";"))
4518 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4519 (string-append (assoc-ref inputs "java-hamcrest-core")
4520 "/share/java/hamcrest-core.jar")))
4521 #t)))))))
4522 (inputs
4523 `(("java-junit" ,java-junit)
4524 ("java-jmock" ,java-jmock-1)
4525 ;; This is necessary because of what seems to be a race condition.
4526 ;; This package would sometimes fail to build because hamcrest-core.jar
4527 ;; could not be found, even though it is built as part of this package.
4528 ;; Adding java-hamcrest-core appears to fix this problem. See
4529 ;; https://debbugs.gnu.org/31390 for more information.
4530 ("java-hamcrest-core" ,java-hamcrest-core)
4531 ("java-easymock" ,java-easymock)
4532 ,@(package-inputs java-hamcrest-core)))))
4533
4534 (define-public java-jopt-simple
4535 (package
4536 (name "java-jopt-simple")
4537 (version "5.0.3")
4538 (source (origin
4539 (method url-fetch)
4540 (uri (string-append "http://repo1.maven.org/maven2/"
4541 "net/sf/jopt-simple/jopt-simple/"
4542 version "/jopt-simple-"
4543 version "-sources.jar"))
4544 (sha256
4545 (base32
4546 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4547 (build-system ant-build-system)
4548 (arguments
4549 `(#:tests? #f ; there are no tests
4550 #:jar-name "jopt-simple.jar"))
4551 (home-page "https://pholser.github.io/jopt-simple/")
4552 (synopsis "Java library for parsing command line options")
4553 (description "JOpt Simple is a Java library for parsing command line
4554 options, such as those you might pass to an invocation of @code{javac}. In
4555 the interest of striving for simplicity, as closely as possible JOpt Simple
4556 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4557 GNU @code{getopt_long}. It also aims to make option parser configuration and
4558 retrieval of options and their arguments simple and expressive, without being
4559 overly clever.")
4560 (license license:expat)))
4561
4562 (define-public java-commons-math3
4563 (package
4564 (name "java-commons-math3")
4565 (version "3.6.1")
4566 (source (origin
4567 (method url-fetch)
4568 (uri (string-append "mirror://apache/commons/math/source/"
4569 "commons-math3-" version "-src.tar.gz"))
4570 (sha256
4571 (base32
4572 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4573 (build-system ant-build-system)
4574 (arguments
4575 `(#:build-target "jar"
4576 #:test-target "test"
4577 #:make-flags
4578 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4579 (junit (assoc-ref %build-inputs "java-junit")))
4580 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4581 (string-append "-Dhamcrest.jar=" hamcrest
4582 "/share/java/hamcrest-core.jar")))
4583 #:phases
4584 (modify-phases %standard-phases
4585 ;; We want to build the jar in the build phase and run the tests
4586 ;; later in a separate phase.
4587 (add-after 'unpack 'untangle-targets
4588 (lambda _
4589 (substitute* "build.xml"
4590 (("name=\"jar\" depends=\"test\"")
4591 "name=\"jar\" depends=\"compile\""))
4592 #t))
4593 ;; There is no install target.
4594 (replace 'install
4595 (install-jars "target")))))
4596 (native-inputs
4597 `(("java-junit" ,java-junit)
4598 ("java-hamcrest-core" ,java-hamcrest-core)))
4599 (home-page "http://commons.apache.org/math/")
4600 (synopsis "Apache Commons mathematics library")
4601 (description "Commons Math is a library of lightweight, self-contained
4602 mathematics and statistics components addressing the most common problems not
4603 available in the Java programming language or Commons Lang.")
4604 (license license:asl2.0)))
4605
4606 (define-public java-jmh
4607 (package
4608 (name "java-jmh")
4609 (version "1.17.5")
4610 (source (origin
4611 (method hg-fetch)
4612 (uri (hg-reference
4613 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4614 (changeset version)))
4615 (file-name (string-append name "-" version "-checkout"))
4616 (sha256
4617 (base32
4618 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4619 (build-system ant-build-system)
4620 (arguments
4621 `(#:jar-name "jmh-core.jar"
4622 #:source-dir "jmh-core/src/main"
4623 #:test-dir "jmh-core/src/test"
4624 #:phases
4625 (modify-phases %standard-phases
4626 ;; This seems to be a bug in the JDK. It may not be necessary in
4627 ;; future versions of the JDK.
4628 (add-after 'unpack 'fix-bug
4629 (lambda _
4630 (with-directory-excursion
4631 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4632 (substitute* '("IntegerValueConverter.java"
4633 "ThreadsValueConverter.java")
4634 (("public Class<Integer> valueType")
4635 "public Class<? extends Integer> valueType")))
4636 #t)))))
4637 (inputs
4638 `(("java-jopt-simple" ,java-jopt-simple)
4639 ("java-commons-math3" ,java-commons-math3)))
4640 (native-inputs
4641 `(("java-junit" ,java-junit)
4642 ("java-hamcrest-core" ,java-hamcrest-core)))
4643 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4644 (synopsis "Benchmark harness for the JVM")
4645 (description "JMH is a Java harness for building, running, and analysing
4646 nano/micro/milli/macro benchmarks written in Java and other languages
4647 targeting the JVM.")
4648 ;; GPLv2 only
4649 (license license:gpl2)))
4650
4651 (define-public java-commons-collections4
4652 (package
4653 (name "java-commons-collections4")
4654 (version "4.1")
4655 (source (origin
4656 (method url-fetch)
4657 (uri (string-append "mirror://apache/commons/collections/source/"
4658 "commons-collections4-" version "-src.tar.gz"))
4659 (sha256
4660 (base32
4661 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4662 (build-system ant-build-system)
4663 (arguments
4664 `(#:test-target "test"
4665 #:make-flags
4666 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4667 (junit (assoc-ref %build-inputs "java-junit"))
4668 (easymock (assoc-ref %build-inputs "java-easymock")))
4669 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4670 (string-append "-Dhamcrest.jar=" hamcrest
4671 "/share/java/hamcrest-core.jar")
4672 (string-append "-Deasymock.jar=" easymock
4673 "/share/java/easymock.jar")))
4674 #:phases
4675 (modify-phases %standard-phases
4676 (replace 'install
4677 (install-jars "target")))))
4678 (native-inputs
4679 `(("java-junit" ,java-junit)
4680 ("java-hamcrest-core" ,java-hamcrest-core)
4681 ("java-easymock" ,java-easymock)))
4682 (home-page "http://commons.apache.org/collections/")
4683 (synopsis "Collections framework")
4684 (description "The Java Collections Framework is the recognised standard
4685 for collection handling in Java. Commons-Collections seek to build upon the
4686 JDK classes by providing new interfaces, implementations and utilities. There
4687 are many features, including:
4688
4689 @itemize
4690 @item @code{Bag} interface for collections that have a number of copies of
4691 each object
4692 @item @code{BidiMap} interface for maps that can be looked up from value to
4693 key as well and key to value
4694 @item @code{MapIterator} interface to provide simple and quick iteration over
4695 maps
4696 @item Transforming decorators that alter each object as it is added to the
4697 collection
4698 @item Composite collections that make multiple collections look like one
4699 @item Ordered maps and sets that retain the order elements are added in,
4700 including an LRU based map
4701 @item Reference map that allows keys and/or values to be garbage collected
4702 under close control
4703 @item Many comparator implementations
4704 @item Many iterator implementations
4705 @item Adapter classes from array and enumerations to collections
4706 @item Utilities to test or create typical set-theory properties of collections
4707 such as union, intersection, and closure.
4708 @end itemize\n")
4709 (license license:asl2.0)))
4710
4711 (define-public java-commons-collections
4712 (package
4713 (inherit java-commons-collections4)
4714 (name "java-commons-collections")
4715 (version "3.2.2")
4716 (source (origin
4717 (method url-fetch)
4718 (uri (string-append "mirror://apache/commons/collections/source/"
4719 "commons-collections-" version "-src.tar.gz"))
4720 (sha256
4721 (base32
4722 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4723 (patches
4724 (search-patches "java-commons-collections-fix-java8.patch"))))
4725 (arguments
4726 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4727 ((#:phases phases)
4728 `(modify-phases ,phases
4729 ;; The manifest is required by the build procedure
4730 (add-before 'build 'add-manifest
4731 (lambda _
4732 (mkdir-p "build/conf")
4733 (call-with-output-file "build/conf/MANIFEST.MF"
4734 (lambda (file)
4735 (format file "Manifest-Version: 1.0\n")))
4736 #t))
4737 (replace 'install
4738 (install-jars "build"))))))))
4739
4740 (define java-commons-collections-test-classes
4741 (package
4742 (inherit java-commons-collections)
4743 (arguments
4744 `(#:jar-name "commons-collections-test-classes.jar"
4745 #:source-dir "src/test"
4746 #:tests? #f))
4747 (inputs
4748 `(("collection" ,java-commons-collections)))))
4749
4750 (define-public java-commons-beanutils
4751 (package
4752 (name "java-commons-beanutils")
4753 (version "1.9.3")
4754 (source (origin
4755 (method url-fetch)
4756 (uri (string-append "mirror://apache/commons/beanutils/source/"
4757 "commons-beanutils-" version "-src.tar.gz"))
4758 (sha256
4759 (base32
4760 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4761 (build-system ant-build-system)
4762 (arguments
4763 `(#:test-target "test"
4764 #:tests? #f
4765 #:phases
4766 (modify-phases %standard-phases
4767 (replace 'install
4768 (lambda* (#:key outputs #:allow-other-keys)
4769 (rename-file (string-append "dist/commons-beanutils-" ,version
4770 "-SNAPSHOT.jar")
4771 "commons-beanutils.jar")
4772 (install-file "commons-beanutils.jar"
4773 (string-append (assoc-ref outputs "out") "/share/java/"))
4774 #t)))))
4775 (inputs
4776 `(("logging" ,java-commons-logging-minimal)
4777 ("collections" ,java-commons-collections)))
4778 (native-inputs
4779 `(("junit" ,java-junit)
4780 ("collections-test" ,java-commons-collections-test-classes)))
4781 (home-page "http://commons.apache.org/beanutils/")
4782 (synopsis "Dynamically set or get properties in Java")
4783 (description "BeanUtils provides a simplified interface to reflection and
4784 introspection to set or get dynamically determined properties through their
4785 setter and getter method.")
4786 (license license:asl2.0)))
4787
4788 (define-public java-commons-io
4789 (package
4790 (name "java-commons-io")
4791 (version "2.5")
4792 (source
4793 (origin
4794 (method url-fetch)
4795 (uri (string-append "mirror://apache/commons/io/source/"
4796 "commons-io-" version "-src.tar.gz"))
4797 (sha256
4798 (base32
4799 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4800 (build-system ant-build-system)
4801 (outputs '("out" "doc"))
4802 (arguments
4803 `(#:test-target "test"
4804 #:make-flags
4805 (list (string-append "-Djunit.jar="
4806 (assoc-ref %build-inputs "java-junit")
4807 "/share/java/junit.jar"))
4808 #:phases
4809 (modify-phases %standard-phases
4810 (add-after 'build 'build-javadoc ant-build-javadoc)
4811 (replace 'install (install-jars "target"))
4812 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4813 (native-inputs
4814 `(("java-junit" ,java-junit)
4815 ("java-hamcrest-core" ,java-hamcrest-core)))
4816 (home-page "http://commons.apache.org/io/")
4817 (synopsis "Common useful IO related classes")
4818 (description "Commons-IO contains utility classes, stream implementations,
4819 file filters and endian classes.")
4820 (license license:asl2.0)))
4821
4822 (define-public java-commons-exec-1.1
4823 (package
4824 (name "java-commons-exec")
4825 (version "1.1")
4826 (source
4827 (origin
4828 (method url-fetch)
4829 (uri (string-append "mirror://apache/commons/exec/source/"
4830 "commons-exec-" version "-src.tar.gz"))
4831 (sha256
4832 (base32
4833 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4834 (build-system ant-build-system)
4835 (arguments
4836 `(#:test-target "test"
4837 #:make-flags
4838 (list (string-append "-Dmaven.junit.jar="
4839 (assoc-ref %build-inputs "java-junit")
4840 "/share/java/junit.jar"))
4841 #:phases
4842 (modify-phases %standard-phases
4843 (add-before 'build 'delete-network-tests
4844 (lambda _
4845 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4846 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4847 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4848 #t))
4849 ;; The "build" phase automatically tests.
4850 (delete 'check)
4851 (replace 'install (install-jars "target")))))
4852 (native-inputs
4853 `(("java-junit" ,java-junit)))
4854 (home-page "http://commons.apache.org/proper/commons-exec/")
4855 (synopsis "Common program execution related classes")
4856 (description "Commons-Exec simplifies executing external processes.")
4857 (license license:asl2.0)))
4858
4859 (define-public java-commons-exec
4860 (package
4861 (inherit java-commons-exec-1.1)
4862 (version "1.3")
4863 (source
4864 (origin
4865 (method url-fetch)
4866 (uri (string-append "mirror://apache/commons/exec/source/"
4867 "commons-exec-" version "-src.tar.gz"))
4868 (sha256
4869 (base32
4870 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4871 (arguments
4872 `(#:test-target "test"
4873 #:make-flags
4874 (list (string-append "-Dmaven.junit.jar="
4875 (assoc-ref %build-inputs "java-junit")
4876 "/share/java/junit.jar")
4877 "-Dmaven.compiler.source=1.7"
4878 "-Dmaven.compiler.target=1.7")
4879 #:phases
4880 (modify-phases %standard-phases
4881 (add-before 'build 'delete-network-tests
4882 (lambda* (#:key inputs #:allow-other-keys)
4883 ;; This test hangs indefinitely.
4884 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4885 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4886 (("ping -c 10 127.0.0.1") "sleep 10"))
4887 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4888 (("/bin/ls") "ls"))
4889 (call-with-output-file "src/test/scripts/ping.sh"
4890 (lambda (port)
4891 (format port "#!~a/bin/sh\nsleep $1\n"
4892 (assoc-ref inputs "bash"))))
4893 #t))
4894 ;; The "build" phase automatically tests.
4895 (delete 'check)
4896 (replace 'install (install-jars "target")))))
4897 (native-inputs
4898 `(("java-junit" ,java-junit)
4899 ("java-hamcrest-core" ,java-hamcrest-core)))))
4900
4901 (define-public java-commons-lang
4902 (package
4903 (name "java-commons-lang")
4904 (version "2.6")
4905 (source
4906 (origin
4907 (method url-fetch)
4908 (uri (string-append "mirror://apache/commons/lang/source/"
4909 "commons-lang-" version "-src.tar.gz"))
4910 (sha256
4911 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4912 (build-system ant-build-system)
4913 (outputs '("out" "doc"))
4914 (arguments
4915 `(#:test-target "test"
4916 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4917 #:phases
4918 (modify-phases %standard-phases
4919 (add-after 'build 'build-javadoc ant-build-javadoc)
4920 (add-before 'check 'disable-failing-test
4921 (lambda _
4922 ;; Disable a failing test
4923 (substitute* "src/test/java/org/apache/commons/lang/\
4924 time/FastDateFormatTest.java"
4925 (("public void testFormat\\(\\)")
4926 "public void disabled_testFormat()"))
4927 #t))
4928 (replace 'install (install-jars "target"))
4929 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4930 (native-inputs
4931 `(("java-junit" ,java-junit)))
4932 (home-page "http://commons.apache.org/lang/")
4933 (synopsis "Extension of the java.lang package")
4934 (description "The Commons Lang components contains a set of Java classes
4935 that provide helper methods for standard Java classes, especially those found
4936 in the @code{java.lang} package in the Sun JDK. The following classes are
4937 included:
4938
4939 @itemize
4940 @item StringUtils - Helper for @code{java.lang.String}.
4941 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4942 of characters such as @code{[a-z]} and @code{[abcdez]}.
4943 @item RandomStringUtils - Helper for creating randomised strings.
4944 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4945 @item NumberRange - A range of numbers with an upper and lower bound.
4946 @item ObjectUtils - Helper for @code{java.lang.Object}.
4947 @item SerializationUtils - Helper for serializing objects.
4948 @item SystemUtils - Utility class defining the Java system properties.
4949 @item NestedException package - A sub-package for the creation of nested
4950 exceptions.
4951 @item Enum package - A sub-package for the creation of enumerated types.
4952 @item Builder package - A sub-package for the creation of @code{equals},
4953 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4954 @end itemize\n")
4955 (license license:asl2.0)))
4956
4957 (define-public java-commons-lang3
4958 (package
4959 (name "java-commons-lang3")
4960 (version "3.4")
4961 (source
4962 (origin
4963 (method url-fetch)
4964 (uri (string-append "mirror://apache/commons/lang/source/"
4965 "commons-lang3-" version "-src.tar.gz"))
4966 (sha256
4967 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4968 (build-system ant-build-system)
4969 (outputs '("out" "doc"))
4970 (arguments
4971 `(#:test-target "test"
4972 #:make-flags
4973 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4974 (junit (assoc-ref %build-inputs "java-junit"))
4975 (easymock (assoc-ref %build-inputs "java-easymock"))
4976 (io (assoc-ref %build-inputs "java-commons-io")))
4977 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4978 (string-append "-Dhamcrest.jar=" hamcrest
4979 "/share/java/hamcrest-all.jar")
4980 (string-append "-Dcommons-io.jar=" io
4981 "/share/java/commons-io-"
4982 ,(package-version java-commons-io)
4983 "-SNAPSHOT.jar")
4984 (string-append "-Deasymock.jar=" easymock
4985 "/share/java/easymock.jar")))
4986 #:phases
4987 (modify-phases %standard-phases
4988 (add-after 'build 'build-javadoc ant-build-javadoc)
4989 (replace 'install (install-jars "target"))
4990 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4991 (native-inputs
4992 `(("java-junit" ,java-junit)
4993 ("java-commons-io" ,java-commons-io)
4994 ("java-hamcrest-all" ,java-hamcrest-all)
4995 ("java-easymock" ,java-easymock)))
4996 (home-page "http://commons.apache.org/lang/")
4997 (synopsis "Extension of the java.lang package")
4998 (description "The Commons Lang components contains a set of Java classes
4999 that provide helper methods for standard Java classes, especially those found
5000 in the @code{java.lang} package. The following classes are included:
5001
5002 @itemize
5003 @item StringUtils - Helper for @code{java.lang.String}.
5004 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5005 characters such as @code{[a-z]} and @code{[abcdez]}.
5006 @item RandomStringUtils - Helper for creating randomised strings.
5007 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5008 @item NumberRange - A range of numbers with an upper and lower bound.
5009 @item ObjectUtils - Helper for @code{java.lang.Object}.
5010 @item SerializationUtils - Helper for serializing objects.
5011 @item SystemUtils - Utility class defining the Java system properties.
5012 @item NestedException package - A sub-package for the creation of nested
5013 exceptions.
5014 @item Enum package - A sub-package for the creation of enumerated types.
5015 @item Builder package - A sub-package for the creation of @code{equals},
5016 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5017 @end itemize\n")
5018 (license license:asl2.0)))
5019
5020 (define-public java-commons-bsf
5021 (package
5022 (name "java-commons-bsf")
5023 (version "2.4.0")
5024 (source (origin
5025 (method url-fetch)
5026 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5027 version ".tar.gz"))
5028 (sha256
5029 (base32
5030 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5031 (modules '((guix build utils)))
5032 (snippet
5033 '(begin
5034 (for-each delete-file
5035 (find-files "." "\\.jar$"))
5036 #t))))
5037 (build-system ant-build-system)
5038 (arguments
5039 `(#:build-target "jar"
5040 #:tests? #f; No test file
5041 #:modules ((guix build ant-build-system)
5042 (guix build utils)
5043 (guix build java-utils)
5044 (sxml simple))
5045 #:phases
5046 (modify-phases %standard-phases
5047 (add-before 'build 'create-properties
5048 (lambda _
5049 ;; This file is missing from the distribution
5050 (call-with-output-file "build-properties.xml"
5051 (lambda (port)
5052 (sxml->xml
5053 `(project (@ (basedir ".") (name "build-properties") (default ""))
5054 (property (@ (name "project.name") (value "bsf")))
5055 (property (@ (name "source.level") (value "1.5")))
5056 (property (@ (name "build.lib") (value "build/jar")))
5057 (property (@ (name "src.dir") (value "src")))
5058 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5059 (property (@ (name "build.tests") (value "build/test-classes")))
5060 (property (@ (name "build.dest") (value "build/classes"))))
5061 port)))
5062 #t))
5063 (replace 'install (install-jars "build")))))
5064 (native-inputs
5065 `(("java-junit" ,java-junit)))
5066 (inputs
5067 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5068 (home-page "https://commons.apache.org/proper/commons-bsf")
5069 (synopsis "Bean Scripting Framework")
5070 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5071 which provides scripting language support within Java applications, and access
5072 to Java objects and methods from scripting languages. BSF allows one to write
5073 JSPs in languages other than Java while providing access to the Java class
5074 library. In addition, BSF permits any Java application to be implemented in
5075 part (or dynamically extended) by a language that is embedded within it. This
5076 is achieved by providing an API that permits calling scripting language engines
5077 from within Java, as well as an object registry that exposes Java objects to
5078 these scripting language engines.")
5079 (license license:asl2.0)))
5080
5081 (define-public java-commons-jxpath
5082 (package
5083 (name "java-commons-jxpath")
5084 (version "1.3")
5085 (source (origin
5086 (method url-fetch)
5087 (uri (string-append "mirror://apache/commons/jxpath/source/"
5088 "commons-jxpath-" version "-src.tar.gz"))
5089 (sha256
5090 (base32
5091 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5092 (build-system ant-build-system)
5093 (arguments
5094 `(#:jar-name "commons-jxpath.jar"
5095 ;; tests require more dependencies, including mockrunner which depends on old software
5096 #:tests? #f
5097 #:source-dir "src/java"))
5098 (inputs
5099 `(("servlet" ,java-classpathx-servletapi)
5100 ("java-jdom" ,java-jdom)
5101 ("java-commons-beanutils" ,java-commons-beanutils)))
5102 (native-inputs
5103 `(("java-junit" ,java-junit)))
5104 (home-page "http://commons.apache.org/jxpath/")
5105 (synopsis "Simple interpreter of an expression language called XPath.")
5106 (description "The org.apache.commons.jxpath package defines a simple
5107 interpreter of an expression language called XPath. JXPath applies XPath
5108 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5109 contexts, DOM etc, including mixtures thereof.")
5110 (license license:asl2.0)))
5111
5112 (define-public java-jsr250
5113 (package
5114 (name "java-jsr250")
5115 (version "1.3")
5116 (source (origin
5117 (method url-fetch)
5118 (uri (string-append "https://repo1.maven.org/maven2/"
5119 "javax/annotation/javax.annotation-api/"
5120 version "/javax.annotation-api-"
5121 version "-sources.jar"))
5122 (sha256
5123 (base32
5124 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5125 (build-system ant-build-system)
5126 (arguments
5127 `(#:tests? #f ; no tests included
5128 #:jdk ,icedtea-8
5129 #:jar-name "jsr250.jar"))
5130 (home-page "https://jcp.org/en/jsr/detail?id=250")
5131 (synopsis "Security-related annotations")
5132 (description "This package provides annotations for security. It provides
5133 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5134 namespaces.")
5135 ;; either cddl or gpl2 only, with classpath exception
5136 (license (list license:cddl1.0
5137 license:gpl2))))
5138
5139 (define-public java-jsr305
5140 (package
5141 (name "java-jsr305")
5142 (version "3.0.1")
5143 (source (origin
5144 (method url-fetch)
5145 (uri (string-append "https://repo1.maven.org/maven2/"
5146 "com/google/code/findbugs/"
5147 "jsr305/" version "/jsr305-"
5148 version "-sources.jar"))
5149 (sha256
5150 (base32
5151 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5152 (build-system ant-build-system)
5153 (arguments
5154 `(#:tests? #f ; no tests included
5155 #:jar-name "jsr305.jar"))
5156 (home-page "http://findbugs.sourceforge.net/")
5157 (synopsis "Annotations for the static analyzer called findbugs")
5158 (description "This package provides annotations for the findbugs package.
5159 It provides packages in the @code{javax.annotations} namespace.")
5160 (license license:asl2.0)))
5161
5162 (define-public java-guava
5163 (package
5164 (name "java-guava")
5165 ;; This is the last release of Guava that can be built with Java 7.
5166 (version "20.0")
5167 (source (origin
5168 (method url-fetch)
5169 (uri (string-append "https://github.com/google/guava/"
5170 "releases/download/v" version
5171 "/guava-" version "-sources.jar"))
5172 (sha256
5173 (base32
5174 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5175 (build-system ant-build-system)
5176 (arguments
5177 `(#:tests? #f ; no tests included
5178 #:jar-name "guava.jar"
5179 #:phases
5180 (modify-phases %standard-phases
5181 (add-after 'unpack 'trim-sources
5182 (lambda _
5183 (with-directory-excursion "src/com/google/common"
5184 ;; Remove annotations to avoid extra dependencies:
5185 ;; * "j2objc" annotations are used when converting Java to
5186 ;; Objective C;
5187 ;; * "errorprone" annotations catch common Java mistakes at
5188 ;; compile time;
5189 ;; * "IgnoreJRERequirement" is used for Android.
5190 (substitute* (find-files "." "\\.java$")
5191 (("import com.google.j2objc.*") "")
5192 (("import com.google.errorprone.annotation.*") "")
5193 (("import org.codehaus.mojo.animal_sniffer.*") "")
5194 (("@CanIgnoreReturnValue") "")
5195 (("@LazyInit") "")
5196 (("@WeakOuter") "")
5197 (("@RetainedWith") "")
5198 (("@Weak") "")
5199 (("@ForOverride") "")
5200 (("@J2ObjCIncompatible") "")
5201 (("@IgnoreJRERequirement") "")))
5202 #t)))))
5203 (inputs
5204 `(("java-jsr305" ,java-jsr305)))
5205 (home-page "https://github.com/google/guava")
5206 (synopsis "Google core libraries for Java")
5207 (description "Guava is a set of core libraries that includes new
5208 collection types (such as multimap and multiset), immutable collections, a
5209 graph library, functional types, an in-memory cache, and APIs/utilities for
5210 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5211 more!")
5212 (license license:asl2.0)))
5213
5214 ;; The java-commons-logging package provides adapters to many different
5215 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5216 ;; it with only a minimal set of adapters.
5217 (define-public java-commons-logging-minimal
5218 (package
5219 (name "java-commons-logging-minimal")
5220 (version "1.2")
5221 (source (origin
5222 (method url-fetch)
5223 (uri (string-append "mirror://apache/commons/logging/source/"
5224 "commons-logging-" version "-src.tar.gz"))
5225 (sha256
5226 (base32
5227 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5228 (build-system ant-build-system)
5229 (arguments
5230 `(#:tests? #f ; avoid dependency on logging frameworks
5231 #:jar-name "commons-logging-minimal.jar"
5232 #:phases
5233 (modify-phases %standard-phases
5234 (add-after 'unpack 'delete-adapters-and-tests
5235 (lambda _
5236 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5237 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5238 ;; is used by applications; SimpleLog is the only actually usable
5239 ;; implementation that does not depend on another logging
5240 ;; framework.
5241 (for-each
5242 (lambda (file)
5243 (delete-file (string-append
5244 "src/main/java/org/apache/commons/logging/impl/" file)))
5245 (list "Jdk13LumberjackLogger.java"
5246 "WeakHashtable.java"
5247 "Log4JLogger.java"
5248 "ServletContextCleaner.java"
5249 "Jdk14Logger.java"
5250 "AvalonLogger.java"
5251 "LogKitLogger.java"))
5252 (delete-file-recursively "src/test")
5253 #t)))))
5254 (home-page "http://commons.apache.org/logging/")
5255 (synopsis "Common API for logging implementations")
5256 (description "The Logging package is a thin bridge between different
5257 logging implementations. A library that uses the commons-logging API can be
5258 used with any logging implementation at runtime.")
5259 (license license:asl2.0)))
5260
5261 ;; This is the last release of the 1.x series.
5262 (define-public java-mockito-1
5263 (package
5264 (name "java-mockito")
5265 (version "1.10.19")
5266 (source (origin
5267 (method url-fetch)
5268 (uri (string-append "http://repo1.maven.org/maven2/"
5269 "org/mockito/mockito-core/" version
5270 "/mockito-core-" version "-sources.jar"))
5271 (sha256
5272 (base32
5273 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5274 (build-system ant-build-system)
5275 (arguments
5276 `(#:jar-name "mockito.jar"
5277 #:tests? #f ; no tests included
5278 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5279 ;; patches in build phases.
5280 #:phases
5281 (modify-phases %standard-phases
5282 ;; Mockito was developed against a different version of hamcrest,
5283 ;; which does not require matcher implementations to provide an
5284 ;; implementation of the "describeMismatch" method. We add this
5285 ;; simple definition to pass the build with our version of hamcrest.
5286 (add-after 'unpack 'fix-hamcrest-build-error
5287 (lambda _
5288 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5289 (("public Matcher getActualMatcher\\(\\) .*" line)
5290 (string-append "
5291 public void describeMismatch(Object item, Description description) {
5292 actualMatcher.describeMismatch(item, description);
5293 }"
5294 line)))
5295 #t))
5296 ;; Mockito bundles cglib. We have a cglib package, so let's use
5297 ;; that instead.
5298 (add-after 'unpack 'use-system-libraries
5299 (lambda _
5300 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5301 (substitute* '("CGLIBHacker.java"
5302 "CglibMockMaker.java"
5303 "ClassImposterizer.java"
5304 "DelegatingMockitoMethodProxy.java"
5305 "MethodInterceptorFilter.java"
5306 "MockitoNamingPolicy.java"
5307 "SerializableMockitoMethodProxy.java"
5308 "SerializableNoOp.java")
5309 (("import org.mockito.cglib") "import net.sf.cglib")))
5310 #t)))))
5311 (inputs
5312 `(("java-junit" ,java-junit)
5313 ("java-objenesis" ,java-objenesis)
5314 ("java-cglib" ,java-cglib)
5315 ("java-hamcrest-core" ,java-hamcrest-core)))
5316 (home-page "http://mockito.org")
5317 (synopsis "Mockito is a mock library for Java")
5318 (description "Mockito is a mocking library for Java which lets you write
5319 tests with a clean and simple API. It generates mocks using reflection, and
5320 it records all mock invocations, including methods arguments.")
5321 (license license:asl2.0)))
5322
5323 (define-public java-httpcomponents-httpcore
5324 (package
5325 (name "java-httpcomponents-httpcore")
5326 (version "4.4.6")
5327 (source (origin
5328 (method url-fetch)
5329 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5330 "source/httpcomponents-core-"
5331 version "-src.tar.gz"))
5332 (sha256
5333 (base32
5334 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5335 (build-system ant-build-system)
5336 (arguments
5337 `(#:jar-name "httpcomponents-httpcore.jar"
5338 #:phases
5339 (modify-phases %standard-phases
5340 (add-after 'unpack 'chdir
5341 (lambda _ (chdir "httpcore") #t)))))
5342 (inputs
5343 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5344 ("java-commons-lang3" ,java-commons-lang3)))
5345 (native-inputs
5346 `(("java-junit" ,java-junit)
5347 ("java-mockito" ,java-mockito-1)))
5348 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5349 (synopsis "Low level HTTP transport components")
5350 (description "HttpCore is a set of low level HTTP transport components
5351 that can be used to build custom client and server side HTTP services with a
5352 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5353 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5354 NIO.
5355
5356 This package provides the blocking I/O model library.")
5357 (license license:asl2.0)))
5358
5359 (define-public java-httpcomponents-httpcore-nio
5360 (package (inherit java-httpcomponents-httpcore)
5361 (name "java-httpcomponents-httpcore-nio")
5362 (arguments
5363 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5364 #:phases
5365 (modify-phases %standard-phases
5366 (add-after 'unpack 'chdir
5367 (lambda _ (chdir "httpcore-nio") #t)))))
5368 (inputs
5369 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5370 ("java-hamcrest-core" ,java-hamcrest-core)
5371 ,@(package-inputs java-httpcomponents-httpcore)))
5372 (description "HttpCore is a set of low level HTTP transport components
5373 that can be used to build custom client and server side HTTP services with a
5374 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5375 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5376 NIO.
5377
5378 This package provides the non-blocking I/O model library based on Java
5379 NIO.")))
5380
5381 (define-public java-httpcomponents-httpcore-ab
5382 (package (inherit java-httpcomponents-httpcore)
5383 (name "java-httpcomponents-httpcore-ab")
5384 (arguments
5385 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5386 #:phases
5387 (modify-phases %standard-phases
5388 (add-after 'unpack 'chdir
5389 (lambda _ (chdir "httpcore-ab") #t)))))
5390 (inputs
5391 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5392 ("java-commons-cli" ,java-commons-cli)
5393 ("java-hamcrest-core" ,java-hamcrest-core)
5394 ,@(package-inputs java-httpcomponents-httpcore)))
5395 (synopsis "Apache HttpCore benchmarking tool")
5396 (description "This package provides the HttpCore benchmarking tool. It is
5397 an Apache AB clone based on HttpCore.")))
5398
5399 (define-public java-httpcomponents-httpclient
5400 (package
5401 (name "java-httpcomponents-httpclient")
5402 (version "4.5.3")
5403 (source (origin
5404 (method url-fetch)
5405 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5406 "source/httpcomponents-client-"
5407 version "-src.tar.gz"))
5408 (sha256
5409 (base32
5410 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5411 (build-system ant-build-system)
5412 (arguments
5413 `(#:jar-name "httpcomponents-httpclient.jar"
5414 #:phases
5415 (modify-phases %standard-phases
5416 (add-after 'unpack 'chdir
5417 (lambda _ (chdir "httpclient") #t)))))
5418 (inputs
5419 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5420 ("java-commons-codec" ,java-commons-codec)
5421 ("java-hamcrest-core" ,java-hamcrest-core)
5422 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5423 ("java-mockito" ,java-mockito-1)
5424 ("java-junit" ,java-junit)))
5425 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5426 (synopsis "HTTP client library for Java")
5427 (description "Although the @code{java.net} package provides basic
5428 functionality for accessing resources via HTTP, it doesn't provide the full
5429 flexibility or functionality needed by many applications. @code{HttpClient}
5430 seeks to fill this void by providing an efficient, up-to-date, and
5431 feature-rich package implementing the client side of the most recent HTTP
5432 standards and recommendations.")
5433 (license license:asl2.0)))
5434
5435 (define-public java-httpcomponents-httpmime
5436 (package (inherit java-httpcomponents-httpclient)
5437 (name "java-httpcomponents-httpmime")
5438 (arguments
5439 `(#:jar-name "httpcomponents-httpmime.jar"
5440 #:phases
5441 (modify-phases %standard-phases
5442 (add-after 'unpack 'chdir
5443 (lambda _ (chdir "httpmime") #t)))))
5444 (inputs
5445 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5446 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5447 ("java-junit" ,java-junit)
5448 ("java-hamcrest-core" ,java-hamcrest-core)))))
5449
5450 (define-public java-commons-net
5451 (package
5452 (name "java-commons-net")
5453 (version "3.6")
5454 (source (origin
5455 (method url-fetch)
5456 (uri (string-append "mirror://apache/commons/net/source/"
5457 "commons-net-" version "-src.tar.gz"))
5458 (sha256
5459 (base32
5460 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5461 (build-system ant-build-system)
5462 (arguments
5463 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5464 ;; should be "resources/examples/examples.properties"), but gets "null"
5465 ;; instead.
5466 #:tests? #f
5467 #:jar-name "commons-net.jar"))
5468 (native-inputs
5469 `(("java-junit" ,java-junit)
5470 ("java-hamcrest-core" ,java-hamcrest-core)))
5471 (home-page "http://commons.apache.org/net/")
5472 (synopsis "Client library for many basic Internet protocols")
5473 (description "The Apache Commons Net library implements the client side of
5474 many basic Internet protocols. The purpose of the library is to provide
5475 fundamental protocol access, not higher-level abstractions.")
5476 (license license:asl2.0)))
5477
5478 (define-public java-jsch
5479 (package
5480 (name "java-jsch")
5481 (version "0.1.55")
5482 (source (origin
5483 (method url-fetch)
5484 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5485 version "/jsch-" version ".zip"))
5486 (sha256
5487 (base32
5488 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5489 (build-system ant-build-system)
5490 (arguments
5491 `(#:build-target "dist"
5492 #:tests? #f ; no tests included
5493 #:phases
5494 (modify-phases %standard-phases
5495 (replace 'install (install-jars "dist")))))
5496 (native-inputs
5497 `(("unzip" ,unzip)))
5498 (home-page "http://www.jcraft.com/jsch/")
5499 (synopsis "Pure Java implementation of SSH2")
5500 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5501 to connect to an SSH server and use port forwarding, X11 forwarding, file
5502 transfer, etc., and you can integrate its functionality into your own Java
5503 programs.")
5504 (license license:bsd-3)))
5505
5506 (define-public java-commons-compress
5507 (package
5508 (name "java-commons-compress")
5509 (version "1.13")
5510 (source (origin
5511 (method url-fetch)
5512 (uri (string-append "mirror://apache/commons/compress/source/"
5513 "commons-compress-" version "-src.tar.gz"))
5514 (sha256
5515 (base32
5516 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5517 (build-system ant-build-system)
5518 (arguments
5519 `(#:jar-name "commons-compress.jar"
5520 #:phases
5521 (modify-phases %standard-phases
5522 (add-after 'unpack 'delete-bad-tests
5523 (lambda _
5524 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5525 ;; FIXME: These tests really should not fail. Maybe they are
5526 ;; indicative of problems with our Java packaging work.
5527
5528 ;; This test fails with a null pointer exception.
5529 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5530 ;; This test fails to open test resources.
5531 (delete-file "archivers/zip/ExplodeSupportTest.java")
5532
5533 ;; FIXME: This test adds a dependency on powermock, which is hard to
5534 ;; package at this point.
5535 ;; https://github.com/powermock/powermock
5536 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5537 #t)))))
5538 (inputs
5539 `(("java-junit" ,java-junit)
5540 ("java-hamcrest-core" ,java-hamcrest-core)
5541 ("java-mockito" ,java-mockito-1)
5542 ("java-xz" ,java-xz)))
5543 (home-page "https://commons.apache.org/proper/commons-compress/")
5544 (synopsis "Java library for working with compressed files")
5545 (description "The Apache Commons Compress library defines an API for
5546 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5547 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5548 (license license:asl2.0)))
5549
5550 (define-public java-commons-csv
5551 (package
5552 (name "java-commons-csv")
5553 (version "1.4")
5554 (source (origin
5555 (method url-fetch)
5556 (uri (string-append "mirror://apache/commons/csv/source/"
5557 "commons-csv-" version "-src.tar.gz"))
5558 (sha256
5559 (base32
5560 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5561 (build-system ant-build-system)
5562 (arguments
5563 `(#:jar-name "commons-csv.jar"
5564 #:source-dir "src/main/java"
5565 #:tests? #f)); FIXME: requires java-h2
5566 (inputs
5567 `(("java-hamcrest-core" ,java-hamcrest-core)
5568 ("java-commons-io" ,java-commons-io)
5569 ("java-commons-lang3" ,java-commons-lang3)
5570 ("junit" ,java-junit)))
5571 (home-page "https://commons.apache.org/proper/commons-csv/")
5572 (synopsis "Read and write CSV documents")
5573 (description "Commons CSV reads and writes files in variations of the Comma
5574 Separated Value (CSV) format. The most common CSV formats are predefined in the
5575 CSVFormat class:
5576
5577 @itemize
5578 @item Microsoft Excel
5579 @item Informix UNLOAD
5580 @item Informix UNLOAD CSV
5581 @item MySQL
5582 @item RFC 4180
5583 @item TDF
5584 @end itemize
5585
5586 Custom formats can be created using a fluent style API.")
5587 (license license:asl2.0)))
5588
5589 (define-public java-osgi-annotation
5590 (package
5591 (name "java-osgi-annotation")
5592 (version "6.0.0")
5593 (source (origin
5594 (method url-fetch)
5595 (uri (string-append "https://repo1.maven.org/maven2/"
5596 "org/osgi/org.osgi.annotation/" version "/"
5597 "org.osgi.annotation-" version "-sources.jar"))
5598 (sha256
5599 (base32
5600 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5601 (build-system ant-build-system)
5602 (arguments
5603 `(#:tests? #f ; no tests
5604 #:jar-name "osgi-annotation.jar"))
5605 (home-page "https://www.osgi.org")
5606 (synopsis "Annotation module of OSGi framework")
5607 (description
5608 "OSGi, for Open Services Gateway initiative framework, is a module system
5609 and service platform for the Java programming language. This package contains
5610 the OSGi annotation module, providing additional services to help dynamic
5611 components.")
5612 (license license:asl2.0)))
5613
5614 (define-public java-osgi-core
5615 (package
5616 (name "java-osgi-core")
5617 (version "6.0.0")
5618 (source (origin
5619 (method url-fetch)
5620 (uri (string-append "https://repo1.maven.org/maven2/"
5621 "org/osgi/org.osgi.core/" version "/"
5622 "org.osgi.core-" version "-sources.jar"))
5623 (sha256
5624 (base32
5625 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5626 (build-system ant-build-system)
5627 (arguments
5628 `(#:tests? #f ; no tests
5629 #:jar-name "osgi-core.jar"))
5630 (inputs
5631 `(("java-osgi-annotation" ,java-osgi-annotation)))
5632 (home-page "https://www.osgi.org")
5633 (synopsis "Core module of OSGi framework")
5634 (description
5635 "OSGi, for Open Services Gateway initiative framework, is a module system
5636 and service platform for the Java programming language. This package contains
5637 the OSGi Core module.")
5638 (license license:asl2.0)))
5639
5640 (define-public java-osgi-service-event
5641 (package
5642 (name "java-osgi-service-event")
5643 (version "1.3.1")
5644 (source (origin
5645 (method url-fetch)
5646 (uri (string-append "https://repo1.maven.org/maven2/"
5647 "org/osgi/org.osgi.service.event/"
5648 version "/org.osgi.service.event-"
5649 version "-sources.jar"))
5650 (sha256
5651 (base32
5652 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5653 (build-system ant-build-system)
5654 (arguments
5655 `(#:tests? #f ; no tests
5656 #:jar-name "osgi-service-event.jar"))
5657 (inputs
5658 `(("java-osgi-annotation" ,java-osgi-annotation)
5659 ("java-osgi-core" ,java-osgi-core)))
5660 (home-page "https://www.osgi.org")
5661 (synopsis "OSGi service event module")
5662 (description
5663 "OSGi, for Open Services Gateway initiative framework, is a module system
5664 and service platform for the Java programming language. This package contains
5665 the OSGi @code{org.osgi.service.event} module.")
5666 (license license:asl2.0)))
5667
5668 (define-public java-eclipse-osgi
5669 (package
5670 (name "java-eclipse-osgi")
5671 (version "3.11.3")
5672 (source (origin
5673 (method url-fetch)
5674 (uri (string-append "https://repo1.maven.org/maven2/"
5675 "org/eclipse/platform/org.eclipse.osgi/"
5676 version "/org.eclipse.osgi-"
5677 version "-sources.jar"))
5678 (sha256
5679 (base32
5680 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5681 (build-system ant-build-system)
5682 (arguments
5683 `(#:tests? #f ; no tests included
5684 #:jar-name "eclipse-equinox-osgi.jar"))
5685 (inputs
5686 `(("java-osgi-annotation" ,java-osgi-annotation)))
5687 (home-page "http://www.eclipse.org/equinox/")
5688 (synopsis "Eclipse Equinox OSGi framework")
5689 (description "This package provides an implementation of the OSGi Core
5690 specification.")
5691 (license license:epl1.0)))
5692
5693 (define-public java-eclipse-equinox-common
5694 (package
5695 (name "java-eclipse-equinox-common")
5696 (version "3.10.200")
5697 (source (origin
5698 (method url-fetch)
5699 (uri (string-append "https://repo1.maven.org/maven2/"
5700 "org/eclipse/platform/org.eclipse.equinox.common/"
5701 version "/org.eclipse.equinox.common-"
5702 version "-sources.jar"))
5703 (sha256
5704 (base32
5705 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5706 (build-system ant-build-system)
5707 (arguments
5708 `(#:tests? #f ; no tests included
5709 #:jar-name "eclipse-equinox-common.jar"))
5710 (inputs
5711 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5712 (home-page "http://www.eclipse.org/equinox/")
5713 (synopsis "Common Eclipse runtime")
5714 (description "This package provides the common Eclipse runtime.")
5715 (license license:epl1.0)))
5716
5717 (define-public java-eclipse-core-jobs
5718 (package
5719 (name "java-eclipse-core-jobs")
5720 (version "3.8.0")
5721 (source (origin
5722 (method url-fetch)
5723 (uri (string-append "https://repo1.maven.org/maven2/"
5724 "org/eclipse/platform/org.eclipse.core.jobs/"
5725 version "/org.eclipse.core.jobs-"
5726 version "-sources.jar"))
5727 (sha256
5728 (base32
5729 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5730 (build-system ant-build-system)
5731 (arguments
5732 `(#:tests? #f ; no tests included
5733 #:jar-name "eclipse-core-jobs.jar"))
5734 (inputs
5735 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5736 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5737 (home-page "http://www.eclipse.org/equinox/")
5738 (synopsis "Eclipse jobs mechanism")
5739 (description "This package provides the Eclipse jobs mechanism.")
5740 (license license:epl1.0)))
5741
5742 (define-public java-eclipse-equinox-registry
5743 (package
5744 (name "java-eclipse-equinox-registry")
5745 (version "3.6.100")
5746 (source (origin
5747 (method url-fetch)
5748 (uri (string-append "https://repo1.maven.org/maven2/"
5749 "org/eclipse/platform/org.eclipse.equinox.registry/"
5750 version "/org.eclipse.equinox.registry-"
5751 version "-sources.jar"))
5752 (sha256
5753 (base32
5754 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5755 (build-system ant-build-system)
5756 (arguments
5757 `(#:tests? #f ; no tests included
5758 #:jar-name "eclipse-equinox-registry.jar"))
5759 (inputs
5760 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5761 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5762 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5763 (home-page "http://www.eclipse.org/equinox/")
5764 (synopsis "Eclipse extension registry support")
5765 (description "This package provides support for the Eclipse extension
5766 registry.")
5767 (license license:epl1.0)))
5768
5769 (define-public java-eclipse-equinox-app
5770 (package
5771 (name "java-eclipse-equinox-app")
5772 (version "1.3.400")
5773 (source (origin
5774 (method url-fetch)
5775 (uri (string-append "https://repo1.maven.org/maven2/"
5776 "org/eclipse/platform/org.eclipse.equinox.app/"
5777 version "/org.eclipse.equinox.app-"
5778 version "-sources.jar"))
5779 (sha256
5780 (base32
5781 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5782 (build-system ant-build-system)
5783 (arguments
5784 `(#:tests? #f ; no tests included
5785 #:jar-name "eclipse-equinox-app.jar"))
5786 (inputs
5787 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5788 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5789 ("java-eclipse-osgi" ,java-eclipse-osgi)
5790 ("java-osgi-service-event" ,java-osgi-service-event)))
5791 (home-page "http://www.eclipse.org/equinox/")
5792 (synopsis "Equinox application container")
5793 (description "This package provides the Equinox application container for
5794 Eclipse.")
5795 (license license:epl1.0)))
5796
5797 (define-public java-eclipse-equinox-preferences
5798 (package
5799 (name "java-eclipse-equinox-preferences")
5800 (version "3.6.1")
5801 (source (origin
5802 (method url-fetch)
5803 (uri (string-append "https://repo1.maven.org/maven2/"
5804 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5805 version "/org.eclipse.equinox.preferences-"
5806 version "-sources.jar"))
5807 (sha256
5808 (base32
5809 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5810 (build-system ant-build-system)
5811 (arguments
5812 `(#:tests? #f ; no tests included
5813 #:jar-name "eclipse-equinox-preferences.jar"))
5814 (inputs
5815 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5816 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5817 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5818 (home-page "http://www.eclipse.org/equinox/")
5819 (synopsis "Eclipse preferences mechanism")
5820 (description "This package provides the Eclipse preferences mechanism with
5821 the module @code{org.eclipse.equinox.preferences}.")
5822 (license license:epl1.0)))
5823
5824 (define-public java-eclipse-core-contenttype
5825 (package
5826 (name "java-eclipse-core-contenttype")
5827 (version "3.5.100")
5828 (source (origin
5829 (method url-fetch)
5830 (uri (string-append "https://repo1.maven.org/maven2/"
5831 "org/eclipse/platform/org.eclipse.core.contenttype/"
5832 version "/org.eclipse.core.contenttype-"
5833 version "-sources.jar"))
5834 (sha256
5835 (base32
5836 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5837 (build-system ant-build-system)
5838 (arguments
5839 `(#:tests? #f ; no tests included
5840 #:jar-name "eclipse-core-contenttype.jar"))
5841 (inputs
5842 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5843 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5844 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5845 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5846 (home-page "http://www.eclipse.org/")
5847 (synopsis "Eclipse content mechanism")
5848 (description "This package provides the Eclipse content mechanism in the
5849 @code{org.eclipse.core.contenttype} module.")
5850 (license license:epl1.0)))
5851
5852 (define-public java-eclipse-core-runtime
5853 (package
5854 (name "java-eclipse-core-runtime")
5855 (version "3.15.100")
5856 (source (origin
5857 (method url-fetch)
5858 (uri (string-append "https://repo1.maven.org/maven2/"
5859 "org/eclipse/platform/org.eclipse.core.runtime/"
5860 version "/org.eclipse.core.runtime-"
5861 version "-sources.jar"))
5862 (sha256
5863 (base32
5864 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5865 (build-system ant-build-system)
5866 (arguments
5867 `(#:tests? #f ; no tests included
5868 #:jar-name "eclipse-core-runtime.jar"))
5869 (inputs
5870 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5871 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5872 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5873 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5874 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5875 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5876 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5877 (home-page "https://www.eclipse.org/")
5878 (synopsis "Eclipse core runtime")
5879 (description "This package provides the Eclipse core runtime with the
5880 module @code{org.eclipse.core.runtime}.")
5881 (license license:epl1.0)))
5882
5883 (define-public java-eclipse-core-filesystem
5884 (package
5885 (name "java-eclipse-core-filesystem")
5886 (version "1.6.1")
5887 (source (origin
5888 (method url-fetch)
5889 (uri (string-append "https://repo1.maven.org/maven2/"
5890 "org/eclipse/platform/org.eclipse.core.filesystem/"
5891 version "/org.eclipse.core.filesystem-"
5892 version "-sources.jar"))
5893 (sha256
5894 (base32
5895 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5896 (build-system ant-build-system)
5897 (arguments
5898 `(#:tests? #f ; no tests included
5899 #:jar-name "eclipse-core-filesystem.jar"))
5900 (inputs
5901 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5902 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5903 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5904 (home-page "https://www.eclipse.org/")
5905 (synopsis "Eclipse core file system")
5906 (description "This package provides the Eclipse core file system with the
5907 module @code{org.eclipse.core.filesystem}.")
5908 (license license:epl1.0)))
5909
5910 (define-public java-eclipse-core-expressions
5911 (package
5912 (name "java-eclipse-core-expressions")
5913 (version "3.5.100")
5914 (source (origin
5915 (method url-fetch)
5916 (uri (string-append "https://repo1.maven.org/maven2/"
5917 "org/eclipse/platform/org.eclipse.core.expressions/"
5918 version "/org.eclipse.core.expressions-"
5919 version "-sources.jar"))
5920 (sha256
5921 (base32
5922 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5923 (build-system ant-build-system)
5924 (arguments
5925 `(#:tests? #f ; no tests included
5926 #:jar-name "eclipse-core-expressions.jar"))
5927 (inputs
5928 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5929 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5930 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5931 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5932 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5933 (home-page "https://www.eclipse.org/")
5934 (synopsis "Eclipse core expression language")
5935 (description "This package provides the Eclipse core expression language
5936 with the @code{org.eclipse.core.expressions} module.")
5937 (license license:epl1.0)))
5938
5939 (define-public java-eclipse-core-variables
5940 (package
5941 (name "java-eclipse-core-variables")
5942 (version "3.3.0")
5943 (source (origin
5944 (method url-fetch)
5945 (uri (string-append "https://repo1.maven.org/maven2/"
5946 "org/eclipse/platform/org.eclipse.core.variables/"
5947 version "/org.eclipse.core.variables-"
5948 version "-sources.jar"))
5949 (sha256
5950 (base32
5951 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5952 (build-system ant-build-system)
5953 (arguments
5954 `(#:tests? #f ; no tests included
5955 #:jar-name "eclipse-core-variables.jar"))
5956 (inputs
5957 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5958 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5959 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5960 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5961 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5962 (home-page "https://www.eclipse.org/platform")
5963 (synopsis "Eclipse core variables")
5964 (description "This package provides the Eclipse core variables module
5965 @code{org.eclipse.core.variables}.")
5966 (license license:epl1.0)))
5967
5968 (define-public java-eclipse-ant-core
5969 (package
5970 (name "java-eclipse-ant-core")
5971 (version "3.4.100")
5972 (source (origin
5973 (method url-fetch)
5974 (uri (string-append "https://repo1.maven.org/maven2/"
5975 "org/eclipse/platform/org.eclipse.ant.core/"
5976 version "/org.eclipse.ant.core-"
5977 version "-sources.jar"))
5978 (sha256
5979 (base32
5980 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5981 (build-system ant-build-system)
5982 (arguments
5983 `(#:tests? #f ; no tests included
5984 #:jar-name "eclipse-ant-core.jar"))
5985 (inputs
5986 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5987 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5988 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5989 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5990 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5991 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5992 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5993 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5994 (home-page "https://www.eclipse.org/platform")
5995 (synopsis "Ant build tool core libraries")
5996 (description "This package provides the ant build tool core libraries with
5997 the module @code{org.eclipse.ant.core}.")
5998 (license license:epl1.0)))
5999
6000 (define-public java-eclipse-core-resources
6001 (package
6002 (name "java-eclipse-core-resources")
6003 (version "3.13.200")
6004 (source (origin
6005 (method url-fetch)
6006 (uri (string-append "https://repo1.maven.org/maven2/"
6007 "org/eclipse/platform/org.eclipse.core.resources/"
6008 version "/org.eclipse.core.resources-"
6009 version "-sources.jar"))
6010 (sha256
6011 (base32
6012 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6013 (build-system ant-build-system)
6014 (arguments
6015 `(#:tests? #f ; no tests included
6016 #:jar-name "eclipse-core-resources.jar"))
6017 (inputs
6018 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6019 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6020 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6021 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6022 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6023 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6024 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6025 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6026 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6027 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6028 (home-page "https://www.eclipse.org/")
6029 (synopsis "Eclipse core resource management")
6030 (description "This package provides the Eclipse core resource management
6031 module @code{org.eclipse.core.resources}.")
6032 (license license:epl1.0)))
6033
6034 (define-public java-eclipse-compare-core
6035 (package
6036 (name "java-eclipse-compare-core")
6037 (version "3.6.0")
6038 (source (origin
6039 (method url-fetch)
6040 (uri (string-append "https://repo1.maven.org/maven2/"
6041 "org/eclipse/platform/org.eclipse.compare.core/"
6042 version "/org.eclipse.compare.core-"
6043 version "-sources.jar"))
6044 (sha256
6045 (base32
6046 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6047 (build-system ant-build-system)
6048 (arguments
6049 `(#:tests? #f ; no tests included
6050 #:jar-name "eclipse-compare-core.jar"))
6051 (inputs
6052 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6053 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6054 ("java-eclipse-osgi" ,java-eclipse-osgi)
6055 ("java-icu4j" ,java-icu4j)))
6056 (home-page "https://www.eclipse.org/")
6057 (synopsis "Eclipse core compare support")
6058 (description "This package provides the Eclipse core compare support
6059 module @code{org.eclipse.compare.core}.")
6060 (license license:epl1.0)))
6061
6062 (define-public java-eclipse-team-core
6063 (package
6064 (name "java-eclipse-team-core")
6065 (version "3.8.0")
6066 (source (origin
6067 (method url-fetch)
6068 (uri (string-append "https://repo1.maven.org/maven2/"
6069 "org/eclipse/platform/org.eclipse.team.core/"
6070 version "/org.eclipse.team.core-"
6071 version "-sources.jar"))
6072 (sha256
6073 (base32
6074 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6075 (build-system ant-build-system)
6076 (arguments
6077 `(#:tests? #f ; no tests included
6078 #:jar-name "eclipse-team-core.jar"))
6079 (inputs
6080 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6081 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6082 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6083 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6084 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6085 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6086 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6087 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6088 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6089 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6090 (home-page "https://www.eclipse.org/platform")
6091 (synopsis "Eclipse team support core")
6092 (description "This package provides the Eclipse team support core module
6093 @code{org.eclipse.team.core}.")
6094 (license license:epl1.0)))
6095
6096 (define-public java-eclipse-core-commands
6097 (package
6098 (name "java-eclipse-core-commands")
6099 (version "3.8.1")
6100 (source (origin
6101 (method url-fetch)
6102 (uri (string-append "https://repo1.maven.org/maven2/"
6103 "org/eclipse/platform/org.eclipse.core.commands/"
6104 version "/org.eclipse.core.commands-"
6105 version "-sources.jar"))
6106 (sha256
6107 (base32
6108 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6109 (build-system ant-build-system)
6110 (arguments
6111 `(#:tests? #f ; no tests included
6112 #:jar-name "eclipse-core-commands.jar"))
6113 (inputs
6114 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6115 (home-page "https://www.eclipse.org/platform")
6116 (synopsis "Eclipse core commands")
6117 (description "This package provides Eclipse core commands in the module
6118 @code{org.eclipse.core.commands}.")
6119 (license license:epl1.0)))
6120
6121 (define-public java-eclipse-text
6122 (package
6123 (name "java-eclipse-text")
6124 (version "3.6.0")
6125 (source (origin
6126 (method url-fetch)
6127 (uri (string-append "https://repo1.maven.org/maven2/"
6128 "org/eclipse/platform/org.eclipse.text/"
6129 version "/org.eclipse.text-"
6130 version "-sources.jar"))
6131 (sha256
6132 (base32
6133 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6134 (build-system ant-build-system)
6135 (arguments
6136 `(#:tests? #f ; no tests included
6137 #:jar-name "eclipse-text.jar"
6138 #:phases
6139 (modify-phases %standard-phases
6140 ;; When creating a new category we must make sure that the new list
6141 ;; matches List<Position>. By default it seems to be too generic
6142 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6143 ;; Without this we get this error:
6144 ;;
6145 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6146 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6147 ;; [javac] fPositions.put(category, new ArrayList<>());
6148 ;; [javac] ^
6149 ;; [javac] required: String,List<Position>
6150 ;; [javac] found: String,ArrayList<Object>
6151 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6152 ;; to List<Position> by method invocation conversion
6153 ;; [javac] where K,V are type-variables:
6154 ;; [javac] K extends Object declared in interface Map
6155 ;; [javac] V extends Object declared in interface Map
6156 ;;
6157 ;; I don't know if this is a good fix. I suspect it is not, but it
6158 ;; seems to work.
6159 (add-after 'unpack 'fix-compilation-error
6160 (lambda _
6161 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6162 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6163 "Positions.put(category, new ArrayList<Position>());"))
6164 #t)))))
6165 (inputs
6166 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6167 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6168 ("java-icu4j" ,java-icu4j)))
6169 (home-page "http://www.eclipse.org/platform")
6170 (synopsis "Eclipse text library")
6171 (description "Platform Text is part of the Platform UI project and
6172 provides the basic building blocks for text and text editors within Eclipse
6173 and contributes the Eclipse default text editor.")
6174 (license license:epl1.0)))
6175
6176 (define-public java-eclipse-jdt-core
6177 (package
6178 (name "java-eclipse-jdt-core")
6179 (version "3.16.0")
6180 (source (origin
6181 (method url-fetch)
6182 (uri (string-append "https://repo1.maven.org/maven2/"
6183 "org/eclipse/jdt/org.eclipse.jdt.core/"
6184 version "/org.eclipse.jdt.core-"
6185 version "-sources.jar"))
6186 (sha256
6187 (base32
6188 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6189 (build-system ant-build-system)
6190 (arguments
6191 `(#:tests? #f ; no tests included
6192 #:jar-name "eclipse-jdt-core.jar"
6193 #:phases
6194 (modify-phases %standard-phases
6195 (add-after 'unpack 'move-sources
6196 (lambda _
6197 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6198 (for-each (lambda (file)
6199 (install-file file (string-append "../" (dirname file))))
6200 (find-files "." ".*")))
6201 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6202 #t))
6203 (add-before 'build 'copy-resources
6204 (lambda _
6205 (with-directory-excursion "src"
6206 (for-each (lambda (file)
6207 (install-file file (string-append "../build/classes/" (dirname file))))
6208 (find-files "." ".*.(props|properties|rsc)")))
6209 #t)))))
6210 (inputs
6211 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6212 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6213 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6214 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6215 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6216 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6217 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6218 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6219 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6220 ("java-eclipse-osgi" ,java-eclipse-osgi)
6221 ("java-eclipse-text" ,java-eclipse-text)))
6222 (home-page "https://www.eclipse.org/jdt")
6223 (synopsis "Java development tools core libraries")
6224 (description "This package provides the core libraries of the Eclipse Java
6225 development tools.")
6226 (license license:epl1.0)))
6227
6228 (define-public java-eclipse-jdt-compiler-apt
6229 (package
6230 (name "java-eclipse-jdt-compiler-apt")
6231 (version "1.3.400")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (string-append "https://repo1.maven.org/maven2/"
6235 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6236 version "/org.eclipse.jdt.compiler.apt-"
6237 version "-sources.jar"))
6238 (sha256
6239 (base32
6240 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6241 (build-system ant-build-system)
6242 (arguments
6243 `(#:tests? #f ; no tests included
6244 #:jar-name "eclipse-jdt-compiler-apt.jar"
6245 #:jdk ,openjdk11))
6246 (inputs
6247 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6248 (home-page "https://www.eclipse.org/jdt/apt/")
6249 (synopsis "Annotation processing tool")
6250 (description "APT stands for Annotation Processing Tool. APT provides a
6251 means for generating files and compiling new Java classes based on annotations
6252 found in your source code.")
6253 (license license:epl2.0)))
6254
6255 (define-public java-javax-mail
6256 (package
6257 (name "java-javax-mail")
6258 (version "1.5.6")
6259 (source (origin
6260 (method url-fetch)
6261 (uri (string-append "https://repo1.maven.org/maven2/"
6262 "com/sun/mail/javax.mail/"
6263 version "/javax.mail-"
6264 version "-sources.jar"))
6265 (sha256
6266 (base32
6267 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6268 (build-system ant-build-system)
6269 (arguments
6270 `(#:tests? #f ; no tests
6271 #:jar-name "javax-mail.jar"))
6272 (home-page "https://javamail.java.net")
6273 (synopsis "Reference implementation of the JavaMail API")
6274 (description
6275 "This package provides versions of the JavaMail API implementation, IMAP,
6276 SMTP, and POP3 service providers, some examples, and documentation for the
6277 JavaMail API.")
6278 ;; GPLv2 only with "classpath exception".
6279 (license license:gpl2)))
6280
6281 (define-public java-log4j-api
6282 (package
6283 (name "java-log4j-api")
6284 (version "2.4.1")
6285 (source (origin
6286 (method url-fetch)
6287 (uri (string-append "mirror://apache/logging/log4j/" version
6288 "/apache-log4j-" version "-src.tar.gz"))
6289 (sha256
6290 (base32
6291 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6292 (build-system ant-build-system)
6293 (arguments
6294 `(#:tests? #f ; tests require unpackaged software
6295 #:jar-name "log4j-api.jar"
6296 #:make-flags
6297 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6298 "/share/java"))
6299 #:phases
6300 (modify-phases %standard-phases
6301 (add-after 'unpack 'enter-dir
6302 (lambda _ (chdir "log4j-api") #t))
6303 ;; FIXME: The tests require additional software that has not been
6304 ;; packaged yet, such as
6305 ;; * org.apache.maven
6306 ;; * org.apache.felix
6307 (add-after 'enter-dir 'delete-tests
6308 (lambda _ (delete-file-recursively "src/test") #t)))))
6309 (inputs
6310 `(("java-osgi-core" ,java-osgi-core)
6311 ("java-hamcrest-core" ,java-hamcrest-core)
6312 ("java-junit" ,java-junit)))
6313 (home-page "http://logging.apache.org/log4j/2.x/")
6314 (synopsis "API module of the Log4j logging framework for Java")
6315 (description
6316 "This package provides the API module of the Log4j logging framework for
6317 Java.")
6318 (license license:asl2.0)))
6319
6320 (define-public java-log4j-core
6321 (package
6322 (inherit java-log4j-api)
6323 (name "java-log4j-core")
6324 (inputs
6325 `(("java-osgi-core" ,java-osgi-core)
6326 ("java-hamcrest-core" ,java-hamcrest-core)
6327 ("java-log4j-api" ,java-log4j-api)
6328 ("java-mail" ,java-mail)
6329 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6330 ("java-lmax-disruptor" ,java-lmax-disruptor)
6331 ("java-kafka" ,java-kafka-clients)
6332 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6333 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6334 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6335 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6336 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6337 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6338 ("java-commons-compress" ,java-commons-compress)
6339 ("java-commons-csv" ,java-commons-csv)
6340 ("java-jeromq" ,java-jeromq)
6341 ("java-junit" ,java-junit)))
6342 (native-inputs
6343 `(("hamcrest" ,java-hamcrest-all)
6344 ("java-commons-io" ,java-commons-io)
6345 ("java-commons-lang3" ,java-commons-lang3)
6346 ("slf4j" ,java-slf4j-api)))
6347 (arguments
6348 `(#:tests? #f ; tests require more dependencies
6349 #:test-dir "src/test"
6350 #:source-dir "src/main/java"
6351 #:jar-name "log4j-core.jar"
6352 #:jdk ,icedtea-8
6353 #:make-flags
6354 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6355 "/share/java"))
6356 #:phases
6357 (modify-phases %standard-phases
6358 (add-after 'unpack 'enter-dir
6359 (lambda _ (chdir "log4j-core") #t)))))
6360 (synopsis "Core component of the Log4j framework")
6361 (description "This package provides the core component of the Log4j
6362 logging framework for Java.")))
6363
6364 (define-public java-log4j-1.2-api
6365 (package
6366 (inherit java-log4j-api)
6367 (name "java-log4j-1.2-api")
6368 (arguments
6369 `(#:jar-name "java-log4j-1.2-api.jar"
6370 #:source-dir "log4j-1.2-api/src/main/java"
6371 #:jdk ,icedtea-8
6372 ;; Tests require maven-model (and other maven subprojects), which is a
6373 ;; cyclic dependency.
6374 #:tests? #f))
6375 (inputs
6376 `(("log4j-api" ,java-log4j-api)
6377 ("log4j-core" ,java-log4j-core)
6378 ("osgi-core" ,java-osgi-core)
6379 ("eclipse-osgi" ,java-eclipse-osgi)
6380 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6381
6382 (define-public java-commons-cli
6383 (package
6384 (name "java-commons-cli")
6385 (version "1.4")
6386 (source (origin
6387 (method url-fetch)
6388 (uri (string-append "mirror://apache/commons/cli/source/"
6389 "commons-cli-" version "-src.tar.gz"))
6390 (sha256
6391 (base32
6392 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6393 (build-system ant-build-system)
6394 ;; TODO: javadoc
6395 (arguments
6396 `(#:jar-name "commons-cli.jar"))
6397 (native-inputs
6398 `(("java-junit" ,java-junit)
6399 ("java-hamcrest-core" ,java-hamcrest-core)))
6400 (home-page "http://commons.apache.org/cli/")
6401 (synopsis "Command line arguments and options parsing library")
6402 (description "The Apache Commons CLI library provides an API for parsing
6403 command line options passed to programs. It is also able to print help
6404 messages detailing the options available for a command line tool.
6405
6406 Commons CLI supports different types of options:
6407
6408 @itemize
6409 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6410 @item GNU like long options (ie. du --human-readable --max-depth=1)
6411 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6412 @item Short options with value attached (ie. gcc -O2 foo.c)
6413 @item long options with single hyphen (ie. ant -projecthelp)
6414 @end itemize
6415
6416 This is a part of the Apache Commons Project.")
6417 (license license:asl2.0)))
6418
6419 (define-public java-commons-codec
6420 (package
6421 (name "java-commons-codec")
6422 (version "1.10")
6423 (source (origin
6424 (method url-fetch)
6425 (uri (string-append "mirror://apache/commons/codec/source/"
6426 "commons-codec-" version "-src.tar.gz"))
6427 (sha256
6428 (base32
6429 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6430 (build-system ant-build-system)
6431 (outputs '("out" "doc"))
6432 (arguments
6433 `(#:test-target "test"
6434 #:make-flags
6435 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6436 (junit (assoc-ref %build-inputs "java-junit")))
6437 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6438 (string-append "-Dhamcrest.jar=" hamcrest
6439 "/share/java/hamcrest-core.jar")
6440 ;; Do not append version to jar.
6441 "-Dfinal.name=commons-codec"))
6442 #:phases
6443 (modify-phases %standard-phases
6444 (add-after 'build 'build-javadoc ant-build-javadoc)
6445 (replace 'install (install-jars "dist"))
6446 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6447 (native-inputs
6448 `(("java-junit" ,java-junit)
6449 ("java-hamcrest-core" ,java-hamcrest-core)))
6450 (home-page "http://commons.apache.org/codec/")
6451 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6452 (description "The codec package contains simple encoder and decoders for
6453 various formats such as Base64 and Hexadecimal. In addition to these widely
6454 used encoders and decoders, the codec package also maintains a collection of
6455 phonetic encoding utilities.
6456
6457 This is a part of the Apache Commons Project.")
6458 (license license:asl2.0)))
6459
6460 (define-public java-commons-daemon
6461 (package
6462 (name "java-commons-daemon")
6463 (version "1.0.15")
6464 (source (origin
6465 (method url-fetch)
6466 (uri (string-append "mirror://apache/commons/daemon/source/"
6467 "commons-daemon-" version "-src.tar.gz"))
6468 (sha256
6469 (base32
6470 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6471 (build-system ant-build-system)
6472 (arguments
6473 `(#:test-target "test"
6474 #:phases
6475 (modify-phases %standard-phases
6476 (add-after 'build 'build-javadoc ant-build-javadoc)
6477 (replace 'install (install-jars "dist"))
6478 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6479 (native-inputs
6480 `(("java-junit" ,java-junit)))
6481 (home-page "http://commons.apache.org/daemon/")
6482 (synopsis "Library to launch Java applications as daemons")
6483 (description "The Daemon package from Apache Commons can be used to
6484 implement Java applications which can be launched as daemons. For example the
6485 program will be notified about a shutdown so that it can perform cleanup tasks
6486 before its process of execution is destroyed by the operation system.
6487
6488 This package contains the Java library. You will also need the actual binary
6489 for your architecture which is provided by the jsvc package.
6490
6491 This is a part of the Apache Commons Project.")
6492 (license license:asl2.0)))
6493
6494 (define-public java-javaewah
6495 (package
6496 (name "java-javaewah")
6497 (version "1.1.6")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "https://github.com/lemire/javaewah/"
6501 "archive/JavaEWAH-" version ".tar.gz"))
6502 (sha256
6503 (base32
6504 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6505 (build-system ant-build-system)
6506 (arguments `(#:jar-name "javaewah.jar"))
6507 (inputs
6508 `(("java-junit" ,java-junit)
6509 ("java-hamcrest-core" ,java-hamcrest-core)))
6510 (home-page "https://github.com/lemire/javaewah")
6511 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6512 (description "This is a word-aligned compressed variant of the Java
6513 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6514 compression scheme. It can be used to implement bitmap indexes.
6515
6516 The goal of word-aligned compression is not to achieve the best compression,
6517 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6518 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6519 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6520 @code{BitSet} class by Sun).")
6521 ;; GPL2.0 derivates are explicitly allowed.
6522 (license license:asl2.0)))
6523
6524 (define-public java-slf4j-api
6525 (package
6526 (name "java-slf4j-api")
6527 (version "1.7.25")
6528 (source (origin
6529 (method url-fetch)
6530 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6531 version ".tar.gz"))
6532 (sha256
6533 (base32
6534 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6535 (modules '((guix build utils)))
6536 ;; Delete bundled jars.
6537 (snippet
6538 '(begin
6539 (for-each delete-file (find-files "." "\\.jar$"))
6540 #t))))
6541 (build-system ant-build-system)
6542 (arguments
6543 `(#:jar-name "slf4j-api.jar"
6544 #:source-dir "slf4j-api/src/main"
6545 #:test-dir "slf4j-api/src/test"
6546 #:phases
6547 (modify-phases %standard-phases
6548 (add-after 'build 'regenerate-jar
6549 (lambda _
6550 ;; pom.xml ignores these files in the jar creation process. If we don't,
6551 ;; we get the error "This code should have never made it into slf4j-api.jar"
6552 (delete-file-recursively "build/classes/org/slf4j/impl")
6553 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6554 "build/classes" ".")))
6555 (add-before 'check 'dont-test-abstract-classes
6556 (lambda _
6557 ;; abstract classes are not meant to be run with junit
6558 (substitute* "build.xml"
6559 (("<include name=\"\\*\\*/\\*Test.java\" />")
6560 (string-append "<include name=\"**/*Test.java\" />"
6561 "<exclude name=\"**/MultithreadedInitializationTest"
6562 ".java\" />")))
6563 #t)))))
6564 (inputs
6565 `(("java-junit" ,java-junit)
6566 ("java-hamcrest-core" ,java-hamcrest-core)))
6567 (home-page "https://www.slf4j.org/")
6568 (synopsis "Simple logging facade for Java")
6569 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6570 simple facade or abstraction for various logging
6571 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6572 allowing the end user to plug in the desired logging framework at deployment
6573 time.")
6574 (license license:expat)))
6575
6576 (define java-slf4j-api-bootstrap
6577 (package
6578 (inherit java-slf4j-api)
6579 (name "java-slf4j-api-bootstrap")
6580 (inputs `())
6581 (arguments
6582 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6583 ((#:tests? _ #f) #f)))))
6584
6585 (define-public java-slf4j-simple
6586 (package
6587 (name "java-slf4j-simple")
6588 (version "1.7.25")
6589 (source (package-source java-slf4j-api))
6590 (build-system ant-build-system)
6591 (arguments
6592 `(#:jar-name "slf4j-simple.jar"
6593 #:source-dir "slf4j-simple/src/main"
6594 #:test-dir "slf4j-simple/src/test"
6595 #:phases
6596 (modify-phases %standard-phases
6597 ;; The tests need some test classes from slf4j-api
6598 (add-before 'check 'build-slf4j-api-test-helpers
6599 (lambda _
6600 ;; Add current dir to CLASSPATH ...
6601 (setenv "CLASSPATH"
6602 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6603 ;; ... and build test helper classes here:
6604 (apply invoke
6605 `("javac" "-d" "."
6606 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6607 (inputs
6608 `(("java-junit" ,java-junit)
6609 ("java-hamcrest-core" ,java-hamcrest-core)
6610 ("java-slf4j-api" ,java-slf4j-api)))
6611 (home-page "https://www.slf4j.org/")
6612 (synopsis "Simple implementation of simple logging facade for Java")
6613 (description "SLF4J binding for the Simple implementation, which outputs
6614 all events to System.err. Only messages of level INFO and higher are
6615 printed.")
6616 (license license:expat)))
6617
6618 (define-public antlr2
6619 (package
6620 (name "antlr2")
6621 (version "2.7.7")
6622 (source (origin
6623 (method url-fetch)
6624 (uri (string-append "http://www.antlr2.org/download/antlr-"
6625 version ".tar.gz"))
6626 (sha256
6627 (base32
6628 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6629 (modules '((guix build utils)))
6630 (snippet
6631 '(begin
6632 (delete-file "antlr.jar")
6633 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6634 (("#include <map>")
6635 (string-append
6636 "#include <map>\n"
6637 "#define EOF (-1)\n"
6638 "#include <strings.h>")))
6639 (substitute* "configure"
6640 (("/bin/sh") "sh"))
6641 #t))))
6642 (build-system gnu-build-system)
6643 (arguments
6644 `(#:tests? #f ; no test target
6645 #:imported-modules ((guix build ant-build-system)
6646 (guix build syscalls)
6647 ,@%gnu-build-system-modules)
6648 #:modules (((guix build ant-build-system) #:prefix ant:)
6649 (guix build gnu-build-system)
6650 (guix build utils))
6651 #:phases
6652 (modify-phases %standard-phases
6653 (add-after 'install 'strip-jar-timestamps
6654 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6655 (add-before 'configure 'fix-timestamp
6656 (lambda _
6657 (substitute* "configure"
6658 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6659 #t))
6660 (add-after 'configure 'fix-bin-ls
6661 (lambda _
6662 (substitute* (find-files "." "Makefile")
6663 (("/bin/ls") "ls"))
6664 #t)))))
6665 (native-inputs
6666 `(("which" ,which)
6667 ("zip" ,zip)
6668 ("java" ,icedtea "jdk")))
6669 (inputs
6670 `(("java" ,icedtea)))
6671 (home-page "http://www.antlr2.org")
6672 (synopsis "Framework for constructing recognizers, compilers, and translators")
6673 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6674 is a language tool that provides a framework for constructing recognizers,
6675 compilers, and translators from grammatical descriptions containing Java, C#,
6676 C++, or Python actions. ANTLR provides excellent support for tree construction,
6677 tree walking, and translation.")
6678 (license license:public-domain)))
6679
6680 (define-public java-stringtemplate-3
6681 (package
6682 (name "java-stringtemplate")
6683 (version "3.2.1")
6684 (source (origin
6685 (method url-fetch)
6686 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6687 "gh-pages/download/stringtemplate-"
6688 version ".tar.gz"))
6689 (sha256
6690 (base32
6691 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6692 (build-system ant-build-system)
6693 (arguments
6694 `(#:jar-name (string-append ,name "-" ,version ".jar")
6695 #:test-dir "test"
6696 #:modules ((guix build ant-build-system)
6697 (guix build utils)
6698 (srfi srfi-1))
6699 #:phases
6700 (modify-phases %standard-phases
6701 (add-before 'check 'fix-tests
6702 (lambda _
6703 (substitute* "build.xml"
6704 (("\\$\\{test.home\\}/java")
6705 "${test.home}/org"))
6706 #t))
6707 (add-before 'build 'generate-grammar
6708 (lambda _
6709 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6710 (for-each (lambda (file)
6711 (format #t "~a\n" file)
6712 (invoke "antlr" file))
6713 '("template.g" "angle.bracket.template.g" "action.g"
6714 "eval.g" "group.g" "interface.g")))
6715 #t)))))
6716 (native-inputs
6717 `(("antlr" ,antlr2)
6718 ("java-junit" ,java-junit)))
6719 (home-page "http://www.stringtemplate.org")
6720 (synopsis "Template engine to generate formatted text output")
6721 (description "StringTemplate is a java template engine (with ports for C#,
6722 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6723 or any other formatted text output. StringTemplate is particularly good at
6724 code generators, multiple site skins, and internationalization / localization.
6725 StringTemplate also powers ANTLR.")
6726 (license license:bsd-3)))
6727
6728 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6729 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6730 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6731 ;; of antlr3 at runtime.
6732 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6733 ;; This version of ST4 is sufficient for the latest antlr3.
6734 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6735 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6736 ;; against the latest ST4.
6737 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6738 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6739 ;; only grammar files with the antlr2 syntax.
6740 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6741
6742 (define-public java-stringtemplate
6743 (package (inherit java-stringtemplate-3)
6744 (name "java-stringtemplate")
6745 (version "4.0.8")
6746 (source (origin
6747 (method url-fetch)
6748 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6749 version ".tar.gz"))
6750 (file-name (string-append name "-" version ".tar.gz"))
6751 (sha256
6752 (base32
6753 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6754 (build-system ant-build-system)
6755 (arguments
6756 `(#:jar-name (string-append ,name "-" ,version ".jar")
6757 #:tests? #f ; FIXME: tests fail for unknown reasons
6758 #:test-dir "test"
6759 #:modules ((guix build ant-build-system)
6760 (guix build utils)
6761 (srfi srfi-1))
6762 #:phases
6763 (modify-phases %standard-phases
6764 (add-before 'check 'fix-test-target
6765 (lambda _
6766 (substitute* "build.xml"
6767 (("\\$\\{test.home\\}/java") "${test.home}/")
6768 (("\\*Test.java") "Test*.java"))
6769 #t))
6770 (add-before 'build 'generate-grammar
6771 (lambda _
6772 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6773 (for-each (lambda (file)
6774 (format #t "~a\n" file)
6775 (invoke "antlr3" file))
6776 '("STParser.g" "Group.g" "CodeGenerator.g")))
6777 #t)))))
6778 (inputs
6779 `(("antlr3" ,antlr3-bootstrap)
6780 ("antlr2" ,antlr2)
6781 ("java-stringtemplate" ,java-stringtemplate-3)
6782 ("java-junit" ,java-junit)))))
6783
6784 (define java-stringtemplate-4.0.6
6785 (package (inherit java-stringtemplate)
6786 (name "java-stringtemplate")
6787 (version "4.0.6")
6788 (source (origin
6789 (method url-fetch)
6790 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6791 version ".tar.gz"))
6792 (file-name (string-append name "-" version ".tar.gz"))
6793 (sha256
6794 (base32
6795 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6796 (inputs
6797 `(("antlr3" ,antlr3-3.3)
6798 ("antlr2" ,antlr2)
6799 ("java-stringtemplate" ,java-stringtemplate-3)))))
6800
6801 (define-public antlr3
6802 (package
6803 (name "antlr3")
6804 (version "3.5.2")
6805 (source (origin
6806 (method url-fetch)
6807 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6808 version ".tar.gz"))
6809 (file-name (string-append name "-" version ".tar.gz"))
6810 (sha256
6811 (base32
6812 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6813 (build-system ant-build-system)
6814 (arguments
6815 `(#:jar-name (string-append ,name "-" ,version ".jar")
6816 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6817 #:tests? #f
6818 #:phases
6819 (modify-phases %standard-phases
6820 (add-after 'install 'bin-install
6821 (lambda* (#:key inputs outputs #:allow-other-keys)
6822 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6823 (bin (string-append (assoc-ref outputs "out") "/bin")))
6824 (mkdir-p bin)
6825 (with-output-to-file (string-append bin "/antlr3")
6826 (lambda _
6827 (display
6828 (string-append "#!" (which "sh") "\n"
6829 "java -cp " jar "/" ,name "-" ,version ".jar:"
6830 (string-concatenate
6831 (find-files (assoc-ref inputs "stringtemplate")
6832 ".*\\.jar"))
6833 ":"
6834 (string-concatenate
6835 (find-files (assoc-ref inputs "stringtemplate4")
6836 ".*\\.jar"))
6837 ":"
6838 (string-concatenate
6839 (find-files (string-append
6840 (assoc-ref inputs "antlr")
6841 "/lib")
6842 ".*\\.jar"))
6843 " org.antlr.Tool $*"))))
6844 (chmod (string-append bin "/antlr3") #o755))
6845 #t))
6846 (add-before 'build 'generate-grammar
6847 (lambda _
6848 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6849 (for-each (lambda (file)
6850 (display file)
6851 (newline)
6852 (invoke "antlr3" file))
6853 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6854 "AssignTokenTypesWalker.g"
6855 "ActionTranslator.g" "TreeToNFAConverter.g"
6856 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6857 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6858 (substitute* "ANTLRParser.java"
6859 (("public Object getTree") "public GrammarAST getTree"))
6860 (substitute* "ANTLRv3Parser.java"
6861 (("public Object getTree") "public CommonTree getTree"))
6862 (chdir "../../../../../java")
6863 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6864 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6865 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6866 (substitute* "org/antlr/tool/ErrorManager.java"
6867 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6868 (chdir "../../../..")
6869 #t))
6870 (add-before 'build 'fix-build-xml
6871 (lambda _
6872 (substitute* "build.xml"
6873 (("target name=\"compile\">")
6874 "target name=\"compile\">
6875 <copy todir=\"${classes.dir}\">
6876 <fileset dir=\"tool/src/main/resources\">
6877 <include name=\"**/*.stg\"/>
6878 <include name=\"**/*.st\"/>
6879 <include name=\"**/*.sti\"/>
6880 <include name=\"**/STLexer.tokens\"/>
6881 </fileset>
6882 </copy>"))
6883 #t)))))
6884 (native-inputs
6885 `(("antlr" ,antlr2)
6886 ("antlr3" ,antlr3-bootstrap)))
6887 (inputs
6888 `(("junit" ,java-junit)
6889 ("stringtemplate" ,java-stringtemplate-3)
6890 ("stringtemplate4" ,java-stringtemplate)))
6891 (propagated-inputs
6892 `(("stringtemplate" ,java-stringtemplate-3)
6893 ("antlr" ,antlr2)
6894 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6895 (home-page "http://www.antlr3.org")
6896 (synopsis "Framework for constructing recognizers, compilers, and translators")
6897 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6898 is a language tool that provides a framework for constructing recognizers,
6899 compilers, and translators from grammatical descriptions containing Java, C#,
6900 C++, or Python actions. ANTLR provides excellent support for tree construction,
6901 tree walking, and translation.")
6902 (license license:bsd-3)))
6903
6904 (define antlr3-bootstrap
6905 (package
6906 (inherit antlr3)
6907 (name "antlr3-bootstrap")
6908 (native-inputs
6909 `(("antlr" ,antlr2)
6910 ("antlr3" ,antlr3-3.3)))
6911 (inputs
6912 `(("junit" ,java-junit)))))
6913
6914 (define antlr3-3.3
6915 (package
6916 (inherit antlr3)
6917 (name "antlr3")
6918 (version "3.3")
6919 (source (origin
6920 (method url-fetch)
6921 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6922 "gh-pages/download/antlr-"
6923 version ".tar.gz"))
6924 (sha256
6925 (base32
6926 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6927 (patches
6928 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6929 (arguments
6930 `(#:jar-name (string-append ,name "-" ,version ".jar")
6931 #:source-dir (string-join '("tool/src/main/java"
6932 "runtime/Java/src/main/java"
6933 "tool/src/main/antlr2"
6934 "tool/src/main/antlr3")
6935 ":")
6936 #:tests? #f ; FIXME: tests seem to require maven plugin
6937 #:modules ((guix build ant-build-system)
6938 (guix build utils)
6939 (srfi srfi-1))
6940 #:phases
6941 (modify-phases %standard-phases
6942 (add-after 'install 'bin-install
6943 (lambda* (#:key inputs outputs #:allow-other-keys)
6944 (let* ((out (assoc-ref outputs "out"))
6945 (jar (string-append out "/share/java"))
6946 (bin (string-append out "/bin")))
6947 (mkdir-p bin)
6948 (with-output-to-file (string-append bin "/antlr3")
6949 (lambda _
6950 (display
6951 (string-append
6952 "#!" (which "sh") "\n"
6953 "java -cp " jar "/antlr3-3.3.jar:"
6954 (string-join
6955 (append (find-files (assoc-ref inputs "java-stringtemplate")
6956 ".*\\.jar$")
6957 (find-files (string-append (assoc-ref inputs "antlr")
6958 "/lib")
6959 ".*\\.jar$"))
6960 ":")
6961 " org.antlr.Tool $*"))))
6962 (chmod (string-append bin "/antlr3") #o755)
6963 #t)))
6964 (add-before 'build 'generate-grammar
6965 (lambda _
6966 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6967 (("import org.antlr.grammar.v2.\\*;")
6968 "import org.antlr.grammar.v2.*;\n
6969 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6970 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6971 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6972 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6973 (for-each (lambda (file)
6974 (format #t "~a\n" file)
6975 (invoke "antlr" file))
6976 '("antlr.g" "antlr.print.g" "assign.types.g"
6977 "buildnfa.g" "codegen.g" "define.g")))
6978 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6979 (for-each (lambda (file)
6980 (format #t "~a\n" file)
6981 (invoke "antlr3" file))
6982 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6983 "ANTLRv3Tree.g")))
6984 #t))
6985 (add-before 'build 'fix-build-xml
6986 (lambda _
6987 (substitute* "build.xml"
6988 (("target name=\"compile\">")
6989 "target name=\"compile\">
6990 <copy todir=\"${classes.dir}\">
6991 <fileset dir=\"tool/src/main/resources\">
6992 <include name=\"**/*.stg\"/>
6993 <include name=\"**/*.st\"/>
6994 <include name=\"**/*.sti\"/>
6995 <include name=\"**/STLexer.tokens\"/>
6996 </fileset>
6997 </copy>"))
6998 #t)))))
6999 (native-inputs
7000 `(("antlr" ,antlr2)
7001 ("antlr3" ,antlr3-3.1)))
7002 (inputs
7003 `(("junit" ,java-junit)))
7004 (propagated-inputs
7005 `(("java-stringtemplate" ,java-stringtemplate-3)
7006 ("antlr" ,antlr2)
7007 ("antlr3" ,antlr3-3.1)))))
7008
7009 (define-public antlr3-3.1
7010 (package
7011 (inherit antlr3)
7012 (version "3.1")
7013 (source (origin
7014 (method url-fetch)
7015 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7016 "gh-pages/download/antlr-"
7017 version ".tar.gz"))
7018 (sha256
7019 (base32
7020 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7021 (patches
7022 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7023 (arguments
7024 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7025 #:source-dir "src:runtime/Java/src"
7026 #:tests? #f
7027 #:phases
7028 (modify-phases %standard-phases
7029 (add-after 'install 'bin-install
7030 (lambda* (#:key inputs outputs #:allow-other-keys)
7031 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7032 (bin (string-append (assoc-ref outputs "out") "/bin")))
7033 (mkdir-p bin)
7034 (with-output-to-file (string-append bin "/antlr3")
7035 (lambda _
7036 (display
7037 (string-append "#!" (which "sh") "\n"
7038 "java -cp " jar "/antlr3-3.1.jar:"
7039 (string-concatenate
7040 (find-files (assoc-ref inputs "stringtemplate")
7041 ".*\\.jar"))
7042 ":"
7043 (string-concatenate
7044 (find-files (string-append
7045 (assoc-ref inputs "antlr")
7046 "/lib")
7047 ".*\\.jar"))
7048 " org.antlr.Tool $*"))))
7049 (chmod (string-append bin "/antlr3") #o755))
7050 #t))
7051 (add-before 'build 'generate-grammar
7052 (lambda _
7053 (let ((dir "src/org/antlr/tool/"))
7054 (for-each (lambda (file)
7055 (display file)
7056 (newline)
7057 (invoke "antlr" "-o" dir (string-append dir file)))
7058 '("antlr.g" "antlr.print.g" "assign.types.g"
7059 "buildnfa.g" "define.g")))
7060 (format #t "codegen.g\n")
7061 (invoke "antlr" "-o" "src/org/antlr/codegen"
7062 "src/org/antlr/codegen/codegen.g")
7063 #t))
7064 (add-before 'build 'fix-build-xml
7065 (lambda _
7066 (substitute* "build.xml"
7067 (("target name=\"compile\">")
7068 "target name=\"compile\">
7069 <copy todir=\"${classes.dir}\">
7070 <fileset dir=\"src\">
7071 <include name=\"**/*.stg\"/>
7072 <include name=\"**/*.st\"/>
7073 <include name=\"**/*.sti\"/>
7074 <include name=\"**/STLexer.tokens\"/>
7075 </fileset>
7076 </copy>"))
7077 #t)))))
7078 (native-inputs
7079 `(("antlr" ,antlr2)))
7080 (inputs
7081 `(("junit" ,java-junit)))
7082 (propagated-inputs
7083 `(("stringtemplate" ,java-stringtemplate-3)))))
7084
7085 (define-public java-commons-cli-1.2
7086 ;; This is a bootstrap dependency for Maven2.
7087 (package
7088 (inherit java-commons-cli)
7089 (version "1.2")
7090 (source (origin
7091 (method url-fetch)
7092 (uri (string-append "mirror://apache/commons/cli/source/"
7093 "commons-cli-" version "-src.tar.gz"))
7094 (sha256
7095 (base32
7096 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7097 (arguments
7098 `(#:jar-name "commons-cli.jar"
7099 #:phases
7100 (modify-phases %standard-phases
7101 (add-before 'check 'fix-build-xml
7102 (lambda* (#:key inputs #:allow-other-keys)
7103 (substitute* "build.xml"
7104 (("dir=\"\\$\\{test.home\\}/java\"")
7105 "dir=\"${test.home}\""))
7106 #t)))))
7107 (native-inputs
7108 `(("java-junit" ,java-junit)))))
7109
7110 (define-public java-microemulator-cldc
7111 (package
7112 (name "java-microemulator-cldc")
7113 (version "2.0.4")
7114 (source (origin
7115 (method url-fetch)
7116 (uri (string-append "https://github.com/barteo/microemu/archive/"
7117 "microemulator_"
7118 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7119 version)
7120 ".tar.gz"))
7121 (file-name (string-append name "-" version ".tar.gz"))
7122 (sha256
7123 (base32
7124 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7125 (build-system ant-build-system)
7126 (arguments
7127 `(#:jar-name "microemulator-cldc.jar"
7128 #:source-dir "microemu-cldc/src/main/java"
7129 #:tests? #f)); Requires even older software
7130 (home-page "https://github.com/barteo/microemu")
7131 (synopsis "J2ME CLDC emulator")
7132 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7133 Emulator. It allows to demonstrate MIDlet based applications in web browser
7134 applet and can be run as a standalone java application.")
7135 (license (list license:asl2.0
7136 ;; or altenatively:
7137 license:lgpl2.1+))))
7138
7139 (define-public java-datanucleus-javax-persistence
7140 (package
7141 (name "java-datanucleus-javax-persistence")
7142 (version "2.2.0")
7143 (source (origin
7144 (method url-fetch)
7145 (uri (string-append "https://github.com/datanucleus/"
7146 "javax.persistence/archive/javax.persistence-"
7147 version "-release.tar.gz"))
7148 (sha256
7149 (base32
7150 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7151 (build-system ant-build-system)
7152 (arguments
7153 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7154 #:jdk ,icedtea-8
7155 #:source-dir "src/main/java"
7156 #:tests? #f)); no tests
7157 (home-page "https://github.com/datanucleus/javax.persistence")
7158 (synopsis "JPA API")
7159 (description "This package contains a clean definition of JPA API intended
7160 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7161 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7162 used to generate this API.")
7163 (license (list license:edl1.0 license:epl1.0))))
7164
7165 (define-public java-osgi-cmpn
7166 (package
7167 (name "java-osgi-cmpn")
7168 (version "6.0.0")
7169 (source (origin
7170 (method url-fetch)
7171 (uri (string-append "http://central.maven.org/maven2/"
7172 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7173 version "-sources.jar"))
7174 (sha256
7175 (base32
7176 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7177 (build-system ant-build-system)
7178 (arguments
7179 `(#:jar-name "osgi-cmpn.jar"
7180 #:tests? #f)); no tests
7181 (inputs
7182 `(("annotation" ,java-osgi-annotation)
7183 ("core" ,java-osgi-core)
7184 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7185 ("microemulator" ,java-microemulator-cldc)
7186 ("servlet" ,java-classpathx-servletapi)))
7187 (home-page "https://www.osgi.org")
7188 (synopsis "Compendium specification module of OSGi framework")
7189 (description
7190 "OSGi, for Open Services Gateway initiative framework, is a module system
7191 and service platform for the Java programming language. This package contains
7192 the compendium specification module, providing interfaces and classes for use
7193 in compiling bundles.")
7194 (license license:asl2.0)))
7195
7196 (define-public java-osgi-service-component-annotations
7197 (package
7198 (name "java-osgi-service-component-annotations")
7199 (version "1.3.0")
7200 (source (origin
7201 (method url-fetch)
7202 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7203 "org.osgi.service.component.annotations/"
7204 version "/org.osgi.service.component.annotations-"
7205 version "-sources.jar"))
7206 (sha256
7207 (base32
7208 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7209 (build-system ant-build-system)
7210 (arguments
7211 `(#:jar-name "osgi-service-component-annotations.jar"
7212 #:tests? #f)); no tests
7213 (inputs
7214 `(("annotation" ,java-osgi-annotation)))
7215 (home-page "https://www.osgi.org")
7216 (synopsis "Support annotations for osgi-service-component")
7217 (description
7218 "OSGi, for Open Services Gateway initiative framework, is a module system
7219 and service platform for the Java programming language. This package contains
7220 the support annotations for osgi-service-component.")
7221 (license license:asl2.0)))
7222
7223 (define-public java-osgi-dto
7224 (package
7225 (name "java-osgi-dto")
7226 (version "1.0.0")
7227 (source (origin
7228 (method url-fetch)
7229 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7230 "org.osgi.dto/" version "/org.osgi.dto-"
7231 version "-sources.jar"))
7232 (sha256
7233 (base32
7234 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7235 (build-system ant-build-system)
7236 (arguments
7237 `(#:jar-name "osgi-dto.jar"
7238 #:tests? #f)); no tests
7239 (inputs
7240 `(("annotation" ,java-osgi-annotation)))
7241 (home-page "https://www.osgi.org")
7242 (synopsis "Data Transfer Objects")
7243 (description
7244 "OSGi, for Open Services Gateway initiative framework, is a module system
7245 and service platform for the Java programming language. This package contains
7246 the Data Transfer Objects. It is easily serializable having only public fields
7247 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7248 Map and array aggregates may also be used. The aggregates must only hold
7249 objects of the listed types or aggregates.")
7250 (license license:asl2.0)))
7251
7252 (define-public java-osgi-resource
7253 (package
7254 (name "java-osgi-resource")
7255 (version "1.0.0")
7256 (source (origin
7257 (method url-fetch)
7258 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7259 "org.osgi.resource/"
7260 version "/org.osgi.resource-"
7261 version "-sources.jar"))
7262 (sha256
7263 (base32
7264 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7265 (build-system ant-build-system)
7266 (arguments
7267 `(#:jar-name "osgi-resource.jar"
7268 #:tests? #f)); no tests
7269 (inputs
7270 `(("annotation" ,java-osgi-annotation)
7271 ("dto" ,java-osgi-dto)))
7272 (home-page "https://www.osgi.org")
7273 (synopsis "OSGI Resource")
7274 (description
7275 "OSGi, for Open Services Gateway initiative framework, is a module system
7276 and service platform for the Java programming language. This package contains
7277 the definition of common types in osgi packages.")
7278 (license license:asl2.0)))
7279
7280 (define-public java-osgi-namespace-contract
7281 (package
7282 (name "java-osgi-namespace-contract")
7283 (version "1.0.0")
7284 (source (origin
7285 (method url-fetch)
7286 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7287 "org.osgi.namespace.contract/"
7288 version "/org.osgi.namespace.contract-"
7289 version "-sources.jar"))
7290 (sha256
7291 (base32
7292 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7293 (build-system ant-build-system)
7294 (inputs
7295 `(("resource" ,java-osgi-resource)
7296 ("annotation" ,java-osgi-annotation)))
7297 (arguments
7298 `(#:jar-name "osgi-namespace-contract.jar"
7299 #:tests? #f)); no tests
7300 (home-page "https://www.osgi.org")
7301 (synopsis "Contract Capability and Requirement Namespace")
7302 (description
7303 "OSGi, for Open Services Gateway initiative framework, is a module system
7304 and service platform for the Java programming language. This package contains
7305 the names for the attributes and directives for a namespace with contracts.")
7306 (license license:asl2.0)))
7307
7308 (define-public java-osgi-namespace-extender
7309 (package
7310 (name "java-osgi-namespace-extender")
7311 (version "1.0.1")
7312 (source (origin
7313 (method url-fetch)
7314 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7315 "org.osgi.namespace.extender/"
7316 version "/org.osgi.namespace.extender-"
7317 version "-sources.jar"))
7318 (sha256
7319 (base32
7320 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7321 (build-system ant-build-system)
7322 (inputs
7323 `(("resource" ,java-osgi-resource)
7324 ("annotation" ,java-osgi-annotation)))
7325 (arguments
7326 `(#:jar-name "osgi-namespace-extendent.jar"
7327 #:tests? #f)); no tests
7328 (home-page "https://www.osgi.org")
7329 (synopsis "Extender Capability and Requirement Namespace")
7330 (description
7331 "OSGi, for Open Services Gateway initiative framework, is a module system
7332 and service platform for the Java programming language. This package contains
7333 the names for the attributes and directives for an extender namespace.")
7334 (license license:asl2.0)))
7335
7336 (define-public java-osgi-namespace-service
7337 (package
7338 (name "java-osgi-namespace-service")
7339 (version "1.0.0")
7340 (source (origin
7341 (method url-fetch)
7342 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7343 "org.osgi.namespace.service/"
7344 version "/org.osgi.namespace.service-"
7345 version "-sources.jar"))
7346 (sha256
7347 (base32
7348 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7349 (build-system ant-build-system)
7350 (inputs
7351 `(("resource" ,java-osgi-resource)
7352 ("annotation" ,java-osgi-annotation)))
7353 (arguments
7354 `(#:jar-name "osgi-namespace-service.jar"
7355 #:tests? #f)); no tests
7356 (home-page "https://www.osgi.org")
7357 (synopsis "Service Capability and Requirement Namespace")
7358 (description
7359 "OSGi, for Open Services Gateway initiative framework, is a module system
7360 and service platform for the Java programming language. This package contains
7361 the names for the attributes and directives for a service namespace.")
7362 (license license:asl2.0)))
7363
7364 (define-public java-osgi-util-function
7365 (package
7366 (name "java-osgi-util-function")
7367 (version "1.0.0")
7368 (source (origin
7369 (method url-fetch)
7370 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7371 "org.osgi.util.function/"
7372 version "/org.osgi.util.function-"
7373 version "-sources.jar"))
7374 (sha256
7375 (base32
7376 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7377 (build-system ant-build-system)
7378 (arguments
7379 `(#:jar-name "osgi-util-function.jar"
7380 #:tests? #f)); no tests
7381 (inputs
7382 `(("annotation" ,java-osgi-annotation)))
7383 (home-page "https://www.osgi.org")
7384 (synopsis "OSGI Util Function")
7385 (description
7386 "OSGi, for Open Services Gateway initiative framework, is a module system
7387 and service platform for the Java programming language. This package contains
7388 an interface for a function that accepts a single argument and produces a result.")
7389 (license license:asl2.0)))
7390
7391 (define-public java-osgi-util-promise
7392 (package
7393 (name "java-osgi-util-promise")
7394 (version "1.0.0")
7395 (source (origin
7396 (method url-fetch)
7397 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7398 "org.osgi.util.promise/"
7399 version "/org.osgi.util.promise-"
7400 version "-sources.jar"))
7401 (sha256
7402 (base32
7403 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7404 (build-system ant-build-system)
7405 (arguments
7406 `(#:jar-name "osgi-util-promise.jar"
7407 #:tests? #f)); no tests
7408 (inputs
7409 `(("annotation" ,java-osgi-annotation)
7410 ("function" ,java-osgi-util-function)))
7411 (home-page "https://www.osgi.org")
7412 (synopsis "Promise of a value")
7413 (description
7414 "OSGi, for Open Services Gateway initiative framework, is a module system
7415 and service platform for the Java programming language. This package contains
7416 an interface and utilitary classes for promises. A Promise represents a future
7417 value. It handles the interactions for asynchronous processing.")
7418 (license license:asl2.0)))
7419
7420 (define-public java-osgi-service-metatype-annotations
7421 (package
7422 (name "java-osgi-service-metatype-annotations")
7423 (version "1.3.0")
7424 (source (origin
7425 (method url-fetch)
7426 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7427 "org.osgi.service.metatype.annotations/"
7428 version "/org.osgi.service.metatype.annotations-"
7429 version "-sources.jar"))
7430 (sha256
7431 (base32
7432 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7433 (build-system ant-build-system)
7434 (arguments
7435 `(#:jar-name "osgi-service-metatype-annotations.jar"
7436 #:tests? #f)); no tests
7437 (inputs
7438 `(("annotation" ,java-osgi-annotation)))
7439 (home-page "https://www.osgi.org")
7440 (synopsis "Support annotations for metatype")
7441 (description
7442 "OSGi, for Open Services Gateway initiative framework, is a module system
7443 and service platform for the Java programming language. This package contains
7444 the support annotations for metatype.")
7445 (license license:asl2.0)))
7446
7447 (define-public java-osgi-service-repository
7448 (package
7449 (name "java-osgi-service-repository")
7450 (version "1.1.0")
7451 (source (origin
7452 (method url-fetch)
7453 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7454 "org.osgi.service.repository/"
7455 version "/org.osgi.service.repository-"
7456 version "-sources.jar"))
7457 (sha256
7458 (base32
7459 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7460 (build-system ant-build-system)
7461 (arguments
7462 `(#:jar-name "osgi-service-repository.jar"
7463 #:tests? #f)); no tests
7464 (inputs
7465 `(("annotation" ,java-osgi-annotation)
7466 ("promise" ,java-osgi-util-promise)
7467 ("resource" ,java-osgi-resource)))
7468 (home-page "https://www.osgi.org")
7469 (synopsis "OSGI service repository")
7470 (description
7471 "OSGi, for Open Services Gateway initiative framework, is a module system
7472 and service platform for the Java programming language. This package contains
7473 a repository service that contains resources.")
7474 (license license:asl2.0)))
7475
7476 (define-public java-osgi-framework
7477 (package
7478 (name "java-osgi-framework")
7479 (version "1.8.0")
7480 (source (origin
7481 (method url-fetch)
7482 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7483 "org.osgi.framework/" version "/org.osgi.framework-"
7484 version "-sources.jar"))
7485 (sha256
7486 (base32
7487 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7488 (build-system ant-build-system)
7489 (arguments
7490 `(#:jar-name "osgi-framework.jar"
7491 #:tests? #f)); no tests
7492 (inputs
7493 `(("annotation" ,java-osgi-annotation)
7494 ("resource" ,java-osgi-resource)
7495 ("dto" ,java-osgi-dto)))
7496 (home-page "https://www.osgi.org")
7497 (synopsis "OSGi framework")
7498 (description
7499 "OSGi, for Open Services Gateway initiative framework, is a module system
7500 and service platform for the Java programming language.")
7501 (license license:asl2.0)))
7502
7503 (define-public java-osgi-service-log
7504 (package
7505 (name "java-osgi-service-log")
7506 (version "1.3.0")
7507 (source (origin
7508 (method url-fetch)
7509 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7510 "org.osgi.service.log/"
7511 version "/org.osgi.service.log-"
7512 version "-sources.jar"))
7513 (sha256
7514 (base32
7515 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7516 (build-system ant-build-system)
7517 (arguments
7518 `(#:jar-name "osgi-service-log.jar"
7519 #:tests? #f)); no tests
7520 (inputs
7521 `(("java-osgi-framework" ,java-osgi-framework)))
7522 (home-page "https://www.osgi.org")
7523 (synopsis "Provides methods for bundles to write messages to the log")
7524 (description
7525 "OSGi, for Open Services Gateway initiative framework, is a module system
7526 and service platform for the Java programming language. This package contains
7527 the log service.")
7528 (license license:asl2.0)))
7529
7530 (define-public java-osgi-service-jdbc
7531 (package
7532 (name "java-osgi-service-jdbc")
7533 (version "1.0.0")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7537 "org.osgi.service.jdbc/"
7538 version "/org.osgi.service.jdbc-"
7539 version "-sources.jar"))
7540 (sha256
7541 (base32
7542 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7543 (build-system ant-build-system)
7544 (arguments
7545 `(#:jar-name "osgi-service-jdbc.jar"
7546 #:tests? #f)); no tests
7547 (home-page "https://www.osgi.org")
7548 (synopsis "Factory for JDBC connection factories")
7549 (description
7550 "OSGi, for Open Services Gateway initiative framework, is a module system
7551 and service platform for the Java programming language. This package contains
7552 a factory for JDBC connection factories. There are 3 preferred connection
7553 factories for getting JDBC connections:
7554
7555 @itemize
7556 @item @code{javax.sql.DataSource};
7557 @item @code{javax.sql.ConnectionPoolDataSource};
7558 @item @code{javax.sql.XADataSource}.
7559 @end itemize")
7560 (license license:asl2.0)))
7561
7562 (define-public java-osgi-service-resolver
7563 (package
7564 (name "java-osgi-service-resolver")
7565 (version "1.0.1")
7566 (source (origin
7567 (method url-fetch)
7568 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7569 "org.osgi.service.resolver/"
7570 version "/org.osgi.service.resolver-"
7571 version "-sources.jar"))
7572 (sha256
7573 (base32
7574 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7575 (build-system ant-build-system)
7576 (arguments
7577 `(#:jar-name "osgi-service-resolver.jar"
7578 #:tests? #f)); no tests
7579 (inputs
7580 `(("annotation" ,java-osgi-annotation)
7581 ("resource" ,java-osgi-resource)))
7582 (home-page "https://www.osgi.org")
7583 (synopsis "OSGI Resolver service")
7584 (description
7585 "OSGi, for Open Services Gateway initiative framework, is a module system
7586 and service platform for the Java programming language. This package contains
7587 a resolver service that resolves the specified resources in the context supplied
7588 by the caller.")
7589 (license license:asl2.0)))
7590
7591 (define-public java-osgi-util-tracker
7592 (package
7593 (name "java-osgi-util-tracker")
7594 (version "1.5.1")
7595 (source (origin
7596 (method url-fetch)
7597 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7598 "org.osgi.util.tracker/"
7599 version "/org.osgi.util.tracker-"
7600 version "-sources.jar"))
7601 (sha256
7602 (base32
7603 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7604 (build-system ant-build-system)
7605 (arguments
7606 `(#:jar-name "osgi-util-tracker.jar"
7607 #:tests? #f)); no tests
7608 (inputs
7609 `(("framework" ,java-osgi-framework)
7610 ("annotation" ,java-osgi-annotation)))
7611 (home-page "https://www.osgi.org")
7612 (synopsis "Bundle tracking")
7613 (description
7614 "OSGi, for Open Services Gateway initiative framework, is a module system
7615 and service platform for the Java programming language. This package contains
7616 bundle tracking utility classes.")
7617 (license license:asl2.0)))
7618
7619 (define-public java-osgi-service-cm
7620 (package
7621 (name "java-osgi-service-cm")
7622 (version "1.5.0")
7623 (source (origin
7624 (method url-fetch)
7625 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7626 "org.osgi.service.cm/"
7627 version "/org.osgi.service.cm-"
7628 version "-sources.jar"))
7629 (sha256
7630 (base32
7631 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7632 (build-system ant-build-system)
7633 (arguments
7634 `(#:jar-name "osgi-service-cm.jar"
7635 #:tests? #f)); no tests
7636 (inputs
7637 `(("framework" ,java-osgi-framework)
7638 ("annotation" ,java-osgi-annotation)))
7639 (home-page "https://www.osgi.org")
7640 (synopsis "OSGI Configuration Management")
7641 (description
7642 "OSGi, for Open Services Gateway initiative framework, is a module system
7643 and service platform for the Java programming language. This package contains
7644 utility classes for the configuration of services.")
7645 (license license:asl2.0)))
7646
7647 (define-public java-osgi-service-packageadmin
7648 (package
7649 (name "java-osgi-service-packageadmin")
7650 (version "1.2.0")
7651 (source (origin
7652 (method url-fetch)
7653 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7654 "org.osgi.service.packageadmin/"
7655 version "/org.osgi.service.packageadmin-"
7656 version "-sources.jar"))
7657 (sha256
7658 (base32
7659 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7660 (build-system ant-build-system)
7661 (arguments
7662 `(#:jar-name "osgi-service-packageadmin.jar"
7663 #:tests? #f)); no tests
7664 (inputs
7665 `(("framework" ,java-osgi-framework)))
7666 (home-page "https://www.osgi.org")
7667 (synopsis "OSGI Package Administration")
7668 (description
7669 "OSGi, for Open Services Gateway initiative framework, is a module system
7670 and service platform for the Java programming language. This package contains
7671 the packageadmin service.")
7672 (license license:asl2.0)))
7673
7674 (define-public java-ops4j-base-lang
7675 (package
7676 (name "java-ops4j-base-lang")
7677 (version "1.5.0")
7678 (source (origin
7679 (method url-fetch)
7680 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7681 "archive/base-" version ".tar.gz"))
7682 (sha256
7683 (base32
7684 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7685 (build-system ant-build-system)
7686 (arguments
7687 `(#:jar-name "java-ops4j-base-lang.jar"
7688 #:source-dir "ops4j-base-lang/src/main/java"
7689 #:tests? #f; no tests
7690 #:phases
7691 (modify-phases %standard-phases
7692 (add-before 'build 'add-test-file
7693 (lambda _
7694 ;; That file is required by a test in ops4j-pax-exam-core-spi
7695 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7696 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7697 (lambda _
7698 (display
7699 (string-append
7700 "version=" ,version "\n"
7701 "groupId=org.ops4j.base"
7702 "artifactId=ops4j-base-lang\n"))))
7703 #t)))))
7704 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7705 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7706 (description "OPS4J stands for Open Participation Software for Java. This
7707 package contains utilities and extensions related to @code{java.lang}.")
7708 (license license:asl2.0)))
7709
7710 (define-public java-ops4j-base-monitors
7711 (package
7712 (inherit java-ops4j-base-lang)
7713 (name "java-ops4j-base-monitors")
7714 (arguments
7715 `(#:jar-name "java-ops4j-base-monitors.jar"
7716 #:source-dir "ops4j-base-monitors/src/main/java"
7717 #:tests? #f)); no tests
7718 (inputs
7719 `(("lang" ,java-ops4j-base-lang)))
7720 (description "OPS4J stands for Open Participation Software for Java. This
7721 package contains utilities and extensions related to monitoring.")))
7722
7723 (define-public java-ops4j-base-io
7724 (package
7725 (inherit java-ops4j-base-lang)
7726 (name "java-ops4j-base-io")
7727 (arguments
7728 `(#:jar-name "java-ops4j-base-io.jar"
7729 #:source-dir "ops4j-base-io/src/main/java"
7730 #:test-dir "ops4j-base-io/src/test"
7731 #:test-exclude
7732 (list "**/ListerTest.java")))
7733 (inputs
7734 `(("lang" ,java-ops4j-base-monitors)
7735 ("lang" ,java-ops4j-base-lang)))
7736 (native-inputs
7737 `(("junit" ,java-junit)
7738 ("hamcrest" ,java-hamcrest-core)))
7739 (description "OPS4J stands for Open Participation Software for Java. This
7740 package contains utilities and extensions related to handling streams and files.")))
7741
7742 (define-public java-ops4j-base-util
7743 (package
7744 (inherit java-ops4j-base-lang)
7745 (name "java-ops4j-base-util")
7746 (arguments
7747 `(#:jar-name "java-ops4j-base-util.jar"
7748 #:source-dir "ops4j-base-util/src/main/java"
7749 #:test-dir "ops4j-base-util/src/test"))
7750 (inputs
7751 `(("lang" ,java-ops4j-base-lang)))
7752 (native-inputs
7753 `(("junit" ,java-junit)))
7754 (description "OPS4J stands for Open Participation Software for Java. This
7755 package contains utilities and extensions related to environment, i18n and
7756 mime types.")))
7757
7758 (define-public java-ops4j-base-util-property
7759 (package
7760 (inherit java-ops4j-base-lang)
7761 (name "java-ops4j-base-util-property")
7762 (arguments
7763 `(#:jar-name "java-ops4j-base-util-property.jar"
7764 #:source-dir "ops4j-base-util-property/src/main/java"
7765 #:tests? #f)); no tests
7766 (inputs
7767 `(("lang" ,java-ops4j-base-lang)
7768 ("util" ,java-ops4j-base-util)))
7769 (description "OPS4J stands for Open Participation Software for Java. This
7770 package contains utilities and extensions related to resolving properties from
7771 different sources.")))
7772
7773 (define-public java-ops4j-base-store
7774 (package
7775 (inherit java-ops4j-base-lang)
7776 (name "java-ops4j-base-store")
7777 (arguments
7778 `(#:jar-name "java-ops4j-base-store.jar"
7779 #:source-dir "ops4j-base-store/src/main/java"
7780 #:tests? #f)); no tests
7781 (inputs
7782 `(("lang" ,java-ops4j-base-lang)
7783 ("slf4j" ,java-slf4j-api)
7784 ("io" ,java-ops4j-base-io)))
7785 (description "OPS4J stands for Open Participation Software for Java. This
7786 package contains utilities for storing and retrieving data from an
7787 @code{InputStream}.")))
7788
7789 (define-public java-ops4j-base-spi
7790 (package
7791 (inherit java-ops4j-base-lang)
7792 (name "java-ops4j-base-spi")
7793 (arguments
7794 `(#:jar-name "java-ops4j-base-spi.jar"
7795 #:source-dir "ops4j-base-spi/src/main/java"
7796 #:test-dir "ops4j-base-spi/src/test"))
7797 (native-inputs
7798 `(("junit" ,java-junit)
7799 ("hamcrest" ,java-hamcrest-core)))
7800 (description "OPS4J stands for Open Participation Software for Java. This
7801 package contains utilities for obtaining services via the Java SE 6
7802 @code{ServiceLoader}.")))
7803
7804 (define-public java-aqute-bnd-annotation
7805 (package
7806 (name "java-aqute-bnd-annotation")
7807 (version "3.5.0")
7808 (source (origin
7809 (method url-fetch)
7810 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7811 version ".REL.tar.gz"))
7812 (file-name (string-append name "-" version ".tar.gz"))
7813 (sha256
7814 (base32
7815 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7816 (build-system ant-build-system)
7817 (arguments
7818 `(#:jar-name "java-aqute-bnd-annotation.jar"
7819 #:source-dir "biz.aQute.bnd.annotation/src"
7820 #:tests? #f)); empty test dir
7821 (home-page "http://bnd.bndtools.org/")
7822 (synopsis "Tools for OSGi")
7823 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7824 headers based on analyzing the class code, it verifies the project settings,
7825 it manages project dependencies, gives diffs jars, and much more.")
7826 (license license:asl2.0)))
7827
7828 (define-public java-aqute-libg
7829 (package
7830 (inherit java-aqute-bnd-annotation)
7831 (name "java-aqute-libg")
7832 (arguments
7833 `(#:jar-name "java-aqute-libg.jar"
7834 ;; The build fails when source/target more recent than 1.7. This
7835 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7836 ;;
7837 ;; It is closed as won't fix. There is no way to change the source
7838 ;; so that it works on 1.8, and still works on 1.6, the upstream
7839 ;; target. It work fine on 1.7, so we use 1.7.
7840 #:make-flags (list "-Dant.build.javac.source=1.7"
7841 "-Dant.build.javac.target=1.7")
7842 #:phases
7843 (modify-phases %standard-phases
7844 (add-before 'configure 'chdir
7845 ;; Change to aQute.libg directory, so that the relative
7846 ;; paths in the tests aren't broken.
7847 (lambda _
7848 (chdir "aQute.libg")
7849 #t))
7850 (add-before 'check 'create-test-directory
7851 ;; Copy the test directory to test/java, since that's where
7852 ;; ant-build-system's default project in build.xml expects to find
7853 ;; the test classes. Leave a copy in the original place to not
7854 ;; break paths in tests.
7855 (lambda _
7856 (mkdir "src/test")
7857 (copy-recursively "test" "src/test/java")
7858 #t)))))
7859 (inputs
7860 `(("slf4j" ,java-slf4j-api)
7861 ("osgi-annot" ,java-osgi-annotation)
7862 ("java-osgi-cmpn" ,java-osgi-cmpn)
7863 ("osgi" ,java-osgi-core)))
7864 (native-inputs
7865 `(("hamcrest" ,java-hamcrest-core)
7866 ("java-junit" ,java-junit)))))
7867
7868 (define java-aqute-libg-bootstrap
7869 (package
7870 (inherit java-aqute-libg)
7871 (name "java-aqute-libg-bootstrap")
7872 (arguments
7873 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7874 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7875 ((#:tests? _ #f) #f)))
7876 (inputs
7877 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7878 ,@(delete `("slf4j" ,java-slf4j-api)
7879 (package-inputs java-aqute-libg))))
7880 (native-inputs '())))
7881
7882 (define-public java-aqute-bndlib
7883 (package
7884 (inherit java-aqute-bnd-annotation)
7885 (name "java-aqute-bndlib")
7886 (arguments
7887 `(#:jar-name "java-bndlib.jar"
7888 #:source-dir "biz.aQute.bndlib/src"
7889 #:tests? #f)); no tests
7890 (inputs
7891 `(("slf4j" ,java-slf4j-api)
7892 ("osgi-annot" ,java-osgi-annotation)
7893 ("java-aqute-libg" ,java-aqute-libg)
7894 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7895 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7896 ("java-osgi-service-repository" ,java-osgi-service-repository)
7897 ("java-osgi-service-log" ,java-osgi-service-log)
7898 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7899 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7900 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7901 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7902 ("promise" ,java-osgi-util-promise)
7903 ("osgi" ,java-osgi-core)))))
7904
7905 (define java-aqute-bndlib-bootstrap
7906 (package
7907 (inherit java-aqute-bndlib)
7908 (name "java-aqute-bndlib-bootstrap")
7909 (inputs
7910 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7911 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7912 ,@(delete `("slf4j" ,java-slf4j-api)
7913 (delete `("java-aqute-libg" ,java-aqute-libg)
7914 (package-inputs java-aqute-bndlib)))))))
7915
7916 (define-public java-ops4j-pax-tinybundles
7917 (package
7918 (name "java-ops4j-pax-tinybundles")
7919 (version "2.1.1")
7920 (source (origin
7921 (method url-fetch)
7922 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7923 "archive/tinybundles-" version ".tar.gz"))
7924 (sha256
7925 (base32
7926 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7927 (arguments
7928 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7929 #:source-dir "src/main/java"
7930 #:test-exclude
7931 ;; Abstract base classes for other tests
7932 (list "**/BndTest.java" "**/CoreTest.java")
7933 #:phases
7934 (modify-phases %standard-phases
7935 (add-before 'check 'fix-version
7936 (lambda _
7937 ;; This test has a reference to an old version of bndlib we are not
7938 ;; packaging. It uses the version referenced in pom.xml. We replace
7939 ;; it with our own version.
7940 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7941 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7942 ,(package-version java-aqute-bndlib)))
7943 #t)))))
7944 (inputs
7945 `(("lang" ,java-ops4j-base-lang)
7946 ("io" ,java-ops4j-base-io)
7947 ("store" ,java-ops4j-base-store)
7948 ("slf4j" ,java-slf4j-api)
7949 ("libg" ,java-aqute-libg)
7950 ("bndlib" ,java-aqute-bndlib)))
7951 (native-inputs
7952 `(("junit" ,java-junit)
7953 ("hamcrest" ,java-hamcrest-core)
7954 ("log4j" ,java-log4j-api)
7955 ("bndannotation" ,java-aqute-bnd-annotation)
7956 ("framework" ,java-osgi-framework)))
7957 (build-system ant-build-system)
7958 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7959 (synopsis "Java APIs to create OSGi related artifacts")
7960 (description "Tinybundles is all about creating OSGi related artifacts like
7961 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7962 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7963 other hand, this library can be a foundation of real end user tools that need
7964 to create those artifacts.")
7965 (license license:asl2.0)))
7966
7967 (define-public java-ops4j-pax-exam-core
7968 (package
7969 (name "java-ops4j-pax-exam-core")
7970 (version "4.11.0")
7971 (source (origin
7972 (method url-fetch)
7973 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7974 "archive/exam-reactor-" version ".tar.gz"))
7975 (sha256
7976 (base32
7977 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7978 (arguments
7979 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7980 #:source-dir "core/pax-exam/src/main/java"
7981 #:test-dir "core/pax-exam/src/test"))
7982 (inputs
7983 `(("slf4j" ,java-slf4j-api)
7984 ("lang" ,java-ops4j-base-lang)
7985 ("io" ,java-ops4j-base-io)
7986 ("util-property" ,java-ops4j-base-util-property)
7987 ("util-store" ,java-ops4j-base-store)
7988 ("java-osgi-core" ,java-osgi-core)))
7989 (native-inputs
7990 `(("junit" ,java-junit)
7991 ("hamcrest" ,java-hamcrest-core)))
7992 (build-system ant-build-system)
7993 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7994 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7995 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7996 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7997 the system under test at the same time.")
7998 (license license:asl2.0)))
7999
8000 (define-public java-ops4j-pax-exam-core-spi
8001 (package
8002 (inherit java-ops4j-pax-exam-core)
8003 (name "java-ops4j-pax-exam-core-spi")
8004 (arguments
8005 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8006 #:source-dir "src/main/java"
8007 #:test-exclude
8008 (list
8009 ;; Abstract base class, not a test
8010 "**/BaseStagedReactorTest.java"
8011 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8012 "**/WarBuilderTest.java")
8013 #:phases
8014 (modify-phases %standard-phases
8015 (add-before 'configure 'chdir
8016 (lambda _
8017 ;; Tests assume we are in this directory
8018 (chdir "core/pax-exam-spi")
8019 #t))
8020 (add-before 'check 'fix-tests
8021 (lambda _
8022 ;; One test checks that this file is present.
8023 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8024 (with-output-to-file
8025 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8026 (lambda _
8027 (display
8028 (string-append "artifactId = pax-exam-spi\n"
8029 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8030 ;; Maven puts compilation results in the target directory, while we
8031 ;; put them in the build directory.
8032 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8033 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8034 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8035 (("target") "build"))
8036 ;; One test is expected to fail, but it doesn't throw the expected exception
8037 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8038 (("AssertionError") "IllegalArgumentException"))
8039 #t)))))
8040 (inputs
8041 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8042 ("lang" ,java-ops4j-base-lang)
8043 ("monitors" ,java-ops4j-base-monitors)
8044 ("store" ,java-ops4j-base-store)
8045 ("io" ,java-ops4j-base-io)
8046 ("spi" ,java-ops4j-base-spi)
8047 ("osgi" ,java-osgi-core)
8048 ("slf4j" ,java-slf4j-api)
8049 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8050 (native-inputs
8051 `(("mockito" ,java-mockito-1)
8052 ("junit" ,java-junit)
8053 ("hamcrest" ,java-hamcrest-core)
8054 ("cglib" ,java-cglib)
8055 ("objenesis" ,java-objenesis)
8056 ("asm" ,java-asm)))))
8057
8058 (define-public java-ops4j-pax-exam-core-junit
8059 (package
8060 (inherit java-ops4j-pax-exam-core)
8061 (name "java-ops4j-pax-exam-core-junit")
8062 (arguments
8063 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8064 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8065 #:tests? #f)); no tests
8066 (inputs
8067 `(("junit" ,java-junit)
8068 ("slf4j" ,java-slf4j-api)
8069 ("core" ,java-ops4j-pax-exam-core)
8070 ("spi" ,java-ops4j-pax-exam-core-spi)))
8071 (native-inputs '())))
8072
8073 (define-public java-fasterxml-jackson-annotations
8074 (package
8075 (name "java-fasterxml-jackson-annotations")
8076 (version "2.9.4")
8077 (source (origin
8078 (method url-fetch)
8079 (uri (string-append "https://github.com/FasterXML/"
8080 "jackson-annotations/archive/"
8081 "jackson-annotations-" version ".tar.gz"))
8082 (sha256
8083 (base32
8084 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8085 (build-system ant-build-system)
8086 (arguments
8087 `(#:jar-name "jackson-annotations.jar"
8088 #:source-dir "src/main/java"
8089 #:test-dir "src/test"))
8090 (native-inputs
8091 `(("junit" ,java-junit)))
8092 (home-page "https://github.com/FasterXML/jackson-annotations")
8093 (synopsis "General purpose annotations for the Jackson Data Processor")
8094 (description "This package contains general purpose annotations for the
8095 Jackson Data Processor, used on value and handler types. The only annotations
8096 not included are ones that require dependency to the Databind package.")
8097 (license license:asl2.0)))
8098
8099 (define-public java-fasterxml-jackson-core
8100 (package
8101 (name "java-fasterxml-jackson-core")
8102 (version "2.9.4")
8103 (source (origin
8104 (method url-fetch)
8105 (uri (string-append "https://github.com/FasterXML/"
8106 "jackson-core/archive/"
8107 "jackson-core-" version ".tar.gz"))
8108 (sha256
8109 (base32
8110 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8111 (build-system ant-build-system)
8112 (arguments
8113 `(#:jar-name "jackson-core.jar"
8114 #:source-dir "src/main/java"
8115 #:test-dir "src/test"
8116 #:test-exclude
8117 (list
8118 ;; Expected failure. pom.xml excludes these
8119 "**/failing/**"
8120 ;; Base classes that have no constructor for junit
8121 "**/BaseTest.java"
8122 "**/ConcurrencyReadTest.java"
8123 "**/ManualCharAccessTest.java"
8124 "**/ManualCharAccessTest.java"
8125 "**/TrailingCommasTest.java"
8126 "**/AsyncMissingValuesInObjectTest.java"
8127 "**/AsyncMissingValuesInArrayTest.java")
8128 #:phases
8129 (modify-phases %standard-phases
8130 (add-before 'configure 'generate-PackageVersion.java
8131 (lambda _
8132 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8133 (in (string-append out ".in")))
8134 (copy-file in out)
8135 (substitute* out
8136 (("@package@") "com.fasterxml.jackson.core.json")
8137 (("@projectversion@") ,version)
8138 (("@projectgroupid@") "com.fasterxml.jackson.core")
8139 (("@projectartifactid@") "jackson-core")))
8140 #t))
8141 (add-before 'build 'copy-resources
8142 (lambda _
8143 (copy-recursively "src/main/resources"
8144 "build/classes")
8145 #t))
8146 (add-before 'check 'copy-test-resources
8147 (lambda _
8148 (copy-recursively "src/test/resources"
8149 "build/test-classes")
8150 #t)))))
8151 (native-inputs
8152 `(("junit" ,java-junit)
8153 ("hamcrest" ,java-hamcrest-core)))
8154 (home-page "https://github.com/FasterXML/jackson-core")
8155 (synopsis "")
8156 (description "")
8157 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8158
8159 (define-public java-fasterxml-jackson-databind
8160 (package
8161 (name "java-fasterxml-jackson-databind")
8162 (version "2.9.4")
8163 (source (origin
8164 (method url-fetch)
8165 (uri (string-append "https://github.com/FasterXML/"
8166 "jackson-databind/archive/"
8167 "jackson-databind-" version ".tar.gz"))
8168 (sha256
8169 (base32
8170 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8171 (build-system ant-build-system)
8172 (arguments
8173 `(#:jar-name "jackson-databind.jar"
8174 #:source-dir "src/main/java"
8175 #:tests? #f; requires javax.measures for which I can't find a free implementation
8176 #:phases
8177 (modify-phases %standard-phases
8178 (add-before 'configure 'generate-PackageVersion.java
8179 (lambda _
8180 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8181 (in (string-append out ".in")))
8182 (copy-file in out)
8183 (substitute* out
8184 (("@package@") "com.fasterxml.jackson.databind.cfg")
8185 (("@projectversion@") ,version)
8186 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8187 (("@projectartifactid@") "jackson-databind")))
8188 #t))
8189 (add-before 'build 'copy-resources
8190 (lambda _
8191 (copy-recursively "src/main/resources" "build/classes")
8192 #t)))))
8193 (inputs
8194 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8195 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8196 (home-page "https://github.com/FasterXML/jackson-databind")
8197 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8198 (description "This package contains the general-purpose data-binding
8199 functionality and tree-model for Jackson Data Processor. It builds on core
8200 streaming parser/generator package, and uses Jackson Annotations for
8201 configuration.")
8202 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8203
8204 (define-public java-fasterxml-jackson-modules-base-jaxb
8205 (package
8206 (name "java-fasterxml-jackson-modules-base-jaxb")
8207 (version "2.9.4")
8208 (source (origin
8209 (method url-fetch)
8210 (uri (string-append "https://github.com/FasterXML/"
8211 "jackson-modules-base/archive/"
8212 "jackson-modules-base-" version ".tar.gz"))
8213 (sha256
8214 (base32
8215 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8216 (build-system ant-build-system)
8217 (arguments
8218 `(#:jar-name "jackson-modules-base-jaxb.jar"
8219 #:source-dir "jaxb/src/main/java"
8220 #:test-dir "jaxb/src/test"
8221 #:test-exclude
8222 ;; Base class for tests
8223 (list "**/BaseJaxbTest.java")
8224 #:phases
8225 (modify-phases %standard-phases
8226 (add-before 'configure 'generate-PackageVersion.java
8227 (lambda _
8228 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8229 "jackson/module/jaxb/PackageVersion.java"))
8230 (in (string-append out ".in")))
8231 (copy-file in out)
8232 (substitute* out
8233 (("@package@") "com.fasterxml.jackson.module.jaxb")
8234 (("@projectversion@") ,version)
8235 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8236 (("@projectartifactid@") "jackson-module-jaxb")))
8237 #t))
8238 (add-before 'build 'copy-resources
8239 (lambda _
8240 (copy-recursively "jaxb/src/main/resources" "build/classes")
8241 #t)))))
8242 (inputs
8243 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8244 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8245 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8246 (native-inputs
8247 `(("java-junit" ,java-junit)))
8248 (home-page "https://github.com/FasterXML/jackson-modules-base")
8249 (synopsis "Jaxb annotations jackson module")
8250 (description "This package is the jaxb annotations module for jackson.")
8251 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8252
8253 (define-public java-fasterxml-jackson-modules-base-mrbean
8254 (package
8255 (name "java-fasterxml-jackson-modules-base-mrbean")
8256 (version "2.9.4")
8257 (source (origin
8258 (method url-fetch)
8259 (uri (string-append "https://github.com/FasterXML/"
8260 "jackson-modules-base/archive/"
8261 "jackson-modules-base-" version ".tar.gz"))
8262 (sha256
8263 (base32
8264 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8265 (build-system ant-build-system)
8266 (arguments
8267 `(#:jar-name "jackson-modules-base-mrbean.jar"
8268 #:source-dir "mrbean/src/main/java"
8269 #:test-dir "mrbean/src/test"
8270 #:test-exclude
8271 ;; Base class for tests
8272 (list "**/BaseTest.java")
8273 #:phases
8274 (modify-phases %standard-phases
8275 (add-before 'configure 'generate-PackageVersion.java
8276 (lambda _
8277 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8278 "jackson/module/mrbean/PackageVersion.java"))
8279 (in (string-append out ".in")))
8280 (copy-file in out)
8281 (substitute* out
8282 (("@package@") "com.fasterxml.jackson.module.mrbean")
8283 (("@projectversion@") ,version)
8284 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8285 (("@projectartifactid@") "jackson-module-mrbean")))
8286 #t)))))
8287 (inputs
8288 `(("java-asm" ,java-asm)
8289 ("java-fasterxml-jackson-annotations"
8290 ,java-fasterxml-jackson-annotations)
8291 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8292 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8293 (native-inputs
8294 `(("java-junit" ,java-junit)))
8295 (home-page "https://github.com/FasterXML/jackson-modules-base")
8296 (synopsis "POJO type materialization for Java")
8297 (description "This package implements POJO type materialization.
8298 Databinders can construct implementation classes for Java interfaces as part
8299 of deserialization.")
8300 (license license:asl2.0)))
8301
8302 (define-public java-snakeyaml
8303 (package
8304 (name "java-snakeyaml")
8305 (version "1.18")
8306 (source (origin
8307 (method url-fetch)
8308 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8309 version ".tar.gz"))
8310 (file-name (string-append name "-" version ".tar.gz"))
8311 (sha256
8312 (base32
8313 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8314 (build-system ant-build-system)
8315 (arguments
8316 `(#:jar-name "java-snakeyaml.jar"
8317 #:source-dir "src/main/java"
8318 ;; Tests require velocity, a cyclic dependency, and
8319 ;; java-spring-framework-context which is not packaged.
8320 #:tests? #f))
8321 (home-page "https://bitbucket.org/asomov/snakeyaml")
8322 (synopsis "YAML processor")
8323 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8324 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8325
8326 (define-public java-fasterxml-jackson-dataformat-yaml
8327 (package
8328 (name "java-fasterxml-jackson-dataformat-yaml")
8329 (version "2.9.4")
8330 (source (origin
8331 (method url-fetch)
8332 (uri (string-append "https://github.com/FasterXML/"
8333 "jackson-dataformats-text/archive/"
8334 "jackson-dataformats-text-" version ".tar.gz"))
8335 (sha256
8336 (base32
8337 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8338 (build-system ant-build-system)
8339 (arguments
8340 `(#:jar-name "jackson-dataformat-yaml.jar"
8341 #:source-dir "yaml/src/main/java"
8342 #:test-dir "yaml/src/test"
8343 #:test-exclude (list "**/failing/**.java")
8344 #:phases
8345 (modify-phases %standard-phases
8346 (add-before 'configure 'generate-PackageVersion.java
8347 (lambda _
8348 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8349 (in (string-append out ".in")))
8350 (copy-file in out)
8351 (substitute* out
8352 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8353 (("@projectversion@") ,version)
8354 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8355 (("@projectartifactid@") "jackson-dataformat-yaml")))
8356 #t)))))
8357 (inputs
8358 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8359 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8360 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8361 ("java-snakeyaml" ,java-snakeyaml)))
8362 (native-inputs
8363 `(("junit" ,java-junit)
8364 ("hamcrest" ,java-hamcrest-core)
8365 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8366 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8367 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8368 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8369 (synopsis "Yaml backend for Jackson")
8370 (description "Dataformat backends are used to support format alternatives
8371 to JSON, supported by default. This is done by sub-classing Jackson core
8372 abstractions.")
8373 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8374
8375 (define-public java-stax2-api
8376 (package
8377 (name "java-stax2-api")
8378 (version "4.0.0")
8379 (source (origin
8380 (method url-fetch)
8381 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8382 "stax2-api-" version ".tar.gz"))
8383 (sha256
8384 (base32
8385 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8386 (build-system ant-build-system)
8387 (arguments
8388 `(#:jar-name "java-stax2-api.jar"
8389 #:source-dir "src/main/java"
8390 #:tests? #f)); no tests
8391 (home-page "https://github.com/FasterXML/stax2-api")
8392 (synopsis "Stax2 API")
8393 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8394 significant new functionalities, such as full-featured bi-direction validation
8395 interface and high-performance Typed Access API.")
8396 (license license:bsd-2)))
8397
8398 (define-public java-woodstox-core
8399 (package
8400 (name "java-woodstox-core")
8401 (version "5.0.3")
8402 (source (origin
8403 (method url-fetch)
8404 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8405 "woodstox-core-" version ".tar.gz"))
8406 (sha256
8407 (base32
8408 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8409 (build-system ant-build-system)
8410 (arguments
8411 `(#:jar-name "woodstox.jar"
8412 #:test-exclude
8413 (list "**/Base*.java" "failing/**")
8414 #:phases
8415 (modify-phases %standard-phases
8416 (add-before 'build 'remove-msv-dep
8417 (lambda _
8418 ;; we don't need osgi, and it depends on msv
8419 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8420 ;; msv's latest release is from 2011 and we don't need it
8421 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8422 (delete-file-recursively "src/test/java/wstxtest/osgi")
8423 (delete-file-recursively "src/test/java/wstxtest/msv")
8424 #t))
8425 (add-before 'build 'copy-resources
8426 (lambda _
8427 (copy-recursively "src/main/resources" "build/classes")
8428 #t)))))
8429 (inputs
8430 `(("stax2" ,java-stax2-api)))
8431 (native-inputs
8432 `(("junit" ,java-junit)))
8433 (home-page "https://github.com/FasterXML/woodstox")
8434 (synopsis "Stax XML API implementation")
8435 (description "Woodstox is a stax XML API implementation.")
8436 (license license:asl2.0)))
8437
8438 (define-public java-fasterxml-jackson-dataformat-xml
8439 (package
8440 (name "java-fasterxml-jackson-dataformat-xml")
8441 (version "2.9.4")
8442 (source (origin
8443 (method url-fetch)
8444 (uri (string-append "https://github.com/FasterXML/"
8445 "jackson-dataformat-xml/archive/"
8446 "jackson-dataformat-xml-" version ".tar.gz"))
8447 (sha256
8448 (base32
8449 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8450 (build-system ant-build-system)
8451 (arguments
8452 `(#:jar-name "jackson-dataformat-xml.jar"
8453 #:source-dir "src/main/java"
8454 #:test-exclude
8455 (list "**/failing/**")
8456 #:phases
8457 (modify-phases %standard-phases
8458 (add-before 'configure 'generate-PackageVersion.java
8459 (lambda _
8460 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8461 (in (string-append out ".in")))
8462 (copy-file in out)
8463 (newline)
8464 (substitute* out
8465 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8466 (("@projectversion@") ,version)
8467 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8468 (("@projectartifactid@") "jackson-dataformat-xml")))
8469 #t))
8470 (add-before 'build 'copy-resources
8471 (lambda _
8472 (copy-recursively "src/main/resources" "build/classes")
8473 #t)))))
8474 (inputs
8475 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8476 ("jackson-core" ,java-fasterxml-jackson-core)
8477 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8478 ("jackson-databind" ,java-fasterxml-jackson-databind)
8479 ("stax2-api" ,java-stax2-api)
8480 ("woodstox" ,java-woodstox-core)))
8481 (native-inputs
8482 `(("junit" ,java-junit)
8483 ("hamcrest" ,java-hamcrest-core)))
8484 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8485 (synopsis "Read and write XML")
8486 (description "This package contains Jackson extension component for reading
8487 and writing XML encoded data.
8488
8489 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8490 approach (that is, no support is added for \"Schema-first\" approach). Support
8491 for JAXB annotations is provided by JAXB annotation module; this module
8492 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8493 @code{JsonFactory}) as well as small number of higher level overrides needed to
8494 make data-binding work.")
8495 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8496
8497 (define-public java-hdrhistogram
8498 (package
8499 (name "java-hdrhistogram")
8500 (version "2.1.9")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8504 "archive/HdrHistogram-" version ".tar.gz"))
8505 (sha256
8506 (base32
8507 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8508 (build-system ant-build-system)
8509 (arguments
8510 `(#:jar-name "java-hdrhistogram.jar"
8511 #:source-dir "src/main/java"
8512 #:phases
8513 (modify-phases %standard-phases
8514 (add-before 'configure 'set-version
8515 (lambda _
8516 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8517 (template (string-append version-java ".template")))
8518 (copy-file template version-java)
8519 (substitute* version-java
8520 (("\\$VERSION\\$") ,version)
8521 (("\\$BUILD_TIME\\$") "0"))
8522 #t))))))
8523 (native-inputs
8524 `(("junit" ,java-junit)
8525 ("hamcrest" ,java-hamcrest-core)))
8526 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8527 (synopsis "High dynamic range histogram")
8528 (description "Hdrhistogram allows to create histograms that support
8529 recording and analyzing sampled data value counts across a configurable integer
8530 value range with configurable value precision within the range. Value precision
8531 is expressed as the number of significant digits in the value recording, and
8532 provides control over value quantization behavior across the value range and
8533 the subsequent value resolution at any given level.")
8534 (license license:public-domain)))
8535
8536 (define-public java-cofoja
8537 (package
8538 (name "java-cofoja")
8539 (version "1.3")
8540 (source (origin
8541 (method git-fetch)
8542 (uri (git-reference
8543 (url "https://github.com/nhatminhle/cofoja.git")
8544 (commit (string-append "v" version))))
8545 (file-name (string-append "java-cofoja-" version "-checkout"))
8546 (sha256
8547 (base32
8548 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8549 (build-system ant-build-system)
8550 (arguments
8551 `(#:build-target "dist"
8552 #:test-target "test"
8553 #:jdk ,icedtea-8
8554 #:make-flags
8555 (list "-Ddist.dir=dist")
8556 #:modules ((guix build ant-build-system)
8557 (guix build java-utils)
8558 (guix build utils)
8559 (srfi srfi-1)
8560 (ice-9 match))
8561 #:phases
8562 (modify-phases %standard-phases
8563 ;; The bulid system ignores the class path the ant-build-system sets
8564 ;; up and instead expects to find all dependencies in the "lib"
8565 ;; directory.
8566 (add-after 'unpack 'create-libdir
8567 (lambda* (#:key inputs #:allow-other-keys)
8568 (mkdir-p "lib")
8569 (for-each
8570 (lambda (file)
8571 (let ((target (string-append "lib/" (basename file))))
8572 (unless (file-exists? target)
8573 (symlink file target))))
8574 (append-map (match-lambda
8575 ((label . dir)
8576 (find-files dir "\\.jar$")))
8577 inputs))
8578 #t))
8579 (replace 'install (install-jars "dist")))))
8580 (inputs
8581 `(("java-asm" ,java-asm)))
8582 (native-inputs
8583 `(("java-junit" ,java-junit)))
8584 (home-page "https://github.com/nhatminhle/cofoja")
8585 (synopsis "Contracts for Java")
8586 (description "Contracts for Java, or Cofoja for short, is a contract
8587 programming framework and test tool for Java, which uses annotation processing
8588 and bytecode instrumentation to provide run-time checking. (In particular,
8589 this is not a static analysis tool.)")
8590 (license license:lgpl3+)))
8591
8592 (define-public java-aopalliance
8593 (package
8594 (name "java-aopalliance")
8595 (version "1.0")
8596 (source (origin
8597 (method git-fetch)
8598 ;; Note: this git repository is not official, but contains the
8599 ;; source code that is in the CVS repository. Downloading the
8600 ;; tarball from sourceforge is undeterministic, and the cvs download
8601 ;; fails.
8602 (uri (git-reference
8603 (url "https://github.com/hoverruan/aopalliance")
8604 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8605 (file-name (string-append name "-" version))
8606 (sha256
8607 (base32
8608 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8609 (build-system ant-build-system)
8610 (arguments
8611 `(#:jar-name "java-aopalliance.jar"
8612 #:jdk ,icedtea-8
8613 #:tests? #f; no tests
8614 #:source-dir "aopalliance/src/main"))
8615 (home-page "http://aopalliance.sourceforge.net")
8616 (synopsis "Aspect-Oriented Programming")
8617 (description "The AOP Alliance project is a joint project between several
8618 software engineering people who are interested in Aspect-Oriented Programming
8619 (AOP) and Java.")
8620 (license license:public-domain)))
8621
8622 (define-public java-javax-inject
8623 (package
8624 (name "java-javax-inject")
8625 (version "tck-1")
8626 (source (origin
8627 (method url-fetch)
8628 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8629 "archive/javax.inject-" version ".tar.gz"))
8630 (sha256
8631 (base32
8632 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8633 (build-system ant-build-system)
8634 (arguments
8635 `(#:jar-name "java-javax-inject.jar"
8636 #:jdk ,icedtea-8
8637 #:tests? #f)); no tests
8638 (home-page "http://github.com/javax-inject/javax-inject")
8639 (synopsis "JSR-330: Dependency Injection for Java")
8640 (description "This package specifies a means for obtaining objects in such
8641 a way as to maximize reusability, testability and maintainability compared to
8642 traditional approaches such as constructors, factories, and service locators
8643 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8644 most nontrivial applications.
8645
8646 Many types depend on other types. For example, a @var{Stopwatch} might depend
8647 on a @var{TimeSource}. The types on which a type depends are known as its
8648 dependencies. The process of finding an instance of a dependency to use at run
8649 time is known as resolving the dependency. If no such instance can be found,
8650 the dependency is said to be unsatisfied, and the application is broken.")
8651 (license license:asl2.0)))
8652
8653 (define-public java-guice
8654 (package
8655 (name "java-guice")
8656 (version "4.1")
8657 (source (origin
8658 (method url-fetch)
8659 (uri (string-append "https://github.com/google/guice/archive/"
8660 version ".tar.gz"))
8661 (file-name (string-append name "-" version ".tar.gz"))
8662 (modules '((guix build utils)))
8663 (snippet
8664 `(begin
8665 (for-each delete-file (find-files "." ".*.jar"))))
8666 (sha256
8667 (base32
8668 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8669 (build-system ant-build-system)
8670 (arguments
8671 `(#:jar-name "java-guice.jar"
8672 #:jdk ,icedtea-8
8673 #:tests? #f; FIXME: tests are not in a java sub directory
8674 #:source-dir "core/src"))
8675 (inputs
8676 `(("guava" ,java-guava)
8677 ("java-cglib" ,java-cglib)
8678 ("java-aopalliance" ,java-aopalliance)
8679 ("java-javax-inject" ,java-javax-inject)
8680 ("java-asm" ,java-asm)))
8681 (home-page "https://github.com/google/guice")
8682 (synopsis "Lightweight dependency injection framework")
8683 (description "Guice is a lightweight dependency injection framework fo
8684 Java 6 and above.")
8685 (license license:asl2.0)))
8686
8687 (define-public java-guice-servlet
8688 (package
8689 (inherit java-guice)
8690 (name "java-guice-servlet")
8691 (arguments
8692 `(#:jar-name "guice-servlet.jar"
8693 #:source-dir "extensions/servlet/src/"
8694 #:jdk ,icedtea-8
8695 #:tests? #f)); FIXME: not in a java subdir
8696 (inputs
8697 `(("guice" ,java-guice)
8698 ("servlet" ,java-classpathx-servletapi)
8699 ,@(package-inputs java-guice)))))
8700
8701 (define-public java-assertj
8702 (package
8703 (name "java-assertj")
8704 (version "3.8.0")
8705 (source (origin
8706 (method url-fetch)
8707 (uri (string-append "https://github.com/joel-costigliola/"
8708 "assertj-core/archive/"
8709 "assertj-core-" version ".tar.gz"))
8710 (sha256
8711 (base32
8712 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8713 (build-system ant-build-system)
8714 (arguments
8715 `(#:jar-name "java-assertj.jar"
8716 #:jdk ,icedtea-8
8717 #:source-dir "src/main/java"
8718 #:tests? #f)); depends on tng-junit which depends on assertj
8719 (inputs
8720 `(("cglib" ,java-cglib)
8721 ("junit" ,java-junit)
8722 ("hamcrest" ,java-hamcrest-core)))
8723 (native-inputs
8724 `(("mockito" ,java-mockito-1)))
8725 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8726 (synopsis "Fluent assertions for java")
8727 (description "AssertJ core is a Java library that provides a fluent
8728 interface for writing assertions. Its main goal is to improve test code
8729 readability and make maintenance of tests easier.")
8730 (license license:asl2.0)))
8731
8732 (define-public java-jboss-javassist
8733 (package
8734 (name "java-jboss-javassist")
8735 (version "3.21.0")
8736 (source (origin
8737 (method url-fetch)
8738 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8739 "archive/rel_"
8740 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8741 "_ga.tar.gz"))
8742 (sha256
8743 (base32
8744 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8745 (build-system ant-build-system)
8746 (arguments
8747 `(#:jar-name "java-jboss-javassist.jar"
8748 #:jdk ,icedtea-8
8749 #:source-dir "src/main"
8750 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8751 #:phases
8752 (modify-phases %standard-phases
8753 (add-before 'configure 'remove-binary
8754 (lambda _
8755 (delete-file "javassist.jar")
8756 #t)))))
8757 (native-inputs
8758 `(("junit" ,java-junit)))
8759 (home-page "https://github.com/jboss-javassist/javassist")
8760 (synopsis "Java bytecode engineering toolkit")
8761 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8762 manipulation simple. It is a class library for editing bytecodes in Java; it
8763 enables Java programs to define a new class at runtime and to modify a class
8764 file when the JVM loads it.")
8765 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8766
8767 (define-public java-jcommander
8768 (package
8769 (name "java-jcommander")
8770 (version "1.71")
8771 (source (origin
8772 (method url-fetch)
8773 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8774 version ".tar.gz"))
8775 (file-name (string-append name "-" version ".tar.gz"))
8776 (sha256
8777 (base32
8778 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8779 (build-system ant-build-system)
8780 (arguments
8781 `(#:jar-name "java-jcommander.jar"
8782 #:jdk ,icedtea-8
8783 #:tests? #f; requires testng which depends on jcommander
8784 #:source-dir "src/main/java"))
8785 (home-page "http://jcommander.org")
8786 (synopsis "Command line parameters parser")
8787 (description "JCommander is a very small Java framework that makes it
8788 trivial to parse command line parameters. Parameters are declared with
8789 annotations.")
8790 (license license:asl2.0)))
8791
8792 (define-public java-bsh
8793 (package
8794 (name "java-bsh")
8795 (version "2.0b6")
8796 (source (origin
8797 (method url-fetch)
8798 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8799 version ".tar.gz"))
8800 (file-name (string-append name "-" version ".tar.gz"))
8801 (sha256
8802 (base32
8803 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8804 (build-system ant-build-system)
8805 (arguments
8806 `(#:build-target "jarall"
8807 #:test-target "junit-tests-all"
8808 #:phases
8809 (modify-phases %standard-phases
8810 (replace 'install
8811 (lambda* (#:key outputs #:allow-other-keys)
8812 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8813 (mkdir-p share)
8814 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8815 #t))))))
8816 (home-page "http://beanshell.org/")
8817 (synopsis "Lightweight Scripting for Java")
8818 (description "BeanShell is a small, free, embeddable Java source
8819 interpreter with object scripting language features, written in Java.
8820 BeanShell dynamically executes standard Java syntax and extends it with common
8821 scripting conveniences such as loose types, commands, and method closures like
8822 those in Perl and JavaScript.")
8823 (license license:asl2.0)))
8824
8825 (define-public java-fest-util
8826 (package
8827 (name "java-fest-util")
8828 (version "1.2.5")
8829 (source (origin
8830 (method url-fetch)
8831 (uri (string-append "https://github.com/alexruiz/fest-util/"
8832 "archive/fest-util-" version ".tar.gz"))
8833 (sha256
8834 (base32
8835 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8836 (build-system ant-build-system)
8837 (arguments
8838 `(#:jar-name "java-fest-util.jar"
8839 #:source-dir "src/main/java"))
8840 (native-inputs
8841 `(("junit" ,java-junit)
8842 ("hamcrest" ,java-hamcrest-core)))
8843 (home-page "https://github.com/alexruiz/fest-util")
8844 (synopsis "FEST common utilities")
8845 (description "Common utilities used in all FEST module.")
8846 (license license:asl2.0)))
8847
8848 (define-public java-fest-test
8849 (package
8850 (name "java-fest-test")
8851 (version "2.1.0")
8852 (source (origin
8853 (method url-fetch)
8854 (uri (string-append "https://github.com/alexruiz/fest-test/"
8855 "archive/fest-test-" version ".tar.gz"))
8856 (sha256
8857 (base32
8858 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8859 (build-system ant-build-system)
8860 (arguments
8861 `(#:jar-name "java-fest-test.jar"
8862 #:source-dir "src/main/java"
8863 #:tests? #f)); no tests
8864 (inputs
8865 `(("junit" ,java-junit)))
8866 (home-page "https://github.com/alexruiz/fest-test")
8867 (synopsis "Common FEST testing infrastructure")
8868 (description "Fest-test contains the common FEST testing infrastructure.")
8869 (license license:asl2.0)))
8870
8871 (define-public java-fest-assert
8872 (package
8873 (name "java-fest-assert")
8874 (version "2.0M10")
8875 (source (origin
8876 (method url-fetch)
8877 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8878 "archive/fest-assert-core-" version ".tar.gz"))
8879 (sha256
8880 (base32
8881 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8882 (build-system ant-build-system)
8883 (arguments
8884 `(#:jar-name "java-fest-assert.jar"
8885 #:source-dir "src/main/java"
8886 #:test-exclude
8887 (list
8888 "**/Abstract*.java"
8889 "**/*BaseTest.java"
8890 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8891 "**/MessageFormatter_format_Test.java"
8892 "**/internal/*/*_assert*_Test.java")))
8893 (inputs
8894 `(("java-fest-util" ,java-fest-util)))
8895 (native-inputs
8896 `(("java-junit" ,java-junit)
8897 ("java-fest-test" ,java-fest-test)
8898 ("java-hamcrest-core" ,java-hamcrest-core)
8899 ("java-mockito" ,java-mockito-1)
8900 ("java-cglib" ,java-cglib)
8901 ("java-objenesis" ,java-objenesis)
8902 ("java-asm" ,java-asm)))
8903 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8904 (synopsis "FEST fluent assertions")
8905 (description "FEST-Assert provides a fluent interface for assertions.")
8906 (license license:asl2.0)))
8907
8908 (define-public java-testng
8909 (package
8910 (name "java-testng")
8911 (version "6.14.3")
8912 (source (origin
8913 (method git-fetch)
8914 (uri (git-reference
8915 (url "https://github.com/cbeust/testng.git")
8916 (commit version)))
8917 (file-name (string-append name "-" version "-checkout"))
8918 (sha256
8919 (base32
8920 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8921 (build-system ant-build-system)
8922 (arguments
8923 `(#:jdk ,icedtea-8; java.util.function
8924 #:jar-name "java-testng.jar"
8925 #:source-dir "src/main/java"
8926 #:phases
8927 (modify-phases %standard-phases
8928 ;; FIXME: I don't know why these tests fail
8929 (add-after 'unpack 'delete-failing-tests
8930 (lambda _
8931 (substitute* "src/test/resources/testng.xml"
8932 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8933 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8934 #t))
8935 ;; We don't have groovy
8936 (add-after 'unpack 'delete-groovy-tests
8937 (lambda _
8938 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8939 (substitute* "src/test/resources/testng.xml"
8940 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8941 #t))
8942 (add-before 'build 'copy-resources
8943 (lambda _
8944 (copy-recursively "src/main/resources" "build/classes")
8945 #t))
8946 (add-before 'check 'copy-test-resources
8947 (lambda _
8948 (copy-recursively "src/test/resources" "build/test-classes")
8949 #t))
8950 (replace 'check
8951 (lambda _
8952 (invoke "ant" "compile-tests")
8953 ;; we don't have groovy
8954 (substitute* "src/test/resources/testng.xml"
8955 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8956 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8957 ":build/classes"
8958 ":build/test-classes")
8959 "-Dtest.resources.dir=src/test/resources"
8960 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8961 (propagated-inputs
8962 `(("junit" ,java-junit)
8963 ("java-jsr305" ,java-jsr305)
8964 ("java-bsh" ,java-bsh)
8965 ("java-jcommander" ,java-jcommander)
8966 ("java-guice" ,java-guice)
8967 ("snakeyaml" ,java-snakeyaml)))
8968 (native-inputs
8969 `(("guava" ,java-guava)
8970 ("java-javax-inject" ,java-javax-inject)
8971 ("java-hamcrest" ,java-hamcrest-all)
8972 ("java-assertj" ,java-assertj)
8973 ("java-mockito" ,java-mockito-1)
8974 ("cglib" ,java-cglib)
8975 ("asm" ,java-asm)
8976 ("aopalliance" ,java-aopalliance)))
8977 (home-page "http://testng.org")
8978 (synopsis "Testing framework")
8979 (description "TestNG is a testing framework inspired from JUnit and NUnit
8980 but introducing some new functionalities that make it more powerful and easier
8981 to use.")
8982 (license license:asl2.0)))
8983
8984 (define-public java-jnacl
8985 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8986 (revision "2"))
8987 (package
8988 (name "java-jnacl")
8989 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8990 (source (origin
8991 (method git-fetch)
8992 (uri (git-reference
8993 (url "https://github.com/neilalexander/jnacl.git")
8994 (commit commit)))
8995 (file-name (git-file-name name version))
8996 (sha256
8997 (base32
8998 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8999 (build-system ant-build-system)
9000 (arguments
9001 `(#:jar-name "jnacl.jar"
9002 #:source-dir "src/main/java"
9003 #:jdk ,icedtea-8
9004 #:phases
9005 (modify-phases %standard-phases
9006 (add-before 'build 'fix-tests
9007 (lambda _
9008 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9009 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9010 (("assertions.Assertions") "assertions.api.Assertions"))
9011 #t))
9012 (replace 'check
9013 (lambda _
9014 (invoke "ant" "compile-tests")
9015 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9016 ":build/classes"
9017 ":build/test-classes")
9018 "org.testng.TestNG" "-testclass"
9019 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9020 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9021 ":build/classes"
9022 ":build/test-classes")
9023 "org.testng.TestNG" "-testclass"
9024 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9025 (native-inputs
9026 `(("java-testng" ,java-testng)
9027 ("java-fest-util" ,java-fest-util)
9028 ("java-fest-assert" ,java-fest-assert)))
9029 (home-page "https://github.com/neilalexander/jnacl")
9030 (synopsis "Java implementation of NaCl")
9031 (description "Pure Java implementation of the NaCl: Networking and
9032 Cryptography library.")
9033 (license license:bsd-2))))
9034
9035 (define-public java-mvel2
9036 (package
9037 (name "java-mvel2")
9038 (version "2.3.1")
9039 (source (origin
9040 (method url-fetch)
9041 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9042 version ".Final.tar.gz"))
9043 (sha256
9044 (base32
9045 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9046 (build-system ant-build-system)
9047 (arguments
9048 `(#:jar-name "mvel2.jar"
9049 #:source-dir "src/main/java"
9050 #:test-exclude
9051 (list "**/Abstract*.java"
9052 ;; Base class with no tests
9053 "**/MVELThreadTest.java")
9054 #:phases
9055 (modify-phases %standard-phases
9056 (add-after 'install 'install-bin
9057 (lambda* (#:key outputs #:allow-other-keys)
9058 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9059 (mkdir-p bin)
9060 (with-output-to-file (string-append bin "/mvel2")
9061 (lambda _
9062 (display
9063 (string-append
9064 "#!" (which "bash") "\n"
9065 "if [ \"$#\" -ne \"2\" ]; then\n"
9066 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9067 "exit\n"
9068 "fi\n"
9069 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9070 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9071 " org.mvel2.sh.Main $1"))))
9072 (chmod (string-append bin "/mvel2") #o755))
9073 #t)))))
9074 (native-inputs
9075 `(("junit" ,java-junit)
9076 ("hamcrest" ,java-hamcrest-core)))
9077 (home-page "https://github.com/mvel/mvel")
9078 (synopsis "MVFLEX Expression Language")
9079 (description "MVEL has largely been inspired by Java syntax, but has some
9080 fundamental differences aimed at making it more efficient as an expression
9081 language, such as operators that directly support collection, array and string
9082 matching, as well as regular expressions. MVEL is used to evaluate expressions
9083 written using Java syntax.
9084
9085 In addition to the expression language, MVEL serves as a templating language for
9086 configuration and string construction.")
9087 (license license:asl2.0)))
9088
9089 (define-public java-commons-jexl-2
9090 (package
9091 (name "java-commons-jexl")
9092 (version "2.1.1")
9093 (source (origin
9094 (method url-fetch)
9095 (uri (string-append "mirror://apache/commons/jexl/source/"
9096 "commons-jexl-" version "-src.tar.gz"))
9097 (sha256
9098 (base32
9099 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9100 (build-system ant-build-system)
9101 (arguments
9102 `(#:jar-name "commons-jexl-2.jar"
9103 #:jdk ,icedtea-8
9104 #:source-dir "src/main/java"
9105 #:phases
9106 (modify-phases %standard-phases
9107 (add-before 'check 'disable-broken-tests
9108 (lambda* (#:key inputs #:allow-other-keys)
9109 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9110 (substitute* "ArithmeticTest.java"
9111 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9112 (("asserter.assertExpression\\(\"imanull") "//"))
9113 ;; This test fails with "ambiguous method invocation"
9114 (delete-file "CacheTest.java")
9115 ;; This test doesn't have access to the temp directory
9116 (substitute* "ClassCreatorTest.java"
9117 (("java.io.tmpdir") "user.dir"))
9118 ;; This test fails in trying to detect whether it can run.
9119 (substitute* "ClassCreator.java"
9120 (("boolean canRun =.*") "boolean canRun = false;\n"))
9121 ;; ...and these tests depend on it.
9122 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9123 (delete-file "scripting/JexlScriptEngineTest.java"))
9124 #t))
9125 (add-before 'build 'run-javacc
9126 (lambda _
9127 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9128 (invoke "java" "jjtree" "Parser.jjt")
9129 (invoke "java" "javacc" "Parser.jj"))
9130 #t)))))
9131 (inputs
9132 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9133 (native-inputs
9134 `(("java-junit" ,java-junit)
9135 ("java-hamcrest-core" ,java-hamcrest-core)
9136 ("javacc" ,javacc-4)))
9137 (home-page "https://commons.apache.org/proper/commons-jexl/")
9138 (synopsis "Java Expression Language ")
9139 (description "JEXL is a library intended to facilitate the implementation
9140 of dynamic and scripting features in applications and frameworks written in
9141 Java. JEXL implements an Expression Language based on some extensions to the
9142 JSTL Expression Language supporting most of the constructs seen in
9143 shell-script or ECMAScript. Its goal is to expose scripting features usable
9144 by technical operatives or consultants working with enterprise platforms.")
9145 (license license:asl2.0)))
9146
9147 (define-public java-lz4
9148 (package
9149 (name "java-lz4")
9150 (version "1.4.0")
9151 (source (origin
9152 (method url-fetch)
9153 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9154 version ".tar.gz"))
9155 (file-name (string-append name "-" version ".tar.gz"))
9156 (sha256
9157 (base32
9158 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9159 (build-system ant-build-system)
9160 (arguments
9161 `(#:jar-name "lz4.jar"
9162 #:jdk ,icedtea-8
9163 #:source-dir "src/java:src/java-unsafe"
9164 #:tests? #f; FIXME: requires more dependencies
9165 #:phases
9166 (modify-phases %standard-phases
9167 (add-before 'configure 'generate-source
9168 (lambda _
9169 (with-directory-excursion "src/build/source_templates"
9170 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9171 #t)))))
9172 (native-inputs
9173 `(("mvel" ,java-mvel2)))
9174 (home-page "https://jpountz.github.io/lz4-java")
9175 (synopsis "Compression algorithm")
9176 (description "LZ4 - Java is a Java port of the popular lz4 compression
9177 algorithms and xxHash hashing algorithm.")
9178 (license license:asl2.0)))
9179
9180 (define-public java-bouncycastle
9181 (package
9182 (name "java-bouncycastle")
9183 (version "1.60")
9184 (source (origin
9185 (method url-fetch)
9186 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9187 (substring version 0 1) "v"
9188 (substring version 2 4) ".tar.gz"))
9189 (sha256
9190 (base32
9191 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9192 (modules '((guix build utils)))
9193 (snippet
9194 '(begin
9195 (for-each delete-file
9196 (find-files "." "\\.jar$"))
9197 #t))))
9198 (build-system ant-build-system)
9199 (arguments
9200 `(#:jdk ,icedtea-8
9201 #:tests? #f
9202 #:phases
9203 (modify-phases %standard-phases
9204 (replace 'build
9205 (lambda _
9206 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9207 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9208 ;; FIXME: the tests freeze.
9209 ;; (replace 'check
9210 ;; (lambda _
9211 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9212 (replace 'install
9213 (install-jars "build/artifacts/jdk1.5/jars")))))
9214 (inputs
9215 `(("java-javax-mail" ,java-javax-mail)))
9216 (native-inputs
9217 `(("unzip" ,unzip)
9218 ("junit" ,java-junit)
9219 ("java-native-access" ,java-native-access)
9220 ("java-native-access-platform" ,java-native-access-platform)))
9221 (home-page "https://www.bouncycastle.org")
9222 (synopsis "Cryptographic library")
9223 (description "Bouncy Castle is a cryptographic library for the Java
9224 programming language.")
9225 (license license:expat)))
9226
9227 (define-public java-lmax-disruptor
9228 (package
9229 (name "java-lmax-disruptor")
9230 (version "3.3.7")
9231 (source (origin
9232 (method url-fetch)
9233 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9234 "archive/" version ".tar.gz"))
9235 (file-name (string-append name "-" version ".tar.gz"))
9236 (sha256
9237 (base32
9238 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9239 (build-system ant-build-system)
9240 (arguments
9241 `(#:jar-name "java-lmax-disruptor.jar"
9242 #:jdk ,icedtea-8
9243 #:tests? #f)); tests hang
9244 (inputs
9245 `(("junit" ,java-junit)
9246 ("java-hdrhistogram" ,java-hdrhistogram)
9247 ("java-jmock" ,java-jmock)
9248 ("java-jmock-legacy" ,java-jmock-legacy)
9249 ("java-jmock-junit4" ,java-jmock-junit4)
9250 ("java-hamcrest-all" ,java-hamcrest-all)))
9251 (native-inputs
9252 `(("cglib" ,java-cglib)
9253 ("objenesis" ,java-objenesis)
9254 ("asm" ,java-asm)))
9255 (home-page "https://www.lmax.com/disruptor")
9256 (synopsis "High performance inter-thread communication")
9257 (description "LMAX Disruptor is a software pattern and software component
9258 for high performance inter-thread communication that avoids the need for
9259 message queues or resource locking.")
9260 (license license:asl2.0)))
9261
9262 (define-public java-commons-bcel
9263 (package
9264 (name "java-commons-bcel")
9265 (version "6.1")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9269 version "-src.tar.gz"))
9270 (sha256
9271 (base32
9272 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9273 (build-system ant-build-system)
9274 (arguments
9275 `(#:jar-name "bcel.jar"
9276 #:jdk ,icedtea-8
9277 #:source-dir "src/main/java"
9278 #:test-dir "src/test/java"
9279 ;; FIXME: Tests require the unpackaged jna.
9280 #:tests? #f))
9281 (home-page "https://commons.apache.org/proper/commons-bcel/")
9282 (synopsis "Byte code engineering library")
9283 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9284 intended to give users a convenient way to analyze, create, and
9285 manipulate (binary) Java class files. Classes are represented by objects
9286 which contain all the symbolic information of the given class: methods, fields
9287 and byte code instructions, in particular.
9288
9289 Such objects can be read from an existing file, be transformed by a
9290 program (e.g. a class loader at run-time) and written to a file again. An
9291 even more interesting application is the creation of classes from scratch at
9292 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9293 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9294 of Java @code{.class} files.")
9295 (license license:asl2.0)))
9296
9297 (define-public java-xerial-core
9298 (package
9299 (name "java-xerial-core")
9300 (version "2.1")
9301 (source (origin
9302 (method url-fetch)
9303 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9304 version ".tar.gz"))
9305 (file-name (string-append name "-" version ".tar.gz"))
9306 (sha256
9307 (base32
9308 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9309 (build-system ant-build-system)
9310 (arguments
9311 `(#:jar-name "xerial-core.jar"
9312 #:source-dir "xerial-core/src/main/java"
9313 #:test-dir "xerial-core/src/test"
9314 #:phases
9315 (modify-phases %standard-phases
9316 (add-before 'build 'copy-resources
9317 (lambda _
9318 (copy-recursively "xerial-core/src/main/resources"
9319 "build/classes")
9320 #t)))))
9321 (native-inputs
9322 `(("junit" ,java-junit)
9323 ("hamcrest" ,java-hamcrest-core)))
9324 (home-page "https://github.com/xerial/xerial-java")
9325 (synopsis "Data management libraries for Java")
9326 (description "Xerial is a set of data management libraries for the Java
9327 programming language. The ultimate goal of the Xerial project is to manage
9328 everything as database, including class objects, text format data, data
9329 streams, etc.")
9330 (license license:asl2.0)))
9331
9332 (define-public java-powermock-reflect
9333 (package
9334 (name "java-powermock-reflect")
9335 (version "1.7.3")
9336 (source (origin
9337 (method url-fetch)
9338 (uri (string-append "https://github.com/powermock/powermock/"
9339 "archive/powermock-" version ".tar.gz"))
9340 (file-name (string-append name "-" version ".tar.gz"))
9341 (sha256
9342 (base32
9343 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9344 (patches
9345 (search-patches "java-powermock-fix-java-files.patch"))))
9346 (build-system ant-build-system)
9347 (arguments
9348 `(#:jar-name "java-powermock-reflect.jar"
9349 #:jdk ,icedtea-8
9350 #:source-dir "powermock-reflect/src/main/java"
9351 #:test-dir "powermock-reflect/src/test"))
9352 (inputs
9353 `(("java-objenesis" ,java-objenesis)))
9354 (native-inputs
9355 `(("junit" ,java-junit)
9356 ("cglib" ,java-cglib)
9357 ("asm" ,java-asm)
9358 ("hamcrest" ,java-hamcrest-core)
9359 ("assertj" ,java-assertj)))
9360 (home-page "https://github.com/powermock/powermock")
9361 (synopsis "Mock library extension framework")
9362 (description "PowerMock is a framework that extends other mock libraries
9363 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9364 classloader and bytecode manipulation to enable mocking of static methods,
9365 constructors, final classes and methods, private methods, removal of static
9366 initializers and more. By using a custom classloader no changes need to be
9367 done to the IDE or continuous integration servers which simplifies adoption.")
9368 (license license:asl2.0)))
9369
9370 (define-public java-powermock-core
9371 (package
9372 (inherit java-powermock-reflect)
9373 (name "java-powermock-core")
9374 (arguments
9375 `(#:jar-name "java-powermock-core.jar"
9376 #:source-dir "powermock-core/src/main/java"
9377 #:test-dir "powermock-core/src/test"
9378 #:tests? #f; requires powermock-api
9379 #:jdk ,icedtea-8
9380 #:phases
9381 (modify-phases %standard-phases
9382 (add-before 'build 'copy-resources
9383 (lambda _
9384 (copy-recursively "powermock-core/src/main/resources"
9385 "build/classes")
9386 #t)))))
9387 (inputs
9388 `(("reflect" ,java-powermock-reflect)
9389 ("javassist" ,java-jboss-javassist)))
9390 (native-inputs
9391 `(("junit" ,java-junit)
9392 ("assertj" ,java-assertj)
9393 ("mockito" ,java-mockito-1)))))
9394
9395 (define-public java-powermock-api-support
9396 (package
9397 (inherit java-powermock-reflect)
9398 (name "java-powermock-api-support")
9399 (build-system ant-build-system)
9400 (arguments
9401 `(#:jar-name "java-powermock-api-support.jar"
9402 #:jdk ,icedtea-8
9403 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9404 #:tests? #f)); no tests
9405 (inputs
9406 `(("core" ,java-powermock-core)
9407 ("reflect" ,java-powermock-reflect)))))
9408
9409 (define-public java-powermock-modules-junit4-common
9410 (package
9411 (inherit java-powermock-reflect)
9412 (name "java-powermock-modules-junit4-common")
9413 (build-system ant-build-system)
9414 (arguments
9415 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9416 #:jdk ,icedtea-8
9417 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9418 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9419 (inputs
9420 `(("core" ,java-powermock-core)
9421 ("easymock" ,java-easymock)
9422 ("reflect" ,java-powermock-reflect)
9423 ("hamcrest" ,java-hamcrest-core)
9424 ("cglib" ,java-cglib)))))
9425
9426 (define-public java-powermock-modules-junit4
9427 (package
9428 (inherit java-powermock-reflect)
9429 (name "java-powermock-modules-junit4")
9430 (build-system ant-build-system)
9431 (arguments
9432 `(#:jar-name "java-powermock-modules-junit4.jar"
9433 #:jdk ,icedtea-8
9434 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9435 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9436 #:phases
9437 (modify-phases %standard-phases
9438 (add-before 'build 'fix-junit-detection
9439 (lambda _
9440 ;; Our junit version is 4.12-SNAPSHOT
9441 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9442 "PowerMockJUnit4MethodValidator.java")
9443 (("4.12") "4.12-SNAPSHOT"))
9444 #t)))))
9445 (inputs
9446 `(("core" ,java-powermock-core)
9447 ("reflect" ,java-powermock-reflect)
9448 ("common" ,java-powermock-modules-junit4-common)
9449 ("cglib" ,java-cglib)))
9450 (native-inputs
9451 `(("easymock" ,java-easymock)
9452 ("hamcrest" ,java-hamcrest-core)
9453 ("objenesis" ,java-objenesis)
9454 ("asm" ,java-asm)
9455 ("junit" ,java-junit)))))
9456
9457 (define-public java-powermock-api-easymock
9458 (package
9459 (inherit java-powermock-reflect)
9460 (name "java-powermock-api-easymock")
9461 (build-system ant-build-system)
9462 (arguments
9463 `(#:jar-name "java-powermock-api-easymock.jar"
9464 #:jdk ,icedtea-8
9465 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9466 #:tests? #f; no tests
9467 #:phases
9468 (modify-phases %standard-phases
9469 (add-before 'build 'fix-file
9470 (lambda _
9471 ;; FIXME: This looks wrong, but it fixes a build error.
9472 (with-directory-excursion "powermock-api/powermock-api-easymock"
9473 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9474 (("classLoader instanceof MockClassLoader") "false")
9475 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9476 #t)))))
9477 (inputs
9478 `(("core" ,java-powermock-core)
9479 ("easymock" ,java-easymock)
9480 ("reflect" ,java-powermock-reflect)
9481 ("support" ,java-powermock-api-support)
9482 ("cglib" ,java-cglib)))))
9483
9484 (define-public java-jboss-jms-api-spec
9485 (package
9486 (name "java-jboss-jms-api-spec")
9487 (version "2.0")
9488 (source (origin
9489 (method url-fetch)
9490 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9491 "archive/jboss-jms-api_" version
9492 "_spec-1.0.1.Final.tar.gz"))
9493 (sha256
9494 (base32
9495 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9496 (build-system ant-build-system)
9497 (arguments
9498 `(#:jar-name "java-jboss-jms-api_spec.jar"
9499 #:jdk ,icedtea-8
9500 #:source-dir "."
9501 #:tests? #f)); no tests
9502 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9503 (synopsis "Java Message Service API specification")
9504 (description "Java Message Service (JMS) API is used to send messages
9505 messages between two or more clients. It is a messaging standard that allows
9506 application components to create, send, receive, and read messages.")
9507 ; either gpl2 only with GPL Classpath Exception, or cddl.
9508 (license (list license:gpl2 license:cddl1.0))))
9509
9510 (define-public java-mail
9511 (package
9512 (name "java-mail")
9513 (version "1.6.0")
9514 (source (origin
9515 (method url-fetch)
9516 (uri (string-append "https://github.com/javaee/javamail/archive/"
9517 "JAVAMAIL-1_6_0.tar.gz"))
9518 (sha256
9519 (base32
9520 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9521 (build-system ant-build-system)
9522 (arguments
9523 `(#:jar-name "java-mail.jar"
9524 #:jdk ,icedtea-8
9525 #:source-dir "mail/src/main/java"
9526 #:test-dir "mail/src/test"
9527 #:test-exclude
9528 (list "**/CollectorFormatterTest.java"
9529 "**/CompactFormatterTest.java"
9530 "**/DurationFilterTest.java"
9531 "**/MailHandlerTest.java"
9532 "**/GetLocalAddressTest.java"
9533 ;; FIXME: both end with:
9534 ;; java.lang.ClassNotFoundException:
9535 ;; javax.mail.internet.MimeMultipartParseTest
9536 "**/MimeMultipartParseTest.java"
9537 "**/SearchTermSerializationTest.java")
9538 #:phases
9539 (modify-phases %standard-phases
9540 (add-before 'configure 'move-version.java
9541 (lambda _
9542 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9543 "mail/src/main/java/javax/mail/Version.java")
9544 #t))
9545 (add-before 'build 'copy-resources
9546 (lambda _
9547 (copy-recursively "mail/src/main/resources/META-INF"
9548 "build/classes/META-INF")
9549 #t)))))
9550 (native-inputs
9551 `(("junit" ,java-junit)
9552 ("hamcrest" ,java-hamcrest-core)))
9553 (home-page "https://javaee.github.io/javamail/")
9554 (synopsis "Mail-related functionnalities in Java")
9555 (description "The JavaMail API provides a platform-independent and
9556 protocol-independent framework to build mail and messaging applications.")
9557 ;; General Public License Version 2 only ("GPL") or the Common Development
9558 ;; and Distribution License("CDDL")
9559 (license (list license:cddl1.1
9560 license:gpl2)))); with classpath exception
9561
9562 (define-public java-jeromq
9563 (package
9564 (name "java-jeromq")
9565 (version "0.4.3")
9566 (source (origin
9567 (method git-fetch)
9568 (uri (git-reference
9569 (url "https://github.com/zeromq/jeromq.git")
9570 (commit (string-append "v" version))))
9571 (file-name (string-append name "-" version "-checkout"))
9572 (sha256
9573 (base32
9574 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9575 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9576 (build-system ant-build-system)
9577 (arguments
9578 `(#:jar-name "java-jeromq.jar"
9579 #:source-dir "src/main/java"
9580 #:jdk ,icedtea-8
9581 #:test-exclude
9582 (list
9583 "**/Abstract*.java"
9584 ;; Requires network
9585 "**/ZBeaconTest.java"
9586 ;; Failures
9587 "**/DealerSpecTest.java"
9588 "**/CustomDecoderTest.java"
9589 "**/CustomEncoderTest.java"
9590 "**/ConnectRidTest.java"
9591 "**/ReqSpecTest.java"
9592 "**/PushPullSpecTest.java"
9593 "**/PubSubHwmTest.java"
9594 "**/RouterSpecTest.java"
9595 "**/ProxyTest.java")))
9596 (inputs
9597 `(("java-jnacl" ,java-jnacl)))
9598 (native-inputs
9599 `(("java-hamcrest-core" ,java-hamcrest-core)
9600 ("junit" ,java-junit)))
9601 (home-page "http://zeromq.org/bindings:java")
9602 (synopsis "Java binding for 0MQ")
9603 (description "Jeromq provides the java bindings for 0MQ.")
9604 (license license:mpl2.0)))
9605
9606 (define-public java-kafka-clients
9607 (package
9608 (name "java-kafka-clients")
9609 (version "1.0.0")
9610 (source (origin
9611 (method url-fetch)
9612 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9613 version "-src.tgz"))
9614 (sha256
9615 (base32
9616 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9617 (build-system ant-build-system)
9618 (arguments
9619 `(#:jar-name "java-kafka-clients.jar"
9620 #:jdk ,icedtea-8
9621 #:source-dir "clients/src/main/java"
9622 #:test-dir "clients/src/test"
9623 #:test-exclude
9624 (list
9625 ;; This file does not contain a class
9626 "**/IntegrationTest.java"
9627 ;; Requires network
9628 "**/ClientUtilsTest.java"
9629 ;; End with errors that seem related to our powermock
9630 "**/KafkaProducerTest.java"
9631 "**/BufferPoolTest.java")))
9632 (inputs
9633 `(("java-slf4j-api" ,java-slf4j-api)
9634 ("java-lz4" ,java-lz4)))
9635 (native-inputs
9636 `(("junit" ,java-junit)
9637 ("hamcrest" ,java-hamcrest-all)
9638 ("objenesis" ,java-objenesis)
9639 ("asm" ,java-asm)
9640 ("cglib" ,java-cglib)
9641 ("javassist" ,java-jboss-javassist)
9642 ("snappy" ,java-snappy)
9643 ("easymock" ,java-easymock)
9644 ("powermock" ,java-powermock-core)
9645 ("powermock-easymock" ,java-powermock-api-easymock)
9646 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9647 ("powermock-junit4" ,java-powermock-modules-junit4)
9648 ("powermock-support" ,java-powermock-api-support)
9649 ("java-bouncycastle" ,java-bouncycastle)))
9650 (home-page "https://kafka.apache.org")
9651 (synopsis "Distributed streaming platform")
9652 (description "Kafka is a distributed streaming platform, which means:
9653 @itemize
9654 @item it can publish and subscribe to streams of records;
9655 @item it can store streams of records in a fault-tolerant way;
9656 @item it can process streams of records as they occur.
9657 @end itemize")
9658 ;; Either cddl or gpl2 only.
9659 (license (list license:cddl1.1; actually cddl1.1
9660 license:gpl2)))); with classpath exception
9661
9662 (define-public java-jdom
9663 (package
9664 (name "java-jdom")
9665 (version "1.1.3")
9666 (source (origin
9667 (method url-fetch)
9668 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9669 version ".tar.gz"))
9670 (sha256
9671 (base32
9672 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9673 (build-system ant-build-system)
9674 (arguments
9675 `(#:build-target "package"
9676 #:tests? #f; tests are run as part of the build process
9677 #:phases
9678 (modify-phases %standard-phases
9679 (replace 'install
9680 (install-jars "build")))))
9681 (home-page "http://jdom.org/")
9682 (synopsis "Access, manipulate, and output XML data")
9683 (description "Java-based solution for accessing, manipulating, and
9684 outputting XML data from Java code.")
9685 (license license:bsd-4)))
9686
9687 (define-public java-geronimo-xbean-reflect
9688 (package
9689 (name "java-geronimo-xbean-reflect")
9690 (version "4.5")
9691 (source (origin
9692 (method svn-fetch)
9693 (uri (svn-reference
9694 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9695 (revision 1807396)))
9696 (file-name (string-append name "-" version))
9697 (sha256
9698 (base32
9699 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9700 (build-system ant-build-system)
9701 (arguments
9702 `(#:jar-name "geronimo-xbean-reflect.jar"
9703 #:source-dir "xbean-reflect/src/main/java"
9704 #:test-dir "xbean-reflect/src/test"
9705 #:jdk ,icedtea-8
9706 #:test-exclude
9707 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9708 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9709 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9710 #:phases
9711 (modify-phases %standard-phases
9712 (add-before 'build 'fix-source
9713 (lambda _
9714 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9715 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9716 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9717 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9718 #t))))))
9719 (inputs
9720 `(("asm" ,java-asm)
9721 ("log4j" ,java-log4j-api)
9722 ("log4j-1.2" ,java-log4j-1.2-api)
9723 ("log4j-core" ,java-log4j-core)
9724 ("logging" ,java-commons-logging-minimal)))
9725 (native-inputs
9726 `(("junit" ,java-junit)))
9727 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9728 (synopsis "Dependency injection helper")
9729 (description "Xbean-reflect provides very flexible ways to create objects
9730 and graphs of objects for dependency injection frameworks")
9731 (license license:asl2.0)))
9732
9733 (define-public java-geronimo-xbean-bundleutils
9734 (package
9735 (inherit java-geronimo-xbean-reflect)
9736 (name "java-geronimo-xbean-bundleutils")
9737 (arguments
9738 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9739 #:source-dir "xbean-bundleutils/src/main/java"
9740 #:test-dir "xbean-bundleutils/src/test"
9741 #:phases
9742 (modify-phases %standard-phases
9743 (add-before 'build 'fix-java
9744 (lambda _
9745 ;; We use a more recent version of osgi, so this file requires
9746 ;; more interface method implementations.
9747 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9748 (("import org.osgi.framework.ServiceRegistration;")
9749 "import org.osgi.framework.ServiceRegistration;
9750 import org.osgi.framework.ServiceFactory;
9751 import java.util.Collection;
9752 import org.osgi.framework.ServiceObjects;")
9753 (("public Bundle getBundle\\(\\)")
9754 "@Override
9755 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9756 throw new UnsupportedOperationException();
9757 }
9758 @Override
9759 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9760 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9761 throw new UnsupportedOperationException();
9762 }
9763 public Bundle getBundle()"))
9764 #t)))))
9765 (inputs
9766 `(("java-slf4j" ,java-slf4j-api)
9767 ("java-asm" ,java-asm)
9768 ("java-osgi-framework" ,java-osgi-framework)
9769 ("java-eclipse-osgi" ,java-eclipse-osgi)
9770 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9771
9772 (define-public java-geronimo-xbean-asm-util
9773 (package
9774 (inherit java-geronimo-xbean-reflect)
9775 (name "java-geronimo-xbean-asm-util")
9776 (arguments
9777 `(#:jar-name "geronimo-xbean-asm-util.jar"
9778 #:source-dir "xbean-asm-util/src/main/java"
9779 #:tests? #f)); no tests
9780 (inputs
9781 `(("java-asm" ,java-asm)))
9782 (native-inputs '())))
9783
9784 (define-public java-geronimo-xbean-finder
9785 (package
9786 (inherit java-geronimo-xbean-reflect)
9787 (name "java-geronimo-xbean-finder")
9788 (arguments
9789 `(#:jar-name "geronimo-xbean-finder.jar"
9790 #:source-dir "xbean-finder/src/main/java"
9791 #:test-dir "xbean-finder/src/test"))
9792 (inputs
9793 `(("java-slf4j-api" ,java-slf4j-api)
9794 ("java-asm" ,java-asm)
9795 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9796 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9797 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9798 ("java-osgi-framework" ,java-osgi-framework)))
9799 (native-inputs
9800 `(("java-junit" ,java-junit)
9801 ("java-hamcrest-core" ,java-hamcrest-core)))))
9802
9803 (define-public java-gson
9804 (package
9805 (name "java-gson")
9806 (version "2.8.2")
9807 (source (origin
9808 (method url-fetch)
9809 (uri (string-append "https://github.com/google/gson/archive/"
9810 "gson-parent-" version ".tar.gz"))
9811 (sha256
9812 (base32
9813 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9814 (build-system ant-build-system)
9815 (arguments
9816 `(#:jar-name "gson.jar"
9817 #:source-dir "gson/src/main/java"
9818 #:test-dir "gson/src/test"))
9819 (native-inputs
9820 `(("java-junit" ,java-junit)
9821 ("java-hamcrest-core" ,java-hamcrest-core)))
9822 (home-page "https://github.com/google/gson")
9823 (synopsis "Java serialization/deserialization library from/to JSON")
9824 (description "Gson is a Java library that can be used to convert Java
9825 Objects into their JSON representation. It can also be used to convert a JSON
9826 string to an equivalent Java object. Gson can work with arbitrary Java objects
9827 including pre-existing objects that you do not have source-code of.")
9828 (license license:asl2.0)))
9829
9830 (define-public java-hawtjni
9831 (package
9832 (name "java-hawtjni")
9833 (version "1.15")
9834 (source (origin
9835 (method url-fetch)
9836 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9837 "hawtjni-project-" version ".tar.gz"))
9838 (sha256
9839 (base32
9840 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9841 (build-system ant-build-system)
9842 (arguments
9843 `(#:jar-name "hawtjni.jar"
9844 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9845 #:tests? #f; no tests
9846 #:phases
9847 (modify-phases %standard-phases
9848 (add-before 'build 'build-native
9849 (lambda* (#:key inputs #:allow-other-keys)
9850 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9851 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9852 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9853 "-fPIC" "-O2" include)
9854 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9855 "-fPIC" "-O2" include)
9856 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9857 "hawtjni.o" "hawtjni-callback.o")))
9858 #t))
9859 (add-after 'install 'install-native
9860 (lambda* (#:key outputs #:allow-other-keys)
9861 (let* ((out (assoc-ref outputs "out"))
9862 (lib (string-append out "/lib"))
9863 (inc (string-append out "/include")))
9864 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9865 (install-file "libhawtjni.so" lib)
9866 (install-file "hawtjni.h" inc)))
9867 #t)))))
9868 (inputs
9869 `(("java-commons-cli" ,java-commons-cli)
9870 ("java-asm" ,java-asm)
9871 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9872 (home-page "https://fusesource.github.io/hawtjni/")
9873 (synopsis "JNI code generator")
9874 (description "HawtJNI is a code generator that produces the JNI code needed
9875 to implement Java native methods. It is based on the jnigen code generator
9876 that is part of the SWT Tools project.")
9877 (license license:asl2.0)))
9878
9879 (define-public java-jansi-native
9880 (package
9881 (name "java-jansi-native")
9882 (version "1.7")
9883 (source (origin
9884 (method url-fetch)
9885 (uri (string-append "https://github.com/fusesource/jansi-native/"
9886 "archive/jansi-native-" version ".tar.gz"))
9887 (sha256
9888 (base32
9889 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9890 (build-system ant-build-system)
9891 (arguments
9892 `(#:jar-name "jansi-native.jar"
9893 #:source-dir "src/main/java"
9894 #:tests? #f; no tests
9895 #:phases
9896 (modify-phases %standard-phases
9897 (add-before 'build 'build-native
9898 (lambda* (#:key inputs #:allow-other-keys)
9899 ;; there are more required files for windows in windows/
9900 (with-directory-excursion "src/main/native-package/src"
9901 (substitute* "jansi_ttyname.c"
9902 (("#include \"jansi_.*") ""))
9903 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9904 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9905 "/include")
9906 (string-append "-I" (assoc-ref inputs "jdk")
9907 "/include/linux")
9908 "-fPIC" "-O2")
9909 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9910 (add-before 'build 'install-native
9911 (lambda _
9912 (let ((dir (string-append "build/classes/META-INF/native/"
9913 ,(match (%current-system)
9914 ((or "i686-linux" "armhf-linux")
9915 "linux32")
9916 ((or "x86_64-linux" "aarch64-linux"
9917 "mips64el-linux")
9918 "linux64")))))
9919 (install-file "src/main/native-package/src/libjansi.so" dir))
9920 #t))
9921 (add-after 'install 'install-native
9922 (lambda* (#:key outputs #:allow-other-keys)
9923 (install-file "src/main/native-package/src/jansi.h"
9924 (string-append (assoc-ref outputs "out") "/include"))
9925 #t)))))
9926 (inputs
9927 `(("java-hawtjni" ,java-hawtjni)))
9928 (home-page "https://fusesource.github.io/jansi/")
9929 (synopsis "Native library for jansi")
9930 (description "This package provides the native library for jansi, a small
9931 Java library that allows you to use ANSI escape sequences to format your
9932 console output.")
9933 (license license:asl2.0)))
9934
9935 (define-public java-jansi
9936 (package
9937 (name "java-jansi")
9938 (version "1.16")
9939 (source (origin
9940 (method url-fetch)
9941 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9942 "jansi-project-" version ".tar.gz"))
9943 (sha256
9944 (base32
9945 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9946 (build-system ant-build-system)
9947 (arguments
9948 `(#:jar-name "jansi.jar"
9949 #:source-dir "jansi/src/main/java"
9950 #:test-dir "jansi/src/test"
9951 #:phases
9952 (modify-phases %standard-phases
9953 (add-after 'check 'clear-term
9954 (lambda _
9955 (invoke "echo" "-e" "\\e[0m"))))))
9956 (inputs
9957 `(("java-jansi-native" ,java-jansi-native)))
9958 (native-inputs
9959 `(("java-junit" ,java-junit)
9960 ("java-hamcrest-core" ,java-hamcrest-core)))
9961 (home-page "https://fusesource.github.io/jansi/")
9962 (synopsis "Portable ANSI escape sequences")
9963 (description "Jansi is a Java library that allows you to use ANSI escape
9964 sequences to format your console output which works on every platform.")
9965 (license license:asl2.0)))
9966
9967 (define-public java-jboss-el-api-spec
9968 (package
9969 (name "java-jboss-el-api-spec")
9970 (version "3.0")
9971 (source (origin
9972 (method url-fetch)
9973 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9974 "archive/jboss-el-api_" version
9975 "_spec-1.0.7.Final.tar.gz"))
9976 (sha256
9977 (base32
9978 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9979 (build-system ant-build-system)
9980 (arguments
9981 `(#:jar-name "java-jboss-el-api_spec.jar"
9982 #:jdk ,icedtea-8))
9983 (inputs
9984 `(("java-junit" ,java-junit)))
9985 (home-page "https://github.com/jboss/jboss-el-api_spec")
9986 (synopsis "JSR-341 expression language 3.0 API")
9987 (description "This package contains an implementation of the JSR-341
9988 specification for the expression language 3.0. It implements an expression
9989 language inspired by ECMAScript and XPath. This language is used with
9990 JavaServer Pages (JSP).")
9991 ;; Either GPL2 only or CDDL.
9992 (license (list license:gpl2 license:cddl1.1))))
9993
9994 (define-public java-jboss-interceptors-api-spec
9995 (package
9996 (name "java-jboss-interceptors-api-spec")
9997 (version "1.2")
9998 (source (origin
9999 (method url-fetch)
10000 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10001 "archive/jboss-interceptors-api_" version
10002 "_spec-1.0.0.Final.tar.gz"))
10003 (sha256
10004 (base32
10005 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10006 (build-system ant-build-system)
10007 (arguments
10008 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10009 #:jdk ,icedtea-8
10010 #:source-dir "."
10011 #:tests? #f)); no tests
10012 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10013 (synopsis "Interceptors 1.2 API classes from JSR 318")
10014 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10015 API. Interceptors are used to interpose on business method invocations and
10016 specific events.")
10017 ;; Either GPL2 only or CDDL.
10018 (license (list license:gpl2 license:cddl1.1))))
10019
10020 (define-public java-cdi-api
10021 (package
10022 (name "java-cdi-api")
10023 (version "2.0")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10027 version ".tar.gz"))
10028 (file-name (string-append name "-" version ".tar.gz"))
10029 (sha256
10030 (base32
10031 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10032 (build-system ant-build-system)
10033 (arguments
10034 `(#:source-dir "api/src/main/java"
10035 #:jar-name "java-cdi-api.jar"
10036 #:test-dir "api/src/test"
10037 #:jdk ,icedtea-8
10038 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10039 (inputs
10040 `(("java-javax-inject" ,java-javax-inject)
10041 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10042 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10043 (native-inputs
10044 `(("java-testng" ,java-testng)
10045 ("java-hamcrest-core" ,java-hamcrest-core)))
10046 (home-page "http://cdi-spec.org/")
10047 (synopsis "Contexts and Dependency Injection APIs")
10048 (description "Java-cdi-api contains the required APIs for Contexts and
10049 Dependency Injection (CDI).")
10050 (license license:asl2.0)))
10051
10052 (define-public java-joda-convert
10053 (package
10054 (name "java-joda-convert")
10055 (version "1.9.2")
10056 (source (origin
10057 (method url-fetch)
10058 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10059 version ".tar.gz"))
10060 (file-name (string-append name "-" version ".tar.gz"))
10061 (sha256
10062 (base32
10063 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10064 (build-system ant-build-system)
10065 (arguments
10066 `(#:jar-name (string-append ,name "-" ,version ".jar")
10067 #:source-dir "src/main/java"
10068 #:test-include (list "**/Test*.java")
10069 ;; Contains only interfaces and base classes (no test)
10070 #:test-exclude (list "**/test*/**.java")))
10071 (inputs
10072 `(("java-guava" ,java-guava)))
10073 (native-inputs
10074 `(("java-junit" ,java-junit)
10075 ("java-hamcrest-core" ,java-hamcrest-core)))
10076 (home-page "http://www.joda.org/joda-convert/")
10077 (synopsis "Conversion between Objects and Strings")
10078 (description "Joda-Convert provides a small set of classes to aid
10079 conversion between Objects and Strings. It is not intended to tackle the
10080 wider problem of Object to Object transformation.")
10081 (license license:asl2.0)))
10082
10083 (define-public java-joda-time
10084 (package
10085 (name "java-joda-time")
10086 (version "2.9.9")
10087 (source (origin
10088 (method url-fetch)
10089 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10090 version ".tar.gz"))
10091 (file-name (string-append name "-" version ".tar.gz"))
10092 (sha256
10093 (base32
10094 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10095 (build-system ant-build-system)
10096 (arguments
10097 `(#:jar-name "java-joda-time.jar"
10098 #:source-dir "src/main/java"
10099 #:test-include (list "**/Test*.java")
10100 ;; There is no runnable test in these files
10101 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10102 #:phases
10103 (modify-phases %standard-phases
10104 (add-after 'build 'build-resources
10105 (lambda _
10106 (mkdir-p "build/classes/org/joda/time/tz/data")
10107 (mkdir-p "build/classes/org/joda/time/format")
10108 ;; This will produce the following exception:
10109 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10110 ;; which is normal, because it doesn't exist yet. It still generates
10111 ;; the same file as in the binary one can find on maven.
10112 (invoke "java" "-cp"
10113 (string-append "build/classes:" (getenv "CLASSPATH"))
10114 "org.joda.time.tz.ZoneInfoCompiler"
10115 "-src" "src/main/java/org/joda/time/tz/src"
10116 "-dst" "build/classes/org/joda/time/tz/data"
10117 "africa" "antarctica" "asia" "australasia"
10118 "europe" "northamerica" "southamerica"
10119 "pacificnew" "etcetera" "backward" "systemv")
10120 (for-each (lambda (f)
10121 (copy-file f (string-append
10122 "build/classes/org/joda/time/format/"
10123 (basename f))))
10124 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10125 #t))
10126 (add-before 'install 'regenerate-jar
10127 (lambda _
10128 ;; We need to regenerate the jar file to add generated data.
10129 (delete-file "build/jar/java-joda-time.jar")
10130 (invoke "ant" "jar")))
10131 (add-before 'check 'copy-test-resources
10132 (lambda _
10133 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10134 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10135 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10136 (copy-recursively "src/test/resources" "build/test-classes")
10137 #t)))))
10138 (inputs
10139 `(("java-joda-convert" ,java-joda-convert)))
10140 (native-inputs
10141 `(("java-junit" ,java-junit)
10142 ("java-hamcrest-core" ,java-hamcrest-core)
10143 ("tzdata" ,tzdata)))
10144 (home-page "http://www.joda.org/joda-time/")
10145 (synopsis "Replacement for the Java date and time classes")
10146 (description "Joda-Time is a replacement for the Java date and time
10147 classes prior to Java SE 8.")
10148 (license license:asl2.0)))
10149
10150 (define-public java-xerces
10151 (package
10152 (name "java-xerces")
10153 (version "2.11.0")
10154 (source
10155 (origin
10156 (method url-fetch)
10157 (uri (string-append "mirror://apache/xerces/j/source/"
10158 "Xerces-J-src." version ".tar.gz"))
10159 (sha256
10160 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10161 (patches (search-patches
10162 "java-xerces-xjavac_taskdef.patch"
10163 "java-xerces-build_dont_unzip.patch"
10164 "java-xerces-bootclasspath.patch"))))
10165 (build-system ant-build-system)
10166 (arguments
10167 `(#:tests? #f;; Test files are not present
10168 #:test-target "test"
10169 #:jdk ,icedtea-8
10170 #:phases
10171 (modify-phases %standard-phases
10172 (add-after 'unpack 'create-build.properties
10173 (lambda* (#:key inputs #:allow-other-keys)
10174 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10175 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10176 (with-output-to-file "build.properties"
10177 (lambda _
10178 (format #t
10179 "jar.jaxp = ~a/share/java/jaxp.jar~@
10180 jar.apis-ext = ~a/share/java/jaxp.jar~@
10181 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10182 jaxp jaxp resolver)))
10183 ;; Make xerces use our version of jaxp in tests
10184 (substitute* "build.xml"
10185 (("xml-apis.jar")
10186 (string-append jaxp "/share/java/jaxp.jar"))
10187 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10188 "${jar.apis}")))
10189 #t))
10190 (replace 'install (install-jars "build")))))
10191 (inputs
10192 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10193 ("java-jaxp" ,java-jaxp)))
10194 (home-page "https://xerces.apache.org/xerces2-j/")
10195 (synopsis "Validating XML parser for Java with DOM level 3 support")
10196 (description "The Xerces2 Java parser is the reference implementation of
10197 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10198 processor.
10199
10200 Xerces2-J supports the following standards and APIs:
10201
10202 @itemize
10203 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10204 @item Namespaces in XML Recommendation
10205 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10206 Range Recommendations
10207 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10208 @item Java APIs for XML Processing (JAXP) 1.2.01
10209 @item XML Schema 1.0 Structures and Datatypes Recommendations
10210 @item Experimental implementation of the Document Object Model (DOM) Level 3
10211 Core and Load/Save Working Drafts
10212 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10213 Candidate Recommendation
10214 @end itemize
10215
10216 Xerces is now able to parse documents written according to the XML 1.1
10217 Candidate Recommendation, except that it does not yet provide an option to
10218 enable normalization checking as described in section 2.13 of this
10219 specification. It also handles namespaces according to the XML Namespaces 1.1
10220 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10221 the DOM level 3 load/save API's are in use.")
10222 (license license:asl2.0)))
10223
10224 (define-public java-jakarta-regexp
10225 (package
10226 (name "java-jakarta-regexp")
10227 (version "1.5")
10228 (source
10229 (origin
10230 (method url-fetch)
10231 (uri (string-append
10232 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10233 version ".tar.gz"))
10234 (sha256
10235 (base32
10236 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10237 (build-system ant-build-system)
10238 (arguments
10239 `(#:test-target "test"
10240 #:phases
10241 (modify-phases %standard-phases
10242 (replace 'install
10243 (lambda* (#:key outputs #:allow-other-keys)
10244 (let* ((out (assoc-ref outputs "out"))
10245 (out-share (string-append out "/share/java")))
10246 (mkdir-p out-share)
10247 (for-each (lambda (name)
10248 (install-file name out-share))
10249 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10250 #t))))))
10251 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10252 (synopsis "Regular expression parser generator for Java.")
10253 (description "@code{jakarta-regexp} is an old regular expression parser
10254 generator for Java.")
10255 (license license:asl2.0)))
10256
10257 (define-public java-jline
10258 (package
10259 (name "java-jline")
10260 (version "1.0")
10261 (source (origin
10262 (method url-fetch)
10263 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10264 version ".tar.gz"))
10265 (sha256
10266 (base32
10267 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10268 (build-system ant-build-system)
10269 (arguments
10270 `(#:jar-name "jline.jar"
10271 #:source-dir "src/main/java"
10272 #:test-dir "src/test"
10273 #:phases
10274 (modify-phases %standard-phases
10275 (add-before 'build 'copy-resources
10276 (lambda _
10277 (copy-recursively "src/main/resources" "build/classes")
10278 #t)))))
10279 (native-inputs
10280 `(("java-junit" ,java-junit)))
10281 (home-page "https://jline.github.io")
10282 (synopsis "Console input handling library")
10283 (description "JLine is a Java library for handling console input. It is
10284 similar in functionality to BSD editline and GNU readline but with additional
10285 features that bring it on par with the Z shell line editor.")
10286 (license license:bsd-3)))
10287
10288 (define-public java-jline-2
10289 (package
10290 (inherit java-jline)
10291 (version "2.14.5")
10292 (source (origin
10293 (method url-fetch)
10294 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10295 version ".tar.gz"))
10296 (sha256
10297 (base32
10298 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10299 (arguments
10300 `(#:jdk ,icedtea-8
10301 ,@(package-arguments java-jline)))
10302 (inputs
10303 `(("java-jansi" ,java-jansi)
10304 ("java-jansi-native" ,java-jansi-native)))
10305 (native-inputs
10306 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10307 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10308 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10309 ("java-powermock-api-support" ,java-powermock-api-support)
10310 ("java-powermock-core" ,java-powermock-core)
10311 ("java-powermock-reflect" ,java-powermock-reflect)
10312 ("java-easymock" ,java-easymock)
10313 ("java-jboss-javassist" ,java-jboss-javassist)
10314 ("java-objenesis" ,java-objenesis)
10315 ("java-asm" ,java-asm)
10316 ("java-hamcrest-core" ,java-hamcrest-core)
10317 ("java-cglib" ,java-cglib)
10318 ("java-junit" ,java-junit)
10319 ("java-hawtjni" ,java-hawtjni)))))
10320
10321 (define-public java-xmlunit
10322 (package
10323 (name "java-xmlunit")
10324 (version "2.5.1")
10325 (source (origin
10326 (method url-fetch)
10327 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10328 version ".tar.gz"))
10329 (file-name (string-append name "-" version ".tar.gz"))
10330 (sha256
10331 (base32
10332 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10333 (build-system ant-build-system)
10334 (arguments
10335 `(#:jar-name "java-xmlunit.jar"
10336 #:source-dir "xmlunit-core/src/main/java"
10337 #:test-dir "xmlunit-core/src/test"
10338 #:phases
10339 (modify-phases %standard-phases
10340 (add-before 'check 'copy-test-resources
10341 (lambda* (#:key inputs #:allow-other-keys)
10342 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10343 #t)))))
10344 (native-inputs
10345 `(("java-junit" ,java-junit)
10346 ("java-mockito-1" ,java-mockito-1)
10347 ("java-hamcrest-all" ,java-hamcrest-all)
10348 ("java-objenesis" ,java-objenesis)
10349 ("java-asm" ,java-asm)
10350 ("java-cglib" ,java-cglib)
10351 ("resources"
10352 ,(origin
10353 (method git-fetch)
10354 (uri (git-reference
10355 (url "https://github.com/xmlunit/test-resources.git")
10356 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10357 (file-name "java-xmlunit-test-resources")
10358 (sha256
10359 (base32
10360 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10361 (home-page "http://www.xmlunit.org/")
10362 (synopsis "XML output testing")
10363 (description "XMLUnit provides you with the tools to verify the XML you
10364 emit is the one you want to create. It provides helpers to validate against
10365 an XML Schema, assert the values of XPath queries or compare XML documents
10366 against expected outcomes.")
10367 (license license:asl2.0)))
10368
10369 (define-public java-xmlunit-legacy
10370 (package
10371 (inherit java-xmlunit)
10372 (name "java-xmlunit-legacy")
10373 (arguments
10374 `(#:jar-name "java-xmlunit-legacy.jar"
10375 #:source-dir "xmlunit-legacy/src/main/java"
10376 #:test-dir "xmlunit-legacy/src/test"))
10377 (inputs
10378 `(("java-xmlunit" ,java-xmlunit)
10379 ("java-junit" ,java-junit)))
10380 (native-inputs
10381 `(("java-mockito-1" ,java-mockito-1)))))
10382
10383 (define-public java-xmlunit-matchers
10384 (package
10385 (inherit java-xmlunit)
10386 (name "java-xmlunit-matchers")
10387 (arguments
10388 `(#:jar-name "java-xmlunit-matchers.jar"
10389 #:source-dir "xmlunit-matchers/src/main/java"
10390 #:test-dir "xmlunit-matchers/src/test"
10391 #:test-exclude
10392 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10393 (list "**/ValidationMatcherTest.java")
10394 #:phases
10395 (modify-phases %standard-phases
10396 (add-before 'build 'copy-test-class
10397 (lambda _
10398 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10399 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10400 #t))
10401 (add-before 'build 'fix-test-resources-path
10402 (lambda _
10403 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10404 (("../test-resources") "test-resources"))
10405 #t))
10406 (add-before 'check 'copy-test-resources
10407 (lambda* (#:key inputs #:allow-other-keys)
10408 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10409 #t)))))
10410 (inputs
10411 `(("java-xmlunit" ,java-xmlunit)
10412 ("java-junit" ,java-junit)))))
10413
10414 (define-public java-openchart2
10415 (package
10416 (name "java-openchart2")
10417 (version "1.4.3")
10418 (source (origin
10419 (method url-fetch)
10420 (uri (string-append "http://download.approximatrix.com/openchart2/"
10421 "openchart2-" version ".source.zip"))
10422 (sha256
10423 (base32
10424 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10425 (build-system ant-build-system)
10426 (arguments
10427 `(#:test-target "test"
10428 #:phases
10429 (modify-phases %standard-phases
10430 (add-after 'unpack 'fix-junit-errors
10431 (lambda _
10432 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10433 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10434 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10435 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10436 "model/DefaultChartDataModelConstraintsTest.java"
10437 "model/MultiScatterDataModelConstraintsTest.java"
10438 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10439 (("(assertEquals[^;]+);" before _)
10440 (string-append (string-drop-right before 2) ", 1E-6);"))))
10441 #t))
10442 (replace 'install (install-jars ".")))))
10443 (native-inputs
10444 `(("unzip" ,unzip)
10445 ("java-junit" ,java-junit)
10446 ("java-hamcrest-core" ,java-hamcrest-core)))
10447 (home-page "http://approximatrix.com/products/openchart2/")
10448 (synopsis "Simple plotting for Java")
10449 (description "Openchart2 provides a simple, yet powerful, interface for
10450 Java programmers to create two-dimensional charts and plots. The library
10451 features an assortment of graph styles, including advanced scatter plots, bar
10452 graphs, and pie charts.")
10453 (license license:lgpl2.1+)))
10454
10455 (define-public java-commons-httpclient
10456 (package
10457 (name "java-commons-httpclient")
10458 (version "3.1")
10459 (source (origin
10460 (method url-fetch)
10461 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10462 "commons-httpclient/source/commons-httpclient-"
10463 version "-src.tar.gz"))
10464 (sha256
10465 (base32
10466 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10467 (build-system ant-build-system)
10468 (arguments
10469 `(#:build-target "compile"
10470 #:test-target "test"
10471 #:tests? #f; requires junit-textui (junit 3)
10472 #:phases
10473 (modify-phases %standard-phases
10474 (add-before 'build 'fix-accent
10475 (lambda _
10476 (for-each (lambda (file)
10477 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10478 (substitute* file
10479 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10480 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10481 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10482 "src/test/org/apache/commons/httpclient/TestHttps.java"
10483 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10484 #t))
10485 (replace 'install
10486 (lambda* (#:key outputs #:allow-other-keys)
10487 (invoke "ant" "dist"
10488 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10489 "/share/java"))
10490 #t)))))
10491 (propagated-inputs
10492 `(("java-commons-logging" ,java-commons-logging-minimal)
10493 ("java-commons-codec" ,java-commons-codec)))
10494 (home-page "https://hc.apache.org")
10495 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10496 (description "This package contains an HTTP/1.1 compliant HTTP agent
10497 implementation. It also provides reusable components for client-side
10498 authentication, HTTP state management, and HTTP connection management.")
10499 (license license:asl2.0)))
10500
10501 (define-public java-commons-vfs
10502 (package
10503 (name "java-commons-vfs")
10504 (version "2.2")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (string-append "mirror://apache/commons/vfs/source/"
10508 "commons-vfs2-distribution-" version "-src.tar.gz"))
10509 (file-name (string-append name "-" version ".tar.gz"))
10510 (sha256
10511 (base32
10512 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10513 (modules '((guix build utils)))
10514 (snippet
10515 '(begin
10516 (for-each delete-file
10517 (find-files "." "\\.jar$"))
10518 #t))))
10519 (build-system ant-build-system)
10520 (arguments
10521 `(#:jar-name "commons-vfs.jar"
10522 #:source-dir "commons-vfs2/src/main/java"
10523 #:test-dir "commons-vfs2/src/test"
10524 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10525 #:tests? #f
10526 #:phases
10527 (modify-phases %standard-phases
10528 (add-before 'build 'remove-hadoop-and-webdav
10529 ; Remove these files as they are not required and depend on difficult
10530 ; packages.
10531 (lambda _
10532 (for-each delete-file-recursively
10533 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10534 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10535 #t)))))
10536 (inputs
10537 `(("java-commons-collections4" ,java-commons-collections4)
10538 ("java-commons-compress" ,java-commons-compress)
10539 ("java-commons-httpclient" ,java-commons-httpclient)
10540 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10541 ("java-commons-net" ,java-commons-net)
10542 ("java-jsch" ,java-jsch)))
10543 (home-page "http://commons.apache.org/proper/commons-vfs/")
10544 (synopsis "Java file system library")
10545 (description "Commons VFS provides a single API for accessing various
10546 different file systems. It presents a uniform view of the files from various
10547 different sources, such as the files on local disk, on an HTTP server, or
10548 inside a Zip archive.")
10549 (license license:asl2.0)))
10550
10551 (define-public java-jakarta-oro
10552 (package
10553 (name "java-jakarta-oro")
10554 (version "2.0.8")
10555 (source (origin
10556 (method url-fetch)
10557 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10558 "jakarta-oro-" version ".tar.gz"))
10559 (sha256
10560 (base32
10561 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10562 (modules '((guix build utils)))
10563 (snippet
10564 `(begin
10565 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10566 #t))))
10567 (build-system ant-build-system)
10568 (arguments
10569 `(#:build-target "package"
10570 #:tests? #f; tests are run as part of the build process
10571 #:phases
10572 (modify-phases %standard-phases
10573 (replace 'install
10574 (install-jars ,(string-append "jakarta-oro-" version))))))
10575 (home-page "https://jakarta.apache.org/oro/")
10576 (synopsis "Text-processing for Java")
10577 (description "The Jakarta-ORO Java classes are a set of text-processing
10578 Java classes that provide Perl5 compatible regular expressions, AWK-like
10579 regular expressions, glob expressions, and utility classes for performing
10580 substitutions, splits, filtering filenames, etc. This library is the successor
10581 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10582 from ORO, Inc.")
10583 (license license:asl1.1)))
10584
10585 (define-public java-native-access
10586 (package
10587 (name "java-native-access")
10588 (version "4.5.1")
10589 (source (origin
10590 (method url-fetch)
10591 (uri (string-append "https://github.com/java-native-access/jna/"
10592 "archive/" version ".tar.gz"))
10593 (file-name (string-append name "-" version ".tar.gz"))
10594 (sha256
10595 (base32
10596 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10597 (modules '((guix build utils)))
10598 (snippet
10599 `(begin
10600 (for-each delete-file (find-files "." ".*.jar"))
10601 (delete-file-recursively "native/libffi")
10602 (delete-file-recursively "dist")
10603 #t))))
10604 (build-system ant-build-system)
10605 (arguments
10606 `(#:tests? #f; FIXME: tests require reflections.jar
10607 #:test-target "test"
10608 #:make-flags (list "-Ddynlink.native=true")
10609 #:phases
10610 (modify-phases %standard-phases
10611 (add-before 'build 'fix-build.xml
10612 (lambda* (#:key inputs #:allow-other-keys)
10613 (substitute* "build.xml"
10614 ;; Since we removed the bundled ant.jar, give the correct path
10615 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10616 ;; We removed generated native libraries. We can only rebuild one
10617 ;; so don't fail if we can't find a native library for another architecture.
10618 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10619 ;; Copy test dependencies
10620 (copy-file (string-append (assoc-ref inputs "java-junit")
10621 "/share/java/junit.jar")
10622 "lib/junit.jar")
10623 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10624 "/share/java/hamcrest-core.jar")
10625 "lib/hamcrest-core.jar")
10626 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10627 #t))
10628 (add-before 'build 'build-native
10629 (lambda _
10630 (invoke "ant" "-Ddynlink.native=true" "native")
10631 #t))
10632 (replace 'install
10633 (install-jars "build")))))
10634 (inputs
10635 `(("libffi" ,libffi)
10636 ("libx11" ,libx11)
10637 ("libxt" ,libxt)))
10638 (native-inputs
10639 `(("java-junit" ,java-junit)
10640 ("java-hamcrest-core" ,java-hamcrest-core)))
10641 (home-page "https://github.com/java-native-access/jna")
10642 (synopsis "Access to native shared libraries from Java")
10643 (description "JNA provides Java programs easy access to native shared
10644 libraries without writing anything but Java code - no JNI or native code is
10645 required. JNA allows you to call directly into native functions using natural
10646 Java method invocation.")
10647 ;; Java Native Access project (JNA) is dual-licensed under 2
10648 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10649 (license (list
10650 license:asl2.0
10651 license:lgpl2.1+))))
10652
10653 (define-public java-native-access-platform
10654 (package
10655 (inherit java-native-access)
10656 (name "java-native-access-platform")
10657 (arguments
10658 `(#:test-target "test"
10659 #:tests? #f; require jna-test.jar
10660 #:phases
10661 (modify-phases %standard-phases
10662 (add-before 'build 'chdir
10663 (lambda _
10664 (chdir "contrib/platform")
10665 #t))
10666 (add-after 'chdir 'fix-ant
10667 (lambda* (#:key inputs #:allow-other-keys)
10668 (substitute* "nbproject/project.properties"
10669 (("../../build/jna.jar")
10670 (string-append (assoc-ref inputs "java-native-access")
10671 "/share/java/jna.jar"))
10672 (("../../lib/hamcrest-core-.*.jar")
10673 (string-append (assoc-ref inputs "java-hamcrest-core")
10674 "/share/java/hamcrest-core.jar"))
10675 (("../../lib/junit.jar")
10676 (string-append (assoc-ref inputs "java-junit")
10677 "/share/java/junit.jar")))
10678 #t))
10679 (replace 'install
10680 (install-jars "dist")))))
10681 (inputs
10682 `(("java-native-access" ,java-native-access)))
10683 (synopsis "Cross-platform mappings for jna")
10684 (description "java-native-access-platfrom has cross-platform mappings
10685 and mappings for a number of commonly used platform functions, including a
10686 large number of Win32 mappings as well as a set of utility classes that
10687 simplify native access.")))
10688
10689 (define-public java-jsch-agentproxy-core
10690 (package
10691 (name "java-jsch-agentproxy-core")
10692 (version "0.0.8")
10693 (source (origin
10694 (method url-fetch)
10695 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10696 version ".tar.gz"))
10697 (file-name (string-append name "-" version ".tar.gz"))
10698 (sha256
10699 (base32
10700 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10701 (build-system ant-build-system)
10702 (arguments
10703 `(#:jar-name "jsch-agentproxy-core.jar"
10704 #:source-dir "jsch-agent-proxy-core/src/main/java"
10705 #:tests? #f)); no tests
10706 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10707 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10708 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10709 and Pageant included Putty. It will be easily integrated into JSch, and users
10710 will be allowed to use these programs for authentication.")
10711 (license license:bsd-3)))
10712
10713 (define-public java-jsch-agentproxy-sshagent
10714 (package
10715 (inherit java-jsch-agentproxy-core)
10716 (name "java-jsch-agentproxy-sshagent")
10717 (arguments
10718 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10719 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10720 #:tests? #f)); no tests
10721 (inputs
10722 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10723 (synopsis "Proxy to ssh-agent")
10724 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10725 and Pageant included in Putty. This component contains the code for a proxy to
10726 ssh-agent.")))
10727
10728 (define-public java-jsch-agentproxy-usocket-jna
10729 (package
10730 (inherit java-jsch-agentproxy-core)
10731 (name "java-jsch-agentproxy-usocket-jna")
10732 (arguments
10733 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10734 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10735 #:tests? #f)); no tests
10736 (inputs
10737 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10738 ("java-native-access" ,java-native-access)))
10739 (synopsis "USocketFactory implementation using JNA")
10740 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10741 and Pageant included in Putty. This component contains an implementation of
10742 USocketFactory using @dfn{JNA} (Java Native Access).")))
10743
10744 (define-public java-jsch-agentproxy-pageant
10745 (package
10746 (inherit java-jsch-agentproxy-core)
10747 (name "java-jsch-agentproxy-pageant")
10748 (arguments
10749 `(#:jar-name "jsch-agentproxy-pageant.jar"
10750 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10751 #:tests? #f)); no tests
10752 (inputs
10753 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10754 ("java-native-access" ,java-native-access)
10755 ("java-native-access-platform" ,java-native-access-platform)))
10756 (synopsis "Proxy to pageant")
10757 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10758 and Pageant included in Putty. This component contains the code for a proxy to
10759 pageant.")))
10760
10761 (define-public java-jsch-agentproxy-usocket-nc
10762 (package
10763 (inherit java-jsch-agentproxy-core)
10764 (name "java-jsch-agentproxy-usocket-nc")
10765 (arguments
10766 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10767 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10768 #:tests? #f)); no tests
10769 (inputs
10770 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10771 (synopsis "USocketFactory implementation using netcat")
10772 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10773 and Pageant included in Putty. This component contains an implementation of
10774 USocketFactory using netcat.")))
10775
10776 (define-public java-jsch-agentproxy-connector-factory
10777 (package
10778 (inherit java-jsch-agentproxy-core)
10779 (name "java-jsch-agentproxy-connector-factory")
10780 (arguments
10781 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10782 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10783 #:tests? #f)); no tests
10784 (inputs
10785 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10786 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10787 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10788 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10789 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10790 (synopsis "Connector factory for jsch agent proxy")
10791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10792 and Pageant included in Putty. This component contains a connector factory.")))
10793
10794 (define-public java-jsch-agentproxy-jsch
10795 (package
10796 (inherit java-jsch-agentproxy-core)
10797 (name "java-jsch-agentproxy-jsch")
10798 (arguments
10799 `(#:jar-name "jsch-agentproxy-jsch.jar"
10800 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10801 #:tests? #f)); no tests
10802 (inputs
10803 `(("java-jsch" ,java-jsch)
10804 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10805 (synopsis "JSch integration library for agentproxy")
10806 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10807 and Pageant included in Putty. This component contains a library to use
10808 jsch-agent-proxy with JSch.")))
10809
10810 (define-public java-apache-ivy
10811 (package
10812 (name "java-apache-ivy")
10813 (version "2.4.0")
10814 (source (origin
10815 (method url-fetch)
10816 (uri (string-append "mirror://apache//ant/ivy/" version
10817 "/apache-ivy-" version "-src.tar.gz"))
10818 (sha256
10819 (base32
10820 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10821 (patches
10822 (search-patches
10823 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10824 (build-system ant-build-system)
10825 (arguments
10826 `(#:jar-name "ivy.jar"
10827 #:tests? #f
10828 #:phases
10829 (modify-phases %standard-phases
10830 (add-before 'build 'remove-example
10831 (lambda _
10832 (delete-file-recursively "src/example")
10833 #t))
10834 (add-before 'build 'copy-resources
10835 (lambda _
10836 (with-directory-excursion "src/java"
10837 (for-each (lambda (file)
10838 (install-file file (string-append "../../build/classes/" (dirname file))))
10839 (append
10840 (find-files "." ".*.css")
10841 (find-files "." ".*.ent")
10842 (find-files "." ".*.html")
10843 (find-files "." ".*.properties")
10844 (find-files "." ".*.xsd")
10845 (find-files "." ".*.xsl")
10846 (find-files "." ".*.xml"))))
10847 #t))
10848 (add-before 'build 'fix-vfs
10849 (lambda _
10850 (substitute*
10851 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10852 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10853 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10854 #t))
10855 (add-before 'install 'copy-manifest
10856 (lambda _
10857 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10858 #t))
10859 (add-before 'install 'repack
10860 (lambda _
10861 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10862 "-C" "build/classes" ".")))
10863 (add-after 'install 'install-bin
10864 (lambda* (#:key outputs #:allow-other-keys)
10865 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10866 (ivy (string-append bin "/ivy"))
10867 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10868 (mkdir-p bin)
10869 (with-output-to-file ivy
10870 (lambda _
10871 (display (string-append
10872 "#!" (which "sh") "\n"
10873 "if [[ -z $CLASSPATH ]]; then\n"
10874 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10875 "else\n"
10876 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10877 "fi\n"
10878 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10879 (chmod ivy #o755)
10880 #t))))))
10881 (inputs
10882 `(("java-bouncycastle" ,java-bouncycastle)
10883 ("java-commons-cli" ,java-commons-cli)
10884 ("java-commons-collections" ,java-commons-collections)
10885 ("java-commons-httpclient" ,java-commons-httpclient)
10886 ("java-commons-lang" ,java-commons-lang)
10887 ("java-commons-vfs" ,java-commons-vfs)
10888 ("java-jakarta-oro" ,java-jakarta-oro)
10889 ("java-jsch" ,java-jsch)
10890 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10891 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10892 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10893 ("java-junit" ,java-junit)))
10894 (home-page "https://ant.apache.org/ivy")
10895 (synopsis "Dependency manager for the Java programming language")
10896 (description "Ivy is a tool for managing (recording, tracking, resolving
10897 and reporting) project dependencies. It is characterized by the following:
10898
10899 @itemize
10900 @item flexibility and configurability - Ivy is essentially process agnostic
10901 and is not tied to any methodology or structure. Instead it provides the
10902 necessary flexibility and configurability to be adapted to a broad range
10903 of dependency management and build processes.
10904 @item tight integration with Apache Ant - while available as a standalone tool,
10905 Ivy works particularly well with Apache Ant providing a number of
10906 powerful Ant tasks ranging from dependency resolution to dependency
10907 reporting and publication.
10908 @end itemize")
10909 (license license:asl2.0)))
10910
10911 (define-public java-eclipse-sisu-inject
10912 (package
10913 (name "java-eclipse-sisu-inject")
10914 (version "0.3.3")
10915 (source (origin
10916 (method git-fetch)
10917 (uri (git-reference
10918 (url "https://github.com/eclipse/sisu.inject/")
10919 (commit "releases/0.3.3")))
10920 (file-name (git-file-name name version))
10921 (sha256
10922 (base32
10923 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10924 (build-system ant-build-system)
10925 (arguments
10926 `(#:jar-name "eclipse-sisu-inject.jar"
10927 #:source-dir "org.eclipse.sisu.inject/src"
10928 #:jdk ,icedtea-8
10929 #:tests? #f)); no tests
10930 (inputs
10931 `(("java-guice" ,java-guice)
10932 ("java-guice-servlet" ,java-guice-servlet)
10933 ("java-javax-inject" ,java-javax-inject)
10934 ("java-javaee-servletapi" ,java-javaee-servletapi)
10935 ("java-junit" ,java-junit)
10936 ("java-slf4j-api" ,java-slf4j-api)
10937 ("java-jsr305" ,java-jsr305)
10938 ("java-jsr250" ,java-jsr250)
10939 ("java-cdi-api" ,java-cdi-api)
10940 ("java-osgi-framework" ,java-osgi-framework)
10941 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10942 ("java-testng" ,java-testng)))
10943 (home-page "https://www.eclipse.org/sisu/")
10944 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10945 (description "Sisu is a modular JSR330-based container that supports
10946 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10947 Google-Guice to perform dependency injection and provide the core JSR330
10948 support, but removes the need to write explicit bindings in Guice modules.
10949 Integration with other containers via the Eclipse Extension Registry and the
10950 OSGi Service Registry is a goal of this project.")
10951 (license license:epl1.0)))
10952
10953 (define-public java-eclipse-sisu-plexus
10954 (package
10955 (name "java-eclipse-sisu-plexus")
10956 (version "0.3.4")
10957 (source (origin
10958 (method git-fetch)
10959 (uri (git-reference
10960 (url "https://github.com/eclipse/sisu.plexus.git")
10961 (commit (string-append "releases/" version))))
10962 (file-name (git-file-name name version))
10963 (sha256
10964 (base32
10965 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
10966 (modules '((guix build utils)))
10967 (snippet
10968 '(begin
10969 (for-each delete-file (find-files "." ".*.jar"))
10970 (rename-file "org.eclipse.sisu.plexus.tests/src"
10971 "org.eclipse.sisu.plexus.tests/java")
10972 #t))))
10973 (build-system ant-build-system)
10974 (arguments
10975 `(#:jar-name "eclipse-sisu-plexus.jar"
10976 #:source-dir "org.eclipse.sisu.plexus/src"
10977 #:test-dir "org.eclipse.sisu.plexus.tests"
10978 #:test-exclude
10979 (list
10980 ;; This test fails probably because we can't generate the necessary
10981 ;; meta-inf files.
10982 "**/PlexusLoggingTest.*"
10983 ;; FIXME: This test fails because of some injection error
10984 "**/PlexusRequirementTest.*")
10985 #:jdk ,icedtea-8
10986 #:phases
10987 (modify-phases %standard-phases
10988 (add-before 'build 'copy-resources
10989 (lambda _
10990 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10991 "build/classes/META-INF/plexus")
10992 #t))
10993 (add-before 'check 'build-test-jar
10994 (lambda _
10995 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10996 (mkdir "build")
10997 (with-directory-excursion "java"
10998 (apply invoke "javac" "-cp"
10999 (string-append (getenv "CLASSPATH")
11000 ":../../../../../build/classes")
11001 (find-files "." ".*.java"))
11002 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11003 (find-files "." ".*.jar")))
11004 (mkdir-p "build/META-INF/plexus")
11005 (copy-file "resources/META-INF/plexus/components.xml"
11006 "build/META-INF/plexus/components.xml")
11007 (with-directory-excursion "build"
11008 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11009 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11010 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11011 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11012 (("resources/component-jar")
11013 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11014 #t)))))
11015 (inputs
11016 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11017 ("java-plexus-util" ,java-plexus-utils)
11018 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11019 ("java-osgi-framework" ,java-osgi-framework)
11020 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11021 ("java-guice" ,java-guice)
11022 ("java-javax-inject" ,java-javax-inject)
11023 ("java-slf4j-api" ,java-slf4j-api)
11024 ("java-junit" ,java-junit)))
11025 (native-inputs
11026 `(("java-guava" ,java-guava)
11027 ("java-aopalliance" ,java-aopalliance)
11028 ("java-cglib" ,java-cglib)
11029 ("java-asm" ,java-asm)))
11030 (home-page "https://www.eclipse.org/sisu/")
11031 (synopsis "Plexus support for the sisu container")
11032 (description "Sisu is a modular JSR330-based container that supports
11033 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11034 adds Plexus support to the Sisu-Inject container.")
11035 (license license:epl1.0)))
11036
11037 (define-public java-commons-compiler
11038 (package
11039 (name "java-commons-compiler")
11040 (version "3.0.8")
11041 (source (origin
11042 (method git-fetch)
11043 (uri (git-reference
11044 (url "https://github.com/janino-compiler/janino")
11045 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11046 (file-name (string-append name "-" version))
11047 (sha256
11048 (base32
11049 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11050 (modules '((guix build utils)))
11051 (snippet
11052 '(begin
11053 (for-each delete-file
11054 (find-files "." "\\.jar$"))
11055 #t))))
11056 (build-system ant-build-system)
11057 (arguments
11058 `(#:jar-name "commons-compiler.jar"
11059 #:source-dir "commons-compiler/src/main"
11060 #:tests? #f)); no tests
11061 (home-page "https://github.com/janino-compiler/janino")
11062 (synopsis "Java compiler")
11063 (description "Commons-compiler contains an API for janino, including the
11064 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11065 and @code{ISimpleCompiler} interfaces.")
11066 (license license:bsd-3)))
11067
11068 (define-public java-janino
11069 (package
11070 (inherit java-commons-compiler)
11071 (name "java-janino")
11072 (arguments
11073 `(#:jar-name "janino.jar"
11074 #:source-dir "src/main/java"
11075 #:phases
11076 (modify-phases %standard-phases
11077 (add-before 'configure 'chdir
11078 (lambda _
11079 (chdir "janino")
11080 #t)))))
11081 (inputs
11082 `(("java-commons-compiler" ,java-commons-compiler)))
11083 (native-inputs
11084 `(("java-junit" ,java-junit)
11085 ("java-hamcrest-core" ,java-hamcrest-core)))
11086 (description "Janino is a Java compiler. Janino can compile a set of
11087 source files to a set of class files like @code{javac}, but also compile a
11088 Java expression, block, class body or source file in memory, load the bytecode
11089 and execute it directly in the same JVM. @code{janino} can also be used for
11090 static code analysis or code manipulation.")))
11091
11092 (define-public java-logback-core
11093 (package
11094 (name "java-logback-core")
11095 (version "1.2.3")
11096 (source (origin
11097 (method url-fetch)
11098 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11099 version ".tar.gz"))
11100 (file-name (string-append name "-" version ".tar.gz"))
11101 (sha256
11102 (base32
11103 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11104 (modules '((guix build utils)))
11105 (snippet
11106 '(begin
11107 (delete-file-recursively "logback-access/lib")
11108 #t))))
11109 (build-system ant-build-system)
11110 (arguments
11111 `(#:jar-name "logback.jar"
11112 #:source-dir "src/main/java"
11113 #:test-dir "src/test"
11114 #:test-exclude
11115 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11116 ;; which creates FastClasses
11117 (list "**/AllCoreTest.*"
11118 "**/AutoFlushingObjectWriterTest.*"
11119 "**/PackageTest.*"
11120 "**/ResilientOutputStreamTest.*"
11121 ;; And we still don't want to run abstract classes
11122 "**/Abstract*.*")
11123 #:phases
11124 (modify-phases %standard-phases
11125 (add-before 'configure 'chdir
11126 (lambda _
11127 (chdir "logback-core")
11128 #t)))))
11129 (inputs
11130 `(("java-javax-mail" ,java-javax-mail)
11131 ("servlet" ,java-javaee-servletapi)
11132 ("java-commons-compiler" ,java-commons-compiler)
11133 ("java-janino" ,java-janino)))
11134 (native-inputs
11135 `(("java-junit" ,java-junit)
11136 ("java-hamcrest-core" ,java-hamcrest-core)
11137 ("java-mockito-1" ,java-mockito-1)
11138 ("java-cglib" ,java-cglib)
11139 ("java-asm" ,java-asm)
11140 ("java-objenesis" ,java-objenesis)
11141 ("java-joda-time" ,java-joda-time)))
11142 (home-page "https://logback.qos.ch")
11143 (synopsis "Logging for java")
11144 (description "Logback is intended as a successor to the popular log4j project.
11145 This module lays the groundwork for the other two modules.")
11146 ;; Either epl1.0 or lgpl2.1
11147 (license (list license:epl1.0
11148 license:lgpl2.1))))
11149
11150 (define-public java-logback-classic
11151 (package
11152 (inherit java-logback-core)
11153 (name "java-logback-classic")
11154 (arguments
11155 `(#:jar-name "logback-classic.jar"
11156 #:source-dir "src/main/java"
11157 #:test-dir "src/test"
11158 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11159 #:jdk ,icedtea-8
11160 #:phases
11161 (modify-phases %standard-phases
11162 (add-before 'configure 'chdir
11163 (lambda _
11164 (chdir "logback-classic")
11165 #t))
11166 (replace 'build
11167 (lambda* (#:key inputs #:allow-other-keys)
11168 (mkdir-p "build/classes")
11169 (setenv "CLASSPATH"
11170 (string-join
11171 (apply append (map (lambda (input)
11172 (find-files (assoc-ref inputs input)
11173 ".*.jar"))
11174 '("java-logback-core" "java-slf4j-api"
11175 "java-commons-compiler" "servlet"
11176 "groovy")))
11177 ":"))
11178 (apply invoke "groovyc" "-d" "build/classes" "-j"
11179 (find-files "src/main/" ".*\\.(groovy|java)$"))
11180 (invoke "ant" "jar")
11181 #t)))))
11182 (inputs
11183 `(("java-logback-core" ,java-logback-core)
11184 ("java-slf4j-api" ,java-slf4j-api)
11185 ,@(package-inputs java-logback-core)))
11186 (native-inputs
11187 `(("groovy" ,groovy)))
11188 (description "Logback is intended as a successor to the popular log4j project.
11189 This module can be assimilated to a significantly improved version of log4j.
11190 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11191 can readily switch back and forth between logback and other logging frameworks
11192 such as log4j or @code{java.util.logging} (JUL).")))
11193
11194 (define-public java-qdox
11195 (package
11196 (name "java-qdox")
11197 ; Newer version exists, but this version is required by java-plexus-component-metadata
11198 (version "2.0-M2")
11199 (source (origin
11200 (method url-fetch)
11201 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11202 ;; Older releases at https://github.com/codehaus/qdox/
11203 ;; Note: The release at maven is pre-generated. The release at
11204 ;; github requires jflex.
11205 (uri (string-append "http://central.maven.org/maven2/"
11206 "com/thoughtworks/qdox/qdox/" version
11207 "/qdox-" version "-sources.jar"))
11208 (sha256
11209 (base32
11210 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11211 (build-system ant-build-system)
11212 (arguments
11213 `(#:jar-name "qdox.jar"
11214 #:tests? #f)); no tests
11215 (home-page "http://qdox.codehaus.org/")
11216 (synopsis "Parse definitions from Java source files")
11217 (description "QDox is a high speed, small footprint parser for extracting
11218 class/interface/method definitions from source files complete with JavaDoc
11219 @code{@@tags}. It is designed to be used by active code generators or
11220 documentation tools.")
11221 (license license:asl2.0)))
11222
11223 (define-public java-jgit
11224 (package
11225 (name "java-jgit")
11226 (version "4.7.0.201704051617-r")
11227 (source (origin
11228 (method url-fetch)
11229 (uri (string-append "https://repo1.maven.org/maven2/"
11230 "org/eclipse/jgit/org.eclipse.jgit/"
11231 version "/org.eclipse.jgit-"
11232 version "-sources.jar"))
11233 (sha256
11234 (base32
11235 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11236 (build-system ant-build-system)
11237 (arguments
11238 `(#:tests? #f ; There are no tests to run.
11239 #:jar-name "jgit.jar"
11240 ;; JGit must be built with a JDK supporting Java 8.
11241 #:jdk ,icedtea-8
11242 ;; Target our older default JDK.
11243 #:make-flags (list "-Dtarget=1.7")
11244 #:phases
11245 (modify-phases %standard-phases
11246 ;; The jar file generated by the default build.xml does not include
11247 ;; the text properties files, so we need to add them.
11248 (add-after 'build 'add-properties
11249 (lambda* (#:key jar-name #:allow-other-keys)
11250 (with-directory-excursion "src"
11251 (apply invoke "jar" "-uf"
11252 (string-append "../build/jar/" jar-name)
11253 (find-files "." "\\.properties$")))
11254 #t)))))
11255 (inputs
11256 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11257 ("java-javaewah" ,java-javaewah)
11258 ("java-jsch" ,java-jsch)
11259 ("java-slf4j-api" ,java-slf4j-api)))
11260 (home-page "https://eclipse.org/jgit/")
11261 (synopsis "Java library implementing the Git version control system")
11262 (description "JGit is a lightweight, pure Java library implementing the
11263 Git version control system, providing repository access routines, support for
11264 network protocols, and core version control algorithms.")
11265 (license license:edl1.0)))
11266
11267 ;; For axoloti. This package can still be built with icedtea-7, which is
11268 ;; currently used as the default JDK.
11269 (define-public java-jgit-4.2
11270 (package (inherit java-jgit)
11271 (version "4.2.0.201601211800-r")
11272 (source (origin
11273 (method url-fetch)
11274 (uri (string-append "https://repo1.maven.org/maven2/"
11275 "org/eclipse/jgit/org.eclipse.jgit/"
11276 version "/org.eclipse.jgit-"
11277 version "-sources.jar"))
11278 (sha256
11279 (base32
11280 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11281 (build-system ant-build-system)
11282 (arguments
11283 (substitute-keyword-arguments (package-arguments java-jgit)
11284 ;; Build for default JDK.
11285 ((#:jdk _) icedtea-7)
11286 ((#:phases phases)
11287 `(modify-phases ,phases
11288 (add-after 'unpack 'use-latest-javaewah-API
11289 (lambda _
11290 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11291 (("wordinbits") "WORD_IN_BITS"))
11292 #t))))))
11293 (inputs
11294 `(("java-javaewah" ,java-javaewah)
11295 ("java-jsch" ,java-jsch)
11296 ("java-slf4j-api" ,java-slf4j-api)))))
11297
11298 (define-public abcl
11299 (package
11300 (name "abcl")
11301 (version "1.5.0")
11302 (source
11303 (origin
11304 (method url-fetch)
11305 (uri (string-append "https://abcl.org/releases/"
11306 version "/abcl-src-" version ".tar.gz"))
11307 (sha256
11308 (base32
11309 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11310 (patches
11311 (search-patches
11312 "abcl-fix-build-xml.patch"))))
11313 (build-system ant-build-system)
11314 (native-inputs
11315 `(("java-junit" ,java-junit)))
11316 (arguments
11317 `(#:build-target "abcl.jar"
11318 #:test-target "abcl.test"
11319 #:phases
11320 (modify-phases %standard-phases
11321 (replace 'install
11322 (lambda* (#:key outputs #:allow-other-keys)
11323 (let ((share (string-append (assoc-ref outputs "out")
11324 "/share/java/"))
11325 (bin (string-append (assoc-ref outputs "out")
11326 "/bin/")))
11327 (mkdir-p share)
11328 (install-file "dist/abcl.jar" share)
11329 (install-file "dist/abcl-contrib.jar" share)
11330 (mkdir-p bin)
11331 (with-output-to-file (string-append bin "abcl")
11332 (lambda _
11333 (let ((classpath (string-append
11334 share "abcl.jar"
11335 ":"
11336 share "abcl-contrib.jar")))
11337 (display (string-append
11338 "#!" (which "sh") "\n"
11339 "if [[ -z $CLASSPATH ]]; then\n"
11340 " cp=\"" classpath "\"\n"
11341 "else\n"
11342 " cp=\"" classpath ":$CLASSPATH\"\n"
11343 "fi\n"
11344 "exec " (which "java")
11345 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11346 (chmod (string-append bin "abcl") #o755)
11347 #t))))))
11348 (home-page "https://abcl.org/")
11349 (synopsis "Common Lisp Implementation on the JVM")
11350 (description
11351 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11352 Lisp language featuring both an interpreter and a compiler, running in the
11353 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11354 in any Java application. Additionally, it can be used to implement (parts of)
11355 the application using Java to Lisp integration APIs.")
11356 (license (list license:gpl2+
11357 ;; named-readtables is released under 3 clause BSD
11358 license:bsd-3
11359 ;; jfli is released under CPL 1.0
11360 license:cpl1.0))))
11361
11362 (define-public java-jsonp-api
11363 (package
11364 (name "java-jsonp-api")
11365 (version "1.1.5")
11366 (source (origin
11367 (method git-fetch)
11368 (uri (git-reference
11369 (url "https://github.com/eclipse-ee4j/jsonp")
11370 (commit (string-append version "-RELEASE"))))
11371 (file-name (git-file-name name version))
11372 (sha256
11373 (base32
11374 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11375 (build-system ant-build-system)
11376 (arguments
11377 `(#:jar-name "jsonp-api.jar"
11378 #:tests? #f
11379 #:source-dir "api/src/main/java"
11380 #:test-dir "api/src/test"))
11381 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11382 (synopsis "JSON Processing in Java")
11383 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11384 parse, generate, transform and query) JSON messages. It produces and
11385 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11386 and allows to build a Java object model for JSON text using API classes
11387 (similar to DOM API for XML).")
11388 ;; either gpl2 only with classpath exception, or epl2.0.
11389 (license (list license:gpl2
11390 license:epl2.0))))
11391
11392 (define-public java-jsonp-impl
11393 (package
11394 (inherit java-jsonp-api)
11395 (name "java-jsonp-impl")
11396 (arguments
11397 `(#:jar-name "jsonp-impl.jar"
11398 #:tests? #f
11399 #:source-dir "impl/src/main/java"
11400 #:test-dir "impl/src/test"))
11401 (propagated-inputs
11402 `(("java-jsonp-api" ,java-jsonp-api)))
11403 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11404 parse, generate, transform and query) JSON messages. This package contains
11405 a reference implementation of that API.")))
11406
11407 (define-public java-xmp
11408 (package
11409 (name "java-xmp")
11410 (version "5.1.3")
11411 (source (origin
11412 (method url-fetch)
11413 (uri (string-append "http://download.macromedia.com/pub/developer"
11414 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11415 (sha256
11416 (base32
11417 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11418 (build-system ant-build-system)
11419 (arguments
11420 `(#:build-target "build"
11421 #:tests? #f; no tests
11422 #:phases
11423 (modify-phases %standard-phases
11424 (add-after 'unpack 'chdir
11425 (lambda _
11426 (chdir "XMPCore")
11427 #t))
11428 (add-before 'build 'fix-timestamp
11429 (lambda _
11430 (substitute* "build.xml"
11431 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11432 #t))
11433 (replace 'install
11434 (install-jars "."))
11435 (add-after 'install 'install-doc
11436 (lambda* (#:key outputs #:allow-other-keys)
11437 (copy-recursively
11438 "docs"
11439 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11440 #t)))))
11441 (native-inputs
11442 `(("unzip" ,unzip)))
11443 (home-page "https://www.adobe.com/devnet/xmp.html")
11444 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11445 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11446 technology that allows you to embed data about a file, known as metadata,
11447 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11448 library and the API is similar.")
11449 (license license:bsd-3)))
11450
11451 (define-public java-metadata-extractor
11452 (package
11453 (name "java-metadata-extractor")
11454 (version "2.11.0")
11455 (source (origin
11456 (method git-fetch)
11457 (uri (git-reference
11458 (url "https://github.com/drewnoakes/metadata-extractor")
11459 (commit version)))
11460 (file-name (git-file-name name version))
11461 (sha256
11462 (base32
11463 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11464 (build-system ant-build-system)
11465 (arguments
11466 `(#:jar-name "metadata-extractor.jar"
11467 #:source-dir "Source"
11468 #:test-dir "Tests"
11469 #:phases
11470 (modify-phases %standard-phases
11471 (add-before 'check 'fix-test-dir
11472 (lambda _
11473 (substitute* "build.xml"
11474 (("/java\">") "\">"))
11475 #t)))))
11476 (propagated-inputs
11477 `(("java-xmp" ,java-xmp)))
11478 (native-inputs
11479 `(("java-hamcrest-core" ,java-hamcrest-core)
11480 ("java-junit" ,java-junit)))
11481 (home-page "https://github.com/drewnoakes/metadata-extractor")
11482 (synopsis "Extract metadata from image and video files")
11483 (description "Metadata-extractor is a straightforward Java library for
11484 reading metadata from image files. It is able to read metadata in Exif,
11485 IPTC, XMP, ICC and more formats.")
11486 (license license:asl2.0)))
11487
11488 (define-public java-svg-salamander
11489 (package
11490 (name "java-svg-salamander")
11491 (version "1.1.2")
11492 (source (origin
11493 (method git-fetch)
11494 (uri (git-reference
11495 (url "https://github.com/blackears/svgSalamander")
11496 (commit (string-append "v" version))))
11497 (file-name (git-file-name name version))
11498 (sha256
11499 (base32
11500 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11501 (modules '((guix build utils)))
11502 (snippet
11503 `(for-each delete-file (find-files "." ".*.jar")))
11504 (patches
11505 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11506 (build-system ant-build-system)
11507 (arguments
11508 `(#:tests? #f; no tests
11509 #:phases
11510 (modify-phases %standard-phases
11511 (add-after 'unpack 'chdir
11512 (lambda _
11513 (chdir "svg-core")
11514 #t))
11515 (add-before 'build 'copy-jars
11516 (lambda* (#:key inputs #:allow-other-keys)
11517 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11518 "../libraries/javacc.jar")
11519 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11520 "../libraries/ant.jar")
11521 #t))
11522 (replace 'install
11523 (install-jars "dist")))))
11524 (native-inputs
11525 `(("javacc" ,javacc)))
11526 (home-page "https://github.com/blackears/svgSalamander")
11527 (synopsis "SVG engine for Java")
11528 (description "SVG Salamander is an SVG engine for Java that's designed
11529 to be small, fast, and allow programmers to use it with a minimum of fuss.
11530 It's in particular targeted for making it easy to integrate SVG into Java
11531 games and making it much easier for artists to design 2D game content - from
11532 rich interactive menus to charts and graphcs to complex animations.")
11533 (license license:bsd-2)))