gnu: java-plexus-classworlds: Don't use unstable tarball.
[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, 2020 Efraim Flashner <efraim@flashner.co.il>
13 ;;; Copyright © 2019, 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
14 ;;;
15 ;;; This file is part of GNU Guix.
16 ;;;
17 ;;; GNU Guix is free software; you can redistribute it and/or modify it
18 ;;; under the terms of the GNU General Public License as published by
19 ;;; the Free Software Foundation; either version 3 of the License, or (at
20 ;;; your option) any later version.
21 ;;;
22 ;;; GNU Guix is distributed in the hope that it will be useful, but
23 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
24 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 ;;; GNU General Public License for more details.
26 ;;;
27 ;;; You should have received a copy of the GNU General Public License
28 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
29
30 (define-module (gnu packages java)
31 #:use-module ((guix licenses) #:prefix license:)
32 #:use-module (guix packages)
33 #:use-module (guix download)
34 #:use-module (guix hg-download)
35 #:use-module (guix git-download)
36 #:use-module (guix svn-download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages attr)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages certs)
47 #:use-module (gnu packages cpio)
48 #:use-module (gnu packages cups)
49 #:use-module (gnu packages compression)
50 #:use-module (gnu packages elf)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages gawk)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages gcc)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages ghostscript) ;lcms
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages groovy)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages guile)
61 #:use-module (gnu packages icu4c)
62 #:use-module (gnu packages image)
63 #:use-module (gnu packages java-compression)
64 #:use-module (gnu packages libffi)
65 #:use-module (gnu packages linux) ;alsa
66 #:use-module (gnu packages maths)
67 #:use-module (gnu packages nss)
68 #:use-module (gnu packages onc-rpc)
69 #:use-module (gnu packages web)
70 #:use-module (gnu packages wget)
71 #:use-module (gnu packages pkg-config)
72 #:use-module (gnu packages perl)
73 #:use-module (gnu packages popt)
74 #:use-module (gnu packages kerberos)
75 #:use-module (gnu packages xml)
76 #:use-module (gnu packages xorg)
77 #:use-module (gnu packages texinfo)
78 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
79 #:use-module (srfi srfi-11)
80 #:use-module (ice-9 match))
81
82 \f
83 ;;;
84 ;;; Java bootstrap toolchain.
85 ;;;
86
87 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
88 ;; use it to build a simple version of GNU Classpath, the Java standard
89 ;; library. We chose version 0.93 because it is the last version that can be
90 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
91 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
92 ;; the last version of JamVM that works with a version of GNU classpath that
93 ;; does not require ECJ. These three packages make up the bootstrap JDK.
94
95 ;; This is sufficient to build an older version of Ant, which is needed to
96 ;; build an older version of ECJ, an incremental Java compiler, both of which
97 ;; are written in Java.
98 ;;
99 ;; ECJ is needed to build the latest release (0.99) and the development
100 ;; version of GNU Classpath. The development version of GNU Classpath has
101 ;; much more support for Java 1.6 than the latest release, but we need to
102 ;; build 0.99 first to get a working version of javah. ECJ, the development
103 ;; version of GNU Classpath, and the latest version of JamVM make up the
104 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
105 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
106 ;; Icedtea 3.x.
107
108 (define jikes
109 (package
110 (name "jikes")
111 (version "1.22")
112 (source (origin
113 (method url-fetch)
114 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
115 version "/jikes-" version ".tar.bz2"))
116 (sha256
117 (base32
118 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
119 (build-system gnu-build-system)
120 (home-page "http://jikes.sourceforge.net/")
121 (synopsis "Compiler for the Java language")
122 (description "Jikes is a compiler that translates Java source files as
123 defined in The Java Language Specification into the bytecoded instruction set
124 and binary format defined in The Java Virtual Machine Specification.")
125 (license license:ibmpl1.0)))
126
127 ;; This is the last version of GNU Classpath that can be built without ECJ.
128 (define classpath-bootstrap
129 (package
130 (name "classpath")
131 (version "0.93")
132 (source (origin
133 (method url-fetch)
134 (uri (string-append "mirror://gnu/classpath/classpath-"
135 version ".tar.gz"))
136 (sha256
137 (base32
138 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
139 (patches (search-patches "classpath-aarch64-support.patch"))))
140 (build-system gnu-build-system)
141 (arguments
142 `(#:configure-flags
143 (list (string-append "JAVAC="
144 (assoc-ref %build-inputs "jikes")
145 "/bin/jikes")
146 "--disable-Werror"
147 "--disable-gmp"
148 "--disable-gtk-peer"
149 "--disable-gconf-peer"
150 "--disable-plugin"
151 "--disable-dssi"
152 "--disable-alsa"
153 "--disable-gjdoc")
154 #:phases
155 (modify-phases %standard-phases
156 ;; XXX: This introduces a memory leak as we remove a call to free up
157 ;; memory for the file name string. This was necessary because of a
158 ;; runtime error that would have prevented us from building
159 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
160 ;; for the gnarly details.
161 (add-after 'unpack 'remove-call-to-free
162 (lambda _
163 (substitute* "native/jni/java-io/java_io_VMFile.c"
164 (("result = cpio_isFileExists.*" m)
165 (string-append m "\n//")))
166 #t))
167 (add-after 'install 'install-data
168 (lambda _ (invoke "make" "install-data"))))))
169 (native-inputs
170 `(("jikes" ,jikes)
171 ("fastjar" ,fastjar)
172 ("libltdl" ,libltdl)
173 ("pkg-config" ,pkg-config)))
174 (home-page "https://www.gnu.org/software/classpath/")
175 (synopsis "Essential libraries for Java")
176 (description "GNU Classpath is a project to create core class libraries
177 for use with runtimes, compilers and tools for the Java programming
178 language.")
179 ;; GPLv2 or later, with special linking exception.
180 (license license:gpl2+)))
181
182 ;; This is the last version of JamVM that works with a version of GNU
183 ;; classpath that does not require ECJ.
184 (define jamvm-1-bootstrap
185 (package
186 (name "jamvm")
187 (version "1.5.1")
188 (source (origin
189 (method url-fetch)
190 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
191 "JamVM%20" version "/jamvm-"
192 version ".tar.gz"))
193 (patches (search-patches "jamvm-arm.patch"))
194 (sha256
195 (base32
196 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
197 (snippet
198 '(begin
199 ;; Remove precompiled software.
200 (delete-file "lib/classes.zip")
201 #t))))
202 (build-system gnu-build-system)
203 (arguments
204 `(#:configure-flags
205 (list (string-append "--with-classpath-install-dir="
206 (assoc-ref %build-inputs "classpath"))
207 "--disable-int-caching"
208 "--enable-runtime-reloc-checks"
209 "--enable-ffi")))
210 (inputs
211 `(("classpath" ,classpath-bootstrap)
212 ("jikes" ,jikes)
213 ("libffi" ,libffi)
214 ("zip" ,zip)
215 ("zlib" ,zlib)))
216 ;; When built with a recent GCC and glibc the configure step of icedtea-6
217 ;; fails with an invalid instruction error.
218 (native-inputs
219 `(("gcc" ,gcc-5)
220 ("libc" ,glibc-2.28)))
221 (home-page "http://jamvm.sourceforge.net/")
222 (synopsis "Small Java Virtual Machine")
223 (description "JamVM is a Java Virtual Machine conforming to the JVM
224 specification edition 2 (blue book). It is extremely small. However, unlike
225 other small VMs it supports the full spec, including object finalisation and
226 JNI.")
227 (license license:gpl2+)))
228
229 (define ant-bootstrap
230 (package
231 (name "ant-bootstrap")
232 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
233 ;; are not supported. The 1.8.x series is the last to use only features
234 ;; supported by Jikes.
235 (version "1.8.4")
236 (source (origin
237 (method url-fetch)
238 (uri (string-append "http://archive.apache.org/dist/"
239 "ant/source/apache-ant-"
240 version "-src.tar.bz2"))
241 (sha256
242 (base32
243 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
244 (build-system gnu-build-system)
245 (arguments
246 `(#:imported-modules ((guix build syscalls)
247 ,@%gnu-build-system-modules)
248 #:modules ((srfi srfi-1)
249 (guix build gnu-build-system)
250 (guix build utils)
251 (guix build syscalls))
252 #:tests? #f ; no "check" target
253 #:phases
254 (modify-phases %standard-phases
255 (delete 'bootstrap)
256 (delete 'configure)
257 (replace 'build
258 (lambda* (#:key inputs #:allow-other-keys)
259 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
260 (setenv "JAVACMD"
261 (string-append (assoc-ref inputs "jamvm")
262 "/bin/jamvm"))
263 (setenv "JAVAC"
264 (string-append (assoc-ref inputs "jikes")
265 "/bin/jikes"))
266 (setenv "CLASSPATH"
267 (string-append (assoc-ref inputs "jamvm")
268 "/lib/rt.jar"))
269
270 ;; Ant complains if this file doesn't exist.
271 (setenv "HOME" "/tmp")
272 (with-output-to-file "/tmp/.ant.properties"
273 (lambda _ (display "")))
274
275 ;; Use jikes instead of javac for <javac ...> tags in build.xml
276 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
277
278 ;; jikes produces lots of warnings, but they are not very
279 ;; interesting, so we silence them.
280 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
281
282 ;; Without these JamVM options the build may freeze.
283 (substitute* "bootstrap.sh"
284 (("^\"\\$\\{JAVACMD\\}\" " m)
285 ,@(if (string-prefix? "armhf" (or (%current-system)
286 (%current-target-system)))
287 `((string-append m "-Xnocompact "))
288 `((string-append m "-Xnocompact -Xnoinlining ")))))
289
290 ;; Disable tests because we are bootstrapping and thus don't have
291 ;; any of the dependencies required to build and run the tests.
292 (substitute* "build.xml"
293 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
294 (invoke "bash" "bootstrap.sh"
295 (string-append "-Ddist.dir="
296 (assoc-ref %outputs "out")))))
297 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
298 (lambda* (#:key outputs #:allow-other-keys)
299 (define (repack-archive jar)
300 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
301 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
302 (with-directory-excursion dir
303 (invoke "unzip" jar))
304 (delete-file jar)
305 ;; XXX: copied from (gnu build install)
306 (for-each (lambda (file)
307 (let ((s (lstat file)))
308 (unless (eq? (stat:type s) 'symlink)
309 (utime file 0 0 0 0))))
310 (find-files dir #:directories? #t))
311 ;; It is important that the manifest appears first.
312 (with-directory-excursion dir
313 (let* ((files (find-files "." ".*" #:directories? #t))
314 ;; To ensure that the reference scanner can
315 ;; detect all store references in the jars
316 ;; we disable compression with the "-0" option.
317 (command (if (file-exists? manifest)
318 `("zip" "-0" "-X" ,jar ,manifest
319 ,@files)
320 `("zip" "-0" "-X" ,jar ,@files))))
321 (apply invoke command)))))
322 (for-each repack-archive
323 (find-files
324 (string-append (assoc-ref %outputs "out") "/lib")
325 "\\.jar$"))
326 #t))
327 (delete 'install))))
328 (native-inputs
329 `(("jikes" ,jikes)
330 ("jamvm" ,jamvm-1-bootstrap)
331 ("unzip" ,unzip)
332 ("zip" ,zip)))
333 (home-page "https://ant.apache.org")
334 (synopsis "Build tool for Java")
335 (description
336 "Ant is a platform-independent build tool for Java. It is similar to
337 make but is implemented using the Java language, requires the Java platform,
338 and is best suited to building Java projects. Ant uses XML to describe the
339 build process and its dependencies, whereas Make uses Makefile format.")
340 (license license:asl2.0)))
341
342 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
343 ;; compiler for Java 1.5.
344 (define ecj-bootstrap
345 (package
346 (name "ecj-bootstrap")
347 (version "3.2.2")
348 (source (origin
349 (method url-fetch)
350 (uri (string-append "http://archive.eclipse.org/eclipse/"
351 "downloads/drops/R-" version
352 "-200702121330/ecjsrc.zip"))
353 (sha256
354 (base32
355 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
356 ;; It would be so much easier if we could use the ant-build-system, but we
357 ;; cannot as we don't have ant at this point. We use ecj for
358 ;; bootstrapping the JDK.
359 (build-system gnu-build-system)
360 (arguments
361 `(#:modules ((guix build gnu-build-system)
362 (guix build utils)
363 (srfi srfi-1))
364 #:tests? #f ; there are no tests
365 #:phases
366 (modify-phases %standard-phases
367 (replace 'configure
368 (lambda* (#:key inputs #:allow-other-keys)
369 (setenv "CLASSPATH"
370 (string-join
371 (cons (string-append (assoc-ref inputs "jamvm")
372 "/lib/rt.jar")
373 (find-files (string-append
374 (assoc-ref inputs "ant-bootstrap")
375 "/lib")
376 "\\.jar$"))
377 ":"))
378 #t))
379 (replace 'build
380 (lambda* (#:key inputs #:allow-other-keys)
381 ;; The unpack phase enters the "org" directory by mistake.
382 (chdir "..")
383
384 ;; Create a simple manifest to make ecj executable.
385 (with-output-to-file "manifest"
386 (lambda _
387 (display "Manifest-Version: 1.0
388 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
389
390 ;; Compile it all!
391 (and (apply invoke "jikes"
392 (find-files "." "\\.java$"))
393 (invoke "fastjar" "cvfm"
394 "ecj-bootstrap.jar" "manifest" "."))))
395 (replace 'install
396 (lambda* (#:key outputs #:allow-other-keys)
397 (let ((share (string-append (assoc-ref outputs "out")
398 "/share/java/")))
399 (mkdir-p share)
400 (install-file "ecj-bootstrap.jar" share)
401 #t))))))
402 (native-inputs
403 `(("ant-bootstrap" ,ant-bootstrap)
404 ("unzip" ,unzip)
405 ("jikes" ,jikes)
406 ("jamvm" ,jamvm-1-bootstrap)
407 ("fastjar" ,fastjar)))
408 (home-page "https://eclipse.org")
409 (synopsis "Eclipse Java development tools core batch compiler")
410 (description "This package provides the Eclipse Java core batch compiler
411 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
412 requirement for all GNU Classpath releases after version 0.93.")
413 (license license:epl1.0)))
414
415 (define ecj-javac-wrapper
416 (package (inherit ecj-bootstrap)
417 (name "ecj-javac-wrapper")
418 (source #f)
419 (build-system trivial-build-system)
420 (arguments
421 `(#:modules ((guix build utils))
422 #:builder
423 (begin
424 (use-modules (guix build utils))
425 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
426 (target (string-append bin "/javac"))
427 (guile (string-append (assoc-ref %build-inputs "guile")
428 "/bin/guile"))
429 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
430 "/share/java/ecj-bootstrap.jar"))
431 (java (string-append (assoc-ref %build-inputs "jamvm")
432 "/bin/jamvm"))
433 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
434 "/share/classpath")))
435 (string-append jvmlib "/glibj.zip:"
436 jvmlib "/tools.zip"))))
437 (mkdir-p bin)
438 (with-output-to-file target
439 (lambda _
440 (format #t "#!~a --no-auto-compile\n!#\n" guile)
441 (write
442 `(begin (use-modules (ice-9 match)
443 (ice-9 receive)
444 (ice-9 hash-table)
445 (srfi srfi-1)
446 (srfi srfi-26))
447 (define defaults
448 '(("-bootclasspath" ,bootcp)
449 ("-source" "1.5")
450 ("-target" "1.5")
451 ("-cp" ".")))
452 (define (main args)
453 (let ((classpath (getenv "CLASSPATH")))
454 (setenv "CLASSPATH"
455 (string-join (list ,ecj
456 ,(string-append (assoc-ref %build-inputs "jamvm")
457 "/lib/rt.jar")
458 (or classpath ""))
459 ":")))
460 (receive (vm-args other-args)
461 ;; Separate VM arguments from arguments to ECJ.
462 (partition (cut string-prefix? "-J" <>)
463 (fold (lambda (default acc)
464 (if (member (first default) acc)
465 acc (append default acc)))
466 args defaults))
467 (apply system* ,java
468 (append
469 ;; Remove "-J" prefix
470 (map (cut string-drop <> 2) vm-args)
471 '("org.eclipse.jdt.internal.compiler.batch.Main")
472 (cons "-nowarn" other-args)))))
473 ;; Entry point
474 (let ((args (cdr (command-line))))
475 (if (null? args)
476 (format (current-error-port) "javac: no arguments given!\n")
477 (main args)))))))
478 (chmod target #o755)
479 #t))))
480 (native-inputs
481 `(("guile" ,guile-2.2)
482 ("ecj-bootstrap" ,ecj-bootstrap)
483 ("jamvm" ,jamvm-1-bootstrap)
484 ("classpath" ,classpath-bootstrap)))
485 (description "This package provides a wrapper around the @dfn{Eclipse
486 compiler for Java} (ecj) with a command line interface that is compatible with
487 the standard javac executable.")))
488
489 ;; The classpath-bootstrap was built without a virtual machine, so it does not
490 ;; provide a wrapper for javah. We cannot build the development version of
491 ;; Classpath without javah.
492 (define classpath-0.99
493 (package (inherit classpath-bootstrap)
494 (version "0.99")
495 (source (origin
496 (method url-fetch)
497 (uri (string-append "mirror://gnu/classpath/classpath-"
498 version ".tar.gz"))
499 (sha256
500 (base32
501 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
502 (patches (search-patches "classpath-aarch64-support.patch"))))
503 (arguments
504 `(#:configure-flags
505 (list (string-append "--with-ecj-jar="
506 (assoc-ref %build-inputs "ecj-bootstrap")
507 "/share/java/ecj-bootstrap.jar")
508 (string-append "JAVAC="
509 (assoc-ref %build-inputs "ecj-javac-wrapper")
510 "/bin/javac")
511 (string-append "JAVA="
512 (assoc-ref %build-inputs "jamvm")
513 "/bin/jamvm")
514 "GCJ_JAVAC_TRUE=no"
515 "ac_cv_prog_java_works=yes" ; trust me
516 "--disable-Werror"
517 "--disable-gmp"
518 "--disable-gtk-peer"
519 "--disable-gconf-peer"
520 "--disable-plugin"
521 "--disable-dssi"
522 "--disable-alsa"
523 "--disable-gjdoc")
524 #:phases
525 (modify-phases %standard-phases
526 (add-after 'install 'install-data
527 (lambda _ (invoke "make" "install-data"))))))
528 (native-inputs
529 `(("ecj-bootstrap" ,ecj-bootstrap)
530 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
531 ("fastjar" ,fastjar)
532 ("jamvm" ,jamvm-1-bootstrap)
533 ("classpath" ,classpath-bootstrap)
534 ("libltdl" ,libltdl)
535 ("pkg-config" ,pkg-config)))))
536
537 ;; We need this because classpath-bootstrap does not provide all of the tools
538 ;; we need to build classpath-devel.
539 (define classpath-jamvm-wrappers
540 (package (inherit classpath-0.99)
541 (name "classpath-jamvm-wrappers")
542 (source #f)
543 (build-system trivial-build-system)
544 (arguments
545 `(#:modules ((guix build utils))
546 #:builder
547 (begin
548 (use-modules (guix build utils))
549 (let* ((bash (assoc-ref %build-inputs "bash"))
550 (jamvm (assoc-ref %build-inputs "jamvm"))
551 (classpath (assoc-ref %build-inputs "classpath"))
552 (bin (string-append (assoc-ref %outputs "out")
553 "/bin/")))
554 (mkdir-p bin)
555 (for-each (lambda (tool)
556 (with-output-to-file (string-append bin tool)
557 (lambda _
558 ,@(if (string-prefix? "armhf" (or (%current-system)
559 (%current-target-system)))
560 `((format #t "#!~a/bin/sh
561 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
562 gnu.classpath.tools.~a.~a $@"
563 bash jamvm classpath tool
564 (if (string=? "native2ascii" tool)
565 "Native2ASCII" "Main")))
566 `((format #t "#!~a/bin/sh
567 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
568 gnu.classpath.tools.~a.~a $@"
569 bash jamvm classpath tool
570 (if (string=? "native2ascii" tool)
571 "Native2ASCII" "Main"))))))
572 (chmod (string-append bin tool) #o755))
573 (list "javah"
574 "rmic"
575 "rmid"
576 "orbd"
577 "rmiregistry"
578 "native2ascii"))
579 #t))))
580 (native-inputs
581 `(("bash" ,bash)
582 ("jamvm" ,jamvm-1-bootstrap)
583 ("classpath" ,classpath-0.99)))
584 (inputs '())
585 (synopsis "Executables from GNU Classpath")
586 (description "This package provides wrappers around the tools provided by
587 the GNU Classpath library. They are executed by the JamVM virtual
588 machine.")))
589
590 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
591 ;; then Classpath has gained much more support for Java 1.6.
592 (define-public classpath-devel
593 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
594 (revision "1"))
595 (package (inherit classpath-bootstrap)
596 (version (string-append "0.99-" revision "." (string-take commit 9)))
597 (source (origin
598 (method git-fetch)
599 (uri (git-reference
600 (url "https://git.savannah.gnu.org/git/classpath.git")
601 (commit commit)))
602 (file-name (string-append "classpath-" version "-checkout"))
603 (sha256
604 (base32
605 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))))
606 (arguments
607 `(#:make-flags
608 ;; Ensure that the initial heap size is smaller than the maximum
609 ;; size. By default only Xmx is set, which can lead to invalid
610 ;; memory settings on some machines with a lot of memory.
611 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
612 #:configure-flags
613 (list (string-append "--with-ecj-jar="
614 (assoc-ref %build-inputs "ecj-bootstrap")
615 "/share/java/ecj-bootstrap.jar")
616 (string-append "--with-javac="
617 (assoc-ref %build-inputs "ecj-javac-wrapper")
618 "/bin/javac")
619 (string-append "JAVA="
620 (assoc-ref %build-inputs "jamvm")
621 "/bin/jamvm")
622 "GCJ_JAVAC_TRUE=no"
623 "ac_cv_prog_java_works=yes" ; trust me
624 "--disable-Werror"
625 "--disable-gmp"
626 "--disable-gtk-peer"
627 "--disable-gconf-peer"
628 "--disable-plugin"
629 "--disable-dssi"
630 "--disable-alsa"
631 "--disable-gjdoc")
632 #:phases
633 (modify-phases %standard-phases
634 ;; XXX The bootstrap phase executes autogen.sh, which fails after
635 ;; complaining about the lack of gettext.
636 (replace 'bootstrap
637 (lambda _ (invoke "autoreconf" "-vif")))
638 (add-after 'unpack 'remove-unsupported-annotations
639 (lambda _
640 (substitute* (find-files "java" "\\.java$")
641 (("@Override") ""))
642 #t))
643 (add-after 'install 'install-data
644 (lambda _ (invoke "make" "install-data"))))))
645 (native-inputs
646 `(("autoconf" ,autoconf)
647 ("automake" ,automake)
648 ("libtool" ,libtool)
649 ("gettext" ,gettext-minimal)
650 ("texinfo" ,texinfo)
651 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
652 ("ecj-bootstrap" ,ecj-bootstrap)
653 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
654 ("fastjar" ,fastjar)
655 ("jamvm" ,jamvm-1-bootstrap)
656 ("libltdl" ,libltdl)
657 ("pkg-config" ,pkg-config))))))
658
659 (define jamvm
660 (package (inherit jamvm-1-bootstrap)
661 (version "2.0.0")
662 (source (origin
663 (method url-fetch)
664 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
665 "JamVM%20" version "/jamvm-"
666 version ".tar.gz"))
667 (sha256
668 (base32
669 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
670 (snippet
671 '(begin
672 ;; Remove precompiled software.
673 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
674 #t))))
675 (build-system gnu-build-system)
676 (arguments
677 `(#:configure-flags
678 (list (string-append "--with-classpath-install-dir="
679 (assoc-ref %build-inputs "classpath")))))
680 (inputs
681 `(("classpath" ,classpath-devel)
682 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
683 ("zip" ,zip)
684 ("zlib" ,zlib)))))
685
686 (define ecj-javac-wrapper-final
687 (package (inherit ecj-javac-wrapper)
688 (native-inputs
689 `(("guile" ,guile-2.2)
690 ("ecj-bootstrap" ,ecj-bootstrap)
691 ("jamvm" ,jamvm)
692 ("classpath" ,classpath-devel)))))
693
694 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
695 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
696 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
697 ;; which uses Java 6 only.
698 (define-public icedtea-6
699 (package
700 (name "icedtea")
701 (version "1.13.13")
702 (source (origin
703 (method url-fetch)
704 (uri (string-append
705 "http://icedtea.wildebeest.org/download/source/icedtea6-"
706 version ".tar.xz"))
707 (sha256
708 (base32
709 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
710 (modules '((guix build utils)))
711 (snippet
712 '(begin
713 (substitute* "Makefile.in"
714 ;; do not leak information about the build host
715 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
716 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
717 #t))))
718 (build-system gnu-build-system)
719 (outputs '("out" ; Java Runtime Environment
720 "jdk" ; Java Development Kit
721 "doc")) ; all documentation
722 (arguments
723 `(;; There are many failing tests and many are known to fail upstream.
724 #:tests? #f
725
726 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
727 ;; gremlin) doesn't support it yet, so skip this phase.
728 #:validate-runpath? #f
729
730 #:modules ((guix build utils)
731 (guix build gnu-build-system)
732 (srfi srfi-19))
733
734 #:configure-flags
735 `("--enable-bootstrap"
736 "--enable-nss"
737 "--without-rhino"
738 "--with-parallel-jobs"
739 "--disable-downloading"
740 "--disable-tests"
741 ,(string-append "--with-ecj="
742 (assoc-ref %build-inputs "ecj")
743 "/share/java/ecj-bootstrap.jar")
744 ,(string-append "--with-jar="
745 (assoc-ref %build-inputs "fastjar")
746 "/bin/fastjar")
747 ,(string-append "--with-jdk-home="
748 (assoc-ref %build-inputs "classpath"))
749 ,(string-append "--with-java="
750 (assoc-ref %build-inputs "jamvm")
751 "/bin/jamvm"))
752 #:phases
753 (modify-phases %standard-phases
754 (replace 'unpack
755 (lambda* (#:key source inputs #:allow-other-keys)
756 (invoke "tar" "xvf" source)
757 (chdir (string-append "icedtea6-" ,version))
758 (mkdir "openjdk")
759 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
760 ;; The convenient OpenJDK source bundle is no longer
761 ;; available for download, so we have to take the sources
762 ;; from the Mercurial repositories and change the Makefile
763 ;; to avoid tests for the OpenJDK zip archive.
764 (with-directory-excursion "openjdk"
765 (for-each (lambda (part)
766 (mkdir part)
767 (copy-recursively
768 (assoc-ref inputs
769 (string-append part "-src"))
770 part))
771 '("jdk" "corba"
772 "langtools" "jaxp" "jaxws")))
773 (with-directory-excursion "openjdk"
774 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
775 (rename-file "hg-checkout" "hotspot"))
776 (substitute* "patches/freetypeversion.patch"
777 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
778 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
779 (substitute* "Makefile.in"
780 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
781 "echo \"trust me\";")
782 ;; The contents of the bootstrap directory must be
783 ;; writeable but when copying from the store they are
784 ;; not.
785 (("mkdir -p lib/rt" line)
786 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
787 (invoke "chmod" "-R" "u+w" "openjdk")))
788 (add-after 'unpack 'use-classpath
789 (lambda* (#:key inputs #:allow-other-keys)
790 (let ((jvmlib (assoc-ref inputs "classpath"))
791 (jamvm (assoc-ref inputs "jamvm")))
792 ;; Classpath does not provide rt.jar.
793 (substitute* "Makefile.in"
794 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
795 (string-append jvmlib "/share/classpath/glibj.zip")))
796 ;; Make sure we can find all classes.
797 (setenv "CLASSPATH"
798 (string-append jvmlib "/share/classpath/glibj.zip:"
799 jvmlib "/share/classpath/tools.zip:"
800 jamvm "/lib/rt.jar"))
801 (setenv "JAVACFLAGS"
802 (string-append "-cp "
803 jvmlib "/share/classpath/glibj.zip:"
804 jvmlib "/share/classpath/tools.zip")))
805 #t))
806 (add-after 'unpack 'patch-patches
807 (lambda _
808 ;; shebang in patches so that they apply cleanly
809 (substitute* '("patches/jtreg-jrunscript.patch"
810 "patches/hotspot/hs23/drop_unlicensed_test.patch")
811 (("#!/bin/sh") (string-append "#!" (which "sh"))))
812 #t))
813 (add-after 'unpack 'patch-paths
814 (lambda* (#:key inputs #:allow-other-keys)
815 ;; buildtree.make generates shell scripts, so we need to replace
816 ;; the generated shebang
817 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
818 (("/bin/sh") (which "bash")))
819
820 (let ((corebin (string-append
821 (assoc-ref inputs "coreutils") "/bin/"))
822 (binbin (string-append
823 (assoc-ref inputs "binutils") "/bin/"))
824 (grepbin (string-append
825 (assoc-ref inputs "grep") "/bin/")))
826 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
827 "openjdk/corba/make/common/shared/Defs-linux.gmk")
828 (("UNIXCOMMAND_PATH = /bin/")
829 (string-append "UNIXCOMMAND_PATH = " corebin))
830 (("USRBIN_PATH = /usr/bin/")
831 (string-append "USRBIN_PATH = " corebin))
832 (("DEVTOOLS_PATH *= */usr/bin/")
833 (string-append "DEVTOOLS_PATH = " corebin))
834 (("COMPILER_PATH *= */usr/bin/")
835 (string-append "COMPILER_PATH = "
836 (assoc-ref inputs "gcc") "/bin/"))
837 (("DEF_OBJCOPY *=.*objcopy")
838 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
839
840 ;; fix path to alsa header
841 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
842 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
843 (string-append "ALSA_INCLUDE="
844 (assoc-ref inputs "alsa-lib")
845 "/include/alsa/version.h")))
846
847 ;; fix hard-coded utility paths
848 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
849 "openjdk/corba/make/common/shared/Defs-utils.gmk")
850 (("ECHO *=.*echo")
851 (string-append "ECHO = " (which "echo")))
852 (("^GREP *=.*grep")
853 (string-append "GREP = " (which "grep")))
854 (("EGREP *=.*egrep")
855 (string-append "EGREP = " (which "egrep")))
856 (("CPIO *=.*cpio")
857 (string-append "CPIO = " (which "cpio")))
858 (("READELF *=.*readelf")
859 (string-append "READELF = " (which "readelf")))
860 (("^ *AR *=.*ar")
861 (string-append "AR = " (which "ar")))
862 (("^ *TAR *=.*tar")
863 (string-append "TAR = " (which "tar")))
864 (("AS *=.*as")
865 (string-append "AS = " (which "as")))
866 (("LD *=.*ld")
867 (string-append "LD = " (which "ld")))
868 (("STRIP *=.*strip")
869 (string-append "STRIP = " (which "strip")))
870 (("NM *=.*nm")
871 (string-append "NM = " (which "nm")))
872 (("^SH *=.*sh")
873 (string-append "SH = " (which "bash")))
874 (("^FIND *=.*find")
875 (string-append "FIND = " (which "find")))
876 (("LDD *=.*ldd")
877 (string-append "LDD = " (which "ldd")))
878 (("NAWK *=.*(n|g)awk")
879 (string-append "NAWK = " (which "gawk")))
880 (("XARGS *=.*xargs")
881 (string-append "XARGS = " (which "xargs")))
882 (("UNZIP *=.*unzip")
883 (string-append "UNZIP = " (which "unzip")))
884 (("ZIPEXE *=.*zip")
885 (string-append "ZIPEXE = " (which "zip")))
886 (("SED *=.*sed")
887 (string-append "SED = " (which "sed"))))
888
889 ;; Some of these timestamps cause problems as they are more than
890 ;; 10 years ago, failing the build process.
891 (substitute*
892 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
893 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
894 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
895 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
896 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
897 #t)))
898 (add-before 'configure 'set-additional-paths
899 (lambda* (#:key inputs #:allow-other-keys)
900 (setenv "CPATH"
901 (string-append (assoc-ref inputs "libxrender")
902 "/include/X11/extensions" ":"
903 (assoc-ref inputs "libxtst")
904 "/include/X11/extensions" ":"
905 (assoc-ref inputs "libxinerama")
906 "/include/X11/extensions" ":"
907 (or (getenv "CPATH") "")))
908 (setenv "ALT_CUPS_HEADERS_PATH"
909 (string-append (assoc-ref inputs "cups")
910 "/include"))
911 (setenv "ALT_FREETYPE_HEADERS_PATH"
912 (string-append (assoc-ref inputs "freetype")
913 "/include"))
914 (setenv "ALT_FREETYPE_LIB_PATH"
915 (string-append (assoc-ref inputs "freetype")
916 "/lib"))
917 #t))
918 (add-before 'build 'disable-os-version-check
919 ;; allow build on linux major version change
920 (lambda _
921 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
922 #t))
923 (replace 'install
924 (lambda* (#:key outputs #:allow-other-keys)
925 (let ((doc (string-append (assoc-ref outputs "doc")
926 "/share/doc/icedtea"))
927 (jre (assoc-ref outputs "out"))
928 (jdk (assoc-ref outputs "jdk")))
929 (copy-recursively "openjdk.build/docs" doc)
930 (copy-recursively "openjdk.build/j2re-image" jre)
931 (copy-recursively "openjdk.build/j2sdk-image" jdk))
932 #t)))))
933 (native-inputs
934 `(("ant" ,ant-bootstrap)
935 ("alsa-lib" ,alsa-lib)
936 ("attr" ,attr)
937 ("classpath" ,classpath-devel)
938 ("coreutils" ,coreutils)
939 ("cpio" ,cpio)
940 ("cups" ,cups)
941 ("ecj" ,ecj-bootstrap)
942 ("ecj-javac" ,ecj-javac-wrapper-final)
943 ("fastjar" ,fastjar)
944 ("fontconfig" ,fontconfig)
945 ("freetype" ,freetype)
946 ("gtk" ,gtk+-2)
947 ("gawk" ,gawk)
948 ("giflib" ,giflib)
949 ("grep" ,grep)
950 ("jamvm" ,jamvm)
951 ("lcms" ,lcms)
952 ("libjpeg" ,libjpeg)
953 ("libnsl" ,libnsl)
954 ("libpng" ,libpng)
955 ("libtool" ,libtool)
956 ("libx11" ,libx11)
957 ("libxcomposite" ,libxcomposite)
958 ("libxi" ,libxi)
959 ("libxinerama" ,libxinerama)
960 ("libxrender" ,libxrender)
961 ("libxslt" ,libxslt) ;for xsltproc
962 ("libxt" ,libxt)
963 ("libxtst" ,libxtst)
964 ("mit-krb5" ,mit-krb5)
965 ("nss" ,nss)
966 ("nss-certs" ,nss-certs)
967 ("perl" ,perl)
968 ("pkg-config" ,pkg-config)
969 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
970 ("unzip" ,unzip)
971 ("wget" ,wget)
972 ("which" ,which)
973 ("zip" ,zip)
974 ("zlib" ,zlib)
975 ("openjdk-src"
976 ,(origin
977 (method hg-fetch)
978 (uri (hg-reference
979 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
980 (changeset "jdk6-b41")))
981 (sha256
982 (base32
983 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
984 ("jdk-src"
985 ,(origin
986 (method hg-fetch)
987 (uri (hg-reference
988 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
989 (changeset "jdk6-b41")))
990 (sha256
991 (base32
992 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
993 ("hotspot-src"
994 ,(origin
995 (method hg-fetch)
996 (uri (hg-reference
997 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
998 (changeset "jdk6-b41")))
999 (sha256
1000 (base32
1001 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1002 (patches
1003 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1004 ("corba-src"
1005 ,(origin
1006 (method hg-fetch)
1007 (uri (hg-reference
1008 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1009 (changeset "jdk6-b41")))
1010 (sha256
1011 (base32
1012 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1013 ("langtools-src"
1014 ,(origin
1015 (method hg-fetch)
1016 (uri (hg-reference
1017 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1018 (changeset "jdk6-b41")))
1019 (sha256
1020 (base32
1021 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1022 ("jaxp-src"
1023 ,(origin
1024 (method hg-fetch)
1025 (uri (hg-reference
1026 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1027 (changeset "jdk6-b41")))
1028 (sha256
1029 (base32
1030 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1031 ("jaxws-src"
1032 ,(origin
1033 (method hg-fetch)
1034 (uri (hg-reference
1035 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1036 (changeset "jdk6-b41")))
1037 (sha256
1038 (base32
1039 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1040 (home-page "http://icedtea.classpath.org")
1041 (synopsis "Java development kit")
1042 (description
1043 "This package provides the OpenJDK built with the IcedTea build harness.
1044 This version of the OpenJDK is no longer maintained and is only used for
1045 bootstrapping purposes.")
1046 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1047 ;; same license as both GNU Classpath and OpenJDK.
1048 (license license:gpl2+)))
1049
1050 (define-public icedtea-7
1051 (let* ((version "2.6.13")
1052 (drop (lambda (name hash)
1053 (origin
1054 (method url-fetch)
1055 (uri (string-append
1056 "http://icedtea.classpath.org/download/drops"
1057 "/icedtea7/" version "/" name ".tar.bz2"))
1058 (sha256 (base32 hash))))))
1059 (package
1060 (name "icedtea")
1061 (version version)
1062 (source (origin
1063 (method url-fetch)
1064 (uri (string-append
1065 "http://icedtea.wildebeest.org/download/source/icedtea-"
1066 version ".tar.xz"))
1067 (sha256
1068 (base32
1069 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1070 (modules '((guix build utils)))
1071 (snippet
1072 '(begin
1073 (substitute* "Makefile.in"
1074 ;; do not leak information about the build host
1075 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1076 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1077 #t))))
1078 (build-system gnu-build-system)
1079 (outputs '("out" ; Java Runtime Environment
1080 "jdk" ; Java Development Kit
1081 "doc")) ; all documentation
1082 (arguments
1083 `(;; There are many test failures. Some are known to
1084 ;; fail upstream, others relate to not having an X
1085 ;; server running at test time, yet others are a
1086 ;; complete mystery to me.
1087
1088 ;; hotspot: passed: 241; failed: 45; error: 2
1089 ;; langtools: passed: 1,934; failed: 26
1090 ;; jdk: unknown
1091 #:tests? #f
1092
1093 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1094 ;; gremlin) doesn't support it yet, so skip this phase.
1095 #:validate-runpath? #f
1096
1097 ;; Apparently, the C locale is needed for some of the tests.
1098 #:locale "C"
1099
1100 #:modules ((guix build utils)
1101 (guix build gnu-build-system)
1102 (ice-9 match)
1103 (ice-9 popen)
1104 (srfi srfi-19)
1105 (srfi srfi-26))
1106
1107 #:configure-flags
1108 ;; TODO: package pcsc and sctp, and add to inputs
1109 `("--disable-system-pcsc"
1110 "--disable-system-sctp"
1111 "--enable-bootstrap"
1112 "--enable-nss"
1113 "--without-rhino"
1114 "--disable-downloading"
1115 "--disable-tests" ;they are run in the check phase instead
1116 "--with-openjdk-src-dir=./openjdk.src"
1117 ,(string-append "--with-jdk-home="
1118 (assoc-ref %build-inputs "jdk")))
1119
1120 #:phases
1121 (modify-phases %standard-phases
1122 (replace 'unpack
1123 (lambda* (#:key source inputs #:allow-other-keys)
1124 (let ((target (string-append "icedtea-" ,version))
1125 (unpack (lambda* (name #:optional dir)
1126 (let ((dir (or dir
1127 (string-drop-right name 5))))
1128 (mkdir dir)
1129 (invoke "tar" "xvf"
1130 (assoc-ref inputs name)
1131 "-C" dir
1132 "--strip-components=1")))))
1133 (mkdir target)
1134 (invoke "tar" "xvf" source
1135 "-C" target "--strip-components=1")
1136 (chdir target)
1137 (unpack "openjdk-src" "openjdk.src")
1138 (with-directory-excursion "openjdk.src"
1139 (for-each unpack
1140 (filter (cut string-suffix? "-drop" <>)
1141 (map (match-lambda
1142 ((name . _) name))
1143 inputs))))
1144 #t)))
1145 (add-after 'unpack 'patch-bitrot
1146 (lambda _
1147 (substitute* '("patches/boot/revert-6973616.patch"
1148 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1149 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1150 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1151 ;; As of attr 2.4.48 this header is no longer
1152 ;; included. It is provided by the libc instead.
1153 (substitute* '("configure"
1154 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1155 (("attr/xattr.h") "sys/xattr.h"))
1156 #t))
1157 (add-after 'unpack 'fix-x11-extension-include-path
1158 (lambda* (#:key inputs #:allow-other-keys)
1159 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1160 (((string-append "\\$\\(firstword \\$\\(wildcard "
1161 "\\$\\(OPENWIN_HOME\\)"
1162 "/include/X11/extensions\\).*$"))
1163 (string-append (assoc-ref inputs "libxrender")
1164 "/include/X11/extensions"
1165 " -I" (assoc-ref inputs "libxtst")
1166 "/include/X11/extensions"
1167 " -I" (assoc-ref inputs "libxinerama")
1168 "/include/X11/extensions"))
1169 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1170 #t))
1171 (add-after 'unpack 'patch-paths
1172 (lambda _
1173 ;; buildtree.make generates shell scripts, so we need to replace
1174 ;; the generated shebang
1175 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1176 (("/bin/sh") (which "bash")))
1177
1178 (let ((corebin (string-append
1179 (assoc-ref %build-inputs "coreutils") "/bin/"))
1180 (binbin (string-append
1181 (assoc-ref %build-inputs "binutils") "/bin/"))
1182 (grepbin (string-append
1183 (assoc-ref %build-inputs "grep") "/bin/")))
1184 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1185 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1186 (("UNIXCOMMAND_PATH = /bin/")
1187 (string-append "UNIXCOMMAND_PATH = " corebin))
1188 (("USRBIN_PATH = /usr/bin/")
1189 (string-append "USRBIN_PATH = " corebin))
1190 (("DEVTOOLS_PATH *= */usr/bin/")
1191 (string-append "DEVTOOLS_PATH = " corebin))
1192 (("COMPILER_PATH *= */usr/bin/")
1193 (string-append "COMPILER_PATH = "
1194 (assoc-ref %build-inputs "gcc") "/bin/"))
1195 (("DEF_OBJCOPY *=.*objcopy")
1196 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1197
1198 ;; fix path to alsa header
1199 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1200 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1201 (string-append "ALSA_INCLUDE="
1202 (assoc-ref %build-inputs "alsa-lib")
1203 "/include/alsa/version.h")))
1204
1205 ;; fix hard-coded utility paths
1206 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1207 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1208 (("ECHO *=.*echo")
1209 (string-append "ECHO = " (which "echo")))
1210 (("^GREP *=.*grep")
1211 (string-append "GREP = " (which "grep")))
1212 (("EGREP *=.*egrep")
1213 (string-append "EGREP = " (which "egrep")))
1214 (("CPIO *=.*cpio")
1215 (string-append "CPIO = " (which "cpio")))
1216 (("READELF *=.*readelf")
1217 (string-append "READELF = " (which "readelf")))
1218 (("^ *AR *=.*ar")
1219 (string-append "AR = " (which "ar")))
1220 (("^ *TAR *=.*tar")
1221 (string-append "TAR = " (which "tar")))
1222 (("AS *=.*as")
1223 (string-append "AS = " (which "as")))
1224 (("LD *=.*ld")
1225 (string-append "LD = " (which "ld")))
1226 (("STRIP *=.*strip")
1227 (string-append "STRIP = " (which "strip")))
1228 (("NM *=.*nm")
1229 (string-append "NM = " (which "nm")))
1230 (("^SH *=.*sh")
1231 (string-append "SH = " (which "bash")))
1232 (("^FIND *=.*find")
1233 (string-append "FIND = " (which "find")))
1234 (("LDD *=.*ldd")
1235 (string-append "LDD = " (which "ldd")))
1236 (("NAWK *=.*(n|g)awk")
1237 (string-append "NAWK = " (which "gawk")))
1238 (("XARGS *=.*xargs")
1239 (string-append "XARGS = " (which "xargs")))
1240 (("UNZIP *=.*unzip")
1241 (string-append "UNZIP = " (which "unzip")))
1242 (("ZIPEXE *=.*zip")
1243 (string-append "ZIPEXE = " (which "zip")))
1244 (("SED *=.*sed")
1245 (string-append "SED = " (which "sed"))))
1246
1247 ;; Some of these timestamps cause problems as they are more than
1248 ;; 10 years ago, failing the build process.
1249 (substitute*
1250 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1251 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1252 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1253 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1254 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1255 #t))
1256 (add-before 'configure 'set-additional-paths
1257 (lambda* (#:key inputs #:allow-other-keys)
1258 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1259 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1260 (string-append "ALSA_INCLUDE="
1261 (assoc-ref inputs "alsa-lib")
1262 "/include/alsa/version.h")))
1263 (setenv "CC" "gcc")
1264 (setenv "CPATH"
1265 (string-append (assoc-ref inputs "libxcomposite")
1266 "/include/X11/extensions" ":"
1267 (assoc-ref inputs "libxrender")
1268 "/include/X11/extensions" ":"
1269 (assoc-ref inputs "libxtst")
1270 "/include/X11/extensions" ":"
1271 (assoc-ref inputs "libxinerama")
1272 "/include/X11/extensions" ":"
1273 (or (getenv "CPATH") "")))
1274 (setenv "ALT_OBJCOPY" (which "objcopy"))
1275 (setenv "ALT_CUPS_HEADERS_PATH"
1276 (string-append (assoc-ref inputs "cups")
1277 "/include"))
1278 (setenv "ALT_FREETYPE_HEADERS_PATH"
1279 (string-append (assoc-ref inputs "freetype")
1280 "/include"))
1281 (setenv "ALT_FREETYPE_LIB_PATH"
1282 (string-append (assoc-ref inputs "freetype")
1283 "/lib"))
1284 #t))
1285 (add-before 'build 'disable-os-version-check
1286 ;; allow build on linux major version change
1287 (lambda _
1288 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1289 #t))
1290 (add-before 'check 'fix-test-framework
1291 (lambda _
1292 ;; Fix PATH in test environment
1293 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1294 (("PATH=/bin:/usr/bin")
1295 (string-append "PATH=" (getenv "PATH"))))
1296 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1297 (("/usr/bin/env") (which "env")))
1298 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1299 (("/bin/rm") (which "rm"))
1300 (("/bin/cp") (which "cp"))
1301 (("/bin/mv") (which "mv")))
1302 #t))
1303 (add-before 'check 'fix-hotspot-tests
1304 (lambda _
1305 (with-directory-excursion "openjdk.src/hotspot/test/"
1306 (substitute* "jprt.config"
1307 (("PATH=\"\\$\\{path4sdk\\}\"")
1308 (string-append "PATH=" (getenv "PATH")))
1309 (("make=/usr/bin/make")
1310 (string-append "make=" (which "make"))))
1311 (substitute* '("runtime/6626217/Test6626217.sh"
1312 "runtime/7110720/Test7110720.sh")
1313 (("/bin/rm") (which "rm"))
1314 (("/bin/cp") (which "cp"))
1315 (("/bin/mv") (which "mv"))))
1316 #t))
1317 (add-before 'check 'fix-jdk-tests
1318 (lambda _
1319 (with-directory-excursion "openjdk.src/jdk/test/"
1320 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1321 (("/bin/pwd") (which "pwd")))
1322 (substitute* "com/sun/jdi/ShellScaffold.sh"
1323 (("/bin/kill") (which "kill")))
1324 (substitute* "start-Xvfb.sh"
1325 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1326 (("/usr/bin/nohup") (which "nohup")))
1327 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1328 (("/bin/rm") (which "rm")))
1329 (substitute* "tools/launcher/MultipleJRE.sh"
1330 (("echo \"#!/bin/sh\"")
1331 (string-append "echo \"#!" (which "rm") "\""))
1332 (("/usr/bin/zip") (which "zip")))
1333 (substitute* "com/sun/jdi/OnThrowTest.java"
1334 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1335 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1336 (("/usr/bin/uptime") (which "uptime")))
1337 (substitute* "java/lang/ProcessBuilder/Basic.java"
1338 (("/usr/bin/env") (which "env"))
1339 (("/bin/false") (which "false"))
1340 (("/bin/true") (which "true"))
1341 (("/bin/cp") (which "cp"))
1342 (("/bin/sh") (which "sh")))
1343 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1344 (("/bin/sh") (which "sh")))
1345 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1346 (("/usr/bin/perl") (which "perl"))
1347 (("/bin/ps") (which "ps"))
1348 (("/bin/true") (which "true")))
1349 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1350 (("/usr/bin/tee") (which "tee")))
1351 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1352 (("/bin/true") (which "true")))
1353 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1354 (("/bin/cat") (which "cat")))
1355 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1356 (("/bin/sh") (which "sh"))
1357 (("/bin/true") (which "true"))
1358 (("/bin/kill") (which "kill")))
1359 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1360 (("/usr/bin/echo") (which "echo")))
1361 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1362 (("/usr/bin/cat") (which "cat")))
1363 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1364 (("/bin/cat") (which "cat"))
1365 (("/bin/sleep") (which "sleep"))
1366 (("/bin/sh") (which "sh")))
1367 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1368 (("/bin/cat") (which "cat")))
1369 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1370 (("/bin/chmod") (which "chmod")))
1371 (substitute* "java/util/zip/ZipFile/Assortment.java"
1372 (("/bin/sh") (which "sh"))))
1373 #t))
1374 (replace 'check
1375 (lambda _
1376 ;; The "make check-*" targets always return zero, so we need to
1377 ;; check for errors in the associated log files to determine
1378 ;; whether any tests have failed.
1379 (use-modules (ice-9 rdelim))
1380 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1381 (checker (lambda (port)
1382 (let loop ()
1383 (let ((line (read-line port)))
1384 (cond
1385 ((eof-object? line) #t)
1386 ((regexp-exec error-pattern line)
1387 (error "test failed"))
1388 (else (loop)))))))
1389 (run-test (lambda (test)
1390 (invoke "make" test)
1391 (call-with-input-file
1392 (string-append "test/" test ".log")
1393 checker))))
1394 (when #f ; skip tests
1395 (run-test "check-hotspot")
1396 (run-test "check-langtools")
1397 (run-test "check-jdk"))
1398 #t)))
1399 (replace 'install
1400 (lambda* (#:key outputs #:allow-other-keys)
1401 (let ((doc (string-append (assoc-ref outputs "doc")
1402 "/share/doc/icedtea"))
1403 (jre (assoc-ref outputs "out"))
1404 (jdk (assoc-ref outputs "jdk")))
1405 (copy-recursively "openjdk.build/docs" doc)
1406 (copy-recursively "openjdk.build/j2re-image" jre)
1407 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1408 #t))
1409 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1410 ;; But that shared object is located in the server/ folder, so it
1411 ;; cannot be found. This phase creates a symbolic link in the
1412 ;; lib/amd64 folder so that the other libraries can find it.
1413 ;;
1414 ;; See:
1415 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1416 ;;
1417 ;; FIXME: Find the bug in the build system, so that this symlink is
1418 ;; not needed.
1419 (add-after 'install 'install-libjvm
1420 (lambda* (#:key inputs outputs #:allow-other-keys)
1421 (let* ((lib-path (string-append (assoc-ref outputs "out")
1422 ;; See 'INSTALL_ARCH_DIR' in
1423 ;; 'configure'.
1424 ,(match (%current-system)
1425 ("i686-linux"
1426 "/lib/i386")
1427 ("x86_64-linux"
1428 "/lib/amd64")
1429 ("armhf-linux"
1430 "/lib/arm")
1431 ("aarch64-linux"
1432 "/lib/aarch64")
1433 ;; We need a catch-all, dropping
1434 ;; '-linux' works in most cases.
1435 (_
1436 (string-append
1437 "/lib/"
1438 (string-drop-right
1439 (%current-system) 6)))))))
1440 (symlink (string-append lib-path "/server/libjvm.so")
1441 (string-append lib-path "/libjvm.so")))
1442 #t))
1443 ;; By default IcedTea only generates an empty keystore. In order to
1444 ;; be able to use certificates in Java programs we need to generate a
1445 ;; keystore from a set of certificates. For convenience we use the
1446 ;; certificates from the nss-certs package.
1447 (add-after 'install 'install-keystore
1448 (lambda* (#:key inputs outputs #:allow-other-keys)
1449 (let* ((keystore "cacerts")
1450 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1451 "/etc/ssl/certs"))
1452 (keytool (string-append (assoc-ref outputs "jdk")
1453 "/bin/keytool")))
1454 (define (extract-cert file target)
1455 (call-with-input-file file
1456 (lambda (in)
1457 (call-with-output-file target
1458 (lambda (out)
1459 (let loop ((line (read-line in 'concat))
1460 (copying? #f))
1461 (cond
1462 ((eof-object? line) #t)
1463 ((string-prefix? "-----BEGIN" line)
1464 (display line out)
1465 (loop (read-line in 'concat) #t))
1466 ((string-prefix? "-----END" line)
1467 (display line out)
1468 #t)
1469 (else
1470 (when copying? (display line out))
1471 (loop (read-line in 'concat) copying?)))))))))
1472 (define (import-cert cert)
1473 (format #t "Importing certificate ~a\n" (basename cert))
1474 (let ((temp "tmpcert"))
1475 (extract-cert cert temp)
1476 (let ((port (open-pipe* OPEN_WRITE keytool
1477 "-import"
1478 "-alias" (basename cert)
1479 "-keystore" keystore
1480 "-storepass" "changeit"
1481 "-file" temp)))
1482 (display "yes\n" port)
1483 (when (not (zero? (status:exit-val (close-pipe port))))
1484 (format #t "failed to import ~a\n" cert)))
1485 (delete-file temp)))
1486
1487 ;; This is necessary because the certificate directory contains
1488 ;; files with non-ASCII characters in their names.
1489 (setlocale LC_ALL "en_US.utf8")
1490 (setenv "LC_ALL" "en_US.utf8")
1491
1492 (for-each import-cert (find-files certs-dir "\\.pem$"))
1493 (mkdir-p (string-append (assoc-ref outputs "out")
1494 "/lib/security"))
1495 (mkdir-p (string-append (assoc-ref outputs "jdk")
1496 "/jre/lib/security"))
1497
1498 ;; The cacerts files we are going to overwrite are chmod'ed as
1499 ;; read-only (444) in icedtea-8 (which derives from this
1500 ;; package). We have to change this so we can overwrite them.
1501 (chmod (string-append (assoc-ref outputs "out")
1502 "/lib/security/" keystore) #o644)
1503 (chmod (string-append (assoc-ref outputs "jdk")
1504 "/jre/lib/security/" keystore) #o644)
1505
1506 (install-file keystore
1507 (string-append (assoc-ref outputs "out")
1508 "/lib/security"))
1509 (install-file keystore
1510 (string-append (assoc-ref outputs "jdk")
1511 "/jre/lib/security"))
1512 #t))))))
1513 (native-inputs
1514 `(("openjdk-src"
1515 ,(drop "openjdk"
1516 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1517 ("corba-drop"
1518 ,(drop "corba"
1519 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1520 ("jaxp-drop"
1521 ,(drop "jaxp"
1522 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1523 ("jaxws-drop"
1524 ,(drop "jaxws"
1525 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1526 ("jdk-drop"
1527 ,(drop "jdk"
1528 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1529 ("langtools-drop"
1530 ,(drop "langtools"
1531 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1532 ("hotspot-drop"
1533 ,(origin
1534 (method url-fetch)
1535 (uri (string-append
1536 "http://icedtea.classpath.org/downloads/drops"
1537 "/icedtea7/" version "/hotspot.tar.bz2"))
1538 (sha256
1539 (base32
1540 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1541 (patches (search-patches
1542 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1543 ("ant" ,ant-bootstrap)
1544 ("attr" ,attr)
1545 ("coreutils" ,coreutils)
1546 ("diffutils" ,diffutils) ;for tests
1547 ("gawk" ,gawk)
1548 ("grep" ,grep)
1549 ("libtool" ,libtool)
1550 ("pkg-config" ,pkg-config)
1551 ("wget" ,wget)
1552 ("which" ,which)
1553 ("cpio" ,cpio)
1554 ("zip" ,zip)
1555 ("unzip" ,unzip)
1556 ("fastjar" ,fastjar)
1557 ("libxslt" ,libxslt) ;for xsltproc
1558 ("nss-certs" ,nss-certs)
1559 ("perl" ,perl)
1560 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1561 ("jdk" ,icedtea-6 "jdk")))
1562 (inputs
1563 `(("alsa-lib" ,alsa-lib)
1564 ("cups" ,cups)
1565 ("libx11" ,libx11)
1566 ("libxcomposite" ,libxcomposite)
1567 ("libxt" ,libxt)
1568 ("libxtst" ,libxtst)
1569 ("libxi" ,libxi)
1570 ("libxinerama" ,libxinerama)
1571 ("libxrender" ,libxrender)
1572 ("libjpeg" ,libjpeg)
1573 ("libpng" ,libpng)
1574 ("mit-krb5" ,mit-krb5)
1575 ("nss" ,nss)
1576 ("giflib" ,giflib)
1577 ("fontconfig" ,fontconfig)
1578 ("freetype" ,freetype)
1579 ("lcms" ,lcms)
1580 ("zlib" ,zlib)
1581 ("gtk" ,gtk+-2)))
1582 (home-page "http://icedtea.classpath.org")
1583 (synopsis "Java development kit")
1584 (description
1585 "This package provides the Java development kit OpenJDK built with the
1586 IcedTea build harness.")
1587
1588 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1589 (supported-systems (delete "mips64el-linux" %supported-systems))
1590
1591 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1592 ;; same license as both GNU Classpath and OpenJDK.
1593 (license license:gpl2+))))
1594
1595 (define-public icedtea-8
1596 (let* ((version "3.7.0")
1597 (drop (lambda (name hash)
1598 (origin
1599 (method url-fetch)
1600 (uri (string-append
1601 "http://icedtea.classpath.org/download/drops"
1602 "/icedtea8/" version "/" name ".tar.xz"))
1603 (sha256 (base32 hash))))))
1604 (package (inherit icedtea-7)
1605 (version "3.7.0")
1606 (source (origin
1607 (method url-fetch)
1608 (uri (string-append
1609 "http://icedtea.wildebeest.org/download/source/icedtea-"
1610 version ".tar.xz"))
1611 (sha256
1612 (base32
1613 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1614 (modules '((guix build utils)))
1615 (snippet
1616 '(begin
1617 (substitute* '("configure"
1618 "acinclude.m4")
1619 ;; Do not embed build time
1620 (("(DIST_ID=\"Custom build).*$" _ prefix)
1621 (string-append prefix "\"\n"))
1622 ;; Do not leak information about the build host
1623 (("DIST_NAME=\"\\$build_os\"")
1624 "DIST_NAME=\"guix\""))
1625 #t))))
1626 (arguments
1627 `(#:imported-modules
1628 ((guix build ant-build-system)
1629 (guix build syscalls)
1630 ,@%gnu-build-system-modules)
1631 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1632 ((#:modules modules)
1633 `((guix build utils)
1634 (guix build gnu-build-system)
1635 ((guix build ant-build-system) #:prefix ant:)
1636 (ice-9 match)
1637 (ice-9 popen)
1638 (srfi srfi-19)
1639 (srfi srfi-26)))
1640 ((#:configure-flags flags)
1641 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1642 `( ;;"--disable-bootstrap"
1643 "--enable-bootstrap"
1644 "--enable-nss"
1645 "--disable-downloading"
1646 "--disable-system-pcsc"
1647 "--disable-system-sctp"
1648 "--disable-tests" ;they are run in the check phase instead
1649 "--with-openjdk-src-dir=./openjdk.src"
1650 ,(string-append "--with-jdk-home=" jdk))))
1651 ((#:phases phases)
1652 `(modify-phases ,phases
1653 (delete 'fix-x11-extension-include-path)
1654 (delete 'patch-paths)
1655 (delete 'set-additional-paths)
1656 (delete 'patch-patches)
1657 (delete 'patch-bitrot)
1658 ;; Prevent the keytool from recording the current time when
1659 ;; adding certificates at build time.
1660 (add-after 'unpack 'patch-keystore
1661 (lambda _
1662 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1663 (("date = new Date\\(\\);")
1664 "\
1665 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1666 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1667 new Date();"))
1668 #t))
1669 (add-after 'unpack 'patch-jni-libs
1670 ;; Hardcode dynamically loaded libraries.
1671 (lambda _
1672 (let* ((library-path (search-path-as-string->list
1673 (getenv "LIBRARY_PATH")))
1674 (find-library (lambda (name)
1675 (search-path
1676 library-path
1677 (string-append "lib" name ".so")))))
1678 (for-each
1679 (lambda (file)
1680 (catch 'decoding-error
1681 (lambda ()
1682 (substitute* file
1683 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1684 _ name version)
1685 (format #f "\"~a\"" (find-library name)))
1686 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1687 (format #f "\"~a\"" (find-library name)))))
1688 (lambda _
1689 ;; Those are safe to skip.
1690 (format (current-error-port)
1691 "warning: failed to substitute: ~a~%"
1692 file))))
1693 (find-files "openjdk.src/jdk/src/solaris/native"
1694 "\\.c|\\.h"))
1695 #t)))
1696 (replace 'install
1697 (lambda* (#:key outputs #:allow-other-keys)
1698 (let ((doc (string-append (assoc-ref outputs "doc")
1699 "/share/doc/icedtea"))
1700 (jre (assoc-ref outputs "out"))
1701 (jdk (assoc-ref outputs "jdk")))
1702 (copy-recursively "openjdk.build/docs" doc)
1703 (copy-recursively "openjdk.build/images/j2re-image" jre)
1704 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1705 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1706 ;; support via NSS.
1707 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1708 (string-append jre "/lib/security/nss.cfg"))
1709 #t)))
1710 (add-after 'install 'strip-jar-timestamps
1711 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1712 (native-inputs
1713 `(("jdk" ,icedtea-7 "jdk")
1714 ("openjdk-src"
1715 ,(drop "openjdk"
1716 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1717 ("aarch32-drop"
1718 ,(drop "aarch32"
1719 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1720 ("corba-drop"
1721 ,(drop "corba"
1722 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1723 ("jaxp-drop"
1724 ,(drop "jaxp"
1725 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1726 ("jaxws-drop"
1727 ,(drop "jaxws"
1728 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1729 ("jdk-drop"
1730 ,(drop "jdk"
1731 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1732 ("langtools-drop"
1733 ,(drop "langtools"
1734 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1735 ("hotspot-drop"
1736 ,(origin
1737 (method url-fetch)
1738 (uri (string-append
1739 "http://icedtea.classpath.org/download/drops"
1740 "/icedtea8/" version "/hotspot.tar.xz"))
1741 (sha256
1742 (base32
1743 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1744 (patches (search-patches
1745 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1746 ("nashorn-drop"
1747 ,(drop "nashorn"
1748 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1749 ("shenandoah-drop"
1750 ,(drop "shenandoah"
1751 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1752 ,@(fold alist-delete (package-native-inputs icedtea-7)
1753 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1754 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1755
1756 (define-public openjdk9
1757 (package
1758 (name "openjdk")
1759 (version "9.181")
1760 (source (origin
1761 (method url-fetch)
1762 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1763 (file-name (string-append name "-" version ".tar.bz2"))
1764 (sha256
1765 (base32
1766 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1767 (modules '((guix build utils)))
1768 (snippet
1769 `(begin
1770 (for-each delete-file (find-files "." ".*.bin$"))
1771 (for-each delete-file (find-files "." ".*.exe$"))
1772 (for-each delete-file (find-files "." ".*.jar$"))
1773 #t))))
1774 (build-system gnu-build-system)
1775 (outputs '("out" "jdk" "doc"))
1776 (arguments
1777 `(#:tests? #f; require jtreg
1778 #:imported-modules
1779 ((guix build syscalls)
1780 ,@%gnu-build-system-modules)
1781 #:phases
1782 (modify-phases %standard-phases
1783 (add-after 'patch-source-shebangs 'fix-java-shebangs
1784 (lambda _
1785 ;; This file was "fixed" by patch-source-shebangs, but it requires
1786 ;; this exact first line.
1787 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1788 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1789 #t))
1790 (replace 'configure
1791 (lambda* (#:key inputs outputs #:allow-other-keys)
1792 ;; TODO: unbundle libpng and lcms
1793 (invoke "bash" "./configure"
1794 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1795 "--disable-freetype-bundling"
1796 "--disable-warnings-as-errors"
1797 "--disable-hotspot-gtest"
1798 "--with-giflib=system"
1799 "--with-libjpeg=system"
1800 (string-append "--prefix=" (assoc-ref outputs "out")))
1801 #t))
1802 (replace 'build
1803 (lambda _
1804 (with-output-to-file ".src-rev"
1805 (lambda _
1806 (display ,version)))
1807 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
1808 (invoke "make" "all")
1809 #t))
1810 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1811 ;; But that shared object is located in the server/ folder, so it
1812 ;; cannot be found. This phase creates a symbolic link in the
1813 ;; lib/ folder so that the other libraries can find it.
1814 ;;
1815 ;; See:
1816 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1817 ;;
1818 ;; FIXME: Find the bug in the build system, so that this symlink is
1819 ;; not needed.
1820 (add-after 'install 'install-libjvm
1821 (lambda* (#:key inputs outputs #:allow-other-keys)
1822 (let* ((lib-out (string-append (assoc-ref outputs "out")
1823 "/lib"))
1824 (lib-jdk (string-append (assoc-ref outputs "jdk")
1825 "/lib")))
1826 (symlink (string-append lib-jdk "/server/libjvm.so")
1827 (string-append lib-jdk "/libjvm.so"))
1828 (symlink (string-append lib-out "/server/libjvm.so")
1829 (string-append lib-out "/libjvm.so")))
1830 #t))
1831 (replace 'install
1832 (lambda* (#:key outputs #:allow-other-keys)
1833 (let ((out (assoc-ref outputs "out"))
1834 (jdk (assoc-ref outputs "jdk"))
1835 (doc (assoc-ref outputs "doc"))
1836 (images (car (find-files "build" ".*-server-release"
1837 #:directories? #t))))
1838 (copy-recursively (string-append images "/images/jdk") jdk)
1839 (copy-recursively (string-append images "/images/jre") out)
1840 (copy-recursively (string-append images "/images/docs") doc))
1841 #t))
1842 (add-after 'install 'strip-zip-timestamps
1843 (lambda* (#:key outputs #:allow-other-keys)
1844 (use-modules (guix build syscalls))
1845 (for-each (lambda (zip)
1846 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1847 (with-directory-excursion dir
1848 (invoke "unzip" zip))
1849 (delete-file zip)
1850 (for-each (lambda (file)
1851 (let ((s (lstat file)))
1852 (unless (eq? (stat:type s) 'symlink)
1853 (format #t "reset ~a~%" file)
1854 (utime file 0 0 0 0))))
1855 (find-files dir #:directories? #t))
1856 (with-directory-excursion dir
1857 (let ((files (find-files "." ".*" #:directories? #t)))
1858 (apply invoke "zip" "-0" "-X" zip files)))))
1859 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1860 #t)))))
1861 (inputs
1862 `(("alsa-lib" ,alsa-lib)
1863 ("cups" ,cups)
1864 ("fontconfig" ,fontconfig)
1865 ("freetype" ,freetype)
1866 ("giflib" ,giflib)
1867 ("lcms" ,lcms)
1868 ("libelf" ,libelf)
1869 ("libjpeg" ,libjpeg)
1870 ("libice" ,libice)
1871 ("libpng" ,libpng)
1872 ("libx11" ,libx11)
1873 ("libxcomposite" ,libxcomposite)
1874 ("libxi" ,libxi)
1875 ("libxinerama" ,libxinerama)
1876 ("libxrender" ,libxrender)
1877 ("libxt" ,libxt)
1878 ("libxtst" ,libxtst)))
1879 (native-inputs
1880 `(("icedtea-8" ,icedtea-8)
1881 ("icedtea-8:jdk" ,icedtea-8 "jdk")
1882 ("unzip" ,unzip)
1883 ("which" ,which)
1884 ("zip" ,zip)))
1885 (home-page "https://openjdk.java.net/projects/jdk9/")
1886 (synopsis "Java development kit")
1887 (description
1888 "This package provides the Java development kit OpenJDK.")
1889 (license license:gpl2+)))
1890
1891 (define-public openjdk10
1892 (package
1893 (inherit openjdk9)
1894 (name "openjdk")
1895 (version "10.46")
1896 (source (origin
1897 (method url-fetch)
1898 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
1899 (file-name (string-append name "-" version ".tar.bz2"))
1900 (sha256
1901 (base32
1902 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
1903 (patches (search-patches
1904 "openjdk-10-idlj-reproducibility.patch"))
1905 (modules '((guix build utils)))
1906 (snippet
1907 `(begin
1908 (for-each delete-file (find-files "." ".*.bin$"))
1909 (for-each delete-file (find-files "." ".*.exe$"))
1910 (for-each delete-file (find-files "." ".*.jar$"))
1911 #t))))
1912 (arguments
1913 (substitute-keyword-arguments (package-arguments openjdk9)
1914 ((#:phases phases)
1915 `(modify-phases ,phases
1916 (replace 'fix-java-shebangs
1917 (lambda _
1918 ;; This file was "fixed" by patch-source-shebangs, but it requires
1919 ;; this exact first line.
1920 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1921 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1922 #t))
1923 (replace 'configure
1924 (lambda* (#:key inputs outputs #:allow-other-keys)
1925 (invoke "bash" "./configure"
1926 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1927 "--disable-freetype-bundling"
1928 "--disable-warnings-as-errors"
1929 "--disable-hotspot-gtest"
1930 "--with-giflib=system"
1931 "--with-libjpeg=system"
1932 "--with-native-debug-symbols=zipped"
1933 (string-append "--prefix=" (assoc-ref outputs "out")))
1934 #t))))))
1935 (native-inputs
1936 `(("openjdk9" ,openjdk9)
1937 ("openjdk9:jdk" ,openjdk9 "jdk")
1938 ("unzip" ,unzip)
1939 ("which" ,which)
1940 ("zip" ,zip)))))
1941
1942 (define-public openjdk11
1943 (package
1944 (name "openjdk")
1945 (version "11.28")
1946 (source (origin
1947 (method url-fetch)
1948 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
1949 (file-name (string-append name "-" version ".tar.bz2"))
1950 (sha256
1951 (base32
1952 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
1953 (modules '((guix build utils)))
1954 (snippet
1955 `(begin
1956 (for-each delete-file (find-files "." ".*.bin$"))
1957 (for-each delete-file (find-files "." ".*.exe$"))
1958 (for-each delete-file (find-files "." ".*.jar$"))
1959 #t))))
1960 (build-system gnu-build-system)
1961 (outputs '("out" "jdk" "doc"))
1962 (arguments
1963 `(#:imported-modules
1964 ((guix build syscalls)
1965 (ice-9 binary-ports)
1966 (rnrs bytevectors)
1967 ,@%gnu-build-system-modules)
1968 #:tests? #f; requires jtreg
1969 ;; TODO package jtreg
1970 ;; disable parallel builds, as the openjdk build system does not like -j
1971 #:parallel-build? #f
1972 #:parallel-tests? #f
1973 ;; reenable parallel builds and tests by adding the flags manually
1974 #:make-flags (list (string-append "JOBS=" (number->string (parallel-job-count))))
1975 #:configure-flags
1976 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
1977 "--disable-warnings-as-errors"
1978 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
1979 "--with-native-debug-symbols=zipped"
1980 ;; do not use the bundled libraries
1981 "--with-giflib=system"
1982 "--with-lcms=system"
1983 "--with-libjpeg=system"
1984 "--with-libpng=system"
1985 "--with-version-pre="
1986 ;; allow the build system to locate the system freetype
1987 ,(string-append "--with-freetype-include="
1988 (assoc-ref %build-inputs "freetype") "/include")
1989 ,(string-append "--with-freetype-lib="
1990 (assoc-ref %build-inputs "freetype") "/lib"))
1991 ;; TODO
1992 #:phases
1993 (modify-phases %standard-phases
1994 (add-after 'patch-source-shebangs 'fix-java-shebangs
1995 (lambda _
1996 ;; This file was "fixed" by patch-source-shebangs, but it requires
1997 ;; this exact first line.
1998 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1999 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2000 #t))
2001 (replace 'build
2002 (lambda _
2003 (with-output-to-file ".src-rev"
2004 (lambda _
2005 (display ,version)))
2006 (setenv "GUIX_LD_WRAPPER_ALLOW_IMPURITIES" "yes")
2007 (invoke "make" "all")
2008 #t))
2009 ;; jdk 11 does not build jre by default any more
2010 ;; building it anyways
2011 ;; for further information see:
2012 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2013 (add-after 'build 'build-jre
2014 (lambda _
2015 (invoke "make" "legacy-jre-image")
2016 #t))
2017 (replace 'install
2018 (lambda* (#:key outputs #:allow-other-keys)
2019 (let ((out (assoc-ref outputs "out"))
2020 (jdk (assoc-ref outputs "jdk"))
2021 (doc (assoc-ref outputs "doc"))
2022 (images (car (find-files "build" ".*-server-release"
2023 #:directories? #t))))
2024 (copy-recursively (string-append images "/images/jdk") jdk)
2025 (copy-recursively (string-append images "/images/jre") out)
2026 (copy-recursively (string-append images "/images/docs") doc))
2027 #t))
2028 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2029 ;; But that shared object is located in the server/ folder, so it
2030 ;; cannot be found. This phase creates a symbolic link in the
2031 ;; lib/ folder so that the other libraries can find it.
2032 ;;
2033 ;; See:
2034 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2035 ;;
2036 ;; FIXME: Find the bug in the build system, so that this symlink is
2037 ;; not needed.
2038 (add-after 'install 'install-libjvm
2039 (lambda* (#:key inputs outputs #:allow-other-keys)
2040 (let* ((lib-out (string-append (assoc-ref outputs "out")
2041 "/lib"))
2042 (lib-jdk (string-append (assoc-ref outputs "jdk")
2043 "/lib")))
2044 (symlink (string-append lib-jdk "/server/libjvm.so")
2045 (string-append lib-jdk "/libjvm.so"))
2046 (symlink (string-append lib-out "/server/libjvm.so")
2047 (string-append lib-out "/libjvm.so")))
2048 #t))
2049 (add-after 'install 'strip-character-data-timestamps
2050 (lambda* (#:key outputs #:allow-other-keys)
2051 (use-modules (guix build syscalls))
2052 (let ((archive (string-append
2053 (assoc-ref outputs "jdk") "/lib/src.zip"))
2054 (dir (mkdtemp! "zip-contents.XXXXXX")))
2055 (with-directory-excursion dir
2056 (invoke "unzip" archive))
2057 (delete-file archive)
2058 (with-directory-excursion dir
2059 (let ((char-data-files (find-files "." "CharacterData.*")))
2060 (for-each (lambda (file)
2061 (substitute* file
2062 (((string-append "This file was generated "
2063 "AUTOMATICALLY from a template "
2064 "file.*"))
2065 (string-append "This file was generated "
2066 "AUTOMATICALLY from a template "
2067 "file"))))
2068 char-data-files)))
2069 (with-directory-excursion dir
2070 (let ((files (find-files "." ".*" #:directories? #t)))
2071 (apply invoke "zip" "-0" "-X" archive files))))))
2072 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2073 (lambda* (#:key outputs #:allow-other-keys)
2074 (use-modules (guix build syscalls)
2075 (ice-9 binary-ports)
2076 (rnrs bytevectors))
2077 (letrec ((repack-archive
2078 (lambda (archive)
2079 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2080 (with-directory-excursion dir
2081 (invoke "unzip" archive))
2082 (delete-file archive)
2083 (for-each (compose repack-archive canonicalize-path)
2084 (find-files dir "(ct.sym|.*.jar)$"))
2085 (let ((reset-file-timestamp
2086 (lambda (file)
2087 (let ((s (lstat file)))
2088 (unless (eq? (stat:type s) 'symlink)
2089 (format #t "reset ~a~%" file)
2090 (utime file 0 0 0 0))))))
2091 (for-each reset-file-timestamp
2092 (find-files dir #:directories? #t)))
2093 (with-directory-excursion dir
2094 (let ((files (find-files "." ".*" #:directories? #t)))
2095 (apply invoke "zip" "-0" "-X" archive files)))))))
2096 (for-each repack-archive
2097 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2098 (for-each repack-archive
2099 (find-files (assoc-ref outputs "jdk")
2100 ".*.(zip|jar|diz)$"))
2101 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2102 (let ((repack-jmod
2103 (lambda (file-name)
2104 (call-with-input-file file-name
2105 (lambda (file)
2106 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2107 (if (equal? (get-bytevector-n
2108 file (bytevector-length header))
2109 header)
2110 (let* ((header-length (bytevector-length header))
2111 (temp-file (mkstemp!
2112 (string-copy
2113 "temp-file.XXXXXX")))
2114 (temp-filename (port-filename temp-file))
2115 (content-length
2116 (- (stat:size (stat file))
2117 header-length)))
2118 (sendfile temp-file file content-length header-length)
2119 (delete-file file-name)
2120 (close-port temp-file)
2121 (repack-archive (canonicalize-path temp-filename))
2122 (call-with-output-file file-name
2123 (lambda (file)
2124 (put-bytevector file header)
2125 (call-with-input-file temp-filename
2126 (lambda (temp-file)
2127 (sendfile
2128 file temp-file
2129 (stat:size (stat temp-file)) 0)))))))))))))
2130 (for-each repack-jmod
2131 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2132 #t)))
2133 (add-after 'install 'remove-timestamp-from-api-summary
2134 (lambda* (#:key outputs #:allow-other-keys)
2135 (substitute* (string-append (assoc-ref outputs "doc")
2136 "/api/overview-summary.html")
2137 (("Generated by javadoc \\(11-internal\\).*$")
2138 "Generated by javadoc (11-internal) -->\n"))
2139 #t)))))
2140 (inputs
2141 `(("alsa-lib" ,alsa-lib)
2142 ("cups" ,cups)
2143 ("fontconfig" ,fontconfig)
2144 ("freetype" ,freetype)
2145 ("giflib" ,giflib)
2146 ("lcms" ,lcms)
2147 ("libjpeg" ,libjpeg)
2148 ("libpng" ,libpng)
2149 ("libx11" ,libx11)
2150 ("libxext" ,libxext)
2151 ("libxrender" ,libxrender)
2152 ("libxt" ,libxt)
2153 ("libxtst" ,libxtst)))
2154 (native-inputs
2155 `(("autoconf" ,autoconf)
2156 ("openjdk10" ,openjdk10)
2157 ("openjdk10:jdk" ,openjdk10 "jdk")
2158 ("pkg-config" ,pkg-config)
2159 ("unzip" ,unzip)
2160 ("which" ,which)
2161 ("zip" ,zip)))
2162 (home-page "https://openjdk.java.net/projects/jdk/11/")
2163 (synopsis "Java development kit")
2164 (description
2165 "This package provides the Java development kit OpenJDK.")
2166 (license license:gpl2+)))
2167
2168 (define-public openjdk12
2169 (package
2170 (inherit openjdk11)
2171 (name "openjdk")
2172 (version "12.33")
2173 (source (origin
2174 (method url-fetch)
2175 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2176 (file-name (string-append name "-" version ".tar.bz2"))
2177 (sha256
2178 (base32
2179 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2180 (modules '((guix build utils)))
2181 (snippet
2182 `(begin
2183 (for-each delete-file (find-files "." ".*.bin$"))
2184 (for-each delete-file (find-files "." ".*.exe$"))
2185 (for-each delete-file (find-files "." ".*.jar$"))
2186 #t))))
2187 (inputs
2188 `(("alsa-lib" ,alsa-lib)
2189 ("cups" ,cups)
2190 ("fontconfig" ,fontconfig)
2191 ("freetype" ,freetype)
2192 ("giflib" ,giflib)
2193 ("lcms" ,lcms)
2194 ("libjpeg" ,libjpeg)
2195 ("libpng" ,libpng)
2196 ("libx11" ,libx11)
2197 ("libxext" ,libxext)
2198 ("libxrandr" ,libxrandr)
2199 ("libxrender" ,libxrender)
2200 ("libxt" ,libxt)
2201 ("libxtst" ,libxtst)))
2202 (native-inputs
2203 `(("autoconf" ,autoconf)
2204 ("openjdk11" ,openjdk11)
2205 ("openjdk11:jdk" ,openjdk11 "jdk")
2206 ("pkg-config" ,pkg-config)
2207 ("unzip" ,unzip)
2208 ("which" ,which)
2209 ("zip" ,zip)))
2210 (home-page "https://openjdk.java.net/projects/jdk/12")))
2211
2212 (define-public icedtea icedtea-8)
2213
2214 \f
2215 (define-public ant/java8
2216 (package (inherit ant-bootstrap)
2217 (name "ant")
2218 (version "1.10.1")
2219 (source (origin
2220 (method url-fetch)
2221 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2222 version "-src.tar.gz"))
2223 (sha256
2224 (base32
2225 "10p3dh77lkzzzcy32dk9azljixzadp46fggjfbvgkl8mmb8cxxv8"))
2226 (modules '((guix build utils)))
2227 (snippet
2228 '(begin
2229 (for-each delete-file
2230 (find-files "lib/optional" "\\.jar$"))
2231 #t))))
2232 (arguments
2233 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2234 ((#:phases phases)
2235 `(modify-phases ,phases
2236 (add-after 'unpack 'remove-scripts
2237 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2238 ;; wrappers.
2239 (lambda _
2240 (for-each delete-file
2241 (find-files "src/script"
2242 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2243 #t))
2244 (replace 'build
2245 (lambda* (#:key inputs outputs #:allow-other-keys)
2246 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2247
2248 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2249 ;; Ant to build. This is necessary in addition to disabling the
2250 ;; "check" phase, because the dependency on "test-jar" would always
2251 ;; result in the tests to be run.
2252 (substitute* "build.xml"
2253 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2254 (invoke "bash" "bootstrap.sh"
2255 (string-append "-Ddist.dir="
2256 (assoc-ref outputs "out")))))))))
2257 (native-inputs
2258 `(("jdk" ,icedtea-8 "jdk")
2259 ("zip" ,zip)
2260 ("unzip" ,unzip)))))
2261
2262 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2263 ;; requires Java 8.
2264 (define-public ant
2265 (package (inherit ant/java8)
2266 (version "1.9.9")
2267 (source (origin
2268 (method url-fetch)
2269 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2270 version "-src.tar.gz"))
2271 (sha256
2272 (base32
2273 "1k28mka0m3isy9yr8gz84kz1f3f879rwaxrd44vdn9xbfwvwk86n"))))
2274 (native-inputs
2275 `(("jdk" ,icedtea-7 "jdk")
2276 ("zip" ,zip)
2277 ("unzip" ,unzip)))))
2278
2279 (define-public ant-apache-bcel
2280 (package
2281 (inherit ant/java8)
2282 (name "ant-apache-bcel")
2283 (arguments
2284 (substitute-keyword-arguments (package-arguments ant/java8)
2285 ((#:phases phases)
2286 `(modify-phases ,phases
2287 (add-after 'unpack 'link-bcel
2288 (lambda* (#:key inputs #:allow-other-keys)
2289 (for-each (lambda (file)
2290 (symlink file
2291 (string-append "lib/optional/"
2292 (basename file))))
2293 (find-files (assoc-ref inputs "java-commons-bcel")
2294 "\\.jar$"))
2295 #t))
2296 (add-after 'build 'install
2297 (lambda* (#:key outputs #:allow-other-keys)
2298 (let* ((out (assoc-ref outputs "out"))
2299 (share (string-append out "/share/java"))
2300 (bin (string-append out "/bin"))
2301 (lib (string-append out "/lib")))
2302 (mkdir-p share)
2303 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2304 (delete-file-recursively bin)
2305 (delete-file-recursively lib)
2306 #t)))))))
2307 (inputs
2308 `(("java-commons-bcel" ,java-commons-bcel)
2309 ,@(package-inputs ant/java8)))))
2310
2311 (define-public ant-junit
2312 (package
2313 (inherit ant/java8)
2314 (name "ant-junit")
2315 (arguments
2316 (substitute-keyword-arguments (package-arguments ant/java8)
2317 ((#:phases phases)
2318 `(modify-phases ,phases
2319 (add-after 'unpack 'link-junit
2320 (lambda* (#:key inputs #:allow-other-keys)
2321 (for-each (lambda (file)
2322 (symlink file
2323 (string-append "lib/optional/"
2324 (basename file))))
2325 (find-files (assoc-ref inputs "java-junit")
2326 "\\.jar$"))
2327 #t))
2328 (add-after 'build 'install
2329 (lambda* (#:key outputs #:allow-other-keys)
2330 (let* ((out (assoc-ref outputs "out"))
2331 (share (string-append out "/share/java"))
2332 (bin (string-append out "/bin"))
2333 (lib (string-append out "/lib")))
2334 (mkdir-p share)
2335 (install-file (string-append lib "/ant-junit.jar") share)
2336 (delete-file-recursively bin)
2337 (delete-file-recursively lib)
2338 #t)))))))
2339 (inputs
2340 `(("java-junit" ,java-junit)
2341 ,@(package-inputs ant/java8)))))
2342
2343 (define-public java-openjfx-build
2344 (package
2345 (name "java-openjfx-build")
2346 ;; This is a java-8 version
2347 (version "8.202")
2348 (source (origin
2349 (method hg-fetch)
2350 (uri (hg-reference
2351 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2352 (changeset (string-append
2353 (string-join (string-split version #\.) "u")
2354 "-ga"))))
2355 (file-name (string-append name "-" version "-checkout"))
2356 (modules '((guix build utils)))
2357 (snippet
2358 '(begin
2359 ;; Delete included gradle jar
2360 (delete-file-recursively "gradle/wrapper")
2361 #t))
2362 (sha256
2363 (base32
2364 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))))
2365 (build-system ant-build-system)
2366 (arguments
2367 `(#:jar-name "java-openjfx.jar"
2368 #:source-dir "buildSrc/src/main/java"
2369 #:test-dir "buildSrc/src/test"
2370 #:phases
2371 (modify-phases %standard-phases
2372 (add-before 'configure 'generate-jsl-parser
2373 (lambda _
2374 (invoke "antlr3" "-o"
2375 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2376 "buildSrc/src/main/antlr/JSL.g"))))))
2377 (inputs
2378 `(("antlr3" ,antlr3)
2379 ("java-stringtemplate" ,java-stringtemplate)))
2380 (native-inputs
2381 `(("java-junit" ,java-junit)
2382 ("java-hamcrest-core" ,java-hamcrest-core)))
2383 (home-page "https://openjfx.io")
2384 (synopsis "Graphical application toolkit in Java")
2385 (description "OpenJFX is a client application platform for desktop,
2386 mobile and embedded systems built on Java. Its goal is to produce a
2387 modern, efficient, and fully featured toolkit for developing rich client
2388 applications. This package contains base classes for the OpenJFX
2389 distribution and helper classes for building other parts of the
2390 distribution.")
2391 (license license:gpl2))) ;gpl2 only, with classpath exception
2392
2393 (define-public java-openjfx-base
2394 (package (inherit java-openjfx-build)
2395 (name "java-openjfx-base")
2396 (arguments
2397 `(#:jar-name "java-openjfx-base.jar"
2398 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2399 #:test-dir "modules/base/src/test"
2400 #:phases
2401 (modify-phases %standard-phases
2402 (add-before 'check 'remove-empty-file
2403 (lambda _
2404 (with-directory-excursion "modules/base/src/test/java"
2405 ;; These files are completely commented, but junit expects them to
2406 ;; contain a class, so tests fail.
2407 (delete-file
2408 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2409 (delete-file
2410 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2411 (delete-file "javafx/beans/property/PropertiesTest.java")
2412 (delete-file
2413 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2414 ;; This one fails
2415 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2416 #t)))))
2417 (propagated-inputs
2418 `(("java-openjfx-build" ,java-openjfx-build)))
2419 (description "OpenJFX is a client application platform for desktop,
2420 mobile and embedded systems built on Java. Its goal is to produce a
2421 modern, efficient, and fully featured toolkit for developing rich client
2422 applications. This package contains base classes for the OpenJFX
2423 distribution.")))
2424
2425 (define-public java-openjfx-graphics
2426 (package (inherit java-openjfx-build)
2427 (name "java-openjfx-graphics")
2428 (arguments
2429 `(#:jar-name "java-openjfx-graphics.jar"
2430 #:source-dir "modules/graphics/src/main/java"
2431 #:tests? #f; require X
2432 #:test-dir "modules/graphics/src/test"))
2433 (propagated-inputs
2434 `(("java-openjfx-base" ,java-openjfx-base)
2435 ("java-swt" ,java-swt)))
2436 (description "OpenJFX is a client application platform for desktop,
2437 mobile and embedded systems built on Java. Its goal is to produce a
2438 modern, efficient, and fully featured toolkit for developing rich client
2439 applications. This package contains graphics-related classes for the
2440 OpenJFX distribution.")))
2441
2442 (define-public java-openjfx-media
2443 (package (inherit java-openjfx-build)
2444 (name "java-openjfx-media")
2445 (propagated-inputs
2446 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2447 (arguments
2448 `(#:jar-name "java-openjfx-media.jar"
2449 #:source-dir "modules/media/src/main/java"
2450 #:tests? #f)); no tests
2451 (description "OpenJFX is a client application platform for desktop,
2452 mobile and embedded systems built on Java. Its goal is to produce a
2453 modern, efficient, and fully featured toolkit for developing rich client
2454 applications. This package contains media-related classes for the
2455 OpenJFX distribution.")))
2456
2457 (define-public javacc-4
2458 (package
2459 (name "javacc")
2460 (version "4.1")
2461 (source (origin
2462 (method git-fetch)
2463 (uri (git-reference
2464 (url "https://github.com/javacc/javacc.git")
2465 (commit "release_41")))
2466 (file-name (string-append "javacc-" version "-checkout"))
2467 (sha256
2468 (base32
2469 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2470 (modules '((guix build utils)))
2471 ;; delete bundled jars
2472 (snippet '(begin (delete-file-recursively "lib") #t))))
2473 (build-system ant-build-system)
2474 ;; Tests fail with
2475 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2476 ;; JAVACODE failed
2477 (arguments
2478 `(#:tests? #f
2479 #:phases
2480 (modify-phases %standard-phases
2481 ;; Delete tests to avoid build failure (we don't run them anyway).
2482 (add-after 'unpack 'delete-tests
2483 (lambda _
2484 (for-each delete-file
2485 '("src/org/javacc/JavaCCTestCase.java"
2486 "src/org/javacc/parser/ExpansionTest.java"
2487 "src/org/javacc/parser/OptionsTest.java"
2488 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2489 (for-each delete-file-recursively
2490 '("src/org/javacc/parser/test"
2491 "src/org/javacc/jjdoc/test"))
2492 #t))
2493 (replace 'install (install-jars "bin/lib")))))
2494 (home-page "https://javacc.org/")
2495 (synopsis "Java parser generator")
2496 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2497 generator for use with Java applications. A parser generator is a tool that
2498 reads a grammar specification and converts it to a Java program that can
2499 recognize matches to the grammar. In addition to the parser generator itself,
2500 JavaCC provides other standard capabilities related to parser generation such
2501 as tree building (via a tool called JJTree included with JavaCC), actions,
2502 debugging, etc.")
2503 (license license:bsd-3)))
2504
2505 (define-public javacc
2506 (package
2507 (inherit javacc-4)
2508 (version "7.0.4")
2509 (source
2510 (origin
2511 (method git-fetch)
2512 (uri (git-reference
2513 (url "https://github.com/javacc/javacc.git")
2514 (commit version)))
2515 (file-name (git-file-name "javacc" version))
2516 (sha256
2517 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2518 (modules '((guix build utils)))
2519 ;; Delete bundled jars.
2520 (snippet '(begin (for-each delete-file-recursively
2521 '("bootstrap" "lib"))
2522 #t))))
2523 (arguments
2524 `(#:make-flags ; bootstrap from javacc-4
2525 (list (string-append "-Dbootstrap-jar="
2526 (assoc-ref %build-inputs "javacc")
2527 "/share/java/javacc.jar"))
2528 #:test-target "test"
2529 #:phases
2530 (modify-phases %standard-phases
2531 (replace 'install (install-jars "target"))
2532 (add-after 'install 'install-bin
2533 (lambda* (#:key outputs inputs #:allow-other-keys)
2534 (let* ((out (assoc-ref outputs "out"))
2535 (dir (string-append out "/share/java"))
2536 (bin (string-append out "/bin"))
2537 (javacc (string-append bin "/javacc")))
2538 (mkdir-p bin)
2539 (with-output-to-file javacc
2540 (lambda _
2541 (display
2542 (string-append "#!/bin/sh\n"
2543 (assoc-ref inputs "jdk") "/bin/java"
2544 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2545 (chmod javacc #o755)
2546 ;; symlink to different names to affect the first argument and
2547 ;; change the behavior of the jar file.
2548 (symlink javacc (string-append bin "/jjdoc"))
2549 (symlink javacc (string-append bin "/jjtree"))
2550 #t))))))
2551
2552 (native-inputs
2553 `(("javacc" ,javacc-4)))))
2554
2555 ;; This is the last 3.x release of ECJ
2556 (define-public java-ecj-3
2557 (package
2558 (name "java-ecj")
2559 (version "3.8.2")
2560 (source (origin
2561 (method url-fetch)
2562 (uri (string-append "http://archive.eclipse.org/eclipse/"
2563 "downloads/drops/R-" version
2564 "-201301310800/ecjsrc-" version ".jar"))
2565 (sha256
2566 (base32
2567 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2568 (build-system ant-build-system)
2569 (arguments
2570 `(#:tests? #f ; none included
2571 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2572 #:make-flags (list "-f" "src/build.xml")
2573 #:build-target "build"
2574 #:phases
2575 (modify-phases %standard-phases
2576 (add-after 'unpack 'fix-manifest
2577 (lambda _
2578 ;; Record the main class to make ecj executable.
2579 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2580 (lambda (in out)
2581 (display "Manifest-Version: 1.0
2582 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2583 out)))
2584 #t))
2585 (replace 'install (install-jars ".")))))
2586 (home-page "https://eclipse.org")
2587 (synopsis "Eclipse Java development tools core batch compiler")
2588 (description "This package provides the Eclipse Java core batch compiler.")
2589 (license license:epl1.0)))
2590
2591 ;; This is needed for java-cisd-args4j
2592 (define-public java-ecj-3.5
2593 (package (inherit java-ecj-3)
2594 (version "3.5.1")
2595 (source (origin
2596 (method url-fetch/zipbomb)
2597 (uri (string-append "http://archive.eclipse.org/eclipse/"
2598 "downloads/drops/R-" version
2599 "-200909170800/ecjsrc-" version ".zip"))
2600 (sha256
2601 (base32
2602 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2603 (build-system ant-build-system)
2604 (arguments
2605 `(#:tests? #f ; none included
2606 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2607 #:build-target "build"
2608 #:phases
2609 (modify-phases %standard-phases
2610 (add-after 'unpack 'fix-manifest
2611 (lambda _
2612 ;; Record the main class to make ecj executable.
2613 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2614 (lambda (in out)
2615 (dump-port in out)
2616 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2617 out)))
2618 #t))
2619 (replace 'install (install-jars ".")))))
2620 (native-inputs
2621 `(("unzip" ,unzip)))))
2622
2623 (define-public java-ecj
2624 (package (inherit java-ecj-3)
2625 (version "4.6.3")
2626 (source
2627 (origin
2628 (method url-fetch)
2629 (uri (string-append
2630 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2631 version
2632 "-201703010400/ecjsrc-"
2633 version
2634 ".jar"))
2635 (sha256
2636 (base32
2637 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2638 (arguments
2639 `(#:tests? #f ; none included
2640 #:build-target "build"
2641 #:phases
2642 (modify-phases %standard-phases
2643 (add-after 'unpack 'fix-build.xml
2644 (lambda _
2645 (substitute* "src/build.xml"
2646 (("^.*MANIFEST.*$")
2647 ""))
2648 #t))
2649 (add-after 'unpack 'fix-prop
2650 (lambda _
2651 (substitute* "src/build.xml"
2652 (("^.*properties.*$")
2653 "<include name=\"**/*.properties\"/>
2654 <include name=\"**/*.props\"/>"))
2655 #t))
2656 (add-before 'build 'chdir
2657 (lambda _
2658 (chdir "src")
2659 #t))
2660 (replace 'install (install-jars ".")))))))
2661
2662 (define-public java-cisd-base
2663 (let ((revision 38938)
2664 (base-version "14.12.0"))
2665 (package
2666 (name "java-cisd-base")
2667 (version (string-append base-version "-" (number->string revision)))
2668 (source (origin
2669 (method svn-fetch)
2670 (uri (svn-reference
2671 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2672 "base/tags/release/"
2673 (version-major+minor base-version)
2674 ".x/" base-version "/base/"))
2675 (revision revision)))
2676 (file-name (string-append "java-cisd-base-" version "-checkout"))
2677 (sha256
2678 (base32
2679 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2680 (modules '((guix build utils)))
2681 (snippet
2682 '(begin
2683 ;; Delete included gradle jar
2684 (delete-file-recursively "gradle/wrapper")
2685 ;; Delete pre-built native libraries
2686 (delete-file-recursively "libs")
2687 #t))))
2688 (build-system ant-build-system)
2689 (arguments
2690 `(#:make-flags '("-file" "build/build.xml")
2691 #:test-target "jar-test"
2692 #:jdk ,icedtea-8
2693 #:phases
2694 (modify-phases %standard-phases
2695 (add-after 'unpack 'unpack-build-resources
2696 (lambda* (#:key inputs #:allow-other-keys)
2697 (copy-recursively (assoc-ref inputs "build-resources")
2698 "../build_resources")
2699 #t))
2700 (add-after 'unpack-build-resources 'fix-dependencies
2701 (lambda* (#:key inputs #:allow-other-keys)
2702 (substitute* "build/build.xml"
2703 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2704 (string-append (assoc-ref inputs "java-testng")
2705 "/share/java/java-testng.jar"))
2706 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2707 (string-append (assoc-ref inputs "java-commons-lang")
2708 "/share/java/commons-lang-"
2709 ,(package-version java-commons-lang) ".jar"))
2710 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2711 (string-append (assoc-ref inputs "java-commons-io")
2712 "/share/java/commons-io-"
2713 ,(package-version java-commons-io)
2714 "-SNAPSHOT.jar"))
2715 ;; Remove dependency on svn
2716 (("<build-info.*") "")
2717 (("\\$\\{revision.number\\}")
2718 ,(number->string revision))
2719 (("\\$\\{version.number\\}") ,base-version))
2720 ;; Remove dependency on classycle
2721 (substitute* "../build_resources/ant/build-common.xml"
2722 (("<taskdef name=\"dependency-checker.*") "")
2723 (("classname=\"classycle.*") "")
2724 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2725 #t))
2726 ;; A few tests fail because of the lack of a proper /etc/groups and
2727 ;; /etc/passwd file in the build container.
2728 (add-after 'unpack 'disable-broken-tests
2729 (lambda _
2730 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2731 (("Unix.isOperational\\(\\)") "false"))
2732 #t))
2733 ;; These decorators are almost useless and pull in an unpackaged
2734 ;; dependency.
2735 (add-after 'unpack 'remove-useless-decorators
2736 (lambda _
2737 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2738 (("@Private") "")
2739 (("import ch.rinn.restrictions.Private;") ""))
2740 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2741 (("@Friend.*") "")
2742 (("import ch.rinn.restrictions.Friend;") ""))
2743 #t))
2744 (add-before 'configure 'build-native-code
2745 (lambda* (#:key inputs #:allow-other-keys)
2746 (let ((jdk (assoc-ref inputs "jdk"))
2747 (dir ,(match (%current-system)
2748 ("i686-linux"
2749 "i386-Linux")
2750 ((or "armhf-linux" "aarch64-linux")
2751 "arm-Linux")
2752 ((or "x86_64-linux")
2753 "amd64-Linux")
2754 (_ "unknown-Linux"))))
2755 (with-directory-excursion "source/c"
2756 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2757 (string-append "-I" jdk "/include")
2758 (string-append "-I" jdk "/include/linux")
2759 "-o" "libunix.so")
2760 (invoke "gcc" "-shared" "-O3" "-fPIC"
2761 "-DMACHINE_BYTE_ORDER=1"
2762 "copyCommon.c"
2763 "copyByteChar.c"
2764 "copyByteDouble.c"
2765 "copyByteFloat.c"
2766 "copyByteInt.c"
2767 "copyByteLong.c"
2768 "copyByteShort.c"
2769 (string-append "-I" jdk "/include")
2770 (string-append "-I" jdk "/include/linux")
2771 "-o" "libnativedata.so"))
2772 (install-file "source/c/libunix.so"
2773 (string-append "libs/native/unix/" dir))
2774 (install-file "source/c/libnativedata.so"
2775 (string-append "libs/native/nativedata/" dir))
2776 #t)))
2777 ;; In the "check" phase we only build the test executable.
2778 (add-after 'check 'run-tests
2779 (lambda _
2780 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2781 (delete-file "targets/dist/sis-base-test.jar")
2782 #t))
2783 (replace 'install (install-jars "targets/dist")))))
2784 (native-inputs
2785 `(("jdk" ,icedtea-8)
2786 ("java-commons-lang" ,java-commons-lang)
2787 ("java-commons-io" ,java-commons-io)
2788 ("java-testng" ,java-testng)
2789 ("build-resources"
2790 ,(origin
2791 (method svn-fetch)
2792 (uri (svn-reference
2793 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2794 "base/tags/release/"
2795 (version-major+minor base-version)
2796 ".x/" base-version
2797 "/build_resources/"))
2798 (revision revision)))
2799 (sha256
2800 (base32
2801 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2802 (home-page "http://svnsis.ethz.ch")
2803 (synopsis "Utility classes for libraries from ETH Zurich")
2804 (description "This library supplies some utility classes needed for
2805 libraries from the SIS division at ETH Zurich like jHDF5.")
2806 ;; The C sources are under a non-copyleft license, which looks like a
2807 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2808 (license (list license:asl2.0
2809 (license:non-copyleft "file://source/c/COPYING"))))))
2810
2811 (define-public java-cisd-args4j
2812 (let ((revision 39162)
2813 (base-version "9.11.2"))
2814 (package
2815 (name "java-cisd-args4j")
2816 (version (string-append base-version "-" (number->string revision)))
2817 (source (origin
2818 (method svn-fetch)
2819 (uri (svn-reference
2820 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2821 "args4j/tags/release/"
2822 (version-major+minor base-version)
2823 ".x/" base-version "/args4j/"))
2824 (revision revision)))
2825 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2826 (sha256
2827 (base32
2828 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2829 (build-system ant-build-system)
2830 (arguments
2831 `(#:make-flags '("-file" "build/build.xml")
2832 #:tests? #f ; there are no tests
2833 ;; There are weird build failures with JDK8, such as: "The type
2834 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
2835 ;; referenced from required .class files"
2836 #:jdk ,icedtea-7
2837 #:modules ((guix build ant-build-system)
2838 (guix build utils)
2839 (guix build java-utils)
2840 (sxml simple)
2841 (sxml transform)
2842 (sxml xpath))
2843 #:phases
2844 (modify-phases %standard-phases
2845 (add-after 'unpack 'unpack-build-resources
2846 (lambda* (#:key inputs #:allow-other-keys)
2847 (mkdir-p "../build_resources")
2848 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
2849 "-C" "../build_resources"
2850 "--strip-components=1")
2851 (mkdir-p "../build_resources/lib")
2852 #t))
2853 (add-after 'unpack-build-resources 'fix-dependencies
2854 (lambda* (#:key inputs #:allow-other-keys)
2855 ;; FIXME: There should be a more convenient abstraction for
2856 ;; editing XML files.
2857 (with-directory-excursion "../build_resources/ant/"
2858 (chmod "build-common.xml" #o664)
2859 (call-with-output-file "build-common.xml.new"
2860 (lambda (port)
2861 (sxml->xml
2862 (pre-post-order
2863 (with-input-from-file "build-common.xml"
2864 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2865 `(;; Remove dependency on classycle and custom ant tasks
2866 (taskdef . ,(lambda (tag . kids)
2867 (let ((name ((sxpath '(name *text*)) kids)))
2868 (if (or (member "build-info" name)
2869 (member "dependency-checker" name)
2870 (member "build-java-subprojects" name)
2871 (member "project-classpath" name))
2872 '() ; skip
2873 `(,tag ,@kids)))))
2874 (typedef . ,(lambda (tag . kids)
2875 (let ((name ((sxpath '(name *text*)) kids)))
2876 (if (member "recursive-jar" name)
2877 '() ; skip
2878 `(,tag ,@kids)))))
2879 (build-java-subprojects . ,(lambda _ '()))
2880 ;; Ignore everything else
2881 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2882 (*text* . ,(lambda (_ txt) txt))))
2883 port)))
2884 (rename-file "build-common.xml.new" "build-common.xml"))
2885 (substitute* "build/build.xml"
2886 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2887 (string-append (assoc-ref inputs "java-cisd-base")
2888 "/share/java/sis-base.jar"))
2889 ;; Remove dependency on svn
2890 (("<build-info.*") "")
2891 (("\\$\\{revision.number\\}")
2892 ,(number->string revision))
2893 (("\\$\\{version.number\\}") ,base-version)
2894 ;; Don't use custom ant tasks.
2895 (("recursive-jar") "jar")
2896 (("<project-classpath.*") ""))
2897 #t))
2898 (replace 'install (install-jars "targets/dist")))))
2899 (inputs
2900 `(("java-cisd-base" ,java-cisd-base)))
2901 (native-inputs
2902 `(("ecj" ,java-ecj-3.5)
2903 ("build-resources"
2904 ,(origin
2905 (method svn-fetch)
2906 (uri (svn-reference
2907 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2908 "args4j/tags/release/"
2909 (version-major+minor base-version)
2910 ".x/" base-version
2911 "/build_resources/"))
2912 (revision revision)))
2913 (sha256
2914 (base32
2915 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2916 (modules '((guix build utils)))
2917 ;; Delete bundled pre-built jars.
2918 (snippet
2919 '(begin (delete-file-recursively "lib/") #t))))))
2920 (home-page "http://svnsis.ethz.ch")
2921 (synopsis "Command line parser library")
2922 (description "This package provides a parser for command line arguments.")
2923 (license license:asl2.0))))
2924
2925 (define-public java-cisd-jhdf5
2926 (let ((revision 39162)
2927 (base-version "14.12.6"))
2928 (package
2929 (name "java-cisd-jhdf5")
2930 (version (string-append base-version "-" (number->string revision)))
2931 (source (origin
2932 (method svn-fetch)
2933 (uri (svn-reference
2934 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2935 "jhdf5/tags/release/"
2936 (version-major+minor base-version)
2937 ".x/" base-version "/jhdf5/"))
2938 (revision revision)))
2939 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2940 (sha256
2941 (base32
2942 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2943 (modules '((guix build utils)))
2944 (snippet
2945 '(begin
2946 ;; Delete included gradle jar
2947 (delete-file-recursively "gradle/wrapper")
2948 ;; Delete pre-built native libraries
2949 (delete-file-recursively "libs")
2950 #t))))
2951 (build-system ant-build-system)
2952 (arguments
2953 `(#:make-flags '("-file" "build/build.xml")
2954 #:build-target "jar-all"
2955 #:test-target "jar-test"
2956 #:jdk ,icedtea-8
2957 #:phases
2958 (modify-phases %standard-phases
2959 ;; FIXME: this build phase fails.
2960 (delete 'generate-jar-indices)
2961 ;; Don't erase results from the build phase when building tests.
2962 (add-after 'unpack 'separate-test-target-from-clean
2963 (lambda _
2964 (substitute* "build/build.xml"
2965 (("\"jar-test\" depends=\"clean, ")
2966 "\"jar-test\" depends=\""))
2967 #t))
2968 (add-after 'unpack 'unpack-build-resources
2969 (lambda* (#:key inputs #:allow-other-keys)
2970 (copy-recursively (assoc-ref inputs "build-resources")
2971 "../build_resources")
2972 (delete-file-recursively "../build_resources/lib/")
2973 (mkdir-p "../build_resources/lib")
2974 ;; Remove dependency on classycle
2975 (substitute* "../build_resources/ant/build-common.xml"
2976 (("<taskdef name=\"dependency-checker.*") "")
2977 (("classname=\"classycle.*") "")
2978 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2979 ;; Remove dependency on svn
2980 (substitute* "build/build.xml"
2981 (("<build-info.*") "")
2982 (("\\$\\{revision.number\\}")
2983 ,(number->string revision))
2984 (("\\$\\{version.number\\}") ,base-version))
2985 #t))
2986 (add-after 'unpack-build-resources 'fix-dependencies
2987 (lambda* (#:key inputs #:allow-other-keys)
2988 (substitute* "../build_resources/ant/build-common.xml"
2989 (("../libraries/testng/testng-jdk15.jar")
2990 (string-append (assoc-ref inputs "java-testng")
2991 "/share/java/java-testng.jar")))
2992 (substitute* "build/build.xml"
2993 (("\\$\\{lib\\}/sis-base/sis-base.jar")
2994 (string-append (assoc-ref inputs "java-cisd-base")
2995 "/share/java/sis-base.jar"))
2996 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
2997 (string-append (assoc-ref inputs "java-cisd-args4j")
2998 "/share/java/cisd-args4j.jar"))
2999 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3000 (string-append (assoc-ref inputs "java-commons-lang")
3001 "/share/java/commons-lang-"
3002 ,(package-version java-commons-lang) ".jar"))
3003 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3004 (string-append (assoc-ref inputs "java-commons-io")
3005 "/share/java/commons-io-"
3006 ,(package-version java-commons-io)
3007 "-SNAPSHOT.jar"))
3008 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3009 (string-append (assoc-ref inputs "java-testng")
3010 "/share/java/java-testng.jar"))
3011 (("\\$\\{lib\\}/junit4/junit.jar")
3012 (string-append (assoc-ref inputs "java-junit")
3013 "/share/java/junit.jar"))
3014 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3015 (string-append (assoc-ref inputs "java-hamcrest-core")
3016 "/share/java/hamcrest-core.jar")))
3017 ;; Remove dependency on ch.rinn.restrictions
3018 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3019 (substitute* '("BitSetConversionUtils.java"
3020 "HDF5Utils.java")
3021 (("import ch.rinn.restrictions.Private;") "")
3022 (("@Private") "")))
3023 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3024 (substitute* '("BitSetConversionTest.java"
3025 "h5ar/HDF5ArchiverTest.java")
3026 (("import ch.rinn.restrictions.Friend;") "")
3027 (("@Friend.*") ""))
3028 ;; Remove leftovers from removing @Friend
3029 (substitute* "h5ar/HDF5ArchiverTest.java"
3030 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3031 "")))
3032 #t))
3033 (add-before 'configure 'build-native-library
3034 (lambda* (#:key inputs #:allow-other-keys)
3035 (let ((jdk (assoc-ref inputs "jdk"))
3036 (hdf5 (assoc-ref inputs "hdf5"))
3037 (dir ,(match (%current-system)
3038 ("i686-linux"
3039 "i386-Linux")
3040 ((or "armhf-linux" "aarch64-linux")
3041 "arm-Linux")
3042 ((or "x86_64-linux")
3043 "amd64-Linux")
3044 (_ "unknown-Linux"))))
3045 (with-directory-excursion "source/c"
3046 (apply invoke `("gcc" "-shared" "-O3"
3047 "-fPIC"
3048 "-Wl,--exclude-libs,ALL"
3049 ,@(find-files "jhdf5" "\\.c$")
3050 ,@(find-files "hdf-java" "\\.c$")
3051 ,(string-append "-I" hdf5 "/include")
3052 ,(string-append "-I" jdk "/include")
3053 ,(string-append "-I" jdk "/include/linux")
3054 ,(string-append hdf5 "/lib/libhdf5.a")
3055 "-o" "libjhdf5.so" "-lz")))
3056 (install-file "source/c/libjhdf5.so"
3057 (string-append "libs/native/jhdf5/" dir))
3058 #t)))
3059 ;; In the "check" phase we only build the test executable.
3060 (add-after 'check 'run-tests
3061 (lambda _
3062 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3063 (delete-file "targets/dist/sis-jhdf5-test.jar")
3064 #t))
3065 (replace 'install
3066 (install-jars "targets/dist")))))
3067 (inputs
3068 `(("java-cisd-base" ,java-cisd-base)
3069 ("java-cisd-args4j" ,java-cisd-args4j)
3070 ("java-commons-lang" ,java-commons-lang)
3071 ("java-commons-io" ,java-commons-io)
3072 ("hdf5" ,hdf5)
3073 ("zlib" ,zlib)))
3074 (native-inputs
3075 `(("jdk" ,icedtea-8)
3076 ("java-testng" ,java-testng)
3077 ("java-junit" ,java-junit)
3078 ("java-jmock" ,java-jmock)
3079 ("java-hamcrest-core" ,java-hamcrest-core)
3080 ("build-resources"
3081 ,(origin
3082 (method svn-fetch)
3083 (uri (svn-reference
3084 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3085 "jhdf5/tags/release/"
3086 (version-major+minor base-version)
3087 ".x/" base-version
3088 "/build_resources/"))
3089 (revision revision)))
3090 (sha256
3091 (base32
3092 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3093 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3094 (synopsis "Java binding for HDF5")
3095 (description "JHDF5 is a high-level API in Java for reading and writing
3096 HDF5 files, building on the libraries provided by the HDF Group.")
3097 ;; The C sources are under a non-copyleft license, which looks like a
3098 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3099 (license (list license:asl2.0
3100 (license:non-copyleft "file://source/c/COPYING"))))))
3101
3102 (define-public java-classpathx-servletapi
3103 (package
3104 (name "java-classpathx-servletapi")
3105 (version "3.0.1")
3106 (source (origin
3107 (method url-fetch)
3108 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3109 "servletapi-" version ".tar.gz"))
3110 (sha256
3111 (base32
3112 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3113 (build-system ant-build-system)
3114 (arguments
3115 `(#:tests? #f ; there is no test target
3116 #:build-target "compile"
3117 #:make-flags
3118 (list "-Dbuild.compiler=javac1.8"
3119 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3120 #:phases
3121 (modify-phases %standard-phases
3122 (replace 'install
3123 (lambda* (#:key make-flags #:allow-other-keys)
3124 (apply invoke `("ant" "dist" ,@make-flags)))))))
3125 (home-page "https://www.gnu.org/software/classpathx/")
3126 (synopsis "Java servlet API implementation")
3127 (description "This is the GNU servlet API distribution, part of the
3128 ClasspathX project. It provides implementations of version 3.0 of the servlet
3129 API and version 2.1 of the Java ServerPages API.")
3130 (license license:gpl3+)))
3131
3132 (define-public java-javaee-servletapi
3133 (package
3134 (name "java-javaee-servletapi")
3135 (version "3.1.0")
3136 (source (origin
3137 (method git-fetch)
3138 (uri (git-reference
3139 (url "https://github.com/javaee/servlet-spec.git")
3140 (commit version)))
3141 (file-name (git-file-name name version))
3142 (sha256
3143 (base32
3144 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3145 (build-system ant-build-system)
3146 (arguments
3147 `(#:jar-name "javax-servletapi.jar"
3148 ;; no tests
3149 #:tests? #f
3150 #:source-dir "src/main/java"
3151 #:phases
3152 (modify-phases %standard-phases
3153 (add-before 'build 'copy-resources
3154 (lambda _
3155 (mkdir-p "build/classes/javax/servlet/http")
3156 (let ((from-prefix "src/main/java/javax/servlet/")
3157 (to-prefix "build/classes/javax/servlet/"))
3158 (for-each (lambda (f)
3159 (copy-file (string-append from-prefix f)
3160 (string-append to-prefix f)))
3161 (list "LocalStrings_ja.properties"
3162 "LocalStrings.properties"
3163 "LocalStrings_fr.properties"
3164 "http/LocalStrings_es.properties"
3165 "http/LocalStrings_ja.properties"
3166 "http/LocalStrings.properties"
3167 "http/LocalStrings_fr.properties")))
3168 #t)))))
3169 (native-inputs
3170 `(("unzip" ,unzip)))
3171 (home-page "https://javaee.github.io/servlet-spec/")
3172 (synopsis "Java servlet API")
3173 (description "Java Servlet is the foundation web specification in the
3174 Java Enterprise Platform. Developers can build web applications using the
3175 Servlet API to interact with the request/response workflow. This project
3176 provides information on the continued development of the Java Servlet
3177 specification.")
3178 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3179 ;; Some files are licensed under ASL 2.0.
3180 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3181
3182 (define-public java-swt
3183 (package
3184 (name "java-swt")
3185 (version "4.7.1a")
3186 (source
3187 ;; The types of many variables and procedures differ in the sources
3188 ;; dependent on whether the target architecture is a 32-bit system or a
3189 ;; 64-bit system. Instead of patching the sources on demand in a build
3190 ;; phase we download either the 32-bit archive (which mostly uses "int"
3191 ;; types) or the 64-bit archive (which mostly uses "long" types).
3192 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3193 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3194 (file32 "x86")
3195 (file64 "x86_64"))
3196 (let-values (((hash file)
3197 (match (or (%current-target-system) (%current-system))
3198 ("x86_64-linux" (values hash64 file64))
3199 (_ (values hash32 file32)))))
3200 (origin
3201 (method url-fetch)
3202 (uri (string-append
3203 "http://download.eclipse.org/eclipse/downloads/drops4/"
3204 "R-" version "-201710090410/swt-" version
3205 "-gtk-linux-" file ".zip"))
3206 (sha256 (base32 hash))))))
3207 (build-system ant-build-system)
3208 (arguments
3209 `(#:jar-name "swt.jar"
3210 #:jdk ,icedtea-8
3211 #:tests? #f ; no "check" target
3212 #:phases
3213 (modify-phases %standard-phases
3214 (replace 'unpack
3215 (lambda* (#:key source #:allow-other-keys)
3216 (mkdir "swt")
3217 (invoke "unzip" source "-d" "swt")
3218 (chdir "swt")
3219 (mkdir "src")
3220 (invoke "unzip" "src.zip" "-d" "src")))
3221 ;; The classpath contains invalid icecat jars. Since we don't need
3222 ;; anything other than the JDK on the classpath, we can simply unset
3223 ;; it.
3224 (add-after 'configure 'unset-classpath
3225 (lambda _ (unsetenv "CLASSPATH") #t))
3226 (add-before 'build 'build-native
3227 (lambda* (#:key inputs outputs #:allow-other-keys)
3228 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3229 ;; Build shared libraries. Users of SWT have to set the system
3230 ;; property swt.library.path to the "lib" directory of this
3231 ;; package output.
3232 (mkdir-p lib)
3233 (setenv "OUTPUT_DIR" lib)
3234 (with-directory-excursion "src"
3235 (invoke "bash" "build.sh")))))
3236 (add-after 'install 'install-native
3237 (lambda* (#:key outputs #:allow-other-keys)
3238 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3239 (for-each (lambda (file)
3240 (install-file file lib))
3241 (find-files "." "\\.so$"))
3242 #t))))))
3243 (inputs
3244 `(("gtk" ,gtk+-2)
3245 ("libxtst" ,libxtst)
3246 ("libxt" ,libxt)
3247 ("mesa" ,mesa)
3248 ("glu" ,glu)))
3249 (native-inputs
3250 `(("pkg-config" ,pkg-config)
3251 ("unzip" ,unzip)))
3252 (home-page "https://www.eclipse.org/swt/")
3253 (synopsis "Widget toolkit for Java")
3254 (description
3255 "SWT is a widget toolkit for Java designed to provide efficient, portable
3256 access to the user-interface facilities of the operating systems on which it
3257 is implemented.")
3258 ;; SWT code is licensed under EPL1.0
3259 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3260 ;; Cairo bindings contain code under MPL1.1
3261 ;; XULRunner 1.9 bindings contain code under MPL2.0
3262 (license (list
3263 license:epl1.0
3264 license:mpl1.1
3265 license:mpl2.0
3266 license:lgpl2.1+))))
3267
3268 (define-public java-xz
3269 (package
3270 (name "java-xz")
3271 (version "1.6")
3272 (source (origin
3273 (method url-fetch)
3274 (uri (string-append "http://tukaani.org/xz/xz-java-" version ".zip"))
3275 (sha256
3276 (base32
3277 "1z3p1ri1gvl07inxn0agx44ck8n7wrzfmvkz8nbq3njn8r9wba8x"))))
3278 (build-system ant-build-system)
3279 (arguments
3280 `(#:tests? #f ; There are no tests to run.
3281 #:jar-name ,(string-append "xz-" version ".jar")
3282 #:phases
3283 (modify-phases %standard-phases
3284 ;; The unpack phase enters the "maven" directory by accident.
3285 (add-after 'unpack 'chdir
3286 (lambda _ (chdir "..") #t)))))
3287 (native-inputs
3288 `(("unzip" ,unzip)))
3289 (home-page "https://tukaani.org/xz/java.html")
3290 (synopsis "Implementation of XZ data compression in pure Java")
3291 (description "This library aims to be a complete implementation of XZ data
3292 compression in pure Java. Single-threaded streamed compression and
3293 decompression and random access decompression have been fully implemented.")
3294 (license license:public-domain)))
3295
3296 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3297 ;; of the latest release.
3298 (define-public java-qdox-1.12
3299 (package
3300 (name "java-qdox")
3301 (version "1.12.1")
3302 (source (origin
3303 (method url-fetch)
3304 (uri (string-append "https://repo1.maven.org/maven2/"
3305 "com/thoughtworks/qdox/qdox/" version
3306 "/qdox-" version "-sources.jar"))
3307 (sha256
3308 (base32
3309 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3310 (build-system ant-build-system)
3311 (arguments
3312 `(;; Tests require junit
3313 #:tests? #f
3314 #:jar-name "qdox.jar"
3315 #:phases
3316 (modify-phases %standard-phases
3317 (replace 'unpack
3318 (lambda* (#:key source #:allow-other-keys)
3319 (mkdir "src")
3320 (with-directory-excursion "src"
3321 (invoke "jar" "-xf" source))))
3322 ;; At this point we don't have junit, so we must remove the API
3323 ;; tests.
3324 (add-after 'unpack 'delete-tests
3325 (lambda _
3326 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3327 #t)))))
3328 (home-page "https://github.com/codehaus/qdox")
3329 (synopsis "Parse definitions from Java source files")
3330 (description
3331 "QDox is a high speed, small footprint parser for extracting
3332 class/interface/method definitions from source files complete with JavaDoc
3333 @code{@@tags}. It is designed to be used by active code generators or
3334 documentation tools.")
3335 (license license:asl2.0)))
3336
3337 (define-public java-qdox
3338 (package
3339 (name "java-qdox")
3340 ; Newer version exists, but this version is required by java-plexus-component-metadata
3341 (version "2.0-M2")
3342 (source (origin
3343 (method url-fetch)
3344 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3345 ;; Older releases at https://github.com/codehaus/qdox/
3346 ;; Note: The release at maven is pre-generated. The release at
3347 ;; github requires jflex.
3348 (uri (string-append "https://repo1.maven.org/maven2/"
3349 "com/thoughtworks/qdox/qdox/" version
3350 "/qdox-" version "-sources.jar"))
3351 (sha256
3352 (base32
3353 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3354 (build-system ant-build-system)
3355 (arguments
3356 `(#:jar-name "qdox.jar"
3357 #:tests? #f)); no tests
3358 (home-page "https://github.com/codehaus/qdox")
3359 (synopsis "Parse definitions from Java source files")
3360 (description "QDox is a high speed, small footprint parser for extracting
3361 class/interface/method definitions from source files complete with JavaDoc
3362 @code{@@tags}. It is designed to be used by active code generators or
3363 documentation tools.")
3364 (license license:asl2.0)))
3365
3366 (define-public java-jarjar
3367 (package
3368 (name "java-jarjar")
3369 (version "1.4")
3370 (source (origin
3371 (method url-fetch)
3372 (uri (string-append
3373 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3374 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3375 (sha256
3376 (base32
3377 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3378 (modules '((guix build utils)))
3379 (snippet
3380 '(begin
3381 ;; Delete bundled thirds-party jar archives.
3382 ;; TODO: unbundle maven-plugin-api.
3383 (delete-file "lib/asm-4.0.jar")
3384 (delete-file "lib/asm-commons-4.0.jar")
3385 (delete-file "lib/junit-4.8.1.jar")
3386 #t))))
3387 (build-system ant-build-system)
3388 (arguments
3389 `(;; Tests require junit, which ultimately depends on this package.
3390 #:tests? #f
3391 #:build-target "jar"
3392 #:phases
3393 (modify-phases %standard-phases
3394 (add-before 'build 'do-not-use-bundled-asm
3395 (lambda* (#:key inputs #:allow-other-keys)
3396 (substitute* "build.xml"
3397 (("<path id=\"path.build\">")
3398 (string-append "<path id=\"path.build\"><fileset dir=\""
3399 (assoc-ref inputs "java-asm-bootstrap")
3400 "/share/java\" includes=\"**/*.jar\"/>"))
3401 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3402 (("lib/asm-commons-4.0.jar")
3403 (string-append (assoc-ref inputs "java-asm-bootstrap")
3404 "/share/java/asm-6.0.jar"))
3405 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3406 (string-append "<include name=\"org/objectweb/asm/"
3407 "commons/Remap*.class\"/>"
3408 "<include name=\"org/objectweb/asm/*.class\"/>"
3409 "<include name=\"org/objectweb/asm/"
3410 "signature/*.class\"/>"
3411 "<include name=\"org/objectweb/asm/"
3412 "commons/SignatureRemapper.class\"/>")))
3413 #t))
3414 (replace 'install
3415 (lambda* (#:key outputs #:allow-other-keys)
3416 (let ((target (string-append (assoc-ref outputs "out")
3417 "/share/java")))
3418 (install-file (string-append "dist/jarjar-" ,version ".jar")
3419 target))
3420 #t)))))
3421 (inputs
3422 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3423 (native-inputs
3424 `(("unzip" ,unzip)))
3425 (home-page "https://code.google.com/archive/p/jarjar/")
3426 (synopsis "Repackage Java libraries")
3427 (description
3428 "Jar Jar Links is a utility that makes it easy to repackage Java
3429 libraries and embed them into your own distribution. Jar Jar Links includes
3430 an Ant task that extends the built-in @code{jar} task.")
3431 (license license:asl2.0)))
3432
3433 (define-public java-hamcrest-core
3434 (package
3435 (name "java-hamcrest-core")
3436 (version "1.3")
3437 (source (origin
3438 (method git-fetch)
3439 (uri (git-reference
3440 (url "https://github.com/hamcrest/JavaHamcrest/")
3441 (commit (string-append "hamcrest-java-" version))))
3442 (file-name (git-file-name name version))
3443 (sha256
3444 (base32
3445 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3446 (modules '((guix build utils)))
3447 (snippet
3448 '(begin
3449 ;; Delete bundled thirds-party jar archives.
3450 (delete-file-recursively "lib")
3451 #t))))
3452 (build-system ant-build-system)
3453 (arguments
3454 `(#:tests? #f ; Tests require junit
3455 #:modules ((guix build ant-build-system)
3456 (guix build utils)
3457 (srfi srfi-1))
3458 #:make-flags (list (string-append "-Dversion=" ,version))
3459 #:test-target "unit-test"
3460 #:build-target "core"
3461 #:phases
3462 (modify-phases %standard-phases
3463 ;; Disable unit tests, because they require junit, which requires
3464 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3465 ;; attribute from the manifest for reproducibility.
3466 (add-before 'configure 'patch-build.xml
3467 (lambda _
3468 (substitute* "build.xml"
3469 (("unit-test, ") "")
3470 (("\\$\\{build.timestamp\\}") "guix"))
3471 #t))
3472 ;; Java's "getMethods()" returns methods in an unpredictable order.
3473 ;; To make the output of the generated code deterministic we must
3474 ;; sort the array of methods.
3475 (add-after 'unpack 'make-method-order-deterministic
3476 (lambda _
3477 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3478 (("import java\\.util\\.Iterator;" line)
3479 (string-append line "\n"
3480 "import java.util.Arrays; import java.util.Comparator;"))
3481 (("allMethods = cls\\.getMethods\\(\\);" line)
3482 (string-append "_" line
3483 "
3484 private Method[] getSortedMethods() {
3485 Arrays.sort(_allMethods, new Comparator<Method>() {
3486 @Override
3487 public int compare(Method a, Method b) {
3488 return a.toString().compareTo(b.toString());
3489 }
3490 });
3491 return _allMethods;
3492 }
3493
3494 private Method[] allMethods = getSortedMethods();")))
3495 #t))
3496 (add-before 'build 'do-not-use-bundled-qdox
3497 (lambda* (#:key inputs #:allow-other-keys)
3498 (substitute* "build.xml"
3499 (("lib/generator/qdox-1.12.jar")
3500 (string-append (assoc-ref inputs "java-qdox-1.12")
3501 "/share/java/qdox.jar")))
3502 #t))
3503 ;; build.xml searches for .jar files in this directoy, which
3504 ;; we remove from the source archive.
3505 (add-before 'build 'create-dummy-directories
3506 (lambda _
3507 (mkdir-p "lib/integration")
3508 #t))
3509 (replace 'install
3510 (lambda* (#:key outputs #:allow-other-keys)
3511 (let* ((target (string-append (assoc-ref outputs "out")
3512 "/share/java/"))
3513 (version-suffix ,(string-append "-" version ".jar"))
3514 (install-without-version-suffix
3515 (lambda (jar)
3516 (copy-file jar
3517 (string-append target
3518 (basename jar version-suffix)
3519 ".jar")))))
3520 (mkdir-p target)
3521 (for-each
3522 install-without-version-suffix
3523 (find-files "build"
3524 (lambda (name _)
3525 (and (string-suffix? ".jar" name)
3526 (not (string-suffix? "-sources.jar" name)))))))
3527 #t)))))
3528 (native-inputs
3529 `(("java-qdox-1.12" ,java-qdox-1.12)
3530 ("java-jarjar" ,java-jarjar)))
3531 (home-page "http://hamcrest.org/")
3532 (synopsis "Library of matchers for building test expressions")
3533 (description
3534 "This package provides a library of matcher objects (also known as
3535 constraints or predicates) allowing @code{match} rules to be defined
3536 declaratively, to be used in other frameworks. Typical scenarios include
3537 testing frameworks, mocking libraries and UI validation rules.")
3538 (license license:bsd-2)))
3539
3540 (define-public java-junit
3541 (package
3542 (name "java-junit")
3543 (version "4.12")
3544 (source (origin
3545 (method git-fetch)
3546 (uri (git-reference
3547 (url "https://github.com/junit-team/junit/")
3548 (commit (string-append "r" version))))
3549 (file-name (git-file-name name version))
3550 (sha256
3551 (base32
3552 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3553 (modules '((guix build utils)))
3554 (snippet
3555 '(begin
3556 ;; Delete bundled jar archives.
3557 (delete-file-recursively "lib")
3558 #t))))
3559 (build-system ant-build-system)
3560 (arguments
3561 `(#:tests? #f ; no tests
3562 #:jar-name "junit.jar"))
3563 (inputs
3564 `(("java-hamcrest-core" ,java-hamcrest-core)))
3565 (home-page "https://junit.org/junit4/")
3566 (synopsis "Test framework for Java")
3567 (description
3568 "JUnit is a simple framework to write repeatable tests for Java projects.
3569 JUnit provides assertions for testing expected results, test fixtures for
3570 sharing common test data, and test runners for running tests.")
3571 (license license:epl1.0)))
3572
3573 (define-public java-plexus-utils
3574 (package
3575 (name "java-plexus-utils")
3576 (version "3.2.0")
3577 (source (origin
3578 (method git-fetch)
3579 (uri (git-reference
3580 (url "https://github.com/codehaus-plexus/plexus-utils")
3581 (commit (string-append "plexus-utils-" version))))
3582 (file-name (git-file-name name version))
3583 (sha256
3584 (base32
3585 "1mlx7xrq7lgqjqcpg7y4hi1ghavf28vvk3har82037dqx61n0f15"))))
3586 (build-system ant-build-system)
3587 ;; FIXME: The default build.xml does not include a target to install
3588 ;; javadoc files.
3589 (arguments
3590 `(#:jar-name "plexus-utils.jar"
3591 #:source-dir "src/main"
3592 #:phases
3593 (modify-phases %standard-phases
3594 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3595 (lambda _
3596 (substitute* "src/main/java/org/codehaus/plexus/util/\
3597 cli/shell/BourneShell.java"
3598 (("/bin/sh") (which "sh"))
3599 (("/usr/") (getcwd)))
3600 #t))
3601 (add-after 'unpack 'fix-or-disable-broken-tests
3602 (lambda _
3603 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3604 (substitute* '("cli/CommandlineTest.java"
3605 "cli/shell/BourneShellTest.java")
3606 (("/bin/sh") (which "sh"))
3607 (("/bin/echo") (which "echo")))
3608
3609 ;; This test depends on MavenProjectStub, but we don't have
3610 ;; a package for Maven.
3611 (delete-file "introspection/ReflectionValueExtractorTest.java")
3612
3613 ;; FIXME: The command line tests fail, maybe because they use
3614 ;; absolute paths.
3615 (delete-file "cli/CommandlineTest.java"))
3616 #t)))))
3617 (native-inputs
3618 `(("java-hamcrest-core" ,java-hamcrest-core)
3619 ("java-junit" ,java-junit)))
3620 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3621 (synopsis "Common utilities for the Plexus framework")
3622 (description "This package provides various Java utility classes for the
3623 Plexus framework to ease working with strings, files, command lines, XML and
3624 more.")
3625 (license license:asl2.0)))
3626
3627 (define-public java-plexus-interpolation
3628 (package
3629 (name "java-plexus-interpolation")
3630 (version "1.23")
3631 (source (origin
3632 (method git-fetch)
3633 (uri (git-reference
3634 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3635 (commit (string-append "plexus-interpolation-" version))))
3636 (file-name (git-file-name name version))
3637 (sha256
3638 (base32
3639 "005hxxg1adv71a96lz4vp65bk3v1pi76j4c45z29xzizclib16vl"))))
3640 (build-system ant-build-system)
3641 (arguments
3642 `(#:jar-name "plexus-interpolation.jar"
3643 #:source-dir "src/main"))
3644 (native-inputs
3645 `(("java-junit" ,java-junit)
3646 ("java-hamcrest-core" ,java-hamcrest-core)))
3647 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3648 (synopsis "Java components for interpolating ${} strings and the like")
3649 (description "Plexus interpolator is a modular, flexible interpolation
3650 framework for the expression language style commonly seen in Maven, Plexus,
3651 and other related projects.
3652
3653 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3654 package within @code{plexus-utils}, but has been separated in order to allow
3655 these two libraries to vary independently of one another.")
3656 (license license:asl2.0)))
3657
3658 (define-public java-plexus-classworlds
3659 (package
3660 (name "java-plexus-classworlds")
3661 (version "2.5.2")
3662 (source (origin
3663 (method git-fetch)
3664 (uri (git-reference
3665 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3666 (commit (string-append "plexus-classworlds-" version))))
3667 (file-name (git-file-name name version))
3668 (sha256
3669 (base32
3670 "1iv8x55fbni2hg4l7pdpbwfq75xmvq1f25g6nxma8rcdpihsh13r"))))
3671 (build-system ant-build-system)
3672 (arguments
3673 `(#:jar-name "plexus-classworlds.jar"
3674 #:source-dir "src/main"
3675 #:tests? #f));; FIXME: we need to generate some resources as in pom.xml
3676 (native-inputs
3677 `(("java-junit" ,java-junit)))
3678 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3679 (synopsis "Java class loader framework")
3680 (description "Plexus classworlds replaces the native @code{ClassLoader}
3681 mechanism of Java. It is especially useful for dynamic loading of application
3682 components.")
3683 (license license:asl2.0)))
3684
3685 (define java-plexus-container-default-bootstrap
3686 (package
3687 (name "java-plexus-container-default-bootstrap")
3688 (version "1.7.1")
3689 (source (origin
3690 (method url-fetch)
3691 (uri (string-append "https://github.com/codehaus-plexus/plexus-containers"
3692 "/archive/plexus-containers-" version ".tar.gz"))
3693 (sha256
3694 (base32
3695 "0xw5g30qf4a83608rw9v2hv8pfsz7d69dkdhk6r0wia4q78hh1pc"))))
3696 (build-system ant-build-system)
3697 (arguments
3698 `(#:jar-name "container-default.jar"
3699 #:source-dir "plexus-container-default/src/main/java"
3700 #:test-dir "plexus-container-default/src/test"
3701 #:jdk ,icedtea-8
3702 #:tests? #f; requires plexus-archiver, which depends on this package
3703 #:phases
3704 (modify-phases %standard-phases
3705 (add-before 'build 'copy-resources
3706 (lambda _
3707 (copy-recursively
3708 "plexus-container-default/src/main/resources/"
3709 "build/classes")
3710 #t)))))
3711 (inputs
3712 `(("worldclass" ,java-plexus-classworlds)
3713 ("xbean" ,java-geronimo-xbean-reflect)
3714 ("utils" ,java-plexus-utils)
3715 ("junit" ,java-junit)
3716 ("guava" ,java-guava)))
3717 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3718 (synopsis "Inversion-of-control container")
3719 (description "Plexus-default-container is Plexus' inversion-of-control
3720 (@dfn{IoC}) container. It is composed of its public API and its default
3721 implementation.")
3722 (license license:asl2.0)))
3723
3724 (define-public java-plexus-io
3725 (package
3726 (name "java-plexus-io")
3727 (version "3.0.0")
3728 (source (origin
3729 (method url-fetch)
3730 (uri (string-append "https://github.com/codehaus-plexus/plexus-io"
3731 "/archive/plexus-io-" version ".tar.gz"))
3732 (sha256
3733 (base32
3734 "0f2j41kihaymxkpbm55smpxjja235vad8cgz94frfy3ppcp021dw"))))
3735 (build-system ant-build-system)
3736 (arguments
3737 `(#:jar-name "plexus-io.jar"
3738 #:source-dir "src/main/java"
3739 #:test-dir "src/test"
3740 #:jdk ,icedtea-8
3741 #:phases
3742 (modify-phases %standard-phases
3743 (add-before 'build 'copy-resources
3744 (lambda _
3745 (mkdir-p "build/classes/META-INF/plexus")
3746 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3747 "build/classes/META-INF/plexus/components.xml")
3748 #t)))))
3749 (inputs
3750 `(("utils" ,java-plexus-utils)
3751 ("commons-io" ,java-commons-io)
3752 ("java-jsr305" ,java-jsr305)))
3753 (native-inputs
3754 `(("junit" ,java-junit)
3755 ("hamcrest" ,java-hamcrest-core)
3756 ("guava" ,java-guava)
3757 ("classworlds" ,java-plexus-classworlds)
3758 ("xbean" ,java-geronimo-xbean-reflect)
3759 ("container-default" ,java-plexus-container-default-bootstrap)))
3760 (home-page "https://github.com/codehaus-plexus/plexus-io")
3761 (synopsis "I/O plexus components")
3762 (description "Plexus IO is a set of plexus components, which are designed
3763 for use in I/O operations. This implementation using plexus components allows
3764 reusing it in maven.")
3765 (license license:asl2.0)))
3766
3767 (define-public java-plexus-archiver
3768 (package
3769 (name "java-plexus-archiver")
3770 (version "4.1.0")
3771 (source (origin
3772 (method url-fetch)
3773 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3774 "/archive/plexus-archiver-" version ".tar.gz"))
3775 (sha256
3776 (base32
3777 "0ry6i92gli0mvdmfih2vgs0lkf9yvx18h2ajxim66yg6yipnp0hg"))))
3778 (build-system ant-build-system)
3779 (arguments
3780 `(#:jar-name "plexus-archiver.jar"
3781 #:source-dir "src/main/java"
3782 #:jdk ,icedtea-8
3783 #:test-dir "src/test"
3784 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
3785 #:phases
3786 (modify-phases %standard-phases
3787 (add-before 'check 'remove-failing
3788 (lambda _
3789 ;; Requires an older version of plexus container
3790 (delete-file
3791 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
3792 #t))
3793 (add-before 'check 'fix-test-building
3794 (lambda _
3795 (substitute* "build.xml"
3796 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
3797 #t))
3798 (add-before 'build 'copy-resources
3799 (lambda _
3800 (mkdir-p "build/classes/META-INF/plexus")
3801 (copy-file "src/main/resources/META-INF/plexus/components.xml"
3802 "build/classes/META-INF/plexus/components.xml")
3803 #t)))))
3804 (inputs
3805 `(("utils" ,java-plexus-utils)
3806 ("commons-io" ,java-commons-io)
3807 ("snappy" ,java-iq80-snappy)
3808 ("io" ,java-plexus-io)
3809 ("compress" ,java-commons-compress)
3810 ("container-default" ,java-plexus-container-default-bootstrap)
3811 ("snappy" ,java-snappy)
3812 ("java-jsr305" ,java-jsr305)))
3813 (native-inputs
3814 `(("java-hamcrest-core" ,java-hamcrest-core)
3815 ("junit" ,java-junit)
3816 ("classworld" ,java-plexus-classworlds)
3817 ("xbean" ,java-geronimo-xbean-reflect)
3818 ("xz" ,java-tukaani-xz)
3819 ("guava" ,java-guava)))
3820 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
3821 (synopsis "Archiver component of the Plexus project")
3822 (description "Plexus-archiver contains a component to deal with project
3823 archives (jar).")
3824 (license license:asl2.0)))
3825
3826 (define-public java-plexus-container-default
3827 (package
3828 (inherit java-plexus-container-default-bootstrap)
3829 (name "java-plexus-container-default")
3830 (arguments
3831 `(#:jar-name "container-default.jar"
3832 #:source-dir "plexus-container-default/src/main/java"
3833 #:test-dir "plexus-container-default/src/test"
3834 #:test-exclude (list ;"**/*Test.java"
3835 "**/Abstract*.java"
3836 ;; Requires plexus-hierarchy
3837 "**/PlexusHierarchyTest.java"
3838 ;; Failures
3839 "**/ComponentRealmCompositionTest.java"
3840 "**/PlexusContainerTest.java")
3841 #:jdk ,icedtea-8
3842 #:phases
3843 (modify-phases %standard-phases
3844 (add-before 'build 'copy-resources
3845 (lambda _
3846 (copy-recursively
3847 "plexus-container-default/src/main/resources/"
3848 "build/classes")
3849 #t))
3850 (add-before 'check 'fix-paths
3851 (lambda _
3852 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
3853 (substitute*
3854 (string-append
3855 dir "/plexus/component/composition/"
3856 "ComponentRealmCompositionTest.java")
3857 (("src/test") "plexus-container-default/src/test"))
3858 #t))))))
3859 (inputs
3860 `(("worldclass" ,java-plexus-classworlds)
3861 ("xbean" ,java-geronimo-xbean-reflect)
3862 ("utils" ,java-plexus-utils)
3863 ("junit" ,java-junit)
3864 ("guava" ,java-guava)))
3865 (native-inputs
3866 `(("archiver" ,java-plexus-archiver)
3867 ("hamcrest" ,java-hamcrest-core)))))
3868
3869 (define-public java-plexus-component-annotations
3870 (package
3871 (inherit java-plexus-container-default)
3872 (name "java-plexus-component-annotations")
3873 (arguments
3874 `(#:jar-name "plexus-component-annotations.jar"
3875 #:source-dir "plexus-component-annotations/src/main/java"
3876 #:tests? #f)); no tests
3877 (inputs '())
3878 (native-inputs '())
3879 (synopsis "Plexus descriptors generator")
3880 (description "This package is a Maven plugin to generate Plexus descriptors
3881 from source tags and class annotations.")))
3882
3883 (define-public java-plexus-cipher
3884 (package
3885 (name "java-plexus-cipher")
3886 (version "1.7")
3887 (source (origin
3888 (method url-fetch)
3889 (uri (string-append "https://github.com/codehaus-plexus/plexus-cipher"
3890 "/archive/plexus-cipher-" version ".tar.gz"))
3891 (sha256
3892 (base32
3893 "1j3r8xzlxlk340snkjp6lk2ilkxlkn8qavsfiq01f43xmvv8ymk3"))))
3894 (build-system ant-build-system)
3895 (arguments
3896 `(#:jar-name "plexus-cipher.jar"
3897 #:source-dir "src/main/java"
3898 #:jdk ,icedtea-8
3899 #:tests? #f; FIXME: requires sisu-inject-bean
3900 #:phases
3901 (modify-phases %standard-phases
3902 (add-before 'build 'copy-resources
3903 (lambda _
3904 (copy-recursively "src/main/resources" "build/classes")
3905 (mkdir-p "build/classes/META-INF/sisu")
3906 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
3907 (lambda _
3908 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
3909 #t)))))
3910 (inputs
3911 `(("java-cdi-api" ,java-cdi-api)
3912 ("java-javax-inject" ,java-javax-inject)))
3913 (home-page "https://github.com/sonatype/plexus-cipher")
3914 (synopsis "Encryption/decryption Component")
3915 (description "Plexus-cipher contains a component to deal with encryption
3916 and decryption.")
3917 (license license:asl2.0)))
3918
3919 (define-public java-plexus-compiler-api
3920 (package
3921 (name "java-plexus-compiler-api")
3922 (version "2.8.4")
3923 (source (origin
3924 (method url-fetch)
3925 (uri (string-append "https://github.com/codehaus-plexus/plexus-compiler"
3926 "/archive/plexus-compiler-" version ".tar.gz"))
3927 (sha256
3928 (base32
3929 "09vmxs0807wsd26nbrwwj5l8ycmzazqycj52l7w6wjvkryywi69h"))))
3930 (build-system ant-build-system)
3931 (arguments
3932 `(#:jar-name "plexus-compiler-api.jar"
3933 #:source-dir "plexus-compiler-api/src/main/java"
3934 #:jdk ,icedtea-8
3935 #:test-dir "plexus-compiler-api/src/test"))
3936 (inputs
3937 `(("java-plexus-container-default" ,java-plexus-container-default)
3938 ("java-plexus-util" ,java-plexus-utils)))
3939 (native-inputs
3940 `(("java-junit" ,java-junit)))
3941 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
3942 (synopsis "Plexus Compilers component's API to manipulate compilers")
3943 (description "This package contains the API used by components to manipulate
3944 compilers.")
3945 (license (list license:asl2.0
3946 license:expat))))
3947
3948 (define-public java-plexus-compiler-javac
3949 (package
3950 (inherit java-plexus-compiler-api)
3951 (name "java-plexus-compiler-javac")
3952 (arguments
3953 `(#:jar-name "plexus-compiler-javac.jar"
3954 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
3955 #:jdk ,icedtea-8
3956 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
3957 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"))
3958 (inputs
3959 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
3960 ("java-plexus-utils" ,java-plexus-utils)
3961 ("java-plexus-container-default" ,java-plexus-container-default)))
3962 (native-inputs
3963 `(("java-junit" ,java-junit)))
3964 (synopsis "Javac Compiler support for Plexus Compiler component")
3965 (description "This package contains the Javac Compiler support for Plexus
3966 Compiler component.")))
3967
3968 (define-public java-plexus-sec-dispatcher
3969 (package
3970 (name "java-plexus-sec-dispatcher")
3971 (version "1.4") ;; Newest release listed at the Maven Central Repository.
3972 (source (origin
3973 ;; This project doesn't tag releases or publish tarballs, so we take
3974 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
3975 (method url-fetch)
3976 (uri (string-append "https://github.com/sonatype/plexus-sec-dispatcher/"
3977 "archive/7db8f88048.tar.gz"))
3978 (sha256
3979 (base32
3980 "1smfrk4n7xbrsxpxcp2j4i0j8q86j73w0w6xg7qz83dp6dagdjgp"))
3981 (file-name (string-append name "-" version ".tar.gz"))))
3982 (arguments
3983 `(#:jar-name "plexus-sec-dispatcher.jar"
3984 #:source-dir "src/main/java"
3985 #:jdk ,icedtea-8
3986 #:phases
3987 (modify-phases %standard-phases
3988 (add-before 'build 'generate-models
3989 (lambda* (#:key inputs #:allow-other-keys)
3990 (define (modello-single-mode file version mode)
3991 (invoke "java"
3992 "org.codehaus.modello.ModelloCli"
3993 file mode "src/main/java" version
3994 "false" "true"))
3995 (let ((file "src/main/mdo/settings-security.mdo"))
3996 (modello-single-mode file "1.0.0" "java")
3997 (modello-single-mode file "1.0.0" "xpp3-reader")
3998 (modello-single-mode file "1.0.0" "xpp3-writer"))
3999 #t))
4000 (add-before 'build 'generate-components.xml
4001 (lambda _
4002 (mkdir-p "build/classes/META-INF/plexus")
4003 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4004 (lambda _
4005 (display
4006 "<component-set>\n
4007 <components>\n
4008 <component>\n
4009 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4010 <role-hint>default</role-hint>\n
4011 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4012 <description></description>\n
4013 <requirements>\n
4014 <requirement>\n
4015 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4016 <field-name>_cipher</field-name>\n
4017 </requirement>\n
4018 <requirement>\n
4019 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4020 <field-name>_decryptors</field-name>\n
4021 </requirement>\n
4022 </requirements>\n
4023 <configuration>\n
4024 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4025 </configuration>\n
4026 </component>\n
4027 </components>\n
4028 </component-set>\n")))
4029 #t))
4030 (add-before 'check 'fix-paths
4031 (lambda _
4032 (copy-recursively "src/test/resources" "target")
4033 #t)))))
4034 (inputs
4035 `(("java-plexus-cipher" ,java-plexus-cipher)))
4036 (native-inputs
4037 `(("java-modello-core" ,java-modello-core)
4038 ;; for modello:
4039 ("java-plexus-container-default" ,java-plexus-container-default)
4040 ("java-plexus-classworlds" ,java-plexus-classworlds)
4041 ("java-plexus-utils" ,java-plexus-utils)
4042 ("java-guava" ,java-guava)
4043 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4044 ("java-sisu-build-api" ,java-sisu-build-api)
4045 ;; modello plugins:
4046 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4047 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4048 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4049 ;; for tests
4050 ("java-junit" ,java-junit)))
4051 (build-system ant-build-system)
4052 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4053 (synopsis "Plexus Security Dispatcher Component")
4054 (description "This package is the Plexus Security Dispatcher Component.
4055 This component decrypts a string passed to it.")
4056 (license license:asl2.0)))
4057
4058 (define-public java-plexus-cli
4059 (package
4060 (name "java-plexus-cli")
4061 (version "1.7")
4062 (source (origin
4063 (method git-fetch)
4064 (uri (git-reference
4065 (url "https://github.com/sonatype/plexus-cli")
4066 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4067 (file-name (string-append name "-" version))
4068 (sha256
4069 (base32
4070 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4071 (build-system ant-build-system)
4072 (arguments
4073 `(#:jar-name "plexus-cli.jar"
4074 #:source-dir "src/main/java"
4075 #:jdk ,icedtea-8
4076 #:test-dir "src/test"))
4077 (inputs
4078 `(("java-commons-cli" ,java-commons-cli)
4079 ("java-plexus-container-default" ,java-plexus-container-default)
4080 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4081 (native-inputs
4082 `(("java-plexus-utils" ,java-plexus-utils)
4083 ("java-junit" ,java-junit)
4084 ("java-guava" ,java-guava)))
4085 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4086 (synopsis "CLI building library for plexus")
4087 (description "This package is a library to help creating CLI around
4088 Plexus components.")
4089 (license license:asl2.0)))
4090
4091 (define-public java-sisu-build-api
4092 (package
4093 (name "java-sisu-build-api")
4094 (version "0.0.7")
4095 (source (origin
4096 (method url-fetch)
4097 (uri (string-append "https://github.com/sonatype/sisu-build-api/"
4098 "archive/plexus-build-api-" version ".tar.gz"))
4099 (sha256
4100 (base32
4101 "1c3rrpma3x634xp2rm2p5iskfhzdyc7qfbhjzr70agrl1jwghgy2"))))
4102 (build-system ant-build-system)
4103 (arguments
4104 `(#:jar-name "sisu-build-api.jar"
4105 #:source-dir "src/main/java"
4106 #:jdk ,icedtea-8
4107 #:tests? #f; FIXME: how to run the tests?
4108 #:phases
4109 (modify-phases %standard-phases
4110 (add-before 'build 'copy-resources
4111 (lambda _
4112 (copy-recursively "src/main/resources" "build/classes")
4113 (substitute* (find-files "build/classes")
4114 (("\\$\\{project.version\\}") ,version))
4115 #t))
4116 (add-before 'build 'generate-plexus-compontent
4117 (lambda _
4118 (mkdir-p "build/classes/META-INF/plexus")
4119 ;; This file is required for plexus to inject this package.
4120 ;; FIXME: how is it generated?
4121 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4122 (lambda _
4123 (display
4124 "<component-set>\n
4125 <components>\n
4126 <component>\n
4127 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4128 <role-hint>default</role-hint>\n
4129 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4130 <description>Filesystem based non-incremental build context implementation\n
4131 which behaves as if all files were just created.</description>\n
4132 </component>\n
4133 </components>\n
4134 </component-set>\n")))
4135 #t)))))
4136 (inputs
4137 `(("java-plexus-utils" ,java-plexus-utils)
4138 ("java-plexus-container-default" ,java-plexus-container-default)))
4139 (home-page "https://github.com/sonatype/sisu-build-api/")
4140 (synopsis "Base build API for maven")
4141 (description "This package contains the base build API for maven and
4142 a default implementation of it. This API is about scanning files in a
4143 project and determining what files need to be rebuilt.")
4144 (license license:asl2.0)))
4145
4146 (define-public java-modello-core
4147 (package
4148 (name "java-modello-core")
4149 (version "1.9.1")
4150 (source (origin
4151 (method url-fetch)
4152 (uri (string-append "https://github.com/codehaus-plexus/modello"
4153 "/archive/modello-" version ".tar.gz"))
4154 (sha256
4155 (base32
4156 "0l2pvns8pmlrmjm3iknp7gpg3654y1m8qhy55b19sdwdchdcyxfh"))))
4157 (build-system ant-build-system)
4158 (arguments
4159 `(#:jar-name "modello-core.jar"
4160 #:source-dir "modello-core/src/main/java"
4161 #:test-dir "modello-core/src/test"
4162 #:main-class "org.codehaus.modello.ModelloCli"
4163 #:jdk ,icedtea-8
4164 #:phases
4165 (modify-phases %standard-phases
4166 (add-before 'build 'copy-resources
4167 (lambda _
4168 (mkdir-p "build/classes/META-INF/plexus")
4169 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4170 "build/classes/META-INF/plexus/components.xml")
4171 #t))
4172 (add-before 'check 'fix-tests
4173 (lambda _
4174 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4175 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4176 "modello/core/io/ModelReaderTest.java")
4177 (("src/test") "modello-core/src/test")))
4178 #t)))))
4179 (inputs
4180 `(("java-plexus-utils" ,java-plexus-utils)
4181 ("java-plexus-container-default" ,java-plexus-container-default)
4182 ("java-sisu-build-api" ,java-sisu-build-api)))
4183 (native-inputs
4184 `(("java-junit" ,java-junit)
4185 ("java-plexus-classworlds" ,java-plexus-classworlds)
4186 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4187 ("java-guava" ,java-guava)))
4188 (home-page "https://codehaus-plexus.github.io/modello/")
4189 (synopsis "Framework for code generation from a simple model")
4190 (description "Modello is a framework for code generation from a simple model.
4191
4192 Modello generates code from a simple model format: based on a plugin
4193 architecture, various types of code and descriptors can be generated from the
4194 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4195 XSD and documentation.")
4196 (license (list
4197 license:expat
4198 ;; Although this package uses only files licensed under expat,
4199 ;; other parts of the source are licensed under different
4200 ;; licenses. We include them to be inherited by other packages.
4201 license:asl2.0
4202 ;; Some files in modello-plugin-java are licensed under a
4203 ;; 5-clause BSD license.
4204 (license:non-copyleft
4205 (string-append "file:///modello-plugins/modello-plugin-java/"
4206 "src/main/java/org/codehaus/modello/plugin/"
4207 "java/javasource/JNaming.java"))))))
4208
4209 (define-public java-modello-plugins-java
4210 (package
4211 (inherit java-modello-core)
4212 (name "java-modello-plugins-java")
4213 (arguments
4214 `(#:jar-name "modello-plugins-java.jar"
4215 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4216 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4217 #:jdk ,icedtea-8
4218 #:tests? #f; requires maven-model, which depends on this package
4219 #:phases
4220 (modify-phases %standard-phases
4221 (add-before 'build 'copy-resources
4222 (lambda _
4223 (mkdir-p "build/classes")
4224 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4225 "build/classes")
4226 #t)))))
4227 (inputs
4228 `(("java-modello-core" ,java-modello-core)
4229 ,@(package-inputs java-modello-core)))
4230 (synopsis "Modello Java Plugin")
4231 (description "Modello Java Plugin generates Java objects for the model.")))
4232
4233 (define-public java-modello-plugins-xml
4234 (package
4235 (inherit java-modello-core)
4236 (name "java-modello-plugins-xml")
4237 (arguments
4238 `(#:jar-name "modello-plugins-xml.jar"
4239 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4240 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4241 #:jdk ,icedtea-8
4242 #:phases
4243 (modify-phases %standard-phases
4244 (add-before 'build 'copy-resources
4245 (lambda _
4246 (mkdir-p "build/classes")
4247 (copy-recursively
4248 "modello-plugins/modello-plugin-xml/src/main/resources"
4249 "build/classes")
4250 #t))
4251 (add-before 'check 'fix-paths
4252 (lambda _
4253 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4254 (substitute*
4255 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4256 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4257 #t)))))
4258 (inputs
4259 `(("java-modello-core" ,java-modello-core)
4260 ("java-modello-plugins-java" ,java-modello-plugins-java)
4261 ,@(package-inputs java-modello-core)))
4262 (synopsis "Modello XML Plugin")
4263 (description "Modello XML Plugin contains shared code for every plugins
4264 working on XML representation of the model.")))
4265
4266 (define-public java-modello-test
4267 (package
4268 (inherit java-modello-core)
4269 (name "java-modello-test")
4270 (arguments
4271 `(#:jar-name "modello-test.jar"
4272 #:source-dir "modello-test/src/main/java"
4273 #:tests? #f; no tests
4274 #:jdk ,icedtea-8))
4275 (inputs
4276 `(("java-plexus-utils" ,java-plexus-utils)
4277 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
4278 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
4279 ("java-plexus-container-default" ,java-plexus-container-default)))
4280 (synopsis "Modello test package")
4281 (description "The modello test package contains the basis to create
4282 Modello generator unit-tests, including sample models and xml files to test
4283 every feature for every plugin.")))
4284
4285 (define-public java-modello-plugins-xpp3
4286 (package
4287 (inherit java-modello-core)
4288 (name "java-modello-plugins-xpp3")
4289 (arguments
4290 `(#:jar-name "modello-plugins-xpp3.jar"
4291 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
4292 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
4293 ;; One of the test dependencies is maven-model which depends on this package.
4294 #:tests? #f
4295 #:jdk ,icedtea-8
4296 #:phases
4297 (modify-phases %standard-phases
4298 (add-before 'build 'copy-resources
4299 (lambda _
4300 (mkdir-p "build/classes")
4301 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
4302 "build/classes")
4303 #t)))))
4304 (inputs
4305 `(("java-modello-core" ,java-modello-core)
4306 ("java-modello-plugins-java" ,java-modello-plugins-java)
4307 ("java-modello-plugins-xml" ,java-modello-plugins-xml)
4308 ,@(package-inputs java-modello-core)))
4309 (native-inputs
4310 `(("java-xmlunit" ,java-xmlunit)
4311 ("java-modello-test" ,java-modello-test)
4312 ,@(package-native-inputs java-modello-core)))
4313 (synopsis "Modello XPP3 Plugin")
4314 (description "The modello XPP3 plugin generates XML readers and writers based
4315 on the XPP3 API (XML Pull Parser).")))
4316
4317 (define-public java-asm
4318 (package
4319 (name "java-asm")
4320 (version "6.0")
4321 (source (origin
4322 (method url-fetch)
4323 (uri (string-append "http://download.forge.ow2.org/asm/"
4324 "asm-" version ".tar.gz"))
4325 (sha256
4326 (base32
4327 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
4328 (build-system ant-build-system)
4329 (propagated-inputs
4330 `(("java-aqute-bndlib" ,java-aqute-bndlib)
4331 ("java-aqute-libg" ,java-aqute-libg)))
4332 (arguments
4333 `(#:build-target "compile"
4334 ;; The tests require an old version of Janino, which no longer compiles
4335 ;; with the JDK7.
4336 #:tests? #f
4337 #:make-flags
4338 (list
4339 ;; We don't need these extra ant tasks, but the build system asks us to
4340 ;; provide a path anyway.
4341 "-Dobjectweb.ant.tasks.path=dummy-path"
4342 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
4343 ;; used during the build automatically by ant-build-system, but
4344 ;; java-asm's build.xml fails unless we provide something here.
4345 "-Dbiz.aQute.bnd.path=dummy-path")
4346 #:phases
4347 (modify-phases %standard-phases
4348 (add-before 'install 'build-jars
4349 (lambda* (#:key make-flags #:allow-other-keys)
4350 ;; We cannot use the "jar" target because it depends on a couple
4351 ;; of unpackaged, complicated tools.
4352 (mkdir "dist")
4353 (invoke "jar"
4354 "-cf" (string-append "dist/asm-" ,version ".jar")
4355 "-C" "output/build/tmp" ".")))
4356 (replace 'install
4357 (install-jars "dist")))))
4358 (native-inputs
4359 `(("java-junit" ,java-junit)))
4360 (home-page "https://asm.ow2.io/")
4361 (synopsis "Very small and fast Java bytecode manipulation framework")
4362 (description "ASM is an all purpose Java bytecode manipulation and
4363 analysis framework. It can be used to modify existing classes or dynamically
4364 generate classes, directly in binary form. The provided common
4365 transformations and analysis algorithms allow to easily assemble custom
4366 complex transformations and code analysis tools.")
4367 (license license:bsd-3)))
4368
4369 (define java-asm-bootstrap
4370 (package
4371 (inherit java-asm)
4372 (name "java-asm-bootstrap")
4373 (arguments
4374 (substitute-keyword-arguments (package-arguments java-asm)
4375 ((#:tests? _) #f)))
4376 (native-inputs `())
4377 (propagated-inputs
4378 `(("java-aqute-bndlib" ,java-aqute-bndlib-bootstrap)
4379 ("java-aqute-libg" ,java-aqute-libg-bootstrap)
4380 ,@(delete `("java-aqute-bndlib" ,java-aqute-bndlib)
4381 (delete `("java-aqute-libg" ,java-aqute-libg)
4382 (package-inputs java-asm)))))))
4383
4384 (define-public java-cglib
4385 (package
4386 (name "java-cglib")
4387 (version "3.2.4")
4388 (source
4389 (origin
4390 (method git-fetch)
4391 (uri (git-reference
4392 (url "https://github.com/cglib/cglib.git")
4393 (commit (string-append
4394 "RELEASE_"
4395 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
4396 version)))))
4397 (file-name (git-file-name name version))
4398 (sha256
4399 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
4400 (build-system ant-build-system)
4401 (arguments
4402 `(;; FIXME: tests fail because junit runs
4403 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
4404 ;; to describe a test at all.
4405 #:tests? #f
4406 #:jar-name "cglib.jar"
4407 #:phases
4408 (modify-phases %standard-phases
4409 (add-after 'unpack 'chdir
4410 (lambda _ (chdir "cglib") #t)))))
4411 (inputs
4412 `(("java-asm" ,java-asm)
4413 ("java-junit" ,java-junit)))
4414 (home-page "https://github.com/cglib/cglib/")
4415 (synopsis "Java byte code generation library")
4416 (description "The byte code generation library CGLIB is a high level API
4417 to generate and transform Java byte code.")
4418 (license license:asl2.0)))
4419
4420 (define-public java-objenesis
4421 (package
4422 (name "java-objenesis")
4423 (version "2.5.1")
4424 (source (origin
4425 (method url-fetch)
4426 (uri (string-append "https://github.com/easymock/objenesis/"
4427 "archive/" version ".tar.gz"))
4428 (file-name (string-append "objenesis-" version ".tar.gz"))
4429 (sha256
4430 (base32
4431 "1va5qz1i2wawwavhnxfzxnfgrcaflz9p1pg03irrjh4nd3rz8wh6"))))
4432 (build-system ant-build-system)
4433 (arguments
4434 `(#:jar-name "objenesis.jar"
4435 #:source-dir "main/src/"
4436 #:test-dir "main/src/test/"))
4437 (native-inputs
4438 `(("java-junit" ,java-junit)
4439 ("java-hamcrest-core" ,java-hamcrest-core)))
4440 (home-page "http://objenesis.org/")
4441 (synopsis "Bypass the constructor when creating an object")
4442 (description "Objenesis is a small Java library that serves one purpose:
4443 to instantiate a new object of a particular class. It is common to see
4444 restrictions in libraries stating that classes must require a default
4445 constructor. Objenesis aims to overcome these restrictions by bypassing the
4446 constructor on object instantiation.")
4447 (license license:asl2.0)))
4448
4449 (define-public java-easymock
4450 (package
4451 (name "java-easymock")
4452 (version "3.4")
4453 (source (origin
4454 (method url-fetch)
4455 (uri (string-append "https://github.com/easymock/easymock/"
4456 "archive/easymock-" version ".tar.gz"))
4457 (sha256
4458 (base32
4459 "1yzg0kv256ndr57gpav46cyv4a1ns5sj722l50zpxk3j6sk9hnmi"))))
4460 (build-system ant-build-system)
4461 (arguments
4462 `(#:jar-name "easymock.jar"
4463 #:source-dir "core/src/main"
4464 #:test-dir "core/src/test"
4465 #:phases
4466 (modify-phases %standard-phases
4467 ;; FIXME: Android support requires the following packages to be
4468 ;; available: com.google.dexmaker.stock.ProxyBuilder
4469 (add-after 'unpack 'delete-android-support
4470 (lambda _
4471 (with-directory-excursion "core/src/main/java/org/easymock/internal"
4472 (substitute* "MocksControl.java"
4473 (("AndroidSupport.isAndroid\\(\\)") "false")
4474 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
4475 (delete-file "AndroidClassProxyFactory.java"))
4476 #t))
4477 (add-after 'unpack 'delete-broken-tests
4478 (lambda _
4479 (with-directory-excursion "core/src/test/java/org/easymock"
4480 ;; This test depends on dexmaker.
4481 (delete-file "tests2/ClassExtensionHelperTest.java")
4482
4483 ;; This is not a test.
4484 (delete-file "tests/BaseEasyMockRunnerTest.java")
4485
4486 ;; This test should be executed with a different runner...
4487 (delete-file "tests2/EasyMockAnnotationsTest.java")
4488 ;; ...but deleting it means that we also have to delete these
4489 ;; dependent files.
4490 (delete-file "tests2/EasyMockRunnerTest.java")
4491 (delete-file "tests2/EasyMockRuleTest.java")
4492
4493 ;; This test fails because the file "easymock.properties" does
4494 ;; not exist.
4495 (delete-file "tests2/EasyMockPropertiesTest.java"))
4496 #t)))))
4497 (inputs
4498 `(("java-asm" ,java-asm)
4499 ("java-cglib" ,java-cglib)
4500 ("java-objenesis" ,java-objenesis)))
4501 (native-inputs
4502 `(("java-junit" ,java-junit)
4503 ("java-hamcrest-core" ,java-hamcrest-core)))
4504 (home-page "http://easymock.org")
4505 (synopsis "Java library providing mock objects for unit tests")
4506 (description "EasyMock is a Java library that provides an easy way to use
4507 mock objects in unit testing.")
4508 (license license:asl2.0)))
4509
4510 (define-public java-jmock-1
4511 (package
4512 (name "java-jmock")
4513 (version "1.2.0")
4514 (source (origin
4515 (method url-fetch)
4516 (uri (string-append "https://github.com/jmock-developers/"
4517 "jmock-library/archive/" version ".tar.gz"))
4518 (file-name (string-append "jmock-" version ".tar.gz"))
4519 (sha256
4520 (base32
4521 "0xmrlhq0fszldkbv281k9463mv496143vvmqwpxp62yzjvdkx9w0"))))
4522 (build-system ant-build-system)
4523 (arguments
4524 `(#:build-target "jars"
4525 #:test-target "run.tests"
4526 #:phases
4527 (modify-phases %standard-phases
4528 (replace 'install (install-jars "build")))))
4529 (home-page "http://www.jmock.org")
4530 (synopsis "Mock object library for test-driven development")
4531 (description "JMock is a library that supports test-driven development of
4532 Java code with mock objects. Mock objects help you design and test the
4533 interactions between the objects in your programs.
4534
4535 The jMock library
4536
4537 @itemize
4538 @item makes it quick and easy to define mock objects
4539 @item lets you precisely specify the interactions between
4540 your objects, reducing the brittleness of your tests
4541 @item plugs into your favourite test framework
4542 @item is easy to extend.
4543 @end itemize\n")
4544 (license license:bsd-3)))
4545
4546 (define-public java-jmock
4547 (package
4548 (inherit java-jmock-1)
4549 (name "java-jmock")
4550 (version "2.8.2")
4551 (source (origin
4552 (method url-fetch)
4553 (uri (string-append "https://github.com/jmock-developers/"
4554 "jmock-library/archive/" version ".tar.gz"))
4555 (file-name (string-append name "-" version ".tar.gz"))
4556 (sha256
4557 (base32
4558 "18650a9g8xffcsdb6w91pbswa7f40fp2sh6s3nclkclz5dbzq8f0"))))
4559 (inputs
4560 `(("java-hamcrest-all" ,java-hamcrest-all)
4561 ("java-asm" ,java-asm)
4562 ("java-bsh" ,java-bsh)
4563 ("java-junit" ,java-junit)))
4564 (native-inputs
4565 `(("cglib" ,java-cglib)))
4566 (arguments
4567 `(#:jar-name "java-jmock.jar"
4568 #:source-dir "jmock/src/main/java"
4569 #:test-dir "jmock/src/test"))))
4570
4571 (define-public java-jmock-junit4
4572 (package
4573 (inherit java-jmock)
4574 (name "java-jmock-junit4")
4575 (arguments
4576 `(#:jar-name "java-jmock-junit4.jar"
4577 #:source-dir "jmock-junit4/src/main/java"
4578 #:test-dir "jmock-junit4/src/test"))
4579 (inputs
4580 `(("java-hamcrest-all" ,java-hamcrest-all)
4581 ("java-asm" ,java-asm)
4582 ("java-bsh" ,java-bsh)
4583 ("java-jmock" ,java-jmock)
4584 ("java-jumit" ,java-junit)))))
4585
4586 (define-public java-jmock-legacy
4587 (package
4588 (inherit java-jmock)
4589 (name "java-jmock-legacy")
4590 (arguments
4591 `(#:jar-name "java-jmock-legacy.jar"
4592 #:source-dir "jmock-legacy/src/main/java"
4593 #:test-dir "jmock-legacy/src/test"
4594 #:phases
4595 (modify-phases %standard-phases
4596 (add-before 'check 'copy-tests
4597 (lambda _
4598 ;; This file is a dependancy of some tests
4599 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
4600 (copy-file (string-append "jmock/src/test/java/" file)
4601 (string-append "jmock-legacy/src/test/java/" file))
4602 #t))))))
4603 (inputs
4604 `(("java-hamcrest-all" ,java-hamcrest-all)
4605 ("java-objenesis" ,java-objenesis)
4606 ("java-cglib" ,java-cglib)
4607 ("java-jmock" ,java-jmock)
4608 ("java-asm" ,java-asm)
4609 ("java-bsh" ,java-bsh)
4610 ("java-junit" ,java-junit)))
4611 (native-inputs
4612 `(("java-jmock-junit4" ,java-jmock-junit4)))))
4613
4614 (define-public java-hamcrest-all
4615 (package (inherit java-hamcrest-core)
4616 (name "java-hamcrest-all")
4617 (arguments
4618 `(#:jdk ,icedtea-8
4619 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
4620 ((#:build-target _) "bigjar")
4621 ((#:phases phases)
4622 `(modify-phases ,phases
4623 ;; Some build targets override the classpath, so we need to patch
4624 ;; the build.xml to ensure that required dependencies are on the
4625 ;; classpath.
4626 (add-after 'unpack 'patch-classpath-for-integration
4627 (lambda* (#:key inputs #:allow-other-keys)
4628 (substitute* "build.xml"
4629 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
4630 (string-join
4631 (cons line
4632 (append
4633 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
4634 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
4635 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
4636 ";"))
4637 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
4638 (string-append (assoc-ref inputs "java-hamcrest-core")
4639 "/share/java/hamcrest-core.jar")))
4640 #t)))))))
4641 (inputs
4642 `(("java-junit" ,java-junit)
4643 ("java-jmock" ,java-jmock-1)
4644 ;; This is necessary because of what seems to be a race condition.
4645 ;; This package would sometimes fail to build because hamcrest-core.jar
4646 ;; could not be found, even though it is built as part of this package.
4647 ;; Adding java-hamcrest-core appears to fix this problem. See
4648 ;; https://debbugs.gnu.org/31390 for more information.
4649 ("java-hamcrest-core" ,java-hamcrest-core)
4650 ("java-easymock" ,java-easymock)
4651 ,@(package-inputs java-hamcrest-core)))))
4652
4653 (define-public java-jopt-simple
4654 (package
4655 (name "java-jopt-simple")
4656 (version "5.0.3")
4657 (source (origin
4658 (method url-fetch)
4659 (uri (string-append "http://repo1.maven.org/maven2/"
4660 "net/sf/jopt-simple/jopt-simple/"
4661 version "/jopt-simple-"
4662 version "-sources.jar"))
4663 (sha256
4664 (base32
4665 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
4666 (build-system ant-build-system)
4667 (arguments
4668 `(#:tests? #f ; there are no tests
4669 #:jar-name "jopt-simple.jar"))
4670 (home-page "https://pholser.github.io/jopt-simple/")
4671 (synopsis "Java library for parsing command line options")
4672 (description "JOpt Simple is a Java library for parsing command line
4673 options, such as those you might pass to an invocation of @code{javac}. In
4674 the interest of striving for simplicity, as closely as possible JOpt Simple
4675 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
4676 GNU @code{getopt_long}. It also aims to make option parser configuration and
4677 retrieval of options and their arguments simple and expressive, without being
4678 overly clever.")
4679 (license license:expat)))
4680
4681 (define-public java-commons-math3
4682 (package
4683 (name "java-commons-math3")
4684 (version "3.6.1")
4685 (source (origin
4686 (method url-fetch)
4687 (uri (string-append "mirror://apache/commons/math/source/"
4688 "commons-math3-" version "-src.tar.gz"))
4689 (sha256
4690 (base32
4691 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
4692 (build-system ant-build-system)
4693 (arguments
4694 `(#:build-target "jar"
4695 #:test-target "test"
4696 #:make-flags
4697 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4698 (junit (assoc-ref %build-inputs "java-junit")))
4699 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4700 (string-append "-Dhamcrest.jar=" hamcrest
4701 "/share/java/hamcrest-core.jar")))
4702 #:phases
4703 (modify-phases %standard-phases
4704 ;; We want to build the jar in the build phase and run the tests
4705 ;; later in a separate phase.
4706 (add-after 'unpack 'untangle-targets
4707 (lambda _
4708 (substitute* "build.xml"
4709 (("name=\"jar\" depends=\"test\"")
4710 "name=\"jar\" depends=\"compile\""))
4711 #t))
4712 ;; There is no install target.
4713 (replace 'install
4714 (install-jars "target")))))
4715 (native-inputs
4716 `(("java-junit" ,java-junit)
4717 ("java-hamcrest-core" ,java-hamcrest-core)))
4718 (home-page "https://commons.apache.org/math/")
4719 (synopsis "Apache Commons mathematics library")
4720 (description "Commons Math is a library of lightweight, self-contained
4721 mathematics and statistics components addressing the most common problems not
4722 available in the Java programming language or Commons Lang.")
4723 (license license:asl2.0)))
4724
4725 (define-public java-jmh
4726 (package
4727 (name "java-jmh")
4728 (version "1.17.5")
4729 (source (origin
4730 (method hg-fetch)
4731 (uri (hg-reference
4732 (url "http://hg.openjdk.java.net/code-tools/jmh/")
4733 (changeset version)))
4734 (file-name (string-append name "-" version "-checkout"))
4735 (sha256
4736 (base32
4737 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
4738 (build-system ant-build-system)
4739 (arguments
4740 `(#:jar-name "jmh-core.jar"
4741 #:source-dir "jmh-core/src/main"
4742 #:test-dir "jmh-core/src/test"
4743 #:phases
4744 (modify-phases %standard-phases
4745 ;; This seems to be a bug in the JDK. It may not be necessary in
4746 ;; future versions of the JDK.
4747 (add-after 'unpack 'fix-bug
4748 (lambda _
4749 (with-directory-excursion
4750 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
4751 (substitute* '("IntegerValueConverter.java"
4752 "ThreadsValueConverter.java")
4753 (("public Class<Integer> valueType")
4754 "public Class<? extends Integer> valueType")))
4755 #t)))))
4756 (inputs
4757 `(("java-jopt-simple" ,java-jopt-simple)
4758 ("java-commons-math3" ,java-commons-math3)))
4759 (native-inputs
4760 `(("java-junit" ,java-junit)
4761 ("java-hamcrest-core" ,java-hamcrest-core)))
4762 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
4763 (synopsis "Benchmark harness for the JVM")
4764 (description "JMH is a Java harness for building, running, and analysing
4765 nano/micro/milli/macro benchmarks written in Java and other languages
4766 targeting the JVM.")
4767 ;; GPLv2 only
4768 (license license:gpl2)))
4769
4770 (define-public java-commons-collections4
4771 (package
4772 (name "java-commons-collections4")
4773 (version "4.1")
4774 (source (origin
4775 (method url-fetch)
4776 (uri (string-append "mirror://apache/commons/collections/source/"
4777 "commons-collections4-" version "-src.tar.gz"))
4778 (sha256
4779 (base32
4780 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
4781 (build-system ant-build-system)
4782 (arguments
4783 `(#:test-target "test"
4784 #:make-flags
4785 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
4786 (junit (assoc-ref %build-inputs "java-junit"))
4787 (easymock (assoc-ref %build-inputs "java-easymock")))
4788 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
4789 (string-append "-Dhamcrest.jar=" hamcrest
4790 "/share/java/hamcrest-core.jar")
4791 (string-append "-Deasymock.jar=" easymock
4792 "/share/java/easymock.jar")))
4793 #:phases
4794 (modify-phases %standard-phases
4795 (replace 'install
4796 (install-jars "target")))))
4797 (native-inputs
4798 `(("java-junit" ,java-junit)
4799 ("java-hamcrest-core" ,java-hamcrest-core)
4800 ("java-easymock" ,java-easymock)))
4801 (home-page "https://commons.apache.org/collections/")
4802 (synopsis "Collections framework")
4803 (description "The Java Collections Framework is the recognised standard
4804 for collection handling in Java. Commons-Collections seek to build upon the
4805 JDK classes by providing new interfaces, implementations and utilities. There
4806 are many features, including:
4807
4808 @itemize
4809 @item @code{Bag} interface for collections that have a number of copies of
4810 each object
4811 @item @code{BidiMap} interface for maps that can be looked up from value to
4812 key as well and key to value
4813 @item @code{MapIterator} interface to provide simple and quick iteration over
4814 maps
4815 @item Transforming decorators that alter each object as it is added to the
4816 collection
4817 @item Composite collections that make multiple collections look like one
4818 @item Ordered maps and sets that retain the order elements are added in,
4819 including an LRU based map
4820 @item Reference map that allows keys and/or values to be garbage collected
4821 under close control
4822 @item Many comparator implementations
4823 @item Many iterator implementations
4824 @item Adapter classes from array and enumerations to collections
4825 @item Utilities to test or create typical set-theory properties of collections
4826 such as union, intersection, and closure.
4827 @end itemize\n")
4828 (license license:asl2.0)))
4829
4830 (define-public java-commons-collections
4831 (package
4832 (inherit java-commons-collections4)
4833 (name "java-commons-collections")
4834 (version "3.2.2")
4835 (source (origin
4836 (method url-fetch)
4837 (uri (string-append "mirror://apache/commons/collections/source/"
4838 "commons-collections-" version "-src.tar.gz"))
4839 (sha256
4840 (base32
4841 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
4842 (patches
4843 (search-patches "java-commons-collections-fix-java8.patch"))))
4844 (arguments
4845 (substitute-keyword-arguments (package-arguments java-commons-collections4)
4846 ((#:phases phases)
4847 `(modify-phases ,phases
4848 ;; The manifest is required by the build procedure
4849 (add-before 'build 'add-manifest
4850 (lambda _
4851 (mkdir-p "build/conf")
4852 (call-with-output-file "build/conf/MANIFEST.MF"
4853 (lambda (file)
4854 (format file "Manifest-Version: 1.0\n")))
4855 #t))
4856 (replace 'install
4857 (install-jars "build"))))))))
4858
4859 (define java-commons-collections-test-classes
4860 (package
4861 (inherit java-commons-collections)
4862 (arguments
4863 `(#:jar-name "commons-collections-test-classes.jar"
4864 #:source-dir "src/test"
4865 #:tests? #f))
4866 (inputs
4867 `(("collection" ,java-commons-collections)))))
4868
4869 (define-public java-commons-beanutils
4870 (package
4871 (name "java-commons-beanutils")
4872 (version "1.9.3")
4873 (source (origin
4874 (method url-fetch)
4875 (uri (string-append "mirror://apache/commons/beanutils/source/"
4876 "commons-beanutils-" version "-src.tar.gz"))
4877 (sha256
4878 (base32
4879 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
4880 (build-system ant-build-system)
4881 (arguments
4882 `(#:test-target "test"
4883 #:tests? #f
4884 #:phases
4885 (modify-phases %standard-phases
4886 (replace 'install
4887 (lambda* (#:key outputs #:allow-other-keys)
4888 (rename-file (string-append "dist/commons-beanutils-" ,version
4889 "-SNAPSHOT.jar")
4890 "commons-beanutils.jar")
4891 (install-file "commons-beanutils.jar"
4892 (string-append (assoc-ref outputs "out") "/share/java/"))
4893 #t)))))
4894 (inputs
4895 `(("logging" ,java-commons-logging-minimal)
4896 ("collections" ,java-commons-collections)))
4897 (native-inputs
4898 `(("junit" ,java-junit)
4899 ("collections-test" ,java-commons-collections-test-classes)))
4900 (home-page "https://commons.apache.org/beanutils/")
4901 (synopsis "Dynamically set or get properties in Java")
4902 (description "BeanUtils provides a simplified interface to reflection and
4903 introspection to set or get dynamically determined properties through their
4904 setter and getter method.")
4905 (license license:asl2.0)))
4906
4907 (define-public java-commons-io
4908 (package
4909 (name "java-commons-io")
4910 (version "2.5")
4911 (source
4912 (origin
4913 (method url-fetch)
4914 (uri (string-append "mirror://apache/commons/io/source/"
4915 "commons-io-" version "-src.tar.gz"))
4916 (sha256
4917 (base32
4918 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
4919 (build-system ant-build-system)
4920 (outputs '("out" "doc"))
4921 (arguments
4922 `(#:test-target "test"
4923 #:make-flags
4924 (list (string-append "-Djunit.jar="
4925 (assoc-ref %build-inputs "java-junit")
4926 "/share/java/junit.jar"))
4927 #:phases
4928 (modify-phases %standard-phases
4929 (add-after 'build 'build-javadoc ant-build-javadoc)
4930 (replace 'install (install-jars "target"))
4931 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
4932 (native-inputs
4933 `(("java-junit" ,java-junit)
4934 ("java-hamcrest-core" ,java-hamcrest-core)))
4935 (home-page "https://commons.apache.org/io/")
4936 (synopsis "Common useful IO related classes")
4937 (description "Commons-IO contains utility classes, stream implementations,
4938 file filters and endian classes.")
4939 (license license:asl2.0)))
4940
4941 (define-public java-commons-exec-1.1
4942 (package
4943 (name "java-commons-exec")
4944 (version "1.1")
4945 (source
4946 (origin
4947 (method url-fetch)
4948 (uri (string-append "mirror://apache/commons/exec/source/"
4949 "commons-exec-" version "-src.tar.gz"))
4950 (sha256
4951 (base32
4952 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
4953 (build-system ant-build-system)
4954 (arguments
4955 `(#:test-target "test"
4956 #:make-flags
4957 (list (string-append "-Dmaven.junit.jar="
4958 (assoc-ref %build-inputs "java-junit")
4959 "/share/java/junit.jar"))
4960 #:phases
4961 (modify-phases %standard-phases
4962 (add-before 'build 'delete-network-tests
4963 (lambda _
4964 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
4965 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
4966 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
4967 #t))
4968 ;; The "build" phase automatically tests.
4969 (delete 'check)
4970 (replace 'install (install-jars "target")))))
4971 (native-inputs
4972 `(("java-junit" ,java-junit)))
4973 (home-page "https://commons.apache.org/proper/commons-exec/")
4974 (synopsis "Common program execution related classes")
4975 (description "Commons-Exec simplifies executing external processes.")
4976 (license license:asl2.0)))
4977
4978 (define-public java-commons-exec
4979 (package
4980 (inherit java-commons-exec-1.1)
4981 (version "1.3")
4982 (source
4983 (origin
4984 (method url-fetch)
4985 (uri (string-append "mirror://apache/commons/exec/source/"
4986 "commons-exec-" version "-src.tar.gz"))
4987 (sha256
4988 (base32
4989 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
4990 (arguments
4991 `(#:test-target "test"
4992 #:make-flags
4993 (list (string-append "-Dmaven.junit.jar="
4994 (assoc-ref %build-inputs "java-junit")
4995 "/share/java/junit.jar")
4996 "-Dmaven.compiler.source=1.7"
4997 "-Dmaven.compiler.target=1.7")
4998 #:phases
4999 (modify-phases %standard-phases
5000 (add-before 'build 'delete-network-tests
5001 (lambda* (#:key inputs #:allow-other-keys)
5002 ;; This test hangs indefinitely.
5003 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5004 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5005 (("ping -c 10 127.0.0.1") "sleep 10"))
5006 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5007 (("/bin/ls") "ls"))
5008 (call-with-output-file "src/test/scripts/ping.sh"
5009 (lambda (port)
5010 (format port "#!~a/bin/sh\nsleep $1\n"
5011 (assoc-ref inputs "bash"))))
5012 #t))
5013 ;; The "build" phase automatically tests.
5014 (delete 'check)
5015 (replace 'install (install-jars "target")))))
5016 (native-inputs
5017 `(("java-junit" ,java-junit)
5018 ("java-hamcrest-core" ,java-hamcrest-core)))))
5019
5020 (define-public java-commons-lang
5021 (package
5022 (name "java-commons-lang")
5023 (version "2.6")
5024 (source
5025 (origin
5026 (method url-fetch)
5027 (uri (string-append "mirror://apache/commons/lang/source/"
5028 "commons-lang-" version "-src.tar.gz"))
5029 (sha256
5030 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5031 (build-system ant-build-system)
5032 (outputs '("out" "doc"))
5033 (arguments
5034 `(#:test-target "test"
5035 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5036 #:phases
5037 (modify-phases %standard-phases
5038 (add-after 'build 'build-javadoc ant-build-javadoc)
5039 (add-before 'check 'disable-failing-test
5040 (lambda _
5041 ;; Disable a failing test
5042 (substitute* "src/test/java/org/apache/commons/lang/\
5043 time/FastDateFormatTest.java"
5044 (("public void testFormat\\(\\)")
5045 "public void disabled_testFormat()"))
5046 #t))
5047 (replace 'install (install-jars "target"))
5048 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5049 (native-inputs
5050 `(("java-junit" ,java-junit)))
5051 (home-page "https://commons.apache.org/lang/")
5052 (synopsis "Extension of the java.lang package")
5053 (description "The Commons Lang components contains a set of Java classes
5054 that provide helper methods for standard Java classes, especially those found
5055 in the @code{java.lang} package in the Sun JDK. The following classes are
5056 included:
5057
5058 @itemize
5059 @item StringUtils - Helper for @code{java.lang.String}.
5060 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5061 of characters such as @code{[a-z]} and @code{[abcdez]}.
5062 @item RandomStringUtils - Helper for creating randomised strings.
5063 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5064 @item NumberRange - A range of numbers with an upper and lower bound.
5065 @item ObjectUtils - Helper for @code{java.lang.Object}.
5066 @item SerializationUtils - Helper for serializing objects.
5067 @item SystemUtils - Utility class defining the Java system properties.
5068 @item NestedException package - A sub-package for the creation of nested
5069 exceptions.
5070 @item Enum package - A sub-package for the creation of enumerated types.
5071 @item Builder package - A sub-package for the creation of @code{equals},
5072 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5073 @end itemize\n")
5074 (license license:asl2.0)))
5075
5076 (define-public java-commons-lang3
5077 (package
5078 (name "java-commons-lang3")
5079 (version "3.4")
5080 (source
5081 (origin
5082 (method url-fetch)
5083 (uri (string-append "mirror://apache/commons/lang/source/"
5084 "commons-lang3-" version "-src.tar.gz"))
5085 (sha256
5086 (base32 "0xpshb9spjhplq5a7mr0y1bgfw8190ik4xj8f569xidfcki1d6kg"))))
5087 (build-system ant-build-system)
5088 (outputs '("out" "doc"))
5089 (arguments
5090 `(#:test-target "test"
5091 #:make-flags
5092 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-all"))
5093 (junit (assoc-ref %build-inputs "java-junit"))
5094 (easymock (assoc-ref %build-inputs "java-easymock"))
5095 (io (assoc-ref %build-inputs "java-commons-io")))
5096 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
5097 (string-append "-Dhamcrest.jar=" hamcrest
5098 "/share/java/hamcrest-all.jar")
5099 (string-append "-Dcommons-io.jar=" io
5100 "/share/java/commons-io-"
5101 ,(package-version java-commons-io)
5102 "-SNAPSHOT.jar")
5103 (string-append "-Deasymock.jar=" easymock
5104 "/share/java/easymock.jar")))
5105 #:phases
5106 (modify-phases %standard-phases
5107 (add-after 'build 'build-javadoc ant-build-javadoc)
5108 (replace 'install (install-jars "target"))
5109 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5110 (native-inputs
5111 `(("java-junit" ,java-junit)
5112 ("java-commons-io" ,java-commons-io)
5113 ("java-hamcrest-all" ,java-hamcrest-all)
5114 ("java-easymock" ,java-easymock)))
5115 (home-page "https://commons.apache.org/lang/")
5116 (synopsis "Extension of the java.lang package")
5117 (description "The Commons Lang components contains a set of Java classes
5118 that provide helper methods for standard Java classes, especially those found
5119 in the @code{java.lang} package. The following classes are included:
5120
5121 @itemize
5122 @item StringUtils - Helper for @code{java.lang.String}.
5123 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5124 characters such as @code{[a-z]} and @code{[abcdez]}.
5125 @item RandomStringUtils - Helper for creating randomised strings.
5126 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5127 @item NumberRange - A range of numbers with an upper and lower bound.
5128 @item ObjectUtils - Helper for @code{java.lang.Object}.
5129 @item SerializationUtils - Helper for serializing objects.
5130 @item SystemUtils - Utility class defining the Java system properties.
5131 @item NestedException package - A sub-package for the creation of nested
5132 exceptions.
5133 @item Enum package - A sub-package for the creation of enumerated types.
5134 @item Builder package - A sub-package for the creation of @code{equals},
5135 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5136 @end itemize\n")
5137 (license license:asl2.0)))
5138
5139 (define-public java-commons-bsf
5140 (package
5141 (name "java-commons-bsf")
5142 (version "2.4.0")
5143 (source (origin
5144 (method url-fetch)
5145 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5146 version ".tar.gz"))
5147 (sha256
5148 (base32
5149 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5150 (modules '((guix build utils)))
5151 (snippet
5152 '(begin
5153 (for-each delete-file
5154 (find-files "." "\\.jar$"))
5155 #t))))
5156 (build-system ant-build-system)
5157 (arguments
5158 `(#:build-target "jar"
5159 #:tests? #f; No test file
5160 #:modules ((guix build ant-build-system)
5161 (guix build utils)
5162 (guix build java-utils)
5163 (sxml simple))
5164 #:phases
5165 (modify-phases %standard-phases
5166 (add-before 'build 'create-properties
5167 (lambda _
5168 ;; This file is missing from the distribution
5169 (call-with-output-file "build-properties.xml"
5170 (lambda (port)
5171 (sxml->xml
5172 `(project (@ (basedir ".") (name "build-properties") (default ""))
5173 (property (@ (name "project.name") (value "bsf")))
5174 (property (@ (name "source.level") (value "1.5")))
5175 (property (@ (name "build.lib") (value "build/jar")))
5176 (property (@ (name "src.dir") (value "src")))
5177 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
5178 (property (@ (name "build.tests") (value "build/test-classes")))
5179 (property (@ (name "build.dest") (value "build/classes"))))
5180 port)))
5181 #t))
5182 (replace 'install (install-jars "build")))))
5183 (native-inputs
5184 `(("java-junit" ,java-junit)))
5185 (inputs
5186 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
5187 (home-page "https://commons.apache.org/proper/commons-bsf")
5188 (synopsis "Bean Scripting Framework")
5189 (description "The Bean Scripting Framework (BSF) is a set of Java classes
5190 which provides scripting language support within Java applications, and access
5191 to Java objects and methods from scripting languages. BSF allows one to write
5192 JSPs in languages other than Java while providing access to the Java class
5193 library. In addition, BSF permits any Java application to be implemented in
5194 part (or dynamically extended) by a language that is embedded within it. This
5195 is achieved by providing an API that permits calling scripting language engines
5196 from within Java, as well as an object registry that exposes Java objects to
5197 these scripting language engines.")
5198 (license license:asl2.0)))
5199
5200 (define-public java-commons-jxpath
5201 (package
5202 (name "java-commons-jxpath")
5203 (version "1.3")
5204 (source (origin
5205 (method url-fetch)
5206 (uri (string-append "mirror://apache/commons/jxpath/source/"
5207 "commons-jxpath-" version "-src.tar.gz"))
5208 (sha256
5209 (base32
5210 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
5211 (build-system ant-build-system)
5212 (arguments
5213 `(#:jar-name "commons-jxpath.jar"
5214 ;; tests require more dependencies, including mockrunner which depends on old software
5215 #:tests? #f
5216 #:source-dir "src/java"))
5217 (inputs
5218 `(("servlet" ,java-classpathx-servletapi)
5219 ("java-jdom" ,java-jdom)
5220 ("java-commons-beanutils" ,java-commons-beanutils)))
5221 (native-inputs
5222 `(("java-junit" ,java-junit)))
5223 (home-page "https://commons.apache.org/jxpath/")
5224 (synopsis "Simple interpreter of an expression language called XPath.")
5225 (description "The org.apache.commons.jxpath package defines a simple
5226 interpreter of an expression language called XPath. JXPath applies XPath
5227 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
5228 contexts, DOM etc, including mixtures thereof.")
5229 (license license:asl2.0)))
5230
5231 (define-public java-commons-pool
5232 (package
5233 (name "java-commons-pool")
5234 (version "2.6.2")
5235 (source (origin
5236 (method url-fetch)
5237 (uri (string-append "mirror://apache/commons/pool/source/"
5238 "commons-pool2-" version "-src.tar.gz"))
5239 (sha256
5240 (base32
5241 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
5242 (arguments
5243 `(#:jar-name "common-pool.jar"
5244 #:source-dir "src/main/java"
5245 #:test-exclude
5246 (list "**/PerformanceTest.java")))
5247 (build-system ant-build-system)
5248 (inputs
5249 `(("java-cglib" ,java-cglib)))
5250 (native-inputs
5251 `(("java-junit" ,java-junit)
5252 ("java-hamcrest-core" ,java-hamcrest-core)
5253 ("java-asm" ,java-asm)
5254 ("java-objenesis" ,java-objenesis)))
5255 (home-page "https://commons.apache.org/proper/commons-pool/")
5256 (synopsis "Object-pooling API in Java")
5257 (description "The commons-pool package provides an object-pooling API
5258 and a number of object pool implementations. This package defines a
5259 handful of pooling interfaces and some base classes that may be useful when
5260 creating new pool implementations.")
5261 (license license:asl2.0)))
5262
5263 (define-public java-commons-dbcp
5264 (package
5265 (name "java-commons-dbcp")
5266 (version "2.6.0")
5267 (source (origin
5268 (method url-fetch)
5269 (uri (string-append "mirror://apache/commons/dbcp/source/"
5270 "commons-dbcp2-" version "-src.tar.gz"))
5271 (sha256
5272 (base32
5273 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
5274 (arguments
5275 `(#:source-dir "src/main/java"
5276 #:jar-name "java-commons-dbcp.jar"
5277 #:tests? #f)); requires apache-geronimo
5278 (inputs
5279 `(("java-commons-pool" ,java-commons-pool)
5280 ("java-commons-logging" ,java-commons-logging-minimal)
5281 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
5282 (native-inputs
5283 `(("java-junit" ,java-junit)))
5284 (build-system ant-build-system)
5285 (home-page "https://commons.apache.org/proper/commons-dbcp/")
5286 (synopsis "Database Connection Pool for Java")
5287 (description "Commons-dbcp allows you to share a pool of database
5288 connections between users. Creating a new connection for each user can be
5289 time consuming and even unfeasible when the number of simultaneous users is
5290 very large. This package provides a way to share a poole of connections to
5291 reduce that load.")
5292 (license license:asl2.0)))
5293
5294 (define-public java-commons-jcs
5295 (package
5296 (name "java-commons-jcs")
5297 (version "2.2.1")
5298 (source (origin
5299 (method url-fetch)
5300 (uri (string-append "mirror://apache/commons/jcs/source/"
5301 "commons-jcs-dist-" version "-src.tar.gz"))
5302 (sha256
5303 (base32
5304 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
5305 (build-system ant-build-system)
5306 (arguments
5307 `(#:jar-name "commons-jcs.jar"
5308 #:source-dir "commons-jcs-core/src/main/java"
5309 #:test-dir "commons-jcs-core/src/test"
5310 #:tests? #f; requires hsqldb
5311 #:phases
5312 (modify-phases %standard-phases
5313 (add-before 'build 'prepare
5314 (lambda _
5315 (with-directory-excursion
5316 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
5317 (substitute*
5318 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
5319 (("commons.dbcp") "commons.dbcp2")
5320 ((".*\\.setMaxActive.*") ""))
5321 ;;; Remove dependency on velocity-tools
5322 (delete-file "admin/servlet/JCSAdminServlet.java"))
5323 #t)))))
5324 (propagated-inputs
5325 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
5326 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
5327 ("java-commons-httpclient" ,java-commons-httpclient)
5328 ("java-commons-dbcp" ,java-commons-dbcp)))
5329 (native-inputs
5330 `(("java-junit" ,java-junit)))
5331 (home-page "https://commons.apache.org/proper/commons-jcs/")
5332 (synopsis "Distributed caching system in Java")
5333 (description "JCS is a distributed caching system written in Java. It
5334 is intended to speed up applications by providing a means to manage cached
5335 data of various dynamic natures. Like any caching system, JCS is most useful
5336 for high read, low put applications. Latency times drop sharply and
5337 bottlenecks move away from the database in an effectively cached system.")
5338 (license license:asl2.0)))
5339
5340 (define-public java-jsr250
5341 (package
5342 (name "java-jsr250")
5343 (version "1.3")
5344 (source (origin
5345 (method url-fetch)
5346 (uri (string-append "https://repo1.maven.org/maven2/"
5347 "javax/annotation/javax.annotation-api/"
5348 version "/javax.annotation-api-"
5349 version "-sources.jar"))
5350 (sha256
5351 (base32
5352 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
5353 (build-system ant-build-system)
5354 (arguments
5355 `(#:tests? #f ; no tests included
5356 #:jdk ,icedtea-8
5357 #:jar-name "jsr250.jar"))
5358 (home-page "https://jcp.org/en/jsr/detail?id=250")
5359 (synopsis "Security-related annotations")
5360 (description "This package provides annotations for security. It provides
5361 packages in the @code{javax.annotation} and @code{javax.annotation.security}
5362 namespaces.")
5363 ;; either cddl or gpl2 only, with classpath exception
5364 (license (list license:cddl1.0
5365 license:gpl2))))
5366
5367 (define-public java-jsr305
5368 (package
5369 (name "java-jsr305")
5370 (version "3.0.1")
5371 (source (origin
5372 (method url-fetch)
5373 (uri (string-append "https://repo1.maven.org/maven2/"
5374 "com/google/code/findbugs/"
5375 "jsr305/" version "/jsr305-"
5376 version "-sources.jar"))
5377 (sha256
5378 (base32
5379 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
5380 (build-system ant-build-system)
5381 (arguments
5382 `(#:tests? #f ; no tests included
5383 #:jar-name "jsr305.jar"))
5384 (home-page "http://findbugs.sourceforge.net/")
5385 (synopsis "Annotations for the static analyzer called findbugs")
5386 (description "This package provides annotations for the findbugs package.
5387 It provides packages in the @code{javax.annotations} namespace.")
5388 (license license:asl2.0)))
5389
5390 (define-public java-guava
5391 (package
5392 (name "java-guava")
5393 ;; This is the last release of Guava that can be built with Java 7.
5394 (version "20.0")
5395 (source (origin
5396 (method url-fetch)
5397 (uri (string-append "https://github.com/google/guava/"
5398 "releases/download/v" version
5399 "/guava-" version "-sources.jar"))
5400 (sha256
5401 (base32
5402 "1gawrs5gi6j5hcfxdgpnfli75vb9pfi4sn09pnc8xacr669yajwr"))))
5403 (build-system ant-build-system)
5404 (arguments
5405 `(#:tests? #f ; no tests included
5406 #:jar-name "guava.jar"
5407 #:phases
5408 (modify-phases %standard-phases
5409 (add-after 'unpack 'trim-sources
5410 (lambda _
5411 (with-directory-excursion "src/com/google/common"
5412 ;; Remove annotations to avoid extra dependencies:
5413 ;; * "j2objc" annotations are used when converting Java to
5414 ;; Objective C;
5415 ;; * "errorprone" annotations catch common Java mistakes at
5416 ;; compile time;
5417 ;; * "IgnoreJRERequirement" is used for Android.
5418 (substitute* (find-files "." "\\.java$")
5419 (("import com.google.j2objc.*") "")
5420 (("import com.google.errorprone.annotation.*") "")
5421 (("import org.codehaus.mojo.animal_sniffer.*") "")
5422 (("@CanIgnoreReturnValue") "")
5423 (("@LazyInit") "")
5424 (("@WeakOuter") "")
5425 (("@RetainedWith") "")
5426 (("@Weak") "")
5427 (("@ForOverride") "")
5428 (("@J2ObjCIncompatible") "")
5429 (("@IgnoreJRERequirement") "")))
5430 #t)))))
5431 (inputs
5432 `(("java-jsr305" ,java-jsr305)))
5433 (home-page "https://github.com/google/guava")
5434 (synopsis "Google core libraries for Java")
5435 (description "Guava is a set of core libraries that includes new
5436 collection types (such as multimap and multiset), immutable collections, a
5437 graph library, functional types, an in-memory cache, and APIs/utilities for
5438 concurrency, I/O, hashing, primitives, reflection, string processing, and much
5439 more!")
5440 (license license:asl2.0)))
5441
5442 ;; The java-commons-logging package provides adapters to many different
5443 ;; logging frameworks. To avoid an excessive dependency graph we try to build
5444 ;; it with only a minimal set of adapters.
5445 (define-public java-commons-logging-minimal
5446 (package
5447 (name "java-commons-logging-minimal")
5448 (version "1.2")
5449 (source (origin
5450 (method url-fetch)
5451 (uri (string-append "mirror://apache/commons/logging/source/"
5452 "commons-logging-" version "-src.tar.gz"))
5453 (sha256
5454 (base32
5455 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
5456 (build-system ant-build-system)
5457 (arguments
5458 `(#:tests? #f ; avoid dependency on logging frameworks
5459 #:jar-name "commons-logging-minimal.jar"
5460 #:phases
5461 (modify-phases %standard-phases
5462 (add-after 'unpack 'delete-adapters-and-tests
5463 (lambda _
5464 ;; Delete all adapters except for NoOpLog, SimpleLog, and
5465 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
5466 ;; is used by applications; SimpleLog is the only actually usable
5467 ;; implementation that does not depend on another logging
5468 ;; framework.
5469 (for-each
5470 (lambda (file)
5471 (delete-file (string-append
5472 "src/main/java/org/apache/commons/logging/impl/" file)))
5473 (list "Jdk13LumberjackLogger.java"
5474 "WeakHashtable.java"
5475 "Log4JLogger.java"
5476 "ServletContextCleaner.java"
5477 "Jdk14Logger.java"
5478 "AvalonLogger.java"
5479 "LogKitLogger.java"))
5480 (delete-file-recursively "src/test")
5481 #t)))))
5482 (home-page "https://commons.apache.org/logging/")
5483 (synopsis "Common API for logging implementations")
5484 (description "The Logging package is a thin bridge between different
5485 logging implementations. A library that uses the commons-logging API can be
5486 used with any logging implementation at runtime.")
5487 (license license:asl2.0)))
5488
5489 ;; This is the last release of the 1.x series.
5490 (define-public java-mockito-1
5491 (package
5492 (name "java-mockito")
5493 (version "1.10.19")
5494 (source (origin
5495 (method url-fetch)
5496 (uri (string-append "http://repo1.maven.org/maven2/"
5497 "org/mockito/mockito-core/" version
5498 "/mockito-core-" version "-sources.jar"))
5499 (sha256
5500 (base32
5501 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
5502 (build-system ant-build-system)
5503 (arguments
5504 `(#:jar-name "mockito.jar"
5505 #:tests? #f ; no tests included
5506 ;; FIXME: patch-and-repack does not support jars, so we have to apply
5507 ;; patches in build phases.
5508 #:phases
5509 (modify-phases %standard-phases
5510 ;; Mockito was developed against a different version of hamcrest,
5511 ;; which does not require matcher implementations to provide an
5512 ;; implementation of the "describeMismatch" method. We add this
5513 ;; simple definition to pass the build with our version of hamcrest.
5514 (add-after 'unpack 'fix-hamcrest-build-error
5515 (lambda _
5516 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
5517 (("public Matcher getActualMatcher\\(\\) .*" line)
5518 (string-append "
5519 public void describeMismatch(Object item, Description description) {
5520 actualMatcher.describeMismatch(item, description);
5521 }"
5522 line)))
5523 #t))
5524 ;; Mockito bundles cglib. We have a cglib package, so let's use
5525 ;; that instead.
5526 (add-after 'unpack 'use-system-libraries
5527 (lambda _
5528 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
5529 (substitute* '("CGLIBHacker.java"
5530 "CglibMockMaker.java"
5531 "ClassImposterizer.java"
5532 "DelegatingMockitoMethodProxy.java"
5533 "MethodInterceptorFilter.java"
5534 "MockitoNamingPolicy.java"
5535 "SerializableMockitoMethodProxy.java"
5536 "SerializableNoOp.java")
5537 (("import org.mockito.cglib") "import net.sf.cglib")))
5538 #t)))))
5539 (inputs
5540 `(("java-junit" ,java-junit)
5541 ("java-objenesis" ,java-objenesis)
5542 ("java-cglib" ,java-cglib)
5543 ("java-hamcrest-core" ,java-hamcrest-core)))
5544 (home-page "http://mockito.org")
5545 (synopsis "Mockito is a mock library for Java")
5546 (description "Mockito is a mocking library for Java which lets you write
5547 tests with a clean and simple API. It generates mocks using reflection, and
5548 it records all mock invocations, including methods arguments.")
5549 (license license:asl2.0)))
5550
5551 (define-public java-httpcomponents-httpcore
5552 (package
5553 (name "java-httpcomponents-httpcore")
5554 (version "4.4.6")
5555 (source (origin
5556 (method url-fetch)
5557 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
5558 "source/httpcomponents-core-"
5559 version "-src.tar.gz"))
5560 (sha256
5561 (base32
5562 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
5563 (build-system ant-build-system)
5564 (arguments
5565 `(#:jar-name "httpcomponents-httpcore.jar"
5566 #:phases
5567 (modify-phases %standard-phases
5568 (add-after 'unpack 'chdir
5569 (lambda _ (chdir "httpcore") #t)))))
5570 (inputs
5571 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5572 ("java-commons-lang3" ,java-commons-lang3)))
5573 (native-inputs
5574 `(("java-junit" ,java-junit)
5575 ("java-mockito" ,java-mockito-1)))
5576 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
5577 (synopsis "Low level HTTP transport components")
5578 (description "HttpCore is a set of low level HTTP transport components
5579 that can be used to build custom client and server side HTTP services with a
5580 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5581 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5582 NIO.
5583
5584 This package provides the blocking I/O model library.")
5585 (license license:asl2.0)))
5586
5587 (define-public java-httpcomponents-httpcore-nio
5588 (package (inherit java-httpcomponents-httpcore)
5589 (name "java-httpcomponents-httpcore-nio")
5590 (arguments
5591 `(#:jar-name "httpcomponents-httpcore-nio.jar"
5592 #:phases
5593 (modify-phases %standard-phases
5594 (add-after 'unpack 'chdir
5595 (lambda _ (chdir "httpcore-nio") #t)))))
5596 (inputs
5597 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5598 ("java-hamcrest-core" ,java-hamcrest-core)
5599 ,@(package-inputs java-httpcomponents-httpcore)))
5600 (description "HttpCore is a set of low level HTTP transport components
5601 that can be used to build custom client and server side HTTP services with a
5602 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
5603 on the classic Java I/O and non-blocking, event driven I/O model based on Java
5604 NIO.
5605
5606 This package provides the non-blocking I/O model library based on Java
5607 NIO.")))
5608
5609 (define-public java-httpcomponents-httpcore-ab
5610 (package (inherit java-httpcomponents-httpcore)
5611 (name "java-httpcomponents-httpcore-ab")
5612 (arguments
5613 `(#:jar-name "httpcomponents-httpcore-ab.jar"
5614 #:phases
5615 (modify-phases %standard-phases
5616 (add-after 'unpack 'chdir
5617 (lambda _ (chdir "httpcore-ab") #t)))))
5618 (inputs
5619 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5620 ("java-commons-cli" ,java-commons-cli)
5621 ("java-hamcrest-core" ,java-hamcrest-core)
5622 ,@(package-inputs java-httpcomponents-httpcore)))
5623 (synopsis "Apache HttpCore benchmarking tool")
5624 (description "This package provides the HttpCore benchmarking tool. It is
5625 an Apache AB clone based on HttpCore.")))
5626
5627 (define-public java-httpcomponents-httpclient
5628 (package
5629 (name "java-httpcomponents-httpclient")
5630 (version "4.5.3")
5631 (source (origin
5632 (method url-fetch)
5633 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
5634 "source/httpcomponents-client-"
5635 version "-src.tar.gz"))
5636 (sha256
5637 (base32
5638 "1428399s7qy3cim5wc6f3ks4gl9nf9vkjpfmnlap3jflif7g2pj1"))))
5639 (build-system ant-build-system)
5640 (arguments
5641 `(#:jar-name "httpcomponents-httpclient.jar"
5642 #:phases
5643 (modify-phases %standard-phases
5644 (add-after 'unpack 'chdir
5645 (lambda _ (chdir "httpclient") #t)))))
5646 (inputs
5647 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
5648 ("java-commons-codec" ,java-commons-codec)
5649 ("java-hamcrest-core" ,java-hamcrest-core)
5650 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5651 ("java-mockito" ,java-mockito-1)
5652 ("java-junit" ,java-junit)))
5653 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
5654 (synopsis "HTTP client library for Java")
5655 (description "Although the @code{java.net} package provides basic
5656 functionality for accessing resources via HTTP, it doesn't provide the full
5657 flexibility or functionality needed by many applications. @code{HttpClient}
5658 seeks to fill this void by providing an efficient, up-to-date, and
5659 feature-rich package implementing the client side of the most recent HTTP
5660 standards and recommendations.")
5661 (license license:asl2.0)))
5662
5663 (define-public java-httpcomponents-httpmime
5664 (package (inherit java-httpcomponents-httpclient)
5665 (name "java-httpcomponents-httpmime")
5666 (arguments
5667 `(#:jar-name "httpcomponents-httpmime.jar"
5668 #:phases
5669 (modify-phases %standard-phases
5670 (add-after 'unpack 'chdir
5671 (lambda _ (chdir "httpmime") #t)))))
5672 (inputs
5673 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
5674 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
5675 ("java-junit" ,java-junit)
5676 ("java-hamcrest-core" ,java-hamcrest-core)))))
5677
5678 (define-public java-commons-net
5679 (package
5680 (name "java-commons-net")
5681 (version "3.6")
5682 (source (origin
5683 (method url-fetch)
5684 (uri (string-append "mirror://apache/commons/net/source/"
5685 "commons-net-" version "-src.tar.gz"))
5686 (sha256
5687 (base32
5688 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
5689 (build-system ant-build-system)
5690 (arguments
5691 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
5692 ;; should be "resources/examples/examples.properties"), but gets "null"
5693 ;; instead.
5694 #:tests? #f
5695 #:jar-name "commons-net.jar"))
5696 (native-inputs
5697 `(("java-junit" ,java-junit)
5698 ("java-hamcrest-core" ,java-hamcrest-core)))
5699 (home-page "https://commons.apache.org/net/")
5700 (synopsis "Client library for many basic Internet protocols")
5701 (description "The Apache Commons Net library implements the client side of
5702 many basic Internet protocols. The purpose of the library is to provide
5703 fundamental protocol access, not higher-level abstractions.")
5704 (license license:asl2.0)))
5705
5706 (define-public java-jsch
5707 (package
5708 (name "java-jsch")
5709 (version "0.1.55")
5710 (source (origin
5711 (method url-fetch)
5712 (uri (string-append "mirror://sourceforge/jsch/jsch/"
5713 version "/jsch-" version ".zip"))
5714 (sha256
5715 (base32
5716 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
5717 (build-system ant-build-system)
5718 (arguments
5719 `(#:build-target "dist"
5720 #:tests? #f ; no tests included
5721 #:phases
5722 (modify-phases %standard-phases
5723 (replace 'install (install-jars "dist")))))
5724 (native-inputs
5725 `(("unzip" ,unzip)))
5726 (home-page "http://www.jcraft.com/jsch/")
5727 (synopsis "Pure Java implementation of SSH2")
5728 (description "JSch is a pure Java implementation of SSH2. JSch allows you
5729 to connect to an SSH server and use port forwarding, X11 forwarding, file
5730 transfer, etc., and you can integrate its functionality into your own Java
5731 programs.")
5732 (license license:bsd-3)))
5733
5734 (define-public java-commons-compress
5735 (package
5736 (name "java-commons-compress")
5737 (version "1.13")
5738 (source (origin
5739 (method url-fetch)
5740 (uri (string-append "mirror://apache/commons/compress/source/"
5741 "commons-compress-" version "-src.tar.gz"))
5742 (sha256
5743 (base32
5744 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
5745 (build-system ant-build-system)
5746 (arguments
5747 `(#:jar-name "commons-compress.jar"
5748 #:phases
5749 (modify-phases %standard-phases
5750 (add-after 'unpack 'delete-bad-tests
5751 (lambda _
5752 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
5753 ;; FIXME: These tests really should not fail. Maybe they are
5754 ;; indicative of problems with our Java packaging work.
5755
5756 ;; This test fails with a null pointer exception.
5757 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
5758 ;; This test fails to open test resources.
5759 (delete-file "archivers/zip/ExplodeSupportTest.java")
5760
5761 ;; FIXME: This test adds a dependency on powermock, which is hard to
5762 ;; package at this point.
5763 ;; https://github.com/powermock/powermock
5764 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
5765 #t)))))
5766 (inputs
5767 `(("java-junit" ,java-junit)
5768 ("java-hamcrest-core" ,java-hamcrest-core)
5769 ("java-mockito" ,java-mockito-1)
5770 ("java-xz" ,java-xz)))
5771 (home-page "https://commons.apache.org/proper/commons-compress/")
5772 (synopsis "Java library for working with compressed files")
5773 (description "The Apache Commons Compress library defines an API for
5774 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
5775 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
5776 (license license:asl2.0)))
5777
5778 (define-public java-commons-csv
5779 (package
5780 (name "java-commons-csv")
5781 (version "1.4")
5782 (source (origin
5783 (method url-fetch)
5784 (uri (string-append "mirror://apache/commons/csv/source/"
5785 "commons-csv-" version "-src.tar.gz"))
5786 (sha256
5787 (base32
5788 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
5789 (build-system ant-build-system)
5790 (arguments
5791 `(#:jar-name "commons-csv.jar"
5792 #:source-dir "src/main/java"
5793 #:tests? #f)); FIXME: requires java-h2
5794 (inputs
5795 `(("java-hamcrest-core" ,java-hamcrest-core)
5796 ("java-commons-io" ,java-commons-io)
5797 ("java-commons-lang3" ,java-commons-lang3)
5798 ("junit" ,java-junit)))
5799 (home-page "https://commons.apache.org/proper/commons-csv/")
5800 (synopsis "Read and write CSV documents")
5801 (description "Commons CSV reads and writes files in variations of the Comma
5802 Separated Value (CSV) format. The most common CSV formats are predefined in the
5803 CSVFormat class:
5804
5805 @itemize
5806 @item Microsoft Excel
5807 @item Informix UNLOAD
5808 @item Informix UNLOAD CSV
5809 @item MySQL
5810 @item RFC 4180
5811 @item TDF
5812 @end itemize
5813
5814 Custom formats can be created using a fluent style API.")
5815 (license license:asl2.0)))
5816
5817 (define-public java-osgi-annotation
5818 (package
5819 (name "java-osgi-annotation")
5820 (version "6.0.0")
5821 (source (origin
5822 (method url-fetch)
5823 (uri (string-append "https://repo1.maven.org/maven2/"
5824 "org/osgi/org.osgi.annotation/" version "/"
5825 "org.osgi.annotation-" version "-sources.jar"))
5826 (sha256
5827 (base32
5828 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
5829 (build-system ant-build-system)
5830 (arguments
5831 `(#:tests? #f ; no tests
5832 #:jar-name "osgi-annotation.jar"))
5833 (home-page "https://www.osgi.org")
5834 (synopsis "Annotation module of OSGi framework")
5835 (description
5836 "OSGi, for Open Services Gateway initiative framework, is a module system
5837 and service platform for the Java programming language. This package contains
5838 the OSGi annotation module, providing additional services to help dynamic
5839 components.")
5840 (license license:asl2.0)))
5841
5842 (define-public java-osgi-core
5843 (package
5844 (name "java-osgi-core")
5845 (version "6.0.0")
5846 (source (origin
5847 (method url-fetch)
5848 (uri (string-append "https://repo1.maven.org/maven2/"
5849 "org/osgi/org.osgi.core/" version "/"
5850 "org.osgi.core-" version "-sources.jar"))
5851 (sha256
5852 (base32
5853 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
5854 (build-system ant-build-system)
5855 (arguments
5856 `(#:tests? #f ; no tests
5857 #:jar-name "osgi-core.jar"))
5858 (inputs
5859 `(("java-osgi-annotation" ,java-osgi-annotation)))
5860 (home-page "https://www.osgi.org")
5861 (synopsis "Core module of OSGi framework")
5862 (description
5863 "OSGi, for Open Services Gateway initiative framework, is a module system
5864 and service platform for the Java programming language. This package contains
5865 the OSGi Core module.")
5866 (license license:asl2.0)))
5867
5868 (define-public java-osgi-service-event
5869 (package
5870 (name "java-osgi-service-event")
5871 (version "1.3.1")
5872 (source (origin
5873 (method url-fetch)
5874 (uri (string-append "https://repo1.maven.org/maven2/"
5875 "org/osgi/org.osgi.service.event/"
5876 version "/org.osgi.service.event-"
5877 version "-sources.jar"))
5878 (sha256
5879 (base32
5880 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
5881 (build-system ant-build-system)
5882 (arguments
5883 `(#:tests? #f ; no tests
5884 #:jar-name "osgi-service-event.jar"))
5885 (inputs
5886 `(("java-osgi-annotation" ,java-osgi-annotation)
5887 ("java-osgi-core" ,java-osgi-core)))
5888 (home-page "https://www.osgi.org")
5889 (synopsis "OSGi service event module")
5890 (description
5891 "OSGi, for Open Services Gateway initiative framework, is a module system
5892 and service platform for the Java programming language. This package contains
5893 the OSGi @code{org.osgi.service.event} module.")
5894 (license license:asl2.0)))
5895
5896 (define-public java-eclipse-osgi
5897 (package
5898 (name "java-eclipse-osgi")
5899 (version "3.11.3")
5900 (source (origin
5901 (method url-fetch)
5902 (uri (string-append "https://repo1.maven.org/maven2/"
5903 "org/eclipse/platform/org.eclipse.osgi/"
5904 version "/org.eclipse.osgi-"
5905 version "-sources.jar"))
5906 (sha256
5907 (base32
5908 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
5909 (build-system ant-build-system)
5910 (arguments
5911 `(#:tests? #f ; no tests included
5912 #:jar-name "eclipse-equinox-osgi.jar"))
5913 (inputs
5914 `(("java-osgi-annotation" ,java-osgi-annotation)))
5915 (home-page "http://www.eclipse.org/equinox/")
5916 (synopsis "Eclipse Equinox OSGi framework")
5917 (description "This package provides an implementation of the OSGi Core
5918 specification.")
5919 (license license:epl1.0)))
5920
5921 (define-public java-eclipse-equinox-common
5922 (package
5923 (name "java-eclipse-equinox-common")
5924 (version "3.10.200")
5925 (source (origin
5926 (method url-fetch)
5927 (uri (string-append "https://repo1.maven.org/maven2/"
5928 "org/eclipse/platform/org.eclipse.equinox.common/"
5929 version "/org.eclipse.equinox.common-"
5930 version "-sources.jar"))
5931 (sha256
5932 (base32
5933 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
5934 (build-system ant-build-system)
5935 (arguments
5936 `(#:tests? #f ; no tests included
5937 #:jar-name "eclipse-equinox-common.jar"))
5938 (inputs
5939 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
5940 (home-page "http://www.eclipse.org/equinox/")
5941 (synopsis "Common Eclipse runtime")
5942 (description "This package provides the common Eclipse runtime.")
5943 (license license:epl1.0)))
5944
5945 (define-public java-eclipse-core-jobs
5946 (package
5947 (name "java-eclipse-core-jobs")
5948 (version "3.8.0")
5949 (source (origin
5950 (method url-fetch)
5951 (uri (string-append "https://repo1.maven.org/maven2/"
5952 "org/eclipse/platform/org.eclipse.core.jobs/"
5953 version "/org.eclipse.core.jobs-"
5954 version "-sources.jar"))
5955 (sha256
5956 (base32
5957 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
5958 (build-system ant-build-system)
5959 (arguments
5960 `(#:tests? #f ; no tests included
5961 #:jar-name "eclipse-core-jobs.jar"))
5962 (inputs
5963 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5964 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5965 (home-page "http://www.eclipse.org/equinox/")
5966 (synopsis "Eclipse jobs mechanism")
5967 (description "This package provides the Eclipse jobs mechanism.")
5968 (license license:epl1.0)))
5969
5970 (define-public java-eclipse-equinox-registry
5971 (package
5972 (name "java-eclipse-equinox-registry")
5973 (version "3.6.100")
5974 (source (origin
5975 (method url-fetch)
5976 (uri (string-append "https://repo1.maven.org/maven2/"
5977 "org/eclipse/platform/org.eclipse.equinox.registry/"
5978 version "/org.eclipse.equinox.registry-"
5979 version "-sources.jar"))
5980 (sha256
5981 (base32
5982 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
5983 (build-system ant-build-system)
5984 (arguments
5985 `(#:tests? #f ; no tests included
5986 #:jar-name "eclipse-equinox-registry.jar"))
5987 (inputs
5988 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
5989 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
5990 ("java-eclipse-osgi" ,java-eclipse-osgi)))
5991 (home-page "http://www.eclipse.org/equinox/")
5992 (synopsis "Eclipse extension registry support")
5993 (description "This package provides support for the Eclipse extension
5994 registry.")
5995 (license license:epl1.0)))
5996
5997 (define-public java-eclipse-equinox-app
5998 (package
5999 (name "java-eclipse-equinox-app")
6000 (version "1.3.400")
6001 (source (origin
6002 (method url-fetch)
6003 (uri (string-append "https://repo1.maven.org/maven2/"
6004 "org/eclipse/platform/org.eclipse.equinox.app/"
6005 version "/org.eclipse.equinox.app-"
6006 version "-sources.jar"))
6007 (sha256
6008 (base32
6009 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6010 (build-system ant-build-system)
6011 (arguments
6012 `(#:tests? #f ; no tests included
6013 #:jar-name "eclipse-equinox-app.jar"))
6014 (inputs
6015 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6016 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6017 ("java-eclipse-osgi" ,java-eclipse-osgi)
6018 ("java-osgi-service-event" ,java-osgi-service-event)))
6019 (home-page "http://www.eclipse.org/equinox/")
6020 (synopsis "Equinox application container")
6021 (description "This package provides the Equinox application container for
6022 Eclipse.")
6023 (license license:epl1.0)))
6024
6025 (define-public java-eclipse-equinox-preferences
6026 (package
6027 (name "java-eclipse-equinox-preferences")
6028 (version "3.6.1")
6029 (source (origin
6030 (method url-fetch)
6031 (uri (string-append "https://repo1.maven.org/maven2/"
6032 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6033 version "/org.eclipse.equinox.preferences-"
6034 version "-sources.jar"))
6035 (sha256
6036 (base32
6037 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6038 (build-system ant-build-system)
6039 (arguments
6040 `(#:tests? #f ; no tests included
6041 #:jar-name "eclipse-equinox-preferences.jar"))
6042 (inputs
6043 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6044 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6045 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6046 (home-page "http://www.eclipse.org/equinox/")
6047 (synopsis "Eclipse preferences mechanism")
6048 (description "This package provides the Eclipse preferences mechanism with
6049 the module @code{org.eclipse.equinox.preferences}.")
6050 (license license:epl1.0)))
6051
6052 (define-public java-eclipse-core-contenttype
6053 (package
6054 (name "java-eclipse-core-contenttype")
6055 (version "3.5.100")
6056 (source (origin
6057 (method url-fetch)
6058 (uri (string-append "https://repo1.maven.org/maven2/"
6059 "org/eclipse/platform/org.eclipse.core.contenttype/"
6060 version "/org.eclipse.core.contenttype-"
6061 version "-sources.jar"))
6062 (sha256
6063 (base32
6064 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6065 (build-system ant-build-system)
6066 (arguments
6067 `(#:tests? #f ; no tests included
6068 #:jar-name "eclipse-core-contenttype.jar"))
6069 (inputs
6070 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6071 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6072 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6073 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6074 (home-page "http://www.eclipse.org/")
6075 (synopsis "Eclipse content mechanism")
6076 (description "This package provides the Eclipse content mechanism in the
6077 @code{org.eclipse.core.contenttype} module.")
6078 (license license:epl1.0)))
6079
6080 (define-public java-eclipse-core-runtime
6081 (package
6082 (name "java-eclipse-core-runtime")
6083 (version "3.15.100")
6084 (source (origin
6085 (method url-fetch)
6086 (uri (string-append "https://repo1.maven.org/maven2/"
6087 "org/eclipse/platform/org.eclipse.core.runtime/"
6088 version "/org.eclipse.core.runtime-"
6089 version "-sources.jar"))
6090 (sha256
6091 (base32
6092 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6093 (build-system ant-build-system)
6094 (arguments
6095 `(#:tests? #f ; no tests included
6096 #:jar-name "eclipse-core-runtime.jar"))
6097 (inputs
6098 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6099 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6100 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6101 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6102 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6103 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6104 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6105 (home-page "https://www.eclipse.org/")
6106 (synopsis "Eclipse core runtime")
6107 (description "This package provides the Eclipse core runtime with the
6108 module @code{org.eclipse.core.runtime}.")
6109 (license license:epl1.0)))
6110
6111 (define-public java-eclipse-core-filesystem
6112 (package
6113 (name "java-eclipse-core-filesystem")
6114 (version "1.6.1")
6115 (source (origin
6116 (method url-fetch)
6117 (uri (string-append "https://repo1.maven.org/maven2/"
6118 "org/eclipse/platform/org.eclipse.core.filesystem/"
6119 version "/org.eclipse.core.filesystem-"
6120 version "-sources.jar"))
6121 (sha256
6122 (base32
6123 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
6124 (build-system ant-build-system)
6125 (arguments
6126 `(#:tests? #f ; no tests included
6127 #:jar-name "eclipse-core-filesystem.jar"))
6128 (inputs
6129 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6130 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6131 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6132 (home-page "https://www.eclipse.org/")
6133 (synopsis "Eclipse core file system")
6134 (description "This package provides the Eclipse core file system with the
6135 module @code{org.eclipse.core.filesystem}.")
6136 (license license:epl1.0)))
6137
6138 (define-public java-eclipse-core-expressions
6139 (package
6140 (name "java-eclipse-core-expressions")
6141 (version "3.5.100")
6142 (source (origin
6143 (method url-fetch)
6144 (uri (string-append "https://repo1.maven.org/maven2/"
6145 "org/eclipse/platform/org.eclipse.core.expressions/"
6146 version "/org.eclipse.core.expressions-"
6147 version "-sources.jar"))
6148 (sha256
6149 (base32
6150 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
6151 (build-system ant-build-system)
6152 (arguments
6153 `(#:tests? #f ; no tests included
6154 #:jar-name "eclipse-core-expressions.jar"))
6155 (inputs
6156 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6157 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6158 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6159 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6160 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6161 (home-page "https://www.eclipse.org/")
6162 (synopsis "Eclipse core expression language")
6163 (description "This package provides the Eclipse core expression language
6164 with the @code{org.eclipse.core.expressions} module.")
6165 (license license:epl1.0)))
6166
6167 (define-public java-eclipse-core-variables
6168 (package
6169 (name "java-eclipse-core-variables")
6170 (version "3.3.0")
6171 (source (origin
6172 (method url-fetch)
6173 (uri (string-append "https://repo1.maven.org/maven2/"
6174 "org/eclipse/platform/org.eclipse.core.variables/"
6175 version "/org.eclipse.core.variables-"
6176 version "-sources.jar"))
6177 (sha256
6178 (base32
6179 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
6180 (build-system ant-build-system)
6181 (arguments
6182 `(#:tests? #f ; no tests included
6183 #:jar-name "eclipse-core-variables.jar"))
6184 (inputs
6185 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6186 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6187 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6188 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6189 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6190 (home-page "https://www.eclipse.org/platform")
6191 (synopsis "Eclipse core variables")
6192 (description "This package provides the Eclipse core variables module
6193 @code{org.eclipse.core.variables}.")
6194 (license license:epl1.0)))
6195
6196 (define-public java-eclipse-ant-core
6197 (package
6198 (name "java-eclipse-ant-core")
6199 (version "3.4.100")
6200 (source (origin
6201 (method url-fetch)
6202 (uri (string-append "https://repo1.maven.org/maven2/"
6203 "org/eclipse/platform/org.eclipse.ant.core/"
6204 version "/org.eclipse.ant.core-"
6205 version "-sources.jar"))
6206 (sha256
6207 (base32
6208 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
6209 (build-system ant-build-system)
6210 (arguments
6211 `(#:tests? #f ; no tests included
6212 #:jar-name "eclipse-ant-core.jar"))
6213 (inputs
6214 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6215 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6216 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6217 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6218 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6219 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6220 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
6221 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6222 (home-page "https://www.eclipse.org/platform")
6223 (synopsis "Ant build tool core libraries")
6224 (description "This package provides the ant build tool core libraries with
6225 the module @code{org.eclipse.ant.core}.")
6226 (license license:epl1.0)))
6227
6228 (define-public java-eclipse-core-resources
6229 (package
6230 (name "java-eclipse-core-resources")
6231 (version "3.13.200")
6232 (source (origin
6233 (method url-fetch)
6234 (uri (string-append "https://repo1.maven.org/maven2/"
6235 "org/eclipse/platform/org.eclipse.core.resources/"
6236 version "/org.eclipse.core.resources-"
6237 version "-sources.jar"))
6238 (sha256
6239 (base32
6240 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
6241 (build-system ant-build-system)
6242 (arguments
6243 `(#:tests? #f ; no tests included
6244 #:jar-name "eclipse-core-resources.jar"))
6245 (inputs
6246 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6247 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6248 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6249 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6250 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
6251 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6252 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6253 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6254 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
6255 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6256 (home-page "https://www.eclipse.org/")
6257 (synopsis "Eclipse core resource management")
6258 (description "This package provides the Eclipse core resource management
6259 module @code{org.eclipse.core.resources}.")
6260 (license license:epl1.0)))
6261
6262 (define-public java-eclipse-compare-core
6263 (package
6264 (name "java-eclipse-compare-core")
6265 (version "3.6.0")
6266 (source (origin
6267 (method url-fetch)
6268 (uri (string-append "https://repo1.maven.org/maven2/"
6269 "org/eclipse/platform/org.eclipse.compare.core/"
6270 version "/org.eclipse.compare.core-"
6271 version "-sources.jar"))
6272 (sha256
6273 (base32
6274 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
6275 (build-system ant-build-system)
6276 (arguments
6277 `(#:tests? #f ; no tests included
6278 #:jar-name "eclipse-compare-core.jar"))
6279 (inputs
6280 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6281 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6282 ("java-eclipse-osgi" ,java-eclipse-osgi)
6283 ("java-icu4j" ,java-icu4j)))
6284 (home-page "https://www.eclipse.org/")
6285 (synopsis "Eclipse core compare support")
6286 (description "This package provides the Eclipse core compare support
6287 module @code{org.eclipse.compare.core}.")
6288 (license license:epl1.0)))
6289
6290 (define-public java-eclipse-team-core
6291 (package
6292 (name "java-eclipse-team-core")
6293 (version "3.8.0")
6294 (source (origin
6295 (method url-fetch)
6296 (uri (string-append "https://repo1.maven.org/maven2/"
6297 "org/eclipse/platform/org.eclipse.team.core/"
6298 version "/org.eclipse.team.core-"
6299 version "-sources.jar"))
6300 (sha256
6301 (base32
6302 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
6303 (build-system ant-build-system)
6304 (arguments
6305 `(#:tests? #f ; no tests included
6306 #:jar-name "eclipse-team-core.jar"))
6307 (inputs
6308 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
6309 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6310 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6311 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6312 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6313 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6314 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6315 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6316 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6317 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6318 (home-page "https://www.eclipse.org/platform")
6319 (synopsis "Eclipse team support core")
6320 (description "This package provides the Eclipse team support core module
6321 @code{org.eclipse.team.core}.")
6322 (license license:epl1.0)))
6323
6324 (define-public java-eclipse-core-commands
6325 (package
6326 (name "java-eclipse-core-commands")
6327 (version "3.8.1")
6328 (source (origin
6329 (method url-fetch)
6330 (uri (string-append "https://repo1.maven.org/maven2/"
6331 "org/eclipse/platform/org.eclipse.core.commands/"
6332 version "/org.eclipse.core.commands-"
6333 version "-sources.jar"))
6334 (sha256
6335 (base32
6336 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
6337 (build-system ant-build-system)
6338 (arguments
6339 `(#:tests? #f ; no tests included
6340 #:jar-name "eclipse-core-commands.jar"))
6341 (inputs
6342 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
6343 (home-page "https://www.eclipse.org/platform")
6344 (synopsis "Eclipse core commands")
6345 (description "This package provides Eclipse core commands in the module
6346 @code{org.eclipse.core.commands}.")
6347 (license license:epl1.0)))
6348
6349 (define-public java-eclipse-text
6350 (package
6351 (name "java-eclipse-text")
6352 (version "3.6.0")
6353 (source (origin
6354 (method url-fetch)
6355 (uri (string-append "https://repo1.maven.org/maven2/"
6356 "org/eclipse/platform/org.eclipse.text/"
6357 version "/org.eclipse.text-"
6358 version "-sources.jar"))
6359 (sha256
6360 (base32
6361 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
6362 (build-system ant-build-system)
6363 (arguments
6364 `(#:tests? #f ; no tests included
6365 #:jar-name "eclipse-text.jar"
6366 #:phases
6367 (modify-phases %standard-phases
6368 ;; When creating a new category we must make sure that the new list
6369 ;; matches List<Position>. By default it seems to be too generic
6370 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
6371 ;; Without this we get this error:
6372 ;;
6373 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
6374 ;; error: method put in interface Map<K,V> cannot be applied to given types;
6375 ;; [javac] fPositions.put(category, new ArrayList<>());
6376 ;; [javac] ^
6377 ;; [javac] required: String,List<Position>
6378 ;; [javac] found: String,ArrayList<Object>
6379 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
6380 ;; to List<Position> by method invocation conversion
6381 ;; [javac] where K,V are type-variables:
6382 ;; [javac] K extends Object declared in interface Map
6383 ;; [javac] V extends Object declared in interface Map
6384 ;;
6385 ;; I don't know if this is a good fix. I suspect it is not, but it
6386 ;; seems to work.
6387 (add-after 'unpack 'fix-compilation-error
6388 (lambda _
6389 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
6390 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
6391 "Positions.put(category, new ArrayList<Position>());"))
6392 #t)))))
6393 (inputs
6394 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6395 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
6396 ("java-icu4j" ,java-icu4j)))
6397 (home-page "http://www.eclipse.org/platform")
6398 (synopsis "Eclipse text library")
6399 (description "Platform Text is part of the Platform UI project and
6400 provides the basic building blocks for text and text editors within Eclipse
6401 and contributes the Eclipse default text editor.")
6402 (license license:epl1.0)))
6403
6404 (define-public java-eclipse-jdt-core
6405 (package
6406 (name "java-eclipse-jdt-core")
6407 (version "3.16.0")
6408 (source (origin
6409 (method url-fetch)
6410 (uri (string-append "https://repo1.maven.org/maven2/"
6411 "org/eclipse/jdt/org.eclipse.jdt.core/"
6412 version "/org.eclipse.jdt.core-"
6413 version "-sources.jar"))
6414 (sha256
6415 (base32
6416 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
6417 (build-system ant-build-system)
6418 (arguments
6419 `(#:tests? #f ; no tests included
6420 #:jar-name "eclipse-jdt-core.jar"
6421 #:phases
6422 (modify-phases %standard-phases
6423 (add-after 'unpack 'move-sources
6424 (lambda _
6425 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
6426 (for-each (lambda (file)
6427 (install-file file (string-append "../" (dirname file))))
6428 (find-files "." ".*")))
6429 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
6430 #t))
6431 (add-before 'build 'copy-resources
6432 (lambda _
6433 (with-directory-excursion "src"
6434 (for-each (lambda (file)
6435 (install-file file (string-append "../build/classes/" (dirname file))))
6436 (find-files "." ".*.(props|properties|rsc)")))
6437 #t)))))
6438 (inputs
6439 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
6440 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
6441 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6442 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
6443 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
6444 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
6445 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6446 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6447 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6448 ("java-eclipse-osgi" ,java-eclipse-osgi)
6449 ("java-eclipse-text" ,java-eclipse-text)))
6450 (home-page "https://www.eclipse.org/jdt")
6451 (synopsis "Java development tools core libraries")
6452 (description "This package provides the core libraries of the Eclipse Java
6453 development tools.")
6454 (license license:epl1.0)))
6455
6456 (define-public java-eclipse-jdt-compiler-apt
6457 (package
6458 (name "java-eclipse-jdt-compiler-apt")
6459 (version "1.3.400")
6460 (source (origin
6461 (method url-fetch)
6462 (uri (string-append "https://repo1.maven.org/maven2/"
6463 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
6464 version "/org.eclipse.jdt.compiler.apt-"
6465 version "-sources.jar"))
6466 (sha256
6467 (base32
6468 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
6469 (build-system ant-build-system)
6470 (arguments
6471 `(#:tests? #f ; no tests included
6472 #:jar-name "eclipse-jdt-compiler-apt.jar"
6473 #:jdk ,openjdk11))
6474 (inputs
6475 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
6476 (home-page "https://www.eclipse.org/jdt/apt/")
6477 (synopsis "Annotation processing tool")
6478 (description "APT stands for Annotation Processing Tool. APT provides a
6479 means for generating files and compiling new Java classes based on annotations
6480 found in your source code.")
6481 (license license:epl2.0)))
6482
6483 (define-public java-javax-mail
6484 (package
6485 (name "java-javax-mail")
6486 (version "1.5.6")
6487 (source (origin
6488 (method url-fetch)
6489 (uri (string-append "https://repo1.maven.org/maven2/"
6490 "com/sun/mail/javax.mail/"
6491 version "/javax.mail-"
6492 version "-sources.jar"))
6493 (sha256
6494 (base32
6495 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
6496 (build-system ant-build-system)
6497 (arguments
6498 `(#:tests? #f ; no tests
6499 #:jar-name "javax-mail.jar"))
6500 (home-page "https://javamail.java.net")
6501 (synopsis "Reference implementation of the JavaMail API")
6502 (description
6503 "This package provides versions of the JavaMail API implementation, IMAP,
6504 SMTP, and POP3 service providers, some examples, and documentation for the
6505 JavaMail API.")
6506 ;; GPLv2 only with "classpath exception".
6507 (license license:gpl2)))
6508
6509 (define-public java-log4j-api
6510 (package
6511 (name "java-log4j-api")
6512 (version "2.4.1")
6513 (source (origin
6514 (method url-fetch)
6515 (uri (string-append "mirror://apache/logging/log4j/" version
6516 "/apache-log4j-" version "-src.tar.gz"))
6517 (sha256
6518 (base32
6519 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
6520 (build-system ant-build-system)
6521 (arguments
6522 `(#:tests? #f ; tests require unpackaged software
6523 #:jar-name "log4j-api.jar"
6524 #:make-flags
6525 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6526 "/share/java"))
6527 #:phases
6528 (modify-phases %standard-phases
6529 (add-after 'unpack 'enter-dir
6530 (lambda _ (chdir "log4j-api") #t))
6531 ;; FIXME: The tests require additional software that has not been
6532 ;; packaged yet, such as
6533 ;; * org.apache.maven
6534 ;; * org.apache.felix
6535 (add-after 'enter-dir 'delete-tests
6536 (lambda _ (delete-file-recursively "src/test") #t)))))
6537 (inputs
6538 `(("java-osgi-core" ,java-osgi-core)
6539 ("java-hamcrest-core" ,java-hamcrest-core)
6540 ("java-junit" ,java-junit)))
6541 (home-page "https://logging.apache.org/log4j/2.x/")
6542 (synopsis "API module of the Log4j logging framework for Java")
6543 (description
6544 "This package provides the API module of the Log4j logging framework for
6545 Java.")
6546 (license license:asl2.0)))
6547
6548 (define-public java-log4j-core
6549 (package
6550 (inherit java-log4j-api)
6551 (name "java-log4j-core")
6552 (inputs
6553 `(("java-osgi-core" ,java-osgi-core)
6554 ("java-hamcrest-core" ,java-hamcrest-core)
6555 ("java-log4j-api" ,java-log4j-api)
6556 ("java-mail" ,java-mail)
6557 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
6558 ("java-lmax-disruptor" ,java-lmax-disruptor)
6559 ("java-kafka" ,java-kafka-clients)
6560 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
6561 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
6562 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
6563 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
6564 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
6565 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
6566 ("java-commons-compress" ,java-commons-compress)
6567 ("java-commons-csv" ,java-commons-csv)
6568 ("java-jeromq" ,java-jeromq)
6569 ("java-junit" ,java-junit)))
6570 (native-inputs
6571 `(("hamcrest" ,java-hamcrest-all)
6572 ("java-commons-io" ,java-commons-io)
6573 ("java-commons-lang3" ,java-commons-lang3)
6574 ("slf4j" ,java-slf4j-api)))
6575 (arguments
6576 `(#:tests? #f ; tests require more dependencies
6577 #:test-dir "src/test"
6578 #:source-dir "src/main/java"
6579 #:jar-name "log4j-core.jar"
6580 #:jdk ,icedtea-8
6581 #:make-flags
6582 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
6583 "/share/java"))
6584 #:phases
6585 (modify-phases %standard-phases
6586 (add-after 'unpack 'enter-dir
6587 (lambda _ (chdir "log4j-core") #t)))))
6588 (synopsis "Core component of the Log4j framework")
6589 (description "This package provides the core component of the Log4j
6590 logging framework for Java.")))
6591
6592 (define-public java-log4j-1.2-api
6593 (package
6594 (inherit java-log4j-api)
6595 (name "java-log4j-1.2-api")
6596 (arguments
6597 `(#:jar-name "java-log4j-1.2-api.jar"
6598 #:source-dir "log4j-1.2-api/src/main/java"
6599 #:jdk ,icedtea-8
6600 ;; Tests require maven-model (and other maven subprojects), which is a
6601 ;; cyclic dependency.
6602 #:tests? #f))
6603 (inputs
6604 `(("log4j-api" ,java-log4j-api)
6605 ("log4j-core" ,java-log4j-core)
6606 ("osgi-core" ,java-osgi-core)
6607 ("eclipse-osgi" ,java-eclipse-osgi)
6608 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
6609
6610 (define-public java-commons-cli
6611 (package
6612 (name "java-commons-cli")
6613 (version "1.4")
6614 (source (origin
6615 (method url-fetch)
6616 (uri (string-append "mirror://apache/commons/cli/source/"
6617 "commons-cli-" version "-src.tar.gz"))
6618 (sha256
6619 (base32
6620 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
6621 (build-system ant-build-system)
6622 ;; TODO: javadoc
6623 (arguments
6624 `(#:jar-name "commons-cli.jar"))
6625 (native-inputs
6626 `(("java-junit" ,java-junit)
6627 ("java-hamcrest-core" ,java-hamcrest-core)))
6628 (home-page "https://commons.apache.org/cli/")
6629 (synopsis "Command line arguments and options parsing library")
6630 (description "The Apache Commons CLI library provides an API for parsing
6631 command line options passed to programs. It is also able to print help
6632 messages detailing the options available for a command line tool.
6633
6634 Commons CLI supports different types of options:
6635
6636 @itemize
6637 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
6638 @item GNU like long options (ie. du --human-readable --max-depth=1)
6639 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
6640 @item Short options with value attached (ie. gcc -O2 foo.c)
6641 @item long options with single hyphen (ie. ant -projecthelp)
6642 @end itemize
6643
6644 This is a part of the Apache Commons Project.")
6645 (license license:asl2.0)))
6646
6647 (define-public java-commons-codec
6648 (package
6649 (name "java-commons-codec")
6650 (version "1.10")
6651 (source (origin
6652 (method url-fetch)
6653 (uri (string-append "mirror://apache/commons/codec/source/"
6654 "commons-codec-" version "-src.tar.gz"))
6655 (sha256
6656 (base32
6657 "1w9qg30y4s0x8gnmr2fgj4lyplfn788jqxbcz27lf5kbr6n8xr65"))))
6658 (build-system ant-build-system)
6659 (outputs '("out" "doc"))
6660 (arguments
6661 `(#:test-target "test"
6662 #:make-flags
6663 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
6664 (junit (assoc-ref %build-inputs "java-junit")))
6665 (list (string-append "-Djunit.jar=" junit "/share/java/junit.jar")
6666 (string-append "-Dhamcrest.jar=" hamcrest
6667 "/share/java/hamcrest-core.jar")
6668 ;; Do not append version to jar.
6669 "-Dfinal.name=commons-codec"))
6670 #:phases
6671 (modify-phases %standard-phases
6672 (add-after 'build 'build-javadoc ant-build-javadoc)
6673 (replace 'install (install-jars "dist"))
6674 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6675 (native-inputs
6676 `(("java-junit" ,java-junit)
6677 ("java-hamcrest-core" ,java-hamcrest-core)))
6678 (home-page "https://commons.apache.org/codec/")
6679 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
6680 (description "The codec package contains simple encoder and decoders for
6681 various formats such as Base64 and Hexadecimal. In addition to these widely
6682 used encoders and decoders, the codec package also maintains a collection of
6683 phonetic encoding utilities.
6684
6685 This is a part of the Apache Commons Project.")
6686 (license license:asl2.0)))
6687
6688 (define-public java-commons-daemon
6689 (package
6690 (name "java-commons-daemon")
6691 (version "1.1.0")
6692 (source (origin
6693 (method url-fetch)
6694 (uri (string-append "mirror://apache/commons/daemon/source/"
6695 "commons-daemon-" version "-src.tar.gz"))
6696 (sha256
6697 (base32
6698 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
6699 (build-system ant-build-system)
6700 (arguments
6701 `(#:test-target "test"
6702 #:phases
6703 (modify-phases %standard-phases
6704 (add-after 'build 'build-javadoc ant-build-javadoc)
6705 (replace 'install (install-jars "dist"))
6706 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
6707 (native-inputs
6708 `(("java-junit" ,java-junit)))
6709 (home-page "https://commons.apache.org/daemon/")
6710 (synopsis "Library to launch Java applications as daemons")
6711 (description "The Daemon package from Apache Commons can be used to
6712 implement Java applications which can be launched as daemons. For example the
6713 program will be notified about a shutdown so that it can perform cleanup tasks
6714 before its process of execution is destroyed by the operation system.
6715
6716 This package contains the Java library. You will also need the actual binary
6717 for your architecture which is provided by the jsvc package.
6718
6719 This is a part of the Apache Commons Project.")
6720 (license license:asl2.0)))
6721
6722 (define-public java-javaewah
6723 (package
6724 (name "java-javaewah")
6725 (version "1.1.6")
6726 (source (origin
6727 (method url-fetch)
6728 (uri (string-append "https://github.com/lemire/javaewah/"
6729 "archive/JavaEWAH-" version ".tar.gz"))
6730 (sha256
6731 (base32
6732 "1n7j1r1h24wlhwv9zdcj6yqjrhma2ixwyzm15l5vrv6yqjs6753b"))))
6733 (build-system ant-build-system)
6734 (arguments `(#:jar-name "javaewah.jar"))
6735 (inputs
6736 `(("java-junit" ,java-junit)
6737 ("java-hamcrest-core" ,java-hamcrest-core)))
6738 (home-page "https://github.com/lemire/javaewah")
6739 (synopsis "Compressed alternative to the Java @code{BitSet} class")
6740 (description "This is a word-aligned compressed variant of the Java
6741 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
6742 compression scheme. It can be used to implement bitmap indexes.
6743
6744 The goal of word-aligned compression is not to achieve the best compression,
6745 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
6746 cycles, maybe at the expense of storage. However, the EWAH scheme is always
6747 more efficient storage-wise than an uncompressed bitmap (as implemented in the
6748 @code{BitSet} class by Sun).")
6749 ;; GPL2.0 derivates are explicitly allowed.
6750 (license license:asl2.0)))
6751
6752 (define-public java-slf4j-api
6753 (package
6754 (name "java-slf4j-api")
6755 (version "1.7.25")
6756 (source (origin
6757 (method url-fetch)
6758 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
6759 version ".tar.gz"))
6760 (sha256
6761 (base32
6762 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
6763 (modules '((guix build utils)))
6764 ;; Delete bundled jars.
6765 (snippet
6766 '(begin
6767 (for-each delete-file (find-files "." "\\.jar$"))
6768 #t))))
6769 (build-system ant-build-system)
6770 (arguments
6771 `(#:jar-name "slf4j-api.jar"
6772 #:source-dir "slf4j-api/src/main"
6773 #:test-dir "slf4j-api/src/test"
6774 #:phases
6775 (modify-phases %standard-phases
6776 (add-after 'build 'regenerate-jar
6777 (lambda _
6778 ;; pom.xml ignores these files in the jar creation process. If we don't,
6779 ;; we get the error "This code should have never made it into slf4j-api.jar"
6780 (delete-file-recursively "build/classes/org/slf4j/impl")
6781 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
6782 "build/classes" ".")))
6783 (add-before 'check 'dont-test-abstract-classes
6784 (lambda _
6785 ;; abstract classes are not meant to be run with junit
6786 (substitute* "build.xml"
6787 (("<include name=\"\\*\\*/\\*Test.java\" />")
6788 (string-append "<include name=\"**/*Test.java\" />"
6789 "<exclude name=\"**/MultithreadedInitializationTest"
6790 ".java\" />")))
6791 #t)))))
6792 (inputs
6793 `(("java-junit" ,java-junit)
6794 ("java-hamcrest-core" ,java-hamcrest-core)))
6795 (home-page "https://www.slf4j.org/")
6796 (synopsis "Simple logging facade for Java")
6797 (description "The Simple Logging Facade for Java (SLF4J) serves as a
6798 simple facade or abstraction for various logging
6799 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
6800 allowing the end user to plug in the desired logging framework at deployment
6801 time.")
6802 (license license:expat)))
6803
6804 (define java-slf4j-api-bootstrap
6805 (package
6806 (inherit java-slf4j-api)
6807 (name "java-slf4j-api-bootstrap")
6808 (inputs `())
6809 (arguments
6810 (substitute-keyword-arguments (package-arguments java-slf4j-api)
6811 ((#:tests? _ #f) #f)))))
6812
6813 (define-public java-slf4j-simple
6814 (package
6815 (name "java-slf4j-simple")
6816 (version "1.7.25")
6817 (source (package-source java-slf4j-api))
6818 (build-system ant-build-system)
6819 (arguments
6820 `(#:jar-name "slf4j-simple.jar"
6821 #:source-dir "slf4j-simple/src/main"
6822 #:test-dir "slf4j-simple/src/test"
6823 #:phases
6824 (modify-phases %standard-phases
6825 ;; The tests need some test classes from slf4j-api
6826 (add-before 'check 'build-slf4j-api-test-helpers
6827 (lambda _
6828 ;; Add current dir to CLASSPATH ...
6829 (setenv "CLASSPATH"
6830 (string-append (getcwd) ":" (getenv "CLASSPATH")))
6831 ;; ... and build test helper classes here:
6832 (apply invoke
6833 `("javac" "-d" "."
6834 ,@(find-files "slf4j-api/src/test" ".*\\.java"))))))))
6835 (inputs
6836 `(("java-junit" ,java-junit)
6837 ("java-hamcrest-core" ,java-hamcrest-core)
6838 ("java-slf4j-api" ,java-slf4j-api)))
6839 (home-page "https://www.slf4j.org/")
6840 (synopsis "Simple implementation of simple logging facade for Java")
6841 (description "SLF4J binding for the Simple implementation, which outputs
6842 all events to System.err. Only messages of level INFO and higher are
6843 printed.")
6844 (license license:expat)))
6845
6846 (define-public antlr2
6847 (package
6848 (name "antlr2")
6849 (version "2.7.7")
6850 (source (origin
6851 (method url-fetch)
6852 (uri (string-append "https://www.antlr2.org/download/antlr-"
6853 version ".tar.gz"))
6854 (sha256
6855 (base32
6856 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
6857 (modules '((guix build utils)))
6858 (snippet
6859 '(begin
6860 (delete-file "antlr.jar")
6861 (substitute* "lib/cpp/antlr/CharScanner.hpp"
6862 (("#include <map>")
6863 (string-append
6864 "#include <map>\n"
6865 "#define EOF (-1)\n"
6866 "#include <strings.h>")))
6867 (substitute* "configure"
6868 (("/bin/sh") "sh"))
6869 #t))))
6870 (build-system gnu-build-system)
6871 (arguments
6872 `(#:tests? #f ; no test target
6873 #:imported-modules ((guix build ant-build-system)
6874 (guix build syscalls)
6875 ,@%gnu-build-system-modules)
6876 #:modules (((guix build ant-build-system) #:prefix ant:)
6877 (guix build gnu-build-system)
6878 (guix build utils))
6879 #:phases
6880 (modify-phases %standard-phases
6881 (add-after 'install 'strip-jar-timestamps
6882 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
6883 (add-before 'configure 'fix-timestamp
6884 (lambda _
6885 (substitute* "configure"
6886 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
6887 #t))
6888 (add-after 'configure 'fix-bin-ls
6889 (lambda _
6890 (substitute* (find-files "." "Makefile")
6891 (("/bin/ls") "ls"))
6892 #t)))))
6893 (native-inputs
6894 `(("which" ,which)
6895 ("zip" ,zip)
6896 ("java" ,icedtea "jdk")))
6897 (inputs
6898 `(("java" ,icedtea)))
6899 (home-page "https://www.antlr2.org")
6900 (synopsis "Framework for constructing recognizers, compilers, and translators")
6901 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
6902 is a language tool that provides a framework for constructing recognizers,
6903 compilers, and translators from grammatical descriptions containing Java, C#,
6904 C++, or Python actions. ANTLR provides excellent support for tree construction,
6905 tree walking, and translation.")
6906 (license license:public-domain)))
6907
6908 (define-public java-stringtemplate-3
6909 (package
6910 (name "java-stringtemplate")
6911 (version "3.2.1")
6912 (source (origin
6913 (method url-fetch)
6914 (uri (string-append "https://github.com/antlr/website-st4/raw/"
6915 "gh-pages/download/stringtemplate-"
6916 version ".tar.gz"))
6917 (sha256
6918 (base32
6919 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
6920 (build-system ant-build-system)
6921 (arguments
6922 `(#:jar-name (string-append ,name "-" ,version ".jar")
6923 #:test-dir "test"
6924 #:modules ((guix build ant-build-system)
6925 (guix build utils)
6926 (srfi srfi-1))
6927 #:phases
6928 (modify-phases %standard-phases
6929 (add-before 'check 'fix-tests
6930 (lambda _
6931 (substitute* "build.xml"
6932 (("\\$\\{test.home\\}/java")
6933 "${test.home}/org"))
6934 #t))
6935 (add-before 'build 'generate-grammar
6936 (lambda _
6937 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
6938 (for-each (lambda (file)
6939 (format #t "~a\n" file)
6940 (invoke "antlr" file))
6941 '("template.g" "angle.bracket.template.g" "action.g"
6942 "eval.g" "group.g" "interface.g")))
6943 #t)))))
6944 (native-inputs
6945 `(("antlr" ,antlr2)
6946 ("java-junit" ,java-junit)))
6947 (home-page "https://www.stringtemplate.org")
6948 (synopsis "Template engine to generate formatted text output")
6949 (description "StringTemplate is a java template engine (with ports for C#,
6950 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
6951 or any other formatted text output. StringTemplate is particularly good at
6952 code generators, multiple site skins, and internationalization / localization.
6953 StringTemplate also powers ANTLR.")
6954 (license license:bsd-3)))
6955
6956 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
6957 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
6958 ;; files and uses antlr3 at runtime. The latest version requires a recent version
6959 ;; of antlr3 at runtime.
6960 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
6961 ;; This version of ST4 is sufficient for the latest antlr3.
6962 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
6963 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
6964 ;; against the latest ST4.
6965 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
6966 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
6967 ;; only grammar files with the antlr2 syntax.
6968 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
6969
6970 (define-public java-stringtemplate
6971 (package (inherit java-stringtemplate-3)
6972 (name "java-stringtemplate")
6973 (version "4.0.8")
6974 (source (origin
6975 (method url-fetch)
6976 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
6977 version ".tar.gz"))
6978 (file-name (string-append name "-" version ".tar.gz"))
6979 (sha256
6980 (base32
6981 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
6982 (build-system ant-build-system)
6983 (arguments
6984 `(#:jar-name (string-append ,name "-" ,version ".jar")
6985 #:tests? #f ; FIXME: tests fail for unknown reasons
6986 #:test-dir "test"
6987 #:modules ((guix build ant-build-system)
6988 (guix build utils)
6989 (srfi srfi-1))
6990 #:phases
6991 (modify-phases %standard-phases
6992 (add-before 'check 'fix-test-target
6993 (lambda _
6994 (substitute* "build.xml"
6995 (("\\$\\{test.home\\}/java") "${test.home}/")
6996 (("\\*Test.java") "Test*.java"))
6997 #t))
6998 (add-before 'build 'generate-grammar
6999 (lambda _
7000 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7001 (for-each (lambda (file)
7002 (format #t "~a\n" file)
7003 (invoke "antlr3" file))
7004 '("STParser.g" "Group.g" "CodeGenerator.g")))
7005 #t)))))
7006 (inputs
7007 `(("antlr3" ,antlr3-bootstrap)
7008 ("antlr2" ,antlr2)
7009 ("java-stringtemplate" ,java-stringtemplate-3)
7010 ("java-junit" ,java-junit)))))
7011
7012 (define java-stringtemplate-4.0.6
7013 (package (inherit java-stringtemplate)
7014 (name "java-stringtemplate")
7015 (version "4.0.6")
7016 (source (origin
7017 (method url-fetch)
7018 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7019 version ".tar.gz"))
7020 (file-name (string-append name "-" version ".tar.gz"))
7021 (sha256
7022 (base32
7023 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7024 (inputs
7025 `(("antlr3" ,antlr3-3.3)
7026 ("antlr2" ,antlr2)
7027 ("java-stringtemplate" ,java-stringtemplate-3)))))
7028
7029 (define-public antlr3
7030 (package
7031 (name "antlr3")
7032 (version "3.5.2")
7033 (source (origin
7034 (method url-fetch)
7035 (uri (string-append "https://github.com/antlr/antlr3/archive/"
7036 version ".tar.gz"))
7037 (file-name (string-append name "-" version ".tar.gz"))
7038 (sha256
7039 (base32
7040 "0218v683081lg54z9hvjxinhxd4dqp870jx6n39gslm0bkyi4vd6"))))
7041 (build-system ant-build-system)
7042 (arguments
7043 `(#:jar-name (string-append ,name "-" ,version ".jar")
7044 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7045 #:tests? #f
7046 #:phases
7047 (modify-phases %standard-phases
7048 (add-after 'install 'bin-install
7049 (lambda* (#:key inputs outputs #:allow-other-keys)
7050 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7051 (bin (string-append (assoc-ref outputs "out") "/bin")))
7052 (mkdir-p bin)
7053 (with-output-to-file (string-append bin "/antlr3")
7054 (lambda _
7055 (display
7056 (string-append "#!" (which "sh") "\n"
7057 "java -cp " jar "/" ,name "-" ,version ".jar:"
7058 (string-concatenate
7059 (find-files (assoc-ref inputs "stringtemplate")
7060 ".*\\.jar"))
7061 ":"
7062 (string-concatenate
7063 (find-files (assoc-ref inputs "stringtemplate4")
7064 ".*\\.jar"))
7065 ":"
7066 (string-concatenate
7067 (find-files (string-append
7068 (assoc-ref inputs "antlr")
7069 "/lib")
7070 ".*\\.jar"))
7071 " org.antlr.Tool $*"))))
7072 (chmod (string-append bin "/antlr3") #o755))
7073 #t))
7074 (add-before 'build 'generate-grammar
7075 (lambda _
7076 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
7077 (for-each (lambda (file)
7078 (display file)
7079 (newline)
7080 (invoke "antlr3" file))
7081 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
7082 "AssignTokenTypesWalker.g"
7083 "ActionTranslator.g" "TreeToNFAConverter.g"
7084 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
7085 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
7086 (substitute* "ANTLRParser.java"
7087 (("public Object getTree") "public GrammarAST getTree"))
7088 (substitute* "ANTLRv3Parser.java"
7089 (("public Object getTree") "public CommonTree getTree"))
7090 (chdir "../../../../../java")
7091 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
7092 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
7093 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
7094 (substitute* "org/antlr/tool/ErrorManager.java"
7095 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
7096 (chdir "../../../..")
7097 #t))
7098 (add-before 'build 'fix-build-xml
7099 (lambda _
7100 (substitute* "build.xml"
7101 (("target name=\"compile\">")
7102 "target name=\"compile\">
7103 <copy todir=\"${classes.dir}\">
7104 <fileset dir=\"tool/src/main/resources\">
7105 <include name=\"**/*.stg\"/>
7106 <include name=\"**/*.st\"/>
7107 <include name=\"**/*.sti\"/>
7108 <include name=\"**/STLexer.tokens\"/>
7109 </fileset>
7110 </copy>"))
7111 #t)))))
7112 (native-inputs
7113 `(("antlr" ,antlr2)
7114 ("antlr3" ,antlr3-bootstrap)))
7115 (inputs
7116 `(("junit" ,java-junit)
7117 ("stringtemplate" ,java-stringtemplate-3)
7118 ("stringtemplate4" ,java-stringtemplate)))
7119 (propagated-inputs
7120 `(("stringtemplate" ,java-stringtemplate-3)
7121 ("antlr" ,antlr2)
7122 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
7123 (home-page "https://www.antlr3.org")
7124 (synopsis "Framework for constructing recognizers, compilers, and translators")
7125 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7126 is a language tool that provides a framework for constructing recognizers,
7127 compilers, and translators from grammatical descriptions containing Java, C#,
7128 C++, or Python actions. ANTLR provides excellent support for tree construction,
7129 tree walking, and translation.")
7130 (license license:bsd-3)))
7131
7132 (define antlr3-bootstrap
7133 (package
7134 (inherit antlr3)
7135 (name "antlr3-bootstrap")
7136 (native-inputs
7137 `(("antlr" ,antlr2)
7138 ("antlr3" ,antlr3-3.3)))
7139 (inputs
7140 `(("junit" ,java-junit)))))
7141
7142 (define antlr3-3.3
7143 (package
7144 (inherit antlr3)
7145 (name "antlr3")
7146 (version "3.3")
7147 (source (origin
7148 (method url-fetch)
7149 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7150 "gh-pages/download/antlr-"
7151 version ".tar.gz"))
7152 (sha256
7153 (base32
7154 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
7155 (patches
7156 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
7157 (arguments
7158 `(#:jar-name (string-append ,name "-" ,version ".jar")
7159 #:source-dir (string-join '("tool/src/main/java"
7160 "runtime/Java/src/main/java"
7161 "tool/src/main/antlr2"
7162 "tool/src/main/antlr3")
7163 ":")
7164 #:tests? #f ; FIXME: tests seem to require maven plugin
7165 #:modules ((guix build ant-build-system)
7166 (guix build utils)
7167 (srfi srfi-1))
7168 #:phases
7169 (modify-phases %standard-phases
7170 (add-after 'install 'bin-install
7171 (lambda* (#:key inputs outputs #:allow-other-keys)
7172 (let* ((out (assoc-ref outputs "out"))
7173 (jar (string-append out "/share/java"))
7174 (bin (string-append out "/bin")))
7175 (mkdir-p bin)
7176 (with-output-to-file (string-append bin "/antlr3")
7177 (lambda _
7178 (display
7179 (string-append
7180 "#!" (which "sh") "\n"
7181 "java -cp " jar "/antlr3-3.3.jar:"
7182 (string-join
7183 (append (find-files (assoc-ref inputs "java-stringtemplate")
7184 ".*\\.jar$")
7185 (find-files (string-append (assoc-ref inputs "antlr")
7186 "/lib")
7187 ".*\\.jar$"))
7188 ":")
7189 " org.antlr.Tool $*"))))
7190 (chmod (string-append bin "/antlr3") #o755)
7191 #t)))
7192 (add-before 'build 'generate-grammar
7193 (lambda _
7194 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
7195 (("import org.antlr.grammar.v2.\\*;")
7196 "import org.antlr.grammar.v2.*;\n
7197 import org.antlr.grammar.v2.TreeToNFAConverter;\n
7198 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
7199 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
7200 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
7201 (for-each (lambda (file)
7202 (format #t "~a\n" file)
7203 (invoke "antlr" file))
7204 '("antlr.g" "antlr.print.g" "assign.types.g"
7205 "buildnfa.g" "codegen.g" "define.g")))
7206 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
7207 (for-each (lambda (file)
7208 (format #t "~a\n" file)
7209 (invoke "antlr3" file))
7210 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
7211 "ANTLRv3Tree.g")))
7212 #t))
7213 (add-before 'build 'fix-build-xml
7214 (lambda _
7215 (substitute* "build.xml"
7216 (("target name=\"compile\">")
7217 "target name=\"compile\">
7218 <copy todir=\"${classes.dir}\">
7219 <fileset dir=\"tool/src/main/resources\">
7220 <include name=\"**/*.stg\"/>
7221 <include name=\"**/*.st\"/>
7222 <include name=\"**/*.sti\"/>
7223 <include name=\"**/STLexer.tokens\"/>
7224 </fileset>
7225 </copy>"))
7226 #t)))))
7227 (native-inputs
7228 `(("antlr" ,antlr2)
7229 ("antlr3" ,antlr3-3.1)))
7230 (inputs
7231 `(("junit" ,java-junit)))
7232 (propagated-inputs
7233 `(("java-stringtemplate" ,java-stringtemplate-3)
7234 ("antlr" ,antlr2)
7235 ("antlr3" ,antlr3-3.1)))))
7236
7237 (define-public antlr3-3.1
7238 (package
7239 (inherit antlr3)
7240 (version "3.1")
7241 (source (origin
7242 (method url-fetch)
7243 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
7244 "gh-pages/download/antlr-"
7245 version ".tar.gz"))
7246 (sha256
7247 (base32
7248 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
7249 (patches
7250 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
7251 (arguments
7252 `(#:jar-name (string-append "antlr3-" ,version ".jar")
7253 #:source-dir "src:runtime/Java/src"
7254 #:tests? #f
7255 #:phases
7256 (modify-phases %standard-phases
7257 (add-after 'install 'bin-install
7258 (lambda* (#:key inputs outputs #:allow-other-keys)
7259 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7260 (bin (string-append (assoc-ref outputs "out") "/bin")))
7261 (mkdir-p bin)
7262 (with-output-to-file (string-append bin "/antlr3")
7263 (lambda _
7264 (display
7265 (string-append "#!" (which "sh") "\n"
7266 "java -cp " jar "/antlr3-3.1.jar:"
7267 (string-concatenate
7268 (find-files (assoc-ref inputs "stringtemplate")
7269 ".*\\.jar"))
7270 ":"
7271 (string-concatenate
7272 (find-files (string-append
7273 (assoc-ref inputs "antlr")
7274 "/lib")
7275 ".*\\.jar"))
7276 " org.antlr.Tool $*"))))
7277 (chmod (string-append bin "/antlr3") #o755))
7278 #t))
7279 (add-before 'build 'generate-grammar
7280 (lambda _
7281 (let ((dir "src/org/antlr/tool/"))
7282 (for-each (lambda (file)
7283 (display file)
7284 (newline)
7285 (invoke "antlr" "-o" dir (string-append dir file)))
7286 '("antlr.g" "antlr.print.g" "assign.types.g"
7287 "buildnfa.g" "define.g")))
7288 (format #t "codegen.g\n")
7289 (invoke "antlr" "-o" "src/org/antlr/codegen"
7290 "src/org/antlr/codegen/codegen.g")
7291 #t))
7292 (add-before 'build 'fix-build-xml
7293 (lambda _
7294 (substitute* "build.xml"
7295 (("target name=\"compile\">")
7296 "target name=\"compile\">
7297 <copy todir=\"${classes.dir}\">
7298 <fileset dir=\"src\">
7299 <include name=\"**/*.stg\"/>
7300 <include name=\"**/*.st\"/>
7301 <include name=\"**/*.sti\"/>
7302 <include name=\"**/STLexer.tokens\"/>
7303 </fileset>
7304 </copy>"))
7305 #t)))))
7306 (native-inputs
7307 `(("antlr" ,antlr2)))
7308 (inputs
7309 `(("junit" ,java-junit)))
7310 (propagated-inputs
7311 `(("stringtemplate" ,java-stringtemplate-3)))))
7312
7313 (define-public java-commons-cli-1.2
7314 ;; This is a bootstrap dependency for Maven2.
7315 (package
7316 (inherit java-commons-cli)
7317 (version "1.2")
7318 (source (origin
7319 (method url-fetch)
7320 (uri (string-append "mirror://apache/commons/cli/source/"
7321 "commons-cli-" version "-src.tar.gz"))
7322 (sha256
7323 (base32
7324 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
7325 (arguments
7326 `(#:jar-name "commons-cli.jar"
7327 #:phases
7328 (modify-phases %standard-phases
7329 (add-before 'check 'fix-build-xml
7330 (lambda* (#:key inputs #:allow-other-keys)
7331 (substitute* "build.xml"
7332 (("dir=\"\\$\\{test.home\\}/java\"")
7333 "dir=\"${test.home}\""))
7334 #t)))))
7335 (native-inputs
7336 `(("java-junit" ,java-junit)))))
7337
7338 (define-public java-microemulator-cldc
7339 (package
7340 (name "java-microemulator-cldc")
7341 (version "2.0.4")
7342 (source (origin
7343 (method url-fetch)
7344 (uri (string-append "https://github.com/barteo/microemu/archive/"
7345 "microemulator_"
7346 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
7347 version)
7348 ".tar.gz"))
7349 (file-name (string-append name "-" version ".tar.gz"))
7350 (sha256
7351 (base32
7352 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
7353 (build-system ant-build-system)
7354 (arguments
7355 `(#:jar-name "microemulator-cldc.jar"
7356 #:source-dir "microemu-cldc/src/main/java"
7357 #:tests? #f)); Requires even older software
7358 (home-page "https://github.com/barteo/microemu")
7359 (synopsis "J2ME CLDC emulator")
7360 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
7361 Emulator. It allows to demonstrate MIDlet based applications in web browser
7362 applet and can be run as a standalone java application.")
7363 (license (list license:asl2.0
7364 ;; or altenatively:
7365 license:lgpl2.1+))))
7366
7367 (define-public java-datanucleus-javax-persistence
7368 (package
7369 (name "java-datanucleus-javax-persistence")
7370 (version "2.2.0")
7371 (source (origin
7372 (method url-fetch)
7373 (uri (string-append "https://github.com/datanucleus/"
7374 "javax.persistence/archive/javax.persistence-"
7375 version "-release.tar.gz"))
7376 (sha256
7377 (base32
7378 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
7379 (build-system ant-build-system)
7380 (arguments
7381 `(#:jar-name "java-datanucleus-javax-persistence.jar"
7382 #:jdk ,icedtea-8
7383 #:source-dir "src/main/java"
7384 #:tests? #f)); no tests
7385 (home-page "https://github.com/datanucleus/javax.persistence")
7386 (synopsis "JPA API")
7387 (description "This package contains a clean definition of JPA API intended
7388 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
7389 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
7390 used to generate this API.")
7391 (license (list license:edl1.0 license:epl1.0))))
7392
7393 (define-public java-osgi-cmpn
7394 (package
7395 (name "java-osgi-cmpn")
7396 (version "6.0.0")
7397 (source (origin
7398 (method url-fetch)
7399 (uri (string-append "https://repo1.maven.org/maven2/"
7400 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
7401 version "-sources.jar"))
7402 (sha256
7403 (base32
7404 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
7405 (build-system ant-build-system)
7406 (arguments
7407 `(#:jar-name "osgi-cmpn.jar"
7408 #:tests? #f)); no tests
7409 (inputs
7410 `(("annotation" ,java-osgi-annotation)
7411 ("core" ,java-osgi-core)
7412 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7413 ("microemulator" ,java-microemulator-cldc)
7414 ("servlet" ,java-classpathx-servletapi)))
7415 (home-page "https://www.osgi.org")
7416 (synopsis "Compendium specification module of OSGi framework")
7417 (description
7418 "OSGi, for Open Services Gateway initiative framework, is a module system
7419 and service platform for the Java programming language. This package contains
7420 the compendium specification module, providing interfaces and classes for use
7421 in compiling bundles.")
7422 (license license:asl2.0)))
7423
7424 (define-public java-osgi-service-component-annotations
7425 (package
7426 (name "java-osgi-service-component-annotations")
7427 (version "1.3.0")
7428 (source (origin
7429 (method url-fetch)
7430 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7431 "org.osgi.service.component.annotations/"
7432 version "/org.osgi.service.component.annotations-"
7433 version "-sources.jar"))
7434 (sha256
7435 (base32
7436 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
7437 (build-system ant-build-system)
7438 (arguments
7439 `(#:jar-name "osgi-service-component-annotations.jar"
7440 #:tests? #f)); no tests
7441 (inputs
7442 `(("annotation" ,java-osgi-annotation)))
7443 (home-page "https://www.osgi.org")
7444 (synopsis "Support annotations for osgi-service-component")
7445 (description
7446 "OSGi, for Open Services Gateway initiative framework, is a module system
7447 and service platform for the Java programming language. This package contains
7448 the support annotations for osgi-service-component.")
7449 (license license:asl2.0)))
7450
7451 (define-public java-osgi-dto
7452 (package
7453 (name "java-osgi-dto")
7454 (version "1.0.0")
7455 (source (origin
7456 (method url-fetch)
7457 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7458 "org.osgi.dto/" version "/org.osgi.dto-"
7459 version "-sources.jar"))
7460 (sha256
7461 (base32
7462 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
7463 (build-system ant-build-system)
7464 (arguments
7465 `(#:jar-name "osgi-dto.jar"
7466 #:tests? #f)); no tests
7467 (inputs
7468 `(("annotation" ,java-osgi-annotation)))
7469 (home-page "https://www.osgi.org")
7470 (synopsis "Data Transfer Objects")
7471 (description
7472 "OSGi, for Open Services Gateway initiative framework, is a module system
7473 and service platform for the Java programming language. This package contains
7474 the Data Transfer Objects. It is easily serializable having only public fields
7475 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
7476 Map and array aggregates may also be used. The aggregates must only hold
7477 objects of the listed types or aggregates.")
7478 (license license:asl2.0)))
7479
7480 (define-public java-osgi-resource
7481 (package
7482 (name "java-osgi-resource")
7483 (version "1.0.0")
7484 (source (origin
7485 (method url-fetch)
7486 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7487 "org.osgi.resource/"
7488 version "/org.osgi.resource-"
7489 version "-sources.jar"))
7490 (sha256
7491 (base32
7492 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
7493 (build-system ant-build-system)
7494 (arguments
7495 `(#:jar-name "osgi-resource.jar"
7496 #:tests? #f)); no tests
7497 (inputs
7498 `(("annotation" ,java-osgi-annotation)
7499 ("dto" ,java-osgi-dto)))
7500 (home-page "https://www.osgi.org")
7501 (synopsis "OSGI Resource")
7502 (description
7503 "OSGi, for Open Services Gateway initiative framework, is a module system
7504 and service platform for the Java programming language. This package contains
7505 the definition of common types in osgi packages.")
7506 (license license:asl2.0)))
7507
7508 (define-public java-osgi-namespace-contract
7509 (package
7510 (name "java-osgi-namespace-contract")
7511 (version "1.0.0")
7512 (source (origin
7513 (method url-fetch)
7514 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7515 "org.osgi.namespace.contract/"
7516 version "/org.osgi.namespace.contract-"
7517 version "-sources.jar"))
7518 (sha256
7519 (base32
7520 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
7521 (build-system ant-build-system)
7522 (inputs
7523 `(("resource" ,java-osgi-resource)
7524 ("annotation" ,java-osgi-annotation)))
7525 (arguments
7526 `(#:jar-name "osgi-namespace-contract.jar"
7527 #:tests? #f)); no tests
7528 (home-page "https://www.osgi.org")
7529 (synopsis "Contract Capability and Requirement Namespace")
7530 (description
7531 "OSGi, for Open Services Gateway initiative framework, is a module system
7532 and service platform for the Java programming language. This package contains
7533 the names for the attributes and directives for a namespace with contracts.")
7534 (license license:asl2.0)))
7535
7536 (define-public java-osgi-namespace-extender
7537 (package
7538 (name "java-osgi-namespace-extender")
7539 (version "1.0.1")
7540 (source (origin
7541 (method url-fetch)
7542 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7543 "org.osgi.namespace.extender/"
7544 version "/org.osgi.namespace.extender-"
7545 version "-sources.jar"))
7546 (sha256
7547 (base32
7548 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
7549 (build-system ant-build-system)
7550 (inputs
7551 `(("resource" ,java-osgi-resource)
7552 ("annotation" ,java-osgi-annotation)))
7553 (arguments
7554 `(#:jar-name "osgi-namespace-extendent.jar"
7555 #:tests? #f)); no tests
7556 (home-page "https://www.osgi.org")
7557 (synopsis "Extender Capability and Requirement Namespace")
7558 (description
7559 "OSGi, for Open Services Gateway initiative framework, is a module system
7560 and service platform for the Java programming language. This package contains
7561 the names for the attributes and directives for an extender namespace.")
7562 (license license:asl2.0)))
7563
7564 (define-public java-osgi-namespace-service
7565 (package
7566 (name "java-osgi-namespace-service")
7567 (version "1.0.0")
7568 (source (origin
7569 (method url-fetch)
7570 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7571 "org.osgi.namespace.service/"
7572 version "/org.osgi.namespace.service-"
7573 version "-sources.jar"))
7574 (sha256
7575 (base32
7576 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
7577 (build-system ant-build-system)
7578 (inputs
7579 `(("resource" ,java-osgi-resource)
7580 ("annotation" ,java-osgi-annotation)))
7581 (arguments
7582 `(#:jar-name "osgi-namespace-service.jar"
7583 #:tests? #f)); no tests
7584 (home-page "https://www.osgi.org")
7585 (synopsis "Service Capability and Requirement Namespace")
7586 (description
7587 "OSGi, for Open Services Gateway initiative framework, is a module system
7588 and service platform for the Java programming language. This package contains
7589 the names for the attributes and directives for a service namespace.")
7590 (license license:asl2.0)))
7591
7592 (define-public java-osgi-util-function
7593 (package
7594 (name "java-osgi-util-function")
7595 (version "1.0.0")
7596 (source (origin
7597 (method url-fetch)
7598 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7599 "org.osgi.util.function/"
7600 version "/org.osgi.util.function-"
7601 version "-sources.jar"))
7602 (sha256
7603 (base32
7604 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
7605 (build-system ant-build-system)
7606 (arguments
7607 `(#:jar-name "osgi-util-function.jar"
7608 #:tests? #f)); no tests
7609 (inputs
7610 `(("annotation" ,java-osgi-annotation)))
7611 (home-page "https://www.osgi.org")
7612 (synopsis "OSGI Util Function")
7613 (description
7614 "OSGi, for Open Services Gateway initiative framework, is a module system
7615 and service platform for the Java programming language. This package contains
7616 an interface for a function that accepts a single argument and produces a result.")
7617 (license license:asl2.0)))
7618
7619 (define-public java-osgi-util-promise
7620 (package
7621 (name "java-osgi-util-promise")
7622 (version "1.0.0")
7623 (source (origin
7624 (method url-fetch)
7625 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7626 "org.osgi.util.promise/"
7627 version "/org.osgi.util.promise-"
7628 version "-sources.jar"))
7629 (sha256
7630 (base32
7631 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
7632 (build-system ant-build-system)
7633 (arguments
7634 `(#:jar-name "osgi-util-promise.jar"
7635 #:tests? #f)); no tests
7636 (inputs
7637 `(("annotation" ,java-osgi-annotation)
7638 ("function" ,java-osgi-util-function)))
7639 (home-page "https://www.osgi.org")
7640 (synopsis "Promise of a value")
7641 (description
7642 "OSGi, for Open Services Gateway initiative framework, is a module system
7643 and service platform for the Java programming language. This package contains
7644 an interface and utilitary classes for promises. A Promise represents a future
7645 value. It handles the interactions for asynchronous processing.")
7646 (license license:asl2.0)))
7647
7648 (define-public java-osgi-service-metatype-annotations
7649 (package
7650 (name "java-osgi-service-metatype-annotations")
7651 (version "1.3.0")
7652 (source (origin
7653 (method url-fetch)
7654 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7655 "org.osgi.service.metatype.annotations/"
7656 version "/org.osgi.service.metatype.annotations-"
7657 version "-sources.jar"))
7658 (sha256
7659 (base32
7660 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
7661 (build-system ant-build-system)
7662 (arguments
7663 `(#:jar-name "osgi-service-metatype-annotations.jar"
7664 #:tests? #f)); no tests
7665 (inputs
7666 `(("annotation" ,java-osgi-annotation)))
7667 (home-page "https://www.osgi.org")
7668 (synopsis "Support annotations for metatype")
7669 (description
7670 "OSGi, for Open Services Gateway initiative framework, is a module system
7671 and service platform for the Java programming language. This package contains
7672 the support annotations for metatype.")
7673 (license license:asl2.0)))
7674
7675 (define-public java-osgi-service-repository
7676 (package
7677 (name "java-osgi-service-repository")
7678 (version "1.1.0")
7679 (source (origin
7680 (method url-fetch)
7681 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7682 "org.osgi.service.repository/"
7683 version "/org.osgi.service.repository-"
7684 version "-sources.jar"))
7685 (sha256
7686 (base32
7687 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
7688 (build-system ant-build-system)
7689 (arguments
7690 `(#:jar-name "osgi-service-repository.jar"
7691 #:tests? #f)); no tests
7692 (inputs
7693 `(("annotation" ,java-osgi-annotation)
7694 ("promise" ,java-osgi-util-promise)
7695 ("resource" ,java-osgi-resource)))
7696 (home-page "https://www.osgi.org")
7697 (synopsis "OSGI service repository")
7698 (description
7699 "OSGi, for Open Services Gateway initiative framework, is a module system
7700 and service platform for the Java programming language. This package contains
7701 a repository service that contains resources.")
7702 (license license:asl2.0)))
7703
7704 (define-public java-osgi-framework
7705 (package
7706 (name "java-osgi-framework")
7707 (version "1.8.0")
7708 (source (origin
7709 (method url-fetch)
7710 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7711 "org.osgi.framework/" version "/org.osgi.framework-"
7712 version "-sources.jar"))
7713 (sha256
7714 (base32
7715 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
7716 (build-system ant-build-system)
7717 (arguments
7718 `(#:jar-name "osgi-framework.jar"
7719 #:tests? #f)); no tests
7720 (inputs
7721 `(("annotation" ,java-osgi-annotation)
7722 ("resource" ,java-osgi-resource)
7723 ("dto" ,java-osgi-dto)))
7724 (home-page "https://www.osgi.org")
7725 (synopsis "OSGi framework")
7726 (description
7727 "OSGi, for Open Services Gateway initiative framework, is a module system
7728 and service platform for the Java programming language.")
7729 (license license:asl2.0)))
7730
7731 (define-public java-osgi-service-log
7732 (package
7733 (name "java-osgi-service-log")
7734 (version "1.3.0")
7735 (source (origin
7736 (method url-fetch)
7737 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7738 "org.osgi.service.log/"
7739 version "/org.osgi.service.log-"
7740 version "-sources.jar"))
7741 (sha256
7742 (base32
7743 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
7744 (build-system ant-build-system)
7745 (arguments
7746 `(#:jar-name "osgi-service-log.jar"
7747 #:tests? #f)); no tests
7748 (inputs
7749 `(("java-osgi-framework" ,java-osgi-framework)))
7750 (home-page "https://www.osgi.org")
7751 (synopsis "Provides methods for bundles to write messages to the log")
7752 (description
7753 "OSGi, for Open Services Gateway initiative framework, is a module system
7754 and service platform for the Java programming language. This package contains
7755 the log service.")
7756 (license license:asl2.0)))
7757
7758 (define-public java-osgi-service-jdbc
7759 (package
7760 (name "java-osgi-service-jdbc")
7761 (version "1.0.0")
7762 (source (origin
7763 (method url-fetch)
7764 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7765 "org.osgi.service.jdbc/"
7766 version "/org.osgi.service.jdbc-"
7767 version "-sources.jar"))
7768 (sha256
7769 (base32
7770 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
7771 (build-system ant-build-system)
7772 (arguments
7773 `(#:jar-name "osgi-service-jdbc.jar"
7774 #:tests? #f)); no tests
7775 (home-page "https://www.osgi.org")
7776 (synopsis "Factory for JDBC connection factories")
7777 (description
7778 "OSGi, for Open Services Gateway initiative framework, is a module system
7779 and service platform for the Java programming language. This package contains
7780 a factory for JDBC connection factories. There are 3 preferred connection
7781 factories for getting JDBC connections:
7782
7783 @itemize
7784 @item @code{javax.sql.DataSource};
7785 @item @code{javax.sql.ConnectionPoolDataSource};
7786 @item @code{javax.sql.XADataSource}.
7787 @end itemize")
7788 (license license:asl2.0)))
7789
7790 (define-public java-osgi-service-resolver
7791 (package
7792 (name "java-osgi-service-resolver")
7793 (version "1.0.1")
7794 (source (origin
7795 (method url-fetch)
7796 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7797 "org.osgi.service.resolver/"
7798 version "/org.osgi.service.resolver-"
7799 version "-sources.jar"))
7800 (sha256
7801 (base32
7802 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
7803 (build-system ant-build-system)
7804 (arguments
7805 `(#:jar-name "osgi-service-resolver.jar"
7806 #:tests? #f)); no tests
7807 (inputs
7808 `(("annotation" ,java-osgi-annotation)
7809 ("resource" ,java-osgi-resource)))
7810 (home-page "https://www.osgi.org")
7811 (synopsis "OSGI Resolver service")
7812 (description
7813 "OSGi, for Open Services Gateway initiative framework, is a module system
7814 and service platform for the Java programming language. This package contains
7815 a resolver service that resolves the specified resources in the context supplied
7816 by the caller.")
7817 (license license:asl2.0)))
7818
7819 (define-public java-osgi-util-tracker
7820 (package
7821 (name "java-osgi-util-tracker")
7822 (version "1.5.1")
7823 (source (origin
7824 (method url-fetch)
7825 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7826 "org.osgi.util.tracker/"
7827 version "/org.osgi.util.tracker-"
7828 version "-sources.jar"))
7829 (sha256
7830 (base32
7831 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
7832 (build-system ant-build-system)
7833 (arguments
7834 `(#:jar-name "osgi-util-tracker.jar"
7835 #:tests? #f)); no tests
7836 (inputs
7837 `(("framework" ,java-osgi-framework)
7838 ("annotation" ,java-osgi-annotation)))
7839 (home-page "https://www.osgi.org")
7840 (synopsis "Bundle tracking")
7841 (description
7842 "OSGi, for Open Services Gateway initiative framework, is a module system
7843 and service platform for the Java programming language. This package contains
7844 bundle tracking utility classes.")
7845 (license license:asl2.0)))
7846
7847 (define-public java-osgi-service-cm
7848 (package
7849 (name "java-osgi-service-cm")
7850 (version "1.5.0")
7851 (source (origin
7852 (method url-fetch)
7853 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7854 "org.osgi.service.cm/"
7855 version "/org.osgi.service.cm-"
7856 version "-sources.jar"))
7857 (sha256
7858 (base32
7859 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
7860 (build-system ant-build-system)
7861 (arguments
7862 `(#:jar-name "osgi-service-cm.jar"
7863 #:tests? #f)); no tests
7864 (inputs
7865 `(("framework" ,java-osgi-framework)
7866 ("annotation" ,java-osgi-annotation)))
7867 (home-page "https://www.osgi.org")
7868 (synopsis "OSGI Configuration Management")
7869 (description
7870 "OSGi, for Open Services Gateway initiative framework, is a module system
7871 and service platform for the Java programming language. This package contains
7872 utility classes for the configuration of services.")
7873 (license license:asl2.0)))
7874
7875 (define-public java-osgi-service-packageadmin
7876 (package
7877 (name "java-osgi-service-packageadmin")
7878 (version "1.2.0")
7879 (source (origin
7880 (method url-fetch)
7881 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
7882 "org.osgi.service.packageadmin/"
7883 version "/org.osgi.service.packageadmin-"
7884 version "-sources.jar"))
7885 (sha256
7886 (base32
7887 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
7888 (build-system ant-build-system)
7889 (arguments
7890 `(#:jar-name "osgi-service-packageadmin.jar"
7891 #:tests? #f)); no tests
7892 (inputs
7893 `(("framework" ,java-osgi-framework)))
7894 (home-page "https://www.osgi.org")
7895 (synopsis "OSGI Package Administration")
7896 (description
7897 "OSGi, for Open Services Gateway initiative framework, is a module system
7898 and service platform for the Java programming language. This package contains
7899 the packageadmin service.")
7900 (license license:asl2.0)))
7901
7902 (define-public java-ops4j-base-lang
7903 (package
7904 (name "java-ops4j-base-lang")
7905 (version "1.5.0")
7906 (source (origin
7907 (method url-fetch)
7908 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
7909 "archive/base-" version ".tar.gz"))
7910 (sha256
7911 (base32
7912 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
7913 (build-system ant-build-system)
7914 (arguments
7915 `(#:jar-name "java-ops4j-base-lang.jar"
7916 #:source-dir "ops4j-base-lang/src/main/java"
7917 #:tests? #f; no tests
7918 #:phases
7919 (modify-phases %standard-phases
7920 (add-before 'build 'add-test-file
7921 (lambda _
7922 ;; That file is required by a test in ops4j-pax-exam-core-spi
7923 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
7924 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
7925 (lambda _
7926 (display
7927 (string-append
7928 "version=" ,version "\n"
7929 "groupId=org.ops4j.base"
7930 "artifactId=ops4j-base-lang\n"))))
7931 #t)))))
7932 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
7933 (synopsis "Utility classes and extensions to be used in OPS4J projects")
7934 (description "OPS4J stands for Open Participation Software for Java. This
7935 package contains utilities and extensions related to @code{java.lang}.")
7936 (license license:asl2.0)))
7937
7938 (define-public java-ops4j-base-monitors
7939 (package
7940 (inherit java-ops4j-base-lang)
7941 (name "java-ops4j-base-monitors")
7942 (arguments
7943 `(#:jar-name "java-ops4j-base-monitors.jar"
7944 #:source-dir "ops4j-base-monitors/src/main/java"
7945 #:tests? #f)); no tests
7946 (inputs
7947 `(("lang" ,java-ops4j-base-lang)))
7948 (description "OPS4J stands for Open Participation Software for Java. This
7949 package contains utilities and extensions related to monitoring.")))
7950
7951 (define-public java-ops4j-base-io
7952 (package
7953 (inherit java-ops4j-base-lang)
7954 (name "java-ops4j-base-io")
7955 (arguments
7956 `(#:jar-name "java-ops4j-base-io.jar"
7957 #:source-dir "ops4j-base-io/src/main/java"
7958 #:test-dir "ops4j-base-io/src/test"
7959 #:test-exclude
7960 (list "**/ListerTest.java")))
7961 (inputs
7962 `(("lang" ,java-ops4j-base-monitors)
7963 ("lang" ,java-ops4j-base-lang)))
7964 (native-inputs
7965 `(("junit" ,java-junit)
7966 ("hamcrest" ,java-hamcrest-core)))
7967 (description "OPS4J stands for Open Participation Software for Java. This
7968 package contains utilities and extensions related to handling streams and files.")))
7969
7970 (define-public java-ops4j-base-util
7971 (package
7972 (inherit java-ops4j-base-lang)
7973 (name "java-ops4j-base-util")
7974 (arguments
7975 `(#:jar-name "java-ops4j-base-util.jar"
7976 #:source-dir "ops4j-base-util/src/main/java"
7977 #:test-dir "ops4j-base-util/src/test"))
7978 (inputs
7979 `(("lang" ,java-ops4j-base-lang)))
7980 (native-inputs
7981 `(("junit" ,java-junit)))
7982 (description "OPS4J stands for Open Participation Software for Java. This
7983 package contains utilities and extensions related to environment, i18n and
7984 mime types.")))
7985
7986 (define-public java-ops4j-base-util-property
7987 (package
7988 (inherit java-ops4j-base-lang)
7989 (name "java-ops4j-base-util-property")
7990 (arguments
7991 `(#:jar-name "java-ops4j-base-util-property.jar"
7992 #:source-dir "ops4j-base-util-property/src/main/java"
7993 #:tests? #f)); no tests
7994 (inputs
7995 `(("lang" ,java-ops4j-base-lang)
7996 ("util" ,java-ops4j-base-util)))
7997 (description "OPS4J stands for Open Participation Software for Java. This
7998 package contains utilities and extensions related to resolving properties from
7999 different sources.")))
8000
8001 (define-public java-ops4j-base-store
8002 (package
8003 (inherit java-ops4j-base-lang)
8004 (name "java-ops4j-base-store")
8005 (arguments
8006 `(#:jar-name "java-ops4j-base-store.jar"
8007 #:source-dir "ops4j-base-store/src/main/java"
8008 #:tests? #f)); no tests
8009 (inputs
8010 `(("lang" ,java-ops4j-base-lang)
8011 ("slf4j" ,java-slf4j-api)
8012 ("io" ,java-ops4j-base-io)))
8013 (description "OPS4J stands for Open Participation Software for Java. This
8014 package contains utilities for storing and retrieving data from an
8015 @code{InputStream}.")))
8016
8017 (define-public java-ops4j-base-spi
8018 (package
8019 (inherit java-ops4j-base-lang)
8020 (name "java-ops4j-base-spi")
8021 (arguments
8022 `(#:jar-name "java-ops4j-base-spi.jar"
8023 #:source-dir "ops4j-base-spi/src/main/java"
8024 #:test-dir "ops4j-base-spi/src/test"))
8025 (native-inputs
8026 `(("junit" ,java-junit)
8027 ("hamcrest" ,java-hamcrest-core)))
8028 (description "OPS4J stands for Open Participation Software for Java. This
8029 package contains utilities for obtaining services via the Java SE 6
8030 @code{ServiceLoader}.")))
8031
8032 (define-public java-aqute-bnd-annotation
8033 (package
8034 (name "java-aqute-bnd-annotation")
8035 (version "3.5.0")
8036 (source (origin
8037 (method url-fetch)
8038 (uri (string-append "https://github.com/bndtools/bnd/archive/"
8039 version ".REL.tar.gz"))
8040 (file-name (string-append name "-" version ".tar.gz"))
8041 (sha256
8042 (base32
8043 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
8044 (build-system ant-build-system)
8045 (arguments
8046 `(#:jar-name "java-aqute-bnd-annotation.jar"
8047 #:source-dir "biz.aQute.bnd.annotation/src"
8048 #:tests? #f)); empty test dir
8049 (home-page "https://bnd.bndtools.org/")
8050 (synopsis "Tools for OSGi")
8051 (description "Bnd is a swiss army knife for OSGi, it creates manifest
8052 headers based on analyzing the class code, it verifies the project settings,
8053 it manages project dependencies, gives diffs jars, and much more.")
8054 (license license:asl2.0)))
8055
8056 (define-public java-aqute-libg
8057 (package
8058 (inherit java-aqute-bnd-annotation)
8059 (name "java-aqute-libg")
8060 (arguments
8061 `(#:jar-name "java-aqute-libg.jar"
8062 ;; The build fails when source/target more recent than 1.7. This
8063 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
8064 ;;
8065 ;; It is closed as won't fix. There is no way to change the source
8066 ;; so that it works on 1.8, and still works on 1.6, the upstream
8067 ;; target. It work fine on 1.7, so we use 1.7.
8068 #:make-flags (list "-Dant.build.javac.source=1.7"
8069 "-Dant.build.javac.target=1.7")
8070 #:phases
8071 (modify-phases %standard-phases
8072 (add-before 'configure 'chdir
8073 ;; Change to aQute.libg directory, so that the relative
8074 ;; paths in the tests aren't broken.
8075 (lambda _
8076 (chdir "aQute.libg")
8077 #t))
8078 (add-before 'check 'create-test-directory
8079 ;; Copy the test directory to test/java, since that's where
8080 ;; ant-build-system's default project in build.xml expects to find
8081 ;; the test classes. Leave a copy in the original place to not
8082 ;; break paths in tests.
8083 (lambda _
8084 (mkdir "src/test")
8085 (copy-recursively "test" "src/test/java")
8086 #t)))))
8087 (inputs
8088 `(("slf4j" ,java-slf4j-api)
8089 ("osgi-annot" ,java-osgi-annotation)
8090 ("java-osgi-cmpn" ,java-osgi-cmpn)
8091 ("osgi" ,java-osgi-core)))
8092 (native-inputs
8093 `(("hamcrest" ,java-hamcrest-core)
8094 ("java-junit" ,java-junit)))))
8095
8096 (define java-aqute-libg-bootstrap
8097 (package
8098 (inherit java-aqute-libg)
8099 (name "java-aqute-libg-bootstrap")
8100 (arguments
8101 ;; Disable tests, at this stage of bootstrap we have no test frameworks.
8102 (substitute-keyword-arguments (package-arguments java-aqute-libg)
8103 ((#:tests? _ #f) #f)))
8104 (inputs
8105 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8106 ,@(delete `("slf4j" ,java-slf4j-api)
8107 (package-inputs java-aqute-libg))))
8108 (native-inputs '())))
8109
8110 (define-public java-aqute-bndlib
8111 (package
8112 (inherit java-aqute-bnd-annotation)
8113 (name "java-aqute-bndlib")
8114 (arguments
8115 `(#:jar-name "java-bndlib.jar"
8116 #:source-dir "biz.aQute.bndlib/src"
8117 #:tests? #f)); no tests
8118 (inputs
8119 `(("slf4j" ,java-slf4j-api)
8120 ("osgi-annot" ,java-osgi-annotation)
8121 ("java-aqute-libg" ,java-aqute-libg)
8122 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
8123 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
8124 ("java-osgi-service-repository" ,java-osgi-service-repository)
8125 ("java-osgi-service-log" ,java-osgi-service-log)
8126 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
8127 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
8128 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
8129 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
8130 ("promise" ,java-osgi-util-promise)
8131 ("osgi" ,java-osgi-core)))))
8132
8133 (define java-aqute-bndlib-bootstrap
8134 (package
8135 (inherit java-aqute-bndlib)
8136 (name "java-aqute-bndlib-bootstrap")
8137 (inputs
8138 `(("slf4j-bootstrap" ,java-slf4j-api-bootstrap)
8139 ("java-aqute-libg-bootstrap" ,java-aqute-libg-bootstrap)
8140 ,@(delete `("slf4j" ,java-slf4j-api)
8141 (delete `("java-aqute-libg" ,java-aqute-libg)
8142 (package-inputs java-aqute-bndlib)))))))
8143
8144 (define-public java-ops4j-pax-tinybundles
8145 (package
8146 (name "java-ops4j-pax-tinybundles")
8147 (version "2.1.1")
8148 (source (origin
8149 (method url-fetch)
8150 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
8151 "archive/tinybundles-" version ".tar.gz"))
8152 (sha256
8153 (base32
8154 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
8155 (arguments
8156 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
8157 #:source-dir "src/main/java"
8158 #:test-exclude
8159 ;; Abstract base classes for other tests
8160 (list "**/BndTest.java" "**/CoreTest.java")
8161 #:phases
8162 (modify-phases %standard-phases
8163 (add-before 'check 'fix-version
8164 (lambda _
8165 ;; This test has a reference to an old version of bndlib we are not
8166 ;; packaging. It uses the version referenced in pom.xml. We replace
8167 ;; it with our own version.
8168 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
8169 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
8170 ,(package-version java-aqute-bndlib)))
8171 #t)))))
8172 (inputs
8173 `(("lang" ,java-ops4j-base-lang)
8174 ("io" ,java-ops4j-base-io)
8175 ("store" ,java-ops4j-base-store)
8176 ("slf4j" ,java-slf4j-api)
8177 ("libg" ,java-aqute-libg)
8178 ("bndlib" ,java-aqute-bndlib)))
8179 (native-inputs
8180 `(("junit" ,java-junit)
8181 ("hamcrest" ,java-hamcrest-core)
8182 ("log4j" ,java-log4j-api)
8183 ("bndannotation" ,java-aqute-bnd-annotation)
8184 ("framework" ,java-osgi-framework)))
8185 (build-system ant-build-system)
8186 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
8187 (synopsis "Java APIs to create OSGi related artifacts")
8188 (description "Tinybundles is all about creating OSGi related artifacts like
8189 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
8190 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
8191 other hand, this library can be a foundation of real end user tools that need
8192 to create those artifacts.")
8193 (license license:asl2.0)))
8194
8195 (define-public java-ops4j-pax-exam-core
8196 (package
8197 (name "java-ops4j-pax-exam-core")
8198 (version "4.11.0")
8199 (source (origin
8200 (method url-fetch)
8201 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
8202 "archive/exam-reactor-" version ".tar.gz"))
8203 (sha256
8204 (base32
8205 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
8206 (arguments
8207 `(#:jar-name "java-ops4j-pax-exam-core.jar"
8208 #:source-dir "core/pax-exam/src/main/java"
8209 #:test-dir "core/pax-exam/src/test"))
8210 (inputs
8211 `(("slf4j" ,java-slf4j-api)
8212 ("lang" ,java-ops4j-base-lang)
8213 ("io" ,java-ops4j-base-io)
8214 ("util-property" ,java-ops4j-base-util-property)
8215 ("util-store" ,java-ops4j-base-store)
8216 ("java-osgi-core" ,java-osgi-core)))
8217 (native-inputs
8218 `(("junit" ,java-junit)
8219 ("hamcrest" ,java-hamcrest-core)))
8220 (build-system ant-build-system)
8221 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
8222 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
8223 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
8224 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
8225 the system under test at the same time.")
8226 (license license:asl2.0)))
8227
8228 (define-public java-ops4j-pax-exam-core-spi
8229 (package
8230 (inherit java-ops4j-pax-exam-core)
8231 (name "java-ops4j-pax-exam-core-spi")
8232 (arguments
8233 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
8234 #:source-dir "src/main/java"
8235 #:test-exclude
8236 (list
8237 ;; Abstract base class, not a test
8238 "**/BaseStagedReactorTest.java"
8239 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
8240 "**/WarBuilderTest.java")
8241 #:phases
8242 (modify-phases %standard-phases
8243 (add-before 'configure 'chdir
8244 (lambda _
8245 ;; Tests assume we are in this directory
8246 (chdir "core/pax-exam-spi")
8247 #t))
8248 (add-before 'check 'fix-tests
8249 (lambda _
8250 ;; One test checks that this file is present.
8251 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
8252 (with-output-to-file
8253 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
8254 (lambda _
8255 (display
8256 (string-append "artifactId = pax-exam-spi\n"
8257 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
8258 ;; Maven puts compilation results in the target directory, while we
8259 ;; put them in the build directory.
8260 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
8261 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
8262 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
8263 (("target") "build"))
8264 ;; One test is expected to fail, but it doesn't throw the expected exception
8265 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
8266 (("AssertionError") "IllegalArgumentException"))
8267 #t)))))
8268 (inputs
8269 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
8270 ("lang" ,java-ops4j-base-lang)
8271 ("monitors" ,java-ops4j-base-monitors)
8272 ("store" ,java-ops4j-base-store)
8273 ("io" ,java-ops4j-base-io)
8274 ("spi" ,java-ops4j-base-spi)
8275 ("osgi" ,java-osgi-core)
8276 ("slf4j" ,java-slf4j-api)
8277 ("tinybundles" ,java-ops4j-pax-tinybundles)))
8278 (native-inputs
8279 `(("mockito" ,java-mockito-1)
8280 ("junit" ,java-junit)
8281 ("hamcrest" ,java-hamcrest-core)
8282 ("cglib" ,java-cglib)
8283 ("objenesis" ,java-objenesis)
8284 ("asm" ,java-asm)))))
8285
8286 (define-public java-ops4j-pax-exam-core-junit
8287 (package
8288 (inherit java-ops4j-pax-exam-core)
8289 (name "java-ops4j-pax-exam-core-junit")
8290 (arguments
8291 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
8292 #:source-dir "drivers/pax-exam-junit4/src/main/java"
8293 #:tests? #f)); no tests
8294 (inputs
8295 `(("junit" ,java-junit)
8296 ("slf4j" ,java-slf4j-api)
8297 ("core" ,java-ops4j-pax-exam-core)
8298 ("spi" ,java-ops4j-pax-exam-core-spi)))
8299 (native-inputs '())))
8300
8301 (define-public java-fasterxml-jackson-annotations
8302 (package
8303 (name "java-fasterxml-jackson-annotations")
8304 (version "2.9.4")
8305 (source (origin
8306 (method url-fetch)
8307 (uri (string-append "https://github.com/FasterXML/"
8308 "jackson-annotations/archive/"
8309 "jackson-annotations-" version ".tar.gz"))
8310 (sha256
8311 (base32
8312 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
8313 (build-system ant-build-system)
8314 (arguments
8315 `(#:jar-name "jackson-annotations.jar"
8316 #:source-dir "src/main/java"
8317 #:test-dir "src/test"))
8318 (native-inputs
8319 `(("junit" ,java-junit)))
8320 (home-page "https://github.com/FasterXML/jackson-annotations")
8321 (synopsis "General purpose annotations for the Jackson Data Processor")
8322 (description "This package contains general purpose annotations for the
8323 Jackson Data Processor, used on value and handler types. The only annotations
8324 not included are ones that require dependency to the Databind package.")
8325 (license license:asl2.0)))
8326
8327 (define-public java-fasterxml-jackson-core
8328 (package
8329 (name "java-fasterxml-jackson-core")
8330 (version "2.9.4")
8331 (source (origin
8332 (method url-fetch)
8333 (uri (string-append "https://github.com/FasterXML/"
8334 "jackson-core/archive/"
8335 "jackson-core-" version ".tar.gz"))
8336 (sha256
8337 (base32
8338 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
8339 (build-system ant-build-system)
8340 (arguments
8341 `(#:jar-name "jackson-core.jar"
8342 #:source-dir "src/main/java"
8343 #:test-dir "src/test"
8344 #:test-exclude
8345 (list
8346 ;; Expected failure. pom.xml excludes these
8347 "**/failing/**"
8348 ;; Base classes that have no constructor for junit
8349 "**/BaseTest.java"
8350 "**/ConcurrencyReadTest.java"
8351 "**/ManualCharAccessTest.java"
8352 "**/ManualCharAccessTest.java"
8353 "**/TrailingCommasTest.java"
8354 "**/AsyncMissingValuesInObjectTest.java"
8355 "**/AsyncMissingValuesInArrayTest.java")
8356 #:phases
8357 (modify-phases %standard-phases
8358 (add-before 'configure 'generate-PackageVersion.java
8359 (lambda _
8360 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
8361 (in (string-append out ".in")))
8362 (copy-file in out)
8363 (substitute* out
8364 (("@package@") "com.fasterxml.jackson.core.json")
8365 (("@projectversion@") ,version)
8366 (("@projectgroupid@") "com.fasterxml.jackson.core")
8367 (("@projectartifactid@") "jackson-core")))
8368 #t))
8369 (add-before 'build 'copy-resources
8370 (lambda _
8371 (copy-recursively "src/main/resources"
8372 "build/classes")
8373 #t))
8374 (add-before 'check 'copy-test-resources
8375 (lambda _
8376 (copy-recursively "src/test/resources"
8377 "build/test-classes")
8378 #t)))))
8379 (native-inputs
8380 `(("junit" ,java-junit)
8381 ("hamcrest" ,java-hamcrest-core)))
8382 (home-page "https://github.com/FasterXML/jackson-core")
8383 (synopsis "")
8384 (description "")
8385 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8386
8387 (define-public java-fasterxml-jackson-databind
8388 (package
8389 (name "java-fasterxml-jackson-databind")
8390 (version "2.9.4")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (string-append "https://github.com/FasterXML/"
8394 "jackson-databind/archive/"
8395 "jackson-databind-" version ".tar.gz"))
8396 (sha256
8397 (base32
8398 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
8399 (build-system ant-build-system)
8400 (arguments
8401 `(#:jar-name "jackson-databind.jar"
8402 #:source-dir "src/main/java"
8403 #:tests? #f; requires javax.measures for which I can't find a free implementation
8404 #:phases
8405 (modify-phases %standard-phases
8406 (add-before 'configure 'generate-PackageVersion.java
8407 (lambda _
8408 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
8409 (in (string-append out ".in")))
8410 (copy-file in out)
8411 (substitute* out
8412 (("@package@") "com.fasterxml.jackson.databind.cfg")
8413 (("@projectversion@") ,version)
8414 (("@projectgroupid@") "com.fasterxml.jackson.databind")
8415 (("@projectartifactid@") "jackson-databind")))
8416 #t))
8417 (add-before 'build 'copy-resources
8418 (lambda _
8419 (copy-recursively "src/main/resources" "build/classes")
8420 #t)))))
8421 (inputs
8422 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8423 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
8424 (home-page "https://github.com/FasterXML/jackson-databind")
8425 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
8426 (description "This package contains the general-purpose data-binding
8427 functionality and tree-model for Jackson Data Processor. It builds on core
8428 streaming parser/generator package, and uses Jackson Annotations for
8429 configuration.")
8430 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8431
8432 (define-public java-fasterxml-jackson-modules-base-jaxb
8433 (package
8434 (name "java-fasterxml-jackson-modules-base-jaxb")
8435 (version "2.9.4")
8436 (source (origin
8437 (method url-fetch)
8438 (uri (string-append "https://github.com/FasterXML/"
8439 "jackson-modules-base/archive/"
8440 "jackson-modules-base-" version ".tar.gz"))
8441 (sha256
8442 (base32
8443 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8444 (build-system ant-build-system)
8445 (arguments
8446 `(#:jar-name "jackson-modules-base-jaxb.jar"
8447 #:source-dir "jaxb/src/main/java"
8448 #:test-dir "jaxb/src/test"
8449 #:test-exclude
8450 ;; Base class for tests
8451 (list "**/BaseJaxbTest.java")
8452 #:phases
8453 (modify-phases %standard-phases
8454 (add-before 'configure 'generate-PackageVersion.java
8455 (lambda _
8456 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
8457 "jackson/module/jaxb/PackageVersion.java"))
8458 (in (string-append out ".in")))
8459 (copy-file in out)
8460 (substitute* out
8461 (("@package@") "com.fasterxml.jackson.module.jaxb")
8462 (("@projectversion@") ,version)
8463 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
8464 (("@projectartifactid@") "jackson-module-jaxb")))
8465 #t))
8466 (add-before 'build 'copy-resources
8467 (lambda _
8468 (copy-recursively "jaxb/src/main/resources" "build/classes")
8469 #t)))))
8470 (inputs
8471 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8472 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8473 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8474 (native-inputs
8475 `(("java-junit" ,java-junit)))
8476 (home-page "https://github.com/FasterXML/jackson-modules-base")
8477 (synopsis "Jaxb annotations jackson module")
8478 (description "This package is the jaxb annotations module for jackson.")
8479 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8480
8481 (define-public java-fasterxml-jackson-modules-base-mrbean
8482 (package
8483 (name "java-fasterxml-jackson-modules-base-mrbean")
8484 (version "2.9.4")
8485 (source (origin
8486 (method url-fetch)
8487 (uri (string-append "https://github.com/FasterXML/"
8488 "jackson-modules-base/archive/"
8489 "jackson-modules-base-" version ".tar.gz"))
8490 (sha256
8491 (base32
8492 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
8493 (build-system ant-build-system)
8494 (arguments
8495 `(#:jar-name "jackson-modules-base-mrbean.jar"
8496 #:source-dir "mrbean/src/main/java"
8497 #:test-dir "mrbean/src/test"
8498 #:test-exclude
8499 ;; Base class for tests
8500 (list "**/BaseTest.java")
8501 #:phases
8502 (modify-phases %standard-phases
8503 (add-before 'configure 'generate-PackageVersion.java
8504 (lambda _
8505 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
8506 "jackson/module/mrbean/PackageVersion.java"))
8507 (in (string-append out ".in")))
8508 (copy-file in out)
8509 (substitute* out
8510 (("@package@") "com.fasterxml.jackson.module.mrbean")
8511 (("@projectversion@") ,version)
8512 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
8513 (("@projectartifactid@") "jackson-module-mrbean")))
8514 #t)))))
8515 (inputs
8516 `(("java-asm" ,java-asm)
8517 ("java-fasterxml-jackson-annotations"
8518 ,java-fasterxml-jackson-annotations)
8519 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8520 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
8521 (native-inputs
8522 `(("java-junit" ,java-junit)))
8523 (home-page "https://github.com/FasterXML/jackson-modules-base")
8524 (synopsis "POJO type materialization for Java")
8525 (description "This package implements POJO type materialization.
8526 Databinders can construct implementation classes for Java interfaces as part
8527 of deserialization.")
8528 (license license:asl2.0)))
8529
8530 (define-public java-snakeyaml
8531 (package
8532 (name "java-snakeyaml")
8533 (version "1.18")
8534 (source (origin
8535 (method url-fetch)
8536 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
8537 version ".tar.gz"))
8538 (file-name (string-append name "-" version ".tar.gz"))
8539 (sha256
8540 (base32
8541 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
8542 (build-system ant-build-system)
8543 (arguments
8544 `(#:jar-name "java-snakeyaml.jar"
8545 #:source-dir "src/main/java"
8546 ;; Tests require velocity, a cyclic dependency, and
8547 ;; java-spring-framework-context which is not packaged.
8548 #:tests? #f))
8549 (home-page "https://bitbucket.org/asomov/snakeyaml")
8550 (synopsis "YAML processor")
8551 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
8552 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8553
8554 (define-public java-fasterxml-jackson-dataformat-yaml
8555 (package
8556 (name "java-fasterxml-jackson-dataformat-yaml")
8557 (version "2.9.4")
8558 (source (origin
8559 (method url-fetch)
8560 (uri (string-append "https://github.com/FasterXML/"
8561 "jackson-dataformats-text/archive/"
8562 "jackson-dataformats-text-" version ".tar.gz"))
8563 (sha256
8564 (base32
8565 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
8566 (build-system ant-build-system)
8567 (arguments
8568 `(#:jar-name "jackson-dataformat-yaml.jar"
8569 #:source-dir "yaml/src/main/java"
8570 #:test-dir "yaml/src/test"
8571 #:test-exclude (list "**/failing/**.java")
8572 #:phases
8573 (modify-phases %standard-phases
8574 (add-before 'configure 'generate-PackageVersion.java
8575 (lambda _
8576 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
8577 (in (string-append out ".in")))
8578 (copy-file in out)
8579 (substitute* out
8580 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
8581 (("@projectversion@") ,version)
8582 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
8583 (("@projectartifactid@") "jackson-dataformat-yaml")))
8584 #t)))))
8585 (inputs
8586 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8587 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8588 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8589 ("java-snakeyaml" ,java-snakeyaml)))
8590 (native-inputs
8591 `(("junit" ,java-junit)
8592 ("hamcrest" ,java-hamcrest-core)
8593 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
8594 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
8595 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
8596 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
8597 (synopsis "Yaml backend for Jackson")
8598 (description "Dataformat backends are used to support format alternatives
8599 to JSON, supported by default. This is done by sub-classing Jackson core
8600 abstractions.")
8601 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8602
8603 (define-public java-stax2-api
8604 (package
8605 (name "java-stax2-api")
8606 (version "4.0.0")
8607 (source (origin
8608 (method url-fetch)
8609 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
8610 "stax2-api-" version ".tar.gz"))
8611 (sha256
8612 (base32
8613 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
8614 (build-system ant-build-system)
8615 (arguments
8616 `(#:jar-name "java-stax2-api.jar"
8617 #:source-dir "src/main/java"
8618 #:tests? #f)); no tests
8619 (home-page "https://github.com/FasterXML/stax2-api")
8620 (synopsis "Stax2 API")
8621 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
8622 significant new functionalities, such as full-featured bi-direction validation
8623 interface and high-performance Typed Access API.")
8624 (license license:bsd-2)))
8625
8626 (define-public java-woodstox-core
8627 (package
8628 (name "java-woodstox-core")
8629 (version "5.0.3")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
8633 "woodstox-core-" version ".tar.gz"))
8634 (sha256
8635 (base32
8636 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
8637 (build-system ant-build-system)
8638 (arguments
8639 `(#:jar-name "woodstox.jar"
8640 #:test-exclude
8641 (list "**/Base*.java" "failing/**")
8642 #:phases
8643 (modify-phases %standard-phases
8644 (add-before 'build 'remove-msv-dep
8645 (lambda _
8646 ;; we don't need osgi, and it depends on msv
8647 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
8648 ;; msv's latest release is from 2011 and we don't need it
8649 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
8650 (delete-file-recursively "src/test/java/wstxtest/osgi")
8651 (delete-file-recursively "src/test/java/wstxtest/msv")
8652 #t))
8653 (add-before 'build 'copy-resources
8654 (lambda _
8655 (copy-recursively "src/main/resources" "build/classes")
8656 #t)))))
8657 (inputs
8658 `(("stax2" ,java-stax2-api)))
8659 (native-inputs
8660 `(("junit" ,java-junit)))
8661 (home-page "https://github.com/FasterXML/woodstox")
8662 (synopsis "Stax XML API implementation")
8663 (description "Woodstox is a stax XML API implementation.")
8664 (license license:asl2.0)))
8665
8666 (define-public java-fasterxml-jackson-dataformat-xml
8667 (package
8668 (name "java-fasterxml-jackson-dataformat-xml")
8669 (version "2.9.4")
8670 (source (origin
8671 (method url-fetch)
8672 (uri (string-append "https://github.com/FasterXML/"
8673 "jackson-dataformat-xml/archive/"
8674 "jackson-dataformat-xml-" version ".tar.gz"))
8675 (sha256
8676 (base32
8677 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
8678 (build-system ant-build-system)
8679 (arguments
8680 `(#:jar-name "jackson-dataformat-xml.jar"
8681 #:source-dir "src/main/java"
8682 #:test-exclude
8683 (list "**/failing/**")
8684 #:phases
8685 (modify-phases %standard-phases
8686 (add-before 'configure 'generate-PackageVersion.java
8687 (lambda _
8688 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
8689 (in (string-append out ".in")))
8690 (copy-file in out)
8691 (newline)
8692 (substitute* out
8693 (("@package@") "com.fasterxml.jackson.dataformat.xml")
8694 (("@projectversion@") ,version)
8695 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
8696 (("@projectartifactid@") "jackson-dataformat-xml")))
8697 #t))
8698 (add-before 'build 'copy-resources
8699 (lambda _
8700 (copy-recursively "src/main/resources" "build/classes")
8701 #t)))))
8702 (inputs
8703 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
8704 ("jackson-core" ,java-fasterxml-jackson-core)
8705 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
8706 ("jackson-databind" ,java-fasterxml-jackson-databind)
8707 ("stax2-api" ,java-stax2-api)
8708 ("woodstox" ,java-woodstox-core)))
8709 (native-inputs
8710 `(("junit" ,java-junit)
8711 ("hamcrest" ,java-hamcrest-core)))
8712 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
8713 (synopsis "Read and write XML")
8714 (description "This package contains Jackson extension component for reading
8715 and writing XML encoded data.
8716
8717 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
8718 approach (that is, no support is added for \"Schema-first\" approach). Support
8719 for JAXB annotations is provided by JAXB annotation module; this module
8720 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
8721 @code{JsonFactory}) as well as small number of higher level overrides needed to
8722 make data-binding work.")
8723 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
8724
8725 (define-public java-hdrhistogram
8726 (package
8727 (name "java-hdrhistogram")
8728 (version "2.1.9")
8729 (source (origin
8730 (method url-fetch)
8731 (uri (string-append "https://github.com/HdrHistogram/HdrHistogram/"
8732 "archive/HdrHistogram-" version ".tar.gz"))
8733 (sha256
8734 (base32
8735 "1sicbmc3sr42nw93qbkb26q9rn33ag33k6k77phjc3j5h5gjffqv"))))
8736 (build-system ant-build-system)
8737 (arguments
8738 `(#:jar-name "java-hdrhistogram.jar"
8739 #:source-dir "src/main/java"
8740 #:phases
8741 (modify-phases %standard-phases
8742 (add-before 'configure 'set-version
8743 (lambda _
8744 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
8745 (template (string-append version-java ".template")))
8746 (copy-file template version-java)
8747 (substitute* version-java
8748 (("\\$VERSION\\$") ,version)
8749 (("\\$BUILD_TIME\\$") "0"))
8750 #t))))))
8751 (native-inputs
8752 `(("junit" ,java-junit)
8753 ("hamcrest" ,java-hamcrest-core)))
8754 (home-page "https://hdrhistogram.github.io/HdrHistogram")
8755 (synopsis "High dynamic range histogram")
8756 (description "Hdrhistogram allows to create histograms that support
8757 recording and analyzing sampled data value counts across a configurable integer
8758 value range with configurable value precision within the range. Value precision
8759 is expressed as the number of significant digits in the value recording, and
8760 provides control over value quantization behavior across the value range and
8761 the subsequent value resolution at any given level.")
8762 (license license:public-domain)))
8763
8764 (define-public java-cofoja
8765 (package
8766 (name "java-cofoja")
8767 (version "1.3")
8768 (source (origin
8769 (method git-fetch)
8770 (uri (git-reference
8771 (url "https://github.com/nhatminhle/cofoja.git")
8772 (commit (string-append "v" version))))
8773 (file-name (string-append "java-cofoja-" version "-checkout"))
8774 (sha256
8775 (base32
8776 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
8777 (build-system ant-build-system)
8778 (arguments
8779 `(#:build-target "dist"
8780 #:test-target "test"
8781 #:jdk ,icedtea-8
8782 #:make-flags
8783 (list "-Ddist.dir=dist")
8784 #:modules ((guix build ant-build-system)
8785 (guix build java-utils)
8786 (guix build utils)
8787 (srfi srfi-1)
8788 (ice-9 match))
8789 #:phases
8790 (modify-phases %standard-phases
8791 ;; The bulid system ignores the class path the ant-build-system sets
8792 ;; up and instead expects to find all dependencies in the "lib"
8793 ;; directory.
8794 (add-after 'unpack 'create-libdir
8795 (lambda* (#:key inputs #:allow-other-keys)
8796 (mkdir-p "lib")
8797 (for-each
8798 (lambda (file)
8799 (let ((target (string-append "lib/" (basename file))))
8800 (unless (file-exists? target)
8801 (symlink file target))))
8802 (append-map (match-lambda
8803 ((label . dir)
8804 (find-files dir "\\.jar$")))
8805 inputs))
8806 #t))
8807 (replace 'install (install-jars "dist")))))
8808 (inputs
8809 `(("java-asm" ,java-asm)))
8810 (native-inputs
8811 `(("java-junit" ,java-junit)))
8812 (home-page "https://github.com/nhatminhle/cofoja")
8813 (synopsis "Contracts for Java")
8814 (description "Contracts for Java, or Cofoja for short, is a contract
8815 programming framework and test tool for Java, which uses annotation processing
8816 and bytecode instrumentation to provide run-time checking. (In particular,
8817 this is not a static analysis tool.)")
8818 (license license:lgpl3+)))
8819
8820 (define-public java-aopalliance
8821 (package
8822 (name "java-aopalliance")
8823 (version "1.0")
8824 (source (origin
8825 (method git-fetch)
8826 ;; Note: this git repository is not official, but contains the
8827 ;; source code that is in the CVS repository. Downloading the
8828 ;; tarball from sourceforge is undeterministic, and the cvs download
8829 ;; fails.
8830 (uri (git-reference
8831 (url "https://github.com/hoverruan/aopalliance")
8832 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
8833 (file-name (string-append name "-" version))
8834 (sha256
8835 (base32
8836 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
8837 (build-system ant-build-system)
8838 (arguments
8839 `(#:jar-name "java-aopalliance.jar"
8840 #:jdk ,icedtea-8
8841 #:tests? #f; no tests
8842 #:source-dir "aopalliance/src/main"))
8843 (home-page "http://aopalliance.sourceforge.net")
8844 (synopsis "Aspect-Oriented Programming")
8845 (description "The AOP Alliance project is a joint project between several
8846 software engineering people who are interested in Aspect-Oriented Programming
8847 (AOP) and Java.")
8848 (license license:public-domain)))
8849
8850 (define-public java-javax-inject
8851 (package
8852 (name "java-javax-inject")
8853 (version "tck-1")
8854 (source (origin
8855 (method url-fetch)
8856 (uri (string-append "https://github.com/javax-inject/javax-inject/"
8857 "archive/javax.inject-" version ".tar.gz"))
8858 (sha256
8859 (base32
8860 "1ydrlvh2r7vr1g7lhjwy3w2dggpj9h6pix1lakkkgdywb365n6g0"))))
8861 (build-system ant-build-system)
8862 (arguments
8863 `(#:jar-name "java-javax-inject.jar"
8864 #:jdk ,icedtea-8
8865 #:tests? #f)); no tests
8866 (home-page "http://github.com/javax-inject/javax-inject")
8867 (synopsis "JSR-330: Dependency Injection for Java")
8868 (description "This package specifies a means for obtaining objects in such
8869 a way as to maximize reusability, testability and maintainability compared to
8870 traditional approaches such as constructors, factories, and service locators
8871 (e.g., JNDI). This process, known as dependency injection, is beneficial to
8872 most nontrivial applications.
8873
8874 Many types depend on other types. For example, a @var{Stopwatch} might depend
8875 on a @var{TimeSource}. The types on which a type depends are known as its
8876 dependencies. The process of finding an instance of a dependency to use at run
8877 time is known as resolving the dependency. If no such instance can be found,
8878 the dependency is said to be unsatisfied, and the application is broken.")
8879 (license license:asl2.0)))
8880
8881 (define-public java-guice
8882 (package
8883 (name "java-guice")
8884 (version "4.1")
8885 (source (origin
8886 (method url-fetch)
8887 (uri (string-append "https://github.com/google/guice/archive/"
8888 version ".tar.gz"))
8889 (file-name (string-append name "-" version ".tar.gz"))
8890 (modules '((guix build utils)))
8891 (snippet
8892 `(begin
8893 (for-each delete-file (find-files "." ".*.jar"))))
8894 (sha256
8895 (base32
8896 "0dwmqjzlavb144ywqqglj3h68hqszkff8ai0a42hyb5il0qh4rbp"))))
8897 (build-system ant-build-system)
8898 (arguments
8899 `(#:jar-name "java-guice.jar"
8900 #:jdk ,icedtea-8
8901 #:tests? #f; FIXME: tests are not in a java sub directory
8902 #:source-dir "core/src"))
8903 (inputs
8904 `(("guava" ,java-guava)
8905 ("java-cglib" ,java-cglib)
8906 ("java-aopalliance" ,java-aopalliance)
8907 ("java-javax-inject" ,java-javax-inject)
8908 ("java-asm" ,java-asm)))
8909 (home-page "https://github.com/google/guice")
8910 (synopsis "Lightweight dependency injection framework")
8911 (description "Guice is a lightweight dependency injection framework fo
8912 Java 6 and above.")
8913 (license license:asl2.0)))
8914
8915 (define-public java-guice-servlet
8916 (package
8917 (inherit java-guice)
8918 (name "java-guice-servlet")
8919 (arguments
8920 `(#:jar-name "guice-servlet.jar"
8921 #:source-dir "extensions/servlet/src/"
8922 #:jdk ,icedtea-8
8923 #:tests? #f)); FIXME: not in a java subdir
8924 (inputs
8925 `(("guice" ,java-guice)
8926 ("servlet" ,java-classpathx-servletapi)
8927 ,@(package-inputs java-guice)))))
8928
8929 (define-public java-assertj
8930 (package
8931 (name "java-assertj")
8932 (version "3.8.0")
8933 (source (origin
8934 (method url-fetch)
8935 (uri (string-append "https://github.com/joel-costigliola/"
8936 "assertj-core/archive/"
8937 "assertj-core-" version ".tar.gz"))
8938 (sha256
8939 (base32
8940 "1kf124fxskf548rklkg86294w2x6ajqrff94rrhyqns31danqkfz"))))
8941 (build-system ant-build-system)
8942 (arguments
8943 `(#:jar-name "java-assertj.jar"
8944 #:jdk ,icedtea-8
8945 #:source-dir "src/main/java"
8946 #:tests? #f)); depends on tng-junit which depends on assertj
8947 (inputs
8948 `(("cglib" ,java-cglib)
8949 ("junit" ,java-junit)
8950 ("hamcrest" ,java-hamcrest-core)))
8951 (native-inputs
8952 `(("mockito" ,java-mockito-1)))
8953 (home-page "https://joel-costigliola.github.io/assertj/index.html")
8954 (synopsis "Fluent assertions for java")
8955 (description "AssertJ core is a Java library that provides a fluent
8956 interface for writing assertions. Its main goal is to improve test code
8957 readability and make maintenance of tests easier.")
8958 (license license:asl2.0)))
8959
8960 (define-public java-jboss-javassist
8961 (package
8962 (name "java-jboss-javassist")
8963 (version "3.21.0")
8964 (source (origin
8965 (method url-fetch)
8966 (uri (string-append "https://github.com/jboss-javassist/javassist/"
8967 "archive/rel_"
8968 (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
8969 "_ga.tar.gz"))
8970 (sha256
8971 (base32
8972 "10lpcr3sbf7y6fq6fc2h2ik7rqrivwcy4747bg0kxhwszil3cfmf"))))
8973 (build-system ant-build-system)
8974 (arguments
8975 `(#:jar-name "java-jboss-javassist.jar"
8976 #:jdk ,icedtea-8
8977 #:source-dir "src/main"
8978 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
8979 #:phases
8980 (modify-phases %standard-phases
8981 (add-before 'configure 'remove-binary
8982 (lambda _
8983 (delete-file "javassist.jar")
8984 #t)))))
8985 (native-inputs
8986 `(("junit" ,java-junit)))
8987 (home-page "https://github.com/jboss-javassist/javassist")
8988 (synopsis "Java bytecode engineering toolkit")
8989 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
8990 manipulation simple. It is a class library for editing bytecodes in Java; it
8991 enables Java programs to define a new class at runtime and to modify a class
8992 file when the JVM loads it.")
8993 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
8994
8995 (define-public java-jcommander
8996 (package
8997 (name "java-jcommander")
8998 (version "1.71")
8999 (source (origin
9000 (method url-fetch)
9001 (uri (string-append "https://github.com/cbeust/jcommander/archive/"
9002 version ".tar.gz"))
9003 (file-name (string-append name "-" version ".tar.gz"))
9004 (sha256
9005 (base32
9006 "1f5k2ckay6qjc3d3w3d7bc0p3cx3c7n6p6zxvw1kibqdr0q98wlx"))))
9007 (build-system ant-build-system)
9008 (arguments
9009 `(#:jar-name "java-jcommander.jar"
9010 #:jdk ,icedtea-8
9011 #:tests? #f; requires testng which depends on jcommander
9012 #:source-dir "src/main/java"))
9013 (home-page "https://jcommander.org")
9014 (synopsis "Command line parameters parser")
9015 (description "JCommander is a very small Java framework that makes it
9016 trivial to parse command line parameters. Parameters are declared with
9017 annotations.")
9018 (license license:asl2.0)))
9019
9020 (define-public java-bsh
9021 (package
9022 (name "java-bsh")
9023 (version "2.0b6")
9024 (source (origin
9025 (method url-fetch)
9026 (uri (string-append "https://github.com/beanshell/beanshell/archive/"
9027 version ".tar.gz"))
9028 (file-name (string-append name "-" version ".tar.gz"))
9029 (sha256
9030 (base32
9031 "1bawkxk6jyc75hxvzkpz689h73cn3f222m0ar3nvb0dal2b85kfv"))))
9032 (build-system ant-build-system)
9033 (arguments
9034 `(#:build-target "jarall"
9035 #:test-target "junit-tests-all"
9036 #:phases
9037 (modify-phases %standard-phases
9038 (replace 'install
9039 (lambda* (#:key outputs #:allow-other-keys)
9040 (let ((share (string-append (assoc-ref outputs "out") "/share/java")))
9041 (mkdir-p share)
9042 (copy-file "dist/bsh-2.0b6.jar" (string-append share "/bsh-2.0b6.jar"))
9043 #t))))))
9044 (home-page "http://beanshell.org/")
9045 (synopsis "Lightweight Scripting for Java")
9046 (description "BeanShell is a small, free, embeddable Java source
9047 interpreter with object scripting language features, written in Java.
9048 BeanShell dynamically executes standard Java syntax and extends it with common
9049 scripting conveniences such as loose types, commands, and method closures like
9050 those in Perl and JavaScript.")
9051 (license license:asl2.0)))
9052
9053 (define-public java-fest-util
9054 (package
9055 (name "java-fest-util")
9056 (version "1.2.5")
9057 (source (origin
9058 (method url-fetch)
9059 (uri (string-append "https://github.com/alexruiz/fest-util/"
9060 "archive/fest-util-" version ".tar.gz"))
9061 (sha256
9062 (base32
9063 "05g6hljz5mdaakk8d7g32klbhz9bdwp3qlj6rdaggdidxs3x1sb8"))))
9064 (build-system ant-build-system)
9065 (arguments
9066 `(#:jar-name "java-fest-util.jar"
9067 #:source-dir "src/main/java"))
9068 (native-inputs
9069 `(("junit" ,java-junit)
9070 ("hamcrest" ,java-hamcrest-core)))
9071 (home-page "https://github.com/alexruiz/fest-util")
9072 (synopsis "FEST common utilities")
9073 (description "Common utilities used in all FEST module.")
9074 (license license:asl2.0)))
9075
9076 (define-public java-fest-test
9077 (package
9078 (name "java-fest-test")
9079 (version "2.1.0")
9080 (source (origin
9081 (method url-fetch)
9082 (uri (string-append "https://github.com/alexruiz/fest-test/"
9083 "archive/fest-test-" version ".tar.gz"))
9084 (sha256
9085 (base32
9086 "1rxfbw6l9vc65iy1x3fb617qc6y4w2k430pgf1mfbxfdlxbm0f7g"))))
9087 (build-system ant-build-system)
9088 (arguments
9089 `(#:jar-name "java-fest-test.jar"
9090 #:source-dir "src/main/java"
9091 #:tests? #f)); no tests
9092 (inputs
9093 `(("junit" ,java-junit)))
9094 (home-page "https://github.com/alexruiz/fest-test")
9095 (synopsis "Common FEST testing infrastructure")
9096 (description "Fest-test contains the common FEST testing infrastructure.")
9097 (license license:asl2.0)))
9098
9099 (define-public java-fest-assert
9100 (package
9101 (name "java-fest-assert")
9102 (version "2.0M10")
9103 (source (origin
9104 (method url-fetch)
9105 (uri (string-append "https://github.com/alexruiz/fest-assert-2.x/"
9106 "archive/fest-assert-core-" version ".tar.gz"))
9107 (sha256
9108 (base32
9109 "1bi0iqavikzww6rxvz5jyg7y6bflv95s6ibryxx0xfcxrrw6i5lw"))))
9110 (build-system ant-build-system)
9111 (arguments
9112 `(#:jar-name "java-fest-assert.jar"
9113 #:source-dir "src/main/java"
9114 #:test-exclude
9115 (list
9116 "**/Abstract*.java"
9117 "**/*BaseTest.java"
9118 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
9119 "**/MessageFormatter_format_Test.java"
9120 "**/internal/*/*_assert*_Test.java")))
9121 (inputs
9122 `(("java-fest-util" ,java-fest-util)))
9123 (native-inputs
9124 `(("java-junit" ,java-junit)
9125 ("java-fest-test" ,java-fest-test)
9126 ("java-hamcrest-core" ,java-hamcrest-core)
9127 ("java-mockito" ,java-mockito-1)
9128 ("java-cglib" ,java-cglib)
9129 ("java-objenesis" ,java-objenesis)
9130 ("java-asm" ,java-asm)))
9131 (home-page "https://github.com/alexruiz/fest-assert-2.x")
9132 (synopsis "FEST fluent assertions")
9133 (description "FEST-Assert provides a fluent interface for assertions.")
9134 (license license:asl2.0)))
9135
9136 (define-public java-testng
9137 (package
9138 (name "java-testng")
9139 (version "6.14.3")
9140 (source (origin
9141 (method git-fetch)
9142 (uri (git-reference
9143 (url "https://github.com/cbeust/testng.git")
9144 (commit version)))
9145 (file-name (string-append name "-" version "-checkout"))
9146 (sha256
9147 (base32
9148 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
9149 (build-system ant-build-system)
9150 (arguments
9151 `(#:jdk ,icedtea-8; java.util.function
9152 #:jar-name "java-testng.jar"
9153 #:source-dir "src/main/java"
9154 #:phases
9155 (modify-phases %standard-phases
9156 ;; FIXME: I don't know why these tests fail
9157 (add-after 'unpack 'delete-failing-tests
9158 (lambda _
9159 (substitute* "src/test/resources/testng.xml"
9160 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
9161 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
9162 #t))
9163 ;; We don't have groovy
9164 (add-after 'unpack 'delete-groovy-tests
9165 (lambda _
9166 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
9167 (substitute* "src/test/resources/testng.xml"
9168 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
9169 #t))
9170 (add-before 'build 'copy-resources
9171 (lambda _
9172 (copy-recursively "src/main/resources" "build/classes")
9173 #t))
9174 (add-before 'check 'copy-test-resources
9175 (lambda _
9176 (copy-recursively "src/test/resources" "build/test-classes")
9177 #t))
9178 (replace 'check
9179 (lambda _
9180 (invoke "ant" "compile-tests")
9181 ;; we don't have groovy
9182 (substitute* "src/test/resources/testng.xml"
9183 (("<class name=\"test.groovy.GroovyTest\" />") ""))
9184 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9185 ":build/classes"
9186 ":build/test-classes")
9187 "-Dtest.resources.dir=src/test/resources"
9188 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
9189 (propagated-inputs
9190 `(("junit" ,java-junit)
9191 ("java-jsr305" ,java-jsr305)
9192 ("java-bsh" ,java-bsh)
9193 ("java-jcommander" ,java-jcommander)
9194 ("java-guice" ,java-guice)
9195 ("snakeyaml" ,java-snakeyaml)))
9196 (native-inputs
9197 `(("guava" ,java-guava)
9198 ("java-javax-inject" ,java-javax-inject)
9199 ("java-hamcrest" ,java-hamcrest-all)
9200 ("java-assertj" ,java-assertj)
9201 ("java-mockito" ,java-mockito-1)
9202 ("cglib" ,java-cglib)
9203 ("asm" ,java-asm)
9204 ("aopalliance" ,java-aopalliance)))
9205 (home-page "https://testng.org")
9206 (synopsis "Testing framework")
9207 (description "TestNG is a testing framework inspired from JUnit and NUnit
9208 but introducing some new functionalities that make it more powerful and easier
9209 to use.")
9210 (license license:asl2.0)))
9211
9212 (define-public java-jnacl
9213 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
9214 (revision "2"))
9215 (package
9216 (name "java-jnacl")
9217 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
9218 (source (origin
9219 (method git-fetch)
9220 (uri (git-reference
9221 (url "https://github.com/neilalexander/jnacl.git")
9222 (commit commit)))
9223 (file-name (git-file-name name version))
9224 (sha256
9225 (base32
9226 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
9227 (build-system ant-build-system)
9228 (arguments
9229 `(#:jar-name "jnacl.jar"
9230 #:source-dir "src/main/java"
9231 #:jdk ,icedtea-8
9232 #:phases
9233 (modify-phases %standard-phases
9234 (add-before 'build 'fix-tests
9235 (lambda _
9236 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
9237 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
9238 (("assertions.Assertions") "assertions.api.Assertions"))
9239 #t))
9240 (replace 'check
9241 (lambda _
9242 (invoke "ant" "compile-tests")
9243 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9244 ":build/classes"
9245 ":build/test-classes")
9246 "org.testng.TestNG" "-testclass"
9247 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
9248 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9249 ":build/classes"
9250 ":build/test-classes")
9251 "org.testng.TestNG" "-testclass"
9252 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
9253 (native-inputs
9254 `(("java-testng" ,java-testng)
9255 ("java-fest-util" ,java-fest-util)
9256 ("java-fest-assert" ,java-fest-assert)))
9257 (home-page "https://github.com/neilalexander/jnacl")
9258 (synopsis "Java implementation of NaCl")
9259 (description "Pure Java implementation of the NaCl: Networking and
9260 Cryptography library.")
9261 (license license:bsd-2))))
9262
9263 (define-public java-mvel2
9264 (package
9265 (name "java-mvel2")
9266 (version "2.3.1")
9267 (source (origin
9268 (method url-fetch)
9269 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
9270 version ".Final.tar.gz"))
9271 (sha256
9272 (base32
9273 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
9274 (build-system ant-build-system)
9275 (arguments
9276 `(#:jar-name "mvel2.jar"
9277 #:source-dir "src/main/java"
9278 #:test-exclude
9279 (list "**/Abstract*.java"
9280 ;; Base class with no tests
9281 "**/MVELThreadTest.java")
9282 #:phases
9283 (modify-phases %standard-phases
9284 (add-after 'install 'install-bin
9285 (lambda* (#:key outputs #:allow-other-keys)
9286 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
9287 (mkdir-p bin)
9288 (with-output-to-file (string-append bin "/mvel2")
9289 (lambda _
9290 (display
9291 (string-append
9292 "#!" (which "bash") "\n"
9293 "if [ \"$#\" -ne \"2\" ]; then\n"
9294 "echo 'Usage: mvel2 <script> <out.dir>'\n"
9295 "exit\n"
9296 "fi\n"
9297 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
9298 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
9299 " org.mvel2.sh.Main $1"))))
9300 (chmod (string-append bin "/mvel2") #o755))
9301 #t)))))
9302 (native-inputs
9303 `(("junit" ,java-junit)
9304 ("hamcrest" ,java-hamcrest-core)))
9305 (home-page "https://github.com/mvel/mvel")
9306 (synopsis "MVFLEX Expression Language")
9307 (description "MVEL has largely been inspired by Java syntax, but has some
9308 fundamental differences aimed at making it more efficient as an expression
9309 language, such as operators that directly support collection, array and string
9310 matching, as well as regular expressions. MVEL is used to evaluate expressions
9311 written using Java syntax.
9312
9313 In addition to the expression language, MVEL serves as a templating language for
9314 configuration and string construction.")
9315 (license license:asl2.0)))
9316
9317 (define-public java-commons-jexl-2
9318 (package
9319 (name "java-commons-jexl")
9320 (version "2.1.1")
9321 (source (origin
9322 (method url-fetch)
9323 (uri (string-append "mirror://apache/commons/jexl/source/"
9324 "commons-jexl-" version "-src.tar.gz"))
9325 (sha256
9326 (base32
9327 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
9328 (build-system ant-build-system)
9329 (arguments
9330 `(#:jar-name "commons-jexl-2.jar"
9331 #:jdk ,icedtea-8
9332 #:source-dir "src/main/java"
9333 #:phases
9334 (modify-phases %standard-phases
9335 (add-before 'check 'disable-broken-tests
9336 (lambda* (#:key inputs #:allow-other-keys)
9337 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
9338 (substitute* "ArithmeticTest.java"
9339 (("asserter.assertExpression\\(\"3 / 0\"") "//")
9340 (("asserter.assertExpression\\(\"imanull") "//"))
9341 ;; This test fails with "ambiguous method invocation"
9342 (delete-file "CacheTest.java")
9343 ;; This test doesn't have access to the temp directory
9344 (substitute* "ClassCreatorTest.java"
9345 (("java.io.tmpdir") "user.dir"))
9346 ;; This test fails in trying to detect whether it can run.
9347 (substitute* "ClassCreator.java"
9348 (("boolean canRun =.*") "boolean canRun = false;\n"))
9349 ;; ...and these tests depend on it.
9350 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
9351 (delete-file "scripting/JexlScriptEngineTest.java"))
9352 #t))
9353 (add-before 'build 'run-javacc
9354 (lambda _
9355 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
9356 (invoke "java" "jjtree" "Parser.jjt")
9357 (invoke "java" "javacc" "Parser.jj"))
9358 #t)))))
9359 (inputs
9360 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
9361 (native-inputs
9362 `(("java-junit" ,java-junit)
9363 ("java-hamcrest-core" ,java-hamcrest-core)
9364 ("javacc" ,javacc-4)))
9365 (home-page "https://commons.apache.org/proper/commons-jexl/")
9366 (synopsis "Java Expression Language ")
9367 (description "JEXL is a library intended to facilitate the implementation
9368 of dynamic and scripting features in applications and frameworks written in
9369 Java. JEXL implements an Expression Language based on some extensions to the
9370 JSTL Expression Language supporting most of the constructs seen in
9371 shell-script or ECMAScript. Its goal is to expose scripting features usable
9372 by technical operatives or consultants working with enterprise platforms.")
9373 (license license:asl2.0)))
9374
9375 (define-public java-lz4
9376 (package
9377 (name "java-lz4")
9378 (version "1.4.0")
9379 (source (origin
9380 (method url-fetch)
9381 (uri (string-append "https://github.com/lz4/lz4-java/archive/"
9382 version ".tar.gz"))
9383 (file-name (string-append name "-" version ".tar.gz"))
9384 (sha256
9385 (base32
9386 "096dm57p2lzqk28n0j2p52x2j3cvnsd2dfqn43n7vbwrkjsy7y54"))))
9387 (build-system ant-build-system)
9388 (arguments
9389 `(#:jar-name "lz4.jar"
9390 #:jdk ,icedtea-8
9391 #:source-dir "src/java:src/java-unsafe"
9392 #:tests? #f; FIXME: requires more dependencies
9393 #:phases
9394 (modify-phases %standard-phases
9395 (add-before 'configure 'generate-source
9396 (lambda _
9397 (with-directory-excursion "src/build/source_templates"
9398 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
9399 #t)))))
9400 (native-inputs
9401 `(("mvel" ,java-mvel2)))
9402 (home-page "https://jpountz.github.io/lz4-java")
9403 (synopsis "Compression algorithm")
9404 (description "LZ4 - Java is a Java port of the popular lz4 compression
9405 algorithms and xxHash hashing algorithm.")
9406 (license license:asl2.0)))
9407
9408 (define-public java-bouncycastle
9409 (package
9410 (name "java-bouncycastle")
9411 (version "1.60")
9412 (source (origin
9413 (method url-fetch)
9414 (uri (string-append "https://github.com/bcgit/bc-java/archive/r"
9415 (substring version 0 1) "v"
9416 (substring version 2 4) ".tar.gz"))
9417 (sha256
9418 (base32
9419 "0v434513y708qc87k4xz13p2kzydc736lk3ks67df9mg11s7hchv"))
9420 (modules '((guix build utils)))
9421 (snippet
9422 '(begin
9423 (for-each delete-file
9424 (find-files "." "\\.jar$"))
9425 #t))))
9426 (build-system ant-build-system)
9427 (arguments
9428 `(#:jdk ,icedtea-8
9429 #:tests? #f
9430 #:phases
9431 (modify-phases %standard-phases
9432 (replace 'build
9433 (lambda _
9434 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
9435 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
9436 ;; FIXME: the tests freeze.
9437 ;; (replace 'check
9438 ;; (lambda _
9439 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
9440 (replace 'install
9441 (install-jars "build/artifacts/jdk1.5/jars")))))
9442 (inputs
9443 `(("java-javax-mail" ,java-javax-mail)))
9444 (native-inputs
9445 `(("unzip" ,unzip)
9446 ("junit" ,java-junit)
9447 ("java-native-access" ,java-native-access)
9448 ("java-native-access-platform" ,java-native-access-platform)))
9449 (home-page "https://www.bouncycastle.org")
9450 (synopsis "Cryptographic library")
9451 (description "Bouncy Castle is a cryptographic library for the Java
9452 programming language.")
9453 (license license:expat)))
9454
9455 (define-public java-lmax-disruptor
9456 (package
9457 (name "java-lmax-disruptor")
9458 (version "3.3.7")
9459 (source (origin
9460 (method url-fetch)
9461 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
9462 "archive/" version ".tar.gz"))
9463 (file-name (string-append name "-" version ".tar.gz"))
9464 (sha256
9465 (base32
9466 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
9467 (build-system ant-build-system)
9468 (arguments
9469 `(#:jar-name "java-lmax-disruptor.jar"
9470 #:jdk ,icedtea-8
9471 #:tests? #f)); tests hang
9472 (inputs
9473 `(("junit" ,java-junit)
9474 ("java-hdrhistogram" ,java-hdrhistogram)
9475 ("java-jmock" ,java-jmock)
9476 ("java-jmock-legacy" ,java-jmock-legacy)
9477 ("java-jmock-junit4" ,java-jmock-junit4)
9478 ("java-hamcrest-all" ,java-hamcrest-all)))
9479 (native-inputs
9480 `(("cglib" ,java-cglib)
9481 ("objenesis" ,java-objenesis)
9482 ("asm" ,java-asm)))
9483 (home-page "https://www.lmax.com/disruptor")
9484 (synopsis "High performance inter-thread communication")
9485 (description "LMAX Disruptor is a software pattern and software component
9486 for high performance inter-thread communication that avoids the need for
9487 message queues or resource locking.")
9488 (license license:asl2.0)))
9489
9490 (define-public java-commons-bcel
9491 (package
9492 (name "java-commons-bcel")
9493 (version "6.1")
9494 (source (origin
9495 (method url-fetch)
9496 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
9497 version "-src.tar.gz"))
9498 (sha256
9499 (base32
9500 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
9501 (build-system ant-build-system)
9502 (arguments
9503 `(#:jar-name "bcel.jar"
9504 #:jdk ,icedtea-8
9505 #:source-dir "src/main/java"
9506 #:test-dir "src/test/java"
9507 ;; FIXME: Tests require the unpackaged jna.
9508 #:tests? #f))
9509 (home-page "https://commons.apache.org/proper/commons-bcel/")
9510 (synopsis "Byte code engineering library")
9511 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
9512 intended to give users a convenient way to analyze, create, and
9513 manipulate (binary) Java class files. Classes are represented by objects
9514 which contain all the symbolic information of the given class: methods, fields
9515 and byte code instructions, in particular.
9516
9517 Such objects can be read from an existing file, be transformed by a
9518 program (e.g. a class loader at run-time) and written to a file again. An
9519 even more interesting application is the creation of classes from scratch at
9520 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
9521 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
9522 of Java @code{.class} files.")
9523 (license license:asl2.0)))
9524
9525 (define-public java-xerial-core
9526 (package
9527 (name "java-xerial-core")
9528 (version "2.1")
9529 (source (origin
9530 (method url-fetch)
9531 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
9532 version ".tar.gz"))
9533 (file-name (string-append name "-" version ".tar.gz"))
9534 (sha256
9535 (base32
9536 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
9537 (build-system ant-build-system)
9538 (arguments
9539 `(#:jar-name "xerial-core.jar"
9540 #:source-dir "xerial-core/src/main/java"
9541 #:test-dir "xerial-core/src/test"
9542 #:phases
9543 (modify-phases %standard-phases
9544 (add-before 'build 'copy-resources
9545 (lambda _
9546 (copy-recursively "xerial-core/src/main/resources"
9547 "build/classes")
9548 #t)))))
9549 (native-inputs
9550 `(("junit" ,java-junit)
9551 ("hamcrest" ,java-hamcrest-core)))
9552 (home-page "https://github.com/xerial/xerial-java")
9553 (synopsis "Data management libraries for Java")
9554 (description "Xerial is a set of data management libraries for the Java
9555 programming language. The ultimate goal of the Xerial project is to manage
9556 everything as database, including class objects, text format data, data
9557 streams, etc.")
9558 (license license:asl2.0)))
9559
9560 (define-public java-powermock-reflect
9561 (package
9562 (name "java-powermock-reflect")
9563 (version "1.7.3")
9564 (source (origin
9565 (method url-fetch)
9566 (uri (string-append "https://github.com/powermock/powermock/"
9567 "archive/powermock-" version ".tar.gz"))
9568 (file-name (string-append name "-" version ".tar.gz"))
9569 (sha256
9570 (base32
9571 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
9572 (patches
9573 (search-patches "java-powermock-fix-java-files.patch"))))
9574 (build-system ant-build-system)
9575 (arguments
9576 `(#:jar-name "java-powermock-reflect.jar"
9577 #:jdk ,icedtea-8
9578 #:source-dir "powermock-reflect/src/main/java"
9579 #:test-dir "powermock-reflect/src/test"))
9580 (inputs
9581 `(("java-objenesis" ,java-objenesis)))
9582 (native-inputs
9583 `(("junit" ,java-junit)
9584 ("cglib" ,java-cglib)
9585 ("asm" ,java-asm)
9586 ("hamcrest" ,java-hamcrest-core)
9587 ("assertj" ,java-assertj)))
9588 (home-page "https://github.com/powermock/powermock")
9589 (synopsis "Mock library extension framework")
9590 (description "PowerMock is a framework that extends other mock libraries
9591 such as EasyMock with more powerful capabilities. PowerMock uses a custom
9592 classloader and bytecode manipulation to enable mocking of static methods,
9593 constructors, final classes and methods, private methods, removal of static
9594 initializers and more. By using a custom classloader no changes need to be
9595 done to the IDE or continuous integration servers which simplifies adoption.")
9596 (license license:asl2.0)))
9597
9598 (define-public java-powermock-core
9599 (package
9600 (inherit java-powermock-reflect)
9601 (name "java-powermock-core")
9602 (arguments
9603 `(#:jar-name "java-powermock-core.jar"
9604 #:source-dir "powermock-core/src/main/java"
9605 #:test-dir "powermock-core/src/test"
9606 #:tests? #f; requires powermock-api
9607 #:jdk ,icedtea-8
9608 #:phases
9609 (modify-phases %standard-phases
9610 (add-before 'build 'copy-resources
9611 (lambda _
9612 (copy-recursively "powermock-core/src/main/resources"
9613 "build/classes")
9614 #t)))))
9615 (inputs
9616 `(("reflect" ,java-powermock-reflect)
9617 ("javassist" ,java-jboss-javassist)))
9618 (native-inputs
9619 `(("junit" ,java-junit)
9620 ("assertj" ,java-assertj)
9621 ("mockito" ,java-mockito-1)))))
9622
9623 (define-public java-powermock-api-support
9624 (package
9625 (inherit java-powermock-reflect)
9626 (name "java-powermock-api-support")
9627 (build-system ant-build-system)
9628 (arguments
9629 `(#:jar-name "java-powermock-api-support.jar"
9630 #:jdk ,icedtea-8
9631 #:source-dir "powermock-api/powermock-api-support/src/main/java"
9632 #:tests? #f)); no tests
9633 (inputs
9634 `(("core" ,java-powermock-core)
9635 ("reflect" ,java-powermock-reflect)))))
9636
9637 (define-public java-powermock-modules-junit4-common
9638 (package
9639 (inherit java-powermock-reflect)
9640 (name "java-powermock-modules-junit4-common")
9641 (build-system ant-build-system)
9642 (arguments
9643 `(#:jar-name "java-powermock-modules-junit4-common.jar"
9644 #:jdk ,icedtea-8
9645 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
9646 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
9647 (inputs
9648 `(("core" ,java-powermock-core)
9649 ("easymock" ,java-easymock)
9650 ("reflect" ,java-powermock-reflect)
9651 ("hamcrest" ,java-hamcrest-core)
9652 ("cglib" ,java-cglib)))))
9653
9654 (define-public java-powermock-modules-junit4
9655 (package
9656 (inherit java-powermock-reflect)
9657 (name "java-powermock-modules-junit4")
9658 (build-system ant-build-system)
9659 (arguments
9660 `(#:jar-name "java-powermock-modules-junit4.jar"
9661 #:jdk ,icedtea-8
9662 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
9663 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
9664 #:phases
9665 (modify-phases %standard-phases
9666 (add-before 'build 'fix-junit-detection
9667 (lambda _
9668 ;; Our junit version is 4.12-SNAPSHOT
9669 (substitute* (find-files "powermock-modules/powermock-module-junit4"
9670 "PowerMockJUnit4MethodValidator.java")
9671 (("4.12") "4.12-SNAPSHOT"))
9672 #t)))))
9673 (inputs
9674 `(("core" ,java-powermock-core)
9675 ("reflect" ,java-powermock-reflect)
9676 ("common" ,java-powermock-modules-junit4-common)
9677 ("cglib" ,java-cglib)))
9678 (native-inputs
9679 `(("easymock" ,java-easymock)
9680 ("hamcrest" ,java-hamcrest-core)
9681 ("objenesis" ,java-objenesis)
9682 ("asm" ,java-asm)
9683 ("junit" ,java-junit)))))
9684
9685 (define-public java-powermock-api-easymock
9686 (package
9687 (inherit java-powermock-reflect)
9688 (name "java-powermock-api-easymock")
9689 (build-system ant-build-system)
9690 (arguments
9691 `(#:jar-name "java-powermock-api-easymock.jar"
9692 #:jdk ,icedtea-8
9693 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
9694 #:tests? #f; no tests
9695 #:phases
9696 (modify-phases %standard-phases
9697 (add-before 'build 'fix-file
9698 (lambda _
9699 ;; FIXME: This looks wrong, but it fixes a build error.
9700 (with-directory-excursion "powermock-api/powermock-api-easymock"
9701 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
9702 (("classLoader instanceof MockClassLoader") "false")
9703 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
9704 #t)))))
9705 (inputs
9706 `(("core" ,java-powermock-core)
9707 ("easymock" ,java-easymock)
9708 ("reflect" ,java-powermock-reflect)
9709 ("support" ,java-powermock-api-support)
9710 ("cglib" ,java-cglib)))))
9711
9712 (define-public java-jboss-jms-api-spec
9713 (package
9714 (name "java-jboss-jms-api-spec")
9715 (version "2.0")
9716 (source (origin
9717 (method url-fetch)
9718 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
9719 "archive/jboss-jms-api_" version
9720 "_spec-1.0.1.Final.tar.gz"))
9721 (sha256
9722 (base32
9723 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
9724 (build-system ant-build-system)
9725 (arguments
9726 `(#:jar-name "java-jboss-jms-api_spec.jar"
9727 #:jdk ,icedtea-8
9728 #:source-dir "."
9729 #:tests? #f)); no tests
9730 (home-page "https://github.com/jboss/jboss-jms-api_spec")
9731 (synopsis "Java Message Service API specification")
9732 (description "Java Message Service (JMS) API is used to send messages
9733 messages between two or more clients. It is a messaging standard that allows
9734 application components to create, send, receive, and read messages.")
9735 ; either gpl2 only with GPL Classpath Exception, or cddl.
9736 (license (list license:gpl2 license:cddl1.0))))
9737
9738 (define-public java-mail
9739 (package
9740 (name "java-mail")
9741 (version "1.6.0")
9742 (source (origin
9743 (method url-fetch)
9744 (uri (string-append "https://github.com/javaee/javamail/archive/"
9745 "JAVAMAIL-1_6_0.tar.gz"))
9746 (sha256
9747 (base32
9748 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
9749 (build-system ant-build-system)
9750 (arguments
9751 `(#:jar-name "java-mail.jar"
9752 #:jdk ,icedtea-8
9753 #:source-dir "mail/src/main/java"
9754 #:test-dir "mail/src/test"
9755 #:test-exclude
9756 (list "**/CollectorFormatterTest.java"
9757 "**/CompactFormatterTest.java"
9758 "**/DurationFilterTest.java"
9759 "**/MailHandlerTest.java"
9760 "**/GetLocalAddressTest.java"
9761 ;; FIXME: both end with:
9762 ;; java.lang.ClassNotFoundException:
9763 ;; javax.mail.internet.MimeMultipartParseTest
9764 "**/MimeMultipartParseTest.java"
9765 "**/SearchTermSerializationTest.java")
9766 #:phases
9767 (modify-phases %standard-phases
9768 (add-before 'configure 'move-version.java
9769 (lambda _
9770 (copy-file "mail/src/main/resources/javax/mail/Version.java"
9771 "mail/src/main/java/javax/mail/Version.java")
9772 #t))
9773 (add-before 'build 'copy-resources
9774 (lambda _
9775 (copy-recursively "mail/src/main/resources/META-INF"
9776 "build/classes/META-INF")
9777 #t)))))
9778 (native-inputs
9779 `(("junit" ,java-junit)
9780 ("hamcrest" ,java-hamcrest-core)))
9781 (home-page "https://javaee.github.io/javamail/")
9782 (synopsis "Mail-related functionnalities in Java")
9783 (description "The JavaMail API provides a platform-independent and
9784 protocol-independent framework to build mail and messaging applications.")
9785 ;; General Public License Version 2 only ("GPL") or the Common Development
9786 ;; and Distribution License("CDDL")
9787 (license (list license:cddl1.1
9788 license:gpl2)))); with classpath exception
9789
9790 (define-public java-jeromq
9791 (package
9792 (name "java-jeromq")
9793 (version "0.4.3")
9794 (source (origin
9795 (method git-fetch)
9796 (uri (git-reference
9797 (url "https://github.com/zeromq/jeromq.git")
9798 (commit (string-append "v" version))))
9799 (file-name (string-append name "-" version "-checkout"))
9800 (sha256
9801 (base32
9802 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
9803 (patches (search-patches "java-jeromq-fix-tests.patch"))))
9804 (build-system ant-build-system)
9805 (arguments
9806 `(#:jar-name "java-jeromq.jar"
9807 #:source-dir "src/main/java"
9808 #:jdk ,icedtea-8
9809 #:test-exclude
9810 (list
9811 "**/Abstract*.java"
9812 ;; Requires network
9813 "**/ZBeaconTest.java"
9814 ;; Failures
9815 "**/DealerSpecTest.java"
9816 "**/CustomDecoderTest.java"
9817 "**/CustomEncoderTest.java"
9818 "**/ConnectRidTest.java"
9819 "**/ReqSpecTest.java"
9820 "**/PushPullSpecTest.java"
9821 "**/PubSubHwmTest.java"
9822 "**/RouterSpecTest.java"
9823 "**/ProxyTest.java")))
9824 (inputs
9825 `(("java-jnacl" ,java-jnacl)))
9826 (native-inputs
9827 `(("java-hamcrest-core" ,java-hamcrest-core)
9828 ("junit" ,java-junit)))
9829 (home-page "http://zeromq.org/bindings:java")
9830 (synopsis "Java binding for 0MQ")
9831 (description "Jeromq provides the java bindings for 0MQ.")
9832 (license license:mpl2.0)))
9833
9834 (define-public java-kafka-clients
9835 (package
9836 (name "java-kafka-clients")
9837 (version "1.0.0")
9838 (source (origin
9839 (method url-fetch)
9840 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
9841 version "-src.tgz"))
9842 (sha256
9843 (base32
9844 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
9845 (build-system ant-build-system)
9846 (arguments
9847 `(#:jar-name "java-kafka-clients.jar"
9848 #:jdk ,icedtea-8
9849 #:source-dir "clients/src/main/java"
9850 #:test-dir "clients/src/test"
9851 #:test-exclude
9852 (list
9853 ;; This file does not contain a class
9854 "**/IntegrationTest.java"
9855 ;; Requires network
9856 "**/ClientUtilsTest.java"
9857 ;; End with errors that seem related to our powermock
9858 "**/KafkaProducerTest.java"
9859 "**/BufferPoolTest.java")))
9860 (inputs
9861 `(("java-slf4j-api" ,java-slf4j-api)
9862 ("java-lz4" ,java-lz4)))
9863 (native-inputs
9864 `(("junit" ,java-junit)
9865 ("hamcrest" ,java-hamcrest-all)
9866 ("objenesis" ,java-objenesis)
9867 ("asm" ,java-asm)
9868 ("cglib" ,java-cglib)
9869 ("javassist" ,java-jboss-javassist)
9870 ("snappy" ,java-snappy)
9871 ("easymock" ,java-easymock)
9872 ("powermock" ,java-powermock-core)
9873 ("powermock-easymock" ,java-powermock-api-easymock)
9874 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
9875 ("powermock-junit4" ,java-powermock-modules-junit4)
9876 ("powermock-support" ,java-powermock-api-support)
9877 ("java-bouncycastle" ,java-bouncycastle)))
9878 (home-page "https://kafka.apache.org")
9879 (synopsis "Distributed streaming platform")
9880 (description "Kafka is a distributed streaming platform, which means:
9881 @itemize
9882 @item it can publish and subscribe to streams of records;
9883 @item it can store streams of records in a fault-tolerant way;
9884 @item it can process streams of records as they occur.
9885 @end itemize")
9886 ;; Either cddl or gpl2 only.
9887 (license (list license:cddl1.1; actually cddl1.1
9888 license:gpl2)))); with classpath exception
9889
9890 (define-public java-jdom
9891 (package
9892 (name "java-jdom")
9893 (version "1.1.3")
9894 (source (origin
9895 (method url-fetch)
9896 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
9897 version ".tar.gz"))
9898 (sha256
9899 (base32
9900 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
9901 (build-system ant-build-system)
9902 (arguments
9903 `(#:build-target "package"
9904 #:tests? #f; tests are run as part of the build process
9905 #:phases
9906 (modify-phases %standard-phases
9907 (replace 'install
9908 (install-jars "build")))))
9909 (home-page "http://jdom.org/")
9910 (synopsis "Access, manipulate, and output XML data")
9911 (description "Java-based solution for accessing, manipulating, and
9912 outputting XML data from Java code.")
9913 (license license:bsd-4)))
9914
9915 (define-public java-geronimo-xbean-reflect
9916 (package
9917 (name "java-geronimo-xbean-reflect")
9918 (version "4.5")
9919 (source (origin
9920 (method svn-fetch)
9921 (uri (svn-reference
9922 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
9923 (revision 1807396)))
9924 (file-name (string-append name "-" version))
9925 (sha256
9926 (base32
9927 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
9928 (build-system ant-build-system)
9929 (arguments
9930 `(#:jar-name "geronimo-xbean-reflect.jar"
9931 #:source-dir "xbean-reflect/src/main/java"
9932 #:test-dir "xbean-reflect/src/test"
9933 #:jdk ,icedtea-8
9934 #:test-exclude
9935 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
9936 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
9937 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
9938 #:phases
9939 (modify-phases %standard-phases
9940 (add-before 'build 'fix-source
9941 (lambda _
9942 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
9943 ;; org.apache.xbean.asm6 is actually repackaged java-asm
9944 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
9945 (("org.apache.xbean.asm5") "org.objectweb.asm"))
9946 #t))))))
9947 (inputs
9948 `(("asm" ,java-asm)
9949 ("log4j" ,java-log4j-api)
9950 ("log4j-1.2" ,java-log4j-1.2-api)
9951 ("log4j-core" ,java-log4j-core)
9952 ("logging" ,java-commons-logging-minimal)))
9953 (native-inputs
9954 `(("junit" ,java-junit)))
9955 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
9956 (synopsis "Dependency injection helper")
9957 (description "Xbean-reflect provides very flexible ways to create objects
9958 and graphs of objects for dependency injection frameworks")
9959 (license license:asl2.0)))
9960
9961 (define-public java-geronimo-xbean-bundleutils
9962 (package
9963 (inherit java-geronimo-xbean-reflect)
9964 (name "java-geronimo-xbean-bundleutils")
9965 (arguments
9966 `(#:jar-name "geronimo-xbean-bundleutils.jar"
9967 #:source-dir "xbean-bundleutils/src/main/java"
9968 #:test-dir "xbean-bundleutils/src/test"
9969 #:phases
9970 (modify-phases %standard-phases
9971 (add-before 'build 'fix-java
9972 (lambda _
9973 ;; We use a more recent version of osgi, so this file requires
9974 ;; more interface method implementations.
9975 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
9976 (("import org.osgi.framework.ServiceRegistration;")
9977 "import org.osgi.framework.ServiceRegistration;
9978 import org.osgi.framework.ServiceFactory;
9979 import java.util.Collection;
9980 import org.osgi.framework.ServiceObjects;")
9981 (("public Bundle getBundle\\(\\)")
9982 "@Override
9983 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
9984 throw new UnsupportedOperationException();
9985 }
9986 @Override
9987 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
9988 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
9989 throw new UnsupportedOperationException();
9990 }
9991 public Bundle getBundle()"))
9992 #t)))))
9993 (inputs
9994 `(("java-slf4j" ,java-slf4j-api)
9995 ("java-asm" ,java-asm)
9996 ("java-osgi-framework" ,java-osgi-framework)
9997 ("java-eclipse-osgi" ,java-eclipse-osgi)
9998 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
9999
10000 (define-public java-geronimo-xbean-asm-util
10001 (package
10002 (inherit java-geronimo-xbean-reflect)
10003 (name "java-geronimo-xbean-asm-util")
10004 (arguments
10005 `(#:jar-name "geronimo-xbean-asm-util.jar"
10006 #:source-dir "xbean-asm-util/src/main/java"
10007 #:tests? #f)); no tests
10008 (inputs
10009 `(("java-asm" ,java-asm)))
10010 (native-inputs '())))
10011
10012 (define-public java-geronimo-xbean-finder
10013 (package
10014 (inherit java-geronimo-xbean-reflect)
10015 (name "java-geronimo-xbean-finder")
10016 (arguments
10017 `(#:jar-name "geronimo-xbean-finder.jar"
10018 #:source-dir "xbean-finder/src/main/java"
10019 #:test-dir "xbean-finder/src/test"))
10020 (inputs
10021 `(("java-slf4j-api" ,java-slf4j-api)
10022 ("java-asm" ,java-asm)
10023 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
10024 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
10025 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
10026 ("java-osgi-framework" ,java-osgi-framework)))
10027 (native-inputs
10028 `(("java-junit" ,java-junit)
10029 ("java-hamcrest-core" ,java-hamcrest-core)))))
10030
10031 (define-public java-gson
10032 (package
10033 (name "java-gson")
10034 (version "2.8.2")
10035 (source (origin
10036 (method url-fetch)
10037 (uri (string-append "https://github.com/google/gson/archive/"
10038 "gson-parent-" version ".tar.gz"))
10039 (sha256
10040 (base32
10041 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
10042 (build-system ant-build-system)
10043 (arguments
10044 `(#:jar-name "gson.jar"
10045 #:source-dir "gson/src/main/java"
10046 #:test-dir "gson/src/test"))
10047 (native-inputs
10048 `(("java-junit" ,java-junit)
10049 ("java-hamcrest-core" ,java-hamcrest-core)))
10050 (home-page "https://github.com/google/gson")
10051 (synopsis "Java serialization/deserialization library from/to JSON")
10052 (description "Gson is a Java library that can be used to convert Java
10053 Objects into their JSON representation. It can also be used to convert a JSON
10054 string to an equivalent Java object. Gson can work with arbitrary Java objects
10055 including pre-existing objects that you do not have source-code of.")
10056 (license license:asl2.0)))
10057
10058 (define-public java-hawtjni
10059 (package
10060 (name "java-hawtjni")
10061 (version "1.15")
10062 (source (origin
10063 (method url-fetch)
10064 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
10065 "hawtjni-project-" version ".tar.gz"))
10066 (sha256
10067 (base32
10068 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
10069 (build-system ant-build-system)
10070 (arguments
10071 `(#:jar-name "hawtjni.jar"
10072 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
10073 #:tests? #f; no tests
10074 #:phases
10075 (modify-phases %standard-phases
10076 (add-before 'build 'build-native
10077 (lambda* (#:key inputs #:allow-other-keys)
10078 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
10079 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10080 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
10081 "-fPIC" "-O2" include)
10082 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
10083 "-fPIC" "-O2" include)
10084 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
10085 "hawtjni.o" "hawtjni-callback.o")))
10086 #t))
10087 (add-after 'install 'install-native
10088 (lambda* (#:key outputs #:allow-other-keys)
10089 (let* ((out (assoc-ref outputs "out"))
10090 (lib (string-append out "/lib"))
10091 (inc (string-append out "/include")))
10092 (with-directory-excursion "hawtjni-generator/src/main/resources/"
10093 (install-file "libhawtjni.so" lib)
10094 (install-file "hawtjni.h" inc)))
10095 #t)))))
10096 (inputs
10097 `(("java-commons-cli" ,java-commons-cli)
10098 ("java-asm" ,java-asm)
10099 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
10100 (home-page "https://fusesource.github.io/hawtjni/")
10101 (synopsis "JNI code generator")
10102 (description "HawtJNI is a code generator that produces the JNI code needed
10103 to implement Java native methods. It is based on the jnigen code generator
10104 that is part of the SWT Tools project.")
10105 (license license:asl2.0)))
10106
10107 (define-public java-jansi-native
10108 (package
10109 (name "java-jansi-native")
10110 (version "1.7")
10111 (source (origin
10112 (method url-fetch)
10113 (uri (string-append "https://github.com/fusesource/jansi-native/"
10114 "archive/jansi-native-" version ".tar.gz"))
10115 (sha256
10116 (base32
10117 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
10118 (build-system ant-build-system)
10119 (arguments
10120 `(#:jar-name "jansi-native.jar"
10121 #:source-dir "src/main/java"
10122 #:tests? #f; no tests
10123 #:phases
10124 (modify-phases %standard-phases
10125 (add-before 'build 'build-native
10126 (lambda* (#:key inputs #:allow-other-keys)
10127 ;; there are more required files for windows in windows/
10128 (with-directory-excursion "src/main/native-package/src"
10129 (substitute* "jansi_ttyname.c"
10130 (("#include \"jansi_.*") ""))
10131 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
10132 (string-append "-I" (assoc-ref inputs "java-hawtjni")
10133 "/include")
10134 (string-append "-I" (assoc-ref inputs "jdk")
10135 "/include/linux")
10136 "-fPIC" "-O2")
10137 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
10138 (add-before 'build 'install-native
10139 (lambda _
10140 (let ((dir (string-append "build/classes/META-INF/native/"
10141 ,(match (%current-system)
10142 ((or "i686-linux" "armhf-linux")
10143 "linux32")
10144 ((or "x86_64-linux" "aarch64-linux"
10145 "mips64el-linux")
10146 "linux64")))))
10147 (install-file "src/main/native-package/src/libjansi.so" dir))
10148 #t))
10149 (add-after 'install 'install-native
10150 (lambda* (#:key outputs #:allow-other-keys)
10151 (install-file "src/main/native-package/src/jansi.h"
10152 (string-append (assoc-ref outputs "out") "/include"))
10153 #t)))))
10154 (inputs
10155 `(("java-hawtjni" ,java-hawtjni)))
10156 (home-page "https://fusesource.github.io/jansi/")
10157 (synopsis "Native library for jansi")
10158 (description "This package provides the native library for jansi, a small
10159 Java library that allows you to use ANSI escape sequences to format your
10160 console output.")
10161 (license license:asl2.0)))
10162
10163 (define-public java-jansi
10164 (package
10165 (name "java-jansi")
10166 (version "1.16")
10167 (source (origin
10168 (method url-fetch)
10169 (uri (string-append "https://github.com/fusesource/jansi/archive/"
10170 "jansi-project-" version ".tar.gz"))
10171 (sha256
10172 (base32
10173 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
10174 (build-system ant-build-system)
10175 (arguments
10176 `(#:jar-name "jansi.jar"
10177 #:source-dir "jansi/src/main/java"
10178 #:test-dir "jansi/src/test"
10179 #:phases
10180 (modify-phases %standard-phases
10181 (add-after 'check 'clear-term
10182 (lambda _
10183 (invoke "echo" "-e" "\\e[0m"))))))
10184 (inputs
10185 `(("java-jansi-native" ,java-jansi-native)))
10186 (native-inputs
10187 `(("java-junit" ,java-junit)
10188 ("java-hamcrest-core" ,java-hamcrest-core)))
10189 (home-page "https://fusesource.github.io/jansi/")
10190 (synopsis "Portable ANSI escape sequences")
10191 (description "Jansi is a Java library that allows you to use ANSI escape
10192 sequences to format your console output which works on every platform.")
10193 (license license:asl2.0)))
10194
10195 (define-public java-jboss-el-api-spec
10196 (package
10197 (name "java-jboss-el-api-spec")
10198 (version "3.0")
10199 (source (origin
10200 (method url-fetch)
10201 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
10202 "archive/jboss-el-api_" version
10203 "_spec-1.0.7.Final.tar.gz"))
10204 (sha256
10205 (base32
10206 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
10207 (build-system ant-build-system)
10208 (arguments
10209 `(#:jar-name "java-jboss-el-api_spec.jar"
10210 #:jdk ,icedtea-8))
10211 (inputs
10212 `(("java-junit" ,java-junit)))
10213 (home-page "https://github.com/jboss/jboss-el-api_spec")
10214 (synopsis "JSR-341 expression language 3.0 API")
10215 (description "This package contains an implementation of the JSR-341
10216 specification for the expression language 3.0. It implements an expression
10217 language inspired by ECMAScript and XPath. This language is used with
10218 JavaServer Pages (JSP).")
10219 ;; Either GPL2 only or CDDL.
10220 (license (list license:gpl2 license:cddl1.1))))
10221
10222 (define-public java-jboss-interceptors-api-spec
10223 (package
10224 (name "java-jboss-interceptors-api-spec")
10225 (version "1.2")
10226 (source (origin
10227 (method url-fetch)
10228 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
10229 "archive/jboss-interceptors-api_" version
10230 "_spec-1.0.0.Final.tar.gz"))
10231 (sha256
10232 (base32
10233 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
10234 (build-system ant-build-system)
10235 (arguments
10236 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
10237 #:jdk ,icedtea-8
10238 #:source-dir "."
10239 #:tests? #f)); no tests
10240 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
10241 (synopsis "Interceptors 1.2 API classes from JSR 318")
10242 (description "Java-jboss-interceptors-api-spec implements the Interceptors
10243 API. Interceptors are used to interpose on business method invocations and
10244 specific events.")
10245 ;; Either GPL2 only or CDDL.
10246 (license (list license:gpl2 license:cddl1.1))))
10247
10248 (define-public java-cdi-api
10249 (package
10250 (name "java-cdi-api")
10251 (version "2.0")
10252 (source (origin
10253 (method url-fetch)
10254 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
10255 version ".tar.gz"))
10256 (file-name (string-append name "-" version ".tar.gz"))
10257 (sha256
10258 (base32
10259 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
10260 (build-system ant-build-system)
10261 (arguments
10262 `(#:source-dir "api/src/main/java"
10263 #:jar-name "java-cdi-api.jar"
10264 #:test-dir "api/src/test"
10265 #:jdk ,icedtea-8
10266 #:tests? #f)); Tests fail because we don't have a CDI provider yet
10267 (inputs
10268 `(("java-javax-inject" ,java-javax-inject)
10269 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
10270 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
10271 (native-inputs
10272 `(("java-testng" ,java-testng)
10273 ("java-hamcrest-core" ,java-hamcrest-core)))
10274 (home-page "http://cdi-spec.org/")
10275 (synopsis "Contexts and Dependency Injection APIs")
10276 (description "Java-cdi-api contains the required APIs for Contexts and
10277 Dependency Injection (CDI).")
10278 (license license:asl2.0)))
10279
10280 (define-public java-joda-convert
10281 (package
10282 (name "java-joda-convert")
10283 (version "1.9.2")
10284 (source (origin
10285 (method url-fetch)
10286 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
10287 version ".tar.gz"))
10288 (file-name (string-append name "-" version ".tar.gz"))
10289 (sha256
10290 (base32
10291 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
10292 (build-system ant-build-system)
10293 (arguments
10294 `(#:jar-name (string-append ,name "-" ,version ".jar")
10295 #:source-dir "src/main/java"
10296 #:test-include (list "**/Test*.java")
10297 ;; Contains only interfaces and base classes (no test)
10298 #:test-exclude (list "**/test*/**.java")))
10299 (inputs
10300 `(("java-guava" ,java-guava)))
10301 (native-inputs
10302 `(("java-junit" ,java-junit)
10303 ("java-hamcrest-core" ,java-hamcrest-core)))
10304 (home-page "https://www.joda.org/joda-convert/")
10305 (synopsis "Conversion between Objects and Strings")
10306 (description "Joda-Convert provides a small set of classes to aid
10307 conversion between Objects and Strings. It is not intended to tackle the
10308 wider problem of Object to Object transformation.")
10309 (license license:asl2.0)))
10310
10311 (define-public java-joda-time
10312 (package
10313 (name "java-joda-time")
10314 (version "2.9.9")
10315 (source (origin
10316 (method url-fetch)
10317 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
10318 version ".tar.gz"))
10319 (file-name (string-append name "-" version ".tar.gz"))
10320 (sha256
10321 (base32
10322 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
10323 (build-system ant-build-system)
10324 (arguments
10325 `(#:jar-name "java-joda-time.jar"
10326 #:source-dir "src/main/java"
10327 #:test-include (list "**/Test*.java")
10328 ;; There is no runnable test in these files
10329 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
10330 #:phases
10331 (modify-phases %standard-phases
10332 (add-after 'build 'build-resources
10333 (lambda _
10334 (mkdir-p "build/classes/org/joda/time/tz/data")
10335 (mkdir-p "build/classes/org/joda/time/format")
10336 ;; This will produce the following exception:
10337 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
10338 ;; which is normal, because it doesn't exist yet. It still generates
10339 ;; the same file as in the binary one can find on maven.
10340 (invoke "java" "-cp"
10341 (string-append "build/classes:" (getenv "CLASSPATH"))
10342 "org.joda.time.tz.ZoneInfoCompiler"
10343 "-src" "src/main/java/org/joda/time/tz/src"
10344 "-dst" "build/classes/org/joda/time/tz/data"
10345 "africa" "antarctica" "asia" "australasia"
10346 "europe" "northamerica" "southamerica"
10347 "pacificnew" "etcetera" "backward" "systemv")
10348 (for-each (lambda (f)
10349 (copy-file f (string-append
10350 "build/classes/org/joda/time/format/"
10351 (basename f))))
10352 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
10353 #t))
10354 (add-before 'install 'regenerate-jar
10355 (lambda _
10356 ;; We need to regenerate the jar file to add generated data.
10357 (delete-file "build/jar/java-joda-time.jar")
10358 (invoke "ant" "jar")))
10359 (add-before 'check 'copy-test-resources
10360 (lambda _
10361 (mkdir-p "build/test-classes/org/joda/time/tz/data")
10362 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
10363 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
10364 (copy-recursively "src/test/resources" "build/test-classes")
10365 #t)))))
10366 (inputs
10367 `(("java-joda-convert" ,java-joda-convert)))
10368 (native-inputs
10369 `(("java-junit" ,java-junit)
10370 ("java-hamcrest-core" ,java-hamcrest-core)
10371 ("tzdata" ,tzdata)))
10372 (home-page "https://www.joda.org/joda-time/")
10373 (synopsis "Replacement for the Java date and time classes")
10374 (description "Joda-Time is a replacement for the Java date and time
10375 classes prior to Java SE 8.")
10376 (license license:asl2.0)))
10377
10378 (define-public java-xerces
10379 (package
10380 (name "java-xerces")
10381 (version "2.11.0")
10382 (source
10383 (origin
10384 (method url-fetch)
10385 (uri (string-append "mirror://apache/xerces/j/source/"
10386 "Xerces-J-src." version ".tar.gz"))
10387 (sha256
10388 (base32 "1006igwy2lqrmjvdk64v8dg6qbk9c29pm8xxx7r87n0vnpvmx6pm"))
10389 (patches (search-patches
10390 "java-xerces-xjavac_taskdef.patch"
10391 "java-xerces-build_dont_unzip.patch"
10392 "java-xerces-bootclasspath.patch"))))
10393 (build-system ant-build-system)
10394 (arguments
10395 `(#:tests? #f;; Test files are not present
10396 #:test-target "test"
10397 #:jdk ,icedtea-8
10398 #:phases
10399 (modify-phases %standard-phases
10400 (add-after 'unpack 'create-build.properties
10401 (lambda* (#:key inputs #:allow-other-keys)
10402 (let ((jaxp (assoc-ref inputs "java-jaxp"))
10403 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
10404 (with-output-to-file "build.properties"
10405 (lambda _
10406 (format #t
10407 "jar.jaxp = ~a/share/java/jaxp.jar~@
10408 jar.apis-ext = ~a/share/java/jaxp.jar~@
10409 jar.resolver = ~a/share/java/xml-resolver.jar~%"
10410 jaxp jaxp resolver)))
10411 ;; Make xerces use our version of jaxp in tests
10412 (substitute* "build.xml"
10413 (("xml-apis.jar")
10414 (string-append jaxp "/share/java/jaxp.jar"))
10415 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
10416 "${jar.apis}")))
10417 #t))
10418 (replace 'install (install-jars "build")))))
10419 (inputs
10420 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
10421 ("java-jaxp" ,java-jaxp)))
10422 (home-page "https://xerces.apache.org/xerces2-j/")
10423 (synopsis "Validating XML parser for Java with DOM level 3 support")
10424 (description "The Xerces2 Java parser is the reference implementation of
10425 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
10426 processor.
10427
10428 Xerces2-J supports the following standards and APIs:
10429
10430 @itemize
10431 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
10432 @item Namespaces in XML Recommendation
10433 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
10434 Range Recommendations
10435 @item Simple API for XML (SAX) 2.0.1 Core and Extension
10436 @item Java APIs for XML Processing (JAXP) 1.2.01
10437 @item XML Schema 1.0 Structures and Datatypes Recommendations
10438 @item Experimental implementation of the Document Object Model (DOM) Level 3
10439 Core and Load/Save Working Drafts
10440 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
10441 Candidate Recommendation
10442 @end itemize
10443
10444 Xerces is now able to parse documents written according to the XML 1.1
10445 Candidate Recommendation, except that it does not yet provide an option to
10446 enable normalization checking as described in section 2.13 of this
10447 specification. It also handles namespaces according to the XML Namespaces 1.1
10448 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
10449 the DOM level 3 load/save API's are in use.")
10450 (license license:asl2.0)))
10451
10452 (define-public java-jakarta-regexp
10453 (package
10454 (name "java-jakarta-regexp")
10455 (version "1.5")
10456 (source
10457 (origin
10458 (method url-fetch)
10459 (uri (string-append
10460 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
10461 version ".tar.gz"))
10462 (sha256
10463 (base32
10464 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
10465 (build-system ant-build-system)
10466 (arguments
10467 `(#:test-target "test"
10468 #:phases
10469 (modify-phases %standard-phases
10470 (replace 'install
10471 (lambda* (#:key outputs #:allow-other-keys)
10472 (let* ((out (assoc-ref outputs "out"))
10473 (out-share (string-append out "/share/java")))
10474 (mkdir-p out-share)
10475 (for-each (lambda (name)
10476 (install-file name out-share))
10477 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
10478 #t))))))
10479 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
10480 (synopsis "Regular expression parser generator for Java.")
10481 (description "@code{jakarta-regexp} is an old regular expression parser
10482 generator for Java.")
10483 (license license:asl2.0)))
10484
10485 (define-public java-jline
10486 (package
10487 (name "java-jline")
10488 (version "1.0")
10489 (source (origin
10490 (method url-fetch)
10491 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
10492 version ".tar.gz"))
10493 (sha256
10494 (base32
10495 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
10496 (build-system ant-build-system)
10497 (arguments
10498 `(#:jar-name "jline.jar"
10499 #:source-dir "src/main/java"
10500 #:test-dir "src/test"
10501 #:phases
10502 (modify-phases %standard-phases
10503 (add-before 'build 'copy-resources
10504 (lambda _
10505 (copy-recursively "src/main/resources" "build/classes")
10506 #t)))))
10507 (native-inputs
10508 `(("java-junit" ,java-junit)))
10509 (home-page "https://jline.github.io")
10510 (synopsis "Console input handling library")
10511 (description "JLine is a Java library for handling console input. It is
10512 similar in functionality to BSD editline and GNU readline but with additional
10513 features that bring it on par with the Z shell line editor.")
10514 (license license:bsd-3)))
10515
10516 (define-public java-jline-2
10517 (package
10518 (inherit java-jline)
10519 (version "2.14.5")
10520 (source (origin
10521 (method url-fetch)
10522 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
10523 version ".tar.gz"))
10524 (sha256
10525 (base32
10526 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
10527 (arguments
10528 `(#:jdk ,icedtea-8
10529 ,@(package-arguments java-jline)))
10530 (inputs
10531 `(("java-jansi" ,java-jansi)
10532 ("java-jansi-native" ,java-jansi-native)))
10533 (native-inputs
10534 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
10535 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
10536 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
10537 ("java-powermock-api-support" ,java-powermock-api-support)
10538 ("java-powermock-core" ,java-powermock-core)
10539 ("java-powermock-reflect" ,java-powermock-reflect)
10540 ("java-easymock" ,java-easymock)
10541 ("java-jboss-javassist" ,java-jboss-javassist)
10542 ("java-objenesis" ,java-objenesis)
10543 ("java-asm" ,java-asm)
10544 ("java-hamcrest-core" ,java-hamcrest-core)
10545 ("java-cglib" ,java-cglib)
10546 ("java-junit" ,java-junit)
10547 ("java-hawtjni" ,java-hawtjni)))))
10548
10549 (define-public java-xmlunit
10550 (package
10551 (name "java-xmlunit")
10552 (version "2.5.1")
10553 (source (origin
10554 (method url-fetch)
10555 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
10556 version ".tar.gz"))
10557 (file-name (string-append name "-" version ".tar.gz"))
10558 (sha256
10559 (base32
10560 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
10561 (build-system ant-build-system)
10562 (arguments
10563 `(#:jar-name "java-xmlunit.jar"
10564 #:source-dir "xmlunit-core/src/main/java"
10565 #:test-dir "xmlunit-core/src/test"
10566 #:phases
10567 (modify-phases %standard-phases
10568 (add-before 'check 'copy-test-resources
10569 (lambda* (#:key inputs #:allow-other-keys)
10570 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
10571 #t)))))
10572 (native-inputs
10573 `(("java-junit" ,java-junit)
10574 ("java-mockito-1" ,java-mockito-1)
10575 ("java-hamcrest-all" ,java-hamcrest-all)
10576 ("java-objenesis" ,java-objenesis)
10577 ("java-asm" ,java-asm)
10578 ("java-cglib" ,java-cglib)
10579 ("resources"
10580 ,(origin
10581 (method git-fetch)
10582 (uri (git-reference
10583 (url "https://github.com/xmlunit/test-resources.git")
10584 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
10585 (file-name "java-xmlunit-test-resources")
10586 (sha256
10587 (base32
10588 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
10589 (home-page "http://www.xmlunit.org/")
10590 (synopsis "XML output testing")
10591 (description "XMLUnit provides you with the tools to verify the XML you
10592 emit is the one you want to create. It provides helpers to validate against
10593 an XML Schema, assert the values of XPath queries or compare XML documents
10594 against expected outcomes.")
10595 (license license:asl2.0)))
10596
10597 (define-public java-xmlunit-legacy
10598 (package
10599 (inherit java-xmlunit)
10600 (name "java-xmlunit-legacy")
10601 (arguments
10602 `(#:jar-name "java-xmlunit-legacy.jar"
10603 #:source-dir "xmlunit-legacy/src/main/java"
10604 #:test-dir "xmlunit-legacy/src/test"))
10605 (inputs
10606 `(("java-xmlunit" ,java-xmlunit)
10607 ("java-junit" ,java-junit)))
10608 (native-inputs
10609 `(("java-mockito-1" ,java-mockito-1)))))
10610
10611 (define-public java-xmlunit-matchers
10612 (package
10613 (inherit java-xmlunit)
10614 (name "java-xmlunit-matchers")
10615 (arguments
10616 `(#:jar-name "java-xmlunit-matchers.jar"
10617 #:source-dir "xmlunit-matchers/src/main/java"
10618 #:test-dir "xmlunit-matchers/src/test"
10619 #:test-exclude
10620 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
10621 (list "**/ValidationMatcherTest.java")
10622 #:phases
10623 (modify-phases %standard-phases
10624 (add-before 'build 'copy-test-class
10625 (lambda _
10626 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
10627 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
10628 #t))
10629 (add-before 'build 'fix-test-resources-path
10630 (lambda _
10631 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
10632 (("../test-resources") "test-resources"))
10633 #t))
10634 (add-before 'check 'copy-test-resources
10635 (lambda* (#:key inputs #:allow-other-keys)
10636 (copy-recursively (assoc-ref inputs "resources") "test-resources")
10637 #t)))))
10638 (inputs
10639 `(("java-xmlunit" ,java-xmlunit)
10640 ("java-junit" ,java-junit)))))
10641
10642 (define-public java-openchart2
10643 (package
10644 (name "java-openchart2")
10645 (version "1.4.3")
10646 (source (origin
10647 (method url-fetch)
10648 (uri (string-append "http://download.approximatrix.com/openchart2/"
10649 "openchart2-" version ".source.zip"))
10650 (sha256
10651 (base32
10652 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
10653 (build-system ant-build-system)
10654 (arguments
10655 `(#:test-target "test"
10656 #:phases
10657 (modify-phases %standard-phases
10658 (add-after 'unpack 'fix-junit-errors
10659 (lambda _
10660 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
10661 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
10662 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
10663 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
10664 "model/DefaultChartDataModelConstraintsTest.java"
10665 "model/MultiScatterDataModelConstraintsTest.java"
10666 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
10667 (("(assertEquals[^;]+);" before _)
10668 (string-append (string-drop-right before 2) ", 1E-6);"))))
10669 #t))
10670 (replace 'install (install-jars ".")))))
10671 (native-inputs
10672 `(("unzip" ,unzip)
10673 ("java-junit" ,java-junit)
10674 ("java-hamcrest-core" ,java-hamcrest-core)))
10675 (home-page "https://approximatrix.com/products/openchart2/")
10676 (synopsis "Simple plotting for Java")
10677 (description "Openchart2 provides a simple, yet powerful, interface for
10678 Java programmers to create two-dimensional charts and plots. The library
10679 features an assortment of graph styles, including advanced scatter plots, bar
10680 graphs, and pie charts.")
10681 (license license:lgpl2.1+)))
10682
10683 (define-public java-commons-httpclient
10684 (package
10685 (name "java-commons-httpclient")
10686 (version "3.1")
10687 (source (origin
10688 (method url-fetch)
10689 (uri (string-append "https://archive.apache.org/dist/httpcomponents/"
10690 "commons-httpclient/source/commons-httpclient-"
10691 version "-src.tar.gz"))
10692 (sha256
10693 (base32
10694 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
10695 (build-system ant-build-system)
10696 (arguments
10697 `(#:build-target "compile"
10698 #:test-target "test"
10699 #:tests? #f; requires junit-textui (junit 3)
10700 #:phases
10701 (modify-phases %standard-phases
10702 (add-before 'build 'fix-accent
10703 (lambda _
10704 (for-each (lambda (file)
10705 (with-fluids ((%default-port-encoding "ISO-8859-1"))
10706 (substitute* file
10707 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
10708 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
10709 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
10710 "src/test/org/apache/commons/httpclient/TestHttps.java"
10711 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
10712 #t))
10713 (replace 'install
10714 (lambda* (#:key outputs #:allow-other-keys)
10715 (invoke "ant" "dist"
10716 (string-append "-Ddist.home=" (assoc-ref outputs "out")
10717 "/share/java"))
10718 #t)))))
10719 (propagated-inputs
10720 `(("java-commons-logging" ,java-commons-logging-minimal)
10721 ("java-commons-codec" ,java-commons-codec)))
10722 (home-page "https://hc.apache.org")
10723 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
10724 (description "This package contains an HTTP/1.1 compliant HTTP agent
10725 implementation. It also provides reusable components for client-side
10726 authentication, HTTP state management, and HTTP connection management.")
10727 (license license:asl2.0)))
10728
10729 (define-public java-commons-vfs
10730 (package
10731 (name "java-commons-vfs")
10732 (version "2.2")
10733 (source (origin
10734 (method url-fetch)
10735 (uri (string-append "mirror://apache/commons/vfs/source/"
10736 "commons-vfs2-distribution-" version "-src.tar.gz"))
10737 (file-name (string-append name "-" version ".tar.gz"))
10738 (sha256
10739 (base32
10740 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
10741 (modules '((guix build utils)))
10742 (snippet
10743 '(begin
10744 (for-each delete-file
10745 (find-files "." "\\.jar$"))
10746 #t))))
10747 (build-system ant-build-system)
10748 (arguments
10749 `(#:jar-name "commons-vfs.jar"
10750 #:source-dir "commons-vfs2/src/main/java"
10751 #:test-dir "commons-vfs2/src/test"
10752 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
10753 #:tests? #f
10754 #:phases
10755 (modify-phases %standard-phases
10756 (add-before 'build 'remove-hadoop-and-webdav
10757 ; Remove these files as they are not required and depend on difficult
10758 ; packages.
10759 (lambda _
10760 (for-each delete-file-recursively
10761 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
10762 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
10763 #t)))))
10764 (inputs
10765 `(("java-commons-collections4" ,java-commons-collections4)
10766 ("java-commons-compress" ,java-commons-compress)
10767 ("java-commons-httpclient" ,java-commons-httpclient)
10768 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
10769 ("java-commons-net" ,java-commons-net)
10770 ("java-jsch" ,java-jsch)))
10771 (home-page "https://commons.apache.org/proper/commons-vfs/")
10772 (synopsis "Java file system library")
10773 (description "Commons VFS provides a single API for accessing various
10774 different file systems. It presents a uniform view of the files from various
10775 different sources, such as the files on local disk, on an HTTP server, or
10776 inside a Zip archive.")
10777 (license license:asl2.0)))
10778
10779 (define-public java-jakarta-oro
10780 (package
10781 (name "java-jakarta-oro")
10782 (version "2.0.8")
10783 (source (origin
10784 (method url-fetch)
10785 (uri (string-append "https://archive.apache.org/dist/jakarta/oro/"
10786 "jakarta-oro-" version ".tar.gz"))
10787 (sha256
10788 (base32
10789 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
10790 (modules '((guix build utils)))
10791 (snippet
10792 `(begin
10793 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
10794 #t))))
10795 (build-system ant-build-system)
10796 (arguments
10797 `(#:build-target "package"
10798 #:tests? #f; tests are run as part of the build process
10799 #:phases
10800 (modify-phases %standard-phases
10801 (replace 'install
10802 (install-jars ,(string-append "jakarta-oro-" version))))))
10803 (home-page "https://jakarta.apache.org/oro/")
10804 (synopsis "Text-processing for Java")
10805 (description "The Jakarta-ORO Java classes are a set of text-processing
10806 Java classes that provide Perl5 compatible regular expressions, AWK-like
10807 regular expressions, glob expressions, and utility classes for performing
10808 substitutions, splits, filtering filenames, etc. This library is the successor
10809 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
10810 from ORO, Inc.")
10811 (license license:asl1.1)))
10812
10813 (define-public java-native-access
10814 (package
10815 (name "java-native-access")
10816 (version "4.5.1")
10817 (source (origin
10818 (method url-fetch)
10819 (uri (string-append "https://github.com/java-native-access/jna/"
10820 "archive/" version ".tar.gz"))
10821 (file-name (string-append name "-" version ".tar.gz"))
10822 (sha256
10823 (base32
10824 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
10825 (modules '((guix build utils)))
10826 (snippet
10827 `(begin
10828 (for-each delete-file (find-files "." ".*.jar"))
10829 (delete-file-recursively "native/libffi")
10830 (delete-file-recursively "dist")
10831 #t))))
10832 (build-system ant-build-system)
10833 (arguments
10834 `(#:tests? #f; FIXME: tests require reflections.jar
10835 #:test-target "test"
10836 #:make-flags (list "-Ddynlink.native=true")
10837 #:phases
10838 (modify-phases %standard-phases
10839 (add-before 'build 'fix-build.xml
10840 (lambda* (#:key inputs #:allow-other-keys)
10841 (substitute* "build.xml"
10842 ;; Since we removed the bundled ant.jar, give the correct path
10843 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
10844 ;; We removed generated native libraries. We can only rebuild one
10845 ;; so don't fail if we can't find a native library for another architecture.
10846 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
10847 ;; Copy test dependencies
10848 (copy-file (string-append (assoc-ref inputs "java-junit")
10849 "/share/java/junit.jar")
10850 "lib/junit.jar")
10851 (copy-file (string-append (assoc-ref inputs "java-hamcrest-core")
10852 "/share/java/hamcrest-core.jar")
10853 "lib/hamcrest-core.jar")
10854 ;; FIXME: once reflections.jar is built, copy it to lib/test.
10855 #t))
10856 (add-before 'build 'build-native
10857 (lambda _
10858 (invoke "ant" "-Ddynlink.native=true" "native")
10859 #t))
10860 (replace 'install
10861 (install-jars "build")))))
10862 (inputs
10863 `(("libffi" ,libffi)
10864 ("libx11" ,libx11)
10865 ("libxt" ,libxt)))
10866 (native-inputs
10867 `(("java-junit" ,java-junit)
10868 ("java-hamcrest-core" ,java-hamcrest-core)))
10869 (home-page "https://github.com/java-native-access/jna")
10870 (synopsis "Access to native shared libraries from Java")
10871 (description "JNA provides Java programs easy access to native shared
10872 libraries without writing anything but Java code - no JNI or native code is
10873 required. JNA allows you to call directly into native functions using natural
10874 Java method invocation.")
10875 ;; Java Native Access project (JNA) is dual-licensed under 2
10876 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
10877 (license (list
10878 license:asl2.0
10879 license:lgpl2.1+))))
10880
10881 (define-public java-native-access-platform
10882 (package
10883 (inherit java-native-access)
10884 (name "java-native-access-platform")
10885 (arguments
10886 `(#:test-target "test"
10887 #:tests? #f; require jna-test.jar
10888 #:phases
10889 (modify-phases %standard-phases
10890 (add-before 'build 'chdir
10891 (lambda _
10892 (chdir "contrib/platform")
10893 #t))
10894 (add-after 'chdir 'fix-ant
10895 (lambda* (#:key inputs #:allow-other-keys)
10896 (substitute* "nbproject/project.properties"
10897 (("../../build/jna.jar")
10898 (string-append (assoc-ref inputs "java-native-access")
10899 "/share/java/jna.jar"))
10900 (("../../lib/hamcrest-core-.*.jar")
10901 (string-append (assoc-ref inputs "java-hamcrest-core")
10902 "/share/java/hamcrest-core.jar"))
10903 (("../../lib/junit.jar")
10904 (string-append (assoc-ref inputs "java-junit")
10905 "/share/java/junit.jar")))
10906 #t))
10907 (replace 'install
10908 (install-jars "dist")))))
10909 (inputs
10910 `(("java-native-access" ,java-native-access)))
10911 (synopsis "Cross-platform mappings for jna")
10912 (description "java-native-access-platfrom has cross-platform mappings
10913 and mappings for a number of commonly used platform functions, including a
10914 large number of Win32 mappings as well as a set of utility classes that
10915 simplify native access.")))
10916
10917 (define-public java-jsch-agentproxy-core
10918 (package
10919 (name "java-jsch-agentproxy-core")
10920 (version "0.0.8")
10921 (source (origin
10922 (method url-fetch)
10923 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
10924 version ".tar.gz"))
10925 (file-name (string-append name "-" version ".tar.gz"))
10926 (sha256
10927 (base32
10928 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
10929 (build-system ant-build-system)
10930 (arguments
10931 `(#:jar-name "jsch-agentproxy-core.jar"
10932 #:source-dir "jsch-agent-proxy-core/src/main/java"
10933 #:tests? #f)); no tests
10934 (home-page "https://github.com/ymnk/jsch-agent-proxy")
10935 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
10936 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10937 and Pageant included Putty. It will be easily integrated into JSch, and users
10938 will be allowed to use these programs for authentication.")
10939 (license license:bsd-3)))
10940
10941 (define-public java-jsch-agentproxy-sshagent
10942 (package
10943 (inherit java-jsch-agentproxy-core)
10944 (name "java-jsch-agentproxy-sshagent")
10945 (arguments
10946 `(#:jar-name "jsch-agentproxy-sshagent.jar"
10947 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
10948 #:tests? #f)); no tests
10949 (inputs
10950 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10951 (synopsis "Proxy to ssh-agent")
10952 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10953 and Pageant included in Putty. This component contains the code for a proxy to
10954 ssh-agent.")))
10955
10956 (define-public java-jsch-agentproxy-usocket-jna
10957 (package
10958 (inherit java-jsch-agentproxy-core)
10959 (name "java-jsch-agentproxy-usocket-jna")
10960 (arguments
10961 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
10962 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
10963 #:tests? #f)); no tests
10964 (inputs
10965 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10966 ("java-native-access" ,java-native-access)))
10967 (synopsis "USocketFactory implementation using JNA")
10968 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10969 and Pageant included in Putty. This component contains an implementation of
10970 USocketFactory using @dfn{JNA} (Java Native Access).")))
10971
10972 (define-public java-jsch-agentproxy-pageant
10973 (package
10974 (inherit java-jsch-agentproxy-core)
10975 (name "java-jsch-agentproxy-pageant")
10976 (arguments
10977 `(#:jar-name "jsch-agentproxy-pageant.jar"
10978 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
10979 #:tests? #f)); no tests
10980 (inputs
10981 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
10982 ("java-native-access" ,java-native-access)
10983 ("java-native-access-platform" ,java-native-access-platform)))
10984 (synopsis "Proxy to pageant")
10985 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
10986 and Pageant included in Putty. This component contains the code for a proxy to
10987 pageant.")))
10988
10989 (define-public java-jsch-agentproxy-usocket-nc
10990 (package
10991 (inherit java-jsch-agentproxy-core)
10992 (name "java-jsch-agentproxy-usocket-nc")
10993 (arguments
10994 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
10995 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
10996 #:tests? #f)); no tests
10997 (inputs
10998 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
10999 (synopsis "USocketFactory implementation using netcat")
11000 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11001 and Pageant included in Putty. This component contains an implementation of
11002 USocketFactory using netcat.")))
11003
11004 (define-public java-jsch-agentproxy-connector-factory
11005 (package
11006 (inherit java-jsch-agentproxy-core)
11007 (name "java-jsch-agentproxy-connector-factory")
11008 (arguments
11009 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
11010 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
11011 #:tests? #f)); no tests
11012 (inputs
11013 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11014 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
11015 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
11016 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
11017 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
11018 (synopsis "Connector factory for jsch agent proxy")
11019 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11020 and Pageant included in Putty. This component contains a connector factory.")))
11021
11022 (define-public java-jsch-agentproxy-jsch
11023 (package
11024 (inherit java-jsch-agentproxy-core)
11025 (name "java-jsch-agentproxy-jsch")
11026 (arguments
11027 `(#:jar-name "jsch-agentproxy-jsch.jar"
11028 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
11029 #:tests? #f)); no tests
11030 (inputs
11031 `(("java-jsch" ,java-jsch)
11032 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
11033 (synopsis "JSch integration library for agentproxy")
11034 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
11035 and Pageant included in Putty. This component contains a library to use
11036 jsch-agent-proxy with JSch.")))
11037
11038 (define-public java-apache-ivy
11039 (package
11040 (name "java-apache-ivy")
11041 (version "2.4.0")
11042 (source (origin
11043 (method url-fetch)
11044 (uri (string-append "mirror://apache//ant/ivy/" version
11045 "/apache-ivy-" version "-src.tar.gz"))
11046 (sha256
11047 (base32
11048 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
11049 (patches
11050 (search-patches
11051 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
11052 (build-system ant-build-system)
11053 (arguments
11054 `(#:jar-name "ivy.jar"
11055 #:tests? #f
11056 #:phases
11057 (modify-phases %standard-phases
11058 (add-before 'build 'remove-example
11059 (lambda _
11060 (delete-file-recursively "src/example")
11061 #t))
11062 (add-before 'build 'copy-resources
11063 (lambda _
11064 (with-directory-excursion "src/java"
11065 (for-each (lambda (file)
11066 (install-file file (string-append "../../build/classes/" (dirname file))))
11067 (append
11068 (find-files "." ".*.css")
11069 (find-files "." ".*.ent")
11070 (find-files "." ".*.html")
11071 (find-files "." ".*.properties")
11072 (find-files "." ".*.xsd")
11073 (find-files "." ".*.xsl")
11074 (find-files "." ".*.xml"))))
11075 #t))
11076 (add-before 'build 'fix-vfs
11077 (lambda _
11078 (substitute*
11079 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
11080 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
11081 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
11082 #t))
11083 (add-before 'install 'copy-manifest
11084 (lambda _
11085 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
11086 #t))
11087 (add-before 'install 'repack
11088 (lambda _
11089 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
11090 "-C" "build/classes" ".")))
11091 (add-after 'install 'install-bin
11092 (lambda* (#:key outputs #:allow-other-keys)
11093 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
11094 (ivy (string-append bin "/ivy"))
11095 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
11096 (mkdir-p bin)
11097 (with-output-to-file ivy
11098 (lambda _
11099 (display (string-append
11100 "#!" (which "sh") "\n"
11101 "if [[ -z $CLASSPATH ]]; then\n"
11102 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
11103 "else\n"
11104 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
11105 "fi\n"
11106 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
11107 (chmod ivy #o755)
11108 #t))))))
11109 (inputs
11110 `(("java-bouncycastle" ,java-bouncycastle)
11111 ("java-commons-cli" ,java-commons-cli)
11112 ("java-commons-collections" ,java-commons-collections)
11113 ("java-commons-httpclient" ,java-commons-httpclient)
11114 ("java-commons-lang" ,java-commons-lang)
11115 ("java-commons-vfs" ,java-commons-vfs)
11116 ("java-jakarta-oro" ,java-jakarta-oro)
11117 ("java-jsch" ,java-jsch)
11118 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
11119 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
11120 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
11121 ("java-junit" ,java-junit)))
11122 (home-page "https://ant.apache.org/ivy")
11123 (synopsis "Dependency manager for the Java programming language")
11124 (description "Ivy is a tool for managing (recording, tracking, resolving
11125 and reporting) project dependencies. It is characterized by the following:
11126
11127 @itemize
11128 @item flexibility and configurability - Ivy is essentially process agnostic
11129 and is not tied to any methodology or structure. Instead it provides the
11130 necessary flexibility and configurability to be adapted to a broad range
11131 of dependency management and build processes.
11132 @item tight integration with Apache Ant - while available as a standalone tool,
11133 Ivy works particularly well with Apache Ant providing a number of
11134 powerful Ant tasks ranging from dependency resolution to dependency
11135 reporting and publication.
11136 @end itemize")
11137 (license license:asl2.0)))
11138
11139 (define-public java-eclipse-sisu-inject
11140 (package
11141 (name "java-eclipse-sisu-inject")
11142 (version "0.3.3")
11143 (source (origin
11144 (method git-fetch)
11145 (uri (git-reference
11146 (url "https://github.com/eclipse/sisu.inject/")
11147 (commit "releases/0.3.3")))
11148 (file-name (git-file-name name version))
11149 (sha256
11150 (base32
11151 "0gibc9x0bw0f4ls086fx73610fcspz9g2as7kcpcfhvl5znysvg7"))))
11152 (build-system ant-build-system)
11153 (arguments
11154 `(#:jar-name "eclipse-sisu-inject.jar"
11155 #:source-dir "org.eclipse.sisu.inject/src"
11156 #:jdk ,icedtea-8
11157 #:tests? #f)); no tests
11158 (inputs
11159 `(("java-guice" ,java-guice)
11160 ("java-guice-servlet" ,java-guice-servlet)
11161 ("java-javax-inject" ,java-javax-inject)
11162 ("java-javaee-servletapi" ,java-javaee-servletapi)
11163 ("java-junit" ,java-junit)
11164 ("java-slf4j-api" ,java-slf4j-api)
11165 ("java-jsr305" ,java-jsr305)
11166 ("java-jsr250" ,java-jsr250)
11167 ("java-cdi-api" ,java-cdi-api)
11168 ("java-osgi-framework" ,java-osgi-framework)
11169 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
11170 ("java-testng" ,java-testng)))
11171 (home-page "https://www.eclipse.org/sisu/")
11172 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
11173 (description "Sisu is a modular JSR330-based container that supports
11174 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
11175 Google-Guice to perform dependency injection and provide the core JSR330
11176 support, but removes the need to write explicit bindings in Guice modules.
11177 Integration with other containers via the Eclipse Extension Registry and the
11178 OSGi Service Registry is a goal of this project.")
11179 (license license:epl1.0)))
11180
11181 (define-public java-eclipse-sisu-plexus
11182 (package
11183 (name "java-eclipse-sisu-plexus")
11184 (version "0.3.4")
11185 (source (origin
11186 (method git-fetch)
11187 (uri (git-reference
11188 (url "https://github.com/eclipse/sisu.plexus.git")
11189 (commit (string-append "releases/" version))))
11190 (file-name (git-file-name name version))
11191 (sha256
11192 (base32
11193 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
11194 (modules '((guix build utils)))
11195 (snippet
11196 '(begin
11197 (for-each delete-file (find-files "." ".*.jar"))
11198 (rename-file "org.eclipse.sisu.plexus.tests/src"
11199 "org.eclipse.sisu.plexus.tests/java")
11200 #t))))
11201 (build-system ant-build-system)
11202 (arguments
11203 `(#:jar-name "eclipse-sisu-plexus.jar"
11204 #:source-dir "org.eclipse.sisu.plexus/src"
11205 #:test-dir "org.eclipse.sisu.plexus.tests"
11206 #:test-exclude
11207 (list
11208 ;; This test fails probably because we can't generate the necessary
11209 ;; meta-inf files.
11210 "**/PlexusLoggingTest.*"
11211 ;; FIXME: This test fails because of some injection error
11212 "**/PlexusRequirementTest.*")
11213 #:jdk ,icedtea-8
11214 #:phases
11215 (modify-phases %standard-phases
11216 (add-before 'build 'copy-resources
11217 (lambda _
11218 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
11219 "build/classes/META-INF/plexus")
11220 #t))
11221 (add-before 'check 'build-test-jar
11222 (lambda _
11223 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
11224 (mkdir "build")
11225 (with-directory-excursion "java"
11226 (apply invoke "javac" "-cp"
11227 (string-append (getenv "CLASSPATH")
11228 ":../../../../../build/classes")
11229 (find-files "." ".*.java"))
11230 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
11231 (find-files "." ".*.jar")))
11232 (mkdir-p "build/META-INF/plexus")
11233 (copy-file "resources/META-INF/plexus/components.xml"
11234 "build/META-INF/plexus/components.xml")
11235 (with-directory-excursion "build"
11236 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
11237 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
11238 (copy-recursively "META-INF" "../build/test-classes/META-INF")
11239 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
11240 (("resources/component-jar")
11241 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
11242 #t)))))
11243 (inputs
11244 `(("java-plexus-classworlds" ,java-plexus-classworlds)
11245 ("java-plexus-util" ,java-plexus-utils)
11246 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
11247 ("java-osgi-framework" ,java-osgi-framework)
11248 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
11249 ("java-guice" ,java-guice)
11250 ("java-javax-inject" ,java-javax-inject)
11251 ("java-slf4j-api" ,java-slf4j-api)
11252 ("java-junit" ,java-junit)))
11253 (native-inputs
11254 `(("java-guava" ,java-guava)
11255 ("java-aopalliance" ,java-aopalliance)
11256 ("java-cglib" ,java-cglib)
11257 ("java-asm" ,java-asm)))
11258 (home-page "https://www.eclipse.org/sisu/")
11259 (synopsis "Plexus support for the sisu container")
11260 (description "Sisu is a modular JSR330-based container that supports
11261 classpath scanning, auto-binding, and dynamic auto-wiring. This package
11262 adds Plexus support to the Sisu-Inject container.")
11263 (license license:epl1.0)))
11264
11265 (define-public java-commons-compiler
11266 (package
11267 (name "java-commons-compiler")
11268 (version "3.0.8")
11269 (source (origin
11270 (method git-fetch)
11271 (uri (git-reference
11272 (url "https://github.com/janino-compiler/janino")
11273 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
11274 (file-name (string-append name "-" version))
11275 (sha256
11276 (base32
11277 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
11278 (modules '((guix build utils)))
11279 (snippet
11280 '(begin
11281 (for-each delete-file
11282 (find-files "." "\\.jar$"))
11283 #t))))
11284 (build-system ant-build-system)
11285 (arguments
11286 `(#:jar-name "commons-compiler.jar"
11287 #:source-dir "commons-compiler/src/main"
11288 #:tests? #f)); no tests
11289 (home-page "https://github.com/janino-compiler/janino")
11290 (synopsis "Java compiler")
11291 (description "Commons-compiler contains an API for janino, including the
11292 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
11293 and @code{ISimpleCompiler} interfaces.")
11294 (license license:bsd-3)))
11295
11296 (define-public java-janino
11297 (package
11298 (inherit java-commons-compiler)
11299 (name "java-janino")
11300 (arguments
11301 `(#:jar-name "janino.jar"
11302 #:source-dir "src/main/java"
11303 #:phases
11304 (modify-phases %standard-phases
11305 (add-before 'configure 'chdir
11306 (lambda _
11307 (chdir "janino")
11308 #t)))))
11309 (inputs
11310 `(("java-commons-compiler" ,java-commons-compiler)))
11311 (native-inputs
11312 `(("java-junit" ,java-junit)
11313 ("java-hamcrest-core" ,java-hamcrest-core)))
11314 (description "Janino is a Java compiler. Janino can compile a set of
11315 source files to a set of class files like @code{javac}, but also compile a
11316 Java expression, block, class body or source file in memory, load the bytecode
11317 and execute it directly in the same JVM. @code{janino} can also be used for
11318 static code analysis or code manipulation.")))
11319
11320 (define-public java-logback-core
11321 (package
11322 (name "java-logback-core")
11323 (version "1.2.3")
11324 (source (origin
11325 (method url-fetch)
11326 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
11327 version ".tar.gz"))
11328 (file-name (string-append name "-" version ".tar.gz"))
11329 (sha256
11330 (base32
11331 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
11332 (modules '((guix build utils)))
11333 (snippet
11334 '(begin
11335 (delete-file-recursively "logback-access/lib")
11336 #t))))
11337 (build-system ant-build-system)
11338 (arguments
11339 `(#:jar-name "logback.jar"
11340 #:source-dir "src/main/java"
11341 #:test-dir "src/test"
11342 #:test-exclude
11343 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
11344 ;; which creates FastClasses
11345 (list "**/AllCoreTest.*"
11346 "**/AutoFlushingObjectWriterTest.*"
11347 "**/PackageTest.*"
11348 "**/ResilientOutputStreamTest.*"
11349 ;; And we still don't want to run abstract classes
11350 "**/Abstract*.*")
11351 #:phases
11352 (modify-phases %standard-phases
11353 (add-before 'configure 'chdir
11354 (lambda _
11355 (chdir "logback-core")
11356 #t)))))
11357 (inputs
11358 `(("java-javax-mail" ,java-javax-mail)
11359 ("servlet" ,java-javaee-servletapi)
11360 ("java-commons-compiler" ,java-commons-compiler)
11361 ("java-janino" ,java-janino)))
11362 (native-inputs
11363 `(("java-junit" ,java-junit)
11364 ("java-hamcrest-core" ,java-hamcrest-core)
11365 ("java-mockito-1" ,java-mockito-1)
11366 ("java-cglib" ,java-cglib)
11367 ("java-asm" ,java-asm)
11368 ("java-objenesis" ,java-objenesis)
11369 ("java-joda-time" ,java-joda-time)))
11370 (home-page "https://logback.qos.ch")
11371 (synopsis "Logging for java")
11372 (description "Logback is intended as a successor to the popular log4j project.
11373 This module lays the groundwork for the other two modules.")
11374 ;; Either epl1.0 or lgpl2.1
11375 (license (list license:epl1.0
11376 license:lgpl2.1))))
11377
11378 (define-public java-logback-classic
11379 (package
11380 (inherit java-logback-core)
11381 (name "java-logback-classic")
11382 (arguments
11383 `(#:jar-name "logback-classic.jar"
11384 #:source-dir "src/main/java"
11385 #:test-dir "src/test"
11386 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
11387 #:jdk ,icedtea-8
11388 #:phases
11389 (modify-phases %standard-phases
11390 (add-before 'configure 'chdir
11391 (lambda _
11392 (chdir "logback-classic")
11393 #t))
11394 (replace 'build
11395 (lambda* (#:key inputs #:allow-other-keys)
11396 (mkdir-p "build/classes")
11397 (setenv "CLASSPATH"
11398 (string-join
11399 (apply append (map (lambda (input)
11400 (find-files (assoc-ref inputs input)
11401 ".*.jar"))
11402 '("java-logback-core" "java-slf4j-api"
11403 "java-commons-compiler" "servlet"
11404 "groovy")))
11405 ":"))
11406 (apply invoke "groovyc" "-d" "build/classes" "-j"
11407 (find-files "src/main/" ".*\\.(groovy|java)$"))
11408 (invoke "ant" "jar")
11409 #t)))))
11410 (inputs
11411 `(("java-logback-core" ,java-logback-core)
11412 ("java-slf4j-api" ,java-slf4j-api)
11413 ,@(package-inputs java-logback-core)))
11414 (native-inputs
11415 `(("groovy" ,groovy)))
11416 (description "Logback is intended as a successor to the popular log4j project.
11417 This module can be assimilated to a significantly improved version of log4j.
11418 Moreover, @code{logback-classic} natively implements the slf4j API so that you
11419 can readily switch back and forth between logback and other logging frameworks
11420 such as log4j or @code{java.util.logging} (JUL).")))
11421
11422 (define-public java-jgit
11423 (package
11424 (name "java-jgit")
11425 (version "4.7.0.201704051617-r")
11426 (source (origin
11427 (method url-fetch)
11428 (uri (string-append "https://repo1.maven.org/maven2/"
11429 "org/eclipse/jgit/org.eclipse.jgit/"
11430 version "/org.eclipse.jgit-"
11431 version "-sources.jar"))
11432 (sha256
11433 (base32
11434 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
11435 (build-system ant-build-system)
11436 (arguments
11437 `(#:tests? #f ; There are no tests to run.
11438 #:jar-name "jgit.jar"
11439 ;; JGit must be built with a JDK supporting Java 8.
11440 #:jdk ,icedtea-8
11441 ;; Target our older default JDK.
11442 #:make-flags (list "-Dtarget=1.7")
11443 #:phases
11444 (modify-phases %standard-phases
11445 ;; The jar file generated by the default build.xml does not include
11446 ;; the text properties files, so we need to add them.
11447 (add-after 'build 'add-properties
11448 (lambda* (#:key jar-name #:allow-other-keys)
11449 (with-directory-excursion "src"
11450 (apply invoke "jar" "-uf"
11451 (string-append "../build/jar/" jar-name)
11452 (find-files "." "\\.properties$")))
11453 #t)))))
11454 (inputs
11455 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
11456 ("java-javaewah" ,java-javaewah)
11457 ("java-jsch" ,java-jsch)
11458 ("java-slf4j-api" ,java-slf4j-api)))
11459 (home-page "https://eclipse.org/jgit/")
11460 (synopsis "Java library implementing the Git version control system")
11461 (description "JGit is a lightweight, pure Java library implementing the
11462 Git version control system, providing repository access routines, support for
11463 network protocols, and core version control algorithms.")
11464 (license license:edl1.0)))
11465
11466 ;; For axoloti. This package can still be built with icedtea-7, which is
11467 ;; currently used as the default JDK.
11468 (define-public java-jgit-4.2
11469 (package (inherit java-jgit)
11470 (version "4.2.0.201601211800-r")
11471 (source (origin
11472 (method url-fetch)
11473 (uri (string-append "https://repo1.maven.org/maven2/"
11474 "org/eclipse/jgit/org.eclipse.jgit/"
11475 version "/org.eclipse.jgit-"
11476 version "-sources.jar"))
11477 (sha256
11478 (base32
11479 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
11480 (build-system ant-build-system)
11481 (arguments
11482 (substitute-keyword-arguments (package-arguments java-jgit)
11483 ;; Build for default JDK.
11484 ((#:jdk _) icedtea-7)
11485 ((#:phases phases)
11486 `(modify-phases ,phases
11487 (add-after 'unpack 'use-latest-javaewah-API
11488 (lambda _
11489 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
11490 (("wordinbits") "WORD_IN_BITS"))
11491 #t))))))
11492 (inputs
11493 `(("java-javaewah" ,java-javaewah)
11494 ("java-jsch" ,java-jsch)
11495 ("java-slf4j-api" ,java-slf4j-api)))))
11496
11497 (define-public abcl
11498 (package
11499 (name "abcl")
11500 (version "1.6.0")
11501 (source
11502 (origin
11503 (method url-fetch)
11504 (uri (string-append "https://abcl.org/releases/"
11505 version "/abcl-src-" version ".tar.gz"))
11506 (sha256
11507 (base32
11508 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
11509 (patches
11510 (search-patches
11511 "abcl-fix-build-xml.patch"))))
11512 (build-system ant-build-system)
11513 (native-inputs
11514 `(("java-junit" ,java-junit)))
11515 (arguments
11516 `(#:build-target "abcl.jar"
11517 #:test-target "abcl.test"
11518 #:phases
11519 (modify-phases %standard-phases
11520 (replace 'install
11521 (lambda* (#:key outputs #:allow-other-keys)
11522 (let ((share (string-append (assoc-ref outputs "out")
11523 "/share/java/"))
11524 (bin (string-append (assoc-ref outputs "out")
11525 "/bin/")))
11526 (mkdir-p share)
11527 (install-file "dist/abcl.jar" share)
11528 (install-file "dist/abcl-contrib.jar" share)
11529 (mkdir-p bin)
11530 (with-output-to-file (string-append bin "abcl")
11531 (lambda _
11532 (let ((classpath (string-append
11533 share "abcl.jar"
11534 ":"
11535 share "abcl-contrib.jar")))
11536 (display (string-append
11537 "#!" (which "sh") "\n"
11538 "if [[ -z $CLASSPATH ]]; then\n"
11539 " cp=\"" classpath "\"\n"
11540 "else\n"
11541 " cp=\"" classpath ":$CLASSPATH\"\n"
11542 "fi\n"
11543 "exec " (which "java")
11544 " -cp $cp org.armedbear.lisp.Main $@\n")))))
11545 (chmod (string-append bin "abcl") #o755)
11546 #t))))))
11547 (home-page "https://abcl.org/")
11548 (synopsis "Common Lisp Implementation on the JVM")
11549 (description
11550 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
11551 Lisp language featuring both an interpreter and a compiler, running in the
11552 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
11553 in any Java application. Additionally, it can be used to implement (parts of)
11554 the application using Java to Lisp integration APIs.")
11555 (license (list license:gpl2+
11556 ;; named-readtables is released under 3 clause BSD
11557 license:bsd-3
11558 ;; jfli is released under CPL 1.0
11559 license:cpl1.0))))
11560
11561 (define-public java-jsonp-api
11562 (package
11563 (name "java-jsonp-api")
11564 (version "1.1.6")
11565 (source (origin
11566 (method git-fetch)
11567 (uri (git-reference
11568 (url "https://github.com/eclipse-ee4j/jsonp")
11569 (commit (string-append "1.1-" version "-RELEASE"))))
11570 (file-name (git-file-name name version))
11571 (sha256
11572 (base32
11573 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
11574 (build-system ant-build-system)
11575 (arguments
11576 `(#:jar-name "jsonp-api.jar"
11577 #:tests? #f
11578 #:source-dir "api/src/main/java"
11579 #:test-dir "api/src/test"))
11580 (home-page "https://eclipse-ee4j.github.io/jsonp/")
11581 (synopsis "JSON Processing in Java")
11582 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11583 parse, generate, transform and query) JSON messages. It produces and
11584 consumes JSON text in a streaming fashion (similar to StAX API for XML)
11585 and allows to build a Java object model for JSON text using API classes
11586 (similar to DOM API for XML).")
11587 ;; either gpl2 only with classpath exception, or epl2.0.
11588 (license (list license:gpl2
11589 license:epl2.0))))
11590
11591 (define-public java-jsonp-impl
11592 (package
11593 (inherit java-jsonp-api)
11594 (name "java-jsonp-impl")
11595 (arguments
11596 `(#:jar-name "jsonp-impl.jar"
11597 #:tests? #f
11598 #:source-dir "impl/src/main/java"
11599 #:test-dir "impl/src/test"
11600 #:phases
11601 (modify-phases %standard-phases
11602 (add-before 'build 'copy-resources
11603 (lambda _
11604 (copy-recursively
11605 "impl/src/main/resources/"
11606 "build/classes")
11607 #t)))))
11608 (propagated-inputs
11609 `(("java-jsonp-api" ,java-jsonp-api)))
11610 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
11611 parse, generate, transform and query) JSON messages. This package contains
11612 a reference implementation of that API.")))
11613
11614 (define-public java-xmp
11615 (package
11616 (name "java-xmp")
11617 (version "5.1.3")
11618 (source (origin
11619 (method url-fetch)
11620 (uri (string-append "http://download.macromedia.com/pub/developer"
11621 "/xmp/sdk/XMPCoreJava-" version ".zip"))
11622 (sha256
11623 (base32
11624 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
11625 (build-system ant-build-system)
11626 (arguments
11627 `(#:build-target "build"
11628 #:tests? #f; no tests
11629 #:phases
11630 (modify-phases %standard-phases
11631 (add-after 'unpack 'chdir
11632 (lambda _
11633 (chdir "XMPCore")
11634 #t))
11635 (add-before 'build 'fix-timestamp
11636 (lambda _
11637 (substitute* "build.xml"
11638 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
11639 #t))
11640 (replace 'install
11641 (install-jars "."))
11642 (add-after 'install 'install-doc
11643 (lambda* (#:key outputs #:allow-other-keys)
11644 (copy-recursively
11645 "docs"
11646 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
11647 #t)))))
11648 (native-inputs
11649 `(("unzip" ,unzip)))
11650 (home-page "https://www.adobe.com/devnet/xmp.html")
11651 (synopsis "Extensible Metadat Platform (XMP) support in Java")
11652 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
11653 technology that allows you to embed data about a file, known as metadata,
11654 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
11655 library and the API is similar.")
11656 (license license:bsd-3)))
11657
11658 (define-public java-metadata-extractor
11659 (package
11660 (name "java-metadata-extractor")
11661 (version "2.11.0")
11662 (source (origin
11663 (method git-fetch)
11664 (uri (git-reference
11665 (url "https://github.com/drewnoakes/metadata-extractor")
11666 (commit version)))
11667 (file-name (git-file-name name version))
11668 (sha256
11669 (base32
11670 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
11671 (build-system ant-build-system)
11672 (arguments
11673 `(#:jar-name "metadata-extractor.jar"
11674 #:source-dir "Source"
11675 #:test-dir "Tests"
11676 #:phases
11677 (modify-phases %standard-phases
11678 (add-before 'check 'fix-test-dir
11679 (lambda _
11680 (substitute* "build.xml"
11681 (("/java\">") "\">"))
11682 #t)))))
11683 (propagated-inputs
11684 `(("java-xmp" ,java-xmp)))
11685 (native-inputs
11686 `(("java-hamcrest-core" ,java-hamcrest-core)
11687 ("java-junit" ,java-junit)))
11688 (home-page "https://github.com/drewnoakes/metadata-extractor")
11689 (synopsis "Extract metadata from image and video files")
11690 (description "Metadata-extractor is a straightforward Java library for
11691 reading metadata from image files. It is able to read metadata in Exif,
11692 IPTC, XMP, ICC and more formats.")
11693 (license license:asl2.0)))
11694
11695 (define-public java-svg-salamander
11696 (package
11697 (name "java-svg-salamander")
11698 (version "1.1.2")
11699 (source (origin
11700 (method git-fetch)
11701 (uri (git-reference
11702 (url "https://github.com/blackears/svgSalamander")
11703 (commit (string-append "v" version))))
11704 (file-name (git-file-name name version))
11705 (sha256
11706 (base32
11707 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
11708 (modules '((guix build utils)))
11709 (snippet
11710 '(begin
11711 (for-each delete-file (find-files "." ".*.jar"))
11712 #t))
11713 (patches
11714 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
11715 (build-system ant-build-system)
11716 (arguments
11717 `(#:tests? #f; no tests
11718 #:phases
11719 (modify-phases %standard-phases
11720 (add-after 'unpack 'chdir
11721 (lambda _
11722 (chdir "svg-core")
11723 #t))
11724 (add-before 'build 'copy-jars
11725 (lambda* (#:key inputs #:allow-other-keys)
11726 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
11727 "../libraries/javacc.jar")
11728 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
11729 "../libraries/ant.jar")
11730 #t))
11731 (replace 'install
11732 (install-jars "dist")))))
11733 (native-inputs
11734 `(("javacc" ,javacc)))
11735 (home-page "https://github.com/blackears/svgSalamander")
11736 (synopsis "SVG engine for Java")
11737 (description "SVG Salamander is an SVG engine for Java that's designed
11738 to be small, fast, and allow programmers to use it with a minimum of fuss.
11739 It's in particular targeted for making it easy to integrate SVG into Java
11740 games and making it much easier for artists to design 2D game content - from
11741 rich interactive menus to charts and graphcs to complex animations.")
11742 (license license:bsd-2)))
11743
11744 (define-public java-jboss-transaction-api-spec
11745 (package
11746 (name "java-jboss-transaction-api-spec")
11747 (version "1.2+1.1.1")
11748 (source (origin
11749 (method git-fetch)
11750 (uri (git-reference
11751 (url "https://github.com/jboss/jboss-transaction-api_spec")
11752 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
11753 (file-name (git-file-name name version))
11754 (sha256
11755 (base32
11756 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
11757 (build-system ant-build-system)
11758 (arguments
11759 `(#:jar-name "java-jboss-transaction-api_spec.jar"
11760 #:source-dir "src/main/java"
11761 #:tests? #f)); no tests
11762 (inputs
11763 `(("java-cdi-api" ,java-cdi-api)
11764 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
11765 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
11766 (synopsis "Generic transaction management API in Java")
11767 (description "Java-jboss-transaction-api-spec implements the Transactions
11768 API. A transaction is a unit of work containing one or more operations
11769 involving one or more shared resources having ACID (Atomicity, Consistency,
11770 Isolation and Durability) properties.")
11771 ;; either gpl2 only with classpath exception or cddl.
11772 (license (list license:gpl2 license:cddl1.0))))