gnu: Add wl-clipboard.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018 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 gnuzilla) ;nss
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages onc-rpc)
67 #:use-module (gnu packages web)
68 #:use-module (gnu packages wget)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages popt)
72 #:use-module (gnu packages kerberos)
73 #:use-module (gnu packages xml)
74 #:use-module (gnu packages xorg)
75 #:use-module (gnu packages texinfo)
76 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
77 #:use-module (srfi srfi-11)
78 #:use-module (ice-9 match))
79
80 \f
81 ;;;
82 ;;; Java bootstrap toolchain.
83 ;;;
84
85 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
86 ;; use it to build a simple version of GNU Classpath, the Java standard
87 ;; library. We chose version 0.93 because it is the last version that can be
88 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
89 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
90 ;; the last version of JamVM that works with a version of GNU classpath that
91 ;; does not require ECJ. These three packages make up the bootstrap JDK.
92
93 ;; This is sufficient to build an older version of Ant, which is needed to
94 ;; build an older version of ECJ, an incremental Java compiler, both of which
95 ;; are written in Java.
96 ;;
97 ;; ECJ is needed to build the latest release (0.99) and the development
98 ;; version of GNU Classpath. The development version of GNU Classpath has
99 ;; much more support for Java 1.6 than the latest release, but we need to
100 ;; build 0.99 first to get a working version of javah. ECJ, the development
101 ;; version of GNU Classpath, and the latest version of JamVM make up the
102 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
103 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
104 ;; Icedtea 3.x.
105
106 (define jikes
107 (package
108 (name "jikes")
109 (version "1.22")
110 (source (origin
111 (method url-fetch)
112 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
113 version "/jikes-" version ".tar.bz2"))
114 (sha256
115 (base32
116 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
117 (build-system gnu-build-system)
118 (home-page "http://jikes.sourceforge.net/")
119 (synopsis "Compiler for the Java language")
120 (description "Jikes is a compiler that translates Java source files as
121 defined in The Java Language Specification into the bytecoded instruction set
122 and binary format defined in The Java Virtual Machine Specification.")
123 (license license:ibmpl1.0)))
124
125 ;; This is the last version of GNU Classpath that can be built without ECJ.
126 (define classpath-bootstrap
127 (package
128 (name "classpath")
129 (version "0.93")
130 (source (origin
131 (method url-fetch)
132 (uri (string-append "mirror://gnu/classpath/classpath-"
133 version ".tar.gz"))
134 (sha256
135 (base32
136 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
137 (patches (search-patches "classpath-aarch64-support.patch"))))
138 (build-system gnu-build-system)
139 (arguments
140 `(#:configure-flags
141 (list (string-append "JAVAC="
142 (assoc-ref %build-inputs "jikes")
143 "/bin/jikes")
144 "--disable-Werror"
145 "--disable-gmp"
146 "--disable-gtk-peer"
147 "--disable-gconf-peer"
148 "--disable-plugin"
149 "--disable-dssi"
150 "--disable-alsa"
151 "--disable-gjdoc")
152 #:phases
153 (modify-phases %standard-phases
154 (add-after 'install 'install-data
155 (lambda _ (invoke "make" "install-data"))))))
156 (native-inputs
157 `(("jikes" ,jikes)
158 ("fastjar" ,fastjar)
159 ("libltdl" ,libltdl)
160 ("pkg-config" ,pkg-config)))
161 (home-page "https://www.gnu.org/software/classpath/")
162 (synopsis "Essential libraries for Java")
163 (description "GNU Classpath is a project to create core class libraries
164 for use with runtimes, compilers and tools for the Java programming
165 language.")
166 ;; GPLv2 or later, with special linking exception.
167 (license license:gpl2+)))
168
169 ;; This is the last version of JamVM that works with a version of GNU
170 ;; classpath that does not require ECJ.
171 (define jamvm-1-bootstrap
172 (package
173 (name "jamvm")
174 (version "1.5.1")
175 (source (origin
176 (method url-fetch)
177 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
178 "JamVM%20" version "/jamvm-"
179 version ".tar.gz"))
180 (patches (search-patches "jamvm-arm.patch"))
181 (sha256
182 (base32
183 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
184 (build-system gnu-build-system)
185 (arguments
186 `(#:configure-flags
187 (list (string-append "--with-classpath-install-dir="
188 (assoc-ref %build-inputs "classpath")))))
189 (inputs
190 `(("classpath" ,classpath-bootstrap)
191 ("jikes" ,jikes)
192 ("zlib" ,zlib)))
193 (home-page "http://jamvm.sourceforge.net/")
194 (synopsis "Small Java Virtual Machine")
195 (description "JamVM is a Java Virtual Machine conforming to the JVM
196 specification edition 2 (blue book). It is extremely small. However, unlike
197 other small VMs it supports the full spec, including object finalisation and
198 JNI.")
199 (license license:gpl2+)))
200
201 (define ant-bootstrap
202 (package
203 (name "ant-bootstrap")
204 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
205 ;; are not supported. The 1.8.x series is the last to use only features
206 ;; supported by Jikes.
207 (version "1.8.4")
208 (source (origin
209 (method url-fetch)
210 (uri (string-append "http://archive.apache.org/dist/"
211 "ant/source/apache-ant-"
212 version "-src.tar.bz2"))
213 (sha256
214 (base32
215 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
216 (build-system gnu-build-system)
217 (arguments
218 `(#:imported-modules ((guix build syscalls)
219 ,@%gnu-build-system-modules)
220 #:modules ((srfi srfi-1)
221 (guix build gnu-build-system)
222 (guix build utils)
223 (guix build syscalls))
224 #:tests? #f ; no "check" target
225 #:phases
226 (modify-phases %standard-phases
227 (delete 'bootstrap)
228 (delete 'configure)
229 (replace 'build
230 (lambda* (#:key inputs #:allow-other-keys)
231 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
232 (setenv "JAVACMD"
233 (string-append (assoc-ref inputs "jamvm")
234 "/bin/jamvm"))
235 (setenv "JAVAC"
236 (string-append (assoc-ref inputs "jikes")
237 "/bin/jikes"))
238 (setenv "CLASSPATH"
239 (string-append (assoc-ref inputs "jamvm")
240 "/lib/rt.jar"))
241
242 ;; Ant complains if this file doesn't exist.
243 (setenv "HOME" "/tmp")
244 (with-output-to-file "/tmp/.ant.properties"
245 (lambda _ (display "")))
246
247 ;; Use jikes instead of javac for <javac ...> tags in build.xml
248 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
249
250 ;; jikes produces lots of warnings, but they are not very
251 ;; interesting, so we silence them.
252 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
253
254 ;; Without these JamVM options the build may freeze.
255 (substitute* "bootstrap.sh"
256 (("^\"\\$\\{JAVACMD\\}\" " m)
257 ,@(if (string-prefix? "armhf" (or (%current-system)
258 (%current-target-system)))
259 `((string-append m "-Xnocompact "))
260 `((string-append m "-Xnocompact -Xnoinlining ")))))
261
262 ;; Disable tests because we are bootstrapping and thus don't have
263 ;; any of the dependencies required to build and run the tests.
264 (substitute* "build.xml"
265 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
266 (invoke "bash" "bootstrap.sh"
267 (string-append "-Ddist.dir="
268 (assoc-ref %outputs "out")))))
269 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
270 (lambda* (#:key outputs #:allow-other-keys)
271 (define (repack-archive jar)
272 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
273 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
274 (with-directory-excursion dir
275 (invoke "unzip" jar))
276 (delete-file jar)
277 ;; XXX: copied from (gnu build install)
278 (for-each (lambda (file)
279 (let ((s (lstat file)))
280 (unless (eq? (stat:type s) 'symlink)
281 (utime file 0 0 0 0))))
282 (find-files dir #:directories? #t))
283 ;; It is important that the manifest appears first.
284 (with-directory-excursion dir
285 (let* ((files (find-files "." ".*" #:directories? #t))
286 ;; To ensure that the reference scanner can
287 ;; detect all store references in the jars
288 ;; we disable compression with the "-0" option.
289 (command (if (file-exists? manifest)
290 `("zip" "-0" "-X" ,jar ,manifest
291 ,@files)
292 `("zip" "-0" "-X" ,jar ,@files))))
293 (apply invoke command)))))
294 (for-each repack-archive
295 (find-files
296 (string-append (assoc-ref %outputs "out") "/lib")
297 "\\.jar$"))
298 #t))
299 (delete 'install))))
300 (native-inputs
301 `(("jikes" ,jikes)
302 ("jamvm" ,jamvm-1-bootstrap)
303 ("unzip" ,unzip)
304 ("zip" ,zip)))
305 (home-page "http://ant.apache.org")
306 (synopsis "Build tool for Java")
307 (description
308 "Ant is a platform-independent build tool for Java. It is similar to
309 make but is implemented using the Java language, requires the Java platform,
310 and is best suited to building Java projects. Ant uses XML to describe the
311 build process and its dependencies, whereas Make uses Makefile format.")
312 (license license:asl2.0)))
313
314 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
315 ;; compiler for Java 1.5.
316 (define ecj-bootstrap
317 (package
318 (name "ecj-bootstrap")
319 (version "3.2.2")
320 (source (origin
321 (method url-fetch)
322 (uri (string-append "http://archive.eclipse.org/eclipse/"
323 "downloads/drops/R-" version
324 "-200702121330/ecjsrc.zip"))
325 (sha256
326 (base32
327 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
328 ;; It would be so much easier if we could use the ant-build-system, but we
329 ;; cannot as we don't have ant at this point. We use ecj for
330 ;; bootstrapping the JDK.
331 (build-system gnu-build-system)
332 (arguments
333 `(#:modules ((guix build gnu-build-system)
334 (guix build utils)
335 (srfi srfi-1))
336 #:tests? #f ; there are no tests
337 #:phases
338 (modify-phases %standard-phases
339 (replace 'configure
340 (lambda* (#:key inputs #:allow-other-keys)
341 (setenv "CLASSPATH"
342 (string-join
343 (cons (string-append (assoc-ref inputs "jamvm")
344 "/lib/rt.jar")
345 (find-files (string-append
346 (assoc-ref inputs "ant-bootstrap")
347 "/lib")
348 "\\.jar$"))
349 ":"))
350 #t))
351 (replace 'build
352 (lambda* (#:key inputs #:allow-other-keys)
353 ;; The unpack phase enters the "org" directory by mistake.
354 (chdir "..")
355
356 ;; Create a simple manifest to make ecj executable.
357 (with-output-to-file "manifest"
358 (lambda _
359 (display "Manifest-Version: 1.0
360 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
361
362 ;; Compile it all!
363 (and (apply invoke "jikes"
364 (find-files "." "\\.java$"))
365 (invoke "fastjar" "cvfm"
366 "ecj-bootstrap.jar" "manifest" "."))))
367 (replace 'install
368 (lambda* (#:key outputs #:allow-other-keys)
369 (let ((share (string-append (assoc-ref outputs "out")
370 "/share/java/")))
371 (mkdir-p share)
372 (install-file "ecj-bootstrap.jar" share)
373 #t))))))
374 (native-inputs
375 `(("ant-bootstrap" ,ant-bootstrap)
376 ("unzip" ,unzip)
377 ("jikes" ,jikes)
378 ("jamvm" ,jamvm-1-bootstrap)
379 ("fastjar" ,fastjar)))
380 (home-page "https://eclipse.org")
381 (synopsis "Eclipse Java development tools core batch compiler")
382 (description "This package provides the Eclipse Java core batch compiler
383 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
384 requirement for all GNU Classpath releases after version 0.93.")
385 (license license:epl1.0)))
386
387 (define ecj-javac-wrapper
388 (package (inherit ecj-bootstrap)
389 (name "ecj-javac-wrapper")
390 (source #f)
391 (build-system trivial-build-system)
392 (arguments
393 `(#:modules ((guix build utils))
394 #:builder
395 (begin
396 (use-modules (guix build utils))
397 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
398 (target (string-append bin "/javac"))
399 (guile (string-append (assoc-ref %build-inputs "guile")
400 "/bin/guile"))
401 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
402 "/share/java/ecj-bootstrap.jar"))
403 (java (string-append (assoc-ref %build-inputs "jamvm")
404 "/bin/jamvm"))
405 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
406 "/share/classpath")))
407 (string-append jvmlib "/glibj.zip:"
408 jvmlib "/tools.zip"))))
409 (mkdir-p bin)
410 (with-output-to-file target
411 (lambda _
412 (format #t "#!~a --no-auto-compile\n!#\n" guile)
413 (write
414 `(begin (use-modules (ice-9 match)
415 (ice-9 receive)
416 (ice-9 hash-table)
417 (srfi srfi-1)
418 (srfi srfi-26))
419 (define defaults
420 '(("-bootclasspath" ,bootcp)
421 ("-source" "1.5")
422 ("-target" "1.5")
423 ("-cp" ".")))
424 (define (main args)
425 (let ((classpath (getenv "CLASSPATH")))
426 (setenv "CLASSPATH"
427 (string-join (list ,ecj
428 ,(string-append (assoc-ref %build-inputs "jamvm")
429 "/lib/rt.jar")
430 (or classpath ""))
431 ":")))
432 (receive (vm-args other-args)
433 ;; Separate VM arguments from arguments to ECJ.
434 (partition (cut string-prefix? "-J" <>)
435 (fold (lambda (default acc)
436 (if (member (first default) acc)
437 acc (append default acc)))
438 args defaults))
439 (apply system* ,java
440 (append
441 ;; Remove "-J" prefix
442 (map (cut string-drop <> 2) vm-args)
443 '("org.eclipse.jdt.internal.compiler.batch.Main")
444 (cons "-nowarn" other-args)))))
445 ;; Entry point
446 (let ((args (cdr (command-line))))
447 (if (null? args)
448 (format (current-error-port) "javac: no arguments given!\n")
449 (main args)))))))
450 (chmod target #o755)
451 #t))))
452 (native-inputs
453 `(("guile" ,guile-2.2)
454 ("ecj-bootstrap" ,ecj-bootstrap)
455 ("jamvm" ,jamvm-1-bootstrap)
456 ("classpath" ,classpath-bootstrap)))
457 (description "This package provides a wrapper around the @dfn{Eclipse
458 compiler for Java} (ecj) with a command line interface that is compatible with
459 the standard javac executable.")))
460
461 ;; The classpath-bootstrap was built without a virtual machine, so it does not
462 ;; provide a wrapper for javah. We cannot build the development version of
463 ;; Classpath without javah.
464 (define classpath-0.99
465 (package (inherit classpath-bootstrap)
466 (version "0.99")
467 (source (origin
468 (method url-fetch)
469 (uri (string-append "mirror://gnu/classpath/classpath-"
470 version ".tar.gz"))
471 (sha256
472 (base32
473 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
474 (patches (search-patches "classpath-aarch64-support.patch"))))
475 (arguments
476 `(#:configure-flags
477 (list (string-append "--with-ecj-jar="
478 (assoc-ref %build-inputs "ecj-bootstrap")
479 "/share/java/ecj-bootstrap.jar")
480 (string-append "JAVAC="
481 (assoc-ref %build-inputs "ecj-javac-wrapper")
482 "/bin/javac")
483 (string-append "JAVA="
484 (assoc-ref %build-inputs "jamvm")
485 "/bin/jamvm")
486 "GCJ_JAVAC_TRUE=no"
487 "ac_cv_prog_java_works=yes" ; trust me
488 "--disable-Werror"
489 "--disable-gmp"
490 "--disable-gtk-peer"
491 "--disable-gconf-peer"
492 "--disable-plugin"
493 "--disable-dssi"
494 "--disable-alsa"
495 "--disable-gjdoc")
496 #:phases
497 (modify-phases %standard-phases
498 (add-after 'install 'install-data
499 (lambda _ (invoke "make" "install-data"))))))
500 (native-inputs
501 `(("ecj-bootstrap" ,ecj-bootstrap)
502 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
503 ("fastjar" ,fastjar)
504 ("jamvm" ,jamvm-1-bootstrap)
505 ("classpath" ,classpath-bootstrap)
506 ("libltdl" ,libltdl)
507 ("pkg-config" ,pkg-config)))))
508
509 ;; We need this because classpath-bootstrap does not provide all of the tools
510 ;; we need to build classpath-devel.
511 (define classpath-jamvm-wrappers
512 (package (inherit classpath-0.99)
513 (name "classpath-jamvm-wrappers")
514 (source #f)
515 (build-system trivial-build-system)
516 (arguments
517 `(#:modules ((guix build utils))
518 #:builder
519 (begin
520 (use-modules (guix build utils))
521 (let* ((bash (assoc-ref %build-inputs "bash"))
522 (jamvm (assoc-ref %build-inputs "jamvm"))
523 (classpath (assoc-ref %build-inputs "classpath"))
524 (bin (string-append (assoc-ref %outputs "out")
525 "/bin/")))
526 (mkdir-p bin)
527 (for-each (lambda (tool)
528 (with-output-to-file (string-append bin tool)
529 (lambda _
530 ,@(if (string-prefix? "armhf" (or (%current-system)
531 (%current-target-system)))
532 `((format #t "#!~a/bin/sh
533 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
534 gnu.classpath.tools.~a.~a $@"
535 bash jamvm classpath tool
536 (if (string=? "native2ascii" tool)
537 "Native2ASCII" "Main")))
538 `((format #t "#!~a/bin/sh
539 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
540 gnu.classpath.tools.~a.~a $@"
541 bash jamvm classpath tool
542 (if (string=? "native2ascii" tool)
543 "Native2ASCII" "Main"))))))
544 (chmod (string-append bin tool) #o755))
545 (list "javah"
546 "rmic"
547 "rmid"
548 "orbd"
549 "rmiregistry"
550 "native2ascii"))
551 #t))))
552 (native-inputs
553 `(("bash" ,bash)
554 ("jamvm" ,jamvm-1-bootstrap)
555 ("classpath" ,classpath-0.99)))
556 (inputs '())
557 (synopsis "Executables from GNU Classpath")
558 (description "This package provides wrappers around the tools provided by
559 the GNU Classpath library. They are executed by the JamVM virtual
560 machine.")))
561
562 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
563 ;; then Classpath has gained much more support for Java 1.6.
564 (define-public classpath-devel
565 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
566 (revision "1"))
567 (package (inherit classpath-bootstrap)
568 (version (string-append "0.99-" revision "." (string-take commit 9)))
569 (source (origin
570 (method git-fetch)
571 (uri (git-reference
572 (url "https://git.savannah.gnu.org/git/classpath.git")
573 (commit commit)))
574 (file-name (string-append "classpath-" version "-checkout"))
575 (sha256
576 (base32
577 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
578 (arguments
579 `(#:make-flags
580 ;; Ensure that the initial heap size is smaller than the maximum
581 ;; size. By default only Xmx is set, which can lead to invalid
582 ;; memory settings on some machines with a lot of memory.
583 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
584 #:configure-flags
585 (list (string-append "--with-ecj-jar="
586 (assoc-ref %build-inputs "ecj-bootstrap")
587 "/share/java/ecj-bootstrap.jar")
588 (string-append "--with-javac="
589 (assoc-ref %build-inputs "ecj-javac-wrapper")
590 "/bin/javac")
591 (string-append "JAVA="
592 (assoc-ref %build-inputs "jamvm")
593 "/bin/jamvm")
594 "GCJ_JAVAC_TRUE=no"
595 "ac_cv_prog_java_works=yes" ; trust me
596 "--disable-Werror"
597 "--disable-gmp"
598 "--disable-gtk-peer"
599 "--disable-gconf-peer"
600 "--disable-plugin"
601 "--disable-dssi"
602 "--disable-alsa"
603 "--disable-gjdoc")
604 #:phases
605 (modify-phases %standard-phases
606 ;; XXX The bootstrap phase executes autogen.sh, which fails after
607 ;; complaining about the lack of gettext.
608 (replace 'bootstrap
609 (lambda _ (invoke "autoreconf" "-vif")))
610 (add-after 'unpack 'remove-unsupported-annotations
611 (lambda _
612 (substitute* (find-files "java" "\\.java$")
613 (("@Override") ""))
614 #t))
615 (add-after 'install 'install-data
616 (lambda _ (invoke "make" "install-data"))))))
617 (native-inputs
618 `(("autoconf" ,autoconf)
619 ("automake" ,automake)
620 ("libtool" ,libtool)
621 ("gettext" ,gettext-minimal)
622 ("texinfo" ,texinfo)
623 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
624 ("ecj-bootstrap" ,ecj-bootstrap)
625 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
626 ("fastjar" ,fastjar)
627 ("jamvm" ,jamvm-1-bootstrap)
628 ("libltdl" ,libltdl)
629 ("pkg-config" ,pkg-config))))))
630
631 (define jamvm
632 (package (inherit jamvm-1-bootstrap)
633 (version "2.0.0")
634 (source (origin
635 (method url-fetch)
636 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
637 "JamVM%20" version "/jamvm-"
638 version ".tar.gz"))
639 (sha256
640 (base32
641 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
642 (build-system gnu-build-system)
643 (arguments
644 `(#:configure-flags
645 (list (string-append "--with-classpath-install-dir="
646 (assoc-ref %build-inputs "classpath")))))
647 (inputs
648 `(("classpath" ,classpath-devel)
649 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
650 ("zlib" ,zlib)))))
651
652 (define ecj-javac-wrapper-final
653 (package (inherit ecj-javac-wrapper)
654 (native-inputs
655 `(("guile" ,guile-2.2)
656 ("ecj-bootstrap" ,ecj-bootstrap)
657 ("jamvm" ,jamvm)
658 ("classpath" ,classpath-devel)))))
659
660 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
661 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
662 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
663 ;; which uses Java 6 only.
664 (define-public icedtea-6
665 (package
666 (name "icedtea")
667 (version "1.13.13")
668 (source (origin
669 (method url-fetch)
670 (uri (string-append
671 "http://icedtea.wildebeest.org/download/source/icedtea6-"
672 version ".tar.xz"))
673 (sha256
674 (base32
675 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
676 (modules '((guix build utils)))
677 (snippet
678 '(begin
679 (substitute* "Makefile.in"
680 ;; do not leak information about the build host
681 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
682 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
683 #t))))
684 (build-system gnu-build-system)
685 (outputs '("out" ; Java Runtime Environment
686 "jdk" ; Java Development Kit
687 "doc")) ; all documentation
688 (arguments
689 `(;; There are many failing tests and many are known to fail upstream.
690 #:tests? #f
691
692 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
693 ;; gremlin) doesn't support it yet, so skip this phase.
694 #:validate-runpath? #f
695
696 #:modules ((guix build utils)
697 (guix build gnu-build-system)
698 (srfi srfi-19))
699
700 #:configure-flags
701 `("--enable-bootstrap"
702 "--enable-nss"
703 "--without-rhino"
704 "--with-parallel-jobs"
705 "--disable-downloading"
706 "--disable-tests"
707 ,(string-append "--with-ecj="
708 (assoc-ref %build-inputs "ecj")
709 "/share/java/ecj-bootstrap.jar")
710 ,(string-append "--with-jar="
711 (assoc-ref %build-inputs "fastjar")
712 "/bin/fastjar")
713 ,(string-append "--with-jdk-home="
714 (assoc-ref %build-inputs "classpath"))
715 ,(string-append "--with-java="
716 (assoc-ref %build-inputs "jamvm")
717 "/bin/jamvm"))
718 #:phases
719 (modify-phases %standard-phases
720 (replace 'unpack
721 (lambda* (#:key source inputs #:allow-other-keys)
722 (invoke "tar" "xvf" source)
723 (chdir (string-append "icedtea6-" ,version))
724 (mkdir "openjdk")
725 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
726 ;; The convenient OpenJDK source bundle is no longer
727 ;; available for download, so we have to take the sources
728 ;; from the Mercurial repositories and change the Makefile
729 ;; to avoid tests for the OpenJDK zip archive.
730 (with-directory-excursion "openjdk"
731 (for-each (lambda (part)
732 (mkdir part)
733 (copy-recursively
734 (assoc-ref inputs
735 (string-append part "-src"))
736 part))
737 '("jdk" "corba"
738 "langtools" "jaxp" "jaxws")))
739 (with-directory-excursion "openjdk"
740 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
741 (rename-file "hg-checkout" "hotspot"))
742 (substitute* "Makefile.in"
743 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
744 "echo \"trust me\";")
745 ;; The contents of the bootstrap directory must be
746 ;; writeable but when copying from the store they are
747 ;; not.
748 (("mkdir -p lib/rt" line)
749 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
750 (invoke "chmod" "-R" "u+w" "openjdk")))
751 (add-after 'unpack 'use-classpath
752 (lambda* (#:key inputs #:allow-other-keys)
753 (let ((jvmlib (assoc-ref inputs "classpath"))
754 (jamvm (assoc-ref inputs "jamvm")))
755 ;; Classpath does not provide rt.jar.
756 (substitute* "Makefile.in"
757 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
758 (string-append jvmlib "/share/classpath/glibj.zip")))
759 ;; Make sure we can find all classes.
760 (setenv "CLASSPATH"
761 (string-append jvmlib "/share/classpath/glibj.zip:"
762 jvmlib "/share/classpath/tools.zip:"
763 jamvm "/lib/rt.jar"))
764 (setenv "JAVACFLAGS"
765 (string-append "-cp "
766 jvmlib "/share/classpath/glibj.zip:"
767 jvmlib "/share/classpath/tools.zip")))
768 #t))
769 (add-after 'unpack 'patch-patches
770 (lambda _
771 ;; shebang in patches so that they apply cleanly
772 (substitute* '("patches/jtreg-jrunscript.patch"
773 "patches/hotspot/hs23/drop_unlicensed_test.patch")
774 (("#!/bin/sh") (string-append "#!" (which "sh"))))
775 #t))
776 (add-after 'unpack 'patch-paths
777 (lambda* (#:key inputs #:allow-other-keys)
778 ;; buildtree.make generates shell scripts, so we need to replace
779 ;; the generated shebang
780 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
781 (("/bin/sh") (which "bash")))
782
783 (let ((corebin (string-append
784 (assoc-ref inputs "coreutils") "/bin/"))
785 (binbin (string-append
786 (assoc-ref inputs "binutils") "/bin/"))
787 (grepbin (string-append
788 (assoc-ref inputs "grep") "/bin/")))
789 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
790 "openjdk/corba/make/common/shared/Defs-linux.gmk")
791 (("UNIXCOMMAND_PATH = /bin/")
792 (string-append "UNIXCOMMAND_PATH = " corebin))
793 (("USRBIN_PATH = /usr/bin/")
794 (string-append "USRBIN_PATH = " corebin))
795 (("DEVTOOLS_PATH *= */usr/bin/")
796 (string-append "DEVTOOLS_PATH = " corebin))
797 (("COMPILER_PATH *= */usr/bin/")
798 (string-append "COMPILER_PATH = "
799 (assoc-ref inputs "gcc") "/bin/"))
800 (("DEF_OBJCOPY *=.*objcopy")
801 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
802
803 ;; fix path to alsa header
804 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
805 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
806 (string-append "ALSA_INCLUDE="
807 (assoc-ref inputs "alsa-lib")
808 "/include/alsa/version.h")))
809
810 ;; fix hard-coded utility paths
811 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
812 "openjdk/corba/make/common/shared/Defs-utils.gmk")
813 (("ECHO *=.*echo")
814 (string-append "ECHO = " (which "echo")))
815 (("^GREP *=.*grep")
816 (string-append "GREP = " (which "grep")))
817 (("EGREP *=.*egrep")
818 (string-append "EGREP = " (which "egrep")))
819 (("CPIO *=.*cpio")
820 (string-append "CPIO = " (which "cpio")))
821 (("READELF *=.*readelf")
822 (string-append "READELF = " (which "readelf")))
823 (("^ *AR *=.*ar")
824 (string-append "AR = " (which "ar")))
825 (("^ *TAR *=.*tar")
826 (string-append "TAR = " (which "tar")))
827 (("AS *=.*as")
828 (string-append "AS = " (which "as")))
829 (("LD *=.*ld")
830 (string-append "LD = " (which "ld")))
831 (("STRIP *=.*strip")
832 (string-append "STRIP = " (which "strip")))
833 (("NM *=.*nm")
834 (string-append "NM = " (which "nm")))
835 (("^SH *=.*sh")
836 (string-append "SH = " (which "bash")))
837 (("^FIND *=.*find")
838 (string-append "FIND = " (which "find")))
839 (("LDD *=.*ldd")
840 (string-append "LDD = " (which "ldd")))
841 (("NAWK *=.*(n|g)awk")
842 (string-append "NAWK = " (which "gawk")))
843 (("XARGS *=.*xargs")
844 (string-append "XARGS = " (which "xargs")))
845 (("UNZIP *=.*unzip")
846 (string-append "UNZIP = " (which "unzip")))
847 (("ZIPEXE *=.*zip")
848 (string-append "ZIPEXE = " (which "zip")))
849 (("SED *=.*sed")
850 (string-append "SED = " (which "sed"))))
851
852 ;; Some of these timestamps cause problems as they are more than
853 ;; 10 years ago, failing the build process.
854 (substitute*
855 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
856 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
857 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
858 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
859 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
860 #t)))
861 (add-before 'configure 'set-additional-paths
862 (lambda* (#:key inputs #:allow-other-keys)
863 (setenv "CPATH"
864 (string-append (assoc-ref inputs "libxrender")
865 "/include/X11/extensions" ":"
866 (assoc-ref inputs "libxtst")
867 "/include/X11/extensions" ":"
868 (assoc-ref inputs "libxinerama")
869 "/include/X11/extensions" ":"
870 (or (getenv "CPATH") "")))
871 (setenv "ALT_CUPS_HEADERS_PATH"
872 (string-append (assoc-ref inputs "cups")
873 "/include"))
874 (setenv "ALT_FREETYPE_HEADERS_PATH"
875 (string-append (assoc-ref inputs "freetype")
876 "/include"))
877 (setenv "ALT_FREETYPE_LIB_PATH"
878 (string-append (assoc-ref inputs "freetype")
879 "/lib"))
880 #t))
881 (replace 'install
882 (lambda* (#:key outputs #:allow-other-keys)
883 (let ((doc (string-append (assoc-ref outputs "doc")
884 "/share/doc/icedtea"))
885 (jre (assoc-ref outputs "out"))
886 (jdk (assoc-ref outputs "jdk")))
887 (copy-recursively "openjdk.build/docs" doc)
888 (copy-recursively "openjdk.build/j2re-image" jre)
889 (copy-recursively "openjdk.build/j2sdk-image" jdk))
890 #t)))))
891 (native-inputs
892 `(("ant" ,ant-bootstrap)
893 ("alsa-lib" ,alsa-lib)
894 ("attr" ,attr)
895 ("classpath" ,classpath-devel)
896 ("coreutils" ,coreutils)
897 ("cpio" ,cpio)
898 ("cups" ,cups)
899 ("ecj" ,ecj-bootstrap)
900 ("ecj-javac" ,ecj-javac-wrapper-final)
901 ("fastjar" ,fastjar)
902 ("fontconfig" ,fontconfig)
903 ("freetype" ,freetype)
904 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
905 ("gtk" ,gtk+-2)
906 ("gawk" ,gawk)
907 ("giflib" ,giflib)
908 ("grep" ,grep)
909 ("jamvm" ,jamvm)
910 ("lcms" ,lcms)
911 ("libjpeg" ,libjpeg)
912 ("libnsl" ,libnsl)
913 ("libpng" ,libpng)
914 ("libtool" ,libtool)
915 ("libx11" ,libx11)
916 ("libxcomposite" ,libxcomposite)
917 ("libxi" ,libxi)
918 ("libxinerama" ,libxinerama)
919 ("libxrender" ,libxrender)
920 ("libxslt" ,libxslt) ;for xsltproc
921 ("libxt" ,libxt)
922 ("libxtst" ,libxtst)
923 ("mit-krb5" ,mit-krb5)
924 ("nss" ,nss)
925 ("nss-certs" ,nss-certs)
926 ("perl" ,perl)
927 ("pkg-config" ,pkg-config)
928 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
929 ("unzip" ,unzip)
930 ("wget" ,wget)
931 ("which" ,which)
932 ("zip" ,zip)
933 ("zlib" ,zlib)
934 ("openjdk-src"
935 ,(origin
936 (method hg-fetch)
937 (uri (hg-reference
938 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
939 (changeset "jdk6-b41")))
940 (sha256
941 (base32
942 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
943 ("jdk-src"
944 ,(origin
945 (method hg-fetch)
946 (uri (hg-reference
947 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
948 (changeset "jdk6-b41")))
949 (sha256
950 (base32
951 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
952 ("hotspot-src"
953 ,(origin
954 (method hg-fetch)
955 (uri (hg-reference
956 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
957 (changeset "jdk6-b41")))
958 (sha256
959 (base32
960 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
961 (patches
962 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
963 ("corba-src"
964 ,(origin
965 (method hg-fetch)
966 (uri (hg-reference
967 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
968 (changeset "jdk6-b41")))
969 (sha256
970 (base32
971 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
972 ("langtools-src"
973 ,(origin
974 (method hg-fetch)
975 (uri (hg-reference
976 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
977 (changeset "jdk6-b41")))
978 (sha256
979 (base32
980 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
981 ("jaxp-src"
982 ,(origin
983 (method hg-fetch)
984 (uri (hg-reference
985 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
986 (changeset "jdk6-b41")))
987 (sha256
988 (base32
989 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
990 ("jaxws-src"
991 ,(origin
992 (method hg-fetch)
993 (uri (hg-reference
994 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
995 (changeset "jdk6-b41")))
996 (sha256
997 (base32
998 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
999 (home-page "http://icedtea.classpath.org")
1000 (synopsis "Java development kit")
1001 (description
1002 "This package provides the OpenJDK built with the IcedTea build harness.
1003 This version of the OpenJDK is no longer maintained and is only used for
1004 bootstrapping purposes.")
1005 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1006 ;; same license as both GNU Classpath and OpenJDK.
1007 (license license:gpl2+)))
1008
1009 (define-public icedtea-7
1010 (let* ((version "2.6.13")
1011 (drop (lambda (name hash)
1012 (origin
1013 (method url-fetch)
1014 (uri (string-append
1015 "http://icedtea.classpath.org/download/drops"
1016 "/icedtea7/" version "/" name ".tar.bz2"))
1017 (sha256 (base32 hash))))))
1018 (package
1019 (name "icedtea")
1020 (version version)
1021 (source (origin
1022 (method url-fetch)
1023 (uri (string-append
1024 "http://icedtea.wildebeest.org/download/source/icedtea-"
1025 version ".tar.xz"))
1026 (sha256
1027 (base32
1028 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1029 (modules '((guix build utils)))
1030 (snippet
1031 '(begin
1032 (substitute* "Makefile.in"
1033 ;; do not leak information about the build host
1034 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1035 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1036 #t))))
1037 (build-system gnu-build-system)
1038 (outputs '("out" ; Java Runtime Environment
1039 "jdk" ; Java Development Kit
1040 "doc")) ; all documentation
1041 (arguments
1042 `(;; There are many test failures. Some are known to
1043 ;; fail upstream, others relate to not having an X
1044 ;; server running at test time, yet others are a
1045 ;; complete mystery to me.
1046
1047 ;; hotspot: passed: 241; failed: 45; error: 2
1048 ;; langtools: passed: 1,934; failed: 26
1049 ;; jdk: unknown
1050 #:tests? #f
1051
1052 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1053 ;; gremlin) doesn't support it yet, so skip this phase.
1054 #:validate-runpath? #f
1055
1056 ;; Apparently, the C locale is needed for some of the tests.
1057 #:locale "C"
1058
1059 #:modules ((guix build utils)
1060 (guix build gnu-build-system)
1061 (ice-9 match)
1062 (ice-9 popen)
1063 (srfi srfi-19)
1064 (srfi srfi-26))
1065
1066 #:configure-flags
1067 ;; TODO: package pcsc and sctp, and add to inputs
1068 `("--disable-system-pcsc"
1069 "--disable-system-sctp"
1070 "--enable-bootstrap"
1071 "--enable-nss"
1072 "--without-rhino"
1073 "--disable-downloading"
1074 "--disable-tests" ;they are run in the check phase instead
1075 "--with-openjdk-src-dir=./openjdk.src"
1076 ,(string-append "--with-jdk-home="
1077 (assoc-ref %build-inputs "jdk")))
1078
1079 #:phases
1080 (modify-phases %standard-phases
1081 (replace 'unpack
1082 (lambda* (#:key source inputs #:allow-other-keys)
1083 (let ((target (string-append "icedtea-" ,version))
1084 (unpack (lambda* (name #:optional dir)
1085 (let ((dir (or dir
1086 (string-drop-right name 5))))
1087 (mkdir dir)
1088 (invoke "tar" "xvf"
1089 (assoc-ref inputs name)
1090 "-C" dir
1091 "--strip-components=1")))))
1092 (mkdir target)
1093 (invoke "tar" "xvf" source
1094 "-C" target "--strip-components=1")
1095 (chdir target)
1096 (unpack "openjdk-src" "openjdk.src")
1097 (with-directory-excursion "openjdk.src"
1098 (for-each unpack
1099 (filter (cut string-suffix? "-drop" <>)
1100 (map (match-lambda
1101 ((name . _) name))
1102 inputs))))
1103 #t)))
1104 (add-after 'unpack 'fix-x11-extension-include-path
1105 (lambda* (#:key inputs #:allow-other-keys)
1106 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1107 (((string-append "\\$\\(firstword \\$\\(wildcard "
1108 "\\$\\(OPENWIN_HOME\\)"
1109 "/include/X11/extensions\\).*$"))
1110 (string-append (assoc-ref inputs "libxrender")
1111 "/include/X11/extensions"
1112 " -I" (assoc-ref inputs "libxtst")
1113 "/include/X11/extensions"
1114 " -I" (assoc-ref inputs "libxinerama")
1115 "/include/X11/extensions"))
1116 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1117 #t))
1118 (add-after 'unpack 'patch-paths
1119 (lambda _
1120 ;; buildtree.make generates shell scripts, so we need to replace
1121 ;; the generated shebang
1122 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1123 (("/bin/sh") (which "bash")))
1124
1125 (let ((corebin (string-append
1126 (assoc-ref %build-inputs "coreutils") "/bin/"))
1127 (binbin (string-append
1128 (assoc-ref %build-inputs "binutils") "/bin/"))
1129 (grepbin (string-append
1130 (assoc-ref %build-inputs "grep") "/bin/")))
1131 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1132 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1133 (("UNIXCOMMAND_PATH = /bin/")
1134 (string-append "UNIXCOMMAND_PATH = " corebin))
1135 (("USRBIN_PATH = /usr/bin/")
1136 (string-append "USRBIN_PATH = " corebin))
1137 (("DEVTOOLS_PATH *= */usr/bin/")
1138 (string-append "DEVTOOLS_PATH = " corebin))
1139 (("COMPILER_PATH *= */usr/bin/")
1140 (string-append "COMPILER_PATH = "
1141 (assoc-ref %build-inputs "gcc") "/bin/"))
1142 (("DEF_OBJCOPY *=.*objcopy")
1143 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1144
1145 ;; fix path to alsa header
1146 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1147 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1148 (string-append "ALSA_INCLUDE="
1149 (assoc-ref %build-inputs "alsa-lib")
1150 "/include/alsa/version.h")))
1151
1152 ;; fix hard-coded utility paths
1153 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1154 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1155 (("ECHO *=.*echo")
1156 (string-append "ECHO = " (which "echo")))
1157 (("^GREP *=.*grep")
1158 (string-append "GREP = " (which "grep")))
1159 (("EGREP *=.*egrep")
1160 (string-append "EGREP = " (which "egrep")))
1161 (("CPIO *=.*cpio")
1162 (string-append "CPIO = " (which "cpio")))
1163 (("READELF *=.*readelf")
1164 (string-append "READELF = " (which "readelf")))
1165 (("^ *AR *=.*ar")
1166 (string-append "AR = " (which "ar")))
1167 (("^ *TAR *=.*tar")
1168 (string-append "TAR = " (which "tar")))
1169 (("AS *=.*as")
1170 (string-append "AS = " (which "as")))
1171 (("LD *=.*ld")
1172 (string-append "LD = " (which "ld")))
1173 (("STRIP *=.*strip")
1174 (string-append "STRIP = " (which "strip")))
1175 (("NM *=.*nm")
1176 (string-append "NM = " (which "nm")))
1177 (("^SH *=.*sh")
1178 (string-append "SH = " (which "bash")))
1179 (("^FIND *=.*find")
1180 (string-append "FIND = " (which "find")))
1181 (("LDD *=.*ldd")
1182 (string-append "LDD = " (which "ldd")))
1183 (("NAWK *=.*(n|g)awk")
1184 (string-append "NAWK = " (which "gawk")))
1185 (("XARGS *=.*xargs")
1186 (string-append "XARGS = " (which "xargs")))
1187 (("UNZIP *=.*unzip")
1188 (string-append "UNZIP = " (which "unzip")))
1189 (("ZIPEXE *=.*zip")
1190 (string-append "ZIPEXE = " (which "zip")))
1191 (("SED *=.*sed")
1192 (string-append "SED = " (which "sed"))))
1193
1194 ;; Some of these timestamps cause problems as they are more than
1195 ;; 10 years ago, failing the build process.
1196 (substitute*
1197 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1198 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1199 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1200 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1201 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1202 #t))
1203 (add-before 'configure 'set-additional-paths
1204 (lambda* (#:key inputs #:allow-other-keys)
1205 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1206 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1207 (string-append "ALSA_INCLUDE="
1208 (assoc-ref inputs "alsa-lib")
1209 "/include/alsa/version.h")))
1210 (setenv "CC" "gcc")
1211 (setenv "CPATH"
1212 (string-append (assoc-ref inputs "libxcomposite")
1213 "/include/X11/extensions" ":"
1214 (assoc-ref inputs "libxrender")
1215 "/include/X11/extensions" ":"
1216 (assoc-ref inputs "libxtst")
1217 "/include/X11/extensions" ":"
1218 (assoc-ref inputs "libxinerama")
1219 "/include/X11/extensions" ":"
1220 (or (getenv "CPATH") "")))
1221 (setenv "ALT_OBJCOPY" (which "objcopy"))
1222 (setenv "ALT_CUPS_HEADERS_PATH"
1223 (string-append (assoc-ref inputs "cups")
1224 "/include"))
1225 (setenv "ALT_FREETYPE_HEADERS_PATH"
1226 (string-append (assoc-ref inputs "freetype")
1227 "/include"))
1228 (setenv "ALT_FREETYPE_LIB_PATH"
1229 (string-append (assoc-ref inputs "freetype")
1230 "/lib"))
1231 #t))
1232 (add-before 'check 'fix-test-framework
1233 (lambda _
1234 ;; Fix PATH in test environment
1235 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1236 (("PATH=/bin:/usr/bin")
1237 (string-append "PATH=" (getenv "PATH"))))
1238 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1239 (("/usr/bin/env") (which "env")))
1240 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1241 (("/bin/rm") (which "rm"))
1242 (("/bin/cp") (which "cp"))
1243 (("/bin/mv") (which "mv")))
1244 #t))
1245 (add-before 'check 'fix-hotspot-tests
1246 (lambda _
1247 (with-directory-excursion "openjdk.src/hotspot/test/"
1248 (substitute* "jprt.config"
1249 (("PATH=\"\\$\\{path4sdk\\}\"")
1250 (string-append "PATH=" (getenv "PATH")))
1251 (("make=/usr/bin/make")
1252 (string-append "make=" (which "make"))))
1253 (substitute* '("runtime/6626217/Test6626217.sh"
1254 "runtime/7110720/Test7110720.sh")
1255 (("/bin/rm") (which "rm"))
1256 (("/bin/cp") (which "cp"))
1257 (("/bin/mv") (which "mv"))))
1258 #t))
1259 (add-before 'check 'fix-jdk-tests
1260 (lambda _
1261 (with-directory-excursion "openjdk.src/jdk/test/"
1262 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1263 (("/bin/pwd") (which "pwd")))
1264 (substitute* "com/sun/jdi/ShellScaffold.sh"
1265 (("/bin/kill") (which "kill")))
1266 (substitute* "start-Xvfb.sh"
1267 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1268 (("/usr/bin/nohup") (which "nohup")))
1269 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1270 (("/bin/rm") (which "rm")))
1271 (substitute* "tools/launcher/MultipleJRE.sh"
1272 (("echo \"#!/bin/sh\"")
1273 (string-append "echo \"#!" (which "rm") "\""))
1274 (("/usr/bin/zip") (which "zip")))
1275 (substitute* "com/sun/jdi/OnThrowTest.java"
1276 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1277 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1278 (("/usr/bin/uptime") (which "uptime")))
1279 (substitute* "java/lang/ProcessBuilder/Basic.java"
1280 (("/usr/bin/env") (which "env"))
1281 (("/bin/false") (which "false"))
1282 (("/bin/true") (which "true"))
1283 (("/bin/cp") (which "cp"))
1284 (("/bin/sh") (which "sh")))
1285 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1286 (("/bin/sh") (which "sh")))
1287 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1288 (("/usr/bin/perl") (which "perl"))
1289 (("/bin/ps") (which "ps"))
1290 (("/bin/true") (which "true")))
1291 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1292 (("/usr/bin/tee") (which "tee")))
1293 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1294 (("/bin/true") (which "true")))
1295 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1296 (("/bin/cat") (which "cat")))
1297 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1298 (("/bin/sh") (which "sh"))
1299 (("/bin/true") (which "true"))
1300 (("/bin/kill") (which "kill")))
1301 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1302 (("/usr/bin/echo") (which "echo")))
1303 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1304 (("/usr/bin/cat") (which "cat")))
1305 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1306 (("/bin/cat") (which "cat"))
1307 (("/bin/sleep") (which "sleep"))
1308 (("/bin/sh") (which "sh")))
1309 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1310 (("/bin/cat") (which "cat")))
1311 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1312 (("/bin/chmod") (which "chmod")))
1313 (substitute* "java/util/zip/ZipFile/Assortment.java"
1314 (("/bin/sh") (which "sh"))))
1315 #t))
1316 (replace 'check
1317 (lambda _
1318 ;; The "make check-*" targets always return zero, so we need to
1319 ;; check for errors in the associated log files to determine
1320 ;; whether any tests have failed.
1321 (use-modules (ice-9 rdelim))
1322 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1323 (checker (lambda (port)
1324 (let loop ()
1325 (let ((line (read-line port)))
1326 (cond
1327 ((eof-object? line) #t)
1328 ((regexp-exec error-pattern line)
1329 (error "test failed"))
1330 (else (loop)))))))
1331 (run-test (lambda (test)
1332 (invoke "make" test)
1333 (call-with-input-file
1334 (string-append "test/" test ".log")
1335 checker))))
1336 (when #f ; skip tests
1337 (run-test "check-hotspot")
1338 (run-test "check-langtools")
1339 (run-test "check-jdk"))
1340 #t)))
1341 (replace 'install
1342 (lambda* (#:key outputs #:allow-other-keys)
1343 (let ((doc (string-append (assoc-ref outputs "doc")
1344 "/share/doc/icedtea"))
1345 (jre (assoc-ref outputs "out"))
1346 (jdk (assoc-ref outputs "jdk")))
1347 (copy-recursively "openjdk.build/docs" doc)
1348 (copy-recursively "openjdk.build/j2re-image" jre)
1349 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1350 #t))
1351 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1352 ;; But that shared object is located in the server/ folder, so it
1353 ;; cannot be found. This phase creates a symbolic link in the
1354 ;; lib/amd64 folder so that the other libraries can find it.
1355 ;;
1356 ;; See:
1357 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1358 ;;
1359 ;; FIXME: Find the bug in the build system, so that this symlink is
1360 ;; not needed.
1361 (add-after 'install 'install-libjvm
1362 (lambda* (#:key inputs outputs #:allow-other-keys)
1363 (let* ((lib-path (string-append (assoc-ref outputs "out")
1364 "/lib/amd64")))
1365 (symlink (string-append lib-path "/server/libjvm.so")
1366 (string-append lib-path "/libjvm.so")))
1367 #t))
1368 ;; By default IcedTea only generates an empty keystore. In order to
1369 ;; be able to use certificates in Java programs we need to generate a
1370 ;; keystore from a set of certificates. For convenience we use the
1371 ;; certificates from the nss-certs package.
1372 (add-after 'install 'install-keystore
1373 (lambda* (#:key inputs outputs #:allow-other-keys)
1374 (let* ((keystore "cacerts")
1375 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1376 "/etc/ssl/certs"))
1377 (keytool (string-append (assoc-ref outputs "jdk")
1378 "/bin/keytool")))
1379 (define (extract-cert file target)
1380 (call-with-input-file file
1381 (lambda (in)
1382 (call-with-output-file target
1383 (lambda (out)
1384 (let loop ((line (read-line in 'concat))
1385 (copying? #f))
1386 (cond
1387 ((eof-object? line) #t)
1388 ((string-prefix? "-----BEGIN" line)
1389 (display line out)
1390 (loop (read-line in 'concat) #t))
1391 ((string-prefix? "-----END" line)
1392 (display line out)
1393 #t)
1394 (else
1395 (when copying? (display line out))
1396 (loop (read-line in 'concat) copying?)))))))))
1397 (define (import-cert cert)
1398 (format #t "Importing certificate ~a\n" (basename cert))
1399 (let ((temp "tmpcert"))
1400 (extract-cert cert temp)
1401 (let ((port (open-pipe* OPEN_WRITE keytool
1402 "-import"
1403 "-alias" (basename cert)
1404 "-keystore" keystore
1405 "-storepass" "changeit"
1406 "-file" temp)))
1407 (display "yes\n" port)
1408 (when (not (zero? (status:exit-val (close-pipe port))))
1409 (format #t "failed to import ~a\n" cert)))
1410 (delete-file temp)))
1411
1412 ;; This is necessary because the certificate directory contains
1413 ;; files with non-ASCII characters in their names.
1414 (setlocale LC_ALL "en_US.utf8")
1415 (setenv "LC_ALL" "en_US.utf8")
1416
1417 (for-each import-cert (find-files certs-dir "\\.pem$"))
1418 (mkdir-p (string-append (assoc-ref outputs "out")
1419 "/lib/security"))
1420 (mkdir-p (string-append (assoc-ref outputs "jdk")
1421 "/jre/lib/security"))
1422
1423 ;; The cacerts files we are going to overwrite are chmod'ed as
1424 ;; read-only (444) in icedtea-8 (which derives from this
1425 ;; package). We have to change this so we can overwrite them.
1426 (chmod (string-append (assoc-ref outputs "out")
1427 "/lib/security/" keystore) #o644)
1428 (chmod (string-append (assoc-ref outputs "jdk")
1429 "/jre/lib/security/" keystore) #o644)
1430
1431 (install-file keystore
1432 (string-append (assoc-ref outputs "out")
1433 "/lib/security"))
1434 (install-file keystore
1435 (string-append (assoc-ref outputs "jdk")
1436 "/jre/lib/security"))
1437 #t))))))
1438 (native-inputs
1439 `(("openjdk-src"
1440 ,(drop "openjdk"
1441 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1442 ("corba-drop"
1443 ,(drop "corba"
1444 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1445 ("jaxp-drop"
1446 ,(drop "jaxp"
1447 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1448 ("jaxws-drop"
1449 ,(drop "jaxws"
1450 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1451 ("jdk-drop"
1452 ,(drop "jdk"
1453 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1454 ("langtools-drop"
1455 ,(drop "langtools"
1456 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1457 ("hotspot-drop"
1458 ,(origin
1459 (method url-fetch)
1460 (uri (string-append
1461 "http://icedtea.classpath.org/downloads/drops"
1462 "/icedtea7/" version "/hotspot.tar.bz2"))
1463 (sha256
1464 (base32
1465 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1466 (patches (search-patches
1467 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1468 ("ant" ,ant-bootstrap)
1469 ("attr" ,attr)
1470 ("coreutils" ,coreutils)
1471 ("diffutils" ,diffutils) ;for tests
1472 ("gawk" ,gawk)
1473 ("grep" ,grep)
1474 ("libtool" ,libtool)
1475 ("pkg-config" ,pkg-config)
1476 ("wget" ,wget)
1477 ("which" ,which)
1478 ("cpio" ,cpio)
1479 ("zip" ,zip)
1480 ("unzip" ,unzip)
1481 ("fastjar" ,fastjar)
1482 ("libxslt" ,libxslt) ;for xsltproc
1483 ("nss-certs" ,nss-certs)
1484 ("perl" ,perl)
1485 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1486 ("jdk" ,icedtea-6 "jdk")))
1487 (inputs
1488 `(("alsa-lib" ,alsa-lib)
1489 ("cups" ,cups)
1490 ("libx11" ,libx11)
1491 ("libxcomposite" ,libxcomposite)
1492 ("libxt" ,libxt)
1493 ("libxtst" ,libxtst)
1494 ("libxi" ,libxi)
1495 ("libxinerama" ,libxinerama)
1496 ("libxrender" ,libxrender)
1497 ("libjpeg" ,libjpeg)
1498 ("libpng" ,libpng)
1499 ("mit-krb5" ,mit-krb5)
1500 ("nss" ,nss)
1501 ("giflib" ,giflib)
1502 ("fontconfig" ,fontconfig)
1503 ("freetype" ,freetype)
1504 ("lcms" ,lcms)
1505 ("zlib" ,zlib)
1506 ("gtk" ,gtk+-2)))
1507 (home-page "http://icedtea.classpath.org")
1508 (synopsis "Java development kit")
1509 (description
1510 "This package provides the Java development kit OpenJDK built with the
1511 IcedTea build harness.")
1512 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1513 ;; same license as both GNU Classpath and OpenJDK.
1514 (license license:gpl2+))))
1515
1516 (define-public icedtea-8
1517 (let* ((version "3.7.0")
1518 (drop (lambda (name hash)
1519 (origin
1520 (method url-fetch)
1521 (uri (string-append
1522 "http://icedtea.classpath.org/download/drops"
1523 "/icedtea8/" version "/" name ".tar.xz"))
1524 (sha256 (base32 hash))))))
1525 (package (inherit icedtea-7)
1526 (version "3.7.0")
1527 (source (origin
1528 (method url-fetch)
1529 (uri (string-append
1530 "http://icedtea.wildebeest.org/download/source/icedtea-"
1531 version ".tar.xz"))
1532 (sha256
1533 (base32
1534 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1535 (modules '((guix build utils)))
1536 (snippet
1537 '(begin
1538 (substitute* '("configure"
1539 "acinclude.m4")
1540 ;; Do not embed build time
1541 (("(DIST_ID=\"Custom build).*$" _ prefix)
1542 (string-append prefix "\"\n"))
1543 ;; Do not leak information about the build host
1544 (("DIST_NAME=\"\\$build_os\"")
1545 "DIST_NAME=\"guix\""))
1546 #t))))
1547 (arguments
1548 `(#:imported-modules
1549 ((guix build ant-build-system)
1550 (guix build syscalls)
1551 ,@%gnu-build-system-modules)
1552 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1553 ((#:modules modules)
1554 `((guix build utils)
1555 (guix build gnu-build-system)
1556 ((guix build ant-build-system) #:prefix ant:)
1557 (ice-9 match)
1558 (ice-9 popen)
1559 (srfi srfi-19)
1560 (srfi srfi-26)))
1561 ((#:configure-flags flags)
1562 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1563 `( ;;"--disable-bootstrap"
1564 "--enable-bootstrap"
1565 "--enable-nss"
1566 "--disable-downloading"
1567 "--disable-system-pcsc"
1568 "--disable-system-sctp"
1569 "--disable-tests" ;they are run in the check phase instead
1570 "--with-openjdk-src-dir=./openjdk.src"
1571 ,(string-append "--with-jdk-home=" jdk))))
1572 ((#:phases phases)
1573 `(modify-phases ,phases
1574 (delete 'fix-x11-extension-include-path)
1575 (delete 'patch-paths)
1576 (delete 'set-additional-paths)
1577 (delete 'patch-patches)
1578 ;; Prevent the keytool from recording the current time when
1579 ;; adding certificates at build time.
1580 (add-after 'unpack 'patch-keystore
1581 (lambda _
1582 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1583 (("date = new Date\\(\\);")
1584 "\
1585 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1586 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1587 new Date();"))
1588 #t))
1589 (add-after 'unpack 'patch-jni-libs
1590 ;; Hardcode dynamically loaded libraries.
1591 (lambda _
1592 (let* ((library-path (search-path-as-string->list
1593 (getenv "LIBRARY_PATH")))
1594 (find-library (lambda (name)
1595 (search-path
1596 library-path
1597 (string-append "lib" name ".so")))))
1598 (for-each
1599 (lambda (file)
1600 (catch 'decoding-error
1601 (lambda ()
1602 (substitute* file
1603 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1604 _ name version)
1605 (format #f "\"~a\"" (find-library name)))
1606 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1607 (format #f "\"~a\"" (find-library name)))))
1608 (lambda _
1609 ;; Those are safe to skip.
1610 (format (current-error-port)
1611 "warning: failed to substitute: ~a~%"
1612 file))))
1613 (find-files "openjdk.src/jdk/src/solaris/native"
1614 "\\.c|\\.h"))
1615 #t)))
1616 (replace 'install
1617 (lambda* (#:key outputs #:allow-other-keys)
1618 (let ((doc (string-append (assoc-ref outputs "doc")
1619 "/share/doc/icedtea"))
1620 (jre (assoc-ref outputs "out"))
1621 (jdk (assoc-ref outputs "jdk")))
1622 (copy-recursively "openjdk.build/docs" doc)
1623 (copy-recursively "openjdk.build/images/j2re-image" jre)
1624 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1625 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1626 ;; support via NSS.
1627 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1628 (string-append jre "/lib/security/nss.cfg"))
1629 #t)))
1630 (add-after 'install 'strip-jar-timestamps
1631 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1632 (native-inputs
1633 `(("jdk" ,icedtea-7 "jdk")
1634 ("openjdk-src"
1635 ,(drop "openjdk"
1636 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1637 ("aarch32-drop"
1638 ,(drop "aarch32"
1639 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1640 ("corba-drop"
1641 ,(drop "corba"
1642 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1643 ("jaxp-drop"
1644 ,(drop "jaxp"
1645 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1646 ("jaxws-drop"
1647 ,(drop "jaxws"
1648 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1649 ("jdk-drop"
1650 ,(drop "jdk"
1651 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1652 ("langtools-drop"
1653 ,(drop "langtools"
1654 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1655 ("hotspot-drop"
1656 ,(origin
1657 (method url-fetch)
1658 (uri (string-append
1659 "http://icedtea.classpath.org/download/drops"
1660 "/icedtea8/" version "/hotspot.tar.xz"))
1661 (sha256
1662 (base32
1663 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1664 (patches (search-patches
1665 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1666 ("nashorn-drop"
1667 ,(drop "nashorn"
1668 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1669 ("shenandoah-drop"
1670 ,(drop "shenandoah"
1671 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1672 ,@(fold alist-delete (package-native-inputs icedtea-7)
1673 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1674 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1675
1676 (define-public openjdk9
1677 (package
1678 (name "openjdk")
1679 (version "9.181")
1680 (source (origin
1681 (method url-fetch)
1682 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1683 (file-name (string-append name "-" version ".tar.bz2"))
1684 (sha256
1685 (base32
1686 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1687 (modules '((guix build utils)))
1688 (snippet
1689 `(begin
1690 (for-each delete-file (find-files "." ".*.bin$"))
1691 (for-each delete-file (find-files "." ".*.exe$"))
1692 (for-each delete-file (find-files "." ".*.jar$"))
1693 #t))))
1694 (build-system gnu-build-system)
1695 (outputs '("out" "jdk" "doc"))
1696 (arguments
1697 `(#:tests? #f; require jtreg
1698 #:imported-modules
1699 ((guix build syscalls)
1700 ,@%gnu-build-system-modules)
1701 #:phases
1702 (modify-phases %standard-phases
1703 (add-after 'patch-source-shebangs 'fix-java-shebangs
1704 (lambda _
1705 ;; This file was "fixed" by patch-source-shebangs, but it requires
1706 ;; this exact first line.
1707 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1708 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1709 #t))
1710 (replace 'configure
1711 (lambda* (#:key inputs outputs #:allow-other-keys)
1712 ;; TODO: unbundle libpng and lcms
1713 (invoke "bash" "./configure"
1714 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1715 "--disable-freetype-bundling"
1716 "--disable-warnings-as-errors"
1717 "--disable-hotspot-gtest"
1718 "--with-giflib=system"
1719 "--with-libjpeg=system"
1720 (string-append "--prefix=" (assoc-ref outputs "out")))
1721 #t))
1722 (replace 'build
1723 (lambda _
1724 (with-output-to-file ".src-rev"
1725 (lambda _
1726 (display ,version)))
1727 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1728 (invoke "make" "all")
1729 #t))
1730 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1731 ;; But that shared object is located in the server/ folder, so it
1732 ;; cannot be found. This phase creates a symbolic link in the
1733 ;; lib/ folder so that the other libraries can find it.
1734 ;;
1735 ;; See:
1736 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1737 ;;
1738 ;; FIXME: Find the bug in the build system, so that this symlink is
1739 ;; not needed.
1740 (add-after 'install 'install-libjvm
1741 (lambda* (#:key inputs outputs #:allow-other-keys)
1742 (let* ((lib-out (string-append (assoc-ref outputs "out")
1743 "/lib"))
1744 (lib-jdk (string-append (assoc-ref outputs "jdk")
1745 "/lib")))
1746 (symlink (string-append lib-jdk "/server/libjvm.so")
1747 (string-append lib-jdk "/libjvm.so"))
1748 (symlink (string-append lib-out "/server/libjvm.so")
1749 (string-append lib-out "/libjvm.so")))
1750 #t))
1751 (replace 'install
1752 (lambda* (#:key outputs #:allow-other-keys)
1753 (let ((out (assoc-ref outputs "out"))
1754 (jdk (assoc-ref outputs "jdk"))
1755 (doc (assoc-ref outputs "doc"))
1756 (images (car (find-files "build" ".*-server-release"
1757 #:directories? #t))))
1758 (copy-recursively (string-append images "/images/jdk") jdk)
1759 (copy-recursively (string-append images "/images/jre") out)
1760 (copy-recursively (string-append images "/images/docs") doc))
1761 #t))
1762 (add-after 'install 'strip-zip-timestamps
1763 (lambda* (#:key outputs #:allow-other-keys)
1764 (use-modules (guix build syscalls))
1765 (for-each (lambda (zip)
1766 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1767 (with-directory-excursion dir
1768 (invoke "unzip" zip))
1769 (delete-file zip)
1770 (for-each (lambda (file)
1771 (let ((s (lstat file)))
1772 (unless (eq? (stat:type s) 'symlink)
1773 (format #t "reset ~a~%" file)
1774 (utime file 0 0 0 0))))
1775 (find-files dir #:directories? #t))
1776 (with-directory-excursion dir
1777 (let ((files (find-files "." ".*" #:directories? #t)))
1778 (apply invoke "zip" "-0" "-X" zip files)))))
1779 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1780 #t)))))
1781 (inputs
1782 `(("alsa-lib" ,alsa-lib)
1783 ("cups" ,cups)
1784 ("fontconfig" ,fontconfig)
1785 ("freetype" ,freetype)
1786 ("giflib" ,giflib)
1787 ("lcms" ,lcms)
1788 ("libelf" ,libelf)
1789 ("libjpeg" ,libjpeg)
1790 ("libice" ,libice)
1791 ("libpng" ,libpng)
1792 ("libx11" ,libx11)
1793 ("libxcomposite" ,libxcomposite)
1794 ("libxi" ,libxi)
1795 ("libxinerama" ,libxinerama)
1796 ("libxrender" ,libxrender)
1797 ("libxt" ,libxt)
1798 ("libxtst" ,libxtst)))
1799 (native-inputs
1800 `(("icedtea-8" ,icedtea-8)
1801 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1802 ("unzip" ,unzip)
1803 ("which" ,which)
1804 ("zip" ,zip)))
1805 (home-page "https://openjdk.java.net/projects/jdk9/")
1806 (synopsis "Java development kit")
1807 (description
1808 "This package provides the Java development kit OpenJDK.")
1809 (license license:gpl2+)))
1810
1811 (define-public openjdk10
1812 (package
1813 (inherit openjdk9)
1814 (name "openjdk")
1815 (version "10.46")
1816 (source (origin
1817 (method url-fetch)
1818 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1819 (file-name (string-append name "-" version ".tar.bz2"))
1820 (sha256
1821 (base32
1822 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1823 (patches (search-patches
1824 "openjdk-10-idlj-reproducibility.patch"))
1825 (modules '((guix build utils)))
1826 (snippet
1827 `(begin
1828 (for-each delete-file (find-files "." ".*.bin$"))
1829 (for-each delete-file (find-files "." ".*.exe$"))
1830 (for-each delete-file (find-files "." ".*.jar$"))
1831 #t))))
1832 (arguments
1833 (substitute-keyword-arguments (package-arguments openjdk9)
1834 ((#:phases phases)
1835 `(modify-phases ,phases
1836 (replace 'fix-java-shebangs
1837 (lambda _
1838 ;; This file was "fixed" by patch-source-shebangs, but it requires
1839 ;; this exact first line.
1840 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1841 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1842 #t))
1843 (replace 'configure
1844 (lambda* (#:key inputs outputs #:allow-other-keys)
1845 (invoke "bash" "./configure"
1846 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1847 "--disable-freetype-bundling"
1848 "--disable-warnings-as-errors"
1849 "--disable-hotspot-gtest"
1850 "--with-giflib=system"
1851 "--with-libjpeg=system"
1852 "--with-native-debug-symbols=zipped"
1853 (string-append "--prefix=" (assoc-ref outputs "out")))
1854 #t))))))
1855 (native-inputs
1856 `(("openjdk9" ,openjdk9)
1857 ("openjdk9:jdk" ,openjdk9 "jdk")
1858 ("unzip" ,unzip)
1859 ("which" ,which)
1860 ("zip" ,zip)))))
1861
1862 (define-public icedtea icedtea-8)
1863
1864 \f
1865 (define-public ant/java8
1866 (package (inherit ant-bootstrap)
1867 (name "ant")
1868 (version "1.10.1")
1869 (source (origin
1870 (method url-fetch)
1871 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1872 version "-src.tar.gz"))
1873 (sha256
1874 (base32
1875 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1876 (modules '((guix build utils)))
1877 (snippet
1878 '(begin
1879 (for-each delete-file
1880 (find-files "lib/optional" "\\.jar$"))
1881 #t))))
1882 (arguments
1883 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1884 ((#:phases phases)
1885 `(modify-phases ,phases
1886 (add-after 'unpack 'remove-scripts
1887 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1888 ;; wrappers.
1889 (lambda _
1890 (for-each delete-file
1891 (find-files "src/script"
1892 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1893 #t))
1894 (replace 'build
1895 (lambda* (#:key inputs outputs #:allow-other-keys)
1896 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1897
1898 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1899 ;; Ant to build. This is necessary in addition to disabling the
1900 ;; "check" phase, because the dependency on "test-jar" would always
1901 ;; result in the tests to be run.
1902 (substitute* "build.xml"
1903 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1904 (invoke "bash" "bootstrap.sh"
1905 (string-append "-Ddist.dir="
1906 (assoc-ref outputs "out")))))))))
1907 (native-inputs
1908 `(("jdk" ,icedtea-8 "jdk")
1909 ("zip" ,zip)
1910 ("unzip" ,unzip)))))
1911
1912 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1913 ;; requires Java 8.
1914 (define-public ant
1915 (package (inherit ant/java8)
1916 (version "1.9.9")
1917 (source (origin
1918 (method url-fetch)
1919 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1920 version "-src.tar.gz"))
1921 (sha256
1922 (base32
1923 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1924 (native-inputs
1925 `(("jdk" ,icedtea-7 "jdk")
1926 ("zip" ,zip)
1927 ("unzip" ,unzip)))))
1928
1929 (define-public ant-apache-bcel
1930 (package
1931 (inherit ant/java8)
1932 (name "ant-apache-bcel")
1933 (arguments
1934 (substitute-keyword-arguments (package-arguments ant/java8)
1935 ((#:phases phases)
1936 `(modify-phases ,phases
1937 (add-after 'unpack 'link-bcel
1938 (lambda* (#:key inputs #:allow-other-keys)
1939 (for-each (lambda (file)
1940 (symlink file
1941 (string-append "lib/optional/"
1942 (basename file))))
1943 (find-files (assoc-ref inputs "java-commons-bcel")
1944 "\\.jar$"))
1945 #t))
1946 (add-after 'build 'install
1947 (lambda* (#:key outputs #:allow-other-keys)
1948 (let* ((out (assoc-ref outputs "out"))
1949 (share (string-append out "/share/java"))
1950 (bin (string-append out "/bin"))
1951 (lib (string-append out "/lib")))
1952 (mkdir-p share)
1953 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1954 (delete-file-recursively bin)
1955 (delete-file-recursively lib)
1956 #t)))))))
1957 (inputs
1958 `(("java-commons-bcel" ,java-commons-bcel)
1959 ,@(package-inputs ant/java8)))))
1960
1961 (define-public ant-junit
1962 (package
1963 (inherit ant/java8)
1964 (name "ant-junit")
1965 (arguments
1966 (substitute-keyword-arguments (package-arguments ant/java8)
1967 ((#:phases phases)
1968 `(modify-phases ,phases
1969 (add-after 'unpack 'link-junit
1970 (lambda* (#:key inputs #:allow-other-keys)
1971 (for-each (lambda (file)
1972 (symlink file
1973 (string-append "lib/optional/"
1974 (basename file))))
1975 (find-files (assoc-ref inputs "java-junit")
1976 "\\.jar$"))
1977 #t))
1978 (add-after 'build 'install
1979 (lambda* (#:key outputs #:allow-other-keys)
1980 (let* ((out (assoc-ref outputs "out"))
1981 (share (string-append out "/share/java"))
1982 (bin (string-append out "/bin"))
1983 (lib (string-append out "/lib")))
1984 (mkdir-p share)
1985 (install-file (string-append lib "/ant-junit.jar") share)
1986 (delete-file-recursively bin)
1987 (delete-file-recursively lib)
1988 #t)))))))
1989 (inputs
1990 `(("java-junit" ,java-junit)
1991 ,@(package-inputs ant/java8)))))
1992
1993 (define-public javacc-4
1994 (package
1995 (name "javacc")
1996 (version "4.1")
1997 (source (origin
1998 (method git-fetch)
1999 (uri (git-reference
2000 (url "https://github.com/javacc/javacc.git")
2001 (commit "release_41")))
2002 (file-name (string-append "javacc-" version "-checkout"))
2003 (sha256
2004 (base32
2005 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2006 (modules '((guix build utils)))
2007 ;; delete bundled jars
2008 (snippet '(begin (delete-file-recursively "lib") #t))))
2009 (build-system ant-build-system)
2010 ;; Tests fail with
2011 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2012 ;; JAVACODE failed
2013 (arguments
2014 `(#:tests? #f
2015 #:phases
2016 (modify-phases %standard-phases
2017 ;; Delete tests to avoid build failure (we don't run them anyway).
2018 (add-after 'unpack 'delete-tests
2019 (lambda _
2020 (for-each delete-file
2021 '("src/org/javacc/JavaCCTestCase.java"
2022 "src/org/javacc/parser/ExpansionTest.java"
2023 "src/org/javacc/parser/OptionsTest.java"
2024 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2025 (for-each delete-file-recursively
2026 '("src/org/javacc/parser/test"
2027 "src/org/javacc/jjdoc/test"))
2028 #t))
2029 (replace 'install (install-jars "bin/lib")))))
2030 (home-page "https://javacc.org/")
2031 (synopsis "Java parser generator")
2032 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2033 generator for use with Java applications. A parser generator is a tool that
2034 reads a grammar specification and converts it to a Java program that can
2035 recognize matches to the grammar. In addition to the parser generator itself,
2036 JavaCC provides other standard capabilities related to parser generation such
2037 as tree building (via a tool called JJTree included with JavaCC), actions,
2038 debugging, etc.")
2039 (license license:bsd-3)))
2040
2041 (define-public javacc
2042 (package
2043 (inherit javacc-4)
2044 (version "7.0.3")
2045 (source (origin
2046 (method url-fetch)
2047 (uri (string-append "https://github.com/javacc/javacc/"
2048 "archive/" version ".tar.gz"))
2049 (file-name (string-append "javacc-" version ".tar.gz"))
2050 (sha256
2051 (base32
2052 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))
2053 (modules '((guix build utils)))
2054 ;; delete bundled jars
2055 (snippet '(begin (for-each delete-file-recursively
2056 '("bootstrap" "lib"))
2057 #t))))
2058 (arguments
2059 `(#:make-flags ; bootstrap from javacc-4
2060 (list (string-append "-Dbootstrap-jar="
2061 (assoc-ref %build-inputs "javacc")
2062 "/share/java/javacc.jar"))
2063 #:test-target "test"
2064 #:phases
2065 (modify-phases %standard-phases
2066 (replace 'install (install-jars "target")))))
2067 (native-inputs
2068 `(("javacc" ,javacc-4)))))
2069
2070 ;; This is the last 3.x release of ECJ
2071 (define-public java-ecj-3
2072 (package
2073 (name "java-ecj")
2074 (version "3.8.2")
2075 (source (origin
2076 (method url-fetch)
2077 (uri (string-append "http://archive.eclipse.org/eclipse/"
2078 "downloads/drops/R-" version
2079 "-201301310800/ecjsrc-" version ".jar"))
2080 (sha256
2081 (base32
2082 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2083 (build-system ant-build-system)
2084 (arguments
2085 `(#:tests? #f ; none included
2086 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2087 #:make-flags (list "-f" "src/build.xml")
2088 #:build-target "build"
2089 #:phases
2090 (modify-phases %standard-phases
2091 (add-after 'unpack 'fix-manifest
2092 (lambda _
2093 ;; Record the main class to make ecj executable.
2094 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2095 (lambda (in out)
2096 (display "Manifest-Version: 1.0
2097 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2098 out)))
2099 #t))
2100 (replace 'install (install-jars ".")))))
2101 (home-page "https://eclipse.org")
2102 (synopsis "Eclipse Java development tools core batch compiler")
2103 (description "This package provides the Eclipse Java core batch compiler.")
2104 (license license:epl1.0)))
2105
2106 ;; This is needed for java-cisd-args4j
2107 (define-public java-ecj-3.5
2108 (package (inherit java-ecj-3)
2109 (version "3.5.1")
2110 (source (origin
2111 (method url-fetch/zipbomb)
2112 (uri (string-append "http://archive.eclipse.org/eclipse/"
2113 "downloads/drops/R-" version
2114 "-200909170800/ecjsrc-" version ".zip"))
2115 (sha256
2116 (base32
2117 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2118 (build-system ant-build-system)
2119 (arguments
2120 `(#:tests? #f ; none included
2121 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2122 #:build-target "build"
2123 #:phases
2124 (modify-phases %standard-phases
2125 (add-after 'unpack 'fix-manifest
2126 (lambda _
2127 ;; Record the main class to make ecj executable.
2128 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2129 (lambda (in out)
2130 (dump-port in out)
2131 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2132 out)))
2133 #t))
2134 (replace 'install (install-jars ".")))))
2135 (native-inputs
2136 `(("unzip" ,unzip)))))
2137
2138 (define-public java-cisd-base
2139 (let ((revision 38938)
2140 (base-version "14.12.0"))
2141 (package
2142 (name "java-cisd-base")
2143 (version (string-append base-version "-" (number->string revision)))
2144 (source (origin
2145 (method svn-fetch)
2146 (uri (svn-reference
2147 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2148 "base/tags/release/"
2149 (version-major+minor base-version)
2150 ".x/" base-version "/base/"))
2151 (revision revision)))
2152 (file-name (string-append "java-cisd-base-" version "-checkout"))
2153 (sha256
2154 (base32
2155 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2156 (modules '((guix build utils)))
2157 (snippet
2158 '(begin
2159 ;; Delete included gradle jar
2160 (delete-file-recursively "gradle/wrapper")
2161 ;; Delete pre-built native libraries
2162 (delete-file-recursively "libs")
2163 #t))))
2164 (build-system ant-build-system)
2165 (arguments
2166 `(#:make-flags '("-file" "build/build.xml")
2167 #:test-target "jar-test"
2168 #:jdk ,icedtea-8
2169 #:phases
2170 (modify-phases %standard-phases
2171 (add-after 'unpack 'unpack-build-resources
2172 (lambda* (#:key inputs #:allow-other-keys)
2173 (copy-recursively (assoc-ref inputs "build-resources")
2174 "../build_resources")
2175 #t))
2176 (add-after 'unpack-build-resources 'fix-dependencies
2177 (lambda* (#:key inputs #:allow-other-keys)
2178 (substitute* "build/build.xml"
2179 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2180 (string-append (assoc-ref inputs "java-testng")
2181 "/share/java/java-testng.jar"))
2182 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2183 (string-append (assoc-ref inputs "java-commons-lang")
2184 "/share/java/commons-lang-"
2185 ,(package-version java-commons-lang) ".jar"))
2186 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2187 (string-append (assoc-ref inputs "java-commons-io")
2188 "/share/java/commons-io-"
2189 ,(package-version java-commons-io)
2190 "-SNAPSHOT.jar"))
2191 ;; Remove dependency on svn
2192 (("<build-info.*") "")
2193 (("\\$\\{revision.number\\}")
2194 ,(number->string revision))
2195 (("\\$\\{version.number\\}") ,base-version))
2196 ;; Remove dependency on classycle
2197 (substitute* "../build_resources/ant/build-common.xml"
2198 (("<taskdef name=\"dependency-checker.*") "")
2199 (("classname=\"classycle.*") "")
2200 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2201 #t))
2202 ;; A few tests fail because of the lack of a proper /etc/groups and
2203 ;; /etc/passwd file in the build container.
2204 (add-after 'unpack 'disable-broken-tests
2205 (lambda _
2206 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2207 (("Unix.isOperational\\(\\)") "false"))
2208 #t))
2209 ;; These decorators are almost useless and pull in an unpackaged
2210 ;; dependency.
2211 (add-after 'unpack 'remove-useless-decorators
2212 (lambda _
2213 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2214 (("@Private") "")
2215 (("import ch.rinn.restrictions.Private;") ""))
2216 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2217 (("@Friend.*") "")
2218 (("import ch.rinn.restrictions.Friend;") ""))
2219 #t))
2220 (add-before 'configure 'build-native-code
2221 (lambda* (#:key inputs #:allow-other-keys)
2222 (let ((jdk (assoc-ref inputs "jdk"))
2223 (dir ,(match (%current-system)
2224 ("i686-linux"
2225 "i386-Linux")
2226 ((or "armhf-linux" "aarch64-linux")
2227 "arm-Linux")
2228 ((or "x86_64-linux")
2229 "amd64-Linux")
2230 (_ "unknown-Linux"))))
2231 (with-directory-excursion "source/c"
2232 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2233 (string-append "-I" jdk "/include")
2234 (string-append "-I" jdk "/include/linux")
2235 "-o" "libunix.so")
2236 (invoke "gcc" "-shared" "-O3" "-fPIC"
2237 "-DMACHINE_BYTE_ORDER=1"
2238 "copyCommon.c"
2239 "copyByteChar.c"
2240 "copyByteDouble.c"
2241 "copyByteFloat.c"
2242 "copyByteInt.c"
2243 "copyByteLong.c"
2244 "copyByteShort.c"
2245 (string-append "-I" jdk "/include")
2246 (string-append "-I" jdk "/include/linux")
2247 "-o" "libnativedata.so"))
2248 (install-file "source/c/libunix.so"
2249 (string-append "libs/native/unix/" dir))
2250 (install-file "source/c/libnativedata.so"
2251 (string-append "libs/native/nativedata/" dir))
2252 #t)))
2253 ;; In the "check" phase we only build the test executable.
2254 (add-after 'check 'run-tests
2255 (lambda _
2256 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2257 (delete-file "targets/dist/sis-base-test.jar")
2258 #t))
2259 (replace 'install (install-jars "targets/dist")))))
2260 (native-inputs
2261 `(("jdk" ,icedtea-8)
2262 ("java-commons-lang" ,java-commons-lang)
2263 ("java-commons-io" ,java-commons-io)
2264 ("java-testng" ,java-testng)
2265 ("build-resources"
2266 ,(origin
2267 (method svn-fetch)
2268 (uri (svn-reference
2269 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2270 "base/tags/release/"
2271 (version-major+minor base-version)
2272 ".x/" base-version
2273 "/build_resources/"))
2274 (revision revision)))
2275 (sha256
2276 (base32
2277 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2278 (home-page "http://svnsis.ethz.ch")
2279 (synopsis "Utility classes for libraries from ETH Zurich")
2280 (description "This library supplies some utility classes needed for
2281 libraries from the SIS division at ETH Zurich like jHDF5.")
2282 ;; The C sources are under a non-copyleft license, which looks like a
2283 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2284 (license (list license:asl2.0
2285 (license:non-copyleft "file://source/c/COPYING"))))))
2286
2287 (define-public java-cisd-args4j
2288 (let ((revision 39162)
2289 (base-version "9.11.2"))
2290 (package
2291 (name "java-cisd-args4j")
2292 (version (string-append base-version "-" (number->string revision)))
2293 (source (origin
2294 (method svn-fetch)
2295 (uri (svn-reference
2296 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2297 "args4j/tags/release/"
2298 (version-major+minor base-version)
2299 ".x/" base-version "/args4j/"))
2300 (revision revision)))
2301 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2302 (sha256
2303 (base32
2304 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2305 (build-system ant-build-system)
2306 (arguments
2307 `(#:make-flags '("-file" "build/build.xml")
2308 #:tests? #f ; there are no tests
2309 ;; There are weird build failures with JDK8, such as: "The type
2310 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2311 ;; referenced from required .class files"
2312 #:jdk ,icedtea-7
2313 #:modules ((guix build ant-build-system)
2314 (guix build utils)
2315 (guix build java-utils)
2316 (sxml simple)
2317 (sxml transform)
2318 (sxml xpath))
2319 #:phases
2320 (modify-phases %standard-phases
2321 (add-after 'unpack 'unpack-build-resources
2322 (lambda* (#:key inputs #:allow-other-keys)
2323 (mkdir-p "../build_resources")
2324 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2325 "-C" "../build_resources"
2326 "--strip-components=1")
2327 (mkdir-p "../build_resources/lib")
2328 #t))
2329 (add-after 'unpack-build-resources 'fix-dependencies
2330 (lambda* (#:key inputs #:allow-other-keys)
2331 ;; FIXME: There should be a more convenient abstraction for
2332 ;; editing XML files.
2333 (with-directory-excursion "../build_resources/ant/"
2334 (chmod "build-common.xml" #o664)
2335 (call-with-output-file "build-common.xml.new"
2336 (lambda (port)
2337 (sxml->xml
2338 (pre-post-order
2339 (with-input-from-file "build-common.xml"
2340 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2341 `(;; Remove dependency on classycle and custom ant tasks
2342 (taskdef . ,(lambda (tag . kids)
2343 (let ((name ((sxpath '(name *text*)) kids)))
2344 (if (or (member "build-info" name)
2345 (member "dependency-checker" name)
2346 (member "build-java-subprojects" name)
2347 (member "project-classpath" name))
2348 '() ; skip
2349 `(,tag ,@kids)))))
2350 (typedef . ,(lambda (tag . kids)
2351 (let ((name ((sxpath '(name *text*)) kids)))
2352 (if (member "recursive-jar" name)
2353 '() ; skip
2354 `(,tag ,@kids)))))
2355 (build-java-subprojects . ,(lambda _ '()))
2356 ;; Ignore everything else
2357 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2358 (*text* . ,(lambda (_ txt) txt))))
2359 port)))
2360 (rename-file "build-common.xml.new" "build-common.xml"))
2361 (substitute* "build/build.xml"
2362 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2363 (string-append (assoc-ref inputs "java-cisd-base")
2364 "/share/java/sis-base.jar"))
2365 ;; Remove dependency on svn
2366 (("<build-info.*") "")
2367 (("\\$\\{revision.number\\}")
2368 ,(number->string revision))
2369 (("\\$\\{version.number\\}") ,base-version)
2370 ;; Don't use custom ant tasks.
2371 (("recursive-jar") "jar")
2372 (("<project-classpath.*") ""))
2373 #t))
2374 (replace 'install (install-jars "targets/dist")))))
2375 (inputs
2376 `(("java-cisd-base" ,java-cisd-base)))
2377 (native-inputs
2378 `(("ecj" ,java-ecj-3.5)
2379 ("build-resources"
2380 ,(origin
2381 (method svn-fetch)
2382 (uri (svn-reference
2383 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2384 "args4j/tags/release/"
2385 (version-major+minor base-version)
2386 ".x/" base-version
2387 "/build_resources/"))
2388 (revision revision)))
2389 (sha256
2390 (base32
2391 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2392 (modules '((guix build utils)))
2393 ;; Delete bundled pre-built jars.
2394 (snippet
2395 '(begin (delete-file-recursively "lib/") #t))))))
2396 (home-page "http://svnsis.ethz.ch")
2397 (synopsis "Command line parser library")
2398 (description "This package provides a parser for command line arguments.")
2399 (license license:asl2.0))))
2400
2401 (define-public java-cisd-jhdf5
2402 (let ((revision 39162)
2403 (base-version "14.12.6"))
2404 (package
2405 (name "java-cisd-jhdf5")
2406 (version (string-append base-version "-" (number->string revision)))
2407 (source (origin
2408 (method svn-fetch)
2409 (uri (svn-reference
2410 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2411 "jhdf5/tags/release/"
2412 (version-major+minor base-version)
2413 ".x/" base-version "/jhdf5/"))
2414 (revision revision)))
2415 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2416 (sha256
2417 (base32
2418 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2419 (modules '((guix build utils)))
2420 (snippet
2421 '(begin
2422 ;; Delete included gradle jar
2423 (delete-file-recursively "gradle/wrapper")
2424 ;; Delete pre-built native libraries
2425 (delete-file-recursively "libs")
2426 #t))))
2427 (build-system ant-build-system)
2428 (arguments
2429 `(#:make-flags '("-file" "build/build.xml")
2430 #:build-target "jar-all"
2431 #:test-target "jar-test"
2432 #:jdk ,icedtea-8
2433 #:phases
2434 (modify-phases %standard-phases
2435 ;; FIXME: this build phase fails.
2436 (delete 'generate-jar-indices)
2437 ;; Don't erase results from the build phase when building tests.
2438 (add-after 'unpack 'separate-test-target-from-clean
2439 (lambda _
2440 (substitute* "build/build.xml"
2441 (("\"jar-test\" depends=\"clean, ")
2442 "\"jar-test\" depends=\""))
2443 #t))
2444 (add-after 'unpack 'unpack-build-resources
2445 (lambda* (#:key inputs #:allow-other-keys)
2446 (copy-recursively (assoc-ref inputs "build-resources")
2447 "../build_resources")
2448 (delete-file-recursively "../build_resources/lib/")
2449 (mkdir-p "../build_resources/lib")
2450 ;; Remove dependency on classycle
2451 (substitute* "../build_resources/ant/build-common.xml"
2452 (("<taskdef name=\"dependency-checker.*") "")
2453 (("classname=\"classycle.*") "")
2454 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2455 ;; Remove dependency on svn
2456 (substitute* "build/build.xml"
2457 (("<build-info.*") "")
2458 (("\\$\\{revision.number\\}")
2459 ,(number->string revision))
2460 (("\\$\\{version.number\\}") ,base-version))
2461 #t))
2462 (add-after 'unpack-build-resources 'fix-dependencies
2463 (lambda* (#:key inputs #:allow-other-keys)
2464 (substitute* "../build_resources/ant/build-common.xml"
2465 (("../libraries/testng/testng-jdk15.jar")
2466 (string-append (assoc-ref inputs "java-testng")
2467 "/share/java/java-testng.jar")))
2468 (substitute* "build/build.xml"
2469 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2470 (string-append (assoc-ref inputs "java-cisd-base")
2471 "/share/java/sis-base.jar"))
2472 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2473 (string-append (assoc-ref inputs "java-cisd-args4j")
2474 "/share/java/cisd-args4j.jar"))
2475 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2476 (string-append (assoc-ref inputs "java-commons-lang")
2477 "/share/java/commons-lang-"
2478 ,(package-version java-commons-lang) ".jar"))
2479 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2480 (string-append (assoc-ref inputs "java-commons-io")
2481 "/share/java/commons-io-"
2482 ,(package-version java-commons-io)
2483 "-SNAPSHOT.jar"))
2484 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2485 (string-append (assoc-ref inputs "java-testng")
2486 "/share/java/java-testng.jar"))
2487 (("\\$\\{lib\\}/junit4/junit.jar")
2488 (string-append (assoc-ref inputs "java-junit")
2489 "/share/java/junit.jar"))
2490 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2491 (string-append (assoc-ref inputs "java-hamcrest-core")
2492 "/share/java/hamcrest-core.jar")))
2493 ;; Remove dependency on ch.rinn.restrictions
2494 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2495 (substitute* '("BitSetConversionUtils.java"
2496 "HDF5Utils.java")
2497 (("import ch.rinn.restrictions.Private;") "")
2498 (("@Private") "")))
2499 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2500 (substitute* '("BitSetConversionTest.java"
2501 "h5ar/HDF5ArchiverTest.java")
2502 (("import ch.rinn.restrictions.Friend;") "")
2503 (("@Friend.*") ""))
2504 ;; Remove leftovers from removing @Friend
2505 (substitute* "h5ar/HDF5ArchiverTest.java"
2506 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2507 "")))
2508 #t))
2509 (add-before 'configure 'build-native-library
2510 (lambda* (#:key inputs #:allow-other-keys)
2511 (let ((jdk (assoc-ref inputs "jdk"))
2512 (hdf5 (assoc-ref inputs "hdf5"))
2513 (dir ,(match (%current-system)
2514 ("i686-linux"
2515 "i386-Linux")
2516 ((or "armhf-linux" "aarch64-linux")
2517 "arm-Linux")
2518 ((or "x86_64-linux")
2519 "amd64-Linux")
2520 (_ "unknown-Linux"))))
2521 (with-directory-excursion "source/c"
2522 (apply invoke `("gcc" "-shared" "-O3"
2523 "-fPIC"
2524 "-Wl,--exclude-libs,ALL"
2525 ,@(find-files "jhdf5" "\\.c$")
2526 ,@(find-files "hdf-java" "\\.c$")
2527 ,(string-append "-I" hdf5 "/include")
2528 ,(string-append "-I" jdk "/include")
2529 ,(string-append "-I" jdk "/include/linux")
2530 ,(string-append hdf5 "/lib/libhdf5.a")
2531 "-o" "libjhdf5.so" "-lz")))
2532 (install-file "source/c/libjhdf5.so"
2533 (string-append "libs/native/jhdf5/" dir))
2534 #t)))
2535 ;; In the "check" phase we only build the test executable.
2536 (add-after 'check 'run-tests
2537 (lambda _
2538 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2539 (delete-file "targets/dist/sis-jhdf5-test.jar")
2540 #t))
2541 (replace 'install
2542 (install-jars "targets/dist")))))
2543 (inputs
2544 `(("java-cisd-base" ,java-cisd-base)
2545 ("java-cisd-args4j" ,java-cisd-args4j)
2546 ("java-commons-lang" ,java-commons-lang)
2547 ("java-commons-io" ,java-commons-io)
2548 ("hdf5" ,hdf5)
2549 ("zlib" ,zlib)))
2550 (native-inputs
2551 `(("jdk" ,icedtea-8)
2552 ("java-testng" ,java-testng)
2553 ("java-junit" ,java-junit)
2554 ("java-jmock" ,java-jmock)
2555 ("java-hamcrest-core" ,java-hamcrest-core)
2556 ("build-resources"
2557 ,(origin
2558 (method svn-fetch)
2559 (uri (svn-reference
2560 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2561 "jhdf5/tags/release/"
2562 (version-major+minor base-version)
2563 ".x/" base-version
2564 "/build_resources/"))
2565 (revision revision)))
2566 (sha256
2567 (base32
2568 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2569 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2570 (synopsis "Java binding for HDF5")
2571 (description "JHDF5 is a high-level API in Java for reading and writing
2572 HDF5 files, building on the libraries provided by the HDF Group.")
2573 ;; The C sources are under a non-copyleft license, which looks like a
2574 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2575 (license (list license:asl2.0
2576 (license:non-copyleft "file://source/c/COPYING"))))))
2577
2578 (define-public java-classpathx-servletapi
2579 (package
2580 (name "java-classpathx-servletapi")
2581 (version "3.0.1")
2582 (source (origin
2583 (method url-fetch)
2584 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2585 "servletapi-" version ".tar.gz"))
2586 (sha256
2587 (base32
2588 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2589 (build-system ant-build-system)
2590 (arguments
2591 `(#:tests? #f ; there is no test target
2592 #:build-target "compile"
2593 #:make-flags
2594 (list "-Dbuild.compiler=javac1.8"
2595 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2596 #:phases
2597 (modify-phases %standard-phases
2598 (replace 'install
2599 (lambda* (#:key make-flags #:allow-other-keys)
2600 (apply invoke `("ant" "dist" ,@make-flags)))))))
2601 (home-page "https://www.gnu.org/software/classpathx/")
2602 (synopsis "Java servlet API implementation")
2603 (description "This is the GNU servlet API distribution, part of the
2604 ClasspathX project. It provides implementations of version 3.0 of the servlet
2605 API and version 2.1 of the Java ServerPages API.")
2606 (license license:gpl3+)))
2607
2608 (define-public java-javaee-servletapi
2609 (package
2610 (name "java-javaee-servletapi")
2611 (version "3.1.0")
2612 (source (origin
2613 (method url-fetch)
2614 (uri (string-append "https://github.com/javaee/servlet-spec/"
2615 "archive/" version ".zip"))
2616 (file-name (string-append name "-" version ".zip"))
2617 (sha256
2618 (base32
2619 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
2620 (build-system ant-build-system)
2621 (arguments
2622 `(#:jar-name "javax-servletapi.jar"
2623 ;; no tests
2624 #:tests? #f
2625 #:source-dir "src/main/java"))
2626 (native-inputs
2627 `(("unzip" ,unzip)))
2628 (home-page "https://javaee.github.io/servlet-spec/")
2629 (synopsis "Java servlet API")
2630 (description "Java Servlet is the foundation web specification in the
2631 Java Enterprise Platform. Developers can build web applications using the
2632 Servlet API to interact with the request/response workflow. This project
2633 provides information on the continued development of the Java Servlet
2634 specification.")
2635 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
2636 ;; Some files are licensed under ASL 2.0.
2637 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
2638
2639 (define-public java-swt
2640 (package
2641 (name "java-swt")
2642 (version "4.7.1a")
2643 (source
2644 ;; The types of many variables and procedures differ in the sources
2645 ;; dependent on whether the target architecture is a 32-bit system or a
2646 ;; 64-bit system. Instead of patching the sources on demand in a build
2647 ;; phase we download either the 32-bit archive (which mostly uses "int"
2648 ;; types) or the 64-bit archive (which mostly uses "long" types).
2649 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2650 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2651 (file32 "x86")
2652 (file64 "x86_64"))
2653 (let-values (((hash file)
2654 (match (or (%current-target-system) (%current-system))
2655 ("x86_64-linux" (values hash64 file64))
2656 (_ (values hash32 file32)))))
2657 (origin
2658 (method url-fetch)
2659 (uri (string-append
2660 "http://download.eclipse.org/eclipse/downloads/drops4/"
2661 "R-" version "-201710090410/swt-" version
2662 "-gtk-linux-" file ".zip"))
2663 (sha256 (base32 hash))))))
2664 (build-system ant-build-system)
2665 (arguments
2666 `(#:jar-name "swt.jar"
2667 #:jdk ,icedtea-8
2668 #:tests? #f ; no "check" target
2669 #:phases
2670 (modify-phases %standard-phases
2671 (replace 'unpack
2672 (lambda* (#:key source #:allow-other-keys)
2673 (mkdir "swt")
2674 (invoke "unzip" source "-d" "swt")
2675 (chdir "swt")
2676 (mkdir "src")
2677 (invoke "unzip" "src.zip" "-d" "src")))
2678 ;; The classpath contains invalid icecat jars. Since we don't need
2679 ;; anything other than the JDK on the classpath, we can simply unset
2680 ;; it.
2681 (add-after 'configure 'unset-classpath
2682 (lambda _ (unsetenv "CLASSPATH") #t))
2683 (add-before 'build 'build-native
2684 (lambda* (#:key inputs outputs #:allow-other-keys)
2685 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2686 ;; Build shared libraries. Users of SWT have to set the system
2687 ;; property swt.library.path to the "lib" directory of this
2688 ;; package output.
2689 (mkdir-p lib)
2690 (setenv "OUTPUT_DIR" lib)
2691 (with-directory-excursion "src"
2692 (invoke "bash" "build.sh")))))
2693 (add-after 'install 'install-native
2694 (lambda* (#:key outputs #:allow-other-keys)
2695 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2696 (for-each (lambda (file)
2697 (install-file file lib))
2698 (find-files "." "\\.so$"))
2699 #t))))))
2700 (inputs
2701 `(("gtk" ,gtk+-2)
2702 ("libxtst" ,libxtst)
2703 ("libxt" ,libxt)
2704 ("mesa" ,mesa)
2705 ("glu" ,glu)))
2706 (native-inputs
2707 `(("pkg-config" ,pkg-config)
2708 ("unzip" ,unzip)))
2709 (home-page "https://www.eclipse.org/swt/")
2710 (synopsis "Widget toolkit for Java")
2711 (description
2712 "SWT is a widget toolkit for Java designed to provide efficient, portable
2713 access to the user-interface facilities of the operating systems on which it
2714 is implemented.")
2715 ;; SWT code is licensed under EPL1.0
2716 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2717 ;; Cairo bindings contain code under MPL1.1
2718 ;; XULRunner 1.9 bindings contain code under MPL2.0
2719 (license (list
2720 license:epl1.0
2721 license:mpl1.1
2722 license:mpl2.0
2723 license:lgpl2.1+))))
2724
2725 (define-public java-xz
2726 (package
2727 (name "java-xz")
2728 (version "1.6")
2729 (source (origin
2730 (method url-fetch)
2731 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2732 (sha256
2733 (base32
2734 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2735 (build-system ant-build-system)
2736 (arguments
2737 `(#:tests? #f ; There are no tests to run.
2738 #:jar-name ,(string-append "xz-" version ".jar")
2739 #:phases
2740 (modify-phases %standard-phases
2741 ;; The unpack phase enters the "maven" directory by accident.
2742 (add-after 'unpack 'chdir
2743 (lambda _ (chdir "..") #t)))))
2744 (native-inputs
2745 `(("unzip" ,unzip)))
2746 (home-page "https://tukaani.org/xz/java.html")
2747 (synopsis "Implementation of XZ data compression in pure Java")
2748 (description "This library aims to be a complete implementation of XZ data
2749 compression in pure Java. Single-threaded streamed compression and
2750 decompression and random access decompression have been fully implemented.")
2751 (license license:public-domain)))
2752
2753 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2754 ;; of the latest release.
2755 (define-public java-qdox-1.12
2756 (package
2757 (name "java-qdox")
2758 (version "1.12.1")
2759 (source (origin
2760 (method url-fetch)
2761 (uri (string-append "http://central.maven.org/maven2/"
2762 "com/thoughtworks/qdox/qdox/" version
2763 "/qdox-" version "-sources.jar"))
2764 (sha256
2765 (base32
2766 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2767 (build-system ant-build-system)
2768 (arguments
2769 `(;; Tests require junit
2770 #:tests? #f
2771 #:jar-name "qdox.jar"
2772 #:phases
2773 (modify-phases %standard-phases
2774 (replace 'unpack
2775 (lambda* (#:key source #:allow-other-keys)
2776 (mkdir "src")
2777 (with-directory-excursion "src"
2778 (invoke "jar" "-xf" source))))
2779 ;; At this point we don't have junit, so we must remove the API
2780 ;; tests.
2781 (add-after 'unpack 'delete-tests
2782 (lambda _
2783 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2784 #t)))))
2785 (home-page "http://qdox.codehaus.org/")
2786 (synopsis "Parse definitions from Java source files")
2787 (description
2788 "QDox is a high speed, small footprint parser for extracting
2789 class/interface/method definitions from source files complete with JavaDoc
2790 @code{@@tags}. It is designed to be used by active code generators or
2791 documentation tools.")
2792 (license license:asl2.0)))
2793
2794 (define-public java-jarjar
2795 (package
2796 (name "java-jarjar")
2797 (version "1.4")
2798 (source (origin
2799 (method url-fetch)
2800 (uri (string-append
2801 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2802 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2803 (sha256
2804 (base32
2805 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2806 (modules '((guix build utils)))
2807 (snippet
2808 '(begin
2809 ;; Delete bundled thirds-party jar archives.
2810 ;; TODO: unbundle maven-plugin-api.
2811 (delete-file "lib/asm-4.0.jar")
2812 (delete-file "lib/asm-commons-4.0.jar")
2813 (delete-file "lib/junit-4.8.1.jar")
2814 #t))))
2815 (build-system ant-build-system)
2816 (arguments
2817 `(;; Tests require junit, which ultimately depends on this package.
2818 #:tests? #f
2819 #:build-target "jar"
2820 #:phases
2821 (modify-phases %standard-phases
2822 (add-before 'build 'do-not-use-bundled-asm
2823 (lambda* (#:key inputs #:allow-other-keys)
2824 (substitute* "build.xml"
2825 (("<path id=\"path.build\">")
2826 (string-append "<path id=\"path.build\"><fileset dir=\""
2827 (assoc-ref inputs "java-asm-bootstrap")
2828 "/share/java\" includes=\"**/*.jar\"/>"))
2829 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2830 (("lib/asm-commons-4.0.jar")
2831 (string-append (assoc-ref inputs "java-asm-bootstrap")
2832 "/share/java/asm-6.0.jar"))
2833 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2834 (string-append "<include name=\"org/objectweb/asm/"
2835 "commons/Remap*.class\"/>"
2836 "<include name=\"org/objectweb/asm/*.class\"/>"
2837 "<include name=\"org/objectweb/asm/"
2838 "signature/*.class\"/>"
2839 "<include name=\"org/objectweb/asm/"
2840 "commons/SignatureRemapper.class\"/>")))
2841 #t))
2842 (replace 'install
2843 (lambda* (#:key outputs #:allow-other-keys)
2844 (let ((target (string-append (assoc-ref outputs "out")
2845 "/share/java")))
2846 (install-file (string-append "dist/jarjar-" ,version ".jar")
2847 target))
2848 #t)))))
2849 (inputs
2850 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2851 (native-inputs
2852 `(("unzip" ,unzip)))
2853 (home-page "https://code.google.com/archive/p/jarjar/")
2854 (synopsis "Repackage Java libraries")
2855 (description
2856 "Jar Jar Links is a utility that makes it easy to repackage Java
2857 libraries and embed them into your own distribution. Jar Jar Links includes
2858 an Ant task that extends the built-in @code{jar} task.")
2859 (license license:asl2.0)))
2860
2861 (define-public java-hamcrest-core
2862 (package
2863 (name "java-hamcrest-core")
2864 (version "1.3")
2865 (source (origin
2866 (method url-fetch)
2867 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2868 "archive/hamcrest-java-" version ".tar.gz"))
2869 (sha256
2870 (base32
2871 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2872 (modules '((guix build utils)))
2873 (snippet
2874 '(begin
2875 ;; Delete bundled thirds-party jar archives.
2876 (delete-file-recursively "lib")
2877 #t))))
2878 (build-system ant-build-system)
2879 (arguments
2880 `(#:tests? #f ; Tests require junit
2881 #:modules ((guix build ant-build-system)
2882 (guix build utils)
2883 (srfi srfi-1))
2884 #:make-flags (list (string-append "-Dversion=" ,version))
2885 #:test-target "unit-test"
2886 #:build-target "core"
2887 #:phases
2888 (modify-phases %standard-phases
2889 ;; Disable unit tests, because they require junit, which requires
2890 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2891 ;; attribute from the manifest for reproducibility.
2892 (add-before 'configure 'patch-build.xml
2893 (lambda _
2894 (substitute* "build.xml"
2895 (("unit-test, ") "")
2896 (("\\$\\{build.timestamp\\}") "guix"))
2897 #t))
2898 ;; Java's "getMethods()" returns methods in an unpredictable order.
2899 ;; To make the output of the generated code deterministic we must
2900 ;; sort the array of methods.
2901 (add-after 'unpack 'make-method-order-deterministic
2902 (lambda _
2903 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2904 (("import java\\.util\\.Iterator;" line)
2905 (string-append line "\n"
2906 "import java.util.Arrays; import java.util.Comparator;"))
2907 (("allMethods = cls\\.getMethods\\(\\);" line)
2908 (string-append "_" line
2909 "
2910 private Method[] getSortedMethods() {
2911 Arrays.sort(_allMethods, new Comparator<Method>() {
2912 @Override
2913 public int compare(Method a, Method b) {
2914 return a.toString().compareTo(b.toString());
2915 }
2916 });
2917 return _allMethods;
2918 }
2919
2920 private Method[] allMethods = getSortedMethods();")))
2921 #t))
2922 (add-before 'build 'do-not-use-bundled-qdox
2923 (lambda* (#:key inputs #:allow-other-keys)
2924 (substitute* "build.xml"
2925 (("lib/generator/qdox-1.12.jar")
2926 (string-append (assoc-ref inputs "java-qdox-1.12")
2927 "/share/java/qdox.jar")))
2928 #t))
2929 ;; build.xml searches for .jar files in this directoy, which
2930 ;; we remove from the source archive.
2931 (add-before 'build 'create-dummy-directories
2932 (lambda _
2933 (mkdir-p "lib/integration")
2934 #t))
2935 (replace 'install
2936 (lambda* (#:key outputs #:allow-other-keys)
2937 (let* ((target (string-append (assoc-ref outputs "out")
2938 "/share/java/"))
2939 (version-suffix ,(string-append "-" version ".jar"))
2940 (install-without-version-suffix
2941 (lambda (jar)
2942 (copy-file jar
2943 (string-append target
2944 (basename jar version-suffix)
2945 ".jar")))))
2946 (mkdir-p target)
2947 (for-each
2948 install-without-version-suffix
2949 (find-files "build"
2950 (lambda (name _)
2951 (and (string-suffix? ".jar" name)
2952 (not (string-suffix? "-sources.jar" name)))))))
2953 #t)))))
2954 (native-inputs
2955 `(("java-qdox-1.12" ,java-qdox-1.12)
2956 ("java-jarjar" ,java-jarjar)))
2957 (home-page "http://hamcrest.org/")
2958 (synopsis "Library of matchers for building test expressions")
2959 (description
2960 "This package provides a library of matcher objects (also known as
2961 constraints or predicates) allowing @code{match} rules to be defined
2962 declaratively, to be used in other frameworks. Typical scenarios include
2963 testing frameworks, mocking libraries and UI validation rules.")
2964 (license license:bsd-2)))
2965
2966 (define-public java-junit
2967 (package
2968 (name "java-junit")
2969 (version "4.12")
2970 (source (origin
2971 (method url-fetch)
2972 (uri (string-append "https://github.com/junit-team/junit/"
2973 "archive/r" version ".tar.gz"))
2974 (file-name (string-append name "-" version ".tar.gz"))
2975 (sha256
2976 (base32
2977 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2978 (modules '((guix build utils)))
2979 (snippet
2980 '(begin
2981 ;; Delete bundled jar archives.
2982 (delete-file-recursively "lib")
2983 #t))))
2984 (build-system ant-build-system)
2985 (arguments
2986 `(#:tests? #f ; no tests
2987 #:jar-name "junit.jar"))
2988 (inputs
2989 `(("java-hamcrest-core" ,java-hamcrest-core)))
2990 (home-page "http://junit.org/")
2991 (synopsis "Test framework for Java")
2992 (description
2993 "JUnit is a simple framework to write repeatable tests for Java projects.
2994 JUnit provides assertions for testing expected results, test fixtures for
2995 sharing common test data, and test runners for running tests.")
2996 (license license:epl1.0)))
2997
2998 (define-public java-plexus-utils
2999 (package
3000 (name "java-plexus-utils")
3001 (version "3.0.24")
3002 (source (origin
3003 (method url-fetch)
3004 (uri (string-append "https://github.com/codehaus-plexus/"
3005 "plexus-utils/archive/plexus-utils-"
3006 version ".tar.gz"))
3007 (sha256
3008 (base32
3009 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
3010 (build-system ant-build-system)
3011 ;; FIXME: The default build.xml does not include a target to install
3012 ;; javadoc files.
3013 (arguments
3014 `(#:jar-name "plexus-utils.jar"
3015 #:source-dir "src/main"
3016 #:phases
3017 (modify-phases %standard-phases
3018 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3019 (lambda _
3020 (substitute* "src/main/java/org/codehaus/plexus/util/\
3021 cli/shell/BourneShell.java"
3022 (("/bin/sh") (which "sh"))
3023 (("/usr/") (getcwd)))
3024 #t))
3025 (add-after 'unpack 'fix-or-disable-broken-tests
3026 (lambda _
3027 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3028 (substitute* '("cli/CommandlineTest.java"
3029 "cli/shell/BourneShellTest.java")
3030 (("/bin/sh") (which "sh"))
3031 (("/bin/echo") (which "echo")))
3032
3033 ;; This test depends on MavenProjectStub, but we don't have
3034 ;; a package for Maven.
3035 (delete-file "introspection/ReflectionValueExtractorTest.java")
3036
3037 ;; FIXME: The command line tests fail, maybe because they use
3038 ;; absolute paths.
3039 (delete-file "cli/CommandlineTest.java"))
3040 #t)))))
3041 (native-inputs
3042 `(("java-junit" ,java-junit)))
3043 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3044 (synopsis "Common utilities for the Plexus framework")
3045 (description "This package provides various Java utility classes for the
3046 Plexus framework to ease working with strings, files, command lines, XML and
3047 more.")
3048 (license license:asl2.0)))
3049
3050 (define-public java-plexus-interpolation
3051 (package
3052 (name "java-plexus-interpolation")
3053 (version "1.23")
3054 (source (origin
3055 (method url-fetch)
3056 (uri (string-append "https://github.com/codehaus-plexus/"
3057 "plexus-interpolation/archive/"
3058 "plexus-interpolation-" version ".tar.gz"))
3059 (sha256
3060 (base32
3061 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3062 (build-system ant-build-system)
3063 (arguments
3064 `(#:jar-name "plexus-interpolation.jar"
3065 #:source-dir "src/main"))
3066 (native-inputs
3067 `(("java-junit" ,java-junit)
3068 ("java-hamcrest-core" ,java-hamcrest-core)))
3069 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3070 (synopsis "Java components for interpolating ${} strings and the like")
3071 (description "Plexus interpolator is a modular, flexible interpolation
3072 framework for the expression language style commonly seen in Maven, Plexus,
3073 and other related projects.
3074
3075 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3076 package within @code{plexus-utils}, but has been separated in order to allow
3077 these two libraries to vary independently of one another.")
3078 (license license:asl2.0)))
3079
3080 (define-public java-plexus-classworlds
3081 (package
3082 (name "java-plexus-classworlds")
3083 (version "2.5.2")
3084 (source (origin
3085 (method url-fetch)
3086 (uri (string-append "https://github.com/codehaus-plexus/"
3087 "plexus-classworlds/archive/plexus-classworlds-"
3088 version ".tar.gz"))
3089 (sha256
3090 (base32
3091 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3092 (build-system ant-build-system)
3093 (arguments
3094 `(#:jar-name "plexus-classworlds.jar"
3095 #:source-dir "src/main"
3096 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3097 (native-inputs
3098 `(("java-junit" ,java-junit)))
3099 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3100 (synopsis "Java class loader framework")
3101 (description "Plexus classworlds replaces the native @code{ClassLoader}
3102 mechanism of Java. It is especially useful for dynamic loading of application
3103 components.")
3104 (license license:asl2.0)))
3105
3106 (define java-plexus-container-default-bootstrap
3107 (package
3108 (name "java-plexus-container-default-bootstrap")
3109 (version "1.7.1")
3110 (source (origin
3111 (method url-fetch)
3112 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3113 "/archive/plexus-containers-" version ".tar.gz"))
3114 (sha256
3115 (base32
3116 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3117 (build-system ant-build-system)
3118 (arguments
3119 `(#:jar-name "container-default.jar"
3120 #:source-dir "plexus-container-default/src/main/java"
3121 #:test-dir "plexus-container-default/src/test"
3122 #:jdk ,icedtea-8
3123 #:tests? #f; requires plexus-archiver, which depends on this package
3124 #:phases
3125 (modify-phases %standard-phases
3126 (add-before 'build 'copy-resources
3127 (lambda _
3128 (copy-recursively
3129 "plexus-container-default/src/main/resources/"
3130 "build/classes")
3131 #t)))))
3132 (inputs
3133 `(("worldclass" ,java-plexus-classworlds)
3134 ("xbean" ,java-geronimo-xbean-reflect)
3135 ("utils" ,java-plexus-utils)
3136 ("junit" ,java-junit)
3137 ("guava" ,java-guava)))
3138 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3139 (synopsis "Inversion-of-control container")
3140 (description "Plexus-default-container is Plexus' inversion-of-control
3141 (@dfn{IoC}) container. It is composed of its public API and its default
3142 implementation.")
3143 (license license:asl2.0)))
3144
3145 (define-public java-plexus-io
3146 (package
3147 (name "java-plexus-io")
3148 (version "3.0.0")
3149 (source (origin
3150 (method url-fetch)
3151 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3152 "/archive/plexus-io-" version ".tar.gz"))
3153 (sha256
3154 (base32
3155 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3156 (build-system ant-build-system)
3157 (arguments
3158 `(#:jar-name "plexus-io.jar"
3159 #:source-dir "src/main/java"
3160 #:test-dir "src/test"
3161 #:jdk ,icedtea-8
3162 #:phases
3163 (modify-phases %standard-phases
3164 (add-before 'build 'copy-resources
3165 (lambda _
3166 (mkdir-p "build/classes/META-INF/plexus")
3167 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3168 "build/classes/META-INF/plexus/components.xml")
3169 #t)))))
3170 (inputs
3171 `(("utils" ,java-plexus-utils)
3172 ("commons-io" ,java-commons-io)
3173 ("java-jsr305" ,java-jsr305)))
3174 (native-inputs
3175 `(("junit" ,java-junit)
3176 ("hamcrest" ,java-hamcrest-core)
3177 ("guava" ,java-guava)
3178 ("classworlds" ,java-plexus-classworlds)
3179 ("xbean" ,java-geronimo-xbean-reflect)
3180 ("container-default" ,java-plexus-container-default-bootstrap)))
3181 (home-page "https://github.com/codehaus-plexus/plexus-io")
3182 (synopsis "I/O plexus components")
3183 (description "Plexus IO is a set of plexus components, which are designed
3184 for use in I/O operations. This implementation using plexus components allows
3185 reusing it in maven.")
3186 (license license:asl2.0)))
3187
3188 (define-public java-plexus-archiver
3189 (package
3190 (name "java-plexus-archiver")
3191 (version "3.5")
3192 (source (origin
3193 (method url-fetch)
3194 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3195 "/archive/plexus-archiver-" version ".tar.gz"))
3196 (sha256
3197 (base32
3198 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3199 (build-system ant-build-system)
3200 (arguments
3201 `(#:jar-name "plexus-archiver.jar"
3202 #:source-dir "src/main/java"
3203 #:jdk ,icedtea-8
3204 #:test-dir "src/test"
3205 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3206 #:phases
3207 (modify-phases %standard-phases
3208 (add-before 'check 'remove-failing
3209 (lambda _
3210 ;; Requires an older version of plexus container
3211 (delete-file
3212 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3213 #t))
3214 (add-before 'build 'copy-resources
3215 (lambda _
3216 (mkdir-p "build/classes/META-INF/plexus")
3217 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3218 "build/classes/META-INF/plexus/components.xml")
3219 #t)))))
3220 (inputs
3221 `(("utils" ,java-plexus-utils)
3222 ("commons-io" ,java-commons-io)
3223 ("snappy" ,java-iq80-snappy)
3224 ("io" ,java-plexus-io)
3225 ("compress" ,java-commons-compress)
3226 ("container-default" ,java-plexus-container-default-bootstrap)
3227 ("snappy" ,java-snappy)
3228 ("java-jsr305" ,java-jsr305)))
3229 (native-inputs
3230 `(("junit" ,java-junit)
3231 ("classworld" ,java-plexus-classworlds)
3232 ("xbean" ,java-geronimo-xbean-reflect)
3233 ("xz" ,java-tukaani-xz)
3234 ("guava" ,java-guava)))
3235 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3236 (synopsis "Archiver component of the Plexus project")
3237 (description "Plexus-archiver contains a component to deal with project
3238 archives (jar).")
3239 (license license:asl2.0)))
3240
3241 (define-public java-plexus-container-default
3242 (package
3243 (inherit java-plexus-container-default-bootstrap)
3244 (name "java-plexus-container-default")
3245 (arguments
3246 `(#:jar-name "container-default.jar"
3247 #:source-dir "plexus-container-default/src/main/java"
3248 #:test-dir "plexus-container-default/src/test"
3249 #:test-exclude (list ;"**/*Test.java"
3250 "**/Abstract*.java"
3251 ;; Requires plexus-hierarchy
3252 "**/PlexusHierarchyTest.java"
3253 ;; Failures
3254 "**/ComponentRealmCompositionTest.java"
3255 "**/PlexusContainerTest.java")
3256 #:jdk ,icedtea-8
3257 #:phases
3258 (modify-phases %standard-phases
3259 (add-before 'build 'copy-resources
3260 (lambda _
3261 (copy-recursively
3262 "plexus-container-default/src/main/resources/"
3263 "build/classes")
3264 #t))
3265 (add-before 'check 'fix-paths
3266 (lambda _
3267 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3268 (substitute*
3269 (string-append
3270 dir "/plexus/component/composition/"
3271 "ComponentRealmCompositionTest.java")
3272 (("src/test") "plexus-container-default/src/test"))
3273 #t))))))
3274 (inputs
3275 `(("worldclass" ,java-plexus-classworlds)
3276 ("xbean" ,java-geronimo-xbean-reflect)
3277 ("utils" ,java-plexus-utils)
3278 ("junit" ,java-junit)
3279 ("guava" ,java-guava)))
3280 (native-inputs
3281 `(("archiver" ,java-plexus-archiver)
3282 ("hamcrest" ,java-hamcrest-core)))))
3283
3284 (define-public java-plexus-component-annotations
3285 (package
3286 (inherit java-plexus-container-default)
3287 (name "java-plexus-component-annotations")
3288 (arguments
3289 `(#:jar-name "plexus-component-annotations.jar"
3290 #:source-dir "plexus-component-annotations/src/main/java"
3291 #:tests? #f)); no tests
3292 (inputs '())
3293 (native-inputs '())
3294 (synopsis "Plexus descriptors generator")
3295 (description "This package is a Maven plugin to generate Plexus descriptors
3296 from source tags and class annotations.")))
3297
3298 (define-public java-plexus-cipher
3299 (package
3300 (name "java-plexus-cipher")
3301 (version "1.7")
3302 (source (origin
3303 (method url-fetch)
3304 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3305 "/archive/plexus-cipher-" version ".tar.gz"))
3306 (sha256
3307 (base32
3308 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3309 (build-system ant-build-system)
3310 (arguments
3311 `(#:jar-name "plexus-cipher.jar"
3312 #:source-dir "src/main/java"
3313 #:jdk ,icedtea-8
3314 #:tests? #f; FIXME: requires sisu-inject-bean
3315 #:phases
3316 (modify-phases %standard-phases
3317 (add-before 'build 'copy-resources
3318 (lambda _
3319 (copy-recursively "src/main/resources" "build/classes")
3320 (mkdir-p "build/classes/META-INF/sisu")
3321 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3322 (lambda _
3323 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3324 #t)))))
3325 (inputs
3326 `(("java-cdi-api" ,java-cdi-api)
3327 ("java-javax-inject" ,java-javax-inject)))
3328 (home-page "https://github.com/sonatype/plexus-cipher")
3329 (synopsis "Encryption/decryption Component")
3330 (description "Plexus-cipher contains a component to deal with encryption
3331 and decryption.")
3332 (license license:asl2.0)))
3333
3334 (define-public java-plexus-compiler-api
3335 (package
3336 (name "java-plexus-compiler-api")
3337 (version "2.8.4")
3338 (source (origin
3339 (method url-fetch)
3340 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3341 "/archive/plexus-compiler-" version ".tar.gz"))
3342 (sha256
3343 (base32
3344 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3345 (build-system ant-build-system)
3346 (arguments
3347 `(#:jar-name "plexus-compiler-api.jar"
3348 #:source-dir "plexus-compiler-api/src/main/java"
3349 #:jdk ,icedtea-8
3350 #:test-dir "plexus-compiler-api/src/test"))
3351 (inputs
3352 `(("java-plexus-container-default" ,java-plexus-container-default)
3353 ("java-plexus-util" ,java-plexus-utils)))
3354 (native-inputs
3355 `(("java-junit" ,java-junit)))
3356 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3357 (synopsis "Plexus Compilers component's API to manipulate compilers")
3358 (description "This package contains the API used by components to manipulate
3359 compilers.")
3360 (license (list license:asl2.0
3361 license:expat))))
3362
3363 (define-public java-plexus-compiler-javac
3364 (package
3365 (inherit java-plexus-compiler-api)
3366 (name "java-plexus-compiler-javac")
3367 (arguments
3368 `(#:jar-name "plexus-compiler-javac.jar"
3369 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3370 #:jdk ,icedtea-8
3371 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3372 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3373 (inputs
3374 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3375 ("java-plexus-utils" ,java-plexus-utils)
3376 ("java-plexus-container-default" ,java-plexus-container-default)))
3377 (native-inputs
3378 `(("java-junit" ,java-junit)))
3379 (synopsis "Javac Compiler support for Plexus Compiler component")
3380 (description "This package contains the Javac Compiler support for Plexus
3381 Compiler component.")))
3382
3383 (define-public java-plexus-sec-dispatcher
3384 (package
3385 (name "java-plexus-sec-dispatcher")
3386 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3387 (source (origin
3388 ;; This project doesn't tag releases or publish tarballs, so we take
3389 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3390 (method url-fetch)
3391 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3392 "archive/7db8f88048.tar.gz"))
3393 (sha256
3394 (base32
3395 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3396 (file-name (string-append name "-" version ".tar.gz"))))
3397 (arguments
3398 `(#:jar-name "plexus-sec-dispatcher.jar"
3399 #:source-dir "src/main/java"
3400 #:jdk ,icedtea-8
3401 #:phases
3402 (modify-phases %standard-phases
3403 (add-before 'build 'generate-models
3404 (lambda* (#:key inputs #:allow-other-keys)
3405 (define (modello-single-mode file version mode)
3406 (invoke "java"
3407 "org.codehaus.modello.ModelloCli"
3408 file mode "src/main/java" version
3409 "false" "true"))
3410 (let ((file "src/main/mdo/settings-security.mdo"))
3411 (modello-single-mode file "1.0.0" "java")
3412 (modello-single-mode file "1.0.0" "xpp3-reader")
3413 (modello-single-mode file "1.0.0" "xpp3-writer"))
3414 #t))
3415 (add-before 'build 'generate-components.xml
3416 (lambda _
3417 (mkdir-p "build/classes/META-INF/plexus")
3418 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3419 (lambda _
3420 (display
3421 "<component-set>\n
3422 <components>\n
3423 <component>\n
3424 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3425 <role-hint>default</role-hint>\n
3426 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3427 <description></description>\n
3428 <requirements>\n
3429 <requirement>\n
3430 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3431 <field-name>_cipher</field-name>\n
3432 </requirement>\n
3433 <requirement>\n
3434 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3435 <field-name>_decryptors</field-name>\n
3436 </requirement>\n
3437 </requirements>\n
3438 <configuration>\n
3439 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3440 </configuration>\n
3441 </component>\n
3442 </components>\n
3443 </component-set>\n")))
3444 #t))
3445 (add-before 'check 'fix-paths
3446 (lambda _
3447 (copy-recursively "src/test/resources" "target")
3448 #t)))))
3449 (inputs
3450 `(("java-plexus-cipher" ,java-plexus-cipher)))
3451 (native-inputs
3452 `(("java-modello-core" ,java-modello-core)
3453 ;; for modello:
3454 ("java-plexus-container-default" ,java-plexus-container-default)
3455 ("java-plexus-classworlds" ,java-plexus-classworlds)
3456 ("java-plexus-utils" ,java-plexus-utils)
3457 ("java-guava" ,java-guava)
3458 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3459 ("java-sisu-build-api" ,java-sisu-build-api)
3460 ;; modello plugins:
3461 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3462 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3463 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3464 ;; for tests
3465 ("java-junit" ,java-junit)))
3466 (build-system ant-build-system)
3467 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3468 (synopsis "Plexus Security Dispatcher Component")
3469 (description "This package is the Plexus Security Dispatcher Component.
3470 This component decrypts a string passed to it.")
3471 (license license:asl2.0)))
3472
3473 (define-public java-plexus-cli
3474 (package
3475 (name "java-plexus-cli")
3476 (version "1.7")
3477 (source (origin
3478 (method git-fetch)
3479 (uri (git-reference
3480 (url "https://github.com/sonatype/plexus-cli")
3481 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3482 (file-name (string-append name "-" version))
3483 (sha256
3484 (base32
3485 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3486 (build-system ant-build-system)
3487 (arguments
3488 `(#:jar-name "plexus-cli.jar"
3489 #:source-dir "src/main/java"
3490 #:jdk ,icedtea-8
3491 #:test-dir "src/test"))
3492 (inputs
3493 `(("java-commons-cli" ,java-commons-cli)
3494 ("java-plexus-container-default" ,java-plexus-container-default)
3495 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3496 (native-inputs
3497 `(("java-plexus-utils" ,java-plexus-utils)
3498 ("java-junit" ,java-junit)
3499 ("java-guava" ,java-guava)))
3500 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3501 (synopsis "CLI building library for plexus")
3502 (description "This package is a library to help creating CLI around
3503 Plexus components.")
3504 (license license:asl2.0)))
3505
3506 (define-public java-sisu-build-api
3507 (package
3508 (name "java-sisu-build-api")
3509 (version "0.0.7")
3510 (source (origin
3511 (method url-fetch)
3512 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3513 "archive/plexus-build-api-" version ".tar.gz"))
3514 (sha256
3515 (base32
3516 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3517 (build-system ant-build-system)
3518 (arguments
3519 `(#:jar-name "sisu-build-api.jar"
3520 #:source-dir "src/main/java"
3521 #:jdk ,icedtea-8
3522 #:tests? #f; FIXME: how to run the tests?
3523 #:phases
3524 (modify-phases %standard-phases
3525 (add-before 'build 'copy-resources
3526 (lambda _
3527 (copy-recursively "src/main/resources" "build/classes")
3528 (substitute* (find-files "build/classes")
3529 (("\\$\\{project.version\\}") ,version))
3530 #t))
3531 (add-before 'build 'generate-plexus-compontent
3532 (lambda _
3533 (mkdir-p "build/classes/META-INF/plexus")
3534 ;; This file is required for plexus to inject this package.
3535 ;; FIXME: how is it generated?
3536 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3537 (lambda _
3538 (display
3539 "<component-set>\n
3540 <components>\n
3541 <component>\n
3542 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3543 <role-hint>default</role-hint>\n
3544 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3545 <description>Filesystem based non-incremental build context implementation\n
3546 which behaves as if all files were just created.</description>\n
3547 </component>\n
3548 </components>\n
3549 </component-set>\n")))
3550 #t)))))
3551 (inputs
3552 `(("java-plexus-utils" ,java-plexus-utils)
3553 ("java-plexus-container-default" ,java-plexus-container-default)))
3554 (home-page "https://github.com/sonatype/sisu-build-api/")
3555 (synopsis "Base build API for maven")
3556 (description "This package contains the base build API for maven and
3557 a default implementation of it. This API is about scanning files in a
3558 project and determining what files need to be rebuilt.")
3559 (license license:asl2.0)))
3560
3561 (define-public java-modello-core
3562 (package
3563 (name "java-modello-core")
3564 (version "1.9.1")
3565 (source (origin
3566 (method url-fetch)
3567 (uri (string-append "https://github.com/codehaus-plexus/modello"
3568 "/archive/modello-" version ".tar.gz"))
3569 (sha256
3570 (base32
3571 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3572 (build-system ant-build-system)
3573 (arguments
3574 `(#:jar-name "modello-core.jar"
3575 #:source-dir "modello-core/src/main/java"
3576 #:test-dir "modello-core/src/test"
3577 #:main-class "org.codehaus.modello.ModelloCli"
3578 #:jdk ,icedtea-8
3579 #:phases
3580 (modify-phases %standard-phases
3581 (add-before 'build 'copy-resources
3582 (lambda _
3583 (mkdir-p "build/classes/META-INF/plexus")
3584 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3585 "build/classes/META-INF/plexus/components.xml")
3586 #t))
3587 (add-before 'check 'fix-tests
3588 (lambda _
3589 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3590 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3591 "modello/core/io/ModelReaderTest.java")
3592 (("src/test") "modello-core/src/test")))
3593 #t)))))
3594 (inputs
3595 `(("java-plexus-utils" ,java-plexus-utils)
3596 ("java-plexus-container-default" ,java-plexus-container-default)
3597 ("java-sisu-build-api" ,java-sisu-build-api)))
3598 (native-inputs
3599 `(("java-junit" ,java-junit)
3600 ("java-plexus-classworlds" ,java-plexus-classworlds)
3601 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3602 ("java-guava" ,java-guava)))
3603 (home-page "http://codehaus-plexus.github.io/modello/")
3604 (synopsis "Framework for code generation from a simple model")
3605 (description "Modello is a framework for code generation from a simple model.
3606
3607 Modello generates code from a simple model format: based on a plugin
3608 architecture, various types of code and descriptors can be generated from the
3609 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3610 XSD and documentation.")
3611 (license (list
3612 license:expat
3613 ;; Although this package uses only files licensed under expat,
3614 ;; other parts of the source are licensed under different
3615 ;; licenses. We include them to be inherited by other packages.
3616 license:asl2.0
3617 ;; Some files in modello-plugin-java are licensed under a
3618 ;; 5-clause BSD license.
3619 (license:non-copyleft
3620 (string-append "file:///modello-plugins/modello-plugin-java/"
3621 "src/main/java/org/codehaus/modello/plugin/"
3622 "java/javasource/JNaming.java"))))))
3623
3624 (define-public java-modello-plugins-java
3625 (package
3626 (inherit java-modello-core)
3627 (name "java-modello-plugins-java")
3628 (arguments
3629 `(#:jar-name "modello-plugins-java.jar"
3630 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3631 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3632 #:jdk ,icedtea-8
3633 #:tests? #f; requires maven-model, which depends on this package
3634 #:phases
3635 (modify-phases %standard-phases
3636 (add-before 'build 'copy-resources
3637 (lambda _
3638 (mkdir-p "build/classes")
3639 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3640 "build/classes")
3641 #t)))))
3642 (inputs
3643 `(("java-modello-core" ,java-modello-core)
3644 ,@(package-inputs java-modello-core)))
3645 (synopsis "Modello Java Plugin")
3646 (description "Modello Java Plugin generates Java objects for the model.")))
3647
3648 (define-public java-modello-plugins-xml
3649 (package
3650 (inherit java-modello-core)
3651 (name "java-modello-plugins-xml")
3652 (arguments
3653 `(#:jar-name "modello-plugins-xml.jar"
3654 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3655 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3656 #:jdk ,icedtea-8
3657 #:phases
3658 (modify-phases %standard-phases
3659 (add-before 'build 'copy-resources
3660 (lambda _
3661 (mkdir-p "build/classes")
3662 (copy-recursively
3663 "modello-plugins/modello-plugin-xml/src/main/resources"
3664 "build/classes")
3665 #t))
3666 (add-before 'check 'fix-paths
3667 (lambda _
3668 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3669 (substitute*
3670 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3671 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
3672 #t)))))
3673 (inputs
3674 `(("java-modello-core" ,java-modello-core)
3675 ("java-modello-plugins-java" ,java-modello-plugins-java)
3676 ,@(package-inputs java-modello-core)))
3677 (synopsis "Modello XML Plugin")
3678 (description "Modello XML Plugin contains shared code for every plugins
3679 working on XML representation of the model.")))
3680
3681 (define-public java-modello-test
3682 (package
3683 (inherit java-modello-core)
3684 (name "java-modello-test")
3685 (arguments
3686 `(#:jar-name "modello-test.jar"
3687 #:source-dir "modello-test/src/main/java"
3688 #:tests? #f; no tests
3689 #:jdk ,icedtea-8))
3690 (inputs
3691 `(("java-plexus-utils" ,java-plexus-utils)
3692 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3693 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3694 ("java-plexus-container-default" ,java-plexus-container-default)))
3695 (synopsis "Modello test package")
3696 (description "The modello test package contains the basis to create
3697 Modello generator unit-tests, including sample models and xml files to test
3698 every feature for every plugin.")))
3699
3700 (define-public java-modello-plugins-xpp3
3701 (package
3702 (inherit java-modello-core)
3703 (name "java-modello-plugins-xpp3")
3704 (arguments
3705 `(#:jar-name "modello-plugins-xpp3.jar"
3706 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3707 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3708 ;; One of the test dependencies is maven-model which depends on this package.
3709 #:tests? #f
3710 #:jdk ,icedtea-8
3711 #:phases
3712 (modify-phases %standard-phases
3713 (add-before 'build 'copy-resources
3714 (lambda _
3715 (mkdir-p "build/classes")
3716 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3717 "build/classes")
3718 #t)))))
3719 (inputs
3720 `(("java-modello-core" ,java-modello-core)
3721 ("java-modello-plugins-java" ,java-modello-plugins-java)
3722 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3723 ,@(package-inputs java-modello-core)))
3724 (native-inputs
3725 `(("java-xmlunit" ,java-xmlunit)
3726 ("java-modello-test" ,java-modello-test)
3727 ,@(package-native-inputs java-modello-core)))
3728 (synopsis "Modello XPP3 Plugin")
3729 (description "The modello XPP3 plugin generates XML readers and writers based
3730 on the XPP3 API (XML Pull Parser).")))
3731
3732 (define-public java-asm
3733 (package
3734 (name "java-asm")
3735 (version "6.0")
3736 (source (origin
3737 (method url-fetch)
3738 (uri (string-append "http://download.forge.ow2.org/asm/"
3739 "asm-" version ".tar.gz"))
3740 (sha256
3741 (base32
3742 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3743 (build-system ant-build-system)
3744 (propagated-inputs
3745 `(("java-aqute-bndlib" ,java-aqute-bndlib)
3746 ("java-aqute-libg" ,java-aqute-libg)))
3747 (arguments
3748 `(#:build-target "compile"
3749 ;; The tests require an old version of Janino, which no longer compiles
3750 ;; with the JDK7.
3751 #:tests? #f
3752 #:make-flags
3753 (list
3754 ;; We don't need these extra ant tasks, but the build system asks us to
3755 ;; provide a path anyway.
3756 "-Dobjectweb.ant.tasks.path=dummy-path"
3757 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3758 ;; used during the build automatically by ant-build-system, but
3759 ;; java-asm's build.xml fails unless we provide something here.
3760 "-Dbiz.aQute.bnd.path=dummy-path")
3761 #:phases
3762 (modify-phases %standard-phases
3763 (add-before 'install 'build-jars
3764 (lambda* (#:key make-flags #:allow-other-keys)
3765 ;; We cannot use the "jar" target because it depends on a couple
3766 ;; of unpackaged, complicated tools.
3767 (mkdir "dist")
3768 (invoke "jar"
3769 "-cf" (string-append "dist/asm-" ,version ".jar")
3770 "-C" "output/build/tmp" ".")))
3771 (replace 'install
3772 (install-jars "dist")))))
3773 (native-inputs
3774 `(("java-junit" ,java-junit)))
3775 (home-page "http://asm.ow2.org/")
3776 (synopsis "Very small and fast Java bytecode manipulation framework")
3777 (description "ASM is an all purpose Java bytecode manipulation and
3778 analysis framework. It can be used to modify existing classes or dynamically
3779 generate classes, directly in binary form. The provided common
3780 transformations and analysis algorithms allow to easily assemble custom
3781 complex transformations and code analysis tools.")
3782 (license license:bsd-3)))
3783
3784 (define java-asm-bootstrap
3785 (package
3786 (inherit java-asm)
3787 (name "java-asm-bootstrap")
3788 (arguments
3789 (substitute-keyword-arguments (package-arguments java-asm)
3790 ((#:tests? _) #f)))
3791 (native-inputs `())
3792 (propagated-inputs
3793 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3794 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3795 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3796 (delete `("java-aqute-libg" ,java-aqute-libg)
3797 (package-inputs java-asm)))))))
3798
3799 (define-public java-cglib
3800 (package
3801 (name "java-cglib")
3802 (version "3.2.4")
3803 (source (origin
3804 (method url-fetch)
3805 (uri (string-append
3806 "https://github.com/cglib/cglib/archive/RELEASE_"
3807 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3808 ".tar.gz"))
3809 (file-name (string-append "cglib-" version ".tar.gz"))
3810 (sha256
3811 (base32
3812 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3813 (build-system ant-build-system)
3814 (arguments
3815 `(;; FIXME: tests fail because junit runs
3816 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3817 ;; to describe a test at all.
3818 #:tests? #f
3819 #:jar-name "cglib.jar"
3820 #:phases
3821 (modify-phases %standard-phases
3822 (add-after 'unpack 'chdir
3823 (lambda _ (chdir "cglib") #t)))))
3824 (inputs
3825 `(("java-asm" ,java-asm)
3826 ("java-junit" ,java-junit)))
3827 (home-page "https://github.com/cglib/cglib/")
3828 (synopsis "Java byte code generation library")
3829 (description "The byte code generation library CGLIB is a high level API
3830 to generate and transform Java byte code.")
3831 (license license:asl2.0)))
3832
3833 (define-public java-objenesis
3834 (package
3835 (name "java-objenesis")
3836 (version "2.5.1")
3837 (source (origin
3838 (method url-fetch)
3839 (uri (string-append "https://github.com/easymock/objenesis/"
3840 "archive/" version ".tar.gz"))
3841 (file-name (string-append "objenesis-" version ".tar.gz"))
3842 (sha256
3843 (base32
3844 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3845 (build-system ant-build-system)
3846 (arguments
3847 `(#:jar-name "objenesis.jar"
3848 #:source-dir "main/src/"
3849 #:test-dir "main/src/test/"))
3850 (native-inputs
3851 `(("java-junit" ,java-junit)
3852 ("java-hamcrest-core" ,java-hamcrest-core)))
3853 (home-page "http://objenesis.org/")
3854 (synopsis "Bypass the constructor when creating an object")
3855 (description "Objenesis is a small Java library that serves one purpose:
3856 to instantiate a new object of a particular class. It is common to see
3857 restrictions in libraries stating that classes must require a default
3858 constructor. Objenesis aims to overcome these restrictions by bypassing the
3859 constructor on object instantiation.")
3860 (license license:asl2.0)))
3861
3862 (define-public java-easymock
3863 (package
3864 (name "java-easymock")
3865 (version "3.4")
3866 (source (origin
3867 (method url-fetch)
3868 (uri (string-append "https://github.com/easymock/easymock/"
3869 "archive/easymock-" version ".tar.gz"))
3870 (sha256
3871 (base32
3872 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3873 (build-system ant-build-system)
3874 (arguments
3875 `(#:jar-name "easymock.jar"
3876 #:source-dir "core/src/main"
3877 #:test-dir "core/src/test"
3878 #:phases
3879 (modify-phases %standard-phases
3880 ;; FIXME: Android support requires the following packages to be
3881 ;; available: com.google.dexmaker.stock.ProxyBuilder
3882 (add-after 'unpack 'delete-android-support
3883 (lambda _
3884 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3885 (substitute* "MocksControl.java"
3886 (("AndroidSupport.isAndroid\\(\\)") "false")
3887 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3888 (delete-file "AndroidClassProxyFactory.java"))
3889 #t))
3890 (add-after 'unpack 'delete-broken-tests
3891 (lambda _
3892 (with-directory-excursion "core/src/test/java/org/easymock"
3893 ;; This test depends on dexmaker.
3894 (delete-file "tests2/ClassExtensionHelperTest.java")
3895
3896 ;; This is not a test.
3897 (delete-file "tests/BaseEasyMockRunnerTest.java")
3898
3899 ;; This test should be executed with a different runner...
3900 (delete-file "tests2/EasyMockAnnotationsTest.java")
3901 ;; ...but deleting it means that we also have to delete these
3902 ;; dependent files.
3903 (delete-file "tests2/EasyMockRunnerTest.java")
3904 (delete-file "tests2/EasyMockRuleTest.java")
3905
3906 ;; This test fails because the file "easymock.properties" does
3907 ;; not exist.
3908 (delete-file "tests2/EasyMockPropertiesTest.java"))
3909 #t)))))
3910 (inputs
3911 `(("java-asm" ,java-asm)
3912 ("java-cglib" ,java-cglib)
3913 ("java-objenesis" ,java-objenesis)))
3914 (native-inputs
3915 `(("java-junit" ,java-junit)
3916 ("java-hamcrest-core" ,java-hamcrest-core)))
3917 (home-page "http://easymock.org")
3918 (synopsis "Java library providing mock objects for unit tests")
3919 (description "EasyMock is a Java library that provides an easy way to use
3920 mock objects in unit testing.")
3921 (license license:asl2.0)))
3922
3923 (define-public java-jmock-1
3924 (package
3925 (name "java-jmock")
3926 (version "1.2.0")
3927 (source (origin
3928 (method url-fetch)
3929 (uri (string-append "https://github.com/jmock-developers/"
3930 "jmock-library/archive/" version ".tar.gz"))
3931 (file-name (string-append "jmock-" version ".tar.gz"))
3932 (sha256
3933 (base32
3934 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3935 (build-system ant-build-system)
3936 (arguments
3937 `(#:build-target "jars"
3938 #:test-target "run.tests"
3939 #:phases
3940 (modify-phases %standard-phases
3941 (replace 'install (install-jars "build")))))
3942 (home-page "http://www.jmock.org")
3943 (synopsis "Mock object library for test-driven development")
3944 (description "JMock is a library that supports test-driven development of
3945 Java code with mock objects. Mock objects help you design and test the
3946 interactions between the objects in your programs.
3947
3948 The jMock library
3949
3950 @itemize
3951 @item makes it quick and easy to define mock objects
3952 @item lets you precisely specify the interactions between
3953 your objects, reducing the brittleness of your tests
3954 @item plugs into your favourite test framework
3955 @item is easy to extend.
3956 @end itemize\n")
3957 (license license:bsd-3)))
3958
3959 (define-public java-jmock
3960 (package
3961 (inherit java-jmock-1)
3962 (name "java-jmock")
3963 (version "2.8.2")
3964 (source (origin
3965 (method url-fetch)
3966 (uri (string-append "https://github.com/jmock-developers/"
3967 "jmock-library/archive/" version ".tar.gz"))
3968 (file-name (string-append name "-" version ".tar.gz"))
3969 (sha256
3970 (base32
3971 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3972 (inputs
3973 `(("java-hamcrest-all" ,java-hamcrest-all)
3974 ("java-asm" ,java-asm)
3975 ("java-bsh" ,java-bsh)
3976 ("java-junit" ,java-junit)))
3977 (native-inputs
3978 `(("cglib" ,java-cglib)))
3979 (arguments
3980 `(#:jar-name "java-jmock.jar"
3981 #:source-dir "jmock/src/main/java"
3982 #:test-dir "jmock/src/test"))))
3983
3984 (define-public java-jmock-junit4
3985 (package
3986 (inherit java-jmock)
3987 (name "java-jmock-junit4")
3988 (arguments
3989 `(#:jar-name "java-jmock-junit4.jar"
3990 #:source-dir "jmock-junit4/src/main/java"
3991 #:test-dir "jmock-junit4/src/test"))
3992 (inputs
3993 `(("java-hamcrest-all" ,java-hamcrest-all)
3994 ("java-asm" ,java-asm)
3995 ("java-bsh" ,java-bsh)
3996 ("java-jmock" ,java-jmock)
3997 ("java-jumit" ,java-junit)))))
3998
3999 (define-public java-jmock-legacy
4000 (package
4001 (inherit java-jmock)
4002 (name "java-jmock-legacy")
4003 (arguments
4004 `(#:jar-name "java-jmock-legacy.jar"
4005 #:source-dir "jmock-legacy/src/main/java"
4006 #:test-dir "jmock-legacy/src/test"
4007 #:phases
4008 (modify-phases %standard-phases
4009 (add-before 'check 'copy-tests
4010 (lambda _
4011 ;; This file is a dependancy of some tests
4012 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4013 (copy-file (string-append "jmock/src/test/java/" file)
4014 (string-append "jmock-legacy/src/test/java/" file))
4015 #t))))))
4016 (inputs
4017 `(("java-hamcrest-all" ,java-hamcrest-all)
4018 ("java-objenesis" ,java-objenesis)
4019 ("java-cglib" ,java-cglib)
4020 ("java-jmock" ,java-jmock)
4021 ("java-asm" ,java-asm)
4022 ("java-bsh" ,java-bsh)
4023 ("java-junit" ,java-junit)))
4024 (native-inputs
4025 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4026
4027 (define-public java-hamcrest-all
4028 (package (inherit java-hamcrest-core)
4029 (name "java-hamcrest-all")
4030 (arguments
4031 `(#:jdk ,icedtea-8
4032 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4033 ((#:build-target _) "bigjar")
4034 ((#:phases phases)
4035 `(modify-phases ,phases
4036 ;; Some build targets override the classpath, so we need to patch
4037 ;; the build.xml to ensure that required dependencies are on the
4038 ;; classpath.
4039 (add-after 'unpack 'patch-classpath-for-integration
4040 (lambda* (#:key inputs #:allow-other-keys)
4041 (substitute* "build.xml"
4042 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4043 (string-join
4044 (cons line
4045 (append
4046 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4047 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4048 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4049 ";"))
4050 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4051 (string-append (assoc-ref inputs "java-hamcrest-core")
4052 "/share/java/hamcrest-core.jar")))
4053 #t)))))))
4054 (inputs
4055 `(("java-junit" ,java-junit)
4056 ("java-jmock" ,java-jmock-1)
4057 ;; This is necessary because of what seems to be a race condition.
4058 ;; This package would sometimes fail to build because hamcrest-core.jar
4059 ;; could not be found, even though it is built as part of this package.
4060 ;; Adding java-hamcrest-core appears to fix this problem. See
4061 ;; https://debbugs.gnu.org/31390 for more information.
4062 ("java-hamcrest-core" ,java-hamcrest-core)
4063 ("java-easymock" ,java-easymock)
4064 ,@(package-inputs java-hamcrest-core)))))
4065
4066 (define-public java-jopt-simple
4067 (package
4068 (name "java-jopt-simple")
4069 (version "5.0.3")
4070 (source (origin
4071 (method url-fetch)
4072 (uri (string-append "http://repo1.maven.org/maven2/"
4073 "net/sf/jopt-simple/jopt-simple/"
4074 version "/jopt-simple-"
4075 version "-sources.jar"))
4076 (sha256
4077 (base32
4078 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4079 (build-system ant-build-system)
4080 (arguments
4081 `(#:tests? #f ; there are no tests
4082 #:jar-name "jopt-simple.jar"))
4083 (home-page "https://pholser.github.io/jopt-simple/")
4084 (synopsis "Java library for parsing command line options")
4085 (description "JOpt Simple is a Java library for parsing command line
4086 options, such as those you might pass to an invocation of @code{javac}. In
4087 the interest of striving for simplicity, as closely as possible JOpt Simple
4088 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4089 GNU @code{getopt_long}. It also aims to make option parser configuration and
4090 retrieval of options and their arguments simple and expressive, without being
4091 overly clever.")
4092 (license license:expat)))
4093
4094 (define-public java-commons-math3
4095 (package
4096 (name "java-commons-math3")
4097 (version "3.6.1")
4098 (source (origin
4099 (method url-fetch)
4100 (uri (string-append "mirror://apache/commons/math/source/"
4101 "commons-math3-" version "-src.tar.gz"))
4102 (sha256
4103 (base32
4104 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4105 (build-system ant-build-system)
4106 (arguments
4107 `(#:build-target "jar"
4108 #:test-target "test"
4109 #:make-flags
4110 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4111 (junit (assoc-ref %build-inputs "java-junit")))
4112 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4113 (string-append "-Dhamcrest.jar=" hamcrest
4114 "/share/java/hamcrest-core.jar")))
4115 #:phases
4116 (modify-phases %standard-phases
4117 ;; We want to build the jar in the build phase and run the tests
4118 ;; later in a separate phase.
4119 (add-after 'unpack 'untangle-targets
4120 (lambda _
4121 (substitute* "build.xml"
4122 (("name=\"jar\" depends=\"test\"")
4123 "name=\"jar\" depends=\"compile\""))
4124 #t))
4125 ;; There is no install target.
4126 (replace 'install
4127 (install-jars "target")))))
4128 (native-inputs
4129 `(("java-junit" ,java-junit)
4130 ("java-hamcrest-core" ,java-hamcrest-core)))
4131 (home-page "http://commons.apache.org/math/")
4132 (synopsis "Apache Commons mathematics library")
4133 (description "Commons Math is a library of lightweight, self-contained
4134 mathematics and statistics components addressing the most common problems not
4135 available in the Java programming language or Commons Lang.")
4136 (license license:asl2.0)))
4137
4138 (define-public java-jmh
4139 (package
4140 (name "java-jmh")
4141 (version "1.17.5")
4142 (source (origin
4143 (method hg-fetch)
4144 (uri (hg-reference
4145 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4146 (changeset version)))
4147 (file-name (string-append name "-" version "-checkout"))
4148 (sha256
4149 (base32
4150 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4151 (build-system ant-build-system)
4152 (arguments
4153 `(#:jar-name "jmh-core.jar"
4154 #:source-dir "jmh-core/src/main"
4155 #:test-dir "jmh-core/src/test"
4156 #:phases
4157 (modify-phases %standard-phases
4158 ;; This seems to be a bug in the JDK. It may not be necessary in
4159 ;; future versions of the JDK.
4160 (add-after 'unpack 'fix-bug
4161 (lambda _
4162 (with-directory-excursion
4163 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4164 (substitute* '("IntegerValueConverter.java"
4165 "ThreadsValueConverter.java")
4166 (("public Class<Integer> valueType")
4167 "public Class<? extends Integer> valueType")))
4168 #t)))))
4169 (inputs
4170 `(("java-jopt-simple" ,java-jopt-simple)
4171 ("java-commons-math3" ,java-commons-math3)))
4172 (native-inputs
4173 `(("java-junit" ,java-junit)
4174 ("java-hamcrest-core" ,java-hamcrest-core)))
4175 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4176 (synopsis "Benchmark harness for the JVM")
4177 (description "JMH is a Java harness for building, running, and analysing
4178 nano/micro/milli/macro benchmarks written in Java and other languages
4179 targeting the JVM.")
4180 ;; GPLv2 only
4181 (license license:gpl2)))
4182
4183 (define-public java-commons-collections4
4184 (package
4185 (name "java-commons-collections4")
4186 (version "4.1")
4187 (source (origin
4188 (method url-fetch)
4189 (uri (string-append "mirror://apache/commons/collections/source/"
4190 "commons-collections4-" version "-src.tar.gz"))
4191 (sha256
4192 (base32
4193 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4194 (build-system ant-build-system)
4195 (arguments
4196 `(#:test-target "test"
4197 #:make-flags
4198 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4199 (junit (assoc-ref %build-inputs "java-junit"))
4200 (easymock (assoc-ref %build-inputs "java-easymock")))
4201 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4202 (string-append "-Dhamcrest.jar=" hamcrest
4203 "/share/java/hamcrest-core.jar")
4204 (string-append "-Deasymock.jar=" easymock
4205 "/share/java/easymock.jar")))
4206 #:phases
4207 (modify-phases %standard-phases
4208 (replace 'install
4209 (install-jars "target")))))
4210 (native-inputs
4211 `(("java-junit" ,java-junit)
4212 ("java-hamcrest-core" ,java-hamcrest-core)
4213 ("java-easymock" ,java-easymock)))
4214 (home-page "http://commons.apache.org/collections/")
4215 (synopsis "Collections framework")
4216 (description "The Java Collections Framework is the recognised standard
4217 for collection handling in Java. Commons-Collections seek to build upon the
4218 JDK classes by providing new interfaces, implementations and utilities. There
4219 are many features, including:
4220
4221 @itemize
4222 @item @code{Bag} interface for collections that have a number of copies of
4223 each object
4224 @item @code{BidiMap} interface for maps that can be looked up from value to
4225 key as well and key to value
4226 @item @code{MapIterator} interface to provide simple and quick iteration over
4227 maps
4228 @item Transforming decorators that alter each object as it is added to the
4229 collection
4230 @item Composite collections that make multiple collections look like one
4231 @item Ordered maps and sets that retain the order elements are added in,
4232 including an LRU based map
4233 @item Reference map that allows keys and/or values to be garbage collected
4234 under close control
4235 @item Many comparator implementations
4236 @item Many iterator implementations
4237 @item Adapter classes from array and enumerations to collections
4238 @item Utilities to test or create typical set-theory properties of collections
4239 such as union, intersection, and closure.
4240 @end itemize\n")
4241 (license license:asl2.0)))
4242
4243 (define-public java-commons-collections
4244 (package
4245 (inherit java-commons-collections4)
4246 (name "java-commons-collections")
4247 (version "3.2.2")
4248 (source (origin
4249 (method url-fetch)
4250 (uri (string-append "mirror://apache/commons/collections/source/"
4251 "commons-collections-" version "-src.tar.gz"))
4252 (sha256
4253 (base32
4254 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4255 (patches
4256 (search-patches "java-commons-collections-fix-java8.patch"))))
4257 (arguments
4258 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4259 ((#:phases phases)
4260 `(modify-phases ,phases
4261 ;; The manifest is required by the build procedure
4262 (add-before 'build 'add-manifest
4263 (lambda _
4264 (mkdir-p "build/conf")
4265 (call-with-output-file "build/conf/MANIFEST.MF"
4266 (lambda (file)
4267 (format file "Manifest-Version: 1.0\n")))
4268 #t))
4269 (replace 'install
4270 (install-jars "build"))))))))
4271
4272 (define java-commons-collections-test-classes
4273 (package
4274 (inherit java-commons-collections)
4275 (arguments
4276 `(#:jar-name "commons-collections-test-classes.jar"
4277 #:source-dir "src/test"
4278 #:tests? #f))
4279 (inputs
4280 `(("collection" ,java-commons-collections)))))
4281
4282 (define-public java-commons-beanutils
4283 (package
4284 (name "java-commons-beanutils")
4285 (version "1.9.3")
4286 (source (origin
4287 (method url-fetch)
4288 (uri (string-append "mirror://apache/commons/beanutils/source/"
4289 "commons-beanutils-" version "-src.tar.gz"))
4290 (sha256
4291 (base32
4292 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4293 (build-system ant-build-system)
4294 (arguments
4295 `(#:test-target "test"
4296 #:tests? #f
4297 #:phases
4298 (modify-phases %standard-phases
4299 (replace 'install
4300 (lambda* (#:key outputs #:allow-other-keys)
4301 (rename-file (string-append "dist/commons-beanutils-" ,version
4302 "-SNAPSHOT.jar")
4303 "commons-beanutils.jar")
4304 (install-file "commons-beanutils.jar"
4305 (string-append (assoc-ref outputs "out") "/share/java/"))
4306 #t)))))
4307 (inputs
4308 `(("logging" ,java-commons-logging-minimal)
4309 ("collections" ,java-commons-collections)))
4310 (native-inputs
4311 `(("junit" ,java-junit)
4312 ("collections-test" ,java-commons-collections-test-classes)))
4313 (home-page "http://commons.apache.org/beanutils/")
4314 (synopsis "Dynamically set or get properties in Java")
4315 (description "BeanUtils provides a simplified interface to reflection and
4316 introspection to set or get dynamically determined properties through their
4317 setter and getter method.")
4318 (license license:asl2.0)))
4319
4320 (define-public java-commons-io
4321 (package
4322 (name "java-commons-io")
4323 (version "2.5")
4324 (source
4325 (origin
4326 (method url-fetch)
4327 (uri (string-append "mirror://apache/commons/io/source/"
4328 "commons-io-" version "-src.tar.gz"))
4329 (sha256
4330 (base32
4331 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4332 (build-system ant-build-system)
4333 (outputs '("out" "doc"))
4334 (arguments
4335 `(#:test-target "test"
4336 #:make-flags
4337 (list (string-append "-Djunit.jar="
4338 (assoc-ref %build-inputs "java-junit")
4339 "/share/java/junit.jar"))
4340 #:phases
4341 (modify-phases %standard-phases
4342 (add-after 'build 'build-javadoc ant-build-javadoc)
4343 (replace 'install (install-jars "target"))
4344 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4345 (native-inputs
4346 `(("java-junit" ,java-junit)
4347 ("java-hamcrest-core" ,java-hamcrest-core)))
4348 (home-page "http://commons.apache.org/io/")
4349 (synopsis "Common useful IO related classes")
4350 (description "Commons-IO contains utility classes, stream implementations,
4351 file filters and endian classes.")
4352 (license license:asl2.0)))
4353
4354 (define-public java-commons-exec-1.1
4355 (package
4356 (name "java-commons-exec")
4357 (version "1.1")
4358 (source
4359 (origin
4360 (method url-fetch)
4361 (uri (string-append "mirror://apache/commons/exec/source/"
4362 "commons-exec-" version "-src.tar.gz"))
4363 (sha256
4364 (base32
4365 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4366 (build-system ant-build-system)
4367 (arguments
4368 `(#:test-target "test"
4369 #:make-flags
4370 (list (string-append "-Dmaven.junit.jar="
4371 (assoc-ref %build-inputs "java-junit")
4372 "/share/java/junit.jar"))
4373 #:phases
4374 (modify-phases %standard-phases
4375 (add-before 'build 'delete-network-tests
4376 (lambda _
4377 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4378 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4379 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4380 #t))
4381 ;; The "build" phase automatically tests.
4382 (delete 'check)
4383 (replace 'install (install-jars "target")))))
4384 (native-inputs
4385 `(("java-junit" ,java-junit)))
4386 (home-page "http://commons.apache.org/proper/commons-exec/")
4387 (synopsis "Common program execution related classes")
4388 (description "Commons-Exec simplifies executing external processes.")
4389 (license license:asl2.0)))
4390
4391 (define-public java-commons-exec
4392 (package
4393 (inherit java-commons-exec-1.1)
4394 (version "1.3")
4395 (source
4396 (origin
4397 (method url-fetch)
4398 (uri (string-append "mirror://apache/commons/exec/source/"
4399 "commons-exec-" version "-src.tar.gz"))
4400 (sha256
4401 (base32
4402 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4403 (arguments
4404 `(#:test-target "test"
4405 #:make-flags
4406 (list (string-append "-Dmaven.junit.jar="
4407 (assoc-ref %build-inputs "java-junit")
4408 "/share/java/junit.jar")
4409 "-Dmaven.compiler.source=1.7"
4410 "-Dmaven.compiler.target=1.7")
4411 #:phases
4412 (modify-phases %standard-phases
4413 (add-before 'build 'delete-network-tests
4414 (lambda* (#:key inputs #:allow-other-keys)
4415 ;; This test hangs indefinitely.
4416 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4417 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4418 (("ping -c 10 127.0.0.1") "sleep 10"))
4419 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4420 (("/bin/ls") "ls"))
4421 (call-with-output-file "src/test/scripts/ping.sh"
4422 (lambda (port)
4423 (format port "#!~a/bin/sh\nsleep $1\n"
4424 (assoc-ref inputs "bash"))))
4425 #t))
4426 ;; The "build" phase automatically tests.
4427 (delete 'check)
4428 (replace 'install (install-jars "target")))))
4429 (native-inputs
4430 `(("java-junit" ,java-junit)
4431 ("java-hamcrest-core" ,java-hamcrest-core)))))
4432
4433 (define-public java-commons-lang
4434 (package
4435 (name "java-commons-lang")
4436 (version "2.6")
4437 (source
4438 (origin
4439 (method url-fetch)
4440 (uri (string-append "mirror://apache/commons/lang/source/"
4441 "commons-lang-" version "-src.tar.gz"))
4442 (sha256
4443 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4444 (build-system ant-build-system)
4445 (outputs '("out" "doc"))
4446 (arguments
4447 `(#:test-target "test"
4448 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4449 #:phases
4450 (modify-phases %standard-phases
4451 (add-after 'build 'build-javadoc ant-build-javadoc)
4452 (add-before 'check 'disable-failing-test
4453 (lambda _
4454 ;; Disable a failing test
4455 (substitute* "src/test/java/org/apache/commons/lang/\
4456 time/FastDateFormatTest.java"
4457 (("public void testFormat\\(\\)")
4458 "public void disabled_testFormat()"))
4459 #t))
4460 (replace 'install (install-jars "target"))
4461 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4462 (native-inputs
4463 `(("java-junit" ,java-junit)))
4464 (home-page "http://commons.apache.org/lang/")
4465 (synopsis "Extension of the java.lang package")
4466 (description "The Commons Lang components contains a set of Java classes
4467 that provide helper methods for standard Java classes, especially those found
4468 in the @code{java.lang} package in the Sun JDK. The following classes are
4469 included:
4470
4471 @itemize
4472 @item StringUtils - Helper for @code{java.lang.String}.
4473 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4474 of characters such as @code{[a-z]} and @code{[abcdez]}.
4475 @item RandomStringUtils - Helper for creating randomised strings.
4476 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4477 @item NumberRange - A range of numbers with an upper and lower bound.
4478 @item ObjectUtils - Helper for @code{java.lang.Object}.
4479 @item SerializationUtils - Helper for serializing objects.
4480 @item SystemUtils - Utility class defining the Java system properties.
4481 @item NestedException package - A sub-package for the creation of nested
4482 exceptions.
4483 @item Enum package - A sub-package for the creation of enumerated types.
4484 @item Builder package - A sub-package for the creation of @code{equals},
4485 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4486 @end itemize\n")
4487 (license license:asl2.0)))
4488
4489 (define-public java-commons-lang3
4490 (package
4491 (name "java-commons-lang3")
4492 (version "3.4")
4493 (source
4494 (origin
4495 (method url-fetch)
4496 (uri (string-append "mirror://apache/commons/lang/source/"
4497 "commons-lang3-" version "-src.tar.gz"))
4498 (sha256
4499 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4500 (build-system ant-build-system)
4501 (outputs '("out" "doc"))
4502 (arguments
4503 `(#:test-target "test"
4504 #:make-flags
4505 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4506 (junit (assoc-ref %build-inputs "java-junit"))
4507 (easymock (assoc-ref %build-inputs "java-easymock"))
4508 (io (assoc-ref %build-inputs "java-commons-io")))
4509 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4510 (string-append "-Dhamcrest.jar=" hamcrest
4511 "/share/java/hamcrest-all.jar")
4512 (string-append "-Dcommons-io.jar=" io
4513 "/share/java/commons-io-"
4514 ,(package-version java-commons-io)
4515 "-SNAPSHOT.jar")
4516 (string-append "-Deasymock.jar=" easymock
4517 "/share/java/easymock.jar")))
4518 #:phases
4519 (modify-phases %standard-phases
4520 (add-after 'build 'build-javadoc ant-build-javadoc)
4521 (replace 'install (install-jars "target"))
4522 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4523 (native-inputs
4524 `(("java-junit" ,java-junit)
4525 ("java-commons-io" ,java-commons-io)
4526 ("java-hamcrest-all" ,java-hamcrest-all)
4527 ("java-easymock" ,java-easymock)))
4528 (home-page "http://commons.apache.org/lang/")
4529 (synopsis "Extension of the java.lang package")
4530 (description "The Commons Lang components contains a set of Java classes
4531 that provide helper methods for standard Java classes, especially those found
4532 in the @code{java.lang} package. The following classes are included:
4533
4534 @itemize
4535 @item StringUtils - Helper for @code{java.lang.String}.
4536 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4537 characters such as @code{[a-z]} and @code{[abcdez]}.
4538 @item RandomStringUtils - Helper for creating randomised strings.
4539 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4540 @item NumberRange - A range of numbers with an upper and lower bound.
4541 @item ObjectUtils - Helper for @code{java.lang.Object}.
4542 @item SerializationUtils - Helper for serializing objects.
4543 @item SystemUtils - Utility class defining the Java system properties.
4544 @item NestedException package - A sub-package for the creation of nested
4545 exceptions.
4546 @item Enum package - A sub-package for the creation of enumerated types.
4547 @item Builder package - A sub-package for the creation of @code{equals},
4548 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4549 @end itemize\n")
4550 (license license:asl2.0)))
4551
4552 (define-public java-commons-bsf
4553 (package
4554 (name "java-commons-bsf")
4555 (version "2.4.0")
4556 (source (origin
4557 (method url-fetch)
4558 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4559 version ".tar.gz"))
4560 (sha256
4561 (base32
4562 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4563 (modules '((guix build utils)))
4564 (snippet
4565 '(begin
4566 (for-each delete-file
4567 (find-files "." "\\.jar$"))
4568 #t))))
4569 (build-system ant-build-system)
4570 (arguments
4571 `(#:build-target "jar"
4572 #:tests? #f; No test file
4573 #:modules ((guix build ant-build-system)
4574 (guix build utils)
4575 (guix build java-utils)
4576 (sxml simple))
4577 #:phases
4578 (modify-phases %standard-phases
4579 (add-before 'build 'create-properties
4580 (lambda _
4581 ;; This file is missing from the distribution
4582 (call-with-output-file "build-properties.xml"
4583 (lambda (port)
4584 (sxml->xml
4585 `(project (@ (basedir ".") (name "build-properties") (default ""))
4586 (property (@ (name "project.name") (value "bsf")))
4587 (property (@ (name "source.level") (value "1.5")))
4588 (property (@ (name "build.lib") (value "build/jar")))
4589 (property (@ (name "src.dir") (value "src")))
4590 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4591 (property (@ (name "build.tests") (value "build/test-classes")))
4592 (property (@ (name "build.dest") (value "build/classes"))))
4593 port)))
4594 #t))
4595 (replace 'install (install-jars "build")))))
4596 (native-inputs
4597 `(("java-junit" ,java-junit)))
4598 (inputs
4599 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4600 (home-page "https://commons.apache.org/proper/commons-bsf")
4601 (synopsis "Bean Scripting Framework")
4602 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4603 which provides scripting language support within Java applications, and access
4604 to Java objects and methods from scripting languages. BSF allows one to write
4605 JSPs in languages other than Java while providing access to the Java class
4606 library. In addition, BSF permits any Java application to be implemented in
4607 part (or dynamically extended) by a language that is embedded within it. This
4608 is achieved by providing an API that permits calling scripting language engines
4609 from within Java, as well as an object registry that exposes Java objects to
4610 these scripting language engines.")
4611 (license license:asl2.0)))
4612
4613 (define-public java-commons-jxpath
4614 (package
4615 (name "java-commons-jxpath")
4616 (version "1.3")
4617 (source (origin
4618 (method url-fetch)
4619 (uri (string-append "mirror://apache/commons/jxpath/source/"
4620 "commons-jxpath-" version "-src.tar.gz"))
4621 (sha256
4622 (base32
4623 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4624 (build-system ant-build-system)
4625 (arguments
4626 `(#:jar-name "commons-jxpath.jar"
4627 ;; tests require more dependencies, including mockrunner which depends on old software
4628 #:tests? #f
4629 #:source-dir "src/java"))
4630 (inputs
4631 `(("servlet" ,java-classpathx-servletapi)
4632 ("java-jdom" ,java-jdom)
4633 ("java-commons-beanutils" ,java-commons-beanutils)))
4634 (native-inputs
4635 `(("java-junit" ,java-junit)))
4636 (home-page "http://commons.apache.org/jxpath/")
4637 (synopsis "Simple interpreter of an expression language called XPath.")
4638 (description "The org.apache.commons.jxpath package defines a simple
4639 interpreter of an expression language called XPath. JXPath applies XPath
4640 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4641 contexts, DOM etc, including mixtures thereof.")
4642 (license license:asl2.0)))
4643
4644 (define-public java-jsr250
4645 (package
4646 (name "java-jsr250")
4647 (version "1.3")
4648 (source (origin
4649 (method url-fetch)
4650 (uri (string-append "https://repo1.maven.org/maven2/"
4651 "javax/annotation/javax.annotation-api/"
4652 version "/javax.annotation-api-"
4653 version "-sources.jar"))
4654 (sha256
4655 (base32
4656 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4657 (build-system ant-build-system)
4658 (arguments
4659 `(#:tests? #f ; no tests included
4660 #:jdk ,icedtea-8
4661 #:jar-name "jsr250.jar"))
4662 (home-page "https://jcp.org/en/jsr/detail?id=250")
4663 (synopsis "Security-related annotations")
4664 (description "This package provides annotations for security. It provides
4665 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4666 namespaces.")
4667 ;; either cddl or gpl2 only, with classpath exception
4668 (license (list license:cddl1.0
4669 license:gpl2))))
4670
4671 (define-public java-jsr305
4672 (package
4673 (name "java-jsr305")
4674 (version "3.0.1")
4675 (source (origin
4676 (method url-fetch)
4677 (uri (string-append "https://repo1.maven.org/maven2/"
4678 "com/google/code/findbugs/"
4679 "jsr305/" version "/jsr305-"
4680 version "-sources.jar"))
4681 (sha256
4682 (base32
4683 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4684 (build-system ant-build-system)
4685 (arguments
4686 `(#:tests? #f ; no tests included
4687 #:jar-name "jsr305.jar"))
4688 (home-page "http://findbugs.sourceforge.net/")
4689 (synopsis "Annotations for the static analyzer called findbugs")
4690 (description "This package provides annotations for the findbugs package.
4691 It provides packages in the @code{javax.annotations} namespace.")
4692 (license license:asl2.0)))
4693
4694 (define-public java-guava
4695 (package
4696 (name "java-guava")
4697 ;; This is the last release of Guava that can be built with Java 7.
4698 (version "20.0")
4699 (source (origin
4700 (method url-fetch)
4701 (uri (string-append "https://github.com/google/guava/"
4702 "releases/download/v" version
4703 "/guava-" version "-sources.jar"))
4704 (sha256
4705 (base32
4706 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4707 (build-system ant-build-system)
4708 (arguments
4709 `(#:tests? #f ; no tests included
4710 #:jar-name "guava.jar"
4711 #:phases
4712 (modify-phases %standard-phases
4713 (add-after 'unpack 'trim-sources
4714 (lambda _
4715 (with-directory-excursion "src/com/google/common"
4716 ;; Remove annotations to avoid extra dependencies:
4717 ;; * "j2objc" annotations are used when converting Java to
4718 ;; Objective C;
4719 ;; * "errorprone" annotations catch common Java mistakes at
4720 ;; compile time;
4721 ;; * "IgnoreJRERequirement" is used for Android.
4722 (substitute* (find-files "." "\\.java$")
4723 (("import com.google.j2objc.*") "")
4724 (("import com.google.errorprone.annotation.*") "")
4725 (("import org.codehaus.mojo.animal_sniffer.*") "")
4726 (("@CanIgnoreReturnValue") "")
4727 (("@LazyInit") "")
4728 (("@WeakOuter") "")
4729 (("@RetainedWith") "")
4730 (("@Weak") "")
4731 (("@ForOverride") "")
4732 (("@J2ObjCIncompatible") "")
4733 (("@IgnoreJRERequirement") "")))
4734 #t)))))
4735 (inputs
4736 `(("java-jsr305" ,java-jsr305)))
4737 (home-page "https://github.com/google/guava")
4738 (synopsis "Google core libraries for Java")
4739 (description "Guava is a set of core libraries that includes new
4740 collection types (such as multimap and multiset), immutable collections, a
4741 graph library, functional types, an in-memory cache, and APIs/utilities for
4742 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4743 more!")
4744 (license license:asl2.0)))
4745
4746 ;; The java-commons-logging package provides adapters to many different
4747 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4748 ;; it with only a minimal set of adapters.
4749 (define-public java-commons-logging-minimal
4750 (package
4751 (name "java-commons-logging-minimal")
4752 (version "1.2")
4753 (source (origin
4754 (method url-fetch)
4755 (uri (string-append "mirror://apache/commons/logging/source/"
4756 "commons-logging-" version "-src.tar.gz"))
4757 (sha256
4758 (base32
4759 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4760 (build-system ant-build-system)
4761 (arguments
4762 `(#:tests? #f ; avoid dependency on logging frameworks
4763 #:jar-name "commons-logging-minimal.jar"
4764 #:phases
4765 (modify-phases %standard-phases
4766 (add-after 'unpack 'delete-adapters-and-tests
4767 (lambda _
4768 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4769 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4770 ;; is used by applications; SimpleLog is the only actually usable
4771 ;; implementation that does not depend on another logging
4772 ;; framework.
4773 (for-each
4774 (lambda (file)
4775 (delete-file (string-append
4776 "src/main/java/org/apache/commons/logging/impl/" file)))
4777 (list "Jdk13LumberjackLogger.java"
4778 "WeakHashtable.java"
4779 "Log4JLogger.java"
4780 "ServletContextCleaner.java"
4781 "Jdk14Logger.java"
4782 "AvalonLogger.java"
4783 "LogKitLogger.java"))
4784 (delete-file-recursively "src/test")
4785 #t)))))
4786 (home-page "http://commons.apache.org/logging/")
4787 (synopsis "Common API for logging implementations")
4788 (description "The Logging package is a thin bridge between different
4789 logging implementations. A library that uses the commons-logging API can be
4790 used with any logging implementation at runtime.")
4791 (license license:asl2.0)))
4792
4793 ;; This is the last release of the 1.x series.
4794 (define-public java-mockito-1
4795 (package
4796 (name "java-mockito")
4797 (version "1.10.19")
4798 (source (origin
4799 (method url-fetch)
4800 (uri (string-append "http://repo1.maven.org/maven2/"
4801 "org/mockito/mockito-core/" version
4802 "/mockito-core-" version "-sources.jar"))
4803 (sha256
4804 (base32
4805 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4806 (build-system ant-build-system)
4807 (arguments
4808 `(#:jar-name "mockito.jar"
4809 #:tests? #f ; no tests included
4810 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4811 ;; patches in build phases.
4812 #:phases
4813 (modify-phases %standard-phases
4814 ;; Mockito was developed against a different version of hamcrest,
4815 ;; which does not require matcher implementations to provide an
4816 ;; implementation of the "describeMismatch" method. We add this
4817 ;; simple definition to pass the build with our version of hamcrest.
4818 (add-after 'unpack 'fix-hamcrest-build-error
4819 (lambda _
4820 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4821 (("public Matcher getActualMatcher\\(\\) .*" line)
4822 (string-append "
4823 public void describeMismatch(Object item, Description description) {
4824 actualMatcher.describeMismatch(item, description);
4825 }"
4826 line)))
4827 #t))
4828 ;; Mockito bundles cglib. We have a cglib package, so let's use
4829 ;; that instead.
4830 (add-after 'unpack 'use-system-libraries
4831 (lambda _
4832 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4833 (substitute* '("CGLIBHacker.java"
4834 "CglibMockMaker.java"
4835 "ClassImposterizer.java"
4836 "DelegatingMockitoMethodProxy.java"
4837 "MethodInterceptorFilter.java"
4838 "MockitoNamingPolicy.java"
4839 "SerializableMockitoMethodProxy.java"
4840 "SerializableNoOp.java")
4841 (("import org.mockito.cglib") "import net.sf.cglib")))
4842 #t)))))
4843 (inputs
4844 `(("java-junit" ,java-junit)
4845 ("java-objenesis" ,java-objenesis)
4846 ("java-cglib" ,java-cglib)
4847 ("java-hamcrest-core" ,java-hamcrest-core)))
4848 (home-page "http://mockito.org")
4849 (synopsis "Mockito is a mock library for Java")
4850 (description "Mockito is a mocking library for Java which lets you write
4851 tests with a clean and simple API. It generates mocks using reflection, and
4852 it records all mock invocations, including methods arguments.")
4853 (license license:asl2.0)))
4854
4855 (define-public java-httpcomponents-httpcore
4856 (package
4857 (name "java-httpcomponents-httpcore")
4858 (version "4.4.6")
4859 (source (origin
4860 (method url-fetch)
4861 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4862 "source/httpcomponents-core-"
4863 version "-src.tar.gz"))
4864 (sha256
4865 (base32
4866 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4867 (build-system ant-build-system)
4868 (arguments
4869 `(#:jar-name "httpcomponents-httpcore.jar"
4870 #:phases
4871 (modify-phases %standard-phases
4872 (add-after 'unpack 'chdir
4873 (lambda _ (chdir "httpcore") #t)))))
4874 (inputs
4875 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4876 ("java-commons-lang3" ,java-commons-lang3)))
4877 (native-inputs
4878 `(("java-junit" ,java-junit)
4879 ("java-mockito" ,java-mockito-1)))
4880 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4881 (synopsis "Low level HTTP transport components")
4882 (description "HttpCore is a set of low level HTTP transport components
4883 that can be used to build custom client and server side HTTP services with a
4884 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4885 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4886 NIO.
4887
4888 This package provides the blocking I/O model library.")
4889 (license license:asl2.0)))
4890
4891 (define-public java-httpcomponents-httpcore-nio
4892 (package (inherit java-httpcomponents-httpcore)
4893 (name "java-httpcomponents-httpcore-nio")
4894 (arguments
4895 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4896 #:phases
4897 (modify-phases %standard-phases
4898 (add-after 'unpack 'chdir
4899 (lambda _ (chdir "httpcore-nio") #t)))))
4900 (inputs
4901 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4902 ("java-hamcrest-core" ,java-hamcrest-core)
4903 ,@(package-inputs java-httpcomponents-httpcore)))
4904 (description "HttpCore is a set of low level HTTP transport components
4905 that can be used to build custom client and server side HTTP services with a
4906 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4907 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4908 NIO.
4909
4910 This package provides the non-blocking I/O model library based on Java
4911 NIO.")))
4912
4913 (define-public java-httpcomponents-httpcore-ab
4914 (package (inherit java-httpcomponents-httpcore)
4915 (name "java-httpcomponents-httpcore-ab")
4916 (arguments
4917 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4918 #:phases
4919 (modify-phases %standard-phases
4920 (add-after 'unpack 'chdir
4921 (lambda _ (chdir "httpcore-ab") #t)))))
4922 (inputs
4923 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4924 ("java-commons-cli" ,java-commons-cli)
4925 ("java-hamcrest-core" ,java-hamcrest-core)
4926 ,@(package-inputs java-httpcomponents-httpcore)))
4927 (synopsis "Apache HttpCore benchmarking tool")
4928 (description "This package provides the HttpCore benchmarking tool. It is
4929 an Apache AB clone based on HttpCore.")))
4930
4931 (define-public java-httpcomponents-httpclient
4932 (package
4933 (name "java-httpcomponents-httpclient")
4934 (version "4.5.3")
4935 (source (origin
4936 (method url-fetch)
4937 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4938 "source/httpcomponents-client-"
4939 version "-src.tar.gz"))
4940 (sha256
4941 (base32
4942 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4943 (build-system ant-build-system)
4944 (arguments
4945 `(#:jar-name "httpcomponents-httpclient.jar"
4946 #:phases
4947 (modify-phases %standard-phases
4948 (add-after 'unpack 'chdir
4949 (lambda _ (chdir "httpclient") #t)))))
4950 (inputs
4951 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4952 ("java-commons-codec" ,java-commons-codec)
4953 ("java-hamcrest-core" ,java-hamcrest-core)
4954 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4955 ("java-mockito" ,java-mockito-1)
4956 ("java-junit" ,java-junit)))
4957 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4958 (synopsis "HTTP client library for Java")
4959 (description "Although the @code{java.net} package provides basic
4960 functionality for accessing resources via HTTP, it doesn't provide the full
4961 flexibility or functionality needed by many applications. @code{HttpClient}
4962 seeks to fill this void by providing an efficient, up-to-date, and
4963 feature-rich package implementing the client side of the most recent HTTP
4964 standards and recommendations.")
4965 (license license:asl2.0)))
4966
4967 (define-public java-httpcomponents-httpmime
4968 (package (inherit java-httpcomponents-httpclient)
4969 (name "java-httpcomponents-httpmime")
4970 (arguments
4971 `(#:jar-name "httpcomponents-httpmime.jar"
4972 #:phases
4973 (modify-phases %standard-phases
4974 (add-after 'unpack 'chdir
4975 (lambda _ (chdir "httpmime") #t)))))
4976 (inputs
4977 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4978 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4979 ("java-junit" ,java-junit)
4980 ("java-hamcrest-core" ,java-hamcrest-core)))))
4981
4982 (define-public java-commons-net
4983 (package
4984 (name "java-commons-net")
4985 (version "3.6")
4986 (source (origin
4987 (method url-fetch)
4988 (uri (string-append "mirror://apache/commons/net/source/"
4989 "commons-net-" version "-src.tar.gz"))
4990 (sha256
4991 (base32
4992 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4993 (build-system ant-build-system)
4994 (arguments
4995 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4996 ;; should be "resources/examples/examples.properties"), but gets "null"
4997 ;; instead.
4998 #:tests? #f
4999 #:jar-name "commons-net.jar"))
5000 (native-inputs
5001 `(("java-junit" ,java-junit)
5002 ("java-hamcrest-core" ,java-hamcrest-core)))
5003 (home-page "http://commons.apache.org/net/")
5004 (synopsis "Client library for many basic Internet protocols")
5005 (description "The Apache Commons Net library implements the client side of
5006 many basic Internet protocols. The purpose of the library is to provide
5007 fundamental protocol access, not higher-level abstractions.")
5008 (license license:asl2.0)))
5009
5010 (define-public java-jsch
5011 (package
5012 (name "java-jsch")
5013 (version "0.1.54")
5014 (source (origin
5015 (method url-fetch)
5016 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5017 version "/jsch-" version ".zip"))
5018 (sha256
5019 (base32
5020 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
5021 (build-system ant-build-system)
5022 (arguments
5023 `(#:build-target "dist"
5024 #:tests? #f ; no tests included
5025 #:phases
5026 (modify-phases %standard-phases
5027 (replace 'install (install-jars "dist")))))
5028 (native-inputs
5029 `(("unzip" ,unzip)))
5030 (home-page "http://www.jcraft.com/jsch/")
5031 (synopsis "Pure Java implementation of SSH2")
5032 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5033 to connect to an SSH server and use port forwarding, X11 forwarding, file
5034 transfer, etc., and you can integrate its functionality into your own Java
5035 programs.")
5036 (license license:bsd-3)))
5037
5038 (define-public java-commons-compress
5039 (package
5040 (name "java-commons-compress")
5041 (version "1.13")
5042 (source (origin
5043 (method url-fetch)
5044 (uri (string-append "mirror://apache/commons/compress/source/"
5045 "commons-compress-" version "-src.tar.gz"))
5046 (sha256
5047 (base32
5048 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5049 (build-system ant-build-system)
5050 (arguments
5051 `(#:jar-name "commons-compress.jar"
5052 #:phases
5053 (modify-phases %standard-phases
5054 (add-after 'unpack 'delete-bad-tests
5055 (lambda _
5056 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5057 ;; FIXME: These tests really should not fail. Maybe they are
5058 ;; indicative of problems with our Java packaging work.
5059
5060 ;; This test fails with a null pointer exception.
5061 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5062 ;; This test fails to open test resources.
5063 (delete-file "archivers/zip/ExplodeSupportTest.java")
5064
5065 ;; FIXME: This test adds a dependency on powermock, which is hard to
5066 ;; package at this point.
5067 ;; https://github.com/powermock/powermock
5068 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5069 #t)))))
5070 (inputs
5071 `(("java-junit" ,java-junit)
5072 ("java-hamcrest-core" ,java-hamcrest-core)
5073 ("java-mockito" ,java-mockito-1)
5074 ("java-xz" ,java-xz)))
5075 (home-page "https://commons.apache.org/proper/commons-compress/")
5076 (synopsis "Java library for working with compressed files")
5077 (description "The Apache Commons Compress library defines an API for
5078 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5079 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5080 (license license:asl2.0)))
5081
5082 (define-public java-commons-csv
5083 (package
5084 (name "java-commons-csv")
5085 (version "1.4")
5086 (source (origin
5087 (method url-fetch)
5088 (uri (string-append "mirror://apache/commons/csv/source/"
5089 "commons-csv-" version "-src.tar.gz"))
5090 (sha256
5091 (base32
5092 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5093 (build-system ant-build-system)
5094 (arguments
5095 `(#:jar-name "commons-csv.jar"
5096 #:source-dir "src/main/java"
5097 #:tests? #f)); FIXME: requires java-h2
5098 (inputs
5099 `(("java-hamcrest-core" ,java-hamcrest-core)
5100 ("java-commons-io" ,java-commons-io)
5101 ("java-commons-lang3" ,java-commons-lang3)
5102 ("junit" ,java-junit)))
5103 (home-page "https://commons.apache.org/proper/commons-csv/")
5104 (synopsis "Read and write CSV documents")
5105 (description "Commons CSV reads and writes files in variations of the Comma
5106 Separated Value (CSV) format. The most common CSV formats are predefined in the
5107 CSVFormat class:
5108
5109 @itemize
5110 @item Microsoft Excel
5111 @item Informix UNLOAD
5112 @item Informix UNLOAD CSV
5113 @item MySQL
5114 @item RFC 4180
5115 @item TDF
5116 @end itemize
5117
5118 Custom formats can be created using a fluent style API.")
5119 (license license:asl2.0)))
5120
5121 (define-public java-osgi-annotation
5122 (package
5123 (name "java-osgi-annotation")
5124 (version "6.0.0")
5125 (source (origin
5126 (method url-fetch)
5127 (uri (string-append "https://repo1.maven.org/maven2/"
5128 "org/osgi/org.osgi.annotation/" version "/"
5129 "org.osgi.annotation-" version "-sources.jar"))
5130 (sha256
5131 (base32
5132 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5133 (build-system ant-build-system)
5134 (arguments
5135 `(#:tests? #f ; no tests
5136 #:jar-name "osgi-annotation.jar"))
5137 (home-page "https://www.osgi.org")
5138 (synopsis "Annotation module of OSGi framework")
5139 (description
5140 "OSGi, for Open Services Gateway initiative framework, is a module system
5141 and service platform for the Java programming language. This package contains
5142 the OSGi annotation module, providing additional services to help dynamic
5143 components.")
5144 (license license:asl2.0)))
5145
5146 (define-public java-osgi-core
5147 (package
5148 (name "java-osgi-core")
5149 (version "6.0.0")
5150 (source (origin
5151 (method url-fetch)
5152 (uri (string-append "https://repo1.maven.org/maven2/"
5153 "org/osgi/org.osgi.core/" version "/"
5154 "org.osgi.core-" version "-sources.jar"))
5155 (sha256
5156 (base32
5157 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5158 (build-system ant-build-system)
5159 (arguments
5160 `(#:tests? #f ; no tests
5161 #:jar-name "osgi-core.jar"))
5162 (inputs
5163 `(("java-osgi-annotation" ,java-osgi-annotation)))
5164 (home-page "https://www.osgi.org")
5165 (synopsis "Core module of OSGi framework")
5166 (description
5167 "OSGi, for Open Services Gateway initiative framework, is a module system
5168 and service platform for the Java programming language. This package contains
5169 the OSGi Core module.")
5170 (license license:asl2.0)))
5171
5172 (define-public java-osgi-service-event
5173 (package
5174 (name "java-osgi-service-event")
5175 (version "1.3.1")
5176 (source (origin
5177 (method url-fetch)
5178 (uri (string-append "https://repo1.maven.org/maven2/"
5179 "org/osgi/org.osgi.service.event/"
5180 version "/org.osgi.service.event-"
5181 version "-sources.jar"))
5182 (sha256
5183 (base32
5184 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5185 (build-system ant-build-system)
5186 (arguments
5187 `(#:tests? #f ; no tests
5188 #:jar-name "osgi-service-event.jar"))
5189 (inputs
5190 `(("java-osgi-annotation" ,java-osgi-annotation)
5191 ("java-osgi-core" ,java-osgi-core)))
5192 (home-page "https://www.osgi.org")
5193 (synopsis "OSGi service event module")
5194 (description
5195 "OSGi, for Open Services Gateway initiative framework, is a module system
5196 and service platform for the Java programming language. This package contains
5197 the OSGi @code{org.osgi.service.event} module.")
5198 (license license:asl2.0)))
5199
5200 (define-public java-eclipse-osgi
5201 (package
5202 (name "java-eclipse-osgi")
5203 (version "3.11.3")
5204 (source (origin
5205 (method url-fetch)
5206 (uri (string-append "https://repo1.maven.org/maven2/"
5207 "org/eclipse/platform/org.eclipse.osgi/"
5208 version "/org.eclipse.osgi-"
5209 version "-sources.jar"))
5210 (sha256
5211 (base32
5212 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5213 (build-system ant-build-system)
5214 (arguments
5215 `(#:tests? #f ; no tests included
5216 #:jar-name "eclipse-equinox-osgi.jar"))
5217 (inputs
5218 `(("java-osgi-annotation" ,java-osgi-annotation)))
5219 (home-page "http://www.eclipse.org/equinox/")
5220 (synopsis "Eclipse Equinox OSGi framework")
5221 (description "This package provides an implementation of the OSGi Core
5222 specification.")
5223 (license license:epl1.0)))
5224
5225 (define-public java-eclipse-equinox-common
5226 (package
5227 (name "java-eclipse-equinox-common")
5228 (version "3.8.0")
5229 (source (origin
5230 (method url-fetch)
5231 (uri (string-append "https://repo1.maven.org/maven2/"
5232 "org/eclipse/platform/org.eclipse.equinox.common/"
5233 version "/org.eclipse.equinox.common-"
5234 version "-sources.jar"))
5235 (sha256
5236 (base32
5237 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
5238 (build-system ant-build-system)
5239 (arguments
5240 `(#:tests? #f ; no tests included
5241 #:jar-name "eclipse-equinox-common.jar"))
5242 (inputs
5243 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5244 (home-page "http://www.eclipse.org/equinox/")
5245 (synopsis "Common Eclipse runtime")
5246 (description "This package provides the common Eclipse runtime.")
5247 (license license:epl1.0)))
5248
5249 (define-public java-eclipse-core-jobs
5250 (package
5251 (name "java-eclipse-core-jobs")
5252 (version "3.8.0")
5253 (source (origin
5254 (method url-fetch)
5255 (uri (string-append "https://repo1.maven.org/maven2/"
5256 "org/eclipse/platform/org.eclipse.core.jobs/"
5257 version "/org.eclipse.core.jobs-"
5258 version "-sources.jar"))
5259 (sha256
5260 (base32
5261 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5262 (build-system ant-build-system)
5263 (arguments
5264 `(#:tests? #f ; no tests included
5265 #:jar-name "eclipse-core-jobs.jar"))
5266 (inputs
5267 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5268 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5269 (home-page "http://www.eclipse.org/equinox/")
5270 (synopsis "Eclipse jobs mechanism")
5271 (description "This package provides the Eclipse jobs mechanism.")
5272 (license license:epl1.0)))
5273
5274 (define-public java-eclipse-equinox-registry
5275 (package
5276 (name "java-eclipse-equinox-registry")
5277 (version "3.6.100")
5278 (source (origin
5279 (method url-fetch)
5280 (uri (string-append "https://repo1.maven.org/maven2/"
5281 "org/eclipse/platform/org.eclipse.equinox.registry/"
5282 version "/org.eclipse.equinox.registry-"
5283 version "-sources.jar"))
5284 (sha256
5285 (base32
5286 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5287 (build-system ant-build-system)
5288 (arguments
5289 `(#:tests? #f ; no tests included
5290 #:jar-name "eclipse-equinox-registry.jar"))
5291 (inputs
5292 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5293 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5294 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5295 (home-page "http://www.eclipse.org/equinox/")
5296 (synopsis "Eclipse extension registry support")
5297 (description "This package provides support for the Eclipse extension
5298 registry.")
5299 (license license:epl1.0)))
5300
5301 (define-public java-eclipse-equinox-app
5302 (package
5303 (name "java-eclipse-equinox-app")
5304 (version "1.3.400")
5305 (source (origin
5306 (method url-fetch)
5307 (uri (string-append "https://repo1.maven.org/maven2/"
5308 "org/eclipse/platform/org.eclipse.equinox.app/"
5309 version "/org.eclipse.equinox.app-"
5310 version "-sources.jar"))
5311 (sha256
5312 (base32
5313 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5314 (build-system ant-build-system)
5315 (arguments
5316 `(#:tests? #f ; no tests included
5317 #:jar-name "eclipse-equinox-app.jar"))
5318 (inputs
5319 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5320 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5321 ("java-eclipse-osgi" ,java-eclipse-osgi)
5322 ("java-osgi-service-event" ,java-osgi-service-event)))
5323 (home-page "http://www.eclipse.org/equinox/")
5324 (synopsis "Equinox application container")
5325 (description "This package provides the Equinox application container for
5326 Eclipse.")
5327 (license license:epl1.0)))
5328
5329 (define-public java-eclipse-equinox-preferences
5330 (package
5331 (name "java-eclipse-equinox-preferences")
5332 (version "3.6.1")
5333 (source (origin
5334 (method url-fetch)
5335 (uri (string-append "https://repo1.maven.org/maven2/"
5336 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5337 version "/org.eclipse.equinox.preferences-"
5338 version "-sources.jar"))
5339 (sha256
5340 (base32
5341 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5342 (build-system ant-build-system)
5343 (arguments
5344 `(#:tests? #f ; no tests included
5345 #:jar-name "eclipse-equinox-preferences.jar"))
5346 (inputs
5347 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5348 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5349 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5350 (home-page "http://www.eclipse.org/equinox/")
5351 (synopsis "Eclipse preferences mechanism")
5352 (description "This package provides the Eclipse preferences mechanism with
5353 the module @code{org.eclipse.equinox.preferences}.")
5354 (license license:epl1.0)))
5355
5356 (define-public java-eclipse-core-contenttype
5357 (package
5358 (name "java-eclipse-core-contenttype")
5359 (version "3.5.100")
5360 (source (origin
5361 (method url-fetch)
5362 (uri (string-append "https://repo1.maven.org/maven2/"
5363 "org/eclipse/platform/org.eclipse.core.contenttype/"
5364 version "/org.eclipse.core.contenttype-"
5365 version "-sources.jar"))
5366 (sha256
5367 (base32
5368 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5369 (build-system ant-build-system)
5370 (arguments
5371 `(#:tests? #f ; no tests included
5372 #:jar-name "eclipse-core-contenttype.jar"))
5373 (inputs
5374 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5375 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5376 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5377 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5378 (home-page "http://www.eclipse.org/")
5379 (synopsis "Eclipse content mechanism")
5380 (description "This package provides the Eclipse content mechanism in the
5381 @code{org.eclipse.core.contenttype} module.")
5382 (license license:epl1.0)))
5383
5384 (define-public java-eclipse-core-runtime
5385 (package
5386 (name "java-eclipse-core-runtime")
5387 (version "3.12.0")
5388 (source (origin
5389 (method url-fetch)
5390 (uri (string-append "https://repo1.maven.org/maven2/"
5391 "org/eclipse/platform/org.eclipse.core.runtime/"
5392 version "/org.eclipse.core.runtime-"
5393 version "-sources.jar"))
5394 (sha256
5395 (base32
5396 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5397 (build-system ant-build-system)
5398 (arguments
5399 `(#:tests? #f ; no tests included
5400 #:jar-name "eclipse-core-runtime.jar"))
5401 (inputs
5402 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5403 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5404 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5405 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5406 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5407 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5408 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5409 (home-page "https://www.eclipse.org/")
5410 (synopsis "Eclipse core runtime")
5411 (description "This package provides the Eclipse core runtime with the
5412 module @code{org.eclipse.core.runtime}.")
5413 (license license:epl1.0)))
5414
5415 (define-public java-eclipse-core-filesystem
5416 (package
5417 (name "java-eclipse-core-filesystem")
5418 (version "1.6.1")
5419 (source (origin
5420 (method url-fetch)
5421 (uri (string-append "https://repo1.maven.org/maven2/"
5422 "org/eclipse/platform/org.eclipse.core.filesystem/"
5423 version "/org.eclipse.core.filesystem-"
5424 version "-sources.jar"))
5425 (sha256
5426 (base32
5427 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5428 (build-system ant-build-system)
5429 (arguments
5430 `(#:tests? #f ; no tests included
5431 #:jar-name "eclipse-core-filesystem.jar"))
5432 (inputs
5433 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5434 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5435 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5436 (home-page "https://www.eclipse.org/")
5437 (synopsis "Eclipse core file system")
5438 (description "This package provides the Eclipse core file system with the
5439 module @code{org.eclipse.core.filesystem}.")
5440 (license license:epl1.0)))
5441
5442 (define-public java-eclipse-core-expressions
5443 (package
5444 (name "java-eclipse-core-expressions")
5445 (version "3.5.100")
5446 (source (origin
5447 (method url-fetch)
5448 (uri (string-append "https://repo1.maven.org/maven2/"
5449 "org/eclipse/platform/org.eclipse.core.expressions/"
5450 version "/org.eclipse.core.expressions-"
5451 version "-sources.jar"))
5452 (sha256
5453 (base32
5454 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5455 (build-system ant-build-system)
5456 (arguments
5457 `(#:tests? #f ; no tests included
5458 #:jar-name "eclipse-core-expressions.jar"))
5459 (inputs
5460 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5461 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5462 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5463 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5464 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5465 (home-page "https://www.eclipse.org/")
5466 (synopsis "Eclipse core expression language")
5467 (description "This package provides the Eclipse core expression language
5468 with the @code{org.eclipse.core.expressions} module.")
5469 (license license:epl1.0)))
5470
5471 (define-public java-eclipse-core-variables
5472 (package
5473 (name "java-eclipse-core-variables")
5474 (version "3.3.0")
5475 (source (origin
5476 (method url-fetch)
5477 (uri (string-append "https://repo1.maven.org/maven2/"
5478 "org/eclipse/platform/org.eclipse.core.variables/"
5479 version "/org.eclipse.core.variables-"
5480 version "-sources.jar"))
5481 (sha256
5482 (base32
5483 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5484 (build-system ant-build-system)
5485 (arguments
5486 `(#:tests? #f ; no tests included
5487 #:jar-name "eclipse-core-variables.jar"))
5488 (inputs
5489 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5490 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5491 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5492 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5493 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5494 (home-page "https://www.eclipse.org/platform")
5495 (synopsis "Eclipse core variables")
5496 (description "This package provides the Eclipse core variables module
5497 @code{org.eclipse.core.variables}.")
5498 (license license:epl1.0)))
5499
5500 (define-public java-eclipse-ant-core
5501 (package
5502 (name "java-eclipse-ant-core")
5503 (version "3.4.100")
5504 (source (origin
5505 (method url-fetch)
5506 (uri (string-append "https://repo1.maven.org/maven2/"
5507 "org/eclipse/platform/org.eclipse.ant.core/"
5508 version "/org.eclipse.ant.core-"
5509 version "-sources.jar"))
5510 (sha256
5511 (base32
5512 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5513 (build-system ant-build-system)
5514 (arguments
5515 `(#:tests? #f ; no tests included
5516 #:jar-name "eclipse-ant-core.jar"))
5517 (inputs
5518 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5519 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5520 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5521 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5522 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5523 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5524 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5525 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5526 (home-page "https://www.eclipse.org/platform")
5527 (synopsis "Ant build tool core libraries")
5528 (description "This package provides the ant build tool core libraries with
5529 the module @code{org.eclipse.ant.core}.")
5530 (license license:epl1.0)))
5531
5532 (define-public java-eclipse-core-resources
5533 (package
5534 (name "java-eclipse-core-resources")
5535 (version "3.11.1")
5536 (source (origin
5537 (method url-fetch)
5538 (uri (string-append "https://repo1.maven.org/maven2/"
5539 "org/eclipse/platform/org.eclipse.core.resources/"
5540 version "/org.eclipse.core.resources-"
5541 version "-sources.jar"))
5542 (sha256
5543 (base32
5544 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5545 (build-system ant-build-system)
5546 (arguments
5547 `(#:tests? #f ; no tests included
5548 #:jar-name "eclipse-core-resources.jar"))
5549 (inputs
5550 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5551 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5552 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5553 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5554 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5555 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5556 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5557 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5558 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5559 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5560 (home-page "https://www.eclipse.org/")
5561 (synopsis "Eclipse core resource management")
5562 (description "This package provides the Eclipse core resource management
5563 module @code{org.eclipse.core.resources}.")
5564 (license license:epl1.0)))
5565
5566 (define-public java-eclipse-compare-core
5567 (package
5568 (name "java-eclipse-compare-core")
5569 (version "3.6.0")
5570 (source (origin
5571 (method url-fetch)
5572 (uri (string-append "https://repo1.maven.org/maven2/"
5573 "org/eclipse/platform/org.eclipse.compare.core/"
5574 version "/org.eclipse.compare.core-"
5575 version "-sources.jar"))
5576 (sha256
5577 (base32
5578 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5579 (build-system ant-build-system)
5580 (arguments
5581 `(#:tests? #f ; no tests included
5582 #:jar-name "eclipse-compare-core.jar"))
5583 (inputs
5584 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5585 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5586 ("java-eclipse-osgi" ,java-eclipse-osgi)
5587 ("java-icu4j" ,java-icu4j)))
5588 (home-page "https://www.eclipse.org/")
5589 (synopsis "Eclipse core compare support")
5590 (description "This package provides the Eclipse core compare support
5591 module @code{org.eclipse.compare.core}.")
5592 (license license:epl1.0)))
5593
5594 (define-public java-eclipse-team-core
5595 (package
5596 (name "java-eclipse-team-core")
5597 (version "3.8.0")
5598 (source (origin
5599 (method url-fetch)
5600 (uri (string-append "https://repo1.maven.org/maven2/"
5601 "org/eclipse/platform/org.eclipse.team.core/"
5602 version "/org.eclipse.team.core-"
5603 version "-sources.jar"))
5604 (sha256
5605 (base32
5606 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5607 (build-system ant-build-system)
5608 (arguments
5609 `(#:tests? #f ; no tests included
5610 #:jar-name "eclipse-team-core.jar"))
5611 (inputs
5612 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5613 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5614 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5615 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5616 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5617 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5618 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5619 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5620 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5621 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5622 (home-page "https://www.eclipse.org/platform")
5623 (synopsis "Eclipse team support core")
5624 (description "This package provides the Eclipse team support core module
5625 @code{org.eclipse.team.core}.")
5626 (license license:epl1.0)))
5627
5628 (define-public java-eclipse-core-commands
5629 (package
5630 (name "java-eclipse-core-commands")
5631 (version "3.8.1")
5632 (source (origin
5633 (method url-fetch)
5634 (uri (string-append "https://repo1.maven.org/maven2/"
5635 "org/eclipse/platform/org.eclipse.core.commands/"
5636 version "/org.eclipse.core.commands-"
5637 version "-sources.jar"))
5638 (sha256
5639 (base32
5640 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5641 (build-system ant-build-system)
5642 (arguments
5643 `(#:tests? #f ; no tests included
5644 #:jar-name "eclipse-core-commands.jar"))
5645 (inputs
5646 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5647 (home-page "https://www.eclipse.org/platform")
5648 (synopsis "Eclipse core commands")
5649 (description "This package provides Eclipse core commands in the module
5650 @code{org.eclipse.core.commands}.")
5651 (license license:epl1.0)))
5652
5653 (define-public java-eclipse-text
5654 (package
5655 (name "java-eclipse-text")
5656 (version "3.6.0")
5657 (source (origin
5658 (method url-fetch)
5659 (uri (string-append "https://repo1.maven.org/maven2/"
5660 "org/eclipse/platform/org.eclipse.text/"
5661 version "/org.eclipse.text-"
5662 version "-sources.jar"))
5663 (sha256
5664 (base32
5665 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5666 (build-system ant-build-system)
5667 (arguments
5668 `(#:tests? #f ; no tests included
5669 #:jar-name "eclipse-text.jar"
5670 #:phases
5671 (modify-phases %standard-phases
5672 ;; When creating a new category we must make sure that the new list
5673 ;; matches List<Position>. By default it seems to be too generic
5674 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5675 ;; Without this we get this error:
5676 ;;
5677 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5678 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5679 ;; [javac] fPositions.put(category, new ArrayList<>());
5680 ;; [javac] ^
5681 ;; [javac] required: String,List<Position>
5682 ;; [javac] found: String,ArrayList<Object>
5683 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5684 ;; to List<Position> by method invocation conversion
5685 ;; [javac] where K,V are type-variables:
5686 ;; [javac] K extends Object declared in interface Map
5687 ;; [javac] V extends Object declared in interface Map
5688 ;;
5689 ;; I don't know if this is a good fix. I suspect it is not, but it
5690 ;; seems to work.
5691 (add-after 'unpack 'fix-compilation-error
5692 (lambda _
5693 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5694 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5695 "Positions.put(category, new ArrayList<Position>());"))
5696 #t)))))
5697 (inputs
5698 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5699 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5700 ("java-icu4j" ,java-icu4j)))
5701 (home-page "http://www.eclipse.org/platform")
5702 (synopsis "Eclipse text library")
5703 (description "Platform Text is part of the Platform UI project and
5704 provides the basic building blocks for text and text editors within Eclipse
5705 and contributes the Eclipse default text editor.")
5706 (license license:epl1.0)))
5707
5708 (define-public java-eclipse-jdt-core
5709 (package
5710 (name "java-eclipse-jdt-core")
5711 (version "3.12.3")
5712 (source (origin
5713 (method url-fetch)
5714 (uri (string-append "https://repo1.maven.org/maven2/"
5715 "org/eclipse/jdt/org.eclipse.jdt.core/"
5716 version "/org.eclipse.jdt.core-"
5717 version "-sources.jar"))
5718 (sha256
5719 (base32
5720 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5721 (build-system ant-build-system)
5722 (arguments
5723 `(#:tests? #f ; no tests included
5724 #:jar-name "eclipse-jdt-core.jar"))
5725 (inputs
5726 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5727 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5728 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5729 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5730 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5731 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5732 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5733 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5734 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5735 ("java-eclipse-osgi" ,java-eclipse-osgi)
5736 ("java-eclipse-text" ,java-eclipse-text)))
5737 (home-page "https://www.eclipse.org/jdt")
5738 (synopsis "Java development tools core libraries")
5739 (description "This package provides the core libraries of the Eclipse Java
5740 development tools.")
5741 (license license:epl1.0)))
5742
5743 (define-public java-javax-mail
5744 (package
5745 (name "java-javax-mail")
5746 (version "1.5.6")
5747 (source (origin
5748 (method url-fetch)
5749 (uri (string-append "https://repo1.maven.org/maven2/"
5750 "com/sun/mail/javax.mail/"
5751 version "/javax.mail-"
5752 version "-sources.jar"))
5753 (sha256
5754 (base32
5755 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5756 (build-system ant-build-system)
5757 (arguments
5758 `(#:tests? #f ; no tests
5759 #:jar-name "javax-mail.jar"))
5760 (home-page "https://javamail.java.net")
5761 (synopsis "Reference implementation of the JavaMail API")
5762 (description
5763 "This package provides versions of the JavaMail API implementation, IMAP,
5764 SMTP, and POP3 service providers, some examples, and documentation for the
5765 JavaMail API.")
5766 ;; GPLv2 only with "classpath exception".
5767 (license license:gpl2)))
5768
5769 (define-public java-log4j-api
5770 (package
5771 (name "java-log4j-api")
5772 (version "2.4.1")
5773 (source (origin
5774 (method url-fetch)
5775 (uri (string-append "mirror://apache/logging/log4j/" version
5776 "/apache-log4j-" version "-src.tar.gz"))
5777 (sha256
5778 (base32
5779 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5780 (build-system ant-build-system)
5781 (arguments
5782 `(#:tests? #f ; tests require unpackaged software
5783 #:jar-name "log4j-api.jar"
5784 #:make-flags
5785 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5786 "/share/java"))
5787 #:phases
5788 (modify-phases %standard-phases
5789 (add-after 'unpack 'enter-dir
5790 (lambda _ (chdir "log4j-api") #t))
5791 ;; FIXME: The tests require additional software that has not been
5792 ;; packaged yet, such as
5793 ;; * org.apache.maven
5794 ;; * org.apache.felix
5795 (add-after 'enter-dir 'delete-tests
5796 (lambda _ (delete-file-recursively "src/test") #t)))))
5797 (inputs
5798 `(("java-osgi-core" ,java-osgi-core)
5799 ("java-hamcrest-core" ,java-hamcrest-core)
5800 ("java-junit" ,java-junit)))
5801 (home-page "http://logging.apache.org/log4j/2.x/")
5802 (synopsis "API module of the Log4j logging framework for Java")
5803 (description
5804 "This package provides the API module of the Log4j logging framework for
5805 Java.")
5806 (license license:asl2.0)))
5807
5808 (define-public java-log4j-core
5809 (package
5810 (inherit java-log4j-api)
5811 (name "java-log4j-core")
5812 (inputs
5813 `(("java-osgi-core" ,java-osgi-core)
5814 ("java-hamcrest-core" ,java-hamcrest-core)
5815 ("java-log4j-api" ,java-log4j-api)
5816 ("java-mail" ,java-mail)
5817 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5818 ("java-lmax-disruptor" ,java-lmax-disruptor)
5819 ("java-kafka" ,java-kafka-clients)
5820 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5821 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5822 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5823 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5824 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5825 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5826 ("java-commons-compress" ,java-commons-compress)
5827 ("java-commons-csv" ,java-commons-csv)
5828 ("java-jeromq" ,java-jeromq)
5829 ("java-junit" ,java-junit)))
5830 (native-inputs
5831 `(("hamcrest" ,java-hamcrest-all)
5832 ("java-commons-io" ,java-commons-io)
5833 ("java-commons-lang3" ,java-commons-lang3)
5834 ("slf4j" ,java-slf4j-api)))
5835 (arguments
5836 `(#:tests? #f ; tests require more dependencies
5837 #:test-dir "src/test"
5838 #:source-dir "src/main/java"
5839 #:jar-name "log4j-core.jar"
5840 #:jdk ,icedtea-8
5841 #:make-flags
5842 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5843 "/share/java"))
5844 #:phases
5845 (modify-phases %standard-phases
5846 (add-after 'unpack 'enter-dir
5847 (lambda _ (chdir "log4j-core") #t)))))
5848 (synopsis "Core component of the Log4j framework")
5849 (description "This package provides the core component of the Log4j
5850 logging framework for Java.")))
5851
5852 (define-public java-log4j-1.2-api
5853 (package
5854 (inherit java-log4j-api)
5855 (name "java-log4j-1.2-api")
5856 (arguments
5857 `(#:jar-name "java-log4j-1.2-api.jar"
5858 #:source-dir "log4j-1.2-api/src/main/java"
5859 #:jdk ,icedtea-8
5860 ;; Tests require maven-model (and other maven subprojects), which is a
5861 ;; cyclic dependency.
5862 #:tests? #f))
5863 (inputs
5864 `(("log4j-api" ,java-log4j-api)
5865 ("log4j-core" ,java-log4j-core)
5866 ("osgi-core" ,java-osgi-core)
5867 ("eclipse-osgi" ,java-eclipse-osgi)
5868 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5869
5870 (define-public java-commons-cli
5871 (package
5872 (name "java-commons-cli")
5873 (version "1.4")
5874 (source (origin
5875 (method url-fetch)
5876 (uri (string-append "mirror://apache/commons/cli/source/"
5877 "commons-cli-" version "-src.tar.gz"))
5878 (sha256
5879 (base32
5880 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5881 (build-system ant-build-system)
5882 ;; TODO: javadoc
5883 (arguments
5884 `(#:jar-name "commons-cli.jar"))
5885 (native-inputs
5886 `(("java-junit" ,java-junit)
5887 ("java-hamcrest-core" ,java-hamcrest-core)))
5888 (home-page "http://commons.apache.org/cli/")
5889 (synopsis "Command line arguments and options parsing library")
5890 (description "The Apache Commons CLI library provides an API for parsing
5891 command line options passed to programs. It is also able to print help
5892 messages detailing the options available for a command line tool.
5893
5894 Commons CLI supports different types of options:
5895
5896 @itemize
5897 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5898 @item GNU like long options (ie. du --human-readable --max-depth=1)
5899 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5900 @item Short options with value attached (ie. gcc -O2 foo.c)
5901 @item long options with single hyphen (ie. ant -projecthelp)
5902 @end itemize
5903
5904 This is a part of the Apache Commons Project.")
5905 (license license:asl2.0)))
5906
5907 (define-public java-commons-codec
5908 (package
5909 (name "java-commons-codec")
5910 (version "1.10")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (string-append "mirror://apache/commons/codec/source/"
5914 "commons-codec-" version "-src.tar.gz"))
5915 (sha256
5916 (base32
5917 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5918 (build-system ant-build-system)
5919 (outputs '("out" "doc"))
5920 (arguments
5921 `(#:test-target "test"
5922 #:make-flags
5923 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5924 (junit (assoc-ref %build-inputs "java-junit")))
5925 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5926 (string-append "-Dhamcrest.jar=" hamcrest
5927 "/share/java/hamcrest-core.jar")
5928 ;; Do not append version to jar.
5929 "-Dfinal.name=commons-codec"))
5930 #:phases
5931 (modify-phases %standard-phases
5932 (add-after 'build 'build-javadoc ant-build-javadoc)
5933 (replace 'install (install-jars "dist"))
5934 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5935 (native-inputs
5936 `(("java-junit" ,java-junit)
5937 ("java-hamcrest-core" ,java-hamcrest-core)))
5938 (home-page "http://commons.apache.org/codec/")
5939 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5940 (description "The codec package contains simple encoder and decoders for
5941 various formats such as Base64 and Hexadecimal. In addition to these widely
5942 used encoders and decoders, the codec package also maintains a collection of
5943 phonetic encoding utilities.
5944
5945 This is a part of the Apache Commons Project.")
5946 (license license:asl2.0)))
5947
5948 (define-public java-commons-daemon
5949 (package
5950 (name "java-commons-daemon")
5951 (version "1.0.15")
5952 (source (origin
5953 (method url-fetch)
5954 (uri (string-append "mirror://apache/commons/daemon/source/"
5955 "commons-daemon-" version "-src.tar.gz"))
5956 (sha256
5957 (base32
5958 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5959 (build-system ant-build-system)
5960 (arguments
5961 `(#:test-target "test"
5962 #:phases
5963 (modify-phases %standard-phases
5964 (add-after 'build 'build-javadoc ant-build-javadoc)
5965 (replace 'install (install-jars "dist"))
5966 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5967 (native-inputs
5968 `(("java-junit" ,java-junit)))
5969 (home-page "http://commons.apache.org/daemon/")
5970 (synopsis "Library to launch Java applications as daemons")
5971 (description "The Daemon package from Apache Commons can be used to
5972 implement Java applications which can be launched as daemons. For example the
5973 program will be notified about a shutdown so that it can perform cleanup tasks
5974 before its process of execution is destroyed by the operation system.
5975
5976 This package contains the Java library. You will also need the actual binary
5977 for your architecture which is provided by the jsvc package.
5978
5979 This is a part of the Apache Commons Project.")
5980 (license license:asl2.0)))
5981
5982 (define-public java-javaewah
5983 (package
5984 (name "java-javaewah")
5985 (version "1.1.6")
5986 (source (origin
5987 (method url-fetch)
5988 (uri (string-append "https://github.com/lemire/javaewah/"
5989 "archive/JavaEWAH-" version ".tar.gz"))
5990 (sha256
5991 (base32
5992 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5993 (build-system ant-build-system)
5994 (arguments `(#:jar-name "javaewah.jar"))
5995 (inputs
5996 `(("java-junit" ,java-junit)
5997 ("java-hamcrest-core" ,java-hamcrest-core)))
5998 (home-page "https://github.com/lemire/javaewah")
5999 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6000 (description "This is a word-aligned compressed variant of the Java
6001 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6002 compression scheme. It can be used to implement bitmap indexes.
6003
6004 The goal of word-aligned compression is not to achieve the best compression,
6005 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6006 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6007 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6008 @code{BitSet} class by Sun).")
6009 ;; GPL2.0 derivates are explicitly allowed.
6010 (license license:asl2.0)))
6011
6012 (define-public java-slf4j-api
6013 (package
6014 (name "java-slf4j-api")
6015 (version "1.7.25")
6016 (source (origin
6017 (method url-fetch)
6018 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6019 version ".tar.gz"))
6020 (sha256
6021 (base32
6022 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6023 (modules '((guix build utils)))
6024 ;; Delete bundled jars.
6025 (snippet
6026 '(begin
6027 (for-each delete-file (find-files "." "\\.jar$"))
6028 #t))))
6029 (build-system ant-build-system)
6030 (arguments
6031 `(#:jar-name "slf4j-api.jar"
6032 #:source-dir "slf4j-api/src/main"
6033 #:test-dir "slf4j-api/src/test"
6034 #:phases
6035 (modify-phases %standard-phases
6036 (add-after 'build 'regenerate-jar
6037 (lambda _
6038 ;; pom.xml ignores these files in the jar creation process. If we don't,
6039 ;; we get the error "This code should have never made it into slf4j-api.jar"
6040 (delete-file-recursively "build/classes/org/slf4j/impl")
6041 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6042 "build/classes" ".")))
6043 (add-before 'check 'dont-test-abstract-classes
6044 (lambda _
6045 ;; abstract classes are not meant to be run with junit
6046 (substitute* "build.xml"
6047 (("<include name=\"\\*\\*/\\*Test.java\" />")
6048 (string-append "<include name=\"**/*Test.java\" />"
6049 "<exclude name=\"**/MultithreadedInitializationTest"
6050 ".java\" />")))
6051 #t)))))
6052 (inputs
6053 `(("java-junit" ,java-junit)
6054 ("java-hamcrest-core" ,java-hamcrest-core)))
6055 (home-page "https://www.slf4j.org/")
6056 (synopsis "Simple logging facade for Java")
6057 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6058 simple facade or abstraction for various logging
6059 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6060 allowing the end user to plug in the desired logging framework at deployment
6061 time.")
6062 (license license:expat)))
6063
6064 (define java-slf4j-api-bootstrap
6065 (package
6066 (inherit java-slf4j-api)
6067 (name "java-slf4j-api-bootstrap")
6068 (inputs `())
6069 (arguments
6070 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6071 ((#:tests? _ #f) #f)))))
6072
6073 (define-public java-slf4j-simple
6074 (package
6075 (name "java-slf4j-simple")
6076 (version "1.7.25")
6077 (source (package-source java-slf4j-api))
6078 (build-system ant-build-system)
6079 (arguments
6080 `(#:jar-name "slf4j-simple.jar"
6081 #:source-dir "slf4j-simple/src/main"
6082 #:test-dir "slf4j-simple/src/test"
6083 #:phases
6084 (modify-phases %standard-phases
6085 ;; The tests need some test classes from slf4j-api
6086 (add-before 'check 'build-slf4j-api-test-helpers
6087 (lambda _
6088 ;; Add current dir to CLASSPATH ...
6089 (setenv "CLASSPATH"
6090 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6091 ;; ... and build test helper classes here:
6092 (apply invoke
6093 `("javac" "-d" "."
6094 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6095 (inputs
6096 `(("java-junit" ,java-junit)
6097 ("java-hamcrest-core" ,java-hamcrest-core)
6098 ("java-slf4j-api" ,java-slf4j-api)))
6099 (home-page "https://www.slf4j.org/")
6100 (synopsis "Simple implementation of simple logging facade for Java")
6101 (description "SLF4J binding for the Simple implementation, which outputs
6102 all events to System.err. Only messages of level INFO and higher are
6103 printed.")
6104 (license license:expat)))
6105
6106 (define-public antlr2
6107 (package
6108 (name "antlr2")
6109 (version "2.7.7")
6110 (source (origin
6111 (method url-fetch)
6112 (uri (string-append "http://www.antlr2.org/download/antlr-"
6113 version ".tar.gz"))
6114 (sha256
6115 (base32
6116 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6117 (modules '((guix build utils)))
6118 (snippet
6119 '(begin
6120 (delete-file "antlr.jar")
6121 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6122 (("#include <map>")
6123 (string-append
6124 "#include <map>\n"
6125 "#define EOF (-1)\n"
6126 "#include <strings.h>")))
6127 (substitute* "configure"
6128 (("/bin/sh") "sh"))
6129 #t))))
6130 (build-system gnu-build-system)
6131 (arguments
6132 `(#:tests? #f ; no test target
6133 #:imported-modules ((guix build ant-build-system)
6134 (guix build syscalls)
6135 ,@%gnu-build-system-modules)
6136 #:modules (((guix build ant-build-system) #:prefix ant:)
6137 (guix build gnu-build-system)
6138 (guix build utils))
6139 #:phases
6140 (modify-phases %standard-phases
6141 (add-after 'install 'strip-jar-timestamps
6142 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6143 (add-before 'configure 'fix-timestamp
6144 (lambda _
6145 (substitute* "configure"
6146 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6147 #t))
6148 (add-after 'configure 'fix-bin-ls
6149 (lambda _
6150 (substitute* (find-files "." "Makefile")
6151 (("/bin/ls") "ls"))
6152 #t)))))
6153 (native-inputs
6154 `(("which" ,which)
6155 ("zip" ,zip)
6156 ("java" ,icedtea "jdk")))
6157 (inputs
6158 `(("java" ,icedtea)))
6159 (home-page "http://www.antlr2.org")
6160 (synopsis "Framework for constructing recognizers, compilers, and translators")
6161 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6162 is a language tool that provides a framework for constructing recognizers,
6163 compilers, and translators from grammatical descriptions containing Java, C#,
6164 C++, or Python actions. ANTLR provides excellent support for tree construction,
6165 tree walking, and translation.")
6166 (license license:public-domain)))
6167
6168 (define-public java-stringtemplate-3
6169 (package
6170 (name "java-stringtemplate")
6171 (version "3.2.1")
6172 (source (origin
6173 (method url-fetch)
6174 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6175 "gh-pages/download/stringtemplate-"
6176 version ".tar.gz"))
6177 (sha256
6178 (base32
6179 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6180 (build-system ant-build-system)
6181 (arguments
6182 `(#:jar-name (string-append ,name "-" ,version ".jar")
6183 #:test-dir "test"
6184 #:modules ((guix build ant-build-system)
6185 (guix build utils)
6186 (srfi srfi-1))
6187 #:phases
6188 (modify-phases %standard-phases
6189 (add-before 'check 'fix-tests
6190 (lambda _
6191 (substitute* "build.xml"
6192 (("\\$\\{test.home\\}/java")
6193 "${test.home}/org"))
6194 #t))
6195 (add-before 'build 'generate-grammar
6196 (lambda _
6197 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6198 (for-each (lambda (file)
6199 (format #t "~a\n" file)
6200 (invoke "antlr" file))
6201 '("template.g" "angle.bracket.template.g" "action.g"
6202 "eval.g" "group.g" "interface.g")))
6203 #t)))))
6204 (native-inputs
6205 `(("antlr" ,antlr2)
6206 ("java-junit" ,java-junit)))
6207 (home-page "http://www.stringtemplate.org")
6208 (synopsis "Template engine to generate formatted text output")
6209 (description "StringTemplate is a java template engine (with ports for C#,
6210 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6211 or any other formatted text output. StringTemplate is particularly good at
6212 code generators, multiple site skins, and internationalization / localization.
6213 StringTemplate also powers ANTLR.")
6214 (license license:bsd-3)))
6215
6216 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6217 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6218 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6219 ;; of antlr3 at runtime.
6220 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6221 ;; This version of ST4 is sufficient for the latest antlr3.
6222 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6223 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6224 ;; against the latest ST4.
6225 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6226 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6227 ;; only grammar files with the antlr2 syntax.
6228 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6229
6230 (define-public java-stringtemplate
6231 (package (inherit java-stringtemplate-3)
6232 (name "java-stringtemplate")
6233 (version "4.0.8")
6234 (source (origin
6235 (method url-fetch)
6236 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6237 version ".tar.gz"))
6238 (file-name (string-append name "-" version ".tar.gz"))
6239 (sha256
6240 (base32
6241 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6242 (build-system ant-build-system)
6243 (arguments
6244 `(#:jar-name (string-append ,name "-" ,version ".jar")
6245 #:tests? #f ; FIXME: tests fail for unknown reasons
6246 #:test-dir "test"
6247 #:modules ((guix build ant-build-system)
6248 (guix build utils)
6249 (srfi srfi-1))
6250 #:phases
6251 (modify-phases %standard-phases
6252 (add-before 'check 'fix-test-target
6253 (lambda _
6254 (substitute* "build.xml"
6255 (("\\$\\{test.home\\}/java") "${test.home}/")
6256 (("\\*Test.java") "Test*.java"))
6257 #t))
6258 (add-before 'build 'generate-grammar
6259 (lambda _
6260 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6261 (for-each (lambda (file)
6262 (format #t "~a\n" file)
6263 (invoke "antlr3" file))
6264 '("STParser.g" "Group.g" "CodeGenerator.g")))
6265 #t)))))
6266 (inputs
6267 `(("antlr3" ,antlr3-bootstrap)
6268 ("antlr2" ,antlr2)
6269 ("java-stringtemplate" ,java-stringtemplate-3)
6270 ("java-junit" ,java-junit)))))
6271
6272 (define java-stringtemplate-4.0.6
6273 (package (inherit java-stringtemplate)
6274 (name "java-stringtemplate")
6275 (version "4.0.6")
6276 (source (origin
6277 (method url-fetch)
6278 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6279 version ".tar.gz"))
6280 (file-name (string-append name "-" version ".tar.gz"))
6281 (sha256
6282 (base32
6283 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6284 (inputs
6285 `(("antlr3" ,antlr3-3.3)
6286 ("antlr2" ,antlr2)
6287 ("java-stringtemplate" ,java-stringtemplate-3)))))
6288
6289 (define-public antlr3
6290 (package
6291 (name "antlr3")
6292 (version "3.5.2")
6293 (source (origin
6294 (method url-fetch)
6295 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6296 version ".tar.gz"))
6297 (file-name (string-append name "-" version ".tar.gz"))
6298 (sha256
6299 (base32
6300 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6301 (build-system ant-build-system)
6302 (arguments
6303 `(#:jar-name (string-append ,name "-" ,version ".jar")
6304 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6305 #:tests? #f
6306 #:phases
6307 (modify-phases %standard-phases
6308 (add-after 'install 'bin-install
6309 (lambda* (#:key inputs outputs #:allow-other-keys)
6310 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6311 (bin (string-append (assoc-ref outputs "out") "/bin")))
6312 (mkdir-p bin)
6313 (with-output-to-file (string-append bin "/antlr3")
6314 (lambda _
6315 (display
6316 (string-append "#!" (which "sh") "\n"
6317 "java -cp " jar "/" ,name "-" ,version ".jar:"
6318 (string-concatenate
6319 (find-files (assoc-ref inputs "stringtemplate")
6320 ".*\\.jar"))
6321 ":"
6322 (string-concatenate
6323 (find-files (assoc-ref inputs "stringtemplate4")
6324 ".*\\.jar"))
6325 ":"
6326 (string-concatenate
6327 (find-files (string-append
6328 (assoc-ref inputs "antlr")
6329 "/lib")
6330 ".*\\.jar"))
6331 " org.antlr.Tool $*"))))
6332 (chmod (string-append bin "/antlr3") #o755))
6333 #t))
6334 (add-before 'build 'generate-grammar
6335 (lambda _
6336 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6337 (for-each (lambda (file)
6338 (display file)
6339 (newline)
6340 (invoke "antlr3" file))
6341 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6342 "AssignTokenTypesWalker.g"
6343 "ActionTranslator.g" "TreeToNFAConverter.g"
6344 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6345 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6346 (substitute* "ANTLRParser.java"
6347 (("public Object getTree") "public GrammarAST getTree"))
6348 (substitute* "ANTLRv3Parser.java"
6349 (("public Object getTree") "public CommonTree getTree"))
6350 (chdir "../../../../../java")
6351 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6352 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6353 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6354 (substitute* "org/antlr/tool/ErrorManager.java"
6355 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6356 (chdir "../../../..")
6357 #t))
6358 (add-before 'build 'fix-build-xml
6359 (lambda _
6360 (substitute* "build.xml"
6361 (("<exec") "<copy todir=\"${classes.dir}\">
6362 <fileset dir=\"tool/src/main/resources\">
6363 <include name=\"**/*.stg\"/>
6364 <include name=\"**/*.st\"/>
6365 <include name=\"**/*.sti\"/>
6366 <include name=\"**/STLexer.tokens\"/>
6367 </fileset>
6368 </copy><exec"))
6369 #t)))))
6370 (native-inputs
6371 `(("antlr" ,antlr2)
6372 ("antlr3" ,antlr3-bootstrap)))
6373 (inputs
6374 `(("junit" ,java-junit)
6375 ("stringtemplate" ,java-stringtemplate-3)
6376 ("stringtemplate4" ,java-stringtemplate)))
6377 (propagated-inputs
6378 `(("stringtemplate" ,java-stringtemplate-3)
6379 ("antlr" ,antlr2)
6380 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6381 (home-page "http://www.antlr3.org")
6382 (synopsis "Framework for constructing recognizers, compilers, and translators")
6383 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6384 is a language tool that provides a framework for constructing recognizers,
6385 compilers, and translators from grammatical descriptions containing Java, C#,
6386 C++, or Python actions. ANTLR provides excellent support for tree construction,
6387 tree walking, and translation.")
6388 (license license:bsd-3)))
6389
6390 (define antlr3-bootstrap
6391 (package
6392 (inherit antlr3)
6393 (name "antlr3-bootstrap")
6394 (native-inputs
6395 `(("antlr" ,antlr2)
6396 ("antlr3" ,antlr3-3.3)))
6397 (inputs
6398 `(("junit" ,java-junit)))))
6399
6400 (define antlr3-3.3
6401 (package
6402 (inherit antlr3)
6403 (name "antlr3")
6404 (version "3.3")
6405 (source (origin
6406 (method url-fetch)
6407 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6408 "gh-pages/download/antlr-"
6409 version ".tar.gz"))
6410 (sha256
6411 (base32
6412 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6413 (patches
6414 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6415 (arguments
6416 `(#:jar-name (string-append ,name "-" ,version ".jar")
6417 #:source-dir (string-join '("tool/src/main/java"
6418 "runtime/Java/src/main/java"
6419 "tool/src/main/antlr2"
6420 "tool/src/main/antlr3")
6421 ":")
6422 #:tests? #f ; FIXME: tests seem to require maven plugin
6423 #:modules ((guix build ant-build-system)
6424 (guix build utils)
6425 (srfi srfi-1))
6426 #:phases
6427 (modify-phases %standard-phases
6428 (add-after 'install 'bin-install
6429 (lambda* (#:key inputs outputs #:allow-other-keys)
6430 (let* ((out (assoc-ref outputs "out"))
6431 (jar (string-append out "/share/java"))
6432 (bin (string-append out "/bin")))
6433 (mkdir-p bin)
6434 (with-output-to-file (string-append bin "/antlr3")
6435 (lambda _
6436 (display
6437 (string-append
6438 "#!" (which "sh") "\n"
6439 "java -cp " jar "/antlr3-3.3.jar:"
6440 (string-join
6441 (append (find-files (assoc-ref inputs "java-stringtemplate")
6442 ".*\\.jar$")
6443 (find-files (string-append (assoc-ref inputs "antlr")
6444 "/lib")
6445 ".*\\.jar$"))
6446 ":")
6447 " org.antlr.Tool $*"))))
6448 (chmod (string-append bin "/antlr3") #o755)
6449 #t)))
6450 (add-before 'build 'generate-grammar
6451 (lambda _
6452 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6453 (("import org.antlr.grammar.v2.\\*;")
6454 "import org.antlr.grammar.v2.*;\n
6455 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6456 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6457 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6458 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6459 (for-each (lambda (file)
6460 (format #t "~a\n" file)
6461 (invoke "antlr" file))
6462 '("antlr.g" "antlr.print.g" "assign.types.g"
6463 "buildnfa.g" "codegen.g" "define.g")))
6464 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6465 (for-each (lambda (file)
6466 (format #t "~a\n" file)
6467 (invoke "antlr3" file))
6468 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6469 "ANTLRv3Tree.g")))
6470 #t))
6471 (add-before 'build 'fix-build-xml
6472 (lambda _
6473 (substitute* "build.xml"
6474 (("<exec") "<copy todir=\"${classes.dir}\">
6475 <fileset dir=\"tool/src/main/resources\">
6476 <include name=\"**/*.stg\"/>
6477 <include name=\"**/*.st\"/>
6478 <include name=\"**/*.sti\"/>
6479 <include name=\"**/STLexer.tokens\"/>
6480 </fileset>
6481 </copy><exec"))
6482 #t)))))
6483 (native-inputs
6484 `(("antlr" ,antlr2)
6485 ("antlr3" ,antlr3-3.1)))
6486 (inputs
6487 `(("junit" ,java-junit)))
6488 (propagated-inputs
6489 `(("java-stringtemplate" ,java-stringtemplate-3)
6490 ("antlr" ,antlr2)
6491 ("antlr3" ,antlr3-3.1)))))
6492
6493 (define antlr3-3.1
6494 (package
6495 (inherit antlr3)
6496 (version "3.1")
6497 (source (origin
6498 (method url-fetch)
6499 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6500 "gh-pages/download/antlr-"
6501 version ".tar.gz"))
6502 (sha256
6503 (base32
6504 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6505 (patches
6506 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6507 (arguments
6508 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6509 #:source-dir "src:runtime/Java/src"
6510 #:tests? #f
6511 #:phases
6512 (modify-phases %standard-phases
6513 (add-after 'install 'bin-install
6514 (lambda* (#:key inputs outputs #:allow-other-keys)
6515 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6516 (bin (string-append (assoc-ref outputs "out") "/bin")))
6517 (mkdir-p bin)
6518 (with-output-to-file (string-append bin "/antlr3")
6519 (lambda _
6520 (display
6521 (string-append "#!" (which "sh") "\n"
6522 "java -cp " jar "/antlr3-3.1.jar:"
6523 (string-concatenate
6524 (find-files (assoc-ref inputs "stringtemplate")
6525 ".*\\.jar"))
6526 ":"
6527 (string-concatenate
6528 (find-files (string-append
6529 (assoc-ref inputs "antlr")
6530 "/lib")
6531 ".*\\.jar"))
6532 " org.antlr.Tool $*"))))
6533 (chmod (string-append bin "/antlr3") #o755))
6534 #t))
6535 (add-before 'build 'generate-grammar
6536 (lambda _
6537 (let ((dir "src/org/antlr/tool/"))
6538 (for-each (lambda (file)
6539 (display file)
6540 (newline)
6541 (invoke "antlr" "-o" dir (string-append dir file)))
6542 '("antlr.g" "antlr.print.g" "assign.types.g"
6543 "buildnfa.g" "define.g")))
6544 (format #t "codegen.g\n")
6545 (invoke "antlr" "-o" "src/org/antlr/codegen"
6546 "src/org/antlr/codegen/codegen.g")
6547 #t))
6548 (add-before 'build 'fix-build-xml
6549 (lambda _
6550 (substitute* "build.xml"
6551 (("<exec") "<copy todir=\"${classes.dir}\">
6552 <fileset dir=\"src\">
6553 <include name=\"**/*.stg\"/>
6554 <include name=\"**/*.st\"/>
6555 <include name=\"**/*.sti\"/>
6556 <include name=\"**/STLexer.tokens\"/>
6557 </fileset>
6558 </copy><exec"))
6559 #t)))))
6560 (native-inputs
6561 `(("antlr" ,antlr2)))
6562 (inputs
6563 `(("junit" ,java-junit)))
6564 (propagated-inputs
6565 `(("stringtemplate" ,java-stringtemplate-3)))))
6566
6567 (define-public java-commons-cli-1.2
6568 ;; This is a bootstrap dependency for Maven2.
6569 (package
6570 (inherit java-commons-cli)
6571 (version "1.2")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (string-append "mirror://apache/commons/cli/source/"
6575 "commons-cli-" version "-src.tar.gz"))
6576 (sha256
6577 (base32
6578 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6579 (arguments
6580 `(#:jar-name "commons-cli.jar"
6581 #:phases
6582 (modify-phases %standard-phases
6583 (add-before 'check 'fix-build-xml
6584 (lambda* (#:key inputs #:allow-other-keys)
6585 (substitute* "build.xml"
6586 (("dir=\"\\$\\{test.home\\}/java\"")
6587 "dir=\"${test.home}\""))
6588 #t)))))
6589 (native-inputs
6590 `(("java-junit" ,java-junit)))))
6591
6592 (define-public java-microemulator-cldc
6593 (package
6594 (name "java-microemulator-cldc")
6595 (version "2.0.4")
6596 (source (origin
6597 (method url-fetch)
6598 (uri (string-append "https://github.com/barteo/microemu/archive/"
6599 "microemulator_"
6600 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6601 version)
6602 ".tar.gz"))
6603 (file-name (string-append name "-" version ".tar.gz"))
6604 (sha256
6605 (base32
6606 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6607 (build-system ant-build-system)
6608 (arguments
6609 `(#:jar-name "microemulator-cldc.jar"
6610 #:source-dir "microemu-cldc/src/main/java"
6611 #:tests? #f)); Requires even older software
6612 (home-page "https://github.com/barteo/microemu")
6613 (synopsis "J2ME CLDC emulator")
6614 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6615 Emulator. It allows to demonstrate MIDlet based applications in web browser
6616 applet and can be run as a standalone java application.")
6617 (license (list license:asl2.0
6618 ;; or altenatively:
6619 license:lgpl2.1+))))
6620
6621 (define-public java-datanucleus-javax-persistence
6622 (package
6623 (name "java-datanucleus-javax-persistence")
6624 (version "2.2.0")
6625 (source (origin
6626 (method url-fetch)
6627 (uri (string-append "https://github.com/datanucleus/"
6628 "javax.persistence/archive/javax.persistence-"
6629 version "-release.tar.gz"))
6630 (sha256
6631 (base32
6632 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6633 (build-system ant-build-system)
6634 (arguments
6635 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6636 #:jdk ,icedtea-8
6637 #:source-dir "src/main/java"
6638 #:tests? #f)); no tests
6639 (home-page "https://github.com/datanucleus/javax.persistence")
6640 (synopsis "JPA API")
6641 (description "This package contains a clean definition of JPA API intended
6642 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6643 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6644 used to generate this API.")
6645 (license (list license:edl1.0 license:epl1.0))))
6646
6647 (define-public java-osgi-cmpn
6648 (package
6649 (name "java-osgi-cmpn")
6650 (version "6.0.0")
6651 (source (origin
6652 (method url-fetch)
6653 (uri (string-append "http://central.maven.org/maven2/"
6654 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6655 version "-sources.jar"))
6656 (sha256
6657 (base32
6658 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6659 (build-system ant-build-system)
6660 (arguments
6661 `(#:jar-name "osgi-cmpn.jar"
6662 #:tests? #f)); no tests
6663 (inputs
6664 `(("annotation" ,java-osgi-annotation)
6665 ("core" ,java-osgi-core)
6666 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6667 ("microemulator" ,java-microemulator-cldc)
6668 ("servlet" ,java-classpathx-servletapi)))
6669 (home-page "https://www.osgi.org")
6670 (synopsis "Compendium specification module of OSGi framework")
6671 (description
6672 "OSGi, for Open Services Gateway initiative framework, is a module system
6673 and service platform for the Java programming language. This package contains
6674 the compendium specification module, providing interfaces and classes for use
6675 in compiling bundles.")
6676 (license license:asl2.0)))
6677
6678 (define-public java-osgi-service-component-annotations
6679 (package
6680 (name "java-osgi-service-component-annotations")
6681 (version "1.3.0")
6682 (source (origin
6683 (method url-fetch)
6684 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6685 "org.osgi.service.component.annotations/"
6686 version "/org.osgi.service.component.annotations-"
6687 version "-sources.jar"))
6688 (sha256
6689 (base32
6690 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6691 (build-system ant-build-system)
6692 (arguments
6693 `(#:jar-name "osgi-service-component-annotations.jar"
6694 #:tests? #f)); no tests
6695 (inputs
6696 `(("annotation" ,java-osgi-annotation)))
6697 (home-page "https://www.osgi.org")
6698 (synopsis "Support annotations for osgi-service-component")
6699 (description
6700 "OSGi, for Open Services Gateway initiative framework, is a module system
6701 and service platform for the Java programming language. This package contains
6702 the support annotations for osgi-service-component.")
6703 (license license:asl2.0)))
6704
6705 (define-public java-osgi-dto
6706 (package
6707 (name "java-osgi-dto")
6708 (version "1.0.0")
6709 (source (origin
6710 (method url-fetch)
6711 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6712 "org.osgi.dto/" version "/org.osgi.dto-"
6713 version "-sources.jar"))
6714 (sha256
6715 (base32
6716 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6717 (build-system ant-build-system)
6718 (arguments
6719 `(#:jar-name "osgi-dto.jar"
6720 #:tests? #f)); no tests
6721 (inputs
6722 `(("annotation" ,java-osgi-annotation)))
6723 (home-page "https://www.osgi.org")
6724 (synopsis "Data Transfer Objects")
6725 (description
6726 "OSGi, for Open Services Gateway initiative framework, is a module system
6727 and service platform for the Java programming language. This package contains
6728 the Data Transfer Objects. It is easily serializable having only public fields
6729 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6730 Map and array aggregates may also be used. The aggregates must only hold
6731 objects of the listed types or aggregates.")
6732 (license license:asl2.0)))
6733
6734 (define-public java-osgi-resource
6735 (package
6736 (name "java-osgi-resource")
6737 (version "1.0.0")
6738 (source (origin
6739 (method url-fetch)
6740 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6741 "org.osgi.resource/"
6742 version "/org.osgi.resource-"
6743 version "-sources.jar"))
6744 (sha256
6745 (base32
6746 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6747 (build-system ant-build-system)
6748 (arguments
6749 `(#:jar-name "osgi-resource.jar"
6750 #:tests? #f)); no tests
6751 (inputs
6752 `(("annotation" ,java-osgi-annotation)
6753 ("dto" ,java-osgi-dto)))
6754 (home-page "https://www.osgi.org")
6755 (synopsis "OSGI Resource")
6756 (description
6757 "OSGi, for Open Services Gateway initiative framework, is a module system
6758 and service platform for the Java programming language. This package contains
6759 the definition of common types in osgi packages.")
6760 (license license:asl2.0)))
6761
6762 (define-public java-osgi-namespace-contract
6763 (package
6764 (name "java-osgi-namespace-contract")
6765 (version "1.0.0")
6766 (source (origin
6767 (method url-fetch)
6768 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6769 "org.osgi.namespace.contract/"
6770 version "/org.osgi.namespace.contract-"
6771 version "-sources.jar"))
6772 (sha256
6773 (base32
6774 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6775 (build-system ant-build-system)
6776 (inputs
6777 `(("resource" ,java-osgi-resource)
6778 ("annotation" ,java-osgi-annotation)))
6779 (arguments
6780 `(#:jar-name "osgi-namespace-contract.jar"
6781 #:tests? #f)); no tests
6782 (home-page "https://www.osgi.org")
6783 (synopsis "Contract Capability and Requirement Namespace")
6784 (description
6785 "OSGi, for Open Services Gateway initiative framework, is a module system
6786 and service platform for the Java programming language. This package contains
6787 the names for the attributes and directives for a namespace with contracts.")
6788 (license license:asl2.0)))
6789
6790 (define-public java-osgi-namespace-extender
6791 (package
6792 (name "java-osgi-namespace-extender")
6793 (version "1.0.1")
6794 (source (origin
6795 (method url-fetch)
6796 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6797 "org.osgi.namespace.extender/"
6798 version "/org.osgi.namespace.extender-"
6799 version "-sources.jar"))
6800 (sha256
6801 (base32
6802 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6803 (build-system ant-build-system)
6804 (inputs
6805 `(("resource" ,java-osgi-resource)
6806 ("annotation" ,java-osgi-annotation)))
6807 (arguments
6808 `(#:jar-name "osgi-namespace-extendent.jar"
6809 #:tests? #f)); no tests
6810 (home-page "https://www.osgi.org")
6811 (synopsis "Extender Capability and Requirement Namespace")
6812 (description
6813 "OSGi, for Open Services Gateway initiative framework, is a module system
6814 and service platform for the Java programming language. This package contains
6815 the names for the attributes and directives for an extender namespace.")
6816 (license license:asl2.0)))
6817
6818 (define-public java-osgi-namespace-service
6819 (package
6820 (name "java-osgi-namespace-service")
6821 (version "1.0.0")
6822 (source (origin
6823 (method url-fetch)
6824 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6825 "org.osgi.namespace.service/"
6826 version "/org.osgi.namespace.service-"
6827 version "-sources.jar"))
6828 (sha256
6829 (base32
6830 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6831 (build-system ant-build-system)
6832 (inputs
6833 `(("resource" ,java-osgi-resource)
6834 ("annotation" ,java-osgi-annotation)))
6835 (arguments
6836 `(#:jar-name "osgi-namespace-service.jar"
6837 #:tests? #f)); no tests
6838 (home-page "https://www.osgi.org")
6839 (synopsis "Service Capability and Requirement Namespace")
6840 (description
6841 "OSGi, for Open Services Gateway initiative framework, is a module system
6842 and service platform for the Java programming language. This package contains
6843 the names for the attributes and directives for a service namespace.")
6844 (license license:asl2.0)))
6845
6846 (define-public java-osgi-util-function
6847 (package
6848 (name "java-osgi-util-function")
6849 (version "1.0.0")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6853 "org.osgi.util.function/"
6854 version "/org.osgi.util.function-"
6855 version "-sources.jar"))
6856 (sha256
6857 (base32
6858 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6859 (build-system ant-build-system)
6860 (arguments
6861 `(#:jar-name "osgi-util-function.jar"
6862 #:tests? #f)); no tests
6863 (inputs
6864 `(("annotation" ,java-osgi-annotation)))
6865 (home-page "https://www.osgi.org")
6866 (synopsis "OSGI Util Function")
6867 (description
6868 "OSGi, for Open Services Gateway initiative framework, is a module system
6869 and service platform for the Java programming language. This package contains
6870 an interface for a function that accepts a single argument and produces a result.")
6871 (license license:asl2.0)))
6872
6873 (define-public java-osgi-util-promise
6874 (package
6875 (name "java-osgi-util-promise")
6876 (version "1.0.0")
6877 (source (origin
6878 (method url-fetch)
6879 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6880 "org.osgi.util.promise/"
6881 version "/org.osgi.util.promise-"
6882 version "-sources.jar"))
6883 (sha256
6884 (base32
6885 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6886 (build-system ant-build-system)
6887 (arguments
6888 `(#:jar-name "osgi-util-promise.jar"
6889 #:tests? #f)); no tests
6890 (inputs
6891 `(("annotation" ,java-osgi-annotation)
6892 ("function" ,java-osgi-util-function)))
6893 (home-page "https://www.osgi.org")
6894 (synopsis "Promise of a value")
6895 (description
6896 "OSGi, for Open Services Gateway initiative framework, is a module system
6897 and service platform for the Java programming language. This package contains
6898 an interface and utilitary classes for promises. A Promise represents a future
6899 value. It handles the interactions for asynchronous processing.")
6900 (license license:asl2.0)))
6901
6902 (define-public java-osgi-service-metatype-annotations
6903 (package
6904 (name "java-osgi-service-metatype-annotations")
6905 (version "1.3.0")
6906 (source (origin
6907 (method url-fetch)
6908 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6909 "org.osgi.service.metatype.annotations/"
6910 version "/org.osgi.service.metatype.annotations-"
6911 version "-sources.jar"))
6912 (sha256
6913 (base32
6914 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6915 (build-system ant-build-system)
6916 (arguments
6917 `(#:jar-name "osgi-service-metatype-annotations.jar"
6918 #:tests? #f)); no tests
6919 (inputs
6920 `(("annotation" ,java-osgi-annotation)))
6921 (home-page "https://www.osgi.org")
6922 (synopsis "Support annotations for metatype")
6923 (description
6924 "OSGi, for Open Services Gateway initiative framework, is a module system
6925 and service platform for the Java programming language. This package contains
6926 the support annotations for metatype.")
6927 (license license:asl2.0)))
6928
6929 (define-public java-osgi-service-repository
6930 (package
6931 (name "java-osgi-service-repository")
6932 (version "1.1.0")
6933 (source (origin
6934 (method url-fetch)
6935 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6936 "org.osgi.service.repository/"
6937 version "/org.osgi.service.repository-"
6938 version "-sources.jar"))
6939 (sha256
6940 (base32
6941 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6942 (build-system ant-build-system)
6943 (arguments
6944 `(#:jar-name "osgi-service-repository.jar"
6945 #:tests? #f)); no tests
6946 (inputs
6947 `(("annotation" ,java-osgi-annotation)
6948 ("promise" ,java-osgi-util-promise)
6949 ("resource" ,java-osgi-resource)))
6950 (home-page "https://www.osgi.org")
6951 (synopsis "OSGI service repository")
6952 (description
6953 "OSGi, for Open Services Gateway initiative framework, is a module system
6954 and service platform for the Java programming language. This package contains
6955 a repository service that contains resources.")
6956 (license license:asl2.0)))
6957
6958 (define-public java-osgi-framework
6959 (package
6960 (name "java-osgi-framework")
6961 (version "1.8.0")
6962 (source (origin
6963 (method url-fetch)
6964 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6965 "org.osgi.framework/" version "/org.osgi.framework-"
6966 version "-sources.jar"))
6967 (sha256
6968 (base32
6969 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6970 (build-system ant-build-system)
6971 (arguments
6972 `(#:jar-name "osgi-framework.jar"
6973 #:tests? #f)); no tests
6974 (inputs
6975 `(("annotation" ,java-osgi-annotation)
6976 ("resource" ,java-osgi-resource)
6977 ("dto" ,java-osgi-dto)))
6978 (home-page "https://www.osgi.org")
6979 (synopsis "OSGi framework")
6980 (description
6981 "OSGi, for Open Services Gateway initiative framework, is a module system
6982 and service platform for the Java programming language.")
6983 (license license:asl2.0)))
6984
6985 (define-public java-osgi-service-log
6986 (package
6987 (name "java-osgi-service-log")
6988 (version "1.3.0")
6989 (source (origin
6990 (method url-fetch)
6991 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6992 "org.osgi.service.log/"
6993 version "/org.osgi.service.log-"
6994 version "-sources.jar"))
6995 (sha256
6996 (base32
6997 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6998 (build-system ant-build-system)
6999 (arguments
7000 `(#:jar-name "osgi-service-log.jar"
7001 #:tests? #f)); no tests
7002 (inputs
7003 `(("java-osgi-framework" ,java-osgi-framework)))
7004 (home-page "https://www.osgi.org")
7005 (synopsis "Provides methods for bundles to write messages to the log")
7006 (description
7007 "OSGi, for Open Services Gateway initiative framework, is a module system
7008 and service platform for the Java programming language. This package contains
7009 the log service.")
7010 (license license:asl2.0)))
7011
7012 (define-public java-osgi-service-jdbc
7013 (package
7014 (name "java-osgi-service-jdbc")
7015 (version "1.0.0")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7019 "org.osgi.service.jdbc/"
7020 version "/org.osgi.service.jdbc-"
7021 version "-sources.jar"))
7022 (sha256
7023 (base32
7024 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7025 (build-system ant-build-system)
7026 (arguments
7027 `(#:jar-name "osgi-service-jdbc.jar"
7028 #:tests? #f)); no tests
7029 (home-page "https://www.osgi.org")
7030 (synopsis "Factory for JDBC connection factories")
7031 (description
7032 "OSGi, for Open Services Gateway initiative framework, is a module system
7033 and service platform for the Java programming language. This package contains
7034 a factory for JDBC connection factories. There are 3 preferred connection
7035 factories for getting JDBC connections:
7036
7037 @itemize
7038 @item @code{javax.sql.DataSource};
7039 @item @code{javax.sql.ConnectionPoolDataSource};
7040 @item @code{javax.sql.XADataSource}.
7041 @end itemize")
7042 (license license:asl2.0)))
7043
7044 (define-public java-osgi-service-resolver
7045 (package
7046 (name "java-osgi-service-resolver")
7047 (version "1.0.1")
7048 (source (origin
7049 (method url-fetch)
7050 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7051 "org.osgi.service.resolver/"
7052 version "/org.osgi.service.resolver-"
7053 version "-sources.jar"))
7054 (sha256
7055 (base32
7056 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7057 (build-system ant-build-system)
7058 (arguments
7059 `(#:jar-name "osgi-service-resolver.jar"
7060 #:tests? #f)); no tests
7061 (inputs
7062 `(("annotation" ,java-osgi-annotation)
7063 ("resource" ,java-osgi-resource)))
7064 (home-page "https://www.osgi.org")
7065 (synopsis "OSGI Resolver service")
7066 (description
7067 "OSGi, for Open Services Gateway initiative framework, is a module system
7068 and service platform for the Java programming language. This package contains
7069 a resolver service that resolves the specified resources in the context supplied
7070 by the caller.")
7071 (license license:asl2.0)))
7072
7073 (define-public java-osgi-util-tracker
7074 (package
7075 (name "java-osgi-util-tracker")
7076 (version "1.5.1")
7077 (source (origin
7078 (method url-fetch)
7079 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7080 "org.osgi.util.tracker/"
7081 version "/org.osgi.util.tracker-"
7082 version "-sources.jar"))
7083 (sha256
7084 (base32
7085 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7086 (build-system ant-build-system)
7087 (arguments
7088 `(#:jar-name "osgi-util-tracker.jar"
7089 #:tests? #f)); no tests
7090 (inputs
7091 `(("framework" ,java-osgi-framework)
7092 ("annotation" ,java-osgi-annotation)))
7093 (home-page "https://www.osgi.org")
7094 (synopsis "Bundle tracking")
7095 (description
7096 "OSGi, for Open Services Gateway initiative framework, is a module system
7097 and service platform for the Java programming language. This package contains
7098 bundle tracking utility classes.")
7099 (license license:asl2.0)))
7100
7101 (define-public java-osgi-service-cm
7102 (package
7103 (name "java-osgi-service-cm")
7104 (version "1.5.0")
7105 (source (origin
7106 (method url-fetch)
7107 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7108 "org.osgi.service.cm/"
7109 version "/org.osgi.service.cm-"
7110 version "-sources.jar"))
7111 (sha256
7112 (base32
7113 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7114 (build-system ant-build-system)
7115 (arguments
7116 `(#:jar-name "osgi-service-cm.jar"
7117 #:tests? #f)); no tests
7118 (inputs
7119 `(("framework" ,java-osgi-framework)
7120 ("annotation" ,java-osgi-annotation)))
7121 (home-page "https://www.osgi.org")
7122 (synopsis "OSGI Configuration Management")
7123 (description
7124 "OSGi, for Open Services Gateway initiative framework, is a module system
7125 and service platform for the Java programming language. This package contains
7126 utility classes for the configuration of services.")
7127 (license license:asl2.0)))
7128
7129 (define-public java-osgi-service-packageadmin
7130 (package
7131 (name "java-osgi-service-packageadmin")
7132 (version "1.2.0")
7133 (source (origin
7134 (method url-fetch)
7135 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7136 "org.osgi.service.packageadmin/"
7137 version "/org.osgi.service.packageadmin-"
7138 version "-sources.jar"))
7139 (sha256
7140 (base32
7141 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7142 (build-system ant-build-system)
7143 (arguments
7144 `(#:jar-name "osgi-service-packageadmin.jar"
7145 #:tests? #f)); no tests
7146 (inputs
7147 `(("framework" ,java-osgi-framework)))
7148 (home-page "https://www.osgi.org")
7149 (synopsis "OSGI Package Administration")
7150 (description
7151 "OSGi, for Open Services Gateway initiative framework, is a module system
7152 and service platform for the Java programming language. This package contains
7153 the packageadmin service.")
7154 (license license:asl2.0)))
7155
7156 (define-public java-ops4j-base-lang
7157 (package
7158 (name "java-ops4j-base-lang")
7159 (version "1.5.0")
7160 (source (origin
7161 (method url-fetch)
7162 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7163 "archive/base-" version ".tar.gz"))
7164 (sha256
7165 (base32
7166 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7167 (build-system ant-build-system)
7168 (arguments
7169 `(#:jar-name "java-ops4j-base-lang.jar"
7170 #:source-dir "ops4j-base-lang/src/main/java"
7171 #:tests? #f; no tests
7172 #:phases
7173 (modify-phases %standard-phases
7174 (add-before 'build 'add-test-file
7175 (lambda _
7176 ;; That file is required by a test in ops4j-pax-exam-core-spi
7177 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7178 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7179 (lambda _
7180 (display
7181 (string-append
7182 "version=" ,version "\n"
7183 "groupId=org.ops4j.base"
7184 "artifactId=ops4j-base-lang\n"))))
7185 #t)))))
7186 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7187 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7188 (description "OPS4J stands for Open Participation Software for Java. This
7189 package contains utilities and extensions related to @code{java.lang}.")
7190 (license license:asl2.0)))
7191
7192 (define-public java-ops4j-base-monitors
7193 (package
7194 (inherit java-ops4j-base-lang)
7195 (name "java-ops4j-base-monitors")
7196 (arguments
7197 `(#:jar-name "java-ops4j-base-monitors.jar"
7198 #:source-dir "ops4j-base-monitors/src/main/java"
7199 #:tests? #f)); no tests
7200 (inputs
7201 `(("lang" ,java-ops4j-base-lang)))
7202 (description "OPS4J stands for Open Participation Software for Java. This
7203 package contains utilities and extensions related to monitoring.")))
7204
7205 (define-public java-ops4j-base-io
7206 (package
7207 (inherit java-ops4j-base-lang)
7208 (name "java-ops4j-base-io")
7209 (arguments
7210 `(#:jar-name "java-ops4j-base-io.jar"
7211 #:source-dir "ops4j-base-io/src/main/java"
7212 #:test-dir "ops4j-base-io/src/test"
7213 #:test-exclude
7214 (list "**/ListerTest.java")))
7215 (inputs
7216 `(("lang" ,java-ops4j-base-monitors)
7217 ("lang" ,java-ops4j-base-lang)))
7218 (native-inputs
7219 `(("junit" ,java-junit)
7220 ("hamcrest" ,java-hamcrest-core)))
7221 (description "OPS4J stands for Open Participation Software for Java. This
7222 package contains utilities and extensions related to handling streams and files.")))
7223
7224 (define-public java-ops4j-base-util
7225 (package
7226 (inherit java-ops4j-base-lang)
7227 (name "java-ops4j-base-util")
7228 (arguments
7229 `(#:jar-name "java-ops4j-base-util.jar"
7230 #:source-dir "ops4j-base-util/src/main/java"
7231 #:test-dir "ops4j-base-util/src/test"))
7232 (inputs
7233 `(("lang" ,java-ops4j-base-lang)))
7234 (native-inputs
7235 `(("junit" ,java-junit)))
7236 (description "OPS4J stands for Open Participation Software for Java. This
7237 package contains utilities and extensions related to environment, i18n and
7238 mime types.")))
7239
7240 (define-public java-ops4j-base-util-property
7241 (package
7242 (inherit java-ops4j-base-lang)
7243 (name "java-ops4j-base-util-property")
7244 (arguments
7245 `(#:jar-name "java-ops4j-base-util-property.jar"
7246 #:source-dir "ops4j-base-util-property/src/main/java"
7247 #:tests? #f)); no tests
7248 (inputs
7249 `(("lang" ,java-ops4j-base-lang)
7250 ("util" ,java-ops4j-base-util)))
7251 (description "OPS4J stands for Open Participation Software for Java. This
7252 package contains utilities and extensions related to resolving properties from
7253 different sources.")))
7254
7255 (define-public java-ops4j-base-store
7256 (package
7257 (inherit java-ops4j-base-lang)
7258 (name "java-ops4j-base-store")
7259 (arguments
7260 `(#:jar-name "java-ops4j-base-store.jar"
7261 #:source-dir "ops4j-base-store/src/main/java"
7262 #:tests? #f)); no tests
7263 (inputs
7264 `(("lang" ,java-ops4j-base-lang)
7265 ("slf4j" ,java-slf4j-api)
7266 ("io" ,java-ops4j-base-io)))
7267 (description "OPS4J stands for Open Participation Software for Java. This
7268 package contains utilities for storing and retrieving data from an
7269 @code{InputStream}.")))
7270
7271 (define-public java-ops4j-base-spi
7272 (package
7273 (inherit java-ops4j-base-lang)
7274 (name "java-ops4j-base-spi")
7275 (arguments
7276 `(#:jar-name "java-ops4j-base-spi.jar"
7277 #:source-dir "ops4j-base-spi/src/main/java"
7278 #:test-dir "ops4j-base-spi/src/test"))
7279 (native-inputs
7280 `(("junit" ,java-junit)
7281 ("hamcrest" ,java-hamcrest-core)))
7282 (description "OPS4J stands for Open Participation Software for Java. This
7283 package contains utilities for obtaining services via the Java SE 6
7284 @code{ServiceLoader}.")))
7285
7286 (define-public java-aqute-bnd-annotation
7287 (package
7288 (name "java-aqute-bnd-annotation")
7289 (version "3.5.0")
7290 (source (origin
7291 (method url-fetch)
7292 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7293 version ".REL.tar.gz"))
7294 (file-name (string-append name "-" version ".tar.gz"))
7295 (sha256
7296 (base32
7297 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7298 (build-system ant-build-system)
7299 (arguments
7300 `(#:jar-name "java-aqute-bnd-annotation.jar"
7301 #:source-dir "biz.aQute.bnd.annotation/src"
7302 #:tests? #f)); empty test dir
7303 (home-page "http://bnd.bndtools.org/")
7304 (synopsis "Tools for OSGi")
7305 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7306 headers based on analyzing the class code, it verifies the project settings,
7307 it manages project dependencies, gives diffs jars, and much more.")
7308 (license license:asl2.0)))
7309
7310 (define-public java-aqute-libg
7311 (package
7312 (inherit java-aqute-bnd-annotation)
7313 (name "java-aqute-libg")
7314 (arguments
7315 `(#:jar-name "java-aqute-libg.jar"
7316 ;; The build fails when source/target more recent than 1.7. This
7317 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7318 ;;
7319 ;; It is closed as won't fix. There is no way to change the source
7320 ;; so that it works on 1.8, and still works on 1.6, the upstream
7321 ;; target. It work fine on 1.7, so we use 1.7.
7322 #:make-flags (list "-Dant.build.javac.source=1.7"
7323 "-Dant.build.javac.target=1.7")
7324 #:phases
7325 (modify-phases %standard-phases
7326 (add-before 'configure 'chdir
7327 ;; Change to aQute.libg directory, so that the relative
7328 ;; paths in the tests aren't broken.
7329 (lambda _
7330 (chdir "aQute.libg")
7331 #t))
7332 (add-before 'check 'create-test-directory
7333 ;; Copy the test directory to test/java, since that's where
7334 ;; ant-build-system's default project in build.xml expects to find
7335 ;; the test classes. Leave a copy in the original place to not
7336 ;; break paths in tests.
7337 (lambda _
7338 (mkdir "src/test")
7339 (copy-recursively "test" "src/test/java")
7340 #t)))))
7341 (inputs
7342 `(("slf4j" ,java-slf4j-api)
7343 ("osgi-annot" ,java-osgi-annotation)
7344 ("java-osgi-cmpn" ,java-osgi-cmpn)
7345 ("osgi" ,java-osgi-core)))
7346 (native-inputs
7347 `(("hamcrest" ,java-hamcrest-core)
7348 ("java-junit" ,java-junit)))))
7349
7350 (define java-aqute-libg-bootstrap
7351 (package
7352 (inherit java-aqute-libg)
7353 (name "java-aqute-libg-bootstrap")
7354 (arguments
7355 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7356 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7357 ((#:tests? _ #f) #f)))
7358 (inputs
7359 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7360 ,@(delete `("slf4j" ,java-slf4j-api)
7361 (package-inputs java-aqute-libg))))
7362 (native-inputs '())))
7363
7364 (define-public java-aqute-bndlib
7365 (package
7366 (inherit java-aqute-bnd-annotation)
7367 (name "java-aqute-bndlib")
7368 (arguments
7369 `(#:jar-name "java-bndlib.jar"
7370 #:source-dir "biz.aQute.bndlib/src"
7371 #:tests? #f)); no tests
7372 (inputs
7373 `(("slf4j" ,java-slf4j-api)
7374 ("osgi-annot" ,java-osgi-annotation)
7375 ("java-aqute-libg" ,java-aqute-libg)
7376 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7377 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7378 ("java-osgi-service-repository" ,java-osgi-service-repository)
7379 ("java-osgi-service-log" ,java-osgi-service-log)
7380 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7381 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7382 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7383 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7384 ("promise" ,java-osgi-util-promise)
7385 ("osgi" ,java-osgi-core)))))
7386
7387 (define java-aqute-bndlib-bootstrap
7388 (package
7389 (inherit java-aqute-bndlib)
7390 (name "java-aqute-bndlib-bootstrap")
7391 (inputs
7392 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7393 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7394 ,@(delete `("slf4j" ,java-slf4j-api)
7395 (delete `("java-aqute-libg" ,java-aqute-libg)
7396 (package-inputs java-aqute-bndlib)))))))
7397
7398 (define-public java-ops4j-pax-tinybundles
7399 (package
7400 (name "java-ops4j-pax-tinybundles")
7401 (version "2.1.1")
7402 (source (origin
7403 (method url-fetch)
7404 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7405 "archive/tinybundles-" version ".tar.gz"))
7406 (sha256
7407 (base32
7408 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7409 (arguments
7410 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7411 #:source-dir "src/main/java"
7412 #:test-exclude
7413 ;; Abstract base classes for other tests
7414 (list "**/BndTest.java" "**/CoreTest.java")
7415 #:phases
7416 (modify-phases %standard-phases
7417 (add-before 'check 'fix-version
7418 (lambda _
7419 ;; This test has a reference to an old version of bndlib we are not
7420 ;; packaging. It uses the version referenced in pom.xml. We replace
7421 ;; it with our own version.
7422 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7423 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7424 ,(package-version java-aqute-bndlib)))
7425 #t)))))
7426 (inputs
7427 `(("lang" ,java-ops4j-base-lang)
7428 ("io" ,java-ops4j-base-io)
7429 ("store" ,java-ops4j-base-store)
7430 ("slf4j" ,java-slf4j-api)
7431 ("libg" ,java-aqute-libg)
7432 ("bndlib" ,java-aqute-bndlib)))
7433 (native-inputs
7434 `(("junit" ,java-junit)
7435 ("hamcrest" ,java-hamcrest-core)
7436 ("log4j" ,java-log4j-api)
7437 ("bndannotation" ,java-aqute-bnd-annotation)
7438 ("framework" ,java-osgi-framework)))
7439 (build-system ant-build-system)
7440 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7441 (synopsis "Java APIs to create OSGi related artifacts")
7442 (description "Tinybundles is all about creating OSGi related artifacts like
7443 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7444 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7445 other hand, this library can be a foundation of real end user tools that need
7446 to create those artifacts.")
7447 (license license:asl2.0)))
7448
7449 (define-public java-ops4j-pax-exam-core
7450 (package
7451 (name "java-ops4j-pax-exam-core")
7452 (version "4.11.0")
7453 (source (origin
7454 (method url-fetch)
7455 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7456 "archive/exam-reactor-" version ".tar.gz"))
7457 (sha256
7458 (base32
7459 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7460 (arguments
7461 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7462 #:source-dir "core/pax-exam/src/main/java"
7463 #:test-dir "core/pax-exam/src/test"))
7464 (inputs
7465 `(("slf4j" ,java-slf4j-api)
7466 ("lang" ,java-ops4j-base-lang)
7467 ("io" ,java-ops4j-base-io)
7468 ("util-property" ,java-ops4j-base-util-property)
7469 ("util-store" ,java-ops4j-base-store)
7470 ("java-osgi-core" ,java-osgi-core)))
7471 (native-inputs
7472 `(("junit" ,java-junit)
7473 ("hamcrest" ,java-hamcrest-core)))
7474 (build-system ant-build-system)
7475 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7476 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7477 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7478 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7479 the system under test at the same time.")
7480 (license license:asl2.0)))
7481
7482 (define-public java-ops4j-pax-exam-core-spi
7483 (package
7484 (inherit java-ops4j-pax-exam-core)
7485 (name "java-ops4j-pax-exam-core-spi")
7486 (arguments
7487 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7488 #:source-dir "src/main/java"
7489 #:test-exclude
7490 (list
7491 ;; Abstract base class, not a test
7492 "**/BaseStagedReactorTest.java"
7493 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7494 "**/WarBuilderTest.java")
7495 #:phases
7496 (modify-phases %standard-phases
7497 (add-before 'configure 'chdir
7498 (lambda _
7499 ;; Tests assume we are in this directory
7500 (chdir "core/pax-exam-spi")
7501 #t))
7502 (add-before 'check 'fix-tests
7503 (lambda _
7504 ;; One test checks that this file is present.
7505 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7506 (with-output-to-file
7507 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7508 (lambda _
7509 (display
7510 (string-append "artifactId = pax-exam-spi\n"
7511 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7512 ;; Maven puts compilation results in the target directory, while we
7513 ;; put them in the build directory.
7514 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7515 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7516 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7517 (("target") "build"))
7518 ;; One test is expected to fail, but it doesn't throw the expected exception
7519 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7520 (("AssertionError") "IllegalArgumentException"))
7521 #t)))))
7522 (inputs
7523 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7524 ("lang" ,java-ops4j-base-lang)
7525 ("monitors" ,java-ops4j-base-monitors)
7526 ("store" ,java-ops4j-base-store)
7527 ("io" ,java-ops4j-base-io)
7528 ("spi" ,java-ops4j-base-spi)
7529 ("osgi" ,java-osgi-core)
7530 ("slf4j" ,java-slf4j-api)
7531 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7532 (native-inputs
7533 `(("mockito" ,java-mockito-1)
7534 ("junit" ,java-junit)
7535 ("hamcrest" ,java-hamcrest-core)
7536 ("cglib" ,java-cglib)
7537 ("objenesis" ,java-objenesis)
7538 ("asm" ,java-asm)))))
7539
7540 (define-public java-ops4j-pax-exam-core-junit
7541 (package
7542 (inherit java-ops4j-pax-exam-core)
7543 (name "java-ops4j-pax-exam-core-junit")
7544 (arguments
7545 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7546 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7547 #:tests? #f)); no tests
7548 (inputs
7549 `(("junit" ,java-junit)
7550 ("slf4j" ,java-slf4j-api)
7551 ("core" ,java-ops4j-pax-exam-core)
7552 ("spi" ,java-ops4j-pax-exam-core-spi)))
7553 (native-inputs '())))
7554
7555 (define-public java-fasterxml-jackson-annotations
7556 (package
7557 (name "java-fasterxml-jackson-annotations")
7558 (version "2.9.4")
7559 (source (origin
7560 (method url-fetch)
7561 (uri (string-append "https://github.com/FasterXML/"
7562 "jackson-annotations/archive/"
7563 "jackson-annotations-" version ".tar.gz"))
7564 (sha256
7565 (base32
7566 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7567 (build-system ant-build-system)
7568 (arguments
7569 `(#:jar-name "jackson-annotations.jar"
7570 #:source-dir "src/main/java"
7571 #:test-dir "src/test"))
7572 (native-inputs
7573 `(("junit" ,java-junit)))
7574 (home-page "https://github.com/FasterXML/jackson-annotations")
7575 (synopsis "General purpose annotations for the Jackson Data Processor")
7576 (description "This package contains general purpose annotations for the
7577 Jackson Data Processor, used on value and handler types. The only annotations
7578 not included are ones that require dependency to the Databind package.")
7579 (license license:asl2.0)))
7580
7581 (define-public java-fasterxml-jackson-core
7582 (package
7583 (name "java-fasterxml-jackson-core")
7584 (version "2.9.4")
7585 (source (origin
7586 (method url-fetch)
7587 (uri (string-append "https://github.com/FasterXML/"
7588 "jackson-core/archive/"
7589 "jackson-core-" version ".tar.gz"))
7590 (sha256
7591 (base32
7592 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7593 (build-system ant-build-system)
7594 (arguments
7595 `(#:jar-name "jackson-core.jar"
7596 #:source-dir "src/main/java"
7597 #:test-dir "src/test"
7598 #:test-exclude
7599 (list
7600 ;; Expected failure. pom.xml excludes these
7601 "**/failing/**"
7602 ;; Base classes that have no constructor for junit
7603 "**/BaseTest.java"
7604 "**/ConcurrencyReadTest.java"
7605 "**/ManualCharAccessTest.java"
7606 "**/ManualCharAccessTest.java"
7607 "**/TrailingCommasTest.java"
7608 "**/AsyncMissingValuesInObjectTest.java"
7609 "**/AsyncMissingValuesInArrayTest.java")
7610 #:phases
7611 (modify-phases %standard-phases
7612 (add-before 'configure 'generate-PackageVersion.java
7613 (lambda _
7614 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7615 (in (string-append out ".in")))
7616 (copy-file in out)
7617 (substitute* out
7618 (("@package@") "com.fasterxml.jackson.core.json")
7619 (("@projectversion@") ,version)
7620 (("@projectgroupid@") "com.fasterxml.jackson.core")
7621 (("@projectartifactid@") "jackson-core")))
7622 #t))
7623 (add-before 'build 'copy-resources
7624 (lambda _
7625 (copy-recursively "src/main/resources"
7626 "build/classes")
7627 #t))
7628 (add-before 'check 'copy-test-resources
7629 (lambda _
7630 (copy-recursively "src/test/resources"
7631 "build/test-classes")
7632 #t)))))
7633 (native-inputs
7634 `(("junit" ,java-junit)
7635 ("hamcrest" ,java-hamcrest-core)))
7636 (home-page "https://github.com/FasterXML/jackson-core")
7637 (synopsis "")
7638 (description "")
7639 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7640
7641 (define-public java-fasterxml-jackson-databind
7642 (package
7643 (name "java-fasterxml-jackson-databind")
7644 (version "2.9.4")
7645 (source (origin
7646 (method url-fetch)
7647 (uri (string-append "https://github.com/FasterXML/"
7648 "jackson-databind/archive/"
7649 "jackson-databind-" version ".tar.gz"))
7650 (sha256
7651 (base32
7652 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7653 (build-system ant-build-system)
7654 (arguments
7655 `(#:jar-name "jackson-databind.jar"
7656 #:source-dir "src/main/java"
7657 #:tests? #f; requires javax.measures for which I can't find a free implementation
7658 #:phases
7659 (modify-phases %standard-phases
7660 (add-before 'configure 'generate-PackageVersion.java
7661 (lambda _
7662 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7663 (in (string-append out ".in")))
7664 (copy-file in out)
7665 (substitute* out
7666 (("@package@") "com.fasterxml.jackson.databind.cfg")
7667 (("@projectversion@") ,version)
7668 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7669 (("@projectartifactid@") "jackson-databind")))
7670 #t))
7671 (add-before 'build 'copy-resources
7672 (lambda _
7673 (copy-recursively "src/main/resources" "build/classes")
7674 #t)))))
7675 (inputs
7676 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7677 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7678 (home-page "https://github.com/FasterXML/jackson-databind")
7679 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7680 (description "This package contains the general-purpose data-binding
7681 functionality and tree-model for Jackson Data Processor. It builds on core
7682 streaming parser/generator package, and uses Jackson Annotations for
7683 configuration.")
7684 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7685
7686 (define-public java-fasterxml-jackson-modules-base-jaxb
7687 (package
7688 (name "java-fasterxml-jackson-modules-base-jaxb")
7689 (version "2.9.4")
7690 (source (origin
7691 (method url-fetch)
7692 (uri (string-append "https://github.com/FasterXML/"
7693 "jackson-modules-base/archive/"
7694 "jackson-modules-base-" version ".tar.gz"))
7695 (sha256
7696 (base32
7697 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7698 (build-system ant-build-system)
7699 (arguments
7700 `(#:jar-name "jackson-modules-base-jaxb.jar"
7701 #:source-dir "jaxb/src/main/java"
7702 #:test-dir "jaxb/src/test"
7703 #:test-exclude
7704 ;; Base class for tests
7705 (list "**/BaseJaxbTest.java")
7706 #:phases
7707 (modify-phases %standard-phases
7708 (add-before 'configure 'generate-PackageVersion.java
7709 (lambda _
7710 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7711 "jackson/module/jaxb/PackageVersion.java"))
7712 (in (string-append out ".in")))
7713 (copy-file in out)
7714 (substitute* out
7715 (("@package@") "com.fasterxml.jackson.module.jaxb")
7716 (("@projectversion@") ,version)
7717 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7718 (("@projectartifactid@") "jackson-module-jaxb")))
7719 #t))
7720 (add-before 'build 'copy-resources
7721 (lambda _
7722 (copy-recursively "jaxb/src/main/resources" "build/classes")
7723 #t)))))
7724 (inputs
7725 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7726 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7727 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7728 (native-inputs
7729 `(("java-junit" ,java-junit)))
7730 (home-page "https://github.com/FasterXML/jackson-modules-base")
7731 (synopsis "Jaxb annotations jackson module")
7732 (description "This package is the jaxb annotations module for jackson.")
7733 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7734
7735 (define-public java-fasterxml-jackson-modules-base-mrbean
7736 (package
7737 (name "java-fasterxml-jackson-modules-base-mrbean")
7738 (version "2.9.4")
7739 (source (origin
7740 (method url-fetch)
7741 (uri (string-append "https://github.com/FasterXML/"
7742 "jackson-modules-base/archive/"
7743 "jackson-modules-base-" version ".tar.gz"))
7744 (sha256
7745 (base32
7746 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7747 (build-system ant-build-system)
7748 (arguments
7749 `(#:jar-name "jackson-modules-base-mrbean.jar"
7750 #:source-dir "mrbean/src/main/java"
7751 #:test-dir "mrbean/src/test"
7752 #:test-exclude
7753 ;; Base class for tests
7754 (list "**/BaseTest.java")
7755 #:phases
7756 (modify-phases %standard-phases
7757 (add-before 'configure 'generate-PackageVersion.java
7758 (lambda _
7759 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
7760 "jackson/module/mrbean/PackageVersion.java"))
7761 (in (string-append out ".in")))
7762 (copy-file in out)
7763 (substitute* out
7764 (("@package@") "com.fasterxml.jackson.module.mrbean")
7765 (("@projectversion@") ,version)
7766 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
7767 (("@projectartifactid@") "jackson-module-mrbean")))
7768 #t)))))
7769 (inputs
7770 `(("java-asm" ,java-asm)
7771 ("java-fasterxml-jackson-annotations"
7772 ,java-fasterxml-jackson-annotations)
7773 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7774 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7775 (native-inputs
7776 `(("java-junit" ,java-junit)))
7777 (home-page "https://github.com/FasterXML/jackson-modules-base")
7778 (synopsis "POJO type materialization for Java")
7779 (description "This package implements POJO type materialization.
7780 Databinders can construct implementation classes for Java interfaces as part
7781 of deserialization.")
7782 (license license:asl2.0)))
7783
7784 (define-public java-snakeyaml
7785 (package
7786 (name "java-snakeyaml")
7787 (version "1.18")
7788 (source (origin
7789 (method url-fetch)
7790 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7791 version ".tar.gz"))
7792 (file-name (string-append name "-" version ".tar.gz"))
7793 (sha256
7794 (base32
7795 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7796 (build-system ant-build-system)
7797 (arguments
7798 `(#:jar-name "java-snakeyaml.jar"
7799 #:source-dir "src/main/java"
7800 ;; Tests require velocity, a cyclic dependency, and
7801 ;; java-spring-framework-context which is not packaged.
7802 #:tests? #f))
7803 (home-page "https://bitbucket.org/asomov/snakeyaml")
7804 (synopsis "YAML processor")
7805 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7806 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7807
7808 (define-public java-fasterxml-jackson-dataformat-yaml
7809 (package
7810 (name "java-fasterxml-jackson-dataformat-yaml")
7811 (version "2.9.4")
7812 (source (origin
7813 (method url-fetch)
7814 (uri (string-append "https://github.com/FasterXML/"
7815 "jackson-dataformats-text/archive/"
7816 "jackson-dataformats-text-" version ".tar.gz"))
7817 (sha256
7818 (base32
7819 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7820 (build-system ant-build-system)
7821 (arguments
7822 `(#:jar-name "jackson-dataformat-yaml.jar"
7823 #:source-dir "yaml/src/main/java"
7824 #:test-dir "yaml/src/test"
7825 #:test-exclude (list "**/failing/**.java")
7826 #:phases
7827 (modify-phases %standard-phases
7828 (add-before 'configure 'generate-PackageVersion.java
7829 (lambda _
7830 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7831 (in (string-append out ".in")))
7832 (copy-file in out)
7833 (substitute* out
7834 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7835 (("@projectversion@") ,version)
7836 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7837 (("@projectartifactid@") "jackson-dataformat-yaml")))
7838 #t)))))
7839 (inputs
7840 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7841 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7842 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7843 ("java-snakeyaml" ,java-snakeyaml)))
7844 (native-inputs
7845 `(("junit" ,java-junit)
7846 ("hamcrest" ,java-hamcrest-core)
7847 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7848 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7849 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7850 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7851 (synopsis "Yaml backend for Jackson")
7852 (description "Dataformat backends are used to support format alternatives
7853 to JSON, supported by default. This is done by sub-classing Jackson core
7854 abstractions.")
7855 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7856
7857 (define-public java-stax2-api
7858 (package
7859 (name "java-stax2-api")
7860 (version "4.0.0")
7861 (source (origin
7862 (method url-fetch)
7863 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7864 "stax2-api-" version ".tar.gz"))
7865 (sha256
7866 (base32
7867 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7868 (build-system ant-build-system)
7869 (arguments
7870 `(#:jar-name "java-stax2-api.jar"
7871 #:source-dir "src/main/java"
7872 #:tests? #f)); no tests
7873 (home-page "https://github.com/FasterXML/stax2-api")
7874 (synopsis "Stax2 API")
7875 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7876 significant new functionalities, such as full-featured bi-direction validation
7877 interface and high-performance Typed Access API.")
7878 (license license:bsd-2)))
7879
7880 (define-public java-woodstox-core
7881 (package
7882 (name "java-woodstox-core")
7883 (version "5.0.3")
7884 (source (origin
7885 (method url-fetch)
7886 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7887 "woodstox-core-" version ".tar.gz"))
7888 (sha256
7889 (base32
7890 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7891 (build-system ant-build-system)
7892 (arguments
7893 `(#:jar-name "woodstox.jar"
7894 #:test-exclude
7895 (list "**/Base*.java" "failing/**")
7896 #:phases
7897 (modify-phases %standard-phases
7898 (add-before 'build 'remove-msv-dep
7899 (lambda _
7900 ;; we don't need osgi, and it depends on msv
7901 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7902 ;; msv's latest release is from 2011 and we don't need it
7903 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7904 (delete-file-recursively "src/test/java/wstxtest/osgi")
7905 (delete-file-recursively "src/test/java/wstxtest/msv")
7906 #t))
7907 (add-before 'build 'copy-resources
7908 (lambda _
7909 (copy-recursively "src/main/resources" "build/classes")
7910 #t)))))
7911 (inputs
7912 `(("stax2" ,java-stax2-api)))
7913 (native-inputs
7914 `(("junit" ,java-junit)))
7915 (home-page "https://github.com/FasterXML/woodstox")
7916 (synopsis "Stax XML API implementation")
7917 (description "Woodstox is a stax XML API implementation.")
7918 (license license:asl2.0)))
7919
7920 (define-public java-fasterxml-jackson-dataformat-xml
7921 (package
7922 (name "java-fasterxml-jackson-dataformat-xml")
7923 (version "2.9.4")
7924 (source (origin
7925 (method url-fetch)
7926 (uri (string-append "https://github.com/FasterXML/"
7927 "jackson-dataformat-xml/archive/"
7928 "jackson-dataformat-xml-" version ".tar.gz"))
7929 (sha256
7930 (base32
7931 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7932 (build-system ant-build-system)
7933 (arguments
7934 `(#:jar-name "jackson-dataformat-xml.jar"
7935 #:source-dir "src/main/java"
7936 #:test-exclude
7937 (list "**/failing/**")
7938 #:phases
7939 (modify-phases %standard-phases
7940 (add-before 'configure 'generate-PackageVersion.java
7941 (lambda _
7942 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7943 (in (string-append out ".in")))
7944 (copy-file in out)
7945 (newline)
7946 (substitute* out
7947 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7948 (("@projectversion@") ,version)
7949 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7950 (("@projectartifactid@") "jackson-dataformat-xml")))
7951 #t))
7952 (add-before 'build 'copy-resources
7953 (lambda _
7954 (copy-recursively "src/main/resources" "build/classes")
7955 #t)))))
7956 (inputs
7957 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7958 ("jackson-core" ,java-fasterxml-jackson-core)
7959 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7960 ("jackson-databind" ,java-fasterxml-jackson-databind)
7961 ("stax2-api" ,java-stax2-api)
7962 ("woodstox" ,java-woodstox-core)))
7963 (native-inputs
7964 `(("junit" ,java-junit)
7965 ("hamcrest" ,java-hamcrest-core)))
7966 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7967 (synopsis "Read and write XML")
7968 (description "This package contains Jackson extension component for reading
7969 and writing XML encoded data.
7970
7971 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7972 approach (that is, no support is added for \"Schema-first\" approach). Support
7973 for JAXB annotations is provided by JAXB annotation module; this module
7974 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7975 @code{JsonFactory}) as well as small number of higher level overrides needed to
7976 make data-binding work.")
7977 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7978
7979 (define-public java-hdrhistogram
7980 (package
7981 (name "java-hdrhistogram")
7982 (version "2.1.9")
7983 (source (origin
7984 (method url-fetch)
7985 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7986 "archive/HdrHistogram-" version ".tar.gz"))
7987 (sha256
7988 (base32
7989 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7990 (build-system ant-build-system)
7991 (arguments
7992 `(#:jar-name "java-hdrhistogram.jar"
7993 #:source-dir "src/main/java"
7994 #:phases
7995 (modify-phases %standard-phases
7996 (add-before 'configure 'set-version
7997 (lambda _
7998 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7999 (template (string-append version-java ".template")))
8000 (copy-file template version-java)
8001 (substitute* version-java
8002 (("\\$VERSION\\$") ,version)
8003 (("\\$BUILD_TIME\\$") "0"))
8004 #t))))))
8005 (native-inputs
8006 `(("junit" ,java-junit)
8007 ("hamcrest" ,java-hamcrest-core)))
8008 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8009 (synopsis "High dynamic range histogram")
8010 (description "Hdrhistogram allows to create histograms that support
8011 recording and analyzing sampled data value counts across a configurable integer
8012 value range with configurable value precision within the range. Value precision
8013 is expressed as the number of significant digits in the value recording, and
8014 provides control over value quantization behavior across the value range and
8015 the subsequent value resolution at any given level.")
8016 (license license:public-domain)))
8017
8018 (define-public java-cofoja
8019 (package
8020 (name "java-cofoja")
8021 (version "1.3")
8022 (source (origin
8023 (method git-fetch)
8024 (uri (git-reference
8025 (url "https://github.com/nhatminhle/cofoja.git")
8026 (commit (string-append "v" version))))
8027 (file-name (string-append "java-cofoja-" version "-checkout"))
8028 (sha256
8029 (base32
8030 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8031 (build-system ant-build-system)
8032 (arguments
8033 `(#:build-target "dist"
8034 #:test-target "test"
8035 #:jdk ,icedtea-8
8036 #:make-flags
8037 (list "-Ddist.dir=dist")
8038 #:modules ((guix build ant-build-system)
8039 (guix build java-utils)
8040 (guix build utils)
8041 (srfi srfi-1)
8042 (ice-9 match))
8043 #:phases
8044 (modify-phases %standard-phases
8045 ;; The bulid system ignores the class path the ant-build-system sets
8046 ;; up and instead expects to find all dependencies in the "lib"
8047 ;; directory.
8048 (add-after 'unpack 'create-libdir
8049 (lambda* (#:key inputs #:allow-other-keys)
8050 (mkdir-p "lib")
8051 (for-each
8052 (lambda (file)
8053 (let ((target (string-append "lib/" (basename file))))
8054 (unless (file-exists? target)
8055 (symlink file target))))
8056 (append-map (match-lambda
8057 ((label . dir)
8058 (find-files dir "\\.jar$")))
8059 inputs))
8060 #t))
8061 (replace 'install (install-jars "dist")))))
8062 (inputs
8063 `(("java-asm" ,java-asm)))
8064 (native-inputs
8065 `(("java-junit" ,java-junit)))
8066 (home-page "https://github.com/nhatminhle/cofoja")
8067 (synopsis "Contracts for Java")
8068 (description "Contracts for Java, or Cofoja for short, is a contract
8069 programming framework and test tool for Java, which uses annotation processing
8070 and bytecode instrumentation to provide run-time checking. (In particular,
8071 this is not a static analysis tool.)")
8072 (license license:lgpl3+)))
8073
8074 (define-public java-aopalliance
8075 (package
8076 (name "java-aopalliance")
8077 (version "1.0")
8078 (source (origin
8079 (method git-fetch)
8080 ;; Note: this git repository is not official, but contains the
8081 ;; source code that is in the CVS repository. Downloading the
8082 ;; tarball from sourceforge is undeterministic, and the cvs download
8083 ;; fails.
8084 (uri (git-reference
8085 (url "https://github.com/hoverruan/aopalliance")
8086 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8087 (file-name (string-append name "-" version))
8088 (sha256
8089 (base32
8090 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8091 (build-system ant-build-system)
8092 (arguments
8093 `(#:jar-name "java-aopalliance.jar"
8094 #:jdk ,icedtea-8
8095 #:tests? #f; no tests
8096 #:source-dir "aopalliance/src/main"))
8097 (home-page "http://aopalliance.sourceforge.net")
8098 (synopsis "Aspect-Oriented Programming")
8099 (description "The AOP Alliance project is a joint project between several
8100 software engineering people who are interested in Aspect-Oriented Programming
8101 (AOP) and Java.")
8102 (license license:public-domain)))
8103
8104 (define-public java-javax-inject
8105 (package
8106 (name "java-javax-inject")
8107 (version "tck-1")
8108 (source (origin
8109 (method url-fetch)
8110 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8111 "archive/javax.inject-" version ".tar.gz"))
8112 (sha256
8113 (base32
8114 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8115 (build-system ant-build-system)
8116 (arguments
8117 `(#:jar-name "java-javax-inject.jar"
8118 #:jdk ,icedtea-8
8119 #:tests? #f)); no tests
8120 (home-page "http://github.com/javax-inject/javax-inject")
8121 (synopsis "JSR-330: Dependency Injection for Java")
8122 (description "This package specifies a means for obtaining objects in such
8123 a way as to maximize reusability, testability and maintainability compared to
8124 traditional approaches such as constructors, factories, and service locators
8125 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8126 most nontrivial applications.
8127
8128 Many types depend on other types. For example, a @var{Stopwatch} might depend
8129 on a @var{TimeSource}. The types on which a type depends are known as its
8130 dependencies. The process of finding an instance of a dependency to use at run
8131 time is known as resolving the dependency. If no such instance can be found,
8132 the dependency is said to be unsatisfied, and the application is broken.")
8133 (license license:asl2.0)))
8134
8135 (define-public java-guice
8136 (package
8137 (name "java-guice")
8138 (version "4.1")
8139 (source (origin
8140 (method url-fetch)
8141 (uri (string-append "https://github.com/google/guice/archive/"
8142 version ".tar.gz"))
8143 (file-name (string-append name "-" version ".tar.gz"))
8144 (modules '((guix build utils)))
8145 (snippet
8146 `(begin
8147 (for-each delete-file (find-files "." ".*.jar"))))
8148 (sha256
8149 (base32
8150 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8151 (build-system ant-build-system)
8152 (arguments
8153 `(#:jar-name "java-guice.jar"
8154 #:jdk ,icedtea-8
8155 #:tests? #f; FIXME: tests are not in a java sub directory
8156 #:source-dir "core/src"))
8157 (inputs
8158 `(("guava" ,java-guava)
8159 ("java-cglib" ,java-cglib)
8160 ("java-aopalliance" ,java-aopalliance)
8161 ("java-javax-inject" ,java-javax-inject)
8162 ("java-asm" ,java-asm)))
8163 (home-page "https://github.com/google/guice")
8164 (synopsis "Lightweight dependency injection framework")
8165 (description "Guice is a lightweight dependency injection framework fo
8166 Java 6 and above.")
8167 (license license:asl2.0)))
8168
8169 (define-public java-guice-servlet
8170 (package
8171 (inherit java-guice)
8172 (name "java-guice-servlet")
8173 (arguments
8174 `(#:jar-name "guice-servlet.jar"
8175 #:source-dir "extensions/servlet/src/"
8176 #:jdk ,icedtea-8
8177 #:tests? #f)); FIXME: not in a java subdir
8178 (inputs
8179 `(("guice" ,java-guice)
8180 ("servlet" ,java-classpathx-servletapi)
8181 ,@(package-inputs java-guice)))))
8182
8183 (define-public java-assertj
8184 (package
8185 (name "java-assertj")
8186 (version "3.8.0")
8187 (source (origin
8188 (method url-fetch)
8189 (uri (string-append "https://github.com/joel-costigliola/"
8190 "assertj-core/archive/"
8191 "assertj-core-" version ".tar.gz"))
8192 (sha256
8193 (base32
8194 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8195 (build-system ant-build-system)
8196 (arguments
8197 `(#:jar-name "java-assertj.jar"
8198 #:jdk ,icedtea-8
8199 #:source-dir "src/main/java"
8200 #:tests? #f)); depends on tng-junit which depends on assertj
8201 (inputs
8202 `(("cglib" ,java-cglib)
8203 ("junit" ,java-junit)
8204 ("hamcrest" ,java-hamcrest-core)))
8205 (native-inputs
8206 `(("mockito" ,java-mockito-1)))
8207 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8208 (synopsis "Fluent assertions for java")
8209 (description "AssertJ core is a Java library that provides a fluent
8210 interface for writing assertions. Its main goal is to improve test code
8211 readability and make maintenance of tests easier.")
8212 (license license:asl2.0)))
8213
8214 (define-public java-jboss-javassist
8215 (package
8216 (name "java-jboss-javassist")
8217 (version "3.21.0")
8218 (source (origin
8219 (method url-fetch)
8220 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8221 "archive/rel_"
8222 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8223 "_ga.tar.gz"))
8224 (sha256
8225 (base32
8226 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8227 (build-system ant-build-system)
8228 (arguments
8229 `(#:jar-name "java-jboss-javassist.jar"
8230 #:jdk ,icedtea-8
8231 #:source-dir "src/main"
8232 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8233 #:phases
8234 (modify-phases %standard-phases
8235 (add-before 'configure 'remove-binary
8236 (lambda _
8237 (delete-file "javassist.jar")
8238 #t)))))
8239 (native-inputs
8240 `(("junit" ,java-junit)))
8241 (home-page "https://github.com/jboss-javassist/javassist")
8242 (synopsis "Java bytecode engineering toolkit")
8243 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8244 manipulation simple. It is a class library for editing bytecodes in Java; it
8245 enables Java programs to define a new class at runtime and to modify a class
8246 file when the JVM loads it.")
8247 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8248
8249 (define-public java-jcommander
8250 (package
8251 (name "java-jcommander")
8252 (version "1.71")
8253 (source (origin
8254 (method url-fetch)
8255 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8256 version ".tar.gz"))
8257 (file-name (string-append name "-" version ".tar.gz"))
8258 (sha256
8259 (base32
8260 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8261 (build-system ant-build-system)
8262 (arguments
8263 `(#:jar-name "java-jcommander.jar"
8264 #:jdk ,icedtea-8
8265 #:tests? #f; requires testng which depends on jcommander
8266 #:source-dir "src/main/java"))
8267 (home-page "http://jcommander.org")
8268 (synopsis "Command line parameters parser")
8269 (description "JCommander is a very small Java framework that makes it
8270 trivial to parse command line parameters. Parameters are declared with
8271 annotations.")
8272 (license license:asl2.0)))
8273
8274 (define-public java-bsh
8275 (package
8276 (name "java-bsh")
8277 (version "2.0b6")
8278 (source (origin
8279 (method url-fetch)
8280 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8281 version ".tar.gz"))
8282 (file-name (string-append name "-" version ".tar.gz"))
8283 (sha256
8284 (base32
8285 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8286 (build-system ant-build-system)
8287 (arguments
8288 `(#:build-target "jarall"
8289 #:test-target "junit-tests-all"
8290 #:phases
8291 (modify-phases %standard-phases
8292 (replace 'install
8293 (lambda* (#:key outputs #:allow-other-keys)
8294 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8295 (mkdir-p share)
8296 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8297 #t))))))
8298 (home-page "http://beanshell.org/")
8299 (synopsis "Lightweight Scripting for Java")
8300 (description "BeanShell is a small, free, embeddable Java source
8301 interpreter with object scripting language features, written in Java.
8302 BeanShell dynamically executes standard Java syntax and extends it with common
8303 scripting conveniences such as loose types, commands, and method closures like
8304 those in Perl and JavaScript.")
8305 (license license:asl2.0)))
8306
8307 (define-public java-fest-util
8308 (package
8309 (name "java-fest-util")
8310 (version "1.2.5")
8311 (source (origin
8312 (method url-fetch)
8313 (uri (string-append "https://github.com/alexruiz/fest-util/"
8314 "archive/fest-util-" version ".tar.gz"))
8315 (sha256
8316 (base32
8317 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8318 (build-system ant-build-system)
8319 (arguments
8320 `(#:jar-name "java-fest-util.jar"
8321 #:source-dir "src/main/java"))
8322 (native-inputs
8323 `(("junit" ,java-junit)
8324 ("hamcrest" ,java-hamcrest-core)))
8325 (home-page "https://github.com/alexruiz/fest-util")
8326 (synopsis "FEST common utilities")
8327 (description "Common utilities used in all FEST module.")
8328 (license license:asl2.0)))
8329
8330 (define-public java-fest-test
8331 (package
8332 (name "java-fest-test")
8333 (version "2.1.0")
8334 (source (origin
8335 (method url-fetch)
8336 (uri (string-append "https://github.com/alexruiz/fest-test/"
8337 "archive/fest-test-" version ".tar.gz"))
8338 (sha256
8339 (base32
8340 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8341 (build-system ant-build-system)
8342 (arguments
8343 `(#:jar-name "java-fest-test.jar"
8344 #:source-dir "src/main/java"
8345 #:tests? #f)); no tests
8346 (inputs
8347 `(("junit" ,java-junit)))
8348 (home-page "https://github.com/alexruiz/fest-test")
8349 (synopsis "Common FEST testing infrastructure")
8350 (description "Fest-test contains the common FEST testing infrastructure.")
8351 (license license:asl2.0)))
8352
8353 (define-public java-fest-assert
8354 (package
8355 (name "java-fest-assert")
8356 (version "2.0M10")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8360 "archive/fest-assert-core-" version ".tar.gz"))
8361 (sha256
8362 (base32
8363 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8364 (build-system ant-build-system)
8365 (arguments
8366 `(#:jar-name "java-fest-assert.jar"
8367 #:source-dir "src/main/java"
8368 #:test-exclude
8369 (list
8370 "**/Abstract*.java"
8371 "**/*BaseTest.java"
8372 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8373 "**/MessageFormatter_format_Test.java"
8374 "**/internal/*/*_assert*_Test.java")))
8375 (inputs
8376 `(("java-fest-util" ,java-fest-util)))
8377 (native-inputs
8378 `(("java-junit" ,java-junit)
8379 ("java-fest-test" ,java-fest-test)
8380 ("java-hamcrest-core" ,java-hamcrest-core)
8381 ("java-mockito" ,java-mockito-1)
8382 ("java-cglib" ,java-cglib)
8383 ("java-objenesis" ,java-objenesis)
8384 ("java-asm" ,java-asm)))
8385 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8386 (synopsis "FEST fluent assertions")
8387 (description "FEST-Assert provides a fluent interface for assertions.")
8388 (license license:asl2.0)))
8389
8390 (define-public java-testng
8391 (package
8392 (name "java-testng")
8393 (version "6.14.3")
8394 (source (origin
8395 (method git-fetch)
8396 (uri (git-reference
8397 (url "https://github.com/cbeust/testng.git")
8398 (commit version)))
8399 (file-name (string-append name "-" version "-checkout"))
8400 (sha256
8401 (base32
8402 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8403 (build-system ant-build-system)
8404 (arguments
8405 `(#:jdk ,icedtea-8; java.util.function
8406 #:jar-name "java-testng.jar"
8407 #:source-dir "src/main/java"
8408 #:phases
8409 (modify-phases %standard-phases
8410 ;; FIXME: I don't know why these tests fail
8411 (add-after 'unpack 'delete-failing-tests
8412 (lambda _
8413 (substitute* "src/test/resources/testng.xml"
8414 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8415 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8416 #t))
8417 ;; We don't have groovy
8418 (add-after 'unpack 'delete-groovy-tests
8419 (lambda _
8420 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8421 (substitute* "src/test/resources/testng.xml"
8422 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8423 #t))
8424 (add-before 'build 'copy-resources
8425 (lambda _
8426 (copy-recursively "src/main/resources" "build/classes")
8427 #t))
8428 (add-before 'check 'copy-test-resources
8429 (lambda _
8430 (copy-recursively "src/test/resources" "build/test-classes")
8431 #t))
8432 (replace 'check
8433 (lambda _
8434 (invoke "ant" "compile-tests")
8435 ;; we don't have groovy
8436 (substitute* "src/test/resources/testng.xml"
8437 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8438 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8439 ":build/classes"
8440 ":build/test-classes")
8441 "-Dtest.resources.dir=src/test/resources"
8442 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8443 (propagated-inputs
8444 `(("junit" ,java-junit)
8445 ("java-jsr305" ,java-jsr305)
8446 ("java-bsh" ,java-bsh)
8447 ("java-jcommander" ,java-jcommander)
8448 ("java-guice" ,java-guice)
8449 ("snakeyaml" ,java-snakeyaml)))
8450 (native-inputs
8451 `(("guava" ,java-guava)
8452 ("java-javax-inject" ,java-javax-inject)
8453 ("java-hamcrest" ,java-hamcrest-all)
8454 ("java-assertj" ,java-assertj)
8455 ("java-mockito" ,java-mockito-1)
8456 ("cglib" ,java-cglib)
8457 ("asm" ,java-asm)
8458 ("aopalliance" ,java-aopalliance)))
8459 (home-page "http://testng.org")
8460 (synopsis "Testing framework")
8461 (description "TestNG is a testing framework inspired from JUnit and NUnit
8462 but introducing some new functionalities that make it more powerful and easier
8463 to use.")
8464 (license license:asl2.0)))
8465
8466 (define-public java-jnacl
8467 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8468 (revision "2"))
8469 (package
8470 (name "java-jnacl")
8471 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8472 (source (origin
8473 (method git-fetch)
8474 (uri (git-reference
8475 (url "https://github.com/neilalexander/jnacl.git")
8476 (commit commit)))
8477 (file-name (git-file-name name version))
8478 (sha256
8479 (base32
8480 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8481 (build-system ant-build-system)
8482 (arguments
8483 `(#:jar-name "jnacl.jar"
8484 #:source-dir "src/main/java"
8485 #:jdk ,icedtea-8
8486 #:phases
8487 (modify-phases %standard-phases
8488 (add-before 'build 'fix-tests
8489 (lambda _
8490 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8491 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8492 (("assertions.Assertions") "assertions.api.Assertions"))
8493 #t))
8494 (replace 'check
8495 (lambda _
8496 (invoke "ant" "compile-tests")
8497 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8498 ":build/classes"
8499 ":build/test-classes")
8500 "org.testng.TestNG" "-testclass"
8501 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8502 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8503 ":build/classes"
8504 ":build/test-classes")
8505 "org.testng.TestNG" "-testclass"
8506 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8507 (native-inputs
8508 `(("java-testng" ,java-testng)
8509 ("java-fest-util" ,java-fest-util)
8510 ("java-fest-assert" ,java-fest-assert)))
8511 (home-page "https://github.com/neilalexander/jnacl")
8512 (synopsis "Java implementation of NaCl")
8513 (description "Pure Java implementation of the NaCl: Networking and
8514 Cryptography library.")
8515 (license license:bsd-2))))
8516
8517 (define-public java-mvel2
8518 (package
8519 (name "java-mvel2")
8520 (version "2.3.1")
8521 (source (origin
8522 (method url-fetch)
8523 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8524 version ".Final.tar.gz"))
8525 (sha256
8526 (base32
8527 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8528 (build-system ant-build-system)
8529 (arguments
8530 `(#:jar-name "mvel2.jar"
8531 #:source-dir "src/main/java"
8532 #:test-exclude
8533 (list "**/Abstract*.java"
8534 ;; Base class with no tests
8535 "**/MVELThreadTest.java")
8536 #:phases
8537 (modify-phases %standard-phases
8538 (add-after 'install 'install-bin
8539 (lambda* (#:key outputs #:allow-other-keys)
8540 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8541 (mkdir-p bin)
8542 (with-output-to-file (string-append bin "/mvel2")
8543 (lambda _
8544 (display
8545 (string-append
8546 "#!" (which "bash") "\n"
8547 "if [ \"$#\" -ne \"2\" ]; then\n"
8548 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8549 "exit\n"
8550 "fi\n"
8551 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8552 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8553 " org.mvel2.sh.Main $1"))))
8554 (chmod (string-append bin "/mvel2") #o755))
8555 #t)))))
8556 (native-inputs
8557 `(("junit" ,java-junit)
8558 ("hamcrest" ,java-hamcrest-core)))
8559 (home-page "https://github.com/mvel/mvel")
8560 (synopsis "MVFLEX Expression Language")
8561 (description "MVEL has largely been inspired by Java syntax, but has some
8562 fundamental differences aimed at making it more efficient as an expression
8563 language, such as operators that directly support collection, array and string
8564 matching, as well as regular expressions. MVEL is used to evaluate expressions
8565 written using Java syntax.
8566
8567 In addition to the expression language, MVEL serves as a templating language for
8568 configuration and string construction.")
8569 (license license:asl2.0)))
8570
8571 (define-public java-commons-jexl-2
8572 (package
8573 (name "java-commons-jexl")
8574 (version "2.1.1")
8575 (source (origin
8576 (method url-fetch)
8577 (uri (string-append "mirror://apache/commons/jexl/source/"
8578 "commons-jexl-" version "-src.tar.gz"))
8579 (sha256
8580 (base32
8581 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8582 (build-system ant-build-system)
8583 (arguments
8584 `(#:jar-name "commons-jexl-2.jar"
8585 #:jdk ,icedtea-8
8586 #:source-dir "src/main/java"
8587 #:phases
8588 (modify-phases %standard-phases
8589 (add-before 'check 'disable-broken-tests
8590 (lambda* (#:key inputs #:allow-other-keys)
8591 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8592 (substitute* "ArithmeticTest.java"
8593 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8594 (("asserter.assertExpression\\(\"imanull") "//"))
8595 ;; This test fails with "ambiguous method invocation"
8596 (delete-file "CacheTest.java")
8597 ;; This test doesn't have access to the temp directory
8598 (substitute* "ClassCreatorTest.java"
8599 (("java.io.tmpdir") "user.dir"))
8600 ;; This test fails in trying to detect whether it can run.
8601 (substitute* "ClassCreator.java"
8602 (("boolean canRun =.*") "boolean canRun = false;\n"))
8603 ;; ...and these tests depend on it.
8604 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8605 (delete-file "scripting/JexlScriptEngineTest.java"))
8606 #t))
8607 (add-before 'build 'run-javacc
8608 (lambda _
8609 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8610 (invoke "java" "jjtree" "Parser.jjt")
8611 (invoke "java" "javacc" "Parser.jj"))
8612 #t)))))
8613 (inputs
8614 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8615 (native-inputs
8616 `(("java-junit" ,java-junit)
8617 ("java-hamcrest-core" ,java-hamcrest-core)
8618 ("javacc" ,javacc-4)))
8619 (home-page "https://commons.apache.org/proper/commons-jexl/")
8620 (synopsis "Java Expression Language ")
8621 (description "JEXL is a library intended to facilitate the implementation
8622 of dynamic and scripting features in applications and frameworks written in
8623 Java. JEXL implements an Expression Language based on some extensions to the
8624 JSTL Expression Language supporting most of the constructs seen in
8625 shell-script or ECMAScript. Its goal is to expose scripting features usable
8626 by technical operatives or consultants working with enterprise platforms.")
8627 (license license:asl2.0)))
8628
8629 (define-public java-lz4
8630 (package
8631 (name "java-lz4")
8632 (version "1.4.0")
8633 (source (origin
8634 (method url-fetch)
8635 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8636 version ".tar.gz"))
8637 (file-name (string-append name "-" version ".tar.gz"))
8638 (sha256
8639 (base32
8640 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8641 (build-system ant-build-system)
8642 (arguments
8643 `(#:jar-name "lz4.jar"
8644 #:jdk ,icedtea-8
8645 #:source-dir "src/java:src/java-unsafe"
8646 #:tests? #f; FIXME: requires more dependencies
8647 #:phases
8648 (modify-phases %standard-phases
8649 (add-before 'configure 'generate-source
8650 (lambda _
8651 (with-directory-excursion "src/build/source_templates"
8652 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8653 #t)))))
8654 (native-inputs
8655 `(("mvel" ,java-mvel2)))
8656 (home-page "https://jpountz.github.io/lz4-java")
8657 (synopsis "Compression algorithm")
8658 (description "LZ4 - Java is a Java port of the popular lz4 compression
8659 algorithms and xxHash hashing algorithm.")
8660 (license license:asl2.0)))
8661
8662 (define-public java-bouncycastle
8663 (package
8664 (name "java-bouncycastle")
8665 (version "1.60")
8666 (source (origin
8667 (method url-fetch)
8668 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8669 (substring version 0 1) "v"
8670 (substring version 2 4) ".tar.gz"))
8671 (sha256
8672 (base32
8673 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
8674 (modules '((guix build utils)))
8675 (snippet
8676 '(begin
8677 (for-each delete-file
8678 (find-files "." "\\.jar$"))
8679 #t))))
8680 (build-system ant-build-system)
8681 (arguments
8682 `(#:jdk ,icedtea-8
8683 #:tests? #f
8684 #:phases
8685 (modify-phases %standard-phases
8686 (replace 'build
8687 (lambda _
8688 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8689 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
8690 ;; FIXME: the tests freeze.
8691 ;; (replace 'check
8692 ;; (lambda _
8693 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8694 (replace 'install
8695 (install-jars "build/artifacts/jdk1.5/jars")))))
8696 (inputs
8697 `(("java-javax-mail" ,java-javax-mail)))
8698 (native-inputs
8699 `(("unzip" ,unzip)
8700 ("junit" ,java-junit)
8701 ("java-native-access" ,java-native-access)
8702 ("java-native-access-platform" ,java-native-access-platform)))
8703 (home-page "https://www.bouncycastle.org")
8704 (synopsis "Cryptographic library")
8705 (description "Bouncy Castle is a cryptographic library for the Java
8706 programming language.")
8707 (license license:expat)))
8708
8709 (define-public java-lmax-disruptor
8710 (package
8711 (name "java-lmax-disruptor")
8712 (version "3.3.7")
8713 (source (origin
8714 (method url-fetch)
8715 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8716 "archive/" version ".tar.gz"))
8717 (file-name (string-append name "-" version ".tar.gz"))
8718 (sha256
8719 (base32
8720 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8721 (build-system ant-build-system)
8722 (arguments
8723 `(#:jar-name "java-lmax-disruptor.jar"
8724 #:jdk ,icedtea-8
8725 #:tests? #f)); tests hang
8726 (inputs
8727 `(("junit" ,java-junit)
8728 ("java-hdrhistogram" ,java-hdrhistogram)
8729 ("java-jmock" ,java-jmock)
8730 ("java-jmock-legacy" ,java-jmock-legacy)
8731 ("java-jmock-junit4" ,java-jmock-junit4)
8732 ("java-hamcrest-all" ,java-hamcrest-all)))
8733 (native-inputs
8734 `(("cglib" ,java-cglib)
8735 ("objenesis" ,java-objenesis)
8736 ("asm" ,java-asm)))
8737 (home-page "https://www.lmax.com/disruptor")
8738 (synopsis "High performance inter-thread communication")
8739 (description "LMAX Disruptor is a software pattern and software component
8740 for high performance inter-thread communication that avoids the need for
8741 message queues or resource locking.")
8742 (license license:asl2.0)))
8743
8744 (define-public java-commons-bcel
8745 (package
8746 (name "java-commons-bcel")
8747 (version "6.1")
8748 (source (origin
8749 (method url-fetch)
8750 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8751 version "-src.tar.gz"))
8752 (sha256
8753 (base32
8754 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8755 (build-system ant-build-system)
8756 (arguments
8757 `(#:jar-name "bcel.jar"
8758 #:jdk ,icedtea-8
8759 #:source-dir "src/main/java"
8760 #:test-dir "src/test/java"
8761 ;; FIXME: Tests require the unpackaged jna.
8762 #:tests? #f))
8763 (home-page "https://commons.apache.org/proper/commons-bcel/")
8764 (synopsis "Byte code engineering library")
8765 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8766 intended to give users a convenient way to analyze, create, and
8767 manipulate (binary) Java class files. Classes are represented by objects
8768 which contain all the symbolic information of the given class: methods, fields
8769 and byte code instructions, in particular.
8770
8771 Such objects can be read from an existing file, be transformed by a
8772 program (e.g. a class loader at run-time) and written to a file again. An
8773 even more interesting application is the creation of classes from scratch at
8774 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8775 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8776 of Java @code{.class} files.")
8777 (license license:asl2.0)))
8778
8779 (define-public java-xerial-core
8780 (package
8781 (name "java-xerial-core")
8782 (version "2.1")
8783 (source (origin
8784 (method url-fetch)
8785 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8786 version ".tar.gz"))
8787 (file-name (string-append name "-" version ".tar.gz"))
8788 (sha256
8789 (base32
8790 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8791 (build-system ant-build-system)
8792 (arguments
8793 `(#:jar-name "xerial-core.jar"
8794 #:source-dir "xerial-core/src/main/java"
8795 #:test-dir "xerial-core/src/test"
8796 #:phases
8797 (modify-phases %standard-phases
8798 (add-before 'build 'copy-resources
8799 (lambda _
8800 (copy-recursively "xerial-core/src/main/resources"
8801 "build/classes")
8802 #t)))))
8803 (native-inputs
8804 `(("junit" ,java-junit)
8805 ("hamcrest" ,java-hamcrest-core)))
8806 (home-page "https://github.com/xerial/xerial-java")
8807 (synopsis "Data management libraries for Java")
8808 (description "Xerial is a set of data management libraries for the Java
8809 programming language. The ultimate goal of the Xerial project is to manage
8810 everything as database, including class objects, text format data, data
8811 streams, etc.")
8812 (license license:asl2.0)))
8813
8814 (define-public java-powermock-reflect
8815 (package
8816 (name "java-powermock-reflect")
8817 (version "1.7.3")
8818 (source (origin
8819 (method url-fetch)
8820 (uri (string-append "https://github.com/powermock/powermock/"
8821 "archive/powermock-" version ".tar.gz"))
8822 (file-name (string-append name "-" version ".tar.gz"))
8823 (sha256
8824 (base32
8825 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8826 (patches
8827 (search-patches "java-powermock-fix-java-files.patch"))))
8828 (build-system ant-build-system)
8829 (arguments
8830 `(#:jar-name "java-powermock-reflect.jar"
8831 #:jdk ,icedtea-8
8832 #:source-dir "powermock-reflect/src/main/java"
8833 #:test-dir "powermock-reflect/src/test"))
8834 (inputs
8835 `(("java-objenesis" ,java-objenesis)))
8836 (native-inputs
8837 `(("junit" ,java-junit)
8838 ("cglib" ,java-cglib)
8839 ("asm" ,java-asm)
8840 ("hamcrest" ,java-hamcrest-core)
8841 ("assertj" ,java-assertj)))
8842 (home-page "https://github.com/powermock/powermock")
8843 (synopsis "Mock library extension framework")
8844 (description "PowerMock is a framework that extends other mock libraries
8845 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8846 classloader and bytecode manipulation to enable mocking of static methods,
8847 constructors, final classes and methods, private methods, removal of static
8848 initializers and more. By using a custom classloader no changes need to be
8849 done to the IDE or continuous integration servers which simplifies adoption.")
8850 (license license:asl2.0)))
8851
8852 (define-public java-powermock-core
8853 (package
8854 (inherit java-powermock-reflect)
8855 (name "java-powermock-core")
8856 (arguments
8857 `(#:jar-name "java-powermock-core.jar"
8858 #:source-dir "powermock-core/src/main/java"
8859 #:test-dir "powermock-core/src/test"
8860 #:tests? #f; requires powermock-api
8861 #:jdk ,icedtea-8
8862 #:phases
8863 (modify-phases %standard-phases
8864 (add-before 'build 'copy-resources
8865 (lambda _
8866 (copy-recursively "powermock-core/src/main/resources"
8867 "build/classes")
8868 #t)))))
8869 (inputs
8870 `(("reflect" ,java-powermock-reflect)
8871 ("javassist" ,java-jboss-javassist)))
8872 (native-inputs
8873 `(("junit" ,java-junit)
8874 ("assertj" ,java-assertj)
8875 ("mockito" ,java-mockito-1)))))
8876
8877 (define-public java-powermock-api-support
8878 (package
8879 (inherit java-powermock-reflect)
8880 (name "java-powermock-api-support")
8881 (build-system ant-build-system)
8882 (arguments
8883 `(#:jar-name "java-powermock-api-support.jar"
8884 #:jdk ,icedtea-8
8885 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8886 #:tests? #f)); no tests
8887 (inputs
8888 `(("core" ,java-powermock-core)
8889 ("reflect" ,java-powermock-reflect)))))
8890
8891 (define-public java-powermock-modules-junit4-common
8892 (package
8893 (inherit java-powermock-reflect)
8894 (name "java-powermock-modules-junit4-common")
8895 (build-system ant-build-system)
8896 (arguments
8897 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8898 #:jdk ,icedtea-8
8899 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8900 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8901 (inputs
8902 `(("core" ,java-powermock-core)
8903 ("easymock" ,java-easymock)
8904 ("reflect" ,java-powermock-reflect)
8905 ("hamcrest" ,java-hamcrest-core)
8906 ("cglib" ,java-cglib)))))
8907
8908 (define-public java-powermock-modules-junit4
8909 (package
8910 (inherit java-powermock-reflect)
8911 (name "java-powermock-modules-junit4")
8912 (build-system ant-build-system)
8913 (arguments
8914 `(#:jar-name "java-powermock-modules-junit4.jar"
8915 #:jdk ,icedtea-8
8916 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8917 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8918 #:phases
8919 (modify-phases %standard-phases
8920 (add-before 'build 'fix-junit-detection
8921 (lambda _
8922 ;; Our junit version is 4.12-SNAPSHOT
8923 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8924 "PowerMockJUnit4MethodValidator.java")
8925 (("4.12") "4.12-SNAPSHOT"))
8926 #t)))))
8927 (inputs
8928 `(("core" ,java-powermock-core)
8929 ("reflect" ,java-powermock-reflect)
8930 ("common" ,java-powermock-modules-junit4-common)
8931 ("cglib" ,java-cglib)))
8932 (native-inputs
8933 `(("easymock" ,java-easymock)
8934 ("hamcrest" ,java-hamcrest-core)
8935 ("objenesis" ,java-objenesis)
8936 ("asm" ,java-asm)
8937 ("junit" ,java-junit)))))
8938
8939 (define-public java-powermock-api-easymock
8940 (package
8941 (inherit java-powermock-reflect)
8942 (name "java-powermock-api-easymock")
8943 (build-system ant-build-system)
8944 (arguments
8945 `(#:jar-name "java-powermock-api-easymock.jar"
8946 #:jdk ,icedtea-8
8947 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8948 #:tests? #f; no tests
8949 #:phases
8950 (modify-phases %standard-phases
8951 (add-before 'build 'fix-file
8952 (lambda _
8953 ;; FIXME: This looks wrong, but it fixes a build error.
8954 (with-directory-excursion "powermock-api/powermock-api-easymock"
8955 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8956 (("classLoader instanceof MockClassLoader") "false")
8957 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8958 #t)))))
8959 (inputs
8960 `(("core" ,java-powermock-core)
8961 ("easymock" ,java-easymock)
8962 ("reflect" ,java-powermock-reflect)
8963 ("support" ,java-powermock-api-support)
8964 ("cglib" ,java-cglib)))))
8965
8966 (define-public java-jboss-jms-api-spec
8967 (package
8968 (name "java-jboss-jms-api-spec")
8969 (version "2.0")
8970 (source (origin
8971 (method url-fetch)
8972 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8973 "archive/jboss-jms-api_" version
8974 "_spec-1.0.1.Final.tar.gz"))
8975 (sha256
8976 (base32
8977 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8978 (build-system ant-build-system)
8979 (arguments
8980 `(#:jar-name "java-jboss-jms-api_spec.jar"
8981 #:jdk ,icedtea-8
8982 #:source-dir "."
8983 #:tests? #f)); no tests
8984 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8985 (synopsis "Java Message Service API specification")
8986 (description "Java Message Service (JMS) API is used to send messages
8987 messages between two or more clients. It is a messaging standard that allows
8988 application components to create, send, receive, and read messages.")
8989 ; either gpl2 only with GPL Classpath Exception, or cddl.
8990 (license (list license:gpl2 license:cddl1.0))))
8991
8992 (define-public java-mail
8993 (package
8994 (name "java-mail")
8995 (version "1.6.0")
8996 (source (origin
8997 (method url-fetch)
8998 (uri (string-append "https://github.com/javaee/javamail/archive/"
8999 "JAVAMAIL-1_6_0.tar.gz"))
9000 (sha256
9001 (base32
9002 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9003 (build-system ant-build-system)
9004 (arguments
9005 `(#:jar-name "java-mail.jar"
9006 #:jdk ,icedtea-8
9007 #:source-dir "mail/src/main/java"
9008 #:test-dir "mail/src/test"
9009 #:test-exclude
9010 (list "**/CollectorFormatterTest.java"
9011 "**/CompactFormatterTest.java"
9012 "**/DurationFilterTest.java"
9013 "**/MailHandlerTest.java"
9014 "**/GetLocalAddressTest.java"
9015 ;; FIXME: both end with:
9016 ;; java.lang.ClassNotFoundException:
9017 ;; javax.mail.internet.MimeMultipartParseTest
9018 "**/MimeMultipartParseTest.java"
9019 "**/SearchTermSerializationTest.java")
9020 #:phases
9021 (modify-phases %standard-phases
9022 (add-before 'configure 'move-version.java
9023 (lambda _
9024 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9025 "mail/src/main/java/javax/mail/Version.java")
9026 #t))
9027 (add-before 'build 'copy-resources
9028 (lambda _
9029 (copy-recursively "mail/src/main/resources/META-INF"
9030 "build/classes/META-INF")
9031 #t)))))
9032 (native-inputs
9033 `(("junit" ,java-junit)
9034 ("hamcrest" ,java-hamcrest-core)))
9035 (home-page "https://javaee.github.io/javamail/")
9036 (synopsis "Mail-related functionnalities in Java")
9037 (description "The JavaMail API provides a platform-independent and
9038 protocol-independent framework to build mail and messaging applications.")
9039 ;; General Public License Version 2 only ("GPL") or the Common Development
9040 ;; and Distribution License("CDDL")
9041 (license (list license:cddl1.1
9042 license:gpl2)))); with classpath exception
9043
9044 (define-public java-jeromq
9045 (package
9046 (name "java-jeromq")
9047 (version "0.4.3")
9048 (source (origin
9049 (method git-fetch)
9050 (uri (git-reference
9051 (url "https://github.com/zeromq/jeromq.git")
9052 (commit (string-append "v" version))))
9053 (file-name (string-append name "-" version "-checkout"))
9054 (sha256
9055 (base32
9056 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9057 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9058 (build-system ant-build-system)
9059 (arguments
9060 `(#:jar-name "java-jeromq.jar"
9061 #:source-dir "src/main/java"
9062 #:jdk ,icedtea-8
9063 #:test-exclude
9064 (list
9065 "**/Abstract*.java"
9066 ;; Requires network
9067 "**/ZBeaconTest.java"
9068 ;; Failures
9069 "**/DealerSpecTest.java"
9070 "**/CustomDecoderTest.java"
9071 "**/CustomEncoderTest.java"
9072 "**/ConnectRidTest.java"
9073 "**/ReqSpecTest.java"
9074 "**/PushPullSpecTest.java"
9075 "**/PubSubHwmTest.java"
9076 "**/RouterSpecTest.java"
9077 "**/ProxyTest.java")))
9078 (inputs
9079 `(("java-jnacl" ,java-jnacl)))
9080 (native-inputs
9081 `(("java-hamcrest-core" ,java-hamcrest-core)
9082 ("junit" ,java-junit)))
9083 (home-page "http://zeromq.org/bindings:java")
9084 (synopsis "Java binding for 0MQ")
9085 (description "Jeromq provides the java bindings for 0MQ.")
9086 (license license:mpl2.0)))
9087
9088 (define-public java-kafka-clients
9089 (package
9090 (name "java-kafka-clients")
9091 (version "1.0.0")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9095 version "-src.tgz"))
9096 (sha256
9097 (base32
9098 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9099 (build-system ant-build-system)
9100 (arguments
9101 `(#:jar-name "java-kafka-clients.jar"
9102 #:jdk ,icedtea-8
9103 #:source-dir "clients/src/main/java"
9104 #:test-dir "clients/src/test"
9105 #:test-exclude
9106 (list
9107 ;; This file does not contain a class
9108 "**/IntegrationTest.java"
9109 ;; Requires network
9110 "**/ClientUtilsTest.java"
9111 ;; End with errors that seem related to our powermock
9112 "**/KafkaProducerTest.java"
9113 "**/BufferPoolTest.java")))
9114 (inputs
9115 `(("java-slf4j-api" ,java-slf4j-api)
9116 ("java-lz4" ,java-lz4)))
9117 (native-inputs
9118 `(("junit" ,java-junit)
9119 ("hamcrest" ,java-hamcrest-all)
9120 ("objenesis" ,java-objenesis)
9121 ("asm" ,java-asm)
9122 ("cglib" ,java-cglib)
9123 ("javassist" ,java-jboss-javassist)
9124 ("snappy" ,java-snappy)
9125 ("easymock" ,java-easymock)
9126 ("powermock" ,java-powermock-core)
9127 ("powermock-easymock" ,java-powermock-api-easymock)
9128 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9129 ("powermock-junit4" ,java-powermock-modules-junit4)
9130 ("powermock-support" ,java-powermock-api-support)
9131 ("java-bouncycastle" ,java-bouncycastle)))
9132 (home-page "https://kafka.apache.org")
9133 (synopsis "Distributed streaming platform")
9134 (description "Kafka is a distributed streaming platform, which means:
9135 @itemize
9136 @item it can publish and subscribe to streams of records;
9137 @item it can store streams of records in a fault-tolerant way;
9138 @item it can process streams of records as they occur.
9139 @end itemize")
9140 ;; Either cddl or gpl2 only.
9141 (license (list license:cddl1.1; actually cddl1.1
9142 license:gpl2)))); with classpath exception
9143
9144 (define-public java-jdom
9145 (package
9146 (name "java-jdom")
9147 (version "1.1.3")
9148 (source (origin
9149 (method url-fetch)
9150 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9151 version ".tar.gz"))
9152 (sha256
9153 (base32
9154 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9155 (build-system ant-build-system)
9156 (arguments
9157 `(#:build-target "package"
9158 #:tests? #f; tests are run as part of the build process
9159 #:phases
9160 (modify-phases %standard-phases
9161 (replace 'install
9162 (install-jars "build")))))
9163 (home-page "http://jdom.org/")
9164 (synopsis "Access, manipulate, and output XML data")
9165 (description "Java-based solution for accessing, manipulating, and
9166 outputting XML data from Java code.")
9167 (license license:bsd-4)))
9168
9169 (define-public java-geronimo-xbean-reflect
9170 (package
9171 (name "java-geronimo-xbean-reflect")
9172 (version "4.5")
9173 (source (origin
9174 (method svn-fetch)
9175 (uri (svn-reference
9176 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9177 (revision 1807396)))
9178 (file-name (string-append name "-" version))
9179 (sha256
9180 (base32
9181 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9182 (build-system ant-build-system)
9183 (arguments
9184 `(#:jar-name "geronimo-xbean-reflect.jar"
9185 #:source-dir "xbean-reflect/src/main/java"
9186 #:test-dir "xbean-reflect/src/test"
9187 #:jdk ,icedtea-8
9188 #:test-exclude
9189 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9190 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9191 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9192 #:phases
9193 (modify-phases %standard-phases
9194 (add-before 'build 'fix-source
9195 (lambda _
9196 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9197 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9198 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9199 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9200 #t))))))
9201 (inputs
9202 `(("asm" ,java-asm)
9203 ("log4j" ,java-log4j-api)
9204 ("log4j-1.2" ,java-log4j-1.2-api)
9205 ("log4j-core" ,java-log4j-core)
9206 ("logging" ,java-commons-logging-minimal)))
9207 (native-inputs
9208 `(("junit" ,java-junit)))
9209 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9210 (synopsis "Dependency injection helper")
9211 (description "Xbean-reflect provides very flexible ways to create objects
9212 and graphs of objects for dependency injection frameworks")
9213 (license license:asl2.0)))
9214
9215 (define-public java-geronimo-xbean-bundleutils
9216 (package
9217 (inherit java-geronimo-xbean-reflect)
9218 (name "java-geronimo-xbean-bundleutils")
9219 (arguments
9220 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9221 #:source-dir "xbean-bundleutils/src/main/java"
9222 #:test-dir "xbean-bundleutils/src/test"
9223 #:phases
9224 (modify-phases %standard-phases
9225 (add-before 'build 'fix-java
9226 (lambda _
9227 ;; We use a more recent version of osgi, so this file requires
9228 ;; more interface method implementations.
9229 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9230 (("import org.osgi.framework.ServiceRegistration;")
9231 "import org.osgi.framework.ServiceRegistration;
9232 import org.osgi.framework.ServiceFactory;
9233 import java.util.Collection;
9234 import org.osgi.framework.ServiceObjects;")
9235 (("public Bundle getBundle\\(\\)")
9236 "@Override
9237 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9238 throw new UnsupportedOperationException();
9239 }
9240 @Override
9241 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9242 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9243 throw new UnsupportedOperationException();
9244 }
9245 public Bundle getBundle()"))
9246 #t)))))
9247 (inputs
9248 `(("java-slf4j" ,java-slf4j-api)
9249 ("java-asm" ,java-asm)
9250 ("java-osgi-framework" ,java-osgi-framework)
9251 ("java-eclipse-osgi" ,java-eclipse-osgi)
9252 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9253
9254 (define-public java-geronimo-xbean-asm-util
9255 (package
9256 (inherit java-geronimo-xbean-reflect)
9257 (name "java-geronimo-xbean-asm-util")
9258 (arguments
9259 `(#:jar-name "geronimo-xbean-asm-util.jar"
9260 #:source-dir "xbean-asm-util/src/main/java"
9261 #:tests? #f)); no tests
9262 (inputs
9263 `(("java-asm" ,java-asm)))
9264 (native-inputs '())))
9265
9266 (define-public java-geronimo-xbean-finder
9267 (package
9268 (inherit java-geronimo-xbean-reflect)
9269 (name "java-geronimo-xbean-finder")
9270 (arguments
9271 `(#:jar-name "geronimo-xbean-finder.jar"
9272 #:source-dir "xbean-finder/src/main/java"
9273 #:test-dir "xbean-finder/src/test"))
9274 (inputs
9275 `(("java-slf4j-api" ,java-slf4j-api)
9276 ("java-asm" ,java-asm)
9277 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9278 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9279 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9280 ("java-osgi-framework" ,java-osgi-framework)))
9281 (native-inputs
9282 `(("java-junit" ,java-junit)
9283 ("java-hamcrest-core" ,java-hamcrest-core)))))
9284
9285 (define-public java-gson
9286 (package
9287 (name "java-gson")
9288 (version "2.8.2")
9289 (source (origin
9290 (method url-fetch)
9291 (uri (string-append "https://github.com/google/gson/archive/"
9292 "gson-parent-" version ".tar.gz"))
9293 (sha256
9294 (base32
9295 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9296 (build-system ant-build-system)
9297 (arguments
9298 `(#:jar-name "gson.jar"
9299 #:source-dir "gson/src/main/java"
9300 #:test-dir "gson/src/test"))
9301 (native-inputs
9302 `(("java-junit" ,java-junit)
9303 ("java-hamcrest-core" ,java-hamcrest-core)))
9304 (home-page "https://github.com/google/gson")
9305 (synopsis "Java serialization/deserialization library from/to JSON")
9306 (description "Gson is a Java library that can be used to convert Java
9307 Objects into their JSON representation. It can also be used to convert a JSON
9308 string to an equivalent Java object. Gson can work with arbitrary Java objects
9309 including pre-existing objects that you do not have source-code of.")
9310 (license license:asl2.0)))
9311
9312 (define-public java-hawtjni
9313 (package
9314 (name "java-hawtjni")
9315 (version "1.15")
9316 (source (origin
9317 (method url-fetch)
9318 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9319 "hawtjni-project-" version ".tar.gz"))
9320 (sha256
9321 (base32
9322 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9323 (build-system ant-build-system)
9324 (arguments
9325 `(#:jar-name "hawtjni.jar"
9326 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9327 #:tests? #f; no tests
9328 #:phases
9329 (modify-phases %standard-phases
9330 (add-before 'build 'build-native
9331 (lambda* (#:key inputs #:allow-other-keys)
9332 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9333 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9334 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9335 "-fPIC" "-O2" include)
9336 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9337 "-fPIC" "-O2" include)
9338 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9339 "hawtjni.o" "hawtjni-callback.o")))
9340 #t))
9341 (add-after 'install 'install-native
9342 (lambda* (#:key outputs #:allow-other-keys)
9343 (let* ((out (assoc-ref outputs "out"))
9344 (lib (string-append out "/lib"))
9345 (inc (string-append out "/include")))
9346 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9347 (install-file "libhawtjni.so" lib)
9348 (install-file "hawtjni.h" inc)))
9349 #t)))))
9350 (inputs
9351 `(("java-commons-cli" ,java-commons-cli)
9352 ("java-asm" ,java-asm)
9353 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9354 (home-page "https://fusesource.github.io/hawtjni/")
9355 (synopsis "JNI code generator")
9356 (description "HawtJNI is a code generator that produces the JNI code needed
9357 to implement Java native methods. It is based on the jnigen code generator
9358 that is part of the SWT Tools project.")
9359 (license license:asl2.0)))
9360
9361 (define-public java-jansi-native
9362 (package
9363 (name "java-jansi-native")
9364 (version "1.7")
9365 (source (origin
9366 (method url-fetch)
9367 (uri (string-append "https://github.com/fusesource/jansi-native/"
9368 "archive/jansi-native-" version ".tar.gz"))
9369 (sha256
9370 (base32
9371 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9372 (build-system ant-build-system)
9373 (arguments
9374 `(#:jar-name "jansi-native.jar"
9375 #:source-dir "src/main/java"
9376 #:tests? #f; no tests
9377 #:phases
9378 (modify-phases %standard-phases
9379 (add-before 'build 'build-native
9380 (lambda* (#:key inputs #:allow-other-keys)
9381 ;; there are more required files for windows in windows/
9382 (with-directory-excursion "src/main/native-package/src"
9383 (substitute* "jansi_ttyname.c"
9384 (("#include \"jansi_.*") ""))
9385 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9386 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9387 "/include")
9388 (string-append "-I" (assoc-ref inputs "jdk")
9389 "/include/linux")
9390 "-fPIC" "-O2")
9391 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9392 (add-before 'build 'install-native
9393 (lambda _
9394 (let ((dir (string-append "build/classes/META-INF/native/"
9395 ,(match (%current-system)
9396 ((or "i686-linux" "armhf-linux")
9397 "linux32")
9398 ((or "x86_64-linux" "aarch64-linux"
9399 "mips64el-linux")
9400 "linux64")))))
9401 (install-file "src/main/native-package/src/libjansi.so" dir))
9402 #t))
9403 (add-after 'install 'install-native
9404 (lambda* (#:key outputs #:allow-other-keys)
9405 (install-file "src/main/native-package/src/jansi.h"
9406 (string-append (assoc-ref outputs "out") "/include"))
9407 #t)))))
9408 (inputs
9409 `(("java-hawtjni" ,java-hawtjni)))
9410 (home-page "https://fusesource.github.io/jansi/")
9411 (synopsis "Native library for jansi")
9412 (description "This package provides the native library for jansi, a small
9413 Java library that allows you to use ANSI escape sequences to format your
9414 console output.")
9415 (license license:asl2.0)))
9416
9417 (define-public java-jansi
9418 (package
9419 (name "java-jansi")
9420 (version "1.16")
9421 (source (origin
9422 (method url-fetch)
9423 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9424 "jansi-project-" version ".tar.gz"))
9425 (sha256
9426 (base32
9427 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9428 (build-system ant-build-system)
9429 (arguments
9430 `(#:jar-name "jansi.jar"
9431 #:source-dir "jansi/src/main/java"
9432 #:test-dir "jansi/src/test"
9433 #:phases
9434 (modify-phases %standard-phases
9435 (add-after 'check 'clear-term
9436 (lambda _
9437 (invoke "echo" "-e" "\\e[0m"))))))
9438 (inputs
9439 `(("java-jansi-native" ,java-jansi-native)))
9440 (native-inputs
9441 `(("java-junit" ,java-junit)
9442 ("java-hamcrest-core" ,java-hamcrest-core)))
9443 (home-page "https://fusesource.github.io/jansi/")
9444 (synopsis "Portable ANSI escape sequences")
9445 (description "Jansi is a Java library that allows you to use ANSI escape
9446 sequences to format your console output which works on every platform.")
9447 (license license:asl2.0)))
9448
9449 (define-public java-jboss-el-api-spec
9450 (package
9451 (name "java-jboss-el-api-spec")
9452 (version "3.0")
9453 (source (origin
9454 (method url-fetch)
9455 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9456 "archive/jboss-el-api_" version
9457 "_spec-1.0.7.Final.tar.gz"))
9458 (sha256
9459 (base32
9460 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9461 (build-system ant-build-system)
9462 (arguments
9463 `(#:jar-name "java-jboss-el-api_spec.jar"
9464 #:jdk ,icedtea-8))
9465 (inputs
9466 `(("java-junit" ,java-junit)))
9467 (home-page "https://github.com/jboss/jboss-el-api_spec")
9468 (synopsis "JSR-341 expression language 3.0 API")
9469 (description "This package contains an implementation of the JSR-341
9470 specification for the expression language 3.0. It implements an expression
9471 language inspired by ECMAScript and XPath. This language is used with
9472 JavaServer Pages (JSP).")
9473 ;; Either GPL2 only or CDDL.
9474 (license (list license:gpl2 license:cddl1.1))))
9475
9476 (define-public java-jboss-interceptors-api-spec
9477 (package
9478 (name "java-jboss-interceptors-api-spec")
9479 (version "1.2")
9480 (source (origin
9481 (method url-fetch)
9482 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9483 "archive/jboss-interceptors-api_" version
9484 "_spec-1.0.0.Final.tar.gz"))
9485 (sha256
9486 (base32
9487 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9488 (build-system ant-build-system)
9489 (arguments
9490 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9491 #:jdk ,icedtea-8
9492 #:source-dir "."
9493 #:tests? #f)); no tests
9494 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9495 (synopsis "Interceptors 1.2 API classes from JSR 318")
9496 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9497 API. Interceptors are used to interpose on business method invocations and
9498 specific events.")
9499 ;; Either GPL2 only or CDDL.
9500 (license (list license:gpl2 license:cddl1.1))))
9501
9502 (define-public java-cdi-api
9503 (package
9504 (name "java-cdi-api")
9505 (version "2.0")
9506 (source (origin
9507 (method url-fetch)
9508 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9509 version ".tar.gz"))
9510 (file-name (string-append name "-" version ".tar.gz"))
9511 (sha256
9512 (base32
9513 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9514 (build-system ant-build-system)
9515 (arguments
9516 `(#:source-dir "api/src/main/java"
9517 #:jar-name "java-cdi-api.jar"
9518 #:test-dir "api/src/test"
9519 #:jdk ,icedtea-8
9520 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9521 (inputs
9522 `(("java-javax-inject" ,java-javax-inject)
9523 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9524 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9525 (native-inputs
9526 `(("java-testng" ,java-testng)
9527 ("java-hamcrest-core" ,java-hamcrest-core)))
9528 (home-page "http://cdi-spec.org/")
9529 (synopsis "Contexts and Dependency Injection APIs")
9530 (description "Java-cdi-api contains the required APIs for Contexts and
9531 Dependency Injection (CDI).")
9532 (license license:asl2.0)))
9533
9534 (define-public java-joda-convert
9535 (package
9536 (name "java-joda-convert")
9537 (version "1.9.2")
9538 (source (origin
9539 (method url-fetch)
9540 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9541 version ".tar.gz"))
9542 (file-name (string-append name "-" version ".tar.gz"))
9543 (sha256
9544 (base32
9545 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9546 (build-system ant-build-system)
9547 (arguments
9548 `(#:jar-name (string-append ,name "-" ,version ".jar")
9549 #:source-dir "src/main/java"
9550 #:test-include (list "**/Test*.java")
9551 ;; Contains only interfaces and base classes (no test)
9552 #:test-exclude (list "**/test*/**.java")))
9553 (inputs
9554 `(("java-guava" ,java-guava)))
9555 (native-inputs
9556 `(("java-junit" ,java-junit)
9557 ("java-hamcrest-core" ,java-hamcrest-core)))
9558 (home-page "http://www.joda.org/joda-convert/")
9559 (synopsis "Conversion between Objects and Strings")
9560 (description "Joda-Convert provides a small set of classes to aid
9561 conversion between Objects and Strings. It is not intended to tackle the
9562 wider problem of Object to Object transformation.")
9563 (license license:asl2.0)))
9564
9565 (define-public java-joda-time
9566 (package
9567 (name "java-joda-time")
9568 (version "2.9.9")
9569 (source (origin
9570 (method url-fetch)
9571 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9572 version ".tar.gz"))
9573 (file-name (string-append name "-" version ".tar.gz"))
9574 (sha256
9575 (base32
9576 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9577 (build-system ant-build-system)
9578 (arguments
9579 `(#:jar-name "java-joda-time.jar"
9580 #:source-dir "src/main/java"
9581 #:test-include (list "**/Test*.java")
9582 ;; There is no runnable test in these files
9583 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9584 #:phases
9585 (modify-phases %standard-phases
9586 (add-after 'build 'build-resources
9587 (lambda _
9588 (mkdir-p "build/classes/org/joda/time/tz/data")
9589 (mkdir-p "build/classes/org/joda/time/format")
9590 ;; This will produce the following exception:
9591 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9592 ;; which is normal, because it doesn't exist yet. It still generates
9593 ;; the same file as in the binary one can find on maven.
9594 (invoke "java" "-cp"
9595 (string-append "build/classes:" (getenv "CLASSPATH"))
9596 "org.joda.time.tz.ZoneInfoCompiler"
9597 "-src" "src/main/java/org/joda/time/tz/src"
9598 "-dst" "build/classes/org/joda/time/tz/data"
9599 "africa" "antarctica" "asia" "australasia"
9600 "europe" "northamerica" "southamerica"
9601 "pacificnew" "etcetera" "backward" "systemv")
9602 (for-each (lambda (f)
9603 (copy-file f (string-append
9604 "build/classes/org/joda/time/format/"
9605 (basename f))))
9606 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9607 #t))
9608 (add-before 'install 'regenerate-jar
9609 (lambda _
9610 ;; We need to regenerate the jar file to add generated data.
9611 (delete-file "build/jar/java-joda-time.jar")
9612 (invoke "ant" "jar")))
9613 (add-before 'check 'copy-test-resources
9614 (lambda _
9615 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9616 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9617 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9618 (copy-recursively "src/test/resources" "build/test-classes")
9619 #t)))))
9620 (inputs
9621 `(("java-joda-convert" ,java-joda-convert)))
9622 (native-inputs
9623 `(("java-junit" ,java-junit)
9624 ("java-hamcrest-core" ,java-hamcrest-core)
9625 ("tzdata" ,tzdata)))
9626 (home-page "http://www.joda.org/joda-time/")
9627 (synopsis "Replacement for the Java date and time classes")
9628 (description "Joda-Time is a replacement for the Java date and time
9629 classes prior to Java SE 8.")
9630 (license license:asl2.0)))
9631
9632 (define-public java-xerces
9633 (package
9634 (name "java-xerces")
9635 (version "2.11.0")
9636 (source
9637 (origin
9638 (method url-fetch)
9639 (uri (string-append "mirror://apache/xerces/j/source/"
9640 "Xerces-J-src." version ".tar.gz"))
9641 (sha256
9642 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9643 (patches (search-patches
9644 "java-xerces-xjavac_taskdef.patch"
9645 "java-xerces-build_dont_unzip.patch"
9646 "java-xerces-bootclasspath.patch"))))
9647 (build-system ant-build-system)
9648 (arguments
9649 `(#:tests? #f;; Test files are not present
9650 #:test-target "test"
9651 #:jdk ,icedtea-8
9652 #:phases
9653 (modify-phases %standard-phases
9654 (add-after 'unpack 'create-build.properties
9655 (lambda* (#:key inputs #:allow-other-keys)
9656 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9657 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9658 (with-output-to-file "build.properties"
9659 (lambda _
9660 (format #t
9661 "jar.jaxp = ~a/share/java/jaxp.jar~@
9662 jar.apis-ext = ~a/share/java/jaxp.jar~@
9663 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9664 jaxp jaxp resolver)))
9665 ;; Make xerces use our version of jaxp in tests
9666 (substitute* "build.xml"
9667 (("xml-apis.jar")
9668 (string-append jaxp "/share/java/jaxp.jar"))
9669 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9670 "${jar.apis}")))
9671 #t))
9672 (replace 'install (install-jars "build")))))
9673 (inputs
9674 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9675 ("java-jaxp" ,java-jaxp)))
9676 (home-page "https://xerces.apache.org/xerces2-j/")
9677 (synopsis "Validating XML parser for Java with DOM level 3 support")
9678 (description "The Xerces2 Java parser is the reference implementation of
9679 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9680 processor.
9681
9682 Xerces2-J supports the following standards and APIs:
9683
9684 @itemize
9685 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9686 @item Namespaces in XML Recommendation
9687 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9688 Range Recommendations
9689 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9690 @item Java APIs for XML Processing (JAXP) 1.2.01
9691 @item XML Schema 1.0 Structures and Datatypes Recommendations
9692 @item Experimental implementation of the Document Object Model (DOM) Level 3
9693 Core and Load/Save Working Drafts
9694 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9695 Candidate Recommendation
9696 @end itemize
9697
9698 Xerces is now able to parse documents written according to the XML 1.1
9699 Candidate Recommendation, except that it does not yet provide an option to
9700 enable normalization checking as described in section 2.13 of this
9701 specification. It also handles namespaces according to the XML Namespaces 1.1
9702 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9703 the DOM level 3 load/save API's are in use.")
9704 (license license:asl2.0)))
9705
9706 (define-public java-jakarta-regexp
9707 (package
9708 (name "java-jakarta-regexp")
9709 (version "1.5")
9710 (source
9711 (origin
9712 (method url-fetch)
9713 (uri (string-append
9714 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
9715 version ".tar.gz"))
9716 (sha256
9717 (base32
9718 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
9719 (build-system ant-build-system)
9720 (arguments
9721 `(#:test-target "test"
9722 #:phases
9723 (modify-phases %standard-phases
9724 (replace 'install
9725 (lambda* (#:key outputs #:allow-other-keys)
9726 (let* ((out (assoc-ref outputs "out"))
9727 (out-share (string-append out "/share/java")))
9728 (mkdir-p out-share)
9729 (for-each (lambda (name)
9730 (install-file name out-share))
9731 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
9732 #t))))))
9733 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
9734 (synopsis "Regular expression parser generator for Java.")
9735 (description "@code{jakarta-regexp} is an old regular expression parser
9736 generator for Java.")
9737 (license license:asl2.0)))
9738
9739 (define-public java-jline
9740 (package
9741 (name "java-jline")
9742 (version "1.0")
9743 (source (origin
9744 (method url-fetch)
9745 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9746 version ".tar.gz"))
9747 (sha256
9748 (base32
9749 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9750 (build-system ant-build-system)
9751 (arguments
9752 `(#:jar-name "jline.jar"
9753 #:source-dir "src/main/java"
9754 #:test-dir "src/test"
9755 #:phases
9756 (modify-phases %standard-phases
9757 (add-before 'build 'copy-resources
9758 (lambda _
9759 (copy-recursively "src/main/resources" "build/classes")
9760 #t)))))
9761 (native-inputs
9762 `(("java-junit" ,java-junit)))
9763 (home-page "https://jline.github.io")
9764 (synopsis "Console input handling library")
9765 (description "JLine is a Java library for handling console input. It is
9766 similar in functionality to BSD editline and GNU readline but with additional
9767 features that bring it on par with the Z shell line editor.")
9768 (license license:bsd-3)))
9769
9770 (define-public java-jline-2
9771 (package
9772 (inherit java-jline)
9773 (version "2.14.5")
9774 (source (origin
9775 (method url-fetch)
9776 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9777 version ".tar.gz"))
9778 (sha256
9779 (base32
9780 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9781 (arguments
9782 `(#:jdk ,icedtea-8
9783 ,@(package-arguments java-jline)))
9784 (inputs
9785 `(("java-jansi" ,java-jansi)
9786 ("java-jansi-native" ,java-jansi-native)))
9787 (native-inputs
9788 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9789 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9790 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9791 ("java-powermock-api-support" ,java-powermock-api-support)
9792 ("java-powermock-core" ,java-powermock-core)
9793 ("java-powermock-reflect" ,java-powermock-reflect)
9794 ("java-easymock" ,java-easymock)
9795 ("java-jboss-javassist" ,java-jboss-javassist)
9796 ("java-objenesis" ,java-objenesis)
9797 ("java-asm" ,java-asm)
9798 ("java-hamcrest-core" ,java-hamcrest-core)
9799 ("java-cglib" ,java-cglib)
9800 ("java-junit" ,java-junit)
9801 ("java-hawtjni" ,java-hawtjni)))))
9802
9803 (define-public java-xmlunit
9804 (package
9805 (name "java-xmlunit")
9806 (version "2.5.1")
9807 (source (origin
9808 (method url-fetch)
9809 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9810 version ".tar.gz"))
9811 (file-name (string-append name "-" version ".tar.gz"))
9812 (sha256
9813 (base32
9814 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9815 (build-system ant-build-system)
9816 (arguments
9817 `(#:jar-name "java-xmlunit.jar"
9818 #:source-dir "xmlunit-core/src/main/java"
9819 #:test-dir "xmlunit-core/src/test"
9820 #:phases
9821 (modify-phases %standard-phases
9822 (add-before 'check 'copy-test-resources
9823 (lambda* (#:key inputs #:allow-other-keys)
9824 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9825 #t)))))
9826 (native-inputs
9827 `(("java-junit" ,java-junit)
9828 ("java-mockito-1" ,java-mockito-1)
9829 ("java-hamcrest-all" ,java-hamcrest-all)
9830 ("java-objenesis" ,java-objenesis)
9831 ("java-asm" ,java-asm)
9832 ("java-cglib" ,java-cglib)
9833 ("resources"
9834 ,(origin
9835 (method git-fetch)
9836 (uri (git-reference
9837 (url "https://github.com/xmlunit/test-resources.git")
9838 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9839 (file-name "java-xmlunit-test-resources")
9840 (sha256
9841 (base32
9842 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9843 (home-page "http://www.xmlunit.org/")
9844 (synopsis "XML output testing")
9845 (description "XMLUnit provides you with the tools to verify the XML you
9846 emit is the one you want to create. It provides helpers to validate against
9847 an XML Schema, assert the values of XPath queries or compare XML documents
9848 against expected outcomes.")
9849 (license license:asl2.0)))
9850
9851 (define-public java-xmlunit-legacy
9852 (package
9853 (inherit java-xmlunit)
9854 (name "java-xmlunit-legacy")
9855 (arguments
9856 `(#:jar-name "java-xmlunit-legacy.jar"
9857 #:source-dir "xmlunit-legacy/src/main/java"
9858 #:test-dir "xmlunit-legacy/src/test"))
9859 (inputs
9860 `(("java-xmlunit" ,java-xmlunit)
9861 ("java-junit" ,java-junit)))
9862 (native-inputs
9863 `(("java-mockito-1" ,java-mockito-1)))))
9864
9865 (define-public java-xmlunit-matchers
9866 (package
9867 (inherit java-xmlunit)
9868 (name "java-xmlunit-matchers")
9869 (arguments
9870 `(#:jar-name "java-xmlunit-matchers.jar"
9871 #:source-dir "xmlunit-matchers/src/main/java"
9872 #:test-dir "xmlunit-matchers/src/test"
9873 #:test-exclude
9874 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
9875 (list "**/ValidationMatcherTest.java")
9876 #:phases
9877 (modify-phases %standard-phases
9878 (add-before 'build 'copy-test-class
9879 (lambda _
9880 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
9881 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
9882 #t))
9883 (add-before 'build 'fix-test-resources-path
9884 (lambda _
9885 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
9886 (("../test-resources") "test-resources"))
9887 #t))
9888 (add-before 'check 'copy-test-resources
9889 (lambda* (#:key inputs #:allow-other-keys)
9890 (copy-recursively (assoc-ref inputs "resources") "test-resources")
9891 #t)))))
9892 (inputs
9893 `(("java-xmlunit" ,java-xmlunit)
9894 ("java-junit" ,java-junit)))))
9895
9896 (define-public java-openchart2
9897 (package
9898 (name "java-openchart2")
9899 (version "1.4.3")
9900 (source (origin
9901 (method url-fetch)
9902 (uri (string-append "http://download.approximatrix.com/openchart2/"
9903 "openchart2-" version ".source.zip"))
9904 (sha256
9905 (base32
9906 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9907 (build-system ant-build-system)
9908 (arguments
9909 `(#:test-target "test"
9910 #:phases
9911 (modify-phases %standard-phases
9912 (add-after 'unpack 'fix-junit-errors
9913 (lambda _
9914 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9915 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9916 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9917 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9918 "model/DefaultChartDataModelConstraintsTest.java"
9919 "model/MultiScatterDataModelConstraintsTest.java"
9920 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9921 (("(assertEquals[^;]+);" before _)
9922 (string-append (string-drop-right before 2) ", 1E-6);"))))
9923 #t))
9924 (replace 'install (install-jars ".")))))
9925 (native-inputs
9926 `(("unzip" ,unzip)
9927 ("java-junit" ,java-junit)
9928 ("java-hamcrest-core" ,java-hamcrest-core)))
9929 (home-page "http://approximatrix.com/products/openchart2/")
9930 (synopsis "Simple plotting for Java")
9931 (description "Openchart2 provides a simple, yet powerful, interface for
9932 Java programmers to create two-dimensional charts and plots. The library
9933 features an assortment of graph styles, including advanced scatter plots, bar
9934 graphs, and pie charts.")
9935 (license license:lgpl2.1+)))
9936
9937 (define-public java-commons-httpclient
9938 (package
9939 (name "java-commons-httpclient")
9940 (version "3.1")
9941 (source (origin
9942 (method url-fetch)
9943 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9944 "commons-httpclient/source/commons-httpclient-"
9945 version "-src.tar.gz"))
9946 (sha256
9947 (base32
9948 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9949 (build-system ant-build-system)
9950 (arguments
9951 `(#:build-target "compile"
9952 #:test-target "test"
9953 #:tests? #f; requires junit-textui (junit 3)
9954 #:phases
9955 (modify-phases %standard-phases
9956 (add-before 'build 'fix-accent
9957 (lambda _
9958 (for-each (lambda (file)
9959 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9960 (substitute* file
9961 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9962 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9963 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9964 "src/test/org/apache/commons/httpclient/TestHttps.java"
9965 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
9966 #t))
9967 (replace 'install
9968 (lambda* (#:key outputs #:allow-other-keys)
9969 (invoke "ant" "dist"
9970 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9971 "/share/java"))
9972 #t)))))
9973 (propagated-inputs
9974 `(("java-commons-logging" ,java-commons-logging-minimal)
9975 ("java-commons-codec" ,java-commons-codec)))
9976 (home-page "https://hc.apache.org")
9977 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9978 (description "This package contains an HTTP/1.1 compliant HTTP agent
9979 implementation. It also provides reusable components for client-side
9980 authentication, HTTP state management, and HTTP connection management.")
9981 (license license:asl2.0)))
9982
9983 (define-public java-commons-vfs
9984 (package
9985 (name "java-commons-vfs")
9986 (version "2.2")
9987 (source (origin
9988 (method url-fetch)
9989 (uri (string-append "mirror://apache/commons/vfs/source/"
9990 "commons-vfs2-distribution-" version "-src.tar.gz"))
9991 (file-name (string-append name "-" version ".tar.gz"))
9992 (sha256
9993 (base32
9994 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9995 (modules '((guix build utils)))
9996 (snippet
9997 '(begin
9998 (for-each delete-file
9999 (find-files "." "\\.jar$"))
10000 #t))))
10001 (build-system ant-build-system)
10002 (arguments
10003 `(#:jar-name "commons-vfs.jar"
10004 #:source-dir "commons-vfs2/src/main/java"
10005 #:test-dir "commons-vfs2/src/test"
10006 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10007 #:tests? #f
10008 #:phases
10009 (modify-phases %standard-phases
10010 (add-before 'build 'remove-hadoop-and-webdav
10011 ; Remove these files as they are not required and depend on difficult
10012 ; packages.
10013 (lambda _
10014 (for-each delete-file-recursively
10015 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10016 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10017 #t)))))
10018 (inputs
10019 `(("java-commons-collections4" ,java-commons-collections4)
10020 ("java-commons-compress" ,java-commons-compress)
10021 ("java-commons-httpclient" ,java-commons-httpclient)
10022 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10023 ("java-commons-net" ,java-commons-net)
10024 ("java-jsch" ,java-jsch)))
10025 (home-page "http://commons.apache.org/proper/commons-vfs/")
10026 (synopsis "Java filesystem library")
10027 (description "Commons VFS provides a single API for accessing various
10028 different file systems. It presents a uniform view of the files from various
10029 different sources, such as the files on local disk, on an HTTP server, or
10030 inside a Zip archive.")
10031 (license license:asl2.0)))
10032
10033 (define-public java-jakarta-oro
10034 (package
10035 (name "java-jakarta-oro")
10036 (version "2.0.8")
10037 (source (origin
10038 (method url-fetch)
10039 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10040 "jakarta-oro-" version ".tar.gz"))
10041 (sha256
10042 (base32
10043 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10044 (modules '((guix build utils)))
10045 (snippet
10046 `(begin
10047 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10048 #t))))
10049 (build-system ant-build-system)
10050 (arguments
10051 `(#:build-target "package"
10052 #:tests? #f; tests are run as part of the build process
10053 #:phases
10054 (modify-phases %standard-phases
10055 (replace 'install
10056 (install-jars ,(string-append "jakarta-oro-" version))))))
10057 (home-page "https://jakarta.apache.org/oro/")
10058 (synopsis "Text-processing for Java")
10059 (description "The Jakarta-ORO Java classes are a set of text-processing
10060 Java classes that provide Perl5 compatible regular expressions, AWK-like
10061 regular expressions, glob expressions, and utility classes for performing
10062 substitutions, splits, filtering filenames, etc. This library is the successor
10063 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10064 from ORO, Inc.")
10065 (license license:asl1.1)))
10066
10067 (define-public java-native-access
10068 (package
10069 (name "java-native-access")
10070 (version "4.5.1")
10071 (source (origin
10072 (method url-fetch)
10073 (uri (string-append "https://github.com/java-native-access/jna/"
10074 "archive/" version ".tar.gz"))
10075 (file-name (string-append name "-" version ".tar.gz"))
10076 (sha256
10077 (base32
10078 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10079 (modules '((guix build utils)))
10080 (snippet
10081 `(begin
10082 (for-each delete-file (find-files "." ".*.jar"))
10083 (delete-file-recursively "native/libffi")
10084 (delete-file-recursively "dist")
10085 #t))))
10086 (build-system ant-build-system)
10087 (arguments
10088 `(#:tests? #f; FIXME: tests require reflections.jar
10089 #:test-target "test"
10090 #:make-flags (list "-Ddynlink.native=true")
10091 #:phases
10092 (modify-phases %standard-phases
10093 (add-before 'build 'fix-build.xml
10094 (lambda* (#:key inputs #:allow-other-keys)
10095 (substitute* "build.xml"
10096 ;; Since we removed the bundled ant.jar, give the correct path
10097 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10098 ;; We removed generated native libraries. We can only rebuild one
10099 ;; so don't fail if we can't find a native library for another architecture.
10100 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10101 ;; Copy test dependencies
10102 (copy-file (string-append (assoc-ref inputs "java-junit")
10103 "/share/java/junit.jar")
10104 "lib/junit.jar")
10105 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10106 "/share/java/hamcrest-core.jar")
10107 "lib/hamcrest-core.jar")
10108 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10109 #t))
10110 (add-before 'build 'build-native
10111 (lambda _
10112 (invoke "ant" "-Ddynlink.native=true" "native")
10113 #t))
10114 (replace 'install
10115 (install-jars "build")))))
10116 (inputs
10117 `(("libffi" ,libffi)
10118 ("libx11" ,libx11)
10119 ("libxt" ,libxt)))
10120 (native-inputs
10121 `(("java-junit" ,java-junit)
10122 ("java-hamcrest-core" ,java-hamcrest-core)))
10123 (home-page "https://github.com/java-native-access/jna")
10124 (synopsis "Access to native shared libraries from Java")
10125 (description "JNA provides Java programs easy access to native shared
10126 libraries without writing anything but Java code - no JNI or native code is
10127 required. JNA allows you to call directly into native functions using natural
10128 Java method invocation.")
10129 ;; Java Native Access project (JNA) is dual-licensed under 2
10130 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10131 (license (list
10132 license:asl2.0
10133 license:lgpl2.1+))))
10134
10135 (define-public java-native-access-platform
10136 (package
10137 (inherit java-native-access)
10138 (name "java-native-access-platform")
10139 (arguments
10140 `(#:test-target "test"
10141 #:tests? #f; require jna-test.jar
10142 #:phases
10143 (modify-phases %standard-phases
10144 (add-before 'build 'chdir
10145 (lambda _
10146 (chdir "contrib/platform")
10147 #t))
10148 (add-after 'chdir 'fix-ant
10149 (lambda* (#:key inputs #:allow-other-keys)
10150 (substitute* "nbproject/project.properties"
10151 (("../../build/jna.jar")
10152 (string-append (assoc-ref inputs "java-native-access")
10153 "/share/java/jna.jar"))
10154 (("../../lib/hamcrest-core-.*.jar")
10155 (string-append (assoc-ref inputs "java-hamcrest-core")
10156 "/share/java/hamcrest-core.jar"))
10157 (("../../lib/junit.jar")
10158 (string-append (assoc-ref inputs "java-junit")
10159 "/share/java/junit.jar")))
10160 #t))
10161 (replace 'install
10162 (install-jars "dist")))))
10163 (inputs
10164 `(("java-native-access" ,java-native-access)))
10165 (synopsis "Cross-platform mappings for jna")
10166 (description "java-native-access-platfrom has cross-platform mappings
10167 and mappings for a number of commonly used platform functions, including a
10168 large number of Win32 mappings as well as a set of utility classes that
10169 simplify native access.")))
10170
10171 (define-public java-jsch-agentproxy-core
10172 (package
10173 (name "java-jsch-agentproxy-core")
10174 (version "0.0.8")
10175 (source (origin
10176 (method url-fetch)
10177 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10178 version ".tar.gz"))
10179 (file-name (string-append name "-" version ".tar.gz"))
10180 (sha256
10181 (base32
10182 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10183 (build-system ant-build-system)
10184 (arguments
10185 `(#:jar-name "jsch-agentproxy-core.jar"
10186 #:source-dir "jsch-agent-proxy-core/src/main/java"
10187 #:tests? #f)); no tests
10188 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10189 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10190 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10191 and Pageant included Putty. It will be easily integrated into JSch, and users
10192 will be allowed to use these programs for authentication.")
10193 (license license:bsd-3)))
10194
10195 (define-public java-jsch-agentproxy-sshagent
10196 (package
10197 (inherit java-jsch-agentproxy-core)
10198 (name "java-jsch-agentproxy-sshagent")
10199 (arguments
10200 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10201 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10202 #:tests? #f)); no tests
10203 (inputs
10204 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10205 (synopsis "Proxy to ssh-agent")
10206 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10207 and Pageant included in Putty. This component contains the code for a proxy to
10208 ssh-agent.")))
10209
10210 (define-public java-jsch-agentproxy-usocket-jna
10211 (package
10212 (inherit java-jsch-agentproxy-core)
10213 (name "java-jsch-agentproxy-usocket-jna")
10214 (arguments
10215 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10216 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10217 #:tests? #f)); no tests
10218 (inputs
10219 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10220 ("java-native-access" ,java-native-access)))
10221 (synopsis "USocketFactory implementation using JNA")
10222 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10223 and Pageant included in Putty. This component contains an implementation of
10224 USocketFactory using @dfn{JNA} (Java Native Access).")))
10225
10226 (define-public java-jsch-agentproxy-pageant
10227 (package
10228 (inherit java-jsch-agentproxy-core)
10229 (name "java-jsch-agentproxy-pageant")
10230 (arguments
10231 `(#:jar-name "jsch-agentproxy-pageant.jar"
10232 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10233 #:tests? #f)); no tests
10234 (inputs
10235 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10236 ("java-native-access" ,java-native-access)
10237 ("java-native-access-platform" ,java-native-access-platform)))
10238 (synopsis "Proxy to pageant")
10239 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10240 and Pageant included in Putty. This component contains the code for a proxy to
10241 pageant.")))
10242
10243 (define-public java-jsch-agentproxy-usocket-nc
10244 (package
10245 (inherit java-jsch-agentproxy-core)
10246 (name "java-jsch-agentproxy-usocket-nc")
10247 (arguments
10248 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10249 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10250 #:tests? #f)); no tests
10251 (inputs
10252 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10253 (synopsis "USocketFactory implementation using netcat")
10254 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10255 and Pageant included in Putty. This component contains an implementation of
10256 USocketFactory using netcat.")))
10257
10258 (define-public java-jsch-agentproxy-connector-factory
10259 (package
10260 (inherit java-jsch-agentproxy-core)
10261 (name "java-jsch-agentproxy-connector-factory")
10262 (arguments
10263 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10264 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10265 #:tests? #f)); no tests
10266 (inputs
10267 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10268 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10269 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10270 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10271 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10272 (synopsis "Connector factory for jsch agent proxy")
10273 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10274 and Pageant included in Putty. This component contains a connector factory.")))
10275
10276 (define-public java-jsch-agentproxy-jsch
10277 (package
10278 (inherit java-jsch-agentproxy-core)
10279 (name "java-jsch-agentproxy-jsch")
10280 (arguments
10281 `(#:jar-name "jsch-agentproxy-jsch.jar"
10282 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10283 #:tests? #f)); no tests
10284 (inputs
10285 `(("java-jsch" ,java-jsch)
10286 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10287 (synopsis "JSch integration library for agentproxy")
10288 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10289 and Pageant included in Putty. This component contains a library to use
10290 jsch-agent-proxy with JSch.")))
10291
10292 (define-public java-apache-ivy
10293 (package
10294 (name "java-apache-ivy")
10295 (version "2.4.0")
10296 (source (origin
10297 (method url-fetch)
10298 (uri (string-append "mirror://apache//ant/ivy/" version
10299 "/apache-ivy-" version "-src.tar.gz"))
10300 (sha256
10301 (base32
10302 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10303 (patches
10304 (search-patches
10305 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10306 (build-system ant-build-system)
10307 (arguments
10308 `(#:jar-name "ivy.jar"
10309 #:tests? #f
10310 #:phases
10311 (modify-phases %standard-phases
10312 (add-before 'build 'remove-example
10313 (lambda _
10314 (delete-file-recursively "src/example")
10315 #t))
10316 (add-before 'build 'copy-resources
10317 (lambda _
10318 (with-directory-excursion "src/java"
10319 (for-each (lambda (file)
10320 (install-file file (string-append "../../build/classes/" (dirname file))))
10321 (append
10322 (find-files "." ".*.css")
10323 (find-files "." ".*.ent")
10324 (find-files "." ".*.html")
10325 (find-files "." ".*.properties")
10326 (find-files "." ".*.xsd")
10327 (find-files "." ".*.xsl")
10328 (find-files "." ".*.xml"))))
10329 #t))
10330 (add-before 'build 'fix-vfs
10331 (lambda _
10332 (substitute*
10333 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10334 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10335 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10336 #t))
10337 (add-before 'install 'copy-manifest
10338 (lambda _
10339 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10340 #t))
10341 (add-before 'install 'repack
10342 (lambda _
10343 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10344 "-C" "build/classes" ".")))
10345 (add-after 'install 'install-bin
10346 (lambda* (#:key outputs #:allow-other-keys)
10347 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10348 (ivy (string-append bin "/ivy"))
10349 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10350 (mkdir-p bin)
10351 (with-output-to-file ivy
10352 (lambda _
10353 (display (string-append
10354 "#!" (which "sh") "\n"
10355 "if [[ -z $CLASSPATH ]]; then\n"
10356 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10357 "else\n"
10358 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10359 "fi\n"
10360 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10361 (chmod ivy #o755)
10362 #t))))))
10363 (inputs
10364 `(("java-bouncycastle" ,java-bouncycastle)
10365 ("java-commons-cli" ,java-commons-cli)
10366 ("java-commons-collections" ,java-commons-collections)
10367 ("java-commons-httpclient" ,java-commons-httpclient)
10368 ("java-commons-lang" ,java-commons-lang)
10369 ("java-commons-vfs" ,java-commons-vfs)
10370 ("java-jakarta-oro" ,java-jakarta-oro)
10371 ("java-jsch" ,java-jsch)
10372 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10373 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10374 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10375 ("java-junit" ,java-junit)))
10376 (home-page "https://ant.apache.org/ivy")
10377 (synopsis "Dependency manager for the Java programming language")
10378 (description "Ivy is a tool for managing (recording, tracking, resolving
10379 and reporting) project dependencies. It is characterized by the following:
10380
10381 @itemize
10382 @item flexibility and configurability - Ivy is essentially process agnostic
10383 and is not tied to any methodology or structure. Instead it provides the
10384 necessary flexibility and configurability to be adapted to a broad range
10385 of dependency management and build processes.
10386 @item tight integration with Apache Ant - while available as a standalone tool,
10387 Ivy works particularly well with Apache Ant providing a number of
10388 powerful Ant tasks ranging from dependency resolution to dependency
10389 reporting and publication.
10390 @end itemize")
10391 (license license:asl2.0)))
10392
10393 (define-public java-eclipse-sisu-inject
10394 (package
10395 (name "java-eclipse-sisu-inject")
10396 (version "0.3.3")
10397 (source (origin
10398 (method url-fetch)
10399 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10400 "archive/releases/" version ".tar.gz"))
10401 (sha256
10402 (base32
10403 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10404 (build-system ant-build-system)
10405 (arguments
10406 `(#:jar-name "eclipse-sisu-inject.jar"
10407 #:source-dir "org.eclipse.sisu.inject/src"
10408 #:jdk ,icedtea-8
10409 #:tests? #f)); no tests
10410 (inputs
10411 `(("java-guice" ,java-guice)
10412 ("java-guice-servlet" ,java-guice-servlet)
10413 ("java-javax-inject" ,java-javax-inject)
10414 ("java-javaee-servletapi" ,java-javaee-servletapi)
10415 ("java-junit" ,java-junit)
10416 ("java-slf4j-api" ,java-slf4j-api)
10417 ("java-jsr305" ,java-jsr305)
10418 ("java-jsr250" ,java-jsr250)
10419 ("java-cdi-api" ,java-cdi-api)
10420 ("java-osgi-framework" ,java-osgi-framework)
10421 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10422 ("java-testng" ,java-testng)))
10423 (home-page "https://www.eclipse.org/sisu/")
10424 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10425 (description "Sisu is a modular JSR330-based container that supports
10426 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10427 Google-Guice to perform dependency injection and provide the core JSR330
10428 support, but removes the need to write explicit bindings in Guice modules.
10429 Integration with other containers via the Eclipse Extension Registry and the
10430 OSGi Service Registry is a goal of this project.")
10431 (license license:epl1.0)))
10432
10433 (define-public java-eclipse-sisu-plexus
10434 (package
10435 (name "java-eclipse-sisu-plexus")
10436 (version "0.3.3")
10437 (source (origin
10438 (method url-fetch)
10439 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10440 "archive/releases/" version ".tar.gz"))
10441 (sha256
10442 (base32
10443 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10444 (modules '((guix build utils)))
10445 (snippet
10446 '(begin
10447 (for-each delete-file (find-files "." ".*.jar"))
10448 (rename-file "org.eclipse.sisu.plexus.tests/src"
10449 "org.eclipse.sisu.plexus.tests/java")
10450 #t))))
10451 (build-system ant-build-system)
10452 (arguments
10453 `(#:jar-name "eclipse-sisu-plexus.jar"
10454 #:source-dir "org.eclipse.sisu.plexus/src"
10455 #:test-dir "org.eclipse.sisu.plexus.tests"
10456 #:test-exclude
10457 (list
10458 ;; This test fails probably because we can't generate the necessary
10459 ;; meta-inf files.
10460 "**/PlexusLoggingTest.*"
10461 ;; FIXME: This test fails because of some injection error
10462 "**/PlexusRequirementTest.*")
10463 #:jdk ,icedtea-8
10464 #:phases
10465 (modify-phases %standard-phases
10466 (add-before 'build 'copy-resources
10467 (lambda _
10468 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10469 "build/classes/META-INF/plexus")
10470 #t))
10471 (add-before 'check 'build-test-jar
10472 (lambda _
10473 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10474 (mkdir "build")
10475 (with-directory-excursion "java"
10476 (apply invoke "javac" "-cp"
10477 (string-append (getenv "CLASSPATH")
10478 ":../../../../../build/classes")
10479 (find-files "." ".*.java"))
10480 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10481 (find-files "." ".*.jar")))
10482 (mkdir-p "build/META-INF/plexus")
10483 (copy-file "resources/META-INF/plexus/components.xml"
10484 "build/META-INF/plexus/components.xml")
10485 (with-directory-excursion "build"
10486 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10487 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10488 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10489 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10490 (("resources/component-jar")
10491 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10492 #t)))))
10493 (inputs
10494 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10495 ("java-plexus-util" ,java-plexus-utils)
10496 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10497 ("java-osgi-framework" ,java-osgi-framework)
10498 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10499 ("java-guice" ,java-guice)
10500 ("java-javax-inject" ,java-javax-inject)
10501 ("java-slf4j-api" ,java-slf4j-api)
10502 ("java-junit" ,java-junit)))
10503 (native-inputs
10504 `(("java-guava" ,java-guava)
10505 ("java-aopalliance" ,java-aopalliance)
10506 ("java-cglib" ,java-cglib)
10507 ("java-asm" ,java-asm)))
10508 (home-page "https://www.eclipse.org/sisu/")
10509 (synopsis "Plexus support for the sisu container")
10510 (description "Sisu is a modular JSR330-based container that supports
10511 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10512 adds Plexus support to the Sisu-Inject container.")
10513 (license license:epl1.0)))
10514
10515 (define-public java-commons-compiler
10516 (package
10517 (name "java-commons-compiler")
10518 (version "3.0.8")
10519 (source (origin
10520 (method git-fetch)
10521 (uri (git-reference
10522 (url "https://github.com/janino-compiler/janino")
10523 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10524 (file-name (string-append name "-" version))
10525 (sha256
10526 (base32
10527 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10528 (modules '((guix build utils)))
10529 (snippet
10530 '(begin
10531 (for-each delete-file
10532 (find-files "." "\\.jar$"))
10533 #t))))
10534 (build-system ant-build-system)
10535 (arguments
10536 `(#:jar-name "commons-compiler.jar"
10537 #:source-dir "commons-compiler/src/main"
10538 #:tests? #f)); no tests
10539 (home-page "https://github.com/janino-compiler/janino")
10540 (synopsis "Java compiler")
10541 (description "Commons-compiler contains an API for janino, including the
10542 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10543 and @code{ISimpleCompiler} interfaces.")
10544 (license license:bsd-3)))
10545
10546 (define-public java-janino
10547 (package
10548 (inherit java-commons-compiler)
10549 (name "java-janino")
10550 (arguments
10551 `(#:jar-name "janino.jar"
10552 #:source-dir "src/main/java"
10553 #:phases
10554 (modify-phases %standard-phases
10555 (add-before 'configure 'chdir
10556 (lambda _
10557 (chdir "janino")
10558 #t)))))
10559 (inputs
10560 `(("java-commons-compiler" ,java-commons-compiler)))
10561 (native-inputs
10562 `(("java-junit" ,java-junit)
10563 ("java-hamcrest-core" ,java-hamcrest-core)))
10564 (description "Janino is a Java compiler. Janino can compile a set of
10565 source files to a set of class files like @code{javac}, but also compile a
10566 Java expression, block, class body or source file in memory, load the bytecode
10567 and execute it directly in the same JVM. @code{janino} can also be used for
10568 static code analysis or code manipulation.")))
10569
10570 (define-public java-logback-core
10571 (package
10572 (name "java-logback-core")
10573 (version "1.2.3")
10574 (source (origin
10575 (method url-fetch)
10576 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10577 version ".tar.gz"))
10578 (file-name (string-append name "-" version ".tar.gz"))
10579 (sha256
10580 (base32
10581 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10582 (modules '((guix build utils)))
10583 (snippet
10584 '(begin
10585 (delete-file-recursively "logback-access/lib")
10586 #t))))
10587 (build-system ant-build-system)
10588 (arguments
10589 `(#:jar-name "logback.jar"
10590 #:source-dir "src/main/java"
10591 #:test-dir "src/test"
10592 #:test-exclude
10593 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10594 ;; which creates FastClasses
10595 (list "**/AllCoreTest.*"
10596 "**/AutoFlushingObjectWriterTest.*"
10597 "**/PackageTest.*"
10598 "**/ResilientOutputStreamTest.*"
10599 ;; And we still don't want to run abstract classes
10600 "**/Abstract*.*")
10601 #:phases
10602 (modify-phases %standard-phases
10603 (add-before 'configure 'chdir
10604 (lambda _
10605 (chdir "logback-core")
10606 #t)))))
10607 (inputs
10608 `(("java-javax-mail" ,java-javax-mail)
10609 ("servlet" ,java-javaee-servletapi)
10610 ("java-commons-compiler" ,java-commons-compiler)
10611 ("java-janino" ,java-janino)))
10612 (native-inputs
10613 `(("java-junit" ,java-junit)
10614 ("java-hamcrest-core" ,java-hamcrest-core)
10615 ("java-mockito-1" ,java-mockito-1)
10616 ("java-cglib" ,java-cglib)
10617 ("java-asm" ,java-asm)
10618 ("java-objenesis" ,java-objenesis)
10619 ("java-joda-time" ,java-joda-time)))
10620 (home-page "https://logback.qos.ch")
10621 (synopsis "Logging for java")
10622 (description "Logback is intended as a successor to the popular log4j project.
10623 This module lays the groundwork for the other two modules.")
10624 ;; Either epl1.0 or lgpl2.1
10625 (license (list license:epl1.0
10626 license:lgpl2.1))))
10627
10628 (define-public java-logback-classic
10629 (package
10630 (inherit java-logback-core)
10631 (name "java-logback-classic")
10632 (arguments
10633 `(#:jar-name "logback-classic.jar"
10634 #:source-dir "src/main/java"
10635 #:test-dir "src/test"
10636 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10637 #:jdk ,icedtea-8
10638 #:phases
10639 (modify-phases %standard-phases
10640 (add-before 'configure 'chdir
10641 (lambda _
10642 (chdir "logback-classic")
10643 #t))
10644 (replace 'build
10645 (lambda* (#:key inputs #:allow-other-keys)
10646 (mkdir-p "build/classes")
10647 (setenv "CLASSPATH"
10648 (string-join
10649 (apply append (map (lambda (input)
10650 (find-files (assoc-ref inputs input)
10651 ".*.jar"))
10652 '("java-logback-core" "java-slf4j-api"
10653 "java-commons-compiler" "servlet"
10654 "groovy")))
10655 ":"))
10656 (apply invoke "groovyc" "-d" "build/classes" "-j"
10657 (find-files "src/main/" ".*\\.(groovy|java)$"))
10658 (invoke "ant" "jar")
10659 #t)))))
10660 (inputs
10661 `(("java-logback-core" ,java-logback-core)
10662 ("java-slf4j-api" ,java-slf4j-api)
10663 ,@(package-inputs java-logback-core)))
10664 (native-inputs
10665 `(("groovy" ,groovy)))
10666 (description "Logback is intended as a successor to the popular log4j project.
10667 This module can be assimilated to a significantly improved version of log4j.
10668 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10669 can readily switch back and forth between logback and other logging frameworks
10670 such as log4j or @code{java.util.logging} (JUL).")))
10671
10672 (define-public java-qdox
10673 (package
10674 (name "java-qdox")
10675 ; Newer version exists, but this version is required by java-plexus-component-metadata
10676 (version "2.0-M2")
10677 (source (origin
10678 (method url-fetch)
10679 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10680 ;; Older releases at https://github.com/codehaus/qdox/
10681 ;; Note: The release at maven is pre-generated. The release at
10682 ;; github requires jflex.
10683 (uri (string-append "http://central.maven.org/maven2/"
10684 "com/thoughtworks/qdox/qdox/" version
10685 "/qdox-" version "-sources.jar"))
10686 (sha256
10687 (base32
10688 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10689 (build-system ant-build-system)
10690 (arguments
10691 `(#:jar-name "qdox.jar"
10692 #:tests? #f)); no tests
10693 (home-page "http://qdox.codehaus.org/")
10694 (synopsis "Parse definitions from Java source files")
10695 (description "QDox is a high speed, small footprint parser for extracting
10696 class/interface/method definitions from source files complete with JavaDoc
10697 @code{@@tags}. It is designed to be used by active code generators or
10698 documentation tools.")
10699 (license license:asl2.0)))