gnu: Add java-openjfx-base.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
4 ;;; Copyright © 2016, 2017 Roel Janssen <roel@gnu.org>
5 ;;; Copyright © 2017, 2019 Carlo Zancanaro <carlo@zancanaro.id.au>
6 ;;; Copyright © 2017, 2018, 2019 Julien Lepiller <julien@lepiller.eu>
7 ;;; Copyright © 2017 Thomas Danckaert <post@thomasdanckaert.be>
8 ;;; Copyright © 2016, 2017, 2018 Alex Vong <alexvong1995@gmail.com>
9 ;;; Copyright © 2017, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
10 ;;; Copyright © 2018, 2019 Gábor Boskovits <boskovits@gmail.com>
11 ;;; Copyright © 2018 Chris Marusich <cmmarusich@gmail.com>
12 ;;; Copyright © 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
13 ;;;
14 ;;; This file is part of GNU Guix.
15 ;;;
16 ;;; GNU Guix is free software; you can redistribute it and/or modify it
17 ;;; under the terms of the GNU General Public License as published by
18 ;;; the Free Software Foundation; either version 3 of the License, or (at
19 ;;; your option) any later version.
20 ;;;
21 ;;; GNU Guix is distributed in the hope that it will be useful, but
22 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 ;;; GNU General Public License for more details.
25 ;;;
26 ;;; You should have received a copy of the GNU General Public License
27 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29 (define-module (gnu packages java)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix packages)
32 #:use-module (guix download)
33 #:use-module (guix hg-download)
34 #:use-module (guix git-download)
35 #:use-module (guix svn-download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system trivial)
40 #:use-module (gnu packages)
41 #:use-module (gnu packages attr)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages certs)
46 #:use-module (gnu packages cpio)
47 #:use-module (gnu packages cups)
48 #:use-module (gnu packages compression)
49 #:use-module (gnu packages elf)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages gawk)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages gcc)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages ghostscript) ;lcms
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages groovy)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages guile)
60 #:use-module (gnu packages icu4c)
61 #:use-module (gnu packages image)
62 #:use-module (gnu packages java-compression)
63 #:use-module (gnu packages libffi)
64 #:use-module (gnu packages linux) ;alsa
65 #:use-module (gnu packages maths)
66 #:use-module (gnu packages nss)
67 #:use-module (gnu packages onc-rpc)
68 #:use-module (gnu packages web)
69 #:use-module (gnu packages wget)
70 #:use-module (gnu packages pkg-config)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages popt)
73 #:use-module (gnu packages kerberos)
74 #:use-module (gnu packages xml)
75 #:use-module (gnu packages xorg)
76 #:use-module (gnu packages texinfo)
77 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
78 #:use-module (srfi srfi-11)
79 #:use-module (ice-9 match))
80
81 \f
82 ;;;
83 ;;; Java bootstrap toolchain.
84 ;;;
85
86 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
87 ;; use it to build a simple version of GNU Classpath, the Java standard
88 ;; library. We chose version 0.93 because it is the last version that can be
89 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
90 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
91 ;; the last version of JamVM that works with a version of GNU classpath that
92 ;; does not require ECJ. These three packages make up the bootstrap JDK.
93
94 ;; This is sufficient to build an older version of Ant, which is needed to
95 ;; build an older version of ECJ, an incremental Java compiler, both of which
96 ;; are written in Java.
97 ;;
98 ;; ECJ is needed to build the latest release (0.99) and the development
99 ;; version of GNU Classpath. The development version of GNU Classpath has
100 ;; much more support for Java 1.6 than the latest release, but we need to
101 ;; build 0.99 first to get a working version of javah. ECJ, the development
102 ;; version of GNU Classpath, and the latest version of JamVM make up the
103 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
104 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
105 ;; Icedtea 3.x.
106
107 (define jikes
108 (package
109 (name "jikes")
110 (version "1.22")
111 (source (origin
112 (method url-fetch)
113 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
114 version "/jikes-" version ".tar.bz2"))
115 (sha256
116 (base32
117 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
118 (build-system gnu-build-system)
119 (home-page "http://jikes.sourceforge.net/")
120 (synopsis "Compiler for the Java language")
121 (description "Jikes is a compiler that translates Java source files as
122 defined in The Java Language Specification into the bytecoded instruction set
123 and binary format defined in The Java Virtual Machine Specification.")
124 (license license:ibmpl1.0)))
125
126 ;; This is the last version of GNU Classpath that can be built without ECJ.
127 (define classpath-bootstrap
128 (package
129 (name "classpath")
130 (version "0.93")
131 (source (origin
132 (method url-fetch)
133 (uri (string-append "mirror://gnu/classpath/classpath-"
134 version ".tar.gz"))
135 (sha256
136 (base32
137 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
138 (patches (search-patches "classpath-aarch64-support.patch"))))
139 (build-system gnu-build-system)
140 (arguments
141 `(#:configure-flags
142 (list (string-append "JAVAC="
143 (assoc-ref %build-inputs "jikes")
144 "/bin/jikes")
145 "--disable-Werror"
146 "--disable-gmp"
147 "--disable-gtk-peer"
148 "--disable-gconf-peer"
149 "--disable-plugin"
150 "--disable-dssi"
151 "--disable-alsa"
152 "--disable-gjdoc")
153 #:phases
154 (modify-phases %standard-phases
155 ;; XXX: This introduces a memory leak as we remove a call to free up
156 ;; memory for the file name string. This was necessary because of a
157 ;; runtime error that would have prevented us from building
158 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
159 ;; for the gnarly details.
160 (add-after 'unpack 'remove-call-to-free
161 (lambda _
162 (substitute* "native/jni/java-io/java_io_VMFile.c"
163 (("result = cpio_isFileExists.*" m)
164 (string-append m "\n//")))
165 #t))
166 (add-after 'install 'install-data
167 (lambda _ (invoke "make" "install-data"))))))
168 (native-inputs
169 `(("jikes" ,jikes)
170 ("fastjar" ,fastjar)
171 ("libltdl" ,libltdl)
172 ("pkg-config" ,pkg-config)))
173 (home-page "https://www.gnu.org/software/classpath/")
174 (synopsis "Essential libraries for Java")
175 (description "GNU Classpath is a project to create core class libraries
176 for use with runtimes, compilers and tools for the Java programming
177 language.")
178 ;; GPLv2 or later, with special linking exception.
179 (license license:gpl2+)))
180
181 ;; This is the last version of JamVM that works with a version of GNU
182 ;; classpath that does not require ECJ.
183 (define jamvm-1-bootstrap
184 (package
185 (name "jamvm")
186 (version "1.5.1")
187 (source (origin
188 (method url-fetch)
189 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
190 "JamVM%20" version "/jamvm-"
191 version ".tar.gz"))
192 (patches (search-patches "jamvm-arm.patch"))
193 (sha256
194 (base32
195 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))))
196 (build-system gnu-build-system)
197 (arguments
198 `(#:configure-flags
199 (list (string-append "--with-classpath-install-dir="
200 (assoc-ref %build-inputs "classpath"))
201 "--disable-int-caching"
202 "--enable-runtime-reloc-checks"
203 "--enable-ffi")))
204 (inputs
205 `(("classpath" ,classpath-bootstrap)
206 ("jikes" ,jikes)
207 ("libffi" ,libffi)
208 ("zlib" ,zlib)))
209 ;; When built with a recent GCC and glibc the configure step of icedtea-6
210 ;; fails with an invalid instruction error.
211 (native-inputs
212 `(("gcc" ,gcc-5)
213 ("libc" ,glibc-2.28)))
214 (home-page "http://jamvm.sourceforge.net/")
215 (synopsis "Small Java Virtual Machine")
216 (description "JamVM is a Java Virtual Machine conforming to the JVM
217 specification edition 2 (blue book). It is extremely small. However, unlike
218 other small VMs it supports the full spec, including object finalisation and
219 JNI.")
220 (license license:gpl2+)))
221
222 (define ant-bootstrap
223 (package
224 (name "ant-bootstrap")
225 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
226 ;; are not supported. The 1.8.x series is the last to use only features
227 ;; supported by Jikes.
228 (version "1.8.4")
229 (source (origin
230 (method url-fetch)
231 (uri (string-append "http://archive.apache.org/dist/"
232 "ant/source/apache-ant-"
233 version "-src.tar.bz2"))
234 (sha256
235 (base32
236 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
237 (build-system gnu-build-system)
238 (arguments
239 `(#:imported-modules ((guix build syscalls)
240 ,@%gnu-build-system-modules)
241 #:modules ((srfi srfi-1)
242 (guix build gnu-build-system)
243 (guix build utils)
244 (guix build syscalls))
245 #:tests? #f ; no "check" target
246 #:phases
247 (modify-phases %standard-phases
248 (delete 'bootstrap)
249 (delete 'configure)
250 (replace 'build
251 (lambda* (#:key inputs #:allow-other-keys)
252 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
253 (setenv "JAVACMD"
254 (string-append (assoc-ref inputs "jamvm")
255 "/bin/jamvm"))
256 (setenv "JAVAC"
257 (string-append (assoc-ref inputs "jikes")
258 "/bin/jikes"))
259 (setenv "CLASSPATH"
260 (string-append (assoc-ref inputs "jamvm")
261 "/lib/rt.jar"))
262
263 ;; Ant complains if this file doesn't exist.
264 (setenv "HOME" "/tmp")
265 (with-output-to-file "/tmp/.ant.properties"
266 (lambda _ (display "")))
267
268 ;; Use jikes instead of javac for <javac ...> tags in build.xml
269 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
270
271 ;; jikes produces lots of warnings, but they are not very
272 ;; interesting, so we silence them.
273 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
274
275 ;; Without these JamVM options the build may freeze.
276 (substitute* "bootstrap.sh"
277 (("^\"\\$\\{JAVACMD\\}\" " m)
278 ,@(if (string-prefix? "armhf" (or (%current-system)
279 (%current-target-system)))
280 `((string-append m "-Xnocompact "))
281 `((string-append m "-Xnocompact -Xnoinlining ")))))
282
283 ;; Disable tests because we are bootstrapping and thus don't have
284 ;; any of the dependencies required to build and run the tests.
285 (substitute* "build.xml"
286 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
287 (invoke "bash" "bootstrap.sh"
288 (string-append "-Ddist.dir="
289 (assoc-ref %outputs "out")))))
290 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
291 (lambda* (#:key outputs #:allow-other-keys)
292 (define (repack-archive jar)
293 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
294 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
295 (with-directory-excursion dir
296 (invoke "unzip" jar))
297 (delete-file jar)
298 ;; XXX: copied from (gnu build install)
299 (for-each (lambda (file)
300 (let ((s (lstat file)))
301 (unless (eq? (stat:type s) 'symlink)
302 (utime file 0 0 0 0))))
303 (find-files dir #:directories? #t))
304 ;; It is important that the manifest appears first.
305 (with-directory-excursion dir
306 (let* ((files (find-files "." ".*" #:directories? #t))
307 ;; To ensure that the reference scanner can
308 ;; detect all store references in the jars
309 ;; we disable compression with the "-0" option.
310 (command (if (file-exists? manifest)
311 `("zip" "-0" "-X" ,jar ,manifest
312 ,@files)
313 `("zip" "-0" "-X" ,jar ,@files))))
314 (apply invoke command)))))
315 (for-each repack-archive
316 (find-files
317 (string-append (assoc-ref %outputs "out") "/lib")
318 "\\.jar$"))
319 #t))
320 (delete 'install))))
321 (native-inputs
322 `(("jikes" ,jikes)
323 ("jamvm" ,jamvm-1-bootstrap)
324 ("unzip" ,unzip)
325 ("zip" ,zip)))
326 (home-page "http://ant.apache.org")
327 (synopsis "Build tool for Java")
328 (description
329 "Ant is a platform-independent build tool for Java. It is similar to
330 make but is implemented using the Java language, requires the Java platform,
331 and is best suited to building Java projects. Ant uses XML to describe the
332 build process and its dependencies, whereas Make uses Makefile format.")
333 (license license:asl2.0)))
334
335 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
336 ;; compiler for Java 1.5.
337 (define ecj-bootstrap
338 (package
339 (name "ecj-bootstrap")
340 (version "3.2.2")
341 (source (origin
342 (method url-fetch)
343 (uri (string-append "http://archive.eclipse.org/eclipse/"
344 "downloads/drops/R-" version
345 "-200702121330/ecjsrc.zip"))
346 (sha256
347 (base32
348 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
349 ;; It would be so much easier if we could use the ant-build-system, but we
350 ;; cannot as we don't have ant at this point. We use ecj for
351 ;; bootstrapping the JDK.
352 (build-system gnu-build-system)
353 (arguments
354 `(#:modules ((guix build gnu-build-system)
355 (guix build utils)
356 (srfi srfi-1))
357 #:tests? #f ; there are no tests
358 #:phases
359 (modify-phases %standard-phases
360 (replace 'configure
361 (lambda* (#:key inputs #:allow-other-keys)
362 (setenv "CLASSPATH"
363 (string-join
364 (cons (string-append (assoc-ref inputs "jamvm")
365 "/lib/rt.jar")
366 (find-files (string-append
367 (assoc-ref inputs "ant-bootstrap")
368 "/lib")
369 "\\.jar$"))
370 ":"))
371 #t))
372 (replace 'build
373 (lambda* (#:key inputs #:allow-other-keys)
374 ;; The unpack phase enters the "org" directory by mistake.
375 (chdir "..")
376
377 ;; Create a simple manifest to make ecj executable.
378 (with-output-to-file "manifest"
379 (lambda _
380 (display "Manifest-Version: 1.0
381 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
382
383 ;; Compile it all!
384 (and (apply invoke "jikes"
385 (find-files "." "\\.java$"))
386 (invoke "fastjar" "cvfm"
387 "ecj-bootstrap.jar" "manifest" "."))))
388 (replace 'install
389 (lambda* (#:key outputs #:allow-other-keys)
390 (let ((share (string-append (assoc-ref outputs "out")
391 "/share/java/")))
392 (mkdir-p share)
393 (install-file "ecj-bootstrap.jar" share)
394 #t))))))
395 (native-inputs
396 `(("ant-bootstrap" ,ant-bootstrap)
397 ("unzip" ,unzip)
398 ("jikes" ,jikes)
399 ("jamvm" ,jamvm-1-bootstrap)
400 ("fastjar" ,fastjar)))
401 (home-page "https://eclipse.org")
402 (synopsis "Eclipse Java development tools core batch compiler")
403 (description "This package provides the Eclipse Java core batch compiler
404 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
405 requirement for all GNU Classpath releases after version 0.93.")
406 (license license:epl1.0)))
407
408 (define ecj-javac-wrapper
409 (package (inherit ecj-bootstrap)
410 (name "ecj-javac-wrapper")
411 (source #f)
412 (build-system trivial-build-system)
413 (arguments
414 `(#:modules ((guix build utils))
415 #:builder
416 (begin
417 (use-modules (guix build utils))
418 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
419 (target (string-append bin "/javac"))
420 (guile (string-append (assoc-ref %build-inputs "guile")
421 "/bin/guile"))
422 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
423 "/share/java/ecj-bootstrap.jar"))
424 (java (string-append (assoc-ref %build-inputs "jamvm")
425 "/bin/jamvm"))
426 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
427 "/share/classpath")))
428 (string-append jvmlib "/glibj.zip:"
429 jvmlib "/tools.zip"))))
430 (mkdir-p bin)
431 (with-output-to-file target
432 (lambda _
433 (format #t "#!~a --no-auto-compile\n!#\n" guile)
434 (write
435 `(begin (use-modules (ice-9 match)
436 (ice-9 receive)
437 (ice-9 hash-table)
438 (srfi srfi-1)
439 (srfi srfi-26))
440 (define defaults
441 '(("-bootclasspath" ,bootcp)
442 ("-source" "1.5")
443 ("-target" "1.5")
444 ("-cp" ".")))
445 (define (main args)
446 (let ((classpath (getenv "CLASSPATH")))
447 (setenv "CLASSPATH"
448 (string-join (list ,ecj
449 ,(string-append (assoc-ref %build-inputs "jamvm")
450 "/lib/rt.jar")
451 (or classpath ""))
452 ":")))
453 (receive (vm-args other-args)
454 ;; Separate VM arguments from arguments to ECJ.
455 (partition (cut string-prefix? "-J" <>)
456 (fold (lambda (default acc)
457 (if (member (first default) acc)
458 acc (append default acc)))
459 args defaults))
460 (apply system* ,java
461 (append
462 ;; Remove "-J" prefix
463 (map (cut string-drop <> 2) vm-args)
464 '("org.eclipse.jdt.internal.compiler.batch.Main")
465 (cons "-nowarn" other-args)))))
466 ;; Entry point
467 (let ((args (cdr (command-line))))
468 (if (null? args)
469 (format (current-error-port) "javac: no arguments given!\n")
470 (main args)))))))
471 (chmod target #o755)
472 #t))))
473 (native-inputs
474 `(("guile" ,guile-2.2)
475 ("ecj-bootstrap" ,ecj-bootstrap)
476 ("jamvm" ,jamvm-1-bootstrap)
477 ("classpath" ,classpath-bootstrap)))
478 (description "This package provides a wrapper around the @dfn{Eclipse
479 compiler for Java} (ecj) with a command line interface that is compatible with
480 the standard javac executable.")))
481
482 ;; The classpath-bootstrap was built without a virtual machine, so it does not
483 ;; provide a wrapper for javah. We cannot build the development version of
484 ;; Classpath without javah.
485 (define classpath-0.99
486 (package (inherit classpath-bootstrap)
487 (version "0.99")
488 (source (origin
489 (method url-fetch)
490 (uri (string-append "mirror://gnu/classpath/classpath-"
491 version ".tar.gz"))
492 (sha256
493 (base32
494 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
495 (patches (search-patches "classpath-aarch64-support.patch"))))
496 (arguments
497 `(#:configure-flags
498 (list (string-append "--with-ecj-jar="
499 (assoc-ref %build-inputs "ecj-bootstrap")
500 "/share/java/ecj-bootstrap.jar")
501 (string-append "JAVAC="
502 (assoc-ref %build-inputs "ecj-javac-wrapper")
503 "/bin/javac")
504 (string-append "JAVA="
505 (assoc-ref %build-inputs "jamvm")
506 "/bin/jamvm")
507 "GCJ_JAVAC_TRUE=no"
508 "ac_cv_prog_java_works=yes" ; trust me
509 "--disable-Werror"
510 "--disable-gmp"
511 "--disable-gtk-peer"
512 "--disable-gconf-peer"
513 "--disable-plugin"
514 "--disable-dssi"
515 "--disable-alsa"
516 "--disable-gjdoc")
517 #:phases
518 (modify-phases %standard-phases
519 (add-after 'install 'install-data
520 (lambda _ (invoke "make" "install-data"))))))
521 (native-inputs
522 `(("ecj-bootstrap" ,ecj-bootstrap)
523 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
524 ("fastjar" ,fastjar)
525 ("jamvm" ,jamvm-1-bootstrap)
526 ("classpath" ,classpath-bootstrap)
527 ("libltdl" ,libltdl)
528 ("pkg-config" ,pkg-config)))))
529
530 ;; We need this because classpath-bootstrap does not provide all of the tools
531 ;; we need to build classpath-devel.
532 (define classpath-jamvm-wrappers
533 (package (inherit classpath-0.99)
534 (name "classpath-jamvm-wrappers")
535 (source #f)
536 (build-system trivial-build-system)
537 (arguments
538 `(#:modules ((guix build utils))
539 #:builder
540 (begin
541 (use-modules (guix build utils))
542 (let* ((bash (assoc-ref %build-inputs "bash"))
543 (jamvm (assoc-ref %build-inputs "jamvm"))
544 (classpath (assoc-ref %build-inputs "classpath"))
545 (bin (string-append (assoc-ref %outputs "out")
546 "/bin/")))
547 (mkdir-p bin)
548 (for-each (lambda (tool)
549 (with-output-to-file (string-append bin tool)
550 (lambda _
551 ,@(if (string-prefix? "armhf" (or (%current-system)
552 (%current-target-system)))
553 `((format #t "#!~a/bin/sh
554 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
555 gnu.classpath.tools.~a.~a $@"
556 bash jamvm classpath tool
557 (if (string=? "native2ascii" tool)
558 "Native2ASCII" "Main")))
559 `((format #t "#!~a/bin/sh
560 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
561 gnu.classpath.tools.~a.~a $@"
562 bash jamvm classpath tool
563 (if (string=? "native2ascii" tool)
564 "Native2ASCII" "Main"))))))
565 (chmod (string-append bin tool) #o755))
566 (list "javah"
567 "rmic"
568 "rmid"
569 "orbd"
570 "rmiregistry"
571 "native2ascii"))
572 #t))))
573 (native-inputs
574 `(("bash" ,bash)
575 ("jamvm" ,jamvm-1-bootstrap)
576 ("classpath" ,classpath-0.99)))
577 (inputs '())
578 (synopsis "Executables from GNU Classpath")
579 (description "This package provides wrappers around the tools provided by
580 the GNU Classpath library. They are executed by the JamVM virtual
581 machine.")))
582
583 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
584 ;; then Classpath has gained much more support for Java 1.6.
585 (define-public classpath-devel
586 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
587 (revision "1"))
588 (package (inherit classpath-bootstrap)
589 (version (string-append "0.99-" revision "." (string-take commit 9)))
590 (source (origin
591 (method git-fetch)
592 (uri (git-reference
593 (url "https://git.savannah.gnu.org/git/classpath.git")
594 (commit commit)))
595 (file-name (string-append "classpath-" version "-checkout"))
596 (sha256
597 (base32
598 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
599 (arguments
600 `(#:make-flags
601 ;; Ensure that the initial heap size is smaller than the maximum
602 ;; size. By default only Xmx is set, which can lead to invalid
603 ;; memory settings on some machines with a lot of memory.
604 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
605 #:configure-flags
606 (list (string-append "--with-ecj-jar="
607 (assoc-ref %build-inputs "ecj-bootstrap")
608 "/share/java/ecj-bootstrap.jar")
609 (string-append "--with-javac="
610 (assoc-ref %build-inputs "ecj-javac-wrapper")
611 "/bin/javac")
612 (string-append "JAVA="
613 (assoc-ref %build-inputs "jamvm")
614 "/bin/jamvm")
615 "GCJ_JAVAC_TRUE=no"
616 "ac_cv_prog_java_works=yes" ; trust me
617 "--disable-Werror"
618 "--disable-gmp"
619 "--disable-gtk-peer"
620 "--disable-gconf-peer"
621 "--disable-plugin"
622 "--disable-dssi"
623 "--disable-alsa"
624 "--disable-gjdoc")
625 #:phases
626 (modify-phases %standard-phases
627 ;; XXX The bootstrap phase executes autogen.sh, which fails after
628 ;; complaining about the lack of gettext.
629 (replace 'bootstrap
630 (lambda _ (invoke "autoreconf" "-vif")))
631 (add-after 'unpack 'remove-unsupported-annotations
632 (lambda _
633 (substitute* (find-files "java" "\\.java$")
634 (("@Override") ""))
635 #t))
636 (add-after 'install 'install-data
637 (lambda _ (invoke "make" "install-data"))))))
638 (native-inputs
639 `(("autoconf" ,autoconf)
640 ("automake" ,automake)
641 ("libtool" ,libtool)
642 ("gettext" ,gettext-minimal)
643 ("texinfo" ,texinfo)
644 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
645 ("ecj-bootstrap" ,ecj-bootstrap)
646 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
647 ("fastjar" ,fastjar)
648 ("jamvm" ,jamvm-1-bootstrap)
649 ("libltdl" ,libltdl)
650 ("pkg-config" ,pkg-config))))))
651
652 (define jamvm
653 (package (inherit jamvm-1-bootstrap)
654 (version "2.0.0")
655 (source (origin
656 (method url-fetch)
657 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
658 "JamVM%20" version "/jamvm-"
659 version ".tar.gz"))
660 (sha256
661 (base32
662 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))))
663 (build-system gnu-build-system)
664 (arguments
665 `(#:configure-flags
666 (list (string-append "--with-classpath-install-dir="
667 (assoc-ref %build-inputs "classpath")))))
668 (inputs
669 `(("classpath" ,classpath-devel)
670 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
671 ("zlib" ,zlib)))))
672
673 (define ecj-javac-wrapper-final
674 (package (inherit ecj-javac-wrapper)
675 (native-inputs
676 `(("guile" ,guile-2.2)
677 ("ecj-bootstrap" ,ecj-bootstrap)
678 ("jamvm" ,jamvm)
679 ("classpath" ,classpath-devel)))))
680
681 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
682 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
683 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
684 ;; which uses Java 6 only.
685 (define-public icedtea-6
686 (package
687 (name "icedtea")
688 (version "1.13.13")
689 (source (origin
690 (method url-fetch)
691 (uri (string-append
692 "http://icedtea.wildebeest.org/download/source/icedtea6-"
693 version ".tar.xz"))
694 (sha256
695 (base32
696 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
697 (modules '((guix build utils)))
698 (snippet
699 '(begin
700 (substitute* "Makefile.in"
701 ;; do not leak information about the build host
702 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
703 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
704 #t))))
705 (build-system gnu-build-system)
706 (outputs '("out" ; Java Runtime Environment
707 "jdk" ; Java Development Kit
708 "doc")) ; all documentation
709 (arguments
710 `(;; There are many failing tests and many are known to fail upstream.
711 #:tests? #f
712
713 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
714 ;; gremlin) doesn't support it yet, so skip this phase.
715 #:validate-runpath? #f
716
717 #:modules ((guix build utils)
718 (guix build gnu-build-system)
719 (srfi srfi-19))
720
721 #:configure-flags
722 `("--enable-bootstrap"
723 "--enable-nss"
724 "--without-rhino"
725 "--with-parallel-jobs"
726 "--disable-downloading"
727 "--disable-tests"
728 ,(string-append "--with-ecj="
729 (assoc-ref %build-inputs "ecj")
730 "/share/java/ecj-bootstrap.jar")
731 ,(string-append "--with-jar="
732 (assoc-ref %build-inputs "fastjar")
733 "/bin/fastjar")
734 ,(string-append "--with-jdk-home="
735 (assoc-ref %build-inputs "classpath"))
736 ,(string-append "--with-java="
737 (assoc-ref %build-inputs "jamvm")
738 "/bin/jamvm"))
739 #:phases
740 (modify-phases %standard-phases
741 (replace 'unpack
742 (lambda* (#:key source inputs #:allow-other-keys)
743 (invoke "tar" "xvf" source)
744 (chdir (string-append "icedtea6-" ,version))
745 (mkdir "openjdk")
746 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
747 ;; The convenient OpenJDK source bundle is no longer
748 ;; available for download, so we have to take the sources
749 ;; from the Mercurial repositories and change the Makefile
750 ;; to avoid tests for the OpenJDK zip archive.
751 (with-directory-excursion "openjdk"
752 (for-each (lambda (part)
753 (mkdir part)
754 (copy-recursively
755 (assoc-ref inputs
756 (string-append part "-src"))
757 part))
758 '("jdk" "corba"
759 "langtools" "jaxp" "jaxws")))
760 (with-directory-excursion "openjdk"
761 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
762 (rename-file "hg-checkout" "hotspot"))
763 (substitute* "patches/freetypeversion.patch"
764 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
765 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
766 (substitute* "Makefile.in"
767 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
768 "echo \"trust me\";")
769 ;; The contents of the bootstrap directory must be
770 ;; writeable but when copying from the store they are
771 ;; not.
772 (("mkdir -p lib/rt" line)
773 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
774 (invoke "chmod" "-R" "u+w" "openjdk")))
775 (add-after 'unpack 'use-classpath
776 (lambda* (#:key inputs #:allow-other-keys)
777 (let ((jvmlib (assoc-ref inputs "classpath"))
778 (jamvm (assoc-ref inputs "jamvm")))
779 ;; Classpath does not provide rt.jar.
780 (substitute* "Makefile.in"
781 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
782 (string-append jvmlib "/share/classpath/glibj.zip")))
783 ;; Make sure we can find all classes.
784 (setenv "CLASSPATH"
785 (string-append jvmlib "/share/classpath/glibj.zip:"
786 jvmlib "/share/classpath/tools.zip:"
787 jamvm "/lib/rt.jar"))
788 (setenv "JAVACFLAGS"
789 (string-append "-cp "
790 jvmlib "/share/classpath/glibj.zip:"
791 jvmlib "/share/classpath/tools.zip")))
792 #t))
793 (add-after 'unpack 'patch-patches
794 (lambda _
795 ;; shebang in patches so that they apply cleanly
796 (substitute* '("patches/jtreg-jrunscript.patch"
797 "patches/hotspot/hs23/drop_unlicensed_test.patch")
798 (("#!/bin/sh") (string-append "#!" (which "sh"))))
799 #t))
800 (add-after 'unpack 'patch-paths
801 (lambda* (#:key inputs #:allow-other-keys)
802 ;; buildtree.make generates shell scripts, so we need to replace
803 ;; the generated shebang
804 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
805 (("/bin/sh") (which "bash")))
806
807 (let ((corebin (string-append
808 (assoc-ref inputs "coreutils") "/bin/"))
809 (binbin (string-append
810 (assoc-ref inputs "binutils") "/bin/"))
811 (grepbin (string-append
812 (assoc-ref inputs "grep") "/bin/")))
813 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
814 "openjdk/corba/make/common/shared/Defs-linux.gmk")
815 (("UNIXCOMMAND_PATH = /bin/")
816 (string-append "UNIXCOMMAND_PATH = " corebin))
817 (("USRBIN_PATH = /usr/bin/")
818 (string-append "USRBIN_PATH = " corebin))
819 (("DEVTOOLS_PATH *= */usr/bin/")
820 (string-append "DEVTOOLS_PATH = " corebin))
821 (("COMPILER_PATH *= */usr/bin/")
822 (string-append "COMPILER_PATH = "
823 (assoc-ref inputs "gcc") "/bin/"))
824 (("DEF_OBJCOPY *=.*objcopy")
825 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
826
827 ;; fix path to alsa header
828 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
829 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
830 (string-append "ALSA_INCLUDE="
831 (assoc-ref inputs "alsa-lib")
832 "/include/alsa/version.h")))
833
834 ;; fix hard-coded utility paths
835 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
836 "openjdk/corba/make/common/shared/Defs-utils.gmk")
837 (("ECHO *=.*echo")
838 (string-append "ECHO = " (which "echo")))
839 (("^GREP *=.*grep")
840 (string-append "GREP = " (which "grep")))
841 (("EGREP *=.*egrep")
842 (string-append "EGREP = " (which "egrep")))
843 (("CPIO *=.*cpio")
844 (string-append "CPIO = " (which "cpio")))
845 (("READELF *=.*readelf")
846 (string-append "READELF = " (which "readelf")))
847 (("^ *AR *=.*ar")
848 (string-append "AR = " (which "ar")))
849 (("^ *TAR *=.*tar")
850 (string-append "TAR = " (which "tar")))
851 (("AS *=.*as")
852 (string-append "AS = " (which "as")))
853 (("LD *=.*ld")
854 (string-append "LD = " (which "ld")))
855 (("STRIP *=.*strip")
856 (string-append "STRIP = " (which "strip")))
857 (("NM *=.*nm")
858 (string-append "NM = " (which "nm")))
859 (("^SH *=.*sh")
860 (string-append "SH = " (which "bash")))
861 (("^FIND *=.*find")
862 (string-append "FIND = " (which "find")))
863 (("LDD *=.*ldd")
864 (string-append "LDD = " (which "ldd")))
865 (("NAWK *=.*(n|g)awk")
866 (string-append "NAWK = " (which "gawk")))
867 (("XARGS *=.*xargs")
868 (string-append "XARGS = " (which "xargs")))
869 (("UNZIP *=.*unzip")
870 (string-append "UNZIP = " (which "unzip")))
871 (("ZIPEXE *=.*zip")
872 (string-append "ZIPEXE = " (which "zip")))
873 (("SED *=.*sed")
874 (string-append "SED = " (which "sed"))))
875
876 ;; Some of these timestamps cause problems as they are more than
877 ;; 10 years ago, failing the build process.
878 (substitute*
879 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
880 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
881 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
882 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
883 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
884 #t)))
885 (add-before 'configure 'set-additional-paths
886 (lambda* (#:key inputs #:allow-other-keys)
887 (setenv "CPATH"
888 (string-append (assoc-ref inputs "libxrender")
889 "/include/X11/extensions" ":"
890 (assoc-ref inputs "libxtst")
891 "/include/X11/extensions" ":"
892 (assoc-ref inputs "libxinerama")
893 "/include/X11/extensions" ":"
894 (or (getenv "CPATH") "")))
895 (setenv "ALT_CUPS_HEADERS_PATH"
896 (string-append (assoc-ref inputs "cups")
897 "/include"))
898 (setenv "ALT_FREETYPE_HEADERS_PATH"
899 (string-append (assoc-ref inputs "freetype")
900 "/include"))
901 (setenv "ALT_FREETYPE_LIB_PATH"
902 (string-append (assoc-ref inputs "freetype")
903 "/lib"))
904 #t))
905 (add-before 'build 'disable-os-version-check
906 ;; allow build on linux major version change
907 (lambda _
908 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
909 #t))
910 (replace 'install
911 (lambda* (#:key outputs #:allow-other-keys)
912 (let ((doc (string-append (assoc-ref outputs "doc")
913 "/share/doc/icedtea"))
914 (jre (assoc-ref outputs "out"))
915 (jdk (assoc-ref outputs "jdk")))
916 (copy-recursively "openjdk.build/docs" doc)
917 (copy-recursively "openjdk.build/j2re-image" jre)
918 (copy-recursively "openjdk.build/j2sdk-image" jdk))
919 #t)))))
920 (native-inputs
921 `(("ant" ,ant-bootstrap)
922 ("alsa-lib" ,alsa-lib)
923 ("attr" ,attr)
924 ("classpath" ,classpath-devel)
925 ("coreutils" ,coreutils)
926 ("cpio" ,cpio)
927 ("cups" ,cups)
928 ("ecj" ,ecj-bootstrap)
929 ("ecj-javac" ,ecj-javac-wrapper-final)
930 ("fastjar" ,fastjar)
931 ("fontconfig" ,fontconfig)
932 ("freetype" ,freetype)
933 ("gtk" ,gtk+-2)
934 ("gawk" ,gawk)
935 ("giflib" ,giflib)
936 ("grep" ,grep)
937 ("jamvm" ,jamvm)
938 ("lcms" ,lcms)
939 ("libjpeg" ,libjpeg)
940 ("libnsl" ,libnsl)
941 ("libpng" ,libpng)
942 ("libtool" ,libtool)
943 ("libx11" ,libx11)
944 ("libxcomposite" ,libxcomposite)
945 ("libxi" ,libxi)
946 ("libxinerama" ,libxinerama)
947 ("libxrender" ,libxrender)
948 ("libxslt" ,libxslt) ;for xsltproc
949 ("libxt" ,libxt)
950 ("libxtst" ,libxtst)
951 ("mit-krb5" ,mit-krb5)
952 ("nss" ,nss)
953 ("nss-certs" ,nss-certs)
954 ("perl" ,perl)
955 ("pkg-config" ,pkg-config)
956 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
957 ("unzip" ,unzip)
958 ("wget" ,wget)
959 ("which" ,which)
960 ("zip" ,zip)
961 ("zlib" ,zlib)
962 ("openjdk-src"
963 ,(origin
964 (method hg-fetch)
965 (uri (hg-reference
966 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
967 (changeset "jdk6-b41")))
968 (sha256
969 (base32
970 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
971 ("jdk-src"
972 ,(origin
973 (method hg-fetch)
974 (uri (hg-reference
975 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
976 (changeset "jdk6-b41")))
977 (sha256
978 (base32
979 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
980 ("hotspot-src"
981 ,(origin
982 (method hg-fetch)
983 (uri (hg-reference
984 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
985 (changeset "jdk6-b41")))
986 (sha256
987 (base32
988 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
989 (patches
990 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
991 ("corba-src"
992 ,(origin
993 (method hg-fetch)
994 (uri (hg-reference
995 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
996 (changeset "jdk6-b41")))
997 (sha256
998 (base32
999 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1000 ("langtools-src"
1001 ,(origin
1002 (method hg-fetch)
1003 (uri (hg-reference
1004 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1005 (changeset "jdk6-b41")))
1006 (sha256
1007 (base32
1008 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1009 ("jaxp-src"
1010 ,(origin
1011 (method hg-fetch)
1012 (uri (hg-reference
1013 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1014 (changeset "jdk6-b41")))
1015 (sha256
1016 (base32
1017 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1018 ("jaxws-src"
1019 ,(origin
1020 (method hg-fetch)
1021 (uri (hg-reference
1022 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1023 (changeset "jdk6-b41")))
1024 (sha256
1025 (base32
1026 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1027 (home-page "http://icedtea.classpath.org")
1028 (synopsis "Java development kit")
1029 (description
1030 "This package provides the OpenJDK built with the IcedTea build harness.
1031 This version of the OpenJDK is no longer maintained and is only used for
1032 bootstrapping purposes.")
1033 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1034 ;; same license as both GNU Classpath and OpenJDK.
1035 (license license:gpl2+)))
1036
1037 (define-public icedtea-7
1038 (let* ((version "2.6.13")
1039 (drop (lambda (name hash)
1040 (origin
1041 (method url-fetch)
1042 (uri (string-append
1043 "http://icedtea.classpath.org/download/drops"
1044 "/icedtea7/" version "/" name ".tar.bz2"))
1045 (sha256 (base32 hash))))))
1046 (package
1047 (name "icedtea")
1048 (version version)
1049 (source (origin
1050 (method url-fetch)
1051 (uri (string-append
1052 "http://icedtea.wildebeest.org/download/source/icedtea-"
1053 version ".tar.xz"))
1054 (sha256
1055 (base32
1056 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1057 (modules '((guix build utils)))
1058 (snippet
1059 '(begin
1060 (substitute* "Makefile.in"
1061 ;; do not leak information about the build host
1062 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1063 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1064 #t))))
1065 (build-system gnu-build-system)
1066 (outputs '("out" ; Java Runtime Environment
1067 "jdk" ; Java Development Kit
1068 "doc")) ; all documentation
1069 (arguments
1070 `(;; There are many test failures. Some are known to
1071 ;; fail upstream, others relate to not having an X
1072 ;; server running at test time, yet others are a
1073 ;; complete mystery to me.
1074
1075 ;; hotspot: passed: 241; failed: 45; error: 2
1076 ;; langtools: passed: 1,934; failed: 26
1077 ;; jdk: unknown
1078 #:tests? #f
1079
1080 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1081 ;; gremlin) doesn't support it yet, so skip this phase.
1082 #:validate-runpath? #f
1083
1084 ;; Apparently, the C locale is needed for some of the tests.
1085 #:locale "C"
1086
1087 #:modules ((guix build utils)
1088 (guix build gnu-build-system)
1089 (ice-9 match)
1090 (ice-9 popen)
1091 (srfi srfi-19)
1092 (srfi srfi-26))
1093
1094 #:configure-flags
1095 ;; TODO: package pcsc and sctp, and add to inputs
1096 `("--disable-system-pcsc"
1097 "--disable-system-sctp"
1098 "--enable-bootstrap"
1099 "--enable-nss"
1100 "--without-rhino"
1101 "--disable-downloading"
1102 "--disable-tests" ;they are run in the check phase instead
1103 "--with-openjdk-src-dir=./openjdk.src"
1104 ,(string-append "--with-jdk-home="
1105 (assoc-ref %build-inputs "jdk")))
1106
1107 #:phases
1108 (modify-phases %standard-phases
1109 (replace 'unpack
1110 (lambda* (#:key source inputs #:allow-other-keys)
1111 (let ((target (string-append "icedtea-" ,version))
1112 (unpack (lambda* (name #:optional dir)
1113 (let ((dir (or dir
1114 (string-drop-right name 5))))
1115 (mkdir dir)
1116 (invoke "tar" "xvf"
1117 (assoc-ref inputs name)
1118 "-C" dir
1119 "--strip-components=1")))))
1120 (mkdir target)
1121 (invoke "tar" "xvf" source
1122 "-C" target "--strip-components=1")
1123 (chdir target)
1124 (unpack "openjdk-src" "openjdk.src")
1125 (with-directory-excursion "openjdk.src"
1126 (for-each unpack
1127 (filter (cut string-suffix? "-drop" <>)
1128 (map (match-lambda
1129 ((name . _) name))
1130 inputs))))
1131 #t)))
1132 (add-after 'unpack 'patch-bitrot
1133 (lambda _
1134 (substitute* '("patches/boot/revert-6973616.patch"
1135 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1136 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1137 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1138 ;; As of attr 2.4.48 this header is no longer
1139 ;; included. It is provided by the libc instead.
1140 (substitute* '("configure"
1141 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1142 (("attr/xattr.h") "sys/xattr.h"))
1143 #t))
1144 (add-after 'unpack 'fix-x11-extension-include-path
1145 (lambda* (#:key inputs #:allow-other-keys)
1146 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1147 (((string-append "\\$\\(firstword \\$\\(wildcard "
1148 "\\$\\(OPENWIN_HOME\\)"
1149 "/include/X11/extensions\\).*$"))
1150 (string-append (assoc-ref inputs "libxrender")
1151 "/include/X11/extensions"
1152 " -I" (assoc-ref inputs "libxtst")
1153 "/include/X11/extensions"
1154 " -I" (assoc-ref inputs "libxinerama")
1155 "/include/X11/extensions"))
1156 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1157 #t))
1158 (add-after 'unpack 'patch-paths
1159 (lambda _
1160 ;; buildtree.make generates shell scripts, so we need to replace
1161 ;; the generated shebang
1162 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1163 (("/bin/sh") (which "bash")))
1164
1165 (let ((corebin (string-append
1166 (assoc-ref %build-inputs "coreutils") "/bin/"))
1167 (binbin (string-append
1168 (assoc-ref %build-inputs "binutils") "/bin/"))
1169 (grepbin (string-append
1170 (assoc-ref %build-inputs "grep") "/bin/")))
1171 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1172 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1173 (("UNIXCOMMAND_PATH = /bin/")
1174 (string-append "UNIXCOMMAND_PATH = " corebin))
1175 (("USRBIN_PATH = /usr/bin/")
1176 (string-append "USRBIN_PATH = " corebin))
1177 (("DEVTOOLS_PATH *= */usr/bin/")
1178 (string-append "DEVTOOLS_PATH = " corebin))
1179 (("COMPILER_PATH *= */usr/bin/")
1180 (string-append "COMPILER_PATH = "
1181 (assoc-ref %build-inputs "gcc") "/bin/"))
1182 (("DEF_OBJCOPY *=.*objcopy")
1183 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1184
1185 ;; fix path to alsa header
1186 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1187 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1188 (string-append "ALSA_INCLUDE="
1189 (assoc-ref %build-inputs "alsa-lib")
1190 "/include/alsa/version.h")))
1191
1192 ;; fix hard-coded utility paths
1193 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1194 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1195 (("ECHO *=.*echo")
1196 (string-append "ECHO = " (which "echo")))
1197 (("^GREP *=.*grep")
1198 (string-append "GREP = " (which "grep")))
1199 (("EGREP *=.*egrep")
1200 (string-append "EGREP = " (which "egrep")))
1201 (("CPIO *=.*cpio")
1202 (string-append "CPIO = " (which "cpio")))
1203 (("READELF *=.*readelf")
1204 (string-append "READELF = " (which "readelf")))
1205 (("^ *AR *=.*ar")
1206 (string-append "AR = " (which "ar")))
1207 (("^ *TAR *=.*tar")
1208 (string-append "TAR = " (which "tar")))
1209 (("AS *=.*as")
1210 (string-append "AS = " (which "as")))
1211 (("LD *=.*ld")
1212 (string-append "LD = " (which "ld")))
1213 (("STRIP *=.*strip")
1214 (string-append "STRIP = " (which "strip")))
1215 (("NM *=.*nm")
1216 (string-append "NM = " (which "nm")))
1217 (("^SH *=.*sh")
1218 (string-append "SH = " (which "bash")))
1219 (("^FIND *=.*find")
1220 (string-append "FIND = " (which "find")))
1221 (("LDD *=.*ldd")
1222 (string-append "LDD = " (which "ldd")))
1223 (("NAWK *=.*(n|g)awk")
1224 (string-append "NAWK = " (which "gawk")))
1225 (("XARGS *=.*xargs")
1226 (string-append "XARGS = " (which "xargs")))
1227 (("UNZIP *=.*unzip")
1228 (string-append "UNZIP = " (which "unzip")))
1229 (("ZIPEXE *=.*zip")
1230 (string-append "ZIPEXE = " (which "zip")))
1231 (("SED *=.*sed")
1232 (string-append "SED = " (which "sed"))))
1233
1234 ;; Some of these timestamps cause problems as they are more than
1235 ;; 10 years ago, failing the build process.
1236 (substitute*
1237 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1238 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1239 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1240 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1241 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1242 #t))
1243 (add-before 'configure 'set-additional-paths
1244 (lambda* (#:key inputs #:allow-other-keys)
1245 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1246 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1247 (string-append "ALSA_INCLUDE="
1248 (assoc-ref inputs "alsa-lib")
1249 "/include/alsa/version.h")))
1250 (setenv "CC" "gcc")
1251 (setenv "CPATH"
1252 (string-append (assoc-ref inputs "libxcomposite")
1253 "/include/X11/extensions" ":"
1254 (assoc-ref inputs "libxrender")
1255 "/include/X11/extensions" ":"
1256 (assoc-ref inputs "libxtst")
1257 "/include/X11/extensions" ":"
1258 (assoc-ref inputs "libxinerama")
1259 "/include/X11/extensions" ":"
1260 (or (getenv "CPATH") "")))
1261 (setenv "ALT_OBJCOPY" (which "objcopy"))
1262 (setenv "ALT_CUPS_HEADERS_PATH"
1263 (string-append (assoc-ref inputs "cups")
1264 "/include"))
1265 (setenv "ALT_FREETYPE_HEADERS_PATH"
1266 (string-append (assoc-ref inputs "freetype")
1267 "/include"))
1268 (setenv "ALT_FREETYPE_LIB_PATH"
1269 (string-append (assoc-ref inputs "freetype")
1270 "/lib"))
1271 #t))
1272 (add-before 'build 'disable-os-version-check
1273 ;; allow build on linux major version change
1274 (lambda _
1275 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1276 #t))
1277 (add-before 'check 'fix-test-framework
1278 (lambda _
1279 ;; Fix PATH in test environment
1280 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1281 (("PATH=/bin:/usr/bin")
1282 (string-append "PATH=" (getenv "PATH"))))
1283 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1284 (("/usr/bin/env") (which "env")))
1285 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1286 (("/bin/rm") (which "rm"))
1287 (("/bin/cp") (which "cp"))
1288 (("/bin/mv") (which "mv")))
1289 #t))
1290 (add-before 'check 'fix-hotspot-tests
1291 (lambda _
1292 (with-directory-excursion "openjdk.src/hotspot/test/"
1293 (substitute* "jprt.config"
1294 (("PATH=\"\\$\\{path4sdk\\}\"")
1295 (string-append "PATH=" (getenv "PATH")))
1296 (("make=/usr/bin/make")
1297 (string-append "make=" (which "make"))))
1298 (substitute* '("runtime/6626217/Test6626217.sh"
1299 "runtime/7110720/Test7110720.sh")
1300 (("/bin/rm") (which "rm"))
1301 (("/bin/cp") (which "cp"))
1302 (("/bin/mv") (which "mv"))))
1303 #t))
1304 (add-before 'check 'fix-jdk-tests
1305 (lambda _
1306 (with-directory-excursion "openjdk.src/jdk/test/"
1307 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1308 (("/bin/pwd") (which "pwd")))
1309 (substitute* "com/sun/jdi/ShellScaffold.sh"
1310 (("/bin/kill") (which "kill")))
1311 (substitute* "start-Xvfb.sh"
1312 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1313 (("/usr/bin/nohup") (which "nohup")))
1314 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1315 (("/bin/rm") (which "rm")))
1316 (substitute* "tools/launcher/MultipleJRE.sh"
1317 (("echo \"#!/bin/sh\"")
1318 (string-append "echo \"#!" (which "rm") "\""))
1319 (("/usr/bin/zip") (which "zip")))
1320 (substitute* "com/sun/jdi/OnThrowTest.java"
1321 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1322 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1323 (("/usr/bin/uptime") (which "uptime")))
1324 (substitute* "java/lang/ProcessBuilder/Basic.java"
1325 (("/usr/bin/env") (which "env"))
1326 (("/bin/false") (which "false"))
1327 (("/bin/true") (which "true"))
1328 (("/bin/cp") (which "cp"))
1329 (("/bin/sh") (which "sh")))
1330 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1331 (("/bin/sh") (which "sh")))
1332 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1333 (("/usr/bin/perl") (which "perl"))
1334 (("/bin/ps") (which "ps"))
1335 (("/bin/true") (which "true")))
1336 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1337 (("/usr/bin/tee") (which "tee")))
1338 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1339 (("/bin/true") (which "true")))
1340 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1341 (("/bin/cat") (which "cat")))
1342 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1343 (("/bin/sh") (which "sh"))
1344 (("/bin/true") (which "true"))
1345 (("/bin/kill") (which "kill")))
1346 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1347 (("/usr/bin/echo") (which "echo")))
1348 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1349 (("/usr/bin/cat") (which "cat")))
1350 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1351 (("/bin/cat") (which "cat"))
1352 (("/bin/sleep") (which "sleep"))
1353 (("/bin/sh") (which "sh")))
1354 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1355 (("/bin/cat") (which "cat")))
1356 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1357 (("/bin/chmod") (which "chmod")))
1358 (substitute* "java/util/zip/ZipFile/Assortment.java"
1359 (("/bin/sh") (which "sh"))))
1360 #t))
1361 (replace 'check
1362 (lambda _
1363 ;; The "make check-*" targets always return zero, so we need to
1364 ;; check for errors in the associated log files to determine
1365 ;; whether any tests have failed.
1366 (use-modules (ice-9 rdelim))
1367 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1368 (checker (lambda (port)
1369 (let loop ()
1370 (let ((line (read-line port)))
1371 (cond
1372 ((eof-object? line) #t)
1373 ((regexp-exec error-pattern line)
1374 (error "test failed"))
1375 (else (loop)))))))
1376 (run-test (lambda (test)
1377 (invoke "make" test)
1378 (call-with-input-file
1379 (string-append "test/" test ".log")
1380 checker))))
1381 (when #f ; skip tests
1382 (run-test "check-hotspot")
1383 (run-test "check-langtools")
1384 (run-test "check-jdk"))
1385 #t)))
1386 (replace 'install
1387 (lambda* (#:key outputs #:allow-other-keys)
1388 (let ((doc (string-append (assoc-ref outputs "doc")
1389 "/share/doc/icedtea"))
1390 (jre (assoc-ref outputs "out"))
1391 (jdk (assoc-ref outputs "jdk")))
1392 (copy-recursively "openjdk.build/docs" doc)
1393 (copy-recursively "openjdk.build/j2re-image" jre)
1394 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1395 #t))
1396 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1397 ;; But that shared object is located in the server/ folder, so it
1398 ;; cannot be found. This phase creates a symbolic link in the
1399 ;; lib/amd64 folder so that the other libraries can find it.
1400 ;;
1401 ;; See:
1402 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1403 ;;
1404 ;; FIXME: Find the bug in the build system, so that this symlink is
1405 ;; not needed.
1406 (add-after 'install 'install-libjvm
1407 (lambda* (#:key inputs outputs #:allow-other-keys)
1408 (let* ((lib-path (string-append (assoc-ref outputs "out")
1409 ;; See 'INSTALL_ARCH_DIR' in
1410 ;; 'configure'.
1411 ,(match (%current-system)
1412 ("i686-linux"
1413 "/lib/i386")
1414 ("x86_64-linux"
1415 "/lib/amd64")
1416 ("armhf-linux"
1417 "/lib/arm")
1418 ("aarch64-linux"
1419 "/lib/aarch64")))))
1420 (symlink (string-append lib-path "/server/libjvm.so")
1421 (string-append lib-path "/libjvm.so")))
1422 #t))
1423 ;; By default IcedTea only generates an empty keystore. In order to
1424 ;; be able to use certificates in Java programs we need to generate a
1425 ;; keystore from a set of certificates. For convenience we use the
1426 ;; certificates from the nss-certs package.
1427 (add-after 'install 'install-keystore
1428 (lambda* (#:key inputs outputs #:allow-other-keys)
1429 (let* ((keystore "cacerts")
1430 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1431 "/etc/ssl/certs"))
1432 (keytool (string-append (assoc-ref outputs "jdk")
1433 "/bin/keytool")))
1434 (define (extract-cert file target)
1435 (call-with-input-file file
1436 (lambda (in)
1437 (call-with-output-file target
1438 (lambda (out)
1439 (let loop ((line (read-line in 'concat))
1440 (copying? #f))
1441 (cond
1442 ((eof-object? line) #t)
1443 ((string-prefix? "-----BEGIN" line)
1444 (display line out)
1445 (loop (read-line in 'concat) #t))
1446 ((string-prefix? "-----END" line)
1447 (display line out)
1448 #t)
1449 (else
1450 (when copying? (display line out))
1451 (loop (read-line in 'concat) copying?)))))))))
1452 (define (import-cert cert)
1453 (format #t "Importing certificate ~a\n" (basename cert))
1454 (let ((temp "tmpcert"))
1455 (extract-cert cert temp)
1456 (let ((port (open-pipe* OPEN_WRITE keytool
1457 "-import"
1458 "-alias" (basename cert)
1459 "-keystore" keystore
1460 "-storepass" "changeit"
1461 "-file" temp)))
1462 (display "yes\n" port)
1463 (when (not (zero? (status:exit-val (close-pipe port))))
1464 (format #t "failed to import ~a\n" cert)))
1465 (delete-file temp)))
1466
1467 ;; This is necessary because the certificate directory contains
1468 ;; files with non-ASCII characters in their names.
1469 (setlocale LC_ALL "en_US.utf8")
1470 (setenv "LC_ALL" "en_US.utf8")
1471
1472 (for-each import-cert (find-files certs-dir "\\.pem$"))
1473 (mkdir-p (string-append (assoc-ref outputs "out")
1474 "/lib/security"))
1475 (mkdir-p (string-append (assoc-ref outputs "jdk")
1476 "/jre/lib/security"))
1477
1478 ;; The cacerts files we are going to overwrite are chmod'ed as
1479 ;; read-only (444) in icedtea-8 (which derives from this
1480 ;; package). We have to change this so we can overwrite them.
1481 (chmod (string-append (assoc-ref outputs "out")
1482 "/lib/security/" keystore) #o644)
1483 (chmod (string-append (assoc-ref outputs "jdk")
1484 "/jre/lib/security/" keystore) #o644)
1485
1486 (install-file keystore
1487 (string-append (assoc-ref outputs "out")
1488 "/lib/security"))
1489 (install-file keystore
1490 (string-append (assoc-ref outputs "jdk")
1491 "/jre/lib/security"))
1492 #t))))))
1493 (native-inputs
1494 `(("openjdk-src"
1495 ,(drop "openjdk"
1496 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1497 ("corba-drop"
1498 ,(drop "corba"
1499 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1500 ("jaxp-drop"
1501 ,(drop "jaxp"
1502 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1503 ("jaxws-drop"
1504 ,(drop "jaxws"
1505 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1506 ("jdk-drop"
1507 ,(drop "jdk"
1508 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1509 ("langtools-drop"
1510 ,(drop "langtools"
1511 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1512 ("hotspot-drop"
1513 ,(origin
1514 (method url-fetch)
1515 (uri (string-append
1516 "http://icedtea.classpath.org/downloads/drops"
1517 "/icedtea7/" version "/hotspot.tar.bz2"))
1518 (sha256
1519 (base32
1520 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1521 (patches (search-patches
1522 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1523 ("ant" ,ant-bootstrap)
1524 ("attr" ,attr)
1525 ("coreutils" ,coreutils)
1526 ("diffutils" ,diffutils) ;for tests
1527 ("gawk" ,gawk)
1528 ("grep" ,grep)
1529 ("libtool" ,libtool)
1530 ("pkg-config" ,pkg-config)
1531 ("wget" ,wget)
1532 ("which" ,which)
1533 ("cpio" ,cpio)
1534 ("zip" ,zip)
1535 ("unzip" ,unzip)
1536 ("fastjar" ,fastjar)
1537 ("libxslt" ,libxslt) ;for xsltproc
1538 ("nss-certs" ,nss-certs)
1539 ("perl" ,perl)
1540 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1541 ("jdk" ,icedtea-6 "jdk")))
1542 (inputs
1543 `(("alsa-lib" ,alsa-lib)
1544 ("cups" ,cups)
1545 ("libx11" ,libx11)
1546 ("libxcomposite" ,libxcomposite)
1547 ("libxt" ,libxt)
1548 ("libxtst" ,libxtst)
1549 ("libxi" ,libxi)
1550 ("libxinerama" ,libxinerama)
1551 ("libxrender" ,libxrender)
1552 ("libjpeg" ,libjpeg)
1553 ("libpng" ,libpng)
1554 ("mit-krb5" ,mit-krb5)
1555 ("nss" ,nss)
1556 ("giflib" ,giflib)
1557 ("fontconfig" ,fontconfig)
1558 ("freetype" ,freetype)
1559 ("lcms" ,lcms)
1560 ("zlib" ,zlib)
1561 ("gtk" ,gtk+-2)))
1562 (home-page "http://icedtea.classpath.org")
1563 (synopsis "Java development kit")
1564 (description
1565 "This package provides the Java development kit OpenJDK built with the
1566 IcedTea build harness.")
1567
1568 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1569 (supported-systems (delete "mips64el-linux" %supported-systems))
1570
1571 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1572 ;; same license as both GNU Classpath and OpenJDK.
1573 (license license:gpl2+))))
1574
1575 (define-public icedtea-8
1576 (let* ((version "3.7.0")
1577 (drop (lambda (name hash)
1578 (origin
1579 (method url-fetch)
1580 (uri (string-append
1581 "http://icedtea.classpath.org/download/drops"
1582 "/icedtea8/" version "/" name ".tar.xz"))
1583 (sha256 (base32 hash))))))
1584 (package (inherit icedtea-7)
1585 (version "3.7.0")
1586 (source (origin
1587 (method url-fetch)
1588 (uri (string-append
1589 "http://icedtea.wildebeest.org/download/source/icedtea-"
1590 version ".tar.xz"))
1591 (sha256
1592 (base32
1593 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1594 (modules '((guix build utils)))
1595 (snippet
1596 '(begin
1597 (substitute* '("configure"
1598 "acinclude.m4")
1599 ;; Do not embed build time
1600 (("(DIST_ID=\"Custom build).*$" _ prefix)
1601 (string-append prefix "\"\n"))
1602 ;; Do not leak information about the build host
1603 (("DIST_NAME=\"\\$build_os\"")
1604 "DIST_NAME=\"guix\""))
1605 #t))))
1606 (arguments
1607 `(#:imported-modules
1608 ((guix build ant-build-system)
1609 (guix build syscalls)
1610 ,@%gnu-build-system-modules)
1611 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1612 ((#:modules modules)
1613 `((guix build utils)
1614 (guix build gnu-build-system)
1615 ((guix build ant-build-system) #:prefix ant:)
1616 (ice-9 match)
1617 (ice-9 popen)
1618 (srfi srfi-19)
1619 (srfi srfi-26)))
1620 ((#:configure-flags flags)
1621 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1622 `( ;;"--disable-bootstrap"
1623 "--enable-bootstrap"
1624 "--enable-nss"
1625 "--disable-downloading"
1626 "--disable-system-pcsc"
1627 "--disable-system-sctp"
1628 "--disable-tests" ;they are run in the check phase instead
1629 "--with-openjdk-src-dir=./openjdk.src"
1630 ,(string-append "--with-jdk-home=" jdk))))
1631 ((#:phases phases)
1632 `(modify-phases ,phases
1633 (delete 'fix-x11-extension-include-path)
1634 (delete 'patch-paths)
1635 (delete 'set-additional-paths)
1636 (delete 'patch-patches)
1637 (delete 'patch-bitrot)
1638 ;; Prevent the keytool from recording the current time when
1639 ;; adding certificates at build time.
1640 (add-after 'unpack 'patch-keystore
1641 (lambda _
1642 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1643 (("date = new Date\\(\\);")
1644 "\
1645 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1646 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1647 new Date();"))
1648 #t))
1649 (add-after 'unpack 'patch-jni-libs
1650 ;; Hardcode dynamically loaded libraries.
1651 (lambda _
1652 (let* ((library-path (search-path-as-string->list
1653 (getenv "LIBRARY_PATH")))
1654 (find-library (lambda (name)
1655 (search-path
1656 library-path
1657 (string-append "lib" name ".so")))))
1658 (for-each
1659 (lambda (file)
1660 (catch 'decoding-error
1661 (lambda ()
1662 (substitute* file
1663 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1664 _ name version)
1665 (format #f "\"~a\"" (find-library name)))
1666 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1667 (format #f "\"~a\"" (find-library name)))))
1668 (lambda _
1669 ;; Those are safe to skip.
1670 (format (current-error-port)
1671 "warning: failed to substitute: ~a~%"
1672 file))))
1673 (find-files "openjdk.src/jdk/src/solaris/native"
1674 "\\.c|\\.h"))
1675 #t)))
1676 (replace 'install
1677 (lambda* (#:key outputs #:allow-other-keys)
1678 (let ((doc (string-append (assoc-ref outputs "doc")
1679 "/share/doc/icedtea"))
1680 (jre (assoc-ref outputs "out"))
1681 (jdk (assoc-ref outputs "jdk")))
1682 (copy-recursively "openjdk.build/docs" doc)
1683 (copy-recursively "openjdk.build/images/j2re-image" jre)
1684 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1685 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1686 ;; support via NSS.
1687 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1688 (string-append jre "/lib/security/nss.cfg"))
1689 #t)))
1690 (add-after 'install 'strip-jar-timestamps
1691 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1692 (native-inputs
1693 `(("jdk" ,icedtea-7 "jdk")
1694 ("openjdk-src"
1695 ,(drop "openjdk"
1696 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1697 ("aarch32-drop"
1698 ,(drop "aarch32"
1699 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1700 ("corba-drop"
1701 ,(drop "corba"
1702 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1703 ("jaxp-drop"
1704 ,(drop "jaxp"
1705 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1706 ("jaxws-drop"
1707 ,(drop "jaxws"
1708 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1709 ("jdk-drop"
1710 ,(drop "jdk"
1711 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1712 ("langtools-drop"
1713 ,(drop "langtools"
1714 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1715 ("hotspot-drop"
1716 ,(origin
1717 (method url-fetch)
1718 (uri (string-append
1719 "http://icedtea.classpath.org/download/drops"
1720 "/icedtea8/" version "/hotspot.tar.xz"))
1721 (sha256
1722 (base32
1723 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1724 (patches (search-patches
1725 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1726 ("nashorn-drop"
1727 ,(drop "nashorn"
1728 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1729 ("shenandoah-drop"
1730 ,(drop "shenandoah"
1731 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1732 ,@(fold alist-delete (package-native-inputs icedtea-7)
1733 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1734 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1735
1736 (define-public openjdk9
1737 (package
1738 (name "openjdk")
1739 (version "9.181")
1740 (source (origin
1741 (method url-fetch)
1742 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1743 (file-name (string-append name "-" version ".tar.bz2"))
1744 (sha256
1745 (base32
1746 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1747 (modules '((guix build utils)))
1748 (snippet
1749 `(begin
1750 (for-each delete-file (find-files "." ".*.bin$"))
1751 (for-each delete-file (find-files "." ".*.exe$"))
1752 (for-each delete-file (find-files "." ".*.jar$"))
1753 #t))))
1754 (build-system gnu-build-system)
1755 (outputs '("out" "jdk" "doc"))
1756 (arguments
1757 `(#:tests? #f; require jtreg
1758 #:imported-modules
1759 ((guix build syscalls)
1760 ,@%gnu-build-system-modules)
1761 #:phases
1762 (modify-phases %standard-phases
1763 (add-after 'patch-source-shebangs 'fix-java-shebangs
1764 (lambda _
1765 ;; This file was "fixed" by patch-source-shebangs, but it requires
1766 ;; this exact first line.
1767 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1768 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1769 #t))
1770 (replace 'configure
1771 (lambda* (#:key inputs outputs #:allow-other-keys)
1772 ;; TODO: unbundle libpng and lcms
1773 (invoke "bash" "./configure"
1774 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1775 "--disable-freetype-bundling"
1776 "--disable-warnings-as-errors"
1777 "--disable-hotspot-gtest"
1778 "--with-giflib=system"
1779 "--with-libjpeg=system"
1780 (string-append "--prefix=" (assoc-ref outputs "out")))
1781 #t))
1782 (replace 'build
1783 (lambda _
1784 (with-output-to-file ".src-rev"
1785 (lambda _
1786 (display ,version)))
1787 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1788 (invoke "make" "all")
1789 #t))
1790 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1791 ;; But that shared object is located in the server/ folder, so it
1792 ;; cannot be found. This phase creates a symbolic link in the
1793 ;; lib/ folder so that the other libraries can find it.
1794 ;;
1795 ;; See:
1796 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1797 ;;
1798 ;; FIXME: Find the bug in the build system, so that this symlink is
1799 ;; not needed.
1800 (add-after 'install 'install-libjvm
1801 (lambda* (#:key inputs outputs #:allow-other-keys)
1802 (let* ((lib-out (string-append (assoc-ref outputs "out")
1803 "/lib"))
1804 (lib-jdk (string-append (assoc-ref outputs "jdk")
1805 "/lib")))
1806 (symlink (string-append lib-jdk "/server/libjvm.so")
1807 (string-append lib-jdk "/libjvm.so"))
1808 (symlink (string-append lib-out "/server/libjvm.so")
1809 (string-append lib-out "/libjvm.so")))
1810 #t))
1811 (replace 'install
1812 (lambda* (#:key outputs #:allow-other-keys)
1813 (let ((out (assoc-ref outputs "out"))
1814 (jdk (assoc-ref outputs "jdk"))
1815 (doc (assoc-ref outputs "doc"))
1816 (images (car (find-files "build" ".*-server-release"
1817 #:directories? #t))))
1818 (copy-recursively (string-append images "/images/jdk") jdk)
1819 (copy-recursively (string-append images "/images/jre") out)
1820 (copy-recursively (string-append images "/images/docs") doc))
1821 #t))
1822 (add-after 'install 'strip-zip-timestamps
1823 (lambda* (#:key outputs #:allow-other-keys)
1824 (use-modules (guix build syscalls))
1825 (for-each (lambda (zip)
1826 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1827 (with-directory-excursion dir
1828 (invoke "unzip" zip))
1829 (delete-file zip)
1830 (for-each (lambda (file)
1831 (let ((s (lstat file)))
1832 (unless (eq? (stat:type s) 'symlink)
1833 (format #t "reset ~a~%" file)
1834 (utime file 0 0 0 0))))
1835 (find-files dir #:directories? #t))
1836 (with-directory-excursion dir
1837 (let ((files (find-files "." ".*" #:directories? #t)))
1838 (apply invoke "zip" "-0" "-X" zip files)))))
1839 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1840 #t)))))
1841 (inputs
1842 `(("alsa-lib" ,alsa-lib)
1843 ("cups" ,cups)
1844 ("fontconfig" ,fontconfig)
1845 ("freetype" ,freetype)
1846 ("giflib" ,giflib)
1847 ("lcms" ,lcms)
1848 ("libelf" ,libelf)
1849 ("libjpeg" ,libjpeg)
1850 ("libice" ,libice)
1851 ("libpng" ,libpng)
1852 ("libx11" ,libx11)
1853 ("libxcomposite" ,libxcomposite)
1854 ("libxi" ,libxi)
1855 ("libxinerama" ,libxinerama)
1856 ("libxrender" ,libxrender)
1857 ("libxt" ,libxt)
1858 ("libxtst" ,libxtst)))
1859 (native-inputs
1860 `(("icedtea-8" ,icedtea-8)
1861 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1862 ("unzip" ,unzip)
1863 ("which" ,which)
1864 ("zip" ,zip)))
1865 (home-page "https://openjdk.java.net/projects/jdk9/")
1866 (synopsis "Java development kit")
1867 (description
1868 "This package provides the Java development kit OpenJDK.")
1869 (license license:gpl2+)))
1870
1871 (define-public openjdk10
1872 (package
1873 (inherit openjdk9)
1874 (name "openjdk")
1875 (version "10.46")
1876 (source (origin
1877 (method url-fetch)
1878 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1879 (file-name (string-append name "-" version ".tar.bz2"))
1880 (sha256
1881 (base32
1882 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1883 (patches (search-patches
1884 "openjdk-10-idlj-reproducibility.patch"))
1885 (modules '((guix build utils)))
1886 (snippet
1887 `(begin
1888 (for-each delete-file (find-files "." ".*.bin$"))
1889 (for-each delete-file (find-files "." ".*.exe$"))
1890 (for-each delete-file (find-files "." ".*.jar$"))
1891 #t))))
1892 (arguments
1893 (substitute-keyword-arguments (package-arguments openjdk9)
1894 ((#:phases phases)
1895 `(modify-phases ,phases
1896 (replace 'fix-java-shebangs
1897 (lambda _
1898 ;; This file was "fixed" by patch-source-shebangs, but it requires
1899 ;; this exact first line.
1900 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1901 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1902 #t))
1903 (replace 'configure
1904 (lambda* (#:key inputs outputs #:allow-other-keys)
1905 (invoke "bash" "./configure"
1906 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1907 "--disable-freetype-bundling"
1908 "--disable-warnings-as-errors"
1909 "--disable-hotspot-gtest"
1910 "--with-giflib=system"
1911 "--with-libjpeg=system"
1912 "--with-native-debug-symbols=zipped"
1913 (string-append "--prefix=" (assoc-ref outputs "out")))
1914 #t))))))
1915 (native-inputs
1916 `(("openjdk9" ,openjdk9)
1917 ("openjdk9:jdk" ,openjdk9 "jdk")
1918 ("unzip" ,unzip)
1919 ("which" ,which)
1920 ("zip" ,zip)))))
1921
1922 (define-public openjdk11
1923 (package
1924 (name "openjdk")
1925 (version "11.28")
1926 (source (origin
1927 (method url-fetch)
1928 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1929 (file-name (string-append name "-" version ".tar.bz2"))
1930 (sha256
1931 (base32
1932 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1933 (modules '((guix build utils)))
1934 (snippet
1935 `(begin
1936 (for-each delete-file (find-files "." ".*.bin$"))
1937 (for-each delete-file (find-files "." ".*.exe$"))
1938 (for-each delete-file (find-files "." ".*.jar$"))
1939 #t))))
1940 (build-system gnu-build-system)
1941 (outputs '("out" "jdk" "doc"))
1942 (arguments
1943 `(#:imported-modules
1944 ((guix build syscalls)
1945 (ice-9 binary-ports)
1946 (rnrs bytevectors)
1947 ,@%gnu-build-system-modules)
1948 #:tests? #f; requires jtreg
1949 ;; TODO package jtreg
1950 ;; disable parallel builds, as the openjdk build system does not like -j
1951 #:parallel-build? #f
1952 #:parallel-tests? #f
1953 ;; reenable parallel builds and tests by adding the flags manually
1954 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1955 #:configure-flags
1956 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1957 "--disable-warnings-as-errors"
1958 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1959 "--with-native-debug-symbols=zipped"
1960 ;; do not use the bundled libraries
1961 "--with-giflib=system"
1962 "--with-lcms=system"
1963 "--with-libjpeg=system"
1964 "--with-libpng=system"
1965 "--with-version-pre="
1966 ;; allow the build system to locate the system freetype
1967 ,(string-append "--with-freetype-include="
1968 (assoc-ref %build-inputs "freetype") "/include")
1969 ,(string-append "--with-freetype-lib="
1970 (assoc-ref %build-inputs "freetype") "/lib"))
1971 ;; TODO
1972 #:phases
1973 (modify-phases %standard-phases
1974 (add-after 'patch-source-shebangs 'fix-java-shebangs
1975 (lambda _
1976 ;; This file was "fixed" by patch-source-shebangs, but it requires
1977 ;; this exact first line.
1978 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1979 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1980 #t))
1981 (replace 'build
1982 (lambda _
1983 (with-output-to-file ".src-rev"
1984 (lambda _
1985 (display ,version)))
1986 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1987 (invoke "make" "all")
1988 #t))
1989 ;; jdk 11 does not build jre by default any more
1990 ;; building it anyways
1991 ;; for further information see:
1992 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
1993 (add-after 'build 'build-jre
1994 (lambda _
1995 (invoke "make" "legacy-jre-image")
1996 #t))
1997 (replace 'install
1998 (lambda* (#:key outputs #:allow-other-keys)
1999 (let ((out (assoc-ref outputs "out"))
2000 (jdk (assoc-ref outputs "jdk"))
2001 (doc (assoc-ref outputs "doc"))
2002 (images (car (find-files "build" ".*-server-release"
2003 #:directories? #t))))
2004 (copy-recursively (string-append images "/images/jdk") jdk)
2005 (copy-recursively (string-append images "/images/jre") out)
2006 (copy-recursively (string-append images "/images/docs") doc))
2007 #t))
2008 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2009 ;; But that shared object is located in the server/ folder, so it
2010 ;; cannot be found. This phase creates a symbolic link in the
2011 ;; lib/ folder so that the other libraries can find it.
2012 ;;
2013 ;; See:
2014 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2015 ;;
2016 ;; FIXME: Find the bug in the build system, so that this symlink is
2017 ;; not needed.
2018 (add-after 'install 'install-libjvm
2019 (lambda* (#:key inputs outputs #:allow-other-keys)
2020 (let* ((lib-out (string-append (assoc-ref outputs "out")
2021 "/lib"))
2022 (lib-jdk (string-append (assoc-ref outputs "jdk")
2023 "/lib")))
2024 (symlink (string-append lib-jdk "/server/libjvm.so")
2025 (string-append lib-jdk "/libjvm.so"))
2026 (symlink (string-append lib-out "/server/libjvm.so")
2027 (string-append lib-out "/libjvm.so")))
2028 #t))
2029 (add-after 'install 'strip-character-data-timestamps
2030 (lambda* (#:key outputs #:allow-other-keys)
2031 (use-modules (guix build syscalls))
2032 (let ((archive (string-append
2033 (assoc-ref outputs "jdk") "/lib/src.zip"))
2034 (dir (mkdtemp! "zip-contents.XXXXXX")))
2035 (with-directory-excursion dir
2036 (invoke "unzip" archive))
2037 (delete-file archive)
2038 (with-directory-excursion dir
2039 (let ((char-data-files (find-files "." "CharacterData.*")))
2040 (for-each (lambda (file)
2041 (substitute* file
2042 (((string-append "This file was generated "
2043 "AUTOMATICALLY from a template "
2044 "file.*"))
2045 (string-append "This file was generated "
2046 "AUTOMATICALLY from a template "
2047 "file"))))
2048 char-data-files)))
2049 (with-directory-excursion dir
2050 (let ((files (find-files "." ".*" #:directories? #t)))
2051 (apply invoke "zip" "-0" "-X" archive files))))))
2052 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2053 (lambda* (#:key outputs #:allow-other-keys)
2054 (use-modules (guix build syscalls)
2055 (ice-9 binary-ports)
2056 (rnrs bytevectors))
2057 (letrec ((repack-archive
2058 (lambda (archive)
2059 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2060 (with-directory-excursion dir
2061 (invoke "unzip" archive))
2062 (delete-file archive)
2063 (for-each (compose repack-archive canonicalize-path)
2064 (find-files dir "(ct.sym|.*.jar)$"))
2065 (let ((reset-file-timestamp
2066 (lambda (file)
2067 (let ((s (lstat file)))
2068 (unless (eq? (stat:type s) 'symlink)
2069 (format #t "reset ~a~%" file)
2070 (utime file 0 0 0 0))))))
2071 (for-each reset-file-timestamp
2072 (find-files dir #:directories? #t)))
2073 (with-directory-excursion dir
2074 (let ((files (find-files "." ".*" #:directories? #t)))
2075 (apply invoke "zip" "-0" "-X" archive files)))))))
2076 (for-each repack-archive
2077 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2078 (for-each repack-archive
2079 (find-files (assoc-ref outputs "jdk")
2080 ".*.(zip|jar|diz)$"))
2081 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2082 (let ((repack-jmod
2083 (lambda (file-name)
2084 (call-with-input-file file-name
2085 (lambda (file)
2086 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2087 (if (equal? (get-bytevector-n
2088 file (bytevector-length header))
2089 header)
2090 (let* ((header-length (bytevector-length header))
2091 (temp-file (mkstemp!
2092 (string-copy
2093 "temp-file.XXXXXX")))
2094 (temp-filename (port-filename temp-file))
2095 (content-length
2096 (- (stat:size (stat file))
2097 header-length)))
2098 (sendfile temp-file file content-length header-length)
2099 (delete-file file-name)
2100 (close-port temp-file)
2101 (repack-archive (canonicalize-path temp-filename))
2102 (call-with-output-file file-name
2103 (lambda (file)
2104 (put-bytevector file header)
2105 (call-with-input-file temp-filename
2106 (lambda (temp-file)
2107 (sendfile
2108 file temp-file
2109 (stat:size (stat temp-file)) 0)))))))))))))
2110 (for-each repack-jmod
2111 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2112 #t)))
2113 (add-after 'install 'remove-timestamp-from-api-summary
2114 (lambda* (#:key outputs #:allow-other-keys)
2115 (substitute* (string-append (assoc-ref outputs "doc")
2116 "/api/overview-summary.html")
2117 (("Generated by javadoc \\(11-internal\\).*$")
2118 "Generated by javadoc (11-internal) -->\n"))
2119 #t)))))
2120 (inputs
2121 `(("alsa-lib" ,alsa-lib)
2122 ("cups" ,cups)
2123 ("fontconfig" ,fontconfig)
2124 ("freetype" ,freetype)
2125 ("giflib" ,giflib)
2126 ("lcms" ,lcms)
2127 ("libjpeg" ,libjpeg)
2128 ("libpng" ,libpng)
2129 ("libx11" ,libx11)
2130 ("libxext" ,libxext)
2131 ("libxrender" ,libxrender)
2132 ("libxt" ,libxt)
2133 ("libxtst" ,libxtst)))
2134 (native-inputs
2135 `(("autoconf" ,autoconf)
2136 ("openjdk10" ,openjdk10)
2137 ("openjdk10:jdk" ,openjdk10 "jdk")
2138 ("pkg-config" ,pkg-config)
2139 ("unzip" ,unzip)
2140 ("which" ,which)
2141 ("zip" ,zip)))
2142 (home-page "https://openjdk.java.net/projects/jdk/11/")
2143 (synopsis "Java development kit")
2144 (description
2145 "This package provides the Java development kit OpenJDK.")
2146 (license license:gpl2+)))
2147
2148 (define-public openjdk12
2149 (package
2150 (inherit openjdk11)
2151 (name "openjdk")
2152 (version "12.33")
2153 (source (origin
2154 (method url-fetch)
2155 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2156 (file-name (string-append name "-" version ".tar.bz2"))
2157 (sha256
2158 (base32
2159 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2160 (modules '((guix build utils)))
2161 (snippet
2162 `(begin
2163 (for-each delete-file (find-files "." ".*.bin$"))
2164 (for-each delete-file (find-files "." ".*.exe$"))
2165 (for-each delete-file (find-files "." ".*.jar$"))
2166 #t))))
2167 (inputs
2168 `(("alsa-lib" ,alsa-lib)
2169 ("cups" ,cups)
2170 ("fontconfig" ,fontconfig)
2171 ("freetype" ,freetype)
2172 ("giflib" ,giflib)
2173 ("lcms" ,lcms)
2174 ("libjpeg" ,libjpeg)
2175 ("libpng" ,libpng)
2176 ("libx11" ,libx11)
2177 ("libxext" ,libxext)
2178 ("libxrandr" ,libxrandr)
2179 ("libxrender" ,libxrender)
2180 ("libxt" ,libxt)
2181 ("libxtst" ,libxtst)))
2182 (native-inputs
2183 `(("autoconf" ,autoconf)
2184 ("openjdk11" ,openjdk11)
2185 ("openjdk11:jdk" ,openjdk11 "jdk")
2186 ("pkg-config" ,pkg-config)
2187 ("unzip" ,unzip)
2188 ("which" ,which)
2189 ("zip" ,zip)))
2190 (home-page "https://openjdk.java.net/projects/jdk/12")))
2191
2192 (define-public icedtea icedtea-8)
2193
2194 \f
2195 (define-public ant/java8
2196 (package (inherit ant-bootstrap)
2197 (name "ant")
2198 (version "1.10.1")
2199 (source (origin
2200 (method url-fetch)
2201 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2202 version "-src.tar.gz"))
2203 (sha256
2204 (base32
2205 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2206 (modules '((guix build utils)))
2207 (snippet
2208 '(begin
2209 (for-each delete-file
2210 (find-files "lib/optional" "\\.jar$"))
2211 #t))))
2212 (arguments
2213 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2214 ((#:phases phases)
2215 `(modify-phases ,phases
2216 (add-after 'unpack 'remove-scripts
2217 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2218 ;; wrappers.
2219 (lambda _
2220 (for-each delete-file
2221 (find-files "src/script"
2222 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2223 #t))
2224 (replace 'build
2225 (lambda* (#:key inputs outputs #:allow-other-keys)
2226 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2227
2228 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2229 ;; Ant to build. This is necessary in addition to disabling the
2230 ;; "check" phase, because the dependency on "test-jar" would always
2231 ;; result in the tests to be run.
2232 (substitute* "build.xml"
2233 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2234 (invoke "bash" "bootstrap.sh"
2235 (string-append "-Ddist.dir="
2236 (assoc-ref outputs "out")))))))))
2237 (native-inputs
2238 `(("jdk" ,icedtea-8 "jdk")
2239 ("zip" ,zip)
2240 ("unzip" ,unzip)))))
2241
2242 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2243 ;; requires Java 8.
2244 (define-public ant
2245 (package (inherit ant/java8)
2246 (version "1.9.9")
2247 (source (origin
2248 (method url-fetch)
2249 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2250 version "-src.tar.gz"))
2251 (sha256
2252 (base32
2253 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2254 (native-inputs
2255 `(("jdk" ,icedtea-7 "jdk")
2256 ("zip" ,zip)
2257 ("unzip" ,unzip)))))
2258
2259 (define-public ant-apache-bcel
2260 (package
2261 (inherit ant/java8)
2262 (name "ant-apache-bcel")
2263 (arguments
2264 (substitute-keyword-arguments (package-arguments ant/java8)
2265 ((#:phases phases)
2266 `(modify-phases ,phases
2267 (add-after 'unpack 'link-bcel
2268 (lambda* (#:key inputs #:allow-other-keys)
2269 (for-each (lambda (file)
2270 (symlink file
2271 (string-append "lib/optional/"
2272 (basename file))))
2273 (find-files (assoc-ref inputs "java-commons-bcel")
2274 "\\.jar$"))
2275 #t))
2276 (add-after 'build 'install
2277 (lambda* (#:key outputs #:allow-other-keys)
2278 (let* ((out (assoc-ref outputs "out"))
2279 (share (string-append out "/share/java"))
2280 (bin (string-append out "/bin"))
2281 (lib (string-append out "/lib")))
2282 (mkdir-p share)
2283 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2284 (delete-file-recursively bin)
2285 (delete-file-recursively lib)
2286 #t)))))))
2287 (inputs
2288 `(("java-commons-bcel" ,java-commons-bcel)
2289 ,@(package-inputs ant/java8)))))
2290
2291 (define-public ant-junit
2292 (package
2293 (inherit ant/java8)
2294 (name "ant-junit")
2295 (arguments
2296 (substitute-keyword-arguments (package-arguments ant/java8)
2297 ((#:phases phases)
2298 `(modify-phases ,phases
2299 (add-after 'unpack 'link-junit
2300 (lambda* (#:key inputs #:allow-other-keys)
2301 (for-each (lambda (file)
2302 (symlink file
2303 (string-append "lib/optional/"
2304 (basename file))))
2305 (find-files (assoc-ref inputs "java-junit")
2306 "\\.jar$"))
2307 #t))
2308 (add-after 'build 'install
2309 (lambda* (#:key outputs #:allow-other-keys)
2310 (let* ((out (assoc-ref outputs "out"))
2311 (share (string-append out "/share/java"))
2312 (bin (string-append out "/bin"))
2313 (lib (string-append out "/lib")))
2314 (mkdir-p share)
2315 (install-file (string-append lib "/ant-junit.jar") share)
2316 (delete-file-recursively bin)
2317 (delete-file-recursively lib)
2318 #t)))))))
2319 (inputs
2320 `(("java-junit" ,java-junit)
2321 ,@(package-inputs ant/java8)))))
2322
2323 (define-public java-openjfx-build
2324 (package
2325 (name "java-openjfx-build")
2326 ;; This is a java-8 version
2327 (version "8.202")
2328 (source (origin
2329 (method hg-fetch)
2330 (uri (hg-reference
2331 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2332 (changeset (string-append
2333 (string-join (string-split version #\.) "u")
2334 "-ga"))))
2335 (file-name (string-append name "-" version "-checkout"))
2336 (sha256
2337 (base32
2338 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2339 (build-system ant-build-system)
2340 (arguments
2341 `(#:jar-name "java-openjfx.jar"
2342 #:source-dir "buildSrc/src/main/java"
2343 #:test-dir "buildSrc/src/test"
2344 #:phases
2345 (modify-phases %standard-phases
2346 (add-before 'configure 'generate-jsl-parser
2347 (lambda _
2348 (invoke "antlr3" "-o"
2349 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2350 "buildSrc/src/main/antlr/JSL.g"))))))
2351 (inputs
2352 `(("antlr3" ,antlr3)
2353 ("java-stringtemplate" ,java-stringtemplate)))
2354 (native-inputs
2355 `(("java-junit" ,java-junit)
2356 ("java-hamcrest-core" ,java-hamcrest-core)))
2357 (home-page "https://openjfx.io")
2358 (synopsis "Graphical application toolkit in Java")
2359 (description "OpenJFX is a client application platform for desktop,
2360 mobile and embedded systems built on Java. Its goal is to produce a
2361 modern, efficient, and fully featured toolkit for developing rich client
2362 applications. This package contains base classes for the OpenJFX
2363 distribution and helper classes for building other parts of the
2364 distribution.")
2365 (license license:gpl2))) ;gpl2 only, with classpath exception
2366
2367 (define-public java-openjfx-base
2368 (package (inherit java-openjfx-build)
2369 (name "java-openjfx-base")
2370 (arguments
2371 `(#:jar-name "java-openjfx-base.jar"
2372 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2373 #:test-dir "modules/base/src/test"
2374 #:phases
2375 (modify-phases %standard-phases
2376 (add-before 'check 'remove-empty-file
2377 (lambda _
2378 (with-directory-excursion "modules/base/src/test/java"
2379 ;; These files are completely commented, but junit expects them to
2380 ;; contain a class, so tests fail.
2381 (delete-file
2382 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2383 (delete-file
2384 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2385 (delete-file "javafx/beans/property/PropertiesTest.java")
2386 (delete-file
2387 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2388 ;; This one fails
2389 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2390 #t)))))
2391 (propagated-inputs
2392 `(("java-openjfx-build" ,java-openjfx-build)))
2393 (description "OpenJFX is a client application platform for desktop,
2394 mobile and embedded systems built on Java. Its goal is to produce a
2395 modern, efficient, and fully featured toolkit for developing rich client
2396 applications. This package contains base classes for the OpenJFX
2397 distribution.")))
2398
2399 (define-public javacc-4
2400 (package
2401 (name "javacc")
2402 (version "4.1")
2403 (source (origin
2404 (method git-fetch)
2405 (uri (git-reference
2406 (url "https://github.com/javacc/javacc.git")
2407 (commit "release_41")))
2408 (file-name (string-append "javacc-" version "-checkout"))
2409 (sha256
2410 (base32
2411 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2412 (modules '((guix build utils)))
2413 ;; delete bundled jars
2414 (snippet '(begin (delete-file-recursively "lib") #t))))
2415 (build-system ant-build-system)
2416 ;; Tests fail with
2417 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2418 ;; JAVACODE failed
2419 (arguments
2420 `(#:tests? #f
2421 #:phases
2422 (modify-phases %standard-phases
2423 ;; Delete tests to avoid build failure (we don't run them anyway).
2424 (add-after 'unpack 'delete-tests
2425 (lambda _
2426 (for-each delete-file
2427 '("src/org/javacc/JavaCCTestCase.java"
2428 "src/org/javacc/parser/ExpansionTest.java"
2429 "src/org/javacc/parser/OptionsTest.java"
2430 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2431 (for-each delete-file-recursively
2432 '("src/org/javacc/parser/test"
2433 "src/org/javacc/jjdoc/test"))
2434 #t))
2435 (replace 'install (install-jars "bin/lib")))))
2436 (home-page "https://javacc.org/")
2437 (synopsis "Java parser generator")
2438 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2439 generator for use with Java applications. A parser generator is a tool that
2440 reads a grammar specification and converts it to a Java program that can
2441 recognize matches to the grammar. In addition to the parser generator itself,
2442 JavaCC provides other standard capabilities related to parser generation such
2443 as tree building (via a tool called JJTree included with JavaCC), actions,
2444 debugging, etc.")
2445 (license license:bsd-3)))
2446
2447 (define-public javacc
2448 (package
2449 (inherit javacc-4)
2450 (version "7.0.4")
2451 (source
2452 (origin
2453 (method git-fetch)
2454 (uri (git-reference
2455 (url "https://github.com/javacc/javacc.git")
2456 (commit version)))
2457 (file-name (git-file-name "javacc" version))
2458 (sha256
2459 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2460 (modules '((guix build utils)))
2461 ;; Delete bundled jars.
2462 (snippet '(begin (for-each delete-file-recursively
2463 '("bootstrap" "lib"))
2464 #t))))
2465 (arguments
2466 `(#:make-flags ; bootstrap from javacc-4
2467 (list (string-append "-Dbootstrap-jar="
2468 (assoc-ref %build-inputs "javacc")
2469 "/share/java/javacc.jar"))
2470 #:test-target "test"
2471 #:phases
2472 (modify-phases %standard-phases
2473 (replace 'install (install-jars "target"))
2474 (add-after 'install 'install-bin
2475 (lambda* (#:key outputs inputs #:allow-other-keys)
2476 (let* ((out (assoc-ref outputs "out"))
2477 (dir (string-append out "/share/java"))
2478 (bin (string-append out "/bin"))
2479 (javacc (string-append bin "/javacc")))
2480 (mkdir-p bin)
2481 (with-output-to-file javacc
2482 (lambda _
2483 (display
2484 (string-append "#!/bin/sh\n"
2485 (assoc-ref inputs "jdk") "/bin/java"
2486 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2487 (chmod javacc #o755)
2488 ;; symlink to different names to affect the first argument and
2489 ;; change the behavior of the jar file.
2490 (symlink javacc (string-append bin "/jjdoc"))
2491 (symlink javacc (string-append bin "/jjtree"))
2492 #t))))))
2493
2494 (native-inputs
2495 `(("javacc" ,javacc-4)))))
2496
2497 ;; This is the last 3.x release of ECJ
2498 (define-public java-ecj-3
2499 (package
2500 (name "java-ecj")
2501 (version "3.8.2")
2502 (source (origin
2503 (method url-fetch)
2504 (uri (string-append "http://archive.eclipse.org/eclipse/"
2505 "downloads/drops/R-" version
2506 "-201301310800/ecjsrc-" version ".jar"))
2507 (sha256
2508 (base32
2509 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2510 (build-system ant-build-system)
2511 (arguments
2512 `(#:tests? #f ; none included
2513 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2514 #:make-flags (list "-f" "src/build.xml")
2515 #:build-target "build"
2516 #:phases
2517 (modify-phases %standard-phases
2518 (add-after 'unpack 'fix-manifest
2519 (lambda _
2520 ;; Record the main class to make ecj executable.
2521 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2522 (lambda (in out)
2523 (display "Manifest-Version: 1.0
2524 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2525 out)))
2526 #t))
2527 (replace 'install (install-jars ".")))))
2528 (home-page "https://eclipse.org")
2529 (synopsis "Eclipse Java development tools core batch compiler")
2530 (description "This package provides the Eclipse Java core batch compiler.")
2531 (license license:epl1.0)))
2532
2533 ;; This is needed for java-cisd-args4j
2534 (define-public java-ecj-3.5
2535 (package (inherit java-ecj-3)
2536 (version "3.5.1")
2537 (source (origin
2538 (method url-fetch/zipbomb)
2539 (uri (string-append "http://archive.eclipse.org/eclipse/"
2540 "downloads/drops/R-" version
2541 "-200909170800/ecjsrc-" version ".zip"))
2542 (sha256
2543 (base32
2544 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2545 (build-system ant-build-system)
2546 (arguments
2547 `(#:tests? #f ; none included
2548 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2549 #:build-target "build"
2550 #:phases
2551 (modify-phases %standard-phases
2552 (add-after 'unpack 'fix-manifest
2553 (lambda _
2554 ;; Record the main class to make ecj executable.
2555 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2556 (lambda (in out)
2557 (dump-port in out)
2558 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2559 out)))
2560 #t))
2561 (replace 'install (install-jars ".")))))
2562 (native-inputs
2563 `(("unzip" ,unzip)))))
2564
2565 (define-public java-cisd-base
2566 (let ((revision 38938)
2567 (base-version "14.12.0"))
2568 (package
2569 (name "java-cisd-base")
2570 (version (string-append base-version "-" (number->string revision)))
2571 (source (origin
2572 (method svn-fetch)
2573 (uri (svn-reference
2574 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2575 "base/tags/release/"
2576 (version-major+minor base-version)
2577 ".x/" base-version "/base/"))
2578 (revision revision)))
2579 (file-name (string-append "java-cisd-base-" version "-checkout"))
2580 (sha256
2581 (base32
2582 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2583 (modules '((guix build utils)))
2584 (snippet
2585 '(begin
2586 ;; Delete included gradle jar
2587 (delete-file-recursively "gradle/wrapper")
2588 ;; Delete pre-built native libraries
2589 (delete-file-recursively "libs")
2590 #t))))
2591 (build-system ant-build-system)
2592 (arguments
2593 `(#:make-flags '("-file" "build/build.xml")
2594 #:test-target "jar-test"
2595 #:jdk ,icedtea-8
2596 #:phases
2597 (modify-phases %standard-phases
2598 (add-after 'unpack 'unpack-build-resources
2599 (lambda* (#:key inputs #:allow-other-keys)
2600 (copy-recursively (assoc-ref inputs "build-resources")
2601 "../build_resources")
2602 #t))
2603 (add-after 'unpack-build-resources 'fix-dependencies
2604 (lambda* (#:key inputs #:allow-other-keys)
2605 (substitute* "build/build.xml"
2606 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2607 (string-append (assoc-ref inputs "java-testng")
2608 "/share/java/java-testng.jar"))
2609 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2610 (string-append (assoc-ref inputs "java-commons-lang")
2611 "/share/java/commons-lang-"
2612 ,(package-version java-commons-lang) ".jar"))
2613 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2614 (string-append (assoc-ref inputs "java-commons-io")
2615 "/share/java/commons-io-"
2616 ,(package-version java-commons-io)
2617 "-SNAPSHOT.jar"))
2618 ;; Remove dependency on svn
2619 (("<build-info.*") "")
2620 (("\\$\\{revision.number\\}")
2621 ,(number->string revision))
2622 (("\\$\\{version.number\\}") ,base-version))
2623 ;; Remove dependency on classycle
2624 (substitute* "../build_resources/ant/build-common.xml"
2625 (("<taskdef name=\"dependency-checker.*") "")
2626 (("classname=\"classycle.*") "")
2627 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2628 #t))
2629 ;; A few tests fail because of the lack of a proper /etc/groups and
2630 ;; /etc/passwd file in the build container.
2631 (add-after 'unpack 'disable-broken-tests
2632 (lambda _
2633 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2634 (("Unix.isOperational\\(\\)") "false"))
2635 #t))
2636 ;; These decorators are almost useless and pull in an unpackaged
2637 ;; dependency.
2638 (add-after 'unpack 'remove-useless-decorators
2639 (lambda _
2640 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2641 (("@Private") "")
2642 (("import ch.rinn.restrictions.Private;") ""))
2643 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2644 (("@Friend.*") "")
2645 (("import ch.rinn.restrictions.Friend;") ""))
2646 #t))
2647 (add-before 'configure 'build-native-code
2648 (lambda* (#:key inputs #:allow-other-keys)
2649 (let ((jdk (assoc-ref inputs "jdk"))
2650 (dir ,(match (%current-system)
2651 ("i686-linux"
2652 "i386-Linux")
2653 ((or "armhf-linux" "aarch64-linux")
2654 "arm-Linux")
2655 ((or "x86_64-linux")
2656 "amd64-Linux")
2657 (_ "unknown-Linux"))))
2658 (with-directory-excursion "source/c"
2659 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2660 (string-append "-I" jdk "/include")
2661 (string-append "-I" jdk "/include/linux")
2662 "-o" "libunix.so")
2663 (invoke "gcc" "-shared" "-O3" "-fPIC"
2664 "-DMACHINE_BYTE_ORDER=1"
2665 "copyCommon.c"
2666 "copyByteChar.c"
2667 "copyByteDouble.c"
2668 "copyByteFloat.c"
2669 "copyByteInt.c"
2670 "copyByteLong.c"
2671 "copyByteShort.c"
2672 (string-append "-I" jdk "/include")
2673 (string-append "-I" jdk "/include/linux")
2674 "-o" "libnativedata.so"))
2675 (install-file "source/c/libunix.so"
2676 (string-append "libs/native/unix/" dir))
2677 (install-file "source/c/libnativedata.so"
2678 (string-append "libs/native/nativedata/" dir))
2679 #t)))
2680 ;; In the "check" phase we only build the test executable.
2681 (add-after 'check 'run-tests
2682 (lambda _
2683 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2684 (delete-file "targets/dist/sis-base-test.jar")
2685 #t))
2686 (replace 'install (install-jars "targets/dist")))))
2687 (native-inputs
2688 `(("jdk" ,icedtea-8)
2689 ("java-commons-lang" ,java-commons-lang)
2690 ("java-commons-io" ,java-commons-io)
2691 ("java-testng" ,java-testng)
2692 ("build-resources"
2693 ,(origin
2694 (method svn-fetch)
2695 (uri (svn-reference
2696 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2697 "base/tags/release/"
2698 (version-major+minor base-version)
2699 ".x/" base-version
2700 "/build_resources/"))
2701 (revision revision)))
2702 (sha256
2703 (base32
2704 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2705 (home-page "http://svnsis.ethz.ch")
2706 (synopsis "Utility classes for libraries from ETH Zurich")
2707 (description "This library supplies some utility classes needed for
2708 libraries from the SIS division at ETH Zurich like jHDF5.")
2709 ;; The C sources are under a non-copyleft license, which looks like a
2710 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2711 (license (list license:asl2.0
2712 (license:non-copyleft "file://source/c/COPYING"))))))
2713
2714 (define-public java-cisd-args4j
2715 (let ((revision 39162)
2716 (base-version "9.11.2"))
2717 (package
2718 (name "java-cisd-args4j")
2719 (version (string-append base-version "-" (number->string revision)))
2720 (source (origin
2721 (method svn-fetch)
2722 (uri (svn-reference
2723 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2724 "args4j/tags/release/"
2725 (version-major+minor base-version)
2726 ".x/" base-version "/args4j/"))
2727 (revision revision)))
2728 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2729 (sha256
2730 (base32
2731 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2732 (build-system ant-build-system)
2733 (arguments
2734 `(#:make-flags '("-file" "build/build.xml")
2735 #:tests? #f ; there are no tests
2736 ;; There are weird build failures with JDK8, such as: "The type
2737 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2738 ;; referenced from required .class files"
2739 #:jdk ,icedtea-7
2740 #:modules ((guix build ant-build-system)
2741 (guix build utils)
2742 (guix build java-utils)
2743 (sxml simple)
2744 (sxml transform)
2745 (sxml xpath))
2746 #:phases
2747 (modify-phases %standard-phases
2748 (add-after 'unpack 'unpack-build-resources
2749 (lambda* (#:key inputs #:allow-other-keys)
2750 (mkdir-p "../build_resources")
2751 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2752 "-C" "../build_resources"
2753 "--strip-components=1")
2754 (mkdir-p "../build_resources/lib")
2755 #t))
2756 (add-after 'unpack-build-resources 'fix-dependencies
2757 (lambda* (#:key inputs #:allow-other-keys)
2758 ;; FIXME: There should be a more convenient abstraction for
2759 ;; editing XML files.
2760 (with-directory-excursion "../build_resources/ant/"
2761 (chmod "build-common.xml" #o664)
2762 (call-with-output-file "build-common.xml.new"
2763 (lambda (port)
2764 (sxml->xml
2765 (pre-post-order
2766 (with-input-from-file "build-common.xml"
2767 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2768 `(;; Remove dependency on classycle and custom ant tasks
2769 (taskdef . ,(lambda (tag . kids)
2770 (let ((name ((sxpath '(name *text*)) kids)))
2771 (if (or (member "build-info" name)
2772 (member "dependency-checker" name)
2773 (member "build-java-subprojects" name)
2774 (member "project-classpath" name))
2775 '() ; skip
2776 `(,tag ,@kids)))))
2777 (typedef . ,(lambda (tag . kids)
2778 (let ((name ((sxpath '(name *text*)) kids)))
2779 (if (member "recursive-jar" name)
2780 '() ; skip
2781 `(,tag ,@kids)))))
2782 (build-java-subprojects . ,(lambda _ '()))
2783 ;; Ignore everything else
2784 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2785 (*text* . ,(lambda (_ txt) txt))))
2786 port)))
2787 (rename-file "build-common.xml.new" "build-common.xml"))
2788 (substitute* "build/build.xml"
2789 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2790 (string-append (assoc-ref inputs "java-cisd-base")
2791 "/share/java/sis-base.jar"))
2792 ;; Remove dependency on svn
2793 (("<build-info.*") "")
2794 (("\\$\\{revision.number\\}")
2795 ,(number->string revision))
2796 (("\\$\\{version.number\\}") ,base-version)
2797 ;; Don't use custom ant tasks.
2798 (("recursive-jar") "jar")
2799 (("<project-classpath.*") ""))
2800 #t))
2801 (replace 'install (install-jars "targets/dist")))))
2802 (inputs
2803 `(("java-cisd-base" ,java-cisd-base)))
2804 (native-inputs
2805 `(("ecj" ,java-ecj-3.5)
2806 ("build-resources"
2807 ,(origin
2808 (method svn-fetch)
2809 (uri (svn-reference
2810 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2811 "args4j/tags/release/"
2812 (version-major+minor base-version)
2813 ".x/" base-version
2814 "/build_resources/"))
2815 (revision revision)))
2816 (sha256
2817 (base32
2818 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2819 (modules '((guix build utils)))
2820 ;; Delete bundled pre-built jars.
2821 (snippet
2822 '(begin (delete-file-recursively "lib/") #t))))))
2823 (home-page "http://svnsis.ethz.ch")
2824 (synopsis "Command line parser library")
2825 (description "This package provides a parser for command line arguments.")
2826 (license license:asl2.0))))
2827
2828 (define-public java-cisd-jhdf5
2829 (let ((revision 39162)
2830 (base-version "14.12.6"))
2831 (package
2832 (name "java-cisd-jhdf5")
2833 (version (string-append base-version "-" (number->string revision)))
2834 (source (origin
2835 (method svn-fetch)
2836 (uri (svn-reference
2837 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2838 "jhdf5/tags/release/"
2839 (version-major+minor base-version)
2840 ".x/" base-version "/jhdf5/"))
2841 (revision revision)))
2842 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2843 (sha256
2844 (base32
2845 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2846 (modules '((guix build utils)))
2847 (snippet
2848 '(begin
2849 ;; Delete included gradle jar
2850 (delete-file-recursively "gradle/wrapper")
2851 ;; Delete pre-built native libraries
2852 (delete-file-recursively "libs")
2853 #t))))
2854 (build-system ant-build-system)
2855 (arguments
2856 `(#:make-flags '("-file" "build/build.xml")
2857 #:build-target "jar-all"
2858 #:test-target "jar-test"
2859 #:jdk ,icedtea-8
2860 #:phases
2861 (modify-phases %standard-phases
2862 ;; FIXME: this build phase fails.
2863 (delete 'generate-jar-indices)
2864 ;; Don't erase results from the build phase when building tests.
2865 (add-after 'unpack 'separate-test-target-from-clean
2866 (lambda _
2867 (substitute* "build/build.xml"
2868 (("\"jar-test\" depends=\"clean, ")
2869 "\"jar-test\" depends=\""))
2870 #t))
2871 (add-after 'unpack 'unpack-build-resources
2872 (lambda* (#:key inputs #:allow-other-keys)
2873 (copy-recursively (assoc-ref inputs "build-resources")
2874 "../build_resources")
2875 (delete-file-recursively "../build_resources/lib/")
2876 (mkdir-p "../build_resources/lib")
2877 ;; Remove dependency on classycle
2878 (substitute* "../build_resources/ant/build-common.xml"
2879 (("<taskdef name=\"dependency-checker.*") "")
2880 (("classname=\"classycle.*") "")
2881 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2882 ;; Remove dependency on svn
2883 (substitute* "build/build.xml"
2884 (("<build-info.*") "")
2885 (("\\$\\{revision.number\\}")
2886 ,(number->string revision))
2887 (("\\$\\{version.number\\}") ,base-version))
2888 #t))
2889 (add-after 'unpack-build-resources 'fix-dependencies
2890 (lambda* (#:key inputs #:allow-other-keys)
2891 (substitute* "../build_resources/ant/build-common.xml"
2892 (("../libraries/testng/testng-jdk15.jar")
2893 (string-append (assoc-ref inputs "java-testng")
2894 "/share/java/java-testng.jar")))
2895 (substitute* "build/build.xml"
2896 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2897 (string-append (assoc-ref inputs "java-cisd-base")
2898 "/share/java/sis-base.jar"))
2899 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2900 (string-append (assoc-ref inputs "java-cisd-args4j")
2901 "/share/java/cisd-args4j.jar"))
2902 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2903 (string-append (assoc-ref inputs "java-commons-lang")
2904 "/share/java/commons-lang-"
2905 ,(package-version java-commons-lang) ".jar"))
2906 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2907 (string-append (assoc-ref inputs "java-commons-io")
2908 "/share/java/commons-io-"
2909 ,(package-version java-commons-io)
2910 "-SNAPSHOT.jar"))
2911 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2912 (string-append (assoc-ref inputs "java-testng")
2913 "/share/java/java-testng.jar"))
2914 (("\\$\\{lib\\}/junit4/junit.jar")
2915 (string-append (assoc-ref inputs "java-junit")
2916 "/share/java/junit.jar"))
2917 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
2918 (string-append (assoc-ref inputs "java-hamcrest-core")
2919 "/share/java/hamcrest-core.jar")))
2920 ;; Remove dependency on ch.rinn.restrictions
2921 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
2922 (substitute* '("BitSetConversionUtils.java"
2923 "HDF5Utils.java")
2924 (("import ch.rinn.restrictions.Private;") "")
2925 (("@Private") "")))
2926 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
2927 (substitute* '("BitSetConversionTest.java"
2928 "h5ar/HDF5ArchiverTest.java")
2929 (("import ch.rinn.restrictions.Friend;") "")
2930 (("@Friend.*") ""))
2931 ;; Remove leftovers from removing @Friend
2932 (substitute* "h5ar/HDF5ArchiverTest.java"
2933 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
2934 "")))
2935 #t))
2936 (add-before 'configure 'build-native-library
2937 (lambda* (#:key inputs #:allow-other-keys)
2938 (let ((jdk (assoc-ref inputs "jdk"))
2939 (hdf5 (assoc-ref inputs "hdf5"))
2940 (dir ,(match (%current-system)
2941 ("i686-linux"
2942 "i386-Linux")
2943 ((or "armhf-linux" "aarch64-linux")
2944 "arm-Linux")
2945 ((or "x86_64-linux")
2946 "amd64-Linux")
2947 (_ "unknown-Linux"))))
2948 (with-directory-excursion "source/c"
2949 (apply invoke `("gcc" "-shared" "-O3"
2950 "-fPIC"
2951 "-Wl,--exclude-libs,ALL"
2952 ,@(find-files "jhdf5" "\\.c$")
2953 ,@(find-files "hdf-java" "\\.c$")
2954 ,(string-append "-I" hdf5 "/include")
2955 ,(string-append "-I" jdk "/include")
2956 ,(string-append "-I" jdk "/include/linux")
2957 ,(string-append hdf5 "/lib/libhdf5.a")
2958 "-o" "libjhdf5.so" "-lz")))
2959 (install-file "source/c/libjhdf5.so"
2960 (string-append "libs/native/jhdf5/" dir))
2961 #t)))
2962 ;; In the "check" phase we only build the test executable.
2963 (add-after 'check 'run-tests
2964 (lambda _
2965 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
2966 (delete-file "targets/dist/sis-jhdf5-test.jar")
2967 #t))
2968 (replace 'install
2969 (install-jars "targets/dist")))))
2970 (inputs
2971 `(("java-cisd-base" ,java-cisd-base)
2972 ("java-cisd-args4j" ,java-cisd-args4j)
2973 ("java-commons-lang" ,java-commons-lang)
2974 ("java-commons-io" ,java-commons-io)
2975 ("hdf5" ,hdf5)
2976 ("zlib" ,zlib)))
2977 (native-inputs
2978 `(("jdk" ,icedtea-8)
2979 ("java-testng" ,java-testng)
2980 ("java-junit" ,java-junit)
2981 ("java-jmock" ,java-jmock)
2982 ("java-hamcrest-core" ,java-hamcrest-core)
2983 ("build-resources"
2984 ,(origin
2985 (method svn-fetch)
2986 (uri (svn-reference
2987 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2988 "jhdf5/tags/release/"
2989 (version-major+minor base-version)
2990 ".x/" base-version
2991 "/build_resources/"))
2992 (revision revision)))
2993 (sha256
2994 (base32
2995 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2996 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
2997 (synopsis "Java binding for HDF5")
2998 (description "JHDF5 is a high-level API in Java for reading and writing
2999 HDF5 files, building on the libraries provided by the HDF Group.")
3000 ;; The C sources are under a non-copyleft license, which looks like a
3001 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3002 (license (list license:asl2.0
3003 (license:non-copyleft "file://source/c/COPYING"))))))
3004
3005 (define-public java-classpathx-servletapi
3006 (package
3007 (name "java-classpathx-servletapi")
3008 (version "3.0.1")
3009 (source (origin
3010 (method url-fetch)
3011 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3012 "servletapi-" version ".tar.gz"))
3013 (sha256
3014 (base32
3015 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3016 (build-system ant-build-system)
3017 (arguments
3018 `(#:tests? #f ; there is no test target
3019 #:build-target "compile"
3020 #:make-flags
3021 (list "-Dbuild.compiler=javac1.8"
3022 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3023 #:phases
3024 (modify-phases %standard-phases
3025 (replace 'install
3026 (lambda* (#:key make-flags #:allow-other-keys)
3027 (apply invoke `("ant" "dist" ,@make-flags)))))))
3028 (home-page "https://www.gnu.org/software/classpathx/")
3029 (synopsis "Java servlet API implementation")
3030 (description "This is the GNU servlet API distribution, part of the
3031 ClasspathX project. It provides implementations of version 3.0 of the servlet
3032 API and version 2.1 of the Java ServerPages API.")
3033 (license license:gpl3+)))
3034
3035 (define-public java-javaee-servletapi
3036 (package
3037 (name "java-javaee-servletapi")
3038 (version "3.1.0")
3039 (source (origin
3040 (method url-fetch)
3041 (uri (string-append "https://github.com/javaee/servlet-spec/"
3042 "archive/" version ".zip"))
3043 (file-name (string-append name "-" version ".zip"))
3044 (sha256
3045 (base32
3046 "0m6p13vgfb1ihich1jp5j6fqlhkjsrkn32c86bsbkryp38ipwg8w"))))
3047 (build-system ant-build-system)
3048 (arguments
3049 `(#:jar-name "javax-servletapi.jar"
3050 ;; no tests
3051 #:tests? #f
3052 #:source-dir "src/main/java"))
3053 (native-inputs
3054 `(("unzip" ,unzip)))
3055 (home-page "https://javaee.github.io/servlet-spec/")
3056 (synopsis "Java servlet API")
3057 (description "Java Servlet is the foundation web specification in the
3058 Java Enterprise Platform. Developers can build web applications using the
3059 Servlet API to interact with the request/response workflow. This project
3060 provides information on the continued development of the Java Servlet
3061 specification.")
3062 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3063 ;; Some files are licensed under ASL 2.0.
3064 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3065
3066 (define-public java-swt
3067 (package
3068 (name "java-swt")
3069 (version "4.7.1a")
3070 (source
3071 ;; The types of many variables and procedures differ in the sources
3072 ;; dependent on whether the target architecture is a 32-bit system or a
3073 ;; 64-bit system. Instead of patching the sources on demand in a build
3074 ;; phase we download either the 32-bit archive (which mostly uses "int"
3075 ;; types) or the 64-bit archive (which mostly uses "long" types).
3076 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3077 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3078 (file32 "x86")
3079 (file64 "x86_64"))
3080 (let-values (((hash file)
3081 (match (or (%current-target-system) (%current-system))
3082 ("x86_64-linux" (values hash64 file64))
3083 (_ (values hash32 file32)))))
3084 (origin
3085 (method url-fetch)
3086 (uri (string-append
3087 "http://download.eclipse.org/eclipse/downloads/drops4/"
3088 "R-" version "-201710090410/swt-" version
3089 "-gtk-linux-" file ".zip"))
3090 (sha256 (base32 hash))))))
3091 (build-system ant-build-system)
3092 (arguments
3093 `(#:jar-name "swt.jar"
3094 #:jdk ,icedtea-8
3095 #:tests? #f ; no "check" target
3096 #:phases
3097 (modify-phases %standard-phases
3098 (replace 'unpack
3099 (lambda* (#:key source #:allow-other-keys)
3100 (mkdir "swt")
3101 (invoke "unzip" source "-d" "swt")
3102 (chdir "swt")
3103 (mkdir "src")
3104 (invoke "unzip" "src.zip" "-d" "src")))
3105 ;; The classpath contains invalid icecat jars. Since we don't need
3106 ;; anything other than the JDK on the classpath, we can simply unset
3107 ;; it.
3108 (add-after 'configure 'unset-classpath
3109 (lambda _ (unsetenv "CLASSPATH") #t))
3110 (add-before 'build 'build-native
3111 (lambda* (#:key inputs outputs #:allow-other-keys)
3112 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3113 ;; Build shared libraries. Users of SWT have to set the system
3114 ;; property swt.library.path to the "lib" directory of this
3115 ;; package output.
3116 (mkdir-p lib)
3117 (setenv "OUTPUT_DIR" lib)
3118 (with-directory-excursion "src"
3119 (invoke "bash" "build.sh")))))
3120 (add-after 'install 'install-native
3121 (lambda* (#:key outputs #:allow-other-keys)
3122 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3123 (for-each (lambda (file)
3124 (install-file file lib))
3125 (find-files "." "\\.so$"))
3126 #t))))))
3127 (inputs
3128 `(("gtk" ,gtk+-2)
3129 ("libxtst" ,libxtst)
3130 ("libxt" ,libxt)
3131 ("mesa" ,mesa)
3132 ("glu" ,glu)))
3133 (native-inputs
3134 `(("pkg-config" ,pkg-config)
3135 ("unzip" ,unzip)))
3136 (home-page "https://www.eclipse.org/swt/")
3137 (synopsis "Widget toolkit for Java")
3138 (description
3139 "SWT is a widget toolkit for Java designed to provide efficient, portable
3140 access to the user-interface facilities of the operating systems on which it
3141 is implemented.")
3142 ;; SWT code is licensed under EPL1.0
3143 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3144 ;; Cairo bindings contain code under MPL1.1
3145 ;; XULRunner 1.9 bindings contain code under MPL2.0
3146 (license (list
3147 license:epl1.0
3148 license:mpl1.1
3149 license:mpl2.0
3150 license:lgpl2.1+))))
3151
3152 (define-public java-xz
3153 (package
3154 (name "java-xz")
3155 (version "1.6")
3156 (source (origin
3157 (method url-fetch)
3158 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3159 (sha256
3160 (base32
3161 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3162 (build-system ant-build-system)
3163 (arguments
3164 `(#:tests? #f ; There are no tests to run.
3165 #:jar-name ,(string-append "xz-" version ".jar")
3166 #:phases
3167 (modify-phases %standard-phases
3168 ;; The unpack phase enters the "maven" directory by accident.
3169 (add-after 'unpack 'chdir
3170 (lambda _ (chdir "..") #t)))))
3171 (native-inputs
3172 `(("unzip" ,unzip)))
3173 (home-page "https://tukaani.org/xz/java.html")
3174 (synopsis "Implementation of XZ data compression in pure Java")
3175 (description "This library aims to be a complete implementation of XZ data
3176 compression in pure Java. Single-threaded streamed compression and
3177 decompression and random access decompression have been fully implemented.")
3178 (license license:public-domain)))
3179
3180 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3181 ;; of the latest release.
3182 (define-public java-qdox-1.12
3183 (package
3184 (name "java-qdox")
3185 (version "1.12.1")
3186 (source (origin
3187 (method url-fetch)
3188 (uri (string-append "http://central.maven.org/maven2/"
3189 "com/thoughtworks/qdox/qdox/" version
3190 "/qdox-" version "-sources.jar"))
3191 (sha256
3192 (base32
3193 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3194 (build-system ant-build-system)
3195 (arguments
3196 `(;; Tests require junit
3197 #:tests? #f
3198 #:jar-name "qdox.jar"
3199 #:phases
3200 (modify-phases %standard-phases
3201 (replace 'unpack
3202 (lambda* (#:key source #:allow-other-keys)
3203 (mkdir "src")
3204 (with-directory-excursion "src"
3205 (invoke "jar" "-xf" source))))
3206 ;; At this point we don't have junit, so we must remove the API
3207 ;; tests.
3208 (add-after 'unpack 'delete-tests
3209 (lambda _
3210 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3211 #t)))))
3212 (home-page "http://qdox.codehaus.org/")
3213 (synopsis "Parse definitions from Java source files")
3214 (description
3215 "QDox is a high speed, small footprint parser for extracting
3216 class/interface/method definitions from source files complete with JavaDoc
3217 @code{@@tags}. It is designed to be used by active code generators or
3218 documentation tools.")
3219 (license license:asl2.0)))
3220
3221 (define-public java-jarjar
3222 (package
3223 (name "java-jarjar")
3224 (version "1.4")
3225 (source (origin
3226 (method url-fetch)
3227 (uri (string-append
3228 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3229 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3230 (sha256
3231 (base32
3232 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3233 (modules '((guix build utils)))
3234 (snippet
3235 '(begin
3236 ;; Delete bundled thirds-party jar archives.
3237 ;; TODO: unbundle maven-plugin-api.
3238 (delete-file "lib/asm-4.0.jar")
3239 (delete-file "lib/asm-commons-4.0.jar")
3240 (delete-file "lib/junit-4.8.1.jar")
3241 #t))))
3242 (build-system ant-build-system)
3243 (arguments
3244 `(;; Tests require junit, which ultimately depends on this package.
3245 #:tests? #f
3246 #:build-target "jar"
3247 #:phases
3248 (modify-phases %standard-phases
3249 (add-before 'build 'do-not-use-bundled-asm
3250 (lambda* (#:key inputs #:allow-other-keys)
3251 (substitute* "build.xml"
3252 (("<path id=\"path.build\">")
3253 (string-append "<path id=\"path.build\"><fileset dir=\""
3254 (assoc-ref inputs "java-asm-bootstrap")
3255 "/share/java\" includes=\"**/*.jar\"/>"))
3256 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3257 (("lib/asm-commons-4.0.jar")
3258 (string-append (assoc-ref inputs "java-asm-bootstrap")
3259 "/share/java/asm-6.0.jar"))
3260 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3261 (string-append "<include name=\"org/objectweb/asm/"
3262 "commons/Remap*.class\"/>"
3263 "<include name=\"org/objectweb/asm/*.class\"/>"
3264 "<include name=\"org/objectweb/asm/"
3265 "signature/*.class\"/>"
3266 "<include name=\"org/objectweb/asm/"
3267 "commons/SignatureRemapper.class\"/>")))
3268 #t))
3269 (replace 'install
3270 (lambda* (#:key outputs #:allow-other-keys)
3271 (let ((target (string-append (assoc-ref outputs "out")
3272 "/share/java")))
3273 (install-file (string-append "dist/jarjar-" ,version ".jar")
3274 target))
3275 #t)))))
3276 (inputs
3277 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3278 (native-inputs
3279 `(("unzip" ,unzip)))
3280 (home-page "https://code.google.com/archive/p/jarjar/")
3281 (synopsis "Repackage Java libraries")
3282 (description
3283 "Jar Jar Links is a utility that makes it easy to repackage Java
3284 libraries and embed them into your own distribution. Jar Jar Links includes
3285 an Ant task that extends the built-in @code{jar} task.")
3286 (license license:asl2.0)))
3287
3288 (define-public java-hamcrest-core
3289 (package
3290 (name "java-hamcrest-core")
3291 (version "1.3")
3292 (source (origin
3293 (method url-fetch)
3294 (uri (string-append "https://github.com/hamcrest/JavaHamcrest/"
3295 "archive/hamcrest-java-" version ".tar.gz"))
3296 (sha256
3297 (base32
3298 "11g0s105fmwzijbv08lx8jlb521yravjmxnpgdx08fvg1kjivhva"))
3299 (modules '((guix build utils)))
3300 (snippet
3301 '(begin
3302 ;; Delete bundled thirds-party jar archives.
3303 (delete-file-recursively "lib")
3304 #t))))
3305 (build-system ant-build-system)
3306 (arguments
3307 `(#:tests? #f ; Tests require junit
3308 #:modules ((guix build ant-build-system)
3309 (guix build utils)
3310 (srfi srfi-1))
3311 #:make-flags (list (string-append "-Dversion=" ,version))
3312 #:test-target "unit-test"
3313 #:build-target "core"
3314 #:phases
3315 (modify-phases %standard-phases
3316 ;; Disable unit tests, because they require junit, which requires
3317 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3318 ;; attribute from the manifest for reproducibility.
3319 (add-before 'configure 'patch-build.xml
3320 (lambda _
3321 (substitute* "build.xml"
3322 (("unit-test, ") "")
3323 (("\\$\\{build.timestamp\\}") "guix"))
3324 #t))
3325 ;; Java's "getMethods()" returns methods in an unpredictable order.
3326 ;; To make the output of the generated code deterministic we must
3327 ;; sort the array of methods.
3328 (add-after 'unpack 'make-method-order-deterministic
3329 (lambda _
3330 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3331 (("import java\\.util\\.Iterator;" line)
3332 (string-append line "\n"
3333 "import java.util.Arrays; import java.util.Comparator;"))
3334 (("allMethods = cls\\.getMethods\\(\\);" line)
3335 (string-append "_" line
3336 "
3337 private Method[] getSortedMethods() {
3338 Arrays.sort(_allMethods, new Comparator<Method>() {
3339 @Override
3340 public int compare(Method a, Method b) {
3341 return a.toString().compareTo(b.toString());
3342 }
3343 });
3344 return _allMethods;
3345 }
3346
3347 private Method[] allMethods = getSortedMethods();")))
3348 #t))
3349 (add-before 'build 'do-not-use-bundled-qdox
3350 (lambda* (#:key inputs #:allow-other-keys)
3351 (substitute* "build.xml"
3352 (("lib/generator/qdox-1.12.jar")
3353 (string-append (assoc-ref inputs "java-qdox-1.12")
3354 "/share/java/qdox.jar")))
3355 #t))
3356 ;; build.xml searches for .jar files in this directoy, which
3357 ;; we remove from the source archive.
3358 (add-before 'build 'create-dummy-directories
3359 (lambda _
3360 (mkdir-p "lib/integration")
3361 #t))
3362 (replace 'install
3363 (lambda* (#:key outputs #:allow-other-keys)
3364 (let* ((target (string-append (assoc-ref outputs "out")
3365 "/share/java/"))
3366 (version-suffix ,(string-append "-" version ".jar"))
3367 (install-without-version-suffix
3368 (lambda (jar)
3369 (copy-file jar
3370 (string-append target
3371 (basename jar version-suffix)
3372 ".jar")))))
3373 (mkdir-p target)
3374 (for-each
3375 install-without-version-suffix
3376 (find-files "build"
3377 (lambda (name _)
3378 (and (string-suffix? ".jar" name)
3379 (not (string-suffix? "-sources.jar" name)))))))
3380 #t)))))
3381 (native-inputs
3382 `(("java-qdox-1.12" ,java-qdox-1.12)
3383 ("java-jarjar" ,java-jarjar)))
3384 (home-page "http://hamcrest.org/")
3385 (synopsis "Library of matchers for building test expressions")
3386 (description
3387 "This package provides a library of matcher objects (also known as
3388 constraints or predicates) allowing @code{match} rules to be defined
3389 declaratively, to be used in other frameworks. Typical scenarios include
3390 testing frameworks, mocking libraries and UI validation rules.")
3391 (license license:bsd-2)))
3392
3393 (define-public java-junit
3394 (package
3395 (name "java-junit")
3396 (version "4.12")
3397 (source (origin
3398 (method url-fetch)
3399 (uri (string-append "https://github.com/junit-team/junit/"
3400 "archive/r" version ".tar.gz"))
3401 (file-name (string-append name "-" version ".tar.gz"))
3402 (sha256
3403 (base32
3404 "090dn5v1vs0b3acyaqc0gjf6p8lmd2h24wfzsbq7sly6b214anws"))
3405 (modules '((guix build utils)))
3406 (snippet
3407 '(begin
3408 ;; Delete bundled jar archives.
3409 (delete-file-recursively "lib")
3410 #t))))
3411 (build-system ant-build-system)
3412 (arguments
3413 `(#:tests? #f ; no tests
3414 #:jar-name "junit.jar"))
3415 (inputs
3416 `(("java-hamcrest-core" ,java-hamcrest-core)))
3417 (home-page "http://junit.org/")
3418 (synopsis "Test framework for Java")
3419 (description
3420 "JUnit is a simple framework to write repeatable tests for Java projects.
3421 JUnit provides assertions for testing expected results, test fixtures for
3422 sharing common test data, and test runners for running tests.")
3423 (license license:epl1.0)))
3424
3425 (define-public java-plexus-utils
3426 (package
3427 (name "java-plexus-utils")
3428 (version "3.2.0")
3429 (source (origin
3430 (method url-fetch)
3431 (uri (string-append "https://github.com/codehaus-plexus/"
3432 "plexus-utils/archive/plexus-utils-"
3433 version ".tar.gz"))
3434 (sha256
3435 (base32
3436 "1ihfigar20lvk4pinii7dq05i173xphhw4iyrk6gjfy04m01j2lz"))))
3437 (build-system ant-build-system)
3438 ;; FIXME: The default build.xml does not include a target to install
3439 ;; javadoc files.
3440 (arguments
3441 `(#:jar-name "plexus-utils.jar"
3442 #:source-dir "src/main"
3443 #:phases
3444 (modify-phases %standard-phases
3445 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3446 (lambda _
3447 (substitute* "src/main/java/org/codehaus/plexus/util/\
3448 cli/shell/BourneShell.java"
3449 (("/bin/sh") (which "sh"))
3450 (("/usr/") (getcwd)))
3451 #t))
3452 (add-after 'unpack 'fix-or-disable-broken-tests
3453 (lambda _
3454 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3455 (substitute* '("cli/CommandlineTest.java"
3456 "cli/shell/BourneShellTest.java")
3457 (("/bin/sh") (which "sh"))
3458 (("/bin/echo") (which "echo")))
3459
3460 ;; This test depends on MavenProjectStub, but we don't have
3461 ;; a package for Maven.
3462 (delete-file "introspection/ReflectionValueExtractorTest.java")
3463
3464 ;; FIXME: The command line tests fail, maybe because they use
3465 ;; absolute paths.
3466 (delete-file "cli/CommandlineTest.java"))
3467 #t)))))
3468 (native-inputs
3469 `(("java-hamcrest-core" ,java-hamcrest-core)
3470 ("java-junit" ,java-junit)))
3471 (home-page "http://codehaus-plexus.github.io/plexus-utils/")
3472 (synopsis "Common utilities for the Plexus framework")
3473 (description "This package provides various Java utility classes for the
3474 Plexus framework to ease working with strings, files, command lines, XML and
3475 more.")
3476 (license license:asl2.0)))
3477
3478 (define-public java-plexus-interpolation
3479 (package
3480 (name "java-plexus-interpolation")
3481 (version "1.23")
3482 (source (origin
3483 (method url-fetch)
3484 (uri (string-append "https://github.com/codehaus-plexus/"
3485 "plexus-interpolation/archive/"
3486 "plexus-interpolation-" version ".tar.gz"))
3487 (sha256
3488 (base32
3489 "03377yzlx5q440m6sxxgv6a5qb8fl30zzcgxgc0hxk5qgl2z1jjn"))))
3490 (build-system ant-build-system)
3491 (arguments
3492 `(#:jar-name "plexus-interpolation.jar"
3493 #:source-dir "src/main"))
3494 (native-inputs
3495 `(("java-junit" ,java-junit)
3496 ("java-hamcrest-core" ,java-hamcrest-core)))
3497 (home-page "http://codehaus-plexus.github.io/plexus-interpolation/")
3498 (synopsis "Java components for interpolating ${} strings and the like")
3499 (description "Plexus interpolator is a modular, flexible interpolation
3500 framework for the expression language style commonly seen in Maven, Plexus,
3501 and other related projects.
3502
3503 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3504 package within @code{plexus-utils}, but has been separated in order to allow
3505 these two libraries to vary independently of one another.")
3506 (license license:asl2.0)))
3507
3508 (define-public java-plexus-classworlds
3509 (package
3510 (name "java-plexus-classworlds")
3511 (version "2.5.2")
3512 (source (origin
3513 (method url-fetch)
3514 (uri (string-append "https://github.com/codehaus-plexus/"
3515 "plexus-classworlds/archive/plexus-classworlds-"
3516 version ".tar.gz"))
3517 (sha256
3518 (base32
3519 "1qm4p0rl8d82lzhsiwnviw11jnq44s0gflg78zq152xyyr2xmh8g"))))
3520 (build-system ant-build-system)
3521 (arguments
3522 `(#:jar-name "plexus-classworlds.jar"
3523 #:source-dir "src/main"
3524 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3525 (native-inputs
3526 `(("java-junit" ,java-junit)))
3527 (home-page "http://codehaus-plexus.github.io/plexus-classworlds/")
3528 (synopsis "Java class loader framework")
3529 (description "Plexus classworlds replaces the native @code{ClassLoader}
3530 mechanism of Java. It is especially useful for dynamic loading of application
3531 components.")
3532 (license license:asl2.0)))
3533
3534 (define java-plexus-container-default-bootstrap
3535 (package
3536 (name "java-plexus-container-default-bootstrap")
3537 (version "1.7.1")
3538 (source (origin
3539 (method url-fetch)
3540 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3541 "/archive/plexus-containers-" version ".tar.gz"))
3542 (sha256
3543 (base32
3544 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3545 (build-system ant-build-system)
3546 (arguments
3547 `(#:jar-name "container-default.jar"
3548 #:source-dir "plexus-container-default/src/main/java"
3549 #:test-dir "plexus-container-default/src/test"
3550 #:jdk ,icedtea-8
3551 #:tests? #f; requires plexus-archiver, which depends on this package
3552 #:phases
3553 (modify-phases %standard-phases
3554 (add-before 'build 'copy-resources
3555 (lambda _
3556 (copy-recursively
3557 "plexus-container-default/src/main/resources/"
3558 "build/classes")
3559 #t)))))
3560 (inputs
3561 `(("worldclass" ,java-plexus-classworlds)
3562 ("xbean" ,java-geronimo-xbean-reflect)
3563 ("utils" ,java-plexus-utils)
3564 ("junit" ,java-junit)
3565 ("guava" ,java-guava)))
3566 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3567 (synopsis "Inversion-of-control container")
3568 (description "Plexus-default-container is Plexus' inversion-of-control
3569 (@dfn{IoC}) container. It is composed of its public API and its default
3570 implementation.")
3571 (license license:asl2.0)))
3572
3573 (define-public java-plexus-io
3574 (package
3575 (name "java-plexus-io")
3576 (version "3.0.0")
3577 (source (origin
3578 (method url-fetch)
3579 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3580 "/archive/plexus-io-" version ".tar.gz"))
3581 (sha256
3582 (base32
3583 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3584 (build-system ant-build-system)
3585 (arguments
3586 `(#:jar-name "plexus-io.jar"
3587 #:source-dir "src/main/java"
3588 #:test-dir "src/test"
3589 #:jdk ,icedtea-8
3590 #:phases
3591 (modify-phases %standard-phases
3592 (add-before 'build 'copy-resources
3593 (lambda _
3594 (mkdir-p "build/classes/META-INF/plexus")
3595 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3596 "build/classes/META-INF/plexus/components.xml")
3597 #t)))))
3598 (inputs
3599 `(("utils" ,java-plexus-utils)
3600 ("commons-io" ,java-commons-io)
3601 ("java-jsr305" ,java-jsr305)))
3602 (native-inputs
3603 `(("junit" ,java-junit)
3604 ("hamcrest" ,java-hamcrest-core)
3605 ("guava" ,java-guava)
3606 ("classworlds" ,java-plexus-classworlds)
3607 ("xbean" ,java-geronimo-xbean-reflect)
3608 ("container-default" ,java-plexus-container-default-bootstrap)))
3609 (home-page "https://github.com/codehaus-plexus/plexus-io")
3610 (synopsis "I/O plexus components")
3611 (description "Plexus IO is a set of plexus components, which are designed
3612 for use in I/O operations. This implementation using plexus components allows
3613 reusing it in maven.")
3614 (license license:asl2.0)))
3615
3616 (define-public java-plexus-archiver
3617 (package
3618 (name "java-plexus-archiver")
3619 (version "4.1.0")
3620 (source (origin
3621 (method url-fetch)
3622 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3623 "/archive/plexus-archiver-" version ".tar.gz"))
3624 (sha256
3625 (base32
3626 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3627 (build-system ant-build-system)
3628 (arguments
3629 `(#:jar-name "plexus-archiver.jar"
3630 #:source-dir "src/main/java"
3631 #:jdk ,icedtea-8
3632 #:test-dir "src/test"
3633 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3634 #:phases
3635 (modify-phases %standard-phases
3636 (add-before 'check 'remove-failing
3637 (lambda _
3638 ;; Requires an older version of plexus container
3639 (delete-file
3640 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3641 #t))
3642 (add-before 'check 'fix-test-building
3643 (lambda _
3644 (substitute* "build.xml"
3645 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3646 #t))
3647 (add-before 'build 'copy-resources
3648 (lambda _
3649 (mkdir-p "build/classes/META-INF/plexus")
3650 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3651 "build/classes/META-INF/plexus/components.xml")
3652 #t)))))
3653 (inputs
3654 `(("utils" ,java-plexus-utils)
3655 ("commons-io" ,java-commons-io)
3656 ("snappy" ,java-iq80-snappy)
3657 ("io" ,java-plexus-io)
3658 ("compress" ,java-commons-compress)
3659 ("container-default" ,java-plexus-container-default-bootstrap)
3660 ("snappy" ,java-snappy)
3661 ("java-jsr305" ,java-jsr305)))
3662 (native-inputs
3663 `(("java-hamcrest-core" ,java-hamcrest-core)
3664 ("junit" ,java-junit)
3665 ("classworld" ,java-plexus-classworlds)
3666 ("xbean" ,java-geronimo-xbean-reflect)
3667 ("xz" ,java-tukaani-xz)
3668 ("guava" ,java-guava)))
3669 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3670 (synopsis "Archiver component of the Plexus project")
3671 (description "Plexus-archiver contains a component to deal with project
3672 archives (jar).")
3673 (license license:asl2.0)))
3674
3675 (define-public java-plexus-container-default
3676 (package
3677 (inherit java-plexus-container-default-bootstrap)
3678 (name "java-plexus-container-default")
3679 (arguments
3680 `(#:jar-name "container-default.jar"
3681 #:source-dir "plexus-container-default/src/main/java"
3682 #:test-dir "plexus-container-default/src/test"
3683 #:test-exclude (list ;"**/*Test.java"
3684 "**/Abstract*.java"
3685 ;; Requires plexus-hierarchy
3686 "**/PlexusHierarchyTest.java"
3687 ;; Failures
3688 "**/ComponentRealmCompositionTest.java"
3689 "**/PlexusContainerTest.java")
3690 #:jdk ,icedtea-8
3691 #:phases
3692 (modify-phases %standard-phases
3693 (add-before 'build 'copy-resources
3694 (lambda _
3695 (copy-recursively
3696 "plexus-container-default/src/main/resources/"
3697 "build/classes")
3698 #t))
3699 (add-before 'check 'fix-paths
3700 (lambda _
3701 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3702 (substitute*
3703 (string-append
3704 dir "/plexus/component/composition/"
3705 "ComponentRealmCompositionTest.java")
3706 (("src/test") "plexus-container-default/src/test"))
3707 #t))))))
3708 (inputs
3709 `(("worldclass" ,java-plexus-classworlds)
3710 ("xbean" ,java-geronimo-xbean-reflect)
3711 ("utils" ,java-plexus-utils)
3712 ("junit" ,java-junit)
3713 ("guava" ,java-guava)))
3714 (native-inputs
3715 `(("archiver" ,java-plexus-archiver)
3716 ("hamcrest" ,java-hamcrest-core)))))
3717
3718 (define-public java-plexus-component-annotations
3719 (package
3720 (inherit java-plexus-container-default)
3721 (name "java-plexus-component-annotations")
3722 (arguments
3723 `(#:jar-name "plexus-component-annotations.jar"
3724 #:source-dir "plexus-component-annotations/src/main/java"
3725 #:tests? #f)); no tests
3726 (inputs '())
3727 (native-inputs '())
3728 (synopsis "Plexus descriptors generator")
3729 (description "This package is a Maven plugin to generate Plexus descriptors
3730 from source tags and class annotations.")))
3731
3732 (define-public java-plexus-cipher
3733 (package
3734 (name "java-plexus-cipher")
3735 (version "1.7")
3736 (source (origin
3737 (method url-fetch)
3738 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3739 "/archive/plexus-cipher-" version ".tar.gz"))
3740 (sha256
3741 (base32
3742 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3743 (build-system ant-build-system)
3744 (arguments
3745 `(#:jar-name "plexus-cipher.jar"
3746 #:source-dir "src/main/java"
3747 #:jdk ,icedtea-8
3748 #:tests? #f; FIXME: requires sisu-inject-bean
3749 #:phases
3750 (modify-phases %standard-phases
3751 (add-before 'build 'copy-resources
3752 (lambda _
3753 (copy-recursively "src/main/resources" "build/classes")
3754 (mkdir-p "build/classes/META-INF/sisu")
3755 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3756 (lambda _
3757 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3758 #t)))))
3759 (inputs
3760 `(("java-cdi-api" ,java-cdi-api)
3761 ("java-javax-inject" ,java-javax-inject)))
3762 (home-page "https://github.com/sonatype/plexus-cipher")
3763 (synopsis "Encryption/decryption Component")
3764 (description "Plexus-cipher contains a component to deal with encryption
3765 and decryption.")
3766 (license license:asl2.0)))
3767
3768 (define-public java-plexus-compiler-api
3769 (package
3770 (name "java-plexus-compiler-api")
3771 (version "2.8.4")
3772 (source (origin
3773 (method url-fetch)
3774 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3775 "/archive/plexus-compiler-" version ".tar.gz"))
3776 (sha256
3777 (base32
3778 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3779 (build-system ant-build-system)
3780 (arguments
3781 `(#:jar-name "plexus-compiler-api.jar"
3782 #:source-dir "plexus-compiler-api/src/main/java"
3783 #:jdk ,icedtea-8
3784 #:test-dir "plexus-compiler-api/src/test"))
3785 (inputs
3786 `(("java-plexus-container-default" ,java-plexus-container-default)
3787 ("java-plexus-util" ,java-plexus-utils)))
3788 (native-inputs
3789 `(("java-junit" ,java-junit)))
3790 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3791 (synopsis "Plexus Compilers component's API to manipulate compilers")
3792 (description "This package contains the API used by components to manipulate
3793 compilers.")
3794 (license (list license:asl2.0
3795 license:expat))))
3796
3797 (define-public java-plexus-compiler-javac
3798 (package
3799 (inherit java-plexus-compiler-api)
3800 (name "java-plexus-compiler-javac")
3801 (arguments
3802 `(#:jar-name "plexus-compiler-javac.jar"
3803 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3804 #:jdk ,icedtea-8
3805 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3806 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3807 (inputs
3808 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3809 ("java-plexus-utils" ,java-plexus-utils)
3810 ("java-plexus-container-default" ,java-plexus-container-default)))
3811 (native-inputs
3812 `(("java-junit" ,java-junit)))
3813 (synopsis "Javac Compiler support for Plexus Compiler component")
3814 (description "This package contains the Javac Compiler support for Plexus
3815 Compiler component.")))
3816
3817 (define-public java-plexus-sec-dispatcher
3818 (package
3819 (name "java-plexus-sec-dispatcher")
3820 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3821 (source (origin
3822 ;; This project doesn't tag releases or publish tarballs, so we take
3823 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3824 (method url-fetch)
3825 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3826 "archive/7db8f88048.tar.gz"))
3827 (sha256
3828 (base32
3829 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3830 (file-name (string-append name "-" version ".tar.gz"))))
3831 (arguments
3832 `(#:jar-name "plexus-sec-dispatcher.jar"
3833 #:source-dir "src/main/java"
3834 #:jdk ,icedtea-8
3835 #:phases
3836 (modify-phases %standard-phases
3837 (add-before 'build 'generate-models
3838 (lambda* (#:key inputs #:allow-other-keys)
3839 (define (modello-single-mode file version mode)
3840 (invoke "java"
3841 "org.codehaus.modello.ModelloCli"
3842 file mode "src/main/java" version
3843 "false" "true"))
3844 (let ((file "src/main/mdo/settings-security.mdo"))
3845 (modello-single-mode file "1.0.0" "java")
3846 (modello-single-mode file "1.0.0" "xpp3-reader")
3847 (modello-single-mode file "1.0.0" "xpp3-writer"))
3848 #t))
3849 (add-before 'build 'generate-components.xml
3850 (lambda _
3851 (mkdir-p "build/classes/META-INF/plexus")
3852 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3853 (lambda _
3854 (display
3855 "<component-set>\n
3856 <components>\n
3857 <component>\n
3858 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
3859 <role-hint>default</role-hint>\n
3860 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
3861 <description></description>\n
3862 <requirements>\n
3863 <requirement>\n
3864 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
3865 <field-name>_cipher</field-name>\n
3866 </requirement>\n
3867 <requirement>\n
3868 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
3869 <field-name>_decryptors</field-name>\n
3870 </requirement>\n
3871 </requirements>\n
3872 <configuration>\n
3873 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
3874 </configuration>\n
3875 </component>\n
3876 </components>\n
3877 </component-set>\n")))
3878 #t))
3879 (add-before 'check 'fix-paths
3880 (lambda _
3881 (copy-recursively "src/test/resources" "target")
3882 #t)))))
3883 (inputs
3884 `(("java-plexus-cipher" ,java-plexus-cipher)))
3885 (native-inputs
3886 `(("java-modello-core" ,java-modello-core)
3887 ;; for modello:
3888 ("java-plexus-container-default" ,java-plexus-container-default)
3889 ("java-plexus-classworlds" ,java-plexus-classworlds)
3890 ("java-plexus-utils" ,java-plexus-utils)
3891 ("java-guava" ,java-guava)
3892 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3893 ("java-sisu-build-api" ,java-sisu-build-api)
3894 ;; modello plugins:
3895 ("java-modellop-plugins-java" ,java-modello-plugins-java)
3896 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
3897 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
3898 ;; for tests
3899 ("java-junit" ,java-junit)))
3900 (build-system ant-build-system)
3901 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
3902 (synopsis "Plexus Security Dispatcher Component")
3903 (description "This package is the Plexus Security Dispatcher Component.
3904 This component decrypts a string passed to it.")
3905 (license license:asl2.0)))
3906
3907 (define-public java-plexus-cli
3908 (package
3909 (name "java-plexus-cli")
3910 (version "1.7")
3911 (source (origin
3912 (method git-fetch)
3913 (uri (git-reference
3914 (url "https://github.com/sonatype/plexus-cli")
3915 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
3916 (file-name (string-append name "-" version))
3917 (sha256
3918 (base32
3919 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
3920 (build-system ant-build-system)
3921 (arguments
3922 `(#:jar-name "plexus-cli.jar"
3923 #:source-dir "src/main/java"
3924 #:jdk ,icedtea-8
3925 #:test-dir "src/test"))
3926 (inputs
3927 `(("java-commons-cli" ,java-commons-cli)
3928 ("java-plexus-container-default" ,java-plexus-container-default)
3929 ("java-plexus-classworlds" ,java-plexus-classworlds)))
3930 (native-inputs
3931 `(("java-plexus-utils" ,java-plexus-utils)
3932 ("java-junit" ,java-junit)
3933 ("java-guava" ,java-guava)))
3934 (home-page "https://codehaus-plexus.github.io/plexus-cli")
3935 (synopsis "CLI building library for plexus")
3936 (description "This package is a library to help creating CLI around
3937 Plexus components.")
3938 (license license:asl2.0)))
3939
3940 (define-public java-sisu-build-api
3941 (package
3942 (name "java-sisu-build-api")
3943 (version "0.0.7")
3944 (source (origin
3945 (method url-fetch)
3946 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
3947 "archive/plexus-build-api-" version ".tar.gz"))
3948 (sha256
3949 (base32
3950 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
3951 (build-system ant-build-system)
3952 (arguments
3953 `(#:jar-name "sisu-build-api.jar"
3954 #:source-dir "src/main/java"
3955 #:jdk ,icedtea-8
3956 #:tests? #f; FIXME: how to run the tests?
3957 #:phases
3958 (modify-phases %standard-phases
3959 (add-before 'build 'copy-resources
3960 (lambda _
3961 (copy-recursively "src/main/resources" "build/classes")
3962 (substitute* (find-files "build/classes")
3963 (("\\$\\{project.version\\}") ,version))
3964 #t))
3965 (add-before 'build 'generate-plexus-compontent
3966 (lambda _
3967 (mkdir-p "build/classes/META-INF/plexus")
3968 ;; This file is required for plexus to inject this package.
3969 ;; FIXME: how is it generated?
3970 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
3971 (lambda _
3972 (display
3973 "<component-set>\n
3974 <components>\n
3975 <component>\n
3976 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
3977 <role-hint>default</role-hint>\n
3978 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
3979 <description>Filesystem based non-incremental build context implementation\n
3980 which behaves as if all files were just created.</description>\n
3981 </component>\n
3982 </components>\n
3983 </component-set>\n")))
3984 #t)))))
3985 (inputs
3986 `(("java-plexus-utils" ,java-plexus-utils)
3987 ("java-plexus-container-default" ,java-plexus-container-default)))
3988 (home-page "https://github.com/sonatype/sisu-build-api/")
3989 (synopsis "Base build API for maven")
3990 (description "This package contains the base build API for maven and
3991 a default implementation of it. This API is about scanning files in a
3992 project and determining what files need to be rebuilt.")
3993 (license license:asl2.0)))
3994
3995 (define-public java-modello-core
3996 (package
3997 (name "java-modello-core")
3998 (version "1.9.1")
3999 (source (origin
4000 (method url-fetch)
4001 (uri (string-append "https://github.com/codehaus-plexus/modello"
4002 "/archive/modello-" version ".tar.gz"))
4003 (sha256
4004 (base32
4005 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4006 (build-system ant-build-system)
4007 (arguments
4008 `(#:jar-name "modello-core.jar"
4009 #:source-dir "modello-core/src/main/java"
4010 #:test-dir "modello-core/src/test"
4011 #:main-class "org.codehaus.modello.ModelloCli"
4012 #:jdk ,icedtea-8
4013 #:phases
4014 (modify-phases %standard-phases
4015 (add-before 'build 'copy-resources
4016 (lambda _
4017 (mkdir-p "build/classes/META-INF/plexus")
4018 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4019 "build/classes/META-INF/plexus/components.xml")
4020 #t))
4021 (add-before 'check 'fix-tests
4022 (lambda _
4023 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4024 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4025 "modello/core/io/ModelReaderTest.java")
4026 (("src/test") "modello-core/src/test")))
4027 #t)))))
4028 (inputs
4029 `(("java-plexus-utils" ,java-plexus-utils)
4030 ("java-plexus-container-default" ,java-plexus-container-default)
4031 ("java-sisu-build-api" ,java-sisu-build-api)))
4032 (native-inputs
4033 `(("java-junit" ,java-junit)
4034 ("java-plexus-classworlds" ,java-plexus-classworlds)
4035 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4036 ("java-guava" ,java-guava)))
4037 (home-page "http://codehaus-plexus.github.io/modello/")
4038 (synopsis "Framework for code generation from a simple model")
4039 (description "Modello is a framework for code generation from a simple model.
4040
4041 Modello generates code from a simple model format: based on a plugin
4042 architecture, various types of code and descriptors can be generated from the
4043 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4044 XSD and documentation.")
4045 (license (list
4046 license:expat
4047 ;; Although this package uses only files licensed under expat,
4048 ;; other parts of the source are licensed under different
4049 ;; licenses. We include them to be inherited by other packages.
4050 license:asl2.0
4051 ;; Some files in modello-plugin-java are licensed under a
4052 ;; 5-clause BSD license.
4053 (license:non-copyleft
4054 (string-append "file:///modello-plugins/modello-plugin-java/"
4055 "src/main/java/org/codehaus/modello/plugin/"
4056 "java/javasource/JNaming.java"))))))
4057
4058 (define-public java-modello-plugins-java
4059 (package
4060 (inherit java-modello-core)
4061 (name "java-modello-plugins-java")
4062 (arguments
4063 `(#:jar-name "modello-plugins-java.jar"
4064 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4065 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4066 #:jdk ,icedtea-8
4067 #:tests? #f; requires maven-model, which depends on this package
4068 #:phases
4069 (modify-phases %standard-phases
4070 (add-before 'build 'copy-resources
4071 (lambda _
4072 (mkdir-p "build/classes")
4073 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4074 "build/classes")
4075 #t)))))
4076 (inputs
4077 `(("java-modello-core" ,java-modello-core)
4078 ,@(package-inputs java-modello-core)))
4079 (synopsis "Modello Java Plugin")
4080 (description "Modello Java Plugin generates Java objects for the model.")))
4081
4082 (define-public java-modello-plugins-xml
4083 (package
4084 (inherit java-modello-core)
4085 (name "java-modello-plugins-xml")
4086 (arguments
4087 `(#:jar-name "modello-plugins-xml.jar"
4088 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4089 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4090 #:jdk ,icedtea-8
4091 #:phases
4092 (modify-phases %standard-phases
4093 (add-before 'build 'copy-resources
4094 (lambda _
4095 (mkdir-p "build/classes")
4096 (copy-recursively
4097 "modello-plugins/modello-plugin-xml/src/main/resources"
4098 "build/classes")
4099 #t))
4100 (add-before 'check 'fix-paths
4101 (lambda _
4102 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4103 (substitute*
4104 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4105 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4106 #t)))))
4107 (inputs
4108 `(("java-modello-core" ,java-modello-core)
4109 ("java-modello-plugins-java" ,java-modello-plugins-java)
4110 ,@(package-inputs java-modello-core)))
4111 (synopsis "Modello XML Plugin")
4112 (description "Modello XML Plugin contains shared code for every plugins
4113 working on XML representation of the model.")))
4114
4115 (define-public java-modello-test
4116 (package
4117 (inherit java-modello-core)
4118 (name "java-modello-test")
4119 (arguments
4120 `(#:jar-name "modello-test.jar"
4121 #:source-dir "modello-test/src/main/java"
4122 #:tests? #f; no tests
4123 #:jdk ,icedtea-8))
4124 (inputs
4125 `(("java-plexus-utils" ,java-plexus-utils)
4126 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4127 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4128 ("java-plexus-container-default" ,java-plexus-container-default)))
4129 (synopsis "Modello test package")
4130 (description "The modello test package contains the basis to create
4131 Modello generator unit-tests, including sample models and xml files to test
4132 every feature for every plugin.")))
4133
4134 (define-public java-modello-plugins-xpp3
4135 (package
4136 (inherit java-modello-core)
4137 (name "java-modello-plugins-xpp3")
4138 (arguments
4139 `(#:jar-name "modello-plugins-xpp3.jar"
4140 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4141 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4142 ;; One of the test dependencies is maven-model which depends on this package.
4143 #:tests? #f
4144 #:jdk ,icedtea-8
4145 #:phases
4146 (modify-phases %standard-phases
4147 (add-before 'build 'copy-resources
4148 (lambda _
4149 (mkdir-p "build/classes")
4150 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4151 "build/classes")
4152 #t)))))
4153 (inputs
4154 `(("java-modello-core" ,java-modello-core)
4155 ("java-modello-plugins-java" ,java-modello-plugins-java)
4156 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4157 ,@(package-inputs java-modello-core)))
4158 (native-inputs
4159 `(("java-xmlunit" ,java-xmlunit)
4160 ("java-modello-test" ,java-modello-test)
4161 ,@(package-native-inputs java-modello-core)))
4162 (synopsis "Modello XPP3 Plugin")
4163 (description "The modello XPP3 plugin generates XML readers and writers based
4164 on the XPP3 API (XML Pull Parser).")))
4165
4166 (define-public java-asm
4167 (package
4168 (name "java-asm")
4169 (version "6.0")
4170 (source (origin
4171 (method url-fetch)
4172 (uri (string-append "http://download.forge.ow2.org/asm/"
4173 "asm-" version ".tar.gz"))
4174 (sha256
4175 (base32
4176 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4177 (build-system ant-build-system)
4178 (propagated-inputs
4179 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4180 ("java-aqute-libg" ,java-aqute-libg)))
4181 (arguments
4182 `(#:build-target "compile"
4183 ;; The tests require an old version of Janino, which no longer compiles
4184 ;; with the JDK7.
4185 #:tests? #f
4186 #:make-flags
4187 (list
4188 ;; We don't need these extra ant tasks, but the build system asks us to
4189 ;; provide a path anyway.
4190 "-Dobjectweb.ant.tasks.path=dummy-path"
4191 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4192 ;; used during the build automatically by ant-build-system, but
4193 ;; java-asm's build.xml fails unless we provide something here.
4194 "-Dbiz.aQute.bnd.path=dummy-path")
4195 #:phases
4196 (modify-phases %standard-phases
4197 (add-before 'install 'build-jars
4198 (lambda* (#:key make-flags #:allow-other-keys)
4199 ;; We cannot use the "jar" target because it depends on a couple
4200 ;; of unpackaged, complicated tools.
4201 (mkdir "dist")
4202 (invoke "jar"
4203 "-cf" (string-append "dist/asm-" ,version ".jar")
4204 "-C" "output/build/tmp" ".")))
4205 (replace 'install
4206 (install-jars "dist")))))
4207 (native-inputs
4208 `(("java-junit" ,java-junit)))
4209 (home-page "http://asm.ow2.org/")
4210 (synopsis "Very small and fast Java bytecode manipulation framework")
4211 (description "ASM is an all purpose Java bytecode manipulation and
4212 analysis framework. It can be used to modify existing classes or dynamically
4213 generate classes, directly in binary form. The provided common
4214 transformations and analysis algorithms allow to easily assemble custom
4215 complex transformations and code analysis tools.")
4216 (license license:bsd-3)))
4217
4218 (define java-asm-bootstrap
4219 (package
4220 (inherit java-asm)
4221 (name "java-asm-bootstrap")
4222 (arguments
4223 (substitute-keyword-arguments (package-arguments java-asm)
4224 ((#:tests? _) #f)))
4225 (native-inputs `())
4226 (propagated-inputs
4227 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4228 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4229 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4230 (delete `("java-aqute-libg" ,java-aqute-libg)
4231 (package-inputs java-asm)))))))
4232
4233 (define-public java-cglib
4234 (package
4235 (name "java-cglib")
4236 (version "3.2.4")
4237 (source
4238 (origin
4239 (method git-fetch)
4240 (uri (git-reference
4241 (url "https://github.com/cglib/cglib.git")
4242 (commit (string-append
4243 "RELEASE_"
4244 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4245 version)))))
4246 (file-name (git-file-name name version))
4247 (sha256
4248 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4249 (build-system ant-build-system)
4250 (arguments
4251 `(;; FIXME: tests fail because junit runs
4252 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4253 ;; to describe a test at all.
4254 #:tests? #f
4255 #:jar-name "cglib.jar"
4256 #:phases
4257 (modify-phases %standard-phases
4258 (add-after 'unpack 'chdir
4259 (lambda _ (chdir "cglib") #t)))))
4260 (inputs
4261 `(("java-asm" ,java-asm)
4262 ("java-junit" ,java-junit)))
4263 (home-page "https://github.com/cglib/cglib/")
4264 (synopsis "Java byte code generation library")
4265 (description "The byte code generation library CGLIB is a high level API
4266 to generate and transform Java byte code.")
4267 (license license:asl2.0)))
4268
4269 (define-public java-objenesis
4270 (package
4271 (name "java-objenesis")
4272 (version "2.5.1")
4273 (source (origin
4274 (method url-fetch)
4275 (uri (string-append "https://github.com/easymock/objenesis/"
4276 "archive/" version ".tar.gz"))
4277 (file-name (string-append "objenesis-" version ".tar.gz"))
4278 (sha256
4279 (base32
4280 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4281 (build-system ant-build-system)
4282 (arguments
4283 `(#:jar-name "objenesis.jar"
4284 #:source-dir "main/src/"
4285 #:test-dir "main/src/test/"))
4286 (native-inputs
4287 `(("java-junit" ,java-junit)
4288 ("java-hamcrest-core" ,java-hamcrest-core)))
4289 (home-page "http://objenesis.org/")
4290 (synopsis "Bypass the constructor when creating an object")
4291 (description "Objenesis is a small Java library that serves one purpose:
4292 to instantiate a new object of a particular class. It is common to see
4293 restrictions in libraries stating that classes must require a default
4294 constructor. Objenesis aims to overcome these restrictions by bypassing the
4295 constructor on object instantiation.")
4296 (license license:asl2.0)))
4297
4298 (define-public java-easymock
4299 (package
4300 (name "java-easymock")
4301 (version "3.4")
4302 (source (origin
4303 (method url-fetch)
4304 (uri (string-append "https://github.com/easymock/easymock/"
4305 "archive/easymock-" version ".tar.gz"))
4306 (sha256
4307 (base32
4308 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4309 (build-system ant-build-system)
4310 (arguments
4311 `(#:jar-name "easymock.jar"
4312 #:source-dir "core/src/main"
4313 #:test-dir "core/src/test"
4314 #:phases
4315 (modify-phases %standard-phases
4316 ;; FIXME: Android support requires the following packages to be
4317 ;; available: com.google.dexmaker.stock.ProxyBuilder
4318 (add-after 'unpack 'delete-android-support
4319 (lambda _
4320 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4321 (substitute* "MocksControl.java"
4322 (("AndroidSupport.isAndroid\\(\\)") "false")
4323 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4324 (delete-file "AndroidClassProxyFactory.java"))
4325 #t))
4326 (add-after 'unpack 'delete-broken-tests
4327 (lambda _
4328 (with-directory-excursion "core/src/test/java/org/easymock"
4329 ;; This test depends on dexmaker.
4330 (delete-file "tests2/ClassExtensionHelperTest.java")
4331
4332 ;; This is not a test.
4333 (delete-file "tests/BaseEasyMockRunnerTest.java")
4334
4335 ;; This test should be executed with a different runner...
4336 (delete-file "tests2/EasyMockAnnotationsTest.java")
4337 ;; ...but deleting it means that we also have to delete these
4338 ;; dependent files.
4339 (delete-file "tests2/EasyMockRunnerTest.java")
4340 (delete-file "tests2/EasyMockRuleTest.java")
4341
4342 ;; This test fails because the file "easymock.properties" does
4343 ;; not exist.
4344 (delete-file "tests2/EasyMockPropertiesTest.java"))
4345 #t)))))
4346 (inputs
4347 `(("java-asm" ,java-asm)
4348 ("java-cglib" ,java-cglib)
4349 ("java-objenesis" ,java-objenesis)))
4350 (native-inputs
4351 `(("java-junit" ,java-junit)
4352 ("java-hamcrest-core" ,java-hamcrest-core)))
4353 (home-page "http://easymock.org")
4354 (synopsis "Java library providing mock objects for unit tests")
4355 (description "EasyMock is a Java library that provides an easy way to use
4356 mock objects in unit testing.")
4357 (license license:asl2.0)))
4358
4359 (define-public java-jmock-1
4360 (package
4361 (name "java-jmock")
4362 (version "1.2.0")
4363 (source (origin
4364 (method url-fetch)
4365 (uri (string-append "https://github.com/jmock-developers/"
4366 "jmock-library/archive/" version ".tar.gz"))
4367 (file-name (string-append "jmock-" version ".tar.gz"))
4368 (sha256
4369 (base32
4370 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4371 (build-system ant-build-system)
4372 (arguments
4373 `(#:build-target "jars"
4374 #:test-target "run.tests"
4375 #:phases
4376 (modify-phases %standard-phases
4377 (replace 'install (install-jars "build")))))
4378 (home-page "http://www.jmock.org")
4379 (synopsis "Mock object library for test-driven development")
4380 (description "JMock is a library that supports test-driven development of
4381 Java code with mock objects. Mock objects help you design and test the
4382 interactions between the objects in your programs.
4383
4384 The jMock library
4385
4386 @itemize
4387 @item makes it quick and easy to define mock objects
4388 @item lets you precisely specify the interactions between
4389 your objects, reducing the brittleness of your tests
4390 @item plugs into your favourite test framework
4391 @item is easy to extend.
4392 @end itemize\n")
4393 (license license:bsd-3)))
4394
4395 (define-public java-jmock
4396 (package
4397 (inherit java-jmock-1)
4398 (name "java-jmock")
4399 (version "2.8.2")
4400 (source (origin
4401 (method url-fetch)
4402 (uri (string-append "https://github.com/jmock-developers/"
4403 "jmock-library/archive/" version ".tar.gz"))
4404 (file-name (string-append name "-" version ".tar.gz"))
4405 (sha256
4406 (base32
4407 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4408 (inputs
4409 `(("java-hamcrest-all" ,java-hamcrest-all)
4410 ("java-asm" ,java-asm)
4411 ("java-bsh" ,java-bsh)
4412 ("java-junit" ,java-junit)))
4413 (native-inputs
4414 `(("cglib" ,java-cglib)))
4415 (arguments
4416 `(#:jar-name "java-jmock.jar"
4417 #:source-dir "jmock/src/main/java"
4418 #:test-dir "jmock/src/test"))))
4419
4420 (define-public java-jmock-junit4
4421 (package
4422 (inherit java-jmock)
4423 (name "java-jmock-junit4")
4424 (arguments
4425 `(#:jar-name "java-jmock-junit4.jar"
4426 #:source-dir "jmock-junit4/src/main/java"
4427 #:test-dir "jmock-junit4/src/test"))
4428 (inputs
4429 `(("java-hamcrest-all" ,java-hamcrest-all)
4430 ("java-asm" ,java-asm)
4431 ("java-bsh" ,java-bsh)
4432 ("java-jmock" ,java-jmock)
4433 ("java-jumit" ,java-junit)))))
4434
4435 (define-public java-jmock-legacy
4436 (package
4437 (inherit java-jmock)
4438 (name "java-jmock-legacy")
4439 (arguments
4440 `(#:jar-name "java-jmock-legacy.jar"
4441 #:source-dir "jmock-legacy/src/main/java"
4442 #:test-dir "jmock-legacy/src/test"
4443 #:phases
4444 (modify-phases %standard-phases
4445 (add-before 'check 'copy-tests
4446 (lambda _
4447 ;; This file is a dependancy of some tests
4448 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4449 (copy-file (string-append "jmock/src/test/java/" file)
4450 (string-append "jmock-legacy/src/test/java/" file))
4451 #t))))))
4452 (inputs
4453 `(("java-hamcrest-all" ,java-hamcrest-all)
4454 ("java-objenesis" ,java-objenesis)
4455 ("java-cglib" ,java-cglib)
4456 ("java-jmock" ,java-jmock)
4457 ("java-asm" ,java-asm)
4458 ("java-bsh" ,java-bsh)
4459 ("java-junit" ,java-junit)))
4460 (native-inputs
4461 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4462
4463 (define-public java-hamcrest-all
4464 (package (inherit java-hamcrest-core)
4465 (name "java-hamcrest-all")
4466 (arguments
4467 `(#:jdk ,icedtea-8
4468 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4469 ((#:build-target _) "bigjar")
4470 ((#:phases phases)
4471 `(modify-phases ,phases
4472 ;; Some build targets override the classpath, so we need to patch
4473 ;; the build.xml to ensure that required dependencies are on the
4474 ;; classpath.
4475 (add-after 'unpack 'patch-classpath-for-integration
4476 (lambda* (#:key inputs #:allow-other-keys)
4477 (substitute* "build.xml"
4478 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4479 (string-join
4480 (cons line
4481 (append
4482 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4483 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4484 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4485 ";"))
4486 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4487 (string-append (assoc-ref inputs "java-hamcrest-core")
4488 "/share/java/hamcrest-core.jar")))
4489 #t)))))))
4490 (inputs
4491 `(("java-junit" ,java-junit)
4492 ("java-jmock" ,java-jmock-1)
4493 ;; This is necessary because of what seems to be a race condition.
4494 ;; This package would sometimes fail to build because hamcrest-core.jar
4495 ;; could not be found, even though it is built as part of this package.
4496 ;; Adding java-hamcrest-core appears to fix this problem. See
4497 ;; https://debbugs.gnu.org/31390 for more information.
4498 ("java-hamcrest-core" ,java-hamcrest-core)
4499 ("java-easymock" ,java-easymock)
4500 ,@(package-inputs java-hamcrest-core)))))
4501
4502 (define-public java-jopt-simple
4503 (package
4504 (name "java-jopt-simple")
4505 (version "5.0.3")
4506 (source (origin
4507 (method url-fetch)
4508 (uri (string-append "http://repo1.maven.org/maven2/"
4509 "net/sf/jopt-simple/jopt-simple/"
4510 version "/jopt-simple-"
4511 version "-sources.jar"))
4512 (sha256
4513 (base32
4514 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4515 (build-system ant-build-system)
4516 (arguments
4517 `(#:tests? #f ; there are no tests
4518 #:jar-name "jopt-simple.jar"))
4519 (home-page "https://pholser.github.io/jopt-simple/")
4520 (synopsis "Java library for parsing command line options")
4521 (description "JOpt Simple is a Java library for parsing command line
4522 options, such as those you might pass to an invocation of @code{javac}. In
4523 the interest of striving for simplicity, as closely as possible JOpt Simple
4524 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4525 GNU @code{getopt_long}. It also aims to make option parser configuration and
4526 retrieval of options and their arguments simple and expressive, without being
4527 overly clever.")
4528 (license license:expat)))
4529
4530 (define-public java-commons-math3
4531 (package
4532 (name "java-commons-math3")
4533 (version "3.6.1")
4534 (source (origin
4535 (method url-fetch)
4536 (uri (string-append "mirror://apache/commons/math/source/"
4537 "commons-math3-" version "-src.tar.gz"))
4538 (sha256
4539 (base32
4540 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4541 (build-system ant-build-system)
4542 (arguments
4543 `(#:build-target "jar"
4544 #:test-target "test"
4545 #:make-flags
4546 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4547 (junit (assoc-ref %build-inputs "java-junit")))
4548 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4549 (string-append "-Dhamcrest.jar=" hamcrest
4550 "/share/java/hamcrest-core.jar")))
4551 #:phases
4552 (modify-phases %standard-phases
4553 ;; We want to build the jar in the build phase and run the tests
4554 ;; later in a separate phase.
4555 (add-after 'unpack 'untangle-targets
4556 (lambda _
4557 (substitute* "build.xml"
4558 (("name=\"jar\" depends=\"test\"")
4559 "name=\"jar\" depends=\"compile\""))
4560 #t))
4561 ;; There is no install target.
4562 (replace 'install
4563 (install-jars "target")))))
4564 (native-inputs
4565 `(("java-junit" ,java-junit)
4566 ("java-hamcrest-core" ,java-hamcrest-core)))
4567 (home-page "http://commons.apache.org/math/")
4568 (synopsis "Apache Commons mathematics library")
4569 (description "Commons Math is a library of lightweight, self-contained
4570 mathematics and statistics components addressing the most common problems not
4571 available in the Java programming language or Commons Lang.")
4572 (license license:asl2.0)))
4573
4574 (define-public java-jmh
4575 (package
4576 (name "java-jmh")
4577 (version "1.17.5")
4578 (source (origin
4579 (method hg-fetch)
4580 (uri (hg-reference
4581 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4582 (changeset version)))
4583 (file-name (string-append name "-" version "-checkout"))
4584 (sha256
4585 (base32
4586 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4587 (build-system ant-build-system)
4588 (arguments
4589 `(#:jar-name "jmh-core.jar"
4590 #:source-dir "jmh-core/src/main"
4591 #:test-dir "jmh-core/src/test"
4592 #:phases
4593 (modify-phases %standard-phases
4594 ;; This seems to be a bug in the JDK. It may not be necessary in
4595 ;; future versions of the JDK.
4596 (add-after 'unpack 'fix-bug
4597 (lambda _
4598 (with-directory-excursion
4599 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4600 (substitute* '("IntegerValueConverter.java"
4601 "ThreadsValueConverter.java")
4602 (("public Class<Integer> valueType")
4603 "public Class<? extends Integer> valueType")))
4604 #t)))))
4605 (inputs
4606 `(("java-jopt-simple" ,java-jopt-simple)
4607 ("java-commons-math3" ,java-commons-math3)))
4608 (native-inputs
4609 `(("java-junit" ,java-junit)
4610 ("java-hamcrest-core" ,java-hamcrest-core)))
4611 (home-page "http://openjdk.java.net/projects/code-tools/jmh/")
4612 (synopsis "Benchmark harness for the JVM")
4613 (description "JMH is a Java harness for building, running, and analysing
4614 nano/micro/milli/macro benchmarks written in Java and other languages
4615 targeting the JVM.")
4616 ;; GPLv2 only
4617 (license license:gpl2)))
4618
4619 (define-public java-commons-collections4
4620 (package
4621 (name "java-commons-collections4")
4622 (version "4.1")
4623 (source (origin
4624 (method url-fetch)
4625 (uri (string-append "mirror://apache/commons/collections/source/"
4626 "commons-collections4-" version "-src.tar.gz"))
4627 (sha256
4628 (base32
4629 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4630 (build-system ant-build-system)
4631 (arguments
4632 `(#:test-target "test"
4633 #:make-flags
4634 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4635 (junit (assoc-ref %build-inputs "java-junit"))
4636 (easymock (assoc-ref %build-inputs "java-easymock")))
4637 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4638 (string-append "-Dhamcrest.jar=" hamcrest
4639 "/share/java/hamcrest-core.jar")
4640 (string-append "-Deasymock.jar=" easymock
4641 "/share/java/easymock.jar")))
4642 #:phases
4643 (modify-phases %standard-phases
4644 (replace 'install
4645 (install-jars "target")))))
4646 (native-inputs
4647 `(("java-junit" ,java-junit)
4648 ("java-hamcrest-core" ,java-hamcrest-core)
4649 ("java-easymock" ,java-easymock)))
4650 (home-page "http://commons.apache.org/collections/")
4651 (synopsis "Collections framework")
4652 (description "The Java Collections Framework is the recognised standard
4653 for collection handling in Java. Commons-Collections seek to build upon the
4654 JDK classes by providing new interfaces, implementations and utilities. There
4655 are many features, including:
4656
4657 @itemize
4658 @item @code{Bag} interface for collections that have a number of copies of
4659 each object
4660 @item @code{BidiMap} interface for maps that can be looked up from value to
4661 key as well and key to value
4662 @item @code{MapIterator} interface to provide simple and quick iteration over
4663 maps
4664 @item Transforming decorators that alter each object as it is added to the
4665 collection
4666 @item Composite collections that make multiple collections look like one
4667 @item Ordered maps and sets that retain the order elements are added in,
4668 including an LRU based map
4669 @item Reference map that allows keys and/or values to be garbage collected
4670 under close control
4671 @item Many comparator implementations
4672 @item Many iterator implementations
4673 @item Adapter classes from array and enumerations to collections
4674 @item Utilities to test or create typical set-theory properties of collections
4675 such as union, intersection, and closure.
4676 @end itemize\n")
4677 (license license:asl2.0)))
4678
4679 (define-public java-commons-collections
4680 (package
4681 (inherit java-commons-collections4)
4682 (name "java-commons-collections")
4683 (version "3.2.2")
4684 (source (origin
4685 (method url-fetch)
4686 (uri (string-append "mirror://apache/commons/collections/source/"
4687 "commons-collections-" version "-src.tar.gz"))
4688 (sha256
4689 (base32
4690 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4691 (patches
4692 (search-patches "java-commons-collections-fix-java8.patch"))))
4693 (arguments
4694 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4695 ((#:phases phases)
4696 `(modify-phases ,phases
4697 ;; The manifest is required by the build procedure
4698 (add-before 'build 'add-manifest
4699 (lambda _
4700 (mkdir-p "build/conf")
4701 (call-with-output-file "build/conf/MANIFEST.MF"
4702 (lambda (file)
4703 (format file "Manifest-Version: 1.0\n")))
4704 #t))
4705 (replace 'install
4706 (install-jars "build"))))))))
4707
4708 (define java-commons-collections-test-classes
4709 (package
4710 (inherit java-commons-collections)
4711 (arguments
4712 `(#:jar-name "commons-collections-test-classes.jar"
4713 #:source-dir "src/test"
4714 #:tests? #f))
4715 (inputs
4716 `(("collection" ,java-commons-collections)))))
4717
4718 (define-public java-commons-beanutils
4719 (package
4720 (name "java-commons-beanutils")
4721 (version "1.9.3")
4722 (source (origin
4723 (method url-fetch)
4724 (uri (string-append "mirror://apache/commons/beanutils/source/"
4725 "commons-beanutils-" version "-src.tar.gz"))
4726 (sha256
4727 (base32
4728 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4729 (build-system ant-build-system)
4730 (arguments
4731 `(#:test-target "test"
4732 #:tests? #f
4733 #:phases
4734 (modify-phases %standard-phases
4735 (replace 'install
4736 (lambda* (#:key outputs #:allow-other-keys)
4737 (rename-file (string-append "dist/commons-beanutils-" ,version
4738 "-SNAPSHOT.jar")
4739 "commons-beanutils.jar")
4740 (install-file "commons-beanutils.jar"
4741 (string-append (assoc-ref outputs "out") "/share/java/"))
4742 #t)))))
4743 (inputs
4744 `(("logging" ,java-commons-logging-minimal)
4745 ("collections" ,java-commons-collections)))
4746 (native-inputs
4747 `(("junit" ,java-junit)
4748 ("collections-test" ,java-commons-collections-test-classes)))
4749 (home-page "http://commons.apache.org/beanutils/")
4750 (synopsis "Dynamically set or get properties in Java")
4751 (description "BeanUtils provides a simplified interface to reflection and
4752 introspection to set or get dynamically determined properties through their
4753 setter and getter method.")
4754 (license license:asl2.0)))
4755
4756 (define-public java-commons-io
4757 (package
4758 (name "java-commons-io")
4759 (version "2.5")
4760 (source
4761 (origin
4762 (method url-fetch)
4763 (uri (string-append "mirror://apache/commons/io/source/"
4764 "commons-io-" version "-src.tar.gz"))
4765 (sha256
4766 (base32
4767 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4768 (build-system ant-build-system)
4769 (outputs '("out" "doc"))
4770 (arguments
4771 `(#:test-target "test"
4772 #:make-flags
4773 (list (string-append "-Djunit.jar="
4774 (assoc-ref %build-inputs "java-junit")
4775 "/share/java/junit.jar"))
4776 #:phases
4777 (modify-phases %standard-phases
4778 (add-after 'build 'build-javadoc ant-build-javadoc)
4779 (replace 'install (install-jars "target"))
4780 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4781 (native-inputs
4782 `(("java-junit" ,java-junit)
4783 ("java-hamcrest-core" ,java-hamcrest-core)))
4784 (home-page "http://commons.apache.org/io/")
4785 (synopsis "Common useful IO related classes")
4786 (description "Commons-IO contains utility classes, stream implementations,
4787 file filters and endian classes.")
4788 (license license:asl2.0)))
4789
4790 (define-public java-commons-exec-1.1
4791 (package
4792 (name "java-commons-exec")
4793 (version "1.1")
4794 (source
4795 (origin
4796 (method url-fetch)
4797 (uri (string-append "mirror://apache/commons/exec/source/"
4798 "commons-exec-" version "-src.tar.gz"))
4799 (sha256
4800 (base32
4801 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4802 (build-system ant-build-system)
4803 (arguments
4804 `(#:test-target "test"
4805 #:make-flags
4806 (list (string-append "-Dmaven.junit.jar="
4807 (assoc-ref %build-inputs "java-junit")
4808 "/share/java/junit.jar"))
4809 #:phases
4810 (modify-phases %standard-phases
4811 (add-before 'build 'delete-network-tests
4812 (lambda _
4813 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4814 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4815 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4816 #t))
4817 ;; The "build" phase automatically tests.
4818 (delete 'check)
4819 (replace 'install (install-jars "target")))))
4820 (native-inputs
4821 `(("java-junit" ,java-junit)))
4822 (home-page "http://commons.apache.org/proper/commons-exec/")
4823 (synopsis "Common program execution related classes")
4824 (description "Commons-Exec simplifies executing external processes.")
4825 (license license:asl2.0)))
4826
4827 (define-public java-commons-exec
4828 (package
4829 (inherit java-commons-exec-1.1)
4830 (version "1.3")
4831 (source
4832 (origin
4833 (method url-fetch)
4834 (uri (string-append "mirror://apache/commons/exec/source/"
4835 "commons-exec-" version "-src.tar.gz"))
4836 (sha256
4837 (base32
4838 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4839 (arguments
4840 `(#:test-target "test"
4841 #:make-flags
4842 (list (string-append "-Dmaven.junit.jar="
4843 (assoc-ref %build-inputs "java-junit")
4844 "/share/java/junit.jar")
4845 "-Dmaven.compiler.source=1.7"
4846 "-Dmaven.compiler.target=1.7")
4847 #:phases
4848 (modify-phases %standard-phases
4849 (add-before 'build 'delete-network-tests
4850 (lambda* (#:key inputs #:allow-other-keys)
4851 ;; This test hangs indefinitely.
4852 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
4853 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
4854 (("ping -c 10 127.0.0.1") "sleep 10"))
4855 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
4856 (("/bin/ls") "ls"))
4857 (call-with-output-file "src/test/scripts/ping.sh"
4858 (lambda (port)
4859 (format port "#!~a/bin/sh\nsleep $1\n"
4860 (assoc-ref inputs "bash"))))
4861 #t))
4862 ;; The "build" phase automatically tests.
4863 (delete 'check)
4864 (replace 'install (install-jars "target")))))
4865 (native-inputs
4866 `(("java-junit" ,java-junit)
4867 ("java-hamcrest-core" ,java-hamcrest-core)))))
4868
4869 (define-public java-commons-lang
4870 (package
4871 (name "java-commons-lang")
4872 (version "2.6")
4873 (source
4874 (origin
4875 (method url-fetch)
4876 (uri (string-append "mirror://apache/commons/lang/source/"
4877 "commons-lang-" version "-src.tar.gz"))
4878 (sha256
4879 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
4880 (build-system ant-build-system)
4881 (outputs '("out" "doc"))
4882 (arguments
4883 `(#:test-target "test"
4884 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
4885 #:phases
4886 (modify-phases %standard-phases
4887 (add-after 'build 'build-javadoc ant-build-javadoc)
4888 (add-before 'check 'disable-failing-test
4889 (lambda _
4890 ;; Disable a failing test
4891 (substitute* "src/test/java/org/apache/commons/lang/\
4892 time/FastDateFormatTest.java"
4893 (("public void testFormat\\(\\)")
4894 "public void disabled_testFormat()"))
4895 #t))
4896 (replace 'install (install-jars "target"))
4897 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4898 (native-inputs
4899 `(("java-junit" ,java-junit)))
4900 (home-page "http://commons.apache.org/lang/")
4901 (synopsis "Extension of the java.lang package")
4902 (description "The Commons Lang components contains a set of Java classes
4903 that provide helper methods for standard Java classes, especially those found
4904 in the @code{java.lang} package in the Sun JDK. The following classes are
4905 included:
4906
4907 @itemize
4908 @item StringUtils - Helper for @code{java.lang.String}.
4909 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
4910 of characters such as @code{[a-z]} and @code{[abcdez]}.
4911 @item RandomStringUtils - Helper for creating randomised strings.
4912 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4913 @item NumberRange - A range of numbers with an upper and lower bound.
4914 @item ObjectUtils - Helper for @code{java.lang.Object}.
4915 @item SerializationUtils - Helper for serializing objects.
4916 @item SystemUtils - Utility class defining the Java system properties.
4917 @item NestedException package - A sub-package for the creation of nested
4918 exceptions.
4919 @item Enum package - A sub-package for the creation of enumerated types.
4920 @item Builder package - A sub-package for the creation of @code{equals},
4921 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4922 @end itemize\n")
4923 (license license:asl2.0)))
4924
4925 (define-public java-commons-lang3
4926 (package
4927 (name "java-commons-lang3")
4928 (version "3.4")
4929 (source
4930 (origin
4931 (method url-fetch)
4932 (uri (string-append "mirror://apache/commons/lang/source/"
4933 "commons-lang3-" version "-src.tar.gz"))
4934 (sha256
4935 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
4936 (build-system ant-build-system)
4937 (outputs '("out" "doc"))
4938 (arguments
4939 `(#:test-target "test"
4940 #:make-flags
4941 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
4942 (junit (assoc-ref %build-inputs "java-junit"))
4943 (easymock (assoc-ref %build-inputs "java-easymock"))
4944 (io (assoc-ref %build-inputs "java-commons-io")))
4945 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4946 (string-append "-Dhamcrest.jar=" hamcrest
4947 "/share/java/hamcrest-all.jar")
4948 (string-append "-Dcommons-io.jar=" io
4949 "/share/java/commons-io-"
4950 ,(package-version java-commons-io)
4951 "-SNAPSHOT.jar")
4952 (string-append "-Deasymock.jar=" easymock
4953 "/share/java/easymock.jar")))
4954 #:phases
4955 (modify-phases %standard-phases
4956 (add-after 'build 'build-javadoc ant-build-javadoc)
4957 (replace 'install (install-jars "target"))
4958 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4959 (native-inputs
4960 `(("java-junit" ,java-junit)
4961 ("java-commons-io" ,java-commons-io)
4962 ("java-hamcrest-all" ,java-hamcrest-all)
4963 ("java-easymock" ,java-easymock)))
4964 (home-page "http://commons.apache.org/lang/")
4965 (synopsis "Extension of the java.lang package")
4966 (description "The Commons Lang components contains a set of Java classes
4967 that provide helper methods for standard Java classes, especially those found
4968 in the @code{java.lang} package. The following classes are included:
4969
4970 @itemize
4971 @item StringUtils - Helper for @code{java.lang.String}.
4972 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
4973 characters such as @code{[a-z]} and @code{[abcdez]}.
4974 @item RandomStringUtils - Helper for creating randomised strings.
4975 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
4976 @item NumberRange - A range of numbers with an upper and lower bound.
4977 @item ObjectUtils - Helper for @code{java.lang.Object}.
4978 @item SerializationUtils - Helper for serializing objects.
4979 @item SystemUtils - Utility class defining the Java system properties.
4980 @item NestedException package - A sub-package for the creation of nested
4981 exceptions.
4982 @item Enum package - A sub-package for the creation of enumerated types.
4983 @item Builder package - A sub-package for the creation of @code{equals},
4984 @code{hashCode}, @code{compareTo} and @code{toString} methods.
4985 @end itemize\n")
4986 (license license:asl2.0)))
4987
4988 (define-public java-commons-bsf
4989 (package
4990 (name "java-commons-bsf")
4991 (version "2.4.0")
4992 (source (origin
4993 (method url-fetch)
4994 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
4995 version ".tar.gz"))
4996 (sha256
4997 (base32
4998 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
4999 (modules '((guix build utils)))
5000 (snippet
5001 '(begin
5002 (for-each delete-file
5003 (find-files "." "\\.jar$"))
5004 #t))))
5005 (build-system ant-build-system)
5006 (arguments
5007 `(#:build-target "jar"
5008 #:tests? #f; No test file
5009 #:modules ((guix build ant-build-system)
5010 (guix build utils)
5011 (guix build java-utils)
5012 (sxml simple))
5013 #:phases
5014 (modify-phases %standard-phases
5015 (add-before 'build 'create-properties
5016 (lambda _
5017 ;; This file is missing from the distribution
5018 (call-with-output-file "build-properties.xml"
5019 (lambda (port)
5020 (sxml->xml
5021 `(project (@ (basedir ".") (name "build-properties") (default ""))
5022 (property (@ (name "project.name") (value "bsf")))
5023 (property (@ (name "source.level") (value "1.5")))
5024 (property (@ (name "build.lib") (value "build/jar")))
5025 (property (@ (name "src.dir") (value "src")))
5026 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5027 (property (@ (name "build.tests") (value "build/test-classes")))
5028 (property (@ (name "build.dest") (value "build/classes"))))
5029 port)))
5030 #t))
5031 (replace 'install (install-jars "build")))))
5032 (native-inputs
5033 `(("java-junit" ,java-junit)))
5034 (inputs
5035 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5036 (home-page "https://commons.apache.org/proper/commons-bsf")
5037 (synopsis "Bean Scripting Framework")
5038 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5039 which provides scripting language support within Java applications, and access
5040 to Java objects and methods from scripting languages. BSF allows one to write
5041 JSPs in languages other than Java while providing access to the Java class
5042 library. In addition, BSF permits any Java application to be implemented in
5043 part (or dynamically extended) by a language that is embedded within it. This
5044 is achieved by providing an API that permits calling scripting language engines
5045 from within Java, as well as an object registry that exposes Java objects to
5046 these scripting language engines.")
5047 (license license:asl2.0)))
5048
5049 (define-public java-commons-jxpath
5050 (package
5051 (name "java-commons-jxpath")
5052 (version "1.3")
5053 (source (origin
5054 (method url-fetch)
5055 (uri (string-append "mirror://apache/commons/jxpath/source/"
5056 "commons-jxpath-" version "-src.tar.gz"))
5057 (sha256
5058 (base32
5059 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5060 (build-system ant-build-system)
5061 (arguments
5062 `(#:jar-name "commons-jxpath.jar"
5063 ;; tests require more dependencies, including mockrunner which depends on old software
5064 #:tests? #f
5065 #:source-dir "src/java"))
5066 (inputs
5067 `(("servlet" ,java-classpathx-servletapi)
5068 ("java-jdom" ,java-jdom)
5069 ("java-commons-beanutils" ,java-commons-beanutils)))
5070 (native-inputs
5071 `(("java-junit" ,java-junit)))
5072 (home-page "http://commons.apache.org/jxpath/")
5073 (synopsis "Simple interpreter of an expression language called XPath.")
5074 (description "The org.apache.commons.jxpath package defines a simple
5075 interpreter of an expression language called XPath. JXPath applies XPath
5076 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5077 contexts, DOM etc, including mixtures thereof.")
5078 (license license:asl2.0)))
5079
5080 (define-public java-jsr250
5081 (package
5082 (name "java-jsr250")
5083 (version "1.3")
5084 (source (origin
5085 (method url-fetch)
5086 (uri (string-append "https://repo1.maven.org/maven2/"
5087 "javax/annotation/javax.annotation-api/"
5088 version "/javax.annotation-api-"
5089 version "-sources.jar"))
5090 (sha256
5091 (base32
5092 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5093 (build-system ant-build-system)
5094 (arguments
5095 `(#:tests? #f ; no tests included
5096 #:jdk ,icedtea-8
5097 #:jar-name "jsr250.jar"))
5098 (home-page "https://jcp.org/en/jsr/detail?id=250")
5099 (synopsis "Security-related annotations")
5100 (description "This package provides annotations for security. It provides
5101 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5102 namespaces.")
5103 ;; either cddl or gpl2 only, with classpath exception
5104 (license (list license:cddl1.0
5105 license:gpl2))))
5106
5107 (define-public java-jsr305
5108 (package
5109 (name "java-jsr305")
5110 (version "3.0.1")
5111 (source (origin
5112 (method url-fetch)
5113 (uri (string-append "https://repo1.maven.org/maven2/"
5114 "com/google/code/findbugs/"
5115 "jsr305/" version "/jsr305-"
5116 version "-sources.jar"))
5117 (sha256
5118 (base32
5119 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5120 (build-system ant-build-system)
5121 (arguments
5122 `(#:tests? #f ; no tests included
5123 #:jar-name "jsr305.jar"))
5124 (home-page "http://findbugs.sourceforge.net/")
5125 (synopsis "Annotations for the static analyzer called findbugs")
5126 (description "This package provides annotations for the findbugs package.
5127 It provides packages in the @code{javax.annotations} namespace.")
5128 (license license:asl2.0)))
5129
5130 (define-public java-guava
5131 (package
5132 (name "java-guava")
5133 ;; This is the last release of Guava that can be built with Java 7.
5134 (version "20.0")
5135 (source (origin
5136 (method url-fetch)
5137 (uri (string-append "https://github.com/google/guava/"
5138 "releases/download/v" version
5139 "/guava-" version "-sources.jar"))
5140 (sha256
5141 (base32
5142 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5143 (build-system ant-build-system)
5144 (arguments
5145 `(#:tests? #f ; no tests included
5146 #:jar-name "guava.jar"
5147 #:phases
5148 (modify-phases %standard-phases
5149 (add-after 'unpack 'trim-sources
5150 (lambda _
5151 (with-directory-excursion "src/com/google/common"
5152 ;; Remove annotations to avoid extra dependencies:
5153 ;; * "j2objc" annotations are used when converting Java to
5154 ;; Objective C;
5155 ;; * "errorprone" annotations catch common Java mistakes at
5156 ;; compile time;
5157 ;; * "IgnoreJRERequirement" is used for Android.
5158 (substitute* (find-files "." "\\.java$")
5159 (("import com.google.j2objc.*") "")
5160 (("import com.google.errorprone.annotation.*") "")
5161 (("import org.codehaus.mojo.animal_sniffer.*") "")
5162 (("@CanIgnoreReturnValue") "")
5163 (("@LazyInit") "")
5164 (("@WeakOuter") "")
5165 (("@RetainedWith") "")
5166 (("@Weak") "")
5167 (("@ForOverride") "")
5168 (("@J2ObjCIncompatible") "")
5169 (("@IgnoreJRERequirement") "")))
5170 #t)))))
5171 (inputs
5172 `(("java-jsr305" ,java-jsr305)))
5173 (home-page "https://github.com/google/guava")
5174 (synopsis "Google core libraries for Java")
5175 (description "Guava is a set of core libraries that includes new
5176 collection types (such as multimap and multiset), immutable collections, a
5177 graph library, functional types, an in-memory cache, and APIs/utilities for
5178 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5179 more!")
5180 (license license:asl2.0)))
5181
5182 ;; The java-commons-logging package provides adapters to many different
5183 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5184 ;; it with only a minimal set of adapters.
5185 (define-public java-commons-logging-minimal
5186 (package
5187 (name "java-commons-logging-minimal")
5188 (version "1.2")
5189 (source (origin
5190 (method url-fetch)
5191 (uri (string-append "mirror://apache/commons/logging/source/"
5192 "commons-logging-" version "-src.tar.gz"))
5193 (sha256
5194 (base32
5195 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5196 (build-system ant-build-system)
5197 (arguments
5198 `(#:tests? #f ; avoid dependency on logging frameworks
5199 #:jar-name "commons-logging-minimal.jar"
5200 #:phases
5201 (modify-phases %standard-phases
5202 (add-after 'unpack 'delete-adapters-and-tests
5203 (lambda _
5204 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5205 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5206 ;; is used by applications; SimpleLog is the only actually usable
5207 ;; implementation that does not depend on another logging
5208 ;; framework.
5209 (for-each
5210 (lambda (file)
5211 (delete-file (string-append
5212 "src/main/java/org/apache/commons/logging/impl/" file)))
5213 (list "Jdk13LumberjackLogger.java"
5214 "WeakHashtable.java"
5215 "Log4JLogger.java"
5216 "ServletContextCleaner.java"
5217 "Jdk14Logger.java"
5218 "AvalonLogger.java"
5219 "LogKitLogger.java"))
5220 (delete-file-recursively "src/test")
5221 #t)))))
5222 (home-page "http://commons.apache.org/logging/")
5223 (synopsis "Common API for logging implementations")
5224 (description "The Logging package is a thin bridge between different
5225 logging implementations. A library that uses the commons-logging API can be
5226 used with any logging implementation at runtime.")
5227 (license license:asl2.0)))
5228
5229 ;; This is the last release of the 1.x series.
5230 (define-public java-mockito-1
5231 (package
5232 (name "java-mockito")
5233 (version "1.10.19")
5234 (source (origin
5235 (method url-fetch)
5236 (uri (string-append "http://repo1.maven.org/maven2/"
5237 "org/mockito/mockito-core/" version
5238 "/mockito-core-" version "-sources.jar"))
5239 (sha256
5240 (base32
5241 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5242 (build-system ant-build-system)
5243 (arguments
5244 `(#:jar-name "mockito.jar"
5245 #:tests? #f ; no tests included
5246 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5247 ;; patches in build phases.
5248 #:phases
5249 (modify-phases %standard-phases
5250 ;; Mockito was developed against a different version of hamcrest,
5251 ;; which does not require matcher implementations to provide an
5252 ;; implementation of the "describeMismatch" method. We add this
5253 ;; simple definition to pass the build with our version of hamcrest.
5254 (add-after 'unpack 'fix-hamcrest-build-error
5255 (lambda _
5256 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5257 (("public Matcher getActualMatcher\\(\\) .*" line)
5258 (string-append "
5259 public void describeMismatch(Object item, Description description) {
5260 actualMatcher.describeMismatch(item, description);
5261 }"
5262 line)))
5263 #t))
5264 ;; Mockito bundles cglib. We have a cglib package, so let's use
5265 ;; that instead.
5266 (add-after 'unpack 'use-system-libraries
5267 (lambda _
5268 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5269 (substitute* '("CGLIBHacker.java"
5270 "CglibMockMaker.java"
5271 "ClassImposterizer.java"
5272 "DelegatingMockitoMethodProxy.java"
5273 "MethodInterceptorFilter.java"
5274 "MockitoNamingPolicy.java"
5275 "SerializableMockitoMethodProxy.java"
5276 "SerializableNoOp.java")
5277 (("import org.mockito.cglib") "import net.sf.cglib")))
5278 #t)))))
5279 (inputs
5280 `(("java-junit" ,java-junit)
5281 ("java-objenesis" ,java-objenesis)
5282 ("java-cglib" ,java-cglib)
5283 ("java-hamcrest-core" ,java-hamcrest-core)))
5284 (home-page "http://mockito.org")
5285 (synopsis "Mockito is a mock library for Java")
5286 (description "Mockito is a mocking library for Java which lets you write
5287 tests with a clean and simple API. It generates mocks using reflection, and
5288 it records all mock invocations, including methods arguments.")
5289 (license license:asl2.0)))
5290
5291 (define-public java-httpcomponents-httpcore
5292 (package
5293 (name "java-httpcomponents-httpcore")
5294 (version "4.4.6")
5295 (source (origin
5296 (method url-fetch)
5297 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5298 "source/httpcomponents-core-"
5299 version "-src.tar.gz"))
5300 (sha256
5301 (base32
5302 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5303 (build-system ant-build-system)
5304 (arguments
5305 `(#:jar-name "httpcomponents-httpcore.jar"
5306 #:phases
5307 (modify-phases %standard-phases
5308 (add-after 'unpack 'chdir
5309 (lambda _ (chdir "httpcore") #t)))))
5310 (inputs
5311 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5312 ("java-commons-lang3" ,java-commons-lang3)))
5313 (native-inputs
5314 `(("java-junit" ,java-junit)
5315 ("java-mockito" ,java-mockito-1)))
5316 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5317 (synopsis "Low level HTTP transport components")
5318 (description "HttpCore is a set of low level HTTP transport components
5319 that can be used to build custom client and server side HTTP services with a
5320 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5321 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5322 NIO.
5323
5324 This package provides the blocking I/O model library.")
5325 (license license:asl2.0)))
5326
5327 (define-public java-httpcomponents-httpcore-nio
5328 (package (inherit java-httpcomponents-httpcore)
5329 (name "java-httpcomponents-httpcore-nio")
5330 (arguments
5331 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5332 #:phases
5333 (modify-phases %standard-phases
5334 (add-after 'unpack 'chdir
5335 (lambda _ (chdir "httpcore-nio") #t)))))
5336 (inputs
5337 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5338 ("java-hamcrest-core" ,java-hamcrest-core)
5339 ,@(package-inputs java-httpcomponents-httpcore)))
5340 (description "HttpCore is a set of low level HTTP transport components
5341 that can be used to build custom client and server side HTTP services with a
5342 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5343 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5344 NIO.
5345
5346 This package provides the non-blocking I/O model library based on Java
5347 NIO.")))
5348
5349 (define-public java-httpcomponents-httpcore-ab
5350 (package (inherit java-httpcomponents-httpcore)
5351 (name "java-httpcomponents-httpcore-ab")
5352 (arguments
5353 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5354 #:phases
5355 (modify-phases %standard-phases
5356 (add-after 'unpack 'chdir
5357 (lambda _ (chdir "httpcore-ab") #t)))))
5358 (inputs
5359 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5360 ("java-commons-cli" ,java-commons-cli)
5361 ("java-hamcrest-core" ,java-hamcrest-core)
5362 ,@(package-inputs java-httpcomponents-httpcore)))
5363 (synopsis "Apache HttpCore benchmarking tool")
5364 (description "This package provides the HttpCore benchmarking tool. It is
5365 an Apache AB clone based on HttpCore.")))
5366
5367 (define-public java-httpcomponents-httpclient
5368 (package
5369 (name "java-httpcomponents-httpclient")
5370 (version "4.5.3")
5371 (source (origin
5372 (method url-fetch)
5373 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5374 "source/httpcomponents-client-"
5375 version "-src.tar.gz"))
5376 (sha256
5377 (base32
5378 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5379 (build-system ant-build-system)
5380 (arguments
5381 `(#:jar-name "httpcomponents-httpclient.jar"
5382 #:phases
5383 (modify-phases %standard-phases
5384 (add-after 'unpack 'chdir
5385 (lambda _ (chdir "httpclient") #t)))))
5386 (inputs
5387 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5388 ("java-commons-codec" ,java-commons-codec)
5389 ("java-hamcrest-core" ,java-hamcrest-core)
5390 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5391 ("java-mockito" ,java-mockito-1)
5392 ("java-junit" ,java-junit)))
5393 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5394 (synopsis "HTTP client library for Java")
5395 (description "Although the @code{java.net} package provides basic
5396 functionality for accessing resources via HTTP, it doesn't provide the full
5397 flexibility or functionality needed by many applications. @code{HttpClient}
5398 seeks to fill this void by providing an efficient, up-to-date, and
5399 feature-rich package implementing the client side of the most recent HTTP
5400 standards and recommendations.")
5401 (license license:asl2.0)))
5402
5403 (define-public java-httpcomponents-httpmime
5404 (package (inherit java-httpcomponents-httpclient)
5405 (name "java-httpcomponents-httpmime")
5406 (arguments
5407 `(#:jar-name "httpcomponents-httpmime.jar"
5408 #:phases
5409 (modify-phases %standard-phases
5410 (add-after 'unpack 'chdir
5411 (lambda _ (chdir "httpmime") #t)))))
5412 (inputs
5413 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5414 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5415 ("java-junit" ,java-junit)
5416 ("java-hamcrest-core" ,java-hamcrest-core)))))
5417
5418 (define-public java-commons-net
5419 (package
5420 (name "java-commons-net")
5421 (version "3.6")
5422 (source (origin
5423 (method url-fetch)
5424 (uri (string-append "mirror://apache/commons/net/source/"
5425 "commons-net-" version "-src.tar.gz"))
5426 (sha256
5427 (base32
5428 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5429 (build-system ant-build-system)
5430 (arguments
5431 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5432 ;; should be "resources/examples/examples.properties"), but gets "null"
5433 ;; instead.
5434 #:tests? #f
5435 #:jar-name "commons-net.jar"))
5436 (native-inputs
5437 `(("java-junit" ,java-junit)
5438 ("java-hamcrest-core" ,java-hamcrest-core)))
5439 (home-page "http://commons.apache.org/net/")
5440 (synopsis "Client library for many basic Internet protocols")
5441 (description "The Apache Commons Net library implements the client side of
5442 many basic Internet protocols. The purpose of the library is to provide
5443 fundamental protocol access, not higher-level abstractions.")
5444 (license license:asl2.0)))
5445
5446 (define-public java-jsch
5447 (package
5448 (name "java-jsch")
5449 (version "0.1.55")
5450 (source (origin
5451 (method url-fetch)
5452 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5453 version "/jsch-" version ".zip"))
5454 (sha256
5455 (base32
5456 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5457 (build-system ant-build-system)
5458 (arguments
5459 `(#:build-target "dist"
5460 #:tests? #f ; no tests included
5461 #:phases
5462 (modify-phases %standard-phases
5463 (replace 'install (install-jars "dist")))))
5464 (native-inputs
5465 `(("unzip" ,unzip)))
5466 (home-page "http://www.jcraft.com/jsch/")
5467 (synopsis "Pure Java implementation of SSH2")
5468 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5469 to connect to an SSH server and use port forwarding, X11 forwarding, file
5470 transfer, etc., and you can integrate its functionality into your own Java
5471 programs.")
5472 (license license:bsd-3)))
5473
5474 (define-public java-commons-compress
5475 (package
5476 (name "java-commons-compress")
5477 (version "1.13")
5478 (source (origin
5479 (method url-fetch)
5480 (uri (string-append "mirror://apache/commons/compress/source/"
5481 "commons-compress-" version "-src.tar.gz"))
5482 (sha256
5483 (base32
5484 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5485 (build-system ant-build-system)
5486 (arguments
5487 `(#:jar-name "commons-compress.jar"
5488 #:phases
5489 (modify-phases %standard-phases
5490 (add-after 'unpack 'delete-bad-tests
5491 (lambda _
5492 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5493 ;; FIXME: These tests really should not fail. Maybe they are
5494 ;; indicative of problems with our Java packaging work.
5495
5496 ;; This test fails with a null pointer exception.
5497 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5498 ;; This test fails to open test resources.
5499 (delete-file "archivers/zip/ExplodeSupportTest.java")
5500
5501 ;; FIXME: This test adds a dependency on powermock, which is hard to
5502 ;; package at this point.
5503 ;; https://github.com/powermock/powermock
5504 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5505 #t)))))
5506 (inputs
5507 `(("java-junit" ,java-junit)
5508 ("java-hamcrest-core" ,java-hamcrest-core)
5509 ("java-mockito" ,java-mockito-1)
5510 ("java-xz" ,java-xz)))
5511 (home-page "https://commons.apache.org/proper/commons-compress/")
5512 (synopsis "Java library for working with compressed files")
5513 (description "The Apache Commons Compress library defines an API for
5514 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5515 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5516 (license license:asl2.0)))
5517
5518 (define-public java-commons-csv
5519 (package
5520 (name "java-commons-csv")
5521 (version "1.4")
5522 (source (origin
5523 (method url-fetch)
5524 (uri (string-append "mirror://apache/commons/csv/source/"
5525 "commons-csv-" version "-src.tar.gz"))
5526 (sha256
5527 (base32
5528 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5529 (build-system ant-build-system)
5530 (arguments
5531 `(#:jar-name "commons-csv.jar"
5532 #:source-dir "src/main/java"
5533 #:tests? #f)); FIXME: requires java-h2
5534 (inputs
5535 `(("java-hamcrest-core" ,java-hamcrest-core)
5536 ("java-commons-io" ,java-commons-io)
5537 ("java-commons-lang3" ,java-commons-lang3)
5538 ("junit" ,java-junit)))
5539 (home-page "https://commons.apache.org/proper/commons-csv/")
5540 (synopsis "Read and write CSV documents")
5541 (description "Commons CSV reads and writes files in variations of the Comma
5542 Separated Value (CSV) format. The most common CSV formats are predefined in the
5543 CSVFormat class:
5544
5545 @itemize
5546 @item Microsoft Excel
5547 @item Informix UNLOAD
5548 @item Informix UNLOAD CSV
5549 @item MySQL
5550 @item RFC 4180
5551 @item TDF
5552 @end itemize
5553
5554 Custom formats can be created using a fluent style API.")
5555 (license license:asl2.0)))
5556
5557 (define-public java-osgi-annotation
5558 (package
5559 (name "java-osgi-annotation")
5560 (version "6.0.0")
5561 (source (origin
5562 (method url-fetch)
5563 (uri (string-append "https://repo1.maven.org/maven2/"
5564 "org/osgi/org.osgi.annotation/" version "/"
5565 "org.osgi.annotation-" version "-sources.jar"))
5566 (sha256
5567 (base32
5568 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5569 (build-system ant-build-system)
5570 (arguments
5571 `(#:tests? #f ; no tests
5572 #:jar-name "osgi-annotation.jar"))
5573 (home-page "https://www.osgi.org")
5574 (synopsis "Annotation module of OSGi framework")
5575 (description
5576 "OSGi, for Open Services Gateway initiative framework, is a module system
5577 and service platform for the Java programming language. This package contains
5578 the OSGi annotation module, providing additional services to help dynamic
5579 components.")
5580 (license license:asl2.0)))
5581
5582 (define-public java-osgi-core
5583 (package
5584 (name "java-osgi-core")
5585 (version "6.0.0")
5586 (source (origin
5587 (method url-fetch)
5588 (uri (string-append "https://repo1.maven.org/maven2/"
5589 "org/osgi/org.osgi.core/" version "/"
5590 "org.osgi.core-" version "-sources.jar"))
5591 (sha256
5592 (base32
5593 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5594 (build-system ant-build-system)
5595 (arguments
5596 `(#:tests? #f ; no tests
5597 #:jar-name "osgi-core.jar"))
5598 (inputs
5599 `(("java-osgi-annotation" ,java-osgi-annotation)))
5600 (home-page "https://www.osgi.org")
5601 (synopsis "Core module of OSGi framework")
5602 (description
5603 "OSGi, for Open Services Gateway initiative framework, is a module system
5604 and service platform for the Java programming language. This package contains
5605 the OSGi Core module.")
5606 (license license:asl2.0)))
5607
5608 (define-public java-osgi-service-event
5609 (package
5610 (name "java-osgi-service-event")
5611 (version "1.3.1")
5612 (source (origin
5613 (method url-fetch)
5614 (uri (string-append "https://repo1.maven.org/maven2/"
5615 "org/osgi/org.osgi.service.event/"
5616 version "/org.osgi.service.event-"
5617 version "-sources.jar"))
5618 (sha256
5619 (base32
5620 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5621 (build-system ant-build-system)
5622 (arguments
5623 `(#:tests? #f ; no tests
5624 #:jar-name "osgi-service-event.jar"))
5625 (inputs
5626 `(("java-osgi-annotation" ,java-osgi-annotation)
5627 ("java-osgi-core" ,java-osgi-core)))
5628 (home-page "https://www.osgi.org")
5629 (synopsis "OSGi service event module")
5630 (description
5631 "OSGi, for Open Services Gateway initiative framework, is a module system
5632 and service platform for the Java programming language. This package contains
5633 the OSGi @code{org.osgi.service.event} module.")
5634 (license license:asl2.0)))
5635
5636 (define-public java-eclipse-osgi
5637 (package
5638 (name "java-eclipse-osgi")
5639 (version "3.11.3")
5640 (source (origin
5641 (method url-fetch)
5642 (uri (string-append "https://repo1.maven.org/maven2/"
5643 "org/eclipse/platform/org.eclipse.osgi/"
5644 version "/org.eclipse.osgi-"
5645 version "-sources.jar"))
5646 (sha256
5647 (base32
5648 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5649 (build-system ant-build-system)
5650 (arguments
5651 `(#:tests? #f ; no tests included
5652 #:jar-name "eclipse-equinox-osgi.jar"))
5653 (inputs
5654 `(("java-osgi-annotation" ,java-osgi-annotation)))
5655 (home-page "http://www.eclipse.org/equinox/")
5656 (synopsis "Eclipse Equinox OSGi framework")
5657 (description "This package provides an implementation of the OSGi Core
5658 specification.")
5659 (license license:epl1.0)))
5660
5661 (define-public java-eclipse-equinox-common
5662 (package
5663 (name "java-eclipse-equinox-common")
5664 (version "3.10.200")
5665 (source (origin
5666 (method url-fetch)
5667 (uri (string-append "https://repo1.maven.org/maven2/"
5668 "org/eclipse/platform/org.eclipse.equinox.common/"
5669 version "/org.eclipse.equinox.common-"
5670 version "-sources.jar"))
5671 (sha256
5672 (base32
5673 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5674 (build-system ant-build-system)
5675 (arguments
5676 `(#:tests? #f ; no tests included
5677 #:jar-name "eclipse-equinox-common.jar"))
5678 (inputs
5679 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5680 (home-page "http://www.eclipse.org/equinox/")
5681 (synopsis "Common Eclipse runtime")
5682 (description "This package provides the common Eclipse runtime.")
5683 (license license:epl1.0)))
5684
5685 (define-public java-eclipse-core-jobs
5686 (package
5687 (name "java-eclipse-core-jobs")
5688 (version "3.8.0")
5689 (source (origin
5690 (method url-fetch)
5691 (uri (string-append "https://repo1.maven.org/maven2/"
5692 "org/eclipse/platform/org.eclipse.core.jobs/"
5693 version "/org.eclipse.core.jobs-"
5694 version "-sources.jar"))
5695 (sha256
5696 (base32
5697 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5698 (build-system ant-build-system)
5699 (arguments
5700 `(#:tests? #f ; no tests included
5701 #:jar-name "eclipse-core-jobs.jar"))
5702 (inputs
5703 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5704 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5705 (home-page "http://www.eclipse.org/equinox/")
5706 (synopsis "Eclipse jobs mechanism")
5707 (description "This package provides the Eclipse jobs mechanism.")
5708 (license license:epl1.0)))
5709
5710 (define-public java-eclipse-equinox-registry
5711 (package
5712 (name "java-eclipse-equinox-registry")
5713 (version "3.6.100")
5714 (source (origin
5715 (method url-fetch)
5716 (uri (string-append "https://repo1.maven.org/maven2/"
5717 "org/eclipse/platform/org.eclipse.equinox.registry/"
5718 version "/org.eclipse.equinox.registry-"
5719 version "-sources.jar"))
5720 (sha256
5721 (base32
5722 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5723 (build-system ant-build-system)
5724 (arguments
5725 `(#:tests? #f ; no tests included
5726 #:jar-name "eclipse-equinox-registry.jar"))
5727 (inputs
5728 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5729 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5730 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5731 (home-page "http://www.eclipse.org/equinox/")
5732 (synopsis "Eclipse extension registry support")
5733 (description "This package provides support for the Eclipse extension
5734 registry.")
5735 (license license:epl1.0)))
5736
5737 (define-public java-eclipse-equinox-app
5738 (package
5739 (name "java-eclipse-equinox-app")
5740 (version "1.3.400")
5741 (source (origin
5742 (method url-fetch)
5743 (uri (string-append "https://repo1.maven.org/maven2/"
5744 "org/eclipse/platform/org.eclipse.equinox.app/"
5745 version "/org.eclipse.equinox.app-"
5746 version "-sources.jar"))
5747 (sha256
5748 (base32
5749 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
5750 (build-system ant-build-system)
5751 (arguments
5752 `(#:tests? #f ; no tests included
5753 #:jar-name "eclipse-equinox-app.jar"))
5754 (inputs
5755 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5756 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5757 ("java-eclipse-osgi" ,java-eclipse-osgi)
5758 ("java-osgi-service-event" ,java-osgi-service-event)))
5759 (home-page "http://www.eclipse.org/equinox/")
5760 (synopsis "Equinox application container")
5761 (description "This package provides the Equinox application container for
5762 Eclipse.")
5763 (license license:epl1.0)))
5764
5765 (define-public java-eclipse-equinox-preferences
5766 (package
5767 (name "java-eclipse-equinox-preferences")
5768 (version "3.6.1")
5769 (source (origin
5770 (method url-fetch)
5771 (uri (string-append "https://repo1.maven.org/maven2/"
5772 "org/eclipse/platform/org.eclipse.equinox.preferences/"
5773 version "/org.eclipse.equinox.preferences-"
5774 version "-sources.jar"))
5775 (sha256
5776 (base32
5777 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
5778 (build-system ant-build-system)
5779 (arguments
5780 `(#:tests? #f ; no tests included
5781 #:jar-name "eclipse-equinox-preferences.jar"))
5782 (inputs
5783 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5784 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5785 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5786 (home-page "http://www.eclipse.org/equinox/")
5787 (synopsis "Eclipse preferences mechanism")
5788 (description "This package provides the Eclipse preferences mechanism with
5789 the module @code{org.eclipse.equinox.preferences}.")
5790 (license license:epl1.0)))
5791
5792 (define-public java-eclipse-core-contenttype
5793 (package
5794 (name "java-eclipse-core-contenttype")
5795 (version "3.5.100")
5796 (source (origin
5797 (method url-fetch)
5798 (uri (string-append "https://repo1.maven.org/maven2/"
5799 "org/eclipse/platform/org.eclipse.core.contenttype/"
5800 version "/org.eclipse.core.contenttype-"
5801 version "-sources.jar"))
5802 (sha256
5803 (base32
5804 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
5805 (build-system ant-build-system)
5806 (arguments
5807 `(#:tests? #f ; no tests included
5808 #:jar-name "eclipse-core-contenttype.jar"))
5809 (inputs
5810 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5811 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5812 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5813 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5814 (home-page "http://www.eclipse.org/")
5815 (synopsis "Eclipse content mechanism")
5816 (description "This package provides the Eclipse content mechanism in the
5817 @code{org.eclipse.core.contenttype} module.")
5818 (license license:epl1.0)))
5819
5820 (define-public java-eclipse-core-runtime
5821 (package
5822 (name "java-eclipse-core-runtime")
5823 (version "3.15.100")
5824 (source (origin
5825 (method url-fetch)
5826 (uri (string-append "https://repo1.maven.org/maven2/"
5827 "org/eclipse/platform/org.eclipse.core.runtime/"
5828 version "/org.eclipse.core.runtime-"
5829 version "-sources.jar"))
5830 (sha256
5831 (base32
5832 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
5833 (build-system ant-build-system)
5834 (arguments
5835 `(#:tests? #f ; no tests included
5836 #:jar-name "eclipse-core-runtime.jar"))
5837 (inputs
5838 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5839 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5840 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5841 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5842 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5843 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5844 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5845 (home-page "https://www.eclipse.org/")
5846 (synopsis "Eclipse core runtime")
5847 (description "This package provides the Eclipse core runtime with the
5848 module @code{org.eclipse.core.runtime}.")
5849 (license license:epl1.0)))
5850
5851 (define-public java-eclipse-core-filesystem
5852 (package
5853 (name "java-eclipse-core-filesystem")
5854 (version "1.6.1")
5855 (source (origin
5856 (method url-fetch)
5857 (uri (string-append "https://repo1.maven.org/maven2/"
5858 "org/eclipse/platform/org.eclipse.core.filesystem/"
5859 version "/org.eclipse.core.filesystem-"
5860 version "-sources.jar"))
5861 (sha256
5862 (base32
5863 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
5864 (build-system ant-build-system)
5865 (arguments
5866 `(#:tests? #f ; no tests included
5867 #:jar-name "eclipse-core-filesystem.jar"))
5868 (inputs
5869 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5870 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5871 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5872 (home-page "https://www.eclipse.org/")
5873 (synopsis "Eclipse core file system")
5874 (description "This package provides the Eclipse core file system with the
5875 module @code{org.eclipse.core.filesystem}.")
5876 (license license:epl1.0)))
5877
5878 (define-public java-eclipse-core-expressions
5879 (package
5880 (name "java-eclipse-core-expressions")
5881 (version "3.5.100")
5882 (source (origin
5883 (method url-fetch)
5884 (uri (string-append "https://repo1.maven.org/maven2/"
5885 "org/eclipse/platform/org.eclipse.core.expressions/"
5886 version "/org.eclipse.core.expressions-"
5887 version "-sources.jar"))
5888 (sha256
5889 (base32
5890 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
5891 (build-system ant-build-system)
5892 (arguments
5893 `(#:tests? #f ; no tests included
5894 #:jar-name "eclipse-core-expressions.jar"))
5895 (inputs
5896 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5897 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5898 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5899 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5900 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5901 (home-page "https://www.eclipse.org/")
5902 (synopsis "Eclipse core expression language")
5903 (description "This package provides the Eclipse core expression language
5904 with the @code{org.eclipse.core.expressions} module.")
5905 (license license:epl1.0)))
5906
5907 (define-public java-eclipse-core-variables
5908 (package
5909 (name "java-eclipse-core-variables")
5910 (version "3.3.0")
5911 (source (origin
5912 (method url-fetch)
5913 (uri (string-append "https://repo1.maven.org/maven2/"
5914 "org/eclipse/platform/org.eclipse.core.variables/"
5915 version "/org.eclipse.core.variables-"
5916 version "-sources.jar"))
5917 (sha256
5918 (base32
5919 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
5920 (build-system ant-build-system)
5921 (arguments
5922 `(#:tests? #f ; no tests included
5923 #:jar-name "eclipse-core-variables.jar"))
5924 (inputs
5925 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5926 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5927 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5928 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5929 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5930 (home-page "https://www.eclipse.org/platform")
5931 (synopsis "Eclipse core variables")
5932 (description "This package provides the Eclipse core variables module
5933 @code{org.eclipse.core.variables}.")
5934 (license license:epl1.0)))
5935
5936 (define-public java-eclipse-ant-core
5937 (package
5938 (name "java-eclipse-ant-core")
5939 (version "3.4.100")
5940 (source (origin
5941 (method url-fetch)
5942 (uri (string-append "https://repo1.maven.org/maven2/"
5943 "org/eclipse/platform/org.eclipse.ant.core/"
5944 version "/org.eclipse.ant.core-"
5945 version "-sources.jar"))
5946 (sha256
5947 (base32
5948 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
5949 (build-system ant-build-system)
5950 (arguments
5951 `(#:tests? #f ; no tests included
5952 #:jar-name "eclipse-ant-core.jar"))
5953 (inputs
5954 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
5955 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5956 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5957 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5958 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5959 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5960 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
5961 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5962 (home-page "https://www.eclipse.org/platform")
5963 (synopsis "Ant build tool core libraries")
5964 (description "This package provides the ant build tool core libraries with
5965 the module @code{org.eclipse.ant.core}.")
5966 (license license:epl1.0)))
5967
5968 (define-public java-eclipse-core-resources
5969 (package
5970 (name "java-eclipse-core-resources")
5971 (version "3.13.200")
5972 (source (origin
5973 (method url-fetch)
5974 (uri (string-append "https://repo1.maven.org/maven2/"
5975 "org/eclipse/platform/org.eclipse.core.resources/"
5976 version "/org.eclipse.core.resources-"
5977 version "-sources.jar"))
5978 (sha256
5979 (base32
5980 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
5981 (build-system ant-build-system)
5982 (arguments
5983 `(#:tests? #f ; no tests included
5984 #:jar-name "eclipse-core-resources.jar"))
5985 (inputs
5986 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5987 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
5988 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
5989 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
5990 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
5991 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
5992 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5993 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
5994 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
5995 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5996 (home-page "https://www.eclipse.org/")
5997 (synopsis "Eclipse core resource management")
5998 (description "This package provides the Eclipse core resource management
5999 module @code{org.eclipse.core.resources}.")
6000 (license license:epl1.0)))
6001
6002 (define-public java-eclipse-compare-core
6003 (package
6004 (name "java-eclipse-compare-core")
6005 (version "3.6.0")
6006 (source (origin
6007 (method url-fetch)
6008 (uri (string-append "https://repo1.maven.org/maven2/"
6009 "org/eclipse/platform/org.eclipse.compare.core/"
6010 version "/org.eclipse.compare.core-"
6011 version "-sources.jar"))
6012 (sha256
6013 (base32
6014 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6015 (build-system ant-build-system)
6016 (arguments
6017 `(#:tests? #f ; no tests included
6018 #:jar-name "eclipse-compare-core.jar"))
6019 (inputs
6020 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6021 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6022 ("java-eclipse-osgi" ,java-eclipse-osgi)
6023 ("java-icu4j" ,java-icu4j)))
6024 (home-page "https://www.eclipse.org/")
6025 (synopsis "Eclipse core compare support")
6026 (description "This package provides the Eclipse core compare support
6027 module @code{org.eclipse.compare.core}.")
6028 (license license:epl1.0)))
6029
6030 (define-public java-eclipse-team-core
6031 (package
6032 (name "java-eclipse-team-core")
6033 (version "3.8.0")
6034 (source (origin
6035 (method url-fetch)
6036 (uri (string-append "https://repo1.maven.org/maven2/"
6037 "org/eclipse/platform/org.eclipse.team.core/"
6038 version "/org.eclipse.team.core-"
6039 version "-sources.jar"))
6040 (sha256
6041 (base32
6042 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6043 (build-system ant-build-system)
6044 (arguments
6045 `(#:tests? #f ; no tests included
6046 #:jar-name "eclipse-team-core.jar"))
6047 (inputs
6048 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6049 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6050 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6051 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6052 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6053 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6054 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6055 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6056 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6057 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6058 (home-page "https://www.eclipse.org/platform")
6059 (synopsis "Eclipse team support core")
6060 (description "This package provides the Eclipse team support core module
6061 @code{org.eclipse.team.core}.")
6062 (license license:epl1.0)))
6063
6064 (define-public java-eclipse-core-commands
6065 (package
6066 (name "java-eclipse-core-commands")
6067 (version "3.8.1")
6068 (source (origin
6069 (method url-fetch)
6070 (uri (string-append "https://repo1.maven.org/maven2/"
6071 "org/eclipse/platform/org.eclipse.core.commands/"
6072 version "/org.eclipse.core.commands-"
6073 version "-sources.jar"))
6074 (sha256
6075 (base32
6076 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6077 (build-system ant-build-system)
6078 (arguments
6079 `(#:tests? #f ; no tests included
6080 #:jar-name "eclipse-core-commands.jar"))
6081 (inputs
6082 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6083 (home-page "https://www.eclipse.org/platform")
6084 (synopsis "Eclipse core commands")
6085 (description "This package provides Eclipse core commands in the module
6086 @code{org.eclipse.core.commands}.")
6087 (license license:epl1.0)))
6088
6089 (define-public java-eclipse-text
6090 (package
6091 (name "java-eclipse-text")
6092 (version "3.6.0")
6093 (source (origin
6094 (method url-fetch)
6095 (uri (string-append "https://repo1.maven.org/maven2/"
6096 "org/eclipse/platform/org.eclipse.text/"
6097 version "/org.eclipse.text-"
6098 version "-sources.jar"))
6099 (sha256
6100 (base32
6101 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6102 (build-system ant-build-system)
6103 (arguments
6104 `(#:tests? #f ; no tests included
6105 #:jar-name "eclipse-text.jar"
6106 #:phases
6107 (modify-phases %standard-phases
6108 ;; When creating a new category we must make sure that the new list
6109 ;; matches List<Position>. By default it seems to be too generic
6110 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6111 ;; Without this we get this error:
6112 ;;
6113 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6114 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6115 ;; [javac] fPositions.put(category, new ArrayList<>());
6116 ;; [javac] ^
6117 ;; [javac] required: String,List<Position>
6118 ;; [javac] found: String,ArrayList<Object>
6119 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6120 ;; to List<Position> by method invocation conversion
6121 ;; [javac] where K,V are type-variables:
6122 ;; [javac] K extends Object declared in interface Map
6123 ;; [javac] V extends Object declared in interface Map
6124 ;;
6125 ;; I don't know if this is a good fix. I suspect it is not, but it
6126 ;; seems to work.
6127 (add-after 'unpack 'fix-compilation-error
6128 (lambda _
6129 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6130 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6131 "Positions.put(category, new ArrayList<Position>());"))
6132 #t)))))
6133 (inputs
6134 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6135 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6136 ("java-icu4j" ,java-icu4j)))
6137 (home-page "http://www.eclipse.org/platform")
6138 (synopsis "Eclipse text library")
6139 (description "Platform Text is part of the Platform UI project and
6140 provides the basic building blocks for text and text editors within Eclipse
6141 and contributes the Eclipse default text editor.")
6142 (license license:epl1.0)))
6143
6144 (define-public java-eclipse-jdt-core
6145 (package
6146 (name "java-eclipse-jdt-core")
6147 (version "3.16.0")
6148 (source (origin
6149 (method url-fetch)
6150 (uri (string-append "https://repo1.maven.org/maven2/"
6151 "org/eclipse/jdt/org.eclipse.jdt.core/"
6152 version "/org.eclipse.jdt.core-"
6153 version "-sources.jar"))
6154 (sha256
6155 (base32
6156 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6157 (build-system ant-build-system)
6158 (arguments
6159 `(#:tests? #f ; no tests included
6160 #:jar-name "eclipse-jdt-core.jar"
6161 #:phases
6162 (modify-phases %standard-phases
6163 (add-after 'unpack 'move-sources
6164 (lambda _
6165 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6166 (for-each (lambda (file)
6167 (install-file file (string-append "../" (dirname file))))
6168 (find-files "." ".*")))
6169 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6170 #t))
6171 (add-before 'build 'copy-resources
6172 (lambda _
6173 (with-directory-excursion "src"
6174 (for-each (lambda (file)
6175 (install-file file (string-append "../build/classes/" (dirname file))))
6176 (find-files "." ".*.(props|properties|rsc)")))
6177 #t)))))
6178 (inputs
6179 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6180 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6181 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6182 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6183 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6184 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6185 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6186 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6187 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6188 ("java-eclipse-osgi" ,java-eclipse-osgi)
6189 ("java-eclipse-text" ,java-eclipse-text)))
6190 (home-page "https://www.eclipse.org/jdt")
6191 (synopsis "Java development tools core libraries")
6192 (description "This package provides the core libraries of the Eclipse Java
6193 development tools.")
6194 (license license:epl1.0)))
6195
6196 (define-public java-eclipse-jdt-compiler-apt
6197 (package
6198 (name "java-eclipse-jdt-compiler-apt")
6199 (version "1.3.400")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (string-append "https://repo1.maven.org/maven2/"
6203 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6204 version "/org.eclipse.jdt.compiler.apt-"
6205 version "-sources.jar"))
6206 (sha256
6207 (base32
6208 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6209 (build-system ant-build-system)
6210 (arguments
6211 `(#:tests? #f ; no tests included
6212 #:jar-name "eclipse-jdt-compiler-apt.jar"
6213 #:jdk ,openjdk11))
6214 (inputs
6215 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6216 (home-page "https://www.eclipse.org/jdt/apt/")
6217 (synopsis "Annotation processing tool")
6218 (description "APT stands for Annotation Processing Tool. APT provides a
6219 means for generating files and compiling new Java classes based on annotations
6220 found in your source code.")
6221 (license license:epl2.0)))
6222
6223 (define-public java-javax-mail
6224 (package
6225 (name "java-javax-mail")
6226 (version "1.5.6")
6227 (source (origin
6228 (method url-fetch)
6229 (uri (string-append "https://repo1.maven.org/maven2/"
6230 "com/sun/mail/javax.mail/"
6231 version "/javax.mail-"
6232 version "-sources.jar"))
6233 (sha256
6234 (base32
6235 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6236 (build-system ant-build-system)
6237 (arguments
6238 `(#:tests? #f ; no tests
6239 #:jar-name "javax-mail.jar"))
6240 (home-page "https://javamail.java.net")
6241 (synopsis "Reference implementation of the JavaMail API")
6242 (description
6243 "This package provides versions of the JavaMail API implementation, IMAP,
6244 SMTP, and POP3 service providers, some examples, and documentation for the
6245 JavaMail API.")
6246 ;; GPLv2 only with "classpath exception".
6247 (license license:gpl2)))
6248
6249 (define-public java-log4j-api
6250 (package
6251 (name "java-log4j-api")
6252 (version "2.4.1")
6253 (source (origin
6254 (method url-fetch)
6255 (uri (string-append "mirror://apache/logging/log4j/" version
6256 "/apache-log4j-" version "-src.tar.gz"))
6257 (sha256
6258 (base32
6259 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6260 (build-system ant-build-system)
6261 (arguments
6262 `(#:tests? #f ; tests require unpackaged software
6263 #:jar-name "log4j-api.jar"
6264 #:make-flags
6265 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6266 "/share/java"))
6267 #:phases
6268 (modify-phases %standard-phases
6269 (add-after 'unpack 'enter-dir
6270 (lambda _ (chdir "log4j-api") #t))
6271 ;; FIXME: The tests require additional software that has not been
6272 ;; packaged yet, such as
6273 ;; * org.apache.maven
6274 ;; * org.apache.felix
6275 (add-after 'enter-dir 'delete-tests
6276 (lambda _ (delete-file-recursively "src/test") #t)))))
6277 (inputs
6278 `(("java-osgi-core" ,java-osgi-core)
6279 ("java-hamcrest-core" ,java-hamcrest-core)
6280 ("java-junit" ,java-junit)))
6281 (home-page "http://logging.apache.org/log4j/2.x/")
6282 (synopsis "API module of the Log4j logging framework for Java")
6283 (description
6284 "This package provides the API module of the Log4j logging framework for
6285 Java.")
6286 (license license:asl2.0)))
6287
6288 (define-public java-log4j-core
6289 (package
6290 (inherit java-log4j-api)
6291 (name "java-log4j-core")
6292 (inputs
6293 `(("java-osgi-core" ,java-osgi-core)
6294 ("java-hamcrest-core" ,java-hamcrest-core)
6295 ("java-log4j-api" ,java-log4j-api)
6296 ("java-mail" ,java-mail)
6297 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6298 ("java-lmax-disruptor" ,java-lmax-disruptor)
6299 ("java-kafka" ,java-kafka-clients)
6300 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6301 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6302 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6303 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6304 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6305 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6306 ("java-commons-compress" ,java-commons-compress)
6307 ("java-commons-csv" ,java-commons-csv)
6308 ("java-jeromq" ,java-jeromq)
6309 ("java-junit" ,java-junit)))
6310 (native-inputs
6311 `(("hamcrest" ,java-hamcrest-all)
6312 ("java-commons-io" ,java-commons-io)
6313 ("java-commons-lang3" ,java-commons-lang3)
6314 ("slf4j" ,java-slf4j-api)))
6315 (arguments
6316 `(#:tests? #f ; tests require more dependencies
6317 #:test-dir "src/test"
6318 #:source-dir "src/main/java"
6319 #:jar-name "log4j-core.jar"
6320 #:jdk ,icedtea-8
6321 #:make-flags
6322 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6323 "/share/java"))
6324 #:phases
6325 (modify-phases %standard-phases
6326 (add-after 'unpack 'enter-dir
6327 (lambda _ (chdir "log4j-core") #t)))))
6328 (synopsis "Core component of the Log4j framework")
6329 (description "This package provides the core component of the Log4j
6330 logging framework for Java.")))
6331
6332 (define-public java-log4j-1.2-api
6333 (package
6334 (inherit java-log4j-api)
6335 (name "java-log4j-1.2-api")
6336 (arguments
6337 `(#:jar-name "java-log4j-1.2-api.jar"
6338 #:source-dir "log4j-1.2-api/src/main/java"
6339 #:jdk ,icedtea-8
6340 ;; Tests require maven-model (and other maven subprojects), which is a
6341 ;; cyclic dependency.
6342 #:tests? #f))
6343 (inputs
6344 `(("log4j-api" ,java-log4j-api)
6345 ("log4j-core" ,java-log4j-core)
6346 ("osgi-core" ,java-osgi-core)
6347 ("eclipse-osgi" ,java-eclipse-osgi)
6348 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6349
6350 (define-public java-commons-cli
6351 (package
6352 (name "java-commons-cli")
6353 (version "1.4")
6354 (source (origin
6355 (method url-fetch)
6356 (uri (string-append "mirror://apache/commons/cli/source/"
6357 "commons-cli-" version "-src.tar.gz"))
6358 (sha256
6359 (base32
6360 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6361 (build-system ant-build-system)
6362 ;; TODO: javadoc
6363 (arguments
6364 `(#:jar-name "commons-cli.jar"))
6365 (native-inputs
6366 `(("java-junit" ,java-junit)
6367 ("java-hamcrest-core" ,java-hamcrest-core)))
6368 (home-page "http://commons.apache.org/cli/")
6369 (synopsis "Command line arguments and options parsing library")
6370 (description "The Apache Commons CLI library provides an API for parsing
6371 command line options passed to programs. It is also able to print help
6372 messages detailing the options available for a command line tool.
6373
6374 Commons CLI supports different types of options:
6375
6376 @itemize
6377 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6378 @item GNU like long options (ie. du --human-readable --max-depth=1)
6379 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6380 @item Short options with value attached (ie. gcc -O2 foo.c)
6381 @item long options with single hyphen (ie. ant -projecthelp)
6382 @end itemize
6383
6384 This is a part of the Apache Commons Project.")
6385 (license license:asl2.0)))
6386
6387 (define-public java-commons-codec
6388 (package
6389 (name "java-commons-codec")
6390 (version "1.10")
6391 (source (origin
6392 (method url-fetch)
6393 (uri (string-append "mirror://apache/commons/codec/source/"
6394 "commons-codec-" version "-src.tar.gz"))
6395 (sha256
6396 (base32
6397 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6398 (build-system ant-build-system)
6399 (outputs '("out" "doc"))
6400 (arguments
6401 `(#:test-target "test"
6402 #:make-flags
6403 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6404 (junit (assoc-ref %build-inputs "java-junit")))
6405 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6406 (string-append "-Dhamcrest.jar=" hamcrest
6407 "/share/java/hamcrest-core.jar")
6408 ;; Do not append version to jar.
6409 "-Dfinal.name=commons-codec"))
6410 #:phases
6411 (modify-phases %standard-phases
6412 (add-after 'build 'build-javadoc ant-build-javadoc)
6413 (replace 'install (install-jars "dist"))
6414 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6415 (native-inputs
6416 `(("java-junit" ,java-junit)
6417 ("java-hamcrest-core" ,java-hamcrest-core)))
6418 (home-page "http://commons.apache.org/codec/")
6419 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6420 (description "The codec package contains simple encoder and decoders for
6421 various formats such as Base64 and Hexadecimal. In addition to these widely
6422 used encoders and decoders, the codec package also maintains a collection of
6423 phonetic encoding utilities.
6424
6425 This is a part of the Apache Commons Project.")
6426 (license license:asl2.0)))
6427
6428 (define-public java-commons-daemon
6429 (package
6430 (name "java-commons-daemon")
6431 (version "1.0.15")
6432 (source (origin
6433 (method url-fetch)
6434 (uri (string-append "mirror://apache/commons/daemon/source/"
6435 "commons-daemon-" version "-src.tar.gz"))
6436 (sha256
6437 (base32
6438 "0ci46kq8jpz084ccwq0mmkahcgsmh20ziclp2jf5i0djqv95gvhi"))))
6439 (build-system ant-build-system)
6440 (arguments
6441 `(#:test-target "test"
6442 #:phases
6443 (modify-phases %standard-phases
6444 (add-after 'build 'build-javadoc ant-build-javadoc)
6445 (replace 'install (install-jars "dist"))
6446 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6447 (native-inputs
6448 `(("java-junit" ,java-junit)))
6449 (home-page "http://commons.apache.org/daemon/")
6450 (synopsis "Library to launch Java applications as daemons")
6451 (description "The Daemon package from Apache Commons can be used to
6452 implement Java applications which can be launched as daemons. For example the
6453 program will be notified about a shutdown so that it can perform cleanup tasks
6454 before its process of execution is destroyed by the operation system.
6455
6456 This package contains the Java library. You will also need the actual binary
6457 for your architecture which is provided by the jsvc package.
6458
6459 This is a part of the Apache Commons Project.")
6460 (license license:asl2.0)))
6461
6462 (define-public java-javaewah
6463 (package
6464 (name "java-javaewah")
6465 (version "1.1.6")
6466 (source (origin
6467 (method url-fetch)
6468 (uri (string-append "https://github.com/lemire/javaewah/"
6469 "archive/JavaEWAH-" version ".tar.gz"))
6470 (sha256
6471 (base32
6472 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6473 (build-system ant-build-system)
6474 (arguments `(#:jar-name "javaewah.jar"))
6475 (inputs
6476 `(("java-junit" ,java-junit)
6477 ("java-hamcrest-core" ,java-hamcrest-core)))
6478 (home-page "https://github.com/lemire/javaewah")
6479 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6480 (description "This is a word-aligned compressed variant of the Java
6481 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6482 compression scheme. It can be used to implement bitmap indexes.
6483
6484 The goal of word-aligned compression is not to achieve the best compression,
6485 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6486 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6487 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6488 @code{BitSet} class by Sun).")
6489 ;; GPL2.0 derivates are explicitly allowed.
6490 (license license:asl2.0)))
6491
6492 (define-public java-slf4j-api
6493 (package
6494 (name "java-slf4j-api")
6495 (version "1.7.25")
6496 (source (origin
6497 (method url-fetch)
6498 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6499 version ".tar.gz"))
6500 (sha256
6501 (base32
6502 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6503 (modules '((guix build utils)))
6504 ;; Delete bundled jars.
6505 (snippet
6506 '(begin
6507 (for-each delete-file (find-files "." "\\.jar$"))
6508 #t))))
6509 (build-system ant-build-system)
6510 (arguments
6511 `(#:jar-name "slf4j-api.jar"
6512 #:source-dir "slf4j-api/src/main"
6513 #:test-dir "slf4j-api/src/test"
6514 #:phases
6515 (modify-phases %standard-phases
6516 (add-after 'build 'regenerate-jar
6517 (lambda _
6518 ;; pom.xml ignores these files in the jar creation process. If we don't,
6519 ;; we get the error "This code should have never made it into slf4j-api.jar"
6520 (delete-file-recursively "build/classes/org/slf4j/impl")
6521 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6522 "build/classes" ".")))
6523 (add-before 'check 'dont-test-abstract-classes
6524 (lambda _
6525 ;; abstract classes are not meant to be run with junit
6526 (substitute* "build.xml"
6527 (("<include name=\"\\*\\*/\\*Test.java\" />")
6528 (string-append "<include name=\"**/*Test.java\" />"
6529 "<exclude name=\"**/MultithreadedInitializationTest"
6530 ".java\" />")))
6531 #t)))))
6532 (inputs
6533 `(("java-junit" ,java-junit)
6534 ("java-hamcrest-core" ,java-hamcrest-core)))
6535 (home-page "https://www.slf4j.org/")
6536 (synopsis "Simple logging facade for Java")
6537 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6538 simple facade or abstraction for various logging
6539 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6540 allowing the end user to plug in the desired logging framework at deployment
6541 time.")
6542 (license license:expat)))
6543
6544 (define java-slf4j-api-bootstrap
6545 (package
6546 (inherit java-slf4j-api)
6547 (name "java-slf4j-api-bootstrap")
6548 (inputs `())
6549 (arguments
6550 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6551 ((#:tests? _ #f) #f)))))
6552
6553 (define-public java-slf4j-simple
6554 (package
6555 (name "java-slf4j-simple")
6556 (version "1.7.25")
6557 (source (package-source java-slf4j-api))
6558 (build-system ant-build-system)
6559 (arguments
6560 `(#:jar-name "slf4j-simple.jar"
6561 #:source-dir "slf4j-simple/src/main"
6562 #:test-dir "slf4j-simple/src/test"
6563 #:phases
6564 (modify-phases %standard-phases
6565 ;; The tests need some test classes from slf4j-api
6566 (add-before 'check 'build-slf4j-api-test-helpers
6567 (lambda _
6568 ;; Add current dir to CLASSPATH ...
6569 (setenv "CLASSPATH"
6570 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6571 ;; ... and build test helper classes here:
6572 (apply invoke
6573 `("javac" "-d" "."
6574 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6575 (inputs
6576 `(("java-junit" ,java-junit)
6577 ("java-hamcrest-core" ,java-hamcrest-core)
6578 ("java-slf4j-api" ,java-slf4j-api)))
6579 (home-page "https://www.slf4j.org/")
6580 (synopsis "Simple implementation of simple logging facade for Java")
6581 (description "SLF4J binding for the Simple implementation, which outputs
6582 all events to System.err. Only messages of level INFO and higher are
6583 printed.")
6584 (license license:expat)))
6585
6586 (define-public antlr2
6587 (package
6588 (name "antlr2")
6589 (version "2.7.7")
6590 (source (origin
6591 (method url-fetch)
6592 (uri (string-append "http://www.antlr2.org/download/antlr-"
6593 version ".tar.gz"))
6594 (sha256
6595 (base32
6596 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6597 (modules '((guix build utils)))
6598 (snippet
6599 '(begin
6600 (delete-file "antlr.jar")
6601 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6602 (("#include <map>")
6603 (string-append
6604 "#include <map>\n"
6605 "#define EOF (-1)\n"
6606 "#include <strings.h>")))
6607 (substitute* "configure"
6608 (("/bin/sh") "sh"))
6609 #t))))
6610 (build-system gnu-build-system)
6611 (arguments
6612 `(#:tests? #f ; no test target
6613 #:imported-modules ((guix build ant-build-system)
6614 (guix build syscalls)
6615 ,@%gnu-build-system-modules)
6616 #:modules (((guix build ant-build-system) #:prefix ant:)
6617 (guix build gnu-build-system)
6618 (guix build utils))
6619 #:phases
6620 (modify-phases %standard-phases
6621 (add-after 'install 'strip-jar-timestamps
6622 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6623 (add-before 'configure 'fix-timestamp
6624 (lambda _
6625 (substitute* "configure"
6626 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6627 #t))
6628 (add-after 'configure 'fix-bin-ls
6629 (lambda _
6630 (substitute* (find-files "." "Makefile")
6631 (("/bin/ls") "ls"))
6632 #t)))))
6633 (native-inputs
6634 `(("which" ,which)
6635 ("zip" ,zip)
6636 ("java" ,icedtea "jdk")))
6637 (inputs
6638 `(("java" ,icedtea)))
6639 (home-page "http://www.antlr2.org")
6640 (synopsis "Framework for constructing recognizers, compilers, and translators")
6641 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6642 is a language tool that provides a framework for constructing recognizers,
6643 compilers, and translators from grammatical descriptions containing Java, C#,
6644 C++, or Python actions. ANTLR provides excellent support for tree construction,
6645 tree walking, and translation.")
6646 (license license:public-domain)))
6647
6648 (define-public java-stringtemplate-3
6649 (package
6650 (name "java-stringtemplate")
6651 (version "3.2.1")
6652 (source (origin
6653 (method url-fetch)
6654 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6655 "gh-pages/download/stringtemplate-"
6656 version ".tar.gz"))
6657 (sha256
6658 (base32
6659 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6660 (build-system ant-build-system)
6661 (arguments
6662 `(#:jar-name (string-append ,name "-" ,version ".jar")
6663 #:test-dir "test"
6664 #:modules ((guix build ant-build-system)
6665 (guix build utils)
6666 (srfi srfi-1))
6667 #:phases
6668 (modify-phases %standard-phases
6669 (add-before 'check 'fix-tests
6670 (lambda _
6671 (substitute* "build.xml"
6672 (("\\$\\{test.home\\}/java")
6673 "${test.home}/org"))
6674 #t))
6675 (add-before 'build 'generate-grammar
6676 (lambda _
6677 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6678 (for-each (lambda (file)
6679 (format #t "~a\n" file)
6680 (invoke "antlr" file))
6681 '("template.g" "angle.bracket.template.g" "action.g"
6682 "eval.g" "group.g" "interface.g")))
6683 #t)))))
6684 (native-inputs
6685 `(("antlr" ,antlr2)
6686 ("java-junit" ,java-junit)))
6687 (home-page "http://www.stringtemplate.org")
6688 (synopsis "Template engine to generate formatted text output")
6689 (description "StringTemplate is a java template engine (with ports for C#,
6690 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6691 or any other formatted text output. StringTemplate is particularly good at
6692 code generators, multiple site skins, and internationalization / localization.
6693 StringTemplate also powers ANTLR.")
6694 (license license:bsd-3)))
6695
6696 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6697 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6698 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6699 ;; of antlr3 at runtime.
6700 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6701 ;; This version of ST4 is sufficient for the latest antlr3.
6702 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6703 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6704 ;; against the latest ST4.
6705 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6706 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6707 ;; only grammar files with the antlr2 syntax.
6708 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6709
6710 (define-public java-stringtemplate
6711 (package (inherit java-stringtemplate-3)
6712 (name "java-stringtemplate")
6713 (version "4.0.8")
6714 (source (origin
6715 (method url-fetch)
6716 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6717 version ".tar.gz"))
6718 (file-name (string-append name "-" version ".tar.gz"))
6719 (sha256
6720 (base32
6721 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6722 (build-system ant-build-system)
6723 (arguments
6724 `(#:jar-name (string-append ,name "-" ,version ".jar")
6725 #:tests? #f ; FIXME: tests fail for unknown reasons
6726 #:test-dir "test"
6727 #:modules ((guix build ant-build-system)
6728 (guix build utils)
6729 (srfi srfi-1))
6730 #:phases
6731 (modify-phases %standard-phases
6732 (add-before 'check 'fix-test-target
6733 (lambda _
6734 (substitute* "build.xml"
6735 (("\\$\\{test.home\\}/java") "${test.home}/")
6736 (("\\*Test.java") "Test*.java"))
6737 #t))
6738 (add-before 'build 'generate-grammar
6739 (lambda _
6740 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
6741 (for-each (lambda (file)
6742 (format #t "~a\n" file)
6743 (invoke "antlr3" file))
6744 '("STParser.g" "Group.g" "CodeGenerator.g")))
6745 #t)))))
6746 (inputs
6747 `(("antlr3" ,antlr3-bootstrap)
6748 ("antlr2" ,antlr2)
6749 ("java-stringtemplate" ,java-stringtemplate-3)
6750 ("java-junit" ,java-junit)))))
6751
6752 (define java-stringtemplate-4.0.6
6753 (package (inherit java-stringtemplate)
6754 (name "java-stringtemplate")
6755 (version "4.0.6")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
6759 version ".tar.gz"))
6760 (file-name (string-append name "-" version ".tar.gz"))
6761 (sha256
6762 (base32
6763 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
6764 (inputs
6765 `(("antlr3" ,antlr3-3.3)
6766 ("antlr2" ,antlr2)
6767 ("java-stringtemplate" ,java-stringtemplate-3)))))
6768
6769 (define-public antlr3
6770 (package
6771 (name "antlr3")
6772 (version "3.5.2")
6773 (source (origin
6774 (method url-fetch)
6775 (uri (string-append "https://github.com/antlr/antlr3/archive/"
6776 version ".tar.gz"))
6777 (file-name (string-append name "-" version ".tar.gz"))
6778 (sha256
6779 (base32
6780 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
6781 (build-system ant-build-system)
6782 (arguments
6783 `(#:jar-name (string-append ,name "-" ,version ".jar")
6784 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
6785 #:tests? #f
6786 #:phases
6787 (modify-phases %standard-phases
6788 (add-after 'install 'bin-install
6789 (lambda* (#:key inputs outputs #:allow-other-keys)
6790 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
6791 (bin (string-append (assoc-ref outputs "out") "/bin")))
6792 (mkdir-p bin)
6793 (with-output-to-file (string-append bin "/antlr3")
6794 (lambda _
6795 (display
6796 (string-append "#!" (which "sh") "\n"
6797 "java -cp " jar "/" ,name "-" ,version ".jar:"
6798 (string-concatenate
6799 (find-files (assoc-ref inputs "stringtemplate")
6800 ".*\\.jar"))
6801 ":"
6802 (string-concatenate
6803 (find-files (assoc-ref inputs "stringtemplate4")
6804 ".*\\.jar"))
6805 ":"
6806 (string-concatenate
6807 (find-files (string-append
6808 (assoc-ref inputs "antlr")
6809 "/lib")
6810 ".*\\.jar"))
6811 " org.antlr.Tool $*"))))
6812 (chmod (string-append bin "/antlr3") #o755))
6813 #t))
6814 (add-before 'build 'generate-grammar
6815 (lambda _
6816 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
6817 (for-each (lambda (file)
6818 (display file)
6819 (newline)
6820 (invoke "antlr3" file))
6821 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
6822 "AssignTokenTypesWalker.g"
6823 "ActionTranslator.g" "TreeToNFAConverter.g"
6824 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
6825 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
6826 (substitute* "ANTLRParser.java"
6827 (("public Object getTree") "public GrammarAST getTree"))
6828 (substitute* "ANTLRv3Parser.java"
6829 (("public Object getTree") "public CommonTree getTree"))
6830 (chdir "../../../../../java")
6831 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
6832 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
6833 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
6834 (substitute* "org/antlr/tool/ErrorManager.java"
6835 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
6836 (chdir "../../../..")
6837 #t))
6838 (add-before 'build 'fix-build-xml
6839 (lambda _
6840 (substitute* "build.xml"
6841 (("target name=\"compile\">")
6842 "target name=\"compile\">
6843 <copy todir=\"${classes.dir}\">
6844 <fileset dir=\"tool/src/main/resources\">
6845 <include name=\"**/*.stg\"/>
6846 <include name=\"**/*.st\"/>
6847 <include name=\"**/*.sti\"/>
6848 <include name=\"**/STLexer.tokens\"/>
6849 </fileset>
6850 </copy>"))
6851 #t)))))
6852 (native-inputs
6853 `(("antlr" ,antlr2)
6854 ("antlr3" ,antlr3-bootstrap)))
6855 (inputs
6856 `(("junit" ,java-junit)
6857 ("stringtemplate" ,java-stringtemplate-3)
6858 ("stringtemplate4" ,java-stringtemplate)))
6859 (propagated-inputs
6860 `(("stringtemplate" ,java-stringtemplate-3)
6861 ("antlr" ,antlr2)
6862 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
6863 (home-page "http://www.antlr3.org")
6864 (synopsis "Framework for constructing recognizers, compilers, and translators")
6865 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6866 is a language tool that provides a framework for constructing recognizers,
6867 compilers, and translators from grammatical descriptions containing Java, C#,
6868 C++, or Python actions. ANTLR provides excellent support for tree construction,
6869 tree walking, and translation.")
6870 (license license:bsd-3)))
6871
6872 (define antlr3-bootstrap
6873 (package
6874 (inherit antlr3)
6875 (name "antlr3-bootstrap")
6876 (native-inputs
6877 `(("antlr" ,antlr2)
6878 ("antlr3" ,antlr3-3.3)))
6879 (inputs
6880 `(("junit" ,java-junit)))))
6881
6882 (define antlr3-3.3
6883 (package
6884 (inherit antlr3)
6885 (name "antlr3")
6886 (version "3.3")
6887 (source (origin
6888 (method url-fetch)
6889 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6890 "gh-pages/download/antlr-"
6891 version ".tar.gz"))
6892 (sha256
6893 (base32
6894 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
6895 (patches
6896 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
6897 (arguments
6898 `(#:jar-name (string-append ,name "-" ,version ".jar")
6899 #:source-dir (string-join '("tool/src/main/java"
6900 "runtime/Java/src/main/java"
6901 "tool/src/main/antlr2"
6902 "tool/src/main/antlr3")
6903 ":")
6904 #:tests? #f ; FIXME: tests seem to require maven plugin
6905 #:modules ((guix build ant-build-system)
6906 (guix build utils)
6907 (srfi srfi-1))
6908 #:phases
6909 (modify-phases %standard-phases
6910 (add-after 'install 'bin-install
6911 (lambda* (#:key inputs outputs #:allow-other-keys)
6912 (let* ((out (assoc-ref outputs "out"))
6913 (jar (string-append out "/share/java"))
6914 (bin (string-append out "/bin")))
6915 (mkdir-p bin)
6916 (with-output-to-file (string-append bin "/antlr3")
6917 (lambda _
6918 (display
6919 (string-append
6920 "#!" (which "sh") "\n"
6921 "java -cp " jar "/antlr3-3.3.jar:"
6922 (string-join
6923 (append (find-files (assoc-ref inputs "java-stringtemplate")
6924 ".*\\.jar$")
6925 (find-files (string-append (assoc-ref inputs "antlr")
6926 "/lib")
6927 ".*\\.jar$"))
6928 ":")
6929 " org.antlr.Tool $*"))))
6930 (chmod (string-append bin "/antlr3") #o755)
6931 #t)))
6932 (add-before 'build 'generate-grammar
6933 (lambda _
6934 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
6935 (("import org.antlr.grammar.v2.\\*;")
6936 "import org.antlr.grammar.v2.*;\n
6937 import org.antlr.grammar.v2.TreeToNFAConverter;\n
6938 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
6939 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
6940 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
6941 (for-each (lambda (file)
6942 (format #t "~a\n" file)
6943 (invoke "antlr" file))
6944 '("antlr.g" "antlr.print.g" "assign.types.g"
6945 "buildnfa.g" "codegen.g" "define.g")))
6946 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
6947 (for-each (lambda (file)
6948 (format #t "~a\n" file)
6949 (invoke "antlr3" file))
6950 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
6951 "ANTLRv3Tree.g")))
6952 #t))
6953 (add-before 'build 'fix-build-xml
6954 (lambda _
6955 (substitute* "build.xml"
6956 (("target name=\"compile\">")
6957 "target name=\"compile\">
6958 <copy todir=\"${classes.dir}\">
6959 <fileset dir=\"tool/src/main/resources\">
6960 <include name=\"**/*.stg\"/>
6961 <include name=\"**/*.st\"/>
6962 <include name=\"**/*.sti\"/>
6963 <include name=\"**/STLexer.tokens\"/>
6964 </fileset>
6965 </copy>"))
6966 #t)))))
6967 (native-inputs
6968 `(("antlr" ,antlr2)
6969 ("antlr3" ,antlr3-3.1)))
6970 (inputs
6971 `(("junit" ,java-junit)))
6972 (propagated-inputs
6973 `(("java-stringtemplate" ,java-stringtemplate-3)
6974 ("antlr" ,antlr2)
6975 ("antlr3" ,antlr3-3.1)))))
6976
6977 (define-public antlr3-3.1
6978 (package
6979 (inherit antlr3)
6980 (version "3.1")
6981 (source (origin
6982 (method url-fetch)
6983 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
6984 "gh-pages/download/antlr-"
6985 version ".tar.gz"))
6986 (sha256
6987 (base32
6988 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
6989 (patches
6990 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
6991 (arguments
6992 `(#:jar-name (string-append "antlr3-" ,version ".jar")
6993 #:source-dir "src:runtime/Java/src"
6994 #:tests? #f
6995 #:phases
6996 (modify-phases %standard-phases
6997 (add-after 'install 'bin-install
6998 (lambda* (#:key inputs outputs #:allow-other-keys)
6999 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7000 (bin (string-append (assoc-ref outputs "out") "/bin")))
7001 (mkdir-p bin)
7002 (with-output-to-file (string-append bin "/antlr3")
7003 (lambda _
7004 (display
7005 (string-append "#!" (which "sh") "\n"
7006 "java -cp " jar "/antlr3-3.1.jar:"
7007 (string-concatenate
7008 (find-files (assoc-ref inputs "stringtemplate")
7009 ".*\\.jar"))
7010 ":"
7011 (string-concatenate
7012 (find-files (string-append
7013 (assoc-ref inputs "antlr")
7014 "/lib")
7015 ".*\\.jar"))
7016 " org.antlr.Tool $*"))))
7017 (chmod (string-append bin "/antlr3") #o755))
7018 #t))
7019 (add-before 'build 'generate-grammar
7020 (lambda _
7021 (let ((dir "src/org/antlr/tool/"))
7022 (for-each (lambda (file)
7023 (display file)
7024 (newline)
7025 (invoke "antlr" "-o" dir (string-append dir file)))
7026 '("antlr.g" "antlr.print.g" "assign.types.g"
7027 "buildnfa.g" "define.g")))
7028 (format #t "codegen.g\n")
7029 (invoke "antlr" "-o" "src/org/antlr/codegen"
7030 "src/org/antlr/codegen/codegen.g")
7031 #t))
7032 (add-before 'build 'fix-build-xml
7033 (lambda _
7034 (substitute* "build.xml"
7035 (("target name=\"compile\">")
7036 "target name=\"compile\">
7037 <copy todir=\"${classes.dir}\">
7038 <fileset dir=\"src\">
7039 <include name=\"**/*.stg\"/>
7040 <include name=\"**/*.st\"/>
7041 <include name=\"**/*.sti\"/>
7042 <include name=\"**/STLexer.tokens\"/>
7043 </fileset>
7044 </copy>"))
7045 #t)))))
7046 (native-inputs
7047 `(("antlr" ,antlr2)))
7048 (inputs
7049 `(("junit" ,java-junit)))
7050 (propagated-inputs
7051 `(("stringtemplate" ,java-stringtemplate-3)))))
7052
7053 (define-public java-commons-cli-1.2
7054 ;; This is a bootstrap dependency for Maven2.
7055 (package
7056 (inherit java-commons-cli)
7057 (version "1.2")
7058 (source (origin
7059 (method url-fetch)
7060 (uri (string-append "mirror://apache/commons/cli/source/"
7061 "commons-cli-" version "-src.tar.gz"))
7062 (sha256
7063 (base32
7064 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7065 (arguments
7066 `(#:jar-name "commons-cli.jar"
7067 #:phases
7068 (modify-phases %standard-phases
7069 (add-before 'check 'fix-build-xml
7070 (lambda* (#:key inputs #:allow-other-keys)
7071 (substitute* "build.xml"
7072 (("dir=\"\\$\\{test.home\\}/java\"")
7073 "dir=\"${test.home}\""))
7074 #t)))))
7075 (native-inputs
7076 `(("java-junit" ,java-junit)))))
7077
7078 (define-public java-microemulator-cldc
7079 (package
7080 (name "java-microemulator-cldc")
7081 (version "2.0.4")
7082 (source (origin
7083 (method url-fetch)
7084 (uri (string-append "https://github.com/barteo/microemu/archive/"
7085 "microemulator_"
7086 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7087 version)
7088 ".tar.gz"))
7089 (file-name (string-append name "-" version ".tar.gz"))
7090 (sha256
7091 (base32
7092 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7093 (build-system ant-build-system)
7094 (arguments
7095 `(#:jar-name "microemulator-cldc.jar"
7096 #:source-dir "microemu-cldc/src/main/java"
7097 #:tests? #f)); Requires even older software
7098 (home-page "https://github.com/barteo/microemu")
7099 (synopsis "J2ME CLDC emulator")
7100 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7101 Emulator. It allows to demonstrate MIDlet based applications in web browser
7102 applet and can be run as a standalone java application.")
7103 (license (list license:asl2.0
7104 ;; or altenatively:
7105 license:lgpl2.1+))))
7106
7107 (define-public java-datanucleus-javax-persistence
7108 (package
7109 (name "java-datanucleus-javax-persistence")
7110 (version "2.2.0")
7111 (source (origin
7112 (method url-fetch)
7113 (uri (string-append "https://github.com/datanucleus/"
7114 "javax.persistence/archive/javax.persistence-"
7115 version "-release.tar.gz"))
7116 (sha256
7117 (base32
7118 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7119 (build-system ant-build-system)
7120 (arguments
7121 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7122 #:jdk ,icedtea-8
7123 #:source-dir "src/main/java"
7124 #:tests? #f)); no tests
7125 (home-page "https://github.com/datanucleus/javax.persistence")
7126 (synopsis "JPA API")
7127 (description "This package contains a clean definition of JPA API intended
7128 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7129 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7130 used to generate this API.")
7131 (license (list license:edl1.0 license:epl1.0))))
7132
7133 (define-public java-osgi-cmpn
7134 (package
7135 (name "java-osgi-cmpn")
7136 (version "6.0.0")
7137 (source (origin
7138 (method url-fetch)
7139 (uri (string-append "http://central.maven.org/maven2/"
7140 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7141 version "-sources.jar"))
7142 (sha256
7143 (base32
7144 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7145 (build-system ant-build-system)
7146 (arguments
7147 `(#:jar-name "osgi-cmpn.jar"
7148 #:tests? #f)); no tests
7149 (inputs
7150 `(("annotation" ,java-osgi-annotation)
7151 ("core" ,java-osgi-core)
7152 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7153 ("microemulator" ,java-microemulator-cldc)
7154 ("servlet" ,java-classpathx-servletapi)))
7155 (home-page "https://www.osgi.org")
7156 (synopsis "Compendium specification module of OSGi framework")
7157 (description
7158 "OSGi, for Open Services Gateway initiative framework, is a module system
7159 and service platform for the Java programming language. This package contains
7160 the compendium specification module, providing interfaces and classes for use
7161 in compiling bundles.")
7162 (license license:asl2.0)))
7163
7164 (define-public java-osgi-service-component-annotations
7165 (package
7166 (name "java-osgi-service-component-annotations")
7167 (version "1.3.0")
7168 (source (origin
7169 (method url-fetch)
7170 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7171 "org.osgi.service.component.annotations/"
7172 version "/org.osgi.service.component.annotations-"
7173 version "-sources.jar"))
7174 (sha256
7175 (base32
7176 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7177 (build-system ant-build-system)
7178 (arguments
7179 `(#:jar-name "osgi-service-component-annotations.jar"
7180 #:tests? #f)); no tests
7181 (inputs
7182 `(("annotation" ,java-osgi-annotation)))
7183 (home-page "https://www.osgi.org")
7184 (synopsis "Support annotations for osgi-service-component")
7185 (description
7186 "OSGi, for Open Services Gateway initiative framework, is a module system
7187 and service platform for the Java programming language. This package contains
7188 the support annotations for osgi-service-component.")
7189 (license license:asl2.0)))
7190
7191 (define-public java-osgi-dto
7192 (package
7193 (name "java-osgi-dto")
7194 (version "1.0.0")
7195 (source (origin
7196 (method url-fetch)
7197 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7198 "org.osgi.dto/" version "/org.osgi.dto-"
7199 version "-sources.jar"))
7200 (sha256
7201 (base32
7202 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7203 (build-system ant-build-system)
7204 (arguments
7205 `(#:jar-name "osgi-dto.jar"
7206 #:tests? #f)); no tests
7207 (inputs
7208 `(("annotation" ,java-osgi-annotation)))
7209 (home-page "https://www.osgi.org")
7210 (synopsis "Data Transfer Objects")
7211 (description
7212 "OSGi, for Open Services Gateway initiative framework, is a module system
7213 and service platform for the Java programming language. This package contains
7214 the Data Transfer Objects. It is easily serializable having only public fields
7215 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7216 Map and array aggregates may also be used. The aggregates must only hold
7217 objects of the listed types or aggregates.")
7218 (license license:asl2.0)))
7219
7220 (define-public java-osgi-resource
7221 (package
7222 (name "java-osgi-resource")
7223 (version "1.0.0")
7224 (source (origin
7225 (method url-fetch)
7226 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7227 "org.osgi.resource/"
7228 version "/org.osgi.resource-"
7229 version "-sources.jar"))
7230 (sha256
7231 (base32
7232 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7233 (build-system ant-build-system)
7234 (arguments
7235 `(#:jar-name "osgi-resource.jar"
7236 #:tests? #f)); no tests
7237 (inputs
7238 `(("annotation" ,java-osgi-annotation)
7239 ("dto" ,java-osgi-dto)))
7240 (home-page "https://www.osgi.org")
7241 (synopsis "OSGI Resource")
7242 (description
7243 "OSGi, for Open Services Gateway initiative framework, is a module system
7244 and service platform for the Java programming language. This package contains
7245 the definition of common types in osgi packages.")
7246 (license license:asl2.0)))
7247
7248 (define-public java-osgi-namespace-contract
7249 (package
7250 (name "java-osgi-namespace-contract")
7251 (version "1.0.0")
7252 (source (origin
7253 (method url-fetch)
7254 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7255 "org.osgi.namespace.contract/"
7256 version "/org.osgi.namespace.contract-"
7257 version "-sources.jar"))
7258 (sha256
7259 (base32
7260 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7261 (build-system ant-build-system)
7262 (inputs
7263 `(("resource" ,java-osgi-resource)
7264 ("annotation" ,java-osgi-annotation)))
7265 (arguments
7266 `(#:jar-name "osgi-namespace-contract.jar"
7267 #:tests? #f)); no tests
7268 (home-page "https://www.osgi.org")
7269 (synopsis "Contract Capability and Requirement Namespace")
7270 (description
7271 "OSGi, for Open Services Gateway initiative framework, is a module system
7272 and service platform for the Java programming language. This package contains
7273 the names for the attributes and directives for a namespace with contracts.")
7274 (license license:asl2.0)))
7275
7276 (define-public java-osgi-namespace-extender
7277 (package
7278 (name "java-osgi-namespace-extender")
7279 (version "1.0.1")
7280 (source (origin
7281 (method url-fetch)
7282 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7283 "org.osgi.namespace.extender/"
7284 version "/org.osgi.namespace.extender-"
7285 version "-sources.jar"))
7286 (sha256
7287 (base32
7288 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7289 (build-system ant-build-system)
7290 (inputs
7291 `(("resource" ,java-osgi-resource)
7292 ("annotation" ,java-osgi-annotation)))
7293 (arguments
7294 `(#:jar-name "osgi-namespace-extendent.jar"
7295 #:tests? #f)); no tests
7296 (home-page "https://www.osgi.org")
7297 (synopsis "Extender Capability and Requirement Namespace")
7298 (description
7299 "OSGi, for Open Services Gateway initiative framework, is a module system
7300 and service platform for the Java programming language. This package contains
7301 the names for the attributes and directives for an extender namespace.")
7302 (license license:asl2.0)))
7303
7304 (define-public java-osgi-namespace-service
7305 (package
7306 (name "java-osgi-namespace-service")
7307 (version "1.0.0")
7308 (source (origin
7309 (method url-fetch)
7310 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7311 "org.osgi.namespace.service/"
7312 version "/org.osgi.namespace.service-"
7313 version "-sources.jar"))
7314 (sha256
7315 (base32
7316 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7317 (build-system ant-build-system)
7318 (inputs
7319 `(("resource" ,java-osgi-resource)
7320 ("annotation" ,java-osgi-annotation)))
7321 (arguments
7322 `(#:jar-name "osgi-namespace-service.jar"
7323 #:tests? #f)); no tests
7324 (home-page "https://www.osgi.org")
7325 (synopsis "Service Capability and Requirement Namespace")
7326 (description
7327 "OSGi, for Open Services Gateway initiative framework, is a module system
7328 and service platform for the Java programming language. This package contains
7329 the names for the attributes and directives for a service namespace.")
7330 (license license:asl2.0)))
7331
7332 (define-public java-osgi-util-function
7333 (package
7334 (name "java-osgi-util-function")
7335 (version "1.0.0")
7336 (source (origin
7337 (method url-fetch)
7338 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7339 "org.osgi.util.function/"
7340 version "/org.osgi.util.function-"
7341 version "-sources.jar"))
7342 (sha256
7343 (base32
7344 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7345 (build-system ant-build-system)
7346 (arguments
7347 `(#:jar-name "osgi-util-function.jar"
7348 #:tests? #f)); no tests
7349 (inputs
7350 `(("annotation" ,java-osgi-annotation)))
7351 (home-page "https://www.osgi.org")
7352 (synopsis "OSGI Util Function")
7353 (description
7354 "OSGi, for Open Services Gateway initiative framework, is a module system
7355 and service platform for the Java programming language. This package contains
7356 an interface for a function that accepts a single argument and produces a result.")
7357 (license license:asl2.0)))
7358
7359 (define-public java-osgi-util-promise
7360 (package
7361 (name "java-osgi-util-promise")
7362 (version "1.0.0")
7363 (source (origin
7364 (method url-fetch)
7365 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7366 "org.osgi.util.promise/"
7367 version "/org.osgi.util.promise-"
7368 version "-sources.jar"))
7369 (sha256
7370 (base32
7371 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7372 (build-system ant-build-system)
7373 (arguments
7374 `(#:jar-name "osgi-util-promise.jar"
7375 #:tests? #f)); no tests
7376 (inputs
7377 `(("annotation" ,java-osgi-annotation)
7378 ("function" ,java-osgi-util-function)))
7379 (home-page "https://www.osgi.org")
7380 (synopsis "Promise of a value")
7381 (description
7382 "OSGi, for Open Services Gateway initiative framework, is a module system
7383 and service platform for the Java programming language. This package contains
7384 an interface and utilitary classes for promises. A Promise represents a future
7385 value. It handles the interactions for asynchronous processing.")
7386 (license license:asl2.0)))
7387
7388 (define-public java-osgi-service-metatype-annotations
7389 (package
7390 (name "java-osgi-service-metatype-annotations")
7391 (version "1.3.0")
7392 (source (origin
7393 (method url-fetch)
7394 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7395 "org.osgi.service.metatype.annotations/"
7396 version "/org.osgi.service.metatype.annotations-"
7397 version "-sources.jar"))
7398 (sha256
7399 (base32
7400 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7401 (build-system ant-build-system)
7402 (arguments
7403 `(#:jar-name "osgi-service-metatype-annotations.jar"
7404 #:tests? #f)); no tests
7405 (inputs
7406 `(("annotation" ,java-osgi-annotation)))
7407 (home-page "https://www.osgi.org")
7408 (synopsis "Support annotations for metatype")
7409 (description
7410 "OSGi, for Open Services Gateway initiative framework, is a module system
7411 and service platform for the Java programming language. This package contains
7412 the support annotations for metatype.")
7413 (license license:asl2.0)))
7414
7415 (define-public java-osgi-service-repository
7416 (package
7417 (name "java-osgi-service-repository")
7418 (version "1.1.0")
7419 (source (origin
7420 (method url-fetch)
7421 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7422 "org.osgi.service.repository/"
7423 version "/org.osgi.service.repository-"
7424 version "-sources.jar"))
7425 (sha256
7426 (base32
7427 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7428 (build-system ant-build-system)
7429 (arguments
7430 `(#:jar-name "osgi-service-repository.jar"
7431 #:tests? #f)); no tests
7432 (inputs
7433 `(("annotation" ,java-osgi-annotation)
7434 ("promise" ,java-osgi-util-promise)
7435 ("resource" ,java-osgi-resource)))
7436 (home-page "https://www.osgi.org")
7437 (synopsis "OSGI service repository")
7438 (description
7439 "OSGi, for Open Services Gateway initiative framework, is a module system
7440 and service platform for the Java programming language. This package contains
7441 a repository service that contains resources.")
7442 (license license:asl2.0)))
7443
7444 (define-public java-osgi-framework
7445 (package
7446 (name "java-osgi-framework")
7447 (version "1.8.0")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7451 "org.osgi.framework/" version "/org.osgi.framework-"
7452 version "-sources.jar"))
7453 (sha256
7454 (base32
7455 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7456 (build-system ant-build-system)
7457 (arguments
7458 `(#:jar-name "osgi-framework.jar"
7459 #:tests? #f)); no tests
7460 (inputs
7461 `(("annotation" ,java-osgi-annotation)
7462 ("resource" ,java-osgi-resource)
7463 ("dto" ,java-osgi-dto)))
7464 (home-page "https://www.osgi.org")
7465 (synopsis "OSGi framework")
7466 (description
7467 "OSGi, for Open Services Gateway initiative framework, is a module system
7468 and service platform for the Java programming language.")
7469 (license license:asl2.0)))
7470
7471 (define-public java-osgi-service-log
7472 (package
7473 (name "java-osgi-service-log")
7474 (version "1.3.0")
7475 (source (origin
7476 (method url-fetch)
7477 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7478 "org.osgi.service.log/"
7479 version "/org.osgi.service.log-"
7480 version "-sources.jar"))
7481 (sha256
7482 (base32
7483 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7484 (build-system ant-build-system)
7485 (arguments
7486 `(#:jar-name "osgi-service-log.jar"
7487 #:tests? #f)); no tests
7488 (inputs
7489 `(("java-osgi-framework" ,java-osgi-framework)))
7490 (home-page "https://www.osgi.org")
7491 (synopsis "Provides methods for bundles to write messages to the log")
7492 (description
7493 "OSGi, for Open Services Gateway initiative framework, is a module system
7494 and service platform for the Java programming language. This package contains
7495 the log service.")
7496 (license license:asl2.0)))
7497
7498 (define-public java-osgi-service-jdbc
7499 (package
7500 (name "java-osgi-service-jdbc")
7501 (version "1.0.0")
7502 (source (origin
7503 (method url-fetch)
7504 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7505 "org.osgi.service.jdbc/"
7506 version "/org.osgi.service.jdbc-"
7507 version "-sources.jar"))
7508 (sha256
7509 (base32
7510 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7511 (build-system ant-build-system)
7512 (arguments
7513 `(#:jar-name "osgi-service-jdbc.jar"
7514 #:tests? #f)); no tests
7515 (home-page "https://www.osgi.org")
7516 (synopsis "Factory for JDBC connection factories")
7517 (description
7518 "OSGi, for Open Services Gateway initiative framework, is a module system
7519 and service platform for the Java programming language. This package contains
7520 a factory for JDBC connection factories. There are 3 preferred connection
7521 factories for getting JDBC connections:
7522
7523 @itemize
7524 @item @code{javax.sql.DataSource};
7525 @item @code{javax.sql.ConnectionPoolDataSource};
7526 @item @code{javax.sql.XADataSource}.
7527 @end itemize")
7528 (license license:asl2.0)))
7529
7530 (define-public java-osgi-service-resolver
7531 (package
7532 (name "java-osgi-service-resolver")
7533 (version "1.0.1")
7534 (source (origin
7535 (method url-fetch)
7536 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7537 "org.osgi.service.resolver/"
7538 version "/org.osgi.service.resolver-"
7539 version "-sources.jar"))
7540 (sha256
7541 (base32
7542 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7543 (build-system ant-build-system)
7544 (arguments
7545 `(#:jar-name "osgi-service-resolver.jar"
7546 #:tests? #f)); no tests
7547 (inputs
7548 `(("annotation" ,java-osgi-annotation)
7549 ("resource" ,java-osgi-resource)))
7550 (home-page "https://www.osgi.org")
7551 (synopsis "OSGI Resolver service")
7552 (description
7553 "OSGi, for Open Services Gateway initiative framework, is a module system
7554 and service platform for the Java programming language. This package contains
7555 a resolver service that resolves the specified resources in the context supplied
7556 by the caller.")
7557 (license license:asl2.0)))
7558
7559 (define-public java-osgi-util-tracker
7560 (package
7561 (name "java-osgi-util-tracker")
7562 (version "1.5.1")
7563 (source (origin
7564 (method url-fetch)
7565 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7566 "org.osgi.util.tracker/"
7567 version "/org.osgi.util.tracker-"
7568 version "-sources.jar"))
7569 (sha256
7570 (base32
7571 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7572 (build-system ant-build-system)
7573 (arguments
7574 `(#:jar-name "osgi-util-tracker.jar"
7575 #:tests? #f)); no tests
7576 (inputs
7577 `(("framework" ,java-osgi-framework)
7578 ("annotation" ,java-osgi-annotation)))
7579 (home-page "https://www.osgi.org")
7580 (synopsis "Bundle tracking")
7581 (description
7582 "OSGi, for Open Services Gateway initiative framework, is a module system
7583 and service platform for the Java programming language. This package contains
7584 bundle tracking utility classes.")
7585 (license license:asl2.0)))
7586
7587 (define-public java-osgi-service-cm
7588 (package
7589 (name "java-osgi-service-cm")
7590 (version "1.5.0")
7591 (source (origin
7592 (method url-fetch)
7593 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7594 "org.osgi.service.cm/"
7595 version "/org.osgi.service.cm-"
7596 version "-sources.jar"))
7597 (sha256
7598 (base32
7599 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7600 (build-system ant-build-system)
7601 (arguments
7602 `(#:jar-name "osgi-service-cm.jar"
7603 #:tests? #f)); no tests
7604 (inputs
7605 `(("framework" ,java-osgi-framework)
7606 ("annotation" ,java-osgi-annotation)))
7607 (home-page "https://www.osgi.org")
7608 (synopsis "OSGI Configuration Management")
7609 (description
7610 "OSGi, for Open Services Gateway initiative framework, is a module system
7611 and service platform for the Java programming language. This package contains
7612 utility classes for the configuration of services.")
7613 (license license:asl2.0)))
7614
7615 (define-public java-osgi-service-packageadmin
7616 (package
7617 (name "java-osgi-service-packageadmin")
7618 (version "1.2.0")
7619 (source (origin
7620 (method url-fetch)
7621 (uri (string-append "http://central.maven.org/maven2/org/osgi/"
7622 "org.osgi.service.packageadmin/"
7623 version "/org.osgi.service.packageadmin-"
7624 version "-sources.jar"))
7625 (sha256
7626 (base32
7627 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7628 (build-system ant-build-system)
7629 (arguments
7630 `(#:jar-name "osgi-service-packageadmin.jar"
7631 #:tests? #f)); no tests
7632 (inputs
7633 `(("framework" ,java-osgi-framework)))
7634 (home-page "https://www.osgi.org")
7635 (synopsis "OSGI Package Administration")
7636 (description
7637 "OSGi, for Open Services Gateway initiative framework, is a module system
7638 and service platform for the Java programming language. This package contains
7639 the packageadmin service.")
7640 (license license:asl2.0)))
7641
7642 (define-public java-ops4j-base-lang
7643 (package
7644 (name "java-ops4j-base-lang")
7645 (version "1.5.0")
7646 (source (origin
7647 (method url-fetch)
7648 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7649 "archive/base-" version ".tar.gz"))
7650 (sha256
7651 (base32
7652 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7653 (build-system ant-build-system)
7654 (arguments
7655 `(#:jar-name "java-ops4j-base-lang.jar"
7656 #:source-dir "ops4j-base-lang/src/main/java"
7657 #:tests? #f; no tests
7658 #:phases
7659 (modify-phases %standard-phases
7660 (add-before 'build 'add-test-file
7661 (lambda _
7662 ;; That file is required by a test in ops4j-pax-exam-core-spi
7663 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7664 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7665 (lambda _
7666 (display
7667 (string-append
7668 "version=" ,version "\n"
7669 "groupId=org.ops4j.base"
7670 "artifactId=ops4j-base-lang\n"))))
7671 #t)))))
7672 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7673 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7674 (description "OPS4J stands for Open Participation Software for Java. This
7675 package contains utilities and extensions related to @code{java.lang}.")
7676 (license license:asl2.0)))
7677
7678 (define-public java-ops4j-base-monitors
7679 (package
7680 (inherit java-ops4j-base-lang)
7681 (name "java-ops4j-base-monitors")
7682 (arguments
7683 `(#:jar-name "java-ops4j-base-monitors.jar"
7684 #:source-dir "ops4j-base-monitors/src/main/java"
7685 #:tests? #f)); no tests
7686 (inputs
7687 `(("lang" ,java-ops4j-base-lang)))
7688 (description "OPS4J stands for Open Participation Software for Java. This
7689 package contains utilities and extensions related to monitoring.")))
7690
7691 (define-public java-ops4j-base-io
7692 (package
7693 (inherit java-ops4j-base-lang)
7694 (name "java-ops4j-base-io")
7695 (arguments
7696 `(#:jar-name "java-ops4j-base-io.jar"
7697 #:source-dir "ops4j-base-io/src/main/java"
7698 #:test-dir "ops4j-base-io/src/test"
7699 #:test-exclude
7700 (list "**/ListerTest.java")))
7701 (inputs
7702 `(("lang" ,java-ops4j-base-monitors)
7703 ("lang" ,java-ops4j-base-lang)))
7704 (native-inputs
7705 `(("junit" ,java-junit)
7706 ("hamcrest" ,java-hamcrest-core)))
7707 (description "OPS4J stands for Open Participation Software for Java. This
7708 package contains utilities and extensions related to handling streams and files.")))
7709
7710 (define-public java-ops4j-base-util
7711 (package
7712 (inherit java-ops4j-base-lang)
7713 (name "java-ops4j-base-util")
7714 (arguments
7715 `(#:jar-name "java-ops4j-base-util.jar"
7716 #:source-dir "ops4j-base-util/src/main/java"
7717 #:test-dir "ops4j-base-util/src/test"))
7718 (inputs
7719 `(("lang" ,java-ops4j-base-lang)))
7720 (native-inputs
7721 `(("junit" ,java-junit)))
7722 (description "OPS4J stands for Open Participation Software for Java. This
7723 package contains utilities and extensions related to environment, i18n and
7724 mime types.")))
7725
7726 (define-public java-ops4j-base-util-property
7727 (package
7728 (inherit java-ops4j-base-lang)
7729 (name "java-ops4j-base-util-property")
7730 (arguments
7731 `(#:jar-name "java-ops4j-base-util-property.jar"
7732 #:source-dir "ops4j-base-util-property/src/main/java"
7733 #:tests? #f)); no tests
7734 (inputs
7735 `(("lang" ,java-ops4j-base-lang)
7736 ("util" ,java-ops4j-base-util)))
7737 (description "OPS4J stands for Open Participation Software for Java. This
7738 package contains utilities and extensions related to resolving properties from
7739 different sources.")))
7740
7741 (define-public java-ops4j-base-store
7742 (package
7743 (inherit java-ops4j-base-lang)
7744 (name "java-ops4j-base-store")
7745 (arguments
7746 `(#:jar-name "java-ops4j-base-store.jar"
7747 #:source-dir "ops4j-base-store/src/main/java"
7748 #:tests? #f)); no tests
7749 (inputs
7750 `(("lang" ,java-ops4j-base-lang)
7751 ("slf4j" ,java-slf4j-api)
7752 ("io" ,java-ops4j-base-io)))
7753 (description "OPS4J stands for Open Participation Software for Java. This
7754 package contains utilities for storing and retrieving data from an
7755 @code{InputStream}.")))
7756
7757 (define-public java-ops4j-base-spi
7758 (package
7759 (inherit java-ops4j-base-lang)
7760 (name "java-ops4j-base-spi")
7761 (arguments
7762 `(#:jar-name "java-ops4j-base-spi.jar"
7763 #:source-dir "ops4j-base-spi/src/main/java"
7764 #:test-dir "ops4j-base-spi/src/test"))
7765 (native-inputs
7766 `(("junit" ,java-junit)
7767 ("hamcrest" ,java-hamcrest-core)))
7768 (description "OPS4J stands for Open Participation Software for Java. This
7769 package contains utilities for obtaining services via the Java SE 6
7770 @code{ServiceLoader}.")))
7771
7772 (define-public java-aqute-bnd-annotation
7773 (package
7774 (name "java-aqute-bnd-annotation")
7775 (version "3.5.0")
7776 (source (origin
7777 (method url-fetch)
7778 (uri (string-append "https://github.com/bndtools/bnd/archive/"
7779 version ".REL.tar.gz"))
7780 (file-name (string-append name "-" version ".tar.gz"))
7781 (sha256
7782 (base32
7783 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
7784 (build-system ant-build-system)
7785 (arguments
7786 `(#:jar-name "java-aqute-bnd-annotation.jar"
7787 #:source-dir "biz.aQute.bnd.annotation/src"
7788 #:tests? #f)); empty test dir
7789 (home-page "http://bnd.bndtools.org/")
7790 (synopsis "Tools for OSGi")
7791 (description "Bnd is a swiss army knife for OSGi, it creates manifest
7792 headers based on analyzing the class code, it verifies the project settings,
7793 it manages project dependencies, gives diffs jars, and much more.")
7794 (license license:asl2.0)))
7795
7796 (define-public java-aqute-libg
7797 (package
7798 (inherit java-aqute-bnd-annotation)
7799 (name "java-aqute-libg")
7800 (arguments
7801 `(#:jar-name "java-aqute-libg.jar"
7802 ;; The build fails when source/target more recent than 1.7. This
7803 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
7804 ;;
7805 ;; It is closed as won't fix. There is no way to change the source
7806 ;; so that it works on 1.8, and still works on 1.6, the upstream
7807 ;; target. It work fine on 1.7, so we use 1.7.
7808 #:make-flags (list "-Dant.build.javac.source=1.7"
7809 "-Dant.build.javac.target=1.7")
7810 #:phases
7811 (modify-phases %standard-phases
7812 (add-before 'configure 'chdir
7813 ;; Change to aQute.libg directory, so that the relative
7814 ;; paths in the tests aren't broken.
7815 (lambda _
7816 (chdir "aQute.libg")
7817 #t))
7818 (add-before 'check 'create-test-directory
7819 ;; Copy the test directory to test/java, since that's where
7820 ;; ant-build-system's default project in build.xml expects to find
7821 ;; the test classes. Leave a copy in the original place to not
7822 ;; break paths in tests.
7823 (lambda _
7824 (mkdir "src/test")
7825 (copy-recursively "test" "src/test/java")
7826 #t)))))
7827 (inputs
7828 `(("slf4j" ,java-slf4j-api)
7829 ("osgi-annot" ,java-osgi-annotation)
7830 ("java-osgi-cmpn" ,java-osgi-cmpn)
7831 ("osgi" ,java-osgi-core)))
7832 (native-inputs
7833 `(("hamcrest" ,java-hamcrest-core)
7834 ("java-junit" ,java-junit)))))
7835
7836 (define java-aqute-libg-bootstrap
7837 (package
7838 (inherit java-aqute-libg)
7839 (name "java-aqute-libg-bootstrap")
7840 (arguments
7841 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
7842 (substitute-keyword-arguments (package-arguments java-aqute-libg)
7843 ((#:tests? _ #f) #f)))
7844 (inputs
7845 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7846 ,@(delete `("slf4j" ,java-slf4j-api)
7847 (package-inputs java-aqute-libg))))
7848 (native-inputs '())))
7849
7850 (define-public java-aqute-bndlib
7851 (package
7852 (inherit java-aqute-bnd-annotation)
7853 (name "java-aqute-bndlib")
7854 (arguments
7855 `(#:jar-name "java-bndlib.jar"
7856 #:source-dir "biz.aQute.bndlib/src"
7857 #:tests? #f)); no tests
7858 (inputs
7859 `(("slf4j" ,java-slf4j-api)
7860 ("osgi-annot" ,java-osgi-annotation)
7861 ("java-aqute-libg" ,java-aqute-libg)
7862 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
7863 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
7864 ("java-osgi-service-repository" ,java-osgi-service-repository)
7865 ("java-osgi-service-log" ,java-osgi-service-log)
7866 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
7867 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
7868 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
7869 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
7870 ("promise" ,java-osgi-util-promise)
7871 ("osgi" ,java-osgi-core)))))
7872
7873 (define java-aqute-bndlib-bootstrap
7874 (package
7875 (inherit java-aqute-bndlib)
7876 (name "java-aqute-bndlib-bootstrap")
7877 (inputs
7878 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
7879 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
7880 ,@(delete `("slf4j" ,java-slf4j-api)
7881 (delete `("java-aqute-libg" ,java-aqute-libg)
7882 (package-inputs java-aqute-bndlib)))))))
7883
7884 (define-public java-ops4j-pax-tinybundles
7885 (package
7886 (name "java-ops4j-pax-tinybundles")
7887 (version "2.1.1")
7888 (source (origin
7889 (method url-fetch)
7890 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
7891 "archive/tinybundles-" version ".tar.gz"))
7892 (sha256
7893 (base32
7894 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
7895 (arguments
7896 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
7897 #:source-dir "src/main/java"
7898 #:test-exclude
7899 ;; Abstract base classes for other tests
7900 (list "**/BndTest.java" "**/CoreTest.java")
7901 #:phases
7902 (modify-phases %standard-phases
7903 (add-before 'check 'fix-version
7904 (lambda _
7905 ;; This test has a reference to an old version of bndlib we are not
7906 ;; packaging. It uses the version referenced in pom.xml. We replace
7907 ;; it with our own version.
7908 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
7909 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
7910 ,(package-version java-aqute-bndlib)))
7911 #t)))))
7912 (inputs
7913 `(("lang" ,java-ops4j-base-lang)
7914 ("io" ,java-ops4j-base-io)
7915 ("store" ,java-ops4j-base-store)
7916 ("slf4j" ,java-slf4j-api)
7917 ("libg" ,java-aqute-libg)
7918 ("bndlib" ,java-aqute-bndlib)))
7919 (native-inputs
7920 `(("junit" ,java-junit)
7921 ("hamcrest" ,java-hamcrest-core)
7922 ("log4j" ,java-log4j-api)
7923 ("bndannotation" ,java-aqute-bnd-annotation)
7924 ("framework" ,java-osgi-framework)))
7925 (build-system ant-build-system)
7926 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
7927 (synopsis "Java APIs to create OSGi related artifacts")
7928 (description "Tinybundles is all about creating OSGi related artifacts like
7929 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
7930 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
7931 other hand, this library can be a foundation of real end user tools that need
7932 to create those artifacts.")
7933 (license license:asl2.0)))
7934
7935 (define-public java-ops4j-pax-exam-core
7936 (package
7937 (name "java-ops4j-pax-exam-core")
7938 (version "4.11.0")
7939 (source (origin
7940 (method url-fetch)
7941 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
7942 "archive/exam-reactor-" version ".tar.gz"))
7943 (sha256
7944 (base32
7945 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
7946 (arguments
7947 `(#:jar-name "java-ops4j-pax-exam-core.jar"
7948 #:source-dir "core/pax-exam/src/main/java"
7949 #:test-dir "core/pax-exam/src/test"))
7950 (inputs
7951 `(("slf4j" ,java-slf4j-api)
7952 ("lang" ,java-ops4j-base-lang)
7953 ("io" ,java-ops4j-base-io)
7954 ("util-property" ,java-ops4j-base-util-property)
7955 ("util-store" ,java-ops4j-base-store)
7956 ("java-osgi-core" ,java-osgi-core)))
7957 (native-inputs
7958 `(("junit" ,java-junit)
7959 ("hamcrest" ,java-hamcrest-core)))
7960 (build-system ant-build-system)
7961 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
7962 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
7963 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
7964 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
7965 the system under test at the same time.")
7966 (license license:asl2.0)))
7967
7968 (define-public java-ops4j-pax-exam-core-spi
7969 (package
7970 (inherit java-ops4j-pax-exam-core)
7971 (name "java-ops4j-pax-exam-core-spi")
7972 (arguments
7973 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
7974 #:source-dir "src/main/java"
7975 #:test-exclude
7976 (list
7977 ;; Abstract base class, not a test
7978 "**/BaseStagedReactorTest.java"
7979 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
7980 "**/WarBuilderTest.java")
7981 #:phases
7982 (modify-phases %standard-phases
7983 (add-before 'configure 'chdir
7984 (lambda _
7985 ;; Tests assume we are in this directory
7986 (chdir "core/pax-exam-spi")
7987 #t))
7988 (add-before 'check 'fix-tests
7989 (lambda _
7990 ;; One test checks that this file is present.
7991 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
7992 (with-output-to-file
7993 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
7994 (lambda _
7995 (display
7996 (string-append "artifactId = pax-exam-spi\n"
7997 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
7998 ;; Maven puts compilation results in the target directory, while we
7999 ;; put them in the build directory.
8000 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8001 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8002 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8003 (("target") "build"))
8004 ;; One test is expected to fail, but it doesn't throw the expected exception
8005 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8006 (("AssertionError") "IllegalArgumentException"))
8007 #t)))))
8008 (inputs
8009 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8010 ("lang" ,java-ops4j-base-lang)
8011 ("monitors" ,java-ops4j-base-monitors)
8012 ("store" ,java-ops4j-base-store)
8013 ("io" ,java-ops4j-base-io)
8014 ("spi" ,java-ops4j-base-spi)
8015 ("osgi" ,java-osgi-core)
8016 ("slf4j" ,java-slf4j-api)
8017 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8018 (native-inputs
8019 `(("mockito" ,java-mockito-1)
8020 ("junit" ,java-junit)
8021 ("hamcrest" ,java-hamcrest-core)
8022 ("cglib" ,java-cglib)
8023 ("objenesis" ,java-objenesis)
8024 ("asm" ,java-asm)))))
8025
8026 (define-public java-ops4j-pax-exam-core-junit
8027 (package
8028 (inherit java-ops4j-pax-exam-core)
8029 (name "java-ops4j-pax-exam-core-junit")
8030 (arguments
8031 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8032 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8033 #:tests? #f)); no tests
8034 (inputs
8035 `(("junit" ,java-junit)
8036 ("slf4j" ,java-slf4j-api)
8037 ("core" ,java-ops4j-pax-exam-core)
8038 ("spi" ,java-ops4j-pax-exam-core-spi)))
8039 (native-inputs '())))
8040
8041 (define-public java-fasterxml-jackson-annotations
8042 (package
8043 (name "java-fasterxml-jackson-annotations")
8044 (version "2.9.4")
8045 (source (origin
8046 (method url-fetch)
8047 (uri (string-append "https://github.com/FasterXML/"
8048 "jackson-annotations/archive/"
8049 "jackson-annotations-" version ".tar.gz"))
8050 (sha256
8051 (base32
8052 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8053 (build-system ant-build-system)
8054 (arguments
8055 `(#:jar-name "jackson-annotations.jar"
8056 #:source-dir "src/main/java"
8057 #:test-dir "src/test"))
8058 (native-inputs
8059 `(("junit" ,java-junit)))
8060 (home-page "https://github.com/FasterXML/jackson-annotations")
8061 (synopsis "General purpose annotations for the Jackson Data Processor")
8062 (description "This package contains general purpose annotations for the
8063 Jackson Data Processor, used on value and handler types. The only annotations
8064 not included are ones that require dependency to the Databind package.")
8065 (license license:asl2.0)))
8066
8067 (define-public java-fasterxml-jackson-core
8068 (package
8069 (name "java-fasterxml-jackson-core")
8070 (version "2.9.4")
8071 (source (origin
8072 (method url-fetch)
8073 (uri (string-append "https://github.com/FasterXML/"
8074 "jackson-core/archive/"
8075 "jackson-core-" version ".tar.gz"))
8076 (sha256
8077 (base32
8078 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8079 (build-system ant-build-system)
8080 (arguments
8081 `(#:jar-name "jackson-core.jar"
8082 #:source-dir "src/main/java"
8083 #:test-dir "src/test"
8084 #:test-exclude
8085 (list
8086 ;; Expected failure. pom.xml excludes these
8087 "**/failing/**"
8088 ;; Base classes that have no constructor for junit
8089 "**/BaseTest.java"
8090 "**/ConcurrencyReadTest.java"
8091 "**/ManualCharAccessTest.java"
8092 "**/ManualCharAccessTest.java"
8093 "**/TrailingCommasTest.java"
8094 "**/AsyncMissingValuesInObjectTest.java"
8095 "**/AsyncMissingValuesInArrayTest.java")
8096 #:phases
8097 (modify-phases %standard-phases
8098 (add-before 'configure 'generate-PackageVersion.java
8099 (lambda _
8100 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8101 (in (string-append out ".in")))
8102 (copy-file in out)
8103 (substitute* out
8104 (("@package@") "com.fasterxml.jackson.core.json")
8105 (("@projectversion@") ,version)
8106 (("@projectgroupid@") "com.fasterxml.jackson.core")
8107 (("@projectartifactid@") "jackson-core")))
8108 #t))
8109 (add-before 'build 'copy-resources
8110 (lambda _
8111 (copy-recursively "src/main/resources"
8112 "build/classes")
8113 #t))
8114 (add-before 'check 'copy-test-resources
8115 (lambda _
8116 (copy-recursively "src/test/resources"
8117 "build/test-classes")
8118 #t)))))
8119 (native-inputs
8120 `(("junit" ,java-junit)
8121 ("hamcrest" ,java-hamcrest-core)))
8122 (home-page "https://github.com/FasterXML/jackson-core")
8123 (synopsis "")
8124 (description "")
8125 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8126
8127 (define-public java-fasterxml-jackson-databind
8128 (package
8129 (name "java-fasterxml-jackson-databind")
8130 (version "2.9.4")
8131 (source (origin
8132 (method url-fetch)
8133 (uri (string-append "https://github.com/FasterXML/"
8134 "jackson-databind/archive/"
8135 "jackson-databind-" version ".tar.gz"))
8136 (sha256
8137 (base32
8138 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8139 (build-system ant-build-system)
8140 (arguments
8141 `(#:jar-name "jackson-databind.jar"
8142 #:source-dir "src/main/java"
8143 #:tests? #f; requires javax.measures for which I can't find a free implementation
8144 #:phases
8145 (modify-phases %standard-phases
8146 (add-before 'configure 'generate-PackageVersion.java
8147 (lambda _
8148 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8149 (in (string-append out ".in")))
8150 (copy-file in out)
8151 (substitute* out
8152 (("@package@") "com.fasterxml.jackson.databind.cfg")
8153 (("@projectversion@") ,version)
8154 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8155 (("@projectartifactid@") "jackson-databind")))
8156 #t))
8157 (add-before 'build 'copy-resources
8158 (lambda _
8159 (copy-recursively "src/main/resources" "build/classes")
8160 #t)))))
8161 (inputs
8162 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8163 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8164 (home-page "https://github.com/FasterXML/jackson-databind")
8165 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8166 (description "This package contains the general-purpose data-binding
8167 functionality and tree-model for Jackson Data Processor. It builds on core
8168 streaming parser/generator package, and uses Jackson Annotations for
8169 configuration.")
8170 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8171
8172 (define-public java-fasterxml-jackson-modules-base-jaxb
8173 (package
8174 (name "java-fasterxml-jackson-modules-base-jaxb")
8175 (version "2.9.4")
8176 (source (origin
8177 (method url-fetch)
8178 (uri (string-append "https://github.com/FasterXML/"
8179 "jackson-modules-base/archive/"
8180 "jackson-modules-base-" version ".tar.gz"))
8181 (sha256
8182 (base32
8183 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8184 (build-system ant-build-system)
8185 (arguments
8186 `(#:jar-name "jackson-modules-base-jaxb.jar"
8187 #:source-dir "jaxb/src/main/java"
8188 #:test-dir "jaxb/src/test"
8189 #:test-exclude
8190 ;; Base class for tests
8191 (list "**/BaseJaxbTest.java")
8192 #:phases
8193 (modify-phases %standard-phases
8194 (add-before 'configure 'generate-PackageVersion.java
8195 (lambda _
8196 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8197 "jackson/module/jaxb/PackageVersion.java"))
8198 (in (string-append out ".in")))
8199 (copy-file in out)
8200 (substitute* out
8201 (("@package@") "com.fasterxml.jackson.module.jaxb")
8202 (("@projectversion@") ,version)
8203 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8204 (("@projectartifactid@") "jackson-module-jaxb")))
8205 #t))
8206 (add-before 'build 'copy-resources
8207 (lambda _
8208 (copy-recursively "jaxb/src/main/resources" "build/classes")
8209 #t)))))
8210 (inputs
8211 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8212 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8213 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8214 (native-inputs
8215 `(("java-junit" ,java-junit)))
8216 (home-page "https://github.com/FasterXML/jackson-modules-base")
8217 (synopsis "Jaxb annotations jackson module")
8218 (description "This package is the jaxb annotations module for jackson.")
8219 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8220
8221 (define-public java-fasterxml-jackson-modules-base-mrbean
8222 (package
8223 (name "java-fasterxml-jackson-modules-base-mrbean")
8224 (version "2.9.4")
8225 (source (origin
8226 (method url-fetch)
8227 (uri (string-append "https://github.com/FasterXML/"
8228 "jackson-modules-base/archive/"
8229 "jackson-modules-base-" version ".tar.gz"))
8230 (sha256
8231 (base32
8232 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8233 (build-system ant-build-system)
8234 (arguments
8235 `(#:jar-name "jackson-modules-base-mrbean.jar"
8236 #:source-dir "mrbean/src/main/java"
8237 #:test-dir "mrbean/src/test"
8238 #:test-exclude
8239 ;; Base class for tests
8240 (list "**/BaseTest.java")
8241 #:phases
8242 (modify-phases %standard-phases
8243 (add-before 'configure 'generate-PackageVersion.java
8244 (lambda _
8245 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8246 "jackson/module/mrbean/PackageVersion.java"))
8247 (in (string-append out ".in")))
8248 (copy-file in out)
8249 (substitute* out
8250 (("@package@") "com.fasterxml.jackson.module.mrbean")
8251 (("@projectversion@") ,version)
8252 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8253 (("@projectartifactid@") "jackson-module-mrbean")))
8254 #t)))))
8255 (inputs
8256 `(("java-asm" ,java-asm)
8257 ("java-fasterxml-jackson-annotations"
8258 ,java-fasterxml-jackson-annotations)
8259 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8260 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8261 (native-inputs
8262 `(("java-junit" ,java-junit)))
8263 (home-page "https://github.com/FasterXML/jackson-modules-base")
8264 (synopsis "POJO type materialization for Java")
8265 (description "This package implements POJO type materialization.
8266 Databinders can construct implementation classes for Java interfaces as part
8267 of deserialization.")
8268 (license license:asl2.0)))
8269
8270 (define-public java-snakeyaml
8271 (package
8272 (name "java-snakeyaml")
8273 (version "1.18")
8274 (source (origin
8275 (method url-fetch)
8276 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8277 version ".tar.gz"))
8278 (file-name (string-append name "-" version ".tar.gz"))
8279 (sha256
8280 (base32
8281 "0rf5ha6w0waz50jz2479jsrbgmd0dnx0gs337m126j5z7zlmg7mg"))))
8282 (build-system ant-build-system)
8283 (arguments
8284 `(#:jar-name "java-snakeyaml.jar"
8285 #:source-dir "src/main/java"
8286 ;; Tests require velocity, a cyclic dependency, and
8287 ;; java-spring-framework-context which is not packaged.
8288 #:tests? #f))
8289 (home-page "https://bitbucket.org/asomov/snakeyaml")
8290 (synopsis "YAML processor")
8291 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8292 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8293
8294 (define-public java-fasterxml-jackson-dataformat-yaml
8295 (package
8296 (name "java-fasterxml-jackson-dataformat-yaml")
8297 (version "2.9.4")
8298 (source (origin
8299 (method url-fetch)
8300 (uri (string-append "https://github.com/FasterXML/"
8301 "jackson-dataformats-text/archive/"
8302 "jackson-dataformats-text-" version ".tar.gz"))
8303 (sha256
8304 (base32
8305 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8306 (build-system ant-build-system)
8307 (arguments
8308 `(#:jar-name "jackson-dataformat-yaml.jar"
8309 #:source-dir "yaml/src/main/java"
8310 #:test-dir "yaml/src/test"
8311 #:test-exclude (list "**/failing/**.java")
8312 #:phases
8313 (modify-phases %standard-phases
8314 (add-before 'configure 'generate-PackageVersion.java
8315 (lambda _
8316 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8317 (in (string-append out ".in")))
8318 (copy-file in out)
8319 (substitute* out
8320 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8321 (("@projectversion@") ,version)
8322 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8323 (("@projectartifactid@") "jackson-dataformat-yaml")))
8324 #t)))))
8325 (inputs
8326 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8327 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8328 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8329 ("java-snakeyaml" ,java-snakeyaml)))
8330 (native-inputs
8331 `(("junit" ,java-junit)
8332 ("hamcrest" ,java-hamcrest-core)
8333 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8334 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8335 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8336 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8337 (synopsis "Yaml backend for Jackson")
8338 (description "Dataformat backends are used to support format alternatives
8339 to JSON, supported by default. This is done by sub-classing Jackson core
8340 abstractions.")
8341 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8342
8343 (define-public java-stax2-api
8344 (package
8345 (name "java-stax2-api")
8346 (version "4.0.0")
8347 (source (origin
8348 (method url-fetch)
8349 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8350 "stax2-api-" version ".tar.gz"))
8351 (sha256
8352 (base32
8353 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8354 (build-system ant-build-system)
8355 (arguments
8356 `(#:jar-name "java-stax2-api.jar"
8357 #:source-dir "src/main/java"
8358 #:tests? #f)); no tests
8359 (home-page "https://github.com/FasterXML/stax2-api")
8360 (synopsis "Stax2 API")
8361 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8362 significant new functionalities, such as full-featured bi-direction validation
8363 interface and high-performance Typed Access API.")
8364 (license license:bsd-2)))
8365
8366 (define-public java-woodstox-core
8367 (package
8368 (name "java-woodstox-core")
8369 (version "5.0.3")
8370 (source (origin
8371 (method url-fetch)
8372 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8373 "woodstox-core-" version ".tar.gz"))
8374 (sha256
8375 (base32
8376 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8377 (build-system ant-build-system)
8378 (arguments
8379 `(#:jar-name "woodstox.jar"
8380 #:test-exclude
8381 (list "**/Base*.java" "failing/**")
8382 #:phases
8383 (modify-phases %standard-phases
8384 (add-before 'build 'remove-msv-dep
8385 (lambda _
8386 ;; we don't need osgi, and it depends on msv
8387 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8388 ;; msv's latest release is from 2011 and we don't need it
8389 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8390 (delete-file-recursively "src/test/java/wstxtest/osgi")
8391 (delete-file-recursively "src/test/java/wstxtest/msv")
8392 #t))
8393 (add-before 'build 'copy-resources
8394 (lambda _
8395 (copy-recursively "src/main/resources" "build/classes")
8396 #t)))))
8397 (inputs
8398 `(("stax2" ,java-stax2-api)))
8399 (native-inputs
8400 `(("junit" ,java-junit)))
8401 (home-page "https://github.com/FasterXML/woodstox")
8402 (synopsis "Stax XML API implementation")
8403 (description "Woodstox is a stax XML API implementation.")
8404 (license license:asl2.0)))
8405
8406 (define-public java-fasterxml-jackson-dataformat-xml
8407 (package
8408 (name "java-fasterxml-jackson-dataformat-xml")
8409 (version "2.9.4")
8410 (source (origin
8411 (method url-fetch)
8412 (uri (string-append "https://github.com/FasterXML/"
8413 "jackson-dataformat-xml/archive/"
8414 "jackson-dataformat-xml-" version ".tar.gz"))
8415 (sha256
8416 (base32
8417 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8418 (build-system ant-build-system)
8419 (arguments
8420 `(#:jar-name "jackson-dataformat-xml.jar"
8421 #:source-dir "src/main/java"
8422 #:test-exclude
8423 (list "**/failing/**")
8424 #:phases
8425 (modify-phases %standard-phases
8426 (add-before 'configure 'generate-PackageVersion.java
8427 (lambda _
8428 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8429 (in (string-append out ".in")))
8430 (copy-file in out)
8431 (newline)
8432 (substitute* out
8433 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8434 (("@projectversion@") ,version)
8435 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8436 (("@projectartifactid@") "jackson-dataformat-xml")))
8437 #t))
8438 (add-before 'build 'copy-resources
8439 (lambda _
8440 (copy-recursively "src/main/resources" "build/classes")
8441 #t)))))
8442 (inputs
8443 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8444 ("jackson-core" ,java-fasterxml-jackson-core)
8445 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8446 ("jackson-databind" ,java-fasterxml-jackson-databind)
8447 ("stax2-api" ,java-stax2-api)
8448 ("woodstox" ,java-woodstox-core)))
8449 (native-inputs
8450 `(("junit" ,java-junit)
8451 ("hamcrest" ,java-hamcrest-core)))
8452 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8453 (synopsis "Read and write XML")
8454 (description "This package contains Jackson extension component for reading
8455 and writing XML encoded data.
8456
8457 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8458 approach (that is, no support is added for \"Schema-first\" approach). Support
8459 for JAXB annotations is provided by JAXB annotation module; this module
8460 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8461 @code{JsonFactory}) as well as small number of higher level overrides needed to
8462 make data-binding work.")
8463 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8464
8465 (define-public java-hdrhistogram
8466 (package
8467 (name "java-hdrhistogram")
8468 (version "2.1.9")
8469 (source (origin
8470 (method url-fetch)
8471 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8472 "archive/HdrHistogram-" version ".tar.gz"))
8473 (sha256
8474 (base32
8475 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8476 (build-system ant-build-system)
8477 (arguments
8478 `(#:jar-name "java-hdrhistogram.jar"
8479 #:source-dir "src/main/java"
8480 #:phases
8481 (modify-phases %standard-phases
8482 (add-before 'configure 'set-version
8483 (lambda _
8484 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8485 (template (string-append version-java ".template")))
8486 (copy-file template version-java)
8487 (substitute* version-java
8488 (("\\$VERSION\\$") ,version)
8489 (("\\$BUILD_TIME\\$") "0"))
8490 #t))))))
8491 (native-inputs
8492 `(("junit" ,java-junit)
8493 ("hamcrest" ,java-hamcrest-core)))
8494 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8495 (synopsis "High dynamic range histogram")
8496 (description "Hdrhistogram allows to create histograms that support
8497 recording and analyzing sampled data value counts across a configurable integer
8498 value range with configurable value precision within the range. Value precision
8499 is expressed as the number of significant digits in the value recording, and
8500 provides control over value quantization behavior across the value range and
8501 the subsequent value resolution at any given level.")
8502 (license license:public-domain)))
8503
8504 (define-public java-cofoja
8505 (package
8506 (name "java-cofoja")
8507 (version "1.3")
8508 (source (origin
8509 (method git-fetch)
8510 (uri (git-reference
8511 (url "https://github.com/nhatminhle/cofoja.git")
8512 (commit (string-append "v" version))))
8513 (file-name (string-append "java-cofoja-" version "-checkout"))
8514 (sha256
8515 (base32
8516 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8517 (build-system ant-build-system)
8518 (arguments
8519 `(#:build-target "dist"
8520 #:test-target "test"
8521 #:jdk ,icedtea-8
8522 #:make-flags
8523 (list "-Ddist.dir=dist")
8524 #:modules ((guix build ant-build-system)
8525 (guix build java-utils)
8526 (guix build utils)
8527 (srfi srfi-1)
8528 (ice-9 match))
8529 #:phases
8530 (modify-phases %standard-phases
8531 ;; The bulid system ignores the class path the ant-build-system sets
8532 ;; up and instead expects to find all dependencies in the "lib"
8533 ;; directory.
8534 (add-after 'unpack 'create-libdir
8535 (lambda* (#:key inputs #:allow-other-keys)
8536 (mkdir-p "lib")
8537 (for-each
8538 (lambda (file)
8539 (let ((target (string-append "lib/" (basename file))))
8540 (unless (file-exists? target)
8541 (symlink file target))))
8542 (append-map (match-lambda
8543 ((label . dir)
8544 (find-files dir "\\.jar$")))
8545 inputs))
8546 #t))
8547 (replace 'install (install-jars "dist")))))
8548 (inputs
8549 `(("java-asm" ,java-asm)))
8550 (native-inputs
8551 `(("java-junit" ,java-junit)))
8552 (home-page "https://github.com/nhatminhle/cofoja")
8553 (synopsis "Contracts for Java")
8554 (description "Contracts for Java, or Cofoja for short, is a contract
8555 programming framework and test tool for Java, which uses annotation processing
8556 and bytecode instrumentation to provide run-time checking. (In particular,
8557 this is not a static analysis tool.)")
8558 (license license:lgpl3+)))
8559
8560 (define-public java-aopalliance
8561 (package
8562 (name "java-aopalliance")
8563 (version "1.0")
8564 (source (origin
8565 (method git-fetch)
8566 ;; Note: this git repository is not official, but contains the
8567 ;; source code that is in the CVS repository. Downloading the
8568 ;; tarball from sourceforge is undeterministic, and the cvs download
8569 ;; fails.
8570 (uri (git-reference
8571 (url "https://github.com/hoverruan/aopalliance")
8572 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8573 (file-name (string-append name "-" version))
8574 (sha256
8575 (base32
8576 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8577 (build-system ant-build-system)
8578 (arguments
8579 `(#:jar-name "java-aopalliance.jar"
8580 #:jdk ,icedtea-8
8581 #:tests? #f; no tests
8582 #:source-dir "aopalliance/src/main"))
8583 (home-page "http://aopalliance.sourceforge.net")
8584 (synopsis "Aspect-Oriented Programming")
8585 (description "The AOP Alliance project is a joint project between several
8586 software engineering people who are interested in Aspect-Oriented Programming
8587 (AOP) and Java.")
8588 (license license:public-domain)))
8589
8590 (define-public java-javax-inject
8591 (package
8592 (name "java-javax-inject")
8593 (version "tck-1")
8594 (source (origin
8595 (method url-fetch)
8596 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8597 "archive/javax.inject-" version ".tar.gz"))
8598 (sha256
8599 (base32
8600 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8601 (build-system ant-build-system)
8602 (arguments
8603 `(#:jar-name "java-javax-inject.jar"
8604 #:jdk ,icedtea-8
8605 #:tests? #f)); no tests
8606 (home-page "http://github.com/javax-inject/javax-inject")
8607 (synopsis "JSR-330: Dependency Injection for Java")
8608 (description "This package specifies a means for obtaining objects in such
8609 a way as to maximize reusability, testability and maintainability compared to
8610 traditional approaches such as constructors, factories, and service locators
8611 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8612 most nontrivial applications.
8613
8614 Many types depend on other types. For example, a @var{Stopwatch} might depend
8615 on a @var{TimeSource}. The types on which a type depends are known as its
8616 dependencies. The process of finding an instance of a dependency to use at run
8617 time is known as resolving the dependency. If no such instance can be found,
8618 the dependency is said to be unsatisfied, and the application is broken.")
8619 (license license:asl2.0)))
8620
8621 (define-public java-guice
8622 (package
8623 (name "java-guice")
8624 (version "4.1")
8625 (source (origin
8626 (method url-fetch)
8627 (uri (string-append "https://github.com/google/guice/archive/"
8628 version ".tar.gz"))
8629 (file-name (string-append name "-" version ".tar.gz"))
8630 (modules '((guix build utils)))
8631 (snippet
8632 `(begin
8633 (for-each delete-file (find-files "." ".*.jar"))))
8634 (sha256
8635 (base32
8636 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "java-guice.jar"
8640 #:jdk ,icedtea-8
8641 #:tests? #f; FIXME: tests are not in a java sub directory
8642 #:source-dir "core/src"))
8643 (inputs
8644 `(("guava" ,java-guava)
8645 ("java-cglib" ,java-cglib)
8646 ("java-aopalliance" ,java-aopalliance)
8647 ("java-javax-inject" ,java-javax-inject)
8648 ("java-asm" ,java-asm)))
8649 (home-page "https://github.com/google/guice")
8650 (synopsis "Lightweight dependency injection framework")
8651 (description "Guice is a lightweight dependency injection framework fo
8652 Java 6 and above.")
8653 (license license:asl2.0)))
8654
8655 (define-public java-guice-servlet
8656 (package
8657 (inherit java-guice)
8658 (name "java-guice-servlet")
8659 (arguments
8660 `(#:jar-name "guice-servlet.jar"
8661 #:source-dir "extensions/servlet/src/"
8662 #:jdk ,icedtea-8
8663 #:tests? #f)); FIXME: not in a java subdir
8664 (inputs
8665 `(("guice" ,java-guice)
8666 ("servlet" ,java-classpathx-servletapi)
8667 ,@(package-inputs java-guice)))))
8668
8669 (define-public java-assertj
8670 (package
8671 (name "java-assertj")
8672 (version "3.8.0")
8673 (source (origin
8674 (method url-fetch)
8675 (uri (string-append "https://github.com/joel-costigliola/"
8676 "assertj-core/archive/"
8677 "assertj-core-" version ".tar.gz"))
8678 (sha256
8679 (base32
8680 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8681 (build-system ant-build-system)
8682 (arguments
8683 `(#:jar-name "java-assertj.jar"
8684 #:jdk ,icedtea-8
8685 #:source-dir "src/main/java"
8686 #:tests? #f)); depends on tng-junit which depends on assertj
8687 (inputs
8688 `(("cglib" ,java-cglib)
8689 ("junit" ,java-junit)
8690 ("hamcrest" ,java-hamcrest-core)))
8691 (native-inputs
8692 `(("mockito" ,java-mockito-1)))
8693 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8694 (synopsis "Fluent assertions for java")
8695 (description "AssertJ core is a Java library that provides a fluent
8696 interface for writing assertions. Its main goal is to improve test code
8697 readability and make maintenance of tests easier.")
8698 (license license:asl2.0)))
8699
8700 (define-public java-jboss-javassist
8701 (package
8702 (name "java-jboss-javassist")
8703 (version "3.21.0")
8704 (source (origin
8705 (method url-fetch)
8706 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8707 "archive/rel_"
8708 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8709 "_ga.tar.gz"))
8710 (sha256
8711 (base32
8712 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8713 (build-system ant-build-system)
8714 (arguments
8715 `(#:jar-name "java-jboss-javassist.jar"
8716 #:jdk ,icedtea-8
8717 #:source-dir "src/main"
8718 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8719 #:phases
8720 (modify-phases %standard-phases
8721 (add-before 'configure 'remove-binary
8722 (lambda _
8723 (delete-file "javassist.jar")
8724 #t)))))
8725 (native-inputs
8726 `(("junit" ,java-junit)))
8727 (home-page "https://github.com/jboss-javassist/javassist")
8728 (synopsis "Java bytecode engineering toolkit")
8729 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8730 manipulation simple. It is a class library for editing bytecodes in Java; it
8731 enables Java programs to define a new class at runtime and to modify a class
8732 file when the JVM loads it.")
8733 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8734
8735 (define-public java-jcommander
8736 (package
8737 (name "java-jcommander")
8738 (version "1.71")
8739 (source (origin
8740 (method url-fetch)
8741 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
8742 version ".tar.gz"))
8743 (file-name (string-append name "-" version ".tar.gz"))
8744 (sha256
8745 (base32
8746 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
8747 (build-system ant-build-system)
8748 (arguments
8749 `(#:jar-name "java-jcommander.jar"
8750 #:jdk ,icedtea-8
8751 #:tests? #f; requires testng which depends on jcommander
8752 #:source-dir "src/main/java"))
8753 (home-page "http://jcommander.org")
8754 (synopsis "Command line parameters parser")
8755 (description "JCommander is a very small Java framework that makes it
8756 trivial to parse command line parameters. Parameters are declared with
8757 annotations.")
8758 (license license:asl2.0)))
8759
8760 (define-public java-bsh
8761 (package
8762 (name "java-bsh")
8763 (version "2.0b6")
8764 (source (origin
8765 (method url-fetch)
8766 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
8767 version ".tar.gz"))
8768 (file-name (string-append name "-" version ".tar.gz"))
8769 (sha256
8770 (base32
8771 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
8772 (build-system ant-build-system)
8773 (arguments
8774 `(#:build-target "jarall"
8775 #:test-target "junit-tests-all"
8776 #:phases
8777 (modify-phases %standard-phases
8778 (replace 'install
8779 (lambda* (#:key outputs #:allow-other-keys)
8780 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
8781 (mkdir-p share)
8782 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
8783 #t))))))
8784 (home-page "http://beanshell.org/")
8785 (synopsis "Lightweight Scripting for Java")
8786 (description "BeanShell is a small, free, embeddable Java source
8787 interpreter with object scripting language features, written in Java.
8788 BeanShell dynamically executes standard Java syntax and extends it with common
8789 scripting conveniences such as loose types, commands, and method closures like
8790 those in Perl and JavaScript.")
8791 (license license:asl2.0)))
8792
8793 (define-public java-fest-util
8794 (package
8795 (name "java-fest-util")
8796 (version "1.2.5")
8797 (source (origin
8798 (method url-fetch)
8799 (uri (string-append "https://github.com/alexruiz/fest-util/"
8800 "archive/fest-util-" version ".tar.gz"))
8801 (sha256
8802 (base32
8803 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
8804 (build-system ant-build-system)
8805 (arguments
8806 `(#:jar-name "java-fest-util.jar"
8807 #:source-dir "src/main/java"))
8808 (native-inputs
8809 `(("junit" ,java-junit)
8810 ("hamcrest" ,java-hamcrest-core)))
8811 (home-page "https://github.com/alexruiz/fest-util")
8812 (synopsis "FEST common utilities")
8813 (description "Common utilities used in all FEST module.")
8814 (license license:asl2.0)))
8815
8816 (define-public java-fest-test
8817 (package
8818 (name "java-fest-test")
8819 (version "2.1.0")
8820 (source (origin
8821 (method url-fetch)
8822 (uri (string-append "https://github.com/alexruiz/fest-test/"
8823 "archive/fest-test-" version ".tar.gz"))
8824 (sha256
8825 (base32
8826 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
8827 (build-system ant-build-system)
8828 (arguments
8829 `(#:jar-name "java-fest-test.jar"
8830 #:source-dir "src/main/java"
8831 #:tests? #f)); no tests
8832 (inputs
8833 `(("junit" ,java-junit)))
8834 (home-page "https://github.com/alexruiz/fest-test")
8835 (synopsis "Common FEST testing infrastructure")
8836 (description "Fest-test contains the common FEST testing infrastructure.")
8837 (license license:asl2.0)))
8838
8839 (define-public java-fest-assert
8840 (package
8841 (name "java-fest-assert")
8842 (version "2.0M10")
8843 (source (origin
8844 (method url-fetch)
8845 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
8846 "archive/fest-assert-core-" version ".tar.gz"))
8847 (sha256
8848 (base32
8849 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
8850 (build-system ant-build-system)
8851 (arguments
8852 `(#:jar-name "java-fest-assert.jar"
8853 #:source-dir "src/main/java"
8854 #:test-exclude
8855 (list
8856 "**/Abstract*.java"
8857 "**/*BaseTest.java"
8858 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
8859 "**/MessageFormatter_format_Test.java"
8860 "**/internal/*/*_assert*_Test.java")))
8861 (inputs
8862 `(("java-fest-util" ,java-fest-util)))
8863 (native-inputs
8864 `(("java-junit" ,java-junit)
8865 ("java-fest-test" ,java-fest-test)
8866 ("java-hamcrest-core" ,java-hamcrest-core)
8867 ("java-mockito" ,java-mockito-1)
8868 ("java-cglib" ,java-cglib)
8869 ("java-objenesis" ,java-objenesis)
8870 ("java-asm" ,java-asm)))
8871 (home-page "https://github.com/alexruiz/fest-assert-2.x")
8872 (synopsis "FEST fluent assertions")
8873 (description "FEST-Assert provides a fluent interface for assertions.")
8874 (license license:asl2.0)))
8875
8876 (define-public java-testng
8877 (package
8878 (name "java-testng")
8879 (version "6.14.3")
8880 (source (origin
8881 (method git-fetch)
8882 (uri (git-reference
8883 (url "https://github.com/cbeust/testng.git")
8884 (commit version)))
8885 (file-name (string-append name "-" version "-checkout"))
8886 (sha256
8887 (base32
8888 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
8889 (build-system ant-build-system)
8890 (arguments
8891 `(#:jdk ,icedtea-8; java.util.function
8892 #:jar-name "java-testng.jar"
8893 #:source-dir "src/main/java"
8894 #:phases
8895 (modify-phases %standard-phases
8896 ;; FIXME: I don't know why these tests fail
8897 (add-after 'unpack 'delete-failing-tests
8898 (lambda _
8899 (substitute* "src/test/resources/testng.xml"
8900 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
8901 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
8902 #t))
8903 ;; We don't have groovy
8904 (add-after 'unpack 'delete-groovy-tests
8905 (lambda _
8906 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
8907 (substitute* "src/test/resources/testng.xml"
8908 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
8909 #t))
8910 (add-before 'build 'copy-resources
8911 (lambda _
8912 (copy-recursively "src/main/resources" "build/classes")
8913 #t))
8914 (add-before 'check 'copy-test-resources
8915 (lambda _
8916 (copy-recursively "src/test/resources" "build/test-classes")
8917 #t))
8918 (replace 'check
8919 (lambda _
8920 (invoke "ant" "compile-tests")
8921 ;; we don't have groovy
8922 (substitute* "src/test/resources/testng.xml"
8923 (("<class name=\"test.groovy.GroovyTest\" />") ""))
8924 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8925 ":build/classes"
8926 ":build/test-classes")
8927 "-Dtest.resources.dir=src/test/resources"
8928 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
8929 (propagated-inputs
8930 `(("junit" ,java-junit)
8931 ("java-jsr305" ,java-jsr305)
8932 ("java-bsh" ,java-bsh)
8933 ("java-jcommander" ,java-jcommander)
8934 ("java-guice" ,java-guice)
8935 ("snakeyaml" ,java-snakeyaml)))
8936 (native-inputs
8937 `(("guava" ,java-guava)
8938 ("java-javax-inject" ,java-javax-inject)
8939 ("java-hamcrest" ,java-hamcrest-all)
8940 ("java-assertj" ,java-assertj)
8941 ("java-mockito" ,java-mockito-1)
8942 ("cglib" ,java-cglib)
8943 ("asm" ,java-asm)
8944 ("aopalliance" ,java-aopalliance)))
8945 (home-page "http://testng.org")
8946 (synopsis "Testing framework")
8947 (description "TestNG is a testing framework inspired from JUnit and NUnit
8948 but introducing some new functionalities that make it more powerful and easier
8949 to use.")
8950 (license license:asl2.0)))
8951
8952 (define-public java-jnacl
8953 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
8954 (revision "2"))
8955 (package
8956 (name "java-jnacl")
8957 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
8958 (source (origin
8959 (method git-fetch)
8960 (uri (git-reference
8961 (url "https://github.com/neilalexander/jnacl.git")
8962 (commit commit)))
8963 (file-name (git-file-name name version))
8964 (sha256
8965 (base32
8966 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
8967 (build-system ant-build-system)
8968 (arguments
8969 `(#:jar-name "jnacl.jar"
8970 #:source-dir "src/main/java"
8971 #:jdk ,icedtea-8
8972 #:phases
8973 (modify-phases %standard-phases
8974 (add-before 'build 'fix-tests
8975 (lambda _
8976 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
8977 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
8978 (("assertions.Assertions") "assertions.api.Assertions"))
8979 #t))
8980 (replace 'check
8981 (lambda _
8982 (invoke "ant" "compile-tests")
8983 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8984 ":build/classes"
8985 ":build/test-classes")
8986 "org.testng.TestNG" "-testclass"
8987 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
8988 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8989 ":build/classes"
8990 ":build/test-classes")
8991 "org.testng.TestNG" "-testclass"
8992 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
8993 (native-inputs
8994 `(("java-testng" ,java-testng)
8995 ("java-fest-util" ,java-fest-util)
8996 ("java-fest-assert" ,java-fest-assert)))
8997 (home-page "https://github.com/neilalexander/jnacl")
8998 (synopsis "Java implementation of NaCl")
8999 (description "Pure Java implementation of the NaCl: Networking and
9000 Cryptography library.")
9001 (license license:bsd-2))))
9002
9003 (define-public java-mvel2
9004 (package
9005 (name "java-mvel2")
9006 (version "2.3.1")
9007 (source (origin
9008 (method url-fetch)
9009 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9010 version ".Final.tar.gz"))
9011 (sha256
9012 (base32
9013 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9014 (build-system ant-build-system)
9015 (arguments
9016 `(#:jar-name "mvel2.jar"
9017 #:source-dir "src/main/java"
9018 #:test-exclude
9019 (list "**/Abstract*.java"
9020 ;; Base class with no tests
9021 "**/MVELThreadTest.java")
9022 #:phases
9023 (modify-phases %standard-phases
9024 (add-after 'install 'install-bin
9025 (lambda* (#:key outputs #:allow-other-keys)
9026 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9027 (mkdir-p bin)
9028 (with-output-to-file (string-append bin "/mvel2")
9029 (lambda _
9030 (display
9031 (string-append
9032 "#!" (which "bash") "\n"
9033 "if [ \"$#\" -ne \"2\" ]; then\n"
9034 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9035 "exit\n"
9036 "fi\n"
9037 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9038 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9039 " org.mvel2.sh.Main $1"))))
9040 (chmod (string-append bin "/mvel2") #o755))
9041 #t)))))
9042 (native-inputs
9043 `(("junit" ,java-junit)
9044 ("hamcrest" ,java-hamcrest-core)))
9045 (home-page "https://github.com/mvel/mvel")
9046 (synopsis "MVFLEX Expression Language")
9047 (description "MVEL has largely been inspired by Java syntax, but has some
9048 fundamental differences aimed at making it more efficient as an expression
9049 language, such as operators that directly support collection, array and string
9050 matching, as well as regular expressions. MVEL is used to evaluate expressions
9051 written using Java syntax.
9052
9053 In addition to the expression language, MVEL serves as a templating language for
9054 configuration and string construction.")
9055 (license license:asl2.0)))
9056
9057 (define-public java-commons-jexl-2
9058 (package
9059 (name "java-commons-jexl")
9060 (version "2.1.1")
9061 (source (origin
9062 (method url-fetch)
9063 (uri (string-append "mirror://apache/commons/jexl/source/"
9064 "commons-jexl-" version "-src.tar.gz"))
9065 (sha256
9066 (base32
9067 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9068 (build-system ant-build-system)
9069 (arguments
9070 `(#:jar-name "commons-jexl-2.jar"
9071 #:jdk ,icedtea-8
9072 #:source-dir "src/main/java"
9073 #:phases
9074 (modify-phases %standard-phases
9075 (add-before 'check 'disable-broken-tests
9076 (lambda* (#:key inputs #:allow-other-keys)
9077 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9078 (substitute* "ArithmeticTest.java"
9079 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9080 (("asserter.assertExpression\\(\"imanull") "//"))
9081 ;; This test fails with "ambiguous method invocation"
9082 (delete-file "CacheTest.java")
9083 ;; This test doesn't have access to the temp directory
9084 (substitute* "ClassCreatorTest.java"
9085 (("java.io.tmpdir") "user.dir"))
9086 ;; This test fails in trying to detect whether it can run.
9087 (substitute* "ClassCreator.java"
9088 (("boolean canRun =.*") "boolean canRun = false;\n"))
9089 ;; ...and these tests depend on it.
9090 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9091 (delete-file "scripting/JexlScriptEngineTest.java"))
9092 #t))
9093 (add-before 'build 'run-javacc
9094 (lambda _
9095 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9096 (invoke "java" "jjtree" "Parser.jjt")
9097 (invoke "java" "javacc" "Parser.jj"))
9098 #t)))))
9099 (inputs
9100 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9101 (native-inputs
9102 `(("java-junit" ,java-junit)
9103 ("java-hamcrest-core" ,java-hamcrest-core)
9104 ("javacc" ,javacc-4)))
9105 (home-page "https://commons.apache.org/proper/commons-jexl/")
9106 (synopsis "Java Expression Language ")
9107 (description "JEXL is a library intended to facilitate the implementation
9108 of dynamic and scripting features in applications and frameworks written in
9109 Java. JEXL implements an Expression Language based on some extensions to the
9110 JSTL Expression Language supporting most of the constructs seen in
9111 shell-script or ECMAScript. Its goal is to expose scripting features usable
9112 by technical operatives or consultants working with enterprise platforms.")
9113 (license license:asl2.0)))
9114
9115 (define-public java-lz4
9116 (package
9117 (name "java-lz4")
9118 (version "1.4.0")
9119 (source (origin
9120 (method url-fetch)
9121 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9122 version ".tar.gz"))
9123 (file-name (string-append name "-" version ".tar.gz"))
9124 (sha256
9125 (base32
9126 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9127 (build-system ant-build-system)
9128 (arguments
9129 `(#:jar-name "lz4.jar"
9130 #:jdk ,icedtea-8
9131 #:source-dir "src/java:src/java-unsafe"
9132 #:tests? #f; FIXME: requires more dependencies
9133 #:phases
9134 (modify-phases %standard-phases
9135 (add-before 'configure 'generate-source
9136 (lambda _
9137 (with-directory-excursion "src/build/source_templates"
9138 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9139 #t)))))
9140 (native-inputs
9141 `(("mvel" ,java-mvel2)))
9142 (home-page "https://jpountz.github.io/lz4-java")
9143 (synopsis "Compression algorithm")
9144 (description "LZ4 - Java is a Java port of the popular lz4 compression
9145 algorithms and xxHash hashing algorithm.")
9146 (license license:asl2.0)))
9147
9148 (define-public java-bouncycastle
9149 (package
9150 (name "java-bouncycastle")
9151 (version "1.60")
9152 (source (origin
9153 (method url-fetch)
9154 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9155 (substring version 0 1) "v"
9156 (substring version 2 4) ".tar.gz"))
9157 (sha256
9158 (base32
9159 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9160 (modules '((guix build utils)))
9161 (snippet
9162 '(begin
9163 (for-each delete-file
9164 (find-files "." "\\.jar$"))
9165 #t))))
9166 (build-system ant-build-system)
9167 (arguments
9168 `(#:jdk ,icedtea-8
9169 #:tests? #f
9170 #:phases
9171 (modify-phases %standard-phases
9172 (replace 'build
9173 (lambda _
9174 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9175 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9176 ;; FIXME: the tests freeze.
9177 ;; (replace 'check
9178 ;; (lambda _
9179 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9180 (replace 'install
9181 (install-jars "build/artifacts/jdk1.5/jars")))))
9182 (inputs
9183 `(("java-javax-mail" ,java-javax-mail)))
9184 (native-inputs
9185 `(("unzip" ,unzip)
9186 ("junit" ,java-junit)
9187 ("java-native-access" ,java-native-access)
9188 ("java-native-access-platform" ,java-native-access-platform)))
9189 (home-page "https://www.bouncycastle.org")
9190 (synopsis "Cryptographic library")
9191 (description "Bouncy Castle is a cryptographic library for the Java
9192 programming language.")
9193 (license license:expat)))
9194
9195 (define-public java-lmax-disruptor
9196 (package
9197 (name "java-lmax-disruptor")
9198 (version "3.3.7")
9199 (source (origin
9200 (method url-fetch)
9201 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9202 "archive/" version ".tar.gz"))
9203 (file-name (string-append name "-" version ".tar.gz"))
9204 (sha256
9205 (base32
9206 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9207 (build-system ant-build-system)
9208 (arguments
9209 `(#:jar-name "java-lmax-disruptor.jar"
9210 #:jdk ,icedtea-8
9211 #:tests? #f)); tests hang
9212 (inputs
9213 `(("junit" ,java-junit)
9214 ("java-hdrhistogram" ,java-hdrhistogram)
9215 ("java-jmock" ,java-jmock)
9216 ("java-jmock-legacy" ,java-jmock-legacy)
9217 ("java-jmock-junit4" ,java-jmock-junit4)
9218 ("java-hamcrest-all" ,java-hamcrest-all)))
9219 (native-inputs
9220 `(("cglib" ,java-cglib)
9221 ("objenesis" ,java-objenesis)
9222 ("asm" ,java-asm)))
9223 (home-page "https://www.lmax.com/disruptor")
9224 (synopsis "High performance inter-thread communication")
9225 (description "LMAX Disruptor is a software pattern and software component
9226 for high performance inter-thread communication that avoids the need for
9227 message queues or resource locking.")
9228 (license license:asl2.0)))
9229
9230 (define-public java-commons-bcel
9231 (package
9232 (name "java-commons-bcel")
9233 (version "6.1")
9234 (source (origin
9235 (method url-fetch)
9236 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9237 version "-src.tar.gz"))
9238 (sha256
9239 (base32
9240 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9241 (build-system ant-build-system)
9242 (arguments
9243 `(#:jar-name "bcel.jar"
9244 #:jdk ,icedtea-8
9245 #:source-dir "src/main/java"
9246 #:test-dir "src/test/java"
9247 ;; FIXME: Tests require the unpackaged jna.
9248 #:tests? #f))
9249 (home-page "https://commons.apache.org/proper/commons-bcel/")
9250 (synopsis "Byte code engineering library")
9251 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9252 intended to give users a convenient way to analyze, create, and
9253 manipulate (binary) Java class files. Classes are represented by objects
9254 which contain all the symbolic information of the given class: methods, fields
9255 and byte code instructions, in particular.
9256
9257 Such objects can be read from an existing file, be transformed by a
9258 program (e.g. a class loader at run-time) and written to a file again. An
9259 even more interesting application is the creation of classes from scratch at
9260 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9261 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9262 of Java @code{.class} files.")
9263 (license license:asl2.0)))
9264
9265 (define-public java-xerial-core
9266 (package
9267 (name "java-xerial-core")
9268 (version "2.1")
9269 (source (origin
9270 (method url-fetch)
9271 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9272 version ".tar.gz"))
9273 (file-name (string-append name "-" version ".tar.gz"))
9274 (sha256
9275 (base32
9276 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9277 (build-system ant-build-system)
9278 (arguments
9279 `(#:jar-name "xerial-core.jar"
9280 #:source-dir "xerial-core/src/main/java"
9281 #:test-dir "xerial-core/src/test"
9282 #:phases
9283 (modify-phases %standard-phases
9284 (add-before 'build 'copy-resources
9285 (lambda _
9286 (copy-recursively "xerial-core/src/main/resources"
9287 "build/classes")
9288 #t)))))
9289 (native-inputs
9290 `(("junit" ,java-junit)
9291 ("hamcrest" ,java-hamcrest-core)))
9292 (home-page "https://github.com/xerial/xerial-java")
9293 (synopsis "Data management libraries for Java")
9294 (description "Xerial is a set of data management libraries for the Java
9295 programming language. The ultimate goal of the Xerial project is to manage
9296 everything as database, including class objects, text format data, data
9297 streams, etc.")
9298 (license license:asl2.0)))
9299
9300 (define-public java-powermock-reflect
9301 (package
9302 (name "java-powermock-reflect")
9303 (version "1.7.3")
9304 (source (origin
9305 (method url-fetch)
9306 (uri (string-append "https://github.com/powermock/powermock/"
9307 "archive/powermock-" version ".tar.gz"))
9308 (file-name (string-append name "-" version ".tar.gz"))
9309 (sha256
9310 (base32
9311 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9312 (patches
9313 (search-patches "java-powermock-fix-java-files.patch"))))
9314 (build-system ant-build-system)
9315 (arguments
9316 `(#:jar-name "java-powermock-reflect.jar"
9317 #:jdk ,icedtea-8
9318 #:source-dir "powermock-reflect/src/main/java"
9319 #:test-dir "powermock-reflect/src/test"))
9320 (inputs
9321 `(("java-objenesis" ,java-objenesis)))
9322 (native-inputs
9323 `(("junit" ,java-junit)
9324 ("cglib" ,java-cglib)
9325 ("asm" ,java-asm)
9326 ("hamcrest" ,java-hamcrest-core)
9327 ("assertj" ,java-assertj)))
9328 (home-page "https://github.com/powermock/powermock")
9329 (synopsis "Mock library extension framework")
9330 (description "PowerMock is a framework that extends other mock libraries
9331 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9332 classloader and bytecode manipulation to enable mocking of static methods,
9333 constructors, final classes and methods, private methods, removal of static
9334 initializers and more. By using a custom classloader no changes need to be
9335 done to the IDE or continuous integration servers which simplifies adoption.")
9336 (license license:asl2.0)))
9337
9338 (define-public java-powermock-core
9339 (package
9340 (inherit java-powermock-reflect)
9341 (name "java-powermock-core")
9342 (arguments
9343 `(#:jar-name "java-powermock-core.jar"
9344 #:source-dir "powermock-core/src/main/java"
9345 #:test-dir "powermock-core/src/test"
9346 #:tests? #f; requires powermock-api
9347 #:jdk ,icedtea-8
9348 #:phases
9349 (modify-phases %standard-phases
9350 (add-before 'build 'copy-resources
9351 (lambda _
9352 (copy-recursively "powermock-core/src/main/resources"
9353 "build/classes")
9354 #t)))))
9355 (inputs
9356 `(("reflect" ,java-powermock-reflect)
9357 ("javassist" ,java-jboss-javassist)))
9358 (native-inputs
9359 `(("junit" ,java-junit)
9360 ("assertj" ,java-assertj)
9361 ("mockito" ,java-mockito-1)))))
9362
9363 (define-public java-powermock-api-support
9364 (package
9365 (inherit java-powermock-reflect)
9366 (name "java-powermock-api-support")
9367 (build-system ant-build-system)
9368 (arguments
9369 `(#:jar-name "java-powermock-api-support.jar"
9370 #:jdk ,icedtea-8
9371 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9372 #:tests? #f)); no tests
9373 (inputs
9374 `(("core" ,java-powermock-core)
9375 ("reflect" ,java-powermock-reflect)))))
9376
9377 (define-public java-powermock-modules-junit4-common
9378 (package
9379 (inherit java-powermock-reflect)
9380 (name "java-powermock-modules-junit4-common")
9381 (build-system ant-build-system)
9382 (arguments
9383 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9384 #:jdk ,icedtea-8
9385 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9386 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9387 (inputs
9388 `(("core" ,java-powermock-core)
9389 ("easymock" ,java-easymock)
9390 ("reflect" ,java-powermock-reflect)
9391 ("hamcrest" ,java-hamcrest-core)
9392 ("cglib" ,java-cglib)))))
9393
9394 (define-public java-powermock-modules-junit4
9395 (package
9396 (inherit java-powermock-reflect)
9397 (name "java-powermock-modules-junit4")
9398 (build-system ant-build-system)
9399 (arguments
9400 `(#:jar-name "java-powermock-modules-junit4.jar"
9401 #:jdk ,icedtea-8
9402 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9403 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9404 #:phases
9405 (modify-phases %standard-phases
9406 (add-before 'build 'fix-junit-detection
9407 (lambda _
9408 ;; Our junit version is 4.12-SNAPSHOT
9409 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9410 "PowerMockJUnit4MethodValidator.java")
9411 (("4.12") "4.12-SNAPSHOT"))
9412 #t)))))
9413 (inputs
9414 `(("core" ,java-powermock-core)
9415 ("reflect" ,java-powermock-reflect)
9416 ("common" ,java-powermock-modules-junit4-common)
9417 ("cglib" ,java-cglib)))
9418 (native-inputs
9419 `(("easymock" ,java-easymock)
9420 ("hamcrest" ,java-hamcrest-core)
9421 ("objenesis" ,java-objenesis)
9422 ("asm" ,java-asm)
9423 ("junit" ,java-junit)))))
9424
9425 (define-public java-powermock-api-easymock
9426 (package
9427 (inherit java-powermock-reflect)
9428 (name "java-powermock-api-easymock")
9429 (build-system ant-build-system)
9430 (arguments
9431 `(#:jar-name "java-powermock-api-easymock.jar"
9432 #:jdk ,icedtea-8
9433 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9434 #:tests? #f; no tests
9435 #:phases
9436 (modify-phases %standard-phases
9437 (add-before 'build 'fix-file
9438 (lambda _
9439 ;; FIXME: This looks wrong, but it fixes a build error.
9440 (with-directory-excursion "powermock-api/powermock-api-easymock"
9441 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9442 (("classLoader instanceof MockClassLoader") "false")
9443 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9444 #t)))))
9445 (inputs
9446 `(("core" ,java-powermock-core)
9447 ("easymock" ,java-easymock)
9448 ("reflect" ,java-powermock-reflect)
9449 ("support" ,java-powermock-api-support)
9450 ("cglib" ,java-cglib)))))
9451
9452 (define-public java-jboss-jms-api-spec
9453 (package
9454 (name "java-jboss-jms-api-spec")
9455 (version "2.0")
9456 (source (origin
9457 (method url-fetch)
9458 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9459 "archive/jboss-jms-api_" version
9460 "_spec-1.0.1.Final.tar.gz"))
9461 (sha256
9462 (base32
9463 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9464 (build-system ant-build-system)
9465 (arguments
9466 `(#:jar-name "java-jboss-jms-api_spec.jar"
9467 #:jdk ,icedtea-8
9468 #:source-dir "."
9469 #:tests? #f)); no tests
9470 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9471 (synopsis "Java Message Service API specification")
9472 (description "Java Message Service (JMS) API is used to send messages
9473 messages between two or more clients. It is a messaging standard that allows
9474 application components to create, send, receive, and read messages.")
9475 ; either gpl2 only with GPL Classpath Exception, or cddl.
9476 (license (list license:gpl2 license:cddl1.0))))
9477
9478 (define-public java-mail
9479 (package
9480 (name "java-mail")
9481 (version "1.6.0")
9482 (source (origin
9483 (method url-fetch)
9484 (uri (string-append "https://github.com/javaee/javamail/archive/"
9485 "JAVAMAIL-1_6_0.tar.gz"))
9486 (sha256
9487 (base32
9488 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9489 (build-system ant-build-system)
9490 (arguments
9491 `(#:jar-name "java-mail.jar"
9492 #:jdk ,icedtea-8
9493 #:source-dir "mail/src/main/java"
9494 #:test-dir "mail/src/test"
9495 #:test-exclude
9496 (list "**/CollectorFormatterTest.java"
9497 "**/CompactFormatterTest.java"
9498 "**/DurationFilterTest.java"
9499 "**/MailHandlerTest.java"
9500 "**/GetLocalAddressTest.java"
9501 ;; FIXME: both end with:
9502 ;; java.lang.ClassNotFoundException:
9503 ;; javax.mail.internet.MimeMultipartParseTest
9504 "**/MimeMultipartParseTest.java"
9505 "**/SearchTermSerializationTest.java")
9506 #:phases
9507 (modify-phases %standard-phases
9508 (add-before 'configure 'move-version.java
9509 (lambda _
9510 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9511 "mail/src/main/java/javax/mail/Version.java")
9512 #t))
9513 (add-before 'build 'copy-resources
9514 (lambda _
9515 (copy-recursively "mail/src/main/resources/META-INF"
9516 "build/classes/META-INF")
9517 #t)))))
9518 (native-inputs
9519 `(("junit" ,java-junit)
9520 ("hamcrest" ,java-hamcrest-core)))
9521 (home-page "https://javaee.github.io/javamail/")
9522 (synopsis "Mail-related functionnalities in Java")
9523 (description "The JavaMail API provides a platform-independent and
9524 protocol-independent framework to build mail and messaging applications.")
9525 ;; General Public License Version 2 only ("GPL") or the Common Development
9526 ;; and Distribution License("CDDL")
9527 (license (list license:cddl1.1
9528 license:gpl2)))); with classpath exception
9529
9530 (define-public java-jeromq
9531 (package
9532 (name "java-jeromq")
9533 (version "0.4.3")
9534 (source (origin
9535 (method git-fetch)
9536 (uri (git-reference
9537 (url "https://github.com/zeromq/jeromq.git")
9538 (commit (string-append "v" version))))
9539 (file-name (string-append name "-" version "-checkout"))
9540 (sha256
9541 (base32
9542 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9543 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9544 (build-system ant-build-system)
9545 (arguments
9546 `(#:jar-name "java-jeromq.jar"
9547 #:source-dir "src/main/java"
9548 #:jdk ,icedtea-8
9549 #:test-exclude
9550 (list
9551 "**/Abstract*.java"
9552 ;; Requires network
9553 "**/ZBeaconTest.java"
9554 ;; Failures
9555 "**/DealerSpecTest.java"
9556 "**/CustomDecoderTest.java"
9557 "**/CustomEncoderTest.java"
9558 "**/ConnectRidTest.java"
9559 "**/ReqSpecTest.java"
9560 "**/PushPullSpecTest.java"
9561 "**/PubSubHwmTest.java"
9562 "**/RouterSpecTest.java"
9563 "**/ProxyTest.java")))
9564 (inputs
9565 `(("java-jnacl" ,java-jnacl)))
9566 (native-inputs
9567 `(("java-hamcrest-core" ,java-hamcrest-core)
9568 ("junit" ,java-junit)))
9569 (home-page "http://zeromq.org/bindings:java")
9570 (synopsis "Java binding for 0MQ")
9571 (description "Jeromq provides the java bindings for 0MQ.")
9572 (license license:mpl2.0)))
9573
9574 (define-public java-kafka-clients
9575 (package
9576 (name "java-kafka-clients")
9577 (version "1.0.0")
9578 (source (origin
9579 (method url-fetch)
9580 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9581 version "-src.tgz"))
9582 (sha256
9583 (base32
9584 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9585 (build-system ant-build-system)
9586 (arguments
9587 `(#:jar-name "java-kafka-clients.jar"
9588 #:jdk ,icedtea-8
9589 #:source-dir "clients/src/main/java"
9590 #:test-dir "clients/src/test"
9591 #:test-exclude
9592 (list
9593 ;; This file does not contain a class
9594 "**/IntegrationTest.java"
9595 ;; Requires network
9596 "**/ClientUtilsTest.java"
9597 ;; End with errors that seem related to our powermock
9598 "**/KafkaProducerTest.java"
9599 "**/BufferPoolTest.java")))
9600 (inputs
9601 `(("java-slf4j-api" ,java-slf4j-api)
9602 ("java-lz4" ,java-lz4)))
9603 (native-inputs
9604 `(("junit" ,java-junit)
9605 ("hamcrest" ,java-hamcrest-all)
9606 ("objenesis" ,java-objenesis)
9607 ("asm" ,java-asm)
9608 ("cglib" ,java-cglib)
9609 ("javassist" ,java-jboss-javassist)
9610 ("snappy" ,java-snappy)
9611 ("easymock" ,java-easymock)
9612 ("powermock" ,java-powermock-core)
9613 ("powermock-easymock" ,java-powermock-api-easymock)
9614 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9615 ("powermock-junit4" ,java-powermock-modules-junit4)
9616 ("powermock-support" ,java-powermock-api-support)
9617 ("java-bouncycastle" ,java-bouncycastle)))
9618 (home-page "https://kafka.apache.org")
9619 (synopsis "Distributed streaming platform")
9620 (description "Kafka is a distributed streaming platform, which means:
9621 @itemize
9622 @item it can publish and subscribe to streams of records;
9623 @item it can store streams of records in a fault-tolerant way;
9624 @item it can process streams of records as they occur.
9625 @end itemize")
9626 ;; Either cddl or gpl2 only.
9627 (license (list license:cddl1.1; actually cddl1.1
9628 license:gpl2)))); with classpath exception
9629
9630 (define-public java-jdom
9631 (package
9632 (name "java-jdom")
9633 (version "1.1.3")
9634 (source (origin
9635 (method url-fetch)
9636 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9637 version ".tar.gz"))
9638 (sha256
9639 (base32
9640 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9641 (build-system ant-build-system)
9642 (arguments
9643 `(#:build-target "package"
9644 #:tests? #f; tests are run as part of the build process
9645 #:phases
9646 (modify-phases %standard-phases
9647 (replace 'install
9648 (install-jars "build")))))
9649 (home-page "http://jdom.org/")
9650 (synopsis "Access, manipulate, and output XML data")
9651 (description "Java-based solution for accessing, manipulating, and
9652 outputting XML data from Java code.")
9653 (license license:bsd-4)))
9654
9655 (define-public java-geronimo-xbean-reflect
9656 (package
9657 (name "java-geronimo-xbean-reflect")
9658 (version "4.5")
9659 (source (origin
9660 (method svn-fetch)
9661 (uri (svn-reference
9662 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9663 (revision 1807396)))
9664 (file-name (string-append name "-" version))
9665 (sha256
9666 (base32
9667 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9668 (build-system ant-build-system)
9669 (arguments
9670 `(#:jar-name "geronimo-xbean-reflect.jar"
9671 #:source-dir "xbean-reflect/src/main/java"
9672 #:test-dir "xbean-reflect/src/test"
9673 #:jdk ,icedtea-8
9674 #:test-exclude
9675 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9676 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9677 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9678 #:phases
9679 (modify-phases %standard-phases
9680 (add-before 'build 'fix-source
9681 (lambda _
9682 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9683 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9684 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9685 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9686 #t))))))
9687 (inputs
9688 `(("asm" ,java-asm)
9689 ("log4j" ,java-log4j-api)
9690 ("log4j-1.2" ,java-log4j-1.2-api)
9691 ("log4j-core" ,java-log4j-core)
9692 ("logging" ,java-commons-logging-minimal)))
9693 (native-inputs
9694 `(("junit" ,java-junit)))
9695 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9696 (synopsis "Dependency injection helper")
9697 (description "Xbean-reflect provides very flexible ways to create objects
9698 and graphs of objects for dependency injection frameworks")
9699 (license license:asl2.0)))
9700
9701 (define-public java-geronimo-xbean-bundleutils
9702 (package
9703 (inherit java-geronimo-xbean-reflect)
9704 (name "java-geronimo-xbean-bundleutils")
9705 (arguments
9706 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9707 #:source-dir "xbean-bundleutils/src/main/java"
9708 #:test-dir "xbean-bundleutils/src/test"
9709 #:phases
9710 (modify-phases %standard-phases
9711 (add-before 'build 'fix-java
9712 (lambda _
9713 ;; We use a more recent version of osgi, so this file requires
9714 ;; more interface method implementations.
9715 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9716 (("import org.osgi.framework.ServiceRegistration;")
9717 "import org.osgi.framework.ServiceRegistration;
9718 import org.osgi.framework.ServiceFactory;
9719 import java.util.Collection;
9720 import org.osgi.framework.ServiceObjects;")
9721 (("public Bundle getBundle\\(\\)")
9722 "@Override
9723 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9724 throw new UnsupportedOperationException();
9725 }
9726 @Override
9727 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9728 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9729 throw new UnsupportedOperationException();
9730 }
9731 public Bundle getBundle()"))
9732 #t)))))
9733 (inputs
9734 `(("java-slf4j" ,java-slf4j-api)
9735 ("java-asm" ,java-asm)
9736 ("java-osgi-framework" ,java-osgi-framework)
9737 ("java-eclipse-osgi" ,java-eclipse-osgi)
9738 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9739
9740 (define-public java-geronimo-xbean-asm-util
9741 (package
9742 (inherit java-geronimo-xbean-reflect)
9743 (name "java-geronimo-xbean-asm-util")
9744 (arguments
9745 `(#:jar-name "geronimo-xbean-asm-util.jar"
9746 #:source-dir "xbean-asm-util/src/main/java"
9747 #:tests? #f)); no tests
9748 (inputs
9749 `(("java-asm" ,java-asm)))
9750 (native-inputs '())))
9751
9752 (define-public java-geronimo-xbean-finder
9753 (package
9754 (inherit java-geronimo-xbean-reflect)
9755 (name "java-geronimo-xbean-finder")
9756 (arguments
9757 `(#:jar-name "geronimo-xbean-finder.jar"
9758 #:source-dir "xbean-finder/src/main/java"
9759 #:test-dir "xbean-finder/src/test"))
9760 (inputs
9761 `(("java-slf4j-api" ,java-slf4j-api)
9762 ("java-asm" ,java-asm)
9763 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
9764 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
9765 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
9766 ("java-osgi-framework" ,java-osgi-framework)))
9767 (native-inputs
9768 `(("java-junit" ,java-junit)
9769 ("java-hamcrest-core" ,java-hamcrest-core)))))
9770
9771 (define-public java-gson
9772 (package
9773 (name "java-gson")
9774 (version "2.8.2")
9775 (source (origin
9776 (method url-fetch)
9777 (uri (string-append "https://github.com/google/gson/archive/"
9778 "gson-parent-" version ".tar.gz"))
9779 (sha256
9780 (base32
9781 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
9782 (build-system ant-build-system)
9783 (arguments
9784 `(#:jar-name "gson.jar"
9785 #:source-dir "gson/src/main/java"
9786 #:test-dir "gson/src/test"))
9787 (native-inputs
9788 `(("java-junit" ,java-junit)
9789 ("java-hamcrest-core" ,java-hamcrest-core)))
9790 (home-page "https://github.com/google/gson")
9791 (synopsis "Java serialization/deserialization library from/to JSON")
9792 (description "Gson is a Java library that can be used to convert Java
9793 Objects into their JSON representation. It can also be used to convert a JSON
9794 string to an equivalent Java object. Gson can work with arbitrary Java objects
9795 including pre-existing objects that you do not have source-code of.")
9796 (license license:asl2.0)))
9797
9798 (define-public java-hawtjni
9799 (package
9800 (name "java-hawtjni")
9801 (version "1.15")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
9805 "hawtjni-project-" version ".tar.gz"))
9806 (sha256
9807 (base32
9808 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
9809 (build-system ant-build-system)
9810 (arguments
9811 `(#:jar-name "hawtjni.jar"
9812 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
9813 #:tests? #f; no tests
9814 #:phases
9815 (modify-phases %standard-phases
9816 (add-before 'build 'build-native
9817 (lambda* (#:key inputs #:allow-other-keys)
9818 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
9819 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9820 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
9821 "-fPIC" "-O2" include)
9822 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
9823 "-fPIC" "-O2" include)
9824 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
9825 "hawtjni.o" "hawtjni-callback.o")))
9826 #t))
9827 (add-after 'install 'install-native
9828 (lambda* (#:key outputs #:allow-other-keys)
9829 (let* ((out (assoc-ref outputs "out"))
9830 (lib (string-append out "/lib"))
9831 (inc (string-append out "/include")))
9832 (with-directory-excursion "hawtjni-generator/src/main/resources/"
9833 (install-file "libhawtjni.so" lib)
9834 (install-file "hawtjni.h" inc)))
9835 #t)))))
9836 (inputs
9837 `(("java-commons-cli" ,java-commons-cli)
9838 ("java-asm" ,java-asm)
9839 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
9840 (home-page "https://fusesource.github.io/hawtjni/")
9841 (synopsis "JNI code generator")
9842 (description "HawtJNI is a code generator that produces the JNI code needed
9843 to implement Java native methods. It is based on the jnigen code generator
9844 that is part of the SWT Tools project.")
9845 (license license:asl2.0)))
9846
9847 (define-public java-jansi-native
9848 (package
9849 (name "java-jansi-native")
9850 (version "1.7")
9851 (source (origin
9852 (method url-fetch)
9853 (uri (string-append "https://github.com/fusesource/jansi-native/"
9854 "archive/jansi-native-" version ".tar.gz"))
9855 (sha256
9856 (base32
9857 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
9858 (build-system ant-build-system)
9859 (arguments
9860 `(#:jar-name "jansi-native.jar"
9861 #:source-dir "src/main/java"
9862 #:tests? #f; no tests
9863 #:phases
9864 (modify-phases %standard-phases
9865 (add-before 'build 'build-native
9866 (lambda* (#:key inputs #:allow-other-keys)
9867 ;; there are more required files for windows in windows/
9868 (with-directory-excursion "src/main/native-package/src"
9869 (substitute* "jansi_ttyname.c"
9870 (("#include \"jansi_.*") ""))
9871 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
9872 (string-append "-I" (assoc-ref inputs "java-hawtjni")
9873 "/include")
9874 (string-append "-I" (assoc-ref inputs "jdk")
9875 "/include/linux")
9876 "-fPIC" "-O2")
9877 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
9878 (add-before 'build 'install-native
9879 (lambda _
9880 (let ((dir (string-append "build/classes/META-INF/native/"
9881 ,(match (%current-system)
9882 ((or "i686-linux" "armhf-linux")
9883 "linux32")
9884 ((or "x86_64-linux" "aarch64-linux"
9885 "mips64el-linux")
9886 "linux64")))))
9887 (install-file "src/main/native-package/src/libjansi.so" dir))
9888 #t))
9889 (add-after 'install 'install-native
9890 (lambda* (#:key outputs #:allow-other-keys)
9891 (install-file "src/main/native-package/src/jansi.h"
9892 (string-append (assoc-ref outputs "out") "/include"))
9893 #t)))))
9894 (inputs
9895 `(("java-hawtjni" ,java-hawtjni)))
9896 (home-page "https://fusesource.github.io/jansi/")
9897 (synopsis "Native library for jansi")
9898 (description "This package provides the native library for jansi, a small
9899 Java library that allows you to use ANSI escape sequences to format your
9900 console output.")
9901 (license license:asl2.0)))
9902
9903 (define-public java-jansi
9904 (package
9905 (name "java-jansi")
9906 (version "1.16")
9907 (source (origin
9908 (method url-fetch)
9909 (uri (string-append "https://github.com/fusesource/jansi/archive/"
9910 "jansi-project-" version ".tar.gz"))
9911 (sha256
9912 (base32
9913 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
9914 (build-system ant-build-system)
9915 (arguments
9916 `(#:jar-name "jansi.jar"
9917 #:source-dir "jansi/src/main/java"
9918 #:test-dir "jansi/src/test"
9919 #:phases
9920 (modify-phases %standard-phases
9921 (add-after 'check 'clear-term
9922 (lambda _
9923 (invoke "echo" "-e" "\\e[0m"))))))
9924 (inputs
9925 `(("java-jansi-native" ,java-jansi-native)))
9926 (native-inputs
9927 `(("java-junit" ,java-junit)
9928 ("java-hamcrest-core" ,java-hamcrest-core)))
9929 (home-page "https://fusesource.github.io/jansi/")
9930 (synopsis "Portable ANSI escape sequences")
9931 (description "Jansi is a Java library that allows you to use ANSI escape
9932 sequences to format your console output which works on every platform.")
9933 (license license:asl2.0)))
9934
9935 (define-public java-jboss-el-api-spec
9936 (package
9937 (name "java-jboss-el-api-spec")
9938 (version "3.0")
9939 (source (origin
9940 (method url-fetch)
9941 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
9942 "archive/jboss-el-api_" version
9943 "_spec-1.0.7.Final.tar.gz"))
9944 (sha256
9945 (base32
9946 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
9947 (build-system ant-build-system)
9948 (arguments
9949 `(#:jar-name "java-jboss-el-api_spec.jar"
9950 #:jdk ,icedtea-8))
9951 (inputs
9952 `(("java-junit" ,java-junit)))
9953 (home-page "https://github.com/jboss/jboss-el-api_spec")
9954 (synopsis "JSR-341 expression language 3.0 API")
9955 (description "This package contains an implementation of the JSR-341
9956 specification for the expression language 3.0. It implements an expression
9957 language inspired by ECMAScript and XPath. This language is used with
9958 JavaServer Pages (JSP).")
9959 ;; Either GPL2 only or CDDL.
9960 (license (list license:gpl2 license:cddl1.1))))
9961
9962 (define-public java-jboss-interceptors-api-spec
9963 (package
9964 (name "java-jboss-interceptors-api-spec")
9965 (version "1.2")
9966 (source (origin
9967 (method url-fetch)
9968 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
9969 "archive/jboss-interceptors-api_" version
9970 "_spec-1.0.0.Final.tar.gz"))
9971 (sha256
9972 (base32
9973 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
9974 (build-system ant-build-system)
9975 (arguments
9976 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
9977 #:jdk ,icedtea-8
9978 #:source-dir "."
9979 #:tests? #f)); no tests
9980 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
9981 (synopsis "Interceptors 1.2 API classes from JSR 318")
9982 (description "Java-jboss-interceptors-api-spec implements the Interceptors
9983 API. Interceptors are used to interpose on business method invocations and
9984 specific events.")
9985 ;; Either GPL2 only or CDDL.
9986 (license (list license:gpl2 license:cddl1.1))))
9987
9988 (define-public java-cdi-api
9989 (package
9990 (name "java-cdi-api")
9991 (version "2.0")
9992 (source (origin
9993 (method url-fetch)
9994 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
9995 version ".tar.gz"))
9996 (file-name (string-append name "-" version ".tar.gz"))
9997 (sha256
9998 (base32
9999 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10000 (build-system ant-build-system)
10001 (arguments
10002 `(#:source-dir "api/src/main/java"
10003 #:jar-name "java-cdi-api.jar"
10004 #:test-dir "api/src/test"
10005 #:jdk ,icedtea-8
10006 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10007 (inputs
10008 `(("java-javax-inject" ,java-javax-inject)
10009 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10010 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10011 (native-inputs
10012 `(("java-testng" ,java-testng)
10013 ("java-hamcrest-core" ,java-hamcrest-core)))
10014 (home-page "http://cdi-spec.org/")
10015 (synopsis "Contexts and Dependency Injection APIs")
10016 (description "Java-cdi-api contains the required APIs for Contexts and
10017 Dependency Injection (CDI).")
10018 (license license:asl2.0)))
10019
10020 (define-public java-joda-convert
10021 (package
10022 (name "java-joda-convert")
10023 (version "1.9.2")
10024 (source (origin
10025 (method url-fetch)
10026 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10027 version ".tar.gz"))
10028 (file-name (string-append name "-" version ".tar.gz"))
10029 (sha256
10030 (base32
10031 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10032 (build-system ant-build-system)
10033 (arguments
10034 `(#:jar-name (string-append ,name "-" ,version ".jar")
10035 #:source-dir "src/main/java"
10036 #:test-include (list "**/Test*.java")
10037 ;; Contains only interfaces and base classes (no test)
10038 #:test-exclude (list "**/test*/**.java")))
10039 (inputs
10040 `(("java-guava" ,java-guava)))
10041 (native-inputs
10042 `(("java-junit" ,java-junit)
10043 ("java-hamcrest-core" ,java-hamcrest-core)))
10044 (home-page "http://www.joda.org/joda-convert/")
10045 (synopsis "Conversion between Objects and Strings")
10046 (description "Joda-Convert provides a small set of classes to aid
10047 conversion between Objects and Strings. It is not intended to tackle the
10048 wider problem of Object to Object transformation.")
10049 (license license:asl2.0)))
10050
10051 (define-public java-joda-time
10052 (package
10053 (name "java-joda-time")
10054 (version "2.9.9")
10055 (source (origin
10056 (method url-fetch)
10057 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10058 version ".tar.gz"))
10059 (file-name (string-append name "-" version ".tar.gz"))
10060 (sha256
10061 (base32
10062 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10063 (build-system ant-build-system)
10064 (arguments
10065 `(#:jar-name "java-joda-time.jar"
10066 #:source-dir "src/main/java"
10067 #:test-include (list "**/Test*.java")
10068 ;; There is no runnable test in these files
10069 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10070 #:phases
10071 (modify-phases %standard-phases
10072 (add-after 'build 'build-resources
10073 (lambda _
10074 (mkdir-p "build/classes/org/joda/time/tz/data")
10075 (mkdir-p "build/classes/org/joda/time/format")
10076 ;; This will produce the following exception:
10077 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10078 ;; which is normal, because it doesn't exist yet. It still generates
10079 ;; the same file as in the binary one can find on maven.
10080 (invoke "java" "-cp"
10081 (string-append "build/classes:" (getenv "CLASSPATH"))
10082 "org.joda.time.tz.ZoneInfoCompiler"
10083 "-src" "src/main/java/org/joda/time/tz/src"
10084 "-dst" "build/classes/org/joda/time/tz/data"
10085 "africa" "antarctica" "asia" "australasia"
10086 "europe" "northamerica" "southamerica"
10087 "pacificnew" "etcetera" "backward" "systemv")
10088 (for-each (lambda (f)
10089 (copy-file f (string-append
10090 "build/classes/org/joda/time/format/"
10091 (basename f))))
10092 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10093 #t))
10094 (add-before 'install 'regenerate-jar
10095 (lambda _
10096 ;; We need to regenerate the jar file to add generated data.
10097 (delete-file "build/jar/java-joda-time.jar")
10098 (invoke "ant" "jar")))
10099 (add-before 'check 'copy-test-resources
10100 (lambda _
10101 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10102 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10103 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10104 (copy-recursively "src/test/resources" "build/test-classes")
10105 #t)))))
10106 (inputs
10107 `(("java-joda-convert" ,java-joda-convert)))
10108 (native-inputs
10109 `(("java-junit" ,java-junit)
10110 ("java-hamcrest-core" ,java-hamcrest-core)
10111 ("tzdata" ,tzdata)))
10112 (home-page "http://www.joda.org/joda-time/")
10113 (synopsis "Replacement for the Java date and time classes")
10114 (description "Joda-Time is a replacement for the Java date and time
10115 classes prior to Java SE 8.")
10116 (license license:asl2.0)))
10117
10118 (define-public java-xerces
10119 (package
10120 (name "java-xerces")
10121 (version "2.11.0")
10122 (source
10123 (origin
10124 (method url-fetch)
10125 (uri (string-append "mirror://apache/xerces/j/source/"
10126 "Xerces-J-src." version ".tar.gz"))
10127 (sha256
10128 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10129 (patches (search-patches
10130 "java-xerces-xjavac_taskdef.patch"
10131 "java-xerces-build_dont_unzip.patch"
10132 "java-xerces-bootclasspath.patch"))))
10133 (build-system ant-build-system)
10134 (arguments
10135 `(#:tests? #f;; Test files are not present
10136 #:test-target "test"
10137 #:jdk ,icedtea-8
10138 #:phases
10139 (modify-phases %standard-phases
10140 (add-after 'unpack 'create-build.properties
10141 (lambda* (#:key inputs #:allow-other-keys)
10142 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10143 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10144 (with-output-to-file "build.properties"
10145 (lambda _
10146 (format #t
10147 "jar.jaxp = ~a/share/java/jaxp.jar~@
10148 jar.apis-ext = ~a/share/java/jaxp.jar~@
10149 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10150 jaxp jaxp resolver)))
10151 ;; Make xerces use our version of jaxp in tests
10152 (substitute* "build.xml"
10153 (("xml-apis.jar")
10154 (string-append jaxp "/share/java/jaxp.jar"))
10155 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10156 "${jar.apis}")))
10157 #t))
10158 (replace 'install (install-jars "build")))))
10159 (inputs
10160 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10161 ("java-jaxp" ,java-jaxp)))
10162 (home-page "https://xerces.apache.org/xerces2-j/")
10163 (synopsis "Validating XML parser for Java with DOM level 3 support")
10164 (description "The Xerces2 Java parser is the reference implementation of
10165 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10166 processor.
10167
10168 Xerces2-J supports the following standards and APIs:
10169
10170 @itemize
10171 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10172 @item Namespaces in XML Recommendation
10173 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10174 Range Recommendations
10175 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10176 @item Java APIs for XML Processing (JAXP) 1.2.01
10177 @item XML Schema 1.0 Structures and Datatypes Recommendations
10178 @item Experimental implementation of the Document Object Model (DOM) Level 3
10179 Core and Load/Save Working Drafts
10180 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10181 Candidate Recommendation
10182 @end itemize
10183
10184 Xerces is now able to parse documents written according to the XML 1.1
10185 Candidate Recommendation, except that it does not yet provide an option to
10186 enable normalization checking as described in section 2.13 of this
10187 specification. It also handles namespaces according to the XML Namespaces 1.1
10188 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10189 the DOM level 3 load/save API's are in use.")
10190 (license license:asl2.0)))
10191
10192 (define-public java-jakarta-regexp
10193 (package
10194 (name "java-jakarta-regexp")
10195 (version "1.5")
10196 (source
10197 (origin
10198 (method url-fetch)
10199 (uri (string-append
10200 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10201 version ".tar.gz"))
10202 (sha256
10203 (base32
10204 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10205 (build-system ant-build-system)
10206 (arguments
10207 `(#:test-target "test"
10208 #:phases
10209 (modify-phases %standard-phases
10210 (replace 'install
10211 (lambda* (#:key outputs #:allow-other-keys)
10212 (let* ((out (assoc-ref outputs "out"))
10213 (out-share (string-append out "/share/java")))
10214 (mkdir-p out-share)
10215 (for-each (lambda (name)
10216 (install-file name out-share))
10217 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10218 #t))))))
10219 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10220 (synopsis "Regular expression parser generator for Java.")
10221 (description "@code{jakarta-regexp} is an old regular expression parser
10222 generator for Java.")
10223 (license license:asl2.0)))
10224
10225 (define-public java-jline
10226 (package
10227 (name "java-jline")
10228 (version "1.0")
10229 (source (origin
10230 (method url-fetch)
10231 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10232 version ".tar.gz"))
10233 (sha256
10234 (base32
10235 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10236 (build-system ant-build-system)
10237 (arguments
10238 `(#:jar-name "jline.jar"
10239 #:source-dir "src/main/java"
10240 #:test-dir "src/test"
10241 #:phases
10242 (modify-phases %standard-phases
10243 (add-before 'build 'copy-resources
10244 (lambda _
10245 (copy-recursively "src/main/resources" "build/classes")
10246 #t)))))
10247 (native-inputs
10248 `(("java-junit" ,java-junit)))
10249 (home-page "https://jline.github.io")
10250 (synopsis "Console input handling library")
10251 (description "JLine is a Java library for handling console input. It is
10252 similar in functionality to BSD editline and GNU readline but with additional
10253 features that bring it on par with the Z shell line editor.")
10254 (license license:bsd-3)))
10255
10256 (define-public java-jline-2
10257 (package
10258 (inherit java-jline)
10259 (version "2.14.5")
10260 (source (origin
10261 (method url-fetch)
10262 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10263 version ".tar.gz"))
10264 (sha256
10265 (base32
10266 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10267 (arguments
10268 `(#:jdk ,icedtea-8
10269 ,@(package-arguments java-jline)))
10270 (inputs
10271 `(("java-jansi" ,java-jansi)
10272 ("java-jansi-native" ,java-jansi-native)))
10273 (native-inputs
10274 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10275 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10276 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10277 ("java-powermock-api-support" ,java-powermock-api-support)
10278 ("java-powermock-core" ,java-powermock-core)
10279 ("java-powermock-reflect" ,java-powermock-reflect)
10280 ("java-easymock" ,java-easymock)
10281 ("java-jboss-javassist" ,java-jboss-javassist)
10282 ("java-objenesis" ,java-objenesis)
10283 ("java-asm" ,java-asm)
10284 ("java-hamcrest-core" ,java-hamcrest-core)
10285 ("java-cglib" ,java-cglib)
10286 ("java-junit" ,java-junit)
10287 ("java-hawtjni" ,java-hawtjni)))))
10288
10289 (define-public java-xmlunit
10290 (package
10291 (name "java-xmlunit")
10292 (version "2.5.1")
10293 (source (origin
10294 (method url-fetch)
10295 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10296 version ".tar.gz"))
10297 (file-name (string-append name "-" version ".tar.gz"))
10298 (sha256
10299 (base32
10300 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10301 (build-system ant-build-system)
10302 (arguments
10303 `(#:jar-name "java-xmlunit.jar"
10304 #:source-dir "xmlunit-core/src/main/java"
10305 #:test-dir "xmlunit-core/src/test"
10306 #:phases
10307 (modify-phases %standard-phases
10308 (add-before 'check 'copy-test-resources
10309 (lambda* (#:key inputs #:allow-other-keys)
10310 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10311 #t)))))
10312 (native-inputs
10313 `(("java-junit" ,java-junit)
10314 ("java-mockito-1" ,java-mockito-1)
10315 ("java-hamcrest-all" ,java-hamcrest-all)
10316 ("java-objenesis" ,java-objenesis)
10317 ("java-asm" ,java-asm)
10318 ("java-cglib" ,java-cglib)
10319 ("resources"
10320 ,(origin
10321 (method git-fetch)
10322 (uri (git-reference
10323 (url "https://github.com/xmlunit/test-resources.git")
10324 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10325 (file-name "java-xmlunit-test-resources")
10326 (sha256
10327 (base32
10328 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10329 (home-page "http://www.xmlunit.org/")
10330 (synopsis "XML output testing")
10331 (description "XMLUnit provides you with the tools to verify the XML you
10332 emit is the one you want to create. It provides helpers to validate against
10333 an XML Schema, assert the values of XPath queries or compare XML documents
10334 against expected outcomes.")
10335 (license license:asl2.0)))
10336
10337 (define-public java-xmlunit-legacy
10338 (package
10339 (inherit java-xmlunit)
10340 (name "java-xmlunit-legacy")
10341 (arguments
10342 `(#:jar-name "java-xmlunit-legacy.jar"
10343 #:source-dir "xmlunit-legacy/src/main/java"
10344 #:test-dir "xmlunit-legacy/src/test"))
10345 (inputs
10346 `(("java-xmlunit" ,java-xmlunit)
10347 ("java-junit" ,java-junit)))
10348 (native-inputs
10349 `(("java-mockito-1" ,java-mockito-1)))))
10350
10351 (define-public java-xmlunit-matchers
10352 (package
10353 (inherit java-xmlunit)
10354 (name "java-xmlunit-matchers")
10355 (arguments
10356 `(#:jar-name "java-xmlunit-matchers.jar"
10357 #:source-dir "xmlunit-matchers/src/main/java"
10358 #:test-dir "xmlunit-matchers/src/test"
10359 #:test-exclude
10360 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10361 (list "**/ValidationMatcherTest.java")
10362 #:phases
10363 (modify-phases %standard-phases
10364 (add-before 'build 'copy-test-class
10365 (lambda _
10366 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10367 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10368 #t))
10369 (add-before 'build 'fix-test-resources-path
10370 (lambda _
10371 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10372 (("../test-resources") "test-resources"))
10373 #t))
10374 (add-before 'check 'copy-test-resources
10375 (lambda* (#:key inputs #:allow-other-keys)
10376 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10377 #t)))))
10378 (inputs
10379 `(("java-xmlunit" ,java-xmlunit)
10380 ("java-junit" ,java-junit)))))
10381
10382 (define-public java-openchart2
10383 (package
10384 (name "java-openchart2")
10385 (version "1.4.3")
10386 (source (origin
10387 (method url-fetch)
10388 (uri (string-append "http://download.approximatrix.com/openchart2/"
10389 "openchart2-" version ".source.zip"))
10390 (sha256
10391 (base32
10392 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10393 (build-system ant-build-system)
10394 (arguments
10395 `(#:test-target "test"
10396 #:phases
10397 (modify-phases %standard-phases
10398 (add-after 'unpack 'fix-junit-errors
10399 (lambda _
10400 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10401 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10402 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10403 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10404 "model/DefaultChartDataModelConstraintsTest.java"
10405 "model/MultiScatterDataModelConstraintsTest.java"
10406 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10407 (("(assertEquals[^;]+);" before _)
10408 (string-append (string-drop-right before 2) ", 1E-6);"))))
10409 #t))
10410 (replace 'install (install-jars ".")))))
10411 (native-inputs
10412 `(("unzip" ,unzip)
10413 ("java-junit" ,java-junit)
10414 ("java-hamcrest-core" ,java-hamcrest-core)))
10415 (home-page "http://approximatrix.com/products/openchart2/")
10416 (synopsis "Simple plotting for Java")
10417 (description "Openchart2 provides a simple, yet powerful, interface for
10418 Java programmers to create two-dimensional charts and plots. The library
10419 features an assortment of graph styles, including advanced scatter plots, bar
10420 graphs, and pie charts.")
10421 (license license:lgpl2.1+)))
10422
10423 (define-public java-commons-httpclient
10424 (package
10425 (name "java-commons-httpclient")
10426 (version "3.1")
10427 (source (origin
10428 (method url-fetch)
10429 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10430 "commons-httpclient/source/commons-httpclient-"
10431 version "-src.tar.gz"))
10432 (sha256
10433 (base32
10434 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10435 (build-system ant-build-system)
10436 (arguments
10437 `(#:build-target "compile"
10438 #:test-target "test"
10439 #:tests? #f; requires junit-textui (junit 3)
10440 #:phases
10441 (modify-phases %standard-phases
10442 (add-before 'build 'fix-accent
10443 (lambda _
10444 (for-each (lambda (file)
10445 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10446 (substitute* file
10447 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10448 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10449 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10450 "src/test/org/apache/commons/httpclient/TestHttps.java"
10451 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10452 #t))
10453 (replace 'install
10454 (lambda* (#:key outputs #:allow-other-keys)
10455 (invoke "ant" "dist"
10456 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10457 "/share/java"))
10458 #t)))))
10459 (propagated-inputs
10460 `(("java-commons-logging" ,java-commons-logging-minimal)
10461 ("java-commons-codec" ,java-commons-codec)))
10462 (home-page "https://hc.apache.org")
10463 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10464 (description "This package contains an HTTP/1.1 compliant HTTP agent
10465 implementation. It also provides reusable components for client-side
10466 authentication, HTTP state management, and HTTP connection management.")
10467 (license license:asl2.0)))
10468
10469 (define-public java-commons-vfs
10470 (package
10471 (name "java-commons-vfs")
10472 (version "2.2")
10473 (source (origin
10474 (method url-fetch)
10475 (uri (string-append "mirror://apache/commons/vfs/source/"
10476 "commons-vfs2-distribution-" version "-src.tar.gz"))
10477 (file-name (string-append name "-" version ".tar.gz"))
10478 (sha256
10479 (base32
10480 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10481 (modules '((guix build utils)))
10482 (snippet
10483 '(begin
10484 (for-each delete-file
10485 (find-files "." "\\.jar$"))
10486 #t))))
10487 (build-system ant-build-system)
10488 (arguments
10489 `(#:jar-name "commons-vfs.jar"
10490 #:source-dir "commons-vfs2/src/main/java"
10491 #:test-dir "commons-vfs2/src/test"
10492 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10493 #:tests? #f
10494 #:phases
10495 (modify-phases %standard-phases
10496 (add-before 'build 'remove-hadoop-and-webdav
10497 ; Remove these files as they are not required and depend on difficult
10498 ; packages.
10499 (lambda _
10500 (for-each delete-file-recursively
10501 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10502 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10503 #t)))))
10504 (inputs
10505 `(("java-commons-collections4" ,java-commons-collections4)
10506 ("java-commons-compress" ,java-commons-compress)
10507 ("java-commons-httpclient" ,java-commons-httpclient)
10508 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10509 ("java-commons-net" ,java-commons-net)
10510 ("java-jsch" ,java-jsch)))
10511 (home-page "http://commons.apache.org/proper/commons-vfs/")
10512 (synopsis "Java file system library")
10513 (description "Commons VFS provides a single API for accessing various
10514 different file systems. It presents a uniform view of the files from various
10515 different sources, such as the files on local disk, on an HTTP server, or
10516 inside a Zip archive.")
10517 (license license:asl2.0)))
10518
10519 (define-public java-jakarta-oro
10520 (package
10521 (name "java-jakarta-oro")
10522 (version "2.0.8")
10523 (source (origin
10524 (method url-fetch)
10525 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10526 "jakarta-oro-" version ".tar.gz"))
10527 (sha256
10528 (base32
10529 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10530 (modules '((guix build utils)))
10531 (snippet
10532 `(begin
10533 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10534 #t))))
10535 (build-system ant-build-system)
10536 (arguments
10537 `(#:build-target "package"
10538 #:tests? #f; tests are run as part of the build process
10539 #:phases
10540 (modify-phases %standard-phases
10541 (replace 'install
10542 (install-jars ,(string-append "jakarta-oro-" version))))))
10543 (home-page "https://jakarta.apache.org/oro/")
10544 (synopsis "Text-processing for Java")
10545 (description "The Jakarta-ORO Java classes are a set of text-processing
10546 Java classes that provide Perl5 compatible regular expressions, AWK-like
10547 regular expressions, glob expressions, and utility classes for performing
10548 substitutions, splits, filtering filenames, etc. This library is the successor
10549 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10550 from ORO, Inc.")
10551 (license license:asl1.1)))
10552
10553 (define-public java-native-access
10554 (package
10555 (name "java-native-access")
10556 (version "4.5.1")
10557 (source (origin
10558 (method url-fetch)
10559 (uri (string-append "https://github.com/java-native-access/jna/"
10560 "archive/" version ".tar.gz"))
10561 (file-name (string-append name "-" version ".tar.gz"))
10562 (sha256
10563 (base32
10564 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10565 (modules '((guix build utils)))
10566 (snippet
10567 `(begin
10568 (for-each delete-file (find-files "." ".*.jar"))
10569 (delete-file-recursively "native/libffi")
10570 (delete-file-recursively "dist")
10571 #t))))
10572 (build-system ant-build-system)
10573 (arguments
10574 `(#:tests? #f; FIXME: tests require reflections.jar
10575 #:test-target "test"
10576 #:make-flags (list "-Ddynlink.native=true")
10577 #:phases
10578 (modify-phases %standard-phases
10579 (add-before 'build 'fix-build.xml
10580 (lambda* (#:key inputs #:allow-other-keys)
10581 (substitute* "build.xml"
10582 ;; Since we removed the bundled ant.jar, give the correct path
10583 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10584 ;; We removed generated native libraries. We can only rebuild one
10585 ;; so don't fail if we can't find a native library for another architecture.
10586 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10587 ;; Copy test dependencies
10588 (copy-file (string-append (assoc-ref inputs "java-junit")
10589 "/share/java/junit.jar")
10590 "lib/junit.jar")
10591 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10592 "/share/java/hamcrest-core.jar")
10593 "lib/hamcrest-core.jar")
10594 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10595 #t))
10596 (add-before 'build 'build-native
10597 (lambda _
10598 (invoke "ant" "-Ddynlink.native=true" "native")
10599 #t))
10600 (replace 'install
10601 (install-jars "build")))))
10602 (inputs
10603 `(("libffi" ,libffi)
10604 ("libx11" ,libx11)
10605 ("libxt" ,libxt)))
10606 (native-inputs
10607 `(("java-junit" ,java-junit)
10608 ("java-hamcrest-core" ,java-hamcrest-core)))
10609 (home-page "https://github.com/java-native-access/jna")
10610 (synopsis "Access to native shared libraries from Java")
10611 (description "JNA provides Java programs easy access to native shared
10612 libraries without writing anything but Java code - no JNI or native code is
10613 required. JNA allows you to call directly into native functions using natural
10614 Java method invocation.")
10615 ;; Java Native Access project (JNA) is dual-licensed under 2
10616 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10617 (license (list
10618 license:asl2.0
10619 license:lgpl2.1+))))
10620
10621 (define-public java-native-access-platform
10622 (package
10623 (inherit java-native-access)
10624 (name "java-native-access-platform")
10625 (arguments
10626 `(#:test-target "test"
10627 #:tests? #f; require jna-test.jar
10628 #:phases
10629 (modify-phases %standard-phases
10630 (add-before 'build 'chdir
10631 (lambda _
10632 (chdir "contrib/platform")
10633 #t))
10634 (add-after 'chdir 'fix-ant
10635 (lambda* (#:key inputs #:allow-other-keys)
10636 (substitute* "nbproject/project.properties"
10637 (("../../build/jna.jar")
10638 (string-append (assoc-ref inputs "java-native-access")
10639 "/share/java/jna.jar"))
10640 (("../../lib/hamcrest-core-.*.jar")
10641 (string-append (assoc-ref inputs "java-hamcrest-core")
10642 "/share/java/hamcrest-core.jar"))
10643 (("../../lib/junit.jar")
10644 (string-append (assoc-ref inputs "java-junit")
10645 "/share/java/junit.jar")))
10646 #t))
10647 (replace 'install
10648 (install-jars "dist")))))
10649 (inputs
10650 `(("java-native-access" ,java-native-access)))
10651 (synopsis "Cross-platform mappings for jna")
10652 (description "java-native-access-platfrom has cross-platform mappings
10653 and mappings for a number of commonly used platform functions, including a
10654 large number of Win32 mappings as well as a set of utility classes that
10655 simplify native access.")))
10656
10657 (define-public java-jsch-agentproxy-core
10658 (package
10659 (name "java-jsch-agentproxy-core")
10660 (version "0.0.8")
10661 (source (origin
10662 (method url-fetch)
10663 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10664 version ".tar.gz"))
10665 (file-name (string-append name "-" version ".tar.gz"))
10666 (sha256
10667 (base32
10668 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10669 (build-system ant-build-system)
10670 (arguments
10671 `(#:jar-name "jsch-agentproxy-core.jar"
10672 #:source-dir "jsch-agent-proxy-core/src/main/java"
10673 #:tests? #f)); no tests
10674 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10675 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10676 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10677 and Pageant included Putty. It will be easily integrated into JSch, and users
10678 will be allowed to use these programs for authentication.")
10679 (license license:bsd-3)))
10680
10681 (define-public java-jsch-agentproxy-sshagent
10682 (package
10683 (inherit java-jsch-agentproxy-core)
10684 (name "java-jsch-agentproxy-sshagent")
10685 (arguments
10686 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10687 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10688 #:tests? #f)); no tests
10689 (inputs
10690 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10691 (synopsis "Proxy to ssh-agent")
10692 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10693 and Pageant included in Putty. This component contains the code for a proxy to
10694 ssh-agent.")))
10695
10696 (define-public java-jsch-agentproxy-usocket-jna
10697 (package
10698 (inherit java-jsch-agentproxy-core)
10699 (name "java-jsch-agentproxy-usocket-jna")
10700 (arguments
10701 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10702 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10703 #:tests? #f)); no tests
10704 (inputs
10705 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10706 ("java-native-access" ,java-native-access)))
10707 (synopsis "USocketFactory implementation using JNA")
10708 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10709 and Pageant included in Putty. This component contains an implementation of
10710 USocketFactory using @dfn{JNA} (Java Native Access).")))
10711
10712 (define-public java-jsch-agentproxy-pageant
10713 (package
10714 (inherit java-jsch-agentproxy-core)
10715 (name "java-jsch-agentproxy-pageant")
10716 (arguments
10717 `(#:jar-name "jsch-agentproxy-pageant.jar"
10718 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10719 #:tests? #f)); no tests
10720 (inputs
10721 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10722 ("java-native-access" ,java-native-access)
10723 ("java-native-access-platform" ,java-native-access-platform)))
10724 (synopsis "Proxy to pageant")
10725 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10726 and Pageant included in Putty. This component contains the code for a proxy to
10727 pageant.")))
10728
10729 (define-public java-jsch-agentproxy-usocket-nc
10730 (package
10731 (inherit java-jsch-agentproxy-core)
10732 (name "java-jsch-agentproxy-usocket-nc")
10733 (arguments
10734 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10735 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10736 #:tests? #f)); no tests
10737 (inputs
10738 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10739 (synopsis "USocketFactory implementation using netcat")
10740 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10741 and Pageant included in Putty. This component contains an implementation of
10742 USocketFactory using netcat.")))
10743
10744 (define-public java-jsch-agentproxy-connector-factory
10745 (package
10746 (inherit java-jsch-agentproxy-core)
10747 (name "java-jsch-agentproxy-connector-factory")
10748 (arguments
10749 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
10750 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
10751 #:tests? #f)); no tests
10752 (inputs
10753 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10754 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
10755 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
10756 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
10757 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
10758 (synopsis "Connector factory for jsch agent proxy")
10759 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10760 and Pageant included in Putty. This component contains a connector factory.")))
10761
10762 (define-public java-jsch-agentproxy-jsch
10763 (package
10764 (inherit java-jsch-agentproxy-core)
10765 (name "java-jsch-agentproxy-jsch")
10766 (arguments
10767 `(#:jar-name "jsch-agentproxy-jsch.jar"
10768 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
10769 #:tests? #f)); no tests
10770 (inputs
10771 `(("java-jsch" ,java-jsch)
10772 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10773 (synopsis "JSch integration library for agentproxy")
10774 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10775 and Pageant included in Putty. This component contains a library to use
10776 jsch-agent-proxy with JSch.")))
10777
10778 (define-public java-apache-ivy
10779 (package
10780 (name "java-apache-ivy")
10781 (version "2.4.0")
10782 (source (origin
10783 (method url-fetch)
10784 (uri (string-append "mirror://apache//ant/ivy/" version
10785 "/apache-ivy-" version "-src.tar.gz"))
10786 (sha256
10787 (base32
10788 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
10789 (patches
10790 (search-patches
10791 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
10792 (build-system ant-build-system)
10793 (arguments
10794 `(#:jar-name "ivy.jar"
10795 #:tests? #f
10796 #:phases
10797 (modify-phases %standard-phases
10798 (add-before 'build 'remove-example
10799 (lambda _
10800 (delete-file-recursively "src/example")
10801 #t))
10802 (add-before 'build 'copy-resources
10803 (lambda _
10804 (with-directory-excursion "src/java"
10805 (for-each (lambda (file)
10806 (install-file file (string-append "../../build/classes/" (dirname file))))
10807 (append
10808 (find-files "." ".*.css")
10809 (find-files "." ".*.ent")
10810 (find-files "." ".*.html")
10811 (find-files "." ".*.properties")
10812 (find-files "." ".*.xsd")
10813 (find-files "." ".*.xsl")
10814 (find-files "." ".*.xml"))))
10815 #t))
10816 (add-before 'build 'fix-vfs
10817 (lambda _
10818 (substitute*
10819 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
10820 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
10821 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
10822 #t))
10823 (add-before 'install 'copy-manifest
10824 (lambda _
10825 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
10826 #t))
10827 (add-before 'install 'repack
10828 (lambda _
10829 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
10830 "-C" "build/classes" ".")))
10831 (add-after 'install 'install-bin
10832 (lambda* (#:key outputs #:allow-other-keys)
10833 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
10834 (ivy (string-append bin "/ivy"))
10835 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
10836 (mkdir-p bin)
10837 (with-output-to-file ivy
10838 (lambda _
10839 (display (string-append
10840 "#!" (which "sh") "\n"
10841 "if [[ -z $CLASSPATH ]]; then\n"
10842 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
10843 "else\n"
10844 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
10845 "fi\n"
10846 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
10847 (chmod ivy #o755)
10848 #t))))))
10849 (inputs
10850 `(("java-bouncycastle" ,java-bouncycastle)
10851 ("java-commons-cli" ,java-commons-cli)
10852 ("java-commons-collections" ,java-commons-collections)
10853 ("java-commons-httpclient" ,java-commons-httpclient)
10854 ("java-commons-lang" ,java-commons-lang)
10855 ("java-commons-vfs" ,java-commons-vfs)
10856 ("java-jakarta-oro" ,java-jakarta-oro)
10857 ("java-jsch" ,java-jsch)
10858 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10859 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
10860 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
10861 ("java-junit" ,java-junit)))
10862 (home-page "https://ant.apache.org/ivy")
10863 (synopsis "Dependency manager for the Java programming language")
10864 (description "Ivy is a tool for managing (recording, tracking, resolving
10865 and reporting) project dependencies. It is characterized by the following:
10866
10867 @itemize
10868 @item flexibility and configurability - Ivy is essentially process agnostic
10869 and is not tied to any methodology or structure. Instead it provides the
10870 necessary flexibility and configurability to be adapted to a broad range
10871 of dependency management and build processes.
10872 @item tight integration with Apache Ant - while available as a standalone tool,
10873 Ivy works particularly well with Apache Ant providing a number of
10874 powerful Ant tasks ranging from dependency resolution to dependency
10875 reporting and publication.
10876 @end itemize")
10877 (license license:asl2.0)))
10878
10879 (define-public java-eclipse-sisu-inject
10880 (package
10881 (name "java-eclipse-sisu-inject")
10882 (version "0.3.3")
10883 (source (origin
10884 (method git-fetch)
10885 (uri (git-reference
10886 (url "https://github.com/eclipse/sisu.inject/")
10887 (commit "releases/0.3.3")))
10888 (file-name (git-file-name name version))
10889 (sha256
10890 (base32
10891 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
10892 (build-system ant-build-system)
10893 (arguments
10894 `(#:jar-name "eclipse-sisu-inject.jar"
10895 #:source-dir "org.eclipse.sisu.inject/src"
10896 #:jdk ,icedtea-8
10897 #:tests? #f)); no tests
10898 (inputs
10899 `(("java-guice" ,java-guice)
10900 ("java-guice-servlet" ,java-guice-servlet)
10901 ("java-javax-inject" ,java-javax-inject)
10902 ("java-javaee-servletapi" ,java-javaee-servletapi)
10903 ("java-junit" ,java-junit)
10904 ("java-slf4j-api" ,java-slf4j-api)
10905 ("java-jsr305" ,java-jsr305)
10906 ("java-jsr250" ,java-jsr250)
10907 ("java-cdi-api" ,java-cdi-api)
10908 ("java-osgi-framework" ,java-osgi-framework)
10909 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
10910 ("java-testng" ,java-testng)))
10911 (home-page "https://www.eclipse.org/sisu/")
10912 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
10913 (description "Sisu is a modular JSR330-based container that supports
10914 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
10915 Google-Guice to perform dependency injection and provide the core JSR330
10916 support, but removes the need to write explicit bindings in Guice modules.
10917 Integration with other containers via the Eclipse Extension Registry and the
10918 OSGi Service Registry is a goal of this project.")
10919 (license license:epl1.0)))
10920
10921 (define-public java-eclipse-sisu-plexus
10922 (package
10923 (name "java-eclipse-sisu-plexus")
10924 (version "0.3.4")
10925 (source (origin
10926 (method git-fetch)
10927 (uri (git-reference
10928 (url "https://github.com/eclipse/sisu.plexus.git")
10929 (commit (string-append "releases/" version))))
10930 (file-name (git-file-name name version))
10931 (sha256
10932 (base32
10933 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
10934 (modules '((guix build utils)))
10935 (snippet
10936 '(begin
10937 (for-each delete-file (find-files "." ".*.jar"))
10938 (rename-file "org.eclipse.sisu.plexus.tests/src"
10939 "org.eclipse.sisu.plexus.tests/java")
10940 #t))))
10941 (build-system ant-build-system)
10942 (arguments
10943 `(#:jar-name "eclipse-sisu-plexus.jar"
10944 #:source-dir "org.eclipse.sisu.plexus/src"
10945 #:test-dir "org.eclipse.sisu.plexus.tests"
10946 #:test-exclude
10947 (list
10948 ;; This test fails probably because we can't generate the necessary
10949 ;; meta-inf files.
10950 "**/PlexusLoggingTest.*"
10951 ;; FIXME: This test fails because of some injection error
10952 "**/PlexusRequirementTest.*")
10953 #:jdk ,icedtea-8
10954 #:phases
10955 (modify-phases %standard-phases
10956 (add-before 'build 'copy-resources
10957 (lambda _
10958 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
10959 "build/classes/META-INF/plexus")
10960 #t))
10961 (add-before 'check 'build-test-jar
10962 (lambda _
10963 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
10964 (mkdir "build")
10965 (with-directory-excursion "java"
10966 (apply invoke "javac" "-cp"
10967 (string-append (getenv "CLASSPATH")
10968 ":../../../../../build/classes")
10969 (find-files "." ".*.java"))
10970 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
10971 (find-files "." ".*.jar")))
10972 (mkdir-p "build/META-INF/plexus")
10973 (copy-file "resources/META-INF/plexus/components.xml"
10974 "build/META-INF/plexus/components.xml")
10975 (with-directory-excursion "build"
10976 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
10977 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
10978 (copy-recursively "META-INF" "../build/test-classes/META-INF")
10979 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
10980 (("resources/component-jar")
10981 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
10982 #t)))))
10983 (inputs
10984 `(("java-plexus-classworlds" ,java-plexus-classworlds)
10985 ("java-plexus-util" ,java-plexus-utils)
10986 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
10987 ("java-osgi-framework" ,java-osgi-framework)
10988 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
10989 ("java-guice" ,java-guice)
10990 ("java-javax-inject" ,java-javax-inject)
10991 ("java-slf4j-api" ,java-slf4j-api)
10992 ("java-junit" ,java-junit)))
10993 (native-inputs
10994 `(("java-guava" ,java-guava)
10995 ("java-aopalliance" ,java-aopalliance)
10996 ("java-cglib" ,java-cglib)
10997 ("java-asm" ,java-asm)))
10998 (home-page "https://www.eclipse.org/sisu/")
10999 (synopsis "Plexus support for the sisu container")
11000 (description "Sisu is a modular JSR330-based container that supports
11001 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11002 adds Plexus support to the Sisu-Inject container.")
11003 (license license:epl1.0)))
11004
11005 (define-public java-commons-compiler
11006 (package
11007 (name "java-commons-compiler")
11008 (version "3.0.8")
11009 (source (origin
11010 (method git-fetch)
11011 (uri (git-reference
11012 (url "https://github.com/janino-compiler/janino")
11013 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11014 (file-name (string-append name "-" version))
11015 (sha256
11016 (base32
11017 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11018 (modules '((guix build utils)))
11019 (snippet
11020 '(begin
11021 (for-each delete-file
11022 (find-files "." "\\.jar$"))
11023 #t))))
11024 (build-system ant-build-system)
11025 (arguments
11026 `(#:jar-name "commons-compiler.jar"
11027 #:source-dir "commons-compiler/src/main"
11028 #:tests? #f)); no tests
11029 (home-page "https://github.com/janino-compiler/janino")
11030 (synopsis "Java compiler")
11031 (description "Commons-compiler contains an API for janino, including the
11032 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11033 and @code{ISimpleCompiler} interfaces.")
11034 (license license:bsd-3)))
11035
11036 (define-public java-janino
11037 (package
11038 (inherit java-commons-compiler)
11039 (name "java-janino")
11040 (arguments
11041 `(#:jar-name "janino.jar"
11042 #:source-dir "src/main/java"
11043 #:phases
11044 (modify-phases %standard-phases
11045 (add-before 'configure 'chdir
11046 (lambda _
11047 (chdir "janino")
11048 #t)))))
11049 (inputs
11050 `(("java-commons-compiler" ,java-commons-compiler)))
11051 (native-inputs
11052 `(("java-junit" ,java-junit)
11053 ("java-hamcrest-core" ,java-hamcrest-core)))
11054 (description "Janino is a Java compiler. Janino can compile a set of
11055 source files to a set of class files like @code{javac}, but also compile a
11056 Java expression, block, class body or source file in memory, load the bytecode
11057 and execute it directly in the same JVM. @code{janino} can also be used for
11058 static code analysis or code manipulation.")))
11059
11060 (define-public java-logback-core
11061 (package
11062 (name "java-logback-core")
11063 (version "1.2.3")
11064 (source (origin
11065 (method url-fetch)
11066 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11067 version ".tar.gz"))
11068 (file-name (string-append name "-" version ".tar.gz"))
11069 (sha256
11070 (base32
11071 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11072 (modules '((guix build utils)))
11073 (snippet
11074 '(begin
11075 (delete-file-recursively "logback-access/lib")
11076 #t))))
11077 (build-system ant-build-system)
11078 (arguments
11079 `(#:jar-name "logback.jar"
11080 #:source-dir "src/main/java"
11081 #:test-dir "src/test"
11082 #:test-exclude
11083 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11084 ;; which creates FastClasses
11085 (list "**/AllCoreTest.*"
11086 "**/AutoFlushingObjectWriterTest.*"
11087 "**/PackageTest.*"
11088 "**/ResilientOutputStreamTest.*"
11089 ;; And we still don't want to run abstract classes
11090 "**/Abstract*.*")
11091 #:phases
11092 (modify-phases %standard-phases
11093 (add-before 'configure 'chdir
11094 (lambda _
11095 (chdir "logback-core")
11096 #t)))))
11097 (inputs
11098 `(("java-javax-mail" ,java-javax-mail)
11099 ("servlet" ,java-javaee-servletapi)
11100 ("java-commons-compiler" ,java-commons-compiler)
11101 ("java-janino" ,java-janino)))
11102 (native-inputs
11103 `(("java-junit" ,java-junit)
11104 ("java-hamcrest-core" ,java-hamcrest-core)
11105 ("java-mockito-1" ,java-mockito-1)
11106 ("java-cglib" ,java-cglib)
11107 ("java-asm" ,java-asm)
11108 ("java-objenesis" ,java-objenesis)
11109 ("java-joda-time" ,java-joda-time)))
11110 (home-page "https://logback.qos.ch")
11111 (synopsis "Logging for java")
11112 (description "Logback is intended as a successor to the popular log4j project.
11113 This module lays the groundwork for the other two modules.")
11114 ;; Either epl1.0 or lgpl2.1
11115 (license (list license:epl1.0
11116 license:lgpl2.1))))
11117
11118 (define-public java-logback-classic
11119 (package
11120 (inherit java-logback-core)
11121 (name "java-logback-classic")
11122 (arguments
11123 `(#:jar-name "logback-classic.jar"
11124 #:source-dir "src/main/java"
11125 #:test-dir "src/test"
11126 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11127 #:jdk ,icedtea-8
11128 #:phases
11129 (modify-phases %standard-phases
11130 (add-before 'configure 'chdir
11131 (lambda _
11132 (chdir "logback-classic")
11133 #t))
11134 (replace 'build
11135 (lambda* (#:key inputs #:allow-other-keys)
11136 (mkdir-p "build/classes")
11137 (setenv "CLASSPATH"
11138 (string-join
11139 (apply append (map (lambda (input)
11140 (find-files (assoc-ref inputs input)
11141 ".*.jar"))
11142 '("java-logback-core" "java-slf4j-api"
11143 "java-commons-compiler" "servlet"
11144 "groovy")))
11145 ":"))
11146 (apply invoke "groovyc" "-d" "build/classes" "-j"
11147 (find-files "src/main/" ".*\\.(groovy|java)$"))
11148 (invoke "ant" "jar")
11149 #t)))))
11150 (inputs
11151 `(("java-logback-core" ,java-logback-core)
11152 ("java-slf4j-api" ,java-slf4j-api)
11153 ,@(package-inputs java-logback-core)))
11154 (native-inputs
11155 `(("groovy" ,groovy)))
11156 (description "Logback is intended as a successor to the popular log4j project.
11157 This module can be assimilated to a significantly improved version of log4j.
11158 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11159 can readily switch back and forth between logback and other logging frameworks
11160 such as log4j or @code{java.util.logging} (JUL).")))
11161
11162 (define-public java-qdox
11163 (package
11164 (name "java-qdox")
11165 ; Newer version exists, but this version is required by java-plexus-component-metadata
11166 (version "2.0-M2")
11167 (source (origin
11168 (method url-fetch)
11169 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
11170 ;; Older releases at https://github.com/codehaus/qdox/
11171 ;; Note: The release at maven is pre-generated. The release at
11172 ;; github requires jflex.
11173 (uri (string-append "http://central.maven.org/maven2/"
11174 "com/thoughtworks/qdox/qdox/" version
11175 "/qdox-" version "-sources.jar"))
11176 (sha256
11177 (base32
11178 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
11179 (build-system ant-build-system)
11180 (arguments
11181 `(#:jar-name "qdox.jar"
11182 #:tests? #f)); no tests
11183 (home-page "http://qdox.codehaus.org/")
11184 (synopsis "Parse definitions from Java source files")
11185 (description "QDox is a high speed, small footprint parser for extracting
11186 class/interface/method definitions from source files complete with JavaDoc
11187 @code{@@tags}. It is designed to be used by active code generators or
11188 documentation tools.")
11189 (license license:asl2.0)))
11190
11191 (define-public java-jgit
11192 (package
11193 (name "java-jgit")
11194 (version "4.7.0.201704051617-r")
11195 (source (origin
11196 (method url-fetch)
11197 (uri (string-append "https://repo1.maven.org/maven2/"
11198 "org/eclipse/jgit/org.eclipse.jgit/"
11199 version "/org.eclipse.jgit-"
11200 version "-sources.jar"))
11201 (sha256
11202 (base32
11203 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11204 (build-system ant-build-system)
11205 (arguments
11206 `(#:tests? #f ; There are no tests to run.
11207 #:jar-name "jgit.jar"
11208 ;; JGit must be built with a JDK supporting Java 8.
11209 #:jdk ,icedtea-8
11210 ;; Target our older default JDK.
11211 #:make-flags (list "-Dtarget=1.7")
11212 #:phases
11213 (modify-phases %standard-phases
11214 ;; The jar file generated by the default build.xml does not include
11215 ;; the text properties files, so we need to add them.
11216 (add-after 'build 'add-properties
11217 (lambda* (#:key jar-name #:allow-other-keys)
11218 (with-directory-excursion "src"
11219 (apply invoke "jar" "-uf"
11220 (string-append "../build/jar/" jar-name)
11221 (find-files "." "\\.properties$")))
11222 #t)))))
11223 (inputs
11224 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11225 ("java-javaewah" ,java-javaewah)
11226 ("java-jsch" ,java-jsch)
11227 ("java-slf4j-api" ,java-slf4j-api)))
11228 (home-page "https://eclipse.org/jgit/")
11229 (synopsis "Java library implementing the Git version control system")
11230 (description "JGit is a lightweight, pure Java library implementing the
11231 Git version control system, providing repository access routines, support for
11232 network protocols, and core version control algorithms.")
11233 (license license:edl1.0)))
11234
11235 ;; For axoloti. This package can still be built with icedtea-7, which is
11236 ;; currently used as the default JDK.
11237 (define-public java-jgit-4.2
11238 (package (inherit java-jgit)
11239 (version "4.2.0.201601211800-r")
11240 (source (origin
11241 (method url-fetch)
11242 (uri (string-append "https://repo1.maven.org/maven2/"
11243 "org/eclipse/jgit/org.eclipse.jgit/"
11244 version "/org.eclipse.jgit-"
11245 version "-sources.jar"))
11246 (sha256
11247 (base32
11248 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11249 (build-system ant-build-system)
11250 (arguments
11251 (substitute-keyword-arguments (package-arguments java-jgit)
11252 ;; Build for default JDK.
11253 ((#:jdk _) icedtea-7)
11254 ((#:phases phases)
11255 `(modify-phases ,phases
11256 (add-after 'unpack 'use-latest-javaewah-API
11257 (lambda _
11258 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11259 (("wordinbits") "WORD_IN_BITS"))
11260 #t))))))
11261 (inputs
11262 `(("java-javaewah" ,java-javaewah)
11263 ("java-jsch" ,java-jsch)
11264 ("java-slf4j-api" ,java-slf4j-api)))))
11265
11266 (define-public abcl
11267 (package
11268 (name "abcl")
11269 (version "1.5.0")
11270 (source
11271 (origin
11272 (method url-fetch)
11273 (uri (string-append "https://abcl.org/releases/"
11274 version "/abcl-src-" version ".tar.gz"))
11275 (sha256
11276 (base32
11277 "1hhvcg050nfpjbdmskc1cv2j38qi6qfl77a61b5cxx576kbff3lj"))
11278 (patches
11279 (search-patches
11280 "abcl-fix-build-xml.patch"))))
11281 (build-system ant-build-system)
11282 (native-inputs
11283 `(("java-junit" ,java-junit)))
11284 (arguments
11285 `(#:build-target "abcl.jar"
11286 #:test-target "abcl.test"
11287 #:phases
11288 (modify-phases %standard-phases
11289 (replace 'install
11290 (lambda* (#:key outputs #:allow-other-keys)
11291 (let ((share (string-append (assoc-ref outputs "out")
11292 "/share/java/"))
11293 (bin (string-append (assoc-ref outputs "out")
11294 "/bin/")))
11295 (mkdir-p share)
11296 (install-file "dist/abcl.jar" share)
11297 (install-file "dist/abcl-contrib.jar" share)
11298 (mkdir-p bin)
11299 (with-output-to-file (string-append bin "abcl")
11300 (lambda _
11301 (let ((classpath (string-append
11302 share "abcl.jar"
11303 ":"
11304 share "abcl-contrib.jar")))
11305 (display (string-append
11306 "#!" (which "sh") "\n"
11307 "if [[ -z $CLASSPATH ]]; then\n"
11308 " cp=\"" classpath "\"\n"
11309 "else\n"
11310 " cp=\"" classpath ":$CLASSPATH\"\n"
11311 "fi\n"
11312 "exec " (which "java")
11313 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11314 (chmod (string-append bin "abcl") #o755)
11315 #t))))))
11316 (home-page "https://abcl.org/")
11317 (synopsis "Common Lisp Implementation on the JVM")
11318 (description
11319 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11320 Lisp language featuring both an interpreter and a compiler, running in the
11321 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11322 in any Java application. Additionally, it can be used to implement (parts of)
11323 the application using Java to Lisp integration APIs.")
11324 (license (list license:gpl2+
11325 ;; named-readtables is released under 3 clause BSD
11326 license:bsd-3
11327 ;; jfli is released under CPL 1.0
11328 license:cpl1.0))))
11329
11330 (define-public java-jsonp-api
11331 (package
11332 (name "java-jsonp-api")
11333 (version "1.1.5")
11334 (source (origin
11335 (method git-fetch)
11336 (uri (git-reference
11337 (url "https://github.com/eclipse-ee4j/jsonp")
11338 (commit (string-append version "-RELEASE"))))
11339 (file-name (git-file-name name version))
11340 (sha256
11341 (base32
11342 "0nxq16lrx7i87hgyj5rzcwilvr67h0i299gygfn8f5vs4n7n59vy"))))
11343 (build-system ant-build-system)
11344 (arguments
11345 `(#:jar-name "jsonp-api.jar"
11346 #:tests? #f
11347 #:source-dir "api/src/main/java"
11348 #:test-dir "api/src/test"))
11349 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11350 (synopsis "JSON Processing in Java")
11351 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11352 parse, generate, transform and query) JSON messages. It produces and
11353 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11354 and allows to build a Java object model for JSON text using API classes
11355 (similar to DOM API for XML).")
11356 ;; either gpl2 only with classpath exception, or epl2.0.
11357 (license (list license:gpl2
11358 license:epl2.0))))
11359
11360 (define-public java-jsonp-impl
11361 (package
11362 (inherit java-jsonp-api)
11363 (name "java-jsonp-impl")
11364 (arguments
11365 `(#:jar-name "jsonp-impl.jar"
11366 #:tests? #f
11367 #:source-dir "impl/src/main/java"
11368 #:test-dir "impl/src/test"))
11369 (propagated-inputs
11370 `(("java-jsonp-api" ,java-jsonp-api)))
11371 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11372 parse, generate, transform and query) JSON messages. This package contains
11373 a reference implementation of that API.")))
11374
11375 (define-public java-xmp
11376 (package
11377 (name "java-xmp")
11378 (version "5.1.3")
11379 (source (origin
11380 (method url-fetch)
11381 (uri (string-append "http://download.macromedia.com/pub/developer"
11382 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11383 (sha256
11384 (base32
11385 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11386 (build-system ant-build-system)
11387 (arguments
11388 `(#:build-target "build"
11389 #:tests? #f; no tests
11390 #:phases
11391 (modify-phases %standard-phases
11392 (add-after 'unpack 'chdir
11393 (lambda _
11394 (chdir "XMPCore")
11395 #t))
11396 (add-before 'build 'fix-timestamp
11397 (lambda _
11398 (substitute* "build.xml"
11399 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11400 #t))
11401 (replace 'install
11402 (install-jars "."))
11403 (add-after 'install 'install-doc
11404 (lambda* (#:key outputs #:allow-other-keys)
11405 (copy-recursively
11406 "docs"
11407 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11408 #t)))))
11409 (native-inputs
11410 `(("unzip" ,unzip)))
11411 (home-page "https://www.adobe.com/devnet/xmp.html")
11412 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11413 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11414 technology that allows you to embed data about a file, known as metadata,
11415 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11416 library and the API is similar.")
11417 (license license:bsd-3)))
11418
11419 (define-public java-metadata-extractor
11420 (package
11421 (name "java-metadata-extractor")
11422 (version "2.11.0")
11423 (source (origin
11424 (method git-fetch)
11425 (uri (git-reference
11426 (url "https://github.com/drewnoakes/metadata-extractor")
11427 (commit version)))
11428 (file-name (git-file-name name version))
11429 (sha256
11430 (base32
11431 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11432 (build-system ant-build-system)
11433 (arguments
11434 `(#:jar-name "metadata-extractor.jar"
11435 #:source-dir "Source"
11436 #:test-dir "Tests"
11437 #:phases
11438 (modify-phases %standard-phases
11439 (add-before 'check 'fix-test-dir
11440 (lambda _
11441 (substitute* "build.xml"
11442 (("/java\">") "\">"))
11443 #t)))))
11444 (propagated-inputs
11445 `(("java-xmp" ,java-xmp)))
11446 (native-inputs
11447 `(("java-hamcrest-core" ,java-hamcrest-core)
11448 ("java-junit" ,java-junit)))
11449 (home-page "https://github.com/drewnoakes/metadata-extractor")
11450 (synopsis "Extract metadata from image and video files")
11451 (description "Metadata-extractor is a straightforward Java library for
11452 reading metadata from image files. It is able to read metadata in Exif,
11453 IPTC, XMP, ICC and more formats.")
11454 (license license:asl2.0)))