projects/guix·blob version-0.15.0 · refs

10310 lines · 433.2 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016 Leo Famulari <[email protected]>
4;;; Copyright © 2016, 2017 Roel Janssen <[email protected]>
5;;; Copyright © 2017 Carlo Zancanaro <[email protected]>
6;;; Copyright © 2017, 2018 Julien Lepiller <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]>
9;;; Copyright © 2017 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018 Gábor Boskovits <[email protected]>
11;;; Copyright © 2018 Chris Marusich <[email protected]>
12;;;
13;;; This file is part of GNU Guix.
14;;;
15;;; GNU Guix is free software; you can redistribute it and/or modify it
16;;; under the terms of the GNU General Public License as published by
17;;; the Free Software Foundation; either version 3 of the License, or (at
18;;; your option) any later version.
19;;;
20;;; GNU Guix is distributed in the hope that it will be useful, but
21;;; WITHOUT ANY WARRANTY; without even the implied warranty of
22;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23;;; GNU General Public License for more details.
24;;;
25;;; You should have received a copy of the GNU General Public License
26;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
27
28(define-module (gnu packages java)
29 #:use-module ((guix licenses) #:prefix license:)
30 #:use-module (guix packages)
31 #:use-module (guix download)
32 #:use-module (guix hg-download)
33 #:use-module (guix git-download)
34 #:use-module (guix svn-download)
35 #:use-module (guix utils)
36 #:use-module (guix build-system ant)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system trivial)
39 #:use-module (gnu packages)
40 #:use-module (gnu packages attr)
41 #:use-module (gnu packages autotools)
42 #:use-module (gnu packages base)
43 #:use-module (gnu packages bash)
44 #:use-module (gnu packages certs)
45 #:use-module (gnu packages cpio)
46 #:use-module (gnu packages cups)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages fontutils)
49 #:use-module (gnu packages gawk)
50 #:use-module (gnu packages gettext)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages gl)
53 #:use-module (gnu packages gnuzilla) ;nss
54 #:use-module (gnu packages ghostscript) ;lcms
55 #:use-module (gnu packages gnome)
56 #:use-module (gnu packages groovy)
57 #:use-module (gnu packages gtk)
58 #:use-module (gnu packages guile)
59 #:use-module (gnu packages icu4c)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages libffi)
62 #:use-module (gnu packages linux) ;alsa
63 #:use-module (gnu packages maths)
64 #:use-module (gnu packages onc-rpc)
65 #:use-module (gnu packages web)
66 #:use-module (gnu packages wget)
67 #:use-module (gnu packages pkg-config)
68 #:use-module (gnu packages perl)
69 #:use-module (gnu packages popt)
70 #:use-module (gnu packages kerberos)
71 #:use-module (gnu packages xml)
72 #:use-module (gnu packages xorg)
73 #:use-module (gnu packages texinfo)
74 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
75 #:use-module (srfi srfi-11)
76 #:use-module (ice-9 match))
77
78
79;;;
80;;; Java bootstrap toolchain.
81;;;
82
83;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
84;; use it to build a simple version of GNU Classpath, the Java standard
85;; library. We chose version 0.93 because it is the last version that can be
86;; built with Jikes. With Jikes and this version of GNU Classpath we can
87;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
88;; the last version of JamVM that works with a version of GNU classpath that
89;; does not require ECJ. These three packages make up the bootstrap JDK.
90
91;; This is sufficient to build an older version of Ant, which is needed to
92;; build an older version of ECJ, an incremental Java compiler, both of which
93;; are written in Java.
94;;
95;; ECJ is needed to build the latest release (0.99) and the development
96;; version of GNU Classpath. The development version of GNU Classpath has
97;; much more support for Java 1.6 than the latest release, but we need to
98;; build 0.99 first to get a working version of javah. ECJ, the development
99;; version of GNU Classpath, and the latest version of JamVM make up the
100;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
101;; build framework. We then build the more recent JDKs Icedtea 2.x and
102;; Icedtea 3.x.
103
104(define jikes
105 (package
106 (name "jikes")
107 (version "1.22")
108 (source (origin
109 (method url-fetch)
110 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
111 version "/jikes-" version ".tar.bz2"))
112 (sha256
113 (base32
114 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
115 (build-system gnu-build-system)
116 (home-page "http://jikes.sourceforge.net/")
117 (synopsis "Compiler for the Java language")
118 (description "Jikes is a compiler that translates Java source files as
119defined in The Java Language Specification into the bytecoded instruction set
120and binary format defined in The Java Virtual Machine Specification.")
121 (license license:ibmpl1.0)))
122
123;; This is the last version of GNU Classpath that can be built without ECJ.
124(define classpath-bootstrap
125 (package
126 (name "classpath")
127 (version "0.93")
128 (source (origin
129 (method url-fetch)
130 (uri (string-append "mirror://gnu/classpath/classpath-"
131 version ".tar.gz"))
132 (sha256
133 (base32
134 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
135 (patches (search-patches "classpath-aarch64-support.patch"))))
136 (build-system gnu-build-system)
137 (arguments
138 `(#:configure-flags
139 (list (string-append "JAVAC="
140 (assoc-ref %build-inputs "jikes")
141 "/bin/jikes")
142 "--disable-Werror"
143 "--disable-gmp"
144 "--disable-gtk-peer"
145 "--disable-gconf-peer"
146 "--disable-plugin"
147 "--disable-dssi"
148 "--disable-alsa"
149 "--disable-gjdoc")
150 #:phases
151 (modify-phases %standard-phases
152 (add-after 'install 'install-data
153 (lambda _ (zero? (system* "make" "install-data")))))))
154 (native-inputs
155 `(("jikes" ,jikes)
156 ("fastjar" ,fastjar)
157 ("libltdl" ,libltdl)
158 ("pkg-config" ,pkg-config)))
159 (home-page "https://www.gnu.org/software/classpath/")
160 (synopsis "Essential libraries for Java")
161 (description "GNU Classpath is a project to create core class libraries
162for use with runtimes, compilers and tools for the Java programming
163language.")
164 ;; GPLv2 or later, with special linking exception.
165 (license license:gpl2+)))
166
167;; This is the last version of JamVM that works with a version of GNU
168;; classpath that does not require ECJ.
169(define jamvm-1-bootstrap
170 (package
171 (name "jamvm")
172 (version "1.5.1")
173 (source (origin
174 (method url-fetch)
175 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
176 "JamVM%20" version "/jamvm-"
177 version ".tar.gz"))
178 (sha256
179 (base32
180 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
181 (build-system gnu-build-system)
182 (arguments
183 `(#:configure-flags
184 (list (string-append "--with-classpath-install-dir="
185 (assoc-ref %build-inputs "classpath")))))
186 (inputs
187 `(("classpath" ,classpath-bootstrap)
188 ("jikes" ,jikes)
189 ("zlib" ,zlib)))
190 (home-page "http://jamvm.sourceforge.net/")
191 (synopsis "Small Java Virtual Machine")
192 (description "JamVM is a Java Virtual Machine conforming to the JVM
193specification edition 2 (blue book). It is extremely small. However, unlike
194other small VMs it supports the full spec, including object finalisation and
195JNI.")
196 (license license:gpl2+)))
197
198(define ant-bootstrap
199 (package
200 (name "ant-bootstrap")
201 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
202 ;; are not supported. The 1.8.x series is the last to use only features
203 ;; supported by Jikes.
204 (version "1.8.4")
205 (source (origin
206 (method url-fetch)
207 (uri (string-append "http://archive.apache.org/dist/"
208 "ant/source/apache-ant-"
209 version "-src.tar.bz2"))
210 (sha256
211 (base32
212 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
213 (build-system gnu-build-system)
214 (arguments
215 `(#:tests? #f ; no "check" target
216 #:phases
217 (modify-phases %standard-phases
218 (delete 'bootstrap)
219 (delete 'configure)
220 (replace 'build
221 (lambda* (#:key inputs #:allow-other-keys)
222 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
223 (setenv "JAVACMD"
224 (string-append (assoc-ref inputs "jamvm")
225 "/bin/jamvm"))
226 (setenv "JAVAC"
227 (string-append (assoc-ref inputs "jikes")
228 "/bin/jikes"))
229 (setenv "CLASSPATH"
230 (string-append (assoc-ref inputs "jamvm")
231 "/lib/rt.jar"))
232
233 ;; Ant complains if this file doesn't exist.
234 (setenv "HOME" "/tmp")
235 (with-output-to-file "/tmp/.ant.properties"
236 (lambda _ (display "")))
237
238 ;; Use jikes instead of javac for <javac ...> tags in build.xml
239 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
240
241 ;; jikes produces lots of warnings, but they are not very
242 ;; interesting, so we silence them.
243 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
244
245 ;; Without these JamVM options the build may freeze.
246 (substitute* "bootstrap.sh"
247 (("^\"\\$\\{JAVACMD\\}\" " m)
248 (string-append m "-Xnocompact -Xnoinlining ")))
249
250 ;; Disable tests because we are bootstrapping and thus don't have
251 ;; any of the dependencies required to build and run the tests.
252 (substitute* "build.xml"
253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
254 (zero? (system* "bash" "bootstrap.sh"
255 (string-append "-Ddist.dir="
256 (assoc-ref %outputs "out"))))))
257 (delete 'install))))
258 (native-inputs
259 `(("jikes" ,jikes)
260 ("jamvm" ,jamvm-1-bootstrap)))
261 (home-page "http://ant.apache.org")
262 (synopsis "Build tool for Java")
263 (description
264 "Ant is a platform-independent build tool for Java. It is similar to
265make but is implemented using the Java language, requires the Java platform,
266and is best suited to building Java projects. Ant uses XML to describe the
267build process and its dependencies, whereas Make uses Makefile format.")
268 (license license:asl2.0)))
269
270;; Version 3.2.2 is the last version without a dependency on a full-fledged
271;; compiler for Java 1.5.
272(define ecj-bootstrap
273 (package
274 (name "ecj-bootstrap")
275 (version "3.2.2")
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "http://archive.eclipse.org/eclipse/"
279 "downloads/drops/R-" version
280 "-200702121330/ecjsrc.zip"))
281 (sha256
282 (base32
283 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
284 ;; It would be so much easier if we could use the ant-build-system, but we
285 ;; cannot as we don't have ant at this point. We use ecj for
286 ;; bootstrapping the JDK.
287 (build-system gnu-build-system)
288 (arguments
289 `(#:modules ((guix build gnu-build-system)
290 (guix build utils)
291 (srfi srfi-1))
292 #:tests? #f ; there are no tests
293 #:phases
294 (modify-phases %standard-phases
295 (replace 'configure
296 (lambda* (#:key inputs #:allow-other-keys)
297 (setenv "CLASSPATH"
298 (string-join
299 (cons (string-append (assoc-ref inputs "jamvm")
300 "/lib/rt.jar")
301 (find-files (string-append
302 (assoc-ref inputs "ant-bootstrap")
303 "/lib")
304 "\\.jar$"))
305 ":"))
306 #t))
307 (replace 'build
308 (lambda* (#:key inputs #:allow-other-keys)
309 ;; The unpack phase enters the "org" directory by mistake.
310 (chdir "..")
311
312 ;; Create a simple manifest to make ecj executable.
313 (with-output-to-file "manifest"
314 (lambda _
315 (display "Manifest-Version: 1.0
316Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
317
318 ;; Compile it all!
319 (and (zero? (apply system* "jikes"
320 (find-files "." "\\.java$")))
321 (zero? (system* "fastjar" "cvfm"
322 "ecj-bootstrap.jar" "manifest" ".")))))
323 (replace 'install
324 (lambda* (#:key outputs #:allow-other-keys)
325 (let ((share (string-append (assoc-ref outputs "out")
326 "/share/java/")))
327 (mkdir-p share)
328 (install-file "ecj-bootstrap.jar" share)
329 #t))))))
330 (native-inputs
331 `(("ant-bootstrap" ,ant-bootstrap)
332 ("unzip" ,unzip)
333 ("jikes" ,jikes)
334 ("jamvm" ,jamvm-1-bootstrap)
335 ("fastjar" ,fastjar)))
336 (home-page "https://eclipse.org")
337 (synopsis "Eclipse Java development tools core batch compiler")
338 (description "This package provides the Eclipse Java core batch compiler
339for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
340requirement for all GNU Classpath releases after version 0.93.")
341 (license license:epl1.0)))
342
343(define ecj-javac-wrapper
344 (package (inherit ecj-bootstrap)
345 (name "ecj-javac-wrapper")
346 (source #f)
347 (build-system trivial-build-system)
348 (arguments
349 `(#:modules ((guix build utils))
350 #:builder
351 (begin
352 (use-modules (guix build utils))
353 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
354 (target (string-append bin "/javac"))
355 (guile (string-append (assoc-ref %build-inputs "guile")
356 "/bin/guile"))
357 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
358 "/share/java/ecj-bootstrap.jar"))
359 (java (string-append (assoc-ref %build-inputs "jamvm")
360 "/bin/jamvm"))
361 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
362 "/share/classpath")))
363 (string-append jvmlib "/glibj.zip:"
364 jvmlib "/tools.zip"))))
365 (mkdir-p bin)
366 (with-output-to-file target
367 (lambda _
368 (format #t "#!~a --no-auto-compile\n!#\n" guile)
369 (write
370 `(begin (use-modules (ice-9 match)
371 (ice-9 receive)
372 (ice-9 hash-table)
373 (srfi srfi-1)
374 (srfi srfi-26))
375 (define defaults
376 '(("-bootclasspath" ,bootcp)
377 ("-source" "1.5")
378 ("-target" "1.5")
379 ("-cp" ".")))
380 (define (main args)
381 (let ((classpath (getenv "CLASSPATH")))
382 (setenv "CLASSPATH"
383 (string-join (list ,ecj
384 ,(string-append (assoc-ref %build-inputs "jamvm")
385 "/lib/rt.jar")
386 (or classpath ""))
387 ":")))
388 (receive (vm-args other-args)
389 ;; Separate VM arguments from arguments to ECJ.
390 (partition (cut string-prefix? "-J" <>)
391 (fold (lambda (default acc)
392 (if (member (first default) acc)
393 acc (append default acc)))
394 args defaults))
395 (apply system* ,java
396 (append
397 (list "-Xnocompact" "-Xnoinlining")
398 ;; Remove "-J" prefix
399 (map (cut string-drop <> 2) vm-args)
400 '("org.eclipse.jdt.internal.compiler.batch.Main")
401 (cons "-nowarn" other-args)))))
402 ;; Entry point
403 (let ((args (cdr (command-line))))
404 (if (null? args)
405 (format (current-error-port) "javac: no arguments given!\n")
406 (main args)))))))
407 (chmod target #o755)
408 #t))))
409 (native-inputs
410 `(("guile" ,guile-2.2)
411 ("ecj-bootstrap" ,ecj-bootstrap)
412 ("jamvm" ,jamvm-1-bootstrap)
413 ("classpath" ,classpath-bootstrap)))
414 (description "This package provides a wrapper around the @dfn{Eclipse
415compiler for Java} (ecj) with a command line interface that is compatible with
416the standard javac executable.")))
417
418;; The classpath-bootstrap was built without a virtual machine, so it does not
419;; provide a wrapper for javah. We cannot build the development version of
420;; Classpath without javah.
421(define classpath-0.99
422 (package (inherit classpath-bootstrap)
423 (version "0.99")
424 (source (origin
425 (method url-fetch)
426 (uri (string-append "mirror://gnu/classpath/classpath-"
427 version ".tar.gz"))
428 (sha256
429 (base32
430 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
431 (patches (search-patches "classpath-aarch64-support.patch"))))
432 (arguments
433 `(#:configure-flags
434 (list (string-append "--with-ecj-jar="
435 (assoc-ref %build-inputs "ecj-bootstrap")
436 "/share/java/ecj-bootstrap.jar")
437 (string-append "JAVAC="
438 (assoc-ref %build-inputs "ecj-javac-wrapper")
439 "/bin/javac")
440 (string-append "JAVA="
441 (assoc-ref %build-inputs "jamvm")
442 "/bin/jamvm")
443 "GCJ_JAVAC_TRUE=no"
444 "ac_cv_prog_java_works=yes" ; trust me
445 "--disable-Werror"
446 "--disable-gmp"
447 "--disable-gtk-peer"
448 "--disable-gconf-peer"
449 "--disable-plugin"
450 "--disable-dssi"
451 "--disable-alsa"
452 "--disable-gjdoc")
453 #:phases
454 (modify-phases %standard-phases
455 (add-after 'install 'install-data
456 (lambda _ (zero? (system* "make" "install-data")))))))
457 (native-inputs
458 `(("ecj-bootstrap" ,ecj-bootstrap)
459 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
460 ("fastjar" ,fastjar)
461 ("jamvm" ,jamvm-1-bootstrap)
462 ("classpath" ,classpath-bootstrap)
463 ("libltdl" ,libltdl)
464 ("pkg-config" ,pkg-config)))))
465
466;; We need this because classpath-bootstrap does not provide all of the tools
467;; we need to build classpath-devel.
468(define classpath-jamvm-wrappers
469 (package (inherit classpath-0.99)
470 (name "classpath-jamvm-wrappers")
471 (source #f)
472 (build-system trivial-build-system)
473 (arguments
474 `(#:modules ((guix build utils))
475 #:builder
476 (begin
477 (use-modules (guix build utils))
478 (let* ((bash (assoc-ref %build-inputs "bash"))
479 (jamvm (assoc-ref %build-inputs "jamvm"))
480 (classpath (assoc-ref %build-inputs "classpath"))
481 (bin (string-append (assoc-ref %outputs "out")
482 "/bin/")))
483 (mkdir-p bin)
484 (for-each (lambda (tool)
485 (with-output-to-file (string-append bin tool)
486 (lambda _
487 (format #t "#!~a/bin/sh
488~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
489gnu.classpath.tools.~a.~a $@"
490 bash jamvm classpath tool
491 (if (string=? "native2ascii" tool)
492 "Native2ASCII" "Main"))))
493 (chmod (string-append bin tool) #o755))
494 (list "javah"
495 "rmic"
496 "rmid"
497 "orbd"
498 "rmiregistry"
499 "native2ascii"))
500 #t))))
501 (native-inputs
502 `(("bash" ,bash)
503 ("jamvm" ,jamvm-1-bootstrap)
504 ("classpath" ,classpath-0.99)))
505 (inputs '())
506 (synopsis "Executables from GNU Classpath")
507 (description "This package provides wrappers around the tools provided by
508the GNU Classpath library. They are executed by the JamVM virtual
509machine.")))
510
511;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
512;; then Classpath has gained much more support for Java 1.6.
513(define-public classpath-devel
514 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
515 (revision "1"))
516 (package (inherit classpath-bootstrap)
517 (version (string-append "0.99-" revision "." (string-take commit 9)))
518 (source (origin
519 (method git-fetch)
520 (uri (git-reference
521 (url "https://git.savannah.gnu.org/git/classpath.git")
522 (commit commit)))
523 (file-name (string-append "classpath-" version "-checkout"))
524 (sha256
525 (base32
526 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
527 (arguments
528 `(#:make-flags
529 ;; Ensure that the initial heap size is smaller than the maximum
530 ;; size. By default only Xmx is set, which can lead to invalid
531 ;; memory settings on some machines with a lot of memory.
532 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
533 #:configure-flags
534 (list (string-append "--with-ecj-jar="
535 (assoc-ref %build-inputs "ecj-bootstrap")
536 "/share/java/ecj-bootstrap.jar")
537 (string-append "--with-javac="
538 (assoc-ref %build-inputs "ecj-javac-wrapper")
539 "/bin/javac")
540 (string-append "JAVA="
541 (assoc-ref %build-inputs "jamvm")
542 "/bin/jamvm")
543 "GCJ_JAVAC_TRUE=no"
544 "ac_cv_prog_java_works=yes" ; trust me
545 "--disable-Werror"
546 "--disable-gmp"
547 "--disable-gtk-peer"
548 "--disable-gconf-peer"
549 "--disable-plugin"
550 "--disable-dssi"
551 "--disable-alsa"
552 "--disable-gjdoc")
553 #:phases
554 (modify-phases %standard-phases
555 ;; XXX The bootstrap phase executes autogen.sh, which fails after
556 ;; complaining about the lack of gettext.
557 (replace 'bootstrap
558 (lambda _ (invoke "autoreconf" "-vif")))
559 (add-after 'unpack 'remove-unsupported-annotations
560 (lambda _
561 (substitute* (find-files "java" "\\.java$")
562 (("@Override") ""))
563 #t))
564 (add-after 'install 'install-data
565 (lambda _ (zero? (system* "make" "install-data")))))))
566 (native-inputs
567 `(("autoconf" ,autoconf)
568 ("automake" ,automake)
569 ("libtool" ,libtool)
570 ("gettext" ,gettext-minimal)
571 ("texinfo" ,texinfo)
572 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
573 ("ecj-bootstrap" ,ecj-bootstrap)
574 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
575 ("fastjar" ,fastjar)
576 ("jamvm" ,jamvm-1-bootstrap)
577 ("libltdl" ,libltdl)
578 ("pkg-config" ,pkg-config))))))
579
580(define jamvm
581 (package (inherit jamvm-1-bootstrap)
582 (version "2.0.0")
583 (source (origin
584 (method url-fetch)
585 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
586 "JamVM%20" version "/jamvm-"
587 version ".tar.gz"))
588 (sha256
589 (base32
590 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
591 (build-system gnu-build-system)
592 (arguments
593 `(#:configure-flags
594 (list (string-append "--with-classpath-install-dir="
595 (assoc-ref %build-inputs "classpath")))))
596 (inputs
597 `(("classpath" ,classpath-devel)
598 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
599 ("zlib" ,zlib)))))
600
601(define ecj-javac-wrapper-final
602 (package (inherit ecj-javac-wrapper)
603 (native-inputs
604 `(("guile" ,guile-2.2)
605 ("ecj-bootstrap" ,ecj-bootstrap)
606 ("jamvm" ,jamvm)
607 ("classpath" ,classpath-devel)))))
608
609;; The bootstrap JDK consisting of jamvm, classpath-devel,
610;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
611;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
612;; which uses Java 6 only.
613(define-public icedtea-6
614 (package
615 (name "icedtea")
616 (version "1.13.13")
617 (source (origin
618 (method url-fetch)
619 (uri (string-append
620 "http://icedtea.wildebeest.org/download/source/icedtea6-"
621 version ".tar.xz"))
622 (sha256
623 (base32
624 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
625 (modules '((guix build utils)))
626 (snippet
627 '(begin
628 (substitute* "Makefile.in"
629 ;; do not leak information about the build host
630 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
631 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
632 #t))))
633 (build-system gnu-build-system)
634 (outputs '("out" ; Java Runtime Environment
635 "jdk" ; Java Development Kit
636 "doc")) ; all documentation
637 (arguments
638 `(;; There are many failing tests and many are known to fail upstream.
639 #:tests? #f
640
641 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
642 ;; gremlin) doesn't support it yet, so skip this phase.
643 #:validate-runpath? #f
644
645 #:modules ((guix build utils)
646 (guix build gnu-build-system)
647 (srfi srfi-19))
648
649 #:configure-flags
650 `("--enable-bootstrap"
651 "--enable-nss"
652 "--without-rhino"
653 "--with-parallel-jobs"
654 "--disable-downloading"
655 "--disable-tests"
656 ,(string-append "--with-ecj="
657 (assoc-ref %build-inputs "ecj")
658 "/share/java/ecj-bootstrap.jar")
659 ,(string-append "--with-jar="
660 (assoc-ref %build-inputs "fastjar")
661 "/bin/fastjar")
662 ,(string-append "--with-jdk-home="
663 (assoc-ref %build-inputs "classpath"))
664 ,(string-append "--with-java="
665 (assoc-ref %build-inputs "jamvm")
666 "/bin/jamvm"))
667 #:phases
668 (modify-phases %standard-phases
669 (replace 'unpack
670 (lambda* (#:key source inputs #:allow-other-keys)
671 (and (zero? (system* "tar" "xvf" source))
672 (begin
673 (chdir (string-append "icedtea6-" ,version))
674 (mkdir "openjdk")
675 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
676 ;; The convenient OpenJDK source bundle is no longer
677 ;; available for download, so we have to take the sources
678 ;; from the Mercurial repositories and change the Makefile
679 ;; to avoid tests for the OpenJDK zip archive.
680 (with-directory-excursion "openjdk"
681 (for-each (lambda (part)
682 (mkdir part)
683 (copy-recursively
684 (assoc-ref inputs
685 (string-append part "-src"))
686 part))
687 '("jdk" "corba"
688 "langtools" "jaxp" "jaxws")))
689 (with-directory-excursion "openjdk"
690 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
691 (rename-file "hg-checkout" "hotspot"))
692 (substitute* "Makefile.in"
693 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
694 "echo \"trust me\";")
695 ;; The contents of the bootstrap directory must be
696 ;; writeable but when copying from the store they are
697 ;; not.
698 (("mkdir -p lib/rt" line)
699 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
700 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
701 #t))))
702 (add-after 'unpack 'use-classpath
703 (lambda* (#:key inputs #:allow-other-keys)
704 (let ((jvmlib (assoc-ref inputs "classpath"))
705 (jamvm (assoc-ref inputs "jamvm")))
706 ;; Classpath does not provide rt.jar.
707 (substitute* "Makefile.in"
708 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
709 (string-append jvmlib "/share/classpath/glibj.zip")))
710 ;; Make sure we can find all classes.
711 (setenv "CLASSPATH"
712 (string-append jvmlib "/share/classpath/glibj.zip:"
713 jvmlib "/share/classpath/tools.zip:"
714 jamvm "/lib/rt.jar"))
715 (setenv "JAVACFLAGS"
716 (string-append "-cp "
717 jvmlib "/share/classpath/glibj.zip:"
718 jvmlib "/share/classpath/tools.zip")))
719 #t))
720 (add-after 'unpack 'patch-patches
721 (lambda _
722 ;; shebang in patches so that they apply cleanly
723 (substitute* '("patches/jtreg-jrunscript.patch"
724 "patches/hotspot/hs23/drop_unlicensed_test.patch")
725 (("#!/bin/sh") (string-append "#!" (which "sh"))))
726 #t))
727 (add-after 'unpack 'patch-paths
728 (lambda* (#:key inputs #:allow-other-keys)
729 ;; buildtree.make generates shell scripts, so we need to replace
730 ;; the generated shebang
731 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
732 (("/bin/sh") (which "bash")))
733
734 (let ((corebin (string-append
735 (assoc-ref inputs "coreutils") "/bin/"))
736 (binbin (string-append
737 (assoc-ref inputs "binutils") "/bin/"))
738 (grepbin (string-append
739 (assoc-ref inputs "grep") "/bin/")))
740 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
741 "openjdk/corba/make/common/shared/Defs-linux.gmk")
742 (("UNIXCOMMAND_PATH = /bin/")
743 (string-append "UNIXCOMMAND_PATH = " corebin))
744 (("USRBIN_PATH = /usr/bin/")
745 (string-append "USRBIN_PATH = " corebin))
746 (("DEVTOOLS_PATH *= */usr/bin/")
747 (string-append "DEVTOOLS_PATH = " corebin))
748 (("COMPILER_PATH *= */usr/bin/")
749 (string-append "COMPILER_PATH = "
750 (assoc-ref inputs "gcc") "/bin/"))
751 (("DEF_OBJCOPY *=.*objcopy")
752 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
753
754 ;; fix path to alsa header
755 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
756 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
757 (string-append "ALSA_INCLUDE="
758 (assoc-ref inputs "alsa-lib")
759 "/include/alsa/version.h")))
760
761 ;; fix hard-coded utility paths
762 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
763 "openjdk/corba/make/common/shared/Defs-utils.gmk")
764 (("ECHO *=.*echo")
765 (string-append "ECHO = " (which "echo")))
766 (("^GREP *=.*grep")
767 (string-append "GREP = " (which "grep")))
768 (("EGREP *=.*egrep")
769 (string-append "EGREP = " (which "egrep")))
770 (("CPIO *=.*cpio")
771 (string-append "CPIO = " (which "cpio")))
772 (("READELF *=.*readelf")
773 (string-append "READELF = " (which "readelf")))
774 (("^ *AR *=.*ar")
775 (string-append "AR = " (which "ar")))
776 (("^ *TAR *=.*tar")
777 (string-append "TAR = " (which "tar")))
778 (("AS *=.*as")
779 (string-append "AS = " (which "as")))
780 (("LD *=.*ld")
781 (string-append "LD = " (which "ld")))
782 (("STRIP *=.*strip")
783 (string-append "STRIP = " (which "strip")))
784 (("NM *=.*nm")
785 (string-append "NM = " (which "nm")))
786 (("^SH *=.*sh")
787 (string-append "SH = " (which "bash")))
788 (("^FIND *=.*find")
789 (string-append "FIND = " (which "find")))
790 (("LDD *=.*ldd")
791 (string-append "LDD = " (which "ldd")))
792 (("NAWK *=.*(n|g)awk")
793 (string-append "NAWK = " (which "gawk")))
794 (("XARGS *=.*xargs")
795 (string-append "XARGS = " (which "xargs")))
796 (("UNZIP *=.*unzip")
797 (string-append "UNZIP = " (which "unzip")))
798 (("ZIPEXE *=.*zip")
799 (string-append "ZIPEXE = " (which "zip")))
800 (("SED *=.*sed")
801 (string-append "SED = " (which "sed"))))
802
803 ;; Some of these timestamps cause problems as they are more than
804 ;; 10 years ago, failing the build process.
805 (substitute*
806 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
807 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
808 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
809 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
810 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
811 #t)))
812 (add-before 'configure 'set-additional-paths
813 (lambda* (#:key inputs #:allow-other-keys)
814 (setenv "CPATH"
815 (string-append (assoc-ref inputs "libxrender")
816 "/include/X11/extensions" ":"
817 (assoc-ref inputs "libxtst")
818 "/include/X11/extensions" ":"
819 (assoc-ref inputs "libxinerama")
820 "/include/X11/extensions" ":"
821 (or (getenv "CPATH") "")))
822 (setenv "ALT_CUPS_HEADERS_PATH"
823 (string-append (assoc-ref inputs "cups")
824 "/include"))
825 (setenv "ALT_FREETYPE_HEADERS_PATH"
826 (string-append (assoc-ref inputs "freetype")
827 "/include"))
828 (setenv "ALT_FREETYPE_LIB_PATH"
829 (string-append (assoc-ref inputs "freetype")
830 "/lib"))
831 #t))
832 (replace 'install
833 (lambda* (#:key outputs #:allow-other-keys)
834 (let ((doc (string-append (assoc-ref outputs "doc")
835 "/share/doc/icedtea"))
836 (jre (assoc-ref outputs "out"))
837 (jdk (assoc-ref outputs "jdk")))
838 (copy-recursively "openjdk.build/docs" doc)
839 (copy-recursively "openjdk.build/j2re-image" jre)
840 (copy-recursively "openjdk.build/j2sdk-image" jdk))
841 #t)))))
842 (native-inputs
843 `(("ant" ,ant-bootstrap)
844 ("alsa-lib" ,alsa-lib)
845 ("attr" ,attr)
846 ("classpath" ,classpath-devel)
847 ("coreutils" ,coreutils)
848 ("cpio" ,cpio)
849 ("cups" ,cups)
850 ("ecj" ,ecj-bootstrap)
851 ("ecj-javac" ,ecj-javac-wrapper-final)
852 ("fastjar" ,fastjar)
853 ("fontconfig" ,fontconfig)
854 ("freetype" ,freetype)
855 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
856 ("gtk" ,gtk+-2)
857 ("gawk" ,gawk)
858 ("giflib" ,giflib)
859 ("grep" ,grep)
860 ("jamvm" ,jamvm)
861 ("lcms" ,lcms)
862 ("libjpeg" ,libjpeg)
863 ("libnsl" ,libnsl)
864 ("libpng" ,libpng)
865 ("libtool" ,libtool)
866 ("libx11" ,libx11)
867 ("libxcomposite" ,libxcomposite)
868 ("libxi" ,libxi)
869 ("libxinerama" ,libxinerama)
870 ("libxrender" ,libxrender)
871 ("libxslt" ,libxslt) ;for xsltproc
872 ("libxt" ,libxt)
873 ("libxtst" ,libxtst)
874 ("mit-krb5" ,mit-krb5)
875 ("nss" ,nss)
876 ("nss-certs" ,nss-certs)
877 ("perl" ,perl)
878 ("pkg-config" ,pkg-config)
879 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
880 ("unzip" ,unzip)
881 ("wget" ,wget)
882 ("which" ,which)
883 ("zip" ,zip)
884 ("zlib" ,zlib)
885 ("openjdk-src"
886 ,(origin
887 (method hg-fetch)
888 (uri (hg-reference
889 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
890 (changeset "jdk6-b41")))
891 (sha256
892 (base32
893 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
894 ("jdk-src"
895 ,(origin
896 (method hg-fetch)
897 (uri (hg-reference
898 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
899 (changeset "jdk6-b41")))
900 (sha256
901 (base32
902 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
903 ("hotspot-src"
904 ,(origin
905 (method hg-fetch)
906 (uri (hg-reference
907 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
908 (changeset "jdk6-b41")))
909 (sha256
910 (base32
911 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
912 (patches
913 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
914 ("corba-src"
915 ,(origin
916 (method hg-fetch)
917 (uri (hg-reference
918 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
919 (changeset "jdk6-b41")))
920 (sha256
921 (base32
922 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
923 ("langtools-src"
924 ,(origin
925 (method hg-fetch)
926 (uri (hg-reference
927 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
928 (changeset "jdk6-b41")))
929 (sha256
930 (base32
931 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
932 ("jaxp-src"
933 ,(origin
934 (method hg-fetch)
935 (uri (hg-reference
936 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
937 (changeset "jdk6-b41")))
938 (sha256
939 (base32
940 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
941 ("jaxws-src"
942 ,(origin
943 (method hg-fetch)
944 (uri (hg-reference
945 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
946 (changeset "jdk6-b41")))
947 (sha256
948 (base32
949 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
950 (home-page "http://icedtea.classpath.org")
951 (synopsis "Java development kit")
952 (description
953 "This package provides the OpenJDK built with the IcedTea build harness.
954This version of the OpenJDK is no longer maintained and is only used for
955bootstrapping purposes.")
956 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
957 ;; same license as both GNU Classpath and OpenJDK.
958 (license license:gpl2+)))
959
960(define-public icedtea-7
961 (let* ((version "2.6.13")
962 (drop (lambda (name hash)
963 (origin
964 (method url-fetch)
965 (uri (string-append
966 "http://icedtea.classpath.org/download/drops"
967 "/icedtea7/" version "/" name ".tar.bz2"))
968 (sha256 (base32 hash))))))
969 (package
970 (name "icedtea")
971 (version version)
972 (source (origin
973 (method url-fetch)
974 (uri (string-append
975 "http://icedtea.wildebeest.org/download/source/icedtea-"
976 version ".tar.xz"))
977 (sha256
978 (base32
979 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
980 (modules '((guix build utils)))
981 (snippet
982 '(begin
983 (substitute* "Makefile.in"
984 ;; do not leak information about the build host
985 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
986 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
987 #t))))
988 (build-system gnu-build-system)
989 (outputs '("out" ; Java Runtime Environment
990 "jdk" ; Java Development Kit
991 "doc")) ; all documentation
992 (arguments
993 `(;; There are many test failures. Some are known to
994 ;; fail upstream, others relate to not having an X
995 ;; server running at test time, yet others are a
996 ;; complete mystery to me.
997
998 ;; hotspot: passed: 241; failed: 45; error: 2
999 ;; langtools: passed: 1,934; failed: 26
1000 ;; jdk: unknown
1001 #:tests? #f
1002
1003 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1004 ;; gremlin) doesn't support it yet, so skip this phase.
1005 #:validate-runpath? #f
1006
1007 ;; Apparently, the C locale is needed for some of the tests.
1008 #:locale "C"
1009
1010 #:modules ((guix build utils)
1011 (guix build gnu-build-system)
1012 (ice-9 match)
1013 (ice-9 popen)
1014 (srfi srfi-19)
1015 (srfi srfi-26))
1016
1017 #:configure-flags
1018 ;; TODO: package pcsc and sctp, and add to inputs
1019 `("--disable-system-pcsc"
1020 "--disable-system-sctp"
1021 "--enable-bootstrap"
1022 "--enable-nss"
1023 "--without-rhino"
1024 "--disable-downloading"
1025 "--disable-tests" ;they are run in the check phase instead
1026 "--with-openjdk-src-dir=./openjdk.src"
1027 ,(string-append "--with-jdk-home="
1028 (assoc-ref %build-inputs "jdk")))
1029
1030 #:phases
1031 (modify-phases %standard-phases
1032 (replace 'unpack
1033 (lambda* (#:key source inputs #:allow-other-keys)
1034 (let ((target (string-append "icedtea-" ,version))
1035 (unpack (lambda* (name #:optional dir)
1036 (let ((dir (or dir
1037 (string-drop-right name 5))))
1038 (mkdir dir)
1039 (zero? (system* "tar" "xvf"
1040 (assoc-ref inputs name)
1041 "-C" dir
1042 "--strip-components=1"))))))
1043 (mkdir target)
1044 (and
1045 (zero? (system* "tar" "xvf" source
1046 "-C" target "--strip-components=1"))
1047 (chdir target)
1048 (unpack "openjdk-src" "openjdk.src")
1049 (with-directory-excursion "openjdk.src"
1050 (for-each unpack
1051 (filter (cut string-suffix? "-drop" <>)
1052 (map (match-lambda
1053 ((name . _) name))
1054 inputs))))
1055 #t))))
1056 (add-after 'unpack 'fix-x11-extension-include-path
1057 (lambda* (#:key inputs #:allow-other-keys)
1058 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1059 (((string-append "\\$\\(firstword \\$\\(wildcard "
1060 "\\$\\(OPENWIN_HOME\\)"
1061 "/include/X11/extensions\\).*$"))
1062 (string-append (assoc-ref inputs "libxrender")
1063 "/include/X11/extensions"
1064 " -I" (assoc-ref inputs "libxtst")
1065 "/include/X11/extensions"
1066 " -I" (assoc-ref inputs "libxinerama")
1067 "/include/X11/extensions"))
1068 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1069 #t))
1070 (add-after 'unpack 'patch-paths
1071 (lambda _
1072 ;; buildtree.make generates shell scripts, so we need to replace
1073 ;; the generated shebang
1074 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1075 (("/bin/sh") (which "bash")))
1076
1077 (let ((corebin (string-append
1078 (assoc-ref %build-inputs "coreutils") "/bin/"))
1079 (binbin (string-append
1080 (assoc-ref %build-inputs "binutils") "/bin/"))
1081 (grepbin (string-append
1082 (assoc-ref %build-inputs "grep") "/bin/")))
1083 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1084 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1085 (("UNIXCOMMAND_PATH = /bin/")
1086 (string-append "UNIXCOMMAND_PATH = " corebin))
1087 (("USRBIN_PATH = /usr/bin/")
1088 (string-append "USRBIN_PATH = " corebin))
1089 (("DEVTOOLS_PATH *= */usr/bin/")
1090 (string-append "DEVTOOLS_PATH = " corebin))
1091 (("COMPILER_PATH *= */usr/bin/")
1092 (string-append "COMPILER_PATH = "
1093 (assoc-ref %build-inputs "gcc") "/bin/"))
1094 (("DEF_OBJCOPY *=.*objcopy")
1095 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1096
1097 ;; fix path to alsa header
1098 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1099 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1100 (string-append "ALSA_INCLUDE="
1101 (assoc-ref %build-inputs "alsa-lib")
1102 "/include/alsa/version.h")))
1103
1104 ;; fix hard-coded utility paths
1105 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1106 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1107 (("ECHO *=.*echo")
1108 (string-append "ECHO = " (which "echo")))
1109 (("^GREP *=.*grep")
1110 (string-append "GREP = " (which "grep")))
1111 (("EGREP *=.*egrep")
1112 (string-append "EGREP = " (which "egrep")))
1113 (("CPIO *=.*cpio")
1114 (string-append "CPIO = " (which "cpio")))
1115 (("READELF *=.*readelf")
1116 (string-append "READELF = " (which "readelf")))
1117 (("^ *AR *=.*ar")
1118 (string-append "AR = " (which "ar")))
1119 (("^ *TAR *=.*tar")
1120 (string-append "TAR = " (which "tar")))
1121 (("AS *=.*as")
1122 (string-append "AS = " (which "as")))
1123 (("LD *=.*ld")
1124 (string-append "LD = " (which "ld")))
1125 (("STRIP *=.*strip")
1126 (string-append "STRIP = " (which "strip")))
1127 (("NM *=.*nm")
1128 (string-append "NM = " (which "nm")))
1129 (("^SH *=.*sh")
1130 (string-append "SH = " (which "bash")))
1131 (("^FIND *=.*find")
1132 (string-append "FIND = " (which "find")))
1133 (("LDD *=.*ldd")
1134 (string-append "LDD = " (which "ldd")))
1135 (("NAWK *=.*(n|g)awk")
1136 (string-append "NAWK = " (which "gawk")))
1137 (("XARGS *=.*xargs")
1138 (string-append "XARGS = " (which "xargs")))
1139 (("UNZIP *=.*unzip")
1140 (string-append "UNZIP = " (which "unzip")))
1141 (("ZIPEXE *=.*zip")
1142 (string-append "ZIPEXE = " (which "zip")))
1143 (("SED *=.*sed")
1144 (string-append "SED = " (which "sed"))))
1145
1146 ;; Some of these timestamps cause problems as they are more than
1147 ;; 10 years ago, failing the build process.
1148 (substitute*
1149 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1150 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1151 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1152 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1153 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1154 #t))
1155 (add-before 'configure 'set-additional-paths
1156 (lambda* (#:key inputs #:allow-other-keys)
1157 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1158 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1159 (string-append "ALSA_INCLUDE="
1160 (assoc-ref inputs "alsa-lib")
1161 "/include/alsa/version.h")))
1162 (setenv "CC" "gcc")
1163 (setenv "CPATH"
1164 (string-append (assoc-ref inputs "libxcomposite")
1165 "/include/X11/extensions" ":"
1166 (assoc-ref inputs "libxrender")
1167 "/include/X11/extensions" ":"
1168 (assoc-ref inputs "libxtst")
1169 "/include/X11/extensions" ":"
1170 (assoc-ref inputs "libxinerama")
1171 "/include/X11/extensions" ":"
1172 (or (getenv "CPATH") "")))
1173 (setenv "ALT_OBJCOPY" (which "objcopy"))
1174 (setenv "ALT_CUPS_HEADERS_PATH"
1175 (string-append (assoc-ref inputs "cups")
1176 "/include"))
1177 (setenv "ALT_FREETYPE_HEADERS_PATH"
1178 (string-append (assoc-ref inputs "freetype")
1179 "/include"))
1180 (setenv "ALT_FREETYPE_LIB_PATH"
1181 (string-append (assoc-ref inputs "freetype")
1182 "/lib"))
1183 #t))
1184 (add-before 'check 'fix-test-framework
1185 (lambda _
1186 ;; Fix PATH in test environment
1187 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1188 (("PATH=/bin:/usr/bin")
1189 (string-append "PATH=" (getenv "PATH"))))
1190 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1191 (("/usr/bin/env") (which "env")))
1192 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1193 (("/bin/rm") (which "rm"))
1194 (("/bin/cp") (which "cp"))
1195 (("/bin/mv") (which "mv")))
1196 #t))
1197 (add-before 'check 'fix-hotspot-tests
1198 (lambda _
1199 (with-directory-excursion "openjdk.src/hotspot/test/"
1200 (substitute* "jprt.config"
1201 (("PATH=\"\\$\\{path4sdk\\}\"")
1202 (string-append "PATH=" (getenv "PATH")))
1203 (("make=/usr/bin/make")
1204 (string-append "make=" (which "make"))))
1205 (substitute* '("runtime/6626217/Test6626217.sh"
1206 "runtime/7110720/Test7110720.sh")
1207 (("/bin/rm") (which "rm"))
1208 (("/bin/cp") (which "cp"))
1209 (("/bin/mv") (which "mv"))))
1210 #t))
1211 (add-before 'check 'fix-jdk-tests
1212 (lambda _
1213 (with-directory-excursion "openjdk.src/jdk/test/"
1214 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1215 (("/bin/pwd") (which "pwd")))
1216 (substitute* "com/sun/jdi/ShellScaffold.sh"
1217 (("/bin/kill") (which "kill")))
1218 (substitute* "start-Xvfb.sh"
1219 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1220 (("/usr/bin/nohup") (which "nohup")))
1221 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1222 (("/bin/rm") (which "rm")))
1223 (substitute* "tools/launcher/MultipleJRE.sh"
1224 (("echo \"#!/bin/sh\"")
1225 (string-append "echo \"#!" (which "rm") "\""))
1226 (("/usr/bin/zip") (which "zip")))
1227 (substitute* "com/sun/jdi/OnThrowTest.java"
1228 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1229 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1230 (("/usr/bin/uptime") (which "uptime")))
1231 (substitute* "java/lang/ProcessBuilder/Basic.java"
1232 (("/usr/bin/env") (which "env"))
1233 (("/bin/false") (which "false"))
1234 (("/bin/true") (which "true"))
1235 (("/bin/cp") (which "cp"))
1236 (("/bin/sh") (which "sh")))
1237 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1238 (("/bin/sh") (which "sh")))
1239 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1240 (("/usr/bin/perl") (which "perl"))
1241 (("/bin/ps") (which "ps"))
1242 (("/bin/true") (which "true")))
1243 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1244 (("/usr/bin/tee") (which "tee")))
1245 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1246 (("/bin/true") (which "true")))
1247 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1248 (("/bin/cat") (which "cat")))
1249 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1250 (("/bin/sh") (which "sh"))
1251 (("/bin/true") (which "true"))
1252 (("/bin/kill") (which "kill")))
1253 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1254 (("/usr/bin/echo") (which "echo")))
1255 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1256 (("/usr/bin/cat") (which "cat")))
1257 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1258 (("/bin/cat") (which "cat"))
1259 (("/bin/sleep") (which "sleep"))
1260 (("/bin/sh") (which "sh")))
1261 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1262 (("/bin/cat") (which "cat")))
1263 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1264 (("/bin/chmod") (which "chmod")))
1265 (substitute* "java/util/zip/ZipFile/Assortment.java"
1266 (("/bin/sh") (which "sh"))))
1267 #t))
1268 (replace 'check
1269 (lambda _
1270 ;; The "make check-*" targets always return zero, so we need to
1271 ;; check for errors in the associated log files to determine
1272 ;; whether any tests have failed.
1273 (use-modules (ice-9 rdelim))
1274 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1275 (checker (lambda (port)
1276 (let loop ()
1277 (let ((line (read-line port)))
1278 (cond
1279 ((eof-object? line) #t)
1280 ((regexp-exec error-pattern line) #f)
1281 (else (loop)))))))
1282 (run-test (lambda (test)
1283 (system* "make" test)
1284 (call-with-input-file
1285 (string-append "test/" test ".log")
1286 checker))))
1287 (or #t ; skip tests
1288 (and (run-test "check-hotspot")
1289 (run-test "check-langtools")
1290 (run-test "check-jdk"))))))
1291 (replace 'install
1292 (lambda* (#:key outputs #:allow-other-keys)
1293 (let ((doc (string-append (assoc-ref outputs "doc")
1294 "/share/doc/icedtea"))
1295 (jre (assoc-ref outputs "out"))
1296 (jdk (assoc-ref outputs "jdk")))
1297 (copy-recursively "openjdk.build/docs" doc)
1298 (copy-recursively "openjdk.build/j2re-image" jre)
1299 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1300 #t))
1301 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1302 ;; But that shared object is located in the server/ folder, so it
1303 ;; cannot be found. This phase creates a symbolic link in the
1304 ;; lib/amd64 folder so that the other libraries can find it.
1305 ;;
1306 ;; See:
1307 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1308 ;;
1309 ;; FIXME: Find the bug in the build system, so that this symlink is
1310 ;; not needed.
1311 (add-after 'install 'install-libjvm
1312 (lambda* (#:key inputs outputs #:allow-other-keys)
1313 (let* ((lib-path (string-append (assoc-ref outputs "out")
1314 "/lib/amd64")))
1315 (symlink (string-append lib-path "/server/libjvm.so")
1316 (string-append lib-path "/libjvm.so")))
1317 #t))
1318 ;; By default IcedTea only generates an empty keystore. In order to
1319 ;; be able to use certificates in Java programs we need to generate a
1320 ;; keystore from a set of certificates. For convenience we use the
1321 ;; certificates from the nss-certs package.
1322 (add-after 'install 'install-keystore
1323 (lambda* (#:key inputs outputs #:allow-other-keys)
1324 (let* ((keystore "cacerts")
1325 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1326 "/etc/ssl/certs"))
1327 (keytool (string-append (assoc-ref outputs "jdk")
1328 "/bin/keytool")))
1329 (define (extract-cert file target)
1330 (call-with-input-file file
1331 (lambda (in)
1332 (call-with-output-file target
1333 (lambda (out)
1334 (let loop ((line (read-line in 'concat))
1335 (copying? #f))
1336 (cond
1337 ((eof-object? line) #t)
1338 ((string-prefix? "-----BEGIN" line)
1339 (display line out)
1340 (loop (read-line in 'concat) #t))
1341 ((string-prefix? "-----END" line)
1342 (display line out)
1343 #t)
1344 (else
1345 (when copying? (display line out))
1346 (loop (read-line in 'concat) copying?)))))))))
1347 (define (import-cert cert)
1348 (format #t "Importing certificate ~a\n" (basename cert))
1349 (let ((temp "tmpcert"))
1350 (extract-cert cert temp)
1351 (let ((port (open-pipe* OPEN_WRITE keytool
1352 "-import"
1353 "-alias" (basename cert)
1354 "-keystore" keystore
1355 "-storepass" "changeit"
1356 "-file" temp)))
1357 (display "yes\n" port)
1358 (when (not (zero? (status:exit-val (close-pipe port))))
1359 (format #t "failed to import ~a\n" cert)))
1360 (delete-file temp)))
1361
1362 ;; This is necessary because the certificate directory contains
1363 ;; files with non-ASCII characters in their names.
1364 (setlocale LC_ALL "en_US.utf8")
1365 (setenv "LC_ALL" "en_US.utf8")
1366
1367 (for-each import-cert (find-files certs-dir "\\.pem$"))
1368 (mkdir-p (string-append (assoc-ref outputs "out")
1369 "/lib/security"))
1370 (mkdir-p (string-append (assoc-ref outputs "jdk")
1371 "/jre/lib/security"))
1372
1373 ;; The cacerts files we are going to overwrite are chmod'ed as
1374 ;; read-only (444) in icedtea-8 (which derives from this
1375 ;; package). We have to change this so we can overwrite them.
1376 (chmod (string-append (assoc-ref outputs "out")
1377 "/lib/security/" keystore) #o644)
1378 (chmod (string-append (assoc-ref outputs "jdk")
1379 "/jre/lib/security/" keystore) #o644)
1380
1381 (install-file keystore
1382 (string-append (assoc-ref outputs "out")
1383 "/lib/security"))
1384 (install-file keystore
1385 (string-append (assoc-ref outputs "jdk")
1386 "/jre/lib/security"))
1387 #t))))))
1388 (native-inputs
1389 `(("openjdk-src"
1390 ,(drop "openjdk"
1391 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1392 ("corba-drop"
1393 ,(drop "corba"
1394 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1395 ("jaxp-drop"
1396 ,(drop "jaxp"
1397 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1398 ("jaxws-drop"
1399 ,(drop "jaxws"
1400 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1401 ("jdk-drop"
1402 ,(drop "jdk"
1403 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1404 ("langtools-drop"
1405 ,(drop "langtools"
1406 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1407 ("hotspot-drop"
1408 ,(origin
1409 (method url-fetch)
1410 (uri (string-append
1411 "http://icedtea.classpath.org/downloads/drops"
1412 "/icedtea7/" version "/hotspot.tar.bz2"))
1413 (sha256
1414 (base32
1415 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1416 (patches (search-patches
1417 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1418 ("ant" ,ant-bootstrap)
1419 ("attr" ,attr)
1420 ("coreutils" ,coreutils)
1421 ("diffutils" ,diffutils) ;for tests
1422 ("gawk" ,gawk)
1423 ("grep" ,grep)
1424 ("libtool" ,libtool)
1425 ("pkg-config" ,pkg-config)
1426 ("wget" ,wget)
1427 ("which" ,which)
1428 ("cpio" ,cpio)
1429 ("zip" ,zip)
1430 ("unzip" ,unzip)
1431 ("fastjar" ,fastjar)
1432 ("libxslt" ,libxslt) ;for xsltproc
1433 ("nss-certs" ,nss-certs)
1434 ("perl" ,perl)
1435 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1436 ("jdk" ,icedtea-6 "jdk")))
1437 (inputs
1438 `(("alsa-lib" ,alsa-lib)
1439 ("cups" ,cups)
1440 ("libx11" ,libx11)
1441 ("libxcomposite" ,libxcomposite)
1442 ("libxt" ,libxt)
1443 ("libxtst" ,libxtst)
1444 ("libxi" ,libxi)
1445 ("libxinerama" ,libxinerama)
1446 ("libxrender" ,libxrender)
1447 ("libjpeg" ,libjpeg)
1448 ("libpng" ,libpng)
1449 ("mit-krb5" ,mit-krb5)
1450 ("nss" ,nss)
1451 ("giflib" ,giflib)
1452 ("fontconfig" ,fontconfig)
1453 ("freetype" ,freetype)
1454 ("lcms" ,lcms)
1455 ("zlib" ,zlib)
1456 ("gtk" ,gtk+-2)))
1457 (home-page "http://icedtea.classpath.org")
1458 (synopsis "Java development kit")
1459 (description
1460 "This package provides the Java development kit OpenJDK built with the
1461IcedTea build harness.")
1462 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1463 ;; same license as both GNU Classpath and OpenJDK.
1464 (license license:gpl2+))))
1465
1466(define-public icedtea-8
1467 (let* ((version "3.7.0")
1468 (drop (lambda (name hash)
1469 (origin
1470 (method url-fetch)
1471 (uri (string-append
1472 "http://icedtea.classpath.org/download/drops"
1473 "/icedtea8/" version "/" name ".tar.xz"))
1474 (sha256 (base32 hash))))))
1475 (package (inherit icedtea-7)
1476 (version "3.7.0")
1477 (source (origin
1478 (method url-fetch)
1479 (uri (string-append
1480 "http://icedtea.wildebeest.org/download/source/icedtea-"
1481 version ".tar.xz"))
1482 (sha256
1483 (base32
1484 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1485 (modules '((guix build utils)))
1486 (snippet
1487 '(begin
1488 (substitute* '("configure"
1489 "acinclude.m4")
1490 ;; Do not embed build time
1491 (("(DIST_ID=\"Custom build).*$" _ prefix)
1492 (string-append prefix "\"\n"))
1493 ;; Do not leak information about the build host
1494 (("DIST_NAME=\"\\$build_os\"")
1495 "DIST_NAME=\"guix\""))
1496 #t))))
1497 (arguments
1498 `(#:imported-modules
1499 ((guix build ant-build-system)
1500 (guix build syscalls)
1501 ,@%gnu-build-system-modules)
1502 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1503 ((#:modules modules)
1504 `((guix build utils)
1505 (guix build gnu-build-system)
1506 ((guix build ant-build-system) #:prefix ant:)
1507 (ice-9 match)
1508 (ice-9 popen)
1509 (srfi srfi-19)
1510 (srfi srfi-26)))
1511 ((#:configure-flags flags)
1512 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1513 `( ;;"--disable-bootstrap"
1514 "--enable-bootstrap"
1515 "--enable-nss"
1516 "--disable-downloading"
1517 "--disable-system-pcsc"
1518 "--disable-system-sctp"
1519 "--disable-tests" ;they are run in the check phase instead
1520 "--with-openjdk-src-dir=./openjdk.src"
1521 ,(string-append "--with-jdk-home=" jdk))))
1522 ((#:phases phases)
1523 `(modify-phases ,phases
1524 (delete 'fix-x11-extension-include-path)
1525 (delete 'patch-paths)
1526 (delete 'set-additional-paths)
1527 (delete 'patch-patches)
1528 ;; Prevent the keytool from recording the current time when
1529 ;; adding certificates at build time.
1530 (add-after 'unpack 'patch-keystore
1531 (lambda _
1532 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1533 (("date = new Date\\(\\);")
1534 "\
1535date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1536new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1537new Date();"))
1538 #t))
1539 (add-after 'unpack 'patch-jni-libs
1540 ;; Hardcode dynamically loaded libraries.
1541 (lambda _
1542 (let* ((library-path (search-path-as-string->list
1543 (getenv "LIBRARY_PATH")))
1544 (find-library (lambda (name)
1545 (search-path
1546 library-path
1547 (string-append "lib" name ".so")))))
1548 (for-each
1549 (lambda (file)
1550 (catch 'decoding-error
1551 (lambda ()
1552 (substitute* file
1553 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1554 _ name version)
1555 (format #f "\"~a\"" (find-library name)))
1556 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1557 (format #f "\"~a\"" (find-library name)))))
1558 (lambda _
1559 ;; Those are safe to skip.
1560 (format (current-error-port)
1561 "warning: failed to substitute: ~a~%"
1562 file))))
1563 (find-files "openjdk.src/jdk/src/solaris/native"
1564 "\\.c|\\.h"))
1565 #t)))
1566 (replace 'install
1567 (lambda* (#:key outputs #:allow-other-keys)
1568 (let ((doc (string-append (assoc-ref outputs "doc")
1569 "/share/doc/icedtea"))
1570 (jre (assoc-ref outputs "out"))
1571 (jdk (assoc-ref outputs "jdk")))
1572 (copy-recursively "openjdk.build/docs" doc)
1573 (copy-recursively "openjdk.build/images/j2re-image" jre)
1574 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1575 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1576 ;; support via NSS.
1577 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1578 (string-append jre "/lib/security/nss.cfg"))
1579 #t)))
1580 (add-after 'install 'strip-jar-timestamps
1581 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1582 (native-inputs
1583 `(("jdk" ,icedtea-7 "jdk")
1584 ("openjdk-src"
1585 ,(drop "openjdk"
1586 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1587 ("aarch32-drop"
1588 ,(drop "aarch32"
1589 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1590 ("corba-drop"
1591 ,(drop "corba"
1592 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1593 ("jaxp-drop"
1594 ,(drop "jaxp"
1595 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1596 ("jaxws-drop"
1597 ,(drop "jaxws"
1598 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1599 ("jdk-drop"
1600 ,(drop "jdk"
1601 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1602 ("langtools-drop"
1603 ,(drop "langtools"
1604 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1605 ("hotspot-drop"
1606 ,(origin
1607 (method url-fetch)
1608 (uri (string-append
1609 "http://icedtea.classpath.org/download/drops"
1610 "/icedtea8/" version "/hotspot.tar.xz"))
1611 (sha256
1612 (base32
1613 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1614 (patches (search-patches
1615 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1616 ("nashorn-drop"
1617 ,(drop "nashorn"
1618 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1619 ("shenandoah-drop"
1620 ,(drop "shenandoah"
1621 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1622 ,@(fold alist-delete (package-native-inputs icedtea-7)
1623 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1624 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1625
1626(define-public icedtea icedtea-7)
1627
1628
1629(define-public ant/java8
1630 (package (inherit ant-bootstrap)
1631 (name "ant")
1632 (version "1.10.1")
1633 (source (origin
1634 (method url-fetch)
1635 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1636 version "-src.tar.gz"))
1637 (sha256
1638 (base32
1639 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1640 (modules '((guix build utils)))
1641 (snippet
1642 '(begin
1643 (for-each delete-file
1644 (find-files "lib/optional" "\\.jar$"))
1645 #t))))
1646 (arguments
1647 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1648 ((#:phases phases)
1649 `(modify-phases ,phases
1650 (add-after 'unpack 'remove-scripts
1651 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1652 ;; wrappers.
1653 (lambda _
1654 (for-each delete-file
1655 (find-files "src/script"
1656 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1657 #t))
1658 (replace 'build
1659 (lambda* (#:key inputs outputs #:allow-other-keys)
1660 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1661
1662 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1663 ;; Ant to build. This is necessary in addition to disabling the
1664 ;; "check" phase, because the dependency on "test-jar" would always
1665 ;; result in the tests to be run.
1666 (substitute* "build.xml"
1667 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1668 (zero? (system* "bash" "bootstrap.sh"
1669 (string-append "-Ddist.dir="
1670 (assoc-ref outputs "out"))))))))))
1671 (native-inputs
1672 `(("jdk" ,icedtea-8 "jdk")))))
1673
1674;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1675;; requires Java 8.
1676(define-public ant
1677 (package (inherit ant/java8)
1678 (version "1.9.9")
1679 (source (origin
1680 (method url-fetch)
1681 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1682 version "-src.tar.gz"))
1683 (sha256
1684 (base32
1685 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1686 (native-inputs
1687 `(("jdk" ,icedtea-7 "jdk")))))
1688
1689(define-public ant-apache-bcel
1690 (package
1691 (inherit ant/java8)
1692 (name "ant-apache-bcel")
1693 (arguments
1694 (substitute-keyword-arguments (package-arguments ant/java8)
1695 ((#:phases phases)
1696 `(modify-phases ,phases
1697 (add-after 'unpack 'link-bcel
1698 (lambda* (#:key inputs #:allow-other-keys)
1699 (for-each (lambda (file)
1700 (symlink file
1701 (string-append "lib/optional/"
1702 (basename file))))
1703 (find-files (assoc-ref inputs "java-commons-bcel")
1704 "\\.jar$"))
1705 #t))
1706 (add-after 'build 'install
1707 (lambda* (#:key outputs #:allow-other-keys)
1708 (let* ((out (assoc-ref outputs "out"))
1709 (share (string-append out "/share/java"))
1710 (bin (string-append out "/bin"))
1711 (lib (string-append out "/lib")))
1712 (mkdir-p share)
1713 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1714 (delete-file-recursively bin)
1715 (delete-file-recursively lib)
1716 #t)))))))
1717 (inputs
1718 `(("java-commons-bcel" ,java-commons-bcel)
1719 ,@(package-inputs ant/java8)))))
1720
1721(define-public ant-junit
1722 (package
1723 (inherit ant/java8)
1724 (name "ant-junit")
1725 (arguments
1726 (substitute-keyword-arguments (package-arguments ant/java8)
1727 ((#:phases phases)
1728 `(modify-phases ,phases
1729 (add-after 'unpack 'link-junit
1730 (lambda* (#:key inputs #:allow-other-keys)
1731 (for-each (lambda (file)
1732 (symlink file
1733 (string-append "lib/optional/"
1734 (basename file))))
1735 (find-files (assoc-ref inputs "java-junit")
1736 "\\.jar$"))
1737 #t))
1738 (add-after 'build 'install
1739 (lambda* (#:key outputs #:allow-other-keys)
1740 (let* ((out (assoc-ref outputs "out"))
1741 (share (string-append out "/share/java"))
1742 (bin (string-append out "/bin"))
1743 (lib (string-append out "/lib")))
1744 (mkdir-p share)
1745 (install-file (string-append lib "/ant-junit.jar") share)
1746 (delete-file-recursively bin)
1747 (delete-file-recursively lib)
1748 #t)))))))
1749 (inputs
1750 `(("java-junit" ,java-junit)
1751 ,@(package-inputs ant/java8)))))
1752
1753(define-public clojure
1754 (let* ((remove-archives '(begin
1755 (for-each delete-file
1756 (find-files "." ".*\\.(jar|zip)"))
1757 #t))
1758 (submodule (lambda (prefix version hash)
1759 (origin
1760 (method url-fetch)
1761 (uri (string-append "https://github.com/clojure/"
1762 prefix version ".tar.gz"))
1763 (sha256 (base32 hash))
1764 (modules '((guix build utils)))
1765 (snippet remove-archives)))))
1766 (package
1767 (name "clojure")
1768 (version "1.9.0")
1769 (source
1770 (origin
1771 (method url-fetch)
1772 (uri
1773 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1774 version ".tar.gz"))
1775 (sha256
1776 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1777 (modules '((guix build utils)))
1778 (snippet remove-archives)))
1779 (build-system ant-build-system)
1780 (arguments
1781 `(#:modules ((guix build ant-build-system)
1782 (guix build utils)
1783 (ice-9 ftw)
1784 (ice-9 regex)
1785 (srfi srfi-1)
1786 (srfi srfi-26))
1787 #:test-target "test"
1788 #:phases
1789 (modify-phases %standard-phases
1790 (add-after 'unpack 'unpack-submodule-sources
1791 (lambda* (#:key inputs #:allow-other-keys)
1792 (for-each
1793 (lambda (name)
1794 (mkdir-p name)
1795 (with-directory-excursion name
1796 (or (zero? (system* "tar"
1797 ;; Use xz for repacked tarball.
1798 "--xz"
1799 "--extract"
1800 "--verbose"
1801 "--file" (assoc-ref inputs name)
1802 "--strip-components=1"))
1803 (error "failed to unpack tarball" name)))
1804 (copy-recursively (string-append name "/src/main/clojure/")
1805 "src/clj/"))
1806 '("core-specs-alpha-src"
1807 "data-generators-src"
1808 "spec-alpha-src"
1809 "test-check-src"
1810 "test-generative-src"
1811 "tools-namespace-src"))
1812 #t))
1813 ;; The javadoc target is not built by default.
1814 (add-after 'build 'build-doc
1815 (lambda _
1816 (zero? (system* "ant" "javadoc"))))
1817 ;; Needed since no install target is provided.
1818 (replace 'install
1819 (lambda* (#:key outputs #:allow-other-keys)
1820 (let ((java-dir (string-append (assoc-ref outputs "out")
1821 "/share/java/")))
1822 ;; Install versioned to avoid collisions.
1823 (install-file (string-append "clojure-" ,version ".jar")
1824 java-dir)
1825 #t)))
1826 ;; Needed since no install-doc target is provided.
1827 (add-after 'install 'install-doc
1828 (lambda* (#:key outputs #:allow-other-keys)
1829 (let ((doc-dir (string-append (assoc-ref outputs "out")
1830 "/share/doc/clojure-"
1831 ,version "/")))
1832 (copy-recursively "doc/clojure" doc-dir)
1833 (copy-recursively "target/javadoc/"
1834 (string-append doc-dir "javadoc/"))
1835 (for-each (cut install-file <> doc-dir)
1836 (filter (cut string-match
1837 ".*\\.(html|markdown|md|txt)"
1838 <>)
1839 (scandir "./")))
1840 #t))))))
1841 ;; The native-inputs below are needed to run the tests.
1842 (native-inputs
1843 `(("core-specs-alpha-src"
1844 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1845 "0.1.24"
1846 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1847 ("data-generators-src"
1848 ,(submodule "data.generators/archive/data.generators-"
1849 "0.1.2"
1850 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1851 ("spec-alpha-src"
1852 ,(submodule "spec.alpha/archive/spec.alpha-"
1853 "0.1.143"
1854 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1855 ("test-check-src"
1856 ,(submodule "test.check/archive/test.check-"
1857 "0.9.0"
1858 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1859 ("test-generative-src"
1860 ,(submodule "test.generative/archive/test.generative-"
1861 "0.5.2"
1862 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1863 ("tools-namespace-src"
1864 ,(submodule "tools.namespace/archive/tools.namespace-"
1865 "0.2.11"
1866 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1867 (home-page "https://clojure.org/")
1868 (synopsis "Lisp dialect running on the JVM")
1869 (description "Clojure is a dynamic, general-purpose programming language,
1870combining the approachability and interactive development of a scripting
1871language with an efficient and robust infrastructure for multithreaded
1872programming. Clojure is a compiled language, yet remains completely dynamic
1873– every feature supported by Clojure is supported at runtime. Clojure
1874provides easy access to the Java frameworks, with optional type hints and type
1875inference, to ensure that calls to Java can avoid reflection.
1876
1877Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1878and a powerful macro system. Clojure is predominantly a functional programming
1879language, and features a rich set of immutable, persistent data structures.
1880When mutable state is needed, Clojure offers a software transactional memory
1881system and reactive Agent system that ensure clean, correct, multithreaded
1882designs.")
1883 ;; Clojure is licensed under EPL1.0
1884 ;; ASM bytecode manipulation library is licensed under BSD-3
1885 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1886 ;; src/clj/repl.clj is licensed under CPL1.0
1887 ;;
1888 ;; See readme.html or readme.txt for details.
1889 (license (list license:epl1.0
1890 license:bsd-3
1891 license:asl2.0
1892 license:cpl1.0)))))
1893
1894(define-public javacc
1895 (package
1896 (name "javacc")
1897 (version "7.0.3")
1898 (source (origin
1899 (method url-fetch)
1900 (uri (string-append "https://github.com/javacc/javacc/"
1901 "archive/" version ".tar.gz"))
1902 (file-name (string-append "javacc-" version ".tar.gz"))
1903 (sha256
1904 (base32
1905 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1906 (build-system ant-build-system)
1907 (arguments
1908 `(#:test-target "test"
1909 #:phases
1910 (modify-phases %standard-phases
1911 (add-after 'unpack 'delete-bundled-libs
1912 (lambda _
1913 (delete-file-recursively "lib") #t))
1914 (replace 'install (install-jars "target")))))
1915 (home-page "https://javacc.org/")
1916 (synopsis "Java parser generator")
1917 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1918generator for use with Java applications. A parser generator is a tool that
1919reads a grammar specification and converts it to a Java program that can
1920recognize matches to the grammar. In addition to the parser generator itself,
1921JavaCC provides other standard capabilities related to parser generation such
1922as tree building (via a tool called JJTree included with JavaCC), actions,
1923debugging, etc.")
1924 (license license:bsd-3)))
1925
1926(define-public javacc-4
1927 (package (inherit javacc)
1928 (version "4.1")
1929 (source (origin
1930 (method git-fetch)
1931 (uri (git-reference
1932 (url "https://github.com/javacc/javacc.git")
1933 (commit "release_41")))
1934 (file-name (string-append "javacc-" version "-checkout"))
1935 (sha256
1936 (base32
1937 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1938 ;; Tests fail with
1939 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1940 ;; JAVACODE failed
1941 (arguments
1942 `(#:tests? #f
1943 #:phases
1944 (modify-phases %standard-phases
1945 (add-after 'unpack 'delete-bundled-libs
1946 (lambda _
1947 (delete-file-recursively "lib") #t))
1948 (replace 'install (install-jars "bin/lib")))))))
1949
1950;; This is the last 3.x release of ECJ
1951(define-public java-ecj-3
1952 (package
1953 (name "java-ecj")
1954 (version "3.8.2")
1955 (source (origin
1956 (method url-fetch)
1957 (uri (string-append "http://archive.eclipse.org/eclipse/"
1958 "downloads/drops/R-" version
1959 "-201301310800/ecjsrc-" version ".jar"))
1960 (sha256
1961 (base32
1962 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1963 (build-system ant-build-system)
1964 (arguments
1965 `(#:tests? #f ; none included
1966 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1967 #:make-flags (list "-f" "src/build.xml")
1968 #:build-target "build"
1969 #:phases
1970 (modify-phases %standard-phases
1971 (add-after 'unpack 'fix-manifest
1972 (lambda _
1973 ;; Record the main class to make ecj executable.
1974 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1975 (lambda (in out)
1976 (display "Manifest-Version: 1.0
1977Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1978 out)))))
1979 (replace 'install (install-jars ".")))))
1980 (home-page "https://eclipse.org")
1981 (synopsis "Eclipse Java development tools core batch compiler")
1982 (description "This package provides the Eclipse Java core batch compiler.")
1983 (license license:epl1.0)))
1984
1985;; This is needed for java-cisd-args4j
1986(define-public java-ecj-3.5
1987 (package (inherit java-ecj-3)
1988 (version "3.5.1")
1989 (source (origin
1990 (method url-fetch/zipbomb)
1991 (uri (string-append "http://archive.eclipse.org/eclipse/"
1992 "downloads/drops/R-" version
1993 "-200909170800/ecjsrc-" version ".zip"))
1994 (sha256
1995 (base32
1996 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1997 (build-system ant-build-system)
1998 (arguments
1999 `(#:tests? #f ; none included
2000 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2001 #:build-target "build"
2002 #:phases
2003 (modify-phases %standard-phases
2004 (add-after 'unpack 'fix-manifest
2005 (lambda _
2006 ;; Record the main class to make ecj executable.
2007 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2008 (lambda (in out)
2009 (dump-port in out)
2010 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2011 out)))))
2012 (replace 'install (install-jars ".")))))
2013 (native-inputs
2014 `(("unzip" ,unzip)))))
2015
2016(define-public java-cisd-base
2017 (let ((revision 38938)
2018 (base-version "14.12.0"))
2019 (package
2020 (name "java-cisd-base")
2021 (version (string-append base-version "-" (number->string revision)))
2022 (source (origin
2023 (method svn-fetch)
2024 (uri (svn-reference
2025 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2026 "base/tags/release/"
2027 (version-major+minor base-version)
2028 ".x/" base-version "/base/"))
2029 (revision revision)))
2030 (file-name (string-append "java-cisd-base-" version "-checkout"))
2031 (sha256
2032 (base32
2033 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2034 (modules '((guix build utils)))
2035 (snippet
2036 '(begin
2037 ;; Delete included gradle jar
2038 (delete-file-recursively "gradle/wrapper")
2039 ;; Delete pre-built native libraries
2040 (delete-file-recursively "libs")
2041 #t))))
2042 (build-system ant-build-system)
2043 (arguments
2044 `(#:make-flags '("-file" "build/build.xml")
2045 #:test-target "jar-test"
2046 #:jdk ,icedtea-8
2047 #:phases
2048 (modify-phases %standard-phases
2049 (add-after 'unpack 'unpack-build-resources
2050 (lambda* (#:key inputs #:allow-other-keys)
2051 (copy-recursively (assoc-ref inputs "build-resources")
2052 "../build_resources")
2053 #t))
2054 (add-after 'unpack-build-resources 'fix-dependencies
2055 (lambda* (#:key inputs #:allow-other-keys)
2056 (substitute* "build/build.xml"
2057 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2058 (string-append (assoc-ref inputs "java-testng")
2059 "/share/java/java-testng.jar"))
2060 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2061 (string-append (assoc-ref inputs "java-commons-lang")
2062 "/share/java/commons-lang-"
2063 ,(package-version java-commons-lang) ".jar"))
2064 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2065 (string-append (assoc-ref inputs "java-commons-io")
2066 "/share/java/commons-io-"
2067 ,(package-version java-commons-io)
2068 "-SNAPSHOT.jar"))
2069 ;; Remove dependency on svn
2070 (("<build-info.*") "")
2071 (("\\$\\{revision.number\\}")
2072 ,(number->string revision))
2073 (("\\$\\{version.number\\}") ,base-version))
2074 ;; Remove dependency on classycle
2075 (substitute* "../build_resources/ant/build-common.xml"
2076 (("<taskdef name=\"dependency-checker.*") "")
2077 (("classname=\"classycle.*") "")
2078 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2079 #t))
2080 ;; A few tests fail because of the lack of a proper /etc/groups and
2081 ;; /etc/passwd file in the build container.
2082 (add-after 'unpack 'disable-broken-tests
2083 (lambda _
2084 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2085 (("Unix.isOperational\\(\\)") "false"))
2086 #t))
2087 ;; These decorators are almost useless and pull in an unpackaged
2088 ;; dependency.
2089 (add-after 'unpack 'remove-useless-decorators
2090 (lambda _
2091 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2092 (("@Private") "")
2093 (("import ch.rinn.restrictions.Private;") ""))
2094 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2095 (("@Friend.*") "")
2096 (("import ch.rinn.restrictions.Friend;") ""))
2097 #t))
2098 (add-before 'configure 'build-native-code
2099 (lambda* (#:key inputs #:allow-other-keys)
2100 (let ((jdk (assoc-ref inputs "jdk"))
2101 (dir ,(match (%current-system)
2102 ("i686-linux"
2103 "i386-Linux")
2104 ((or "armhf-linux" "aarch64-linux")
2105 "arm-Linux")
2106 ((or "x86_64-linux")
2107 "amd64-Linux")
2108 (_ "unknown-Linux"))))
2109 (with-directory-excursion "source/c"
2110 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2111 (string-append "-I" jdk "/include")
2112 (string-append "-I" jdk "/include/linux")
2113 "-o" "libunix.so")
2114 (invoke "gcc" "-shared" "-O3" "-fPIC"
2115 "-DMACHINE_BYTE_ORDER=1"
2116 "copyCommon.c"
2117 "copyByteChar.c"
2118 "copyByteDouble.c"
2119 "copyByteFloat.c"
2120 "copyByteInt.c"
2121 "copyByteLong.c"
2122 "copyByteShort.c"
2123 (string-append "-I" jdk "/include")
2124 (string-append "-I" jdk "/include/linux")
2125 "-o" "libnativedata.so"))
2126 (install-file "source/c/libunix.so"
2127 (string-append "libs/native/unix/" dir))
2128 (install-file "source/c/libnativedata.so"
2129 (string-append "libs/native/nativedata/" dir))
2130 #t)))
2131 ;; In the "check" phase we only build the test executable.
2132 (add-after 'check 'run-tests
2133 (lambda _
2134 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2135 (delete-file "targets/dist/sis-base-test.jar")
2136 #t))
2137 (replace 'install (install-jars "targets/dist")))))
2138 (native-inputs
2139 `(("jdk" ,icedtea-8)
2140 ("java-commons-lang" ,java-commons-lang)
2141 ("java-commons-io" ,java-commons-io)
2142 ("java-testng" ,java-testng)
2143 ("build-resources"
2144 ,(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
2151 "/build_resources/"))
2152 (revision revision)))
2153 (sha256
2154 (base32
2155 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2156 (home-page "http://svnsis.ethz.ch")
2157 (synopsis "Utility classes for libraries from ETH Zurich")
2158 (description "This library supplies some utility classes needed for
2159libraries from the SIS division at ETH Zurich like jHDF5.")
2160 ;; The C sources are under a non-copyleft license, which looks like a
2161 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2162 (license (list license:asl2.0
2163 (license:non-copyleft "file://source/c/COPYING"))))))
2164
2165(define-public java-cisd-args4j
2166 (let ((revision 39162)
2167 (base-version "9.11.2"))
2168 (package
2169 (name "java-cisd-args4j")
2170 (version (string-append base-version "-" (number->string revision)))
2171 (source (origin
2172 (method svn-fetch)
2173 (uri (svn-reference
2174 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2175 "args4j/tags/release/"
2176 (version-major+minor base-version)
2177 ".x/" base-version "/args4j/"))
2178 (revision revision)))
2179 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2180 (sha256
2181 (base32
2182 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2183 (build-system ant-build-system)
2184 (arguments
2185 `(#:make-flags '("-file" "build/build.xml")
2186 #:tests? #f ; there are no tests
2187 ;; There are weird build failures with JDK8, such as: "The type
2188 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2189 ;; referenced from required .class files"
2190 #:jdk ,icedtea-7
2191 #:modules ((guix build ant-build-system)
2192 (guix build utils)
2193 (guix build java-utils)
2194 (sxml simple)
2195 (sxml transform)
2196 (sxml xpath))
2197 #:phases
2198 (modify-phases %standard-phases
2199 (add-after 'unpack 'unpack-build-resources
2200 (lambda* (#:key inputs #:allow-other-keys)
2201 (mkdir-p "../build_resources")
2202 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2203 "-C" "../build_resources"
2204 "--strip-components=1")
2205 (mkdir-p "../build_resources/lib")
2206 #t))
2207 (add-after 'unpack-build-resources 'fix-dependencies
2208 (lambda* (#:key inputs #:allow-other-keys)
2209 ;; FIXME: There should be a more convenient abstraction for
2210 ;; editing XML files.
2211 (with-directory-excursion "../build_resources/ant/"
2212 (chmod "build-common.xml" #o664)
2213 (call-with-output-file "build-common.xml.new"
2214 (lambda (port)
2215 (sxml->xml
2216 (pre-post-order
2217 (with-input-from-file "build-common.xml"
2218 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2219 `(;; Remove dependency on classycle and custom ant tasks
2220 (taskdef . ,(lambda (tag . kids)
2221 (let ((name ((sxpath '(name *text*)) kids)))
2222 (if (or (member "build-info" name)
2223 (member "dependency-checker" name)
2224 (member "build-java-subprojects" name)
2225 (member "project-classpath" name))
2226 '() ; skip
2227 `(,tag ,@kids)))))
2228 (typedef . ,(lambda (tag . kids)
2229 (let ((name ((sxpath '(name *text*)) kids)))
2230 (if (member "recursive-jar" name)
2231 '() ; skip
2232 `(,tag ,@kids)))))
2233 (build-java-subprojects . ,(lambda _ '()))
2234 ;; Ignore everything else
2235 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2236 (*text* . ,(lambda (_ txt) txt))))
2237 port)))
2238 (rename-file "build-common.xml.new" "build-common.xml"))
2239 (substitute* "build/build.xml"
2240 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2241 (string-append (assoc-ref inputs "java-cisd-base")
2242 "/share/java/sis-base.jar"))
2243 ;; Remove dependency on svn
2244 (("<build-info.*") "")
2245 (("\\$\\{revision.number\\}")
2246 ,(number->string revision))
2247 (("\\$\\{version.number\\}") ,base-version)
2248 ;; Don't use custom ant tasks.
2249 (("recursive-jar") "jar")
2250 (("<project-classpath.*") ""))
2251 #t))
2252 (replace 'install (install-jars "targets/dist")))))
2253 (inputs
2254 `(("java-cisd-base" ,java-cisd-base)))
2255 (native-inputs
2256 `(("ecj" ,java-ecj-3.5)
2257 ("build-resources"
2258 ,(origin
2259 (method svn-fetch)
2260 (uri (svn-reference
2261 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2262 "args4j/tags/release/"
2263 (version-major+minor base-version)
2264 ".x/" base-version
2265 "/build_resources/"))
2266 (revision revision)))
2267 (sha256
2268 (base32
2269 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2270 (modules '((guix build utils)))
2271 ;; Delete bundled pre-built jars.
2272 (snippet
2273 '(begin (delete-file-recursively "lib/") #t))))))
2274 (home-page "http://svnsis.ethz.ch")
2275 (synopsis "Command line parser library")
2276 (description "This package provides a parser for command line arguments.")
2277 (license license:asl2.0))))
2278
2279(define-public java-cisd-jhdf5
2280 (let ((revision 39162)
2281 (base-version "14.12.6"))
2282 (package
2283 (name "java-cisd-jhdf5")
2284 (version (string-append base-version "-" (number->string revision)))
2285 (source (origin
2286 (method svn-fetch)
2287 (uri (svn-reference
2288 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2289 "jhdf5/tags/release/"
2290 (version-major+minor base-version)
2291 ".x/" base-version "/jhdf5/"))
2292 (revision revision)))
2293 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2294 (sha256
2295 (base32
2296 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2297 (modules '((guix build utils)))
2298 (snippet
2299 '(begin
2300 ;; Delete included gradle jar
2301 (delete-file-recursively "gradle/wrapper")
2302 ;; Delete pre-built native libraries
2303 (delete-file-recursively "libs")
2304 #t))))
2305 (build-system ant-build-system)
2306 (arguments
2307 `(#:make-flags '("-file" "build/build.xml")
2308 #:build-target "jar-all"
2309 #:test-target "jar-test"
2310 #:jdk ,icedtea-8
2311 #:phases
2312 (modify-phases %standard-phases
2313 ;; FIXME: this build phase fails.
2314 (delete 'generate-jar-indices)
2315 ;; Don't erase results from the build phase when building tests.
2316 (add-after 'unpack 'separate-test-target-from-clean
2317 (lambda _
2318 (substitute* "build/build.xml"
2319 (("\"jar-test\" depends=\"clean, ")
2320 "\"jar-test\" depends=\""))
2321 #t))
2322 (add-after 'unpack 'unpack-build-resources
2323 (lambda* (#:key inputs #:allow-other-keys)
2324 (copy-recursively (assoc-ref inputs "build-resources")
2325 "../build_resources")
2326 (delete-file-recursively "../build_resources/lib/")
2327 (mkdir-p "../build_resources/lib")
2328 ;; Remove dependency on classycle
2329 (substitute* "../build_resources/ant/build-common.xml"
2330 (("<taskdef name=\"dependency-checker.*") "")
2331 (("classname=\"classycle.*") "")
2332 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2333 ;; Remove dependency on svn
2334 (substitute* "build/build.xml"
2335 (("<build-info.*") "")
2336 (("\\$\\{revision.number\\}")
2337 ,(number->string revision))
2338 (("\\$\\{version.number\\}") ,base-version))
2339 #t))
2340 (add-after 'unpack-build-resources 'fix-dependencies
2341 (lambda* (#:key inputs #:allow-other-keys)
2342 (substitute* "../build_resources/ant/build-common.xml"
2343 (("../libraries/testng/testng-jdk15.jar")
2344 (string-append (assoc-ref inputs "java-testng")
2345 "/share/java/java-testng.jar")))
2346 (substitute* "build/build.xml"
2347 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2348 (string-append (assoc-ref inputs "java-cisd-base")
2349 "/share/java/sis-base.jar"))
2350 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2351 (string-append (assoc-ref inputs "java-cisd-args4j")
2352 "/share/java/cisd-args4j.jar"))
2353 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2354 (string-append (assoc-ref inputs "java-commons-lang")
2355 "/share/java/commons-lang-"
2356 ,(package-version java-commons-lang) ".jar"))
2357 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2358 (string-append (assoc-ref inputs "java-commons-io")
2359 "/share/java/commons-io-"
2360 ,(package-version java-commons-io)
2361 "-SNAPSHOT.jar"))
2362 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2363 (string-append (assoc-ref inputs "java-testng")
2364 "/share/java/java-testng.jar"))
2365 (("\\$\\{lib\\}/junit4/junit.jar")
2366 (string-append (assoc-ref inputs "java-junit")
2367 "/share/java/junit.jar"))
2368 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2369 (string-append (assoc-ref inputs "java-hamcrest-core")
2370 "/share/java/hamcrest-core.jar")))
2371 ;; Remove dependency on ch.rinn.restrictions
2372 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2373 (substitute* '("BitSetConversionUtils.java"
2374 "HDF5Utils.java")
2375 (("import ch.rinn.restrictions.Private;") "")
2376 (("@Private") "")))
2377 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2378 (substitute* '("BitSetConversionTest.java"
2379 "h5ar/HDF5ArchiverTest.java")
2380 (("import ch.rinn.restrictions.Friend;") "")
2381 (("@Friend.*") ""))
2382 ;; Remove leftovers from removing @Friend
2383 (substitute* "h5ar/HDF5ArchiverTest.java"
2384 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2385 "")))
2386 #t))
2387 (add-before 'configure 'build-native-library
2388 (lambda* (#:key inputs #:allow-other-keys)
2389 (let ((jdk (assoc-ref inputs "jdk"))
2390 (hdf5 (assoc-ref inputs "hdf5"))
2391 (dir ,(match (%current-system)
2392 ("i686-linux"
2393 "i386-Linux")
2394 ((or "armhf-linux" "aarch64-linux")
2395 "arm-Linux")
2396 ((or "x86_64-linux")
2397 "amd64-Linux")
2398 (_ "unknown-Linux"))))
2399 (with-directory-excursion "source/c"
2400 (apply invoke `("gcc" "-shared" "-O3"
2401 "-fPIC"
2402 "-Wl,--exclude-libs,ALL"
2403 ,@(find-files "jhdf5" "\\.c$")
2404 ,@(find-files "hdf-java" "\\.c$")
2405 ,(string-append "-I" hdf5 "/include")
2406 ,(string-append "-I" jdk "/include")
2407 ,(string-append "-I" jdk "/include/linux")
2408 ,(string-append hdf5 "/lib/libhdf5.a")
2409 "-o" "libjhdf5.so" "-lz")))
2410 (install-file "source/c/libjhdf5.so"
2411 (string-append "libs/native/jhdf5/" dir))
2412 #t)))
2413 ;; In the "check" phase we only build the test executable.
2414 (add-after 'check 'run-tests
2415 (lambda _
2416 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2417 (delete-file "targets/dist/sis-jhdf5-test.jar")
2418 #t))
2419 (replace 'install
2420 (install-jars "targets/dist")))))
2421 (inputs
2422 `(("java-cisd-base" ,java-cisd-base)
2423 ("java-cisd-args4j" ,java-cisd-args4j)
2424 ("java-commons-lang" ,java-commons-lang)
2425 ("java-commons-io" ,java-commons-io)
2426 ("hdf5" ,hdf5)
2427 ("zlib" ,zlib)))
2428 (native-inputs
2429 `(("jdk" ,icedtea-8)
2430 ("java-testng" ,java-testng)
2431 ("java-junit" ,java-junit)
2432 ("java-jmock" ,java-jmock)
2433 ("java-hamcrest-core" ,java-hamcrest-core)
2434 ("build-resources"
2435 ,(origin
2436 (method svn-fetch)
2437 (uri (svn-reference
2438 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2439 "jhdf5/tags/release/"
2440 (version-major+minor base-version)
2441 ".x/" base-version
2442 "/build_resources/"))
2443 (revision revision)))
2444 (sha256
2445 (base32
2446 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2447 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2448 (synopsis "Java binding for HDF5")
2449 (description "JHDF5 is a high-level API in Java for reading and writing
2450HDF5 files, building on the libraries provided by the HDF Group.")
2451 ;; The C sources are under a non-copyleft license, which looks like a
2452 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2453 (license (list license:asl2.0
2454 (license:non-copyleft "file://source/c/COPYING"))))))
2455
2456(define-public java-classpathx-servletapi
2457 (package
2458 (name "java-classpathx-servletapi")
2459 (version "3.0.1")
2460 (source (origin
2461 (method url-fetch)
2462 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2463 "servletapi-" version ".tar.gz"))
2464 (sha256
2465 (base32
2466 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2467 (build-system ant-build-system)
2468 (arguments
2469 `(#:tests? #f ; there is no test target
2470 #:build-target "compile"
2471 #:make-flags
2472 (list "-Dbuild.compiler=javac1.8"
2473 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2474 #:phases
2475 (modify-phases %standard-phases
2476 (replace 'install
2477 (lambda* (#:key make-flags #:allow-other-keys)
2478 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2479 (home-page "https://www.gnu.org/software/classpathx/")
2480 (synopsis "Java servlet API implementation")
2481 (description "This is the GNU servlet API distribution, part of the
2482ClasspathX project. It provides implementations of version 3.0 of the servlet
2483API and version 2.1 of the Java ServerPages API.")
2484 (license license:gpl3+)))
2485
2486(define-public java-swt
2487 (package
2488 (name "java-swt")
2489 (version "4.7.1a")
2490 (source
2491 ;; The types of many variables and procedures differ in the sources
2492 ;; dependent on whether the target architecture is a 32-bit system or a
2493 ;; 64-bit system. Instead of patching the sources on demand in a build
2494 ;; phase we download either the 32-bit archive (which mostly uses "int"
2495 ;; types) or the 64-bit archive (which mostly uses "long" types).
2496 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2497 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2498 (file32 "x86")
2499 (file64 "x86_64"))
2500 (let-values (((hash file)
2501 (match (or (%current-target-system) (%current-system))
2502 ("x86_64-linux" (values hash64 file64))
2503 (_ (values hash32 file32)))))
2504 (origin
2505 (method url-fetch)
2506 (uri (string-append
2507 "http://download.eclipse.org/eclipse/downloads/drops4/"
2508 "R-" version "-201710090410/swt-" version
2509 "-gtk-linux-" file ".zip"))
2510 (sha256 (base32 hash))))))
2511 (build-system ant-build-system)
2512 (arguments
2513 `(#:jar-name "swt.jar"
2514 #:jdk ,icedtea-8
2515 #:tests? #f ; no "check" target
2516 #:phases
2517 (modify-phases %standard-phases
2518 (replace 'unpack
2519 (lambda* (#:key source #:allow-other-keys)
2520 (and (mkdir "swt")
2521 (zero? (system* "unzip" source "-d" "swt"))
2522 (chdir "swt")
2523 (mkdir "src")
2524 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2525 ;; The classpath contains invalid icecat jars. Since we don't need
2526 ;; anything other than the JDK on the classpath, we can simply unset
2527 ;; it.
2528 (add-after 'configure 'unset-classpath
2529 (lambda _ (unsetenv "CLASSPATH") #t))
2530 (add-before 'build 'build-native
2531 (lambda* (#:key inputs outputs #:allow-other-keys)
2532 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2533 ;; Build shared libraries. Users of SWT have to set the system
2534 ;; property swt.library.path to the "lib" directory of this
2535 ;; package output.
2536 (mkdir-p lib)
2537 (setenv "OUTPUT_DIR" lib)
2538 (with-directory-excursion "src"
2539 (zero? (system* "bash" "build.sh"))))))
2540 (add-after 'install 'install-native
2541 (lambda* (#:key outputs #:allow-other-keys)
2542 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2543 (for-each (lambda (file)
2544 (install-file file lib))
2545 (find-files "." "\\.so$"))
2546 #t))))))
2547 (inputs
2548 `(("gtk" ,gtk+-2)
2549 ("libxtst" ,libxtst)
2550 ("libxt" ,libxt)
2551 ("mesa" ,mesa)
2552 ("glu" ,glu)))
2553 (native-inputs
2554 `(("pkg-config" ,pkg-config)
2555 ("unzip" ,unzip)))
2556 (home-page "https://www.eclipse.org/swt/")
2557 (synopsis "Widget toolkit for Java")
2558 (description
2559 "SWT is a widget toolkit for Java designed to provide efficient, portable
2560access to the user-interface facilities of the operating systems on which it
2561is implemented.")
2562 ;; SWT code is licensed under EPL1.0
2563 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2564 ;; Cairo bindings contain code under MPL1.1
2565 ;; XULRunner 1.9 bindings contain code under MPL2.0
2566 (license (list
2567 license:epl1.0
2568 license:mpl1.1
2569 license:mpl2.0
2570 license:lgpl2.1+))))
2571
2572(define-public java-xz
2573 (package
2574 (name "java-xz")
2575 (version "1.6")
2576 (source (origin
2577 (method url-fetch)
2578 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2579 (sha256
2580 (base32
2581 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2582 (build-system ant-build-system)
2583 (arguments
2584 `(#:tests? #f ; There are no tests to run.
2585 #:jar-name ,(string-append "xz-" version ".jar")
2586 #:phases
2587 (modify-phases %standard-phases
2588 ;; The unpack phase enters the "maven" directory by accident.
2589 (add-after 'unpack 'chdir
2590 (lambda _ (chdir "..") #t)))))
2591 (native-inputs
2592 `(("unzip" ,unzip)))
2593 (home-page "https://tukaani.org/xz/java.html")
2594 (synopsis "Implementation of XZ data compression in pure Java")
2595 (description "This library aims to be a complete implementation of XZ data
2596compression in pure Java. Single-threaded streamed compression and
2597decompression and random access decompression have been fully implemented.")
2598 (license license:public-domain)))
2599
2600;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2601;; of the latest release.
2602(define-public java-qdox-1.12
2603 (package
2604 (name "java-qdox")
2605 (version "1.12.1")
2606 (source (origin
2607 (method url-fetch)
2608 (uri (string-append "http://central.maven.org/maven2/"
2609 "com/thoughtworks/qdox/qdox/" version
2610 "/qdox-" version "-sources.jar"))
2611 (sha256
2612 (base32
2613 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2614 (build-system ant-build-system)
2615 (arguments
2616 `(;; Tests require junit
2617 #:tests? #f
2618 #:jar-name "qdox.jar"
2619 #:phases
2620 (modify-phases %standard-phases
2621 (replace 'unpack
2622 (lambda* (#:key source #:allow-other-keys)
2623 (mkdir "src")
2624 (with-directory-excursion "src"
2625 (zero? (system* "jar" "-xf" source)))))
2626 ;; At this point we don't have junit, so we must remove the API
2627 ;; tests.
2628 (add-after 'unpack 'delete-tests
2629 (lambda _
2630 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2631 #t)))))
2632 (home-page "http://qdox.codehaus.org/")
2633 (synopsis "Parse definitions from Java source files")
2634 (description
2635 "QDox is a high speed, small footprint parser for extracting
2636class/interface/method definitions from source files complete with JavaDoc
2637@code{@@tags}. It is designed to be used by active code generators or
2638documentation tools.")
2639 (license license:asl2.0)))
2640
2641(define-public java-jarjar
2642 (package
2643 (name "java-jarjar")
2644 (version "1.4")
2645 (source (origin
2646 (method url-fetch)
2647 (uri (string-append
2648 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2649 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2650 (sha256
2651 (base32
2652 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2653 (modules '((guix build utils)))
2654 (snippet
2655 '(begin
2656 ;; Delete bundled thirds-party jar archives.
2657 ;; TODO: unbundle maven-plugin-api.
2658 (delete-file "lib/asm-4.0.jar")
2659 (delete-file "lib/asm-commons-4.0.jar")
2660 (delete-file "lib/junit-4.8.1.jar")
2661 #t))))
2662 (build-system ant-build-system)
2663 (arguments
2664 `(;; Tests require junit, which ultimately depends on this package.
2665 #:tests? #f
2666 #:build-target "jar"
2667 #:phases
2668 (modify-phases %standard-phases
2669 (add-before 'build 'do-not-use-bundled-asm
2670 (lambda* (#:key inputs #:allow-other-keys)
2671 (substitute* "build.xml"
2672 (("<path id=\"path.build\">")
2673 (string-append "<path id=\"path.build\"><fileset dir=\""
2674 (assoc-ref inputs "java-asm-bootstrap")
2675 "/share/java\" includes=\"**/*.jar\"/>"))
2676 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2677 (("lib/asm-commons-4.0.jar")
2678 (string-append (assoc-ref inputs "java-asm-bootstrap")
2679 "/share/java/asm-6.0.jar"))
2680 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2681 (string-append "<include name=\"org/objectweb/asm/"
2682 "commons/Remap*.class\"/>"
2683 "<include name=\"org/objectweb/asm/*.class\"/>"
2684 "<include name=\"org/objectweb/asm/"
2685 "signature/*.class\"/>"
2686 "<include name=\"org/objectweb/asm/"
2687 "commons/SignatureRemapper.class\"/>")))
2688 #t))
2689 (replace 'install
2690 (lambda* (#:key outputs #:allow-other-keys)
2691 (let ((target (string-append (assoc-ref outputs "out")
2692 "/share/java")))
2693 (install-file (string-append "dist/jarjar-" ,version ".jar")
2694 target))
2695 #t)))))
2696 (inputs
2697 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2698 (native-inputs
2699 `(("unzip" ,unzip)))
2700 (home-page "https://code.google.com/archive/p/jarjar/")
2701 (synopsis "Repackage Java libraries")
2702 (description
2703 "Jar Jar Links is a utility that makes it easy to repackage Java
2704libraries and embed them into your own distribution. Jar Jar Links includes
2705an Ant task that extends the built-in @code{jar} task.")
2706 (license license:asl2.0)))
2707
2708(define-public java-hamcrest-core
2709 (package
2710 (name "java-hamcrest-core")
2711 (version "1.3")
2712 (source (origin
2713 (method url-fetch)
2714 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2715 "archive/hamcrest-java-" version ".tar.gz"))
2716 (sha256
2717 (base32
2718 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2719 (modules '((guix build utils)))
2720 (snippet
2721 '(begin
2722 ;; Delete bundled thirds-party jar archives.
2723 (delete-file-recursively "lib")
2724 #t))))
2725 (build-system ant-build-system)
2726 (arguments
2727 `(#:tests? #f ; Tests require junit
2728 #:modules ((guix build ant-build-system)
2729 (guix build utils)
2730 (srfi srfi-1))
2731 #:make-flags (list (string-append "-Dversion=" ,version))
2732 #:test-target "unit-test"
2733 #:build-target "core"
2734 #:phases
2735 (modify-phases %standard-phases
2736 ;; Disable unit tests, because they require junit, which requires
2737 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2738 ;; attribute from the manifest for reproducibility.
2739 (add-before 'configure 'patch-build.xml
2740 (lambda _
2741 (substitute* "build.xml"
2742 (("unit-test, ") "")
2743 (("\\$\\{build.timestamp\\}") "guix"))
2744 #t))
2745 ;; Java's "getMethods()" returns methods in an unpredictable order.
2746 ;; To make the output of the generated code deterministic we must
2747 ;; sort the array of methods.
2748 (add-after 'unpack 'make-method-order-deterministic
2749 (lambda _
2750 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2751 (("import java\\.util\\.Iterator;" line)
2752 (string-append line "\n"
2753 "import java.util.Arrays; import java.util.Comparator;"))
2754 (("allMethods = cls\\.getMethods\\(\\);" line)
2755 (string-append "_" line
2756 "
2757private Method[] getSortedMethods() {
2758 Arrays.sort(_allMethods, new Comparator<Method>() {
2759 @Override
2760 public int compare(Method a, Method b) {
2761 return a.toString().compareTo(b.toString());
2762 }
2763 });
2764 return _allMethods;
2765}
2766
2767private Method[] allMethods = getSortedMethods();")))))
2768 (add-before 'build 'do-not-use-bundled-qdox
2769 (lambda* (#:key inputs #:allow-other-keys)
2770 (substitute* "build.xml"
2771 (("lib/generator/qdox-1.12.jar")
2772 (string-append (assoc-ref inputs "java-qdox-1.12")
2773 "/share/java/qdox.jar")))
2774 #t))
2775 ;; build.xml searches for .jar files in this directoy, which
2776 ;; we remove from the source archive.
2777 (add-before 'build 'create-dummy-directories
2778 (lambda _
2779 (mkdir-p "lib/integration")
2780 #t))
2781 (replace 'install
2782 (lambda* (#:key outputs #:allow-other-keys)
2783 (let* ((target (string-append (assoc-ref outputs "out")
2784 "/share/java/"))
2785 (version-suffix ,(string-append "-" version ".jar"))
2786 (install-without-version-suffix
2787 (lambda (jar)
2788 (copy-file jar
2789 (string-append target
2790 (basename jar version-suffix)
2791 ".jar")))))
2792 (mkdir-p target)
2793 (for-each
2794 install-without-version-suffix
2795 (find-files "build"
2796 (lambda (name _)
2797 (and (string-suffix? ".jar" name)
2798 (not (string-suffix? "-sources.jar" name)))))))
2799 #t)))))
2800 (native-inputs
2801 `(("java-qdox-1.12" ,java-qdox-1.12)
2802 ("java-jarjar" ,java-jarjar)))
2803 (home-page "http://hamcrest.org/")
2804 (synopsis "Library of matchers for building test expressions")
2805 (description
2806 "This package provides a library of matcher objects (also known as
2807constraints or predicates) allowing @code{match} rules to be defined
2808declaratively, to be used in other frameworks. Typical scenarios include
2809testing frameworks, mocking libraries and UI validation rules.")
2810 (license license:bsd-2)))
2811
2812(define-public java-junit
2813 (package
2814 (name "java-junit")
2815 (version "4.12")
2816 (source (origin
2817 (method url-fetch)
2818 (uri (string-append "https://github.com/junit-team/junit/"
2819 "archive/r" version ".tar.gz"))
2820 (file-name (string-append name "-" version ".tar.gz"))
2821 (sha256
2822 (base32
2823 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2824 (modules '((guix build utils)))
2825 (snippet
2826 '(begin
2827 ;; Delete bundled jar archives.
2828 (delete-file-recursively "lib")
2829 #t))))
2830 (build-system ant-build-system)
2831 (arguments
2832 `(#:tests? #f ; no tests
2833 #:jar-name "junit.jar"))
2834 (inputs
2835 `(("java-hamcrest-core" ,java-hamcrest-core)))
2836 (home-page "http://junit.org/")
2837 (synopsis "Test framework for Java")
2838 (description
2839 "JUnit is a simple framework to write repeatable tests for Java projects.
2840JUnit provides assertions for testing expected results, test fixtures for
2841sharing common test data, and test runners for running tests.")
2842 (license license:epl1.0)))
2843
2844(define-public java-plexus-utils
2845 (package
2846 (name "java-plexus-utils")
2847 (version "3.0.24")
2848 (source (origin
2849 (method url-fetch)
2850 (uri (string-append "https://github.com/codehaus-plexus/"
2851 "plexus-utils/archive/plexus-utils-"
2852 version ".tar.gz"))
2853 (sha256
2854 (base32
2855 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2856 (build-system ant-build-system)
2857 ;; FIXME: The default build.xml does not include a target to install
2858 ;; javadoc files.
2859 (arguments
2860 `(#:jar-name "plexus-utils.jar"
2861 #:source-dir "src/main"
2862 #:phases
2863 (modify-phases %standard-phases
2864 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2865 (lambda _
2866 (substitute* "src/main/java/org/codehaus/plexus/util/\
2867cli/shell/BourneShell.java"
2868 (("/bin/sh") (which "sh"))
2869 (("/usr/") (getcwd)))
2870 #t))
2871 (add-after 'unpack 'fix-or-disable-broken-tests
2872 (lambda _
2873 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2874 (substitute* '("cli/CommandlineTest.java"
2875 "cli/shell/BourneShellTest.java")
2876 (("/bin/sh") (which "sh"))
2877 (("/bin/echo") (which "echo")))
2878
2879 ;; This test depends on MavenProjectStub, but we don't have
2880 ;; a package for Maven.
2881 (delete-file "introspection/ReflectionValueExtractorTest.java")
2882
2883 ;; FIXME: The command line tests fail, maybe because they use
2884 ;; absolute paths.
2885 (delete-file "cli/CommandlineTest.java"))
2886 #t)))))
2887 (native-inputs
2888 `(("java-junit" ,java-junit)))
2889 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2890 (synopsis "Common utilities for the Plexus framework")
2891 (description "This package provides various Java utility classes for the
2892Plexus framework to ease working with strings, files, command lines, XML and
2893more.")
2894 (license license:asl2.0)))
2895
2896(define-public java-plexus-interpolation
2897 (package
2898 (name "java-plexus-interpolation")
2899 (version "1.23")
2900 (source (origin
2901 (method url-fetch)
2902 (uri (string-append "https://github.com/codehaus-plexus/"
2903 "plexus-interpolation/archive/"
2904 "plexus-interpolation-" version ".tar.gz"))
2905 (sha256
2906 (base32
2907 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2908 (build-system ant-build-system)
2909 (arguments
2910 `(#:jar-name "plexus-interpolation.jar"
2911 #:source-dir "src/main"))
2912 (native-inputs
2913 `(("java-junit" ,java-junit)
2914 ("java-hamcrest-core" ,java-hamcrest-core)))
2915 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2916 (synopsis "Java components for interpolating ${} strings and the like")
2917 (description "Plexus interpolator is a modular, flexible interpolation
2918framework for the expression language style commonly seen in Maven, Plexus,
2919and other related projects.
2920
2921It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2922package within @code{plexus-utils}, but has been separated in order to allow
2923these two libraries to vary independently of one another.")
2924 (license license:asl2.0)))
2925
2926(define-public java-plexus-classworlds
2927 (package
2928 (name "java-plexus-classworlds")
2929 (version "2.5.2")
2930 (source (origin
2931 (method url-fetch)
2932 (uri (string-append "https://github.com/codehaus-plexus/"
2933 "plexus-classworlds/archive/plexus-classworlds-"
2934 version ".tar.gz"))
2935 (sha256
2936 (base32
2937 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2938 (build-system ant-build-system)
2939 (arguments
2940 `(#:jar-name "plexus-classworlds.jar"
2941 #:source-dir "src/main"
2942 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2943 (native-inputs
2944 `(("java-junit" ,java-junit)))
2945 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2946 (synopsis "Java class loader framework")
2947 (description "Plexus classworlds replaces the native @code{ClassLoader}
2948mechanism of Java. It is especially useful for dynamic loading of application
2949components.")
2950 (license license:asl2.0)))
2951
2952(define java-plexus-container-default-bootstrap
2953 (package
2954 (name "java-plexus-container-default-bootstrap")
2955 (version "1.7.1")
2956 (source (origin
2957 (method url-fetch)
2958 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2959 "/archive/plexus-containers-" version ".tar.gz"))
2960 (sha256
2961 (base32
2962 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2963 (build-system ant-build-system)
2964 (arguments
2965 `(#:jar-name "container-default.jar"
2966 #:source-dir "plexus-container-default/src/main/java"
2967 #:test-dir "plexus-container-default/src/test"
2968 #:jdk ,icedtea-8
2969 #:tests? #f; requires plexus-archiver, which depends on this package
2970 #:phases
2971 (modify-phases %standard-phases
2972 (add-before 'build 'copy-resources
2973 (lambda _
2974 (copy-recursively
2975 "plexus-container-default/src/main/resources/"
2976 "build/classes")
2977 #t)))))
2978 (inputs
2979 `(("worldclass" ,java-plexus-classworlds)
2980 ("xbean" ,java-geronimo-xbean-reflect)
2981 ("utils" ,java-plexus-utils)
2982 ("junit" ,java-junit)
2983 ("guava" ,java-guava)))
2984 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2985 (synopsis "Inversion-of-control container")
2986 (description "Plexus-default-container is Plexus' inversion-of-control
2987(@dfn{IoC}) container. It is composed of its public API and its default
2988implementation.")
2989 (license license:asl2.0)))
2990
2991(define-public java-plexus-io
2992 (package
2993 (name "java-plexus-io")
2994 (version "3.0.0")
2995 (source (origin
2996 (method url-fetch)
2997 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2998 "/archive/plexus-io-" version ".tar.gz"))
2999 (sha256
3000 (base32
3001 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3002 (build-system ant-build-system)
3003 (arguments
3004 `(#:jar-name "plexus-io.jar"
3005 #:source-dir "src/main/java"
3006 #:test-dir "src/test"
3007 #:jdk ,icedtea-8
3008 #:phases
3009 (modify-phases %standard-phases
3010 (add-before 'build 'copy-resources
3011 (lambda _
3012 (mkdir-p "build/classes/META-INF/plexus")
3013 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3014 "build/classes/META-INF/plexus/components.xml")
3015 #t)))))
3016 (inputs
3017 `(("utils" ,java-plexus-utils)
3018 ("commons-io" ,java-commons-io)
3019 ("java-jsr305" ,java-jsr305)))
3020 (native-inputs
3021 `(("junit" ,java-junit)
3022 ("hamcrest" ,java-hamcrest-core)
3023 ("guava" ,java-guava)
3024 ("classworlds" ,java-plexus-classworlds)
3025 ("xbean" ,java-geronimo-xbean-reflect)
3026 ("container-default" ,java-plexus-container-default-bootstrap)))
3027 (home-page "https://github.com/codehaus-plexus/plexus-io")
3028 (synopsis "I/O plexus components")
3029 (description "Plexus IO is a set of plexus components, which are designed
3030for use in I/O operations. This implementation using plexus components allows
3031reusing it in maven.")
3032 (license license:asl2.0)))
3033
3034(define-public java-plexus-archiver
3035 (package
3036 (name "java-plexus-archiver")
3037 (version "3.5")
3038 (source (origin
3039 (method url-fetch)
3040 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3041 "/archive/plexus-archiver-" version ".tar.gz"))
3042 (sha256
3043 (base32
3044 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3045 (build-system ant-build-system)
3046 (arguments
3047 `(#:jar-name "plexus-archiver.jar"
3048 #:source-dir "src/main/java"
3049 #:jdk ,icedtea-8
3050 #:test-dir "src/test"
3051 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3052 #:phases
3053 (modify-phases %standard-phases
3054 (add-before 'check 'remove-failing
3055 (lambda _
3056 ;; Requires an older version of plexus container
3057 (delete-file
3058 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3059 (add-before 'build 'copy-resources
3060 (lambda _
3061 (mkdir-p "build/classes/META-INF/plexus")
3062 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3063 "build/classes/META-INF/plexus/components.xml")
3064 #t)))))
3065 (inputs
3066 `(("utils" ,java-plexus-utils)
3067 ("commons-io" ,java-commons-io)
3068 ("snappy" ,java-iq80-snappy)
3069 ("io" ,java-plexus-io)
3070 ("compress" ,java-commons-compress)
3071 ("container-default" ,java-plexus-container-default-bootstrap)
3072 ("snappy" ,java-snappy)
3073 ("java-jsr305" ,java-jsr305)))
3074 (native-inputs
3075 `(("junit" ,java-junit)
3076 ("classworld" ,java-plexus-classworlds)
3077 ("xbean" ,java-geronimo-xbean-reflect)
3078 ("xz" ,java-tukaani-xz)
3079 ("guava" ,java-guava)))
3080 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3081 (synopsis "Archiver component of the Plexus project")
3082 (description "Plexus-archiver contains a component to deal with project
3083archives (jar).")
3084 (license license:asl2.0)))
3085
3086(define-public java-plexus-container-default
3087 (package
3088 (inherit java-plexus-container-default-bootstrap)
3089 (name "java-plexus-container-default")
3090 (arguments
3091 `(#:jar-name "container-default.jar"
3092 #:source-dir "plexus-container-default/src/main/java"
3093 #:test-dir "plexus-container-default/src/test"
3094 #:test-exclude (list ;"**/*Test.java"
3095 "**/Abstract*.java"
3096 ;; Requires plexus-hierarchy
3097 "**/PlexusHierarchyTest.java"
3098 ;; Failures
3099 "**/ComponentRealmCompositionTest.java"
3100 "**/PlexusContainerTest.java")
3101 #:jdk ,icedtea-8
3102 #:phases
3103 (modify-phases %standard-phases
3104 (add-before 'build 'copy-resources
3105 (lambda _
3106 (copy-recursively
3107 "plexus-container-default/src/main/resources/"
3108 "build/classes")
3109 #t))
3110 (add-before 'check 'fix-paths
3111 (lambda _
3112 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3113 (substitute*
3114 (string-append
3115 dir "/plexus/component/composition/"
3116 "ComponentRealmCompositionTest.java")
3117 (("src/test") "plexus-container-default/src/test"))
3118 #t))))))
3119 (inputs
3120 `(("worldclass" ,java-plexus-classworlds)
3121 ("xbean" ,java-geronimo-xbean-reflect)
3122 ("utils" ,java-plexus-utils)
3123 ("junit" ,java-junit)
3124 ("guava" ,java-guava)))
3125 (native-inputs
3126 `(("archiver" ,java-plexus-archiver)
3127 ("hamcrest" ,java-hamcrest-core)))))
3128
3129(define-public java-plexus-component-annotations
3130 (package
3131 (inherit java-plexus-container-default)
3132 (name "java-plexus-component-annotations")
3133 (arguments
3134 `(#:jar-name "plexus-component-annotations.jar"
3135 #:source-dir "plexus-component-annotations/src/main/java"
3136 #:tests? #f)); no tests
3137 (inputs '())
3138 (native-inputs '())
3139 (synopsis "Plexus descriptors generator")
3140 (description "This package is a Maven plugin to generate Plexus descriptors
3141from source tags and class annotations.")))
3142
3143(define-public java-plexus-cipher
3144 (package
3145 (name "java-plexus-cipher")
3146 (version "1.7")
3147 (source (origin
3148 (method url-fetch)
3149 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3150 "/archive/plexus-cipher-" version ".tar.gz"))
3151 (sha256
3152 (base32
3153 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3154 (build-system ant-build-system)
3155 (arguments
3156 `(#:jar-name "plexus-cipher.jar"
3157 #:source-dir "src/main/java"
3158 #:jdk ,icedtea-8
3159 #:tests? #f; FIXME: requires sisu-inject-bean
3160 #:phases
3161 (modify-phases %standard-phases
3162 (add-before 'build 'copy-resources
3163 (lambda _
3164 (copy-recursively "src/main/resources" "build/classes")
3165 (mkdir-p "build/classes/META-INF/sisu")
3166 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3167 (lambda _
3168 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3169 #t)))))
3170 (inputs
3171 `(("java-cdi-api" ,java-cdi-api)
3172 ("java-javax-inject" ,java-javax-inject)))
3173 (home-page "https://github.com/sonatype/plexus-cipher")
3174 (synopsis "Encryption/decryption Component")
3175 (description "Plexus-cipher contains a component to deal with encryption
3176and decryption.")
3177 (license license:asl2.0)))
3178
3179(define-public java-plexus-compiler-api
3180 (package
3181 (name "java-plexus-compiler-api")
3182 (version "2.8.2")
3183 (source (origin
3184 (method url-fetch)
3185 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3186 "/archive/plexus-compiler-" version ".tar.gz"))
3187 (sha256
3188 (base32
3189 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3190 (build-system ant-build-system)
3191 (arguments
3192 `(#:jar-name "plexus-compiler-api.jar"
3193 #:source-dir "plexus-compiler-api/src/main/java"
3194 #:jdk ,icedtea-8
3195 #:test-dir "plexus-compiler-api/src/test"))
3196 (inputs
3197 `(("java-plexus-container-default" ,java-plexus-container-default)
3198 ("java-plexus-util" ,java-plexus-utils)))
3199 (native-inputs
3200 `(("java-junit" ,java-junit)))
3201 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3202 (synopsis "Plexus Compilers component's API to manipulate compilers")
3203 (description "This package contains the API used by components to manipulate
3204compilers.")
3205 (license (list license:asl2.0
3206 license:expat))))
3207
3208(define-public java-plexus-compiler-javac
3209 (package
3210 (inherit java-plexus-compiler-api)
3211 (name "java-plexus-compiler-javac")
3212 (arguments
3213 `(#:jar-name "plexus-compiler-javac.jar"
3214 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3215 #:jdk ,icedtea-8
3216 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3217 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3218 (inputs
3219 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3220 ("java-plexus-utils" ,java-plexus-utils)
3221 ("java-plexus-container-default" ,java-plexus-container-default)))
3222 (native-inputs
3223 `(("java-junit" ,java-junit)))
3224 (synopsis "Javac Compiler support for Plexus Compiler component")
3225 (description "This package contains the Javac Compiler support for Plexus
3226Compiler component.")))
3227
3228(define-public java-plexus-sec-dispatcher
3229 (package
3230 (name "java-plexus-sec-dispatcher")
3231 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3232 (source (origin
3233 ;; This project doesn't tag releases or publish tarballs, so we take
3234 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3235 (method url-fetch)
3236 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3237 "archive/7db8f88048.tar.gz"))
3238 (sha256
3239 (base32
3240 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3241 (file-name (string-append name "-" version ".tar.gz"))))
3242 (arguments
3243 `(#:jar-name "plexus-sec-dispatcher.jar"
3244 #:source-dir "src/main/java"
3245 #:jdk ,icedtea-8
3246 #:phases
3247 (modify-phases %standard-phases
3248 (add-before 'build 'generate-models
3249 (lambda* (#:key inputs #:allow-other-keys)
3250 (define (modello-single-mode file version mode)
3251 (zero? (system* "java"
3252 "org.codehaus.modello.ModelloCli"
3253 file mode "src/main/java" version
3254 "false" "true")))
3255 (let ((file "src/main/mdo/settings-security.mdo"))
3256 (and
3257 (modello-single-mode file "1.0.0" "java")
3258 (modello-single-mode file "1.0.0" "xpp3-reader")
3259 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3260 (add-before 'build 'generate-components.xml
3261 (lambda _
3262 (mkdir-p "build/classes/META-INF/plexus")
3263 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3264 (lambda _
3265 (display
3266 "<component-set>\n
3267 <components>\n
3268 <component>\n
3269 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3270 <role-hint>default</role-hint>\n
3271 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3272 <description></description>\n
3273 <requirements>\n
3274 <requirement>\n
3275 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3276 <field-name>_cipher</field-name>\n
3277 </requirement>\n
3278 <requirement>\n
3279 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3280 <field-name>_decryptors</field-name>\n
3281 </requirement>\n
3282 </requirements>\n
3283 <configuration>\n
3284 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3285 </configuration>\n
3286 </component>\n
3287 </components>\n
3288</component-set>\n")))))
3289 (add-before 'check 'fix-paths
3290 (lambda _
3291 (copy-recursively "src/test/resources" "target"))))))
3292 (inputs
3293 `(("java-plexus-cipher" ,java-plexus-cipher)))
3294 (native-inputs
3295 `(("java-modello-core" ,java-modello-core)
3296 ;; for modello:
3297 ("java-plexus-container-default" ,java-plexus-container-default)
3298 ("java-plexus-classworlds" ,java-plexus-classworlds)
3299 ("java-plexus-utils" ,java-plexus-utils)
3300 ("java-guava" ,java-guava)
3301 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3302 ("java-sisu-build-api" ,java-sisu-build-api)
3303 ;; modello plugins:
3304 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3305 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3306 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3307 ;; for tests
3308 ("java-junit" ,java-junit)))
3309 (build-system ant-build-system)
3310 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3311 (synopsis "Plexus Security Dispatcher Component")
3312 (description "This package is the Plexus Security Dispatcher Component.
3313This component decrypts a string passed to it.")
3314 (license license:asl2.0)))
3315
3316(define-public java-plexus-cli
3317 (package
3318 (name "java-plexus-cli")
3319 (version "1.7")
3320 (source (origin
3321 (method git-fetch)
3322 (uri (git-reference
3323 (url "https://github.com/sonatype/plexus-cli")
3324 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3325 (file-name (string-append name "-" version))
3326 (sha256
3327 (base32
3328 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3329 (build-system ant-build-system)
3330 (arguments
3331 `(#:jar-name "plexus-cli.jar"
3332 #:source-dir "src/main/java"
3333 #:jdk ,icedtea-8
3334 #:test-dir "src/test"))
3335 (inputs
3336 `(("java-commons-cli" ,java-commons-cli)
3337 ("java-plexus-container-default" ,java-plexus-container-default)
3338 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3339 (native-inputs
3340 `(("java-plexus-utils" ,java-plexus-utils)
3341 ("java-junit" ,java-junit)
3342 ("java-guava" ,java-guava)))
3343 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3344 (synopsis "CLI building library for plexus")
3345 (description "This package is a library to help creating CLI around
3346Plexus components.")
3347 (license license:asl2.0)))
3348
3349(define-public java-sisu-build-api
3350 (package
3351 (name "java-sisu-build-api")
3352 (version "0.0.7")
3353 (source (origin
3354 (method url-fetch)
3355 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3356 "archive/plexus-build-api-" version ".tar.gz"))
3357 (sha256
3358 (base32
3359 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3360 (build-system ant-build-system)
3361 (arguments
3362 `(#:jar-name "sisu-build-api.jar"
3363 #:source-dir "src/main/java"
3364 #:jdk ,icedtea-8
3365 #:tests? #f; FIXME: how to run the tests?
3366 #:phases
3367 (modify-phases %standard-phases
3368 (add-before 'build 'copy-resources
3369 (lambda _
3370 (copy-recursively "src/main/resources" "build/classes")
3371 (substitute* (find-files "build/classes")
3372 (("\\$\\{project.version\\}") ,version))
3373 #t))
3374 (add-before 'build 'generate-plexus-compontent
3375 (lambda _
3376 (mkdir-p "build/classes/META-INF/plexus")
3377 ;; This file is required for plexus to inject this package.
3378 ;; FIXME: how is it generated?
3379 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3380 (lambda _
3381 (display
3382 "<component-set>\n
3383 <components>\n
3384 <component>\n
3385 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3386 <role-hint>default</role-hint>\n
3387 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3388 <description>Filesystem based non-incremental build context implementation\n
3389which behaves as if all files were just created.</description>\n
3390 </component>\n
3391 </components>\n
3392</component-set>\n")))
3393 #t)))))
3394 (inputs
3395 `(("java-plexus-utils" ,java-plexus-utils)
3396 ("java-plexus-container-default" ,java-plexus-container-default)))
3397 (home-page "https://github.com/sonatype/sisu-build-api/")
3398 (synopsis "Base build API for maven")
3399 (description "This package contains the base build API for maven and
3400a default implementation of it. This API is about scanning files in a
3401project and determining what files need to be rebuilt.")
3402 (license license:asl2.0)))
3403
3404(define-public java-modello-core
3405 (package
3406 (name "java-modello-core")
3407 (version "1.9.1")
3408 (source (origin
3409 (method url-fetch)
3410 (uri (string-append "https://github.com/codehaus-plexus/modello"
3411 "/archive/modello-" version ".tar.gz"))
3412 (sha256
3413 (base32
3414 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3415 (build-system ant-build-system)
3416 (arguments
3417 `(#:jar-name "modello-core.jar"
3418 #:source-dir "modello-core/src/main/java"
3419 #:test-dir "modello-core/src/test"
3420 #:main-class "org.codehaus.modello.ModelloCli"
3421 #:jdk ,icedtea-8
3422 #:phases
3423 (modify-phases %standard-phases
3424 (add-before 'build 'copy-resources
3425 (lambda _
3426 (mkdir-p "build/classes/META-INF/plexus")
3427 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3428 "build/classes/META-INF/plexus/components.xml")
3429 #t))
3430 (add-before 'check 'fix-tests
3431 (lambda _
3432 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3433 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3434 "modello/core/io/ModelReaderTest.java")
3435 (("src/test") "modello-core/src/test")))
3436 #t)))))
3437 (inputs
3438 `(("java-plexus-utils" ,java-plexus-utils)
3439 ("java-plexus-container-default" ,java-plexus-container-default)
3440 ("java-sisu-build-api" ,java-sisu-build-api)))
3441 (native-inputs
3442 `(("java-junit" ,java-junit)
3443 ("java-plexus-classworlds" ,java-plexus-classworlds)
3444 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3445 ("java-guava" ,java-guava)))
3446 (home-page "http://codehaus-plexus.github.io/modello/")
3447 (synopsis "Framework for code generation from a simple model")
3448 (description "Modello is a framework for code generation from a simple model.
3449
3450Modello generates code from a simple model format: based on a plugin
3451architecture, various types of code and descriptors can be generated from the
3452single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3453XSD and documentation.")
3454 (license (list
3455 license:expat
3456 ;; Although this package uses only files licensed under expat,
3457 ;; other parts of the source are licensed under different
3458 ;; licenses. We include them to be inherited by other packages.
3459 license:asl2.0
3460 ;; Some files in modello-plugin-java are licensed under a
3461 ;; 5-clause BSD license.
3462 (license:non-copyleft
3463 (string-append "file:///modello-plugins/modello-plugin-java/"
3464 "src/main/java/org/codehaus/modello/plugin/"
3465 "java/javasource/JNaming.java"))))))
3466
3467(define-public java-modello-plugins-java
3468 (package
3469 (inherit java-modello-core)
3470 (name "java-modello-plugins-java")
3471 (arguments
3472 `(#:jar-name "modello-plugins-java.jar"
3473 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3474 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3475 #:jdk ,icedtea-8
3476 #:tests? #f; requires maven-model, which depends on this package
3477 #:phases
3478 (modify-phases %standard-phases
3479 (add-before 'build 'copy-resources
3480 (lambda _
3481 (mkdir-p "build/classes")
3482 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3483 "build/classes")
3484 #t)))))
3485 (inputs
3486 `(("java-modello-core" ,java-modello-core)
3487 ,@(package-inputs java-modello-core)))
3488 (synopsis "Modello Java Plugin")
3489 (description "Modello Java Plugin generates Java objects for the model.")))
3490
3491(define-public java-modello-plugins-xml
3492 (package
3493 (inherit java-modello-core)
3494 (name "java-modello-plugins-xml")
3495 (arguments
3496 `(#:jar-name "modello-plugins-xml.jar"
3497 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3498 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3499 #:jdk ,icedtea-8
3500 #:phases
3501 (modify-phases %standard-phases
3502 (add-before 'build 'copy-resources
3503 (lambda _
3504 (mkdir-p "build/classes")
3505 (copy-recursively
3506 "modello-plugins/modello-plugin-xml/src/main/resources"
3507 "build/classes")
3508 #t))
3509 (add-before 'check 'fix-paths
3510 (lambda _
3511 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3512 (substitute*
3513 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3514 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3515 (inputs
3516 `(("java-modello-core" ,java-modello-core)
3517 ("java-modello-plugins-java" ,java-modello-plugins-java)
3518 ,@(package-inputs java-modello-core)))
3519 (synopsis "Modello XML Plugin")
3520 (description "Modello XML Plugin contains shared code for every plugins
3521working on XML representation of the model.")))
3522
3523(define-public java-modello-test
3524 (package
3525 (inherit java-modello-core)
3526 (name "java-modello-test")
3527 (arguments
3528 `(#:jar-name "modello-test.jar"
3529 #:source-dir "modello-test/src/main/java"
3530 #:tests? #f; no tests
3531 #:jdk ,icedtea-8))
3532 (inputs
3533 `(("java-plexus-utils" ,java-plexus-utils)
3534 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3535 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3536 ("java-plexus-container-default" ,java-plexus-container-default)))
3537 (synopsis "Modello test package")
3538 (description "The modello test package contains the basis to create
3539Modello generator unit-tests, including sample models and xml files to test
3540every feature for every plugin.")))
3541
3542(define-public java-modello-plugins-xpp3
3543 (package
3544 (inherit java-modello-core)
3545 (name "java-modello-plugins-xpp3")
3546 (arguments
3547 `(#:jar-name "modello-plugins-xpp3.jar"
3548 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3549 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3550 ;; One of the test dependencies is maven-model which depends on this package.
3551 #:tests? #f
3552 #:jdk ,icedtea-8
3553 #:phases
3554 (modify-phases %standard-phases
3555 (add-before 'build 'copy-resources
3556 (lambda _
3557 (mkdir-p "build/classes")
3558 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3559 "build/classes")
3560 #t)))))
3561 (inputs
3562 `(("java-modello-core" ,java-modello-core)
3563 ("java-modello-plugins-java" ,java-modello-plugins-java)
3564 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3565 ,@(package-inputs java-modello-core)))
3566 (native-inputs
3567 `(("java-xmlunit" ,java-xmlunit)
3568 ("java-modello-test" ,java-modello-test)
3569 ,@(package-native-inputs java-modello-core)))
3570 (synopsis "Modello XPP3 Plugin")
3571 (description "The modello XPP3 plugin generates XML readers and writers based
3572on the XPP3 API (XML Pull Parser).")))
3573
3574(define-public java-asm
3575 (package
3576 (name "java-asm")
3577 (version "6.0")
3578 (source (origin
3579 (method url-fetch)
3580 (uri (string-append "http://download.forge.ow2.org/asm/"
3581 "asm-" version ".tar.gz"))
3582 (sha256
3583 (base32
3584 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3585 (build-system ant-build-system)
3586 (propagated-inputs
3587 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3588 (arguments
3589 `(#:build-target "compile"
3590 ;; The tests require an old version of Janino, which no longer compiles
3591 ;; with the JDK7.
3592 #:tests? #f
3593 #:make-flags
3594 (list
3595 ;; We don't need these extra ant tasks, but the build system asks us to
3596 ;; provide a path anyway.
3597 "-Dobjectweb.ant.tasks.path=dummy-path"
3598 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3599 ;; used during the build automatically by ant-build-system, but
3600 ;; java-asm's build.xml fails unless we provide something here.
3601 "-Dbiz.aQute.bnd.path=dummy-path")
3602 #:phases
3603 (modify-phases %standard-phases
3604 (add-before 'install 'build-jars
3605 (lambda* (#:key make-flags #:allow-other-keys)
3606 ;; We cannot use the "jar" target because it depends on a couple
3607 ;; of unpackaged, complicated tools.
3608 (mkdir "dist")
3609 (zero? (system* "jar"
3610 "-cf" (string-append "dist/asm-" ,version ".jar")
3611 "-C" "output/build/tmp" "."))))
3612 (replace 'install
3613 (install-jars "dist")))))
3614 (native-inputs
3615 `(("java-junit" ,java-junit)))
3616 (home-page "http://asm.ow2.org/")
3617 (synopsis "Very small and fast Java bytecode manipulation framework")
3618 (description "ASM is an all purpose Java bytecode manipulation and
3619analysis framework. It can be used to modify existing classes or dynamically
3620generate classes, directly in binary form. The provided common
3621transformations and analysis algorithms allow to easily assemble custom
3622complex transformations and code analysis tools.")
3623 (license license:bsd-3)))
3624
3625(define java-asm-bootstrap
3626 (package
3627 (inherit java-asm)
3628 (name "java-asm-bootstrap")
3629 (arguments
3630 (substitute-keyword-arguments (package-arguments java-asm)
3631 ((#:tests? _) #f)))
3632 (native-inputs `())
3633 (propagated-inputs
3634 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3635 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3636 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3637 (delete `("java-aqute-libg" ,java-aqute-libg)
3638 (package-inputs java-asm)))))))
3639
3640(define-public java-cglib
3641 (package
3642 (name "java-cglib")
3643 (version "3.2.4")
3644 (source (origin
3645 (method url-fetch)
3646 (uri (string-append
3647 "https://github.com/cglib/cglib/archive/RELEASE_"
3648 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3649 ".tar.gz"))
3650 (file-name (string-append "cglib-" version ".tar.gz"))
3651 (sha256
3652 (base32
3653 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3654 (build-system ant-build-system)
3655 (arguments
3656 `(;; FIXME: tests fail because junit runs
3657 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3658 ;; to describe a test at all.
3659 #:tests? #f
3660 #:jar-name "cglib.jar"
3661 #:phases
3662 (modify-phases %standard-phases
3663 (add-after 'unpack 'chdir
3664 (lambda _ (chdir "cglib") #t)))))
3665 (inputs
3666 `(("java-asm" ,java-asm)
3667 ("java-junit" ,java-junit)))
3668 (home-page "https://github.com/cglib/cglib/")
3669 (synopsis "Java byte code generation library")
3670 (description "The byte code generation library CGLIB is a high level API
3671to generate and transform Java byte code.")
3672 (license license:asl2.0)))
3673
3674(define-public java-objenesis
3675 (package
3676 (name "java-objenesis")
3677 (version "2.5.1")
3678 (source (origin
3679 (method url-fetch)
3680 (uri (string-append "https://github.com/easymock/objenesis/"
3681 "archive/" version ".tar.gz"))
3682 (file-name (string-append "objenesis-" version ".tar.gz"))
3683 (sha256
3684 (base32
3685 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3686 (build-system ant-build-system)
3687 (arguments
3688 `(#:jar-name "objenesis.jar"
3689 #:source-dir "main/src/"
3690 #:test-dir "main/src/test/"))
3691 (native-inputs
3692 `(("java-junit" ,java-junit)
3693 ("java-hamcrest-core" ,java-hamcrest-core)))
3694 (home-page "http://objenesis.org/")
3695 (synopsis "Bypass the constructor when creating an object")
3696 (description "Objenesis is a small Java library that serves one purpose:
3697to instantiate a new object of a particular class. It is common to see
3698restrictions in libraries stating that classes must require a default
3699constructor. Objenesis aims to overcome these restrictions by bypassing the
3700constructor on object instantiation.")
3701 (license license:asl2.0)))
3702
3703(define-public java-easymock
3704 (package
3705 (name "java-easymock")
3706 (version "3.4")
3707 (source (origin
3708 (method url-fetch)
3709 (uri (string-append "https://github.com/easymock/easymock/"
3710 "archive/easymock-" version ".tar.gz"))
3711 (sha256
3712 (base32
3713 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3714 (build-system ant-build-system)
3715 (arguments
3716 `(#:jar-name "easymock.jar"
3717 #:source-dir "core/src/main"
3718 #:test-dir "core/src/test"
3719 #:phases
3720 (modify-phases %standard-phases
3721 ;; FIXME: Android support requires the following packages to be
3722 ;; available: com.google.dexmaker.stock.ProxyBuilder
3723 (add-after 'unpack 'delete-android-support
3724 (lambda _
3725 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3726 (substitute* "MocksControl.java"
3727 (("AndroidSupport.isAndroid\\(\\)") "false")
3728 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3729 (delete-file "AndroidClassProxyFactory.java"))
3730 #t))
3731 (add-after 'unpack 'delete-broken-tests
3732 (lambda _
3733 (with-directory-excursion "core/src/test/java/org/easymock"
3734 ;; This test depends on dexmaker.
3735 (delete-file "tests2/ClassExtensionHelperTest.java")
3736
3737 ;; This is not a test.
3738 (delete-file "tests/BaseEasyMockRunnerTest.java")
3739
3740 ;; This test should be executed with a different runner...
3741 (delete-file "tests2/EasyMockAnnotationsTest.java")
3742 ;; ...but deleting it means that we also have to delete these
3743 ;; dependent files.
3744 (delete-file "tests2/EasyMockRunnerTest.java")
3745 (delete-file "tests2/EasyMockRuleTest.java")
3746
3747 ;; This test fails because the file "easymock.properties" does
3748 ;; not exist.
3749 (delete-file "tests2/EasyMockPropertiesTest.java"))
3750 #t)))))
3751 (inputs
3752 `(("java-asm" ,java-asm)
3753 ("java-cglib" ,java-cglib)
3754 ("java-objenesis" ,java-objenesis)))
3755 (native-inputs
3756 `(("java-junit" ,java-junit)
3757 ("java-hamcrest-core" ,java-hamcrest-core)))
3758 (home-page "http://easymock.org")
3759 (synopsis "Java library providing mock objects for unit tests")
3760 (description "EasyMock is a Java library that provides an easy way to use
3761mock objects in unit testing.")
3762 (license license:asl2.0)))
3763
3764(define-public java-jmock-1
3765 (package
3766 (name "java-jmock")
3767 (version "1.2.0")
3768 (source (origin
3769 (method url-fetch)
3770 (uri (string-append "https://github.com/jmock-developers/"
3771 "jmock-library/archive/" version ".tar.gz"))
3772 (file-name (string-append "jmock-" version ".tar.gz"))
3773 (sha256
3774 (base32
3775 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3776 (build-system ant-build-system)
3777 (arguments
3778 `(#:build-target "jars"
3779 #:test-target "run.tests"
3780 #:phases
3781 (modify-phases %standard-phases
3782 (replace 'install (install-jars "build")))))
3783 (home-page "http://www.jmock.org")
3784 (synopsis "Mock object library for test-driven development")
3785 (description "JMock is a library that supports test-driven development of
3786Java code with mock objects. Mock objects help you design and test the
3787interactions between the objects in your programs.
3788
3789The jMock library
3790
3791@itemize
3792@item makes it quick and easy to define mock objects
3793@item lets you precisely specify the interactions between
3794 your objects, reducing the brittleness of your tests
3795@item plugs into your favourite test framework
3796@item is easy to extend.
3797@end itemize\n")
3798 (license license:bsd-3)))
3799
3800(define-public java-jmock
3801 (package
3802 (inherit java-jmock-1)
3803 (name "java-jmock")
3804 (version "2.8.2")
3805 (source (origin
3806 (method url-fetch)
3807 (uri (string-append "https://github.com/jmock-developers/"
3808 "jmock-library/archive/" version ".tar.gz"))
3809 (file-name (string-append name "-" version ".tar.gz"))
3810 (sha256
3811 (base32
3812 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3813 (inputs
3814 `(("java-hamcrest-all" ,java-hamcrest-all)
3815 ("java-asm" ,java-asm)
3816 ("java-bsh" ,java-bsh)
3817 ("java-junit" ,java-junit)))
3818 (native-inputs
3819 `(("cglib" ,java-cglib)))
3820 (arguments
3821 `(#:jar-name "java-jmock.jar"
3822 #:source-dir "jmock/src/main/java"
3823 #:test-dir "jmock/src/test"))))
3824
3825(define-public java-jmock-junit4
3826 (package
3827 (inherit java-jmock)
3828 (name "java-jmock-junit4")
3829 (arguments
3830 `(#:jar-name "java-jmock-junit4.jar"
3831 #:source-dir "jmock-junit4/src/main/java"
3832 #:test-dir "jmock-junit4/src/test"))
3833 (inputs
3834 `(("java-hamcrest-all" ,java-hamcrest-all)
3835 ("java-asm" ,java-asm)
3836 ("java-bsh" ,java-bsh)
3837 ("java-jmock" ,java-jmock)
3838 ("java-jumit" ,java-junit)))))
3839
3840(define-public java-jmock-legacy
3841 (package
3842 (inherit java-jmock)
3843 (name "java-jmock-legacy")
3844 (arguments
3845 `(#:jar-name "java-jmock-legacy.jar"
3846 #:source-dir "jmock-legacy/src/main/java"
3847 #:test-dir "jmock-legacy/src/test"
3848 #:phases
3849 (modify-phases %standard-phases
3850 (add-before 'check 'copy-tests
3851 (lambda _
3852 ;; This file is a dependancy of some tests
3853 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3854 (copy-file (string-append "jmock/src/test/java/" file)
3855 (string-append "jmock-legacy/src/test/java/" file))
3856 #t))))))
3857 (inputs
3858 `(("java-hamcrest-all" ,java-hamcrest-all)
3859 ("java-objenesis" ,java-objenesis)
3860 ("java-cglib" ,java-cglib)
3861 ("java-jmock" ,java-jmock)
3862 ("java-asm" ,java-asm)
3863 ("java-bsh" ,java-bsh)
3864 ("java-junit" ,java-junit)))
3865 (native-inputs
3866 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3867
3868(define-public java-hamcrest-all
3869 (package (inherit java-hamcrest-core)
3870 (name "java-hamcrest-all")
3871 (arguments
3872 `(#:jdk ,icedtea-8
3873 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3874 ((#:build-target _) "bigjar")
3875 ((#:phases phases)
3876 `(modify-phases ,phases
3877 ;; Some build targets override the classpath, so we need to patch
3878 ;; the build.xml to ensure that required dependencies are on the
3879 ;; classpath.
3880 (add-after 'unpack 'patch-classpath-for-integration
3881 (lambda* (#:key inputs #:allow-other-keys)
3882 (substitute* "build.xml"
3883 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3884 (string-join
3885 (cons line
3886 (append
3887 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3888 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3889 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3890 ";"))
3891 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3892 (string-append (assoc-ref inputs "java-hamcrest-core")
3893 "/share/java/hamcrest-core.jar")))
3894 #t)))))))
3895 (inputs
3896 `(("java-junit" ,java-junit)
3897 ("java-jmock" ,java-jmock-1)
3898 ;; This is necessary because of what seems to be a race condition.
3899 ;; This package would sometimes fail to build because hamcrest-core.jar
3900 ;; could not be found, even though it is built as part of this package.
3901 ;; Adding java-hamcrest-core appears to fix this problem. See
3902 ;; https://debbugs.gnu.org/31390 for more information.
3903 ("java-hamcrest-core" ,java-hamcrest-core)
3904 ("java-easymock" ,java-easymock)
3905 ,@(package-inputs java-hamcrest-core)))))
3906
3907(define-public java-jopt-simple
3908 (package
3909 (name "java-jopt-simple")
3910 (version "5.0.3")
3911 (source (origin
3912 (method url-fetch)
3913 (uri (string-append "http://repo1.maven.org/maven2/"
3914 "net/sf/jopt-simple/jopt-simple/"
3915 version "/jopt-simple-"
3916 version "-sources.jar"))
3917 (sha256
3918 (base32
3919 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3920 (build-system ant-build-system)
3921 (arguments
3922 `(#:tests? #f ; there are no tests
3923 #:jar-name "jopt-simple.jar"))
3924 (home-page "https://pholser.github.io/jopt-simple/")
3925 (synopsis "Java library for parsing command line options")
3926 (description "JOpt Simple is a Java library for parsing command line
3927options, such as those you might pass to an invocation of @code{javac}. In
3928the interest of striving for simplicity, as closely as possible JOpt Simple
3929attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3930GNU @code{getopt_long}. It also aims to make option parser configuration and
3931retrieval of options and their arguments simple and expressive, without being
3932overly clever.")
3933 (license license:expat)))
3934
3935(define-public java-commons-math3
3936 (package
3937 (name "java-commons-math3")
3938 (version "3.6.1")
3939 (source (origin
3940 (method url-fetch)
3941 (uri (string-append "mirror://apache/commons/math/source/"
3942 "commons-math3-" version "-src.tar.gz"))
3943 (sha256
3944 (base32
3945 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3946 (build-system ant-build-system)
3947 (arguments
3948 `(#:build-target "jar"
3949 #:test-target "test"
3950 #:make-flags
3951 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3952 (junit (assoc-ref %build-inputs "java-junit")))
3953 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3954 (string-append "-Dhamcrest.jar=" hamcrest
3955 "/share/java/hamcrest-core.jar")))
3956 #:phases
3957 (modify-phases %standard-phases
3958 ;; We want to build the jar in the build phase and run the tests
3959 ;; later in a separate phase.
3960 (add-after 'unpack 'untangle-targets
3961 (lambda _
3962 (substitute* "build.xml"
3963 (("name=\"jar\" depends=\"test\"")
3964 "name=\"jar\" depends=\"compile\""))
3965 #t))
3966 ;; There is no install target.
3967 (replace 'install
3968 (install-jars "target")))))
3969 (native-inputs
3970 `(("java-junit" ,java-junit)
3971 ("java-hamcrest-core" ,java-hamcrest-core)))
3972 (home-page "http://commons.apache.org/math/")
3973 (synopsis "Apache Commons mathematics library")
3974 (description "Commons Math is a library of lightweight, self-contained
3975mathematics and statistics components addressing the most common problems not
3976available in the Java programming language or Commons Lang.")
3977 (license license:asl2.0)))
3978
3979(define-public java-jmh
3980 (package
3981 (name "java-jmh")
3982 (version "1.17.5")
3983 (source (origin
3984 (method hg-fetch)
3985 (uri (hg-reference
3986 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3987 (changeset version)))
3988 (file-name (string-append name "-" version "-checkout"))
3989 (sha256
3990 (base32
3991 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3992 (build-system ant-build-system)
3993 (arguments
3994 `(#:jar-name "jmh-core.jar"
3995 #:source-dir "jmh-core/src/main"
3996 #:test-dir "jmh-core/src/test"
3997 #:phases
3998 (modify-phases %standard-phases
3999 ;; This seems to be a bug in the JDK. It may not be necessary in
4000 ;; future versions of the JDK.
4001 (add-after 'unpack 'fix-bug
4002 (lambda _
4003 (with-directory-excursion
4004 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4005 (substitute* '("IntegerValueConverter.java"
4006 "ThreadsValueConverter.java")
4007 (("public Class<Integer> valueType")
4008 "public Class<? extends Integer> valueType")))
4009 #t)))))
4010 (inputs
4011 `(("java-jopt-simple" ,java-jopt-simple)
4012 ("java-commons-math3" ,java-commons-math3)))
4013 (native-inputs
4014 `(("java-junit" ,java-junit)
4015 ("java-hamcrest-core" ,java-hamcrest-core)))
4016 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4017 (synopsis "Benchmark harness for the JVM")
4018 (description "JMH is a Java harness for building, running, and analysing
4019nano/micro/milli/macro benchmarks written in Java and other languages
4020targeting the JVM.")
4021 ;; GPLv2 only
4022 (license license:gpl2)))
4023
4024(define-public java-commons-collections4
4025 (package
4026 (name "java-commons-collections4")
4027 (version "4.1")
4028 (source (origin
4029 (method url-fetch)
4030 (uri (string-append "mirror://apache/commons/collections/source/"
4031 "commons-collections4-" version "-src.tar.gz"))
4032 (sha256
4033 (base32
4034 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4035 (build-system ant-build-system)
4036 (arguments
4037 `(#:test-target "test"
4038 #:make-flags
4039 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4040 (junit (assoc-ref %build-inputs "java-junit"))
4041 (easymock (assoc-ref %build-inputs "java-easymock")))
4042 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4043 (string-append "-Dhamcrest.jar=" hamcrest
4044 "/share/java/hamcrest-core.jar")
4045 (string-append "-Deasymock.jar=" easymock
4046 "/share/java/easymock.jar")))
4047 #:phases
4048 (modify-phases %standard-phases
4049 (replace 'install
4050 (install-jars "target")))))
4051 (native-inputs
4052 `(("java-junit" ,java-junit)
4053 ("java-hamcrest-core" ,java-hamcrest-core)
4054 ("java-easymock" ,java-easymock)))
4055 (home-page "http://commons.apache.org/collections/")
4056 (synopsis "Collections framework")
4057 (description "The Java Collections Framework is the recognised standard
4058for collection handling in Java. Commons-Collections seek to build upon the
4059JDK classes by providing new interfaces, implementations and utilities. There
4060are many features, including:
4061
4062@itemize
4063@item @code{Bag} interface for collections that have a number of copies of
4064 each object
4065@item @code{BidiMap} interface for maps that can be looked up from value to
4066 key as well and key to value
4067@item @code{MapIterator} interface to provide simple and quick iteration over
4068 maps
4069@item Transforming decorators that alter each object as it is added to the
4070 collection
4071@item Composite collections that make multiple collections look like one
4072@item Ordered maps and sets that retain the order elements are added in,
4073 including an LRU based map
4074@item Reference map that allows keys and/or values to be garbage collected
4075 under close control
4076@item Many comparator implementations
4077@item Many iterator implementations
4078@item Adapter classes from array and enumerations to collections
4079@item Utilities to test or create typical set-theory properties of collections
4080 such as union, intersection, and closure.
4081@end itemize\n")
4082 (license license:asl2.0)))
4083
4084(define-public java-commons-collections
4085 (package
4086 (inherit java-commons-collections4)
4087 (name "java-commons-collections")
4088 (version "3.2.2")
4089 (source (origin
4090 (method url-fetch)
4091 (uri (string-append "mirror://apache/commons/collections/source/"
4092 "commons-collections-" version "-src.tar.gz"))
4093 (sha256
4094 (base32
4095 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4096 (patches
4097 (search-patches "java-commons-collections-fix-java8.patch"))))
4098 (arguments
4099 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4100 ((#:phases phases)
4101 `(modify-phases ,phases
4102 ;; The manifest is required by the build procedure
4103 (add-before 'build 'add-manifest
4104 (lambda _
4105 (mkdir-p "build/conf")
4106 (call-with-output-file "build/conf/MANIFEST.MF"
4107 (lambda (file)
4108 (format file "Manifest-Version: 1.0\n")))))
4109 (replace 'install
4110 (install-jars "build"))))))))
4111
4112(define java-commons-collections-test-classes
4113 (package
4114 (inherit java-commons-collections)
4115 (arguments
4116 `(#:jar-name "commons-collections-test-classes.jar"
4117 #:source-dir "src/test"
4118 #:tests? #f))
4119 (inputs
4120 `(("collection" ,java-commons-collections)))))
4121
4122(define-public java-commons-beanutils
4123 (package
4124 (name "java-commons-beanutils")
4125 (version "1.9.3")
4126 (source (origin
4127 (method url-fetch)
4128 (uri (string-append "mirror://apache/commons/beanutils/source/"
4129 "commons-beanutils-" version "-src.tar.gz"))
4130 (sha256
4131 (base32
4132 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4133 (build-system ant-build-system)
4134 (arguments
4135 `(#:test-target "test"
4136 #:tests? #f
4137 #:phases
4138 (modify-phases %standard-phases
4139 (replace 'install
4140 (lambda* (#:key outputs #:allow-other-keys)
4141 (rename-file (string-append "dist/commons-beanutils-" ,version
4142 "-SNAPSHOT.jar")
4143 "commons-beanutils.jar")
4144 (install-file "commons-beanutils.jar"
4145 (string-append (assoc-ref outputs "out") "/share/java/"))
4146 #t)))))
4147 (inputs
4148 `(("logging" ,java-commons-logging-minimal)
4149 ("collections" ,java-commons-collections)))
4150 (native-inputs
4151 `(("junit" ,java-junit)
4152 ("collections-test" ,java-commons-collections-test-classes)))
4153 (home-page "http://commons.apache.org/beanutils/")
4154 (synopsis "Dynamically set or get properties in Java")
4155 (description "BeanUtils provides a simplified interface to reflection and
4156introspection to set or get dynamically determined properties through their
4157setter and getter method.")
4158 (license license:asl2.0)))
4159
4160(define-public java-commons-io
4161 (package
4162 (name "java-commons-io")
4163 (version "2.5")
4164 (source
4165 (origin
4166 (method url-fetch)
4167 (uri (string-append "mirror://apache/commons/io/source/"
4168 "commons-io-" version "-src.tar.gz"))
4169 (sha256
4170 (base32
4171 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4172 (build-system ant-build-system)
4173 (outputs '("out" "doc"))
4174 (arguments
4175 `(#:test-target "test"
4176 #:make-flags
4177 (list (string-append "-Djunit.jar="
4178 (assoc-ref %build-inputs "java-junit")
4179 "/share/java/junit.jar"))
4180 #:phases
4181 (modify-phases %standard-phases
4182 (add-after 'build 'build-javadoc ant-build-javadoc)
4183 (replace 'install (install-jars "target"))
4184 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4185 (native-inputs
4186 `(("java-junit" ,java-junit)
4187 ("java-hamcrest-core" ,java-hamcrest-core)))
4188 (home-page "http://commons.apache.org/io/")
4189 (synopsis "Common useful IO related classes")
4190 (description "Commons-IO contains utility classes, stream implementations,
4191file filters and endian classes.")
4192 (license license:asl2.0)))
4193
4194(define-public java-commons-lang
4195 (package
4196 (name "java-commons-lang")
4197 (version "2.6")
4198 (source
4199 (origin
4200 (method url-fetch)
4201 (uri (string-append "mirror://apache/commons/lang/source/"
4202 "commons-lang-" version "-src.tar.gz"))
4203 (sha256
4204 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4205 (build-system ant-build-system)
4206 (outputs '("out" "doc"))
4207 (arguments
4208 `(#:test-target "test"
4209 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4210 #:phases
4211 (modify-phases %standard-phases
4212 (add-after 'build 'build-javadoc ant-build-javadoc)
4213 (add-before 'check 'disable-failing-test
4214 (lambda _
4215 ;; Disable a failing test
4216 (substitute* "src/test/java/org/apache/commons/lang/\
4217time/FastDateFormatTest.java"
4218 (("public void testFormat\\(\\)")
4219 "public void disabled_testFormat()"))
4220 #t))
4221 (replace 'install (install-jars "target"))
4222 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4223 (native-inputs
4224 `(("java-junit" ,java-junit)))
4225 (home-page "http://commons.apache.org/lang/")
4226 (synopsis "Extension of the java.lang package")
4227 (description "The Commons Lang components contains a set of Java classes
4228that provide helper methods for standard Java classes, especially those found
4229in the @code{java.lang} package in the Sun JDK. The following classes are
4230included:
4231
4232@itemize
4233@item StringUtils - Helper for @code{java.lang.String}.
4234@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4235 of characters such as @code{[a-z]} and @code{[abcdez]}.
4236@item RandomStringUtils - Helper for creating randomised strings.
4237@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4238@item NumberRange - A range of numbers with an upper and lower bound.
4239@item ObjectUtils - Helper for @code{java.lang.Object}.
4240@item SerializationUtils - Helper for serializing objects.
4241@item SystemUtils - Utility class defining the Java system properties.
4242@item NestedException package - A sub-package for the creation of nested
4243 exceptions.
4244@item Enum package - A sub-package for the creation of enumerated types.
4245@item Builder package - A sub-package for the creation of @code{equals},
4246 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4247@end itemize\n")
4248 (license license:asl2.0)))
4249
4250(define-public java-commons-lang3
4251 (package
4252 (name "java-commons-lang3")
4253 (version "3.4")
4254 (source
4255 (origin
4256 (method url-fetch)
4257 (uri (string-append "mirror://apache/commons/lang/source/"
4258 "commons-lang3-" version "-src.tar.gz"))
4259 (sha256
4260 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4261 (build-system ant-build-system)
4262 (outputs '("out" "doc"))
4263 (arguments
4264 `(#:test-target "test"
4265 #:make-flags
4266 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4267 (junit (assoc-ref %build-inputs "java-junit"))
4268 (easymock (assoc-ref %build-inputs "java-easymock"))
4269 (io (assoc-ref %build-inputs "java-commons-io")))
4270 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4271 (string-append "-Dhamcrest.jar=" hamcrest
4272 "/share/java/hamcrest-all.jar")
4273 (string-append "-Dcommons-io.jar=" io
4274 "/share/java/commons-io-"
4275 ,(package-version java-commons-io)
4276 "-SNAPSHOT.jar")
4277 (string-append "-Deasymock.jar=" easymock
4278 "/share/java/easymock.jar")))
4279 #:phases
4280 (modify-phases %standard-phases
4281 (add-after 'build 'build-javadoc ant-build-javadoc)
4282 (replace 'install (install-jars "target"))
4283 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4284 (native-inputs
4285 `(("java-junit" ,java-junit)
4286 ("java-commons-io" ,java-commons-io)
4287 ("java-hamcrest-all" ,java-hamcrest-all)
4288 ("java-easymock" ,java-easymock)))
4289 (home-page "http://commons.apache.org/lang/")
4290 (synopsis "Extension of the java.lang package")
4291 (description "The Commons Lang components contains a set of Java classes
4292that provide helper methods for standard Java classes, especially those found
4293in the @code{java.lang} package. The following classes are included:
4294
4295@itemize
4296@item StringUtils - Helper for @code{java.lang.String}.
4297@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4298 characters such as @code{[a-z]} and @code{[abcdez]}.
4299@item RandomStringUtils - Helper for creating randomised strings.
4300@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4301@item NumberRange - A range of numbers with an upper and lower bound.
4302@item ObjectUtils - Helper for @code{java.lang.Object}.
4303@item SerializationUtils - Helper for serializing objects.
4304@item SystemUtils - Utility class defining the Java system properties.
4305@item NestedException package - A sub-package for the creation of nested
4306 exceptions.
4307@item Enum package - A sub-package for the creation of enumerated types.
4308@item Builder package - A sub-package for the creation of @code{equals},
4309 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4310@end itemize\n")
4311 (license license:asl2.0)))
4312
4313(define-public java-commons-bsf
4314 (package
4315 (name "java-commons-bsf")
4316 (version "2.4.0")
4317 (source (origin
4318 (method url-fetch)
4319 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4320 version ".tar.gz"))
4321 (sha256
4322 (base32
4323 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4324 (modules '((guix build utils)))
4325 (snippet
4326 '(begin
4327 (for-each delete-file
4328 (find-files "." "\\.jar$"))
4329 #t))))
4330 (build-system ant-build-system)
4331 (arguments
4332 `(#:build-target "jar"
4333 #:tests? #f; No test file
4334 #:modules ((guix build ant-build-system)
4335 (guix build utils)
4336 (guix build java-utils)
4337 (sxml simple))
4338 #:phases
4339 (modify-phases %standard-phases
4340 (add-before 'build 'create-properties
4341 (lambda _
4342 ;; This file is missing from the distribution
4343 (call-with-output-file "build-properties.xml"
4344 (lambda (port)
4345 (sxml->xml
4346 `(project (@ (basedir ".") (name "build-properties") (default ""))
4347 (property (@ (name "project.name") (value "bsf")))
4348 (property (@ (name "source.level") (value "1.5")))
4349 (property (@ (name "build.lib") (value "build/jar")))
4350 (property (@ (name "src.dir") (value "src")))
4351 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4352 (property (@ (name "build.tests") (value "build/test-classes")))
4353 (property (@ (name "build.dest") (value "build/classes"))))
4354 port)))))
4355 (replace 'install (install-jars "build")))))
4356 (native-inputs
4357 `(("java-junit" ,java-junit)))
4358 (inputs
4359 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4360 (home-page "https://commons.apache.org/proper/commons-bsf")
4361 (synopsis "Bean Scripting Framework")
4362 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4363which provides scripting language support within Java applications, and access
4364to Java objects and methods from scripting languages. BSF allows one to write
4365JSPs in languages other than Java while providing access to the Java class
4366library. In addition, BSF permits any Java application to be implemented in
4367part (or dynamically extended) by a language that is embedded within it. This
4368is achieved by providing an API that permits calling scripting language engines
4369from within Java, as well as an object registry that exposes Java objects to
4370these scripting language engines.")
4371 (license license:asl2.0)))
4372
4373(define-public java-commons-jxpath
4374 (package
4375 (name "java-commons-jxpath")
4376 (version "1.3")
4377 (source (origin
4378 (method url-fetch)
4379 (uri (string-append "mirror://apache/commons/jxpath/source/"
4380 "commons-jxpath-" version "-src.tar.gz"))
4381 (sha256
4382 (base32
4383 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4384 (build-system ant-build-system)
4385 (arguments
4386 `(#:jar-name "commons-jxpath.jar"
4387 ;; tests require more dependencies, including mockrunner which depends on old software
4388 #:tests? #f
4389 #:source-dir "src/java"))
4390 (inputs
4391 `(("java-tomcat" ,java-tomcat)
4392 ("java-jdom" ,java-jdom)
4393 ("java-commons-beanutils" ,java-commons-beanutils)))
4394 (native-inputs
4395 `(("java-junit" ,java-junit)))
4396 (home-page "http://commons.apache.org/jxpath/")
4397 (synopsis "Simple interpreter of an expression language called XPath.")
4398 (description "The org.apache.commons.jxpath package defines a simple
4399interpreter of an expression language called XPath. JXPath applies XPath
4400expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4401contexts, DOM etc, including mixtures thereof.")
4402 (license license:asl2.0)))
4403
4404(define-public java-jsr250
4405 (package
4406 (name "java-jsr250")
4407 (version "1.3")
4408 (source (origin
4409 (method url-fetch)
4410 (uri (string-append "https://repo1.maven.org/maven2/"
4411 "javax/annotation/javax.annotation-api/"
4412 version "/javax.annotation-api-"
4413 version "-sources.jar"))
4414 (sha256
4415 (base32
4416 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4417 (build-system ant-build-system)
4418 (arguments
4419 `(#:tests? #f ; no tests included
4420 #:jdk ,icedtea-8
4421 #:jar-name "jsr250.jar"))
4422 (home-page "https://jcp.org/en/jsr/detail?id=250")
4423 (synopsis "Security-related annotations")
4424 (description "This package provides annotations for security. It provides
4425packages in the @code{javax.annotation} and @code{javax.annotation.security}
4426namespaces.")
4427 ;; either cddl or gpl2 only, with classpath exception
4428 (license (list license:cddl1.0
4429 license:gpl2))))
4430
4431(define-public java-jsr305
4432 (package
4433 (name "java-jsr305")
4434 (version "3.0.1")
4435 (source (origin
4436 (method url-fetch)
4437 (uri (string-append "https://repo1.maven.org/maven2/"
4438 "com/google/code/findbugs/"
4439 "jsr305/" version "/jsr305-"
4440 version "-sources.jar"))
4441 (sha256
4442 (base32
4443 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4444 (build-system ant-build-system)
4445 (arguments
4446 `(#:tests? #f ; no tests included
4447 #:jar-name "jsr305.jar"))
4448 (home-page "http://findbugs.sourceforge.net/")
4449 (synopsis "Annotations for the static analyzer called findbugs")
4450 (description "This package provides annotations for the findbugs package.
4451It provides packages in the @code{javax.annotations} namespace.")
4452 (license license:asl2.0)))
4453
4454(define-public java-guava
4455 (package
4456 (name "java-guava")
4457 ;; This is the last release of Guava that can be built with Java 7.
4458 (version "20.0")
4459 (source (origin
4460 (method url-fetch)
4461 (uri (string-append "https://github.com/google/guava/"
4462 "releases/download/v" version
4463 "/guava-" version "-sources.jar"))
4464 (sha256
4465 (base32
4466 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4467 (build-system ant-build-system)
4468 (arguments
4469 `(#:tests? #f ; no tests included
4470 #:jar-name "guava.jar"
4471 #:phases
4472 (modify-phases %standard-phases
4473 (add-after 'unpack 'trim-sources
4474 (lambda _
4475 (with-directory-excursion "src/com/google/common"
4476 ;; Remove annotations to avoid extra dependencies:
4477 ;; * "j2objc" annotations are used when converting Java to
4478 ;; Objective C;
4479 ;; * "errorprone" annotations catch common Java mistakes at
4480 ;; compile time;
4481 ;; * "IgnoreJRERequirement" is used for Android.
4482 (substitute* (find-files "." "\\.java$")
4483 (("import com.google.j2objc.*") "")
4484 (("import com.google.errorprone.annotation.*") "")
4485 (("import org.codehaus.mojo.animal_sniffer.*") "")
4486 (("@CanIgnoreReturnValue") "")
4487 (("@LazyInit") "")
4488 (("@WeakOuter") "")
4489 (("@RetainedWith") "")
4490 (("@Weak") "")
4491 (("@ForOverride") "")
4492 (("@J2ObjCIncompatible") "")
4493 (("@IgnoreJRERequirement") "")))
4494 #t)))))
4495 (inputs
4496 `(("java-jsr305" ,java-jsr305)))
4497 (home-page "https://github.com/google/guava")
4498 (synopsis "Google core libraries for Java")
4499 (description "Guava is a set of core libraries that includes new
4500collection types (such as multimap and multiset), immutable collections, a
4501graph library, functional types, an in-memory cache, and APIs/utilities for
4502concurrency, I/O, hashing, primitives, reflection, string processing, and much
4503more!")
4504 (license license:asl2.0)))
4505
4506;; The java-commons-logging package provides adapters to many different
4507;; logging frameworks. To avoid an excessive dependency graph we try to build
4508;; it with only a minimal set of adapters.
4509(define-public java-commons-logging-minimal
4510 (package
4511 (name "java-commons-logging-minimal")
4512 (version "1.2")
4513 (source (origin
4514 (method url-fetch)
4515 (uri (string-append "mirror://apache/commons/logging/source/"
4516 "commons-logging-" version "-src.tar.gz"))
4517 (sha256
4518 (base32
4519 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4520 (build-system ant-build-system)
4521 (arguments
4522 `(#:tests? #f ; avoid dependency on logging frameworks
4523 #:jar-name "commons-logging-minimal.jar"
4524 #:phases
4525 (modify-phases %standard-phases
4526 (add-after 'unpack 'delete-adapters-and-tests
4527 (lambda _
4528 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4529 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4530 ;; is used by applications; SimpleLog is the only actually usable
4531 ;; implementation that does not depend on another logging
4532 ;; framework.
4533 (for-each
4534 (lambda (file)
4535 (delete-file (string-append
4536 "src/main/java/org/apache/commons/logging/impl/" file)))
4537 (list "Jdk13LumberjackLogger.java"
4538 "WeakHashtable.java"
4539 "Log4JLogger.java"
4540 "ServletContextCleaner.java"
4541 "Jdk14Logger.java"
4542 "AvalonLogger.java"
4543 "LogKitLogger.java"))
4544 (delete-file-recursively "src/test")
4545 #t)))))
4546 (home-page "http://commons.apache.org/logging/")
4547 (synopsis "Common API for logging implementations")
4548 (description "The Logging package is a thin bridge between different
4549logging implementations. A library that uses the commons-logging API can be
4550used with any logging implementation at runtime.")
4551 (license license:asl2.0)))
4552
4553;; This is the last release of the 1.x series.
4554(define-public java-mockito-1
4555 (package
4556 (name "java-mockito")
4557 (version "1.10.19")
4558 (source (origin
4559 (method url-fetch)
4560 (uri (string-append "http://repo1.maven.org/maven2/"
4561 "org/mockito/mockito-core/" version
4562 "/mockito-core-" version "-sources.jar"))
4563 (sha256
4564 (base32
4565 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4566 (build-system ant-build-system)
4567 (arguments
4568 `(#:jar-name "mockito.jar"
4569 #:tests? #f ; no tests included
4570 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4571 ;; patches in build phases.
4572 #:phases
4573 (modify-phases %standard-phases
4574 ;; Mockito was developed against a different version of hamcrest,
4575 ;; which does not require matcher implementations to provide an
4576 ;; implementation of the "describeMismatch" method. We add this
4577 ;; simple definition to pass the build with our version of hamcrest.
4578 (add-after 'unpack 'fix-hamcrest-build-error
4579 (lambda _
4580 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4581 (("public Matcher getActualMatcher\\(\\) .*" line)
4582 (string-append "
4583 public void describeMismatch(Object item, Description description) {
4584 actualMatcher.describeMismatch(item, description);
4585 }"
4586 line)))
4587 #t))
4588 ;; Mockito bundles cglib. We have a cglib package, so let's use
4589 ;; that instead.
4590 (add-after 'unpack 'use-system-libraries
4591 (lambda _
4592 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4593 (substitute* '("CGLIBHacker.java"
4594 "CglibMockMaker.java"
4595 "ClassImposterizer.java"
4596 "DelegatingMockitoMethodProxy.java"
4597 "MethodInterceptorFilter.java"
4598 "MockitoNamingPolicy.java"
4599 "SerializableMockitoMethodProxy.java"
4600 "SerializableNoOp.java")
4601 (("import org.mockito.cglib") "import net.sf.cglib")))
4602 #t)))))
4603 (inputs
4604 `(("java-junit" ,java-junit)
4605 ("java-objenesis" ,java-objenesis)
4606 ("java-cglib" ,java-cglib)
4607 ("java-hamcrest-core" ,java-hamcrest-core)))
4608 (home-page "http://mockito.org")
4609 (synopsis "Mockito is a mock library for Java")
4610 (description "Mockito is a mocking library for Java which lets you write
4611tests with a clean and simple API. It generates mocks using reflection, and
4612it records all mock invocations, including methods arguments.")
4613 (license license:asl2.0)))
4614
4615(define-public java-httpcomponents-httpcore
4616 (package
4617 (name "java-httpcomponents-httpcore")
4618 (version "4.4.6")
4619 (source (origin
4620 (method url-fetch)
4621 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4622 "source/httpcomponents-core-"
4623 version "-src.tar.gz"))
4624 (sha256
4625 (base32
4626 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4627 (build-system ant-build-system)
4628 (arguments
4629 `(#:jar-name "httpcomponents-httpcore.jar"
4630 #:phases
4631 (modify-phases %standard-phases
4632 (add-after 'unpack 'chdir
4633 (lambda _ (chdir "httpcore") #t)))))
4634 (inputs
4635 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4636 ("java-commons-lang3" ,java-commons-lang3)))
4637 (native-inputs
4638 `(("java-junit" ,java-junit)
4639 ("java-mockito" ,java-mockito-1)))
4640 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4641 (synopsis "Low level HTTP transport components")
4642 (description "HttpCore is a set of low level HTTP transport components
4643that can be used to build custom client and server side HTTP services with a
4644minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4645on the classic Java I/O and non-blocking, event driven I/O model based on Java
4646NIO.
4647
4648This package provides the blocking I/O model library.")
4649 (license license:asl2.0)))
4650
4651(define-public java-httpcomponents-httpcore-nio
4652 (package (inherit java-httpcomponents-httpcore)
4653 (name "java-httpcomponents-httpcore-nio")
4654 (arguments
4655 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4656 #:phases
4657 (modify-phases %standard-phases
4658 (add-after 'unpack 'chdir
4659 (lambda _ (chdir "httpcore-nio") #t)))))
4660 (inputs
4661 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4662 ("java-hamcrest-core" ,java-hamcrest-core)
4663 ,@(package-inputs java-httpcomponents-httpcore)))
4664 (description "HttpCore is a set of low level HTTP transport components
4665that can be used to build custom client and server side HTTP services with a
4666minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4667on the classic Java I/O and non-blocking, event driven I/O model based on Java
4668NIO.
4669
4670This package provides the non-blocking I/O model library based on Java
4671NIO.")))
4672
4673(define-public java-httpcomponents-httpcore-ab
4674 (package (inherit java-httpcomponents-httpcore)
4675 (name "java-httpcomponents-httpcore-ab")
4676 (arguments
4677 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4678 #:phases
4679 (modify-phases %standard-phases
4680 (add-after 'unpack 'chdir
4681 (lambda _ (chdir "httpcore-ab") #t)))))
4682 (inputs
4683 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4684 ("java-commons-cli" ,java-commons-cli)
4685 ("java-hamcrest-core" ,java-hamcrest-core)
4686 ,@(package-inputs java-httpcomponents-httpcore)))
4687 (synopsis "Apache HttpCore benchmarking tool")
4688 (description "This package provides the HttpCore benchmarking tool. It is
4689an Apache AB clone based on HttpCore.")))
4690
4691(define-public java-httpcomponents-httpclient
4692 (package
4693 (name "java-httpcomponents-httpclient")
4694 (version "4.5.3")
4695 (source (origin
4696 (method url-fetch)
4697 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4698 "source/httpcomponents-client-"
4699 version "-src.tar.gz"))
4700 (sha256
4701 (base32
4702 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4703 (build-system ant-build-system)
4704 (arguments
4705 `(#:jar-name "httpcomponents-httpclient.jar"
4706 #:phases
4707 (modify-phases %standard-phases
4708 (add-after 'unpack 'chdir
4709 (lambda _ (chdir "httpclient") #t)))))
4710 (inputs
4711 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4712 ("java-commons-codec" ,java-commons-codec)
4713 ("java-hamcrest-core" ,java-hamcrest-core)
4714 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4715 ("java-mockito" ,java-mockito-1)
4716 ("java-junit" ,java-junit)))
4717 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4718 (synopsis "HTTP client library for Java")
4719 (description "Although the @code{java.net} package provides basic
4720functionality for accessing resources via HTTP, it doesn't provide the full
4721flexibility or functionality needed by many applications. @code{HttpClient}
4722seeks to fill this void by providing an efficient, up-to-date, and
4723feature-rich package implementing the client side of the most recent HTTP
4724standards and recommendations.")
4725 (license license:asl2.0)))
4726
4727(define-public java-httpcomponents-httpmime
4728 (package (inherit java-httpcomponents-httpclient)
4729 (name "java-httpcomponents-httpmime")
4730 (arguments
4731 `(#:jar-name "httpcomponents-httpmime.jar"
4732 #:phases
4733 (modify-phases %standard-phases
4734 (add-after 'unpack 'chdir
4735 (lambda _ (chdir "httpmime") #t)))))
4736 (inputs
4737 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4738 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4739 ("java-junit" ,java-junit)
4740 ("java-hamcrest-core" ,java-hamcrest-core)))))
4741
4742(define-public java-commons-net
4743 (package
4744 (name "java-commons-net")
4745 (version "3.6")
4746 (source (origin
4747 (method url-fetch)
4748 (uri (string-append "mirror://apache/commons/net/source/"
4749 "commons-net-" version "-src.tar.gz"))
4750 (sha256
4751 (base32
4752 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4753 (build-system ant-build-system)
4754 (arguments
4755 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4756 ;; should be "resources/examples/examples.properties"), but gets "null"
4757 ;; instead.
4758 #:tests? #f
4759 #:jar-name "commons-net.jar"))
4760 (native-inputs
4761 `(("java-junit" ,java-junit)
4762 ("java-hamcrest-core" ,java-hamcrest-core)))
4763 (home-page "http://commons.apache.org/net/")
4764 (synopsis "Client library for many basic Internet protocols")
4765 (description "The Apache Commons Net library implements the client side of
4766many basic Internet protocols. The purpose of the library is to provide
4767fundamental protocol access, not higher-level abstractions.")
4768 (license license:asl2.0)))
4769
4770(define-public java-jsch
4771 (package
4772 (name "java-jsch")
4773 (version "0.1.54")
4774 (source (origin
4775 (method url-fetch)
4776 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4777 version "/jsch-" version ".zip"))
4778 (sha256
4779 (base32
4780 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4781 (build-system ant-build-system)
4782 (arguments
4783 `(#:build-target "dist"
4784 #:tests? #f ; no tests included
4785 #:phases
4786 (modify-phases %standard-phases
4787 (replace 'install (install-jars "dist")))))
4788 (native-inputs
4789 `(("unzip" ,unzip)))
4790 (home-page "http://www.jcraft.com/jsch/")
4791 (synopsis "Pure Java implementation of SSH2")
4792 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4793to connect to an SSH server and use port forwarding, X11 forwarding, file
4794transfer, etc., and you can integrate its functionality into your own Java
4795programs.")
4796 (license license:bsd-3)))
4797
4798(define-public java-commons-compress
4799 (package
4800 (name "java-commons-compress")
4801 (version "1.13")
4802 (source (origin
4803 (method url-fetch)
4804 (uri (string-append "mirror://apache/commons/compress/source/"
4805 "commons-compress-" version "-src.tar.gz"))
4806 (sha256
4807 (base32
4808 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4809 (build-system ant-build-system)
4810 (arguments
4811 `(#:jar-name "commons-compress.jar"
4812 #:phases
4813 (modify-phases %standard-phases
4814 (add-after 'unpack 'delete-bad-tests
4815 (lambda _
4816 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4817 ;; FIXME: These tests really should not fail. Maybe they are
4818 ;; indicative of problems with our Java packaging work.
4819
4820 ;; This test fails with a null pointer exception.
4821 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4822 ;; This test fails to open test resources.
4823 (delete-file "archivers/zip/ExplodeSupportTest.java")
4824
4825 ;; FIXME: This test adds a dependency on powermock, which is hard to
4826 ;; package at this point.
4827 ;; https://github.com/powermock/powermock
4828 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4829 #t)))))
4830 (inputs
4831 `(("java-junit" ,java-junit)
4832 ("java-hamcrest-core" ,java-hamcrest-core)
4833 ("java-mockito" ,java-mockito-1)
4834 ("java-xz" ,java-xz)))
4835 (home-page "https://commons.apache.org/proper/commons-compress/")
4836 (synopsis "Java library for working with compressed files")
4837 (description "The Apache Commons Compress library defines an API for
4838working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4839Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4840 (license license:asl2.0)))
4841
4842(define-public java-commons-csv
4843 (package
4844 (name "java-commons-csv")
4845 (version "1.4")
4846 (source (origin
4847 (method url-fetch)
4848 (uri (string-append "mirror://apache/commons/csv/source/"
4849 "commons-csv-" version "-src.tar.gz"))
4850 (sha256
4851 (base32
4852 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4853 (build-system ant-build-system)
4854 (arguments
4855 `(#:jar-name "commons-csv.jar"
4856 #:source-dir "src/main/java"
4857 #:tests? #f)); FIXME: requires java-h2
4858 (inputs
4859 `(("java-hamcrest-core" ,java-hamcrest-core)
4860 ("java-commons-io" ,java-commons-io)
4861 ("java-commons-lang3" ,java-commons-lang3)
4862 ("junit" ,java-junit)))
4863 (home-page "https://commons.apache.org/proper/commons-csv/")
4864 (synopsis "Read and write CSV documents")
4865 (description "Commons CSV reads and writes files in variations of the Comma
4866Separated Value (CSV) format. The most common CSV formats are predefined in the
4867CSVFormat class:
4868
4869@itemize
4870@item Microsoft Excel
4871@item Informix UNLOAD
4872@item Informix UNLOAD CSV
4873@item MySQL
4874@item RFC 4180
4875@item TDF
4876@end itemize
4877
4878Custom formats can be created using a fluent style API.")
4879 (license license:asl2.0)))
4880
4881(define-public java-osgi-annotation
4882 (package
4883 (name "java-osgi-annotation")
4884 (version "6.0.0")
4885 (source (origin
4886 (method url-fetch)
4887 (uri (string-append "https://repo1.maven.org/maven2/"
4888 "org/osgi/org.osgi.annotation/" version "/"
4889 "org.osgi.annotation-" version "-sources.jar"))
4890 (sha256
4891 (base32
4892 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4893 (build-system ant-build-system)
4894 (arguments
4895 `(#:tests? #f ; no tests
4896 #:jar-name "osgi-annotation.jar"))
4897 (home-page "https://www.osgi.org")
4898 (synopsis "Annotation module of OSGi framework")
4899 (description
4900 "OSGi, for Open Services Gateway initiative framework, is a module system
4901and service platform for the Java programming language. This package contains
4902the OSGi annotation module, providing additional services to help dynamic
4903components.")
4904 (license license:asl2.0)))
4905
4906(define-public java-osgi-core
4907 (package
4908 (name "java-osgi-core")
4909 (version "6.0.0")
4910 (source (origin
4911 (method url-fetch)
4912 (uri (string-append "https://repo1.maven.org/maven2/"
4913 "org/osgi/org.osgi.core/" version "/"
4914 "org.osgi.core-" version "-sources.jar"))
4915 (sha256
4916 (base32
4917 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4918 (build-system ant-build-system)
4919 (arguments
4920 `(#:tests? #f ; no tests
4921 #:jar-name "osgi-core.jar"))
4922 (inputs
4923 `(("java-osgi-annotation" ,java-osgi-annotation)))
4924 (home-page "https://www.osgi.org")
4925 (synopsis "Core module of OSGi framework")
4926 (description
4927 "OSGi, for Open Services Gateway initiative framework, is a module system
4928and service platform for the Java programming language. This package contains
4929the OSGi Core module.")
4930 (license license:asl2.0)))
4931
4932(define-public java-osgi-service-event
4933 (package
4934 (name "java-osgi-service-event")
4935 (version "1.3.1")
4936 (source (origin
4937 (method url-fetch)
4938 (uri (string-append "https://repo1.maven.org/maven2/"
4939 "org/osgi/org.osgi.service.event/"
4940 version "/org.osgi.service.event-"
4941 version "-sources.jar"))
4942 (sha256
4943 (base32
4944 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4945 (build-system ant-build-system)
4946 (arguments
4947 `(#:tests? #f ; no tests
4948 #:jar-name "osgi-service-event.jar"))
4949 (inputs
4950 `(("java-osgi-annotation" ,java-osgi-annotation)
4951 ("java-osgi-core" ,java-osgi-core)))
4952 (home-page "https://www.osgi.org")
4953 (synopsis "OSGi service event module")
4954 (description
4955 "OSGi, for Open Services Gateway initiative framework, is a module system
4956and service platform for the Java programming language. This package contains
4957the OSGi @code{org.osgi.service.event} module.")
4958 (license license:asl2.0)))
4959
4960(define-public java-eclipse-osgi
4961 (package
4962 (name "java-eclipse-osgi")
4963 (version "3.11.3")
4964 (source (origin
4965 (method url-fetch)
4966 (uri (string-append "https://repo1.maven.org/maven2/"
4967 "org/eclipse/platform/org.eclipse.osgi/"
4968 version "/org.eclipse.osgi-"
4969 version "-sources.jar"))
4970 (sha256
4971 (base32
4972 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4973 (build-system ant-build-system)
4974 (arguments
4975 `(#:tests? #f ; no tests included
4976 #:jar-name "eclipse-equinox-osgi.jar"))
4977 (inputs
4978 `(("java-osgi-annotation" ,java-osgi-annotation)))
4979 (home-page "http://www.eclipse.org/equinox/")
4980 (synopsis "Eclipse Equinox OSGi framework")
4981 (description "This package provides an implementation of the OSGi Core
4982specification.")
4983 (license license:epl1.0)))
4984
4985(define-public java-eclipse-equinox-common
4986 (package
4987 (name "java-eclipse-equinox-common")
4988 (version "3.8.0")
4989 (source (origin
4990 (method url-fetch)
4991 (uri (string-append "https://repo1.maven.org/maven2/"
4992 "org/eclipse/platform/org.eclipse.equinox.common/"
4993 version "/org.eclipse.equinox.common-"
4994 version "-sources.jar"))
4995 (sha256
4996 (base32
4997 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4998 (build-system ant-build-system)
4999 (arguments
5000 `(#:tests? #f ; no tests included
5001 #:jar-name "eclipse-equinox-common.jar"))
5002 (inputs
5003 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5004 (home-page "http://www.eclipse.org/equinox/")
5005 (synopsis "Common Eclipse runtime")
5006 (description "This package provides the common Eclipse runtime.")
5007 (license license:epl1.0)))
5008
5009(define-public java-eclipse-core-jobs
5010 (package
5011 (name "java-eclipse-core-jobs")
5012 (version "3.8.0")
5013 (source (origin
5014 (method url-fetch)
5015 (uri (string-append "https://repo1.maven.org/maven2/"
5016 "org/eclipse/platform/org.eclipse.core.jobs/"
5017 version "/org.eclipse.core.jobs-"
5018 version "-sources.jar"))
5019 (sha256
5020 (base32
5021 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5022 (build-system ant-build-system)
5023 (arguments
5024 `(#:tests? #f ; no tests included
5025 #:jar-name "eclipse-core-jobs.jar"))
5026 (inputs
5027 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5028 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5029 (home-page "http://www.eclipse.org/equinox/")
5030 (synopsis "Eclipse jobs mechanism")
5031 (description "This package provides the Eclipse jobs mechanism.")
5032 (license license:epl1.0)))
5033
5034(define-public java-eclipse-equinox-registry
5035 (package
5036 (name "java-eclipse-equinox-registry")
5037 (version "3.6.100")
5038 (source (origin
5039 (method url-fetch)
5040 (uri (string-append "https://repo1.maven.org/maven2/"
5041 "org/eclipse/platform/org.eclipse.equinox.registry/"
5042 version "/org.eclipse.equinox.registry-"
5043 version "-sources.jar"))
5044 (sha256
5045 (base32
5046 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5047 (build-system ant-build-system)
5048 (arguments
5049 `(#:tests? #f ; no tests included
5050 #:jar-name "eclipse-equinox-registry.jar"))
5051 (inputs
5052 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5053 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5054 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5055 (home-page "http://www.eclipse.org/equinox/")
5056 (synopsis "Eclipse extension registry support")
5057 (description "This package provides support for the Eclipse extension
5058registry.")
5059 (license license:epl1.0)))
5060
5061(define-public java-eclipse-equinox-app
5062 (package
5063 (name "java-eclipse-equinox-app")
5064 (version "1.3.400")
5065 (source (origin
5066 (method url-fetch)
5067 (uri (string-append "https://repo1.maven.org/maven2/"
5068 "org/eclipse/platform/org.eclipse.equinox.app/"
5069 version "/org.eclipse.equinox.app-"
5070 version "-sources.jar"))
5071 (sha256
5072 (base32
5073 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5074 (build-system ant-build-system)
5075 (arguments
5076 `(#:tests? #f ; no tests included
5077 #:jar-name "eclipse-equinox-app.jar"))
5078 (inputs
5079 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5080 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5081 ("java-eclipse-osgi" ,java-eclipse-osgi)
5082 ("java-osgi-service-event" ,java-osgi-service-event)))
5083 (home-page "http://www.eclipse.org/equinox/")
5084 (synopsis "Equinox application container")
5085 (description "This package provides the Equinox application container for
5086Eclipse.")
5087 (license license:epl1.0)))
5088
5089(define-public java-eclipse-equinox-preferences
5090 (package
5091 (name "java-eclipse-equinox-preferences")
5092 (version "3.6.1")
5093 (source (origin
5094 (method url-fetch)
5095 (uri (string-append "https://repo1.maven.org/maven2/"
5096 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5097 version "/org.eclipse.equinox.preferences-"
5098 version "-sources.jar"))
5099 (sha256
5100 (base32
5101 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5102 (build-system ant-build-system)
5103 (arguments
5104 `(#:tests? #f ; no tests included
5105 #:jar-name "eclipse-equinox-preferences.jar"))
5106 (inputs
5107 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5108 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5109 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5110 (home-page "http://www.eclipse.org/equinox/")
5111 (synopsis "Eclipse preferences mechanism")
5112 (description "This package provides the Eclipse preferences mechanism with
5113the module @code{org.eclipse.equinox.preferences}.")
5114 (license license:epl1.0)))
5115
5116(define-public java-eclipse-core-contenttype
5117 (package
5118 (name "java-eclipse-core-contenttype")
5119 (version "3.5.100")
5120 (source (origin
5121 (method url-fetch)
5122 (uri (string-append "https://repo1.maven.org/maven2/"
5123 "org/eclipse/platform/org.eclipse.core.contenttype/"
5124 version "/org.eclipse.core.contenttype-"
5125 version "-sources.jar"))
5126 (sha256
5127 (base32
5128 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5129 (build-system ant-build-system)
5130 (arguments
5131 `(#:tests? #f ; no tests included
5132 #:jar-name "eclipse-core-contenttype.jar"))
5133 (inputs
5134 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5135 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5136 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5137 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5138 (home-page "http://www.eclipse.org/")
5139 (synopsis "Eclipse content mechanism")
5140 (description "This package provides the Eclipse content mechanism in the
5141@code{org.eclipse.core.contenttype} module.")
5142 (license license:epl1.0)))
5143
5144(define-public java-eclipse-core-runtime
5145 (package
5146 (name "java-eclipse-core-runtime")
5147 (version "3.12.0")
5148 (source (origin
5149 (method url-fetch)
5150 (uri (string-append "https://repo1.maven.org/maven2/"
5151 "org/eclipse/platform/org.eclipse.core.runtime/"
5152 version "/org.eclipse.core.runtime-"
5153 version "-sources.jar"))
5154 (sha256
5155 (base32
5156 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5157 (build-system ant-build-system)
5158 (arguments
5159 `(#:tests? #f ; no tests included
5160 #:jar-name "eclipse-core-runtime.jar"))
5161 (inputs
5162 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5163 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5164 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5165 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5166 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5167 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5168 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5169 (home-page "https://www.eclipse.org/")
5170 (synopsis "Eclipse core runtime")
5171 (description "This package provides the Eclipse core runtime with the
5172module @code{org.eclipse.core.runtime}.")
5173 (license license:epl1.0)))
5174
5175(define-public java-eclipse-core-filesystem
5176 (package
5177 (name "java-eclipse-core-filesystem")
5178 (version "1.6.1")
5179 (source (origin
5180 (method url-fetch)
5181 (uri (string-append "https://repo1.maven.org/maven2/"
5182 "org/eclipse/platform/org.eclipse.core.filesystem/"
5183 version "/org.eclipse.core.filesystem-"
5184 version "-sources.jar"))
5185 (sha256
5186 (base32
5187 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5188 (build-system ant-build-system)
5189 (arguments
5190 `(#:tests? #f ; no tests included
5191 #:jar-name "eclipse-core-filesystem.jar"))
5192 (inputs
5193 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5194 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5195 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5196 (home-page "https://www.eclipse.org/")
5197 (synopsis "Eclipse core file system")
5198 (description "This package provides the Eclipse core file system with the
5199module @code{org.eclipse.core.filesystem}.")
5200 (license license:epl1.0)))
5201
5202(define-public java-eclipse-core-expressions
5203 (package
5204 (name "java-eclipse-core-expressions")
5205 (version "3.5.100")
5206 (source (origin
5207 (method url-fetch)
5208 (uri (string-append "https://repo1.maven.org/maven2/"
5209 "org/eclipse/platform/org.eclipse.core.expressions/"
5210 version "/org.eclipse.core.expressions-"
5211 version "-sources.jar"))
5212 (sha256
5213 (base32
5214 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5215 (build-system ant-build-system)
5216 (arguments
5217 `(#:tests? #f ; no tests included
5218 #:jar-name "eclipse-core-expressions.jar"))
5219 (inputs
5220 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5221 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5222 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5223 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5224 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5225 (home-page "https://www.eclipse.org/")
5226 (synopsis "Eclipse core expression language")
5227 (description "This package provides the Eclipse core expression language
5228with the @code{org.eclipse.core.expressions} module.")
5229 (license license:epl1.0)))
5230
5231(define-public java-eclipse-core-variables
5232 (package
5233 (name "java-eclipse-core-variables")
5234 (version "3.3.0")
5235 (source (origin
5236 (method url-fetch)
5237 (uri (string-append "https://repo1.maven.org/maven2/"
5238 "org/eclipse/platform/org.eclipse.core.variables/"
5239 version "/org.eclipse.core.variables-"
5240 version "-sources.jar"))
5241 (sha256
5242 (base32
5243 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5244 (build-system ant-build-system)
5245 (arguments
5246 `(#:tests? #f ; no tests included
5247 #:jar-name "eclipse-core-variables.jar"))
5248 (inputs
5249 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5250 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5251 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5252 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5253 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5254 (home-page "https://www.eclipse.org/platform")
5255 (synopsis "Eclipse core variables")
5256 (description "This package provides the Eclipse core variables module
5257@code{org.eclipse.core.variables}.")
5258 (license license:epl1.0)))
5259
5260(define-public java-eclipse-ant-core
5261 (package
5262 (name "java-eclipse-ant-core")
5263 (version "3.4.100")
5264 (source (origin
5265 (method url-fetch)
5266 (uri (string-append "https://repo1.maven.org/maven2/"
5267 "org/eclipse/platform/org.eclipse.ant.core/"
5268 version "/org.eclipse.ant.core-"
5269 version "-sources.jar"))
5270 (sha256
5271 (base32
5272 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5273 (build-system ant-build-system)
5274 (arguments
5275 `(#:tests? #f ; no tests included
5276 #:jar-name "eclipse-ant-core.jar"))
5277 (inputs
5278 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5279 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5280 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5281 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5282 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5283 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5284 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5285 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5286 (home-page "https://www.eclipse.org/platform")
5287 (synopsis "Ant build tool core libraries")
5288 (description "This package provides the ant build tool core libraries with
5289the module @code{org.eclipse.ant.core}.")
5290 (license license:epl1.0)))
5291
5292(define-public java-eclipse-core-resources
5293 (package
5294 (name "java-eclipse-core-resources")
5295 (version "3.11.1")
5296 (source (origin
5297 (method url-fetch)
5298 (uri (string-append "https://repo1.maven.org/maven2/"
5299 "org/eclipse/platform/org.eclipse.core.resources/"
5300 version "/org.eclipse.core.resources-"
5301 version "-sources.jar"))
5302 (sha256
5303 (base32
5304 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5305 (build-system ant-build-system)
5306 (arguments
5307 `(#:tests? #f ; no tests included
5308 #:jar-name "eclipse-core-resources.jar"))
5309 (inputs
5310 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5311 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5312 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5313 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5314 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5315 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5316 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5317 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5318 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5319 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5320 (home-page "https://www.eclipse.org/")
5321 (synopsis "Eclipse core resource management")
5322 (description "This package provides the Eclipse core resource management
5323module @code{org.eclipse.core.resources}.")
5324 (license license:epl1.0)))
5325
5326(define-public java-eclipse-compare-core
5327 (package
5328 (name "java-eclipse-compare-core")
5329 (version "3.6.0")
5330 (source (origin
5331 (method url-fetch)
5332 (uri (string-append "https://repo1.maven.org/maven2/"
5333 "org/eclipse/platform/org.eclipse.compare.core/"
5334 version "/org.eclipse.compare.core-"
5335 version "-sources.jar"))
5336 (sha256
5337 (base32
5338 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5339 (build-system ant-build-system)
5340 (arguments
5341 `(#:tests? #f ; no tests included
5342 #:jar-name "eclipse-compare-core.jar"))
5343 (inputs
5344 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5345 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5346 ("java-eclipse-osgi" ,java-eclipse-osgi)
5347 ("java-icu4j" ,java-icu4j)))
5348 (home-page "https://www.eclipse.org/")
5349 (synopsis "Eclipse core compare support")
5350 (description "This package provides the Eclipse core compare support
5351module @code{org.eclipse.compare.core}.")
5352 (license license:epl1.0)))
5353
5354(define-public java-eclipse-team-core
5355 (package
5356 (name "java-eclipse-team-core")
5357 (version "3.8.0")
5358 (source (origin
5359 (method url-fetch)
5360 (uri (string-append "https://repo1.maven.org/maven2/"
5361 "org/eclipse/platform/org.eclipse.team.core/"
5362 version "/org.eclipse.team.core-"
5363 version "-sources.jar"))
5364 (sha256
5365 (base32
5366 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5367 (build-system ant-build-system)
5368 (arguments
5369 `(#:tests? #f ; no tests included
5370 #:jar-name "eclipse-team-core.jar"))
5371 (inputs
5372 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5373 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5374 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5375 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5376 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5377 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5378 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5379 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5380 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5381 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5382 (home-page "https://www.eclipse.org/platform")
5383 (synopsis "Eclipse team support core")
5384 (description "This package provides the Eclipse team support core module
5385@code{org.eclipse.team.core}.")
5386 (license license:epl1.0)))
5387
5388(define-public java-eclipse-core-commands
5389 (package
5390 (name "java-eclipse-core-commands")
5391 (version "3.8.1")
5392 (source (origin
5393 (method url-fetch)
5394 (uri (string-append "https://repo1.maven.org/maven2/"
5395 "org/eclipse/platform/org.eclipse.core.commands/"
5396 version "/org.eclipse.core.commands-"
5397 version "-sources.jar"))
5398 (sha256
5399 (base32
5400 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5401 (build-system ant-build-system)
5402 (arguments
5403 `(#:tests? #f ; no tests included
5404 #:jar-name "eclipse-core-commands.jar"))
5405 (inputs
5406 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5407 (home-page "https://www.eclipse.org/platform")
5408 (synopsis "Eclipse core commands")
5409 (description "This package provides Eclipse core commands in the module
5410@code{org.eclipse.core.commands}.")
5411 (license license:epl1.0)))
5412
5413(define-public java-eclipse-text
5414 (package
5415 (name "java-eclipse-text")
5416 (version "3.6.0")
5417 (source (origin
5418 (method url-fetch)
5419 (uri (string-append "https://repo1.maven.org/maven2/"
5420 "org/eclipse/platform/org.eclipse.text/"
5421 version "/org.eclipse.text-"
5422 version "-sources.jar"))
5423 (sha256
5424 (base32
5425 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5426 (build-system ant-build-system)
5427 (arguments
5428 `(#:tests? #f ; no tests included
5429 #:jar-name "eclipse-text.jar"
5430 #:phases
5431 (modify-phases %standard-phases
5432 ;; When creating a new category we must make sure that the new list
5433 ;; matches List<Position>. By default it seems to be too generic
5434 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5435 ;; Without this we get this error:
5436 ;;
5437 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5438 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5439 ;; [javac] fPositions.put(category, new ArrayList<>());
5440 ;; [javac] ^
5441 ;; [javac] required: String,List<Position>
5442 ;; [javac] found: String,ArrayList<Object>
5443 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5444 ;; to List<Position> by method invocation conversion
5445 ;; [javac] where K,V are type-variables:
5446 ;; [javac] K extends Object declared in interface Map
5447 ;; [javac] V extends Object declared in interface Map
5448 ;;
5449 ;; I don't know if this is a good fix. I suspect it is not, but it
5450 ;; seems to work.
5451 (add-after 'unpack 'fix-compilation-error
5452 (lambda _
5453 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5454 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5455 "Positions.put(category, new ArrayList<Position>());"))
5456 #t)))))
5457 (inputs
5458 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5459 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5460 ("java-icu4j" ,java-icu4j)))
5461 (home-page "http://www.eclipse.org/platform")
5462 (synopsis "Eclipse text library")
5463 (description "Platform Text is part of the Platform UI project and
5464provides the basic building blocks for text and text editors within Eclipse
5465and contributes the Eclipse default text editor.")
5466 (license license:epl1.0)))
5467
5468(define-public java-eclipse-jdt-core
5469 (package
5470 (name "java-eclipse-jdt-core")
5471 (version "3.12.3")
5472 (source (origin
5473 (method url-fetch)
5474 (uri (string-append "https://repo1.maven.org/maven2/"
5475 "org/eclipse/jdt/org.eclipse.jdt.core/"
5476 version "/org.eclipse.jdt.core-"
5477 version "-sources.jar"))
5478 (sha256
5479 (base32
5480 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5481 (build-system ant-build-system)
5482 (arguments
5483 `(#:tests? #f ; no tests included
5484 #:jar-name "eclipse-jdt-core.jar"))
5485 (inputs
5486 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5487 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5488 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5489 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5490 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5491 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5492 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5493 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5494 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5495 ("java-eclipse-osgi" ,java-eclipse-osgi)
5496 ("java-eclipse-text" ,java-eclipse-text)))
5497 (home-page "https://www.eclipse.org/jdt")
5498 (synopsis "Java development tools core libraries")
5499 (description "This package provides the core libraries of the Eclipse Java
5500development tools.")
5501 (license license:epl1.0)))
5502
5503(define-public java-javax-mail
5504 (package
5505 (name "java-javax-mail")
5506 (version "1.5.6")
5507 (source (origin
5508 (method url-fetch)
5509 (uri (string-append "https://repo1.maven.org/maven2/"
5510 "com/sun/mail/javax.mail/"
5511 version "/javax.mail-"
5512 version "-sources.jar"))
5513 (sha256
5514 (base32
5515 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5516 (build-system ant-build-system)
5517 (arguments
5518 `(#:tests? #f ; no tests
5519 #:jar-name "javax-mail.jar"))
5520 (home-page "https://javamail.java.net")
5521 (synopsis "Reference implementation of the JavaMail API")
5522 (description
5523 "This package provides versions of the JavaMail API implementation, IMAP,
5524SMTP, and POP3 service providers, some examples, and documentation for the
5525JavaMail API.")
5526 ;; GPLv2 only with "classpath exception".
5527 (license license:gpl2)))
5528
5529(define-public java-log4j-api
5530 (package
5531 (name "java-log4j-api")
5532 (version "2.4.1")
5533 (source (origin
5534 (method url-fetch)
5535 (uri (string-append "mirror://apache/logging/log4j/" version
5536 "/apache-log4j-" version "-src.tar.gz"))
5537 (sha256
5538 (base32
5539 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5540 (build-system ant-build-system)
5541 (arguments
5542 `(#:tests? #f ; tests require unpackaged software
5543 #:jar-name "log4j-api.jar"
5544 #:make-flags
5545 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5546 "/share/java"))
5547 #:phases
5548 (modify-phases %standard-phases
5549 (add-after 'unpack 'enter-dir
5550 (lambda _ (chdir "log4j-api") #t))
5551 ;; FIXME: The tests require additional software that has not been
5552 ;; packaged yet, such as
5553 ;; * org.apache.maven
5554 ;; * org.apache.felix
5555 (add-after 'enter-dir 'delete-tests
5556 (lambda _ (delete-file-recursively "src/test") #t)))))
5557 (inputs
5558 `(("java-osgi-core" ,java-osgi-core)
5559 ("java-hamcrest-core" ,java-hamcrest-core)
5560 ("java-junit" ,java-junit)))
5561 (home-page "http://logging.apache.org/log4j/2.x/")
5562 (synopsis "API module of the Log4j logging framework for Java")
5563 (description
5564 "This package provides the API module of the Log4j logging framework for
5565Java.")
5566 (license license:asl2.0)))
5567
5568(define-public java-log4j-core
5569 (package
5570 (inherit java-log4j-api)
5571 (name "java-log4j-core")
5572 (inputs
5573 `(("java-osgi-core" ,java-osgi-core)
5574 ("java-hamcrest-core" ,java-hamcrest-core)
5575 ("java-log4j-api" ,java-log4j-api)
5576 ("java-mail" ,java-mail)
5577 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5578 ("java-lmax-disruptor" ,java-lmax-disruptor)
5579 ("java-kafka" ,java-kafka-clients)
5580 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5581 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5582 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5583 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5584 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5585 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5586 ("java-commons-compress" ,java-commons-compress)
5587 ("java-commons-csv" ,java-commons-csv)
5588 ("java-jeromq" ,java-jeromq)
5589 ("java-junit" ,java-junit)))
5590 (native-inputs
5591 `(("hamcrest" ,java-hamcrest-all)
5592 ("java-commons-io" ,java-commons-io)
5593 ("java-commons-lang3" ,java-commons-lang3)
5594 ("slf4j" ,java-slf4j-api)))
5595 (arguments
5596 `(#:tests? #f ; tests require more dependencies
5597 #:test-dir "src/test"
5598 #:source-dir "src/main/java"
5599 #:jar-name "log4j-core.jar"
5600 #:jdk ,icedtea-8
5601 #:make-flags
5602 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5603 "/share/java"))
5604 #:phases
5605 (modify-phases %standard-phases
5606 (add-after 'unpack 'enter-dir
5607 (lambda _ (chdir "log4j-core") #t)))))
5608 (synopsis "Core component of the Log4j framework")
5609 (description "This package provides the core component of the Log4j
5610logging framework for Java.")))
5611
5612(define-public java-log4j-1.2-api
5613 (package
5614 (inherit java-log4j-api)
5615 (name "java-log4j-1.2-api")
5616 (arguments
5617 `(#:jar-name "java-log4j-1.2-api.jar"
5618 #:source-dir "log4j-1.2-api/src/main/java"
5619 #:jdk ,icedtea-8
5620 ;; Tests require maven-model (and other maven subprojects), which is a
5621 ;; cyclic dependency.
5622 #:tests? #f))
5623 (inputs
5624 `(("log4j-api" ,java-log4j-api)
5625 ("log4j-core" ,java-log4j-core)
5626 ("osgi-core" ,java-osgi-core)
5627 ("eclipse-osgi" ,java-eclipse-osgi)
5628 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5629
5630(define-public java-commons-cli
5631 (package
5632 (name "java-commons-cli")
5633 (version "1.4")
5634 (source (origin
5635 (method url-fetch)
5636 (uri (string-append "mirror://apache/commons/cli/source/"
5637 "commons-cli-" version "-src.tar.gz"))
5638 (sha256
5639 (base32
5640 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5641 (build-system ant-build-system)
5642 ;; TODO: javadoc
5643 (arguments
5644 `(#:jar-name "commons-cli.jar"))
5645 (native-inputs
5646 `(("java-junit" ,java-junit)
5647 ("java-hamcrest-core" ,java-hamcrest-core)))
5648 (home-page "http://commons.apache.org/cli/")
5649 (synopsis "Command line arguments and options parsing library")
5650 (description "The Apache Commons CLI library provides an API for parsing
5651command line options passed to programs. It is also able to print help
5652messages detailing the options available for a command line tool.
5653
5654Commons CLI supports different types of options:
5655
5656@itemize
5657@item POSIX like options (ie. tar -zxvf foo.tar.gz)
5658@item GNU like long options (ie. du --human-readable --max-depth=1)
5659@item Java like properties (ie. java -Djava.awt.headless=true Foo)
5660@item Short options with value attached (ie. gcc -O2 foo.c)
5661@item long options with single hyphen (ie. ant -projecthelp)
5662@end itemize
5663
5664This is a part of the Apache Commons Project.")
5665 (license license:asl2.0)))
5666
5667(define-public java-commons-codec
5668 (package
5669 (name "java-commons-codec")
5670 (version "1.10")
5671 (source (origin
5672 (method url-fetch)
5673 (uri (string-append "mirror://apache/commons/codec/source/"
5674 "commons-codec-" version "-src.tar.gz"))
5675 (sha256
5676 (base32
5677 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5678 (build-system ant-build-system)
5679 (outputs '("out" "doc"))
5680 (arguments
5681 `(#:test-target "test"
5682 #:make-flags
5683 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5684 (junit (assoc-ref %build-inputs "java-junit")))
5685 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5686 (string-append "-Dhamcrest.jar=" hamcrest
5687 "/share/java/hamcrest-core.jar")
5688 ;; Do not append version to jar.
5689 "-Dfinal.name=commons-codec"))
5690 #:phases
5691 (modify-phases %standard-phases
5692 (add-after 'build 'build-javadoc ant-build-javadoc)
5693 (replace 'install (install-jars "dist"))
5694 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5695 (native-inputs
5696 `(("java-junit" ,java-junit)
5697 ("java-hamcrest-core" ,java-hamcrest-core)))
5698 (home-page "http://commons.apache.org/codec/")
5699 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5700 (description "The codec package contains simple encoder and decoders for
5701various formats such as Base64 and Hexadecimal. In addition to these widely
5702used encoders and decoders, the codec package also maintains a collection of
5703phonetic encoding utilities.
5704
5705This is a part of the Apache Commons Project.")
5706 (license license:asl2.0)))
5707
5708(define-public java-commons-daemon
5709 (package
5710 (name "java-commons-daemon")
5711 (version "1.0.15")
5712 (source (origin
5713 (method url-fetch)
5714 (uri (string-append "mirror://apache/commons/daemon/source/"
5715 "commons-daemon-" version "-src.tar.gz"))
5716 (sha256
5717 (base32
5718 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5719 (build-system ant-build-system)
5720 (arguments
5721 `(#:test-target "test"
5722 #:phases
5723 (modify-phases %standard-phases
5724 (add-after 'build 'build-javadoc ant-build-javadoc)
5725 (replace 'install (install-jars "dist"))
5726 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5727 (native-inputs
5728 `(("java-junit" ,java-junit)))
5729 (home-page "http://commons.apache.org/daemon/")
5730 (synopsis "Library to launch Java applications as daemons")
5731 (description "The Daemon package from Apache Commons can be used to
5732implement Java applications which can be launched as daemons. For example the
5733program will be notified about a shutdown so that it can perform cleanup tasks
5734before its process of execution is destroyed by the operation system.
5735
5736This package contains the Java library. You will also need the actual binary
5737for your architecture which is provided by the jsvc package.
5738
5739This is a part of the Apache Commons Project.")
5740 (license license:asl2.0)))
5741
5742(define-public java-javaewah
5743 (package
5744 (name "java-javaewah")
5745 (version "1.1.6")
5746 (source (origin
5747 (method url-fetch)
5748 (uri (string-append "https://github.com/lemire/javaewah/"
5749 "archive/JavaEWAH-" version ".tar.gz"))
5750 (sha256
5751 (base32
5752 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5753 (build-system ant-build-system)
5754 (arguments `(#:jar-name "javaewah.jar"))
5755 (inputs
5756 `(("java-junit" ,java-junit)
5757 ("java-hamcrest-core" ,java-hamcrest-core)))
5758 (home-page "https://github.com/lemire/javaewah")
5759 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5760 (description "This is a word-aligned compressed variant of the Java
5761@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5762compression scheme. It can be used to implement bitmap indexes.
5763
5764The goal of word-aligned compression is not to achieve the best compression,
5765but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5766cycles, maybe at the expense of storage. However, the EWAH scheme is always
5767more efficient storage-wise than an uncompressed bitmap (as implemented in the
5768@code{BitSet} class by Sun).")
5769 ;; GPL2.0 derivates are explicitly allowed.
5770 (license license:asl2.0)))
5771
5772(define-public java-slf4j-api
5773 (package
5774 (name "java-slf4j-api")
5775 (version "1.7.25")
5776 (source (origin
5777 (method url-fetch)
5778 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5779 version ".tar.gz"))
5780 (sha256
5781 (base32
5782 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5783 (modules '((guix build utils)))
5784 ;; Delete bundled jars.
5785 (snippet
5786 '(begin
5787 (for-each delete-file (find-files "." "\\.jar$"))
5788 #t))))
5789 (build-system ant-build-system)
5790 (arguments
5791 `(#:jar-name "slf4j-api.jar"
5792 #:source-dir "slf4j-api/src/main"
5793 #:test-dir "slf4j-api/src/test"
5794 #:phases
5795 (modify-phases %standard-phases
5796 (add-after 'build 'regenerate-jar
5797 (lambda _
5798 ;; pom.xml ignores these files in the jar creation process. If we don't,
5799 ;; we get the error "This code should have never made it into slf4j-api.jar"
5800 (delete-file-recursively "build/classes/org/slf4j/impl")
5801 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5802 "build/classes" "."))))
5803 (add-before 'check 'dont-test-abstract-classes
5804 (lambda _
5805 ;; abstract classes are not meant to be run with junit
5806 (substitute* "build.xml"
5807 (("<include name=\"\\*\\*/\\*Test.java\" />")
5808 (string-append "<include name=\"**/*Test.java\" />"
5809 "<exclude name=\"**/MultithreadedInitializationTest"
5810 ".java\" />"))))))))
5811 (inputs
5812 `(("java-junit" ,java-junit)
5813 ("java-hamcrest-core" ,java-hamcrest-core)))
5814 (home-page "https://www.slf4j.org/")
5815 (synopsis "Simple logging facade for Java")
5816 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5817simple facade or abstraction for various logging
5818frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5819allowing the end user to plug in the desired logging framework at deployment
5820time.")
5821 (license license:expat)))
5822
5823(define java-slf4j-api-bootstrap
5824 (package
5825 (inherit java-slf4j-api)
5826 (name "java-slf4j-api-bootstrap")
5827 (inputs `())
5828 (arguments
5829 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5830 ((#:tests? _ #f) #f)))))
5831
5832(define-public java-slf4j-simple
5833 (package
5834 (name "java-slf4j-simple")
5835 (version "1.7.25")
5836 (source (package-source java-slf4j-api))
5837 (build-system ant-build-system)
5838 (arguments
5839 `(#:jar-name "slf4j-simple.jar"
5840 #:source-dir "slf4j-simple/src/main"
5841 #:test-dir "slf4j-simple/src/test"
5842 #:phases
5843 (modify-phases %standard-phases
5844 ;; The tests need some test classes from slf4j-api
5845 (add-before 'check 'build-slf4j-api-test-helpers
5846 (lambda _
5847 ;; Add current dir to CLASSPATH ...
5848 (setenv "CLASSPATH"
5849 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5850 ;; ... and build test helper classes here:
5851 (zero?
5852 (apply system*
5853 `("javac" "-d" "."
5854 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5855 (inputs
5856 `(("java-junit" ,java-junit)
5857 ("java-hamcrest-core" ,java-hamcrest-core)
5858 ("java-slf4j-api" ,java-slf4j-api)))
5859 (home-page "https://www.slf4j.org/")
5860 (synopsis "Simple implementation of simple logging facade for Java")
5861 (description "SLF4J binding for the Simple implementation, which outputs
5862all events to System.err. Only messages of level INFO and higher are
5863printed.")
5864 (license license:expat)))
5865
5866(define-public antlr2
5867 (package
5868 (name "antlr2")
5869 (version "2.7.7")
5870 (source (origin
5871 (method url-fetch)
5872 (uri (string-append "http://www.antlr2.org/download/antlr-"
5873 version ".tar.gz"))
5874 (sha256
5875 (base32
5876 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5877 (modules '((guix build utils)))
5878 (snippet
5879 '(begin
5880 (delete-file "antlr.jar")
5881 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5882 (("#include <map>")
5883 (string-append
5884 "#include <map>\n"
5885 "#define EOF (-1)\n"
5886 "#include <strings.h>")))
5887 (substitute* "configure"
5888 (("/bin/sh") "sh"))
5889 #t))))
5890 (build-system gnu-build-system)
5891 (arguments
5892 `(#:tests? #f ; no test target
5893 #:imported-modules ((guix build ant-build-system)
5894 (guix build syscalls)
5895 ,@%gnu-build-system-modules)
5896 #:modules (((guix build ant-build-system) #:prefix ant:)
5897 (guix build gnu-build-system)
5898 (guix build utils))
5899 #:phases
5900 (modify-phases %standard-phases
5901 (add-after 'install 'strip-jar-timestamps
5902 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5903 (add-after 'configure 'fix-bin-ls
5904 (lambda _
5905 (substitute* (find-files "." "Makefile")
5906 (("/bin/ls") "ls"))
5907 #t)))))
5908 (native-inputs
5909 `(("which" ,which)
5910 ("zip" ,zip)
5911 ("java" ,icedtea "jdk")))
5912 (inputs
5913 `(("java" ,icedtea)))
5914 (home-page "http://www.antlr2.org")
5915 (synopsis "Framework for constructing recognizers, compilers, and translators")
5916 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5917is a language tool that provides a framework for constructing recognizers,
5918compilers, and translators from grammatical descriptions containing Java, C#,
5919C++, or Python actions. ANTLR provides excellent support for tree construction,
5920tree walking, and translation.")
5921 (license license:public-domain)))
5922
5923(define-public java-stringtemplate-3
5924 (package
5925 (name "java-stringtemplate")
5926 (version "3.2.1")
5927 (source (origin
5928 (method url-fetch)
5929 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5930 "gh-pages/download/stringtemplate-"
5931 version ".tar.gz"))
5932 (sha256
5933 (base32
5934 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5935 (build-system ant-build-system)
5936 (arguments
5937 `(#:jar-name (string-append ,name "-" ,version ".jar")
5938 #:test-dir "test"
5939 #:modules ((guix build ant-build-system)
5940 (guix build utils)
5941 (srfi srfi-1))
5942 #:phases
5943 (modify-phases %standard-phases
5944 (add-before 'check 'fix-tests
5945 (lambda _
5946 (substitute* "build.xml"
5947 (("\\$\\{test.home\\}/java")
5948 "${test.home}/org"))
5949 #t))
5950 (add-before 'build 'generate-grammar
5951 (lambda _
5952 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5953 (every (lambda (file)
5954 (format #t "~a\n" file)
5955 (zero? (system* "antlr" file)))
5956 '("template.g" "angle.bracket.template.g" "action.g"
5957 "eval.g" "group.g" "interface.g"))))))))
5958 (native-inputs
5959 `(("antlr" ,antlr2)
5960 ("java-junit" ,java-junit)))
5961 (home-page "http://www.stringtemplate.org")
5962 (synopsis "Template engine to generate formatted text output")
5963 (description "StringTemplate is a java template engine (with ports for C#,
5964Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5965or any other formatted text output. StringTemplate is particularly good at
5966code generators, multiple site skins, and internationalization / localization.
5967StringTemplate also powers ANTLR.")
5968 (license license:bsd-3)))
5969
5970;; antlr3 is partially written using antlr3 grammar files. It also depends on
5971;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5972;; files and uses antlr3 at runtime. The latest version requires a recent version
5973;; of antlr3 at runtime.
5974;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5975;; This version of ST4 is sufficient for the latest antlr3.
5976;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5977;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5978;; against the latest ST4.
5979;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5980;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5981;; only grammar files with the antlr2 syntax.
5982;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5983
5984(define-public java-stringtemplate
5985 (package (inherit java-stringtemplate-3)
5986 (name "java-stringtemplate")
5987 (version "4.0.8")
5988 (source (origin
5989 (method url-fetch)
5990 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5991 version ".tar.gz"))
5992 (file-name (string-append name "-" version ".tar.gz"))
5993 (sha256
5994 (base32
5995 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5996 (build-system ant-build-system)
5997 (arguments
5998 `(#:jar-name (string-append ,name "-" ,version ".jar")
5999 #:tests? #f ; FIXME: tests fail for unknown reasons
6000 #:test-dir "test"
6001 #:modules ((guix build ant-build-system)
6002 (guix build utils)
6003 (srfi srfi-1))
6004 #:phases
6005 (modify-phases %standard-phases
6006 (add-before 'check 'fix-test-target
6007 (lambda _
6008 (substitute* "build.xml"
6009 (("\\$\\{test.home\\}/java") "${test.home}/")
6010 (("\\*Test.java") "Test*.java"))
6011 #t))
6012 (add-before 'build 'generate-grammar
6013 (lambda _
6014 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6015 (every (lambda (file)
6016 (format #t "~a\n" file)
6017 (zero? (system* "antlr3" file)))
6018 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
6019 (inputs
6020 `(("antlr3" ,antlr3-bootstrap)
6021 ("antlr2" ,antlr2)
6022 ("java-stringtemplate" ,java-stringtemplate-3)
6023 ("java-junit" ,java-junit)))))
6024
6025(define java-stringtemplate-4.0.6
6026 (package (inherit java-stringtemplate)
6027 (name "java-stringtemplate")
6028 (version "4.0.6")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6032 version ".tar.gz"))
6033 (file-name (string-append name "-" version ".tar.gz"))
6034 (sha256
6035 (base32
6036 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6037 (inputs
6038 `(("antlr3" ,antlr3-3.3)
6039 ("antlr2" ,antlr2)
6040 ("java-stringtemplate" ,java-stringtemplate-3)))))
6041
6042(define-public antlr3
6043 (package
6044 (name "antlr3")
6045 (version "3.5.2")
6046 (source (origin
6047 (method url-fetch)
6048 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6049 version ".tar.gz"))
6050 (file-name (string-append name "-" version ".tar.gz"))
6051 (sha256
6052 (base32
6053 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6054 (build-system ant-build-system)
6055 (arguments
6056 `(#:jar-name (string-append ,name "-" ,version ".jar")
6057 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6058 #:tests? #f
6059 #:phases
6060 (modify-phases %standard-phases
6061 (add-after 'install 'bin-install
6062 (lambda* (#:key inputs outputs #:allow-other-keys)
6063 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6064 (bin (string-append (assoc-ref outputs "out") "/bin")))
6065 (mkdir-p bin)
6066 (with-output-to-file (string-append bin "/antlr3")
6067 (lambda _
6068 (display
6069 (string-append "#!" (which "sh") "\n"
6070 "java -cp " jar "/" ,name "-" ,version ".jar:"
6071 (string-concatenate
6072 (find-files (assoc-ref inputs "stringtemplate")
6073 ".*\\.jar"))
6074 ":"
6075 (string-concatenate
6076 (find-files (assoc-ref inputs "stringtemplate4")
6077 ".*\\.jar"))
6078 ":"
6079 (string-concatenate
6080 (find-files (string-append
6081 (assoc-ref inputs "antlr")
6082 "/lib")
6083 ".*\\.jar"))
6084 " org.antlr.Tool $*"))))
6085 (chmod (string-append bin "/antlr3") #o755))))
6086 (add-before 'build 'generate-grammar
6087 (lambda _
6088 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6089 (for-each (lambda (file)
6090 (display file)
6091 (newline)
6092 (system* "antlr3" file))
6093 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6094 "AssignTokenTypesWalker.g"
6095 "ActionTranslator.g" "TreeToNFAConverter.g"
6096 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6097 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6098 (substitute* "ANTLRParser.java"
6099 (("public Object getTree") "public GrammarAST getTree"))
6100 (substitute* "ANTLRv3Parser.java"
6101 (("public Object getTree") "public CommonTree getTree"))
6102 (chdir "../../../../../java")
6103 (system* "antlr" "-o" "org/antlr/tool"
6104 "org/antlr/tool/serialize.g")
6105 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6106 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6107import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6108 (substitute* "org/antlr/tool/ErrorManager.java"
6109 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6110 (chdir "../../../..")))
6111 (add-before 'build 'fix-build-xml
6112 (lambda _
6113 (substitute* "build.xml"
6114 (("<exec") "<copy todir=\"${classes.dir}\">
6115<fileset dir=\"tool/src/main/resources\">
6116<include name=\"**/*.stg\"/>
6117<include name=\"**/*.st\"/>
6118<include name=\"**/*.sti\"/>
6119<include name=\"**/STLexer.tokens\"/>
6120</fileset>
6121</copy><exec")))))))
6122 (native-inputs
6123 `(("antlr" ,antlr2)
6124 ("antlr3" ,antlr3-bootstrap)))
6125 (inputs
6126 `(("junit" ,java-junit)
6127 ("stringtemplate" ,java-stringtemplate-3)
6128 ("stringtemplate4" ,java-stringtemplate)))
6129 (propagated-inputs
6130 `(("stringtemplate" ,java-stringtemplate-3)
6131 ("antlr" ,antlr2)
6132 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6133 (home-page "http://www.antlr3.org")
6134 (synopsis "Framework for constructing recognizers, compilers, and translators")
6135 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6136is a language tool that provides a framework for constructing recognizers,
6137compilers, and translators from grammatical descriptions containing Java, C#,
6138C++, or Python actions. ANTLR provides excellent support for tree construction,
6139tree walking, and translation.")
6140 (license license:bsd-3)))
6141
6142(define antlr3-bootstrap
6143 (package
6144 (inherit antlr3)
6145 (name "antlr3-bootstrap")
6146 (native-inputs
6147 `(("antlr" ,antlr2)
6148 ("antlr3" ,antlr3-3.3)))
6149 (inputs
6150 `(("junit" ,java-junit)))))
6151
6152(define antlr3-3.3
6153 (package
6154 (inherit antlr3)
6155 (name "antlr3")
6156 (version "3.3")
6157 (source (origin
6158 (method url-fetch)
6159 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6160 "gh-pages/download/antlr-"
6161 version ".tar.gz"))
6162 (sha256
6163 (base32
6164 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6165 (patches
6166 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6167 (arguments
6168 `(#:jar-name (string-append ,name "-" ,version ".jar")
6169 #:source-dir (string-join '("tool/src/main/java"
6170 "runtime/Java/src/main/java"
6171 "tool/src/main/antlr2"
6172 "tool/src/main/antlr3")
6173 ":")
6174 #:tests? #f ; FIXME: tests seem to require maven plugin
6175 #:modules ((guix build ant-build-system)
6176 (guix build utils)
6177 (srfi srfi-1))
6178 #:phases
6179 (modify-phases %standard-phases
6180 (add-after 'install 'bin-install
6181 (lambda* (#:key inputs outputs #:allow-other-keys)
6182 (let* ((out (assoc-ref outputs "out"))
6183 (jar (string-append out "/share/java"))
6184 (bin (string-append out "/bin")))
6185 (mkdir-p bin)
6186 (with-output-to-file (string-append bin "/antlr3")
6187 (lambda _
6188 (display
6189 (string-append
6190 "#!" (which "sh") "\n"
6191 "java -cp " jar "/antlr3-3.3.jar:"
6192 (string-join
6193 (append (find-files (assoc-ref inputs "java-stringtemplate")
6194 ".*\\.jar$")
6195 (find-files (string-append (assoc-ref inputs "antlr")
6196 "/lib")
6197 ".*\\.jar$"))
6198 ":")
6199 " org.antlr.Tool $*"))))
6200 (chmod (string-append bin "/antlr3") #o755)
6201 #t)))
6202 (add-before 'build 'generate-grammar
6203 (lambda _
6204 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6205 (("import org.antlr.grammar.v2.\\*;")
6206 "import org.antlr.grammar.v2.*;\n
6207import org.antlr.grammar.v2.TreeToNFAConverter;\n
6208import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6209import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6210 (and
6211 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6212 (every (lambda (file)
6213 (format #t "~a\n" file)
6214 (zero? (system* "antlr" file)))
6215 '("antlr.g" "antlr.print.g" "assign.types.g"
6216 "buildnfa.g" "codegen.g" "define.g")))
6217 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6218 (every (lambda (file)
6219 (format #t "~a\n" file)
6220 (zero? (system* "antlr3" file)))
6221 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6222 "ANTLRv3Tree.g"))))))
6223 (add-before 'build 'fix-build-xml
6224 (lambda _
6225 (substitute* "build.xml"
6226 (("<exec") "<copy todir=\"${classes.dir}\">
6227<fileset dir=\"tool/src/main/resources\">
6228<include name=\"**/*.stg\"/>
6229<include name=\"**/*.st\"/>
6230<include name=\"**/*.sti\"/>
6231<include name=\"**/STLexer.tokens\"/>
6232</fileset>
6233</copy><exec"))
6234 #t)))))
6235 (native-inputs
6236 `(("antlr" ,antlr2)
6237 ("antlr3" ,antlr3-3.1)))
6238 (inputs
6239 `(("junit" ,java-junit)))
6240 (propagated-inputs
6241 `(("java-stringtemplate" ,java-stringtemplate-3)
6242 ("antlr" ,antlr2)
6243 ("antlr3" ,antlr3-3.1)))))
6244
6245(define antlr3-3.1
6246 (package
6247 (inherit antlr3)
6248 (version "3.1")
6249 (source (origin
6250 (method url-fetch)
6251 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6252 "gh-pages/download/antlr-"
6253 version ".tar.gz"))
6254 (sha256
6255 (base32
6256 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6257 (patches
6258 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6259 (arguments
6260 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6261 #:source-dir "src:runtime/Java/src"
6262 #:tests? #f
6263 #:phases
6264 (modify-phases %standard-phases
6265 (add-after 'install 'bin-install
6266 (lambda* (#:key inputs outputs #:allow-other-keys)
6267 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6268 (bin (string-append (assoc-ref outputs "out") "/bin")))
6269 (mkdir-p bin)
6270 (with-output-to-file (string-append bin "/antlr3")
6271 (lambda _
6272 (display
6273 (string-append "#!" (which "sh") "\n"
6274 "java -cp " jar "/antlr3-3.1.jar:"
6275 (string-concatenate
6276 (find-files (assoc-ref inputs "stringtemplate")
6277 ".*\\.jar"))
6278 ":"
6279 (string-concatenate
6280 (find-files (string-append
6281 (assoc-ref inputs "antlr")
6282 "/lib")
6283 ".*\\.jar"))
6284 " org.antlr.Tool $*"))))
6285 (chmod (string-append bin "/antlr3") #o755))))
6286 (add-before 'build 'generate-grammar
6287 (lambda _
6288 (let ((dir "src/org/antlr/tool/"))
6289 (for-each (lambda (file)
6290 (display file)
6291 (newline)
6292 (invoke "antlr" "-o" dir (string-append dir file)))
6293 '("antlr.g" "antlr.print.g" "assign.types.g"
6294 "buildnfa.g" "define.g")))
6295 (format #t "codegen.g\n")
6296 (invoke "antlr" "-o" "src/org/antlr/codegen"
6297 "src/org/antlr/codegen/codegen.g")
6298 #t))
6299 (add-before 'build 'fix-build-xml
6300 (lambda _
6301 (substitute* "build.xml"
6302 (("<exec") "<copy todir=\"${classes.dir}\">
6303<fileset dir=\"src\">
6304<include name=\"**/*.stg\"/>
6305<include name=\"**/*.st\"/>
6306<include name=\"**/*.sti\"/>
6307<include name=\"**/STLexer.tokens\"/>
6308</fileset>
6309</copy><exec")))))))
6310 (native-inputs
6311 `(("antlr" ,antlr2)))
6312 (inputs
6313 `(("junit" ,java-junit)))
6314 (propagated-inputs
6315 `(("stringtemplate" ,java-stringtemplate-3)))))
6316
6317(define-public java-commons-cli-1.2
6318 ;; This is a bootstrap dependency for Maven2.
6319 (package
6320 (inherit java-commons-cli)
6321 (version "1.2")
6322 (source (origin
6323 (method url-fetch)
6324 (uri (string-append "mirror://apache/commons/cli/source/"
6325 "commons-cli-" version "-src.tar.gz"))
6326 (sha256
6327 (base32
6328 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6329 (arguments
6330 `(#:jar-name "commons-cli.jar"
6331 #:phases
6332 (modify-phases %standard-phases
6333 (add-before 'check 'fix-build-xml
6334 (lambda* (#:key inputs #:allow-other-keys)
6335 (substitute* "build.xml"
6336 (("dir=\"\\$\\{test.home\\}/java\"")
6337 "dir=\"${test.home}\""))
6338 #t)))))
6339 (native-inputs
6340 `(("java-junit" ,java-junit)))))
6341
6342(define-public java-microemulator-cldc
6343 (package
6344 (name "java-microemulator-cldc")
6345 (version "2.0.4")
6346 (source (origin
6347 (method url-fetch)
6348 (uri (string-append "https://github.com/barteo/microemu/archive/"
6349 "microemulator_"
6350 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6351 version)
6352 ".tar.gz"))
6353 (file-name (string-append name "-" version ".tar.gz"))
6354 (sha256
6355 (base32
6356 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6357 (build-system ant-build-system)
6358 (arguments
6359 `(#:jar-name "microemulator-cldc.jar"
6360 #:source-dir "microemu-cldc/src/main/java"
6361 #:tests? #f)); Requires even older software
6362 (home-page "https://github.com/barteo/microemu")
6363 (synopsis "J2ME CLDC emulator")
6364 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6365Emulator. It allows to demonstrate MIDlet based applications in web browser
6366applet and can be run as a standalone java application.")
6367 (license (list license:asl2.0
6368 ;; or altenatively:
6369 license:lgpl2.1+))))
6370
6371(define-public java-datanucleus-javax-persistence
6372 (package
6373 (name "java-datanucleus-javax-persistence")
6374 (version "2.2.0")
6375 (source (origin
6376 (method url-fetch)
6377 (uri (string-append "https://github.com/datanucleus/"
6378 "javax.persistence/archive/javax.persistence-"
6379 version "-release.tar.gz"))
6380 (sha256
6381 (base32
6382 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6383 (build-system ant-build-system)
6384 (arguments
6385 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6386 #:jdk ,icedtea-8
6387 #:source-dir "src/main/java"
6388 #:tests? #f)); no tests
6389 (home-page "https://github.com/datanucleus/javax.persistence")
6390 (synopsis "JPA API")
6391 (description "This package contains a clean definition of JPA API intended
6392for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6393jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6394used to generate this API.")
6395 (license (list license:edl1.0 license:epl1.0))))
6396
6397(define-public java-osgi-cmpn
6398 (package
6399 (name "java-osgi-cmpn")
6400 (version "6.0.0")
6401 (source (origin
6402 (method url-fetch)
6403 (uri (string-append "http://central.maven.org/maven2/"
6404 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6405 version "-sources.jar"))
6406 (sha256
6407 (base32
6408 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6409 (build-system ant-build-system)
6410 (arguments
6411 `(#:jar-name "osgi-cmpn.jar"
6412 #:tests? #f)); no tests
6413 (inputs
6414 `(("annotation" ,java-osgi-annotation)
6415 ("core" ,java-osgi-core)
6416 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6417 ("microemulator" ,java-microemulator-cldc)
6418 ("servlet" ,java-classpathx-servletapi)))
6419 (home-page "https://www.osgi.org")
6420 (synopsis "Compendium specification module of OSGi framework")
6421 (description
6422 "OSGi, for Open Services Gateway initiative framework, is a module system
6423and service platform for the Java programming language. This package contains
6424the compendium specification module, providing interfaces and classes for use
6425in compiling bundles.")
6426 (license license:asl2.0)))
6427
6428(define-public java-osgi-service-component-annotations
6429 (package
6430 (name "java-osgi-service-component-annotations")
6431 (version "1.3.0")
6432 (source (origin
6433 (method url-fetch)
6434 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6435 "org.osgi.service.component.annotations/"
6436 version "/org.osgi.service.component.annotations-"
6437 version "-sources.jar"))
6438 (sha256
6439 (base32
6440 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6441 (build-system ant-build-system)
6442 (arguments
6443 `(#:jar-name "osgi-service-component-annotations.jar"
6444 #:tests? #f)); no tests
6445 (inputs
6446 `(("annotation" ,java-osgi-annotation)))
6447 (home-page "https://www.osgi.org")
6448 (synopsis "Support annotations for osgi-service-component")
6449 (description
6450 "OSGi, for Open Services Gateway initiative framework, is a module system
6451and service platform for the Java programming language. This package contains
6452the support annotations for osgi-service-component.")
6453 (license license:asl2.0)))
6454
6455(define-public java-osgi-dto
6456 (package
6457 (name "java-osgi-dto")
6458 (version "1.0.0")
6459 (source (origin
6460 (method url-fetch)
6461 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6462 "org.osgi.dto/" version "/org.osgi.dto-"
6463 version "-sources.jar"))
6464 (sha256
6465 (base32
6466 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6467 (build-system ant-build-system)
6468 (arguments
6469 `(#:jar-name "osgi-dto.jar"
6470 #:tests? #f)); no tests
6471 (inputs
6472 `(("annotation" ,java-osgi-annotation)))
6473 (home-page "https://www.osgi.org")
6474 (synopsis "Data Transfer Objects")
6475 (description
6476 "OSGi, for Open Services Gateway initiative framework, is a module system
6477and service platform for the Java programming language. This package contains
6478the Data Transfer Objects. It is easily serializable having only public fields
6479of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6480Map and array aggregates may also be used. The aggregates must only hold
6481objects of the listed types or aggregates.")
6482 (license license:asl2.0)))
6483
6484(define-public java-osgi-resource
6485 (package
6486 (name "java-osgi-resource")
6487 (version "1.0.0")
6488 (source (origin
6489 (method url-fetch)
6490 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6491 "org.osgi.resource/"
6492 version "/org.osgi.resource-"
6493 version "-sources.jar"))
6494 (sha256
6495 (base32
6496 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6497 (build-system ant-build-system)
6498 (arguments
6499 `(#:jar-name "osgi-resource.jar"
6500 #:tests? #f)); no tests
6501 (inputs
6502 `(("annotation" ,java-osgi-annotation)
6503 ("dto" ,java-osgi-dto)))
6504 (home-page "https://www.osgi.org")
6505 (synopsis "OSGI Resource")
6506 (description
6507 "OSGi, for Open Services Gateway initiative framework, is a module system
6508and service platform for the Java programming language. This package contains
6509the definition of common types in osgi packages.")
6510 (license license:asl2.0)))
6511
6512(define-public java-osgi-namespace-contract
6513 (package
6514 (name "java-osgi-namespace-contract")
6515 (version "1.0.0")
6516 (source (origin
6517 (method url-fetch)
6518 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6519 "org.osgi.namespace.contract/"
6520 version "/org.osgi.namespace.contract-"
6521 version "-sources.jar"))
6522 (sha256
6523 (base32
6524 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6525 (build-system ant-build-system)
6526 (inputs
6527 `(("resource" ,java-osgi-resource)
6528 ("annotation" ,java-osgi-annotation)))
6529 (arguments
6530 `(#:jar-name "osgi-namespace-contract.jar"
6531 #:tests? #f)); no tests
6532 (home-page "https://www.osgi.org")
6533 (synopsis "Contract Capability and Requirement Namespace")
6534 (description
6535 "OSGi, for Open Services Gateway initiative framework, is a module system
6536and service platform for the Java programming language. This package contains
6537the names for the attributes and directives for a namespace with contracts.")
6538 (license license:asl2.0)))
6539
6540(define-public java-osgi-namespace-extender
6541 (package
6542 (name "java-osgi-namespace-extender")
6543 (version "1.0.1")
6544 (source (origin
6545 (method url-fetch)
6546 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6547 "org.osgi.namespace.extender/"
6548 version "/org.osgi.namespace.extender-"
6549 version "-sources.jar"))
6550 (sha256
6551 (base32
6552 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6553 (build-system ant-build-system)
6554 (inputs
6555 `(("resource" ,java-osgi-resource)
6556 ("annotation" ,java-osgi-annotation)))
6557 (arguments
6558 `(#:jar-name "osgi-namespace-extendent.jar"
6559 #:tests? #f)); no tests
6560 (home-page "https://www.osgi.org")
6561 (synopsis "Extender Capability and Requirement Namespace")
6562 (description
6563 "OSGi, for Open Services Gateway initiative framework, is a module system
6564and service platform for the Java programming language. This package contains
6565the names for the attributes and directives for an extender namespace.")
6566 (license license:asl2.0)))
6567
6568(define-public java-osgi-namespace-service
6569 (package
6570 (name "java-osgi-namespace-service")
6571 (version "1.0.0")
6572 (source (origin
6573 (method url-fetch)
6574 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6575 "org.osgi.namespace.service/"
6576 version "/org.osgi.namespace.service-"
6577 version "-sources.jar"))
6578 (sha256
6579 (base32
6580 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6581 (build-system ant-build-system)
6582 (inputs
6583 `(("resource" ,java-osgi-resource)
6584 ("annotation" ,java-osgi-annotation)))
6585 (arguments
6586 `(#:jar-name "osgi-namespace-service.jar"
6587 #:tests? #f)); no tests
6588 (home-page "https://www.osgi.org")
6589 (synopsis "Service Capability and Requirement Namespace")
6590 (description
6591 "OSGi, for Open Services Gateway initiative framework, is a module system
6592and service platform for the Java programming language. This package contains
6593the names for the attributes and directives for a service namespace.")
6594 (license license:asl2.0)))
6595
6596(define-public java-osgi-util-function
6597 (package
6598 (name "java-osgi-util-function")
6599 (version "1.0.0")
6600 (source (origin
6601 (method url-fetch)
6602 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6603 "org.osgi.util.function/"
6604 version "/org.osgi.util.function-"
6605 version "-sources.jar"))
6606 (sha256
6607 (base32
6608 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6609 (build-system ant-build-system)
6610 (arguments
6611 `(#:jar-name "osgi-util-function.jar"
6612 #:tests? #f)); no tests
6613 (inputs
6614 `(("annotation" ,java-osgi-annotation)))
6615 (home-page "https://www.osgi.org")
6616 (synopsis "OSGI Util Function")
6617 (description
6618 "OSGi, for Open Services Gateway initiative framework, is a module system
6619and service platform for the Java programming language. This package contains
6620an interface for a function that accepts a single argument and produces a result.")
6621 (license license:asl2.0)))
6622
6623(define-public java-osgi-util-promise
6624 (package
6625 (name "java-osgi-util-promise")
6626 (version "1.0.0")
6627 (source (origin
6628 (method url-fetch)
6629 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6630 "org.osgi.util.promise/"
6631 version "/org.osgi.util.promise-"
6632 version "-sources.jar"))
6633 (sha256
6634 (base32
6635 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6636 (build-system ant-build-system)
6637 (arguments
6638 `(#:jar-name "osgi-util-promise.jar"
6639 #:tests? #f)); no tests
6640 (inputs
6641 `(("annotation" ,java-osgi-annotation)
6642 ("function" ,java-osgi-util-function)))
6643 (home-page "https://www.osgi.org")
6644 (synopsis "Promise of a value")
6645 (description
6646 "OSGi, for Open Services Gateway initiative framework, is a module system
6647and service platform for the Java programming language. This package contains
6648an interface and utilitary classes for promises. A Promise represents a future
6649value. It handles the interactions for asynchronous processing.")
6650 (license license:asl2.0)))
6651
6652(define-public java-osgi-service-metatype-annotations
6653 (package
6654 (name "java-osgi-service-metatype-annotations")
6655 (version "1.3.0")
6656 (source (origin
6657 (method url-fetch)
6658 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6659 "org.osgi.service.metatype.annotations/"
6660 version "/org.osgi.service.metatype.annotations-"
6661 version "-sources.jar"))
6662 (sha256
6663 (base32
6664 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6665 (build-system ant-build-system)
6666 (arguments
6667 `(#:jar-name "osgi-service-metatype-annotations.jar"
6668 #:tests? #f)); no tests
6669 (inputs
6670 `(("annotation" ,java-osgi-annotation)))
6671 (home-page "https://www.osgi.org")
6672 (synopsis "Support annotations for metatype")
6673 (description
6674 "OSGi, for Open Services Gateway initiative framework, is a module system
6675and service platform for the Java programming language. This package contains
6676the support annotations for metatype.")
6677 (license license:asl2.0)))
6678
6679(define-public java-osgi-service-repository
6680 (package
6681 (name "java-osgi-service-repository")
6682 (version "1.1.0")
6683 (source (origin
6684 (method url-fetch)
6685 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6686 "org.osgi.service.repository/"
6687 version "/org.osgi.service.repository-"
6688 version "-sources.jar"))
6689 (sha256
6690 (base32
6691 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6692 (build-system ant-build-system)
6693 (arguments
6694 `(#:jar-name "osgi-service-repository.jar"
6695 #:tests? #f)); no tests
6696 (inputs
6697 `(("annotation" ,java-osgi-annotation)
6698 ("promise" ,java-osgi-util-promise)
6699 ("resource" ,java-osgi-resource)))
6700 (home-page "https://www.osgi.org")
6701 (synopsis "OSGI service repository")
6702 (description
6703 "OSGi, for Open Services Gateway initiative framework, is a module system
6704and service platform for the Java programming language. This package contains
6705a repository service that contains resources.")
6706 (license license:asl2.0)))
6707
6708(define-public java-osgi-framework
6709 (package
6710 (name "java-osgi-framework")
6711 (version "1.8.0")
6712 (source (origin
6713 (method url-fetch)
6714 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6715 "org.osgi.framework/" version "/org.osgi.framework-"
6716 version "-sources.jar"))
6717 (sha256
6718 (base32
6719 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6720 (build-system ant-build-system)
6721 (arguments
6722 `(#:jar-name "osgi-framework.jar"
6723 #:tests? #f)); no tests
6724 (inputs
6725 `(("annotation" ,java-osgi-annotation)
6726 ("resource" ,java-osgi-resource)
6727 ("dto" ,java-osgi-dto)))
6728 (home-page "https://www.osgi.org")
6729 (synopsis "OSGi framework")
6730 (description
6731 "OSGi, for Open Services Gateway initiative framework, is a module system
6732and service platform for the Java programming language.")
6733 (license license:asl2.0)))
6734
6735(define-public java-osgi-service-log
6736 (package
6737 (name "java-osgi-service-log")
6738 (version "1.3.0")
6739 (source (origin
6740 (method url-fetch)
6741 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6742 "org.osgi.service.log/"
6743 version "/org.osgi.service.log-"
6744 version "-sources.jar"))
6745 (sha256
6746 (base32
6747 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6748 (build-system ant-build-system)
6749 (arguments
6750 `(#:jar-name "osgi-service-log.jar"
6751 #:tests? #f)); no tests
6752 (inputs
6753 `(("java-osgi-framework" ,java-osgi-framework)))
6754 (home-page "https://www.osgi.org")
6755 (synopsis "Provides methods for bundles to write messages to the log")
6756 (description
6757 "OSGi, for Open Services Gateway initiative framework, is a module system
6758and service platform for the Java programming language. This package contains
6759the log service.")
6760 (license license:asl2.0)))
6761
6762(define-public java-osgi-service-jdbc
6763 (package
6764 (name "java-osgi-service-jdbc")
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.service.jdbc/"
6770 version "/org.osgi.service.jdbc-"
6771 version "-sources.jar"))
6772 (sha256
6773 (base32
6774 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6775 (build-system ant-build-system)
6776 (arguments
6777 `(#:jar-name "osgi-service-jdbc.jar"
6778 #:tests? #f)); no tests
6779 (home-page "https://www.osgi.org")
6780 (synopsis "Factory for JDBC connection factories")
6781 (description
6782 "OSGi, for Open Services Gateway initiative framework, is a module system
6783and service platform for the Java programming language. This package contains
6784a factory for JDBC connection factories. There are 3 preferred connection
6785factories for getting JDBC connections:
6786
6787@itemize
6788@item @code{javax.sql.DataSource};
6789@item @code{javax.sql.ConnectionPoolDataSource};
6790@item @code{javax.sql.XADataSource}.
6791@end itemize")
6792 (license license:asl2.0)))
6793
6794(define-public java-osgi-service-resolver
6795 (package
6796 (name "java-osgi-service-resolver")
6797 (version "1.0.1")
6798 (source (origin
6799 (method url-fetch)
6800 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6801 "org.osgi.service.resolver/"
6802 version "/org.osgi.service.resolver-"
6803 version "-sources.jar"))
6804 (sha256
6805 (base32
6806 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6807 (build-system ant-build-system)
6808 (arguments
6809 `(#:jar-name "osgi-service-resolver.jar"
6810 #:tests? #f)); no tests
6811 (inputs
6812 `(("annotation" ,java-osgi-annotation)
6813 ("resource" ,java-osgi-resource)))
6814 (home-page "https://www.osgi.org")
6815 (synopsis "OSGI Resolver service")
6816 (description
6817 "OSGi, for Open Services Gateway initiative framework, is a module system
6818and service platform for the Java programming language. This package contains
6819a resolver service that resolves the specified resources in the context supplied
6820by the caller.")
6821 (license license:asl2.0)))
6822
6823(define-public java-osgi-util-tracker
6824 (package
6825 (name "java-osgi-util-tracker")
6826 (version "1.5.1")
6827 (source (origin
6828 (method url-fetch)
6829 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6830 "org.osgi.util.tracker/"
6831 version "/org.osgi.util.tracker-"
6832 version "-sources.jar"))
6833 (sha256
6834 (base32
6835 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6836 (build-system ant-build-system)
6837 (arguments
6838 `(#:jar-name "osgi-util-tracker.jar"
6839 #:tests? #f)); no tests
6840 (inputs
6841 `(("framework" ,java-osgi-framework)
6842 ("annotation" ,java-osgi-annotation)))
6843 (home-page "https://www.osgi.org")
6844 (synopsis "Bundle tracking")
6845 (description
6846 "OSGi, for Open Services Gateway initiative framework, is a module system
6847and service platform for the Java programming language. This package contains
6848bundle tracking utility classes.")
6849 (license license:asl2.0)))
6850
6851(define-public java-osgi-service-cm
6852 (package
6853 (name "java-osgi-service-cm")
6854 (version "1.5.0")
6855 (source (origin
6856 (method url-fetch)
6857 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6858 "org.osgi.service.cm/"
6859 version "/org.osgi.service.cm-"
6860 version "-sources.jar"))
6861 (sha256
6862 (base32
6863 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6864 (build-system ant-build-system)
6865 (arguments
6866 `(#:jar-name "osgi-service-cm.jar"
6867 #:tests? #f)); no tests
6868 (inputs
6869 `(("framework" ,java-osgi-framework)
6870 ("annotation" ,java-osgi-annotation)))
6871 (home-page "https://www.osgi.org")
6872 (synopsis "OSGI Configuration Management")
6873 (description
6874 "OSGi, for Open Services Gateway initiative framework, is a module system
6875and service platform for the Java programming language. This package contains
6876utility classes for the configuration of services.")
6877 (license license:asl2.0)))
6878
6879(define-public java-osgi-service-packageadmin
6880 (package
6881 (name "java-osgi-service-packageadmin")
6882 (version "1.2.0")
6883 (source (origin
6884 (method url-fetch)
6885 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6886 "org.osgi.service.packageadmin/"
6887 version "/org.osgi.service.packageadmin-"
6888 version "-sources.jar"))
6889 (sha256
6890 (base32
6891 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6892 (build-system ant-build-system)
6893 (arguments
6894 `(#:jar-name "osgi-service-packageadmin.jar"
6895 #:tests? #f)); no tests
6896 (inputs
6897 `(("framework" ,java-osgi-framework)))
6898 (home-page "https://www.osgi.org")
6899 (synopsis "OSGI Package Administration")
6900 (description
6901 "OSGi, for Open Services Gateway initiative framework, is a module system
6902and service platform for the Java programming language. This package contains
6903the packageadmin service.")
6904 (license license:asl2.0)))
6905
6906(define-public java-ops4j-base-lang
6907 (package
6908 (name "java-ops4j-base-lang")
6909 (version "1.5.0")
6910 (source (origin
6911 (method url-fetch)
6912 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6913 "archive/base-" version ".tar.gz"))
6914 (sha256
6915 (base32
6916 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6917 (build-system ant-build-system)
6918 (arguments
6919 `(#:jar-name "java-ops4j-base-lang.jar"
6920 #:source-dir "ops4j-base-lang/src/main/java"
6921 #:tests? #f; no tests
6922 #:phases
6923 (modify-phases %standard-phases
6924 (add-before 'build 'add-test-file
6925 (lambda _
6926 ;; That file is required by a test in ops4j-pax-exam-core-spi
6927 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6928 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6929 (lambda _
6930 (display
6931 (string-append
6932 "version=" ,version "\n"
6933 "groupId=org.ops4j.base"
6934 "artifactId=ops4j-base-lang\n")))))))))
6935 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6936 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6937 (description "OPS4J stands for Open Participation Software for Java. This
6938package contains utilities and extensions related to @code{java.lang}.")
6939 (license license:asl2.0)))
6940
6941(define-public java-ops4j-base-monitors
6942 (package
6943 (inherit java-ops4j-base-lang)
6944 (name "java-ops4j-base-monitors")
6945 (arguments
6946 `(#:jar-name "java-ops4j-base-monitors.jar"
6947 #:source-dir "ops4j-base-monitors/src/main/java"
6948 #:tests? #f)); no tests
6949 (inputs
6950 `(("lang" ,java-ops4j-base-lang)))
6951 (description "OPS4J stands for Open Participation Software for Java. This
6952package contains utilities and extensions related to monitoring.")))
6953
6954(define-public java-ops4j-base-io
6955 (package
6956 (inherit java-ops4j-base-lang)
6957 (name "java-ops4j-base-io")
6958 (arguments
6959 `(#:jar-name "java-ops4j-base-io.jar"
6960 #:source-dir "ops4j-base-io/src/main/java"
6961 #:test-dir "ops4j-base-io/src/test"
6962 #:test-exclude
6963 (list "**/ListerTest.java")))
6964 (inputs
6965 `(("lang" ,java-ops4j-base-monitors)
6966 ("lang" ,java-ops4j-base-lang)))
6967 (native-inputs
6968 `(("junit" ,java-junit)
6969 ("hamcrest" ,java-hamcrest-core)))
6970 (description "OPS4J stands for Open Participation Software for Java. This
6971package contains utilities and extensions related to handling streams and files.")))
6972
6973(define-public java-ops4j-base-util
6974 (package
6975 (inherit java-ops4j-base-lang)
6976 (name "java-ops4j-base-util")
6977 (arguments
6978 `(#:jar-name "java-ops4j-base-util.jar"
6979 #:source-dir "ops4j-base-util/src/main/java"
6980 #:test-dir "ops4j-base-util/src/test"))
6981 (inputs
6982 `(("lang" ,java-ops4j-base-lang)))
6983 (native-inputs
6984 `(("junit" ,java-junit)))
6985 (description "OPS4J stands for Open Participation Software for Java. This
6986package contains utilities and extensions related to environment, i18n and
6987mime types.")))
6988
6989(define-public java-ops4j-base-util-property
6990 (package
6991 (inherit java-ops4j-base-lang)
6992 (name "java-ops4j-base-util-property")
6993 (arguments
6994 `(#:jar-name "java-ops4j-base-util-property.jar"
6995 #:source-dir "ops4j-base-util-property/src/main/java"
6996 #:tests? #f)); no tests
6997 (inputs
6998 `(("lang" ,java-ops4j-base-lang)
6999 ("util" ,java-ops4j-base-util)))
7000 (description "OPS4J stands for Open Participation Software for Java. This
7001package contains utilities and extensions related to resolving properties from
7002different sources.")))
7003
7004(define-public java-ops4j-base-store
7005 (package
7006 (inherit java-ops4j-base-lang)
7007 (name "java-ops4j-base-store")
7008 (arguments
7009 `(#:jar-name "java-ops4j-base-store.jar"
7010 #:source-dir "ops4j-base-store/src/main/java"
7011 #:tests? #f)); no tests
7012 (inputs
7013 `(("lang" ,java-ops4j-base-lang)
7014 ("slf4j" ,java-slf4j-api)
7015 ("io" ,java-ops4j-base-io)))
7016 (description "OPS4J stands for Open Participation Software for Java. This
7017package contains utilities for storing and retrieving data from an
7018@code{InputStream}.")))
7019
7020(define-public java-ops4j-base-spi
7021 (package
7022 (inherit java-ops4j-base-lang)
7023 (name "java-ops4j-base-spi")
7024 (arguments
7025 `(#:jar-name "java-ops4j-base-spi.jar"
7026 #:source-dir "ops4j-base-spi/src/main/java"
7027 #:test-dir "ops4j-base-spi/src/test"))
7028 (native-inputs
7029 `(("junit" ,java-junit)
7030 ("hamcrest" ,java-hamcrest-core)))
7031 (description "OPS4J stands for Open Participation Software for Java. This
7032package contains utilities for obtaining services via the Java SE 6
7033@code{ServiceLoader}.")))
7034
7035(define-public java-aqute-bnd-annotation
7036 (package
7037 (name "java-aqute-bnd-annotation")
7038 (version "3.5.0")
7039 (source (origin
7040 (method url-fetch)
7041 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7042 version ".REL.tar.gz"))
7043 (file-name (string-append name "-" version ".tar.gz"))
7044 (sha256
7045 (base32
7046 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7047 (build-system ant-build-system)
7048 (arguments
7049 `(#:jar-name "java-aqute-bnd-annotation.jar"
7050 #:source-dir "biz.aQute.bnd.annotation/src"
7051 #:tests? #f)); empty test dir
7052 (home-page "http://bnd.bndtools.org/")
7053 (synopsis "Tools for OSGi")
7054 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7055headers based on analyzing the class code, it verifies the project settings,
7056it manages project dependencies, gives diffs jars, and much more.")
7057 (license license:asl2.0)))
7058
7059(define-public java-aqute-libg
7060 (package
7061 (inherit java-aqute-bnd-annotation)
7062 (name "java-aqute-libg")
7063 (arguments
7064 `(#:jar-name "java-aqute-libg.jar"
7065 ;; The build fails when source/target more recent than 1.7. This
7066 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7067 ;;
7068 ;; It is closed as won't fix. There is no way to change the source
7069 ;; so that it works on 1.8, and still works on 1.6, the upstream
7070 ;; target. It work fine on 1.7, so we use 1.7.
7071 #:make-flags (list "-Dant.build.javac.source=1.7"
7072 "-Dant.build.javac.target=1.7")
7073 #:phases
7074 (modify-phases %standard-phases
7075 (add-before 'configure 'chdir
7076 ;; Change to aQute.libg directory, so that the relative
7077 ;; paths in the tests aren't broken.
7078 (lambda _
7079 (chdir "aQute.libg")
7080 #t))
7081 (add-before 'check 'create-test-directory
7082 ;; Copy the test directory to test/java, since that's where
7083 ;; ant-build-system's default project in build.xml expects to find
7084 ;; the test classes. Leave a copy in the original place to not
7085 ;; break paths in tests.
7086 (lambda _
7087 (mkdir "src/test")
7088 (copy-recursively "test" "src/test/java")
7089 #t)))))
7090 (inputs
7091 `(("slf4j" ,java-slf4j-api)
7092 ("osgi-annot" ,java-osgi-annotation)
7093 ("java-osgi-cmpn" ,java-osgi-cmpn)
7094 ("osgi" ,java-osgi-core)))
7095 (native-inputs
7096 `(("hamcrest" ,java-hamcrest-core)
7097 ("java-junit" ,java-junit)))))
7098
7099(define java-aqute-libg-bootstrap
7100 (package
7101 (inherit java-aqute-libg)
7102 (name "java-aqute-libg-bootstrap")
7103 (arguments
7104 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7105 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7106 ((#:tests? _ #f) #f)))
7107 (inputs
7108 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7109 ,@(delete `("slf4j" ,java-slf4j-api)
7110 (package-inputs java-aqute-libg))))
7111 (native-inputs '())))
7112
7113(define-public java-aqute-bndlib
7114 (package
7115 (inherit java-aqute-bnd-annotation)
7116 (name "java-aqute-bndlib")
7117 (arguments
7118 `(#:jar-name "java-bndlib.jar"
7119 #:source-dir "biz.aQute.bndlib/src"
7120 #:tests? #f)); no tests
7121 (inputs
7122 `(("slf4j" ,java-slf4j-api)
7123 ("osgi-annot" ,java-osgi-annotation)
7124 ("java-aqute-libg" ,java-aqute-libg)
7125 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7126 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7127 ("java-osgi-service-repository" ,java-osgi-service-repository)
7128 ("java-osgi-service-log" ,java-osgi-service-log)
7129 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7130 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7131 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7132 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7133 ("promise" ,java-osgi-util-promise)
7134 ("osgi" ,java-osgi-core)))))
7135
7136(define java-aqute-bndlib-bootstrap
7137 (package
7138 (inherit java-aqute-bndlib)
7139 (name "java-aqute-bndlib-bootstrap")
7140 (inputs
7141 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7142 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7143 ,@(delete `("slf4j" ,java-slf4j-api)
7144 (delete `("java-aqute-libg" ,java-aqute-libg)
7145 (package-inputs java-aqute-bndlib)))))))
7146
7147(define-public java-ops4j-pax-tinybundles
7148 (package
7149 (name "java-ops4j-pax-tinybundles")
7150 (version "2.1.1")
7151 (source (origin
7152 (method url-fetch)
7153 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7154 "archive/tinybundles-" version ".tar.gz"))
7155 (sha256
7156 (base32
7157 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7158 (arguments
7159 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7160 #:source-dir "src/main/java"
7161 #:test-exclude
7162 ;; Abstract base classes for other tests
7163 (list "**/BndTest.java" "**/CoreTest.java")
7164 #:phases
7165 (modify-phases %standard-phases
7166 (add-before 'check 'fix-version
7167 (lambda _
7168 ;; This test has a reference to an old version of bndlib we are not
7169 ;; packaging. It uses the version referenced in pom.xml. We replace
7170 ;; it with our own version.
7171 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7172 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7173 ,(package-version java-aqute-bndlib))))))))
7174 (inputs
7175 `(("lang" ,java-ops4j-base-lang)
7176 ("io" ,java-ops4j-base-io)
7177 ("store" ,java-ops4j-base-store)
7178 ("slf4j" ,java-slf4j-api)
7179 ("libg" ,java-aqute-libg)
7180 ("bndlib" ,java-aqute-bndlib)))
7181 (native-inputs
7182 `(("junit" ,java-junit)
7183 ("hamcrest" ,java-hamcrest-core)
7184 ("log4j" ,java-log4j-api)
7185 ("bndannotation" ,java-aqute-bnd-annotation)
7186 ("framework" ,java-osgi-framework)))
7187 (build-system ant-build-system)
7188 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7189 (synopsis "Java APIs to create OSGi related artifacts")
7190 (description "Tinybundles is all about creating OSGi related artifacts like
7191Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7192to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7193other hand, this library can be a foundation of real end user tools that need
7194to create those artifacts.")
7195 (license license:asl2.0)))
7196
7197(define-public java-ops4j-pax-exam-core
7198 (package
7199 (name "java-ops4j-pax-exam-core")
7200 (version "4.11.0")
7201 (source (origin
7202 (method url-fetch)
7203 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7204 "archive/exam-reactor-" version ".tar.gz"))
7205 (sha256
7206 (base32
7207 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7208 (arguments
7209 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7210 #:source-dir "core/pax-exam/src/main/java"
7211 #:test-dir "core/pax-exam/src/test"))
7212 (inputs
7213 `(("slf4j" ,java-slf4j-api)
7214 ("lang" ,java-ops4j-base-lang)
7215 ("io" ,java-ops4j-base-io)
7216 ("util-property" ,java-ops4j-base-util-property)
7217 ("util-store" ,java-ops4j-base-store)
7218 ("java-osgi-core" ,java-osgi-core)))
7219 (native-inputs
7220 `(("junit" ,java-junit)
7221 ("hamcrest" ,java-hamcrest-core)))
7222 (build-system ant-build-system)
7223 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7224 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7225 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7226the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7227the system under test at the same time.")
7228 (license license:asl2.0)))
7229
7230(define-public java-ops4j-pax-exam-core-spi
7231 (package
7232 (inherit java-ops4j-pax-exam-core)
7233 (name "java-ops4j-pax-exam-core-spi")
7234 (arguments
7235 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7236 #:source-dir "src/main/java"
7237 #:test-exclude
7238 (list
7239 ;; Abstract base class, not a test
7240 "**/BaseStagedReactorTest.java"
7241 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7242 "**/WarBuilderTest.java")
7243 #:phases
7244 (modify-phases %standard-phases
7245 (add-before 'configure 'chdir
7246 (lambda _
7247 ;; Tests assume we are in this directory
7248 (chdir "core/pax-exam-spi")))
7249 (add-before 'check 'fix-tests
7250 (lambda _
7251 ;; One test checks that this file is present.
7252 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7253 (with-output-to-file
7254 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7255 (lambda _
7256 (display
7257 (string-append "artifactId = pax-exam-spi\n"
7258 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7259 ;; Maven puts compilation results in the target directory, while we
7260 ;; put them in the build directory.
7261 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7262 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7263 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7264 (("target") "build"))
7265 ;; One test is expected to fail, but it doesn't throw the expected exception
7266 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7267 (("AssertionError") "IllegalArgumentException")))))))
7268 (inputs
7269 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7270 ("lang" ,java-ops4j-base-lang)
7271 ("monitors" ,java-ops4j-base-monitors)
7272 ("store" ,java-ops4j-base-store)
7273 ("io" ,java-ops4j-base-io)
7274 ("spi" ,java-ops4j-base-spi)
7275 ("osgi" ,java-osgi-core)
7276 ("slf4j" ,java-slf4j-api)
7277 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7278 (native-inputs
7279 `(("mockito" ,java-mockito-1)
7280 ("junit" ,java-junit)
7281 ("hamcrest" ,java-hamcrest-core)
7282 ("cglib" ,java-cglib)
7283 ("objenesis" ,java-objenesis)
7284 ("asm" ,java-asm)))))
7285
7286(define-public java-ops4j-pax-exam-core-junit
7287 (package
7288 (inherit java-ops4j-pax-exam-core)
7289 (name "java-ops4j-pax-exam-core-junit")
7290 (arguments
7291 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7292 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7293 #:tests? #f)); no tests
7294 (inputs
7295 `(("junit" ,java-junit)
7296 ("slf4j" ,java-slf4j-api)
7297 ("core" ,java-ops4j-pax-exam-core)
7298 ("spi" ,java-ops4j-pax-exam-core-spi)))
7299 (native-inputs '())))
7300
7301(define-public java-fasterxml-jackson-annotations
7302 (package
7303 (name "java-fasterxml-jackson-annotations")
7304 (version "2.9.4")
7305 (source (origin
7306 (method url-fetch)
7307 (uri (string-append "https://github.com/FasterXML/"
7308 "jackson-annotations/archive/"
7309 "jackson-annotations-" version ".tar.gz"))
7310 (sha256
7311 (base32
7312 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7313 (build-system ant-build-system)
7314 (arguments
7315 `(#:jar-name "jackson-annotations.jar"
7316 #:source-dir "src/main/java"
7317 #:test-dir "src/test"))
7318 (native-inputs
7319 `(("junit" ,java-junit)))
7320 (home-page "https://github.com/FasterXML/jackson-annotations")
7321 (synopsis "General purpose annotations for the Jackson Data Processor")
7322 (description "This package contains general purpose annotations for the
7323Jackson Data Processor, used on value and handler types. The only annotations
7324not included are ones that require dependency to the Databind package.")
7325 (license license:asl2.0)))
7326
7327(define-public java-fasterxml-jackson-core
7328 (package
7329 (name "java-fasterxml-jackson-core")
7330 (version "2.9.4")
7331 (source (origin
7332 (method url-fetch)
7333 (uri (string-append "https://github.com/FasterXML/"
7334 "jackson-core/archive/"
7335 "jackson-core-" version ".tar.gz"))
7336 (sha256
7337 (base32
7338 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7339 (build-system ant-build-system)
7340 (arguments
7341 `(#:jar-name "jackson-core.jar"
7342 #:source-dir "src/main/java"
7343 #:test-dir "src/test"
7344 #:test-exclude
7345 (list
7346 ;; Expected failure. pom.xml excludes these
7347 "**/failing/**"
7348 ;; Base classes that have no constructor for junit
7349 "**/BaseTest.java"
7350 "**/ConcurrencyReadTest.java"
7351 "**/ManualCharAccessTest.java"
7352 "**/ManualCharAccessTest.java"
7353 "**/TrailingCommasTest.java"
7354 "**/AsyncMissingValuesInObjectTest.java"
7355 "**/AsyncMissingValuesInArrayTest.java")
7356 #:phases
7357 (modify-phases %standard-phases
7358 (add-before 'configure 'generate-PackageVersion.java
7359 (lambda _
7360 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7361 (in (string-append out ".in")))
7362 (copy-file in out)
7363 (substitute* out
7364 (("@package@") "com.fasterxml.jackson.core.json")
7365 (("@projectversion@") ,version)
7366 (("@projectgroupid@") "com.fasterxml.jackson.core")
7367 (("@projectartifactid@") "jackson-core")))))
7368 (add-before 'build 'copy-resources
7369 (lambda _
7370 (copy-recursively "src/main/resources"
7371 "build/classes")))
7372 (add-before 'check 'copy-test-resources
7373 (lambda _
7374 (copy-recursively "src/test/resources"
7375 "build/test-classes"))))))
7376 (native-inputs
7377 `(("junit" ,java-junit)
7378 ("hamcrest" ,java-hamcrest-core)))
7379 (home-page "https://github.com/FasterXML/jackson-core")
7380 (synopsis "")
7381 (description "")
7382 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7383
7384(define-public java-fasterxml-jackson-databind
7385 (package
7386 (name "java-fasterxml-jackson-databind")
7387 (version "2.9.4")
7388 (source (origin
7389 (method url-fetch)
7390 (uri (string-append "https://github.com/FasterXML/"
7391 "jackson-databind/archive/"
7392 "jackson-databind-" version ".tar.gz"))
7393 (sha256
7394 (base32
7395 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7396 (build-system ant-build-system)
7397 (arguments
7398 `(#:jar-name "jackson-databind.jar"
7399 #:source-dir "src/main/java"
7400 #:tests? #f; requires javax.measures for which I can't find a free implementation
7401 #:phases
7402 (modify-phases %standard-phases
7403 (add-before 'configure 'generate-PackageVersion.java
7404 (lambda _
7405 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7406 (in (string-append out ".in")))
7407 (copy-file in out)
7408 (substitute* out
7409 (("@package@") "com.fasterxml.jackson.databind.cfg")
7410 (("@projectversion@") ,version)
7411 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7412 (("@projectartifactid@") "jackson-databind")))))
7413 (add-before 'build 'copy-resources
7414 (lambda _
7415 (copy-recursively "src/main/resources" "build/classes"))))))
7416 (inputs
7417 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7418 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7419 (home-page "https://github.com/FasterXML/jackson-databind")
7420 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7421 (description "This package contains the general-purpose data-binding
7422functionality and tree-model for Jackson Data Processor. It builds on core
7423streaming parser/generator package, and uses Jackson Annotations for
7424configuration.")
7425 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7426
7427(define-public java-fasterxml-jackson-modules-base-jaxb
7428 (package
7429 (name "java-fasterxml-jackson-modules-base-jaxb")
7430 (version "2.9.4")
7431 (source (origin
7432 (method url-fetch)
7433 (uri (string-append "https://github.com/FasterXML/"
7434 "jackson-modules-base/archive/"
7435 "jackson-modules-base-" version ".tar.gz"))
7436 (sha256
7437 (base32
7438 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7439 (build-system ant-build-system)
7440 (arguments
7441 `(#:jar-name "jackson-modules-base-jaxb.jar"
7442 #:source-dir "jaxb/src/main/java"
7443 #:test-dir "jaxb/src/test"
7444 #:test-exclude
7445 ;; Base class for tests
7446 (list "**/BaseJaxbTest.java")
7447 #:phases
7448 (modify-phases %standard-phases
7449 (add-before 'configure 'generate-PackageVersion.java
7450 (lambda _
7451 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7452 "jackson/module/jaxb/PackageVersion.java"))
7453 (in (string-append out ".in")))
7454 (copy-file in out)
7455 (substitute* out
7456 (("@package@") "com.fasterxml.jackson.module.jaxb")
7457 (("@projectversion@") ,version)
7458 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7459 (("@projectartifactid@") "jackson-module-jaxb")))))
7460 (add-before 'build 'copy-resources
7461 (lambda _
7462 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7463 (inputs
7464 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7465 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7466 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7467 (native-inputs
7468 `(("java-junit" ,java-junit)))
7469 (home-page "https://github.com/FasterXML/jackson-modules-base")
7470 (synopsis "Jaxb annotations jackson module")
7471 (description "This package is the jaxb annotations module for jackson.")
7472 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7473
7474(define-public java-snakeyaml
7475 (package
7476 (name "java-snakeyaml")
7477 (version "1.18")
7478 (source (origin
7479 (method url-fetch)
7480 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7481 version ".tar.gz"))
7482 (file-name (string-append name "-" version ".tar.gz"))
7483 (sha256
7484 (base32
7485 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7486 (build-system ant-build-system)
7487 (arguments
7488 `(#:jar-name "java-snakeyaml.jar"
7489 #:source-dir "src/main/java"
7490 ;; Tests require velocity, a cyclic dependency, and
7491 ;; java-spring-framework-context which is not packaged.
7492 #:tests? #f))
7493 (home-page "https://bitbucket.org/asomov/snakeyaml")
7494 (synopsis "YAML processor")
7495 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7496 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7497
7498(define-public java-fasterxml-jackson-dataformat-yaml
7499 (package
7500 (name "java-fasterxml-jackson-dataformat-yaml")
7501 (version "2.9.4")
7502 (source (origin
7503 (method url-fetch)
7504 (uri (string-append "https://github.com/FasterXML/"
7505 "jackson-dataformats-text/archive/"
7506 "jackson-dataformats-text-" version ".tar.gz"))
7507 (sha256
7508 (base32
7509 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7510 (build-system ant-build-system)
7511 (arguments
7512 `(#:jar-name "jackson-dataformat-yaml.jar"
7513 #:source-dir "yaml/src/main/java"
7514 #:test-dir "yaml/src/test"
7515 #:test-exclude (list "**/failing/**.java")
7516 #:phases
7517 (modify-phases %standard-phases
7518 (add-before 'configure 'generate-PackageVersion.java
7519 (lambda _
7520 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7521 (in (string-append out ".in")))
7522 (copy-file in out)
7523 (substitute* out
7524 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7525 (("@projectversion@") ,version)
7526 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7527 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7528 (inputs
7529 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7530 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7531 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7532 ("java-snakeyaml" ,java-snakeyaml)))
7533 (native-inputs
7534 `(("junit" ,java-junit)
7535 ("hamcrest" ,java-hamcrest-core)
7536 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7537 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7538 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7539 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7540 (synopsis "Yaml backend for Jackson")
7541 (description "Dataformat backends are used to support format alternatives
7542to JSON, supported by default. This is done by sub-classing Jackson core
7543abstractions.")
7544 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7545
7546(define-public java-stax2-api
7547 (package
7548 (name "java-stax2-api")
7549 (version "4.0.0")
7550 (source (origin
7551 (method url-fetch)
7552 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7553 "stax2-api-" version ".tar.gz"))
7554 (sha256
7555 (base32
7556 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7557 (build-system ant-build-system)
7558 (arguments
7559 `(#:jar-name "java-stax2-api.jar"
7560 #:source-dir "src/main/java"
7561 #:tests? #f)); no tests
7562 (home-page "https://github.com/FasterXML/stax2-api")
7563 (synopsis "Stax2 API")
7564 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7565significant new functionalities, such as full-featured bi-direction validation
7566interface and high-performance Typed Access API.")
7567 (license license:bsd-2)))
7568
7569(define-public java-woodstox-core
7570 (package
7571 (name "java-woodstox-core")
7572 (version "5.0.3")
7573 (source (origin
7574 (method url-fetch)
7575 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7576 "woodstox-core-" version ".tar.gz"))
7577 (sha256
7578 (base32
7579 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7580 (build-system ant-build-system)
7581 (arguments
7582 `(#:jar-name "woodstox.jar"
7583 #:test-exclude
7584 (list "**/Base*.java" "failing/**")
7585 #:phases
7586 (modify-phases %standard-phases
7587 (add-before 'build 'remove-msv-dep
7588 (lambda _
7589 ;; we don't need osgi, and it depends on msv
7590 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7591 ;; msv's latest release is from 2011 and we don't need it
7592 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7593 (delete-file-recursively "src/test/java/wstxtest/osgi")
7594 (delete-file-recursively "src/test/java/wstxtest/msv")))
7595 (add-before 'build 'copy-resources
7596 (lambda _
7597 (copy-recursively "src/main/resources" "build/classes"))))))
7598 (inputs
7599 `(("stax2" ,java-stax2-api)))
7600 (native-inputs
7601 `(("junit" ,java-junit)))
7602 (home-page "https://github.com/FasterXML/woodstox")
7603 (synopsis "Stax XML API implementation")
7604 (description "Woodstox is a stax XML API implementation.")
7605 (license license:asl2.0)))
7606
7607(define-public java-fasterxml-jackson-dataformat-xml
7608 (package
7609 (name "java-fasterxml-jackson-dataformat-xml")
7610 (version "2.9.4")
7611 (source (origin
7612 (method url-fetch)
7613 (uri (string-append "https://github.com/FasterXML/"
7614 "jackson-dataformat-xml/archive/"
7615 "jackson-dataformat-xml-" version ".tar.gz"))
7616 (sha256
7617 (base32
7618 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7619 (build-system ant-build-system)
7620 (arguments
7621 `(#:jar-name "jackson-dataformat-xml.jar"
7622 #:source-dir "src/main/java"
7623 #:test-exclude
7624 (list "**/failing/**")
7625 #:phases
7626 (modify-phases %standard-phases
7627 (add-before 'configure 'generate-PackageVersion.java
7628 (lambda _
7629 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7630 (in (string-append out ".in")))
7631 (copy-file in out)
7632 (newline)
7633 (substitute* out
7634 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7635 (("@projectversion@") ,version)
7636 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7637 (("@projectartifactid@") "jackson-dataformat-xml")))))
7638 (add-before 'build 'copy-resources
7639 (lambda _
7640 (copy-recursively "src/main/resources" "build/classes"))))))
7641 (inputs
7642 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7643 ("jackson-core" ,java-fasterxml-jackson-core)
7644 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7645 ("jackson-databind" ,java-fasterxml-jackson-databind)
7646 ("stax2-api" ,java-stax2-api)
7647 ("woodstox" ,java-woodstox-core)))
7648 (native-inputs
7649 `(("junit" ,java-junit)
7650 ("hamcrest" ,java-hamcrest-core)))
7651 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7652 (synopsis "Read and write XML")
7653 (description "This package contains Jackson extension component for reading
7654and writing XML encoded data.
7655
7656Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7657approach (that is, no support is added for \"Schema-first\" approach). Support
7658for JAXB annotations is provided by JAXB annotation module; this module
7659provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7660@code{JsonFactory}) as well as small number of higher level overrides needed to
7661make data-binding work.")
7662 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7663
7664(define-public java-hdrhistogram
7665 (package
7666 (name "java-hdrhistogram")
7667 (version "2.1.9")
7668 (source (origin
7669 (method url-fetch)
7670 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7671 "archive/HdrHistogram-" version ".tar.gz"))
7672 (sha256
7673 (base32
7674 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7675 (build-system ant-build-system)
7676 (arguments
7677 `(#:jar-name "java-hdrhistogram.jar"
7678 #:source-dir "src/main/java"
7679 #:phases
7680 (modify-phases %standard-phases
7681 (add-before 'configure 'set-version
7682 (lambda _
7683 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7684 (template (string-append version-java ".template")))
7685 (copy-file template version-java)
7686 (substitute* version-java
7687 (("\\$VERSION\\$") ,version)
7688 (("\\$BUILD_TIME\\$") "0"))
7689 #t))))))
7690 (native-inputs
7691 `(("junit" ,java-junit)
7692 ("hamcrest" ,java-hamcrest-core)))
7693 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7694 (synopsis "High dynamic range histogram")
7695 (description "Hdrhistogram allows to create histograms that support
7696recording and analyzing sampled data value counts across a configurable integer
7697value range with configurable value precision within the range. Value precision
7698is expressed as the number of significant digits in the value recording, and
7699provides control over value quantization behavior across the value range and
7700the subsequent value resolution at any given level.")
7701 (license license:public-domain)))
7702
7703(define-public java-cofoja
7704 (package
7705 (name "java-cofoja")
7706 (version "1.3")
7707 (source (origin
7708 (method git-fetch)
7709 (uri (git-reference
7710 (url "https://github.com/nhatminhle/cofoja.git")
7711 (commit (string-append "v" version))))
7712 (file-name (string-append "java-cofoja-" version "-checkout"))
7713 (sha256
7714 (base32
7715 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7716 (build-system ant-build-system)
7717 (arguments
7718 `(#:build-target "dist"
7719 #:test-target "test"
7720 #:jdk ,icedtea-8
7721 #:make-flags
7722 (list "-Ddist.dir=dist")
7723 #:modules ((guix build ant-build-system)
7724 (guix build java-utils)
7725 (guix build utils)
7726 (srfi srfi-1)
7727 (ice-9 match))
7728 #:phases
7729 (modify-phases %standard-phases
7730 ;; The bulid system ignores the class path the ant-build-system sets
7731 ;; up and instead expects to find all dependencies in the "lib"
7732 ;; directory.
7733 (add-after 'unpack 'create-libdir
7734 (lambda* (#:key inputs #:allow-other-keys)
7735 (mkdir-p "lib")
7736 (for-each
7737 (lambda (file)
7738 (let ((target (string-append "lib/" (basename file))))
7739 (unless (file-exists? target)
7740 (symlink file target))))
7741 (append-map (match-lambda
7742 ((label . dir)
7743 (find-files dir "\\.jar$")))
7744 inputs))
7745 #t))
7746 (replace 'install (install-jars "dist")))))
7747 (inputs
7748 `(("java-asm" ,java-asm)))
7749 (native-inputs
7750 `(("java-junit" ,java-junit)))
7751 (home-page "https://github.com/nhatminhle/cofoja")
7752 (synopsis "Contracts for Java")
7753 (description "Contracts for Java, or Cofoja for short, is a contract
7754programming framework and test tool for Java, which uses annotation processing
7755and bytecode instrumentation to provide run-time checking. (In particular,
7756this is not a static analysis tool.)")
7757 (license license:lgpl3+)))
7758
7759(define-public java-aopalliance
7760 (package
7761 (name "java-aopalliance")
7762 (version "1.0")
7763 (source (origin
7764 (method git-fetch)
7765 ;; Note: this git repository is not official, but contains the
7766 ;; source code that is in the CVS repository. Downloading the
7767 ;; tarball from sourceforge is undeterministic, and the cvs download
7768 ;; fails.
7769 (uri (git-reference
7770 (url "https://github.com/hoverruan/aopalliance")
7771 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7772 (file-name (string-append name "-" version))
7773 (sha256
7774 (base32
7775 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7776 (build-system ant-build-system)
7777 (arguments
7778 `(#:jar-name "java-aopalliance.jar"
7779 #:jdk ,icedtea-8
7780 #:tests? #f; no tests
7781 #:source-dir "aopalliance/src/main"))
7782 (home-page "http://aopalliance.sourceforge.net")
7783 (synopsis "Aspect-Oriented Programming")
7784 (description "The AOP Alliance project is a joint project between several
7785software engineering people who are interested in Aspect-Oriented Programming
7786(AOP) and Java.")
7787 (license license:public-domain)))
7788
7789(define-public java-javax-inject
7790 (package
7791 (name "java-javax-inject")
7792 (version "tck-1")
7793 (source (origin
7794 (method url-fetch)
7795 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7796 "archive/javax.inject-" version ".tar.gz"))
7797 (sha256
7798 (base32
7799 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7800 (build-system ant-build-system)
7801 (arguments
7802 `(#:jar-name "java-javax-inject.jar"
7803 #:jdk ,icedtea-8
7804 #:tests? #f)); no tests
7805 (home-page "http://github.com/javax-inject/javax-inject")
7806 (synopsis "JSR-330: Dependency Injection for Java")
7807 (description "This package specifies a means for obtaining objects in such
7808a way as to maximize reusability, testability and maintainability compared to
7809traditional approaches such as constructors, factories, and service locators
7810(e.g., JNDI). This process, known as dependency injection, is beneficial to
7811most nontrivial applications.
7812
7813Many types depend on other types. For example, a @var{Stopwatch} might depend
7814on a @var{TimeSource}. The types on which a type depends are known as its
7815dependencies. The process of finding an instance of a dependency to use at run
7816time is known as resolving the dependency. If no such instance can be found,
7817the dependency is said to be unsatisfied, and the application is broken.")
7818 (license license:asl2.0)))
7819
7820(define-public java-guice
7821 (package
7822 (name "java-guice")
7823 (version "4.1")
7824 (source (origin
7825 (method url-fetch)
7826 (uri (string-append "https://github.com/google/guice/archive/"
7827 version ".tar.gz"))
7828 (file-name (string-append name "-" version ".tar.gz"))
7829 (sha256
7830 (base32
7831 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7832 (build-system ant-build-system)
7833 (arguments
7834 `(#:jar-name "java-guice.jar"
7835 #:jdk ,icedtea-8
7836 #:tests? #f; FIXME: tests are not in a java sub directory
7837 #:source-dir "core/src"))
7838 (inputs
7839 `(("guava" ,java-guava)
7840 ("java-cglib" ,java-cglib)
7841 ("java-aopalliance" ,java-aopalliance)
7842 ("java-javax-inject" ,java-javax-inject)
7843 ("java-asm" ,java-asm)))
7844 (home-page "https://github.com/google/guice")
7845 (synopsis "Lightweight dependency injection framework")
7846 (description "Guice is a lightweight dependency injection framework fo
7847Java 6 and above.")
7848 (license license:asl2.0)))
7849
7850(define-public java-guice-servlet
7851 (package
7852 (inherit java-guice)
7853 (name "java-guice-servlet")
7854 (arguments
7855 `(#:jar-name "guice-servlet.jar"
7856 #:source-dir "extensions/servlet/src/"
7857 #:jdk ,icedtea-8
7858 #:tests? #f)); FIXME: not in a java subdir
7859 (inputs
7860 `(("guice" ,java-guice)
7861 ("servlet" ,java-tomcat)
7862 ,@(package-inputs java-guice)))))
7863
7864(define-public java-assertj
7865 (package
7866 (name "java-assertj")
7867 (version "3.8.0")
7868 (source (origin
7869 (method url-fetch)
7870 (uri (string-append "https://github.com/joel-costigliola/"
7871 "assertj-core/archive/"
7872 "assertj-core-" version ".tar.gz"))
7873 (sha256
7874 (base32
7875 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7876 (build-system ant-build-system)
7877 (arguments
7878 `(#:jar-name "java-assertj.jar"
7879 #:jdk ,icedtea-8
7880 #:source-dir "src/main/java"
7881 #:tests? #f)); depends on tng-junit which depends on assertj
7882 (inputs
7883 `(("cglib" ,java-cglib)
7884 ("junit" ,java-junit)
7885 ("hamcrest" ,java-hamcrest-core)))
7886 (native-inputs
7887 `(("mockito" ,java-mockito-1)))
7888 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7889 (synopsis "Fluent assertions for java")
7890 (description "AssertJ core is a Java library that provides a fluent
7891interface for writing assertions. Its main goal is to improve test code
7892readability and make maintenance of tests easier.")
7893 (license license:asl2.0)))
7894
7895(define-public java-jboss-javassist
7896 (package
7897 (name "java-jboss-javassist")
7898 (version "3.21.0")
7899 (source (origin
7900 (method url-fetch)
7901 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7902 "archive/rel_"
7903 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7904 "_ga.tar.gz"))
7905 (sha256
7906 (base32
7907 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7908 (build-system ant-build-system)
7909 (arguments
7910 `(#:jar-name "java-jboss-javassist.jar"
7911 #:jdk ,icedtea-8
7912 #:source-dir "src/main"
7913 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7914 #:phases
7915 (modify-phases %standard-phases
7916 (add-before 'configure 'remove-binary
7917 (lambda _
7918 (delete-file "javassist.jar")
7919 #t)))))
7920 (native-inputs
7921 `(("junit" ,java-junit)))
7922 (home-page "https://github.com/jboss-javassist/javassist")
7923 (synopsis "Java bytecode engineering toolkit")
7924 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7925manipulation simple. It is a class library for editing bytecodes in Java; it
7926enables Java programs to define a new class at runtime and to modify a class
7927file when the JVM loads it.")
7928 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7929
7930(define-public java-jcommander
7931 (package
7932 (name "java-jcommander")
7933 (version "1.71")
7934 (source (origin
7935 (method url-fetch)
7936 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7937 version ".tar.gz"))
7938 (file-name (string-append name "-" version ".tar.gz"))
7939 (sha256
7940 (base32
7941 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7942 (build-system ant-build-system)
7943 (arguments
7944 `(#:jar-name "java-jcommander.jar"
7945 #:jdk ,icedtea-8
7946 #:tests? #f; requires testng which depends on jcommander
7947 #:source-dir "src/main/java"))
7948 (home-page "http://jcommander.org")
7949 (synopsis "Command line parameters parser")
7950 (description "JCommander is a very small Java framework that makes it
7951trivial to parse command line parameters. Parameters are declared with
7952annotations.")
7953 (license license:asl2.0)))
7954
7955(define-public java-bsh
7956 (package
7957 (name "java-bsh")
7958 (version "2.0b6")
7959 (source (origin
7960 (method url-fetch)
7961 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7962 version ".tar.gz"))
7963 (file-name (string-append name "-" version ".tar.gz"))
7964 (sha256
7965 (base32
7966 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7967 (build-system ant-build-system)
7968 (arguments
7969 `(#:build-target "jarall"
7970 #:test-target "junit-tests-all"
7971 #:phases
7972 (modify-phases %standard-phases
7973 (replace 'install
7974 (lambda* (#:key outputs #:allow-other-keys)
7975 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7976 (mkdir-p share)
7977 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7978 #t))))))
7979 (home-page "http://beanshell.org/")
7980 (synopsis "Lightweight Scripting for Java")
7981 (description "BeanShell is a small, free, embeddable Java source
7982interpreter with object scripting language features, written in Java.
7983BeanShell dynamically executes standard Java syntax and extends it with common
7984scripting conveniences such as loose types, commands, and method closures like
7985those in Perl and JavaScript.")
7986 (license license:asl2.0)))
7987
7988(define-public java-fest-util
7989 (package
7990 (name "java-fest-util")
7991 (version "1.2.5")
7992 (source (origin
7993 (method url-fetch)
7994 (uri (string-append "https://github.com/alexruiz/fest-util/"
7995 "archive/fest-util-" version ".tar.gz"))
7996 (sha256
7997 (base32
7998 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7999 (build-system ant-build-system)
8000 (arguments
8001 `(#:jar-name "java-fest-util.jar"
8002 #:source-dir "src/main/java"))
8003 (native-inputs
8004 `(("junit" ,java-junit)
8005 ("hamcrest" ,java-hamcrest-core)))
8006 (home-page "https://github.com/alexruiz/fest-util")
8007 (synopsis "FEST common utilities")
8008 (description "Common utilities used in all FEST module.")
8009 (license license:asl2.0)))
8010
8011(define-public java-fest-test
8012 (package
8013 (name "java-fest-test")
8014 (version "2.1.0")
8015 (source (origin
8016 (method url-fetch)
8017 (uri (string-append "https://github.com/alexruiz/fest-test/"
8018 "archive/fest-test-" version ".tar.gz"))
8019 (sha256
8020 (base32
8021 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8022 (build-system ant-build-system)
8023 (arguments
8024 `(#:jar-name "java-fest-test.jar"
8025 #:source-dir "src/main/java"
8026 #:tests? #f)); no tests
8027 (inputs
8028 `(("junit" ,java-junit)))
8029 (home-page "https://github.com/alexruiz/fest-test")
8030 (synopsis "Common FEST testing infrastructure")
8031 (description "Fest-test contains the common FEST testing infrastructure.")
8032 (license license:asl2.0)))
8033
8034(define-public java-fest-assert
8035 (package
8036 (name "java-fest-assert")
8037 (version "2.0M10")
8038 (source (origin
8039 (method url-fetch)
8040 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8041 "archive/fest-assert-core-" version ".tar.gz"))
8042 (sha256
8043 (base32
8044 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8045 (build-system ant-build-system)
8046 (arguments
8047 `(#:jar-name "java-fest-assert.jar"
8048 #:source-dir "src/main/java"
8049 #:test-exclude
8050 (list
8051 "**/Abstract*.java"
8052 "**/*BaseTest.java"
8053 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8054 "**/MessageFormatter_format_Test.java"
8055 "**/internal/*/*_assert*_Test.java")))
8056 (inputs
8057 `(("java-fest-util" ,java-fest-util)))
8058 (native-inputs
8059 `(("java-junit" ,java-junit)
8060 ("java-fest-test" ,java-fest-test)
8061 ("java-hamcrest-core" ,java-hamcrest-core)
8062 ("java-mockito" ,java-mockito-1)
8063 ("java-cglib" ,java-cglib)
8064 ("java-objenesis" ,java-objenesis)
8065 ("java-asm" ,java-asm)))
8066 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8067 (synopsis "FEST fluent assertions")
8068 (description "FEST-Assert provides a fluent interface for assertions.")
8069 (license license:asl2.0)))
8070
8071(define-public java-testng
8072 (package
8073 (name "java-testng")
8074 (version "6.14.3")
8075 (source (origin
8076 (method git-fetch)
8077 (uri (git-reference
8078 (url "https://github.com/cbeust/testng.git")
8079 (commit version)))
8080 (file-name (string-append name "-" version "-checkout"))
8081 (sha256
8082 (base32
8083 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8084 (build-system ant-build-system)
8085 (arguments
8086 `(#:jdk ,icedtea-8; java.util.function
8087 #:jar-name "java-testng.jar"
8088 #:source-dir "src/main/java"
8089 #:phases
8090 (modify-phases %standard-phases
8091 ;; FIXME: I don't know why these tests fail
8092 (add-after 'unpack 'delete-failing-tests
8093 (lambda _
8094 (substitute* "src/test/resources/testng.xml"
8095 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8096 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8097 #t))
8098 ;; We don't have groovy
8099 (add-after 'unpack 'delete-groovy-tests
8100 (lambda _
8101 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8102 (substitute* "src/test/resources/testng.xml"
8103 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8104 #t))
8105 (add-before 'build 'copy-resources
8106 (lambda _
8107 (copy-recursively "src/main/resources" "build/classes")
8108 #t))
8109 (add-before 'check 'copy-test-resources
8110 (lambda _
8111 (copy-recursively "src/test/resources" "build/test-classes")
8112 #t))
8113 (replace 'check
8114 (lambda _
8115 (system* "ant" "compile-tests")
8116 ;; we don't have groovy
8117 (substitute* "src/test/resources/testng.xml"
8118 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8119 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
8120 ":build/classes"
8121 ":build/test-classes")
8122 "-Dtest.resources.dir=src/test/resources"
8123 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
8124 (propagated-inputs
8125 `(("junit" ,java-junit)
8126 ("java-jsr305" ,java-jsr305)
8127 ("java-bsh" ,java-bsh)
8128 ("java-jcommander" ,java-jcommander)
8129 ("java-guice" ,java-guice)
8130 ("snakeyaml" ,java-snakeyaml)))
8131 (native-inputs
8132 `(("guava" ,java-guava)
8133 ("java-javax-inject" ,java-javax-inject)
8134 ("java-hamcrest" ,java-hamcrest-all)
8135 ("java-assertj" ,java-assertj)
8136 ("java-mockito" ,java-mockito-1)
8137 ("cglib" ,java-cglib)
8138 ("asm" ,java-asm)
8139 ("aopalliance" ,java-aopalliance)))
8140 (home-page "http://testng.org")
8141 (synopsis "Testing framework")
8142 (description "TestNG is a testing framework inspired from JUnit and NUnit
8143but introducing some new functionalities that make it more powerful and easier
8144to use.")
8145 (license license:asl2.0)))
8146
8147(define-public java-jnacl
8148 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8149 (revision "2"))
8150 (package
8151 (name "java-jnacl")
8152 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8153 (source (origin
8154 (method git-fetch)
8155 (uri (git-reference
8156 (url "https://github.com/neilalexander/jnacl.git")
8157 (commit commit)))
8158 (file-name (git-file-name name version))
8159 (sha256
8160 (base32
8161 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8162 (build-system ant-build-system)
8163 (arguments
8164 `(#:jar-name "jnacl.jar"
8165 #:source-dir "src/main/java"
8166 #:jdk ,icedtea-8
8167 #:phases
8168 (modify-phases %standard-phases
8169 (add-before 'build 'fix-tests
8170 (lambda _
8171 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8172 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8173 (("assertions.Assertions") "assertions.api.Assertions"))
8174 #t))
8175 (replace 'check
8176 (lambda _
8177 (invoke "ant" "compile-tests")
8178 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8179 ":build/classes"
8180 ":build/test-classes")
8181 "org.testng.TestNG" "-testclass"
8182 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8183 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8184 ":build/classes"
8185 ":build/test-classes")
8186 "org.testng.TestNG" "-testclass"
8187 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8188 #t)))))
8189 (native-inputs
8190 `(("java-testng" ,java-testng)
8191 ("java-fest-util" ,java-fest-util)
8192 ("java-fest-assert" ,java-fest-assert)))
8193 (home-page "https://github.com/neilalexander/jnacl")
8194 (synopsis "Java implementation of NaCl")
8195 (description "Pure Java implementation of the NaCl: Networking and
8196Cryptography library.")
8197 (license license:bsd-2))))
8198
8199(define-public java-mvel2
8200 (package
8201 (name "java-mvel2")
8202 (version "2.3.1")
8203 (source (origin
8204 (method url-fetch)
8205 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8206 version ".Final.tar.gz"))
8207 (sha256
8208 (base32
8209 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8210 (build-system ant-build-system)
8211 (arguments
8212 `(#:jar-name "mvel2.jar"
8213 #:source-dir "src/main/java"
8214 #:test-exclude
8215 (list "**/Abstract*.java"
8216 ;; Base class with no tests
8217 "**/MVELThreadTest.java")
8218 #:phases
8219 (modify-phases %standard-phases
8220 (add-after 'install 'install-bin
8221 (lambda* (#:key outputs #:allow-other-keys)
8222 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8223 (mkdir-p bin)
8224 (with-output-to-file (string-append bin "/mvel2")
8225 (lambda _
8226 (display
8227 (string-append
8228 "#!" (which "bash") "\n"
8229 "if [ \"$#\" -ne \"2\" ]; then\n"
8230 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8231 "exit\n"
8232 "fi\n"
8233 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8234 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8235 " org.mvel2.sh.Main $1"))))
8236 (chmod (string-append bin "/mvel2") #o755))
8237 #t)))))
8238 (native-inputs
8239 `(("junit" ,java-junit)
8240 ("hamcrest" ,java-hamcrest-core)))
8241 (home-page "https://github.com/mvel/mvel")
8242 (synopsis "MVFLEX Expression Language")
8243 (description "MVEL has largely been inspired by Java syntax, but has some
8244fundamental differences aimed at making it more efficient as an expression
8245language, such as operators that directly support collection, array and string
8246matching, as well as regular expressions. MVEL is used to evaluate expressions
8247written using Java syntax.
8248
8249In addition to the expression language, MVEL serves as a templating language for
8250configuration and string construction.")
8251 (license license:asl2.0)))
8252
8253(define-public java-commons-jexl-2
8254 (package
8255 (name "java-commons-jexl")
8256 (version "2.1.1")
8257 (source (origin
8258 (method url-fetch)
8259 (uri (string-append "mirror://apache/commons/jexl/source/"
8260 "commons-jexl-" version "-src.tar.gz"))
8261 (sha256
8262 (base32
8263 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8264 (build-system ant-build-system)
8265 (arguments
8266 `(#:jar-name "commons-jexl-2.jar"
8267 #:jdk ,icedtea-8
8268 #:source-dir "src/main/java"
8269 #:phases
8270 (modify-phases %standard-phases
8271 (add-before 'check 'disable-broken-tests
8272 (lambda* (#:key inputs #:allow-other-keys)
8273 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8274 (substitute* "ArithmeticTest.java"
8275 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8276 (("asserter.assertExpression\\(\"imanull") "//"))
8277 ;; This test fails with "ambiguous method invocation"
8278 (delete-file "CacheTest.java")
8279 ;; This test doesn't have access to the temp directory
8280 (substitute* "ClassCreatorTest.java"
8281 (("java.io.tmpdir") "user.dir"))
8282 ;; This test fails in trying to detect whether it can run.
8283 (substitute* "ClassCreator.java"
8284 (("boolean canRun =.*") "boolean canRun = false;\n"))
8285 ;; ...and these tests depend on it.
8286 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8287 (delete-file "scripting/JexlScriptEngineTest.java"))
8288 #t))
8289 (add-before 'build 'run-javacc
8290 (lambda _
8291 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8292 (invoke "java" "jjtree" "Parser.jjt")
8293 (invoke "java" "javacc" "Parser.jj"))
8294 #t)))))
8295 (inputs
8296 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8297 (native-inputs
8298 `(("java-junit" ,java-junit)
8299 ("java-hamcrest-core" ,java-hamcrest-core)
8300 ("javacc" ,javacc-4)))
8301 (home-page "https://commons.apache.org/proper/commons-jexl/")
8302 (synopsis "Java Expression Language ")
8303 (description "JEXL is a library intended to facilitate the implementation
8304of dynamic and scripting features in applications and frameworks written in
8305Java. JEXL implements an Expression Language based on some extensions to the
8306JSTL Expression Language supporting most of the constructs seen in
8307shell-script or ECMAScript. Its goal is to expose scripting features usable
8308by technical operatives or consultants working with enterprise platforms.")
8309 (license license:asl2.0)))
8310
8311(define-public java-lz4
8312 (package
8313 (name "java-lz4")
8314 (version "1.4.0")
8315 (source (origin
8316 (method url-fetch)
8317 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8318 version ".tar.gz"))
8319 (file-name (string-append name "-" version ".tar.gz"))
8320 (sha256
8321 (base32
8322 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8323 (build-system ant-build-system)
8324 (arguments
8325 `(#:jar-name "lz4.jar"
8326 #:jdk ,icedtea-8
8327 #:source-dir "src/java:src/java-unsafe"
8328 #:tests? #f; FIXME: requires more dependencies
8329 #:phases
8330 (modify-phases %standard-phases
8331 (add-before 'configure 'generate-source
8332 (lambda _
8333 (with-directory-excursion "src/build/source_templates"
8334 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8335 #t)))))
8336 (native-inputs
8337 `(("mvel" ,java-mvel2)))
8338 (home-page "https://jpountz.github.io/lz4-java")
8339 (synopsis "Compression algorithm")
8340 (description "LZ4 - Java is a Java port of the popular lz4 compression
8341algorithms and xxHash hashing algorithm.")
8342 (license license:asl2.0)))
8343
8344(define-public java-bouncycastle
8345 (package
8346 (name "java-bouncycastle")
8347 (version "1.59")
8348 (source (origin
8349 (method url-fetch)
8350 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8351 (substring version 0 1) "rv"
8352 (substring version 2 4) ".tar.gz"))
8353 (sha256
8354 (base32
8355 "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
8356 (modules '((guix build utils)))
8357 (snippet
8358 '(begin
8359 (for-each delete-file
8360 (find-files "." "\\.jar$"))
8361 #t))))
8362 (build-system ant-build-system)
8363 (arguments
8364 `(#:jdk ,icedtea-8
8365 #:tests? #f
8366 #:phases
8367 (modify-phases %standard-phases
8368 (replace 'build
8369 (lambda _
8370 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8371 (invoke "ant" "-f" "ant/jdk15+.xml" "build")
8372 #t))
8373 ;; FIXME: the tests freeze.
8374 ;; (replace 'check
8375 ;; (lambda _
8376 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8377 (replace 'install
8378 (install-jars "build/artifacts/jdk1.5/jars")))))
8379 (inputs
8380 `(("java-javax-mail" ,java-javax-mail)))
8381 (native-inputs
8382 `(("unzip" ,unzip)
8383 ("junit" ,java-junit)
8384 ("java-native-access" ,java-native-access)
8385 ("java-native-access-platform" ,java-native-access-platform)))
8386 (home-page "https://www.bouncycastle.org")
8387 (synopsis "Cryptographic library")
8388 (description "Bouncy Castle is a cryptographic library for the Java
8389programming language.")
8390 (license license:expat)))
8391
8392(define-public java-lmax-disruptor
8393 (package
8394 (name "java-lmax-disruptor")
8395 (version "3.3.7")
8396 (source (origin
8397 (method url-fetch)
8398 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8399 "archive/" version ".tar.gz"))
8400 (file-name (string-append name "-" version ".tar.gz"))
8401 (sha256
8402 (base32
8403 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8404 (build-system ant-build-system)
8405 (arguments
8406 `(#:jar-name "java-lmax-disruptor.jar"
8407 #:jdk ,icedtea-8
8408 #:tests? #f)); tests hang
8409 (inputs
8410 `(("junit" ,java-junit)
8411 ("java-hdrhistogram" ,java-hdrhistogram)
8412 ("java-jmock" ,java-jmock)
8413 ("java-jmock-legacy" ,java-jmock-legacy)
8414 ("java-jmock-junit4" ,java-jmock-junit4)
8415 ("java-hamcrest-all" ,java-hamcrest-all)))
8416 (native-inputs
8417 `(("cglib" ,java-cglib)
8418 ("objenesis" ,java-objenesis)
8419 ("asm" ,java-asm)))
8420 (home-page "https://www.lmax.com/disruptor")
8421 (synopsis "High performance inter-thread communication")
8422 (description "LMAX Disruptor is a software pattern and software component
8423for high performance inter-thread communication that avoids the need for
8424message queues or resource locking.")
8425 (license license:asl2.0)))
8426
8427(define-public java-commons-bcel
8428 (package
8429 (name "java-commons-bcel")
8430 (version "6.1")
8431 (source (origin
8432 (method url-fetch)
8433 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8434 version "-src.tar.gz"))
8435 (sha256
8436 (base32
8437 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8438 (build-system ant-build-system)
8439 (arguments
8440 `(#:jar-name "bcel.jar"
8441 #:jdk ,icedtea-8
8442 #:source-dir "src/main/java"
8443 #:test-dir "src/test/java"
8444 ;; FIXME: Tests require the unpackaged jna.
8445 #:tests? #f))
8446 (home-page "https://commons.apache.org/proper/commons-bcel/")
8447 (synopsis "Byte code engineering library")
8448 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8449intended to give users a convenient way to analyze, create, and
8450manipulate (binary) Java class files. Classes are represented by objects
8451which contain all the symbolic information of the given class: methods, fields
8452and byte code instructions, in particular.
8453
8454Such objects can be read from an existing file, be transformed by a
8455program (e.g. a class loader at run-time) and written to a file again. An
8456even more interesting application is the creation of classes from scratch at
8457run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8458if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8459of Java @code{.class} files.")
8460 (license license:asl2.0)))
8461
8462(define-public java-xerial-core
8463 (package
8464 (name "java-xerial-core")
8465 (version "2.1")
8466 (source (origin
8467 (method url-fetch)
8468 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8469 version ".tar.gz"))
8470 (file-name (string-append name "-" version ".tar.gz"))
8471 (sha256
8472 (base32
8473 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8474 (build-system ant-build-system)
8475 (arguments
8476 `(#:jar-name "xerial-core.jar"
8477 #:source-dir "xerial-core/src/main/java"
8478 #:test-dir "xerial-core/src/test"
8479 #:phases
8480 (modify-phases %standard-phases
8481 (add-before 'build 'copy-resources
8482 (lambda _
8483 (copy-recursively "xerial-core/src/main/resources"
8484 "build/classes")
8485 #t)))))
8486 (native-inputs
8487 `(("junit" ,java-junit)
8488 ("hamcrest" ,java-hamcrest-core)))
8489 (home-page "https://github.com/xerial/xerial-java")
8490 (synopsis "Data management libraries for Java")
8491 (description "Xerial is a set of data management libraries for the Java
8492programming language. The ultimate goal of the Xerial project is to manage
8493everything as database, including class objects, text format data, data
8494streams, etc.")
8495 (license license:asl2.0)))
8496
8497(define-public java-powermock-reflect
8498 (package
8499 (name "java-powermock-reflect")
8500 (version "1.7.3")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (string-append "https://github.com/powermock/powermock/"
8504 "archive/powermock-" version ".tar.gz"))
8505 (file-name (string-append name "-" version ".tar.gz"))
8506 (sha256
8507 (base32
8508 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8509 (patches
8510 (search-patches "java-powermock-fix-java-files.patch"))))
8511 (build-system ant-build-system)
8512 (arguments
8513 `(#:jar-name "java-powermock-reflect.jar"
8514 #:jdk ,icedtea-8
8515 #:source-dir "powermock-reflect/src/main/java"
8516 #:test-dir "powermock-reflect/src/test"))
8517 (inputs
8518 `(("java-objenesis" ,java-objenesis)))
8519 (native-inputs
8520 `(("junit" ,java-junit)
8521 ("cglib" ,java-cglib)
8522 ("asm" ,java-asm)
8523 ("hamcrest" ,java-hamcrest-core)
8524 ("assertj" ,java-assertj)))
8525 (home-page "https://github.com/powermock/powermock")
8526 (synopsis "Mock library extension framework")
8527 (description "PowerMock is a framework that extends other mock libraries
8528such as EasyMock with more powerful capabilities. PowerMock uses a custom
8529classloader and bytecode manipulation to enable mocking of static methods,
8530constructors, final classes and methods, private methods, removal of static
8531initializers and more. By using a custom classloader no changes need to be
8532done to the IDE or continuous integration servers which simplifies adoption.")
8533 (license license:asl2.0)))
8534
8535(define-public java-powermock-core
8536 (package
8537 (inherit java-powermock-reflect)
8538 (name "java-powermock-core")
8539 (arguments
8540 `(#:jar-name "java-powermock-core.jar"
8541 #:source-dir "powermock-core/src/main/java"
8542 #:test-dir "powermock-core/src/test"
8543 #:tests? #f; requires powermock-api
8544 #:jdk ,icedtea-8
8545 #:phases
8546 (modify-phases %standard-phases
8547 (add-before 'build 'copy-resources
8548 (lambda _
8549 (copy-recursively "powermock-core/src/main/resources"
8550 "build/classes"))))))
8551 (inputs
8552 `(("reflect" ,java-powermock-reflect)
8553 ("javassist" ,java-jboss-javassist)))
8554 (native-inputs
8555 `(("junit" ,java-junit)
8556 ("assertj" ,java-assertj)
8557 ("mockito" ,java-mockito-1)))))
8558
8559(define-public java-powermock-api-support
8560 (package
8561 (inherit java-powermock-reflect)
8562 (name "java-powermock-api-support")
8563 (build-system ant-build-system)
8564 (arguments
8565 `(#:jar-name "java-powermock-api-support.jar"
8566 #:jdk ,icedtea-8
8567 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8568 #:tests? #f)); no tests
8569 (inputs
8570 `(("core" ,java-powermock-core)
8571 ("reflect" ,java-powermock-reflect)))))
8572
8573(define-public java-powermock-modules-junit4-common
8574 (package
8575 (inherit java-powermock-reflect)
8576 (name "java-powermock-modules-junit4-common")
8577 (build-system ant-build-system)
8578 (arguments
8579 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8580 #:jdk ,icedtea-8
8581 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8582 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8583 (inputs
8584 `(("core" ,java-powermock-core)
8585 ("easymock" ,java-easymock)
8586 ("reflect" ,java-powermock-reflect)
8587 ("hamcrest" ,java-hamcrest-core)
8588 ("cglib" ,java-cglib)))))
8589
8590(define-public java-powermock-modules-junit4
8591 (package
8592 (inherit java-powermock-reflect)
8593 (name "java-powermock-modules-junit4")
8594 (build-system ant-build-system)
8595 (arguments
8596 `(#:jar-name "java-powermock-modules-junit4.jar"
8597 #:jdk ,icedtea-8
8598 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8599 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8600 #:phases
8601 (modify-phases %standard-phases
8602 (add-before 'build 'fix-junit-detection
8603 (lambda _
8604 ;; Our junit version is 4.12-SNAPSHOT
8605 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8606 "PowerMockJUnit4MethodValidator.java")
8607 (("4.12") "4.12-SNAPSHOT")))))))
8608 (inputs
8609 `(("core" ,java-powermock-core)
8610 ("reflect" ,java-powermock-reflect)
8611 ("common" ,java-powermock-modules-junit4-common)
8612 ("cglib" ,java-cglib)))
8613 (native-inputs
8614 `(("easymock" ,java-easymock)
8615 ("hamcrest" ,java-hamcrest-core)
8616 ("objenesis" ,java-objenesis)
8617 ("asm" ,java-asm)
8618 ("junit" ,java-junit)))))
8619
8620(define-public java-powermock-api-easymock
8621 (package
8622 (inherit java-powermock-reflect)
8623 (name "java-powermock-api-easymock")
8624 (build-system ant-build-system)
8625 (arguments
8626 `(#:jar-name "java-powermock-api-easymock.jar"
8627 #:jdk ,icedtea-8
8628 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8629 #:tests? #f; no tests
8630 #:phases
8631 (modify-phases %standard-phases
8632 (add-before 'build 'fix-file
8633 (lambda _
8634 ;; FIXME: This looks wrong, but it fixes a build error.
8635 (with-directory-excursion "powermock-api/powermock-api-easymock"
8636 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8637 (("classLoader instanceof MockClassLoader") "false")
8638 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8639 #t)))))
8640 (inputs
8641 `(("core" ,java-powermock-core)
8642 ("easymock" ,java-easymock)
8643 ("reflect" ,java-powermock-reflect)
8644 ("support" ,java-powermock-api-support)
8645 ("cglib" ,java-cglib)))))
8646
8647(define-public java-jboss-jms-api-spec
8648 (package
8649 (name "java-jboss-jms-api-spec")
8650 (version "2.0")
8651 (source (origin
8652 (method url-fetch)
8653 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8654 "archive/jboss-jms-api_" version
8655 "_spec-1.0.1.Final.tar.gz"))
8656 (sha256
8657 (base32
8658 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8659 (build-system ant-build-system)
8660 (arguments
8661 `(#:jar-name "java-jboss-jms-api_spec.jar"
8662 #:jdk ,icedtea-8
8663 #:source-dir "."
8664 #:tests? #f)); no tests
8665 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8666 (synopsis "Java Message Service API specification")
8667 (description "Java Message Service (JMS) API is used to send messages
8668messages between two or more clients. It is a messaging standard that allows
8669application components to create, send, receive, and read messages.")
8670 ; either gpl2 only with GPL Classpath Exception, or cddl.
8671 (license (list license:gpl2 license:cddl1.0))))
8672
8673(define-public java-mail
8674 (package
8675 (name "java-mail")
8676 (version "1.6.0")
8677 (source (origin
8678 (method url-fetch)
8679 (uri (string-append "https://github.com/javaee/javamail/archive/"
8680 "JAVAMAIL-1_6_0.tar.gz"))
8681 (sha256
8682 (base32
8683 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8684 (build-system ant-build-system)
8685 (arguments
8686 `(#:jar-name "java-mail.jar"
8687 #:jdk ,icedtea-8
8688 #:source-dir "mail/src/main/java"
8689 #:test-dir "mail/src/test"
8690 #:test-exclude
8691 (list "**/CollectorFormatterTest.java"
8692 "**/CompactFormatterTest.java"
8693 "**/DurationFilterTest.java"
8694 "**/MailHandlerTest.java"
8695 "**/GetLocalAddressTest.java"
8696 ;; FIXME: both end with:
8697 ;; java.lang.ClassNotFoundException:
8698 ;; javax.mail.internet.MimeMultipartParseTest
8699 "**/MimeMultipartParseTest.java"
8700 "**/SearchTermSerializationTest.java")
8701 #:phases
8702 (modify-phases %standard-phases
8703 (add-before 'configure 'move-version.java
8704 (lambda _
8705 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8706 "mail/src/main/java/javax/mail/Version.java")
8707 #t))
8708 (add-before 'build 'copy-resources
8709 (lambda _
8710 (copy-recursively "mail/src/main/resources/META-INF"
8711 "build/classes/META-INF")
8712 #t)))))
8713 (native-inputs
8714 `(("junit" ,java-junit)
8715 ("hamcrest" ,java-hamcrest-core)))
8716 (home-page "https://javaee.github.io/javamail/")
8717 (synopsis "Mail-related functionnalities in Java")
8718 (description "The JavaMail API provides a platform-independent and
8719protocol-independent framework to build mail and messaging applications.")
8720 ;; General Public License Version 2 only ("GPL") or the Common Development
8721 ;; and Distribution License("CDDL")
8722 (license (list license:cddl1.1
8723 license:gpl2)))); with classpath exception
8724
8725(define-public java-jeromq
8726 (package
8727 (name "java-jeromq")
8728 (version "0.4.3")
8729 (source (origin
8730 (method git-fetch)
8731 (uri (git-reference
8732 (url "https://github.com/zeromq/jeromq.git")
8733 (commit (string-append "v" version))))
8734 (file-name (string-append name "-" version "-checkout"))
8735 (sha256
8736 (base32
8737 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8738 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8739 (build-system ant-build-system)
8740 (arguments
8741 `(#:jar-name "java-jeromq.jar"
8742 #:source-dir "src/main/java"
8743 #:jdk ,icedtea-8
8744 #:test-exclude
8745 (list
8746 "**/Abstract*.java"
8747 ;; Requires network
8748 "**/ZBeaconTest.java"
8749 ;; Failures
8750 "**/DealerSpecTest.java"
8751 "**/CustomDecoderTest.java"
8752 "**/CustomEncoderTest.java"
8753 "**/ConnectRidTest.java"
8754 "**/ReqSpecTest.java"
8755 "**/PushPullSpecTest.java"
8756 "**/PubSubHwmTest.java"
8757 "**/RouterSpecTest.java"
8758 "**/ProxyTest.java")))
8759 (inputs
8760 `(("java-jnacl" ,java-jnacl)))
8761 (native-inputs
8762 `(("java-hamcrest-core" ,java-hamcrest-core)
8763 ("junit" ,java-junit)))
8764 (home-page "http://zeromq.org/bindings:java")
8765 (synopsis "Java binding for 0MQ")
8766 (description "Jeromq provides the java bindings for 0MQ.")
8767 (license license:mpl2.0)))
8768
8769(define-public java-kafka-clients
8770 (package
8771 (name "java-kafka-clients")
8772 (version "1.0.0")
8773 (source (origin
8774 (method url-fetch)
8775 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8776 version "-src.tgz"))
8777 (sha256
8778 (base32
8779 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8780 (build-system ant-build-system)
8781 (arguments
8782 `(#:jar-name "java-kafka-clients.jar"
8783 #:jdk ,icedtea-8
8784 #:source-dir "clients/src/main/java"
8785 #:test-dir "clients/src/test"
8786 #:test-exclude
8787 (list
8788 ;; This file does not contain a class
8789 "**/IntegrationTest.java"
8790 ;; Requires network
8791 "**/ClientUtilsTest.java"
8792 ;; End with errors that seem related to our powermock
8793 "**/KafkaProducerTest.java"
8794 "**/BufferPoolTest.java")))
8795 (inputs
8796 `(("java-slf4j-api" ,java-slf4j-api)
8797 ("java-lz4" ,java-lz4)))
8798 (native-inputs
8799 `(("junit" ,java-junit)
8800 ("hamcrest" ,java-hamcrest-all)
8801 ("objenesis" ,java-objenesis)
8802 ("asm" ,java-asm)
8803 ("cglib" ,java-cglib)
8804 ("javassist" ,java-jboss-javassist)
8805 ("snappy" ,java-snappy)
8806 ("easymock" ,java-easymock)
8807 ("powermock" ,java-powermock-core)
8808 ("powermock-easymock" ,java-powermock-api-easymock)
8809 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8810 ("powermock-junit4" ,java-powermock-modules-junit4)
8811 ("powermock-support" ,java-powermock-api-support)
8812 ("java-bouncycastle" ,java-bouncycastle)))
8813 (home-page "https://kafka.apache.org")
8814 (synopsis "Distributed streaming platform")
8815 (description "Kafka is a distributed streaming platform, which means:
8816@itemize
8817@item it can publish and subscribe to streams of records;
8818@item it can store streams of records in a fault-tolerant way;
8819@item it can process streams of records as they occur.
8820@end itemize")
8821 ;; Either cddl or gpl2 only.
8822 (license (list license:cddl1.1; actually cddl1.1
8823 license:gpl2)))); with classpath exception
8824
8825(define-public java-jdom
8826 (package
8827 (name "java-jdom")
8828 (version "1.1.3")
8829 (source (origin
8830 (method url-fetch)
8831 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8832 version ".tar.gz"))
8833 (sha256
8834 (base32
8835 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8836 (build-system ant-build-system)
8837 (arguments
8838 `(#:build-target "package"
8839 #:tests? #f; tests are run as part of the build process
8840 #:phases
8841 (modify-phases %standard-phases
8842 (replace 'install
8843 (install-jars "build")))))
8844 (home-page "http://jdom.org/")
8845 (synopsis "Access, manipulate, and output XML data")
8846 (description "Java-based solution for accessing, manipulating, and
8847outputting XML data from Java code.")
8848 (license license:bsd-4)))
8849
8850(define-public java-geronimo-xbean-reflect
8851 (package
8852 (name "java-geronimo-xbean-reflect")
8853 (version "4.5")
8854 (source (origin
8855 (method svn-fetch)
8856 (uri (svn-reference
8857 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8858 (revision 1807396)))
8859 (file-name (string-append name "-" version))
8860 (sha256
8861 (base32
8862 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8863 (build-system ant-build-system)
8864 (arguments
8865 `(#:jar-name "geronimo-xbean-reflect.jar"
8866 #:source-dir "xbean-reflect/src/main/java"
8867 #:test-dir "xbean-reflect/src/test"
8868 #:jdk ,icedtea-8
8869 #:test-exclude
8870 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8871 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8872 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8873 #:phases
8874 (modify-phases %standard-phases
8875 (add-before 'build 'fix-source
8876 (lambda _
8877 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8878 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8879 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8880 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8881 #t))))))
8882 (inputs
8883 `(("asm" ,java-asm)
8884 ("log4j" ,java-log4j-api)
8885 ("log4j-1.2" ,java-log4j-1.2-api)
8886 ("log4j-core" ,java-log4j-core)
8887 ("logging" ,java-commons-logging-minimal)))
8888 (native-inputs
8889 `(("junit" ,java-junit)))
8890 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8891 (synopsis "Dependency injection helper")
8892 (description "Xbean-reflect provides very flexible ways to create objects
8893and graphs of objects for dependency injection frameworks")
8894 (license license:asl2.0)))
8895
8896(define-public java-geronimo-xbean-bundleutils
8897 (package
8898 (inherit java-geronimo-xbean-reflect)
8899 (name "java-geronimo-xbean-bundleutils")
8900 (arguments
8901 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8902 #:source-dir "xbean-bundleutils/src/main/java"
8903 #:test-dir "xbean-bundleutils/src/test"
8904 #:phases
8905 (modify-phases %standard-phases
8906 (add-before 'build 'fix-java
8907 (lambda _
8908 ;; We use a more recent version of osgi, so this file requires
8909 ;; more interface method implementations.
8910 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8911 (("import org.osgi.framework.ServiceRegistration;")
8912 "import org.osgi.framework.ServiceRegistration;
8913import org.osgi.framework.ServiceFactory;
8914import java.util.Collection;
8915import org.osgi.framework.ServiceObjects;")
8916 (("public Bundle getBundle\\(\\)")
8917 "@Override
8918public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8919 throw new UnsupportedOperationException();
8920}
8921@Override
8922public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8923 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8924 throw new UnsupportedOperationException();
8925}
8926public Bundle getBundle()"))
8927 #t)))))
8928 (inputs
8929 `(("java-slf4j" ,java-slf4j-api)
8930 ("java-asm" ,java-asm)
8931 ("java-osgi-framework" ,java-osgi-framework)
8932 ("java-eclipse-osgi" ,java-eclipse-osgi)
8933 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8934
8935(define-public java-geronimo-xbean-asm-util
8936 (package
8937 (inherit java-geronimo-xbean-reflect)
8938 (name "java-geronimo-xbean-asm-util")
8939 (arguments
8940 `(#:jar-name "geronimo-xbean-asm-util.jar"
8941 #:source-dir "xbean-asm-util/src/main/java"
8942 #:tests? #f)); no tests
8943 (inputs
8944 `(("java-asm" ,java-asm)))
8945 (native-inputs '())))
8946
8947(define-public java-geronimo-xbean-finder
8948 (package
8949 (inherit java-geronimo-xbean-reflect)
8950 (name "java-geronimo-xbean-finder")
8951 (arguments
8952 `(#:jar-name "geronimo-xbean-finder.jar"
8953 #:source-dir "xbean-finder/src/main/java"
8954 #:test-dir "xbean-finder/src/test"))
8955 (inputs
8956 `(("java-slf4j-api" ,java-slf4j-api)
8957 ("java-asm" ,java-asm)
8958 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8959 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8960 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8961 ("java-osgi-framework" ,java-osgi-framework)))
8962 (native-inputs
8963 `(("java-junit" ,java-junit)
8964 ("java-hamcrest-core" ,java-hamcrest-core)))))
8965
8966(define-public java-gson
8967 (package
8968 (name "java-gson")
8969 (version "2.8.2")
8970 (source (origin
8971 (method url-fetch)
8972 (uri (string-append "https://github.com/google/gson/archive/"
8973 "gson-parent-" version ".tar.gz"))
8974 (sha256
8975 (base32
8976 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8977 (build-system ant-build-system)
8978 (arguments
8979 `(#:jar-name "gson.jar"
8980 #:source-dir "gson/src/main/java"
8981 #:test-dir "gson/src/test"))
8982 (native-inputs
8983 `(("java-junit" ,java-junit)
8984 ("java-hamcrest-core" ,java-hamcrest-core)))
8985 (home-page "https://github.com/google/gson")
8986 (synopsis "Java serialization/deserialization library from/to JSON")
8987 (description "Gson is a Java library that can be used to convert Java
8988Objects into their JSON representation. It can also be used to convert a JSON
8989string to an equivalent Java object. Gson can work with arbitrary Java objects
8990including pre-existing objects that you do not have source-code of.")
8991 (license license:asl2.0)))
8992
8993(define-public java-hawtjni
8994 (package
8995 (name "java-hawtjni")
8996 (version "1.15")
8997 (source (origin
8998 (method url-fetch)
8999 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9000 "hawtjni-project-" version ".tar.gz"))
9001 (sha256
9002 (base32
9003 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9004 (build-system ant-build-system)
9005 (arguments
9006 `(#:jar-name "hawtjni.jar"
9007 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9008 #:tests? #f; no tests
9009 #:phases
9010 (modify-phases %standard-phases
9011 (add-before 'build 'build-native
9012 (lambda* (#:key inputs #:allow-other-keys)
9013 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9014 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9015 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9016 "-fPIC" "-O2" include)
9017 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9018 "-fPIC" "-O2" include)
9019 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9020 "hawtjni.o" "hawtjni-callback.o")))
9021 #t))
9022 (add-after 'install 'install-native
9023 (lambda* (#:key outputs #:allow-other-keys)
9024 (let* ((out (assoc-ref outputs "out"))
9025 (lib (string-append out "/lib"))
9026 (inc (string-append out "/include")))
9027 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9028 (install-file "libhawtjni.so" lib)
9029 (install-file "hawtjni.h" inc)))
9030 #t)))))
9031 (inputs
9032 `(("java-commons-cli" ,java-commons-cli)
9033 ("java-asm" ,java-asm)
9034 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9035 (home-page "https://fusesource.github.io/hawtjni/")
9036 (synopsis "JNI code generator")
9037 (description "HawtJNI is a code generator that produces the JNI code needed
9038to implement Java native methods. It is based on the jnigen code generator
9039that is part of the SWT Tools project.")
9040 (license license:asl2.0)))
9041
9042(define-public java-jansi-native
9043 (package
9044 (name "java-jansi-native")
9045 (version "1.7")
9046 (source (origin
9047 (method url-fetch)
9048 (uri (string-append "https://github.com/fusesource/jansi-native/"
9049 "archive/jansi-native-" version ".tar.gz"))
9050 (sha256
9051 (base32
9052 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9053 (build-system ant-build-system)
9054 (arguments
9055 `(#:jar-name "jansi-native.jar"
9056 #:source-dir "src/main/java"
9057 #:tests? #f; no tests
9058 #:phases
9059 (modify-phases %standard-phases
9060 (add-before 'build 'build-native
9061 (lambda* (#:key inputs #:allow-other-keys)
9062 ;; there are more required files for windows in windows/
9063 (with-directory-excursion "src/main/native-package/src"
9064 (substitute* "jansi_ttyname.c"
9065 (("#include \"jansi_.*") ""))
9066 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9067 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9068 "/include")
9069 (string-append "-I" (assoc-ref inputs "jdk")
9070 "/include/linux")
9071 "-fPIC" "-O2")
9072 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
9073 #t)))
9074 (add-before 'build 'install-native
9075 (lambda _
9076 (let ((dir (string-append "build/classes/META-INF/native/"
9077 ,(match (%current-system)
9078 ((or "i686-linux" "armhf-linux")
9079 "linux32")
9080 ((or "x86_64-linux" "aarch64-linux")
9081 "linux64")))))
9082 (install-file "src/main/native-package/src/libjansi.so" dir))
9083 #t))
9084 (add-after 'install 'install-native
9085 (lambda* (#:key outputs #:allow-other-keys)
9086 (install-file "src/main/native-package/src/jansi.h"
9087 (string-append (assoc-ref outputs "out") "/include"))
9088 #t)))))
9089 (inputs
9090 `(("java-hawtjni" ,java-hawtjni)))
9091 (home-page "https://fusesource.github.io/jansi/")
9092 (synopsis "Native library for jansi")
9093 (description "This package provides the native library for jansi, a small
9094Java library that allows you to use ANSI escape sequences to format your
9095console output.")
9096 (license license:asl2.0)))
9097
9098(define-public java-jansi
9099 (package
9100 (name "java-jansi")
9101 (version "1.16")
9102 (source (origin
9103 (method url-fetch)
9104 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9105 "jansi-project-" version ".tar.gz"))
9106 (sha256
9107 (base32
9108 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9109 (build-system ant-build-system)
9110 (arguments
9111 `(#:jar-name "jansi.jar"
9112 #:source-dir "jansi/src/main/java"
9113 #:test-dir "jansi/src/test"
9114 #:phases
9115 (modify-phases %standard-phases
9116 (add-after 'check 'clear-term
9117 (lambda _
9118 (zero? (system* "echo" "-e" "\\e[0m")))))))
9119 (inputs
9120 `(("java-jansi-native" ,java-jansi-native)))
9121 (native-inputs
9122 `(("java-junit" ,java-junit)
9123 ("java-hamcrest-core" ,java-hamcrest-core)))
9124 (home-page "https://fusesource.github.io/jansi/")
9125 (synopsis "Portable ANSI escape sequences")
9126 (description "Jansi is a Java library that allows you to use ANSI escape
9127sequences to format your console output which works on every platform.")
9128 (license license:asl2.0)))
9129
9130(define-public java-jboss-el-api-spec
9131 (package
9132 (name "java-jboss-el-api-spec")
9133 (version "3.0")
9134 (source (origin
9135 (method url-fetch)
9136 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9137 "archive/jboss-el-api_" version
9138 "_spec-1.0.7.Final.tar.gz"))
9139 (sha256
9140 (base32
9141 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9142 (build-system ant-build-system)
9143 (arguments
9144 `(#:jar-name "java-jboss-el-api_spec.jar"
9145 #:jdk ,icedtea-8))
9146 (inputs
9147 `(("java-junit" ,java-junit)))
9148 (home-page "https://github.com/jboss/jboss-el-api_spec")
9149 (synopsis "JSR-341 expression language 3.0 API")
9150 (description "This package contains an implementation of the JSR-341
9151specification for the expression language 3.0. It implements an expression
9152language inspired by ECMAScript and XPath. This language is used with
9153JavaServer Pages (JSP).")
9154 ;; Either GPL2 only or CDDL.
9155 (license (list license:gpl2 license:cddl1.1))))
9156
9157(define-public java-jboss-interceptors-api-spec
9158 (package
9159 (name "java-jboss-interceptors-api-spec")
9160 (version "1.2")
9161 (source (origin
9162 (method url-fetch)
9163 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9164 "archive/jboss-interceptors-api_" version
9165 "_spec-1.0.0.Final.tar.gz"))
9166 (sha256
9167 (base32
9168 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9169 (build-system ant-build-system)
9170 (arguments
9171 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9172 #:jdk ,icedtea-8
9173 #:source-dir "."
9174 #:tests? #f)); no tests
9175 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9176 (synopsis "Interceptors 1.2 API classes from JSR 318")
9177 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9178API. Interceptors are used to interpose on business method invocations and
9179specific events.")
9180 ;; Either GPL2 only or CDDL.
9181 (license (list license:gpl2 license:cddl1.1))))
9182
9183(define-public java-cdi-api
9184 (package
9185 (name "java-cdi-api")
9186 (version "2.0")
9187 (source (origin
9188 (method url-fetch)
9189 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9190 version ".tar.gz"))
9191 (file-name (string-append name "-" version ".tar.gz"))
9192 (sha256
9193 (base32
9194 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9195 (build-system ant-build-system)
9196 (arguments
9197 `(#:source-dir "api/src/main/java"
9198 #:jar-name "java-cdi-api.jar"
9199 #:test-dir "api/src/test"
9200 #:jdk ,icedtea-8
9201 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9202 (inputs
9203 `(("java-javax-inject" ,java-javax-inject)
9204 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9205 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9206 (native-inputs
9207 `(("java-testng" ,java-testng)
9208 ("java-hamcrest-core" ,java-hamcrest-core)))
9209 (home-page "http://cdi-spec.org/")
9210 (synopsis "Contexts and Dependency Injection APIs")
9211 (description "Java-cdi-api contains the required APIs for Contexts and
9212Dependency Injection (CDI).")
9213 (license license:asl2.0)))
9214
9215(define-public java-joda-convert
9216 (package
9217 (name "java-joda-convert")
9218 (version "1.9.2")
9219 (source (origin
9220 (method url-fetch)
9221 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9222 version ".tar.gz"))
9223 (file-name (string-append name "-" version ".tar.gz"))
9224 (sha256
9225 (base32
9226 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9227 (build-system ant-build-system)
9228 (arguments
9229 `(#:jar-name (string-append ,name "-" ,version ".jar")
9230 #:source-dir "src/main/java"
9231 #:test-include (list "**/Test*.java")
9232 ;; Contains only interfaces and base classes (no test)
9233 #:test-exclude (list "**/test*/**.java")))
9234 (inputs
9235 `(("java-guava" ,java-guava)))
9236 (native-inputs
9237 `(("java-junit" ,java-junit)
9238 ("java-hamcrest-core" ,java-hamcrest-core)))
9239 (home-page "http://www.joda.org/joda-convert/")
9240 (synopsis "Conversion between Objects and Strings")
9241 (description "Joda-Convert provides a small set of classes to aid
9242conversion between Objects and Strings. It is not intended to tackle the
9243wider problem of Object to Object transformation.")
9244 (license license:asl2.0)))
9245
9246(define-public java-joda-time
9247 (package
9248 (name "java-joda-time")
9249 (version "2.9.9")
9250 (source (origin
9251 (method url-fetch)
9252 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9253 version ".tar.gz"))
9254 (file-name (string-append name "-" version ".tar.gz"))
9255 (sha256
9256 (base32
9257 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9258 (build-system ant-build-system)
9259 (arguments
9260 `(#:jar-name "java-joda-time.jar"
9261 #:source-dir "src/main/java"
9262 #:test-include (list "**/Test*.java")
9263 ;; There is no runnable test in these files
9264 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9265 #:phases
9266 (modify-phases %standard-phases
9267 (add-after 'build 'build-resources
9268 (lambda _
9269 (mkdir-p "build/classes/org/joda/time/tz/data")
9270 (mkdir-p "build/classes/org/joda/time/format")
9271 ;; This will produce the following exception:
9272 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9273 ;; which is normal, because it doesn't exist yet. It still generates
9274 ;; the same file as in the binary one can find on maven.
9275 (invoke "java" "-cp"
9276 (string-append "build/classes:" (getenv "CLASSPATH"))
9277 "org.joda.time.tz.ZoneInfoCompiler"
9278 "-src" "src/main/java/org/joda/time/tz/src"
9279 "-dst" "build/classes/org/joda/time/tz/data"
9280 "africa" "antarctica" "asia" "australasia"
9281 "europe" "northamerica" "southamerica"
9282 "pacificnew" "etcetera" "backward" "systemv")
9283 (for-each (lambda (f)
9284 (copy-file f (string-append
9285 "build/classes/org/joda/time/format/"
9286 (basename f))))
9287 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9288 #t))
9289 (add-before 'install 'regenerate-jar
9290 (lambda _
9291 ;; We need to regenerate the jar file to add generated data.
9292 (delete-file "build/jar/java-joda-time.jar")
9293 (invoke "ant" "jar")))
9294 (add-before 'check 'copy-test-resources
9295 (lambda _
9296 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9297 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9298 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9299 (copy-recursively "src/test/resources" "build/test-classes")
9300 #t)))))
9301 (inputs
9302 `(("java-joda-convert" ,java-joda-convert)))
9303 (native-inputs
9304 `(("java-junit" ,java-junit)
9305 ("java-hamcrest-core" ,java-hamcrest-core)
9306 ("tzdata" ,tzdata)))
9307 (home-page "http://www.joda.org/joda-time/")
9308 (synopsis "Replacement for the Java date and time classes")
9309 (description "Joda-Time is a replacement for the Java date and time
9310classes prior to Java SE 8.")
9311 (license license:asl2.0)))
9312
9313(define-public java-xerces
9314 (package
9315 (name "java-xerces")
9316 (version "2.11.0")
9317 (source
9318 (origin
9319 (method url-fetch)
9320 (uri (string-append "mirror://apache/xerces/j/source/"
9321 "Xerces-J-src." version ".tar.gz"))
9322 (sha256
9323 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9324 (patches (search-patches
9325 "java-xerces-xjavac_taskdef.patch"
9326 "java-xerces-build_dont_unzip.patch"
9327 "java-xerces-bootclasspath.patch"))))
9328 (build-system ant-build-system)
9329 (arguments
9330 `(#:tests? #f;; Test files are not present
9331 #:test-target "test"
9332 #:jdk ,icedtea-8
9333 #:phases
9334 (modify-phases %standard-phases
9335 (add-after 'unpack 'create-build.properties
9336 (lambda* (#:key inputs #:allow-other-keys)
9337 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9338 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9339 (with-output-to-file "build.properties"
9340 (lambda _
9341 (format #t
9342 "jar.jaxp = ~a/share/java/jaxp.jar~@
9343 jar.apis-ext = ~a/share/java/jaxp.jar~@
9344 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9345 jaxp jaxp resolver)))
9346 ;; Make xerces use our version of jaxp in tests
9347 (substitute* "build.xml"
9348 (("xml-apis.jar")
9349 (string-append jaxp "/share/java/jaxp.jar"))
9350 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9351 "${jar.apis}")))
9352 #t))
9353 (replace 'install (install-jars "build")))))
9354 (inputs
9355 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9356 ("java-jaxp" ,java-jaxp)))
9357 (home-page "https://xerces.apache.org/xerces2-j/")
9358 (synopsis "Validating XML parser for Java with DOM level 3 support")
9359 (description "The Xerces2 Java parser is the reference implementation of
9360XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9361processor.
9362
9363Xerces2-J supports the following standards and APIs:
9364
9365@itemize
9366@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9367@item Namespaces in XML Recommendation
9368@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9369 Range Recommendations
9370@item Simple API for XML (SAX) 2.0.1 Core and Extension
9371@item Java APIs for XML Processing (JAXP) 1.2.01
9372@item XML Schema 1.0 Structures and Datatypes Recommendations
9373@item Experimental implementation of the Document Object Model (DOM) Level 3
9374 Core and Load/Save Working Drafts
9375@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9376 Candidate Recommendation
9377@end itemize
9378
9379Xerces is now able to parse documents written according to the XML 1.1
9380Candidate Recommendation, except that it does not yet provide an option to
9381enable normalization checking as described in section 2.13 of this
9382specification. It also handles namespaces according to the XML Namespaces 1.1
9383Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9384the DOM level 3 load/save API's are in use.")
9385 (license license:asl2.0)))
9386
9387(define-public java-jline
9388 (package
9389 (name "java-jline")
9390 (version "1.0")
9391 (source (origin
9392 (method url-fetch)
9393 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9394 version ".tar.gz"))
9395 (sha256
9396 (base32
9397 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9398 (build-system ant-build-system)
9399 (arguments
9400 `(#:jar-name "jline.jar"
9401 #:source-dir "src/main/java"
9402 #:test-dir "src/test"
9403 #:phases
9404 (modify-phases %standard-phases
9405 (add-before 'build 'copy-resources
9406 (lambda _
9407 (copy-recursively "src/main/resources" "build/classes")
9408 #t)))))
9409 (native-inputs
9410 `(("java-junit" ,java-junit)))
9411 (home-page "https://jline.github.io")
9412 (synopsis "Console input handling library")
9413 (description "JLine is a Java library for handling console input. It is
9414similar in functionality to BSD editline and GNU readline but with additional
9415features that bring it on par with the Z shell line editor.")
9416 (license license:bsd-3)))
9417
9418(define-public java-jline-2
9419 (package
9420 (inherit java-jline)
9421 (version "2.14.5")
9422 (source (origin
9423 (method url-fetch)
9424 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9425 version ".tar.gz"))
9426 (sha256
9427 (base32
9428 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9429 (arguments
9430 `(#:jdk ,icedtea-8
9431 ,@(package-arguments java-jline)))
9432 (inputs
9433 `(("java-jansi" ,java-jansi)
9434 ("java-jansi-native" ,java-jansi-native)))
9435 (native-inputs
9436 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9437 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9438 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9439 ("java-powermock-api-support" ,java-powermock-api-support)
9440 ("java-powermock-core" ,java-powermock-core)
9441 ("java-powermock-reflect" ,java-powermock-reflect)
9442 ("java-easymock" ,java-easymock)
9443 ("java-jboss-javassist" ,java-jboss-javassist)
9444 ("java-objenesis" ,java-objenesis)
9445 ("java-asm" ,java-asm)
9446 ("java-hamcrest-core" ,java-hamcrest-core)
9447 ("java-cglib" ,java-cglib)
9448 ("java-junit" ,java-junit)
9449 ("java-hawtjni" ,java-hawtjni)))))
9450
9451(define-public java-xmlunit
9452 (package
9453 (name "java-xmlunit")
9454 (version "2.5.1")
9455 (source (origin
9456 (method url-fetch)
9457 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9458 version ".tar.gz"))
9459 (file-name (string-append name "-" version ".tar.gz"))
9460 (sha256
9461 (base32
9462 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9463 (build-system ant-build-system)
9464 (arguments
9465 `(#:jar-name "java-xmlunit.jar"
9466 #:source-dir "xmlunit-core/src/main/java"
9467 #:test-dir "xmlunit-core/src/test"
9468 #:phases
9469 (modify-phases %standard-phases
9470 (add-before 'check 'copy-test-resources
9471 (lambda* (#:key inputs #:allow-other-keys)
9472 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9473 #t)))))
9474 (native-inputs
9475 `(("java-junit" ,java-junit)
9476 ("java-mockito-1" ,java-mockito-1)
9477 ("java-hamcrest-all" ,java-hamcrest-all)
9478 ("java-objenesis" ,java-objenesis)
9479 ("java-asm" ,java-asm)
9480 ("java-cglib" ,java-cglib)
9481 ("resources"
9482 ,(origin
9483 (method git-fetch)
9484 (uri (git-reference
9485 (url "https://github.com/xmlunit/test-resources.git")
9486 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9487 (file-name "java-xmlunit-test-resources")
9488 (sha256
9489 (base32
9490 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9491 (home-page "http://www.xmlunit.org/")
9492 (synopsis "XML output testing")
9493 (description "XMLUnit provides you with the tools to verify the XML you
9494emit is the one you want to create. It provides helpers to validate against
9495an XML Schema, assert the values of XPath queries or compare XML documents
9496against expected outcomes.")
9497 (license license:asl2.0)))
9498
9499(define-public java-xmlunit-legacy
9500 (package
9501 (inherit java-xmlunit)
9502 (name "java-xmlunit-legacy")
9503 (arguments
9504 `(#:jar-name "java-xmlunit-legacy.jar"
9505 #:source-dir "xmlunit-legacy/src/main/java"
9506 #:test-dir "xmlunit-legacy/src/test"))
9507 (inputs
9508 `(("java-xmlunit" ,java-xmlunit)
9509 ("java-junit" ,java-junit)))
9510 (native-inputs
9511 `(("java-mockito-1" ,java-mockito-1)))))
9512
9513(define-public java-openchart2
9514 (package
9515 (name "java-openchart2")
9516 (version "1.4.3")
9517 (source (origin
9518 (method url-fetch)
9519 (uri (string-append "http://download.approximatrix.com/openchart2/"
9520 "openchart2-" version ".source.zip"))
9521 (sha256
9522 (base32
9523 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9524 (build-system ant-build-system)
9525 (arguments
9526 `(#:test-target "test"
9527 #:phases
9528 (modify-phases %standard-phases
9529 (add-after 'unpack 'fix-junit-errors
9530 (lambda _
9531 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9532 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9533 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9534 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9535 "model/DefaultChartDataModelConstraintsTest.java"
9536 "model/MultiScatterDataModelConstraintsTest.java"
9537 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9538 (("(assertEquals[^;]+);" before _)
9539 (string-append (string-drop-right before 2) ", 1E-6);"))))
9540 #t))
9541 (replace 'install (install-jars ".")))))
9542 (native-inputs
9543 `(("unzip" ,unzip)
9544 ("java-junit" ,java-junit)
9545 ("java-hamcrest-core" ,java-hamcrest-core)))
9546 (home-page "http://approximatrix.com/products/openchart2/")
9547 (synopsis "Simple plotting for Java")
9548 (description "Openchart2 provides a simple, yet powerful, interface for
9549Java programmers to create two-dimensional charts and plots. The library
9550features an assortment of graph styles, including advanced scatter plots, bar
9551graphs, and pie charts.")
9552 (license license:lgpl2.1+)))
9553
9554(define-public java-commons-httpclient
9555 (package
9556 (name "java-commons-httpclient")
9557 (version "3.1")
9558 (source (origin
9559 (method url-fetch)
9560 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9561 "commons-httpclient/source/commons-httpclient-"
9562 version "-src.tar.gz"))
9563 (sha256
9564 (base32
9565 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9566 (build-system ant-build-system)
9567 (arguments
9568 `(#:build-target "compile"
9569 #:test-target "test"
9570 #:tests? #f; requires junit-textui (junit 3)
9571 #:phases
9572 (modify-phases %standard-phases
9573 (add-before 'build 'fix-accent
9574 (lambda _
9575 (for-each (lambda (file)
9576 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9577 (substitute* file
9578 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9579 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9580 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9581 "src/test/org/apache/commons/httpclient/TestHttps.java"
9582 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
9583 (replace 'install
9584 (lambda* (#:key outputs #:allow-other-keys)
9585 (invoke "ant" "dist"
9586 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9587 "/share/java"))
9588 #t)))))
9589 (propagated-inputs
9590 `(("java-commons-logging" ,java-commons-logging-minimal)
9591 ("java-commons-codec" ,java-commons-codec)))
9592 (home-page "https://hc.apache.org")
9593 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9594 (description "This package contains an HTTP/1.1 compliant HTTP agent
9595implementation. It also provides reusable components for client-side
9596authentication, HTTP state management, and HTTP connection management.")
9597 (license license:asl2.0)))
9598
9599(define-public java-commons-vfs
9600 (package
9601 (name "java-commons-vfs")
9602 (version "2.2")
9603 (source (origin
9604 (method url-fetch)
9605 (uri (string-append "mirror://apache/commons/vfs/source/"
9606 "commons-vfs2-distribution-" version "-src.tar.gz"))
9607 (file-name (string-append name "-" version ".tar.gz"))
9608 (sha256
9609 (base32
9610 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9611 (modules '((guix build utils)))
9612 (snippet
9613 '(begin
9614 (for-each delete-file
9615 (find-files "." "\\.jar$"))
9616 #t))))
9617 (build-system ant-build-system)
9618 (arguments
9619 `(#:jar-name "commons-vfs.jar"
9620 #:source-dir "commons-vfs2/src/main/java"
9621 #:test-dir "commons-vfs2/src/test"
9622 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9623 #:tests? #f
9624 #:phases
9625 (modify-phases %standard-phases
9626 (add-before 'build 'remove-hadoop-and-webdav
9627 ; Remove these files as they are not required and depend on difficult
9628 ; packages.
9629 (lambda _
9630 (for-each delete-file-recursively
9631 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9632 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
9633 (inputs
9634 `(("java-commons-collections4" ,java-commons-collections4)
9635 ("java-commons-compress" ,java-commons-compress)
9636 ("java-commons-httpclient" ,java-commons-httpclient)
9637 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9638 ("java-commons-net" ,java-commons-net)
9639 ("java-jsch" ,java-jsch)))
9640 (home-page "http://commons.apache.org/proper/commons-vfs/")
9641 (synopsis "Java filesystem library")
9642 (description "Commons VFS provides a single API for accessing various
9643different file systems. It presents a uniform view of the files from various
9644different sources, such as the files on local disk, on an HTTP server, or
9645inside a Zip archive.")
9646 (license license:asl2.0)))
9647
9648(define-public java-jakarta-oro
9649 (package
9650 (name "java-jakarta-oro")
9651 (version "2.0.8")
9652 (source (origin
9653 (method url-fetch)
9654 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9655 "jakarta-oro-" version ".tar.gz"))
9656 (sha256
9657 (base32
9658 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9659 (modules '((guix build utils)))
9660 (snippet
9661 `(begin
9662 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9663 #t))))
9664 (build-system ant-build-system)
9665 (arguments
9666 `(#:build-target "package"
9667 #:tests? #f; tests are run as part of the build process
9668 #:phases
9669 (modify-phases %standard-phases
9670 (replace 'install
9671 (install-jars ,(string-append "jakarta-oro-" version))))))
9672 (home-page "https://jakarta.apache.org/oro/")
9673 (synopsis "Text-processing for Java")
9674 (description "The Jakarta-ORO Java classes are a set of text-processing
9675Java classes that provide Perl5 compatible regular expressions, AWK-like
9676regular expressions, glob expressions, and utility classes for performing
9677substitutions, splits, filtering filenames, etc. This library is the successor
9678of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9679from ORO, Inc.")
9680 (license license:asl1.1)))
9681
9682(define-public java-native-access
9683 (package
9684 (name "java-native-access")
9685 (version "4.5.1")
9686 (source (origin
9687 (method url-fetch)
9688 (uri (string-append "https://github.com/java-native-access/jna/"
9689 "archive/" version ".tar.gz"))
9690 (file-name (string-append name "-" version ".tar.gz"))
9691 (sha256
9692 (base32
9693 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9694 (modules '((guix build utils)))
9695 (snippet
9696 `(begin
9697 (for-each delete-file (find-files "." ".*.jar"))
9698 (delete-file-recursively "native/libffi")
9699 (delete-file-recursively "dist")
9700 #t))))
9701 (build-system ant-build-system)
9702 (arguments
9703 `(#:tests? #f; FIXME: tests require reflections.jar
9704 #:test-target "test"
9705 #:make-flags (list "-Ddynlink.native=true")
9706 #:phases
9707 (modify-phases %standard-phases
9708 (add-before 'build 'fix-build.xml
9709 (lambda* (#:key inputs #:allow-other-keys)
9710 (substitute* "build.xml"
9711 ;; Since we removed the bundled ant.jar, give the correct path
9712 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9713 ;; We removed generated native libraries. We can only rebuild one
9714 ;; so don't fail if we can't find a native library for another architecture.
9715 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9716 ;; Copy test dependencies
9717 (copy-file (string-append (assoc-ref inputs "java-junit")
9718 "/share/java/junit.jar")
9719 "lib/junit.jar")
9720 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9721 "/share/java/hamcrest-core.jar")
9722 "lib/hamcrest-core.jar")
9723 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9724 #t))
9725 (add-before 'build 'build-native
9726 (lambda _
9727 (invoke "ant" "-Ddynlink.native=true" "native")
9728 #t))
9729 (replace 'install
9730 (install-jars "build")))))
9731 (inputs
9732 `(("libffi" ,libffi)
9733 ("libx11" ,libx11)
9734 ("libxt" ,libxt)))
9735 (native-inputs
9736 `(("java-junit" ,java-junit)
9737 ("java-hamcrest-core" ,java-hamcrest-core)))
9738 (home-page "https://github.com/java-native-access/jna")
9739 (synopsis "Access to native shared libraries from Java")
9740 (description "JNA provides Java programs easy access to native shared
9741libraries without writing anything but Java code - no JNI or native code is
9742required. JNA allows you to call directly into native functions using natural
9743Java method invocation.")
9744 ;; Java Native Access project (JNA) is dual-licensed under 2
9745 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9746 (license (list
9747 license:asl2.0
9748 license:lgpl2.1+))))
9749
9750(define-public java-native-access-platform
9751 (package
9752 (inherit java-native-access)
9753 (name "java-native-access-platform")
9754 (arguments
9755 `(#:test-target "test"
9756 #:tests? #f; require jna-test.jar
9757 #:phases
9758 (modify-phases %standard-phases
9759 (add-before 'build 'chdir
9760 (lambda _
9761 (chdir "contrib/platform")
9762 #t))
9763 (add-after 'chdir 'fix-ant
9764 (lambda* (#:key inputs #:allow-other-keys)
9765 (substitute* "nbproject/project.properties"
9766 (("../../build/jna.jar")
9767 (string-append (assoc-ref inputs "java-native-access")
9768 "/share/java/jna.jar"))
9769 (("../../lib/hamcrest-core-.*.jar")
9770 (string-append (assoc-ref inputs "java-hamcrest-core")
9771 "/share/java/hamcrest-core.jar"))
9772 (("../../lib/junit.jar")
9773 (string-append (assoc-ref inputs "java-junit")
9774 "/share/java/junit.jar")))
9775 #t))
9776 (replace 'install
9777 (install-jars "dist")))))
9778 (inputs
9779 `(("java-native-access" ,java-native-access)))
9780 (synopsis "Cross-platform mappings for jna")
9781 (description "java-native-access-platfrom has cross-platform mappings
9782and mappings for a number of commonly used platform functions, including a
9783large number of Win32 mappings as well as a set of utility classes that
9784simplify native access.")))
9785
9786(define-public java-jsch-agentproxy-core
9787 (package
9788 (name "java-jsch-agentproxy-core")
9789 (version "0.0.8")
9790 (source (origin
9791 (method url-fetch)
9792 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9793 version ".tar.gz"))
9794 (file-name (string-append name "-" version ".tar.gz"))
9795 (sha256
9796 (base32
9797 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9798 (build-system ant-build-system)
9799 (arguments
9800 `(#:jar-name "jsch-agentproxy-core.jar"
9801 #:source-dir "jsch-agent-proxy-core/src/main/java"
9802 #:tests? #f)); no tests
9803 (home-page "https://github.com/ymnk/jsch-agent-proxy")
9804 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
9805 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9806and Pageant included Putty. It will be easily integrated into JSch, and users
9807will be allowed to use these programs for authentication.")
9808 (license license:bsd-3)))
9809
9810(define-public java-jsch-agentproxy-sshagent
9811 (package
9812 (inherit java-jsch-agentproxy-core)
9813 (name "java-jsch-agentproxy-sshagent")
9814 (arguments
9815 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9816 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9817 #:tests? #f)); no tests
9818 (inputs
9819 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9820 (synopsis "Proxy to ssh-agent")
9821 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9822and Pageant included in Putty. This component contains the code for a proxy to
9823ssh-agent.")))
9824
9825(define-public java-jsch-agentproxy-usocket-jna
9826 (package
9827 (inherit java-jsch-agentproxy-core)
9828 (name "java-jsch-agentproxy-usocket-jna")
9829 (arguments
9830 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9831 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9832 #:tests? #f)); no tests
9833 (inputs
9834 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9835 ("java-native-access" ,java-native-access)))
9836 (synopsis "USocketFactory implementation using JNA")
9837 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9838and Pageant included in Putty. This component contains an implementation of
9839USocketFactory using @dfn{JNA} (Java Native Access).")))
9840
9841(define-public java-jsch-agentproxy-pageant
9842 (package
9843 (inherit java-jsch-agentproxy-core)
9844 (name "java-jsch-agentproxy-pageant")
9845 (arguments
9846 `(#:jar-name "jsch-agentproxy-pageant.jar"
9847 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9848 #:tests? #f)); no tests
9849 (inputs
9850 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9851 ("java-native-access" ,java-native-access)
9852 ("java-native-access-platform" ,java-native-access-platform)))
9853 (synopsis "Proxy to pageant")
9854 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9855and Pageant included in Putty. This component contains the code for a proxy to
9856pageant.")))
9857
9858(define-public java-jsch-agentproxy-usocket-nc
9859 (package
9860 (inherit java-jsch-agentproxy-core)
9861 (name "java-jsch-agentproxy-usocket-nc")
9862 (arguments
9863 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9864 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9865 #:tests? #f)); no tests
9866 (inputs
9867 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9868 (synopsis "USocketFactory implementation using netcat")
9869 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9870and Pageant included in Putty. This component contains an implementation of
9871USocketFactory using netcat.")))
9872
9873(define-public java-jsch-agentproxy-connector-factory
9874 (package
9875 (inherit java-jsch-agentproxy-core)
9876 (name "java-jsch-agentproxy-connector-factory")
9877 (arguments
9878 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9879 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9880 #:tests? #f)); no tests
9881 (inputs
9882 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9883 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
9884 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
9885 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
9886 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
9887 (synopsis "Connector factory for jsch agent proxy")
9888 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9889and Pageant included in Putty. This component contains a connector factory.")))
9890
9891(define-public java-jsch-agentproxy-jsch
9892 (package
9893 (inherit java-jsch-agentproxy-core)
9894 (name "java-jsch-agentproxy-jsch")
9895 (arguments
9896 `(#:jar-name "jsch-agentproxy-jsch.jar"
9897 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
9898 #:tests? #f)); no tests
9899 (inputs
9900 `(("java-jsch" ,java-jsch)
9901 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9902 (synopsis "JSch integration library for agentproxy")
9903 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9904and Pageant included in Putty. This component contains a library to use
9905jsch-agent-proxy with JSch.")))
9906
9907(define-public java-apache-ivy
9908 (package
9909 (name "java-apache-ivy")
9910 (version "2.4.0")
9911 (source (origin
9912 (method url-fetch)
9913 (uri (string-append "mirror://apache//ant/ivy/" version
9914 "/apache-ivy-" version "-src.tar.gz"))
9915 (sha256
9916 (base32
9917 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
9918 (patches
9919 (search-patches
9920 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
9921 (build-system ant-build-system)
9922 (arguments
9923 `(#:jar-name "ivy.jar"
9924 #:tests? #f
9925 #:phases
9926 (modify-phases %standard-phases
9927 (add-before 'build 'remove-example
9928 (lambda _
9929 (delete-file-recursively "src/example")
9930 #t))
9931 (add-before 'build 'copy-resources
9932 (lambda _
9933 (with-directory-excursion "src/java"
9934 (for-each (lambda (file)
9935 (install-file file (string-append "../../build/classes/" (dirname file))))
9936 (append
9937 (find-files "." ".*.css")
9938 (find-files "." ".*.ent")
9939 (find-files "." ".*.html")
9940 (find-files "." ".*.properties")
9941 (find-files "." ".*.xsd")
9942 (find-files "." ".*.xsl")
9943 (find-files "." ".*.xml"))))))
9944 (add-before 'build 'fix-vfs
9945 (lambda _
9946 (substitute*
9947 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
9948 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
9949 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
9950 #t))
9951 (add-before 'install 'copy-manifest
9952 (lambda _
9953 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
9954 #t))
9955 (add-before 'install 'repack
9956 (lambda _
9957 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
9958 "-C" "build/classes" ".")
9959 #t))
9960 (add-after 'install 'install-bin
9961 (lambda* (#:key outputs #:allow-other-keys)
9962 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
9963 (ivy (string-append bin "/ivy"))
9964 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
9965 (mkdir-p bin)
9966 (with-output-to-file ivy
9967 (lambda _
9968 (display (string-append
9969 "#!" (which "sh") "\n"
9970 "if [[ -z $CLASSPATH ]]; then\n"
9971 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
9972 "else\n"
9973 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
9974 "fi\n"
9975 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
9976 (chmod ivy #o755)
9977 #t))))))
9978 (inputs
9979 `(("java-bouncycastle" ,java-bouncycastle)
9980 ("java-commons-cli" ,java-commons-cli)
9981 ("java-commons-collections" ,java-commons-collections)
9982 ("java-commons-httpclient" ,java-commons-httpclient)
9983 ("java-commons-lang" ,java-commons-lang)
9984 ("java-commons-vfs" ,java-commons-vfs)
9985 ("java-jakarta-oro" ,java-jakarta-oro)
9986 ("java-jsch" ,java-jsch)
9987 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9988 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
9989 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
9990 ("java-junit" ,java-junit)))
9991 (home-page "https://ant.apache.org/ivy")
9992 (synopsis "Dependency manager for the Java programming language")
9993 (description "Ivy is a tool for managing (recording, tracking, resolving
9994and reporting) project dependencies. It is characterized by the following:
9995
9996@itemize
9997@item flexibility and configurability - Ivy is essentially process agnostic
9998 and is not tied to any methodology or structure. Instead it provides the
9999 necessary flexibility and configurability to be adapted to a broad range
10000 of dependency management and build processes.
10001@item tight integration with Apache Ant - while available as a standalone tool,
10002 Ivy works particularly well with Apache Ant providing a number of
10003 powerful Ant tasks ranging from dependency resolution to dependency
10004 reporting and publication.
10005@end itemize")
10006 (license license:asl2.0)))
10007
10008(define-public java-eclipse-sisu-inject
10009 (package
10010 (name "java-eclipse-sisu-inject")
10011 (version "0.3.3")
10012 (source (origin
10013 (method url-fetch)
10014 (uri (string-append "https://github.com/eclipse/sisu.inject/"
10015 "archive/releases/" version ".tar.gz"))
10016 (sha256
10017 (base32
10018 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
10019 (build-system ant-build-system)
10020 (arguments
10021 `(#:jar-name "eclipse-sisu-inject.jar"
10022 #:source-dir "org.eclipse.sisu.inject/src"
10023 #:jdk ,icedtea-8
10024 #:tests? #f)); no tests
10025 (inputs
10026 `(("java-guice" ,java-guice)
10027 ("java-guice-servlet" ,java-guice-servlet)
10028 ("java-javax-inject" ,java-javax-inject)
10029 ("java-tomcat" ,java-tomcat)
10030 ("java-junit" ,java-junit)
10031 ("java-slf4j-api" ,java-slf4j-api)
10032 ("java-jsr305" ,java-jsr305)
10033 ("java-jsr250" ,java-jsr250)
10034 ("java-cdi-api" ,java-cdi-api)
10035 ("java-osgi-framework" ,java-osgi-framework)
10036 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10037 ("java-testng" ,java-testng)))
10038 (home-page "https://www.eclipse.org/sisu/")
10039 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10040 (description "Sisu is a modular JSR330-based container that supports
10041classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10042Google-Guice to perform dependency injection and provide the core JSR330
10043support, but removes the need to write explicit bindings in Guice modules.
10044Integration with other containers via the Eclipse Extension Registry and the
10045OSGi Service Registry is a goal of this project.")
10046 (license license:epl1.0)))
10047
10048(define-public java-eclipse-sisu-plexus
10049 (package
10050 (name "java-eclipse-sisu-plexus")
10051 (version "0.3.3")
10052 (source (origin
10053 (method url-fetch)
10054 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10055 "archive/releases/" version ".tar.gz"))
10056 (sha256
10057 (base32
10058 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10059 (modules '((guix build utils)))
10060 (snippet
10061 '(begin
10062 (for-each delete-file (find-files "." ".*.jar"))
10063 (rename-file "org.eclipse.sisu.plexus.tests/src"
10064 "org.eclipse.sisu.plexus.tests/java")
10065 #t))))
10066 (build-system ant-build-system)
10067 (arguments
10068 `(#:jar-name "eclipse-sisu-plexus.jar"
10069 #:source-dir "org.eclipse.sisu.plexus/src"
10070 #:test-dir "org.eclipse.sisu.plexus.tests"
10071 #:test-exclude
10072 (list
10073 ;; This test fails probably because we can't generate the necessary
10074 ;; meta-inf files.
10075 "**/PlexusLoggingTest.*"
10076 ;; FIXME: This test fails because of some injection error
10077 "**/PlexusRequirementTest.*")
10078 #:jdk ,icedtea-8
10079 #:phases
10080 (modify-phases %standard-phases
10081 (add-before 'build 'copy-resources
10082 (lambda _
10083 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10084 "build/classes/META-INF/plexus")
10085 #t))
10086 (add-before 'check 'build-test-jar
10087 (lambda _
10088 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10089 (mkdir "build")
10090 (with-directory-excursion "java"
10091 (apply invoke "javac" "-cp"
10092 (string-append (getenv "CLASSPATH")
10093 ":../../../../../build/classes")
10094 (find-files "." ".*.java"))
10095 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10096 (find-files "." ".*.jar")))
10097 (mkdir-p "build/META-INF/plexus")
10098 (copy-file "resources/META-INF/plexus/components.xml"
10099 "build/META-INF/plexus/components.xml")
10100 (with-directory-excursion "build"
10101 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10102 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10103 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10104 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10105 (("resources/component-jar")
10106 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10107 #t)))))
10108 (inputs
10109 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10110 ("java-plexus-util" ,java-plexus-utils)
10111 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10112 ("java-osgi-framework" ,java-osgi-framework)
10113 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10114 ("java-guice" ,java-guice)
10115 ("java-javax-inject" ,java-javax-inject)
10116 ("java-slf4j-api" ,java-slf4j-api)
10117 ("java-junit" ,java-junit)))
10118 (native-inputs
10119 `(("java-guava" ,java-guava)
10120 ("java-aopalliance" ,java-aopalliance)
10121 ("java-cglib" ,java-cglib)
10122 ("java-asm" ,java-asm)))
10123 (home-page "https://www.eclipse.org/sisu/")
10124 (synopsis "Plexus support for the sisu container")
10125 (description "Sisu is a modular JSR330-based container that supports
10126classpath scanning, auto-binding, and dynamic auto-wiring. This package
10127adds Plexus support to the Sisu-Inject container.")
10128 (license license:epl1.0)))
10129
10130(define-public java-commons-compiler
10131 (package
10132 (name "java-commons-compiler")
10133 (version "3.0.8")
10134 (source (origin
10135 (method git-fetch)
10136 (uri (git-reference
10137 (url "https://github.com/janino-compiler/janino")
10138 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10139 (file-name (string-append name "-" version))
10140 (sha256
10141 (base32
10142 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10143 (modules '((guix build utils)))
10144 (snippet
10145 '(begin
10146 (for-each delete-file
10147 (find-files "." "\\.jar$"))
10148 #t))))
10149 (build-system ant-build-system)
10150 (arguments
10151 `(#:jar-name "commons-compiler.jar"
10152 #:source-dir "commons-compiler/src/main"
10153 #:tests? #f)); no tests
10154 (home-page "https://github.com/janino-compiler/janino")
10155 (synopsis "Java compiler")
10156 (description "Commons-compiler contains an API for janino, including the
10157@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10158and @code{ISimpleCompiler} interfaces.")
10159 (license license:bsd-3)))
10160
10161(define-public java-janino
10162 (package
10163 (inherit java-commons-compiler)
10164 (name "java-janino")
10165 (arguments
10166 `(#:jar-name "janino.jar"
10167 #:source-dir "src/main/java"
10168 #:phases
10169 (modify-phases %standard-phases
10170 (add-before 'configure 'chdir
10171 (lambda _
10172 (chdir "janino"))))))
10173 (inputs
10174 `(("java-commons-compiler" ,java-commons-compiler)))
10175 (native-inputs
10176 `(("java-junit" ,java-junit)
10177 ("java-hamcrest-core" ,java-hamcrest-core)))
10178 (description "Janino is a Java compiler. Janino can compile a set of
10179source files to a set of class files like @code{javac}, but also compile a
10180Java expression, block, class body or source file in memory, load the bytecode
10181and execute it directly in the same JVM. @code{janino} can also be used for
10182static code analysis or code manipulation.")))
10183
10184(define-public java-logback-core
10185 (package
10186 (name "java-logback-core")
10187 (version "1.2.3")
10188 (source (origin
10189 (method url-fetch)
10190 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10191 version ".tar.gz"))
10192 (sha256
10193 (base32
10194 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10195 (modules '((guix build utils)))
10196 (snippet
10197 '(delete-file-recursively "logback-access/lib"))))
10198 (build-system ant-build-system)
10199 (arguments
10200 `(#:jar-name "logback.jar"
10201 #:source-dir "src/main/java"
10202 #:test-dir "src/test"
10203 #:test-exclude
10204 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10205 ;; which creates FastClasses
10206 (list "**/AllCoreTest.*"
10207 "**/AutoFlushingObjectWriterTest.*"
10208 "**/PackageTest.*"
10209 "**/ResilientOutputStreamTest.*"
10210 ;; And we still don't want to run abstract classes
10211 "**/Abstract*.*")
10212 #:phases
10213 (modify-phases %standard-phases
10214 (add-before 'configure 'chdir
10215 (lambda _
10216 (chdir "logback-core")
10217 #t)))))
10218 (inputs
10219 `(("java-javax-mail" ,java-javax-mail)
10220 ("java-tomcat" ,java-tomcat)
10221 ("java-commons-compiler" ,java-commons-compiler)
10222 ("java-janino" ,java-janino)))
10223 (native-inputs
10224 `(("java-junit" ,java-junit)
10225 ("java-hamcrest-core" ,java-hamcrest-core)
10226 ("java-mockito-1" ,java-mockito-1)
10227 ("java-cglib" ,java-cglib)
10228 ("java-asm" ,java-asm)
10229 ("java-objenesis" ,java-objenesis)
10230 ("java-joda-time" ,java-joda-time)))
10231 (home-page "https://logback.qos.ch")
10232 (synopsis "Logging for java")
10233 (description "Logback is intended as a successor to the popular log4j project.
10234This module lays the groundwork for the other two modules.")
10235 ;; Either epl1.0 or lgpl2.1
10236 (license (list license:epl1.0
10237 license:lgpl2.1))))
10238
10239(define-public java-logback-classic
10240 (package
10241 (inherit java-logback-core)
10242 (name "java-logback-classic")
10243 (arguments
10244 `(#:jar-name "logback-classic.jar"
10245 #:source-dir "src/main/java"
10246 #:test-dir "src/test"
10247 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10248 #:jdk ,icedtea-8
10249 #:phases
10250 (modify-phases %standard-phases
10251 (add-before 'configure 'chdir
10252 (lambda _
10253 (chdir "logback-classic")
10254 #t))
10255 (replace 'build
10256 (lambda* (#:key inputs #:allow-other-keys)
10257 (mkdir-p "build/classes")
10258 (setenv "CLASSPATH"
10259 (string-join
10260 (apply append (map (lambda (input)
10261 (find-files (assoc-ref inputs input)
10262 ".*.jar"))
10263 '("java-logback-core" "java-slf4j-api"
10264 "java-commons-compiler" "java-tomcat"
10265 "groovy")))
10266 ":"))
10267 (apply invoke "groovyc" "-d" "build/classes" "-j"
10268 (find-files "src/main/" ".*\\.(groovy|java)$"))
10269 (invoke "ant" "jar")
10270 #t)))))
10271 (inputs
10272 `(("java-logback-core" ,java-logback-core)
10273 ("java-slf4j-api" ,java-slf4j-api)
10274 ,@(package-inputs java-logback-core)))
10275 (native-inputs
10276 `(("groovy" ,groovy)))
10277 (description "Logback is intended as a successor to the popular log4j project.
10278This module can be assimilated to a significantly improved version of log4j.
10279Moreover, @code{logback-classic} natively implements the slf4j API so that you
10280can readily switch back and forth between logback and other logging frameworks
10281such as log4j or @code{java.util.logging} (JUL).")))
10282
10283(define-public java-qdox
10284 (package
10285 (name "java-qdox")
10286 ; Newer version exists, but this version is required by java-plexus-component-metadata
10287 (version "2.0-M2")
10288 (source (origin
10289 (method url-fetch)
10290 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10291 ;; Older releases at https://github.com/codehaus/qdox/
10292 ;; Note: The release at maven is pre-generated. The release at
10293 ;; github requires jflex.
10294 (uri (string-append "http://central.maven.org/maven2/"
10295 "com/thoughtworks/qdox/qdox/" version
10296 "/qdox-" version "-sources.jar"))
10297 (sha256
10298 (base32
10299 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10300 (build-system ant-build-system)
10301 (arguments
10302 `(#:jar-name "qdox.jar"
10303 #:tests? #f)); no tests
10304 (home-page "http://qdox.codehaus.org/")
10305 (synopsis "Parse definitions from Java source files")
10306 (description "QDox is a high speed, small footprint parser for extracting
10307class/interface/method definitions from source files complete with JavaDoc
10308@code{@@tags}. It is designed to be used by active code generators or
10309documentation tools.")
10310 (license license:asl2.0)))