f04a3828e6c8e29ccd9ec8d9f938f3dec9aa5c0d
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;;
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 \f
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
119 defined in The Java Language Specification into the bytecoded instruction set
120 and 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
162 for use with runtimes, compilers and tools for the Java programming
163 language.")
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
193 specification edition 2 (blue book). It is extremely small. However, unlike
194 other small VMs it supports the full spec, including object finalisation and
195 JNI.")
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
265 make but is implemented using the Java language, requires the Java platform,
266 and is best suited to building Java projects. Ant uses XML to describe the
267 build 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
316 Main-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
339 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
340 requirement 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
415 compiler for Java} (ecj) with a command line interface that is compatible with
416 the 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 \
489 gnu.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
508 the GNU Classpath library. They are executed by the JamVM virtual
509 machine.")))
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" "hotspot" "corba"
688 "langtools" "jaxp" "jaxws")))
689 (substitute* "Makefile.in"
690 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
691 "echo \"trust me\";")
692 ;; The contents of the bootstrap directory must be
693 ;; writeable but when copying from the store they are
694 ;; not.
695 (("mkdir -p lib/rt" line)
696 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
697 (zero? (system* "chmod" "-R" "u+w" "openjdk"))
698 #t))))
699 (add-after 'unpack 'use-classpath
700 (lambda* (#:key inputs #:allow-other-keys)
701 (let ((jvmlib (assoc-ref inputs "classpath"))
702 (jamvm (assoc-ref inputs "jamvm")))
703 ;; Classpath does not provide rt.jar.
704 (substitute* "Makefile.in"
705 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
706 (string-append jvmlib "/share/classpath/glibj.zip")))
707 ;; Make sure we can find all classes.
708 (setenv "CLASSPATH"
709 (string-append jvmlib "/share/classpath/glibj.zip:"
710 jvmlib "/share/classpath/tools.zip:"
711 jamvm "/lib/rt.jar"))
712 (setenv "JAVACFLAGS"
713 (string-append "-cp "
714 jvmlib "/share/classpath/glibj.zip:"
715 jvmlib "/share/classpath/tools.zip")))
716 #t))
717 (add-after 'unpack 'patch-patches
718 (lambda _
719 ;; shebang in patches so that they apply cleanly
720 (substitute* '("patches/jtreg-jrunscript.patch"
721 "patches/hotspot/hs23/drop_unlicensed_test.patch")
722 (("#!/bin/sh") (string-append "#!" (which "sh"))))
723 #t))
724 (add-after 'unpack 'patch-paths
725 (lambda* (#:key inputs #:allow-other-keys)
726 ;; buildtree.make generates shell scripts, so we need to replace
727 ;; the generated shebang
728 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
729 (("/bin/sh") (which "bash")))
730
731 (let ((corebin (string-append
732 (assoc-ref inputs "coreutils") "/bin/"))
733 (binbin (string-append
734 (assoc-ref inputs "binutils") "/bin/"))
735 (grepbin (string-append
736 (assoc-ref inputs "grep") "/bin/")))
737 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
738 "openjdk/corba/make/common/shared/Defs-linux.gmk")
739 (("UNIXCOMMAND_PATH = /bin/")
740 (string-append "UNIXCOMMAND_PATH = " corebin))
741 (("USRBIN_PATH = /usr/bin/")
742 (string-append "USRBIN_PATH = " corebin))
743 (("DEVTOOLS_PATH *= */usr/bin/")
744 (string-append "DEVTOOLS_PATH = " corebin))
745 (("COMPILER_PATH *= */usr/bin/")
746 (string-append "COMPILER_PATH = "
747 (assoc-ref inputs "gcc") "/bin/"))
748 (("DEF_OBJCOPY *=.*objcopy")
749 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
750
751 ;; fix path to alsa header
752 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
753 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
754 (string-append "ALSA_INCLUDE="
755 (assoc-ref inputs "alsa-lib")
756 "/include/alsa/version.h")))
757
758 ;; fix hard-coded utility paths
759 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
760 "openjdk/corba/make/common/shared/Defs-utils.gmk")
761 (("ECHO *=.*echo")
762 (string-append "ECHO = " (which "echo")))
763 (("^GREP *=.*grep")
764 (string-append "GREP = " (which "grep")))
765 (("EGREP *=.*egrep")
766 (string-append "EGREP = " (which "egrep")))
767 (("CPIO *=.*cpio")
768 (string-append "CPIO = " (which "cpio")))
769 (("READELF *=.*readelf")
770 (string-append "READELF = " (which "readelf")))
771 (("^ *AR *=.*ar")
772 (string-append "AR = " (which "ar")))
773 (("^ *TAR *=.*tar")
774 (string-append "TAR = " (which "tar")))
775 (("AS *=.*as")
776 (string-append "AS = " (which "as")))
777 (("LD *=.*ld")
778 (string-append "LD = " (which "ld")))
779 (("STRIP *=.*strip")
780 (string-append "STRIP = " (which "strip")))
781 (("NM *=.*nm")
782 (string-append "NM = " (which "nm")))
783 (("^SH *=.*sh")
784 (string-append "SH = " (which "bash")))
785 (("^FIND *=.*find")
786 (string-append "FIND = " (which "find")))
787 (("LDD *=.*ldd")
788 (string-append "LDD = " (which "ldd")))
789 (("NAWK *=.*(n|g)awk")
790 (string-append "NAWK = " (which "gawk")))
791 (("XARGS *=.*xargs")
792 (string-append "XARGS = " (which "xargs")))
793 (("UNZIP *=.*unzip")
794 (string-append "UNZIP = " (which "unzip")))
795 (("ZIPEXE *=.*zip")
796 (string-append "ZIPEXE = " (which "zip")))
797 (("SED *=.*sed")
798 (string-append "SED = " (which "sed"))))
799
800 ;; Some of these timestamps cause problems as they are more than
801 ;; 10 years ago, failing the build process.
802 (substitute*
803 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
804 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
805 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
806 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
807 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
808 #t)))
809 (add-before 'configure 'set-additional-paths
810 (lambda* (#:key inputs #:allow-other-keys)
811 (setenv "CPATH"
812 (string-append (assoc-ref inputs "libxrender")
813 "/include/X11/extensions" ":"
814 (assoc-ref inputs "libxtst")
815 "/include/X11/extensions" ":"
816 (assoc-ref inputs "libxinerama")
817 "/include/X11/extensions" ":"
818 (or (getenv "CPATH") "")))
819 (setenv "ALT_CUPS_HEADERS_PATH"
820 (string-append (assoc-ref inputs "cups")
821 "/include"))
822 (setenv "ALT_FREETYPE_HEADERS_PATH"
823 (string-append (assoc-ref inputs "freetype")
824 "/include"))
825 (setenv "ALT_FREETYPE_LIB_PATH"
826 (string-append (assoc-ref inputs "freetype")
827 "/lib"))
828 #t))
829 (replace 'install
830 (lambda* (#:key outputs #:allow-other-keys)
831 (let ((doc (string-append (assoc-ref outputs "doc")
832 "/share/doc/icedtea"))
833 (jre (assoc-ref outputs "out"))
834 (jdk (assoc-ref outputs "jdk")))
835 (copy-recursively "openjdk.build/docs" doc)
836 (copy-recursively "openjdk.build/j2re-image" jre)
837 (copy-recursively "openjdk.build/j2sdk-image" jdk))
838 #t)))))
839 (native-inputs
840 `(("ant" ,ant-bootstrap)
841 ("alsa-lib" ,alsa-lib)
842 ("attr" ,attr)
843 ("classpath" ,classpath-devel)
844 ("coreutils" ,coreutils)
845 ("cpio" ,cpio)
846 ("cups" ,cups)
847 ("ecj" ,ecj-bootstrap)
848 ("ecj-javac" ,ecj-javac-wrapper-final)
849 ("fastjar" ,fastjar)
850 ("fontconfig" ,fontconfig)
851 ("freetype" ,freetype)
852 ("gcc" ,gcc-4.9) ; there's a segmentation fault when compiling with gcc-5 or gcc-7
853 ("gtk" ,gtk+-2)
854 ("gawk" ,gawk)
855 ("giflib" ,giflib)
856 ("grep" ,grep)
857 ("jamvm" ,jamvm)
858 ("lcms" ,lcms)
859 ("libjpeg" ,libjpeg)
860 ("libnsl" ,libnsl)
861 ("libpng" ,libpng)
862 ("libtool" ,libtool)
863 ("libx11" ,libx11)
864 ("libxcomposite" ,libxcomposite)
865 ("libxi" ,libxi)
866 ("libxinerama" ,libxinerama)
867 ("libxrender" ,libxrender)
868 ("libxslt" ,libxslt) ;for xsltproc
869 ("libxt" ,libxt)
870 ("libxtst" ,libxtst)
871 ("mit-krb5" ,mit-krb5)
872 ("nss" ,nss)
873 ("nss-certs" ,nss-certs)
874 ("perl" ,perl)
875 ("pkg-config" ,pkg-config)
876 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
877 ("unzip" ,unzip)
878 ("wget" ,wget)
879 ("which" ,which)
880 ("zip" ,zip)
881 ("zlib" ,zlib)
882 ("openjdk-src"
883 ,(origin
884 (method hg-fetch)
885 (uri (hg-reference
886 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
887 (changeset "jdk6-b41")))
888 (sha256
889 (base32
890 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
891 ("jdk-src"
892 ,(origin
893 (method hg-fetch)
894 (uri (hg-reference
895 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
896 (changeset "jdk6-b41")))
897 (sha256
898 (base32
899 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
900 ("hotspot-src"
901 ,(origin
902 (method hg-fetch)
903 (uri (hg-reference
904 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
905 (changeset "jdk6-b41")))
906 (sha256
907 (base32
908 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
909 ("corba-src"
910 ,(origin
911 (method hg-fetch)
912 (uri (hg-reference
913 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
914 (changeset "jdk6-b41")))
915 (sha256
916 (base32
917 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
918 ("langtools-src"
919 ,(origin
920 (method hg-fetch)
921 (uri (hg-reference
922 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
923 (changeset "jdk6-b41")))
924 (sha256
925 (base32
926 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
927 ("jaxp-src"
928 ,(origin
929 (method hg-fetch)
930 (uri (hg-reference
931 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
932 (changeset "jdk6-b41")))
933 (sha256
934 (base32
935 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
936 ("jaxws-src"
937 ,(origin
938 (method hg-fetch)
939 (uri (hg-reference
940 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
941 (changeset "jdk6-b41")))
942 (sha256
943 (base32
944 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
945 (home-page "http://icedtea.classpath.org")
946 (synopsis "Java development kit")
947 (description
948 "This package provides the OpenJDK built with the IcedTea build harness.
949 This version of the OpenJDK is no longer maintained and is only used for
950 bootstrapping purposes.")
951 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
952 ;; same license as both GNU Classpath and OpenJDK.
953 (license license:gpl2+)))
954
955 (define-public icedtea-7
956 (let* ((version "2.6.13")
957 (drop (lambda (name hash)
958 (origin
959 (method url-fetch)
960 (uri (string-append
961 "http://icedtea.classpath.org/download/drops"
962 "/icedtea7/" version "/" name ".tar.bz2"))
963 (sha256 (base32 hash))))))
964 (package
965 (name "icedtea")
966 (version version)
967 (source (origin
968 (method url-fetch)
969 (uri (string-append
970 "http://icedtea.wildebeest.org/download/source/icedtea-"
971 version ".tar.xz"))
972 (sha256
973 (base32
974 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
975 (modules '((guix build utils)))
976 (snippet
977 '(begin
978 (substitute* "Makefile.in"
979 ;; do not leak information about the build host
980 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
981 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
982 #t))))
983 (build-system gnu-build-system)
984 (outputs '("out" ; Java Runtime Environment
985 "jdk" ; Java Development Kit
986 "doc")) ; all documentation
987 (arguments
988 `(;; There are many test failures. Some are known to
989 ;; fail upstream, others relate to not having an X
990 ;; server running at test time, yet others are a
991 ;; complete mystery to me.
992
993 ;; hotspot: passed: 241; failed: 45; error: 2
994 ;; langtools: passed: 1,934; failed: 26
995 ;; jdk: unknown
996 #:tests? #f
997
998 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
999 ;; gremlin) doesn't support it yet, so skip this phase.
1000 #:validate-runpath? #f
1001
1002 ;; Apparently, the C locale is needed for some of the tests.
1003 #:locale "C"
1004
1005 #:modules ((guix build utils)
1006 (guix build gnu-build-system)
1007 (ice-9 match)
1008 (ice-9 popen)
1009 (srfi srfi-19)
1010 (srfi srfi-26))
1011
1012 #:configure-flags
1013 ;; TODO: package pcsc and sctp, and add to inputs
1014 `("--disable-system-pcsc"
1015 "--disable-system-sctp"
1016 "--enable-bootstrap"
1017 "--enable-nss"
1018 "--without-rhino"
1019 "--disable-downloading"
1020 "--disable-tests" ;they are run in the check phase instead
1021 "--with-openjdk-src-dir=./openjdk.src"
1022 ,(string-append "--with-jdk-home="
1023 (assoc-ref %build-inputs "jdk")))
1024
1025 #:phases
1026 (modify-phases %standard-phases
1027 (replace 'unpack
1028 (lambda* (#:key source inputs #:allow-other-keys)
1029 (let ((target (string-append "icedtea-" ,version))
1030 (unpack (lambda* (name #:optional dir)
1031 (let ((dir (or dir
1032 (string-drop-right name 5))))
1033 (mkdir dir)
1034 (zero? (system* "tar" "xvf"
1035 (assoc-ref inputs name)
1036 "-C" dir
1037 "--strip-components=1"))))))
1038 (mkdir target)
1039 (and
1040 (zero? (system* "tar" "xvf" source
1041 "-C" target "--strip-components=1"))
1042 (chdir target)
1043 (unpack "openjdk-src" "openjdk.src")
1044 (with-directory-excursion "openjdk.src"
1045 (for-each unpack
1046 (filter (cut string-suffix? "-drop" <>)
1047 (map (match-lambda
1048 ((name . _) name))
1049 inputs))))
1050 #t))))
1051 (add-after 'unpack 'fix-x11-extension-include-path
1052 (lambda* (#:key inputs #:allow-other-keys)
1053 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1054 (((string-append "\\$\\(firstword \\$\\(wildcard "
1055 "\\$\\(OPENWIN_HOME\\)"
1056 "/include/X11/extensions\\).*$"))
1057 (string-append (assoc-ref inputs "libxrender")
1058 "/include/X11/extensions"
1059 " -I" (assoc-ref inputs "libxtst")
1060 "/include/X11/extensions"
1061 " -I" (assoc-ref inputs "libxinerama")
1062 "/include/X11/extensions"))
1063 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1064 #t))
1065 (add-after 'unpack 'patch-paths
1066 (lambda _
1067 ;; buildtree.make generates shell scripts, so we need to replace
1068 ;; the generated shebang
1069 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1070 (("/bin/sh") (which "bash")))
1071
1072 (let ((corebin (string-append
1073 (assoc-ref %build-inputs "coreutils") "/bin/"))
1074 (binbin (string-append
1075 (assoc-ref %build-inputs "binutils") "/bin/"))
1076 (grepbin (string-append
1077 (assoc-ref %build-inputs "grep") "/bin/")))
1078 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1079 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1080 (("UNIXCOMMAND_PATH = /bin/")
1081 (string-append "UNIXCOMMAND_PATH = " corebin))
1082 (("USRBIN_PATH = /usr/bin/")
1083 (string-append "USRBIN_PATH = " corebin))
1084 (("DEVTOOLS_PATH *= */usr/bin/")
1085 (string-append "DEVTOOLS_PATH = " corebin))
1086 (("COMPILER_PATH *= */usr/bin/")
1087 (string-append "COMPILER_PATH = "
1088 (assoc-ref %build-inputs "gcc") "/bin/"))
1089 (("DEF_OBJCOPY *=.*objcopy")
1090 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1091
1092 ;; fix path to alsa header
1093 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1094 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1095 (string-append "ALSA_INCLUDE="
1096 (assoc-ref %build-inputs "alsa-lib")
1097 "/include/alsa/version.h")))
1098
1099 ;; fix hard-coded utility paths
1100 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1101 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1102 (("ECHO *=.*echo")
1103 (string-append "ECHO = " (which "echo")))
1104 (("^GREP *=.*grep")
1105 (string-append "GREP = " (which "grep")))
1106 (("EGREP *=.*egrep")
1107 (string-append "EGREP = " (which "egrep")))
1108 (("CPIO *=.*cpio")
1109 (string-append "CPIO = " (which "cpio")))
1110 (("READELF *=.*readelf")
1111 (string-append "READELF = " (which "readelf")))
1112 (("^ *AR *=.*ar")
1113 (string-append "AR = " (which "ar")))
1114 (("^ *TAR *=.*tar")
1115 (string-append "TAR = " (which "tar")))
1116 (("AS *=.*as")
1117 (string-append "AS = " (which "as")))
1118 (("LD *=.*ld")
1119 (string-append "LD = " (which "ld")))
1120 (("STRIP *=.*strip")
1121 (string-append "STRIP = " (which "strip")))
1122 (("NM *=.*nm")
1123 (string-append "NM = " (which "nm")))
1124 (("^SH *=.*sh")
1125 (string-append "SH = " (which "bash")))
1126 (("^FIND *=.*find")
1127 (string-append "FIND = " (which "find")))
1128 (("LDD *=.*ldd")
1129 (string-append "LDD = " (which "ldd")))
1130 (("NAWK *=.*(n|g)awk")
1131 (string-append "NAWK = " (which "gawk")))
1132 (("XARGS *=.*xargs")
1133 (string-append "XARGS = " (which "xargs")))
1134 (("UNZIP *=.*unzip")
1135 (string-append "UNZIP = " (which "unzip")))
1136 (("ZIPEXE *=.*zip")
1137 (string-append "ZIPEXE = " (which "zip")))
1138 (("SED *=.*sed")
1139 (string-append "SED = " (which "sed"))))
1140
1141 ;; Some of these timestamps cause problems as they are more than
1142 ;; 10 years ago, failing the build process.
1143 (substitute*
1144 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1145 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1146 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1147 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1148 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1149 #t))
1150 (add-before 'configure 'set-additional-paths
1151 (lambda* (#:key inputs #:allow-other-keys)
1152 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1153 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1154 (string-append "ALSA_INCLUDE="
1155 (assoc-ref inputs "alsa-lib")
1156 "/include/alsa/version.h")))
1157 (setenv "CC" "gcc")
1158 (setenv "CPATH"
1159 (string-append (assoc-ref inputs "libxcomposite")
1160 "/include/X11/extensions" ":"
1161 (assoc-ref inputs "libxrender")
1162 "/include/X11/extensions" ":"
1163 (assoc-ref inputs "libxtst")
1164 "/include/X11/extensions" ":"
1165 (assoc-ref inputs "libxinerama")
1166 "/include/X11/extensions" ":"
1167 (or (getenv "CPATH") "")))
1168 (setenv "ALT_OBJCOPY" (which "objcopy"))
1169 (setenv "ALT_CUPS_HEADERS_PATH"
1170 (string-append (assoc-ref inputs "cups")
1171 "/include"))
1172 (setenv "ALT_FREETYPE_HEADERS_PATH"
1173 (string-append (assoc-ref inputs "freetype")
1174 "/include"))
1175 (setenv "ALT_FREETYPE_LIB_PATH"
1176 (string-append (assoc-ref inputs "freetype")
1177 "/lib"))
1178 #t))
1179 (add-before 'check 'fix-test-framework
1180 (lambda _
1181 ;; Fix PATH in test environment
1182 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1183 (("PATH=/bin:/usr/bin")
1184 (string-append "PATH=" (getenv "PATH"))))
1185 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1186 (("/usr/bin/env") (which "env")))
1187 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1188 (("/bin/rm") (which "rm"))
1189 (("/bin/cp") (which "cp"))
1190 (("/bin/mv") (which "mv")))
1191 #t))
1192 (add-before 'check 'fix-hotspot-tests
1193 (lambda _
1194 (with-directory-excursion "openjdk.src/hotspot/test/"
1195 (substitute* "jprt.config"
1196 (("PATH=\"\\$\\{path4sdk\\}\"")
1197 (string-append "PATH=" (getenv "PATH")))
1198 (("make=/usr/bin/make")
1199 (string-append "make=" (which "make"))))
1200 (substitute* '("runtime/6626217/Test6626217.sh"
1201 "runtime/7110720/Test7110720.sh")
1202 (("/bin/rm") (which "rm"))
1203 (("/bin/cp") (which "cp"))
1204 (("/bin/mv") (which "mv"))))
1205 #t))
1206 (add-before 'check 'fix-jdk-tests
1207 (lambda _
1208 (with-directory-excursion "openjdk.src/jdk/test/"
1209 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1210 (("/bin/pwd") (which "pwd")))
1211 (substitute* "com/sun/jdi/ShellScaffold.sh"
1212 (("/bin/kill") (which "kill")))
1213 (substitute* "start-Xvfb.sh"
1214 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1215 (("/usr/bin/nohup") (which "nohup")))
1216 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1217 (("/bin/rm") (which "rm")))
1218 (substitute* "tools/launcher/MultipleJRE.sh"
1219 (("echo \"#!/bin/sh\"")
1220 (string-append "echo \"#!" (which "rm") "\""))
1221 (("/usr/bin/zip") (which "zip")))
1222 (substitute* "com/sun/jdi/OnThrowTest.java"
1223 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1224 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1225 (("/usr/bin/uptime") (which "uptime")))
1226 (substitute* "java/lang/ProcessBuilder/Basic.java"
1227 (("/usr/bin/env") (which "env"))
1228 (("/bin/false") (which "false"))
1229 (("/bin/true") (which "true"))
1230 (("/bin/cp") (which "cp"))
1231 (("/bin/sh") (which "sh")))
1232 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1233 (("/bin/sh") (which "sh")))
1234 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1235 (("/usr/bin/perl") (which "perl"))
1236 (("/bin/ps") (which "ps"))
1237 (("/bin/true") (which "true")))
1238 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1239 (("/usr/bin/tee") (which "tee")))
1240 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1241 (("/bin/true") (which "true")))
1242 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1243 (("/bin/cat") (which "cat")))
1244 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1245 (("/bin/sh") (which "sh"))
1246 (("/bin/true") (which "true"))
1247 (("/bin/kill") (which "kill")))
1248 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1249 (("/usr/bin/echo") (which "echo")))
1250 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1251 (("/usr/bin/cat") (which "cat")))
1252 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1253 (("/bin/cat") (which "cat"))
1254 (("/bin/sleep") (which "sleep"))
1255 (("/bin/sh") (which "sh")))
1256 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1257 (("/bin/cat") (which "cat")))
1258 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1259 (("/bin/chmod") (which "chmod")))
1260 (substitute* "java/util/zip/ZipFile/Assortment.java"
1261 (("/bin/sh") (which "sh"))))
1262 #t))
1263 (replace 'check
1264 (lambda _
1265 ;; The "make check-*" targets always return zero, so we need to
1266 ;; check for errors in the associated log files to determine
1267 ;; whether any tests have failed.
1268 (use-modules (ice-9 rdelim))
1269 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1270 (checker (lambda (port)
1271 (let loop ()
1272 (let ((line (read-line port)))
1273 (cond
1274 ((eof-object? line) #t)
1275 ((regexp-exec error-pattern line) #f)
1276 (else (loop)))))))
1277 (run-test (lambda (test)
1278 (system* "make" test)
1279 (call-with-input-file
1280 (string-append "test/" test ".log")
1281 checker))))
1282 (or #t ; skip tests
1283 (and (run-test "check-hotspot")
1284 (run-test "check-langtools")
1285 (run-test "check-jdk"))))))
1286 (replace 'install
1287 (lambda* (#:key outputs #:allow-other-keys)
1288 (let ((doc (string-append (assoc-ref outputs "doc")
1289 "/share/doc/icedtea"))
1290 (jre (assoc-ref outputs "out"))
1291 (jdk (assoc-ref outputs "jdk")))
1292 (copy-recursively "openjdk.build/docs" doc)
1293 (copy-recursively "openjdk.build/j2re-image" jre)
1294 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1295 #t))
1296 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1297 ;; But that shared object is located in the server/ folder, so it
1298 ;; cannot be found. This phase creates a symbolic link in the
1299 ;; lib/amd64 folder so that the other libraries can find it.
1300 ;;
1301 ;; See:
1302 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1303 ;;
1304 ;; FIXME: Find the bug in the build system, so that this symlink is
1305 ;; not needed.
1306 (add-after 'install 'install-libjvm
1307 (lambda* (#:key inputs outputs #:allow-other-keys)
1308 (let* ((lib-path (string-append (assoc-ref outputs "out")
1309 "/lib/amd64")))
1310 (symlink (string-append lib-path "/server/libjvm.so")
1311 (string-append lib-path "/libjvm.so")))
1312 #t))
1313 ;; By default IcedTea only generates an empty keystore. In order to
1314 ;; be able to use certificates in Java programs we need to generate a
1315 ;; keystore from a set of certificates. For convenience we use the
1316 ;; certificates from the nss-certs package.
1317 (add-after 'install 'install-keystore
1318 (lambda* (#:key inputs outputs #:allow-other-keys)
1319 (let* ((keystore "cacerts")
1320 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1321 "/etc/ssl/certs"))
1322 (keytool (string-append (assoc-ref outputs "jdk")
1323 "/bin/keytool")))
1324 (define (extract-cert file target)
1325 (call-with-input-file file
1326 (lambda (in)
1327 (call-with-output-file target
1328 (lambda (out)
1329 (let loop ((line (read-line in 'concat))
1330 (copying? #f))
1331 (cond
1332 ((eof-object? line) #t)
1333 ((string-prefix? "-----BEGIN" line)
1334 (display line out)
1335 (loop (read-line in 'concat) #t))
1336 ((string-prefix? "-----END" line)
1337 (display line out)
1338 #t)
1339 (else
1340 (when copying? (display line out))
1341 (loop (read-line in 'concat) copying?)))))))))
1342 (define (import-cert cert)
1343 (format #t "Importing certificate ~a\n" (basename cert))
1344 (let ((temp "tmpcert"))
1345 (extract-cert cert temp)
1346 (let ((port (open-pipe* OPEN_WRITE keytool
1347 "-import"
1348 "-alias" (basename cert)
1349 "-keystore" keystore
1350 "-storepass" "changeit"
1351 "-file" temp)))
1352 (display "yes\n" port)
1353 (when (not (zero? (status:exit-val (close-pipe port))))
1354 (format #t "failed to import ~a\n" cert)))
1355 (delete-file temp)))
1356
1357 ;; This is necessary because the certificate directory contains
1358 ;; files with non-ASCII characters in their names.
1359 (setlocale LC_ALL "en_US.utf8")
1360 (setenv "LC_ALL" "en_US.utf8")
1361
1362 (for-each import-cert (find-files certs-dir "\\.pem$"))
1363 (mkdir-p (string-append (assoc-ref outputs "out")
1364 "/lib/security"))
1365 (mkdir-p (string-append (assoc-ref outputs "jdk")
1366 "/jre/lib/security"))
1367
1368 ;; The cacerts files we are going to overwrite are chmod'ed as
1369 ;; read-only (444) in icedtea-8 (which derives from this
1370 ;; package). We have to change this so we can overwrite them.
1371 (chmod (string-append (assoc-ref outputs "out")
1372 "/lib/security/" keystore) #o644)
1373 (chmod (string-append (assoc-ref outputs "jdk")
1374 "/jre/lib/security/" keystore) #o644)
1375
1376 (install-file keystore
1377 (string-append (assoc-ref outputs "out")
1378 "/lib/security"))
1379 (install-file keystore
1380 (string-append (assoc-ref outputs "jdk")
1381 "/jre/lib/security"))
1382 #t))))))
1383 (native-inputs
1384 `(("openjdk-src"
1385 ,(drop "openjdk"
1386 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1387 ("corba-drop"
1388 ,(drop "corba"
1389 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1390 ("jaxp-drop"
1391 ,(drop "jaxp"
1392 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1393 ("jaxws-drop"
1394 ,(drop "jaxws"
1395 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1396 ("jdk-drop"
1397 ,(drop "jdk"
1398 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1399 ("langtools-drop"
1400 ,(drop "langtools"
1401 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1402 ("hotspot-drop"
1403 ,(drop "hotspot"
1404 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1405 ("ant" ,ant-bootstrap)
1406 ("attr" ,attr)
1407 ("coreutils" ,coreutils)
1408 ("diffutils" ,diffutils) ;for tests
1409 ("gawk" ,gawk)
1410 ("grep" ,grep)
1411 ("libtool" ,libtool)
1412 ("pkg-config" ,pkg-config)
1413 ("wget" ,wget)
1414 ("which" ,which)
1415 ("cpio" ,cpio)
1416 ("zip" ,zip)
1417 ("unzip" ,unzip)
1418 ("fastjar" ,fastjar)
1419 ("libxslt" ,libxslt) ;for xsltproc
1420 ("nss-certs" ,nss-certs)
1421 ("perl" ,perl)
1422 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1423 ("jdk" ,icedtea-6 "jdk")))
1424 (inputs
1425 `(("alsa-lib" ,alsa-lib)
1426 ("cups" ,cups)
1427 ("libx11" ,libx11)
1428 ("libxcomposite" ,libxcomposite)
1429 ("libxt" ,libxt)
1430 ("libxtst" ,libxtst)
1431 ("libxi" ,libxi)
1432 ("libxinerama" ,libxinerama)
1433 ("libxrender" ,libxrender)
1434 ("libjpeg" ,libjpeg)
1435 ("libpng" ,libpng)
1436 ("mit-krb5" ,mit-krb5)
1437 ("nss" ,nss)
1438 ("giflib" ,giflib)
1439 ("fontconfig" ,fontconfig)
1440 ("freetype" ,freetype)
1441 ("lcms" ,lcms)
1442 ("zlib" ,zlib)
1443 ("gtk" ,gtk+-2)))
1444 (home-page "http://icedtea.classpath.org")
1445 (synopsis "Java development kit")
1446 (description
1447 "This package provides the Java development kit OpenJDK built with the
1448 IcedTea build harness.")
1449 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1450 ;; same license as both GNU Classpath and OpenJDK.
1451 (license license:gpl2+))))
1452
1453 (define-public icedtea-8
1454 (let* ((version "3.7.0")
1455 (drop (lambda (name hash)
1456 (origin
1457 (method url-fetch)
1458 (uri (string-append
1459 "http://icedtea.classpath.org/download/drops"
1460 "/icedtea8/" version "/" name ".tar.xz"))
1461 (sha256 (base32 hash))))))
1462 (package (inherit icedtea-7)
1463 (version "3.7.0")
1464 (source (origin
1465 (method url-fetch)
1466 (uri (string-append
1467 "http://icedtea.wildebeest.org/download/source/icedtea-"
1468 version ".tar.xz"))
1469 (sha256
1470 (base32
1471 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1472 (modules '((guix build utils)))
1473 (snippet
1474 '(begin
1475 (substitute* '("configure"
1476 "acinclude.m4")
1477 ;; Do not embed build time
1478 (("(DIST_ID=\"Custom build).*$" _ prefix)
1479 (string-append prefix "\"\n"))
1480 ;; Do not leak information about the build host
1481 (("DIST_NAME=\"\\$build_os\"")
1482 "DIST_NAME=\"guix\""))
1483 #t))))
1484 (arguments
1485 `(#:imported-modules
1486 ((guix build ant-build-system)
1487 (guix build syscalls)
1488 ,@%gnu-build-system-modules)
1489 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1490 ((#:modules modules)
1491 `((guix build utils)
1492 (guix build gnu-build-system)
1493 ((guix build ant-build-system) #:prefix ant:)
1494 (ice-9 match)
1495 (ice-9 popen)
1496 (srfi srfi-19)
1497 (srfi srfi-26)))
1498 ((#:configure-flags flags)
1499 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1500 `( ;;"--disable-bootstrap"
1501 "--enable-bootstrap"
1502 "--enable-nss"
1503 "--disable-downloading"
1504 "--disable-system-pcsc"
1505 "--disable-system-sctp"
1506 "--disable-tests" ;they are run in the check phase instead
1507 "--with-openjdk-src-dir=./openjdk.src"
1508 ,(string-append "--with-jdk-home=" jdk))))
1509 ((#:phases phases)
1510 `(modify-phases ,phases
1511 (delete 'fix-x11-extension-include-path)
1512 (delete 'patch-paths)
1513 (delete 'set-additional-paths)
1514 (delete 'patch-patches)
1515 ;; Prevent the keytool from recording the current time when
1516 ;; adding certificates at build time.
1517 (add-after 'unpack 'patch-keystore
1518 (lambda _
1519 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1520 (("date = new Date\\(\\);")
1521 "\
1522 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1523 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1524 new Date();"))
1525 #t))
1526 (add-after 'unpack 'patch-jni-libs
1527 ;; Hardcode dynamically loaded libraries.
1528 (lambda _
1529 (let* ((library-path (search-path-as-string->list
1530 (getenv "LIBRARY_PATH")))
1531 (find-library (lambda (name)
1532 (search-path
1533 library-path
1534 (string-append "lib" name ".so")))))
1535 (for-each
1536 (lambda (file)
1537 (catch 'decoding-error
1538 (lambda ()
1539 (substitute* file
1540 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1541 _ name version)
1542 (format #f "\"~a\"" (find-library name)))
1543 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1544 (format #f "\"~a\"" (find-library name)))))
1545 (lambda _
1546 ;; Those are safe to skip.
1547 (format (current-error-port)
1548 "warning: failed to substitute: ~a~%"
1549 file))))
1550 (find-files "openjdk.src/jdk/src/solaris/native"
1551 "\\.c|\\.h"))
1552 #t)))
1553 (replace 'install
1554 (lambda* (#:key outputs #:allow-other-keys)
1555 (let ((doc (string-append (assoc-ref outputs "doc")
1556 "/share/doc/icedtea"))
1557 (jre (assoc-ref outputs "out"))
1558 (jdk (assoc-ref outputs "jdk")))
1559 (copy-recursively "openjdk.build/docs" doc)
1560 (copy-recursively "openjdk.build/images/j2re-image" jre)
1561 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1562 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1563 ;; support via NSS.
1564 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1565 (string-append jre "/lib/security/nss.cfg"))
1566 #t)))
1567 (add-after 'install 'strip-jar-timestamps
1568 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1569 (native-inputs
1570 `(("jdk" ,icedtea-7 "jdk")
1571 ("openjdk-src"
1572 ,(drop "openjdk"
1573 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1574 ("aarch32-drop"
1575 ,(drop "aarch32"
1576 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1577 ("corba-drop"
1578 ,(drop "corba"
1579 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1580 ("jaxp-drop"
1581 ,(drop "jaxp"
1582 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1583 ("jaxws-drop"
1584 ,(drop "jaxws"
1585 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1586 ("jdk-drop"
1587 ,(drop "jdk"
1588 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1589 ("langtools-drop"
1590 ,(drop "langtools"
1591 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1592 ("hotspot-drop"
1593 ,(drop "hotspot"
1594 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1595 ("nashorn-drop"
1596 ,(drop "nashorn"
1597 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1598 ("shenandoah-drop"
1599 ,(drop "shenandoah"
1600 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1601 ,@(fold alist-delete (package-native-inputs icedtea-7)
1602 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1603 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1604
1605 (define-public icedtea icedtea-7)
1606
1607 \f
1608 (define-public ant/java8
1609 (package (inherit ant-bootstrap)
1610 (name "ant")
1611 (version "1.10.1")
1612 (source (origin
1613 (method url-fetch)
1614 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1615 version "-src.tar.gz"))
1616 (sha256
1617 (base32
1618 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
1619 (modules '((guix build utils)))
1620 (snippet
1621 '(begin
1622 (for-each delete-file
1623 (find-files "lib/optional" "\\.jar$"))
1624 #t))))
1625 (arguments
1626 (substitute-keyword-arguments (package-arguments ant-bootstrap)
1627 ((#:phases phases)
1628 `(modify-phases ,phases
1629 (add-after 'unpack 'remove-scripts
1630 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1631 ;; wrappers.
1632 (lambda _
1633 (for-each delete-file
1634 (find-files "src/script"
1635 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
1636 #t))
1637 (replace 'build
1638 (lambda* (#:key inputs outputs #:allow-other-keys)
1639 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
1640
1641 ;; Disable tests to avoid dependency on hamcrest-core, which needs
1642 ;; Ant to build. This is necessary in addition to disabling the
1643 ;; "check" phase, because the dependency on "test-jar" would always
1644 ;; result in the tests to be run.
1645 (substitute* "build.xml"
1646 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
1647 (zero? (system* "bash" "bootstrap.sh"
1648 (string-append "-Ddist.dir="
1649 (assoc-ref outputs "out"))))))))))
1650 (native-inputs
1651 `(("jdk" ,icedtea-8 "jdk")))))
1652
1653 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
1654 ;; requires Java 8.
1655 (define-public ant
1656 (package (inherit ant/java8)
1657 (version "1.9.9")
1658 (source (origin
1659 (method url-fetch)
1660 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1661 version "-src.tar.gz"))
1662 (sha256
1663 (base32
1664 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
1665 (native-inputs
1666 `(("jdk" ,icedtea-7 "jdk")))))
1667
1668 (define-public ant-apache-bcel
1669 (package
1670 (inherit ant/java8)
1671 (name "ant-apache-bcel")
1672 (arguments
1673 (substitute-keyword-arguments (package-arguments ant/java8)
1674 ((#:phases phases)
1675 `(modify-phases ,phases
1676 (add-after 'unpack 'link-bcel
1677 (lambda* (#:key inputs #:allow-other-keys)
1678 (for-each (lambda (file)
1679 (symlink file
1680 (string-append "lib/optional/"
1681 (basename file))))
1682 (find-files (assoc-ref inputs "java-commons-bcel")
1683 "\\.jar$"))
1684 #t))
1685 (add-after 'build 'install
1686 (lambda* (#:key outputs #:allow-other-keys)
1687 (let* ((out (assoc-ref outputs "out"))
1688 (share (string-append out "/share/java"))
1689 (bin (string-append out "/bin"))
1690 (lib (string-append out "/lib")))
1691 (mkdir-p share)
1692 (install-file (string-append lib "/ant-apache-bcel.jar") share)
1693 (delete-file-recursively bin)
1694 (delete-file-recursively lib)
1695 #t)))))))
1696 (inputs
1697 `(("java-commons-bcel" ,java-commons-bcel)
1698 ,@(package-inputs ant/java8)))))
1699
1700 (define-public ant-junit
1701 (package
1702 (inherit ant/java8)
1703 (name "ant-junit")
1704 (arguments
1705 (substitute-keyword-arguments (package-arguments ant/java8)
1706 ((#:phases phases)
1707 `(modify-phases ,phases
1708 (add-after 'unpack 'link-junit
1709 (lambda* (#:key inputs #:allow-other-keys)
1710 (for-each (lambda (file)
1711 (symlink file
1712 (string-append "lib/optional/"
1713 (basename file))))
1714 (find-files (assoc-ref inputs "java-junit")
1715 "\\.jar$"))
1716 #t))
1717 (add-after 'build 'install
1718 (lambda* (#:key outputs #:allow-other-keys)
1719 (let* ((out (assoc-ref outputs "out"))
1720 (share (string-append out "/share/java"))
1721 (bin (string-append out "/bin"))
1722 (lib (string-append out "/lib")))
1723 (mkdir-p share)
1724 (install-file (string-append lib "/ant-junit.jar") share)
1725 (delete-file-recursively bin)
1726 (delete-file-recursively lib)
1727 #t)))))))
1728 (inputs
1729 `(("java-junit" ,java-junit)
1730 ,@(package-inputs ant/java8)))))
1731
1732 (define-public clojure
1733 (let* ((remove-archives '(begin
1734 (for-each delete-file
1735 (find-files "." ".*\\.(jar|zip)"))
1736 #t))
1737 (submodule (lambda (prefix version hash)
1738 (origin
1739 (method url-fetch)
1740 (uri (string-append "https://github.com/clojure/"
1741 prefix version ".tar.gz"))
1742 (sha256 (base32 hash))
1743 (modules '((guix build utils)))
1744 (snippet remove-archives)))))
1745 (package
1746 (name "clojure")
1747 (version "1.9.0")
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri
1752 (string-append "https://github.com/clojure/clojure/archive/clojure-"
1753 version ".tar.gz"))
1754 (sha256
1755 (base32 "0xjbzcw45z32vsn9pifp7ndysjzqswp5ig0jkjpivigh2ckkdzha"))
1756 (modules '((guix build utils)))
1757 (snippet remove-archives)))
1758 (build-system ant-build-system)
1759 (arguments
1760 `(#:modules ((guix build ant-build-system)
1761 (guix build utils)
1762 (ice-9 ftw)
1763 (ice-9 regex)
1764 (srfi srfi-1)
1765 (srfi srfi-26))
1766 #:test-target "test"
1767 #:phases
1768 (modify-phases %standard-phases
1769 (add-after 'unpack 'unpack-submodule-sources
1770 (lambda* (#:key inputs #:allow-other-keys)
1771 (for-each
1772 (lambda (name)
1773 (mkdir-p name)
1774 (with-directory-excursion name
1775 (or (zero? (system* "tar"
1776 ;; Use xz for repacked tarball.
1777 "--xz"
1778 "--extract"
1779 "--verbose"
1780 "--file" (assoc-ref inputs name)
1781 "--strip-components=1"))
1782 (error "failed to unpack tarball" name)))
1783 (copy-recursively (string-append name "/src/main/clojure/")
1784 "src/clj/"))
1785 '("core-specs-alpha-src"
1786 "data-generators-src"
1787 "spec-alpha-src"
1788 "test-check-src"
1789 "test-generative-src"
1790 "tools-namespace-src"))
1791 #t))
1792 ;; The javadoc target is not built by default.
1793 (add-after 'build 'build-doc
1794 (lambda _
1795 (zero? (system* "ant" "javadoc"))))
1796 ;; Needed since no install target is provided.
1797 (replace 'install
1798 (lambda* (#:key outputs #:allow-other-keys)
1799 (let ((java-dir (string-append (assoc-ref outputs "out")
1800 "/share/java/")))
1801 ;; Install versioned to avoid collisions.
1802 (install-file (string-append "clojure-" ,version ".jar")
1803 java-dir)
1804 #t)))
1805 ;; Needed since no install-doc target is provided.
1806 (add-after 'install 'install-doc
1807 (lambda* (#:key outputs #:allow-other-keys)
1808 (let ((doc-dir (string-append (assoc-ref outputs "out")
1809 "/share/doc/clojure-"
1810 ,version "/")))
1811 (copy-recursively "doc/clojure" doc-dir)
1812 (copy-recursively "target/javadoc/"
1813 (string-append doc-dir "javadoc/"))
1814 (for-each (cut install-file <> doc-dir)
1815 (filter (cut string-match
1816 ".*\\.(html|markdown|md|txt)"
1817 <>)
1818 (scandir "./")))
1819 #t))))))
1820 ;; The native-inputs below are needed to run the tests.
1821 (native-inputs
1822 `(("core-specs-alpha-src"
1823 ,(submodule "core.specs.alpha/archive/core.specs.alpha-"
1824 "0.1.24"
1825 "0v2a0svf1ar2y42ajxwsjr7zmm5j7pp2zwrd2jh3k7xzd1p9x1fv"))
1826 ("data-generators-src"
1827 ,(submodule "data.generators/archive/data.generators-"
1828 "0.1.2"
1829 "0kki093jp4ckwxzfnw8ylflrfqs8b1i1wi9iapmwcsy328dmgzp1"))
1830 ("spec-alpha-src"
1831 ,(submodule "spec.alpha/archive/spec.alpha-"
1832 "0.1.143"
1833 "00alf0347licdn773w2jarpllyrbl52qz4d8mw61anjksacxylzz"))
1834 ("test-check-src"
1835 ,(submodule "test.check/archive/test.check-"
1836 "0.9.0"
1837 "0p0mnyhr442bzkz0s4k5ra3i6l5lc7kp6ajaqkkyh4c2k5yck1md"))
1838 ("test-generative-src"
1839 ,(submodule "test.generative/archive/test.generative-"
1840 "0.5.2"
1841 "1pjafy1i7yblc7ixmcpfq1lfbyf3jaljvkgrajn70sws9xs7a9f8"))
1842 ("tools-namespace-src"
1843 ,(submodule "tools.namespace/archive/tools.namespace-"
1844 "0.2.11"
1845 "10baak8v0hnwz2hr33bavshm7y49mmn9zsyyms1dwjz45p5ymhy0"))))
1846 (home-page "https://clojure.org/")
1847 (synopsis "Lisp dialect running on the JVM")
1848 (description "Clojure is a dynamic, general-purpose programming language,
1849 combining the approachability and interactive development of a scripting
1850 language with an efficient and robust infrastructure for multithreaded
1851 programming. Clojure is a compiled language, yet remains completely dynamic
1852 – every feature supported by Clojure is supported at runtime. Clojure
1853 provides easy access to the Java frameworks, with optional type hints and type
1854 inference, to ensure that calls to Java can avoid reflection.
1855
1856 Clojure is a dialect of Lisp, and shares with Lisp the code-as-data philosophy
1857 and a powerful macro system. Clojure is predominantly a functional programming
1858 language, and features a rich set of immutable, persistent data structures.
1859 When mutable state is needed, Clojure offers a software transactional memory
1860 system and reactive Agent system that ensure clean, correct, multithreaded
1861 designs.")
1862 ;; Clojure is licensed under EPL1.0
1863 ;; ASM bytecode manipulation library is licensed under BSD-3
1864 ;; Guava Murmur3 hash implementation is licensed under APL2.0
1865 ;; src/clj/repl.clj is licensed under CPL1.0
1866 ;;
1867 ;; See readme.html or readme.txt for details.
1868 (license (list license:epl1.0
1869 license:bsd-3
1870 license:asl2.0
1871 license:cpl1.0)))))
1872
1873 (define-public javacc
1874 (package
1875 (name "javacc")
1876 (version "7.0.3")
1877 (source (origin
1878 (method url-fetch)
1879 (uri (string-append "https://github.com/javacc/javacc/"
1880 "archive/" version ".tar.gz"))
1881 (file-name (string-append "javacc-" version ".tar.gz"))
1882 (sha256
1883 (base32
1884 "111xc9mnmc5a6qz6x3xbhqc07y1lg2b996ggzw0hrblg42zya9xf"))))
1885 (build-system ant-build-system)
1886 (arguments
1887 `(#:test-target "test"
1888 #:phases
1889 (modify-phases %standard-phases
1890 (add-after 'unpack 'delete-bundled-libs
1891 (lambda _
1892 (delete-file-recursively "lib") #t))
1893 (replace 'install (install-jars "target")))))
1894 (home-page "https://javacc.org/")
1895 (synopsis "Java parser generator")
1896 (description "Java Compiler Compiler (JavaCC) is the most popular parser
1897 generator for use with Java applications. A parser generator is a tool that
1898 reads a grammar specification and converts it to a Java program that can
1899 recognize matches to the grammar. In addition to the parser generator itself,
1900 JavaCC provides other standard capabilities related to parser generation such
1901 as tree building (via a tool called JJTree included with JavaCC), actions,
1902 debugging, etc.")
1903 (license license:bsd-3)))
1904
1905 (define-public javacc-4
1906 (package (inherit javacc)
1907 (version "4.1")
1908 (source (origin
1909 (method git-fetch)
1910 (uri (git-reference
1911 (url "https://github.com/javacc/javacc.git")
1912 (commit "release_41")))
1913 (file-name (string-append "javacc-" version "-checkout"))
1914 (sha256
1915 (base32
1916 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))))
1917 ;; Tests fail with
1918 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
1919 ;; JAVACODE failed
1920 (arguments
1921 `(#:tests? #f
1922 #:phases
1923 (modify-phases %standard-phases
1924 (add-after 'unpack 'delete-bundled-libs
1925 (lambda _
1926 (delete-file-recursively "lib") #t))
1927 (replace 'install (install-jars "bin/lib")))))))
1928
1929 ;; This is the last 3.x release of ECJ
1930 (define-public java-ecj-3
1931 (package
1932 (name "java-ecj")
1933 (version "3.8.2")
1934 (source (origin
1935 (method url-fetch)
1936 (uri (string-append "http://archive.eclipse.org/eclipse/"
1937 "downloads/drops/R-" version
1938 "-201301310800/ecjsrc-" version ".jar"))
1939 (sha256
1940 (base32
1941 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
1942 (build-system ant-build-system)
1943 (arguments
1944 `(#:tests? #f ; none included
1945 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1946 #:make-flags (list "-f" "src/build.xml")
1947 #:build-target "build"
1948 #:phases
1949 (modify-phases %standard-phases
1950 (add-after 'unpack 'fix-manifest
1951 (lambda _
1952 ;; Record the main class to make ecj executable.
1953 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
1954 (lambda (in out)
1955 (display "Manifest-Version: 1.0
1956 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1957 out)))))
1958 (replace 'install (install-jars ".")))))
1959 (home-page "https://eclipse.org")
1960 (synopsis "Eclipse Java development tools core batch compiler")
1961 (description "This package provides the Eclipse Java core batch compiler.")
1962 (license license:epl1.0)))
1963
1964 ;; This is needed for java-cisd-args4j
1965 (define-public java-ecj-3.5
1966 (package (inherit java-ecj-3)
1967 (version "3.5.1")
1968 (source (origin
1969 (method url-fetch/zipbomb)
1970 (uri (string-append "http://archive.eclipse.org/eclipse/"
1971 "downloads/drops/R-" version
1972 "-200909170800/ecjsrc-" version ".zip"))
1973 (sha256
1974 (base32
1975 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
1976 (build-system ant-build-system)
1977 (arguments
1978 `(#:tests? #f ; none included
1979 #:jdk ,icedtea-7 ; doesn't build with JDK8+
1980 #:build-target "build"
1981 #:phases
1982 (modify-phases %standard-phases
1983 (add-after 'unpack 'fix-manifest
1984 (lambda _
1985 ;; Record the main class to make ecj executable.
1986 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
1987 (lambda (in out)
1988 (dump-port in out)
1989 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
1990 out)))))
1991 (replace 'install (install-jars ".")))))
1992 (native-inputs
1993 `(("unzip" ,unzip)))))
1994
1995 (define-public java-cisd-base
1996 (let ((revision 38938)
1997 (base-version "14.12.0"))
1998 (package
1999 (name "java-cisd-base")
2000 (version (string-append base-version "-" (number->string revision)))
2001 (source (origin
2002 (method svn-fetch)
2003 (uri (svn-reference
2004 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2005 "base/tags/release/"
2006 (version-major+minor base-version)
2007 ".x/" base-version "/base/"))
2008 (revision revision)))
2009 (file-name (string-append "java-cisd-base-" version "-checkout"))
2010 (sha256
2011 (base32
2012 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2013 (modules '((guix build utils)))
2014 (snippet
2015 '(begin
2016 ;; Delete included gradle jar
2017 (delete-file-recursively "gradle/wrapper")
2018 ;; Delete pre-built native libraries
2019 (delete-file-recursively "libs")
2020 #t))))
2021 (build-system ant-build-system)
2022 (arguments
2023 `(#:make-flags '("-file" "build/build.xml")
2024 #:test-target "jar-test"
2025 #:jdk ,icedtea-8
2026 #:phases
2027 (modify-phases %standard-phases
2028 (add-after 'unpack 'unpack-build-resources
2029 (lambda* (#:key inputs #:allow-other-keys)
2030 (copy-recursively (assoc-ref inputs "build-resources")
2031 "../build_resources")
2032 #t))
2033 (add-after 'unpack-build-resources 'fix-dependencies
2034 (lambda* (#:key inputs #:allow-other-keys)
2035 (substitute* "build/build.xml"
2036 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2037 (string-append (assoc-ref inputs "java-testng")
2038 "/share/java/java-testng.jar"))
2039 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2040 (string-append (assoc-ref inputs "java-commons-lang")
2041 "/share/java/commons-lang-"
2042 ,(package-version java-commons-lang) ".jar"))
2043 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2044 (string-append (assoc-ref inputs "java-commons-io")
2045 "/share/java/commons-io-"
2046 ,(package-version java-commons-io)
2047 "-SNAPSHOT.jar"))
2048 ;; Remove dependency on svn
2049 (("<build-info.*") "")
2050 (("\\$\\{revision.number\\}")
2051 ,(number->string revision))
2052 (("\\$\\{version.number\\}") ,base-version))
2053 ;; Remove dependency on classycle
2054 (substitute* "../build_resources/ant/build-common.xml"
2055 (("<taskdef name=\"dependency-checker.*") "")
2056 (("classname=\"classycle.*") "")
2057 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2058 #t))
2059 ;; A few tests fail because of the lack of a proper /etc/groups and
2060 ;; /etc/passwd file in the build container.
2061 (add-after 'unpack 'disable-broken-tests
2062 (lambda _
2063 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2064 (("Unix.isOperational\\(\\)") "false"))
2065 #t))
2066 ;; These decorators are almost useless and pull in an unpackaged
2067 ;; dependency.
2068 (add-after 'unpack 'remove-useless-decorators
2069 (lambda _
2070 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2071 (("@Private") "")
2072 (("import ch.rinn.restrictions.Private;") ""))
2073 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2074 (("@Friend.*") "")
2075 (("import ch.rinn.restrictions.Friend;") ""))
2076 #t))
2077 (add-before 'configure 'build-native-code
2078 (lambda* (#:key inputs #:allow-other-keys)
2079 (let ((jdk (assoc-ref inputs "jdk"))
2080 (dir ,(match (%current-system)
2081 ("i686-linux"
2082 "i386-Linux")
2083 ((or "armhf-linux" "aarch64-linux")
2084 "arm-Linux")
2085 ((or "x86_64-linux")
2086 "amd64-Linux")
2087 (_ "unknown-Linux"))))
2088 (with-directory-excursion "source/c"
2089 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2090 (string-append "-I" jdk "/include")
2091 (string-append "-I" jdk "/include/linux")
2092 "-o" "libunix.so")
2093 (invoke "gcc" "-shared" "-O3" "-fPIC"
2094 "-DMACHINE_BYTE_ORDER=1"
2095 "copyCommon.c"
2096 "copyByteChar.c"
2097 "copyByteDouble.c"
2098 "copyByteFloat.c"
2099 "copyByteInt.c"
2100 "copyByteLong.c"
2101 "copyByteShort.c"
2102 (string-append "-I" jdk "/include")
2103 (string-append "-I" jdk "/include/linux")
2104 "-o" "libnativedata.so"))
2105 (install-file "source/c/libunix.so"
2106 (string-append "libs/native/unix/" dir))
2107 (install-file "source/c/libnativedata.so"
2108 (string-append "libs/native/nativedata/" dir))
2109 #t)))
2110 ;; In the "check" phase we only build the test executable.
2111 (add-after 'check 'run-tests
2112 (lambda _
2113 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2114 (delete-file "targets/dist/sis-base-test.jar")
2115 #t))
2116 (replace 'install (install-jars "targets/dist")))))
2117 (native-inputs
2118 `(("jdk" ,icedtea-8)
2119 ("java-commons-lang" ,java-commons-lang)
2120 ("java-commons-io" ,java-commons-io)
2121 ("java-testng" ,java-testng)
2122 ("build-resources"
2123 ,(origin
2124 (method svn-fetch)
2125 (uri (svn-reference
2126 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2127 "base/tags/release/"
2128 (version-major+minor base-version)
2129 ".x/" base-version
2130 "/build_resources/"))
2131 (revision revision)))
2132 (sha256
2133 (base32
2134 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2135 (home-page "http://svnsis.ethz.ch")
2136 (synopsis "Utility classes for libraries from ETH Zurich")
2137 (description "This library supplies some utility classes needed for
2138 libraries from the SIS division at ETH Zurich like jHDF5.")
2139 ;; The C sources are under a non-copyleft license, which looks like a
2140 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2141 (license (list license:asl2.0
2142 (license:non-copyleft "file://source/c/COPYING"))))))
2143
2144 (define-public java-cisd-args4j
2145 (let ((revision 39162)
2146 (base-version "9.11.2"))
2147 (package
2148 (name "java-cisd-args4j")
2149 (version (string-append base-version "-" (number->string revision)))
2150 (source (origin
2151 (method svn-fetch)
2152 (uri (svn-reference
2153 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2154 "args4j/tags/release/"
2155 (version-major+minor base-version)
2156 ".x/" base-version "/args4j/"))
2157 (revision revision)))
2158 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2159 (sha256
2160 (base32
2161 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2162 (build-system ant-build-system)
2163 (arguments
2164 `(#:make-flags '("-file" "build/build.xml")
2165 #:tests? #f ; there are no tests
2166 ;; There are weird build failures with JDK8, such as: "The type
2167 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2168 ;; referenced from required .class files"
2169 #:jdk ,icedtea-7
2170 #:modules ((guix build ant-build-system)
2171 (guix build utils)
2172 (guix build java-utils)
2173 (sxml simple)
2174 (sxml transform)
2175 (sxml xpath))
2176 #:phases
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'unpack-build-resources
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (mkdir-p "../build_resources")
2181 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2182 "-C" "../build_resources"
2183 "--strip-components=1")
2184 (mkdir-p "../build_resources/lib")
2185 #t))
2186 (add-after 'unpack-build-resources 'fix-dependencies
2187 (lambda* (#:key inputs #:allow-other-keys)
2188 ;; FIXME: There should be a more convenient abstraction for
2189 ;; editing XML files.
2190 (with-directory-excursion "../build_resources/ant/"
2191 (chmod "build-common.xml" #o664)
2192 (call-with-output-file "build-common.xml.new"
2193 (lambda (port)
2194 (sxml->xml
2195 (pre-post-order
2196 (with-input-from-file "build-common.xml"
2197 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2198 `(;; Remove dependency on classycle and custom ant tasks
2199 (taskdef . ,(lambda (tag . kids)
2200 (let ((name ((sxpath '(name *text*)) kids)))
2201 (if (or (member "build-info" name)
2202 (member "dependency-checker" name)
2203 (member "build-java-subprojects" name)
2204 (member "project-classpath" name))
2205 '() ; skip
2206 `(,tag ,@kids)))))
2207 (typedef . ,(lambda (tag . kids)
2208 (let ((name ((sxpath '(name *text*)) kids)))
2209 (if (member "recursive-jar" name)
2210 '() ; skip
2211 `(,tag ,@kids)))))
2212 (build-java-subprojects . ,(lambda _ '()))
2213 ;; Ignore everything else
2214 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2215 (*text* . ,(lambda (_ txt) txt))))
2216 port)))
2217 (rename-file "build-common.xml.new" "build-common.xml"))
2218 (substitute* "build/build.xml"
2219 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2220 (string-append (assoc-ref inputs "java-cisd-base")
2221 "/share/java/sis-base.jar"))
2222 ;; Remove dependency on svn
2223 (("<build-info.*") "")
2224 (("\\$\\{revision.number\\}")
2225 ,(number->string revision))
2226 (("\\$\\{version.number\\}") ,base-version)
2227 ;; Don't use custom ant tasks.
2228 (("recursive-jar") "jar")
2229 (("<project-classpath.*") ""))
2230 #t))
2231 (replace 'install (install-jars "targets/dist")))))
2232 (inputs
2233 `(("java-cisd-base" ,java-cisd-base)))
2234 (native-inputs
2235 `(("ecj" ,java-ecj-3.5)
2236 ("build-resources"
2237 ,(origin
2238 (method svn-fetch)
2239 (uri (svn-reference
2240 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2241 "args4j/tags/release/"
2242 (version-major+minor base-version)
2243 ".x/" base-version
2244 "/build_resources/"))
2245 (revision revision)))
2246 (sha256
2247 (base32
2248 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2249 (modules '((guix build utils)))
2250 ;; Delete bundled pre-built jars.
2251 (snippet
2252 '(begin (delete-file-recursively "lib/") #t))))))
2253 (home-page "http://svnsis.ethz.ch")
2254 (synopsis "Command line parser library")
2255 (description "This package provides a parser for command line arguments.")
2256 (license license:asl2.0))))
2257
2258 (define-public java-cisd-jhdf5
2259 (let ((revision 39162)
2260 (base-version "14.12.6"))
2261 (package
2262 (name "java-cisd-jhdf5")
2263 (version (string-append base-version "-" (number->string revision)))
2264 (source (origin
2265 (method svn-fetch)
2266 (uri (svn-reference
2267 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2268 "jhdf5/tags/release/"
2269 (version-major+minor base-version)
2270 ".x/" base-version "/jhdf5/"))
2271 (revision revision)))
2272 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2273 (sha256
2274 (base32
2275 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2276 (modules '((guix build utils)))
2277 (snippet
2278 '(begin
2279 ;; Delete included gradle jar
2280 (delete-file-recursively "gradle/wrapper")
2281 ;; Delete pre-built native libraries
2282 (delete-file-recursively "libs")
2283 #t))))
2284 (build-system ant-build-system)
2285 (arguments
2286 `(#:make-flags '("-file" "build/build.xml")
2287 #:build-target "jar-all"
2288 #:test-target "jar-test"
2289 #:jdk ,icedtea-8
2290 #:phases
2291 (modify-phases %standard-phases
2292 ;; FIXME: this build phase fails.
2293 (delete 'generate-jar-indices)
2294 ;; Don't erase results from the build phase when building tests.
2295 (add-after 'unpack 'separate-test-target-from-clean
2296 (lambda _
2297 (substitute* "build/build.xml"
2298 (("\"jar-test\" depends=\"clean, ")
2299 "\"jar-test\" depends=\""))
2300 #t))
2301 (add-after 'unpack 'unpack-build-resources
2302 (lambda* (#:key inputs #:allow-other-keys)
2303 (copy-recursively (assoc-ref inputs "build-resources")
2304 "../build_resources")
2305 (delete-file-recursively "../build_resources/lib/")
2306 (mkdir-p "../build_resources/lib")
2307 ;; Remove dependency on classycle
2308 (substitute* "../build_resources/ant/build-common.xml"
2309 (("<taskdef name=\"dependency-checker.*") "")
2310 (("classname=\"classycle.*") "")
2311 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2312 ;; Remove dependency on svn
2313 (substitute* "build/build.xml"
2314 (("<build-info.*") "")
2315 (("\\$\\{revision.number\\}")
2316 ,(number->string revision))
2317 (("\\$\\{version.number\\}") ,base-version))
2318 #t))
2319 (add-after 'unpack-build-resources 'fix-dependencies
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (substitute* "../build_resources/ant/build-common.xml"
2322 (("../libraries/testng/testng-jdk15.jar")
2323 (string-append (assoc-ref inputs "java-testng")
2324 "/share/java/java-testng.jar")))
2325 (substitute* "build/build.xml"
2326 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2327 (string-append (assoc-ref inputs "java-cisd-base")
2328 "/share/java/sis-base.jar"))
2329 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2330 (string-append (assoc-ref inputs "java-cisd-args4j")
2331 "/share/java/cisd-args4j.jar"))
2332 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2333 (string-append (assoc-ref inputs "java-commons-lang")
2334 "/share/java/commons-lang-"
2335 ,(package-version java-commons-lang) ".jar"))
2336 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2337 (string-append (assoc-ref inputs "java-commons-io")
2338 "/share/java/commons-io-"
2339 ,(package-version java-commons-io)
2340 "-SNAPSHOT.jar"))
2341 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2342 (string-append (assoc-ref inputs "java-testng")
2343 "/share/java/java-testng.jar"))
2344 (("\\$\\{lib\\}/junit4/junit.jar")
2345 (string-append (assoc-ref inputs "java-junit")
2346 "/share/java/junit.jar"))
2347 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2348 (string-append (assoc-ref inputs "java-hamcrest-core")
2349 "/share/java/hamcrest-core.jar")))
2350 ;; Remove dependency on ch.rinn.restrictions
2351 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2352 (substitute* '("BitSetConversionUtils.java"
2353 "HDF5Utils.java")
2354 (("import ch.rinn.restrictions.Private;") "")
2355 (("@Private") "")))
2356 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2357 (substitute* '("BitSetConversionTest.java"
2358 "h5ar/HDF5ArchiverTest.java")
2359 (("import ch.rinn.restrictions.Friend;") "")
2360 (("@Friend.*") ""))
2361 ;; Remove leftovers from removing @Friend
2362 (substitute* "h5ar/HDF5ArchiverTest.java"
2363 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2364 "")))
2365 #t))
2366 (add-before 'configure 'build-native-library
2367 (lambda* (#:key inputs #:allow-other-keys)
2368 (let ((jdk (assoc-ref inputs "jdk"))
2369 (hdf5 (assoc-ref inputs "hdf5"))
2370 (dir ,(match (%current-system)
2371 ("i686-linux"
2372 "i386-Linux")
2373 ((or "armhf-linux" "aarch64-linux")
2374 "arm-Linux")
2375 ((or "x86_64-linux")
2376 "amd64-Linux")
2377 (_ "unknown-Linux"))))
2378 (with-directory-excursion "source/c"
2379 (apply invoke `("gcc" "-shared" "-O3"
2380 "-fPIC"
2381 "-Wl,--exclude-libs,ALL"
2382 ,@(find-files "jhdf5" "\\.c$")
2383 ,@(find-files "hdf-java" "\\.c$")
2384 ,(string-append "-I" hdf5 "/include")
2385 ,(string-append "-I" jdk "/include")
2386 ,(string-append "-I" jdk "/include/linux")
2387 ,(string-append hdf5 "/lib/libhdf5.a")
2388 "-o" "libjhdf5.so" "-lz")))
2389 (install-file "source/c/libjhdf5.so"
2390 (string-append "libs/native/jhdf5/" dir))
2391 #t)))
2392 ;; In the "check" phase we only build the test executable.
2393 (add-after 'check 'run-tests
2394 (lambda _
2395 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2396 (delete-file "targets/dist/sis-jhdf5-test.jar")
2397 #t))
2398 (replace 'install
2399 (install-jars "targets/dist")))))
2400 (inputs
2401 `(("java-cisd-base" ,java-cisd-base)
2402 ("java-cisd-args4j" ,java-cisd-args4j)
2403 ("java-commons-lang" ,java-commons-lang)
2404 ("java-commons-io" ,java-commons-io)
2405 ("hdf5" ,hdf5)
2406 ("zlib" ,zlib)))
2407 (native-inputs
2408 `(("jdk" ,icedtea-8)
2409 ("java-testng" ,java-testng)
2410 ("java-junit" ,java-junit)
2411 ("java-jmock" ,java-jmock)
2412 ("java-hamcrest-core" ,java-hamcrest-core)
2413 ("build-resources"
2414 ,(origin
2415 (method svn-fetch)
2416 (uri (svn-reference
2417 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2418 "jhdf5/tags/release/"
2419 (version-major+minor base-version)
2420 ".x/" base-version
2421 "/build_resources/"))
2422 (revision revision)))
2423 (sha256
2424 (base32
2425 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2426 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2427 (synopsis "Java binding for HDF5")
2428 (description "JHDF5 is a high-level API in Java for reading and writing
2429 HDF5 files, building on the libraries provided by the HDF Group.")
2430 ;; The C sources are under a non-copyleft license, which looks like a
2431 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2432 (license (list license:asl2.0
2433 (license:non-copyleft "file://source/c/COPYING"))))))
2434
2435 (define-public java-classpathx-servletapi
2436 (package
2437 (name "java-classpathx-servletapi")
2438 (version "3.0.1")
2439 (source (origin
2440 (method url-fetch)
2441 (uri (string-append "mirror://gnu/classpathx/servletapi/"
2442 "servletapi-" version ".tar.gz"))
2443 (sha256
2444 (base32
2445 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
2446 (build-system ant-build-system)
2447 (arguments
2448 `(#:tests? #f ; there is no test target
2449 #:build-target "compile"
2450 #:make-flags
2451 (list "-Dbuild.compiler=javac1.8"
2452 (string-append "-Ddist=" (assoc-ref %outputs "out")))
2453 #:phases
2454 (modify-phases %standard-phases
2455 (replace 'install
2456 (lambda* (#:key make-flags #:allow-other-keys)
2457 (zero? (apply system* `("ant" "dist" ,@make-flags))))))))
2458 (home-page "https://www.gnu.org/software/classpathx/")
2459 (synopsis "Java servlet API implementation")
2460 (description "This is the GNU servlet API distribution, part of the
2461 ClasspathX project. It provides implementations of version 3.0 of the servlet
2462 API and version 2.1 of the Java ServerPages API.")
2463 (license license:gpl3+)))
2464
2465 (define-public java-swt
2466 (package
2467 (name "java-swt")
2468 (version "4.7.1a")
2469 (source
2470 ;; The types of many variables and procedures differ in the sources
2471 ;; dependent on whether the target architecture is a 32-bit system or a
2472 ;; 64-bit system. Instead of patching the sources on demand in a build
2473 ;; phase we download either the 32-bit archive (which mostly uses "int"
2474 ;; types) or the 64-bit archive (which mostly uses "long" types).
2475 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
2476 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
2477 (file32 "x86")
2478 (file64 "x86_64"))
2479 (let-values (((hash file)
2480 (match (or (%current-target-system) (%current-system))
2481 ("x86_64-linux" (values hash64 file64))
2482 (_ (values hash32 file32)))))
2483 (origin
2484 (method url-fetch)
2485 (uri (string-append
2486 "http://download.eclipse.org/eclipse/downloads/drops4/"
2487 "R-" version "-201710090410/swt-" version
2488 "-gtk-linux-" file ".zip"))
2489 (sha256 (base32 hash))))))
2490 (build-system ant-build-system)
2491 (arguments
2492 `(#:jar-name "swt.jar"
2493 #:jdk ,icedtea-8
2494 #:tests? #f ; no "check" target
2495 #:phases
2496 (modify-phases %standard-phases
2497 (replace 'unpack
2498 (lambda* (#:key source #:allow-other-keys)
2499 (and (mkdir "swt")
2500 (zero? (system* "unzip" source "-d" "swt"))
2501 (chdir "swt")
2502 (mkdir "src")
2503 (zero? (system* "unzip" "src.zip" "-d" "src")))))
2504 ;; The classpath contains invalid icecat jars. Since we don't need
2505 ;; anything other than the JDK on the classpath, we can simply unset
2506 ;; it.
2507 (add-after 'configure 'unset-classpath
2508 (lambda _ (unsetenv "CLASSPATH") #t))
2509 (add-before 'build 'build-native
2510 (lambda* (#:key inputs outputs #:allow-other-keys)
2511 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2512 ;; Build shared libraries. Users of SWT have to set the system
2513 ;; property swt.library.path to the "lib" directory of this
2514 ;; package output.
2515 (mkdir-p lib)
2516 (setenv "OUTPUT_DIR" lib)
2517 (with-directory-excursion "src"
2518 (zero? (system* "bash" "build.sh"))))))
2519 (add-after 'install 'install-native
2520 (lambda* (#:key outputs #:allow-other-keys)
2521 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
2522 (for-each (lambda (file)
2523 (install-file file lib))
2524 (find-files "." "\\.so$"))
2525 #t))))))
2526 (inputs
2527 `(("gtk" ,gtk+-2)
2528 ("libxtst" ,libxtst)
2529 ("libxt" ,libxt)
2530 ("mesa" ,mesa)
2531 ("glu" ,glu)))
2532 (native-inputs
2533 `(("pkg-config" ,pkg-config)
2534 ("unzip" ,unzip)))
2535 (home-page "https://www.eclipse.org/swt/")
2536 (synopsis "Widget toolkit for Java")
2537 (description
2538 "SWT is a widget toolkit for Java designed to provide efficient, portable
2539 access to the user-interface facilities of the operating systems on which it
2540 is implemented.")
2541 ;; SWT code is licensed under EPL1.0
2542 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
2543 ;; Cairo bindings contain code under MPL1.1
2544 ;; XULRunner 1.9 bindings contain code under MPL2.0
2545 (license (list
2546 license:epl1.0
2547 license:mpl1.1
2548 license:mpl2.0
2549 license:lgpl2.1+))))
2550
2551 (define-public java-xz
2552 (package
2553 (name "java-xz")
2554 (version "1.6")
2555 (source (origin
2556 (method url-fetch)
2557 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
2558 (sha256
2559 (base32
2560 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
2561 (build-system ant-build-system)
2562 (arguments
2563 `(#:tests? #f ; There are no tests to run.
2564 #:jar-name ,(string-append "xz-" version ".jar")
2565 #:phases
2566 (modify-phases %standard-phases
2567 ;; The unpack phase enters the "maven" directory by accident.
2568 (add-after 'unpack 'chdir
2569 (lambda _ (chdir "..") #t)))))
2570 (native-inputs
2571 `(("unzip" ,unzip)))
2572 (home-page "https://tukaani.org/xz/java.html")
2573 (synopsis "Implementation of XZ data compression in pure Java")
2574 (description "This library aims to be a complete implementation of XZ data
2575 compression in pure Java. Single-threaded streamed compression and
2576 decompression and random access decompression have been fully implemented.")
2577 (license license:public-domain)))
2578
2579 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
2580 ;; of the latest release.
2581 (define-public java-qdox-1.12
2582 (package
2583 (name "java-qdox")
2584 (version "1.12.1")
2585 (source (origin
2586 (method url-fetch)
2587 (uri (string-append "http://central.maven.org/maven2/"
2588 "com/thoughtworks/qdox/qdox/" version
2589 "/qdox-" version "-sources.jar"))
2590 (sha256
2591 (base32
2592 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
2593 (build-system ant-build-system)
2594 (arguments
2595 `(;; Tests require junit
2596 #:tests? #f
2597 #:jar-name "qdox.jar"
2598 #:phases
2599 (modify-phases %standard-phases
2600 (replace 'unpack
2601 (lambda* (#:key source #:allow-other-keys)
2602 (mkdir "src")
2603 (with-directory-excursion "src"
2604 (zero? (system* "jar" "-xf" source)))))
2605 ;; At this point we don't have junit, so we must remove the API
2606 ;; tests.
2607 (add-after 'unpack 'delete-tests
2608 (lambda _
2609 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
2610 #t)))))
2611 (home-page "http://qdox.codehaus.org/")
2612 (synopsis "Parse definitions from Java source files")
2613 (description
2614 "QDox is a high speed, small footprint parser for extracting
2615 class/interface/method definitions from source files complete with JavaDoc
2616 @code{@@tags}. It is designed to be used by active code generators or
2617 documentation tools.")
2618 (license license:asl2.0)))
2619
2620 (define-public java-jarjar
2621 (package
2622 (name "java-jarjar")
2623 (version "1.4")
2624 (source (origin
2625 (method url-fetch)
2626 (uri (string-append
2627 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
2628 "code.google.com/jarjar/jarjar-src-" version ".zip"))
2629 (sha256
2630 (base32
2631 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
2632 (modules '((guix build utils)))
2633 (snippet
2634 '(begin
2635 ;; Delete bundled thirds-party jar archives.
2636 ;; TODO: unbundle maven-plugin-api.
2637 (delete-file "lib/asm-4.0.jar")
2638 (delete-file "lib/asm-commons-4.0.jar")
2639 (delete-file "lib/junit-4.8.1.jar")
2640 #t))))
2641 (build-system ant-build-system)
2642 (arguments
2643 `(;; Tests require junit, which ultimately depends on this package.
2644 #:tests? #f
2645 #:build-target "jar"
2646 #:phases
2647 (modify-phases %standard-phases
2648 (add-before 'build 'do-not-use-bundled-asm
2649 (lambda* (#:key inputs #:allow-other-keys)
2650 (substitute* "build.xml"
2651 (("<path id=\"path.build\">")
2652 (string-append "<path id=\"path.build\"><fileset dir=\""
2653 (assoc-ref inputs "java-asm-bootstrap")
2654 "/share/java\" includes=\"**/*.jar\"/>"))
2655 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
2656 (("lib/asm-commons-4.0.jar")
2657 (string-append (assoc-ref inputs "java-asm-bootstrap")
2658 "/share/java/asm-6.0.jar"))
2659 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
2660 (string-append "<include name=\"org/objectweb/asm/"
2661 "commons/Remap*.class\"/>"
2662 "<include name=\"org/objectweb/asm/*.class\"/>"
2663 "<include name=\"org/objectweb/asm/"
2664 "signature/*.class\"/>"
2665 "<include name=\"org/objectweb/asm/"
2666 "commons/SignatureRemapper.class\"/>")))
2667 #t))
2668 (replace 'install
2669 (lambda* (#:key outputs #:allow-other-keys)
2670 (let ((target (string-append (assoc-ref outputs "out")
2671 "/share/java")))
2672 (install-file (string-append "dist/jarjar-" ,version ".jar")
2673 target))
2674 #t)))))
2675 (inputs
2676 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
2677 (native-inputs
2678 `(("unzip" ,unzip)))
2679 (home-page "https://code.google.com/archive/p/jarjar/")
2680 (synopsis "Repackage Java libraries")
2681 (description
2682 "Jar Jar Links is a utility that makes it easy to repackage Java
2683 libraries and embed them into your own distribution. Jar Jar Links includes
2684 an Ant task that extends the built-in @code{jar} task.")
2685 (license license:asl2.0)))
2686
2687 (define-public java-hamcrest-core
2688 (package
2689 (name "java-hamcrest-core")
2690 (version "1.3")
2691 (source (origin
2692 (method url-fetch)
2693 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
2694 "archive/hamcrest-java-" version ".tar.gz"))
2695 (sha256
2696 (base32
2697 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
2698 (modules '((guix build utils)))
2699 (snippet
2700 '(begin
2701 ;; Delete bundled thirds-party jar archives.
2702 (delete-file-recursively "lib")
2703 #t))))
2704 (build-system ant-build-system)
2705 (arguments
2706 `(#:tests? #f ; Tests require junit
2707 #:modules ((guix build ant-build-system)
2708 (guix build utils)
2709 (srfi srfi-1))
2710 #:make-flags (list (string-append "-Dversion=" ,version))
2711 #:test-target "unit-test"
2712 #:build-target "core"
2713 #:phases
2714 (modify-phases %standard-phases
2715 ;; Disable unit tests, because they require junit, which requires
2716 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
2717 ;; attribute from the manifest for reproducibility.
2718 (add-before 'configure 'patch-build.xml
2719 (lambda _
2720 (substitute* "build.xml"
2721 (("unit-test, ") "")
2722 (("\\$\\{build.timestamp\\}") "guix"))
2723 #t))
2724 ;; Java's "getMethods()" returns methods in an unpredictable order.
2725 ;; To make the output of the generated code deterministic we must
2726 ;; sort the array of methods.
2727 (add-after 'unpack 'make-method-order-deterministic
2728 (lambda _
2729 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
2730 (("import java\\.util\\.Iterator;" line)
2731 (string-append line "\n"
2732 "import java.util.Arrays; import java.util.Comparator;"))
2733 (("allMethods = cls\\.getMethods\\(\\);" line)
2734 (string-append "_" line
2735 "
2736 private Method[] getSortedMethods() {
2737 Arrays.sort(_allMethods, new Comparator<Method>() {
2738 @Override
2739 public int compare(Method a, Method b) {
2740 return a.toString().compareTo(b.toString());
2741 }
2742 });
2743 return _allMethods;
2744 }
2745
2746 private Method[] allMethods = getSortedMethods();")))))
2747 (add-before 'build 'do-not-use-bundled-qdox
2748 (lambda* (#:key inputs #:allow-other-keys)
2749 (substitute* "build.xml"
2750 (("lib/generator/qdox-1.12.jar")
2751 (string-append (assoc-ref inputs "java-qdox-1.12")
2752 "/share/java/qdox.jar")))
2753 #t))
2754 ;; build.xml searches for .jar files in this directoy, which
2755 ;; we remove from the source archive.
2756 (add-before 'build 'create-dummy-directories
2757 (lambda _
2758 (mkdir-p "lib/integration")
2759 #t))
2760 (replace 'install
2761 (lambda* (#:key outputs #:allow-other-keys)
2762 (let* ((target (string-append (assoc-ref outputs "out")
2763 "/share/java/"))
2764 (version-suffix ,(string-append "-" version ".jar"))
2765 (install-without-version-suffix
2766 (lambda (jar)
2767 (copy-file jar
2768 (string-append target
2769 (basename jar version-suffix)
2770 ".jar")))))
2771 (mkdir-p target)
2772 (for-each
2773 install-without-version-suffix
2774 (find-files "build"
2775 (lambda (name _)
2776 (and (string-suffix? ".jar" name)
2777 (not (string-suffix? "-sources.jar" name)))))))
2778 #t)))))
2779 (native-inputs
2780 `(("java-qdox-1.12" ,java-qdox-1.12)
2781 ("java-jarjar" ,java-jarjar)))
2782 (home-page "http://hamcrest.org/")
2783 (synopsis "Library of matchers for building test expressions")
2784 (description
2785 "This package provides a library of matcher objects (also known as
2786 constraints or predicates) allowing @code{match} rules to be defined
2787 declaratively, to be used in other frameworks. Typical scenarios include
2788 testing frameworks, mocking libraries and UI validation rules.")
2789 (license license:bsd-2)))
2790
2791 (define-public java-junit
2792 (package
2793 (name "java-junit")
2794 (version "4.12")
2795 (source (origin
2796 (method url-fetch)
2797 (uri (string-append "https://github.com/junit-team/junit/"
2798 "archive/r" version ".tar.gz"))
2799 (file-name (string-append name "-" version ".tar.gz"))
2800 (sha256
2801 (base32
2802 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
2803 (modules '((guix build utils)))
2804 (snippet
2805 '(begin
2806 ;; Delete bundled jar archives.
2807 (delete-file-recursively "lib")
2808 #t))))
2809 (build-system ant-build-system)
2810 (arguments
2811 `(#:tests? #f ; no tests
2812 #:jar-name "junit.jar"))
2813 (inputs
2814 `(("java-hamcrest-core" ,java-hamcrest-core)))
2815 (home-page "http://junit.org/")
2816 (synopsis "Test framework for Java")
2817 (description
2818 "JUnit is a simple framework to write repeatable tests for Java projects.
2819 JUnit provides assertions for testing expected results, test fixtures for
2820 sharing common test data, and test runners for running tests.")
2821 (license license:epl1.0)))
2822
2823 (define-public java-plexus-utils
2824 (package
2825 (name "java-plexus-utils")
2826 (version "3.0.24")
2827 (source (origin
2828 (method url-fetch)
2829 (uri (string-append "https://github.com/codehaus-plexus/"
2830 "plexus-utils/archive/plexus-utils-"
2831 version ".tar.gz"))
2832 (sha256
2833 (base32
2834 "1mlwpc6fms24slygv5yvi6fi9hcha2fh0v73p5znpi78bg36i2js"))))
2835 (build-system ant-build-system)
2836 ;; FIXME: The default build.xml does not include a target to install
2837 ;; javadoc files.
2838 (arguments
2839 `(#:jar-name "plexus-utils.jar"
2840 #:source-dir "src/main"
2841 #:phases
2842 (modify-phases %standard-phases
2843 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
2844 (lambda _
2845 (substitute* "src/main/java/org/codehaus/plexus/util/\
2846 cli/shell/BourneShell.java"
2847 (("/bin/sh") (which "sh"))
2848 (("/usr/") (getcwd)))
2849 #t))
2850 (add-after 'unpack 'fix-or-disable-broken-tests
2851 (lambda _
2852 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
2853 (substitute* '("cli/CommandlineTest.java"
2854 "cli/shell/BourneShellTest.java")
2855 (("/bin/sh") (which "sh"))
2856 (("/bin/echo") (which "echo")))
2857
2858 ;; This test depends on MavenProjectStub, but we don't have
2859 ;; a package for Maven.
2860 (delete-file "introspection/ReflectionValueExtractorTest.java")
2861
2862 ;; FIXME: The command line tests fail, maybe because they use
2863 ;; absolute paths.
2864 (delete-file "cli/CommandlineTest.java"))
2865 #t)))))
2866 (native-inputs
2867 `(("java-junit" ,java-junit)))
2868 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
2869 (synopsis "Common utilities for the Plexus framework")
2870 (description "This package provides various Java utility classes for the
2871 Plexus framework to ease working with strings, files, command lines, XML and
2872 more.")
2873 (license license:asl2.0)))
2874
2875 (define-public java-plexus-interpolation
2876 (package
2877 (name "java-plexus-interpolation")
2878 (version "1.23")
2879 (source (origin
2880 (method url-fetch)
2881 (uri (string-append "https://github.com/codehaus-plexus/"
2882 "plexus-interpolation/archive/"
2883 "plexus-interpolation-" version ".tar.gz"))
2884 (sha256
2885 (base32
2886 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
2887 (build-system ant-build-system)
2888 (arguments
2889 `(#:jar-name "plexus-interpolation.jar"
2890 #:source-dir "src/main"))
2891 (native-inputs
2892 `(("java-junit" ,java-junit)
2893 ("java-hamcrest-core" ,java-hamcrest-core)))
2894 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
2895 (synopsis "Java components for interpolating ${} strings and the like")
2896 (description "Plexus interpolator is a modular, flexible interpolation
2897 framework for the expression language style commonly seen in Maven, Plexus,
2898 and other related projects.
2899
2900 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
2901 package within @code{plexus-utils}, but has been separated in order to allow
2902 these two libraries to vary independently of one another.")
2903 (license license:asl2.0)))
2904
2905 (define-public java-plexus-classworlds
2906 (package
2907 (name "java-plexus-classworlds")
2908 (version "2.5.2")
2909 (source (origin
2910 (method url-fetch)
2911 (uri (string-append "https://github.com/codehaus-plexus/"
2912 "plexus-classworlds/archive/plexus-classworlds-"
2913 version ".tar.gz"))
2914 (sha256
2915 (base32
2916 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
2917 (build-system ant-build-system)
2918 (arguments
2919 `(#:jar-name "plexus-classworlds.jar"
2920 #:source-dir "src/main"
2921 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
2922 (native-inputs
2923 `(("java-junit" ,java-junit)))
2924 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
2925 (synopsis "Java class loader framework")
2926 (description "Plexus classworlds replaces the native @code{ClassLoader}
2927 mechanism of Java. It is especially useful for dynamic loading of application
2928 components.")
2929 (license license:asl2.0)))
2930
2931 (define java-plexus-container-default-bootstrap
2932 (package
2933 (name "java-plexus-container-default-bootstrap")
2934 (version "1.7.1")
2935 (source (origin
2936 (method url-fetch)
2937 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
2938 "/archive/plexus-containers-" version ".tar.gz"))
2939 (sha256
2940 (base32
2941 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
2942 (build-system ant-build-system)
2943 (arguments
2944 `(#:jar-name "container-default.jar"
2945 #:source-dir "plexus-container-default/src/main/java"
2946 #:test-dir "plexus-container-default/src/test"
2947 #:jdk ,icedtea-8
2948 #:tests? #f; requires plexus-archiver, which depends on this package
2949 #:phases
2950 (modify-phases %standard-phases
2951 (add-before 'build 'copy-resources
2952 (lambda _
2953 (copy-recursively
2954 "plexus-container-default/src/main/resources/"
2955 "build/classes")
2956 #t)))))
2957 (inputs
2958 `(("worldclass" ,java-plexus-classworlds)
2959 ("xbean" ,java-geronimo-xbean-reflect)
2960 ("utils" ,java-plexus-utils)
2961 ("junit" ,java-junit)
2962 ("guava" ,java-guava)))
2963 (home-page "https://github.com/codehaus-plexus/plexus-containers")
2964 (synopsis "Inversion-of-control container")
2965 (description "Plexus-default-container is Plexus' inversion-of-control
2966 (@dfn{IoC}) container. It is composed of its public API and its default
2967 implementation.")
2968 (license license:asl2.0)))
2969
2970 (define-public java-plexus-io
2971 (package
2972 (name "java-plexus-io")
2973 (version "3.0.0")
2974 (source (origin
2975 (method url-fetch)
2976 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
2977 "/archive/plexus-io-" version ".tar.gz"))
2978 (sha256
2979 (base32
2980 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
2981 (build-system ant-build-system)
2982 (arguments
2983 `(#:jar-name "plexus-io.jar"
2984 #:source-dir "src/main/java"
2985 #:test-dir "src/test"
2986 #:jdk ,icedtea-8
2987 #:phases
2988 (modify-phases %standard-phases
2989 (add-before 'build 'copy-resources
2990 (lambda _
2991 (mkdir-p "build/classes/META-INF/plexus")
2992 (copy-file "src/main/resources/META-INF/plexus/components.xml"
2993 "build/classes/META-INF/plexus/components.xml")
2994 #t)))))
2995 (inputs
2996 `(("utils" ,java-plexus-utils)
2997 ("commons-io" ,java-commons-io)
2998 ("java-jsr305" ,java-jsr305)))
2999 (native-inputs
3000 `(("junit" ,java-junit)
3001 ("hamcrest" ,java-hamcrest-core)
3002 ("guava" ,java-guava)
3003 ("classworlds" ,java-plexus-classworlds)
3004 ("xbean" ,java-geronimo-xbean-reflect)
3005 ("container-default" ,java-plexus-container-default-bootstrap)))
3006 (home-page "https://github.com/codehaus-plexus/plexus-io")
3007 (synopsis "I/O plexus components")
3008 (description "Plexus IO is a set of plexus components, which are designed
3009 for use in I/O operations. This implementation using plexus components allows
3010 reusing it in maven.")
3011 (license license:asl2.0)))
3012
3013 (define-public java-plexus-archiver
3014 (package
3015 (name "java-plexus-archiver")
3016 (version "3.5")
3017 (source (origin
3018 (method url-fetch)
3019 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3020 "/archive/plexus-archiver-" version ".tar.gz"))
3021 (sha256
3022 (base32
3023 "0iv1j7khra6icqh3jndng3iipfmkc7l5jq2y802cm8r575v75pyv"))))
3024 (build-system ant-build-system)
3025 (arguments
3026 `(#:jar-name "plexus-archiver.jar"
3027 #:source-dir "src/main/java"
3028 #:jdk ,icedtea-8
3029 #:test-dir "src/test"
3030 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3031 #:phases
3032 (modify-phases %standard-phases
3033 (add-before 'check 'remove-failing
3034 (lambda _
3035 ;; Requires an older version of plexus container
3036 (delete-file
3037 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")))
3038 (add-before 'build 'copy-resources
3039 (lambda _
3040 (mkdir-p "build/classes/META-INF/plexus")
3041 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3042 "build/classes/META-INF/plexus/components.xml")
3043 #t)))))
3044 (inputs
3045 `(("utils" ,java-plexus-utils)
3046 ("commons-io" ,java-commons-io)
3047 ("snappy" ,java-iq80-snappy)
3048 ("io" ,java-plexus-io)
3049 ("compress" ,java-commons-compress)
3050 ("container-default" ,java-plexus-container-default-bootstrap)
3051 ("snappy" ,java-snappy)
3052 ("java-jsr305" ,java-jsr305)))
3053 (native-inputs
3054 `(("junit" ,java-junit)
3055 ("classworld" ,java-plexus-classworlds)
3056 ("xbean" ,java-geronimo-xbean-reflect)
3057 ("xz" ,java-tukaani-xz)
3058 ("guava" ,java-guava)))
3059 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3060 (synopsis "Archiver component of the Plexus project")
3061 (description "Plexus-archiver contains a component to deal with project
3062 archives (jar).")
3063 (license license:asl2.0)))
3064
3065 (define-public java-plexus-container-default
3066 (package
3067 (inherit java-plexus-container-default-bootstrap)
3068 (name "java-plexus-container-default")
3069 (arguments
3070 `(#:jar-name "container-default.jar"
3071 #:source-dir "plexus-container-default/src/main/java"
3072 #:test-dir "plexus-container-default/src/test"
3073 #:test-exclude (list ;"**/*Test.java"
3074 "**/Abstract*.java"
3075 ;; Requires plexus-hierarchy
3076 "**/PlexusHierarchyTest.java"
3077 ;; Failures
3078 "**/ComponentRealmCompositionTest.java"
3079 "**/PlexusContainerTest.java")
3080 #:jdk ,icedtea-8
3081 #:phases
3082 (modify-phases %standard-phases
3083 (add-before 'build 'copy-resources
3084 (lambda _
3085 (copy-recursively
3086 "plexus-container-default/src/main/resources/"
3087 "build/classes")
3088 #t))
3089 (add-before 'check 'fix-paths
3090 (lambda _
3091 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3092 (substitute*
3093 (string-append
3094 dir "/plexus/component/composition/"
3095 "ComponentRealmCompositionTest.java")
3096 (("src/test") "plexus-container-default/src/test"))
3097 #t))))))
3098 (inputs
3099 `(("worldclass" ,java-plexus-classworlds)
3100 ("xbean" ,java-geronimo-xbean-reflect)
3101 ("utils" ,java-plexus-utils)
3102 ("junit" ,java-junit)
3103 ("guava" ,java-guava)))
3104 (native-inputs
3105 `(("archiver" ,java-plexus-archiver)
3106 ("hamcrest" ,java-hamcrest-core)))))
3107
3108 (define-public java-plexus-component-annotations
3109 (package
3110 (inherit java-plexus-container-default)
3111 (name "java-plexus-component-annotations")
3112 (arguments
3113 `(#:jar-name "plexus-component-annotations.jar"
3114 #:source-dir "plexus-component-annotations/src/main/java"
3115 #:tests? #f)); no tests
3116 (inputs '())
3117 (native-inputs '())
3118 (synopsis "Plexus descriptors generator")
3119 (description "This package is a Maven plugin to generate Plexus descriptors
3120 from source tags and class annotations.")))
3121
3122 (define-public java-plexus-cipher
3123 (package
3124 (name "java-plexus-cipher")
3125 (version "1.7")
3126 (source (origin
3127 (method url-fetch)
3128 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3129 "/archive/plexus-cipher-" version ".tar.gz"))
3130 (sha256
3131 (base32
3132 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3133 (build-system ant-build-system)
3134 (arguments
3135 `(#:jar-name "plexus-cipher.jar"
3136 #:source-dir "src/main/java"
3137 #:jdk ,icedtea-8
3138 #:tests? #f; FIXME: requires sisu-inject-bean
3139 #:phases
3140 (modify-phases %standard-phases
3141 (add-before 'build 'copy-resources
3142 (lambda _
3143 (copy-recursively "src/main/resources" "build/classes")
3144 (mkdir-p "build/classes/META-INF/sisu")
3145 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3146 (lambda _
3147 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3148 #t)))))
3149 (inputs
3150 `(("java-cdi-api" ,java-cdi-api)
3151 ("java-javax-inject" ,java-javax-inject)))
3152 (home-page "https://github.com/sonatype/plexus-cipher")
3153 (synopsis "Encryption/decryption Component")
3154 (description "Plexus-cipher contains a component to deal with encryption
3155 and decryption.")
3156 (license license:asl2.0)))
3157
3158 (define-public java-plexus-compiler-api
3159 (package
3160 (name "java-plexus-compiler-api")
3161 (version "2.8.2")
3162 (source (origin
3163 (method url-fetch)
3164 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3165 "/archive/plexus-compiler-" version ".tar.gz"))
3166 (sha256
3167 (base32
3168 "0g3x26pymcdnfnwv2a1i57pd5s26f5zqfi1rdy98z1bn01klx25k"))))
3169 (build-system ant-build-system)
3170 (arguments
3171 `(#:jar-name "plexus-compiler-api.jar"
3172 #:source-dir "plexus-compiler-api/src/main/java"
3173 #:jdk ,icedtea-8
3174 #:test-dir "plexus-compiler-api/src/test"))
3175 (inputs
3176 `(("java-plexus-container-default" ,java-plexus-container-default)
3177 ("java-plexus-util" ,java-plexus-utils)))
3178 (native-inputs
3179 `(("java-junit" ,java-junit)))
3180 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3181 (synopsis "Plexus Compilers component's API to manipulate compilers")
3182 (description "This package contains the API used by components to manipulate
3183 compilers.")
3184 (license (list license:asl2.0
3185 license:expat))))
3186
3187 (define-public java-plexus-compiler-javac
3188 (package
3189 (inherit java-plexus-compiler-api)
3190 (name "java-plexus-compiler-javac")
3191 (arguments
3192 `(#:jar-name "plexus-compiler-javac.jar"
3193 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3194 #:jdk ,icedtea-8
3195 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3196 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3197 (inputs
3198 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3199 ("java-plexus-utils" ,java-plexus-utils)
3200 ("java-plexus-container-default" ,java-plexus-container-default)))
3201 (native-inputs
3202 `(("java-junit" ,java-junit)))
3203 (synopsis "Javac Compiler support for Plexus Compiler component")
3204 (description "This package contains the Javac Compiler support for Plexus
3205 Compiler component.")))
3206
3207 (define-public java-plexus-sec-dispatcher
3208 (package
3209 (name "java-plexus-sec-dispatcher")
3210 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3211 (source (origin
3212 ;; This project doesn't tag releases or publish tarballs, so we take
3213 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3214 (method url-fetch)
3215 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3216 "archive/7db8f88048.tar.gz"))
3217 (sha256
3218 (base32
3219 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3220 (file-name (string-append name "-" version ".tar.gz"))))
3221 (arguments
3222 `(#:jar-name "plexus-sec-dispatcher.jar"
3223 #:source-dir "src/main/java"
3224 #:jdk ,icedtea-8
3225 #:phases
3226 (modify-phases %standard-phases
3227 (add-before 'build 'generate-models
3228 (lambda* (#:key inputs #:allow-other-keys)
3229 (define (modello-single-mode file version mode)
3230 (zero? (system* "java"
3231 "org.codehaus.modello.ModelloCli"
3232 file mode "src/main/java" version
3233 "false" "true")))
3234 (let ((file "src/main/mdo/settings-security.mdo"))
3235 (and
3236 (modello-single-mode file "1.0.0" "java")
3237 (modello-single-mode file "1.0.0" "xpp3-reader")
3238 (modello-single-mode file "1.0.0" "xpp3-writer")))))
3239 (add-before 'build 'generate-components.xml
3240 (lambda _
3241 (mkdir-p "build/classes/META-INF/plexus")
3242 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3243 (lambda _
3244 (display
3245 "<component-set>\n
3246 <components>\n
3247 <component>\n
3248 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3249 <role-hint>default</role-hint>\n
3250 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3251 <description></description>\n
3252 <requirements>\n
3253 <requirement>\n
3254 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3255 <field-name>_cipher</field-name>\n
3256 </requirement>\n
3257 <requirement>\n
3258 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3259 <field-name>_decryptors</field-name>\n
3260 </requirement>\n
3261 </requirements>\n
3262 <configuration>\n
3263 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3264 </configuration>\n
3265 </component>\n
3266 </components>\n
3267 </component-set>\n")))))
3268 (add-before 'check 'fix-paths
3269 (lambda _
3270 (copy-recursively "src/test/resources" "target"))))))
3271 (inputs
3272 `(("java-plexus-cipher" ,java-plexus-cipher)))
3273 (native-inputs
3274 `(("java-modello-core" ,java-modello-core)
3275 ;; for modello:
3276 ("java-plexus-container-default" ,java-plexus-container-default)
3277 ("java-plexus-classworlds" ,java-plexus-classworlds)
3278 ("java-plexus-utils" ,java-plexus-utils)
3279 ("java-guava" ,java-guava)
3280 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3281 ("java-sisu-build-api" ,java-sisu-build-api)
3282 ;; modello plugins:
3283 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3284 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3285 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3286 ;; for tests
3287 ("java-junit" ,java-junit)))
3288 (build-system ant-build-system)
3289 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3290 (synopsis "Plexus Security Dispatcher Component")
3291 (description "This package is the Plexus Security Dispatcher Component.
3292 This component decrypts a string passed to it.")
3293 (license license:asl2.0)))
3294
3295 (define-public java-plexus-cli
3296 (package
3297 (name "java-plexus-cli")
3298 (version "1.7")
3299 (source (origin
3300 (method git-fetch)
3301 (uri (git-reference
3302 (url "https://github.com/sonatype/plexus-cli")
3303 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3304 (file-name (string-append name "-" version))
3305 (sha256
3306 (base32
3307 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3308 (build-system ant-build-system)
3309 (arguments
3310 `(#:jar-name "plexus-cli.jar"
3311 #:source-dir "src/main/java"
3312 #:jdk ,icedtea-8
3313 #:test-dir "src/test"))
3314 (inputs
3315 `(("java-commons-cli" ,java-commons-cli)
3316 ("java-plexus-container-default" ,java-plexus-container-default)
3317 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3318 (native-inputs
3319 `(("java-plexus-utils" ,java-plexus-utils)
3320 ("java-junit" ,java-junit)
3321 ("java-guava" ,java-guava)))
3322 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3323 (synopsis "CLI building library for plexus")
3324 (description "This package is a library to help creating CLI around
3325 Plexus components.")
3326 (license license:asl2.0)))
3327
3328 (define-public java-sisu-build-api
3329 (package
3330 (name "java-sisu-build-api")
3331 (version "0.0.7")
3332 (source (origin
3333 (method url-fetch)
3334 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3335 "archive/plexus-build-api-" version ".tar.gz"))
3336 (sha256
3337 (base32
3338 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3339 (build-system ant-build-system)
3340 (arguments
3341 `(#:jar-name "sisu-build-api.jar"
3342 #:source-dir "src/main/java"
3343 #:jdk ,icedtea-8
3344 #:tests? #f; FIXME: how to run the tests?
3345 #:phases
3346 (modify-phases %standard-phases
3347 (add-before 'build 'copy-resources
3348 (lambda _
3349 (copy-recursively "src/main/resources" "build/classes")
3350 (substitute* (find-files "build/classes")
3351 (("\\$\\{project.version\\}") ,version))
3352 #t))
3353 (add-before 'build 'generate-plexus-compontent
3354 (lambda _
3355 (mkdir-p "build/classes/META-INF/plexus")
3356 ;; This file is required for plexus to inject this package.
3357 ;; FIXME: how is it generated?
3358 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3359 (lambda _
3360 (display
3361 "<component-set>\n
3362 <components>\n
3363 <component>\n
3364 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3365 <role-hint>default</role-hint>\n
3366 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3367 <description>Filesystem based non-incremental build context implementation\n
3368 which behaves as if all files were just created.</description>\n
3369 </component>\n
3370 </components>\n
3371 </component-set>\n")))
3372 #t)))))
3373 (inputs
3374 `(("java-plexus-utils" ,java-plexus-utils)
3375 ("java-plexus-container-default" ,java-plexus-container-default)))
3376 (home-page "https://github.com/sonatype/sisu-build-api/")
3377 (synopsis "Base build API for maven")
3378 (description "This package contains the base build API for maven and
3379 a default implementation of it. This API is about scanning files in a
3380 project and determining what files need to be rebuilt.")
3381 (license license:asl2.0)))
3382
3383 (define-public java-modello-core
3384 (package
3385 (name "java-modello-core")
3386 (version "1.9.1")
3387 (source (origin
3388 (method url-fetch)
3389 (uri (string-append "https://github.com/codehaus-plexus/modello"
3390 "/archive/modello-" version ".tar.gz"))
3391 (sha256
3392 (base32
3393 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
3394 (build-system ant-build-system)
3395 (arguments
3396 `(#:jar-name "modello-core.jar"
3397 #:source-dir "modello-core/src/main/java"
3398 #:test-dir "modello-core/src/test"
3399 #:main-class "org.codehaus.modello.ModelloCli"
3400 #:jdk ,icedtea-8
3401 #:phases
3402 (modify-phases %standard-phases
3403 (add-before 'build 'copy-resources
3404 (lambda _
3405 (mkdir-p "build/classes/META-INF/plexus")
3406 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
3407 "build/classes/META-INF/plexus/components.xml")
3408 #t))
3409 (add-before 'check 'fix-tests
3410 (lambda _
3411 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
3412 (substitute* '("modello/core/DefaultModelloCoreTest.java"
3413 "modello/core/io/ModelReaderTest.java")
3414 (("src/test") "modello-core/src/test")))
3415 #t)))))
3416 (inputs
3417 `(("java-plexus-utils" ,java-plexus-utils)
3418 ("java-plexus-container-default" ,java-plexus-container-default)
3419 ("java-sisu-build-api" ,java-sisu-build-api)))
3420 (native-inputs
3421 `(("java-junit" ,java-junit)
3422 ("java-plexus-classworlds" ,java-plexus-classworlds)
3423 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3424 ("java-guava" ,java-guava)))
3425 (home-page "http://codehaus-plexus.github.io/modello/")
3426 (synopsis "Framework for code generation from a simple model")
3427 (description "Modello is a framework for code generation from a simple model.
3428
3429 Modello generates code from a simple model format: based on a plugin
3430 architecture, various types of code and descriptors can be generated from the
3431 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
3432 XSD and documentation.")
3433 (license (list
3434 license:expat
3435 ;; Although this package uses only files licensed under expat,
3436 ;; other parts of the source are licensed under different
3437 ;; licenses. We include them to be inherited by other packages.
3438 license:asl2.0
3439 ;; Some files in modello-plugin-java are licensed under a
3440 ;; 5-clause BSD license.
3441 (license:non-copyleft
3442 (string-append "file:///modello-plugins/modello-plugin-java/"
3443 "src/main/java/org/codehaus/modello/plugin/"
3444 "java/javasource/JNaming.java"))))))
3445
3446 (define-public java-modello-plugins-java
3447 (package
3448 (inherit java-modello-core)
3449 (name "java-modello-plugins-java")
3450 (arguments
3451 `(#:jar-name "modello-plugins-java.jar"
3452 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
3453 #:test-dir "modello-plugins/modello-plugin-java/src/test"
3454 #:jdk ,icedtea-8
3455 #:tests? #f; requires maven-model, which depends on this package
3456 #:phases
3457 (modify-phases %standard-phases
3458 (add-before 'build 'copy-resources
3459 (lambda _
3460 (mkdir-p "build/classes")
3461 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
3462 "build/classes")
3463 #t)))))
3464 (inputs
3465 `(("java-modello-core" ,java-modello-core)
3466 ,@(package-inputs java-modello-core)))
3467 (synopsis "Modello Java Plugin")
3468 (description "Modello Java Plugin generates Java objects for the model.")))
3469
3470 (define-public java-modello-plugins-xml
3471 (package
3472 (inherit java-modello-core)
3473 (name "java-modello-plugins-xml")
3474 (arguments
3475 `(#:jar-name "modello-plugins-xml.jar"
3476 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
3477 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
3478 #:jdk ,icedtea-8
3479 #:phases
3480 (modify-phases %standard-phases
3481 (add-before 'build 'copy-resources
3482 (lambda _
3483 (mkdir-p "build/classes")
3484 (copy-recursively
3485 "modello-plugins/modello-plugin-xml/src/main/resources"
3486 "build/classes")
3487 #t))
3488 (add-before 'check 'fix-paths
3489 (lambda _
3490 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
3491 (substitute*
3492 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
3493 (("src/test") "modello-plugins/modello-plugin-xml/src/test"))))))))
3494 (inputs
3495 `(("java-modello-core" ,java-modello-core)
3496 ("java-modello-plugins-java" ,java-modello-plugins-java)
3497 ,@(package-inputs java-modello-core)))
3498 (synopsis "Modello XML Plugin")
3499 (description "Modello XML Plugin contains shared code for every plugins
3500 working on XML representation of the model.")))
3501
3502 (define-public java-modello-test
3503 (package
3504 (inherit java-modello-core)
3505 (name "java-modello-test")
3506 (arguments
3507 `(#:jar-name "modello-test.jar"
3508 #:source-dir "modello-test/src/main/java"
3509 #:tests? #f; no tests
3510 #:jdk ,icedtea-8))
3511 (inputs
3512 `(("java-plexus-utils" ,java-plexus-utils)
3513 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
3514 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
3515 ("java-plexus-container-default" ,java-plexus-container-default)))
3516 (synopsis "Modello test package")
3517 (description "The modello test package contains the basis to create
3518 Modello generator unit-tests, including sample models and xml files to test
3519 every feature for every plugin.")))
3520
3521 (define-public java-modello-plugins-xpp3
3522 (package
3523 (inherit java-modello-core)
3524 (name "java-modello-plugins-xpp3")
3525 (arguments
3526 `(#:jar-name "modello-plugins-xpp3.jar"
3527 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
3528 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
3529 ;; One of the test dependencies is maven-model which depends on this package.
3530 #:tests? #f
3531 #:jdk ,icedtea-8
3532 #:phases
3533 (modify-phases %standard-phases
3534 (add-before 'build 'copy-resources
3535 (lambda _
3536 (mkdir-p "build/classes")
3537 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
3538 "build/classes")
3539 #t)))))
3540 (inputs
3541 `(("java-modello-core" ,java-modello-core)
3542 ("java-modello-plugins-java" ,java-modello-plugins-java)
3543 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
3544 ,@(package-inputs java-modello-core)))
3545 (native-inputs
3546 `(("java-xmlunit" ,java-xmlunit)
3547 ("java-modello-test" ,java-modello-test)
3548 ,@(package-native-inputs java-modello-core)))
3549 (synopsis "Modello XPP3 Plugin")
3550 (description "The modello XPP3 plugin generates XML readers and writers based
3551 on the XPP3 API (XML Pull Parser).")))
3552
3553 (define-public java-asm
3554 (package
3555 (name "java-asm")
3556 (version "6.0")
3557 (source (origin
3558 (method url-fetch)
3559 (uri (string-append "http://download.forge.ow2.org/asm/"
3560 "asm-" version ".tar.gz"))
3561 (sha256
3562 (base32
3563 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
3564 (build-system ant-build-system)
3565 (propagated-inputs
3566 `(("java-aqute-bndlib" ,java-aqute-bndlib)))
3567 (arguments
3568 `(#:build-target "compile"
3569 ;; The tests require an old version of Janino, which no longer compiles
3570 ;; with the JDK7.
3571 #:tests? #f
3572 #:make-flags
3573 (list
3574 ;; We don't need these extra ant tasks, but the build system asks us to
3575 ;; provide a path anyway.
3576 "-Dobjectweb.ant.tasks.path=dummy-path"
3577 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
3578 ;; used during the build automatically by ant-build-system, but
3579 ;; java-asm's build.xml fails unless we provide something here.
3580 "-Dbiz.aQute.bnd.path=dummy-path")
3581 #:phases
3582 (modify-phases %standard-phases
3583 (add-before 'install 'build-jars
3584 (lambda* (#:key make-flags #:allow-other-keys)
3585 ;; We cannot use the "jar" target because it depends on a couple
3586 ;; of unpackaged, complicated tools.
3587 (mkdir "dist")
3588 (zero? (system* "jar"
3589 "-cf" (string-append "dist/asm-" ,version ".jar")
3590 "-C" "output/build/tmp" "."))))
3591 (replace 'install
3592 (install-jars "dist")))))
3593 (native-inputs
3594 `(("java-junit" ,java-junit)))
3595 (home-page "http://asm.ow2.org/")
3596 (synopsis "Very small and fast Java bytecode manipulation framework")
3597 (description "ASM is an all purpose Java bytecode manipulation and
3598 analysis framework. It can be used to modify existing classes or dynamically
3599 generate classes, directly in binary form. The provided common
3600 transformations and analysis algorithms allow to easily assemble custom
3601 complex transformations and code analysis tools.")
3602 (license license:bsd-3)))
3603
3604 (define java-asm-bootstrap
3605 (package
3606 (inherit java-asm)
3607 (name "java-asm-bootstrap")
3608 (arguments
3609 (substitute-keyword-arguments (package-arguments java-asm)
3610 ((#:tests? _) #f)))
3611 (native-inputs `())
3612 (propagated-inputs
3613 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
3614 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
3615 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
3616 (delete `("java-aqute-libg" ,java-aqute-libg)
3617 (package-inputs java-asm)))))))
3618
3619 (define-public java-cglib
3620 (package
3621 (name "java-cglib")
3622 (version "3.2.4")
3623 (source (origin
3624 (method url-fetch)
3625 (uri (string-append
3626 "https://github.com/cglib/cglib/archive/RELEASE_"
3627 (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version)
3628 ".tar.gz"))
3629 (file-name (string-append "cglib-" version ".tar.gz"))
3630 (sha256
3631 (base32
3632 "162dvd4fln76ai8prfharf66pn6r56p3sxx683j5vdyccrd5hi1q"))))
3633 (build-system ant-build-system)
3634 (arguments
3635 `(;; FIXME: tests fail because junit runs
3636 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
3637 ;; to describe a test at all.
3638 #:tests? #f
3639 #:jar-name "cglib.jar"
3640 #:phases
3641 (modify-phases %standard-phases
3642 (add-after 'unpack 'chdir
3643 (lambda _ (chdir "cglib") #t)))))
3644 (inputs
3645 `(("java-asm" ,java-asm)
3646 ("java-junit" ,java-junit)))
3647 (home-page "https://github.com/cglib/cglib/")
3648 (synopsis "Java byte code generation library")
3649 (description "The byte code generation library CGLIB is a high level API
3650 to generate and transform Java byte code.")
3651 (license license:asl2.0)))
3652
3653 (define-public java-objenesis
3654 (package
3655 (name "java-objenesis")
3656 (version "2.5.1")
3657 (source (origin
3658 (method url-fetch)
3659 (uri (string-append "https://github.com/easymock/objenesis/"
3660 "archive/" version ".tar.gz"))
3661 (file-name (string-append "objenesis-" version ".tar.gz"))
3662 (sha256
3663 (base32
3664 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
3665 (build-system ant-build-system)
3666 (arguments
3667 `(#:jar-name "objenesis.jar"
3668 #:source-dir "main/src/"
3669 #:test-dir "main/src/test/"))
3670 (native-inputs
3671 `(("java-junit" ,java-junit)
3672 ("java-hamcrest-core" ,java-hamcrest-core)))
3673 (home-page "http://objenesis.org/")
3674 (synopsis "Bypass the constructor when creating an object")
3675 (description "Objenesis is a small Java library that serves one purpose:
3676 to instantiate a new object of a particular class. It is common to see
3677 restrictions in libraries stating that classes must require a default
3678 constructor. Objenesis aims to overcome these restrictions by bypassing the
3679 constructor on object instantiation.")
3680 (license license:asl2.0)))
3681
3682 (define-public java-easymock
3683 (package
3684 (name "java-easymock")
3685 (version "3.4")
3686 (source (origin
3687 (method url-fetch)
3688 (uri (string-append "https://github.com/easymock/easymock/"
3689 "archive/easymock-" version ".tar.gz"))
3690 (sha256
3691 (base32
3692 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
3693 (build-system ant-build-system)
3694 (arguments
3695 `(#:jar-name "easymock.jar"
3696 #:source-dir "core/src/main"
3697 #:test-dir "core/src/test"
3698 #:phases
3699 (modify-phases %standard-phases
3700 ;; FIXME: Android support requires the following packages to be
3701 ;; available: com.google.dexmaker.stock.ProxyBuilder
3702 (add-after 'unpack 'delete-android-support
3703 (lambda _
3704 (with-directory-excursion "core/src/main/java/org/easymock/internal"
3705 (substitute* "MocksControl.java"
3706 (("AndroidSupport.isAndroid\\(\\)") "false")
3707 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
3708 (delete-file "AndroidClassProxyFactory.java"))
3709 #t))
3710 (add-after 'unpack 'delete-broken-tests
3711 (lambda _
3712 (with-directory-excursion "core/src/test/java/org/easymock"
3713 ;; This test depends on dexmaker.
3714 (delete-file "tests2/ClassExtensionHelperTest.java")
3715
3716 ;; This is not a test.
3717 (delete-file "tests/BaseEasyMockRunnerTest.java")
3718
3719 ;; This test should be executed with a different runner...
3720 (delete-file "tests2/EasyMockAnnotationsTest.java")
3721 ;; ...but deleting it means that we also have to delete these
3722 ;; dependent files.
3723 (delete-file "tests2/EasyMockRunnerTest.java")
3724 (delete-file "tests2/EasyMockRuleTest.java")
3725
3726 ;; This test fails because the file "easymock.properties" does
3727 ;; not exist.
3728 (delete-file "tests2/EasyMockPropertiesTest.java"))
3729 #t)))))
3730 (inputs
3731 `(("java-asm" ,java-asm)
3732 ("java-cglib" ,java-cglib)
3733 ("java-objenesis" ,java-objenesis)))
3734 (native-inputs
3735 `(("java-junit" ,java-junit)
3736 ("java-hamcrest-core" ,java-hamcrest-core)))
3737 (home-page "http://easymock.org")
3738 (synopsis "Java library providing mock objects for unit tests")
3739 (description "EasyMock is a Java library that provides an easy way to use
3740 mock objects in unit testing.")
3741 (license license:asl2.0)))
3742
3743 (define-public java-jmock-1
3744 (package
3745 (name "java-jmock")
3746 (version "1.2.0")
3747 (source (origin
3748 (method url-fetch)
3749 (uri (string-append "https://github.com/jmock-developers/"
3750 "jmock-library/archive/" version ".tar.gz"))
3751 (file-name (string-append "jmock-" version ".tar.gz"))
3752 (sha256
3753 (base32
3754 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
3755 (build-system ant-build-system)
3756 (arguments
3757 `(#:build-target "jars"
3758 #:test-target "run.tests"
3759 #:phases
3760 (modify-phases %standard-phases
3761 (replace 'install (install-jars "build")))))
3762 (home-page "http://www.jmock.org")
3763 (synopsis "Mock object library for test-driven development")
3764 (description "JMock is a library that supports test-driven development of
3765 Java code with mock objects. Mock objects help you design and test the
3766 interactions between the objects in your programs.
3767
3768 The jMock library
3769
3770 @itemize
3771 @item makes it quick and easy to define mock objects
3772 @item lets you precisely specify the interactions between
3773 your objects, reducing the brittleness of your tests
3774 @item plugs into your favourite test framework
3775 @item is easy to extend.
3776 @end itemize\n")
3777 (license license:bsd-3)))
3778
3779 (define-public java-jmock
3780 (package
3781 (inherit java-jmock-1)
3782 (name "java-jmock")
3783 (version "2.8.2")
3784 (source (origin
3785 (method url-fetch)
3786 (uri (string-append "https://github.com/jmock-developers/"
3787 "jmock-library/archive/" version ".tar.gz"))
3788 (file-name (string-append name "-" version ".tar.gz"))
3789 (sha256
3790 (base32
3791 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
3792 (inputs
3793 `(("java-hamcrest-all" ,java-hamcrest-all)
3794 ("java-asm" ,java-asm)
3795 ("java-bsh" ,java-bsh)
3796 ("java-junit" ,java-junit)))
3797 (native-inputs
3798 `(("cglib" ,java-cglib)))
3799 (arguments
3800 `(#:jar-name "java-jmock.jar"
3801 #:source-dir "jmock/src/main/java"
3802 #:test-dir "jmock/src/test"))))
3803
3804 (define-public java-jmock-junit4
3805 (package
3806 (inherit java-jmock)
3807 (name "java-jmock-junit4")
3808 (arguments
3809 `(#:jar-name "java-jmock-junit4.jar"
3810 #:source-dir "jmock-junit4/src/main/java"
3811 #:test-dir "jmock-junit4/src/test"))
3812 (inputs
3813 `(("java-hamcrest-all" ,java-hamcrest-all)
3814 ("java-asm" ,java-asm)
3815 ("java-bsh" ,java-bsh)
3816 ("java-jmock" ,java-jmock)
3817 ("java-jumit" ,java-junit)))))
3818
3819 (define-public java-jmock-legacy
3820 (package
3821 (inherit java-jmock)
3822 (name "java-jmock-legacy")
3823 (arguments
3824 `(#:jar-name "java-jmock-legacy.jar"
3825 #:source-dir "jmock-legacy/src/main/java"
3826 #:test-dir "jmock-legacy/src/test"
3827 #:phases
3828 (modify-phases %standard-phases
3829 (add-before 'check 'copy-tests
3830 (lambda _
3831 ;; This file is a dependancy of some tests
3832 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
3833 (copy-file (string-append "jmock/src/test/java/" file)
3834 (string-append "jmock-legacy/src/test/java/" file))
3835 #t))))))
3836 (inputs
3837 `(("java-hamcrest-all" ,java-hamcrest-all)
3838 ("java-objenesis" ,java-objenesis)
3839 ("java-cglib" ,java-cglib)
3840 ("java-jmock" ,java-jmock)
3841 ("java-asm" ,java-asm)
3842 ("java-bsh" ,java-bsh)
3843 ("java-junit" ,java-junit)))
3844 (native-inputs
3845 `(("java-jmock-junit4" ,java-jmock-junit4)))))
3846
3847 (define-public java-hamcrest-all
3848 (package (inherit java-hamcrest-core)
3849 (name "java-hamcrest-all")
3850 (arguments
3851 `(#:jdk ,icedtea-8
3852 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
3853 ((#:build-target _) "bigjar")
3854 ((#:phases phases)
3855 `(modify-phases ,phases
3856 ;; Some build targets override the classpath, so we need to patch
3857 ;; the build.xml to ensure that required dependencies are on the
3858 ;; classpath.
3859 (add-after 'unpack 'patch-classpath-for-integration
3860 (lambda* (#:key inputs #:allow-other-keys)
3861 (substitute* "build.xml"
3862 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
3863 (string-join
3864 (cons line
3865 (append
3866 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
3867 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
3868 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
3869 ";")))
3870 #t)))))))
3871 (inputs
3872 `(("java-junit" ,java-junit)
3873 ("java-jmock" ,java-jmock-1)
3874 ("java-easymock" ,java-easymock)
3875 ,@(package-inputs java-hamcrest-core)))))
3876
3877 (define-public java-jopt-simple
3878 (package
3879 (name "java-jopt-simple")
3880 (version "5.0.3")
3881 (source (origin
3882 (method url-fetch)
3883 (uri (string-append "http://repo1.maven.org/maven2/"
3884 "net/sf/jopt-simple/jopt-simple/"
3885 version "/jopt-simple-"
3886 version "-sources.jar"))
3887 (sha256
3888 (base32
3889 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
3890 (build-system ant-build-system)
3891 (arguments
3892 `(#:tests? #f ; there are no tests
3893 #:jar-name "jopt-simple.jar"))
3894 (home-page "https://pholser.github.io/jopt-simple/")
3895 (synopsis "Java library for parsing command line options")
3896 (description "JOpt Simple is a Java library for parsing command line
3897 options, such as those you might pass to an invocation of @code{javac}. In
3898 the interest of striving for simplicity, as closely as possible JOpt Simple
3899 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
3900 GNU @code{getopt_long}. It also aims to make option parser configuration and
3901 retrieval of options and their arguments simple and expressive, without being
3902 overly clever.")
3903 (license license:expat)))
3904
3905 (define-public java-commons-math3
3906 (package
3907 (name "java-commons-math3")
3908 (version "3.6.1")
3909 (source (origin
3910 (method url-fetch)
3911 (uri (string-append "mirror://apache/commons/math/source/"
3912 "commons-math3-" version "-src.tar.gz"))
3913 (sha256
3914 (base32
3915 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
3916 (build-system ant-build-system)
3917 (arguments
3918 `(#:build-target "jar"
3919 #:test-target "test"
3920 #:make-flags
3921 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
3922 (junit (assoc-ref %build-inputs "java-junit")))
3923 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
3924 (string-append "-Dhamcrest.jar=" hamcrest
3925 "/share/java/hamcrest-core.jar")))
3926 #:phases
3927 (modify-phases %standard-phases
3928 ;; We want to build the jar in the build phase and run the tests
3929 ;; later in a separate phase.
3930 (add-after 'unpack 'untangle-targets
3931 (lambda _
3932 (substitute* "build.xml"
3933 (("name=\"jar\" depends=\"test\"")
3934 "name=\"jar\" depends=\"compile\""))
3935 #t))
3936 ;; There is no install target.
3937 (replace 'install
3938 (install-jars "target")))))
3939 (native-inputs
3940 `(("java-junit" ,java-junit)
3941 ("java-hamcrest-core" ,java-hamcrest-core)))
3942 (home-page "http://commons.apache.org/math/")
3943 (synopsis "Apache Commons mathematics library")
3944 (description "Commons Math is a library of lightweight, self-contained
3945 mathematics and statistics components addressing the most common problems not
3946 available in the Java programming language or Commons Lang.")
3947 (license license:asl2.0)))
3948
3949 (define-public java-jmh
3950 (package
3951 (name "java-jmh")
3952 (version "1.17.5")
3953 (source (origin
3954 (method hg-fetch)
3955 (uri (hg-reference
3956 (url "http://hg.openjdk.java.net/code-tools/jmh/")
3957 (changeset version)))
3958 (file-name (string-append name "-" version "-checkout"))
3959 (sha256
3960 (base32
3961 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
3962 (build-system ant-build-system)
3963 (arguments
3964 `(#:jar-name "jmh-core.jar"
3965 #:source-dir "jmh-core/src/main"
3966 #:test-dir "jmh-core/src/test"
3967 #:phases
3968 (modify-phases %standard-phases
3969 ;; This seems to be a bug in the JDK. It may not be necessary in
3970 ;; future versions of the JDK.
3971 (add-after 'unpack 'fix-bug
3972 (lambda _
3973 (with-directory-excursion
3974 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
3975 (substitute* '("IntegerValueConverter.java"
3976 "ThreadsValueConverter.java")
3977 (("public Class<Integer> valueType")
3978 "public Class<? extends Integer> valueType")))
3979 #t)))))
3980 (inputs
3981 `(("java-jopt-simple" ,java-jopt-simple)
3982 ("java-commons-math3" ,java-commons-math3)))
3983 (native-inputs
3984 `(("java-junit" ,java-junit)
3985 ("java-hamcrest-core" ,java-hamcrest-core)))
3986 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
3987 (synopsis "Benchmark harness for the JVM")
3988 (description "JMH is a Java harness for building, running, and analysing
3989 nano/micro/milli/macro benchmarks written in Java and other languages
3990 targeting the JVM.")
3991 ;; GPLv2 only
3992 (license license:gpl2)))
3993
3994 (define-public java-commons-collections4
3995 (package
3996 (name "java-commons-collections4")
3997 (version "4.1")
3998 (source (origin
3999 (method url-fetch)
4000 (uri (string-append "mirror://apache/commons/collections/source/"
4001 "commons-collections4-" version "-src.tar.gz"))
4002 (sha256
4003 (base32
4004 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4005 (build-system ant-build-system)
4006 (arguments
4007 `(#:test-target "test"
4008 #:make-flags
4009 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4010 (junit (assoc-ref %build-inputs "java-junit"))
4011 (easymock (assoc-ref %build-inputs "java-easymock")))
4012 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4013 (string-append "-Dhamcrest.jar=" hamcrest
4014 "/share/java/hamcrest-core.jar")
4015 (string-append "-Deasymock.jar=" easymock
4016 "/share/java/easymock.jar")))
4017 #:phases
4018 (modify-phases %standard-phases
4019 (replace 'install
4020 (install-jars "target")))))
4021 (native-inputs
4022 `(("java-junit" ,java-junit)
4023 ("java-hamcrest-core" ,java-hamcrest-core)
4024 ("java-easymock" ,java-easymock)))
4025 (home-page "http://commons.apache.org/collections/")
4026 (synopsis "Collections framework")
4027 (description "The Java Collections Framework is the recognised standard
4028 for collection handling in Java. Commons-Collections seek to build upon the
4029 JDK classes by providing new interfaces, implementations and utilities. There
4030 are many features, including:
4031
4032 @itemize
4033 @item @code{Bag} interface for collections that have a number of copies of
4034 each object
4035 @item @code{BidiMap} interface for maps that can be looked up from value to
4036 key as well and key to value
4037 @item @code{MapIterator} interface to provide simple and quick iteration over
4038 maps
4039 @item Transforming decorators that alter each object as it is added to the
4040 collection
4041 @item Composite collections that make multiple collections look like one
4042 @item Ordered maps and sets that retain the order elements are added in,
4043 including an LRU based map
4044 @item Reference map that allows keys and/or values to be garbage collected
4045 under close control
4046 @item Many comparator implementations
4047 @item Many iterator implementations
4048 @item Adapter classes from array and enumerations to collections
4049 @item Utilities to test or create typical set-theory properties of collections
4050 such as union, intersection, and closure.
4051 @end itemize\n")
4052 (license license:asl2.0)))
4053
4054 (define-public java-commons-collections
4055 (package
4056 (inherit java-commons-collections4)
4057 (name "java-commons-collections")
4058 (version "3.2.2")
4059 (source (origin
4060 (method url-fetch)
4061 (uri (string-append "mirror://apache/commons/collections/source/"
4062 "commons-collections-" version "-src.tar.gz"))
4063 (sha256
4064 (base32
4065 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4066 (patches
4067 (search-patches "java-commons-collections-fix-java8.patch"))))
4068 (arguments
4069 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4070 ((#:phases phases)
4071 `(modify-phases ,phases
4072 ;; The manifest is required by the build procedure
4073 (add-before 'build 'add-manifest
4074 (lambda _
4075 (mkdir-p "build/conf")
4076 (call-with-output-file "build/conf/MANIFEST.MF"
4077 (lambda (file)
4078 (format file "Manifest-Version: 1.0\n")))))
4079 (replace 'install
4080 (install-jars "build"))))))))
4081
4082 (define java-commons-collections-test-classes
4083 (package
4084 (inherit java-commons-collections)
4085 (arguments
4086 `(#:jar-name "commons-collections-test-classes.jar"
4087 #:source-dir "src/test"
4088 #:tests? #f))
4089 (inputs
4090 `(("collection" ,java-commons-collections)))))
4091
4092 (define-public java-commons-beanutils
4093 (package
4094 (name "java-commons-beanutils")
4095 (version "1.9.3")
4096 (source (origin
4097 (method url-fetch)
4098 (uri (string-append "mirror://apache/commons/beanutils/source/"
4099 "commons-beanutils-" version "-src.tar.gz"))
4100 (sha256
4101 (base32
4102 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4103 (build-system ant-build-system)
4104 (arguments
4105 `(#:test-target "test"
4106 #:tests? #f
4107 #:phases
4108 (modify-phases %standard-phases
4109 (replace 'install
4110 (lambda* (#:key outputs #:allow-other-keys)
4111 (rename-file (string-append "dist/commons-beanutils-" ,version
4112 "-SNAPSHOT.jar")
4113 "commons-beanutils.jar")
4114 (install-file "commons-beanutils.jar"
4115 (string-append (assoc-ref outputs "out") "/share/java/"))
4116 #t)))))
4117 (inputs
4118 `(("logging" ,java-commons-logging-minimal)
4119 ("collections" ,java-commons-collections)))
4120 (native-inputs
4121 `(("junit" ,java-junit)
4122 ("collections-test" ,java-commons-collections-test-classes)))
4123 (home-page "http://commons.apache.org/beanutils/")
4124 (synopsis "Dynamically set or get properties in Java")
4125 (description "BeanUtils provides a simplified interface to reflection and
4126 introspection to set or get dynamically determined properties through their
4127 setter and getter method.")
4128 (license license:asl2.0)))
4129
4130 (define-public java-commons-io
4131 (package
4132 (name "java-commons-io")
4133 (version "2.5")
4134 (source
4135 (origin
4136 (method url-fetch)
4137 (uri (string-append "mirror://apache/commons/io/source/"
4138 "commons-io-" version "-src.tar.gz"))
4139 (sha256
4140 (base32
4141 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4142 (build-system ant-build-system)
4143 (outputs '("out" "doc"))
4144 (arguments
4145 `(#:test-target "test"
4146 #:make-flags
4147 (list (string-append "-Djunit.jar="
4148 (assoc-ref %build-inputs "java-junit")
4149 "/share/java/junit.jar"))
4150 #:phases
4151 (modify-phases %standard-phases
4152 (add-after 'build 'build-javadoc ant-build-javadoc)
4153 (replace 'install (install-jars "target"))
4154 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4155 (native-inputs
4156 `(("java-junit" ,java-junit)
4157 ("java-hamcrest-core" ,java-hamcrest-core)))
4158 (home-page "http://commons.apache.org/io/")
4159 (synopsis "Common useful IO related classes")
4160 (description "Commons-IO contains utility classes, stream implementations,
4161 file filters and endian classes.")
4162 (license license:asl2.0)))
4163
4164 (define-public java-commons-lang
4165 (package
4166 (name "java-commons-lang")
4167 (version "2.6")
4168 (source
4169 (origin
4170 (method url-fetch)
4171 (uri (string-append "mirror://apache/commons/lang/source/"
4172 "commons-lang-" version "-src.tar.gz"))
4173 (sha256
4174 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4175 (build-system ant-build-system)
4176 (outputs '("out" "doc"))
4177 (arguments
4178 `(#:test-target "test"
4179 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4180 #:phases
4181 (modify-phases %standard-phases
4182 (add-after 'build 'build-javadoc ant-build-javadoc)
4183 (add-before 'check 'disable-failing-test
4184 (lambda _
4185 ;; Disable a failing test
4186 (substitute* "src/test/java/org/apache/commons/lang/\
4187 time/FastDateFormatTest.java"
4188 (("public void testFormat\\(\\)")
4189 "public void disabled_testFormat()"))
4190 #t))
4191 (replace 'install (install-jars "target"))
4192 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4193 (native-inputs
4194 `(("java-junit" ,java-junit)))
4195 (home-page "http://commons.apache.org/lang/")
4196 (synopsis "Extension of the java.lang package")
4197 (description "The Commons Lang components contains a set of Java classes
4198 that provide helper methods for standard Java classes, especially those found
4199 in the @code{java.lang} package in the Sun JDK. The following classes are
4200 included:
4201
4202 @itemize
4203 @item StringUtils - Helper for @code{java.lang.String}.
4204 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4205 of characters such as @code{[a-z]} and @code{[abcdez]}.
4206 @item RandomStringUtils - Helper for creating randomised strings.
4207 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4208 @item NumberRange - A range of numbers with an upper and lower bound.
4209 @item ObjectUtils - Helper for @code{java.lang.Object}.
4210 @item SerializationUtils - Helper for serializing objects.
4211 @item SystemUtils - Utility class defining the Java system properties.
4212 @item NestedException package - A sub-package for the creation of nested
4213 exceptions.
4214 @item Enum package - A sub-package for the creation of enumerated types.
4215 @item Builder package - A sub-package for the creation of @code{equals},
4216 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4217 @end itemize\n")
4218 (license license:asl2.0)))
4219
4220 (define-public java-commons-lang3
4221 (package
4222 (name "java-commons-lang3")
4223 (version "3.4")
4224 (source
4225 (origin
4226 (method url-fetch)
4227 (uri (string-append "mirror://apache/commons/lang/source/"
4228 "commons-lang3-" version "-src.tar.gz"))
4229 (sha256
4230 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4231 (build-system ant-build-system)
4232 (outputs '("out" "doc"))
4233 (arguments
4234 `(#:test-target "test"
4235 #:make-flags
4236 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4237 (junit (assoc-ref %build-inputs "java-junit"))
4238 (easymock (assoc-ref %build-inputs "java-easymock"))
4239 (io (assoc-ref %build-inputs "java-commons-io")))
4240 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4241 (string-append "-Dhamcrest.jar=" hamcrest
4242 "/share/java/hamcrest-all.jar")
4243 (string-append "-Dcommons-io.jar=" io
4244 "/share/java/commons-io-"
4245 ,(package-version java-commons-io)
4246 "-SNAPSHOT.jar")
4247 (string-append "-Deasymock.jar=" easymock
4248 "/share/java/easymock.jar")))
4249 #:phases
4250 (modify-phases %standard-phases
4251 (add-after 'build 'build-javadoc ant-build-javadoc)
4252 (replace 'install (install-jars "target"))
4253 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4254 (native-inputs
4255 `(("java-junit" ,java-junit)
4256 ("java-commons-io" ,java-commons-io)
4257 ("java-hamcrest-all" ,java-hamcrest-all)
4258 ("java-easymock" ,java-easymock)))
4259 (home-page "http://commons.apache.org/lang/")
4260 (synopsis "Extension of the java.lang package")
4261 (description "The Commons Lang components contains a set of Java classes
4262 that provide helper methods for standard Java classes, especially those found
4263 in the @code{java.lang} package. The following classes are included:
4264
4265 @itemize
4266 @item StringUtils - Helper for @code{java.lang.String}.
4267 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4268 characters such as @code{[a-z]} and @code{[abcdez]}.
4269 @item RandomStringUtils - Helper for creating randomised strings.
4270 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4271 @item NumberRange - A range of numbers with an upper and lower bound.
4272 @item ObjectUtils - Helper for @code{java.lang.Object}.
4273 @item SerializationUtils - Helper for serializing objects.
4274 @item SystemUtils - Utility class defining the Java system properties.
4275 @item NestedException package - A sub-package for the creation of nested
4276 exceptions.
4277 @item Enum package - A sub-package for the creation of enumerated types.
4278 @item Builder package - A sub-package for the creation of @code{equals},
4279 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4280 @end itemize\n")
4281 (license license:asl2.0)))
4282
4283 (define-public java-commons-bsf
4284 (package
4285 (name "java-commons-bsf")
4286 (version "2.4.0")
4287 (source (origin
4288 (method url-fetch)
4289 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4290 version ".tar.gz"))
4291 (sha256
4292 (base32
4293 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4294 (modules '((guix build utils)))
4295 (snippet
4296 '(begin
4297 (for-each delete-file
4298 (find-files "." "\\.jar$"))
4299 #t))))
4300 (build-system ant-build-system)
4301 (arguments
4302 `(#:build-target "jar"
4303 #:tests? #f; No test file
4304 #:modules ((guix build ant-build-system)
4305 (guix build utils)
4306 (guix build java-utils)
4307 (sxml simple))
4308 #:phases
4309 (modify-phases %standard-phases
4310 (add-before 'build 'create-properties
4311 (lambda _
4312 ;; This file is missing from the distribution
4313 (call-with-output-file "build-properties.xml"
4314 (lambda (port)
4315 (sxml->xml
4316 `(project (@ (basedir ".") (name "build-properties") (default ""))
4317 (property (@ (name "project.name") (value "bsf")))
4318 (property (@ (name "source.level") (value "1.5")))
4319 (property (@ (name "build.lib") (value "build/jar")))
4320 (property (@ (name "src.dir") (value "src")))
4321 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
4322 (property (@ (name "build.tests") (value "build/test-classes")))
4323 (property (@ (name "build.dest") (value "build/classes"))))
4324 port)))))
4325 (replace 'install (install-jars "build")))))
4326 (native-inputs
4327 `(("java-junit" ,java-junit)))
4328 (inputs
4329 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
4330 (home-page "https://commons.apache.org/proper/commons-bsf")
4331 (synopsis "Bean Scripting Framework")
4332 (description "The Bean Scripting Framework (BSF) is a set of Java classes
4333 which provides scripting language support within Java applications, and access
4334 to Java objects and methods from scripting languages. BSF allows one to write
4335 JSPs in languages other than Java while providing access to the Java class
4336 library. In addition, BSF permits any Java application to be implemented in
4337 part (or dynamically extended) by a language that is embedded within it. This
4338 is achieved by providing an API that permits calling scripting language engines
4339 from within Java, as well as an object registry that exposes Java objects to
4340 these scripting language engines.")
4341 (license license:asl2.0)))
4342
4343 (define-public java-commons-jxpath
4344 (package
4345 (name "java-commons-jxpath")
4346 (version "1.3")
4347 (source (origin
4348 (method url-fetch)
4349 (uri (string-append "mirror://apache/commons/jxpath/source/"
4350 "commons-jxpath-" version "-src.tar.gz"))
4351 (sha256
4352 (base32
4353 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
4354 (build-system ant-build-system)
4355 (arguments
4356 `(#:jar-name "commons-jxpath.jar"
4357 ;; tests require more dependencies, including mockrunner which depends on old software
4358 #:tests? #f
4359 #:source-dir "src/java"))
4360 (inputs
4361 `(("java-tomcat" ,java-tomcat)
4362 ("java-jdom" ,java-jdom)
4363 ("java-commons-beanutils" ,java-commons-beanutils)))
4364 (native-inputs
4365 `(("java-junit" ,java-junit)))
4366 (home-page "http://commons.apache.org/jxpath/")
4367 (synopsis "Simple interpreter of an expression language called XPath.")
4368 (description "The org.apache.commons.jxpath package defines a simple
4369 interpreter of an expression language called XPath. JXPath applies XPath
4370 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
4371 contexts, DOM etc, including mixtures thereof.")
4372 (license license:asl2.0)))
4373
4374 (define-public java-jsr250
4375 (package
4376 (name "java-jsr250")
4377 (version "1.3")
4378 (source (origin
4379 (method url-fetch)
4380 (uri (string-append "https://repo1.maven.org/maven2/"
4381 "javax/annotation/javax.annotation-api/"
4382 version "/javax.annotation-api-"
4383 version "-sources.jar"))
4384 (sha256
4385 (base32
4386 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
4387 (build-system ant-build-system)
4388 (arguments
4389 `(#:tests? #f ; no tests included
4390 #:jdk ,icedtea-8
4391 #:jar-name "jsr250.jar"))
4392 (home-page "https://jcp.org/en/jsr/detail?id=250")
4393 (synopsis "Security-related annotations")
4394 (description "This package provides annotations for security. It provides
4395 packages in the @code{javax.annotation} and @code{javax.annotation.security}
4396 namespaces.")
4397 ;; either cddl or gpl2 only, with classpath exception
4398 (license (list license:cddl1.0
4399 license:gpl2))))
4400
4401 (define-public java-jsr305
4402 (package
4403 (name "java-jsr305")
4404 (version "3.0.1")
4405 (source (origin
4406 (method url-fetch)
4407 (uri (string-append "https://repo1.maven.org/maven2/"
4408 "com/google/code/findbugs/"
4409 "jsr305/" version "/jsr305-"
4410 version "-sources.jar"))
4411 (sha256
4412 (base32
4413 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
4414 (build-system ant-build-system)
4415 (arguments
4416 `(#:tests? #f ; no tests included
4417 #:jar-name "jsr305.jar"))
4418 (home-page "http://findbugs.sourceforge.net/")
4419 (synopsis "Annotations for the static analyzer called findbugs")
4420 (description "This package provides annotations for the findbugs package.
4421 It provides packages in the @code{javax.annotations} namespace.")
4422 (license license:asl2.0)))
4423
4424 (define-public java-guava
4425 (package
4426 (name "java-guava")
4427 ;; This is the last release of Guava that can be built with Java 7.
4428 (version "20.0")
4429 (source (origin
4430 (method url-fetch)
4431 (uri (string-append "https://github.com/google/guava/"
4432 "releases/download/v" version
4433 "/guava-" version "-sources.jar"))
4434 (sha256
4435 (base32
4436 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
4437 (build-system ant-build-system)
4438 (arguments
4439 `(#:tests? #f ; no tests included
4440 #:jar-name "guava.jar"
4441 #:phases
4442 (modify-phases %standard-phases
4443 (add-after 'unpack 'trim-sources
4444 (lambda _
4445 (with-directory-excursion "src/com/google/common"
4446 ;; Remove annotations to avoid extra dependencies:
4447 ;; * "j2objc" annotations are used when converting Java to
4448 ;; Objective C;
4449 ;; * "errorprone" annotations catch common Java mistakes at
4450 ;; compile time;
4451 ;; * "IgnoreJRERequirement" is used for Android.
4452 (substitute* (find-files "." "\\.java$")
4453 (("import com.google.j2objc.*") "")
4454 (("import com.google.errorprone.annotation.*") "")
4455 (("import org.codehaus.mojo.animal_sniffer.*") "")
4456 (("@CanIgnoreReturnValue") "")
4457 (("@LazyInit") "")
4458 (("@WeakOuter") "")
4459 (("@RetainedWith") "")
4460 (("@Weak") "")
4461 (("@ForOverride") "")
4462 (("@J2ObjCIncompatible") "")
4463 (("@IgnoreJRERequirement") "")))
4464 #t)))))
4465 (inputs
4466 `(("java-jsr305" ,java-jsr305)))
4467 (home-page "https://github.com/google/guava")
4468 (synopsis "Google core libraries for Java")
4469 (description "Guava is a set of core libraries that includes new
4470 collection types (such as multimap and multiset), immutable collections, a
4471 graph library, functional types, an in-memory cache, and APIs/utilities for
4472 concurrency, I/O, hashing, primitives, reflection, string processing, and much
4473 more!")
4474 (license license:asl2.0)))
4475
4476 ;; The java-commons-logging package provides adapters to many different
4477 ;; logging frameworks. To avoid an excessive dependency graph we try to build
4478 ;; it with only a minimal set of adapters.
4479 (define-public java-commons-logging-minimal
4480 (package
4481 (name "java-commons-logging-minimal")
4482 (version "1.2")
4483 (source (origin
4484 (method url-fetch)
4485 (uri (string-append "mirror://apache/commons/logging/source/"
4486 "commons-logging-" version "-src.tar.gz"))
4487 (sha256
4488 (base32
4489 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
4490 (build-system ant-build-system)
4491 (arguments
4492 `(#:tests? #f ; avoid dependency on logging frameworks
4493 #:jar-name "commons-logging-minimal.jar"
4494 #:phases
4495 (modify-phases %standard-phases
4496 (add-after 'unpack 'delete-adapters-and-tests
4497 (lambda _
4498 ;; Delete all adapters except for NoOpLog, SimpleLog, and
4499 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
4500 ;; is used by applications; SimpleLog is the only actually usable
4501 ;; implementation that does not depend on another logging
4502 ;; framework.
4503 (for-each
4504 (lambda (file)
4505 (delete-file (string-append
4506 "src/main/java/org/apache/commons/logging/impl/" file)))
4507 (list "Jdk13LumberjackLogger.java"
4508 "WeakHashtable.java"
4509 "Log4JLogger.java"
4510 "ServletContextCleaner.java"
4511 "Jdk14Logger.java"
4512 "AvalonLogger.java"
4513 "LogKitLogger.java"))
4514 (delete-file-recursively "src/test")
4515 #t)))))
4516 (home-page "http://commons.apache.org/logging/")
4517 (synopsis "Common API for logging implementations")
4518 (description "The Logging package is a thin bridge between different
4519 logging implementations. A library that uses the commons-logging API can be
4520 used with any logging implementation at runtime.")
4521 (license license:asl2.0)))
4522
4523 ;; This is the last release of the 1.x series.
4524 (define-public java-mockito-1
4525 (package
4526 (name "java-mockito")
4527 (version "1.10.19")
4528 (source (origin
4529 (method url-fetch)
4530 (uri (string-append "http://repo1.maven.org/maven2/"
4531 "org/mockito/mockito-core/" version
4532 "/mockito-core-" version "-sources.jar"))
4533 (sha256
4534 (base32
4535 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
4536 (build-system ant-build-system)
4537 (arguments
4538 `(#:jar-name "mockito.jar"
4539 #:tests? #f ; no tests included
4540 ;; FIXME: patch-and-repack does not support jars, so we have to apply
4541 ;; patches in build phases.
4542 #:phases
4543 (modify-phases %standard-phases
4544 ;; Mockito was developed against a different version of hamcrest,
4545 ;; which does not require matcher implementations to provide an
4546 ;; implementation of the "describeMismatch" method. We add this
4547 ;; simple definition to pass the build with our version of hamcrest.
4548 (add-after 'unpack 'fix-hamcrest-build-error
4549 (lambda _
4550 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
4551 (("public Matcher getActualMatcher\\(\\) .*" line)
4552 (string-append "
4553 public void describeMismatch(Object item, Description description) {
4554 actualMatcher.describeMismatch(item, description);
4555 }"
4556 line)))
4557 #t))
4558 ;; Mockito bundles cglib. We have a cglib package, so let's use
4559 ;; that instead.
4560 (add-after 'unpack 'use-system-libraries
4561 (lambda _
4562 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
4563 (substitute* '("CGLIBHacker.java"
4564 "CglibMockMaker.java"
4565 "ClassImposterizer.java"
4566 "DelegatingMockitoMethodProxy.java"
4567 "MethodInterceptorFilter.java"
4568 "MockitoNamingPolicy.java"
4569 "SerializableMockitoMethodProxy.java"
4570 "SerializableNoOp.java")
4571 (("import org.mockito.cglib") "import net.sf.cglib")))
4572 #t)))))
4573 (inputs
4574 `(("java-junit" ,java-junit)
4575 ("java-objenesis" ,java-objenesis)
4576 ("java-cglib" ,java-cglib)
4577 ("java-hamcrest-core" ,java-hamcrest-core)))
4578 (home-page "http://mockito.org")
4579 (synopsis "Mockito is a mock library for Java")
4580 (description "Mockito is a mocking library for Java which lets you write
4581 tests with a clean and simple API. It generates mocks using reflection, and
4582 it records all mock invocations, including methods arguments.")
4583 (license license:asl2.0)))
4584
4585 (define-public java-httpcomponents-httpcore
4586 (package
4587 (name "java-httpcomponents-httpcore")
4588 (version "4.4.6")
4589 (source (origin
4590 (method url-fetch)
4591 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
4592 "source/httpcomponents-core-"
4593 version "-src.tar.gz"))
4594 (sha256
4595 (base32
4596 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
4597 (build-system ant-build-system)
4598 (arguments
4599 `(#:jar-name "httpcomponents-httpcore.jar"
4600 #:phases
4601 (modify-phases %standard-phases
4602 (add-after 'unpack 'chdir
4603 (lambda _ (chdir "httpcore") #t)))))
4604 (inputs
4605 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4606 ("java-commons-lang3" ,java-commons-lang3)))
4607 (native-inputs
4608 `(("java-junit" ,java-junit)
4609 ("java-mockito" ,java-mockito-1)))
4610 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
4611 (synopsis "Low level HTTP transport components")
4612 (description "HttpCore is a set of low level HTTP transport components
4613 that can be used to build custom client and server side HTTP services with a
4614 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4615 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4616 NIO.
4617
4618 This package provides the blocking I/O model library.")
4619 (license license:asl2.0)))
4620
4621 (define-public java-httpcomponents-httpcore-nio
4622 (package (inherit java-httpcomponents-httpcore)
4623 (name "java-httpcomponents-httpcore-nio")
4624 (arguments
4625 `(#:jar-name "httpcomponents-httpcore-nio.jar"
4626 #:phases
4627 (modify-phases %standard-phases
4628 (add-after 'unpack 'chdir
4629 (lambda _ (chdir "httpcore-nio") #t)))))
4630 (inputs
4631 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4632 ("java-hamcrest-core" ,java-hamcrest-core)
4633 ,@(package-inputs java-httpcomponents-httpcore)))
4634 (description "HttpCore is a set of low level HTTP transport components
4635 that can be used to build custom client and server side HTTP services with a
4636 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
4637 on the classic Java I/O and non-blocking, event driven I/O model based on Java
4638 NIO.
4639
4640 This package provides the non-blocking I/O model library based on Java
4641 NIO.")))
4642
4643 (define-public java-httpcomponents-httpcore-ab
4644 (package (inherit java-httpcomponents-httpcore)
4645 (name "java-httpcomponents-httpcore-ab")
4646 (arguments
4647 `(#:jar-name "httpcomponents-httpcore-ab.jar"
4648 #:phases
4649 (modify-phases %standard-phases
4650 (add-after 'unpack 'chdir
4651 (lambda _ (chdir "httpcore-ab") #t)))))
4652 (inputs
4653 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4654 ("java-commons-cli" ,java-commons-cli)
4655 ("java-hamcrest-core" ,java-hamcrest-core)
4656 ,@(package-inputs java-httpcomponents-httpcore)))
4657 (synopsis "Apache HttpCore benchmarking tool")
4658 (description "This package provides the HttpCore benchmarking tool. It is
4659 an Apache AB clone based on HttpCore.")))
4660
4661 (define-public java-httpcomponents-httpclient
4662 (package
4663 (name "java-httpcomponents-httpclient")
4664 (version "4.5.3")
4665 (source (origin
4666 (method url-fetch)
4667 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
4668 "source/httpcomponents-client-"
4669 version "-src.tar.gz"))
4670 (sha256
4671 (base32
4672 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
4673 (build-system ant-build-system)
4674 (arguments
4675 `(#:jar-name "httpcomponents-httpclient.jar"
4676 #:phases
4677 (modify-phases %standard-phases
4678 (add-after 'unpack 'chdir
4679 (lambda _ (chdir "httpclient") #t)))))
4680 (inputs
4681 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
4682 ("java-commons-codec" ,java-commons-codec)
4683 ("java-hamcrest-core" ,java-hamcrest-core)
4684 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4685 ("java-mockito" ,java-mockito-1)
4686 ("java-junit" ,java-junit)))
4687 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
4688 (synopsis "HTTP client library for Java")
4689 (description "Although the @code{java.net} package provides basic
4690 functionality for accessing resources via HTTP, it doesn't provide the full
4691 flexibility or functionality needed by many applications. @code{HttpClient}
4692 seeks to fill this void by providing an efficient, up-to-date, and
4693 feature-rich package implementing the client side of the most recent HTTP
4694 standards and recommendations.")
4695 (license license:asl2.0)))
4696
4697 (define-public java-httpcomponents-httpmime
4698 (package (inherit java-httpcomponents-httpclient)
4699 (name "java-httpcomponents-httpmime")
4700 (arguments
4701 `(#:jar-name "httpcomponents-httpmime.jar"
4702 #:phases
4703 (modify-phases %standard-phases
4704 (add-after 'unpack 'chdir
4705 (lambda _ (chdir "httpmime") #t)))))
4706 (inputs
4707 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
4708 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
4709 ("java-junit" ,java-junit)
4710 ("java-hamcrest-core" ,java-hamcrest-core)))))
4711
4712 (define-public java-commons-net
4713 (package
4714 (name "java-commons-net")
4715 (version "3.6")
4716 (source (origin
4717 (method url-fetch)
4718 (uri (string-append "mirror://apache/commons/net/source/"
4719 "commons-net-" version "-src.tar.gz"))
4720 (sha256
4721 (base32
4722 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
4723 (build-system ant-build-system)
4724 (arguments
4725 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
4726 ;; should be "resources/examples/examples.properties"), but gets "null"
4727 ;; instead.
4728 #:tests? #f
4729 #:jar-name "commons-net.jar"))
4730 (native-inputs
4731 `(("java-junit" ,java-junit)
4732 ("java-hamcrest-core" ,java-hamcrest-core)))
4733 (home-page "http://commons.apache.org/net/")
4734 (synopsis "Client library for many basic Internet protocols")
4735 (description "The Apache Commons Net library implements the client side of
4736 many basic Internet protocols. The purpose of the library is to provide
4737 fundamental protocol access, not higher-level abstractions.")
4738 (license license:asl2.0)))
4739
4740 (define-public java-jsch
4741 (package
4742 (name "java-jsch")
4743 (version "0.1.54")
4744 (source (origin
4745 (method url-fetch)
4746 (uri (string-append "mirror://sourceforge/jsch/jsch/"
4747 version "/jsch-" version ".zip"))
4748 (sha256
4749 (base32
4750 "029rdddyq1mh3ghryh3ki99kba1xkf1d1swjv2vi6lk6zzjy2wdb"))))
4751 (build-system ant-build-system)
4752 (arguments
4753 `(#:build-target "dist"
4754 #:tests? #f ; no tests included
4755 #:phases
4756 (modify-phases %standard-phases
4757 (replace 'install (install-jars "dist")))))
4758 (native-inputs
4759 `(("unzip" ,unzip)))
4760 (home-page "http://www.jcraft.com/jsch/")
4761 (synopsis "Pure Java implementation of SSH2")
4762 (description "JSch is a pure Java implementation of SSH2. JSch allows you
4763 to connect to an SSH server and use port forwarding, X11 forwarding, file
4764 transfer, etc., and you can integrate its functionality into your own Java
4765 programs.")
4766 (license license:bsd-3)))
4767
4768 (define-public java-commons-compress
4769 (package
4770 (name "java-commons-compress")
4771 (version "1.13")
4772 (source (origin
4773 (method url-fetch)
4774 (uri (string-append "mirror://apache/commons/compress/source/"
4775 "commons-compress-" version "-src.tar.gz"))
4776 (sha256
4777 (base32
4778 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
4779 (build-system ant-build-system)
4780 (arguments
4781 `(#:jar-name "commons-compress.jar"
4782 #:phases
4783 (modify-phases %standard-phases
4784 (add-after 'unpack 'delete-bad-tests
4785 (lambda _
4786 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
4787 ;; FIXME: These tests really should not fail. Maybe they are
4788 ;; indicative of problems with our Java packaging work.
4789
4790 ;; This test fails with a null pointer exception.
4791 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
4792 ;; This test fails to open test resources.
4793 (delete-file "archivers/zip/ExplodeSupportTest.java")
4794
4795 ;; FIXME: This test adds a dependency on powermock, which is hard to
4796 ;; package at this point.
4797 ;; https://github.com/powermock/powermock
4798 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
4799 #t)))))
4800 (inputs
4801 `(("java-junit" ,java-junit)
4802 ("java-hamcrest-core" ,java-hamcrest-core)
4803 ("java-mockito" ,java-mockito-1)
4804 ("java-xz" ,java-xz)))
4805 (home-page "https://commons.apache.org/proper/commons-compress/")
4806 (synopsis "Java library for working with compressed files")
4807 (description "The Apache Commons Compress library defines an API for
4808 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
4809 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
4810 (license license:asl2.0)))
4811
4812 (define-public java-commons-csv
4813 (package
4814 (name "java-commons-csv")
4815 (version "1.4")
4816 (source (origin
4817 (method url-fetch)
4818 (uri (string-append "mirror://apache/commons/csv/source/"
4819 "commons-csv-" version "-src.tar.gz"))
4820 (sha256
4821 (base32
4822 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
4823 (build-system ant-build-system)
4824 (arguments
4825 `(#:jar-name "commons-csv.jar"
4826 #:source-dir "src/main/java"
4827 #:tests? #f)); FIXME: requires java-h2
4828 (inputs
4829 `(("java-hamcrest-core" ,java-hamcrest-core)
4830 ("java-commons-io" ,java-commons-io)
4831 ("java-commons-lang3" ,java-commons-lang3)
4832 ("junit" ,java-junit)))
4833 (home-page "https://commons.apache.org/proper/commons-csv/")
4834 (synopsis "Read and write CSV documents")
4835 (description "Commons CSV reads and writes files in variations of the Comma
4836 Separated Value (CSV) format. The most common CSV formats are predefined in the
4837 CSVFormat class:
4838
4839 @itemize
4840 @item Microsoft Excel
4841 @item Informix UNLOAD
4842 @item Informix UNLOAD CSV
4843 @item MySQL
4844 @item RFC 4180
4845 @item TDF
4846 @end itemize
4847
4848 Custom formats can be created using a fluent style API.")
4849 (license license:asl2.0)))
4850
4851 (define-public java-osgi-annotation
4852 (package
4853 (name "java-osgi-annotation")
4854 (version "6.0.0")
4855 (source (origin
4856 (method url-fetch)
4857 (uri (string-append "https://repo1.maven.org/maven2/"
4858 "org/osgi/org.osgi.annotation/" version "/"
4859 "org.osgi.annotation-" version "-sources.jar"))
4860 (sha256
4861 (base32
4862 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
4863 (build-system ant-build-system)
4864 (arguments
4865 `(#:tests? #f ; no tests
4866 #:jar-name "osgi-annotation.jar"))
4867 (home-page "https://www.osgi.org")
4868 (synopsis "Annotation module of OSGi framework")
4869 (description
4870 "OSGi, for Open Services Gateway initiative framework, is a module system
4871 and service platform for the Java programming language. This package contains
4872 the OSGi annotation module, providing additional services to help dynamic
4873 components.")
4874 (license license:asl2.0)))
4875
4876 (define-public java-osgi-core
4877 (package
4878 (name "java-osgi-core")
4879 (version "6.0.0")
4880 (source (origin
4881 (method url-fetch)
4882 (uri (string-append "https://repo1.maven.org/maven2/"
4883 "org/osgi/org.osgi.core/" version "/"
4884 "org.osgi.core-" version "-sources.jar"))
4885 (sha256
4886 (base32
4887 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
4888 (build-system ant-build-system)
4889 (arguments
4890 `(#:tests? #f ; no tests
4891 #:jar-name "osgi-core.jar"))
4892 (inputs
4893 `(("java-osgi-annotation" ,java-osgi-annotation)))
4894 (home-page "https://www.osgi.org")
4895 (synopsis "Core module of OSGi framework")
4896 (description
4897 "OSGi, for Open Services Gateway initiative framework, is a module system
4898 and service platform for the Java programming language. This package contains
4899 the OSGi Core module.")
4900 (license license:asl2.0)))
4901
4902 (define-public java-osgi-service-event
4903 (package
4904 (name "java-osgi-service-event")
4905 (version "1.3.1")
4906 (source (origin
4907 (method url-fetch)
4908 (uri (string-append "https://repo1.maven.org/maven2/"
4909 "org/osgi/org.osgi.service.event/"
4910 version "/org.osgi.service.event-"
4911 version "-sources.jar"))
4912 (sha256
4913 (base32
4914 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
4915 (build-system ant-build-system)
4916 (arguments
4917 `(#:tests? #f ; no tests
4918 #:jar-name "osgi-service-event.jar"))
4919 (inputs
4920 `(("java-osgi-annotation" ,java-osgi-annotation)
4921 ("java-osgi-core" ,java-osgi-core)))
4922 (home-page "https://www.osgi.org")
4923 (synopsis "OSGi service event module")
4924 (description
4925 "OSGi, for Open Services Gateway initiative framework, is a module system
4926 and service platform for the Java programming language. This package contains
4927 the OSGi @code{org.osgi.service.event} module.")
4928 (license license:asl2.0)))
4929
4930 (define-public java-eclipse-osgi
4931 (package
4932 (name "java-eclipse-osgi")
4933 (version "3.11.3")
4934 (source (origin
4935 (method url-fetch)
4936 (uri (string-append "https://repo1.maven.org/maven2/"
4937 "org/eclipse/platform/org.eclipse.osgi/"
4938 version "/org.eclipse.osgi-"
4939 version "-sources.jar"))
4940 (sha256
4941 (base32
4942 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
4943 (build-system ant-build-system)
4944 (arguments
4945 `(#:tests? #f ; no tests included
4946 #:jar-name "eclipse-equinox-osgi.jar"))
4947 (inputs
4948 `(("java-osgi-annotation" ,java-osgi-annotation)))
4949 (home-page "http://www.eclipse.org/equinox/")
4950 (synopsis "Eclipse Equinox OSGi framework")
4951 (description "This package provides an implementation of the OSGi Core
4952 specification.")
4953 (license license:epl1.0)))
4954
4955 (define-public java-eclipse-equinox-common
4956 (package
4957 (name "java-eclipse-equinox-common")
4958 (version "3.8.0")
4959 (source (origin
4960 (method url-fetch)
4961 (uri (string-append "https://repo1.maven.org/maven2/"
4962 "org/eclipse/platform/org.eclipse.equinox.common/"
4963 version "/org.eclipse.equinox.common-"
4964 version "-sources.jar"))
4965 (sha256
4966 (base32
4967 "12aazpkgw46r1qj0pr421jzwhbmsizd97r37krd7njnbrdgfzksc"))))
4968 (build-system ant-build-system)
4969 (arguments
4970 `(#:tests? #f ; no tests included
4971 #:jar-name "eclipse-equinox-common.jar"))
4972 (inputs
4973 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
4974 (home-page "http://www.eclipse.org/equinox/")
4975 (synopsis "Common Eclipse runtime")
4976 (description "This package provides the common Eclipse runtime.")
4977 (license license:epl1.0)))
4978
4979 (define-public java-eclipse-core-jobs
4980 (package
4981 (name "java-eclipse-core-jobs")
4982 (version "3.8.0")
4983 (source (origin
4984 (method url-fetch)
4985 (uri (string-append "https://repo1.maven.org/maven2/"
4986 "org/eclipse/platform/org.eclipse.core.jobs/"
4987 version "/org.eclipse.core.jobs-"
4988 version "-sources.jar"))
4989 (sha256
4990 (base32
4991 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
4992 (build-system ant-build-system)
4993 (arguments
4994 `(#:tests? #f ; no tests included
4995 #:jar-name "eclipse-core-jobs.jar"))
4996 (inputs
4997 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
4998 ("java-eclipse-osgi" ,java-eclipse-osgi)))
4999 (home-page "http://www.eclipse.org/equinox/")
5000 (synopsis "Eclipse jobs mechanism")
5001 (description "This package provides the Eclipse jobs mechanism.")
5002 (license license:epl1.0)))
5003
5004 (define-public java-eclipse-equinox-registry
5005 (package
5006 (name "java-eclipse-equinox-registry")
5007 (version "3.6.100")
5008 (source (origin
5009 (method url-fetch)
5010 (uri (string-append "https://repo1.maven.org/maven2/"
5011 "org/eclipse/platform/org.eclipse.equinox.registry/"
5012 version "/org.eclipse.equinox.registry-"
5013 version "-sources.jar"))
5014 (sha256
5015 (base32
5016 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5017 (build-system ant-build-system)
5018 (arguments
5019 `(#:tests? #f ; no tests included
5020 #:jar-name "eclipse-equinox-registry.jar"))
5021 (inputs
5022 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5023 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5024 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5025 (home-page "http://www.eclipse.org/equinox/")
5026 (synopsis "Eclipse extension registry support")
5027 (description "This package provides support for the Eclipse extension
5028 registry.")
5029 (license license:epl1.0)))
5030
5031 (define-public java-eclipse-equinox-app
5032 (package
5033 (name "java-eclipse-equinox-app")
5034 (version "1.3.400")
5035 (source (origin
5036 (method url-fetch)
5037 (uri (string-append "https://repo1.maven.org/maven2/"
5038 "org/eclipse/platform/org.eclipse.equinox.app/"
5039 version "/org.eclipse.equinox.app-"
5040 version "-sources.jar"))
5041 (sha256
5042 (base32
5043 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5044 (build-system ant-build-system)
5045 (arguments
5046 `(#:tests? #f ; no tests included
5047 #:jar-name "eclipse-equinox-app.jar"))
5048 (inputs
5049 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5050 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5051 ("java-eclipse-osgi" ,java-eclipse-osgi)
5052 ("java-osgi-service-event" ,java-osgi-service-event)))
5053 (home-page "http://www.eclipse.org/equinox/")
5054 (synopsis "Equinox application container")
5055 (description "This package provides the Equinox application container for
5056 Eclipse.")
5057 (license license:epl1.0)))
5058
5059 (define-public java-eclipse-equinox-preferences
5060 (package
5061 (name "java-eclipse-equinox-preferences")
5062 (version "3.6.1")
5063 (source (origin
5064 (method url-fetch)
5065 (uri (string-append "https://repo1.maven.org/maven2/"
5066 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5067 version "/org.eclipse.equinox.preferences-"
5068 version "-sources.jar"))
5069 (sha256
5070 (base32
5071 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5072 (build-system ant-build-system)
5073 (arguments
5074 `(#:tests? #f ; no tests included
5075 #:jar-name "eclipse-equinox-preferences.jar"))
5076 (inputs
5077 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5078 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5079 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5080 (home-page "http://www.eclipse.org/equinox/")
5081 (synopsis "Eclipse preferences mechanism")
5082 (description "This package provides the Eclipse preferences mechanism with
5083 the module @code{org.eclipse.equinox.preferences}.")
5084 (license license:epl1.0)))
5085
5086 (define-public java-eclipse-core-contenttype
5087 (package
5088 (name "java-eclipse-core-contenttype")
5089 (version "3.5.100")
5090 (source (origin
5091 (method url-fetch)
5092 (uri (string-append "https://repo1.maven.org/maven2/"
5093 "org/eclipse/platform/org.eclipse.core.contenttype/"
5094 version "/org.eclipse.core.contenttype-"
5095 version "-sources.jar"))
5096 (sha256
5097 (base32
5098 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5099 (build-system ant-build-system)
5100 (arguments
5101 `(#:tests? #f ; no tests included
5102 #:jar-name "eclipse-core-contenttype.jar"))
5103 (inputs
5104 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5105 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5106 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5107 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5108 (home-page "http://www.eclipse.org/")
5109 (synopsis "Eclipse content mechanism")
5110 (description "This package provides the Eclipse content mechanism in the
5111 @code{org.eclipse.core.contenttype} module.")
5112 (license license:epl1.0)))
5113
5114 (define-public java-eclipse-core-runtime
5115 (package
5116 (name "java-eclipse-core-runtime")
5117 (version "3.12.0")
5118 (source (origin
5119 (method url-fetch)
5120 (uri (string-append "https://repo1.maven.org/maven2/"
5121 "org/eclipse/platform/org.eclipse.core.runtime/"
5122 version "/org.eclipse.core.runtime-"
5123 version "-sources.jar"))
5124 (sha256
5125 (base32
5126 "16mkf8jgj35pgzms7w1gyfq0gfm4ixw6c5xbbxzdj1la56c758ya"))))
5127 (build-system ant-build-system)
5128 (arguments
5129 `(#:tests? #f ; no tests included
5130 #:jar-name "eclipse-core-runtime.jar"))
5131 (inputs
5132 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5133 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5134 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5135 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5136 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5137 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5138 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5139 (home-page "https://www.eclipse.org/")
5140 (synopsis "Eclipse core runtime")
5141 (description "This package provides the Eclipse core runtime with the
5142 module @code{org.eclipse.core.runtime}.")
5143 (license license:epl1.0)))
5144
5145 (define-public java-eclipse-core-filesystem
5146 (package
5147 (name "java-eclipse-core-filesystem")
5148 (version "1.6.1")
5149 (source (origin
5150 (method url-fetch)
5151 (uri (string-append "https://repo1.maven.org/maven2/"
5152 "org/eclipse/platform/org.eclipse.core.filesystem/"
5153 version "/org.eclipse.core.filesystem-"
5154 version "-sources.jar"))
5155 (sha256
5156 (base32
5157 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5158 (build-system ant-build-system)
5159 (arguments
5160 `(#:tests? #f ; no tests included
5161 #:jar-name "eclipse-core-filesystem.jar"))
5162 (inputs
5163 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5164 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5165 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5166 (home-page "https://www.eclipse.org/")
5167 (synopsis "Eclipse core file system")
5168 (description "This package provides the Eclipse core file system with the
5169 module @code{org.eclipse.core.filesystem}.")
5170 (license license:epl1.0)))
5171
5172 (define-public java-eclipse-core-expressions
5173 (package
5174 (name "java-eclipse-core-expressions")
5175 (version "3.5.100")
5176 (source (origin
5177 (method url-fetch)
5178 (uri (string-append "https://repo1.maven.org/maven2/"
5179 "org/eclipse/platform/org.eclipse.core.expressions/"
5180 version "/org.eclipse.core.expressions-"
5181 version "-sources.jar"))
5182 (sha256
5183 (base32
5184 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5185 (build-system ant-build-system)
5186 (arguments
5187 `(#:tests? #f ; no tests included
5188 #:jar-name "eclipse-core-expressions.jar"))
5189 (inputs
5190 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5191 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5192 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5193 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5194 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5195 (home-page "https://www.eclipse.org/")
5196 (synopsis "Eclipse core expression language")
5197 (description "This package provides the Eclipse core expression language
5198 with the @code{org.eclipse.core.expressions} module.")
5199 (license license:epl1.0)))
5200
5201 (define-public java-eclipse-core-variables
5202 (package
5203 (name "java-eclipse-core-variables")
5204 (version "3.3.0")
5205 (source (origin
5206 (method url-fetch)
5207 (uri (string-append "https://repo1.maven.org/maven2/"
5208 "org/eclipse/platform/org.eclipse.core.variables/"
5209 version "/org.eclipse.core.variables-"
5210 version "-sources.jar"))
5211 (sha256
5212 (base32
5213 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5214 (build-system ant-build-system)
5215 (arguments
5216 `(#:tests? #f ; no tests included
5217 #:jar-name "eclipse-core-variables.jar"))
5218 (inputs
5219 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5220 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5221 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5222 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5223 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5224 (home-page "https://www.eclipse.org/platform")
5225 (synopsis "Eclipse core variables")
5226 (description "This package provides the Eclipse core variables module
5227 @code{org.eclipse.core.variables}.")
5228 (license license:epl1.0)))
5229
5230 (define-public java-eclipse-ant-core
5231 (package
5232 (name "java-eclipse-ant-core")
5233 (version "3.4.100")
5234 (source (origin
5235 (method url-fetch)
5236 (uri (string-append "https://repo1.maven.org/maven2/"
5237 "org/eclipse/platform/org.eclipse.ant.core/"
5238 version "/org.eclipse.ant.core-"
5239 version "-sources.jar"))
5240 (sha256
5241 (base32
5242 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5243 (build-system ant-build-system)
5244 (arguments
5245 `(#:tests? #f ; no tests included
5246 #:jar-name "eclipse-ant-core.jar"))
5247 (inputs
5248 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
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-contenttype" ,java-eclipse-core-contenttype)
5253 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5254 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5255 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5256 (home-page "https://www.eclipse.org/platform")
5257 (synopsis "Ant build tool core libraries")
5258 (description "This package provides the ant build tool core libraries with
5259 the module @code{org.eclipse.ant.core}.")
5260 (license license:epl1.0)))
5261
5262 (define-public java-eclipse-core-resources
5263 (package
5264 (name "java-eclipse-core-resources")
5265 (version "3.11.1")
5266 (source (origin
5267 (method url-fetch)
5268 (uri (string-append "https://repo1.maven.org/maven2/"
5269 "org/eclipse/platform/org.eclipse.core.resources/"
5270 version "/org.eclipse.core.resources-"
5271 version "-sources.jar"))
5272 (sha256
5273 (base32
5274 "1hrfxrll6cpcagfksk2na1ypvkcnsp0fk6n3vcsrn97qayf9mx9l"))))
5275 (build-system ant-build-system)
5276 (arguments
5277 `(#:tests? #f ; no tests included
5278 #:jar-name "eclipse-core-resources.jar"))
5279 (inputs
5280 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5281 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5282 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5283 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5284 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5285 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5286 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5287 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5288 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5289 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5290 (home-page "https://www.eclipse.org/")
5291 (synopsis "Eclipse core resource management")
5292 (description "This package provides the Eclipse core resource management
5293 module @code{org.eclipse.core.resources}.")
5294 (license license:epl1.0)))
5295
5296 (define-public java-eclipse-compare-core
5297 (package
5298 (name "java-eclipse-compare-core")
5299 (version "3.6.0")
5300 (source (origin
5301 (method url-fetch)
5302 (uri (string-append "https://repo1.maven.org/maven2/"
5303 "org/eclipse/platform/org.eclipse.compare.core/"
5304 version "/org.eclipse.compare.core-"
5305 version "-sources.jar"))
5306 (sha256
5307 (base32
5308 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
5309 (build-system ant-build-system)
5310 (arguments
5311 `(#:tests? #f ; no tests included
5312 #:jar-name "eclipse-compare-core.jar"))
5313 (inputs
5314 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5315 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5316 ("java-eclipse-osgi" ,java-eclipse-osgi)
5317 ("java-icu4j" ,java-icu4j)))
5318 (home-page "https://www.eclipse.org/")
5319 (synopsis "Eclipse core compare support")
5320 (description "This package provides the Eclipse core compare support
5321 module @code{org.eclipse.compare.core}.")
5322 (license license:epl1.0)))
5323
5324 (define-public java-eclipse-team-core
5325 (package
5326 (name "java-eclipse-team-core")
5327 (version "3.8.0")
5328 (source (origin
5329 (method url-fetch)
5330 (uri (string-append "https://repo1.maven.org/maven2/"
5331 "org/eclipse/platform/org.eclipse.team.core/"
5332 version "/org.eclipse.team.core-"
5333 version "-sources.jar"))
5334 (sha256
5335 (base32
5336 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
5337 (build-system ant-build-system)
5338 (arguments
5339 `(#:tests? #f ; no tests included
5340 #:jar-name "eclipse-team-core.jar"))
5341 (inputs
5342 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
5343 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5344 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5345 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5346 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5347 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5348 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5349 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5350 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5351 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5352 (home-page "https://www.eclipse.org/platform")
5353 (synopsis "Eclipse team support core")
5354 (description "This package provides the Eclipse team support core module
5355 @code{org.eclipse.team.core}.")
5356 (license license:epl1.0)))
5357
5358 (define-public java-eclipse-core-commands
5359 (package
5360 (name "java-eclipse-core-commands")
5361 (version "3.8.1")
5362 (source (origin
5363 (method url-fetch)
5364 (uri (string-append "https://repo1.maven.org/maven2/"
5365 "org/eclipse/platform/org.eclipse.core.commands/"
5366 version "/org.eclipse.core.commands-"
5367 version "-sources.jar"))
5368 (sha256
5369 (base32
5370 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
5371 (build-system ant-build-system)
5372 (arguments
5373 `(#:tests? #f ; no tests included
5374 #:jar-name "eclipse-core-commands.jar"))
5375 (inputs
5376 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
5377 (home-page "https://www.eclipse.org/platform")
5378 (synopsis "Eclipse core commands")
5379 (description "This package provides Eclipse core commands in the module
5380 @code{org.eclipse.core.commands}.")
5381 (license license:epl1.0)))
5382
5383 (define-public java-eclipse-text
5384 (package
5385 (name "java-eclipse-text")
5386 (version "3.6.0")
5387 (source (origin
5388 (method url-fetch)
5389 (uri (string-append "https://repo1.maven.org/maven2/"
5390 "org/eclipse/platform/org.eclipse.text/"
5391 version "/org.eclipse.text-"
5392 version "-sources.jar"))
5393 (sha256
5394 (base32
5395 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
5396 (build-system ant-build-system)
5397 (arguments
5398 `(#:tests? #f ; no tests included
5399 #:jar-name "eclipse-text.jar"
5400 #:phases
5401 (modify-phases %standard-phases
5402 ;; When creating a new category we must make sure that the new list
5403 ;; matches List<Position>. By default it seems to be too generic
5404 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
5405 ;; Without this we get this error:
5406 ;;
5407 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
5408 ;; error: method put in interface Map<K,V> cannot be applied to given types;
5409 ;; [javac] fPositions.put(category, new ArrayList<>());
5410 ;; [javac] ^
5411 ;; [javac] required: String,List<Position>
5412 ;; [javac] found: String,ArrayList<Object>
5413 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
5414 ;; to List<Position> by method invocation conversion
5415 ;; [javac] where K,V are type-variables:
5416 ;; [javac] K extends Object declared in interface Map
5417 ;; [javac] V extends Object declared in interface Map
5418 ;;
5419 ;; I don't know if this is a good fix. I suspect it is not, but it
5420 ;; seems to work.
5421 (add-after 'unpack 'fix-compilation-error
5422 (lambda _
5423 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
5424 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
5425 "Positions.put(category, new ArrayList<Position>());"))
5426 #t)))))
5427 (inputs
5428 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5429 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
5430 ("java-icu4j" ,java-icu4j)))
5431 (home-page "http://www.eclipse.org/platform")
5432 (synopsis "Eclipse text library")
5433 (description "Platform Text is part of the Platform UI project and
5434 provides the basic building blocks for text and text editors within Eclipse
5435 and contributes the Eclipse default text editor.")
5436 (license license:epl1.0)))
5437
5438 (define-public java-eclipse-jdt-core
5439 (package
5440 (name "java-eclipse-jdt-core")
5441 (version "3.12.3")
5442 (source (origin
5443 (method url-fetch)
5444 (uri (string-append "https://repo1.maven.org/maven2/"
5445 "org/eclipse/jdt/org.eclipse.jdt.core/"
5446 version "/org.eclipse.jdt.core-"
5447 version "-sources.jar"))
5448 (sha256
5449 (base32
5450 "191xw4lc7mjjkprh4ji5vnpjvr5r4zvbpwkriy4bvsjqrz35vh1j"))))
5451 (build-system ant-build-system)
5452 (arguments
5453 `(#:tests? #f ; no tests included
5454 #:jar-name "eclipse-jdt-core.jar"))
5455 (inputs
5456 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5457 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5458 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5459 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
5460 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5461 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5462 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5463 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5464 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5465 ("java-eclipse-osgi" ,java-eclipse-osgi)
5466 ("java-eclipse-text" ,java-eclipse-text)))
5467 (home-page "https://www.eclipse.org/jdt")
5468 (synopsis "Java development tools core libraries")
5469 (description "This package provides the core libraries of the Eclipse Java
5470 development tools.")
5471 (license license:epl1.0)))
5472
5473 (define-public java-javax-mail
5474 (package
5475 (name "java-javax-mail")
5476 (version "1.5.6")
5477 (source (origin
5478 (method url-fetch)
5479 (uri (string-append "https://repo1.maven.org/maven2/"
5480 "com/sun/mail/javax.mail/"
5481 version "/javax.mail-"
5482 version "-sources.jar"))
5483 (sha256
5484 (base32
5485 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
5486 (build-system ant-build-system)
5487 (arguments
5488 `(#:tests? #f ; no tests
5489 #:jar-name "javax-mail.jar"))
5490 (home-page "https://javamail.java.net")
5491 (synopsis "Reference implementation of the JavaMail API")
5492 (description
5493 "This package provides versions of the JavaMail API implementation, IMAP,
5494 SMTP, and POP3 service providers, some examples, and documentation for the
5495 JavaMail API.")
5496 ;; GPLv2 only with "classpath exception".
5497 (license license:gpl2)))
5498
5499 (define-public java-log4j-api
5500 (package
5501 (name "java-log4j-api")
5502 (version "2.4.1")
5503 (source (origin
5504 (method url-fetch)
5505 (uri (string-append "mirror://apache/logging/log4j/" version
5506 "/apache-log4j-" version "-src.tar.gz"))
5507 (sha256
5508 (base32
5509 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
5510 (build-system ant-build-system)
5511 (arguments
5512 `(#:tests? #f ; tests require unpackaged software
5513 #:jar-name "log4j-api.jar"
5514 #:make-flags
5515 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5516 "/share/java"))
5517 #:phases
5518 (modify-phases %standard-phases
5519 (add-after 'unpack 'enter-dir
5520 (lambda _ (chdir "log4j-api") #t))
5521 ;; FIXME: The tests require additional software that has not been
5522 ;; packaged yet, such as
5523 ;; * org.apache.maven
5524 ;; * org.apache.felix
5525 (add-after 'enter-dir 'delete-tests
5526 (lambda _ (delete-file-recursively "src/test") #t)))))
5527 (inputs
5528 `(("java-osgi-core" ,java-osgi-core)
5529 ("java-hamcrest-core" ,java-hamcrest-core)
5530 ("java-junit" ,java-junit)))
5531 (home-page "http://logging.apache.org/log4j/2.x/")
5532 (synopsis "API module of the Log4j logging framework for Java")
5533 (description
5534 "This package provides the API module of the Log4j logging framework for
5535 Java.")
5536 (license license:asl2.0)))
5537
5538 (define-public java-log4j-core
5539 (package
5540 (inherit java-log4j-api)
5541 (name "java-log4j-core")
5542 (inputs
5543 `(("java-osgi-core" ,java-osgi-core)
5544 ("java-hamcrest-core" ,java-hamcrest-core)
5545 ("java-log4j-api" ,java-log4j-api)
5546 ("java-mail" ,java-mail)
5547 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
5548 ("java-lmax-disruptor" ,java-lmax-disruptor)
5549 ("java-kafka" ,java-kafka-clients)
5550 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
5551 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
5552 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
5553 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
5554 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
5555 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
5556 ("java-commons-compress" ,java-commons-compress)
5557 ("java-commons-csv" ,java-commons-csv)
5558 ("java-jeromq" ,java-jeromq)
5559 ("java-junit" ,java-junit)))
5560 (native-inputs
5561 `(("hamcrest" ,java-hamcrest-all)
5562 ("java-commons-io" ,java-commons-io)
5563 ("java-commons-lang3" ,java-commons-lang3)
5564 ("slf4j" ,java-slf4j-api)))
5565 (arguments
5566 `(#:tests? #f ; tests require more dependencies
5567 #:test-dir "src/test"
5568 #:source-dir "src/main/java"
5569 #:jar-name "log4j-core.jar"
5570 #:jdk ,icedtea-8
5571 #:make-flags
5572 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
5573 "/share/java"))
5574 #:phases
5575 (modify-phases %standard-phases
5576 (add-after 'unpack 'enter-dir
5577 (lambda _ (chdir "log4j-core") #t)))))
5578 (synopsis "Core component of the Log4j framework")
5579 (description "This package provides the core component of the Log4j
5580 logging framework for Java.")))
5581
5582 (define-public java-log4j-1.2-api
5583 (package
5584 (inherit java-log4j-api)
5585 (name "java-log4j-1.2-api")
5586 (arguments
5587 `(#:jar-name "java-log4j-1.2-api.jar"
5588 #:source-dir "log4j-1.2-api/src/main/java"
5589 #:jdk ,icedtea-8
5590 ;; Tests require maven-model (and other maven subprojects), which is a
5591 ;; cyclic dependency.
5592 #:tests? #f))
5593 (inputs
5594 `(("log4j-api" ,java-log4j-api)
5595 ("log4j-core" ,java-log4j-core)
5596 ("osgi-core" ,java-osgi-core)
5597 ("eclipse-osgi" ,java-eclipse-osgi)
5598 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
5599
5600 (define-public java-commons-cli
5601 (package
5602 (name "java-commons-cli")
5603 (version "1.4")
5604 (source (origin
5605 (method url-fetch)
5606 (uri (string-append "mirror://apache/commons/cli/source/"
5607 "commons-cli-" version "-src.tar.gz"))
5608 (sha256
5609 (base32
5610 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
5611 (build-system ant-build-system)
5612 ;; TODO: javadoc
5613 (arguments
5614 `(#:jar-name "commons-cli.jar"))
5615 (native-inputs
5616 `(("java-junit" ,java-junit)
5617 ("java-hamcrest-core" ,java-hamcrest-core)))
5618 (home-page "http://commons.apache.org/cli/")
5619 (synopsis "Command line arguments and options parsing library")
5620 (description "The Apache Commons CLI library provides an API for parsing
5621 command line options passed to programs. It is also able to print help
5622 messages detailing the options available for a command line tool.
5623
5624 Commons CLI supports different types of options:
5625
5626 @itemize
5627 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
5628 @item GNU like long options (ie. du --human-readable --max-depth=1)
5629 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
5630 @item Short options with value attached (ie. gcc -O2 foo.c)
5631 @item long options with single hyphen (ie. ant -projecthelp)
5632 @end itemize
5633
5634 This is a part of the Apache Commons Project.")
5635 (license license:asl2.0)))
5636
5637 (define-public java-commons-codec
5638 (package
5639 (name "java-commons-codec")
5640 (version "1.10")
5641 (source (origin
5642 (method url-fetch)
5643 (uri (string-append "mirror://apache/commons/codec/source/"
5644 "commons-codec-" version "-src.tar.gz"))
5645 (sha256
5646 (base32
5647 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
5648 (build-system ant-build-system)
5649 (outputs '("out" "doc"))
5650 (arguments
5651 `(#:test-target "test"
5652 #:make-flags
5653 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5654 (junit (assoc-ref %build-inputs "java-junit")))
5655 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5656 (string-append "-Dhamcrest.jar=" hamcrest
5657 "/share/java/hamcrest-core.jar")
5658 ;; Do not append version to jar.
5659 "-Dfinal.name=commons-codec"))
5660 #:phases
5661 (modify-phases %standard-phases
5662 (add-after 'build 'build-javadoc ant-build-javadoc)
5663 (replace 'install (install-jars "dist"))
5664 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5665 (native-inputs
5666 `(("java-junit" ,java-junit)
5667 ("java-hamcrest-core" ,java-hamcrest-core)))
5668 (home-page "http://commons.apache.org/codec/")
5669 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
5670 (description "The codec package contains simple encoder and decoders for
5671 various formats such as Base64 and Hexadecimal. In addition to these widely
5672 used encoders and decoders, the codec package also maintains a collection of
5673 phonetic encoding utilities.
5674
5675 This is a part of the Apache Commons Project.")
5676 (license license:asl2.0)))
5677
5678 (define-public java-commons-daemon
5679 (package
5680 (name "java-commons-daemon")
5681 (version "1.0.15")
5682 (source (origin
5683 (method url-fetch)
5684 (uri (string-append "mirror://apache/commons/daemon/source/"
5685 "commons-daemon-" version "-src.tar.gz"))
5686 (sha256
5687 (base32
5688 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
5689 (build-system ant-build-system)
5690 (arguments
5691 `(#:test-target "test"
5692 #:phases
5693 (modify-phases %standard-phases
5694 (add-after 'build 'build-javadoc ant-build-javadoc)
5695 (replace 'install (install-jars "dist"))
5696 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
5697 (native-inputs
5698 `(("java-junit" ,java-junit)))
5699 (home-page "http://commons.apache.org/daemon/")
5700 (synopsis "Library to launch Java applications as daemons")
5701 (description "The Daemon package from Apache Commons can be used to
5702 implement Java applications which can be launched as daemons. For example the
5703 program will be notified about a shutdown so that it can perform cleanup tasks
5704 before its process of execution is destroyed by the operation system.
5705
5706 This package contains the Java library. You will also need the actual binary
5707 for your architecture which is provided by the jsvc package.
5708
5709 This is a part of the Apache Commons Project.")
5710 (license license:asl2.0)))
5711
5712 (define-public java-javaewah
5713 (package
5714 (name "java-javaewah")
5715 (version "1.1.6")
5716 (source (origin
5717 (method url-fetch)
5718 (uri (string-append "https://github.com/lemire/javaewah/"
5719 "archive/JavaEWAH-" version ".tar.gz"))
5720 (sha256
5721 (base32
5722 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
5723 (build-system ant-build-system)
5724 (arguments `(#:jar-name "javaewah.jar"))
5725 (inputs
5726 `(("java-junit" ,java-junit)
5727 ("java-hamcrest-core" ,java-hamcrest-core)))
5728 (home-page "https://github.com/lemire/javaewah")
5729 (synopsis "Compressed alternative to the Java @code{BitSet} class")
5730 (description "This is a word-aligned compressed variant of the Java
5731 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
5732 compression scheme. It can be used to implement bitmap indexes.
5733
5734 The goal of word-aligned compression is not to achieve the best compression,
5735 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
5736 cycles, maybe at the expense of storage. However, the EWAH scheme is always
5737 more efficient storage-wise than an uncompressed bitmap (as implemented in the
5738 @code{BitSet} class by Sun).")
5739 ;; GPL2.0 derivates are explicitly allowed.
5740 (license license:asl2.0)))
5741
5742 (define-public java-slf4j-api
5743 (package
5744 (name "java-slf4j-api")
5745 (version "1.7.25")
5746 (source (origin
5747 (method url-fetch)
5748 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
5749 version ".tar.gz"))
5750 (sha256
5751 (base32
5752 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
5753 (modules '((guix build utils)))
5754 ;; Delete bundled jars.
5755 (snippet
5756 '(begin
5757 (for-each delete-file (find-files "." "\\.jar$"))
5758 #t))))
5759 (build-system ant-build-system)
5760 (arguments
5761 `(#:jar-name "slf4j-api.jar"
5762 #:source-dir "slf4j-api/src/main"
5763 #:test-dir "slf4j-api/src/test"
5764 #:phases
5765 (modify-phases %standard-phases
5766 (add-after 'build 'regenerate-jar
5767 (lambda _
5768 ;; pom.xml ignores these files in the jar creation process. If we don't,
5769 ;; we get the error "This code should have never made it into slf4j-api.jar"
5770 (delete-file-recursively "build/classes/org/slf4j/impl")
5771 (zero? (system* "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
5772 "build/classes" "."))))
5773 (add-before 'check 'dont-test-abstract-classes
5774 (lambda _
5775 ;; abstract classes are not meant to be run with junit
5776 (substitute* "build.xml"
5777 (("<include name=\"\\*\\*/\\*Test.java\" />")
5778 (string-append "<include name=\"**/*Test.java\" />"
5779 "<exclude name=\"**/MultithreadedInitializationTest"
5780 ".java\" />"))))))))
5781 (inputs
5782 `(("java-junit" ,java-junit)
5783 ("java-hamcrest-core" ,java-hamcrest-core)))
5784 (home-page "https://www.slf4j.org/")
5785 (synopsis "Simple logging facade for Java")
5786 (description "The Simple Logging Facade for Java (SLF4J) serves as a
5787 simple facade or abstraction for various logging
5788 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
5789 allowing the end user to plug in the desired logging framework at deployment
5790 time.")
5791 (license license:expat)))
5792
5793 (define java-slf4j-api-bootstrap
5794 (package
5795 (inherit java-slf4j-api)
5796 (name "java-slf4j-api-bootstrap")
5797 (inputs `())
5798 (arguments
5799 (substitute-keyword-arguments (package-arguments java-slf4j-api)
5800 ((#:tests? _ #f) #f)))))
5801
5802 (define-public java-slf4j-simple
5803 (package
5804 (name "java-slf4j-simple")
5805 (version "1.7.25")
5806 (source (package-source java-slf4j-api))
5807 (build-system ant-build-system)
5808 (arguments
5809 `(#:jar-name "slf4j-simple.jar"
5810 #:source-dir "slf4j-simple/src/main"
5811 #:test-dir "slf4j-simple/src/test"
5812 #:phases
5813 (modify-phases %standard-phases
5814 ;; The tests need some test classes from slf4j-api
5815 (add-before 'check 'build-slf4j-api-test-helpers
5816 (lambda _
5817 ;; Add current dir to CLASSPATH ...
5818 (setenv "CLASSPATH"
5819 (string-append (getcwd) ":" (getenv "CLASSPATH")))
5820 ;; ... and build test helper classes here:
5821 (zero?
5822 (apply system*
5823 `("javac" "-d" "."
5824 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))))))
5825 (inputs
5826 `(("java-junit" ,java-junit)
5827 ("java-hamcrest-core" ,java-hamcrest-core)
5828 ("java-slf4j-api" ,java-slf4j-api)))
5829 (home-page "https://www.slf4j.org/")
5830 (synopsis "Simple implementation of simple logging facade for Java")
5831 (description "SLF4J binding for the Simple implementation, which outputs
5832 all events to System.err. Only messages of level INFO and higher are
5833 printed.")
5834 (license license:expat)))
5835
5836 (define-public antlr2
5837 (package
5838 (name "antlr2")
5839 (version "2.7.7")
5840 (source (origin
5841 (method url-fetch)
5842 (uri (string-append "http://www.antlr2.org/download/antlr-"
5843 version ".tar.gz"))
5844 (sha256
5845 (base32
5846 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
5847 (modules '((guix build utils)))
5848 (snippet
5849 '(begin
5850 (delete-file "antlr.jar")
5851 (substitute* "lib/cpp/antlr/CharScanner.hpp"
5852 (("#include <map>")
5853 (string-append
5854 "#include <map>\n"
5855 "#define EOF (-1)\n"
5856 "#include <strings.h>")))
5857 (substitute* "configure"
5858 (("/bin/sh") "sh"))
5859 #t))))
5860 (build-system gnu-build-system)
5861 (arguments
5862 `(#:tests? #f ; no test target
5863 #:imported-modules ((guix build ant-build-system)
5864 (guix build syscalls)
5865 ,@%gnu-build-system-modules)
5866 #:modules (((guix build ant-build-system) #:prefix ant:)
5867 (guix build gnu-build-system)
5868 (guix build utils))
5869 #:phases
5870 (modify-phases %standard-phases
5871 (add-after 'install 'strip-jar-timestamps
5872 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
5873 (add-after 'configure 'fix-bin-ls
5874 (lambda _
5875 (substitute* (find-files "." "Makefile")
5876 (("/bin/ls") "ls"))
5877 #t)))))
5878 (native-inputs
5879 `(("which" ,which)
5880 ("zip" ,zip)
5881 ("java" ,icedtea "jdk")))
5882 (inputs
5883 `(("java" ,icedtea)))
5884 (home-page "http://www.antlr2.org")
5885 (synopsis "Framework for constructing recognizers, compilers, and translators")
5886 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
5887 is a language tool that provides a framework for constructing recognizers,
5888 compilers, and translators from grammatical descriptions containing Java, C#,
5889 C++, or Python actions. ANTLR provides excellent support for tree construction,
5890 tree walking, and translation.")
5891 (license license:public-domain)))
5892
5893 (define-public java-stringtemplate-3
5894 (package
5895 (name "java-stringtemplate")
5896 (version "3.2.1")
5897 (source (origin
5898 (method url-fetch)
5899 (uri (string-append "https://github.com/antlr/website-st4/raw/"
5900 "gh-pages/download/stringtemplate-"
5901 version ".tar.gz"))
5902 (sha256
5903 (base32
5904 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
5905 (build-system ant-build-system)
5906 (arguments
5907 `(#:jar-name (string-append ,name "-" ,version ".jar")
5908 #:test-dir "test"
5909 #:modules ((guix build ant-build-system)
5910 (guix build utils)
5911 (srfi srfi-1))
5912 #:phases
5913 (modify-phases %standard-phases
5914 (add-before 'check 'fix-tests
5915 (lambda _
5916 (substitute* "build.xml"
5917 (("\\$\\{test.home\\}/java")
5918 "${test.home}/org"))
5919 #t))
5920 (add-before 'build 'generate-grammar
5921 (lambda _
5922 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
5923 (every (lambda (file)
5924 (format #t "~a\n" file)
5925 (zero? (system* "antlr" file)))
5926 '("template.g" "angle.bracket.template.g" "action.g"
5927 "eval.g" "group.g" "interface.g"))))))))
5928 (native-inputs
5929 `(("antlr" ,antlr2)
5930 ("java-junit" ,java-junit)))
5931 (home-page "http://www.stringtemplate.org")
5932 (synopsis "Template engine to generate formatted text output")
5933 (description "StringTemplate is a java template engine (with ports for C#,
5934 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
5935 or any other formatted text output. StringTemplate is particularly good at
5936 code generators, multiple site skins, and internationalization / localization.
5937 StringTemplate also powers ANTLR.")
5938 (license license:bsd-3)))
5939
5940 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
5941 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
5942 ;; files and uses antlr3 at runtime. The latest version requires a recent version
5943 ;; of antlr3 at runtime.
5944 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
5945 ;; This version of ST4 is sufficient for the latest antlr3.
5946 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
5947 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
5948 ;; against the latest ST4.
5949 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
5950 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
5951 ;; only grammar files with the antlr2 syntax.
5952 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
5953
5954 (define-public java-stringtemplate
5955 (package (inherit java-stringtemplate-3)
5956 (name "java-stringtemplate")
5957 (version "4.0.8")
5958 (source (origin
5959 (method url-fetch)
5960 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
5961 version ".tar.gz"))
5962 (file-name (string-append name "-" version ".tar.gz"))
5963 (sha256
5964 (base32
5965 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
5966 (build-system ant-build-system)
5967 (arguments
5968 `(#:jar-name (string-append ,name "-" ,version ".jar")
5969 #:tests? #f ; FIXME: tests fail for unknown reasons
5970 #:test-dir "test"
5971 #:modules ((guix build ant-build-system)
5972 (guix build utils)
5973 (srfi srfi-1))
5974 #:phases
5975 (modify-phases %standard-phases
5976 (add-before 'check 'fix-test-target
5977 (lambda _
5978 (substitute* "build.xml"
5979 (("\\$\\{test.home\\}/java") "${test.home}/")
5980 (("\\*Test.java") "Test*.java"))
5981 #t))
5982 (add-before 'build 'generate-grammar
5983 (lambda _
5984 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
5985 (every (lambda (file)
5986 (format #t "~a\n" file)
5987 (zero? (system* "antlr3" file)))
5988 '("STParser.g" "Group.g" "CodeGenerator.g"))))))))
5989 (inputs
5990 `(("antlr3" ,antlr3-bootstrap)
5991 ("antlr2" ,antlr2)
5992 ("java-stringtemplate" ,java-stringtemplate-3)
5993 ("java-junit" ,java-junit)))))
5994
5995 (define java-stringtemplate-4.0.6
5996 (package (inherit java-stringtemplate)
5997 (name "java-stringtemplate")
5998 (version "4.0.6")
5999 (source (origin
6000 (method url-fetch)
6001 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6002 version ".tar.gz"))
6003 (file-name (string-append name "-" version ".tar.gz"))
6004 (sha256
6005 (base32
6006 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6007 (inputs
6008 `(("antlr3" ,antlr3-3.3)
6009 ("antlr2" ,antlr2)
6010 ("java-stringtemplate" ,java-stringtemplate-3)))))
6011
6012 (define-public antlr3
6013 (package
6014 (name "antlr3")
6015 (version "3.5.2")
6016 (source (origin
6017 (method url-fetch)
6018 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6019 version ".tar.gz"))
6020 (file-name (string-append name "-" version ".tar.gz"))
6021 (sha256
6022 (base32
6023 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6024 (build-system ant-build-system)
6025 (arguments
6026 `(#:jar-name (string-append ,name "-" ,version ".jar")
6027 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6028 #:tests? #f
6029 #:phases
6030 (modify-phases %standard-phases
6031 (add-after 'install 'bin-install
6032 (lambda* (#:key inputs outputs #:allow-other-keys)
6033 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6034 (bin (string-append (assoc-ref outputs "out") "/bin")))
6035 (mkdir-p bin)
6036 (with-output-to-file (string-append bin "/antlr3")
6037 (lambda _
6038 (display
6039 (string-append "#!" (which "sh") "\n"
6040 "java -cp " jar "/" ,name "-" ,version ".jar:"
6041 (string-concatenate
6042 (find-files (assoc-ref inputs "stringtemplate")
6043 ".*\\.jar"))
6044 ":"
6045 (string-concatenate
6046 (find-files (assoc-ref inputs "stringtemplate4")
6047 ".*\\.jar"))
6048 ":"
6049 (string-concatenate
6050 (find-files (string-append
6051 (assoc-ref inputs "antlr")
6052 "/lib")
6053 ".*\\.jar"))
6054 " org.antlr.Tool $*"))))
6055 (chmod (string-append bin "/antlr3") #o755))))
6056 (add-before 'build 'generate-grammar
6057 (lambda _
6058 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6059 (for-each (lambda (file)
6060 (display file)
6061 (newline)
6062 (system* "antlr3" file))
6063 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6064 "AssignTokenTypesWalker.g"
6065 "ActionTranslator.g" "TreeToNFAConverter.g"
6066 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6067 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6068 (substitute* "ANTLRParser.java"
6069 (("public Object getTree") "public GrammarAST getTree"))
6070 (substitute* "ANTLRv3Parser.java"
6071 (("public Object getTree") "public CommonTree getTree"))
6072 (chdir "../../../../../java")
6073 (system* "antlr" "-o" "org/antlr/tool"
6074 "org/antlr/tool/serialize.g")
6075 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6076 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6077 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6078 (substitute* "org/antlr/tool/ErrorManager.java"
6079 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6080 (chdir "../../../..")))
6081 (add-before 'build 'fix-build-xml
6082 (lambda _
6083 (substitute* "build.xml"
6084 (("<exec") "<copy todir=\"${classes.dir}\">
6085 <fileset dir=\"tool/src/main/resources\">
6086 <include name=\"**/*.stg\"/>
6087 <include name=\"**/*.st\"/>
6088 <include name=\"**/*.sti\"/>
6089 <include name=\"**/STLexer.tokens\"/>
6090 </fileset>
6091 </copy><exec")))))))
6092 (native-inputs
6093 `(("antlr" ,antlr2)
6094 ("antlr3" ,antlr3-bootstrap)))
6095 (inputs
6096 `(("junit" ,java-junit)
6097 ("stringtemplate" ,java-stringtemplate-3)
6098 ("stringtemplate4" ,java-stringtemplate)))
6099 (propagated-inputs
6100 `(("stringtemplate" ,java-stringtemplate-3)
6101 ("antlr" ,antlr2)
6102 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6103 (home-page "http://www.antlr3.org")
6104 (synopsis "Framework for constructing recognizers, compilers, and translators")
6105 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6106 is a language tool that provides a framework for constructing recognizers,
6107 compilers, and translators from grammatical descriptions containing Java, C#,
6108 C++, or Python actions. ANTLR provides excellent support for tree construction,
6109 tree walking, and translation.")
6110 (license license:bsd-3)))
6111
6112 (define antlr3-bootstrap
6113 (package
6114 (inherit antlr3)
6115 (name "antlr3-bootstrap")
6116 (native-inputs
6117 `(("antlr" ,antlr2)
6118 ("antlr3" ,antlr3-3.3)))
6119 (inputs
6120 `(("junit" ,java-junit)))))
6121
6122 (define antlr3-3.3
6123 (package
6124 (inherit antlr3)
6125 (name "antlr3")
6126 (version "3.3")
6127 (source (origin
6128 (method url-fetch)
6129 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6130 "gh-pages/download/antlr-"
6131 version ".tar.gz"))
6132 (sha256
6133 (base32
6134 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6135 (patches
6136 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6137 (arguments
6138 `(#:jar-name (string-append ,name "-" ,version ".jar")
6139 #:source-dir (string-join '("tool/src/main/java"
6140 "runtime/Java/src/main/java"
6141 "tool/src/main/antlr2"
6142 "tool/src/main/antlr3")
6143 ":")
6144 #:tests? #f ; FIXME: tests seem to require maven plugin
6145 #:modules ((guix build ant-build-system)
6146 (guix build utils)
6147 (srfi srfi-1))
6148 #:phases
6149 (modify-phases %standard-phases
6150 (add-after 'install 'bin-install
6151 (lambda* (#:key inputs outputs #:allow-other-keys)
6152 (let* ((out (assoc-ref outputs "out"))
6153 (jar (string-append out "/share/java"))
6154 (bin (string-append out "/bin")))
6155 (mkdir-p bin)
6156 (with-output-to-file (string-append bin "/antlr3")
6157 (lambda _
6158 (display
6159 (string-append
6160 "#!" (which "sh") "\n"
6161 "java -cp " jar "/antlr3-3.3.jar:"
6162 (string-join
6163 (append (find-files (assoc-ref inputs "java-stringtemplate")
6164 ".*\\.jar$")
6165 (find-files (string-append (assoc-ref inputs "antlr")
6166 "/lib")
6167 ".*\\.jar$"))
6168 ":")
6169 " org.antlr.Tool $*"))))
6170 (chmod (string-append bin "/antlr3") #o755)
6171 #t)))
6172 (add-before 'build 'generate-grammar
6173 (lambda _
6174 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6175 (("import org.antlr.grammar.v2.\\*;")
6176 "import org.antlr.grammar.v2.*;\n
6177 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6178 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6179 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6180 (and
6181 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6182 (every (lambda (file)
6183 (format #t "~a\n" file)
6184 (zero? (system* "antlr" file)))
6185 '("antlr.g" "antlr.print.g" "assign.types.g"
6186 "buildnfa.g" "codegen.g" "define.g")))
6187 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6188 (every (lambda (file)
6189 (format #t "~a\n" file)
6190 (zero? (system* "antlr3" file)))
6191 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6192 "ANTLRv3Tree.g"))))))
6193 (add-before 'build 'fix-build-xml
6194 (lambda _
6195 (substitute* "build.xml"
6196 (("<exec") "<copy todir=\"${classes.dir}\">
6197 <fileset dir=\"tool/src/main/resources\">
6198 <include name=\"**/*.stg\"/>
6199 <include name=\"**/*.st\"/>
6200 <include name=\"**/*.sti\"/>
6201 <include name=\"**/STLexer.tokens\"/>
6202 </fileset>
6203 </copy><exec"))
6204 #t)))))
6205 (native-inputs
6206 `(("antlr" ,antlr2)
6207 ("antlr3" ,antlr3-3.1)))
6208 (inputs
6209 `(("junit" ,java-junit)))
6210 (propagated-inputs
6211 `(("java-stringtemplate" ,java-stringtemplate-3)
6212 ("antlr" ,antlr2)
6213 ("antlr3" ,antlr3-3.1)))))
6214
6215 (define antlr3-3.1
6216 (package
6217 (inherit antlr3)
6218 (version "3.1")
6219 (source (origin
6220 (method url-fetch)
6221 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6222 "gh-pages/download/antlr-"
6223 version ".tar.gz"))
6224 (sha256
6225 (base32
6226 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6227 (patches
6228 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6229 (arguments
6230 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6231 #:source-dir "src:runtime/Java/src"
6232 #:tests? #f
6233 #:phases
6234 (modify-phases %standard-phases
6235 (add-after 'install 'bin-install
6236 (lambda* (#:key inputs outputs #:allow-other-keys)
6237 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6238 (bin (string-append (assoc-ref outputs "out") "/bin")))
6239 (mkdir-p bin)
6240 (with-output-to-file (string-append bin "/antlr3")
6241 (lambda _
6242 (display
6243 (string-append "#!" (which "sh") "\n"
6244 "java -cp " jar "/antlr3-3.1.jar:"
6245 (string-concatenate
6246 (find-files (assoc-ref inputs "stringtemplate")
6247 ".*\\.jar"))
6248 ":"
6249 (string-concatenate
6250 (find-files (string-append
6251 (assoc-ref inputs "antlr")
6252 "/lib")
6253 ".*\\.jar"))
6254 " org.antlr.Tool $*"))))
6255 (chmod (string-append bin "/antlr3") #o755))))
6256 (add-before 'build 'generate-grammar
6257 (lambda _
6258 (let ((dir "src/org/antlr/tool/"))
6259 (for-each (lambda (file)
6260 (display file)
6261 (newline)
6262 (invoke "antlr" "-o" dir (string-append dir file)))
6263 '("antlr.g" "antlr.print.g" "assign.types.g"
6264 "buildnfa.g" "define.g")))
6265 (format #t "codegen.g\n")
6266 (invoke "antlr" "-o" "src/org/antlr/codegen"
6267 "src/org/antlr/codegen/codegen.g")
6268 #t))
6269 (add-before 'build 'fix-build-xml
6270 (lambda _
6271 (substitute* "build.xml"
6272 (("<exec") "<copy todir=\"${classes.dir}\">
6273 <fileset dir=\"src\">
6274 <include name=\"**/*.stg\"/>
6275 <include name=\"**/*.st\"/>
6276 <include name=\"**/*.sti\"/>
6277 <include name=\"**/STLexer.tokens\"/>
6278 </fileset>
6279 </copy><exec")))))))
6280 (native-inputs
6281 `(("antlr" ,antlr2)))
6282 (inputs
6283 `(("junit" ,java-junit)))
6284 (propagated-inputs
6285 `(("stringtemplate" ,java-stringtemplate-3)))))
6286
6287 (define-public java-commons-cli-1.2
6288 ;; This is a bootstrap dependency for Maven2.
6289 (package
6290 (inherit java-commons-cli)
6291 (version "1.2")
6292 (source (origin
6293 (method url-fetch)
6294 (uri (string-append "mirror://apache/commons/cli/source/"
6295 "commons-cli-" version "-src.tar.gz"))
6296 (sha256
6297 (base32
6298 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
6299 (arguments
6300 `(#:jar-name "commons-cli.jar"
6301 #:phases
6302 (modify-phases %standard-phases
6303 (add-before 'check 'fix-build-xml
6304 (lambda* (#:key inputs #:allow-other-keys)
6305 (substitute* "build.xml"
6306 (("dir=\"\\$\\{test.home\\}/java\"")
6307 "dir=\"${test.home}\""))
6308 #t)))))
6309 (native-inputs
6310 `(("java-junit" ,java-junit)))))
6311
6312 (define-public java-microemulator-cldc
6313 (package
6314 (name "java-microemulator-cldc")
6315 (version "2.0.4")
6316 (source (origin
6317 (method url-fetch)
6318 (uri (string-append "https://github.com/barteo/microemu/archive/"
6319 "microemulator_"
6320 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
6321 version)
6322 ".tar.gz"))
6323 (file-name (string-append name "-" version ".tar.gz"))
6324 (sha256
6325 (base32
6326 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
6327 (build-system ant-build-system)
6328 (arguments
6329 `(#:jar-name "microemulator-cldc.jar"
6330 #:source-dir "microemu-cldc/src/main/java"
6331 #:tests? #f)); Requires even older software
6332 (home-page "https://github.com/barteo/microemu")
6333 (synopsis "J2ME CLDC emulator")
6334 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
6335 Emulator. It allows to demonstrate MIDlet based applications in web browser
6336 applet and can be run as a standalone java application.")
6337 (license (list license:asl2.0
6338 ;; or altenatively:
6339 license:lgpl2.1+))))
6340
6341 (define-public java-datanucleus-javax-persistence
6342 (package
6343 (name "java-datanucleus-javax-persistence")
6344 (version "2.2.0")
6345 (source (origin
6346 (method url-fetch)
6347 (uri (string-append "https://github.com/datanucleus/"
6348 "javax.persistence/archive/javax.persistence-"
6349 version "-release.tar.gz"))
6350 (sha256
6351 (base32
6352 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
6353 (build-system ant-build-system)
6354 (arguments
6355 `(#:jar-name "java-datanucleus-javax-persistence.jar"
6356 #:jdk ,icedtea-8
6357 #:source-dir "src/main/java"
6358 #:tests? #f)); no tests
6359 (home-page "https://github.com/datanucleus/javax.persistence")
6360 (synopsis "JPA API")
6361 (description "This package contains a clean definition of JPA API intended
6362 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
6363 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
6364 used to generate this API.")
6365 (license (list license:edl1.0 license:epl1.0))))
6366
6367 (define-public java-osgi-cmpn
6368 (package
6369 (name "java-osgi-cmpn")
6370 (version "6.0.0")
6371 (source (origin
6372 (method url-fetch)
6373 (uri (string-append "http://central.maven.org/maven2/"
6374 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
6375 version "-sources.jar"))
6376 (sha256
6377 (base32
6378 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
6379 (build-system ant-build-system)
6380 (arguments
6381 `(#:jar-name "osgi-cmpn.jar"
6382 #:tests? #f)); no tests
6383 (inputs
6384 `(("annotation" ,java-osgi-annotation)
6385 ("core" ,java-osgi-core)
6386 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6387 ("microemulator" ,java-microemulator-cldc)
6388 ("servlet" ,java-classpathx-servletapi)))
6389 (home-page "https://www.osgi.org")
6390 (synopsis "Compendium specification module of OSGi framework")
6391 (description
6392 "OSGi, for Open Services Gateway initiative framework, is a module system
6393 and service platform for the Java programming language. This package contains
6394 the compendium specification module, providing interfaces and classes for use
6395 in compiling bundles.")
6396 (license license:asl2.0)))
6397
6398 (define-public java-osgi-service-component-annotations
6399 (package
6400 (name "java-osgi-service-component-annotations")
6401 (version "1.3.0")
6402 (source (origin
6403 (method url-fetch)
6404 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6405 "org.osgi.service.component.annotations/"
6406 version "/org.osgi.service.component.annotations-"
6407 version "-sources.jar"))
6408 (sha256
6409 (base32
6410 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
6411 (build-system ant-build-system)
6412 (arguments
6413 `(#:jar-name "osgi-service-component-annotations.jar"
6414 #:tests? #f)); no tests
6415 (inputs
6416 `(("annotation" ,java-osgi-annotation)))
6417 (home-page "https://www.osgi.org")
6418 (synopsis "Support annotations for osgi-service-component")
6419 (description
6420 "OSGi, for Open Services Gateway initiative framework, is a module system
6421 and service platform for the Java programming language. This package contains
6422 the support annotations for osgi-service-component.")
6423 (license license:asl2.0)))
6424
6425 (define-public java-osgi-dto
6426 (package
6427 (name "java-osgi-dto")
6428 (version "1.0.0")
6429 (source (origin
6430 (method url-fetch)
6431 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6432 "org.osgi.dto/" version "/org.osgi.dto-"
6433 version "-sources.jar"))
6434 (sha256
6435 (base32
6436 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
6437 (build-system ant-build-system)
6438 (arguments
6439 `(#:jar-name "osgi-dto.jar"
6440 #:tests? #f)); no tests
6441 (inputs
6442 `(("annotation" ,java-osgi-annotation)))
6443 (home-page "https://www.osgi.org")
6444 (synopsis "Data Transfer Objects")
6445 (description
6446 "OSGi, for Open Services Gateway initiative framework, is a module system
6447 and service platform for the Java programming language. This package contains
6448 the Data Transfer Objects. It is easily serializable having only public fields
6449 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
6450 Map and array aggregates may also be used. The aggregates must only hold
6451 objects of the listed types or aggregates.")
6452 (license license:asl2.0)))
6453
6454 (define-public java-osgi-resource
6455 (package
6456 (name "java-osgi-resource")
6457 (version "1.0.0")
6458 (source (origin
6459 (method url-fetch)
6460 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6461 "org.osgi.resource/"
6462 version "/org.osgi.resource-"
6463 version "-sources.jar"))
6464 (sha256
6465 (base32
6466 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
6467 (build-system ant-build-system)
6468 (arguments
6469 `(#:jar-name "osgi-resource.jar"
6470 #:tests? #f)); no tests
6471 (inputs
6472 `(("annotation" ,java-osgi-annotation)
6473 ("dto" ,java-osgi-dto)))
6474 (home-page "https://www.osgi.org")
6475 (synopsis "OSGI Resource")
6476 (description
6477 "OSGi, for Open Services Gateway initiative framework, is a module system
6478 and service platform for the Java programming language. This package contains
6479 the definition of common types in osgi packages.")
6480 (license license:asl2.0)))
6481
6482 (define-public java-osgi-namespace-contract
6483 (package
6484 (name "java-osgi-namespace-contract")
6485 (version "1.0.0")
6486 (source (origin
6487 (method url-fetch)
6488 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6489 "org.osgi.namespace.contract/"
6490 version "/org.osgi.namespace.contract-"
6491 version "-sources.jar"))
6492 (sha256
6493 (base32
6494 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
6495 (build-system ant-build-system)
6496 (inputs
6497 `(("resource" ,java-osgi-resource)
6498 ("annotation" ,java-osgi-annotation)))
6499 (arguments
6500 `(#:jar-name "osgi-namespace-contract.jar"
6501 #:tests? #f)); no tests
6502 (home-page "https://www.osgi.org")
6503 (synopsis "Contract Capability and Requirement Namespace")
6504 (description
6505 "OSGi, for Open Services Gateway initiative framework, is a module system
6506 and service platform for the Java programming language. This package contains
6507 the names for the attributes and directives for a namespace with contracts.")
6508 (license license:asl2.0)))
6509
6510 (define-public java-osgi-namespace-extender
6511 (package
6512 (name "java-osgi-namespace-extender")
6513 (version "1.0.1")
6514 (source (origin
6515 (method url-fetch)
6516 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6517 "org.osgi.namespace.extender/"
6518 version "/org.osgi.namespace.extender-"
6519 version "-sources.jar"))
6520 (sha256
6521 (base32
6522 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
6523 (build-system ant-build-system)
6524 (inputs
6525 `(("resource" ,java-osgi-resource)
6526 ("annotation" ,java-osgi-annotation)))
6527 (arguments
6528 `(#:jar-name "osgi-namespace-extendent.jar"
6529 #:tests? #f)); no tests
6530 (home-page "https://www.osgi.org")
6531 (synopsis "Extender Capability and Requirement Namespace")
6532 (description
6533 "OSGi, for Open Services Gateway initiative framework, is a module system
6534 and service platform for the Java programming language. This package contains
6535 the names for the attributes and directives for an extender namespace.")
6536 (license license:asl2.0)))
6537
6538 (define-public java-osgi-namespace-service
6539 (package
6540 (name "java-osgi-namespace-service")
6541 (version "1.0.0")
6542 (source (origin
6543 (method url-fetch)
6544 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6545 "org.osgi.namespace.service/"
6546 version "/org.osgi.namespace.service-"
6547 version "-sources.jar"))
6548 (sha256
6549 (base32
6550 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
6551 (build-system ant-build-system)
6552 (inputs
6553 `(("resource" ,java-osgi-resource)
6554 ("annotation" ,java-osgi-annotation)))
6555 (arguments
6556 `(#:jar-name "osgi-namespace-service.jar"
6557 #:tests? #f)); no tests
6558 (home-page "https://www.osgi.org")
6559 (synopsis "Service Capability and Requirement Namespace")
6560 (description
6561 "OSGi, for Open Services Gateway initiative framework, is a module system
6562 and service platform for the Java programming language. This package contains
6563 the names for the attributes and directives for a service namespace.")
6564 (license license:asl2.0)))
6565
6566 (define-public java-osgi-util-function
6567 (package
6568 (name "java-osgi-util-function")
6569 (version "1.0.0")
6570 (source (origin
6571 (method url-fetch)
6572 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6573 "org.osgi.util.function/"
6574 version "/org.osgi.util.function-"
6575 version "-sources.jar"))
6576 (sha256
6577 (base32
6578 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
6579 (build-system ant-build-system)
6580 (arguments
6581 `(#:jar-name "osgi-util-function.jar"
6582 #:tests? #f)); no tests
6583 (inputs
6584 `(("annotation" ,java-osgi-annotation)))
6585 (home-page "https://www.osgi.org")
6586 (synopsis "OSGI Util Function")
6587 (description
6588 "OSGi, for Open Services Gateway initiative framework, is a module system
6589 and service platform for the Java programming language. This package contains
6590 an interface for a function that accepts a single argument and produces a result.")
6591 (license license:asl2.0)))
6592
6593 (define-public java-osgi-util-promise
6594 (package
6595 (name "java-osgi-util-promise")
6596 (version "1.0.0")
6597 (source (origin
6598 (method url-fetch)
6599 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6600 "org.osgi.util.promise/"
6601 version "/org.osgi.util.promise-"
6602 version "-sources.jar"))
6603 (sha256
6604 (base32
6605 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
6606 (build-system ant-build-system)
6607 (arguments
6608 `(#:jar-name "osgi-util-promise.jar"
6609 #:tests? #f)); no tests
6610 (inputs
6611 `(("annotation" ,java-osgi-annotation)
6612 ("function" ,java-osgi-util-function)))
6613 (home-page "https://www.osgi.org")
6614 (synopsis "Promise of a value")
6615 (description
6616 "OSGi, for Open Services Gateway initiative framework, is a module system
6617 and service platform for the Java programming language. This package contains
6618 an interface and utilitary classes for promises. A Promise represents a future
6619 value. It handles the interactions for asynchronous processing.")
6620 (license license:asl2.0)))
6621
6622 (define-public java-osgi-service-metatype-annotations
6623 (package
6624 (name "java-osgi-service-metatype-annotations")
6625 (version "1.3.0")
6626 (source (origin
6627 (method url-fetch)
6628 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6629 "org.osgi.service.metatype.annotations/"
6630 version "/org.osgi.service.metatype.annotations-"
6631 version "-sources.jar"))
6632 (sha256
6633 (base32
6634 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
6635 (build-system ant-build-system)
6636 (arguments
6637 `(#:jar-name "osgi-service-metatype-annotations.jar"
6638 #:tests? #f)); no tests
6639 (inputs
6640 `(("annotation" ,java-osgi-annotation)))
6641 (home-page "https://www.osgi.org")
6642 (synopsis "Support annotations for metatype")
6643 (description
6644 "OSGi, for Open Services Gateway initiative framework, is a module system
6645 and service platform for the Java programming language. This package contains
6646 the support annotations for metatype.")
6647 (license license:asl2.0)))
6648
6649 (define-public java-osgi-service-repository
6650 (package
6651 (name "java-osgi-service-repository")
6652 (version "1.1.0")
6653 (source (origin
6654 (method url-fetch)
6655 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6656 "org.osgi.service.repository/"
6657 version "/org.osgi.service.repository-"
6658 version "-sources.jar"))
6659 (sha256
6660 (base32
6661 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
6662 (build-system ant-build-system)
6663 (arguments
6664 `(#:jar-name "osgi-service-repository.jar"
6665 #:tests? #f)); no tests
6666 (inputs
6667 `(("annotation" ,java-osgi-annotation)
6668 ("promise" ,java-osgi-util-promise)
6669 ("resource" ,java-osgi-resource)))
6670 (home-page "https://www.osgi.org")
6671 (synopsis "OSGI service repository")
6672 (description
6673 "OSGi, for Open Services Gateway initiative framework, is a module system
6674 and service platform for the Java programming language. This package contains
6675 a repository service that contains resources.")
6676 (license license:asl2.0)))
6677
6678 (define-public java-osgi-framework
6679 (package
6680 (name "java-osgi-framework")
6681 (version "1.8.0")
6682 (source (origin
6683 (method url-fetch)
6684 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6685 "org.osgi.framework/" version "/org.osgi.framework-"
6686 version "-sources.jar"))
6687 (sha256
6688 (base32
6689 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
6690 (build-system ant-build-system)
6691 (arguments
6692 `(#:jar-name "osgi-framework.jar"
6693 #:tests? #f)); no tests
6694 (inputs
6695 `(("annotation" ,java-osgi-annotation)
6696 ("resource" ,java-osgi-resource)
6697 ("dto" ,java-osgi-dto)))
6698 (home-page "https://www.osgi.org")
6699 (synopsis "OSGi framework")
6700 (description
6701 "OSGi, for Open Services Gateway initiative framework, is a module system
6702 and service platform for the Java programming language.")
6703 (license license:asl2.0)))
6704
6705 (define-public java-osgi-service-log
6706 (package
6707 (name "java-osgi-service-log")
6708 (version "1.3.0")
6709 (source (origin
6710 (method url-fetch)
6711 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6712 "org.osgi.service.log/"
6713 version "/org.osgi.service.log-"
6714 version "-sources.jar"))
6715 (sha256
6716 (base32
6717 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
6718 (build-system ant-build-system)
6719 (arguments
6720 `(#:jar-name "osgi-service-log.jar"
6721 #:tests? #f)); no tests
6722 (inputs
6723 `(("java-osgi-framework" ,java-osgi-framework)))
6724 (home-page "https://www.osgi.org")
6725 (synopsis "Provides methods for bundles to write messages to the log")
6726 (description
6727 "OSGi, for Open Services Gateway initiative framework, is a module system
6728 and service platform for the Java programming language. This package contains
6729 the log service.")
6730 (license license:asl2.0)))
6731
6732 (define-public java-osgi-service-jdbc
6733 (package
6734 (name "java-osgi-service-jdbc")
6735 (version "1.0.0")
6736 (source (origin
6737 (method url-fetch)
6738 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6739 "org.osgi.service.jdbc/"
6740 version "/org.osgi.service.jdbc-"
6741 version "-sources.jar"))
6742 (sha256
6743 (base32
6744 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
6745 (build-system ant-build-system)
6746 (arguments
6747 `(#:jar-name "osgi-service-jdbc.jar"
6748 #:tests? #f)); no tests
6749 (home-page "https://www.osgi.org")
6750 (synopsis "Factory for JDBC connection factories")
6751 (description
6752 "OSGi, for Open Services Gateway initiative framework, is a module system
6753 and service platform for the Java programming language. This package contains
6754 a factory for JDBC connection factories. There are 3 preferred connection
6755 factories for getting JDBC connections:
6756
6757 @itemize
6758 @item @code{javax.sql.DataSource};
6759 @item @code{javax.sql.ConnectionPoolDataSource};
6760 @item @code{javax.sql.XADataSource}.
6761 @end itemize")
6762 (license license:asl2.0)))
6763
6764 (define-public java-osgi-service-resolver
6765 (package
6766 (name "java-osgi-service-resolver")
6767 (version "1.0.1")
6768 (source (origin
6769 (method url-fetch)
6770 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6771 "org.osgi.service.resolver/"
6772 version "/org.osgi.service.resolver-"
6773 version "-sources.jar"))
6774 (sha256
6775 (base32
6776 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
6777 (build-system ant-build-system)
6778 (arguments
6779 `(#:jar-name "osgi-service-resolver.jar"
6780 #:tests? #f)); no tests
6781 (inputs
6782 `(("annotation" ,java-osgi-annotation)
6783 ("resource" ,java-osgi-resource)))
6784 (home-page "https://www.osgi.org")
6785 (synopsis "OSGI Resolver service")
6786 (description
6787 "OSGi, for Open Services Gateway initiative framework, is a module system
6788 and service platform for the Java programming language. This package contains
6789 a resolver service that resolves the specified resources in the context supplied
6790 by the caller.")
6791 (license license:asl2.0)))
6792
6793 (define-public java-osgi-util-tracker
6794 (package
6795 (name "java-osgi-util-tracker")
6796 (version "1.5.1")
6797 (source (origin
6798 (method url-fetch)
6799 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6800 "org.osgi.util.tracker/"
6801 version "/org.osgi.util.tracker-"
6802 version "-sources.jar"))
6803 (sha256
6804 (base32
6805 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
6806 (build-system ant-build-system)
6807 (arguments
6808 `(#:jar-name "osgi-util-tracker.jar"
6809 #:tests? #f)); no tests
6810 (inputs
6811 `(("framework" ,java-osgi-framework)
6812 ("annotation" ,java-osgi-annotation)))
6813 (home-page "https://www.osgi.org")
6814 (synopsis "Bundle tracking")
6815 (description
6816 "OSGi, for Open Services Gateway initiative framework, is a module system
6817 and service platform for the Java programming language. This package contains
6818 bundle tracking utility classes.")
6819 (license license:asl2.0)))
6820
6821 (define-public java-osgi-service-cm
6822 (package
6823 (name "java-osgi-service-cm")
6824 (version "1.5.0")
6825 (source (origin
6826 (method url-fetch)
6827 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6828 "org.osgi.service.cm/"
6829 version "/org.osgi.service.cm-"
6830 version "-sources.jar"))
6831 (sha256
6832 (base32
6833 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
6834 (build-system ant-build-system)
6835 (arguments
6836 `(#:jar-name "osgi-service-cm.jar"
6837 #:tests? #f)); no tests
6838 (inputs
6839 `(("framework" ,java-osgi-framework)
6840 ("annotation" ,java-osgi-annotation)))
6841 (home-page "https://www.osgi.org")
6842 (synopsis "OSGI Configuration Management")
6843 (description
6844 "OSGi, for Open Services Gateway initiative framework, is a module system
6845 and service platform for the Java programming language. This package contains
6846 utility classes for the configuration of services.")
6847 (license license:asl2.0)))
6848
6849 (define-public java-osgi-service-packageadmin
6850 (package
6851 (name "java-osgi-service-packageadmin")
6852 (version "1.2.0")
6853 (source (origin
6854 (method url-fetch)
6855 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
6856 "org.osgi.service.packageadmin/"
6857 version "/org.osgi.service.packageadmin-"
6858 version "-sources.jar"))
6859 (sha256
6860 (base32
6861 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
6862 (build-system ant-build-system)
6863 (arguments
6864 `(#:jar-name "osgi-service-packageadmin.jar"
6865 #:tests? #f)); no tests
6866 (inputs
6867 `(("framework" ,java-osgi-framework)))
6868 (home-page "https://www.osgi.org")
6869 (synopsis "OSGI Package Administration")
6870 (description
6871 "OSGi, for Open Services Gateway initiative framework, is a module system
6872 and service platform for the Java programming language. This package contains
6873 the packageadmin service.")
6874 (license license:asl2.0)))
6875
6876 (define-public java-ops4j-base-lang
6877 (package
6878 (name "java-ops4j-base-lang")
6879 (version "1.5.0")
6880 (source (origin
6881 (method url-fetch)
6882 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
6883 "archive/base-" version ".tar.gz"))
6884 (sha256
6885 (base32
6886 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
6887 (build-system ant-build-system)
6888 (arguments
6889 `(#:jar-name "java-ops4j-base-lang.jar"
6890 #:source-dir "ops4j-base-lang/src/main/java"
6891 #:tests? #f; no tests
6892 #:phases
6893 (modify-phases %standard-phases
6894 (add-before 'build 'add-test-file
6895 (lambda _
6896 ;; That file is required by a test in ops4j-pax-exam-core-spi
6897 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
6898 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
6899 (lambda _
6900 (display
6901 (string-append
6902 "version=" ,version "\n"
6903 "groupId=org.ops4j.base"
6904 "artifactId=ops4j-base-lang\n")))))))))
6905 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
6906 (synopsis "Utility classes and extensions to be used in OPS4J projects")
6907 (description "OPS4J stands for Open Participation Software for Java. This
6908 package contains utilities and extensions related to @code{java.lang}.")
6909 (license license:asl2.0)))
6910
6911 (define-public java-ops4j-base-monitors
6912 (package
6913 (inherit java-ops4j-base-lang)
6914 (name "java-ops4j-base-monitors")
6915 (arguments
6916 `(#:jar-name "java-ops4j-base-monitors.jar"
6917 #:source-dir "ops4j-base-monitors/src/main/java"
6918 #:tests? #f)); no tests
6919 (inputs
6920 `(("lang" ,java-ops4j-base-lang)))
6921 (description "OPS4J stands for Open Participation Software for Java. This
6922 package contains utilities and extensions related to monitoring.")))
6923
6924 (define-public java-ops4j-base-io
6925 (package
6926 (inherit java-ops4j-base-lang)
6927 (name "java-ops4j-base-io")
6928 (arguments
6929 `(#:jar-name "java-ops4j-base-io.jar"
6930 #:source-dir "ops4j-base-io/src/main/java"
6931 #:test-dir "ops4j-base-io/src/test"
6932 #:test-exclude
6933 (list "**/ListerTest.java")))
6934 (inputs
6935 `(("lang" ,java-ops4j-base-monitors)
6936 ("lang" ,java-ops4j-base-lang)))
6937 (native-inputs
6938 `(("junit" ,java-junit)
6939 ("hamcrest" ,java-hamcrest-core)))
6940 (description "OPS4J stands for Open Participation Software for Java. This
6941 package contains utilities and extensions related to handling streams and files.")))
6942
6943 (define-public java-ops4j-base-util
6944 (package
6945 (inherit java-ops4j-base-lang)
6946 (name "java-ops4j-base-util")
6947 (arguments
6948 `(#:jar-name "java-ops4j-base-util.jar"
6949 #:source-dir "ops4j-base-util/src/main/java"
6950 #:test-dir "ops4j-base-util/src/test"))
6951 (inputs
6952 `(("lang" ,java-ops4j-base-lang)))
6953 (native-inputs
6954 `(("junit" ,java-junit)))
6955 (description "OPS4J stands for Open Participation Software for Java. This
6956 package contains utilities and extensions related to environment, i18n and
6957 mime types.")))
6958
6959 (define-public java-ops4j-base-util-property
6960 (package
6961 (inherit java-ops4j-base-lang)
6962 (name "java-ops4j-base-util-property")
6963 (arguments
6964 `(#:jar-name "java-ops4j-base-util-property.jar"
6965 #:source-dir "ops4j-base-util-property/src/main/java"
6966 #:tests? #f)); no tests
6967 (inputs
6968 `(("lang" ,java-ops4j-base-lang)
6969 ("util" ,java-ops4j-base-util)))
6970 (description "OPS4J stands for Open Participation Software for Java. This
6971 package contains utilities and extensions related to resolving properties from
6972 different sources.")))
6973
6974 (define-public java-ops4j-base-store
6975 (package
6976 (inherit java-ops4j-base-lang)
6977 (name "java-ops4j-base-store")
6978 (arguments
6979 `(#:jar-name "java-ops4j-base-store.jar"
6980 #:source-dir "ops4j-base-store/src/main/java"
6981 #:tests? #f)); no tests
6982 (inputs
6983 `(("lang" ,java-ops4j-base-lang)
6984 ("slf4j" ,java-slf4j-api)
6985 ("io" ,java-ops4j-base-io)))
6986 (description "OPS4J stands for Open Participation Software for Java. This
6987 package contains utilities for storing and retrieving data from an
6988 @code{InputStream}.")))
6989
6990 (define-public java-ops4j-base-spi
6991 (package
6992 (inherit java-ops4j-base-lang)
6993 (name "java-ops4j-base-spi")
6994 (arguments
6995 `(#:jar-name "java-ops4j-base-spi.jar"
6996 #:source-dir "ops4j-base-spi/src/main/java"
6997 #:test-dir "ops4j-base-spi/src/test"))
6998 (native-inputs
6999 `(("junit" ,java-junit)
7000 ("hamcrest" ,java-hamcrest-core)))
7001 (description "OPS4J stands for Open Participation Software for Java. This
7002 package contains utilities for obtaining services via the Java SE 6
7003 @code{ServiceLoader}.")))
7004
7005 (define-public java-aqute-bnd-annotation
7006 (package
7007 (name "java-aqute-bnd-annotation")
7008 (version "3.5.0")
7009 (source (origin
7010 (method url-fetch)
7011 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7012 version ".REL.tar.gz"))
7013 (file-name (string-append name "-" version ".tar.gz"))
7014 (sha256
7015 (base32
7016 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7017 (build-system ant-build-system)
7018 (arguments
7019 `(#:jar-name "java-aqute-bnd-annotation.jar"
7020 #:source-dir "biz.aQute.bnd.annotation/src"
7021 #:tests? #f)); empty test dir
7022 (home-page "http://bnd.bndtools.org/")
7023 (synopsis "Tools for OSGi")
7024 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7025 headers based on analyzing the class code, it verifies the project settings,
7026 it manages project dependencies, gives diffs jars, and much more.")
7027 (license license:asl2.0)))
7028
7029 (define-public java-aqute-libg
7030 (package
7031 (inherit java-aqute-bnd-annotation)
7032 (name "java-aqute-libg")
7033 (arguments
7034 `(#:jar-name "java-aqute-libg.jar"
7035 ;; The build fails when source/target more recent than 1.7. This
7036 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7037 ;;
7038 ;; It is closed as won't fix. There is no way to change the source
7039 ;; so that it works on 1.8, and still works on 1.6, the upstream
7040 ;; target. It work fine on 1.7, so we use 1.7.
7041 #:make-flags (list "-Dant.build.javac.source=1.7"
7042 "-Dant.build.javac.target=1.7")
7043 #:phases
7044 (modify-phases %standard-phases
7045 (add-before 'configure 'chdir
7046 ;; Change to aQute.libg directory, so that the relative
7047 ;; paths in the tests aren't broken.
7048 (lambda _
7049 (chdir "aQute.libg")
7050 #t))
7051 (add-before 'check 'create-test-directory
7052 ;; Copy the test directory to test/java, since that's where
7053 ;; ant-build-system's default project in build.xml expects to find
7054 ;; the test classes. Leave a copy in the original place to not
7055 ;; break paths in tests.
7056 (lambda _
7057 (mkdir "src/test")
7058 (copy-recursively "test" "src/test/java")
7059 #t)))))
7060 (inputs
7061 `(("slf4j" ,java-slf4j-api)
7062 ("osgi-annot" ,java-osgi-annotation)
7063 ("java-osgi-cmpn" ,java-osgi-cmpn)
7064 ("osgi" ,java-osgi-core)))
7065 (native-inputs
7066 `(("hamcrest" ,java-hamcrest-core)
7067 ("java-junit" ,java-junit)))))
7068
7069 (define java-aqute-libg-bootstrap
7070 (package
7071 (inherit java-aqute-libg)
7072 (name "java-aqute-libg-bootstrap")
7073 (arguments
7074 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7075 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7076 ((#:tests? _ #f) #f)))
7077 (inputs
7078 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7079 ,@(delete `("slf4j" ,java-slf4j-api)
7080 (package-inputs java-aqute-libg))))
7081 (native-inputs '())))
7082
7083 (define-public java-aqute-bndlib
7084 (package
7085 (inherit java-aqute-bnd-annotation)
7086 (name "java-aqute-bndlib")
7087 (arguments
7088 `(#:jar-name "java-bndlib.jar"
7089 #:source-dir "biz.aQute.bndlib/src"
7090 #:tests? #f)); no tests
7091 (inputs
7092 `(("slf4j" ,java-slf4j-api)
7093 ("osgi-annot" ,java-osgi-annotation)
7094 ("java-aqute-libg" ,java-aqute-libg)
7095 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7096 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7097 ("java-osgi-service-repository" ,java-osgi-service-repository)
7098 ("java-osgi-service-log" ,java-osgi-service-log)
7099 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7100 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7101 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7102 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7103 ("promise" ,java-osgi-util-promise)
7104 ("osgi" ,java-osgi-core)))))
7105
7106 (define java-aqute-bndlib-bootstrap
7107 (package
7108 (inherit java-aqute-bndlib)
7109 (name "java-aqute-bndlib-bootstrap")
7110 (inputs
7111 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7112 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7113 ,@(delete `("slf4j" ,java-slf4j-api)
7114 (delete `("java-aqute-libg" ,java-aqute-libg)
7115 (package-inputs java-aqute-bndlib)))))))
7116
7117 (define-public java-ops4j-pax-tinybundles
7118 (package
7119 (name "java-ops4j-pax-tinybundles")
7120 (version "2.1.1")
7121 (source (origin
7122 (method url-fetch)
7123 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7124 "archive/tinybundles-" version ".tar.gz"))
7125 (sha256
7126 (base32
7127 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7128 (arguments
7129 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7130 #:source-dir "src/main/java"
7131 #:test-exclude
7132 ;; Abstract base classes for other tests
7133 (list "**/BndTest.java" "**/CoreTest.java")
7134 #:phases
7135 (modify-phases %standard-phases
7136 (add-before 'check 'fix-version
7137 (lambda _
7138 ;; This test has a reference to an old version of bndlib we are not
7139 ;; packaging. It uses the version referenced in pom.xml. We replace
7140 ;; it with our own version.
7141 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7142 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7143 ,(package-version java-aqute-bndlib))))))))
7144 (inputs
7145 `(("lang" ,java-ops4j-base-lang)
7146 ("io" ,java-ops4j-base-io)
7147 ("store" ,java-ops4j-base-store)
7148 ("slf4j" ,java-slf4j-api)
7149 ("libg" ,java-aqute-libg)
7150 ("bndlib" ,java-aqute-bndlib)))
7151 (native-inputs
7152 `(("junit" ,java-junit)
7153 ("hamcrest" ,java-hamcrest-core)
7154 ("log4j" ,java-log4j-api)
7155 ("bndannotation" ,java-aqute-bnd-annotation)
7156 ("framework" ,java-osgi-framework)))
7157 (build-system ant-build-system)
7158 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7159 (synopsis "Java APIs to create OSGi related artifacts")
7160 (description "Tinybundles is all about creating OSGi related artifacts like
7161 Bundles, Fragments and Deployment Packages with Java Api. It is very convinient
7162 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7163 other hand, this library can be a foundation of real end user tools that need
7164 to create those artifacts.")
7165 (license license:asl2.0)))
7166
7167 (define-public java-ops4j-pax-exam-core
7168 (package
7169 (name "java-ops4j-pax-exam-core")
7170 (version "4.11.0")
7171 (source (origin
7172 (method url-fetch)
7173 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7174 "archive/exam-reactor-" version ".tar.gz"))
7175 (sha256
7176 (base32
7177 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7178 (arguments
7179 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7180 #:source-dir "core/pax-exam/src/main/java"
7181 #:test-dir "core/pax-exam/src/test"))
7182 (inputs
7183 `(("slf4j" ,java-slf4j-api)
7184 ("lang" ,java-ops4j-base-lang)
7185 ("io" ,java-ops4j-base-io)
7186 ("util-property" ,java-ops4j-base-util-property)
7187 ("util-store" ,java-ops4j-base-store)
7188 ("java-osgi-core" ,java-osgi-core)))
7189 (native-inputs
7190 `(("junit" ,java-junit)
7191 ("hamcrest" ,java-hamcrest-core)))
7192 (build-system ant-build-system)
7193 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7194 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7195 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7196 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7197 the system under test at the same time.")
7198 (license license:asl2.0)))
7199
7200 (define-public java-ops4j-pax-exam-core-spi
7201 (package
7202 (inherit java-ops4j-pax-exam-core)
7203 (name "java-ops4j-pax-exam-core-spi")
7204 (arguments
7205 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7206 #:source-dir "src/main/java"
7207 #:test-exclude
7208 (list
7209 ;; Abstract base class, not a test
7210 "**/BaseStagedReactorTest.java"
7211 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7212 "**/WarBuilderTest.java")
7213 #:phases
7214 (modify-phases %standard-phases
7215 (add-before 'configure 'chdir
7216 (lambda _
7217 ;; Tests assume we are in this directory
7218 (chdir "core/pax-exam-spi")))
7219 (add-before 'check 'fix-tests
7220 (lambda _
7221 ;; One test checks that this file is present.
7222 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7223 (with-output-to-file
7224 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7225 (lambda _
7226 (display
7227 (string-append "artifactId = pax-exam-spi\n"
7228 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7229 ;; Maven puts compilation results in the target directory, while we
7230 ;; put them in the build directory.
7231 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
7232 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
7233 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
7234 (("target") "build"))
7235 ;; One test is expected to fail, but it doesn't throw the expected exception
7236 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
7237 (("AssertionError") "IllegalArgumentException")))))))
7238 (inputs
7239 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
7240 ("lang" ,java-ops4j-base-lang)
7241 ("monitors" ,java-ops4j-base-monitors)
7242 ("store" ,java-ops4j-base-store)
7243 ("io" ,java-ops4j-base-io)
7244 ("spi" ,java-ops4j-base-spi)
7245 ("osgi" ,java-osgi-core)
7246 ("slf4j" ,java-slf4j-api)
7247 ("tinybundles" ,java-ops4j-pax-tinybundles)))
7248 (native-inputs
7249 `(("mockito" ,java-mockito-1)
7250 ("junit" ,java-junit)
7251 ("hamcrest" ,java-hamcrest-core)
7252 ("cglib" ,java-cglib)
7253 ("objenesis" ,java-objenesis)
7254 ("asm" ,java-asm)))))
7255
7256 (define-public java-ops4j-pax-exam-core-junit
7257 (package
7258 (inherit java-ops4j-pax-exam-core)
7259 (name "java-ops4j-pax-exam-core-junit")
7260 (arguments
7261 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
7262 #:source-dir "drivers/pax-exam-junit4/src/main/java"
7263 #:tests? #f)); no tests
7264 (inputs
7265 `(("junit" ,java-junit)
7266 ("slf4j" ,java-slf4j-api)
7267 ("core" ,java-ops4j-pax-exam-core)
7268 ("spi" ,java-ops4j-pax-exam-core-spi)))
7269 (native-inputs '())))
7270
7271 (define-public java-fasterxml-jackson-annotations
7272 (package
7273 (name "java-fasterxml-jackson-annotations")
7274 (version "2.9.4")
7275 (source (origin
7276 (method url-fetch)
7277 (uri (string-append "https://github.com/FasterXML/"
7278 "jackson-annotations/archive/"
7279 "jackson-annotations-" version ".tar.gz"))
7280 (sha256
7281 (base32
7282 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
7283 (build-system ant-build-system)
7284 (arguments
7285 `(#:jar-name "jackson-annotations.jar"
7286 #:source-dir "src/main/java"
7287 #:test-dir "src/test"))
7288 (native-inputs
7289 `(("junit" ,java-junit)))
7290 (home-page "https://github.com/FasterXML/jackson-annotations")
7291 (synopsis "General purpose annotations for the Jackson Data Processor")
7292 (description "This package contains general purpose annotations for the
7293 Jackson Data Processor, used on value and handler types. The only annotations
7294 not included are ones that require dependency to the Databind package.")
7295 (license license:asl2.0)))
7296
7297 (define-public java-fasterxml-jackson-core
7298 (package
7299 (name "java-fasterxml-jackson-core")
7300 (version "2.9.4")
7301 (source (origin
7302 (method url-fetch)
7303 (uri (string-append "https://github.com/FasterXML/"
7304 "jackson-core/archive/"
7305 "jackson-core-" version ".tar.gz"))
7306 (sha256
7307 (base32
7308 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
7309 (build-system ant-build-system)
7310 (arguments
7311 `(#:jar-name "jackson-core.jar"
7312 #:source-dir "src/main/java"
7313 #:test-dir "src/test"
7314 #:test-exclude
7315 (list
7316 ;; Expected failure. pom.xml excludes these
7317 "**/failing/**"
7318 ;; Base classes that have no constructor for junit
7319 "**/BaseTest.java"
7320 "**/ConcurrencyReadTest.java"
7321 "**/ManualCharAccessTest.java"
7322 "**/ManualCharAccessTest.java"
7323 "**/TrailingCommasTest.java"
7324 "**/AsyncMissingValuesInObjectTest.java"
7325 "**/AsyncMissingValuesInArrayTest.java")
7326 #:phases
7327 (modify-phases %standard-phases
7328 (add-before 'configure 'generate-PackageVersion.java
7329 (lambda _
7330 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
7331 (in (string-append out ".in")))
7332 (copy-file in out)
7333 (substitute* out
7334 (("@package@") "com.fasterxml.jackson.core.json")
7335 (("@projectversion@") ,version)
7336 (("@projectgroupid@") "com.fasterxml.jackson.core")
7337 (("@projectartifactid@") "jackson-core")))))
7338 (add-before 'build 'copy-resources
7339 (lambda _
7340 (copy-recursively "src/main/resources"
7341 "build/classes")))
7342 (add-before 'check 'copy-test-resources
7343 (lambda _
7344 (copy-recursively "src/test/resources"
7345 "build/test-classes"))))))
7346 (native-inputs
7347 `(("junit" ,java-junit)
7348 ("hamcrest" ,java-hamcrest-core)))
7349 (home-page "https://github.com/FasterXML/jackson-core")
7350 (synopsis "")
7351 (description "")
7352 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7353
7354 (define-public java-fasterxml-jackson-databind
7355 (package
7356 (name "java-fasterxml-jackson-databind")
7357 (version "2.9.4")
7358 (source (origin
7359 (method url-fetch)
7360 (uri (string-append "https://github.com/FasterXML/"
7361 "jackson-databind/archive/"
7362 "jackson-databind-" version ".tar.gz"))
7363 (sha256
7364 (base32
7365 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
7366 (build-system ant-build-system)
7367 (arguments
7368 `(#:jar-name "jackson-databind.jar"
7369 #:source-dir "src/main/java"
7370 #:tests? #f; requires javax.measures for which I can't find a free implementation
7371 #:phases
7372 (modify-phases %standard-phases
7373 (add-before 'configure 'generate-PackageVersion.java
7374 (lambda _
7375 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
7376 (in (string-append out ".in")))
7377 (copy-file in out)
7378 (substitute* out
7379 (("@package@") "com.fasterxml.jackson.databind.cfg")
7380 (("@projectversion@") ,version)
7381 (("@projectgroupid@") "com.fasterxml.jackson.databind")
7382 (("@projectartifactid@") "jackson-databind")))))
7383 (add-before 'build 'copy-resources
7384 (lambda _
7385 (copy-recursively "src/main/resources" "build/classes"))))))
7386 (inputs
7387 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7388 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
7389 (home-page "https://github.com/FasterXML/jackson-databind")
7390 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
7391 (description "This package contains the general-purpose data-binding
7392 functionality and tree-model for Jackson Data Processor. It builds on core
7393 streaming parser/generator package, and uses Jackson Annotations for
7394 configuration.")
7395 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7396
7397 (define-public java-fasterxml-jackson-modules-base-jaxb
7398 (package
7399 (name "java-fasterxml-jackson-modules-base-jaxb")
7400 (version "2.9.4")
7401 (source (origin
7402 (method url-fetch)
7403 (uri (string-append "https://github.com/FasterXML/"
7404 "jackson-modules-base/archive/"
7405 "jackson-modules-base-" version ".tar.gz"))
7406 (sha256
7407 (base32
7408 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
7409 (build-system ant-build-system)
7410 (arguments
7411 `(#:jar-name "jackson-modules-base-jaxb.jar"
7412 #:source-dir "jaxb/src/main/java"
7413 #:test-dir "jaxb/src/test"
7414 #:test-exclude
7415 ;; Base class for tests
7416 (list "**/BaseJaxbTest.java")
7417 #:phases
7418 (modify-phases %standard-phases
7419 (add-before 'configure 'generate-PackageVersion.java
7420 (lambda _
7421 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
7422 "jackson/module/jaxb/PackageVersion.java"))
7423 (in (string-append out ".in")))
7424 (copy-file in out)
7425 (substitute* out
7426 (("@package@") "com.fasterxml.jackson.module.jaxb")
7427 (("@projectversion@") ,version)
7428 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
7429 (("@projectartifactid@") "jackson-module-jaxb")))))
7430 (add-before 'build 'copy-resources
7431 (lambda _
7432 (copy-recursively "jaxb/src/main/resources" "build/classes"))))))
7433 (inputs
7434 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7435 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7436 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
7437 (native-inputs
7438 `(("java-junit" ,java-junit)))
7439 (home-page "https://github.com/FasterXML/jackson-modules-base")
7440 (synopsis "Jaxb annotations jackson module")
7441 (description "This package is the jaxb annotations module for jackson.")
7442 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7443
7444 (define-public java-snakeyaml
7445 (package
7446 (name "java-snakeyaml")
7447 (version "1.18")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
7451 version ".tar.gz"))
7452 (file-name (string-append name "-" version ".tar.gz"))
7453 (sha256
7454 (base32
7455 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
7456 (build-system ant-build-system)
7457 (arguments
7458 `(#:jar-name "java-snakeyaml.jar"
7459 #:source-dir "src/main/java"
7460 ;; Tests require velocity, a cyclic dependency, and
7461 ;; java-spring-framework-context which is not packaged.
7462 #:tests? #f))
7463 (home-page "https://bitbucket.org/asomov/snakeyaml")
7464 (synopsis "YAML processor")
7465 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
7466 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7467
7468 (define-public java-fasterxml-jackson-dataformat-yaml
7469 (package
7470 (name "java-fasterxml-jackson-dataformat-yaml")
7471 (version "2.9.4")
7472 (source (origin
7473 (method url-fetch)
7474 (uri (string-append "https://github.com/FasterXML/"
7475 "jackson-dataformats-text/archive/"
7476 "jackson-dataformats-text-" version ".tar.gz"))
7477 (sha256
7478 (base32
7479 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
7480 (build-system ant-build-system)
7481 (arguments
7482 `(#:jar-name "jackson-dataformat-yaml.jar"
7483 #:source-dir "yaml/src/main/java"
7484 #:test-dir "yaml/src/test"
7485 #:test-exclude (list "**/failing/**.java")
7486 #:phases
7487 (modify-phases %standard-phases
7488 (add-before 'configure 'generate-PackageVersion.java
7489 (lambda _
7490 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
7491 (in (string-append out ".in")))
7492 (copy-file in out)
7493 (substitute* out
7494 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
7495 (("@projectversion@") ,version)
7496 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
7497 (("@projectartifactid@") "jackson-dataformat-yaml"))))))))
7498 (inputs
7499 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7500 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7501 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7502 ("java-snakeyaml" ,java-snakeyaml)))
7503 (native-inputs
7504 `(("junit" ,java-junit)
7505 ("hamcrest" ,java-hamcrest-core)
7506 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
7507 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
7508 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
7509 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
7510 (synopsis "Yaml backend for Jackson")
7511 (description "Dataformat backends are used to support format alternatives
7512 to JSON, supported by default. This is done by sub-classing Jackson core
7513 abstractions.")
7514 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7515
7516 (define-public java-stax2-api
7517 (package
7518 (name "java-stax2-api")
7519 (version "4.0.0")
7520 (source (origin
7521 (method url-fetch)
7522 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
7523 "stax2-api-" version ".tar.gz"))
7524 (sha256
7525 (base32
7526 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
7527 (build-system ant-build-system)
7528 (arguments
7529 `(#:jar-name "java-stax2-api.jar"
7530 #:source-dir "src/main/java"
7531 #:tests? #f)); no tests
7532 (home-page "https://github.com/FasterXML/stax2-api")
7533 (synopsis "Stax2 API")
7534 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
7535 significant new functionalities, such as full-featured bi-direction validation
7536 interface and high-performance Typed Access API.")
7537 (license license:bsd-2)))
7538
7539 (define-public java-woodstox-core
7540 (package
7541 (name "java-woodstox-core")
7542 (version "5.0.3")
7543 (source (origin
7544 (method url-fetch)
7545 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
7546 "woodstox-core-" version ".tar.gz"))
7547 (sha256
7548 (base32
7549 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
7550 (build-system ant-build-system)
7551 (arguments
7552 `(#:jar-name "woodstox.jar"
7553 #:test-exclude
7554 (list "**/Base*.java" "failing/**")
7555 #:phases
7556 (modify-phases %standard-phases
7557 (add-before 'build 'remove-msv-dep
7558 (lambda _
7559 ;; we don't need osgi, and it depends on msv
7560 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
7561 ;; msv's latest release is from 2011 and we don't need it
7562 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
7563 (delete-file-recursively "src/test/java/wstxtest/osgi")
7564 (delete-file-recursively "src/test/java/wstxtest/msv")))
7565 (add-before 'build 'copy-resources
7566 (lambda _
7567 (copy-recursively "src/main/resources" "build/classes"))))))
7568 (inputs
7569 `(("stax2" ,java-stax2-api)))
7570 (native-inputs
7571 `(("junit" ,java-junit)))
7572 (home-page "https://github.com/FasterXML/woodstox")
7573 (synopsis "Stax XML API implementation")
7574 (description "Woodstox is a stax XML API implementation.")
7575 (license license:asl2.0)))
7576
7577 (define-public java-fasterxml-jackson-dataformat-xml
7578 (package
7579 (name "java-fasterxml-jackson-dataformat-xml")
7580 (version "2.9.4")
7581 (source (origin
7582 (method url-fetch)
7583 (uri (string-append "https://github.com/FasterXML/"
7584 "jackson-dataformat-xml/archive/"
7585 "jackson-dataformat-xml-" version ".tar.gz"))
7586 (sha256
7587 (base32
7588 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
7589 (build-system ant-build-system)
7590 (arguments
7591 `(#:jar-name "jackson-dataformat-xml.jar"
7592 #:source-dir "src/main/java"
7593 #:test-exclude
7594 (list "**/failing/**")
7595 #:phases
7596 (modify-phases %standard-phases
7597 (add-before 'configure 'generate-PackageVersion.java
7598 (lambda _
7599 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
7600 (in (string-append out ".in")))
7601 (copy-file in out)
7602 (newline)
7603 (substitute* out
7604 (("@package@") "com.fasterxml.jackson.dataformat.xml")
7605 (("@projectversion@") ,version)
7606 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
7607 (("@projectartifactid@") "jackson-dataformat-xml")))))
7608 (add-before 'build 'copy-resources
7609 (lambda _
7610 (copy-recursively "src/main/resources" "build/classes"))))))
7611 (inputs
7612 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
7613 ("jackson-core" ,java-fasterxml-jackson-core)
7614 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
7615 ("jackson-databind" ,java-fasterxml-jackson-databind)
7616 ("stax2-api" ,java-stax2-api)
7617 ("woodstox" ,java-woodstox-core)))
7618 (native-inputs
7619 `(("junit" ,java-junit)
7620 ("hamcrest" ,java-hamcrest-core)))
7621 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
7622 (synopsis "Read and write XML")
7623 (description "This package contains Jackson extension component for reading
7624 and writing XML encoded data.
7625
7626 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
7627 approach (that is, no support is added for \"Schema-first\" approach). Support
7628 for JAXB annotations is provided by JAXB annotation module; this module
7629 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
7630 @code{JsonFactory}) as well as small number of higher level overrides needed to
7631 make data-binding work.")
7632 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
7633
7634 (define-public java-hdrhistogram
7635 (package
7636 (name "java-hdrhistogram")
7637 (version "2.1.9")
7638 (source (origin
7639 (method url-fetch)
7640 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
7641 "archive/HdrHistogram-" version ".tar.gz"))
7642 (sha256
7643 (base32
7644 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
7645 (build-system ant-build-system)
7646 (arguments
7647 `(#:jar-name "java-hdrhistogram.jar"
7648 #:source-dir "src/main/java"
7649 #:phases
7650 (modify-phases %standard-phases
7651 (add-before 'configure 'set-version
7652 (lambda _
7653 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
7654 (template (string-append version-java ".template")))
7655 (copy-file template version-java)
7656 (substitute* version-java
7657 (("\\$VERSION\\$") ,version)
7658 (("\\$BUILD_TIME\\$") "0"))
7659 #t))))))
7660 (native-inputs
7661 `(("junit" ,java-junit)
7662 ("hamcrest" ,java-hamcrest-core)))
7663 (home-page "https://hdrhistogram.github.io/HdrHistogram")
7664 (synopsis "High dynamic range histogram")
7665 (description "Hdrhistogram allows to create histograms that support
7666 recording and analyzing sampled data value counts across a configurable integer
7667 value range with configurable value precision within the range. Value precision
7668 is expressed as the number of significant digits in the value recording, and
7669 provides control over value quantization behavior across the value range and
7670 the subsequent value resolution at any given level.")
7671 (license license:public-domain)))
7672
7673 (define-public java-cofoja
7674 (package
7675 (name "java-cofoja")
7676 (version "1.3")
7677 (source (origin
7678 (method git-fetch)
7679 (uri (git-reference
7680 (url "https://github.com/nhatminhle/cofoja.git")
7681 (commit (string-append "v" version))))
7682 (file-name (string-append "java-cofoja-" version "-checkout"))
7683 (sha256
7684 (base32
7685 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
7686 (build-system ant-build-system)
7687 (arguments
7688 `(#:build-target "dist"
7689 #:test-target "test"
7690 #:jdk ,icedtea-8
7691 #:make-flags
7692 (list "-Ddist.dir=dist")
7693 #:modules ((guix build ant-build-system)
7694 (guix build java-utils)
7695 (guix build utils)
7696 (srfi srfi-1)
7697 (ice-9 match))
7698 #:phases
7699 (modify-phases %standard-phases
7700 ;; The bulid system ignores the class path the ant-build-system sets
7701 ;; up and instead expects to find all dependencies in the "lib"
7702 ;; directory.
7703 (add-after 'unpack 'create-libdir
7704 (lambda* (#:key inputs #:allow-other-keys)
7705 (mkdir-p "lib")
7706 (for-each
7707 (lambda (file)
7708 (let ((target (string-append "lib/" (basename file))))
7709 (unless (file-exists? target)
7710 (symlink file target))))
7711 (append-map (match-lambda
7712 ((label . dir)
7713 (find-files dir "\\.jar$")))
7714 inputs))
7715 #t))
7716 (replace 'install (install-jars "dist")))))
7717 (inputs
7718 `(("java-asm" ,java-asm)))
7719 (native-inputs
7720 `(("java-junit" ,java-junit)))
7721 (home-page "https://github.com/nhatminhle/cofoja")
7722 (synopsis "Contracts for Java")
7723 (description "Contracts for Java, or Cofoja for short, is a contract
7724 programming framework and test tool for Java, which uses annotation processing
7725 and bytecode instrumentation to provide run-time checking. (In particular,
7726 this is not a static analysis tool.)")
7727 (license license:lgpl3+)))
7728
7729 (define-public java-aopalliance
7730 (package
7731 (name "java-aopalliance")
7732 (version "1.0")
7733 (source (origin
7734 (method git-fetch)
7735 ;; Note: this git repository is not official, but contains the
7736 ;; source code that is in the CVS repository. Downloading the
7737 ;; tarball from sourceforge is undeterministic, and the cvs download
7738 ;; fails.
7739 (uri (git-reference
7740 (url "https://github.com/hoverruan/aopalliance")
7741 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
7742 (file-name (string-append name "-" version))
7743 (sha256
7744 (base32
7745 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
7746 (build-system ant-build-system)
7747 (arguments
7748 `(#:jar-name "java-aopalliance.jar"
7749 #:jdk ,icedtea-8
7750 #:tests? #f; no tests
7751 #:source-dir "aopalliance/src/main"))
7752 (home-page "http://aopalliance.sourceforge.net")
7753 (synopsis "Aspect-Oriented Programming")
7754 (description "The AOP Alliance project is a joint project between several
7755 software engineering people who are interested in Aspect-Oriented Programming
7756 (AOP) and Java.")
7757 (license license:public-domain)))
7758
7759 (define-public java-javax-inject
7760 (package
7761 (name "java-javax-inject")
7762 (version "tck-1")
7763 (source (origin
7764 (method url-fetch)
7765 (uri (string-append "https://github.com/javax-inject/javax-inject/"
7766 "archive/javax.inject-" version ".tar.gz"))
7767 (sha256
7768 (base32
7769 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
7770 (build-system ant-build-system)
7771 (arguments
7772 `(#:jar-name "java-javax-inject.jar"
7773 #:jdk ,icedtea-8
7774 #:tests? #f)); no tests
7775 (home-page "http://github.com/javax-inject/javax-inject")
7776 (synopsis "JSR-330: Dependency Injection for Java")
7777 (description "This package specifies a means for obtaining objects in such
7778 a way as to maximize reusability, testability and maintainability compared to
7779 traditional approaches such as constructors, factories, and service locators
7780 (e.g., JNDI). This process, known as dependency injection, is beneficial to
7781 most nontrivial applications.
7782
7783 Many types depend on other types. For example, a @var{Stopwatch} might depend
7784 on a @var{TimeSource}. The types on which a type depends are known as its
7785 dependencies. The process of finding an instance of a dependency to use at run
7786 time is known as resolving the dependency. If no such instance can be found,
7787 the dependency is said to be unsatisfied, and the application is broken.")
7788 (license license:asl2.0)))
7789
7790 (define-public java-guice
7791 (package
7792 (name "java-guice")
7793 (version "4.1")
7794 (source (origin
7795 (method url-fetch)
7796 (uri (string-append "https://github.com/google/guice/archive/"
7797 version ".tar.gz"))
7798 (file-name (string-append name "-" version ".tar.gz"))
7799 (sha256
7800 (base32
7801 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
7802 (build-system ant-build-system)
7803 (arguments
7804 `(#:jar-name "java-guice.jar"
7805 #:jdk ,icedtea-8
7806 #:tests? #f; FIXME: tests are not in a java sub directory
7807 #:source-dir "core/src"))
7808 (inputs
7809 `(("guava" ,java-guava)
7810 ("java-cglib" ,java-cglib)
7811 ("java-aopalliance" ,java-aopalliance)
7812 ("java-javax-inject" ,java-javax-inject)
7813 ("java-asm" ,java-asm)))
7814 (home-page "https://github.com/google/guice")
7815 (synopsis "Lightweight dependency injection framework")
7816 (description "Guice is a lightweight dependency injection framework fo
7817 Java 6 and above.")
7818 (license license:asl2.0)))
7819
7820 (define-public java-guice-servlet
7821 (package
7822 (inherit java-guice)
7823 (name "java-guice-servlet")
7824 (arguments
7825 `(#:jar-name "guice-servlet.jar"
7826 #:source-dir "extensions/servlet/src/"
7827 #:jdk ,icedtea-8
7828 #:tests? #f)); FIXME: not in a java subdir
7829 (inputs
7830 `(("guice" ,java-guice)
7831 ("servlet" ,java-tomcat)
7832 ,@(package-inputs java-guice)))))
7833
7834 (define-public java-assertj
7835 (package
7836 (name "java-assertj")
7837 (version "3.8.0")
7838 (source (origin
7839 (method url-fetch)
7840 (uri (string-append "https://github.com/joel-costigliola/"
7841 "assertj-core/archive/"
7842 "assertj-core-" version ".tar.gz"))
7843 (sha256
7844 (base32
7845 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
7846 (build-system ant-build-system)
7847 (arguments
7848 `(#:jar-name "java-assertj.jar"
7849 #:jdk ,icedtea-8
7850 #:source-dir "src/main/java"
7851 #:tests? #f)); depends on tng-junit which depends on assertj
7852 (inputs
7853 `(("cglib" ,java-cglib)
7854 ("junit" ,java-junit)
7855 ("hamcrest" ,java-hamcrest-core)))
7856 (native-inputs
7857 `(("mockito" ,java-mockito-1)))
7858 (home-page "https://joel-costigliola.github.io/assertj/index.html")
7859 (synopsis "Fluent assertions for java")
7860 (description "AssertJ core is a Java library that provides a fluent
7861 interface for writing assertions. Its main goal is to improve test code
7862 readability and make maintenance of tests easier.")
7863 (license license:asl2.0)))
7864
7865 (define-public java-jboss-javassist
7866 (package
7867 (name "java-jboss-javassist")
7868 (version "3.21.0")
7869 (source (origin
7870 (method url-fetch)
7871 (uri (string-append "https://github.com/jboss-javassist/javassist/"
7872 "archive/rel_"
7873 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
7874 "_ga.tar.gz"))
7875 (sha256
7876 (base32
7877 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
7878 (build-system ant-build-system)
7879 (arguments
7880 `(#:jar-name "java-jboss-javassist.jar"
7881 #:jdk ,icedtea-8
7882 #:source-dir "src/main"
7883 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
7884 #:phases
7885 (modify-phases %standard-phases
7886 (add-before 'configure 'remove-binary
7887 (lambda _
7888 (delete-file "javassist.jar")
7889 #t)))))
7890 (native-inputs
7891 `(("junit" ,java-junit)))
7892 (home-page "https://github.com/jboss-javassist/javassist")
7893 (synopsis "Java bytecode engineering toolkit")
7894 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
7895 manipulation simple. It is a class library for editing bytecodes in Java; it
7896 enables Java programs to define a new class at runtime and to modify a class
7897 file when the JVM loads it.")
7898 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
7899
7900 (define-public java-jcommander
7901 (package
7902 (name "java-jcommander")
7903 (version "1.71")
7904 (source (origin
7905 (method url-fetch)
7906 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
7907 version ".tar.gz"))
7908 (file-name (string-append name "-" version ".tar.gz"))
7909 (sha256
7910 (base32
7911 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
7912 (build-system ant-build-system)
7913 (arguments
7914 `(#:jar-name "java-jcommander.jar"
7915 #:jdk ,icedtea-8
7916 #:tests? #f; requires testng which depends on jcommander
7917 #:source-dir "src/main/java"))
7918 (home-page "http://jcommander.org")
7919 (synopsis "Command line parameters parser")
7920 (description "JCommander is a very small Java framework that makes it
7921 trivial to parse command line parameters. Parameters are declared with
7922 annotations.")
7923 (license license:asl2.0)))
7924
7925 (define-public java-bsh
7926 (package
7927 (name "java-bsh")
7928 (version "2.0b6")
7929 (source (origin
7930 (method url-fetch)
7931 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
7932 version ".tar.gz"))
7933 (file-name (string-append name "-" version ".tar.gz"))
7934 (sha256
7935 (base32
7936 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
7937 (build-system ant-build-system)
7938 (arguments
7939 `(#:build-target "jarall"
7940 #:test-target "junit-tests-all"
7941 #:phases
7942 (modify-phases %standard-phases
7943 (replace 'install
7944 (lambda* (#:key outputs #:allow-other-keys)
7945 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
7946 (mkdir-p share)
7947 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
7948 #t))))))
7949 (home-page "http://beanshell.org/")
7950 (synopsis "Lightweight Scripting for Java")
7951 (description "BeanShell is a small, free, embeddable Java source
7952 interpreter with object scripting language features, written in Java.
7953 BeanShell dynamically executes standard Java syntax and extends it with common
7954 scripting conveniences such as loose types, commands, and method closures like
7955 those in Perl and JavaScript.")
7956 (license license:asl2.0)))
7957
7958 (define-public java-fest-util
7959 (package
7960 (name "java-fest-util")
7961 (version "1.2.5")
7962 (source (origin
7963 (method url-fetch)
7964 (uri (string-append "https://github.com/alexruiz/fest-util/"
7965 "archive/fest-util-" version ".tar.gz"))
7966 (sha256
7967 (base32
7968 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
7969 (build-system ant-build-system)
7970 (arguments
7971 `(#:jar-name "java-fest-util.jar"
7972 #:source-dir "src/main/java"))
7973 (native-inputs
7974 `(("junit" ,java-junit)
7975 ("hamcrest" ,java-hamcrest-core)))
7976 (home-page "https://github.com/alexruiz/fest-util")
7977 (synopsis "FEST common utilities")
7978 (description "Common utilities used in all FEST module.")
7979 (license license:asl2.0)))
7980
7981 (define-public java-fest-test
7982 (package
7983 (name "java-fest-test")
7984 (version "2.1.0")
7985 (source (origin
7986 (method url-fetch)
7987 (uri (string-append "https://github.com/alexruiz/fest-test/"
7988 "archive/fest-test-" version ".tar.gz"))
7989 (sha256
7990 (base32
7991 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
7992 (build-system ant-build-system)
7993 (arguments
7994 `(#:jar-name "java-fest-test.jar"
7995 #:source-dir "src/main/java"
7996 #:tests? #f)); no tests
7997 (inputs
7998 `(("junit" ,java-junit)))
7999 (home-page "https://github.com/alexruiz/fest-test")
8000 (synopsis "Common FEST testing infrastructure")
8001 (description "Fest-test contains the common FEST testing infrastructure.")
8002 (license license:asl2.0)))
8003
8004 (define-public java-fest-assert
8005 (package
8006 (name "java-fest-assert")
8007 (version "2.0M10")
8008 (source (origin
8009 (method url-fetch)
8010 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8011 "archive/fest-assert-core-" version ".tar.gz"))
8012 (sha256
8013 (base32
8014 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8015 (build-system ant-build-system)
8016 (arguments
8017 `(#:jar-name "java-fest-assert.jar"
8018 #:source-dir "src/main/java"
8019 #:test-exclude
8020 (list
8021 "**/Abstract*.java"
8022 "**/*BaseTest.java"
8023 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8024 "**/MessageFormatter_format_Test.java"
8025 "**/internal/*/*_assert*_Test.java")))
8026 (inputs
8027 `(("java-fest-util" ,java-fest-util)))
8028 (native-inputs
8029 `(("java-junit" ,java-junit)
8030 ("java-fest-test" ,java-fest-test)
8031 ("java-hamcrest-core" ,java-hamcrest-core)
8032 ("java-mockito" ,java-mockito-1)
8033 ("java-cglib" ,java-cglib)
8034 ("java-objenesis" ,java-objenesis)
8035 ("java-asm" ,java-asm)))
8036 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8037 (synopsis "FEST fluent assertions")
8038 (description "FEST-Assert provides a fluent interface for assertions.")
8039 (license license:asl2.0)))
8040
8041 (define-public java-testng
8042 (package
8043 (name "java-testng")
8044 (version "6.14.3")
8045 (source (origin
8046 (method git-fetch)
8047 (uri (git-reference
8048 (url "https://github.com/cbeust/testng.git")
8049 (commit version)))
8050 (file-name (string-append name "-" version "-checkout"))
8051 (sha256
8052 (base32
8053 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8054 (build-system ant-build-system)
8055 (arguments
8056 `(#:jdk ,icedtea-8; java.util.function
8057 #:jar-name "java-testng.jar"
8058 #:source-dir "src/main/java"
8059 #:phases
8060 (modify-phases %standard-phases
8061 ;; FIXME: I don't know why these tests fail
8062 (add-after 'unpack 'delete-failing-tests
8063 (lambda _
8064 (substitute* "src/test/resources/testng.xml"
8065 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8066 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8067 #t))
8068 ;; We don't have groovy
8069 (add-after 'unpack 'delete-groovy-tests
8070 (lambda _
8071 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8072 (substitute* "src/test/resources/testng.xml"
8073 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8074 #t))
8075 (add-before 'build 'copy-resources
8076 (lambda _
8077 (copy-recursively "src/main/resources" "build/classes")
8078 #t))
8079 (add-before 'check 'copy-test-resources
8080 (lambda _
8081 (copy-recursively "src/test/resources" "build/test-classes")
8082 #t))
8083 (replace 'check
8084 (lambda _
8085 (system* "ant" "compile-tests")
8086 ;; we don't have groovy
8087 (substitute* "src/test/resources/testng.xml"
8088 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8089 (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH")
8090 ":build/classes"
8091 ":build/test-classes")
8092 "-Dtest.resources.dir=src/test/resources"
8093 "org.testng.TestNG" "src/test/resources/testng.xml")))))))
8094 (propagated-inputs
8095 `(("junit" ,java-junit)
8096 ("java-jsr305" ,java-jsr305)
8097 ("java-bsh" ,java-bsh)
8098 ("java-jcommander" ,java-jcommander)
8099 ("java-guice" ,java-guice)
8100 ("snakeyaml" ,java-snakeyaml)))
8101 (native-inputs
8102 `(("guava" ,java-guava)
8103 ("java-javax-inject" ,java-javax-inject)
8104 ("java-hamcrest" ,java-hamcrest-all)
8105 ("java-assertj" ,java-assertj)
8106 ("java-mockito" ,java-mockito-1)
8107 ("cglib" ,java-cglib)
8108 ("asm" ,java-asm)
8109 ("aopalliance" ,java-aopalliance)))
8110 (home-page "http://testng.org")
8111 (synopsis "Testing framework")
8112 (description "TestNG is a testing framework inspired from JUnit and NUnit
8113 but introducing some new functionalities that make it more powerful and easier
8114 to use.")
8115 (license license:asl2.0)))
8116
8117 (define-public java-jnacl
8118 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8119 (revision "2"))
8120 (package
8121 (name "java-jnacl")
8122 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8123 (source (origin
8124 (method git-fetch)
8125 (uri (git-reference
8126 (url "https://github.com/neilalexander/jnacl.git")
8127 (commit commit)))
8128 (file-name (git-file-name name version))
8129 (sha256
8130 (base32
8131 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8132 (build-system ant-build-system)
8133 (arguments
8134 `(#:jar-name "jnacl.jar"
8135 #:source-dir "src/main/java"
8136 #:jdk ,icedtea-8
8137 #:phases
8138 (modify-phases %standard-phases
8139 (add-before 'build 'fix-tests
8140 (lambda _
8141 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8142 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8143 (("assertions.Assertions") "assertions.api.Assertions"))
8144 #t))
8145 (replace 'check
8146 (lambda _
8147 (invoke "ant" "compile-tests")
8148 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8149 ":build/classes"
8150 ":build/test-classes")
8151 "org.testng.TestNG" "-testclass"
8152 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8153 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8154 ":build/classes"
8155 ":build/test-classes")
8156 "org.testng.TestNG" "-testclass"
8157 "build/test-classes/com/neilalexander/jnacl/NaClTest.class")
8158 #t)))))
8159 (native-inputs
8160 `(("java-testng" ,java-testng)
8161 ("java-fest-util" ,java-fest-util)
8162 ("java-fest-assert" ,java-fest-assert)))
8163 (home-page "https://github.com/neilalexander/jnacl")
8164 (synopsis "Java implementation of NaCl")
8165 (description "Pure Java implementation of the NaCl: Networking and
8166 Cryptography library.")
8167 (license license:bsd-2))))
8168
8169 (define-public java-mvel2
8170 (package
8171 (name "java-mvel2")
8172 (version "2.3.1")
8173 (source (origin
8174 (method url-fetch)
8175 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
8176 version ".Final.tar.gz"))
8177 (sha256
8178 (base32
8179 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
8180 (build-system ant-build-system)
8181 (arguments
8182 `(#:jar-name "mvel2.jar"
8183 #:source-dir "src/main/java"
8184 #:test-exclude
8185 (list "**/Abstract*.java"
8186 ;; Base class with no tests
8187 "**/MVELThreadTest.java")
8188 #:phases
8189 (modify-phases %standard-phases
8190 (add-after 'install 'install-bin
8191 (lambda* (#:key outputs #:allow-other-keys)
8192 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
8193 (mkdir-p bin)
8194 (with-output-to-file (string-append bin "/mvel2")
8195 (lambda _
8196 (display
8197 (string-append
8198 "#!" (which "bash") "\n"
8199 "if [ \"$#\" -ne \"2\" ]; then\n"
8200 "echo 'Usage: mvel2 <script> <out.dir>'\n"
8201 "exit\n"
8202 "fi\n"
8203 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
8204 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
8205 " org.mvel2.sh.Main $1"))))
8206 (chmod (string-append bin "/mvel2") #o755))
8207 #t)))))
8208 (native-inputs
8209 `(("junit" ,java-junit)
8210 ("hamcrest" ,java-hamcrest-core)))
8211 (home-page "https://github.com/mvel/mvel")
8212 (synopsis "MVFLEX Expression Language")
8213 (description "MVEL has largely been inspired by Java syntax, but has some
8214 fundamental differences aimed at making it more efficient as an expression
8215 language, such as operators that directly support collection, array and string
8216 matching, as well as regular expressions. MVEL is used to evaluate expressions
8217 written using Java syntax.
8218
8219 In addition to the expression language, MVEL serves as a templating language for
8220 configuration and string construction.")
8221 (license license:asl2.0)))
8222
8223 (define-public java-commons-jexl-2
8224 (package
8225 (name "java-commons-jexl")
8226 (version "2.1.1")
8227 (source (origin
8228 (method url-fetch)
8229 (uri (string-append "mirror://apache/commons/jexl/source/"
8230 "commons-jexl-" version "-src.tar.gz"))
8231 (sha256
8232 (base32
8233 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
8234 (build-system ant-build-system)
8235 (arguments
8236 `(#:jar-name "commons-jexl-2.jar"
8237 #:jdk ,icedtea-8
8238 #:source-dir "src/main/java"
8239 #:phases
8240 (modify-phases %standard-phases
8241 (add-before 'check 'disable-broken-tests
8242 (lambda* (#:key inputs #:allow-other-keys)
8243 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
8244 (substitute* "ArithmeticTest.java"
8245 (("asserter.assertExpression\\(\"3 / 0\"") "//")
8246 (("asserter.assertExpression\\(\"imanull") "//"))
8247 ;; This test fails with "ambiguous method invocation"
8248 (delete-file "CacheTest.java")
8249 ;; This test doesn't have access to the temp directory
8250 (substitute* "ClassCreatorTest.java"
8251 (("java.io.tmpdir") "user.dir"))
8252 ;; This test fails in trying to detect whether it can run.
8253 (substitute* "ClassCreator.java"
8254 (("boolean canRun =.*") "boolean canRun = false;\n"))
8255 ;; ...and these tests depend on it.
8256 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
8257 (delete-file "scripting/JexlScriptEngineTest.java"))
8258 #t))
8259 (add-before 'build 'run-javacc
8260 (lambda _
8261 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
8262 (invoke "java" "jjtree" "Parser.jjt")
8263 (invoke "java" "javacc" "Parser.jj"))
8264 #t)))))
8265 (inputs
8266 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
8267 (native-inputs
8268 `(("java-junit" ,java-junit)
8269 ("java-hamcrest-core" ,java-hamcrest-core)
8270 ("javacc" ,javacc-4)))
8271 (home-page "https://commons.apache.org/proper/commons-jexl/")
8272 (synopsis "Java Expression Language ")
8273 (description "JEXL is a library intended to facilitate the implementation
8274 of dynamic and scripting features in applications and frameworks written in
8275 Java. JEXL implements an Expression Language based on some extensions to the
8276 JSTL Expression Language supporting most of the constructs seen in
8277 shell-script or ECMAScript. Its goal is to expose scripting features usable
8278 by technical operatives or consultants working with enterprise platforms.")
8279 (license license:asl2.0)))
8280
8281 (define-public java-lz4
8282 (package
8283 (name "java-lz4")
8284 (version "1.4.0")
8285 (source (origin
8286 (method url-fetch)
8287 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
8288 version ".tar.gz"))
8289 (file-name (string-append name "-" version ".tar.gz"))
8290 (sha256
8291 (base32
8292 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
8293 (build-system ant-build-system)
8294 (arguments
8295 `(#:jar-name "lz4.jar"
8296 #:jdk ,icedtea-8
8297 #:source-dir "src/java:src/java-unsafe"
8298 #:tests? #f; FIXME: requires more dependencies
8299 #:phases
8300 (modify-phases %standard-phases
8301 (add-before 'configure 'generate-source
8302 (lambda _
8303 (with-directory-excursion "src/build/source_templates"
8304 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
8305 #t)))))
8306 (native-inputs
8307 `(("mvel" ,java-mvel2)))
8308 (home-page "https://jpountz.github.io/lz4-java")
8309 (synopsis "Compression algorithm")
8310 (description "LZ4 - Java is a Java port of the popular lz4 compression
8311 algorithms and xxHash hashing algorithm.")
8312 (license license:asl2.0)))
8313
8314 (define-public java-bouncycastle
8315 (package
8316 (name "java-bouncycastle")
8317 (version "1.59")
8318 (source (origin
8319 (method url-fetch)
8320 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
8321 (substring version 0 1) "rv"
8322 (substring version 2 4) ".tar.gz"))
8323 (sha256
8324 (base32
8325 "1bwl499whlbq896w18idqw2dkp8v0wp0npv9g71i5fgf8xjh0k3q"))
8326 (modules '((guix build utils)))
8327 (snippet
8328 '(begin
8329 (for-each delete-file
8330 (find-files "." "\\.jar$"))
8331 #t))))
8332 (build-system ant-build-system)
8333 (arguments
8334 `(#:jdk ,icedtea-8
8335 #:tests? #f
8336 #:phases
8337 (modify-phases %standard-phases
8338 (replace 'build
8339 (lambda _
8340 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
8341 (invoke "ant" "-f" "ant/jdk15+.xml" "build")
8342 #t))
8343 ;; FIXME: the tests freeze.
8344 ;; (replace 'check
8345 ;; (lambda _
8346 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
8347 (replace 'install
8348 (install-jars "build/artifacts/jdk1.5/jars")))))
8349 (inputs
8350 `(("java-javax-mail" ,java-javax-mail)))
8351 (native-inputs
8352 `(("unzip" ,unzip)
8353 ("junit" ,java-junit)
8354 ("java-native-access" ,java-native-access)
8355 ("java-native-access-platform" ,java-native-access-platform)))
8356 (home-page "https://www.bouncycastle.org")
8357 (synopsis "Cryptographic library")
8358 (description "Bouncy Castle is a cryptographic library for the Java
8359 programming language.")
8360 (license license:expat)))
8361
8362 (define-public java-lmax-disruptor
8363 (package
8364 (name "java-lmax-disruptor")
8365 (version "3.3.7")
8366 (source (origin
8367 (method url-fetch)
8368 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
8369 "archive/" version ".tar.gz"))
8370 (file-name (string-append name "-" version ".tar.gz"))
8371 (sha256
8372 (base32
8373 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
8374 (build-system ant-build-system)
8375 (arguments
8376 `(#:jar-name "java-lmax-disruptor.jar"
8377 #:jdk ,icedtea-8
8378 #:tests? #f)); tests hang
8379 (inputs
8380 `(("junit" ,java-junit)
8381 ("java-hdrhistogram" ,java-hdrhistogram)
8382 ("java-jmock" ,java-jmock)
8383 ("java-jmock-legacy" ,java-jmock-legacy)
8384 ("java-jmock-junit4" ,java-jmock-junit4)
8385 ("java-hamcrest-all" ,java-hamcrest-all)))
8386 (native-inputs
8387 `(("cglib" ,java-cglib)
8388 ("objenesis" ,java-objenesis)
8389 ("asm" ,java-asm)))
8390 (home-page "https://www.lmax.com/disruptor")
8391 (synopsis "High performance inter-thread communication")
8392 (description "LMAX Disruptor is a software pattern and software component
8393 for high performance inter-thread communication that avoids the need for
8394 message queues or resource locking.")
8395 (license license:asl2.0)))
8396
8397 (define-public java-commons-bcel
8398 (package
8399 (name "java-commons-bcel")
8400 (version "6.1")
8401 (source (origin
8402 (method url-fetch)
8403 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
8404 version "-src.tar.gz"))
8405 (sha256
8406 (base32
8407 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
8408 (build-system ant-build-system)
8409 (arguments
8410 `(#:jar-name "bcel.jar"
8411 #:jdk ,icedtea-8
8412 #:source-dir "src/main/java"
8413 #:test-dir "src/test/java"
8414 ;; FIXME: Tests require the unpackaged jna.
8415 #:tests? #f))
8416 (home-page "https://commons.apache.org/proper/commons-bcel/")
8417 (synopsis "Byte code engineering library")
8418 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
8419 intended to give users a convenient way to analyze, create, and
8420 manipulate (binary) Java class files. Classes are represented by objects
8421 which contain all the symbolic information of the given class: methods, fields
8422 and byte code instructions, in particular.
8423
8424 Such objects can be read from an existing file, be transformed by a
8425 program (e.g. a class loader at run-time) and written to a file again. An
8426 even more interesting application is the creation of classes from scratch at
8427 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
8428 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
8429 of Java @code{.class} files.")
8430 (license license:asl2.0)))
8431
8432 (define-public java-xerial-core
8433 (package
8434 (name "java-xerial-core")
8435 (version "2.1")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
8439 version ".tar.gz"))
8440 (file-name (string-append name "-" version ".tar.gz"))
8441 (sha256
8442 (base32
8443 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
8444 (build-system ant-build-system)
8445 (arguments
8446 `(#:jar-name "xerial-core.jar"
8447 #:source-dir "xerial-core/src/main/java"
8448 #:test-dir "xerial-core/src/test"
8449 #:phases
8450 (modify-phases %standard-phases
8451 (add-before 'build 'copy-resources
8452 (lambda _
8453 (copy-recursively "xerial-core/src/main/resources"
8454 "build/classes")
8455 #t)))))
8456 (native-inputs
8457 `(("junit" ,java-junit)
8458 ("hamcrest" ,java-hamcrest-core)))
8459 (home-page "https://github.com/xerial/xerial-java")
8460 (synopsis "Data management libraries for Java")
8461 (description "Xerial is a set of data management libraries for the Java
8462 programming language. The ultimate goal of the Xerial project is to manage
8463 everything as database, including class objects, text format data, data
8464 streams, etc.")
8465 (license license:asl2.0)))
8466
8467 (define-public java-powermock-reflect
8468 (package
8469 (name "java-powermock-reflect")
8470 (version "1.7.3")
8471 (source (origin
8472 (method url-fetch)
8473 (uri (string-append "https://github.com/powermock/powermock/"
8474 "archive/powermock-" version ".tar.gz"))
8475 (file-name (string-append name "-" version ".tar.gz"))
8476 (sha256
8477 (base32
8478 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
8479 (patches
8480 (search-patches "java-powermock-fix-java-files.patch"))))
8481 (build-system ant-build-system)
8482 (arguments
8483 `(#:jar-name "java-powermock-reflect.jar"
8484 #:jdk ,icedtea-8
8485 #:source-dir "powermock-reflect/src/main/java"
8486 #:test-dir "powermock-reflect/src/test"))
8487 (inputs
8488 `(("java-objenesis" ,java-objenesis)))
8489 (native-inputs
8490 `(("junit" ,java-junit)
8491 ("cglib" ,java-cglib)
8492 ("asm" ,java-asm)
8493 ("hamcrest" ,java-hamcrest-core)
8494 ("assertj" ,java-assertj)))
8495 (home-page "https://github.com/powermock/powermock")
8496 (synopsis "Mock library extension framework")
8497 (description "PowerMock is a framework that extends other mock libraries
8498 such as EasyMock with more powerful capabilities. PowerMock uses a custom
8499 classloader and bytecode manipulation to enable mocking of static methods,
8500 constructors, final classes and methods, private methods, removal of static
8501 initializers and more. By using a custom classloader no changes need to be
8502 done to the IDE or continuous integration servers which simplifies adoption.")
8503 (license license:asl2.0)))
8504
8505 (define-public java-powermock-core
8506 (package
8507 (inherit java-powermock-reflect)
8508 (name "java-powermock-core")
8509 (arguments
8510 `(#:jar-name "java-powermock-core.jar"
8511 #:source-dir "powermock-core/src/main/java"
8512 #:test-dir "powermock-core/src/test"
8513 #:tests? #f; requires powermock-api
8514 #:jdk ,icedtea-8
8515 #:phases
8516 (modify-phases %standard-phases
8517 (add-before 'build 'copy-resources
8518 (lambda _
8519 (copy-recursively "powermock-core/src/main/resources"
8520 "build/classes"))))))
8521 (inputs
8522 `(("reflect" ,java-powermock-reflect)
8523 ("javassist" ,java-jboss-javassist)))
8524 (native-inputs
8525 `(("junit" ,java-junit)
8526 ("assertj" ,java-assertj)
8527 ("mockito" ,java-mockito-1)))))
8528
8529 (define-public java-powermock-api-support
8530 (package
8531 (inherit java-powermock-reflect)
8532 (name "java-powermock-api-support")
8533 (build-system ant-build-system)
8534 (arguments
8535 `(#:jar-name "java-powermock-api-support.jar"
8536 #:jdk ,icedtea-8
8537 #:source-dir "powermock-api/powermock-api-support/src/main/java"
8538 #:tests? #f)); no tests
8539 (inputs
8540 `(("core" ,java-powermock-core)
8541 ("reflect" ,java-powermock-reflect)))))
8542
8543 (define-public java-powermock-modules-junit4-common
8544 (package
8545 (inherit java-powermock-reflect)
8546 (name "java-powermock-modules-junit4-common")
8547 (build-system ant-build-system)
8548 (arguments
8549 `(#:jar-name "java-powermock-modules-junit4-common.jar"
8550 #:jdk ,icedtea-8
8551 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
8552 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
8553 (inputs
8554 `(("core" ,java-powermock-core)
8555 ("easymock" ,java-easymock)
8556 ("reflect" ,java-powermock-reflect)
8557 ("hamcrest" ,java-hamcrest-core)
8558 ("cglib" ,java-cglib)))))
8559
8560 (define-public java-powermock-modules-junit4
8561 (package
8562 (inherit java-powermock-reflect)
8563 (name "java-powermock-modules-junit4")
8564 (build-system ant-build-system)
8565 (arguments
8566 `(#:jar-name "java-powermock-modules-junit4.jar"
8567 #:jdk ,icedtea-8
8568 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
8569 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
8570 #:phases
8571 (modify-phases %standard-phases
8572 (add-before 'build 'fix-junit-detection
8573 (lambda _
8574 ;; Our junit version is 4.12-SNAPSHOT
8575 (substitute* (find-files "powermock-modules/powermock-module-junit4"
8576 "PowerMockJUnit4MethodValidator.java")
8577 (("4.12") "4.12-SNAPSHOT")))))))
8578 (inputs
8579 `(("core" ,java-powermock-core)
8580 ("reflect" ,java-powermock-reflect)
8581 ("common" ,java-powermock-modules-junit4-common)
8582 ("cglib" ,java-cglib)))
8583 (native-inputs
8584 `(("easymock" ,java-easymock)
8585 ("hamcrest" ,java-hamcrest-core)
8586 ("objenesis" ,java-objenesis)
8587 ("asm" ,java-asm)
8588 ("junit" ,java-junit)))))
8589
8590 (define-public java-powermock-api-easymock
8591 (package
8592 (inherit java-powermock-reflect)
8593 (name "java-powermock-api-easymock")
8594 (build-system ant-build-system)
8595 (arguments
8596 `(#:jar-name "java-powermock-api-easymock.jar"
8597 #:jdk ,icedtea-8
8598 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
8599 #:tests? #f; no tests
8600 #:phases
8601 (modify-phases %standard-phases
8602 (add-before 'build 'fix-file
8603 (lambda _
8604 ;; FIXME: This looks wrong, but it fixes a build error.
8605 (with-directory-excursion "powermock-api/powermock-api-easymock"
8606 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
8607 (("classLoader instanceof MockClassLoader") "false")
8608 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
8609 #t)))))
8610 (inputs
8611 `(("core" ,java-powermock-core)
8612 ("easymock" ,java-easymock)
8613 ("reflect" ,java-powermock-reflect)
8614 ("support" ,java-powermock-api-support)
8615 ("cglib" ,java-cglib)))))
8616
8617 (define-public java-jboss-jms-api-spec
8618 (package
8619 (name "java-jboss-jms-api-spec")
8620 (version "2.0")
8621 (source (origin
8622 (method url-fetch)
8623 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
8624 "archive/jboss-jms-api_" version
8625 "_spec-1.0.1.Final.tar.gz"))
8626 (sha256
8627 (base32
8628 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
8629 (build-system ant-build-system)
8630 (arguments
8631 `(#:jar-name "java-jboss-jms-api_spec.jar"
8632 #:jdk ,icedtea-8
8633 #:source-dir "."
8634 #:tests? #f)); no tests
8635 (home-page "https://github.com/jboss/jboss-jms-api_spec")
8636 (synopsis "Java Message Service API specification")
8637 (description "Java Message Service (JMS) API is used to send messages
8638 messages between two or more clients. It is a messaging standard that allows
8639 application components to create, send, receive, and read messages.")
8640 ; either gpl2 only with GPL Classpath Exception, or cddl.
8641 (license (list license:gpl2 license:cddl1.0))))
8642
8643 (define-public java-mail
8644 (package
8645 (name "java-mail")
8646 (version "1.6.0")
8647 (source (origin
8648 (method url-fetch)
8649 (uri (string-append "https://github.com/javaee/javamail/archive/"
8650 "JAVAMAIL-1_6_0.tar.gz"))
8651 (sha256
8652 (base32
8653 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
8654 (build-system ant-build-system)
8655 (arguments
8656 `(#:jar-name "java-mail.jar"
8657 #:jdk ,icedtea-8
8658 #:source-dir "mail/src/main/java"
8659 #:test-dir "mail/src/test"
8660 #:test-exclude
8661 (list "**/CollectorFormatterTest.java"
8662 "**/CompactFormatterTest.java"
8663 "**/DurationFilterTest.java"
8664 "**/MailHandlerTest.java"
8665 "**/GetLocalAddressTest.java"
8666 ;; FIXME: both end with:
8667 ;; java.lang.ClassNotFoundException:
8668 ;; javax.mail.internet.MimeMultipartParseTest
8669 "**/MimeMultipartParseTest.java"
8670 "**/SearchTermSerializationTest.java")
8671 #:phases
8672 (modify-phases %standard-phases
8673 (add-before 'configure 'move-version.java
8674 (lambda _
8675 (copy-file "mail/src/main/resources/javax/mail/Version.java"
8676 "mail/src/main/java/javax/mail/Version.java")
8677 #t))
8678 (add-before 'build 'copy-resources
8679 (lambda _
8680 (copy-recursively "mail/src/main/resources/META-INF"
8681 "build/classes/META-INF")
8682 #t)))))
8683 (native-inputs
8684 `(("junit" ,java-junit)
8685 ("hamcrest" ,java-hamcrest-core)))
8686 (home-page "https://javaee.github.io/javamail/")
8687 (synopsis "Mail-related functionnalities in Java")
8688 (description "The JavaMail API provides a platform-independent and
8689 protocol-independent framework to build mail and messaging applications.")
8690 ;; General Public License Version 2 only ("GPL") or the Common Development
8691 ;; and Distribution License("CDDL")
8692 (license (list license:cddl1.1
8693 license:gpl2)))); with classpath exception
8694
8695 (define-public java-jeromq
8696 (package
8697 (name "java-jeromq")
8698 (version "0.4.3")
8699 (source (origin
8700 (method git-fetch)
8701 (uri (git-reference
8702 (url "https://github.com/zeromq/jeromq.git")
8703 (commit (string-append "v" version))))
8704 (file-name (string-append name "-" version "-checkout"))
8705 (sha256
8706 (base32
8707 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
8708 (patches (search-patches "java-jeromq-fix-tests.patch"))))
8709 (build-system ant-build-system)
8710 (arguments
8711 `(#:jar-name "java-jeromq.jar"
8712 #:source-dir "src/main/java"
8713 #:jdk ,icedtea-8
8714 #:test-exclude
8715 (list
8716 "**/Abstract*.java"
8717 ;; Requires network
8718 "**/ZBeaconTest.java"
8719 ;; Failures
8720 "**/DealerSpecTest.java"
8721 "**/CustomDecoderTest.java"
8722 "**/CustomEncoderTest.java"
8723 "**/ConnectRidTest.java"
8724 "**/ReqSpecTest.java"
8725 "**/PushPullSpecTest.java"
8726 "**/PubSubHwmTest.java"
8727 "**/RouterSpecTest.java"
8728 "**/ProxyTest.java")))
8729 (inputs
8730 `(("java-jnacl" ,java-jnacl)))
8731 (native-inputs
8732 `(("java-hamcrest-core" ,java-hamcrest-core)
8733 ("junit" ,java-junit)))
8734 (home-page "http://zeromq.org/bindings:java")
8735 (synopsis "Java binding for 0MQ")
8736 (description "Jeromq provides the java bindings for 0MQ.")
8737 (license license:mpl2.0)))
8738
8739 (define-public java-kafka-clients
8740 (package
8741 (name "java-kafka-clients")
8742 (version "1.0.0")
8743 (source (origin
8744 (method url-fetch)
8745 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
8746 version "-src.tgz"))
8747 (sha256
8748 (base32
8749 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
8750 (build-system ant-build-system)
8751 (arguments
8752 `(#:jar-name "java-kafka-clients.jar"
8753 #:jdk ,icedtea-8
8754 #:source-dir "clients/src/main/java"
8755 #:test-dir "clients/src/test"
8756 #:test-exclude
8757 (list
8758 ;; This file does not contain a class
8759 "**/IntegrationTest.java"
8760 ;; Requires network
8761 "**/ClientUtilsTest.java"
8762 ;; End with errors that seem related to our powermock
8763 "**/KafkaProducerTest.java"
8764 "**/BufferPoolTest.java")))
8765 (inputs
8766 `(("java-slf4j-api" ,java-slf4j-api)
8767 ("java-lz4" ,java-lz4)))
8768 (native-inputs
8769 `(("junit" ,java-junit)
8770 ("hamcrest" ,java-hamcrest-all)
8771 ("objenesis" ,java-objenesis)
8772 ("asm" ,java-asm)
8773 ("cglib" ,java-cglib)
8774 ("javassist" ,java-jboss-javassist)
8775 ("snappy" ,java-snappy)
8776 ("easymock" ,java-easymock)
8777 ("powermock" ,java-powermock-core)
8778 ("powermock-easymock" ,java-powermock-api-easymock)
8779 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
8780 ("powermock-junit4" ,java-powermock-modules-junit4)
8781 ("powermock-support" ,java-powermock-api-support)
8782 ("java-bouncycastle" ,java-bouncycastle)))
8783 (home-page "https://kafka.apache.org")
8784 (synopsis "Distributed streaming platform")
8785 (description "Kafka is a distributed streaming platform, which means:
8786 @itemize
8787 @item it can publish and subscribe to streams of records;
8788 @item it can store streams of records in a fault-tolerant way;
8789 @item it can process streams of records as they occur.
8790 @end itemize")
8791 ;; Either cddl or gpl2 only.
8792 (license (list license:cddl1.1; actually cddl1.1
8793 license:gpl2)))); with classpath exception
8794
8795 (define-public java-jdom
8796 (package
8797 (name "java-jdom")
8798 (version "1.1.3")
8799 (source (origin
8800 (method url-fetch)
8801 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
8802 version ".tar.gz"))
8803 (sha256
8804 (base32
8805 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
8806 (build-system ant-build-system)
8807 (arguments
8808 `(#:build-target "package"
8809 #:tests? #f; tests are run as part of the build process
8810 #:phases
8811 (modify-phases %standard-phases
8812 (replace 'install
8813 (install-jars "build")))))
8814 (home-page "http://jdom.org/")
8815 (synopsis "Access, manipulate, and output XML data")
8816 (description "Java-based solution for accessing, manipulating, and
8817 outputting XML data from Java code.")
8818 (license license:bsd-4)))
8819
8820 (define-public java-geronimo-xbean-reflect
8821 (package
8822 (name "java-geronimo-xbean-reflect")
8823 (version "4.5")
8824 (source (origin
8825 (method svn-fetch)
8826 (uri (svn-reference
8827 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
8828 (revision 1807396)))
8829 (file-name (string-append name "-" version))
8830 (sha256
8831 (base32
8832 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
8833 (build-system ant-build-system)
8834 (arguments
8835 `(#:jar-name "geronimo-xbean-reflect.jar"
8836 #:source-dir "xbean-reflect/src/main/java"
8837 #:test-dir "xbean-reflect/src/test"
8838 #:jdk ,icedtea-8
8839 #:test-exclude
8840 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
8841 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
8842 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
8843 #:phases
8844 (modify-phases %standard-phases
8845 (add-before 'build 'fix-source
8846 (lambda _
8847 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
8848 ;; org.apache.xbean.asm6 is actually repackaged java-asm
8849 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
8850 (("org.apache.xbean.asm5") "org.objectweb.asm"))
8851 #t))))))
8852 (inputs
8853 `(("asm" ,java-asm)
8854 ("log4j" ,java-log4j-api)
8855 ("log4j-1.2" ,java-log4j-1.2-api)
8856 ("log4j-core" ,java-log4j-core)
8857 ("logging" ,java-commons-logging-minimal)))
8858 (native-inputs
8859 `(("junit" ,java-junit)))
8860 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
8861 (synopsis "Dependency injection helper")
8862 (description "Xbean-reflect provides very flexible ways to create objects
8863 and graphs of objects for dependency injection frameworks")
8864 (license license:asl2.0)))
8865
8866 (define-public java-geronimo-xbean-bundleutils
8867 (package
8868 (inherit java-geronimo-xbean-reflect)
8869 (name "java-geronimo-xbean-bundleutils")
8870 (arguments
8871 `(#:jar-name "geronimo-xbean-bundleutils.jar"
8872 #:source-dir "xbean-bundleutils/src/main/java"
8873 #:test-dir "xbean-bundleutils/src/test"
8874 #:phases
8875 (modify-phases %standard-phases
8876 (add-before 'build 'fix-java
8877 (lambda _
8878 ;; We use a more recent version of osgi, so this file requires
8879 ;; more interface method implementations.
8880 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
8881 (("import org.osgi.framework.ServiceRegistration;")
8882 "import org.osgi.framework.ServiceRegistration;
8883 import org.osgi.framework.ServiceFactory;
8884 import java.util.Collection;
8885 import org.osgi.framework.ServiceObjects;")
8886 (("public Bundle getBundle\\(\\)")
8887 "@Override
8888 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
8889 throw new UnsupportedOperationException();
8890 }
8891 @Override
8892 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
8893 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
8894 throw new UnsupportedOperationException();
8895 }
8896 public Bundle getBundle()"))
8897 #t)))))
8898 (inputs
8899 `(("java-slf4j" ,java-slf4j-api)
8900 ("java-asm" ,java-asm)
8901 ("java-osgi-framework" ,java-osgi-framework)
8902 ("java-eclipse-osgi" ,java-eclipse-osgi)
8903 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
8904
8905 (define-public java-geronimo-xbean-asm-util
8906 (package
8907 (inherit java-geronimo-xbean-reflect)
8908 (name "java-geronimo-xbean-asm-util")
8909 (arguments
8910 `(#:jar-name "geronimo-xbean-asm-util.jar"
8911 #:source-dir "xbean-asm-util/src/main/java"
8912 #:tests? #f)); no tests
8913 (inputs
8914 `(("java-asm" ,java-asm)))
8915 (native-inputs '())))
8916
8917 (define-public java-geronimo-xbean-finder
8918 (package
8919 (inherit java-geronimo-xbean-reflect)
8920 (name "java-geronimo-xbean-finder")
8921 (arguments
8922 `(#:jar-name "geronimo-xbean-finder.jar"
8923 #:source-dir "xbean-finder/src/main/java"
8924 #:test-dir "xbean-finder/src/test"))
8925 (inputs
8926 `(("java-slf4j-api" ,java-slf4j-api)
8927 ("java-asm" ,java-asm)
8928 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
8929 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
8930 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
8931 ("java-osgi-framework" ,java-osgi-framework)))
8932 (native-inputs
8933 `(("java-junit" ,java-junit)
8934 ("java-hamcrest-core" ,java-hamcrest-core)))))
8935
8936 (define-public java-gson
8937 (package
8938 (name "java-gson")
8939 (version "2.8.2")
8940 (source (origin
8941 (method url-fetch)
8942 (uri (string-append "https://github.com/google/gson/archive/"
8943 "gson-parent-" version ".tar.gz"))
8944 (sha256
8945 (base32
8946 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
8947 (build-system ant-build-system)
8948 (arguments
8949 `(#:jar-name "gson.jar"
8950 #:source-dir "gson/src/main/java"
8951 #:test-dir "gson/src/test"))
8952 (native-inputs
8953 `(("java-junit" ,java-junit)
8954 ("java-hamcrest-core" ,java-hamcrest-core)))
8955 (home-page "https://github.com/google/gson")
8956 (synopsis "Java serialization/deserialization library from/to JSON")
8957 (description "Gson is a Java library that can be used to convert Java
8958 Objects into their JSON representation. It can also be used to convert a JSON
8959 string to an equivalent Java object. Gson can work with arbitrary Java objects
8960 including pre-existing objects that you do not have source-code of.")
8961 (license license:asl2.0)))
8962
8963 (define-public java-hawtjni
8964 (package
8965 (name "java-hawtjni")
8966 (version "1.15")
8967 (source (origin
8968 (method url-fetch)
8969 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
8970 "hawtjni-project-" version ".tar.gz"))
8971 (sha256
8972 (base32
8973 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
8974 (build-system ant-build-system)
8975 (arguments
8976 `(#:jar-name "hawtjni.jar"
8977 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
8978 #:tests? #f; no tests
8979 #:phases
8980 (modify-phases %standard-phases
8981 (add-before 'build 'build-native
8982 (lambda* (#:key inputs #:allow-other-keys)
8983 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
8984 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8985 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
8986 "-fPIC" "-O2" include)
8987 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
8988 "-fPIC" "-O2" include)
8989 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
8990 "hawtjni.o" "hawtjni-callback.o")))
8991 #t))
8992 (add-after 'install 'install-native
8993 (lambda* (#:key outputs #:allow-other-keys)
8994 (let* ((out (assoc-ref outputs "out"))
8995 (lib (string-append out "/lib"))
8996 (inc (string-append out "/include")))
8997 (with-directory-excursion "hawtjni-generator/src/main/resources/"
8998 (install-file "libhawtjni.so" lib)
8999 (install-file "hawtjni.h" inc)))
9000 #t)))))
9001 (inputs
9002 `(("java-commons-cli" ,java-commons-cli)
9003 ("java-asm" ,java-asm)
9004 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9005 (home-page "https://fusesource.github.io/hawtjni/")
9006 (synopsis "JNI code generator")
9007 (description "HawtJNI is a code generator that produces the JNI code needed
9008 to implement Java native methods. It is based on the jnigen code generator
9009 that is part of the SWT Tools project.")
9010 (license license:asl2.0)))
9011
9012 (define-public java-jansi-native
9013 (package
9014 (name "java-jansi-native")
9015 (version "1.7")
9016 (source (origin
9017 (method url-fetch)
9018 (uri (string-append "https://github.com/fusesource/jansi-native/"
9019 "archive/jansi-native-" version ".tar.gz"))
9020 (sha256
9021 (base32
9022 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9023 (build-system ant-build-system)
9024 (arguments
9025 `(#:jar-name "jansi-native.jar"
9026 #:source-dir "src/main/java"
9027 #:tests? #f; no tests
9028 #:phases
9029 (modify-phases %standard-phases
9030 (add-before 'build 'build-native
9031 (lambda* (#:key inputs #:allow-other-keys)
9032 ;; there are more required files for windows in windows/
9033 (with-directory-excursion "src/main/native-package/src"
9034 (substitute* "jansi_ttyname.c"
9035 (("#include \"jansi_.*") ""))
9036 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9037 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9038 "/include")
9039 (string-append "-I" (assoc-ref inputs "jdk")
9040 "/include/linux")
9041 "-fPIC" "-O2")
9042 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o")
9043 #t)))
9044 (add-before 'build 'install-native
9045 (lambda _
9046 (let ((dir (string-append "build/classes/META-INF/native/"
9047 ,(match (%current-system)
9048 ((or "i686-linux" "armhf-linux")
9049 "linux32")
9050 ((or "x86_64-linux" "aarch64-linux")
9051 "linux64")))))
9052 (install-file "src/main/native-package/src/libjansi.so" dir))
9053 #t))
9054 (add-after 'install 'install-native
9055 (lambda* (#:key outputs #:allow-other-keys)
9056 (install-file "src/main/native-package/src/jansi.h"
9057 (string-append (assoc-ref outputs "out") "/include"))
9058 #t)))))
9059 (inputs
9060 `(("java-hawtjni" ,java-hawtjni)))
9061 (home-page "https://fusesource.github.io/jansi/")
9062 (synopsis "Native library for jansi")
9063 (description "This package provides the native library for jansi, a small
9064 Java library that allows you to use ANSI escape sequences to format your
9065 console output.")
9066 (license license:asl2.0)))
9067
9068 (define-public java-jansi
9069 (package
9070 (name "java-jansi")
9071 (version "1.16")
9072 (source (origin
9073 (method url-fetch)
9074 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9075 "jansi-project-" version ".tar.gz"))
9076 (sha256
9077 (base32
9078 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9079 (build-system ant-build-system)
9080 (arguments
9081 `(#:jar-name "jansi.jar"
9082 #:source-dir "jansi/src/main/java"
9083 #:test-dir "jansi/src/test"
9084 #:phases
9085 (modify-phases %standard-phases
9086 (add-after 'check 'clear-term
9087 (lambda _
9088 (zero? (system* "echo" "-e" "\\e[0m")))))))
9089 (inputs
9090 `(("java-jansi-native" ,java-jansi-native)))
9091 (native-inputs
9092 `(("java-junit" ,java-junit)
9093 ("java-hamcrest-core" ,java-hamcrest-core)))
9094 (home-page "https://fusesource.github.io/jansi/")
9095 (synopsis "Portable ANSI escape sequences")
9096 (description "Jansi is a Java library that allows you to use ANSI escape
9097 sequences to format your console output which works on every platform.")
9098 (license license:asl2.0)))
9099
9100 (define-public java-jboss-el-api-spec
9101 (package
9102 (name "java-jboss-el-api-spec")
9103 (version "3.0")
9104 (source (origin
9105 (method url-fetch)
9106 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9107 "archive/jboss-el-api_" version
9108 "_spec-1.0.7.Final.tar.gz"))
9109 (sha256
9110 (base32
9111 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9112 (build-system ant-build-system)
9113 (arguments
9114 `(#:jar-name "java-jboss-el-api_spec.jar"
9115 #:jdk ,icedtea-8))
9116 (inputs
9117 `(("java-junit" ,java-junit)))
9118 (home-page "https://github.com/jboss/jboss-el-api_spec")
9119 (synopsis "JSR-341 expression language 3.0 API")
9120 (description "This package contains an implementation of the JSR-341
9121 specification for the expression language 3.0. It implements an expression
9122 language inspired by ECMAScript and XPath. This language is used with
9123 JavaServer Pages (JSP).")
9124 ;; Either GPL2 only or CDDL.
9125 (license (list license:gpl2 license:cddl1.1))))
9126
9127 (define-public java-jboss-interceptors-api-spec
9128 (package
9129 (name "java-jboss-interceptors-api-spec")
9130 (version "1.2")
9131 (source (origin
9132 (method url-fetch)
9133 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9134 "archive/jboss-interceptors-api_" version
9135 "_spec-1.0.0.Final.tar.gz"))
9136 (sha256
9137 (base32
9138 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9139 (build-system ant-build-system)
9140 (arguments
9141 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9142 #:jdk ,icedtea-8
9143 #:source-dir "."
9144 #:tests? #f)); no tests
9145 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9146 (synopsis "Interceptors 1.2 API classes from JSR 318")
9147 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9148 API. Interceptors are used to interpose on business method invocations and
9149 specific events.")
9150 ;; Either GPL2 only or CDDL.
9151 (license (list license:gpl2 license:cddl1.1))))
9152
9153 (define-public java-cdi-api
9154 (package
9155 (name "java-cdi-api")
9156 (version "2.0")
9157 (source (origin
9158 (method url-fetch)
9159 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9160 version ".tar.gz"))
9161 (file-name (string-append name "-" version ".tar.gz"))
9162 (sha256
9163 (base32
9164 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
9165 (build-system ant-build-system)
9166 (arguments
9167 `(#:source-dir "api/src/main/java"
9168 #:jar-name "java-cdi-api.jar"
9169 #:test-dir "api/src/test"
9170 #:jdk ,icedtea-8
9171 #:tests? #f)); Tests fail because we don't have a CDI provider yet
9172 (inputs
9173 `(("java-javax-inject" ,java-javax-inject)
9174 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
9175 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
9176 (native-inputs
9177 `(("java-testng" ,java-testng)
9178 ("java-hamcrest-core" ,java-hamcrest-core)))
9179 (home-page "http://cdi-spec.org/")
9180 (synopsis "Contexts and Dependency Injection APIs")
9181 (description "Java-cdi-api contains the required APIs for Contexts and
9182 Dependency Injection (CDI).")
9183 (license license:asl2.0)))
9184
9185 (define-public java-joda-convert
9186 (package
9187 (name "java-joda-convert")
9188 (version "1.9.2")
9189 (source (origin
9190 (method url-fetch)
9191 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
9192 version ".tar.gz"))
9193 (file-name (string-append name "-" version ".tar.gz"))
9194 (sha256
9195 (base32
9196 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
9197 (build-system ant-build-system)
9198 (arguments
9199 `(#:jar-name (string-append ,name "-" ,version ".jar")
9200 #:source-dir "src/main/java"
9201 #:test-include (list "**/Test*.java")
9202 ;; Contains only interfaces and base classes (no test)
9203 #:test-exclude (list "**/test*/**.java")))
9204 (inputs
9205 `(("java-guava" ,java-guava)))
9206 (native-inputs
9207 `(("java-junit" ,java-junit)
9208 ("java-hamcrest-core" ,java-hamcrest-core)))
9209 (home-page "http://www.joda.org/joda-convert/")
9210 (synopsis "Conversion between Objects and Strings")
9211 (description "Joda-Convert provides a small set of classes to aid
9212 conversion between Objects and Strings. It is not intended to tackle the
9213 wider problem of Object to Object transformation.")
9214 (license license:asl2.0)))
9215
9216 (define-public java-joda-time
9217 (package
9218 (name "java-joda-time")
9219 (version "2.9.9")
9220 (source (origin
9221 (method url-fetch)
9222 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
9223 version ".tar.gz"))
9224 (file-name (string-append name "-" version ".tar.gz"))
9225 (sha256
9226 (base32
9227 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
9228 (build-system ant-build-system)
9229 (arguments
9230 `(#:jar-name "java-joda-time.jar"
9231 #:source-dir "src/main/java"
9232 #:test-include (list "**/Test*.java")
9233 ;; There is no runnable test in these files
9234 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
9235 #:phases
9236 (modify-phases %standard-phases
9237 (add-after 'build 'build-resources
9238 (lambda _
9239 (mkdir-p "build/classes/org/joda/time/tz/data")
9240 (mkdir-p "build/classes/org/joda/time/format")
9241 ;; This will produce the following exception:
9242 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
9243 ;; which is normal, because it doesn't exist yet. It still generates
9244 ;; the same file as in the binary one can find on maven.
9245 (invoke "java" "-cp"
9246 (string-append "build/classes:" (getenv "CLASSPATH"))
9247 "org.joda.time.tz.ZoneInfoCompiler"
9248 "-src" "src/main/java/org/joda/time/tz/src"
9249 "-dst" "build/classes/org/joda/time/tz/data"
9250 "africa" "antarctica" "asia" "australasia"
9251 "europe" "northamerica" "southamerica"
9252 "pacificnew" "etcetera" "backward" "systemv")
9253 (for-each (lambda (f)
9254 (copy-file f (string-append
9255 "build/classes/org/joda/time/format/"
9256 (basename f))))
9257 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
9258 #t))
9259 (add-before 'install 'regenerate-jar
9260 (lambda _
9261 ;; We need to regenerate the jar file to add generated data.
9262 (delete-file "build/jar/java-joda-time.jar")
9263 (invoke "ant" "jar")))
9264 (add-before 'check 'copy-test-resources
9265 (lambda _
9266 (mkdir-p "build/test-classes/org/joda/time/tz/data")
9267 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
9268 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
9269 (copy-recursively "src/test/resources" "build/test-classes")
9270 #t)))))
9271 (inputs
9272 `(("java-joda-convert" ,java-joda-convert)))
9273 (native-inputs
9274 `(("java-junit" ,java-junit)
9275 ("java-hamcrest-core" ,java-hamcrest-core)
9276 ("tzdata" ,tzdata)))
9277 (home-page "http://www.joda.org/joda-time/")
9278 (synopsis "Replacement for the Java date and time classes")
9279 (description "Joda-Time is a replacement for the Java date and time
9280 classes prior to Java SE 8.")
9281 (license license:asl2.0)))
9282
9283 (define-public java-xerces
9284 (package
9285 (name "java-xerces")
9286 (version "2.11.0")
9287 (source
9288 (origin
9289 (method url-fetch)
9290 (uri (string-append "mirror://apache/xerces/j/source/"
9291 "Xerces-J-src." version ".tar.gz"))
9292 (sha256
9293 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
9294 (patches (search-patches
9295 "java-xerces-xjavac_taskdef.patch"
9296 "java-xerces-build_dont_unzip.patch"
9297 "java-xerces-bootclasspath.patch"))))
9298 (build-system ant-build-system)
9299 (arguments
9300 `(#:tests? #f;; Test files are not present
9301 #:test-target "test"
9302 #:jdk ,icedtea-8
9303 #:phases
9304 (modify-phases %standard-phases
9305 (add-after 'unpack 'create-build.properties
9306 (lambda* (#:key inputs #:allow-other-keys)
9307 (let ((jaxp (assoc-ref inputs "java-jaxp"))
9308 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
9309 (with-output-to-file "build.properties"
9310 (lambda _
9311 (format #t
9312 "jar.jaxp = ~a/share/java/jaxp.jar~@
9313 jar.apis-ext = ~a/share/java/jaxp.jar~@
9314 jar.resolver = ~a/share/java/xml-resolver.jar~%"
9315 jaxp jaxp resolver)))
9316 ;; Make xerces use our version of jaxp in tests
9317 (substitute* "build.xml"
9318 (("xml-apis.jar")
9319 (string-append jaxp "/share/java/jaxp.jar"))
9320 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
9321 "${jar.apis}")))
9322 #t))
9323 (replace 'install (install-jars "build")))))
9324 (inputs
9325 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
9326 ("java-jaxp" ,java-jaxp)))
9327 (home-page "https://xerces.apache.org/xerces2-j/")
9328 (synopsis "Validating XML parser for Java with DOM level 3 support")
9329 (description "The Xerces2 Java parser is the reference implementation of
9330 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
9331 processor.
9332
9333 Xerces2-J supports the following standards and APIs:
9334
9335 @itemize
9336 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
9337 @item Namespaces in XML Recommendation
9338 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
9339 Range Recommendations
9340 @item Simple API for XML (SAX) 2.0.1 Core and Extension
9341 @item Java APIs for XML Processing (JAXP) 1.2.01
9342 @item XML Schema 1.0 Structures and Datatypes Recommendations
9343 @item Experimental implementation of the Document Object Model (DOM) Level 3
9344 Core and Load/Save Working Drafts
9345 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
9346 Candidate Recommendation
9347 @end itemize
9348
9349 Xerces is now able to parse documents written according to the XML 1.1
9350 Candidate Recommendation, except that it does not yet provide an option to
9351 enable normalization checking as described in section 2.13 of this
9352 specification. It also handles namespaces according to the XML Namespaces 1.1
9353 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
9354 the DOM level 3 load/save API's are in use.")
9355 (license license:asl2.0)))
9356
9357 (define-public java-jline
9358 (package
9359 (name "java-jline")
9360 (version "1.0")
9361 (source (origin
9362 (method url-fetch)
9363 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
9364 version ".tar.gz"))
9365 (sha256
9366 (base32
9367 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
9368 (build-system ant-build-system)
9369 (arguments
9370 `(#:jar-name "jline.jar"
9371 #:source-dir "src/main/java"
9372 #:test-dir "src/test"
9373 #:phases
9374 (modify-phases %standard-phases
9375 (add-before 'build 'copy-resources
9376 (lambda _
9377 (copy-recursively "src/main/resources" "build/classes")
9378 #t)))))
9379 (native-inputs
9380 `(("java-junit" ,java-junit)))
9381 (home-page "https://jline.github.io")
9382 (synopsis "Console input handling library")
9383 (description "JLine is a Java library for handling console input. It is
9384 similar in functionality to BSD editline and GNU readline but with additional
9385 features that bring it on par with the Z shell line editor.")
9386 (license license:bsd-3)))
9387
9388 (define-public java-jline-2
9389 (package
9390 (inherit java-jline)
9391 (version "2.14.5")
9392 (source (origin
9393 (method url-fetch)
9394 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
9395 version ".tar.gz"))
9396 (sha256
9397 (base32
9398 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
9399 (arguments
9400 `(#:jdk ,icedtea-8
9401 ,@(package-arguments java-jline)))
9402 (inputs
9403 `(("java-jansi" ,java-jansi)
9404 ("java-jansi-native" ,java-jansi-native)))
9405 (native-inputs
9406 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
9407 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
9408 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
9409 ("java-powermock-api-support" ,java-powermock-api-support)
9410 ("java-powermock-core" ,java-powermock-core)
9411 ("java-powermock-reflect" ,java-powermock-reflect)
9412 ("java-easymock" ,java-easymock)
9413 ("java-jboss-javassist" ,java-jboss-javassist)
9414 ("java-objenesis" ,java-objenesis)
9415 ("java-asm" ,java-asm)
9416 ("java-hamcrest-core" ,java-hamcrest-core)
9417 ("java-cglib" ,java-cglib)
9418 ("java-junit" ,java-junit)
9419 ("java-hawtjni" ,java-hawtjni)))))
9420
9421 (define-public java-xmlunit
9422 (package
9423 (name "java-xmlunit")
9424 (version "2.5.1")
9425 (source (origin
9426 (method url-fetch)
9427 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
9428 version ".tar.gz"))
9429 (file-name (string-append name "-" version ".tar.gz"))
9430 (sha256
9431 (base32
9432 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
9433 (build-system ant-build-system)
9434 (arguments
9435 `(#:jar-name "java-xmlunit.jar"
9436 #:source-dir "xmlunit-core/src/main/java"
9437 #:test-dir "xmlunit-core/src/test"
9438 #:phases
9439 (modify-phases %standard-phases
9440 (add-before 'check 'copy-test-resources
9441 (lambda* (#:key inputs #:allow-other-keys)
9442 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
9443 #t)))))
9444 (native-inputs
9445 `(("java-junit" ,java-junit)
9446 ("java-mockito-1" ,java-mockito-1)
9447 ("java-hamcrest-all" ,java-hamcrest-all)
9448 ("java-objenesis" ,java-objenesis)
9449 ("java-asm" ,java-asm)
9450 ("java-cglib" ,java-cglib)
9451 ("resources"
9452 ,(origin
9453 (method git-fetch)
9454 (uri (git-reference
9455 (url "https://github.com/xmlunit/test-resources.git")
9456 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
9457 (file-name "java-xmlunit-test-resources")
9458 (sha256
9459 (base32
9460 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
9461 (home-page "http://www.xmlunit.org/")
9462 (synopsis "XML output testing")
9463 (description "XMLUnit provides you with the tools to verify the XML you
9464 emit is the one you want to create. It provides helpers to validate against
9465 an XML Schema, assert the values of XPath queries or compare XML documents
9466 against expected outcomes.")
9467 (license license:asl2.0)))
9468
9469 (define-public java-xmlunit-legacy
9470 (package
9471 (inherit java-xmlunit)
9472 (name "java-xmlunit-legacy")
9473 (arguments
9474 `(#:jar-name "java-xmlunit-legacy.jar"
9475 #:source-dir "xmlunit-legacy/src/main/java"
9476 #:test-dir "xmlunit-legacy/src/test"))
9477 (inputs
9478 `(("java-xmlunit" ,java-xmlunit)
9479 ("java-junit" ,java-junit)))
9480 (native-inputs
9481 `(("java-mockito-1" ,java-mockito-1)))))
9482
9483 (define-public java-openchart2
9484 (package
9485 (name "java-openchart2")
9486 (version "1.4.3")
9487 (source (origin
9488 (method url-fetch)
9489 (uri (string-append "http://download.approximatrix.com/openchart2/"
9490 "openchart2-" version ".source.zip"))
9491 (sha256
9492 (base32
9493 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
9494 (build-system ant-build-system)
9495 (arguments
9496 `(#:test-target "test"
9497 #:phases
9498 (modify-phases %standard-phases
9499 (add-after 'unpack 'fix-junit-errors
9500 (lambda _
9501 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
9502 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
9503 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
9504 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
9505 "model/DefaultChartDataModelConstraintsTest.java"
9506 "model/MultiScatterDataModelConstraintsTest.java"
9507 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
9508 (("(assertEquals[^;]+);" before _)
9509 (string-append (string-drop-right before 2) ", 1E-6);"))))
9510 #t))
9511 (replace 'install (install-jars ".")))))
9512 (native-inputs
9513 `(("unzip" ,unzip)
9514 ("java-junit" ,java-junit)
9515 ("java-hamcrest-core" ,java-hamcrest-core)))
9516 (home-page "http://approximatrix.com/products/openchart2/")
9517 (synopsis "Simple plotting for Java")
9518 (description "Openchart2 provides a simple, yet powerful, interface for
9519 Java programmers to create two-dimensional charts and plots. The library
9520 features an assortment of graph styles, including advanced scatter plots, bar
9521 graphs, and pie charts.")
9522 (license license:lgpl2.1+)))
9523
9524 (define-public java-commons-httpclient
9525 (package
9526 (name "java-commons-httpclient")
9527 (version "3.1")
9528 (source (origin
9529 (method url-fetch)
9530 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
9531 "commons-httpclient/source/commons-httpclient-"
9532 version "-src.tar.gz"))
9533 (sha256
9534 (base32
9535 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
9536 (build-system ant-build-system)
9537 (arguments
9538 `(#:build-target "compile"
9539 #:test-target "test"
9540 #:tests? #f; requires junit-textui (junit 3)
9541 #:phases
9542 (modify-phases %standard-phases
9543 (add-before 'build 'fix-accent
9544 (lambda _
9545 (for-each (lambda (file)
9546 (with-fluids ((%default-port-encoding "ISO-8859-1"))
9547 (substitute* file
9548 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
9549 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
9550 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
9551 "src/test/org/apache/commons/httpclient/TestHttps.java"
9552 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))))
9553 (replace 'install
9554 (lambda* (#:key outputs #:allow-other-keys)
9555 (invoke "ant" "dist"
9556 (string-append "-Ddist.home=" (assoc-ref outputs "out")
9557 "/share/java"))
9558 #t)))))
9559 (propagated-inputs
9560 `(("java-commons-logging" ,java-commons-logging-minimal)
9561 ("java-commons-codec" ,java-commons-codec)))
9562 (home-page "https://hc.apache.org")
9563 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
9564 (description "This package contains an HTTP/1.1 compliant HTTP agent
9565 implementation. It also provides reusable components for client-side
9566 authentication, HTTP state management, and HTTP connection management.")
9567 (license license:asl2.0)))
9568
9569 (define-public java-commons-vfs
9570 (package
9571 (name "java-commons-vfs")
9572 (version "2.2")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (string-append "mirror://apache/commons/vfs/source/"
9576 "commons-vfs2-distribution-" version "-src.tar.gz"))
9577 (file-name (string-append name "-" version ".tar.gz"))
9578 (sha256
9579 (base32
9580 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
9581 (modules '((guix build utils)))
9582 (snippet
9583 '(begin
9584 (for-each delete-file
9585 (find-files "." "\\.jar$"))
9586 #t))))
9587 (build-system ant-build-system)
9588 (arguments
9589 `(#:jar-name "commons-vfs.jar"
9590 #:source-dir "commons-vfs2/src/main/java"
9591 #:test-dir "commons-vfs2/src/test"
9592 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
9593 #:tests? #f
9594 #:phases
9595 (modify-phases %standard-phases
9596 (add-before 'build 'remove-hadoop-and-webdav
9597 ; Remove these files as they are not required and depend on difficult
9598 ; packages.
9599 (lambda _
9600 (for-each delete-file-recursively
9601 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
9602 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs")))))))
9603 (inputs
9604 `(("java-commons-collections4" ,java-commons-collections4)
9605 ("java-commons-compress" ,java-commons-compress)
9606 ("java-commons-httpclient" ,java-commons-httpclient)
9607 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
9608 ("java-commons-net" ,java-commons-net)
9609 ("java-jsch" ,java-jsch)))
9610 (home-page "http://commons.apache.org/proper/commons-vfs/")
9611 (synopsis "Java filesystem library")
9612 (description "Commons VFS provides a single API for accessing various
9613 different file systems. It presents a uniform view of the files from various
9614 different sources, such as the files on local disk, on an HTTP server, or
9615 inside a Zip archive.")
9616 (license license:asl2.0)))
9617
9618 (define-public java-jakarta-oro
9619 (package
9620 (name "java-jakarta-oro")
9621 (version "2.0.8")
9622 (source (origin
9623 (method url-fetch)
9624 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
9625 "jakarta-oro-" version ".tar.gz"))
9626 (sha256
9627 (base32
9628 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
9629 (modules '((guix build utils)))
9630 (snippet
9631 `(begin
9632 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
9633 #t))))
9634 (build-system ant-build-system)
9635 (arguments
9636 `(#:build-target "package"
9637 #:tests? #f; tests are run as part of the build process
9638 #:phases
9639 (modify-phases %standard-phases
9640 (replace 'install
9641 (install-jars ,(string-append "jakarta-oro-" version))))))
9642 (home-page "https://jakarta.apache.org/oro/")
9643 (synopsis "Text-processing for Java")
9644 (description "The Jakarta-ORO Java classes are a set of text-processing
9645 Java classes that provide Perl5 compatible regular expressions, AWK-like
9646 regular expressions, glob expressions, and utility classes for performing
9647 substitutions, splits, filtering filenames, etc. This library is the successor
9648 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
9649 from ORO, Inc.")
9650 (license license:asl1.1)))
9651
9652 (define-public java-native-access
9653 (package
9654 (name "java-native-access")
9655 (version "4.5.1")
9656 (source (origin
9657 (method url-fetch)
9658 (uri (string-append "https://github.com/java-native-access/jna/"
9659 "archive/" version ".tar.gz"))
9660 (file-name (string-append name "-" version ".tar.gz"))
9661 (sha256
9662 (base32
9663 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
9664 (modules '((guix build utils)))
9665 (snippet
9666 `(begin
9667 (for-each delete-file (find-files "." ".*.jar"))
9668 (delete-file-recursively "native/libffi")
9669 (delete-file-recursively "dist")
9670 #t))))
9671 (build-system ant-build-system)
9672 (arguments
9673 `(#:tests? #f; FIXME: tests require reflections.jar
9674 #:test-target "test"
9675 #:make-flags (list "-Ddynlink.native=true")
9676 #:phases
9677 (modify-phases %standard-phases
9678 (add-before 'build 'fix-build.xml
9679 (lambda* (#:key inputs #:allow-other-keys)
9680 (substitute* "build.xml"
9681 ;; Since we removed the bundled ant.jar, give the correct path
9682 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
9683 ;; We removed generated native libraries. We can only rebuild one
9684 ;; so don't fail if we can't find a native library for another architecture.
9685 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
9686 ;; Copy test dependencies
9687 (copy-file (string-append (assoc-ref inputs "java-junit")
9688 "/share/java/junit.jar")
9689 "lib/junit.jar")
9690 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
9691 "/share/java/hamcrest-core.jar")
9692 "lib/hamcrest-core.jar")
9693 ;; FIXME: once reflections.jar is built, copy it to lib/test.
9694 #t))
9695 (add-before 'build 'build-native
9696 (lambda _
9697 (invoke "ant" "-Ddynlink.native=true" "native")
9698 #t))
9699 (replace 'install
9700 (install-jars "build")))))
9701 (inputs
9702 `(("libffi" ,libffi)
9703 ("libx11" ,libx11)
9704 ("libxt" ,libxt)))
9705 (native-inputs
9706 `(("java-junit" ,java-junit)
9707 ("java-hamcrest-core" ,java-hamcrest-core)))
9708 (home-page "https://github.com/java-native-access/jna")
9709 (synopsis "Access to native shared libraries from Java")
9710 (description "JNA provides Java programs easy access to native shared
9711 libraries without writing anything but Java code - no JNI or native code is
9712 required. JNA allows you to call directly into native functions using natural
9713 Java method invocation.")
9714 ;; Java Native Access project (JNA) is dual-licensed under 2
9715 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
9716 (license (list
9717 license:asl2.0
9718 license:lgpl2.1+))))
9719
9720 (define-public java-native-access-platform
9721 (package
9722 (inherit java-native-access)
9723 (name "java-native-access-platform")
9724 (arguments
9725 `(#:test-target "test"
9726 #:tests? #f; require jna-test.jar
9727 #:phases
9728 (modify-phases %standard-phases
9729 (add-before 'build 'chdir
9730 (lambda _
9731 (chdir "contrib/platform")
9732 #t))
9733 (add-after 'chdir 'fix-ant
9734 (lambda* (#:key inputs #:allow-other-keys)
9735 (substitute* "nbproject/project.properties"
9736 (("../../build/jna.jar")
9737 (string-append (assoc-ref inputs "java-native-access")
9738 "/share/java/jna.jar"))
9739 (("../../lib/hamcrest-core-.*.jar")
9740 (string-append (assoc-ref inputs "java-hamcrest-core")
9741 "/share/java/hamcrest-core.jar"))
9742 (("../../lib/junit.jar")
9743 (string-append (assoc-ref inputs "java-junit")
9744 "/share/java/junit.jar")))
9745 #t))
9746 (replace 'install
9747 (install-jars "dist")))))
9748 (inputs
9749 `(("java-native-access" ,java-native-access)))
9750 (synopsis "Cross-platform mappings for jna")
9751 (description "java-native-access-platfrom has cross-platform mappings
9752 and mappings for a number of commonly used platform functions, including a
9753 large number of Win32 mappings as well as a set of utility classes that
9754 simplify native access.")))
9755
9756 (define-public java-jsch-agentproxy-core
9757 (package
9758 (name "java-jsch-agentproxy-core")
9759 (version "0.0.8")
9760 (source (origin
9761 (method url-fetch)
9762 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
9763 version ".tar.gz"))
9764 (file-name (string-append name "-" version ".tar.gz"))
9765 (sha256
9766 (base32
9767 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
9768 (build-system ant-build-system)
9769 (arguments
9770 `(#:jar-name "jsch-agentproxy-core.jar"
9771 #:source-dir "jsch-agent-proxy-core/src/main/java"
9772 #:tests? #f)); no tests
9773 (home-page "https://github.com/ymnk/jsch-agent-proxy")
9774 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
9775 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9776 and Pageant included Putty. It will be easily integrated into JSch, and users
9777 will be allowed to use these programs for authentication.")
9778 (license license:bsd-3)))
9779
9780 (define-public java-jsch-agentproxy-sshagent
9781 (package
9782 (inherit java-jsch-agentproxy-core)
9783 (name "java-jsch-agentproxy-sshagent")
9784 (arguments
9785 `(#:jar-name "jsch-agentproxy-sshagent.jar"
9786 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
9787 #:tests? #f)); no tests
9788 (inputs
9789 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9790 (synopsis "Proxy to ssh-agent")
9791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9792 and Pageant included in Putty. This component contains the code for a proxy to
9793 ssh-agent.")))
9794
9795 (define-public java-jsch-agentproxy-usocket-jna
9796 (package
9797 (inherit java-jsch-agentproxy-core)
9798 (name "java-jsch-agentproxy-usocket-jna")
9799 (arguments
9800 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
9801 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
9802 #:tests? #f)); no tests
9803 (inputs
9804 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9805 ("java-native-access" ,java-native-access)))
9806 (synopsis "USocketFactory implementation using JNA")
9807 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9808 and Pageant included in Putty. This component contains an implementation of
9809 USocketFactory using @dfn{JNA} (Java Native Access).")))
9810
9811 (define-public java-jsch-agentproxy-pageant
9812 (package
9813 (inherit java-jsch-agentproxy-core)
9814 (name "java-jsch-agentproxy-pageant")
9815 (arguments
9816 `(#:jar-name "jsch-agentproxy-pageant.jar"
9817 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
9818 #:tests? #f)); no tests
9819 (inputs
9820 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9821 ("java-native-access" ,java-native-access)
9822 ("java-native-access-platform" ,java-native-access-platform)))
9823 (synopsis "Proxy to pageant")
9824 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9825 and Pageant included in Putty. This component contains the code for a proxy to
9826 pageant.")))
9827
9828 (define-public java-jsch-agentproxy-usocket-nc
9829 (package
9830 (inherit java-jsch-agentproxy-core)
9831 (name "java-jsch-agentproxy-usocket-nc")
9832 (arguments
9833 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
9834 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
9835 #:tests? #f)); no tests
9836 (inputs
9837 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9838 (synopsis "USocketFactory implementation using netcat")
9839 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9840 and Pageant included in Putty. This component contains an implementation of
9841 USocketFactory using netcat.")))
9842
9843 (define-public java-jsch-agentproxy-connector-factory
9844 (package
9845 (inherit java-jsch-agentproxy-core)
9846 (name "java-jsch-agentproxy-connector-factory")
9847 (arguments
9848 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
9849 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
9850 #:tests? #f)); no tests
9851 (inputs
9852 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9853 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
9854 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
9855 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
9856 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
9857 (synopsis "Connector factory for jsch agent proxy")
9858 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9859 and Pageant included in Putty. This component contains a connector factory.")))
9860
9861 (define-public java-jsch-agentproxy-jsch
9862 (package
9863 (inherit java-jsch-agentproxy-core)
9864 (name "java-jsch-agentproxy-jsch")
9865 (arguments
9866 `(#:jar-name "jsch-agentproxy-jsch.jar"
9867 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
9868 #:tests? #f)); no tests
9869 (inputs
9870 `(("java-jsch" ,java-jsch)
9871 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
9872 (synopsis "JSch integration library for agentproxy")
9873 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
9874 and Pageant included in Putty. This component contains a library to use
9875 jsch-agent-proxy with JSch.")))
9876
9877 (define-public java-apache-ivy
9878 (package
9879 (name "java-apache-ivy")
9880 (version "2.4.0")
9881 (source (origin
9882 (method url-fetch)
9883 (uri (string-append "mirror://apache//ant/ivy/" version
9884 "/apache-ivy-" version "-src.tar.gz"))
9885 (sha256
9886 (base32
9887 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
9888 (patches
9889 (search-patches
9890 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
9891 (build-system ant-build-system)
9892 (arguments
9893 `(#:jar-name "ivy.jar"
9894 #:tests? #f
9895 #:phases
9896 (modify-phases %standard-phases
9897 (add-before 'build 'remove-example
9898 (lambda _
9899 (delete-file-recursively "src/example")
9900 #t))
9901 (add-before 'build 'copy-resources
9902 (lambda _
9903 (with-directory-excursion "src/java"
9904 (for-each (lambda (file)
9905 (install-file file (string-append "../../build/classes/" (dirname file))))
9906 (append
9907 (find-files "." ".*.css")
9908 (find-files "." ".*.ent")
9909 (find-files "." ".*.html")
9910 (find-files "." ".*.properties")
9911 (find-files "." ".*.xsd")
9912 (find-files "." ".*.xsl")
9913 (find-files "." ".*.xml"))))))
9914 (add-before 'build 'fix-vfs
9915 (lambda _
9916 (substitute*
9917 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
9918 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
9919 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
9920 #t))
9921 (add-before 'install 'copy-manifest
9922 (lambda _
9923 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
9924 #t))
9925 (add-before 'install 'repack
9926 (lambda _
9927 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
9928 "-C" "build/classes" ".")
9929 #t))
9930 (add-after 'install 'install-bin
9931 (lambda* (#:key outputs #:allow-other-keys)
9932 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
9933 (ivy (string-append bin "/ivy"))
9934 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
9935 (mkdir-p bin)
9936 (with-output-to-file ivy
9937 (lambda _
9938 (display (string-append
9939 "#!" (which "sh") "\n"
9940 "if [[ -z $CLASSPATH ]]; then\n"
9941 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
9942 "else\n"
9943 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
9944 "fi\n"
9945 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
9946 (chmod ivy #o755)
9947 #t))))))
9948 (inputs
9949 `(("java-bouncycastle" ,java-bouncycastle)
9950 ("java-commons-cli" ,java-commons-cli)
9951 ("java-commons-collections" ,java-commons-collections)
9952 ("java-commons-httpclient" ,java-commons-httpclient)
9953 ("java-commons-lang" ,java-commons-lang)
9954 ("java-commons-vfs" ,java-commons-vfs)
9955 ("java-jakarta-oro" ,java-jakarta-oro)
9956 ("java-jsch" ,java-jsch)
9957 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
9958 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
9959 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
9960 ("java-junit" ,java-junit)))
9961 (home-page "https://ant.apache.org/ivy")
9962 (synopsis "Dependency manager for the Java programming language")
9963 (description "Ivy is a tool for managing (recording, tracking, resolving
9964 and reporting) project dependencies. It is characterized by the following:
9965
9966 @itemize
9967 @item flexibility and configurability - Ivy is essentially process agnostic
9968 and is not tied to any methodology or structure. Instead it provides the
9969 necessary flexibility and configurability to be adapted to a broad range
9970 of dependency management and build processes.
9971 @item tight integration with Apache Ant - while available as a standalone tool,
9972 Ivy works particularly well with Apache Ant providing a number of
9973 powerful Ant tasks ranging from dependency resolution to dependency
9974 reporting and publication.
9975 @end itemize")
9976 (license license:asl2.0)))
9977
9978 (define-public java-eclipse-sisu-inject
9979 (package
9980 (name "java-eclipse-sisu-inject")
9981 (version "0.3.3")
9982 (source (origin
9983 (method url-fetch)
9984 (uri (string-append "https://github.com/eclipse/sisu.inject/"
9985 "archive/releases/" version ".tar.gz"))
9986 (sha256
9987 (base32
9988 "11rg6yw5nl13i65xsp4jxxgr341qcnnaan48p767h28kb07s0ajn"))))
9989 (build-system ant-build-system)
9990 (arguments
9991 `(#:jar-name "eclipse-sisu-inject.jar"
9992 #:source-dir "org.eclipse.sisu.inject/src"
9993 #:jdk ,icedtea-8
9994 #:tests? #f)); no tests
9995 (inputs
9996 `(("java-guice" ,java-guice)
9997 ("java-guice-servlet" ,java-guice-servlet)
9998 ("java-javax-inject" ,java-javax-inject)
9999 ("java-tomcat" ,java-tomcat)
10000 ("java-junit" ,java-junit)
10001 ("java-slf4j-api" ,java-slf4j-api)
10002 ("java-jsr305" ,java-jsr305)
10003 ("java-jsr250" ,java-jsr250)
10004 ("java-cdi-api" ,java-cdi-api)
10005 ("java-osgi-framework" ,java-osgi-framework)
10006 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10007 ("java-testng" ,java-testng)))
10008 (home-page "https://www.eclipse.org/sisu/")
10009 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10010 (description "Sisu is a modular JSR330-based container that supports
10011 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10012 Google-Guice to perform dependency injection and provide the core JSR330
10013 support, but removes the need to write explicit bindings in Guice modules.
10014 Integration with other containers via the Eclipse Extension Registry and the
10015 OSGi Service Registry is a goal of this project.")
10016 (license license:epl1.0)))
10017
10018 (define-public java-eclipse-sisu-plexus
10019 (package
10020 (name "java-eclipse-sisu-plexus")
10021 (version "0.3.3")
10022 (source (origin
10023 (method url-fetch)
10024 (uri (string-append "https://github.com/eclipse/sisu.plexus/"
10025 "archive/releases/" version ".tar.gz"))
10026 (sha256
10027 (base32
10028 "0lbj7nxy5j0z71k407zbb82icfqh7midrfk0fb3fa3jzdjz0d9d9"))
10029 (modules '((guix build utils)))
10030 (snippet
10031 '(begin
10032 (for-each delete-file (find-files "." ".*.jar"))
10033 (rename-file "org.eclipse.sisu.plexus.tests/src"
10034 "org.eclipse.sisu.plexus.tests/java")
10035 #t))))
10036 (build-system ant-build-system)
10037 (arguments
10038 `(#:jar-name "eclipse-sisu-plexus.jar"
10039 #:source-dir "org.eclipse.sisu.plexus/src"
10040 #:test-dir "org.eclipse.sisu.plexus.tests"
10041 #:test-exclude
10042 (list
10043 ;; This test fails probably because we can't generate the necessary
10044 ;; meta-inf files.
10045 "**/PlexusLoggingTest.*"
10046 ;; FIXME: This test fails because of some injection error
10047 "**/PlexusRequirementTest.*")
10048 #:jdk ,icedtea-8
10049 #:phases
10050 (modify-phases %standard-phases
10051 (add-before 'build 'copy-resources
10052 (lambda _
10053 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10054 "build/classes/META-INF/plexus")
10055 #t))
10056 (add-before 'check 'build-test-jar
10057 (lambda _
10058 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10059 (mkdir "build")
10060 (with-directory-excursion "java"
10061 (apply invoke "javac" "-cp"
10062 (string-append (getenv "CLASSPATH")
10063 ":../../../../../build/classes")
10064 (find-files "." ".*.java"))
10065 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10066 (find-files "." ".*.jar")))
10067 (mkdir-p "build/META-INF/plexus")
10068 (copy-file "resources/META-INF/plexus/components.xml"
10069 "build/META-INF/plexus/components.xml")
10070 (with-directory-excursion "build"
10071 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10072 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10073 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10074 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10075 (("resources/component-jar")
10076 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10077 #t)))))
10078 (inputs
10079 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10080 ("java-plexus-util" ,java-plexus-utils)
10081 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10082 ("java-osgi-framework" ,java-osgi-framework)
10083 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10084 ("java-guice" ,java-guice)
10085 ("java-javax-inject" ,java-javax-inject)
10086 ("java-slf4j-api" ,java-slf4j-api)
10087 ("java-junit" ,java-junit)))
10088 (native-inputs
10089 `(("java-guava" ,java-guava)
10090 ("java-aopalliance" ,java-aopalliance)
10091 ("java-cglib" ,java-cglib)
10092 ("java-asm" ,java-asm)))
10093 (home-page "https://www.eclipse.org/sisu/")
10094 (synopsis "Plexus support for the sisu container")
10095 (description "Sisu is a modular JSR330-based container that supports
10096 classpath scanning, auto-binding, and dynamic auto-wiring. This package
10097 adds Plexus support to the Sisu-Inject container.")
10098 (license license:epl1.0)))
10099
10100 (define-public java-commons-compiler
10101 (package
10102 (name "java-commons-compiler")
10103 (version "3.0.8")
10104 (source (origin
10105 (method git-fetch)
10106 (uri (git-reference
10107 (url "https://github.com/janino-compiler/janino")
10108 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
10109 (file-name (string-append name "-" version))
10110 (sha256
10111 (base32
10112 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
10113 (modules '((guix build utils)))
10114 (snippet
10115 '(begin
10116 (for-each delete-file
10117 (find-files "." "\\.jar$"))
10118 #t))))
10119 (build-system ant-build-system)
10120 (arguments
10121 `(#:jar-name "commons-compiler.jar"
10122 #:source-dir "commons-compiler/src/main"
10123 #:tests? #f)); no tests
10124 (home-page "https://github.com/janino-compiler/janino")
10125 (synopsis "Java compiler")
10126 (description "Commons-compiler contains an API for janino, including the
10127 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
10128 and @code{ISimpleCompiler} interfaces.")
10129 (license license:bsd-3)))
10130
10131 (define-public java-janino
10132 (package
10133 (inherit java-commons-compiler)
10134 (name "java-janino")
10135 (arguments
10136 `(#:jar-name "janino.jar"
10137 #:source-dir "src/main/java"
10138 #:phases
10139 (modify-phases %standard-phases
10140 (add-before 'configure 'chdir
10141 (lambda _
10142 (chdir "janino"))))))
10143 (inputs
10144 `(("java-commons-compiler" ,java-commons-compiler)))
10145 (native-inputs
10146 `(("java-junit" ,java-junit)
10147 ("java-hamcrest-core" ,java-hamcrest-core)))
10148 (description "Janino is a Java compiler. Janino can compile a set of
10149 source files to a set of class files like @code{javac}, but also compile a
10150 Java expression, block, class body or source file in memory, load the bytecode
10151 and execute it directly in the same JVM. @code{janino} can also be used for
10152 static code analysis or code manipulation.")))
10153
10154 (define-public java-logback-core
10155 (package
10156 (name "java-logback-core")
10157 (version "1.2.3")
10158 (source (origin
10159 (method url-fetch)
10160 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
10161 version ".tar.gz"))
10162 (sha256
10163 (base32
10164 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
10165 (modules '((guix build utils)))
10166 (snippet
10167 '(delete-file-recursively "logback-access/lib"))))
10168 (build-system ant-build-system)
10169 (arguments
10170 `(#:jar-name "logback.jar"
10171 #:source-dir "src/main/java"
10172 #:test-dir "src/test"
10173 #:test-exclude
10174 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
10175 ;; which creates FastClasses
10176 (list "**/AllCoreTest.*"
10177 "**/AutoFlushingObjectWriterTest.*"
10178 "**/PackageTest.*"
10179 "**/ResilientOutputStreamTest.*"
10180 ;; And we still don't want to run abstract classes
10181 "**/Abstract*.*")
10182 #:phases
10183 (modify-phases %standard-phases
10184 (add-before 'configure 'chdir
10185 (lambda _
10186 (chdir "logback-core")
10187 #t)))))
10188 (inputs
10189 `(("java-javax-mail" ,java-javax-mail)
10190 ("java-tomcat" ,java-tomcat)
10191 ("java-commons-compiler" ,java-commons-compiler)
10192 ("java-janino" ,java-janino)))
10193 (native-inputs
10194 `(("java-junit" ,java-junit)
10195 ("java-hamcrest-core" ,java-hamcrest-core)
10196 ("java-mockito-1" ,java-mockito-1)
10197 ("java-cglib" ,java-cglib)
10198 ("java-asm" ,java-asm)
10199 ("java-objenesis" ,java-objenesis)
10200 ("java-joda-time" ,java-joda-time)))
10201 (home-page "https://logback.qos.ch")
10202 (synopsis "Logging for java")
10203 (description "Logback is intended as a successor to the popular log4j project.
10204 This module lays the groundwork for the other two modules.")
10205 ;; Either epl1.0 or lgpl2.1
10206 (license (list license:epl1.0
10207 license:lgpl2.1))))
10208
10209 (define-public java-logback-classic
10210 (package
10211 (inherit java-logback-core)
10212 (name "java-logback-classic")
10213 (arguments
10214 `(#:jar-name "logback-classic.jar"
10215 #:source-dir "src/main/java"
10216 #:test-dir "src/test"
10217 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
10218 #:jdk ,icedtea-8
10219 #:phases
10220 (modify-phases %standard-phases
10221 (add-before 'configure 'chdir
10222 (lambda _
10223 (chdir "logback-classic")
10224 #t))
10225 (replace 'build
10226 (lambda* (#:key inputs #:allow-other-keys)
10227 (mkdir-p "build/classes")
10228 (setenv "CLASSPATH"
10229 (string-join
10230 (apply append (map (lambda (input)
10231 (find-files (assoc-ref inputs input)
10232 ".*.jar"))
10233 '("java-logback-core" "java-slf4j-api"
10234 "java-commons-compiler" "java-tomcat"
10235 "groovy")))
10236 ":"))
10237 (apply invoke "groovyc" "-d" "build/classes" "-j"
10238 (find-files "src/main/" ".*\\.(groovy|java)$"))
10239 (invoke "ant" "jar")
10240 #t)))))
10241 (inputs
10242 `(("java-logback-core" ,java-logback-core)
10243 ("java-slf4j-api" ,java-slf4j-api)
10244 ,@(package-inputs java-logback-core)))
10245 (native-inputs
10246 `(("groovy" ,groovy)))
10247 (description "Logback is intended as a successor to the popular log4j project.
10248 This module can be assimilated to a significantly improved version of log4j.
10249 Moreover, @code{logback-classic} natively implements the slf4j API so that you
10250 can readily switch back and forth between logback and other logging frameworks
10251 such as log4j or @code{java.util.logging} (JUL).")))
10252
10253 (define-public java-qdox
10254 (package
10255 (name "java-qdox")
10256 ; Newer version exists, but this version is required by java-plexus-component-metadata
10257 (version "2.0-M2")
10258 (source (origin
10259 (method url-fetch)
10260 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
10261 ;; Older releases at https://github.com/codehaus/qdox/
10262 ;; Note: The release at maven is pre-generated. The release at
10263 ;; github requires jflex.
10264 (uri (string-append "http://central.maven.org/maven2/"
10265 "com/thoughtworks/qdox/qdox/" version
10266 "/qdox-" version "-sources.jar"))
10267 (sha256
10268 (base32
10269 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
10270 (build-system ant-build-system)
10271 (arguments
10272 `(#:jar-name "qdox.jar"
10273 #:tests? #f)); no tests
10274 (home-page "http://qdox.codehaus.org/")
10275 (synopsis "Parse definitions from Java source files")
10276 (description "QDox is a high speed, small footprint parser for extracting
10277 class/interface/method definitions from source files complete with JavaDoc
10278 @code{@@tags}. It is designed to be used by active code generators or
10279 documentation tools.")
10280 (license license:asl2.0)))