gnu: Add antlr4-4.1.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 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-2020 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 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
15 ;;; Copyright © 2020 Raghav Gururajan <raghavgururajan@disroot.org>
16 ;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
17 ;;;
18 ;;; This file is part of GNU Guix.
19 ;;;
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
24 ;;;
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
29 ;;;
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32
33 (define-module (gnu packages java)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix hg-download)
38 #:use-module (guix git-download)
39 #:use-module (guix svn-download)
40 #:use-module ((guix build utils) #:select (alist-replace))
41 #:use-module (guix utils)
42 #:use-module (guix build-system ant)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system trivial)
45 #:use-module (gnu packages)
46 #:use-module (gnu packages attr)
47 #:use-module (gnu packages autotools)
48 #:use-module (gnu packages base)
49 #:use-module (gnu packages bash)
50 #:use-module (gnu packages certs)
51 #:use-module (gnu packages cpio)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages compression)
54 #:use-module (gnu packages elf)
55 #:use-module (gnu packages fontutils)
56 #:use-module (gnu packages gawk)
57 #:use-module (gnu packages gettext)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages groovy)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages guile)
64 #:use-module (gnu packages icu4c)
65 #:use-module (gnu packages image)
66 #:use-module (gnu packages java-compression)
67 #:use-module (gnu packages libffi)
68 #:use-module (gnu packages linux) ;alsa
69 #:use-module (gnu packages maths)
70 #:use-module (gnu packages maven)
71 #:use-module (gnu packages maven-parent-pom)
72 #:use-module (gnu packages nss)
73 #:use-module (gnu packages onc-rpc)
74 #:use-module (gnu packages web)
75 #:use-module (gnu packages wget)
76 #:use-module (gnu packages pkg-config)
77 #:use-module (gnu packages perl)
78 #:use-module (gnu packages popt)
79 #:use-module (gnu packages kerberos)
80 #:use-module (gnu packages xml)
81 #:use-module (gnu packages xorg)
82 #:use-module (gnu packages texinfo)
83 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
84 #:use-module (srfi srfi-11)
85 #:use-module (ice-9 match))
86
87 \f
88 ;;;
89 ;;; Java bootstrap toolchain.
90 ;;;
91
92 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
93 ;; use it to build a simple version of GNU Classpath, the Java standard
94 ;; library. We chose version 0.93 because it is the last version that can be
95 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
96 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
97 ;; the last version of JamVM that works with a version of GNU classpath that
98 ;; does not require ECJ. These three packages make up the bootstrap JDK.
99
100 ;; This is sufficient to build an older version of Ant, which is needed to
101 ;; build an older version of ECJ, an incremental Java compiler, both of which
102 ;; are written in Java.
103 ;;
104 ;; ECJ is needed to build the latest release (0.99) and the development
105 ;; version of GNU Classpath. The development version of GNU Classpath has
106 ;; much more support for Java 1.6 than the latest release, but we need to
107 ;; build 0.99 first to get a working version of javah. ECJ, the development
108 ;; version of GNU Classpath, and the latest version of JamVM make up the
109 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
110 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
111 ;; Icedtea 3.x.
112
113 (define-public libantlr3c
114 (package
115 (name "libantlr3c")
116 (version "3.4")
117 (source
118 (origin
119 (method url-fetch)
120 (uri
121 (string-append "https://www.antlr3.org/download/C/"
122 name "-" version ".tar.gz"))
123 (sha256
124 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
125 (build-system gnu-build-system)
126 (arguments
127 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
128 #:phases (modify-phases %standard-phases
129 (replace 'configure
130 (lambda* (#:key build target native-inputs inputs outputs
131 (configure-flags '()) out-of-source? system
132 #:allow-other-keys)
133 (let ((configure (assoc-ref %standard-phases 'configure))
134 (enable-64bit? (member system '("aarch64-linux"
135 "x86_64-linux"
136 "mips64el-linux"))))
137 (configure #:build build #:target target
138 #:native-inputs native-inputs
139 #:inputs inputs #:outputs outputs
140 #:configure-flags `(,(if enable-64bit?
141 "--enable-64bit"
142 '())
143 ,@configure-flags)
144 #:out-of-source? out-of-source?)))))))
145 (synopsis "ANTLR C Library")
146 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
147 Tool for Language Recognition v3).")
148 (home-page "https://www.antlr3.org/")
149 (license license:bsd-3)))
150
151 (define jikes
152 (package
153 (name "jikes")
154 (version "1.22")
155 (source (origin
156 (method url-fetch)
157 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
158 version "/jikes-" version ".tar.bz2"))
159 (sha256
160 (base32
161 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
162 (build-system gnu-build-system)
163 (home-page "http://jikes.sourceforge.net/")
164 (synopsis "Compiler for the Java language")
165 (description "Jikes is a compiler that translates Java source files as
166 defined in The Java Language Specification into the bytecoded instruction set
167 and binary format defined in The Java Virtual Machine Specification.")
168 (license license:ibmpl1.0)))
169
170 (define-public drip
171 ;; Last release is from 2014, with a few important commits afterwards.
172 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
173 (package
174 (name "drip")
175 (version (git-version "0.2.4" "1" commit))
176 (source (origin
177 (method git-fetch)
178 (uri (git-reference
179 (url "https://github.com/ninjudd/drip")
180 (commit commit)))
181 (file-name (git-file-name name version))
182 (sha256
183 (base32
184 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
185 (build-system gnu-build-system)
186 (native-inputs
187 `(("jdk" ,icedtea "jdk")))
188 (arguments
189 `(#:tests? #f ; No tests.
190 #:phases
191 (modify-phases %standard-phases
192 (delete 'configure)
193 (add-before 'install 'fix-wrapper
194 (lambda* (#:key inputs #:allow-other-keys)
195 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
196 (substitute* "bin/drip"
197 (("jps") jps)
198 (("brew update && brew upgrade drip") "guix pull && guix install drip")
199 ;; No need to make:
200 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
201 ;; No need to include source:
202 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
203 "true"))
204 #t)))
205 (replace 'install
206 (lambda* (#:key outputs #:allow-other-keys)
207 (let* ((out (assoc-ref outputs "out"))
208 (bin (string-append out "/bin"))
209 (share (string-append out "/share/drip")))
210 (mkdir-p bin)
211 (for-each
212 (lambda (file)
213 (install-file (string-append "bin/" file) bin))
214 '("drip" "drip_daemon" "drip_proxy"))
215 (install-file "drip.jar" share)
216 (substitute* (string-append bin "/drip")
217 (("drip_dir=\\$bin_dir/..")
218 (string-append "drip_dir=" share)))
219 #t))))))
220 (home-page "https://github.com/ninjudd/drip")
221 (synopsis "Faster Java Virtual Machine launching")
222 (description "Drip is a launcher for the Java Virtual Machine that
223 provides much faster startup times than the @command{java} command. The @command{drip}
224 script is intended to be a drop-in replacement for the @command{java} command,
225 only faster.")
226 (license license:epl1.0))))
227
228 ;; This is the last version of GNU Classpath that can be built without ECJ.
229 (define classpath-bootstrap
230 (package
231 (name "classpath")
232 (version "0.93")
233 (source (origin
234 (method url-fetch)
235 (uri (string-append "mirror://gnu/classpath/classpath-"
236 version ".tar.gz"))
237 (sha256
238 (base32
239 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
240 (patches (search-patches "classpath-aarch64-support.patch"))))
241 (build-system gnu-build-system)
242 (arguments
243 `(#:configure-flags
244 (list (string-append "JAVAC="
245 (assoc-ref %build-inputs "jikes")
246 "/bin/jikes")
247 "--disable-Werror"
248 "--disable-gmp"
249 "--disable-gtk-peer"
250 "--disable-gconf-peer"
251 "--disable-plugin"
252 "--disable-dssi"
253 "--disable-alsa"
254 "--disable-gjdoc")
255 #:phases
256 (modify-phases %standard-phases
257 ;; XXX: This introduces a memory leak as we remove a call to free up
258 ;; memory for the file name string. This was necessary because of a
259 ;; runtime error that would have prevented us from building
260 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
261 ;; for the gnarly details.
262 (add-after 'unpack 'remove-call-to-free
263 (lambda _
264 (substitute* "native/jni/java-io/java_io_VMFile.c"
265 (("result = cpio_isFileExists.*" m)
266 (string-append m "\n//")))
267 #t))
268 (add-after 'install 'install-data
269 (lambda _ (invoke "make" "install-data"))))))
270 (native-inputs
271 `(("jikes" ,jikes)
272 ("fastjar" ,fastjar)
273 ("libltdl" ,libltdl)
274 ("pkg-config" ,pkg-config)))
275 (home-page "https://www.gnu.org/software/classpath/")
276 (synopsis "Essential libraries for Java")
277 (description "GNU Classpath is a project to create core class libraries
278 for use with runtimes, compilers and tools for the Java programming
279 language.")
280 ;; GPLv2 or later, with special linking exception.
281 (license license:gpl2+)))
282
283 ;; This is the last version of JamVM that works with a version of GNU
284 ;; classpath that does not require ECJ.
285 (define jamvm-1-bootstrap
286 (package
287 (name "jamvm")
288 (version "1.5.1")
289 (source (origin
290 (method url-fetch)
291 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
292 "JamVM%20" version "/jamvm-"
293 version ".tar.gz"))
294 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
295 "jamvm-1.5.1-armv7-support.patch"))
296 (sha256
297 (base32
298 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
299 (snippet
300 '(begin
301 ;; Remove precompiled software.
302 (delete-file "lib/classes.zip")
303 #t))))
304 (build-system gnu-build-system)
305 (arguments
306 `(#:configure-flags
307 (list (string-append "--with-classpath-install-dir="
308 (assoc-ref %build-inputs "classpath"))
309 "--disable-int-caching"
310 "--enable-runtime-reloc-checks"
311 "--enable-ffi")
312 #:phases
313 ,(if (string-prefix? "aarch64" (or (%current-system)
314 (%current-target-system)))
315 ;; Makefiles and the configure script need to be regenerated to
316 ;; incorporate support for AArch64.
317 '(modify-phases %standard-phases
318 (replace 'bootstrap
319 (lambda _ (invoke "autoreconf" "-vif"))))
320 '%standard-phases)))
321 (inputs
322 `(("classpath" ,classpath-bootstrap)
323 ("jikes" ,jikes)
324 ("libffi" ,libffi)
325 ("zip" ,zip)
326 ("zlib" ,zlib)))
327 (native-inputs
328 (if (string-prefix? "aarch64" (or (%current-system)
329 (%current-target-system)))
330 ;; Additional packages needed for autoreconf.
331 `(("autoconf" ,autoconf)
332 ("automake" ,automake)
333 ("libtool" ,libtool))
334 '()))
335 (home-page "http://jamvm.sourceforge.net/")
336 (synopsis "Small Java Virtual Machine")
337 (description "JamVM is a Java Virtual Machine conforming to the JVM
338 specification edition 2 (blue book). It is extremely small. However, unlike
339 other small VMs it supports the full spec, including object finalisation and
340 JNI.")
341 (license license:gpl2+)))
342
343 (define ant-bootstrap
344 (package
345 (name "ant-bootstrap")
346 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
347 ;; are not supported. The 1.8.x series is the last to use only features
348 ;; supported by Jikes.
349 (version "1.8.4")
350 (source (origin
351 (method url-fetch)
352 (uri (string-append "mirror://apache/"
353 "ant/source/apache-ant-"
354 version "-src.tar.bz2"))
355 (sha256
356 (base32
357 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
358 (build-system gnu-build-system)
359 (arguments
360 `(#:imported-modules ((guix build syscalls)
361 ,@%gnu-build-system-modules)
362 #:modules ((srfi srfi-1)
363 (guix build gnu-build-system)
364 (guix build utils)
365 (guix build syscalls))
366 #:tests? #f ; no "check" target
367 #:phases
368 (modify-phases %standard-phases
369 (delete 'bootstrap)
370 (delete 'configure)
371 (replace 'build
372 (lambda* (#:key inputs #:allow-other-keys)
373 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
374 (setenv "JAVACMD"
375 (string-append (assoc-ref inputs "jamvm")
376 "/bin/jamvm"))
377 (setenv "JAVAC"
378 (string-append (assoc-ref inputs "jikes")
379 "/bin/jikes"))
380 (setenv "CLASSPATH"
381 (string-append (assoc-ref inputs "jamvm")
382 "/lib/rt.jar"))
383
384 ;; Ant complains if this file doesn't exist.
385 (setenv "HOME" "/tmp")
386 (with-output-to-file "/tmp/.ant.properties"
387 (lambda _ (display "")))
388
389 ;; Use jikes instead of javac for <javac ...> tags in build.xml
390 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
391
392 ;; jikes produces lots of warnings, but they are not very
393 ;; interesting, so we silence them.
394 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
395
396 ;; Without these JamVM options the build may freeze.
397 (substitute* "bootstrap.sh"
398 (("^\"\\$\\{JAVACMD\\}\" " m)
399 ,@(if (string-prefix? "armhf" (or (%current-system)
400 (%current-target-system)))
401 `((string-append m "-Xnocompact "))
402 `((string-append m "-Xnocompact -Xnoinlining ")))))
403
404 ;; Disable tests because we are bootstrapping and thus don't have
405 ;; any of the dependencies required to build and run the tests.
406 (substitute* "build.xml"
407 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
408 (invoke "bash" "bootstrap.sh"
409 (string-append "-Ddist.dir="
410 (assoc-ref %outputs "out")))))
411 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
412 (lambda* (#:key outputs #:allow-other-keys)
413 (define (repack-archive jar)
414 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
415 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
416 (with-directory-excursion dir
417 (invoke "unzip" jar))
418 (delete-file jar)
419 ;; XXX: copied from (gnu build install)
420 (for-each (lambda (file)
421 (let ((s (lstat file)))
422 (unless (eq? (stat:type s) 'symlink)
423 (utime file 0 0 0 0))))
424 (find-files dir #:directories? #t))
425 ;; It is important that the manifest appears first.
426 (with-directory-excursion dir
427 (let* ((files (find-files "." ".*" #:directories? #t))
428 ;; To ensure that the reference scanner can
429 ;; detect all store references in the jars
430 ;; we disable compression with the "-0" option.
431 (command (if (file-exists? manifest)
432 `("zip" "-0" "-X" ,jar ,manifest
433 ,@files)
434 `("zip" "-0" "-X" ,jar ,@files))))
435 (apply invoke command)))))
436 (for-each repack-archive
437 (find-files
438 (string-append (assoc-ref %outputs "out") "/lib")
439 "\\.jar$"))
440 #t))
441 (delete 'install))))
442 (native-inputs
443 `(("jikes" ,jikes)
444 ("jamvm" ,jamvm-1-bootstrap)
445 ("unzip" ,unzip)
446 ("zip" ,zip)))
447 (home-page "https://ant.apache.org")
448 (synopsis "Build tool for Java")
449 (description
450 "Ant is a platform-independent build tool for Java. It is similar to
451 make but is implemented using the Java language, requires the Java platform,
452 and is best suited to building Java projects. Ant uses XML to describe the
453 build process and its dependencies, whereas Make uses Makefile format.")
454 (license license:asl2.0)))
455
456 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
457 ;; compiler for Java 1.5.
458 (define ecj-bootstrap
459 (package
460 (name "ecj-bootstrap")
461 (version "3.2.2")
462 (source (origin
463 (method url-fetch)
464 (uri (string-append "http://archive.eclipse.org/eclipse/"
465 "downloads/drops/R-" version
466 "-200702121330/ecjsrc.zip"))
467 (sha256
468 (base32
469 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
470 ;; It would be so much easier if we could use the ant-build-system, but we
471 ;; cannot as we don't have ant at this point. We use ecj for
472 ;; bootstrapping the JDK.
473 (build-system gnu-build-system)
474 (arguments
475 `(#:modules ((guix build gnu-build-system)
476 (guix build utils)
477 (srfi srfi-1))
478 #:tests? #f ; there are no tests
479 #:phases
480 (modify-phases %standard-phases
481 (replace 'configure
482 (lambda* (#:key inputs #:allow-other-keys)
483 (setenv "CLASSPATH"
484 (string-join
485 (cons (string-append (assoc-ref inputs "jamvm")
486 "/lib/rt.jar")
487 (find-files (string-append
488 (assoc-ref inputs "ant-bootstrap")
489 "/lib")
490 "\\.jar$"))
491 ":"))
492 #t))
493 (replace 'build
494 (lambda* (#:key inputs #:allow-other-keys)
495 ;; The unpack phase enters the "org" directory by mistake.
496 (chdir "..")
497
498 ;; Create a simple manifest to make ecj executable.
499 (with-output-to-file "manifest"
500 (lambda _
501 (display "Manifest-Version: 1.0
502 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
503
504 ;; Compile it all!
505 (and (apply invoke "jikes"
506 (find-files "." "\\.java$"))
507 (invoke "fastjar" "cvfm"
508 "ecj-bootstrap.jar" "manifest" "."))))
509 (replace 'install
510 (lambda* (#:key outputs #:allow-other-keys)
511 (let ((share (string-append (assoc-ref outputs "out")
512 "/share/java/")))
513 (mkdir-p share)
514 (install-file "ecj-bootstrap.jar" share)
515 #t))))))
516 (native-inputs
517 `(("ant-bootstrap" ,ant-bootstrap)
518 ("unzip" ,unzip)
519 ("jikes" ,jikes)
520 ("jamvm" ,jamvm-1-bootstrap)
521 ("fastjar" ,fastjar)))
522 (home-page "https://eclipse.org")
523 (synopsis "Eclipse Java development tools core batch compiler")
524 (description "This package provides the Eclipse Java core batch compiler
525 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
526 requirement for all GNU Classpath releases after version 0.93.")
527 (license license:epl1.0)))
528
529 (define ecj-javac-wrapper
530 (package (inherit ecj-bootstrap)
531 (name "ecj-javac-wrapper")
532 (source #f)
533 (build-system trivial-build-system)
534 (arguments
535 `(#:modules ((guix build utils))
536 #:builder
537 (begin
538 (use-modules (guix build utils))
539 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
540 (target (string-append bin "/javac"))
541 (guile (string-append (assoc-ref %build-inputs "guile")
542 "/bin/guile"))
543 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
544 "/share/java/ecj-bootstrap.jar"))
545 (java (string-append (assoc-ref %build-inputs "jamvm")
546 "/bin/jamvm"))
547 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
548 "/share/classpath")))
549 (string-append jvmlib "/glibj.zip:"
550 jvmlib "/tools.zip"))))
551 (mkdir-p bin)
552 (with-output-to-file target
553 (lambda _
554 (format #t "#!~a --no-auto-compile\n!#\n" guile)
555 (write
556 `(begin (use-modules (ice-9 match)
557 (ice-9 receive)
558 (ice-9 hash-table)
559 (srfi srfi-1)
560 (srfi srfi-26))
561 (define defaults
562 '(("-bootclasspath" ,bootcp)
563 ("-source" "1.5")
564 ("-target" "1.5")
565 ("-cp" ".")))
566 (define (main args)
567 (let ((classpath (getenv "CLASSPATH")))
568 (setenv "CLASSPATH"
569 (string-join (list ,ecj
570 ,(string-append (assoc-ref %build-inputs "jamvm")
571 "/lib/rt.jar")
572 (or classpath ""))
573 ":")))
574 (receive (vm-args other-args)
575 ;; Separate VM arguments from arguments to ECJ.
576 (partition (cut string-prefix? "-J" <>)
577 (fold (lambda (default acc)
578 (if (member (first default) acc)
579 acc (append default acc)))
580 args defaults))
581 (apply system* ,java
582 (append
583 ;; Remove "-J" prefix
584 (map (cut string-drop <> 2) vm-args)
585 '("org.eclipse.jdt.internal.compiler.batch.Main")
586 (cons "-nowarn" other-args)))))
587 ;; Entry point
588 (let ((args (cdr (command-line))))
589 (if (null? args)
590 (format (current-error-port) "javac: no arguments given!\n")
591 (main args)))))))
592 (chmod target #o755)
593 #t))))
594 (native-inputs
595 `(("guile" ,guile-2.2)
596 ("ecj-bootstrap" ,ecj-bootstrap)
597 ("jamvm" ,jamvm-1-bootstrap)
598 ("classpath" ,classpath-bootstrap)))
599 (description "This package provides a wrapper around the @dfn{Eclipse
600 compiler for Java} (ecj) with a command line interface that is compatible with
601 the standard javac executable.")))
602
603 ;; The classpath-bootstrap was built without a virtual machine, so it does not
604 ;; provide a wrapper for javah. We cannot build the development version of
605 ;; Classpath without javah.
606 (define classpath-0.99
607 (package (inherit classpath-bootstrap)
608 (version "0.99")
609 (source (origin
610 (method url-fetch)
611 (uri (string-append "mirror://gnu/classpath/classpath-"
612 version ".tar.gz"))
613 (sha256
614 (base32
615 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
616 (patches (search-patches "classpath-aarch64-support.patch"))))
617 (arguments
618 `(#:configure-flags
619 (list (string-append "--with-ecj-jar="
620 (assoc-ref %build-inputs "ecj-bootstrap")
621 "/share/java/ecj-bootstrap.jar")
622 (string-append "JAVAC="
623 (assoc-ref %build-inputs "ecj-javac-wrapper")
624 "/bin/javac")
625 (string-append "JAVA="
626 (assoc-ref %build-inputs "jamvm")
627 "/bin/jamvm")
628 "GCJ_JAVAC_TRUE=no"
629 "ac_cv_prog_java_works=yes" ; trust me
630 "--disable-Werror"
631 "--disable-gmp"
632 "--disable-gtk-peer"
633 "--disable-gconf-peer"
634 "--disable-plugin"
635 "--disable-dssi"
636 "--disable-alsa"
637 "--disable-gjdoc")
638 #:phases
639 (modify-phases %standard-phases
640 (add-after 'install 'install-data
641 (lambda _ (invoke "make" "install-data"))))))
642 (native-inputs
643 `(("ecj-bootstrap" ,ecj-bootstrap)
644 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
645 ("fastjar" ,fastjar)
646 ("jamvm" ,jamvm-1-bootstrap)
647 ("classpath" ,classpath-bootstrap)
648 ("libltdl" ,libltdl)
649 ("pkg-config" ,pkg-config)))))
650
651 ;; We need this because classpath-bootstrap does not provide all of the tools
652 ;; we need to build classpath-devel.
653 (define classpath-jamvm-wrappers
654 (package (inherit classpath-0.99)
655 (name "classpath-jamvm-wrappers")
656 (source #f)
657 (build-system trivial-build-system)
658 (arguments
659 `(#:modules ((guix build utils))
660 #:builder
661 (begin
662 (use-modules (guix build utils))
663 (let* ((bash (assoc-ref %build-inputs "bash"))
664 (jamvm (assoc-ref %build-inputs "jamvm"))
665 (classpath (assoc-ref %build-inputs "classpath"))
666 (bin (string-append (assoc-ref %outputs "out")
667 "/bin/")))
668 (mkdir-p bin)
669 (for-each (lambda (tool)
670 (with-output-to-file (string-append bin tool)
671 (lambda _
672 ,@(if (string-prefix? "armhf" (or (%current-system)
673 (%current-target-system)))
674 `((format #t "#!~a/bin/sh
675 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
676 gnu.classpath.tools.~a.~a $@"
677 bash jamvm classpath tool
678 (if (string=? "native2ascii" tool)
679 "Native2ASCII" "Main")))
680 `((format #t "#!~a/bin/sh
681 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
682 gnu.classpath.tools.~a.~a $@"
683 bash jamvm classpath tool
684 (if (string=? "native2ascii" tool)
685 "Native2ASCII" "Main"))))))
686 (chmod (string-append bin tool) #o755))
687 (list "javah"
688 "rmic"
689 "rmid"
690 "orbd"
691 "rmiregistry"
692 "native2ascii"))
693 #t))))
694 (native-inputs
695 `(("bash" ,bash)
696 ("jamvm" ,jamvm-1-bootstrap)
697 ("classpath" ,classpath-0.99)))
698 (inputs '())
699 (synopsis "Executables from GNU Classpath")
700 (description "This package provides wrappers around the tools provided by
701 the GNU Classpath library. They are executed by the JamVM virtual
702 machine.")))
703
704 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
705 ;; then Classpath has gained much more support for Java 1.6.
706 (define-public classpath-devel
707 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
708 (revision "1"))
709 (package (inherit classpath-bootstrap)
710 (version (string-append "0.99-" revision "." (string-take commit 9)))
711 (source (origin
712 (method git-fetch)
713 (uri (git-reference
714 (url "https://git.savannah.gnu.org/git/classpath.git")
715 (commit commit)))
716 (file-name (string-append "classpath-" version "-checkout"))
717 (sha256
718 (base32
719 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
720 (patches (search-patches "classpath-aarch64-support.patch"))))
721 (arguments
722 `(#:make-flags
723 ;; Ensure that the initial heap size is smaller than the maximum
724 ;; size. By default only Xmx is set, which can lead to invalid
725 ;; memory settings on some machines with a lot of memory.
726 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
727 #:configure-flags
728 (list (string-append "--with-ecj-jar="
729 (assoc-ref %build-inputs "ecj-bootstrap")
730 "/share/java/ecj-bootstrap.jar")
731 (string-append "--with-javac="
732 (assoc-ref %build-inputs "ecj-javac-wrapper")
733 "/bin/javac")
734 (string-append "JAVA="
735 (assoc-ref %build-inputs "jamvm")
736 "/bin/jamvm")
737 "GCJ_JAVAC_TRUE=no"
738 "ac_cv_prog_java_works=yes" ; trust me
739 "--disable-Werror"
740 "--disable-gmp"
741 "--disable-gtk-peer"
742 "--disable-gconf-peer"
743 "--disable-plugin"
744 "--disable-dssi"
745 "--disable-alsa"
746 "--disable-gjdoc")
747 #:phases
748 (modify-phases %standard-phases
749 ;; XXX The bootstrap phase executes autogen.sh, which fails after
750 ;; complaining about the lack of gettext.
751 (replace 'bootstrap
752 (lambda _ (invoke "autoreconf" "-vif")))
753 (add-after 'unpack 'remove-unsupported-annotations
754 (lambda _
755 (substitute* (find-files "java" "\\.java$")
756 (("@Override") ""))
757 #t))
758 (add-after 'install 'install-data
759 (lambda _ (invoke "make" "install-data"))))))
760 (native-inputs
761 `(("autoconf" ,autoconf)
762 ("automake" ,automake)
763 ("libtool" ,libtool)
764 ("gettext" ,gettext-minimal)
765 ("texinfo" ,texinfo)
766 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
767 ("ecj-bootstrap" ,ecj-bootstrap)
768 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
769 ("fastjar" ,fastjar)
770 ("jamvm" ,jamvm-1-bootstrap)
771 ("libltdl" ,libltdl)
772 ("pkg-config" ,pkg-config))))))
773
774 (define jamvm
775 (package (inherit jamvm-1-bootstrap)
776 (version "2.0.0")
777 (source (origin
778 (method url-fetch)
779 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
780 "JamVM%20" version "/jamvm-"
781 version ".tar.gz"))
782 (sha256
783 (base32
784 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
785 (patches
786 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
787 "jamvm-2.0.0-opcode-guard.patch"
788 "jamvm-2.0.0-aarch64-support.patch"))
789 (snippet
790 '(begin
791 ;; Remove precompiled software.
792 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
793 #t))))
794 (build-system gnu-build-system)
795 (arguments
796 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
797 ((#:configure-flags _)
798 '(list (string-append "--with-classpath-install-dir="
799 (assoc-ref %build-inputs "classpath"))))))
800 (inputs
801 `(("classpath" ,classpath-devel)
802 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
803 ("zip" ,zip)
804 ("zlib" ,zlib)))))
805
806 (define ecj-javac-wrapper-final
807 (package (inherit ecj-javac-wrapper)
808 (native-inputs
809 `(("guile" ,guile-2.2)
810 ("ecj-bootstrap" ,ecj-bootstrap)
811 ("jamvm" ,jamvm)
812 ("classpath" ,classpath-devel)))))
813
814 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
815 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
816 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
817 ;; which uses Java 6 only.
818 (define-public icedtea-6
819 (package
820 (name "icedtea")
821 (version "1.13.13")
822 (source (origin
823 (method url-fetch)
824 (uri (string-append
825 "http://icedtea.wildebeest.org/download/source/icedtea6-"
826 version ".tar.xz"))
827 (sha256
828 (base32
829 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
830 (modules '((guix build utils)))
831 (snippet
832 '(begin
833 (substitute* "Makefile.in"
834 ;; do not leak information about the build host
835 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
836 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
837 #t))))
838 (build-system gnu-build-system)
839 (outputs '("out" ; Java Runtime Environment
840 "jdk" ; Java Development Kit
841 "doc")) ; all documentation
842 (arguments
843 `(;; There are many failing tests and many are known to fail upstream.
844 #:tests? #f
845
846 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
847 ;; gremlin) doesn't support it yet, so skip this phase.
848 #:validate-runpath? #f
849
850 #:modules ((guix build utils)
851 (guix build gnu-build-system)
852 (srfi srfi-19))
853
854 #:configure-flags
855 `("--enable-bootstrap"
856 "--enable-nss"
857 "--without-rhino"
858 "--with-parallel-jobs"
859 "--disable-downloading"
860 "--disable-tests"
861 ,(string-append "--with-ecj="
862 (assoc-ref %build-inputs "ecj")
863 "/share/java/ecj-bootstrap.jar")
864 ,(string-append "--with-jar="
865 (assoc-ref %build-inputs "fastjar")
866 "/bin/fastjar")
867 ,(string-append "--with-jdk-home="
868 (assoc-ref %build-inputs "classpath"))
869 ,(string-append "--with-java="
870 (assoc-ref %build-inputs "jamvm")
871 "/bin/jamvm"))
872 #:phases
873 (modify-phases %standard-phases
874 (replace 'unpack
875 (lambda* (#:key source inputs #:allow-other-keys)
876 (invoke "tar" "xvf" source)
877 (chdir (string-append "icedtea6-" ,version))
878 (mkdir "openjdk")
879 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
880 ;; The convenient OpenJDK source bundle is no longer
881 ;; available for download, so we have to take the sources
882 ;; from the Mercurial repositories and change the Makefile
883 ;; to avoid tests for the OpenJDK zip archive.
884 (with-directory-excursion "openjdk"
885 (for-each (lambda (part)
886 (mkdir part)
887 (copy-recursively
888 (assoc-ref inputs
889 (string-append part "-src"))
890 part))
891 '("jdk" "corba"
892 "langtools" "jaxp" "jaxws")))
893 (with-directory-excursion "openjdk"
894 (invoke "tar" "xvf" (assoc-ref inputs "hotspot-src"))
895 (rename-file "hg-checkout" "hotspot"))
896 (substitute* "patches/freetypeversion.patch"
897 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
898 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
899 (substitute* "Makefile.in"
900 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
901 "echo \"trust me\";")
902 ;; The contents of the bootstrap directory must be
903 ;; writeable but when copying from the store they are
904 ;; not.
905 (("mkdir -p lib/rt" line)
906 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
907 (invoke "chmod" "-R" "u+w" "openjdk")))
908 (add-after 'unpack 'use-classpath
909 (lambda* (#:key inputs #:allow-other-keys)
910 (let ((jvmlib (assoc-ref inputs "classpath"))
911 (jamvm (assoc-ref inputs "jamvm")))
912 ;; Classpath does not provide rt.jar.
913 (substitute* "Makefile.in"
914 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
915 (string-append jvmlib "/share/classpath/glibj.zip")))
916 ;; Make sure we can find all classes.
917 (setenv "CLASSPATH"
918 (string-append jvmlib "/share/classpath/glibj.zip:"
919 jvmlib "/share/classpath/tools.zip:"
920 jamvm "/lib/rt.jar"))
921 (setenv "JAVACFLAGS"
922 (string-append "-cp "
923 jvmlib "/share/classpath/glibj.zip:"
924 jvmlib "/share/classpath/tools.zip")))
925 #t))
926 (add-after 'unpack 'patch-patches
927 (lambda _
928 ;; shebang in patches so that they apply cleanly
929 (substitute* '("patches/jtreg-jrunscript.patch"
930 "patches/hotspot/hs23/drop_unlicensed_test.patch")
931 (("#!/bin/sh") (string-append "#!" (which "sh"))))
932 #t))
933 (add-after 'unpack 'patch-paths
934 (lambda* (#:key inputs #:allow-other-keys)
935 ;; buildtree.make generates shell scripts, so we need to replace
936 ;; the generated shebang
937 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
938 (("/bin/sh") (which "bash")))
939
940 (let ((corebin (string-append
941 (assoc-ref inputs "coreutils") "/bin/"))
942 (binbin (string-append
943 (assoc-ref inputs "binutils") "/bin/"))
944 (grepbin (string-append
945 (assoc-ref inputs "grep") "/bin/")))
946 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
947 "openjdk/corba/make/common/shared/Defs-linux.gmk")
948 (("UNIXCOMMAND_PATH = /bin/")
949 (string-append "UNIXCOMMAND_PATH = " corebin))
950 (("USRBIN_PATH = /usr/bin/")
951 (string-append "USRBIN_PATH = " corebin))
952 (("DEVTOOLS_PATH *= */usr/bin/")
953 (string-append "DEVTOOLS_PATH = " corebin))
954 (("COMPILER_PATH *= */usr/bin/")
955 (string-append "COMPILER_PATH = "
956 (assoc-ref inputs "gcc") "/bin/"))
957 (("DEF_OBJCOPY *=.*objcopy")
958 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
959
960 ;; fix path to alsa header
961 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
962 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
963 (string-append "ALSA_INCLUDE="
964 (assoc-ref inputs "alsa-lib")
965 "/include/alsa/version.h")))
966
967 ;; fix hard-coded utility paths
968 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
969 "openjdk/corba/make/common/shared/Defs-utils.gmk")
970 (("ECHO *=.*echo")
971 (string-append "ECHO = " (which "echo")))
972 (("^GREP *=.*grep")
973 (string-append "GREP = " (which "grep")))
974 (("EGREP *=.*egrep")
975 (string-append "EGREP = " (which "egrep")))
976 (("CPIO *=.*cpio")
977 (string-append "CPIO = " (which "cpio")))
978 (("READELF *=.*readelf")
979 (string-append "READELF = " (which "readelf")))
980 (("^ *AR *=.*ar")
981 (string-append "AR = " (which "ar")))
982 (("^ *TAR *=.*tar")
983 (string-append "TAR = " (which "tar")))
984 (("AS *=.*as")
985 (string-append "AS = " (which "as")))
986 (("LD *=.*ld")
987 (string-append "LD = " (which "ld")))
988 (("STRIP *=.*strip")
989 (string-append "STRIP = " (which "strip")))
990 (("NM *=.*nm")
991 (string-append "NM = " (which "nm")))
992 (("^SH *=.*sh")
993 (string-append "SH = " (which "bash")))
994 (("^FIND *=.*find")
995 (string-append "FIND = " (which "find")))
996 (("LDD *=.*ldd")
997 (string-append "LDD = " (which "ldd")))
998 (("NAWK *=.*(n|g)awk")
999 (string-append "NAWK = " (which "gawk")))
1000 (("XARGS *=.*xargs")
1001 (string-append "XARGS = " (which "xargs")))
1002 (("UNZIP *=.*unzip")
1003 (string-append "UNZIP = " (which "unzip")))
1004 (("ZIPEXE *=.*zip")
1005 (string-append "ZIPEXE = " (which "zip")))
1006 (("SED *=.*sed")
1007 (string-append "SED = " (which "sed"))))
1008
1009 ;; Some of these timestamps cause problems as they are more than
1010 ;; 10 years ago, failing the build process.
1011 (substitute*
1012 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1013 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1014 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1015 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1016 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1017 #t)))
1018 (add-before 'configure 'set-additional-paths
1019 (lambda* (#:key inputs #:allow-other-keys)
1020 (setenv "CPATH"
1021 (string-append (assoc-ref inputs "libxrender")
1022 "/include/X11/extensions" ":"
1023 (assoc-ref inputs "libxtst")
1024 "/include/X11/extensions" ":"
1025 (assoc-ref inputs "libxinerama")
1026 "/include/X11/extensions" ":"
1027 (or (getenv "CPATH") "")))
1028 (setenv "ALT_CUPS_HEADERS_PATH"
1029 (string-append (assoc-ref inputs "cups")
1030 "/include"))
1031 (setenv "ALT_FREETYPE_HEADERS_PATH"
1032 (string-append (assoc-ref inputs "freetype")
1033 "/include"))
1034 (setenv "ALT_FREETYPE_LIB_PATH"
1035 (string-append (assoc-ref inputs "freetype")
1036 "/lib"))
1037 #t))
1038 (add-before 'build 'disable-os-version-check
1039 ;; allow build on linux major version change
1040 (lambda _
1041 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1042 #t))
1043 (replace 'install
1044 (lambda* (#:key outputs #:allow-other-keys)
1045 (let ((doc (string-append (assoc-ref outputs "doc")
1046 "/share/doc/icedtea"))
1047 (jre (assoc-ref outputs "out"))
1048 (jdk (assoc-ref outputs "jdk")))
1049 (copy-recursively "openjdk.build/docs" doc)
1050 (copy-recursively "openjdk.build/j2re-image" jre)
1051 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1052 #t)))))
1053 (native-inputs
1054 `(("ant" ,ant-bootstrap)
1055 ("alsa-lib" ,alsa-lib)
1056 ("attr" ,attr)
1057 ("classpath" ,classpath-devel)
1058 ("coreutils" ,coreutils)
1059 ("cpio" ,cpio)
1060 ("cups" ,cups)
1061 ("ecj" ,ecj-bootstrap)
1062 ("ecj-javac" ,ecj-javac-wrapper-final)
1063 ("fastjar" ,fastjar)
1064 ("fontconfig" ,fontconfig)
1065 ("freetype" ,freetype)
1066 ("gtk" ,gtk+-2)
1067 ("gawk" ,gawk)
1068 ("giflib" ,giflib)
1069 ("grep" ,grep)
1070 ("jamvm" ,jamvm)
1071 ("lcms" ,lcms)
1072 ("libjpeg" ,libjpeg-turbo)
1073 ("libnsl" ,libnsl)
1074 ("libpng" ,libpng)
1075 ("libtool" ,libtool)
1076 ("libx11" ,libx11)
1077 ("libxcomposite" ,libxcomposite)
1078 ("libxi" ,libxi)
1079 ("libxinerama" ,libxinerama)
1080 ("libxrender" ,libxrender)
1081 ("libxslt" ,libxslt) ;for xsltproc
1082 ("libxt" ,libxt)
1083 ("libxtst" ,libxtst)
1084 ("mit-krb5" ,mit-krb5)
1085 ("nss" ,nss)
1086 ("nss-certs" ,nss-certs)
1087 ("perl" ,perl)
1088 ("pkg-config" ,pkg-config)
1089 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1090 ("unzip" ,unzip)
1091 ("wget" ,wget)
1092 ("which" ,which)
1093 ("zip" ,zip)
1094 ("zlib" ,zlib)
1095 ("openjdk-src"
1096 ,(origin
1097 (method hg-fetch)
1098 (uri (hg-reference
1099 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1100 (changeset "jdk6-b41")))
1101 (sha256
1102 (base32
1103 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1104 ("jdk-src"
1105 ,(origin
1106 (method hg-fetch)
1107 (uri (hg-reference
1108 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1109 (changeset "jdk6-b41")))
1110 (sha256
1111 (base32
1112 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1113 ("hotspot-src"
1114 ,(origin
1115 (method hg-fetch)
1116 (uri (hg-reference
1117 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1118 (changeset "jdk6-b41")))
1119 (sha256
1120 (base32
1121 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))
1122 (patches
1123 (search-patches "icedtea-6-hotspot-gcc-segfault-workaround.patch"))))
1124 ("corba-src"
1125 ,(origin
1126 (method hg-fetch)
1127 (uri (hg-reference
1128 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1129 (changeset "jdk6-b41")))
1130 (sha256
1131 (base32
1132 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1133 ("langtools-src"
1134 ,(origin
1135 (method hg-fetch)
1136 (uri (hg-reference
1137 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1138 (changeset "jdk6-b41")))
1139 (sha256
1140 (base32
1141 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1142 ("jaxp-src"
1143 ,(origin
1144 (method hg-fetch)
1145 (uri (hg-reference
1146 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1147 (changeset "jdk6-b41")))
1148 (sha256
1149 (base32
1150 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1151 ("jaxws-src"
1152 ,(origin
1153 (method hg-fetch)
1154 (uri (hg-reference
1155 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1156 (changeset "jdk6-b41")))
1157 (sha256
1158 (base32
1159 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1160 (home-page "http://icedtea.classpath.org")
1161 (synopsis "Java development kit")
1162 (description
1163 "This package provides the OpenJDK built with the IcedTea build harness.
1164 This version of the OpenJDK is no longer maintained and is only used for
1165 bootstrapping purposes.")
1166 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1167 ;; same license as both GNU Classpath and OpenJDK.
1168 (license license:gpl2+)))
1169
1170 (define-public icedtea-7
1171 (let* ((version "2.6.13")
1172 (drop (lambda (name hash)
1173 (origin
1174 (method url-fetch)
1175 (uri (string-append
1176 "http://icedtea.classpath.org/download/drops"
1177 "/icedtea7/" version "/" name ".tar.bz2"))
1178 (sha256 (base32 hash))))))
1179 (package
1180 (name "icedtea")
1181 (version version)
1182 (source (origin
1183 (method url-fetch)
1184 (uri (string-append
1185 "http://icedtea.wildebeest.org/download/source/icedtea-"
1186 version ".tar.xz"))
1187 (sha256
1188 (base32
1189 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1190 (modules '((guix build utils)))
1191 (snippet
1192 '(begin
1193 (substitute* "Makefile.in"
1194 ;; do not leak information about the build host
1195 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1196 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1197 #t))))
1198 (build-system gnu-build-system)
1199 (outputs '("out" ; Java Runtime Environment
1200 "jdk" ; Java Development Kit
1201 "doc")) ; all documentation
1202 (arguments
1203 `(;; There are many test failures. Some are known to
1204 ;; fail upstream, others relate to not having an X
1205 ;; server running at test time, yet others are a
1206 ;; complete mystery to me.
1207
1208 ;; hotspot: passed: 241; failed: 45; error: 2
1209 ;; langtools: passed: 1,934; failed: 26
1210 ;; jdk: unknown
1211 #:tests? #f
1212
1213 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1214 ;; gremlin) doesn't support it yet, so skip this phase.
1215 #:validate-runpath? #f
1216
1217 ;; Apparently, the C locale is needed for some of the tests.
1218 #:locale "C"
1219
1220 #:modules ((guix build utils)
1221 (guix build gnu-build-system)
1222 (ice-9 match)
1223 (ice-9 popen)
1224 (srfi srfi-19)
1225 (srfi srfi-26))
1226
1227 #:configure-flags
1228 ;; TODO: package pcsc and sctp, and add to inputs
1229 `("--disable-system-pcsc"
1230 "--disable-system-sctp"
1231 "--enable-bootstrap"
1232 "--enable-nss"
1233 "--without-rhino"
1234 "--disable-downloading"
1235 "--disable-tests" ;they are run in the check phase instead
1236 "--with-openjdk-src-dir=./openjdk.src"
1237 ,(string-append "--with-jdk-home="
1238 (assoc-ref %build-inputs "jdk")))
1239
1240 #:phases
1241 (modify-phases %standard-phases
1242 (replace 'unpack
1243 (lambda* (#:key source inputs #:allow-other-keys)
1244 (let ((target (string-append "icedtea-" ,version))
1245 (unpack (lambda* (name #:optional dir)
1246 (let ((dir (or dir
1247 (string-drop-right name 5))))
1248 (mkdir dir)
1249 (invoke "tar" "xvf"
1250 (assoc-ref inputs name)
1251 "-C" dir
1252 "--strip-components=1")))))
1253 (mkdir target)
1254 (invoke "tar" "xvf" source
1255 "-C" target "--strip-components=1")
1256 (chdir target)
1257 (unpack "openjdk-src" "openjdk.src")
1258 (with-directory-excursion "openjdk.src"
1259 (for-each unpack
1260 (filter (cut string-suffix? "-drop" <>)
1261 (map (match-lambda
1262 ((name . _) name))
1263 inputs))))
1264 #t)))
1265 (add-after 'unpack 'patch-bitrot
1266 (lambda _
1267 (substitute* '("patches/boot/revert-6973616.patch"
1268 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1269 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1270 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1271 ;; As of attr 2.4.48 this header is no longer
1272 ;; included. It is provided by the libc instead.
1273 (substitute* '("configure"
1274 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1275 (("attr/xattr.h") "sys/xattr.h"))
1276 #t))
1277 (add-after 'unpack 'fix-x11-extension-include-path
1278 (lambda* (#:key inputs #:allow-other-keys)
1279 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1280 (((string-append "\\$\\(firstword \\$\\(wildcard "
1281 "\\$\\(OPENWIN_HOME\\)"
1282 "/include/X11/extensions\\).*$"))
1283 (string-append (assoc-ref inputs "libxrender")
1284 "/include/X11/extensions"
1285 " -I" (assoc-ref inputs "libxtst")
1286 "/include/X11/extensions"
1287 " -I" (assoc-ref inputs "libxinerama")
1288 "/include/X11/extensions"))
1289 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1290 #t))
1291 (add-after 'unpack 'patch-paths
1292 (lambda _
1293 ;; buildtree.make generates shell scripts, so we need to replace
1294 ;; the generated shebang
1295 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1296 (("/bin/sh") (which "bash")))
1297
1298 (let ((corebin (string-append
1299 (assoc-ref %build-inputs "coreutils") "/bin/"))
1300 (binbin (string-append
1301 (assoc-ref %build-inputs "binutils") "/bin/"))
1302 (grepbin (string-append
1303 (assoc-ref %build-inputs "grep") "/bin/")))
1304 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1305 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1306 (("UNIXCOMMAND_PATH = /bin/")
1307 (string-append "UNIXCOMMAND_PATH = " corebin))
1308 (("USRBIN_PATH = /usr/bin/")
1309 (string-append "USRBIN_PATH = " corebin))
1310 (("DEVTOOLS_PATH *= */usr/bin/")
1311 (string-append "DEVTOOLS_PATH = " corebin))
1312 (("COMPILER_PATH *= */usr/bin/")
1313 (string-append "COMPILER_PATH = "
1314 (assoc-ref %build-inputs "gcc") "/bin/"))
1315 (("DEF_OBJCOPY *=.*objcopy")
1316 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1317
1318 ;; fix path to alsa header
1319 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1320 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1321 (string-append "ALSA_INCLUDE="
1322 (assoc-ref %build-inputs "alsa-lib")
1323 "/include/alsa/version.h")))
1324
1325 ;; fix hard-coded utility paths
1326 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1327 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1328 (("ECHO *=.*echo")
1329 (string-append "ECHO = " (which "echo")))
1330 (("^GREP *=.*grep")
1331 (string-append "GREP = " (which "grep")))
1332 (("EGREP *=.*egrep")
1333 (string-append "EGREP = " (which "egrep")))
1334 (("CPIO *=.*cpio")
1335 (string-append "CPIO = " (which "cpio")))
1336 (("READELF *=.*readelf")
1337 (string-append "READELF = " (which "readelf")))
1338 (("^ *AR *=.*ar")
1339 (string-append "AR = " (which "ar")))
1340 (("^ *TAR *=.*tar")
1341 (string-append "TAR = " (which "tar")))
1342 (("AS *=.*as")
1343 (string-append "AS = " (which "as")))
1344 (("LD *=.*ld")
1345 (string-append "LD = " (which "ld")))
1346 (("STRIP *=.*strip")
1347 (string-append "STRIP = " (which "strip")))
1348 (("NM *=.*nm")
1349 (string-append "NM = " (which "nm")))
1350 (("^SH *=.*sh")
1351 (string-append "SH = " (which "bash")))
1352 (("^FIND *=.*find")
1353 (string-append "FIND = " (which "find")))
1354 (("LDD *=.*ldd")
1355 (string-append "LDD = " (which "ldd")))
1356 (("NAWK *=.*(n|g)awk")
1357 (string-append "NAWK = " (which "gawk")))
1358 (("XARGS *=.*xargs")
1359 (string-append "XARGS = " (which "xargs")))
1360 (("UNZIP *=.*unzip")
1361 (string-append "UNZIP = " (which "unzip")))
1362 (("ZIPEXE *=.*zip")
1363 (string-append "ZIPEXE = " (which "zip")))
1364 (("SED *=.*sed")
1365 (string-append "SED = " (which "sed"))))
1366
1367 ;; Some of these timestamps cause problems as they are more than
1368 ;; 10 years ago, failing the build process.
1369 (substitute*
1370 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1371 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1372 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1373 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1374 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1375 #t))
1376 (add-before 'configure 'set-additional-paths
1377 (lambda* (#:key inputs #:allow-other-keys)
1378 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1379 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1380 (string-append "ALSA_INCLUDE="
1381 (assoc-ref inputs "alsa-lib")
1382 "/include/alsa/version.h")))
1383 (setenv "CC" "gcc")
1384 (setenv "CPATH"
1385 (string-append (assoc-ref inputs "libxcomposite")
1386 "/include/X11/extensions" ":"
1387 (assoc-ref inputs "libxrender")
1388 "/include/X11/extensions" ":"
1389 (assoc-ref inputs "libxtst")
1390 "/include/X11/extensions" ":"
1391 (assoc-ref inputs "libxinerama")
1392 "/include/X11/extensions" ":"
1393 (or (getenv "CPATH") "")))
1394 (setenv "ALT_OBJCOPY" (which "objcopy"))
1395 (setenv "ALT_CUPS_HEADERS_PATH"
1396 (string-append (assoc-ref inputs "cups")
1397 "/include"))
1398 (setenv "ALT_FREETYPE_HEADERS_PATH"
1399 (string-append (assoc-ref inputs "freetype")
1400 "/include"))
1401 (setenv "ALT_FREETYPE_LIB_PATH"
1402 (string-append (assoc-ref inputs "freetype")
1403 "/lib"))
1404 #t))
1405 (add-before 'build 'disable-os-version-check
1406 ;; allow build on linux major version change
1407 (lambda _
1408 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1409 #t))
1410 (add-before 'check 'fix-test-framework
1411 (lambda _
1412 ;; Fix PATH in test environment
1413 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1414 (("PATH=/bin:/usr/bin")
1415 (string-append "PATH=" (getenv "PATH"))))
1416 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1417 (("/usr/bin/env") (which "env")))
1418 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1419 (("/bin/rm") (which "rm"))
1420 (("/bin/cp") (which "cp"))
1421 (("/bin/mv") (which "mv")))
1422 #t))
1423 (add-before 'check 'fix-hotspot-tests
1424 (lambda _
1425 (with-directory-excursion "openjdk.src/hotspot/test/"
1426 (substitute* "jprt.config"
1427 (("PATH=\"\\$\\{path4sdk\\}\"")
1428 (string-append "PATH=" (getenv "PATH")))
1429 (("make=/usr/bin/make")
1430 (string-append "make=" (which "make"))))
1431 (substitute* '("runtime/6626217/Test6626217.sh"
1432 "runtime/7110720/Test7110720.sh")
1433 (("/bin/rm") (which "rm"))
1434 (("/bin/cp") (which "cp"))
1435 (("/bin/mv") (which "mv"))))
1436 #t))
1437 (add-before 'check 'fix-jdk-tests
1438 (lambda _
1439 (with-directory-excursion "openjdk.src/jdk/test/"
1440 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1441 (("/bin/pwd") (which "pwd")))
1442 (substitute* "com/sun/jdi/ShellScaffold.sh"
1443 (("/bin/kill") (which "kill")))
1444 (substitute* "start-Xvfb.sh"
1445 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1446 (("/usr/bin/nohup") (which "nohup")))
1447 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1448 (("/bin/rm") (which "rm")))
1449 (substitute* "tools/launcher/MultipleJRE.sh"
1450 (("echo \"#!/bin/sh\"")
1451 (string-append "echo \"#!" (which "rm") "\""))
1452 (("/usr/bin/zip") (which "zip")))
1453 (substitute* "com/sun/jdi/OnThrowTest.java"
1454 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1455 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1456 (("/usr/bin/uptime") (which "uptime")))
1457 (substitute* "java/lang/ProcessBuilder/Basic.java"
1458 (("/usr/bin/env") (which "env"))
1459 (("/bin/false") (which "false"))
1460 (("/bin/true") (which "true"))
1461 (("/bin/cp") (which "cp"))
1462 (("/bin/sh") (which "sh")))
1463 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1464 (("/bin/sh") (which "sh")))
1465 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1466 (("/usr/bin/perl") (which "perl"))
1467 (("/bin/ps") (which "ps"))
1468 (("/bin/true") (which "true")))
1469 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1470 (("/usr/bin/tee") (which "tee")))
1471 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1472 (("/bin/true") (which "true")))
1473 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1474 (("/bin/cat") (which "cat")))
1475 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1476 (("/bin/sh") (which "sh"))
1477 (("/bin/true") (which "true"))
1478 (("/bin/kill") (which "kill")))
1479 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1480 (("/usr/bin/echo") (which "echo")))
1481 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1482 (("/usr/bin/cat") (which "cat")))
1483 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1484 (("/bin/cat") (which "cat"))
1485 (("/bin/sleep") (which "sleep"))
1486 (("/bin/sh") (which "sh")))
1487 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1488 (("/bin/cat") (which "cat")))
1489 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1490 (("/bin/chmod") (which "chmod")))
1491 (substitute* "java/util/zip/ZipFile/Assortment.java"
1492 (("/bin/sh") (which "sh"))))
1493 #t))
1494 (replace 'check
1495 (lambda _
1496 ;; The "make check-*" targets always return zero, so we need to
1497 ;; check for errors in the associated log files to determine
1498 ;; whether any tests have failed.
1499 (use-modules (ice-9 rdelim))
1500 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1501 (checker (lambda (port)
1502 (let loop ()
1503 (let ((line (read-line port)))
1504 (cond
1505 ((eof-object? line) #t)
1506 ((regexp-exec error-pattern line)
1507 (error "test failed"))
1508 (else (loop)))))))
1509 (run-test (lambda (test)
1510 (invoke "make" test)
1511 (call-with-input-file
1512 (string-append "test/" test ".log")
1513 checker))))
1514 (when #f ; skip tests
1515 (run-test "check-hotspot")
1516 (run-test "check-langtools")
1517 (run-test "check-jdk"))
1518 #t)))
1519 (replace 'install
1520 (lambda* (#:key outputs #:allow-other-keys)
1521 (let ((doc (string-append (assoc-ref outputs "doc")
1522 "/share/doc/icedtea"))
1523 (jre (assoc-ref outputs "out"))
1524 (jdk (assoc-ref outputs "jdk")))
1525 (copy-recursively "openjdk.build/docs" doc)
1526 (copy-recursively "openjdk.build/j2re-image" jre)
1527 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1528 #t))
1529 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1530 ;; But that shared object is located in the server/ folder, so it
1531 ;; cannot be found. This phase creates a symbolic link in the
1532 ;; lib/amd64 folder so that the other libraries can find it.
1533 ;;
1534 ;; See:
1535 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1536 ;;
1537 ;; FIXME: Find the bug in the build system, so that this symlink is
1538 ;; not needed.
1539 (add-after 'install 'install-libjvm
1540 (lambda* (#:key inputs outputs #:allow-other-keys)
1541 (let* ((lib-path (string-append (assoc-ref outputs "out")
1542 ;; See 'INSTALL_ARCH_DIR' in
1543 ;; 'configure'.
1544 ,(match (%current-system)
1545 ("i686-linux"
1546 "/lib/i386")
1547 ("x86_64-linux"
1548 "/lib/amd64")
1549 ("armhf-linux"
1550 "/lib/arm")
1551 ("aarch64-linux"
1552 "/lib/aarch64")
1553 ;; We need a catch-all, dropping
1554 ;; '-linux' works in most cases.
1555 (_
1556 (string-append
1557 "/lib/"
1558 (string-drop-right
1559 (%current-system) 6)))))))
1560 (symlink (string-append lib-path "/server/libjvm.so")
1561 (string-append lib-path "/libjvm.so")))
1562 #t))
1563 ;; By default IcedTea only generates an empty keystore. In order to
1564 ;; be able to use certificates in Java programs we need to generate a
1565 ;; keystore from a set of certificates. For convenience we use the
1566 ;; certificates from the nss-certs package.
1567 (add-after 'install 'install-keystore
1568 (lambda* (#:key inputs outputs #:allow-other-keys)
1569 (let* ((keystore "cacerts")
1570 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1571 "/etc/ssl/certs"))
1572 (keytool (string-append (assoc-ref outputs "jdk")
1573 "/bin/keytool")))
1574 (define (extract-cert file target)
1575 (call-with-input-file file
1576 (lambda (in)
1577 (call-with-output-file target
1578 (lambda (out)
1579 (let loop ((line (read-line in 'concat))
1580 (copying? #f))
1581 (cond
1582 ((eof-object? line) #t)
1583 ((string-prefix? "-----BEGIN" line)
1584 (display line out)
1585 (loop (read-line in 'concat) #t))
1586 ((string-prefix? "-----END" line)
1587 (display line out)
1588 #t)
1589 (else
1590 (when copying? (display line out))
1591 (loop (read-line in 'concat) copying?)))))))))
1592 (define (import-cert cert)
1593 (format #t "Importing certificate ~a\n" (basename cert))
1594 (let ((temp "tmpcert"))
1595 (extract-cert cert temp)
1596 (let ((port (open-pipe* OPEN_WRITE keytool
1597 "-import"
1598 "-alias" (basename cert)
1599 "-keystore" keystore
1600 "-storepass" "changeit"
1601 "-file" temp)))
1602 (display "yes\n" port)
1603 (when (not (zero? (status:exit-val (close-pipe port))))
1604 (format #t "failed to import ~a\n" cert)))
1605 (delete-file temp)))
1606
1607 ;; This is necessary because the certificate directory contains
1608 ;; files with non-ASCII characters in their names.
1609 (setlocale LC_ALL "en_US.utf8")
1610 (setenv "LC_ALL" "en_US.utf8")
1611
1612 (for-each import-cert (find-files certs-dir "\\.pem$"))
1613 (mkdir-p (string-append (assoc-ref outputs "out")
1614 "/lib/security"))
1615 (mkdir-p (string-append (assoc-ref outputs "jdk")
1616 "/jre/lib/security"))
1617
1618 ;; The cacerts files we are going to overwrite are chmod'ed as
1619 ;; read-only (444) in icedtea-8 (which derives from this
1620 ;; package). We have to change this so we can overwrite them.
1621 (chmod (string-append (assoc-ref outputs "out")
1622 "/lib/security/" keystore) #o644)
1623 (chmod (string-append (assoc-ref outputs "jdk")
1624 "/jre/lib/security/" keystore) #o644)
1625
1626 (install-file keystore
1627 (string-append (assoc-ref outputs "out")
1628 "/lib/security"))
1629 (install-file keystore
1630 (string-append (assoc-ref outputs "jdk")
1631 "/jre/lib/security"))
1632 #t))))))
1633 (native-inputs
1634 `(("openjdk-src"
1635 ,(drop "openjdk"
1636 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1637 ("corba-drop"
1638 ,(drop "corba"
1639 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1640 ("jaxp-drop"
1641 ,(drop "jaxp"
1642 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1643 ("jaxws-drop"
1644 ,(drop "jaxws"
1645 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1646 ("jdk-drop"
1647 ,(drop "jdk"
1648 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1649 ("langtools-drop"
1650 ,(drop "langtools"
1651 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1652 ("hotspot-drop"
1653 ,(origin
1654 (method url-fetch)
1655 (uri (string-append
1656 "http://icedtea.classpath.org/downloads/drops"
1657 "/icedtea7/" version "/hotspot.tar.bz2"))
1658 (sha256
1659 (base32
1660 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1661 (patches (search-patches
1662 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1663 ("ant" ,ant-bootstrap)
1664 ("attr" ,attr)
1665 ("coreutils" ,coreutils)
1666 ("diffutils" ,diffutils) ;for tests
1667 ("gawk" ,gawk)
1668 ("grep" ,grep)
1669 ("libtool" ,libtool)
1670 ("pkg-config" ,pkg-config)
1671 ("wget" ,wget)
1672 ("which" ,which)
1673 ("cpio" ,cpio)
1674 ("zip" ,zip)
1675 ("unzip" ,unzip)
1676 ("fastjar" ,fastjar)
1677 ("libxslt" ,libxslt) ;for xsltproc
1678 ("nss-certs" ,nss-certs)
1679 ("perl" ,perl)
1680 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1681 ("jdk" ,icedtea-6 "jdk")))
1682 (inputs
1683 `(("alsa-lib" ,alsa-lib)
1684 ("cups" ,cups)
1685 ("libx11" ,libx11)
1686 ("libxcomposite" ,libxcomposite)
1687 ("libxt" ,libxt)
1688 ("libxtst" ,libxtst)
1689 ("libxi" ,libxi)
1690 ("libxinerama" ,libxinerama)
1691 ("libxrender" ,libxrender)
1692 ("libjpeg" ,libjpeg-turbo)
1693 ("libpng" ,libpng)
1694 ("mit-krb5" ,mit-krb5)
1695 ("nss" ,nss)
1696 ("giflib" ,giflib)
1697 ("fontconfig" ,fontconfig)
1698 ("freetype" ,freetype)
1699 ("lcms" ,lcms)
1700 ("zlib" ,zlib)
1701 ("gtk" ,gtk+-2)))
1702 (home-page "http://icedtea.classpath.org")
1703 (synopsis "Java development kit")
1704 (description
1705 "This package provides the Java development kit OpenJDK built with the
1706 IcedTea build harness.")
1707
1708 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1709 (supported-systems (delete "mips64el-linux" %supported-systems))
1710
1711 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1712 ;; same license as both GNU Classpath and OpenJDK.
1713 (license license:gpl2+))))
1714
1715 (define-public icedtea-8
1716 (let* ((version "3.7.0")
1717 (drop (lambda (name hash)
1718 (origin
1719 (method url-fetch)
1720 (uri (string-append
1721 "http://icedtea.classpath.org/download/drops"
1722 "/icedtea8/" version "/" name ".tar.xz"))
1723 (sha256 (base32 hash))))))
1724 (package (inherit icedtea-7)
1725 (version "3.7.0")
1726 (source (origin
1727 (method url-fetch)
1728 (uri (string-append
1729 "http://icedtea.wildebeest.org/download/source/icedtea-"
1730 version ".tar.xz"))
1731 (sha256
1732 (base32
1733 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1734 (modules '((guix build utils)))
1735 (snippet
1736 '(begin
1737 (substitute* '("configure"
1738 "acinclude.m4")
1739 ;; Do not embed build time
1740 (("(DIST_ID=\"Custom build).*$" _ prefix)
1741 (string-append prefix "\"\n"))
1742 ;; Do not leak information about the build host
1743 (("DIST_NAME=\"\\$build_os\"")
1744 "DIST_NAME=\"guix\""))
1745 #t))))
1746 (arguments
1747 `(#:imported-modules
1748 ((guix build ant-build-system)
1749 (guix build syscalls)
1750 ,@%gnu-build-system-modules)
1751 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1752 ((#:modules modules)
1753 `((guix build utils)
1754 (guix build gnu-build-system)
1755 ((guix build ant-build-system) #:prefix ant:)
1756 (ice-9 match)
1757 (ice-9 popen)
1758 (srfi srfi-19)
1759 (srfi srfi-26)))
1760 ((#:configure-flags flags)
1761 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1762 `( ;;"--disable-bootstrap"
1763 "--enable-bootstrap"
1764 "--enable-nss"
1765 "--disable-downloading"
1766 "--disable-system-pcsc"
1767 "--disable-system-sctp"
1768 "--disable-tests" ;they are run in the check phase instead
1769 "--with-openjdk-src-dir=./openjdk.src"
1770 ,(string-append "--with-jdk-home=" jdk))))
1771 ((#:phases phases)
1772 `(modify-phases ,phases
1773 (delete 'fix-x11-extension-include-path)
1774 (delete 'patch-paths)
1775 (delete 'set-additional-paths)
1776 (delete 'patch-patches)
1777 (delete 'patch-bitrot)
1778 ;; Prevent the keytool from recording the current time when
1779 ;; adding certificates at build time.
1780 (add-after 'unpack 'patch-keystore
1781 (lambda _
1782 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1783 (("date = new Date\\(\\);")
1784 "\
1785 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1786 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1787 new Date();"))
1788 #t))
1789 (add-after 'unpack 'patch-jni-libs
1790 ;; Hardcode dynamically loaded libraries.
1791 (lambda _
1792 (let* ((library-path (search-path-as-string->list
1793 (getenv "LIBRARY_PATH")))
1794 (find-library (lambda (name)
1795 (search-path
1796 library-path
1797 (string-append "lib" name ".so")))))
1798 (for-each
1799 (lambda (file)
1800 (catch 'decoding-error
1801 (lambda ()
1802 (substitute* file
1803 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1804 _ name version)
1805 (format #f "\"~a\"" (find-library name)))
1806 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1807 (format #f "\"~a\"" (find-library name)))))
1808 (lambda _
1809 ;; Those are safe to skip.
1810 (format (current-error-port)
1811 "warning: failed to substitute: ~a~%"
1812 file))))
1813 (find-files "openjdk.src/jdk/src/solaris/native"
1814 "\\.c|\\.h"))
1815 #t)))
1816 (replace 'install
1817 (lambda* (#:key outputs #:allow-other-keys)
1818 (let ((doc (string-append (assoc-ref outputs "doc")
1819 "/share/doc/icedtea"))
1820 (jre (assoc-ref outputs "out"))
1821 (jdk (assoc-ref outputs "jdk")))
1822 (copy-recursively "openjdk.build/docs" doc)
1823 (copy-recursively "openjdk.build/images/j2re-image" jre)
1824 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1825 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1826 ;; support via NSS.
1827 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1828 (string-append jre "/lib/security/nss.cfg"))
1829 #t)))
1830 (add-after 'install 'strip-jar-timestamps
1831 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1832 (native-inputs
1833 `(("jdk" ,icedtea-7 "jdk")
1834 ("openjdk-src"
1835 ,(drop "openjdk"
1836 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1837 ("aarch32-drop"
1838 ,(drop "aarch32"
1839 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1840 ("corba-drop"
1841 ,(drop "corba"
1842 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1843 ("jaxp-drop"
1844 ,(drop "jaxp"
1845 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1846 ("jaxws-drop"
1847 ,(drop "jaxws"
1848 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1849 ("jdk-drop"
1850 ,(drop "jdk"
1851 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1852 ("langtools-drop"
1853 ,(drop "langtools"
1854 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1855 ("hotspot-drop"
1856 ,(origin
1857 (method url-fetch)
1858 (uri (string-append
1859 "http://icedtea.classpath.org/download/drops"
1860 "/icedtea8/" version "/hotspot.tar.xz"))
1861 (sha256
1862 (base32
1863 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1864 (patches (search-patches
1865 "icedtea-7-hotspot-gcc-segfault-workaround.patch"))))
1866 ("nashorn-drop"
1867 ,(drop "nashorn"
1868 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1869 ("shenandoah-drop"
1870 ,(drop "shenandoah"
1871 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1872 ,@(fold alist-delete (package-native-inputs icedtea-7)
1873 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1874 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1875
1876 (define-public openjdk9
1877 (package
1878 (name "openjdk")
1879 (version "9.181")
1880 (source (origin
1881 (method url-fetch)
1882 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1883 (file-name (string-append name "-" version ".tar.bz2"))
1884 (sha256
1885 (base32
1886 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1887 (modules '((guix build utils)))
1888 (snippet
1889 `(begin
1890 (for-each delete-file
1891 (find-files "." ".*.(bin|exe|jar)$"))
1892 #t))))
1893 (build-system gnu-build-system)
1894 (outputs '("out" "jdk" "doc"))
1895 (arguments
1896 `(#:tests? #f; require jtreg
1897 #:make-flags '("all")
1898 #:imported-modules
1899 ((guix build syscalls)
1900 ,@%gnu-build-system-modules)
1901 #:phases
1902 (modify-phases %standard-phases
1903 (add-after 'patch-source-shebangs 'fix-java-shebangs
1904 (lambda _
1905 ;; This file was "fixed" by patch-source-shebangs, but it requires
1906 ;; this exact first line.
1907 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1908 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1909 #t))
1910 (replace 'configure
1911 (lambda* (#:key inputs outputs #:allow-other-keys)
1912 ;; TODO: unbundle libpng and lcms
1913 (invoke "bash" "./configure"
1914 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1915 "--disable-freetype-bundling"
1916 "--disable-warnings-as-errors"
1917 "--disable-hotspot-gtest"
1918 "--with-giflib=system"
1919 "--with-libjpeg=system"
1920 (string-append "--prefix=" (assoc-ref outputs "out")))
1921 #t))
1922 (add-before 'build 'write-source-revision-file
1923 (lambda _
1924 (with-output-to-file ".src-rev"
1925 (lambda _
1926 (display ,version)))
1927 #t))
1928 (replace 'build
1929 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1930 (apply invoke "make"
1931 `(,@(if parallel-build?
1932 (list (string-append "JOBS="
1933 (number->string (parallel-job-count))))
1934 '())
1935 ,@make-flags))))
1936 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1937 ;; But that shared object is located in the server/ folder, so it
1938 ;; cannot be found. This phase creates a symbolic link in the
1939 ;; lib/ folder so that the other libraries can find it.
1940 ;;
1941 ;; See:
1942 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1943 ;;
1944 ;; FIXME: Find the bug in the build system, so that this symlink is
1945 ;; not needed.
1946 (add-after 'install 'install-libjvm
1947 (lambda* (#:key inputs outputs #:allow-other-keys)
1948 (let* ((lib-out (string-append (assoc-ref outputs "out")
1949 "/lib"))
1950 (lib-jdk (string-append (assoc-ref outputs "jdk")
1951 "/lib")))
1952 (symlink (string-append lib-jdk "/server/libjvm.so")
1953 (string-append lib-jdk "/libjvm.so"))
1954 (symlink (string-append lib-out "/server/libjvm.so")
1955 (string-append lib-out "/libjvm.so")))
1956 #t))
1957 (replace 'install
1958 (lambda* (#:key outputs #:allow-other-keys)
1959 (let ((out (assoc-ref outputs "out"))
1960 (jdk (assoc-ref outputs "jdk"))
1961 (doc (assoc-ref outputs "doc"))
1962 (images (car (find-files "build" ".*-server-release"
1963 #:directories? #t))))
1964 (copy-recursively (string-append images "/images/jdk") jdk)
1965 (copy-recursively (string-append images "/images/jre") out)
1966 (copy-recursively (string-append images "/images/docs") doc))
1967 #t))
1968 (add-after 'install 'strip-zip-timestamps
1969 (lambda* (#:key outputs #:allow-other-keys)
1970 (use-modules (guix build syscalls))
1971 (for-each (lambda (zip)
1972 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1973 (with-directory-excursion dir
1974 (invoke "unzip" zip))
1975 (delete-file zip)
1976 (for-each (lambda (file)
1977 (let ((s (lstat file)))
1978 (unless (eq? (stat:type s) 'symlink)
1979 (format #t "reset ~a~%" file)
1980 (utime file 0 0 0 0))))
1981 (find-files dir #:directories? #t))
1982 (with-directory-excursion dir
1983 (let ((files (find-files "." ".*" #:directories? #t)))
1984 (apply invoke "zip" "-0" "-X" zip files)))))
1985 (find-files (assoc-ref outputs "doc") ".*.zip$"))
1986 #t)))))
1987 (inputs
1988 `(("alsa-lib" ,alsa-lib)
1989 ("cups" ,cups)
1990 ("fontconfig" ,fontconfig)
1991 ("freetype" ,freetype)
1992 ("giflib" ,giflib)
1993 ("lcms" ,lcms)
1994 ("libelf" ,libelf)
1995 ("libjpeg" ,libjpeg-turbo)
1996 ("libice" ,libice)
1997 ("libpng" ,libpng)
1998 ("libx11" ,libx11)
1999 ("libxcomposite" ,libxcomposite)
2000 ("libxi" ,libxi)
2001 ("libxinerama" ,libxinerama)
2002 ("libxrender" ,libxrender)
2003 ("libxt" ,libxt)
2004 ("libxtst" ,libxtst)))
2005 (native-inputs
2006 `(("icedtea-8" ,icedtea-8)
2007 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2008 ;; XXX: The build system fails with newer versions of GNU Make.
2009 ("make@4.2" ,gnu-make-4.2)
2010 ("unzip" ,unzip)
2011 ("which" ,which)
2012 ("zip" ,zip)))
2013 (home-page "https://openjdk.java.net/projects/jdk9/")
2014 (synopsis "Java development kit")
2015 (description
2016 "This package provides the Java development kit OpenJDK.")
2017 (license license:gpl2+)))
2018
2019 (define-public openjdk10
2020 (package
2021 (inherit openjdk9)
2022 (name "openjdk")
2023 (version "10.46")
2024 (source (origin
2025 (method url-fetch)
2026 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2027 (file-name (string-append name "-" version ".tar.bz2"))
2028 (sha256
2029 (base32
2030 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2031 (patches (search-patches
2032 "openjdk-10-idlj-reproducibility.patch"))
2033 (modules '((guix build utils)))
2034 (snippet
2035 `(begin
2036 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2037 #t))))
2038 (arguments
2039 (substitute-keyword-arguments (package-arguments openjdk9)
2040 ((#:phases phases)
2041 `(modify-phases ,phases
2042 (replace 'fix-java-shebangs
2043 (lambda _
2044 ;; This file was "fixed" by patch-source-shebangs, but it requires
2045 ;; this exact first line.
2046 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2047 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2048 #t))
2049 (replace 'configure
2050 (lambda* (#:key inputs outputs #:allow-other-keys)
2051 (invoke "bash" "./configure"
2052 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2053 "--disable-freetype-bundling"
2054 "--disable-warnings-as-errors"
2055 "--disable-hotspot-gtest"
2056 "--with-giflib=system"
2057 "--with-libjpeg=system"
2058 "--with-native-debug-symbols=zipped"
2059 (string-append "--prefix=" (assoc-ref outputs "out")))
2060 #t))))))
2061 (native-inputs
2062 `(("openjdk9" ,openjdk9)
2063 ("openjdk9:jdk" ,openjdk9 "jdk")
2064 ("make@4.2" ,gnu-make-4.2)
2065 ("unzip" ,unzip)
2066 ("which" ,which)
2067 ("zip" ,zip)))))
2068
2069 (define-public openjdk11
2070 (package
2071 (name "openjdk")
2072 (version "11.28")
2073 (source (origin
2074 (method url-fetch)
2075 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2076 (file-name (string-append name "-" version ".tar.bz2"))
2077 (sha256
2078 (base32
2079 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2080 (modules '((guix build utils)))
2081 (snippet
2082 `(begin
2083 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2084 #t))))
2085 (build-system gnu-build-system)
2086 (outputs '("out" "jdk" "doc"))
2087 (arguments
2088 `(#:imported-modules
2089 ((guix build syscalls)
2090 (ice-9 binary-ports)
2091 (rnrs bytevectors)
2092 ,@%gnu-build-system-modules)
2093 #:tests? #f; requires jtreg
2094 ;; TODO package jtreg
2095 #:configure-flags
2096 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2097 "--disable-warnings-as-errors"
2098 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2099 "--with-native-debug-symbols=zipped"
2100 ;; do not use the bundled libraries
2101 "--with-giflib=system"
2102 "--with-lcms=system"
2103 "--with-libjpeg=system"
2104 "--with-libpng=system"
2105 "--with-version-pre="
2106 ;; allow the build system to locate the system freetype
2107 ,(string-append "--with-freetype-include="
2108 (assoc-ref %build-inputs "freetype") "/include")
2109 ,(string-append "--with-freetype-lib="
2110 (assoc-ref %build-inputs "freetype") "/lib"))
2111 #:phases
2112 (modify-phases %standard-phases
2113 (add-after 'patch-source-shebangs 'fix-java-shebangs
2114 (lambda _
2115 ;; This file was "fixed" by patch-source-shebangs, but it requires
2116 ;; this exact first line.
2117 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2118 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2119 #t))
2120 (add-before 'build 'write-source-revision-file
2121 (lambda _
2122 (with-output-to-file ".src-rev"
2123 (lambda _
2124 (display ,version)))
2125 #t))
2126 (replace 'build
2127 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2128 (apply invoke "make" "all"
2129 `(,@(if parallel-build?
2130 (list (string-append "JOBS="
2131 (number->string (parallel-job-count))))
2132 '())
2133 ,@make-flags))))
2134 ;; jdk 11 does not build jre by default any more
2135 ;; building it anyways
2136 ;; for further information see:
2137 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2138 (add-after 'build 'build-jre
2139 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2140 (apply invoke "make" "legacy-jre-image"
2141 `(,@(if parallel-build?
2142 (list (string-append "JOBS="
2143 (number->string (parallel-job-count))))
2144 '())
2145 ,@make-flags))))
2146 (replace 'install
2147 (lambda* (#:key outputs #:allow-other-keys)
2148 (let ((out (assoc-ref outputs "out"))
2149 (jdk (assoc-ref outputs "jdk"))
2150 (doc (assoc-ref outputs "doc"))
2151 (images (car (find-files "build" ".*-server-release"
2152 #:directories? #t))))
2153 (copy-recursively (string-append images "/images/jdk") jdk)
2154 (copy-recursively (string-append images "/images/jre") out)
2155 (copy-recursively (string-append images "/images/docs") doc))
2156 #t))
2157 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2158 ;; But that shared object is located in the server/ folder, so it
2159 ;; cannot be found. This phase creates a symbolic link in the
2160 ;; lib/ folder so that the other libraries can find it.
2161 ;;
2162 ;; See:
2163 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2164 ;;
2165 ;; FIXME: Find the bug in the build system, so that this symlink is
2166 ;; not needed.
2167 (add-after 'install 'install-libjvm
2168 (lambda* (#:key inputs outputs #:allow-other-keys)
2169 (let* ((lib-out (string-append (assoc-ref outputs "out")
2170 "/lib"))
2171 (lib-jdk (string-append (assoc-ref outputs "jdk")
2172 "/lib")))
2173 (symlink (string-append lib-jdk "/server/libjvm.so")
2174 (string-append lib-jdk "/libjvm.so"))
2175 (symlink (string-append lib-out "/server/libjvm.so")
2176 (string-append lib-out "/libjvm.so")))
2177 #t))
2178 (add-after 'install 'strip-character-data-timestamps
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (use-modules (guix build syscalls))
2181 (let ((archive (string-append
2182 (assoc-ref outputs "jdk") "/lib/src.zip"))
2183 (dir (mkdtemp! "zip-contents.XXXXXX")))
2184 (with-directory-excursion dir
2185 (invoke "unzip" archive))
2186 (delete-file archive)
2187 (with-directory-excursion dir
2188 (let ((char-data-files (find-files "." "CharacterData.*")))
2189 (for-each (lambda (file)
2190 (substitute* file
2191 (((string-append "This file was generated "
2192 "AUTOMATICALLY from a template "
2193 "file.*"))
2194 (string-append "This file was generated "
2195 "AUTOMATICALLY from a template "
2196 "file"))))
2197 char-data-files)))
2198 (with-directory-excursion dir
2199 (let ((files (find-files "." ".*" #:directories? #t)))
2200 (apply invoke "zip" "-0" "-X" archive files))))))
2201 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2202 (lambda* (#:key outputs #:allow-other-keys)
2203 (use-modules (guix build syscalls)
2204 (ice-9 binary-ports)
2205 (rnrs bytevectors))
2206 (letrec ((repack-archive
2207 (lambda (archive)
2208 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2209 (with-directory-excursion dir
2210 (invoke "unzip" archive))
2211 (delete-file archive)
2212 (for-each (compose repack-archive canonicalize-path)
2213 (find-files dir "(ct.sym|.*.jar)$"))
2214 (let ((reset-file-timestamp
2215 (lambda (file)
2216 (let ((s (lstat file)))
2217 (unless (eq? (stat:type s) 'symlink)
2218 (format #t "reset ~a~%" file)
2219 (utime file 0 0 0 0))))))
2220 (for-each reset-file-timestamp
2221 (find-files dir #:directories? #t)))
2222 (with-directory-excursion dir
2223 (let ((files (find-files "." ".*" #:directories? #t)))
2224 (apply invoke "zip" "-0" "-X" archive files)))))))
2225 (for-each repack-archive
2226 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2227 (for-each repack-archive
2228 (find-files (assoc-ref outputs "jdk")
2229 ".*.(zip|jar|diz)$"))
2230 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2231 (let ((repack-jmod
2232 (lambda (file-name)
2233 (call-with-input-file file-name
2234 (lambda (file)
2235 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2236 (if (equal? (get-bytevector-n
2237 file (bytevector-length header))
2238 header)
2239 (let* ((header-length (bytevector-length header))
2240 (temp-file (mkstemp!
2241 (string-copy
2242 "temp-file.XXXXXX")))
2243 (temp-filename (port-filename temp-file))
2244 (content-length
2245 (- (stat:size (stat file))
2246 header-length)))
2247 (sendfile temp-file file content-length header-length)
2248 (delete-file file-name)
2249 (close-port temp-file)
2250 (repack-archive (canonicalize-path temp-filename))
2251 (call-with-output-file file-name
2252 (lambda (file)
2253 (put-bytevector file header)
2254 (call-with-input-file temp-filename
2255 (lambda (temp-file)
2256 (sendfile
2257 file temp-file
2258 (stat:size (stat temp-file)) 0)))))))))))))
2259 (for-each repack-jmod
2260 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2261 #t)))
2262 (add-after 'install 'remove-timestamp-from-api-summary
2263 (lambda* (#:key outputs #:allow-other-keys)
2264 (substitute* (string-append (assoc-ref outputs "doc")
2265 "/api/overview-summary.html")
2266 (("Generated by javadoc \\(11-internal\\).*$")
2267 "Generated by javadoc (11-internal) -->\n"))
2268 #t)))))
2269 (inputs
2270 `(("alsa-lib" ,alsa-lib)
2271 ("cups" ,cups)
2272 ("fontconfig" ,fontconfig)
2273 ("freetype" ,freetype)
2274 ("giflib" ,giflib)
2275 ("lcms" ,lcms)
2276 ("libjpeg" ,libjpeg-turbo)
2277 ("libpng" ,libpng)
2278 ("libx11" ,libx11)
2279 ("libxext" ,libxext)
2280 ("libxrender" ,libxrender)
2281 ("libxt" ,libxt)
2282 ("libxtst" ,libxtst)))
2283 (native-inputs
2284 `(("autoconf" ,autoconf)
2285 ("openjdk10" ,openjdk10)
2286 ("openjdk10:jdk" ,openjdk10 "jdk")
2287 ("make" ,gnu-make-4.2)
2288 ("pkg-config" ,pkg-config)
2289 ("unzip" ,unzip)
2290 ("which" ,which)
2291 ("zip" ,zip)))
2292 (home-page "https://openjdk.java.net/projects/jdk/11/")
2293 (synopsis "Java development kit")
2294 (description
2295 "This package provides the Java development kit OpenJDK.")
2296 (license license:gpl2+)))
2297
2298 (define-public openjdk12
2299 (package
2300 (inherit openjdk11)
2301 (name "openjdk")
2302 (version "12.33")
2303 (source (origin
2304 (method url-fetch)
2305 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2306 (file-name (string-append name "-" version ".tar.bz2"))
2307 (sha256
2308 (base32
2309 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2310 (modules '((guix build utils)))
2311 (snippet
2312 `(begin
2313 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2314 #t))))
2315 (inputs
2316 `(("alsa-lib" ,alsa-lib)
2317 ("cups" ,cups)
2318 ("fontconfig" ,fontconfig)
2319 ("freetype" ,freetype)
2320 ("giflib" ,giflib)
2321 ("lcms" ,lcms)
2322 ("libjpeg" ,libjpeg-turbo)
2323 ("libpng" ,libpng)
2324 ("libx11" ,libx11)
2325 ("libxext" ,libxext)
2326 ("libxrandr" ,libxrandr)
2327 ("libxrender" ,libxrender)
2328 ("libxt" ,libxt)
2329 ("libxtst" ,libxtst)))
2330 (native-inputs
2331 `(("autoconf" ,autoconf)
2332 ("openjdk11" ,openjdk11)
2333 ("openjdk11:jdk" ,openjdk11 "jdk")
2334 ("make@4.2" ,gnu-make-4.2)
2335 ("pkg-config" ,pkg-config)
2336 ("unzip" ,unzip)
2337 ("which" ,which)
2338 ("zip" ,zip)))
2339 (home-page "https://openjdk.java.net/projects/jdk/12")))
2340
2341 (define-public openjdk13
2342 (package
2343 (inherit openjdk12)
2344 (name "openjdk")
2345 (version "13.0")
2346 (source (origin
2347 (method url-fetch)
2348 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2349 (file-name (string-append name "-" version ".tar.bz2"))
2350 (sha256
2351 (base32
2352 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2353 (modules '((guix build utils)))
2354 (snippet
2355 `(begin
2356 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2357 #t))))
2358 (inputs
2359 `(("alsa-lib" ,alsa-lib)
2360 ("cups" ,cups)
2361 ("fontconfig" ,fontconfig)
2362 ("freetype" ,freetype)
2363 ("giflib" ,giflib)
2364 ("lcms" ,lcms)
2365 ("libjpeg" ,libjpeg-turbo)
2366 ("libpng" ,libpng)
2367 ("libx11" ,libx11)
2368 ("libxext" ,libxext)
2369 ("libxrandr" ,libxrandr)
2370 ("libxrender" ,libxrender)
2371 ("libxt" ,libxt)
2372 ("libxtst" ,libxtst)))
2373 (native-inputs
2374 `(("autoconf" ,autoconf)
2375 ("openjdk12:jdk" ,openjdk12 "jdk")
2376 ("make@4.2" ,gnu-make-4.2)
2377 ("pkg-config" ,pkg-config)
2378 ("unzip" ,unzip)
2379 ("which" ,which)
2380 ("zip" ,zip)))
2381 (home-page "https://openjdk.java.net/projects/jdk/13")))
2382
2383 (define-public openjdk14
2384 (package
2385 (inherit openjdk13)
2386 (name "openjdk")
2387 (version "14.0")
2388 (source (origin
2389 (method url-fetch)
2390 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2391 (file-name (string-append name "-" version ".tar.bz2"))
2392 (sha256
2393 (base32
2394 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2395 (modules '((guix build utils)))
2396 (snippet
2397 `(begin
2398 ;; The m4 macro uses 'help' to search for builtins, which is
2399 ;; not available in bash-minimal
2400 (substitute* "make/autoconf/basics.m4"
2401 (("if help") "if command -v"))
2402 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2403 #t))))
2404 (inputs
2405 `(("alsa-lib" ,alsa-lib)
2406 ("cups" ,cups)
2407 ("fontconfig" ,fontconfig)
2408 ("freetype" ,freetype)
2409 ("giflib" ,giflib)
2410 ("lcms" ,lcms)
2411 ("libjpeg" ,libjpeg-turbo)
2412 ("libpng" ,libpng)
2413 ("libx11" ,libx11)
2414 ("libxext" ,libxext)
2415 ("libxrandr" ,libxrandr)
2416 ("libxrender" ,libxrender)
2417 ("libxt" ,libxt)
2418 ("libxtst" ,libxtst)))
2419 (native-inputs
2420 `(("autoconf" ,autoconf)
2421 ("make@4.2" ,gnu-make-4.2)
2422 ("openjdk13:jdk" ,openjdk13 "jdk")
2423 ("pkg-config" ,pkg-config)
2424 ("unzip" ,unzip)
2425 ("which" ,which)
2426 ("zip" ,zip)))
2427 (home-page "https://openjdk.java.net/projects/jdk/14")))
2428
2429 (define-public icedtea icedtea-8)
2430
2431 \f
2432 (define-public ant/java8
2433 (package (inherit ant-bootstrap)
2434 (name "ant")
2435 (version "1.10.8")
2436 (source (origin
2437 (method url-fetch)
2438 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2439 version "-src.tar.gz"))
2440 (sha256
2441 (base32
2442 "066k2isig5xm70cihj9p73hkp5w7h5zbfqz5kxb6cwr9cb86xl2k"))
2443 (modules '((guix build utils)))
2444 (snippet
2445 '(begin
2446 (for-each delete-file
2447 (find-files "lib/optional" "\\.jar$"))
2448 #t))))
2449 (arguments
2450 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2451 ((#:phases phases)
2452 `(modify-phases ,phases
2453 (add-after 'unpack 'remove-scripts
2454 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2455 ;; wrappers.
2456 (lambda _
2457 (for-each delete-file
2458 (find-files "src/script"
2459 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2460 #t))
2461 (replace 'build
2462 (lambda* (#:key inputs outputs #:allow-other-keys)
2463 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2464
2465 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2466 ;; Ant to build. This is necessary in addition to disabling the
2467 ;; "check" phase, because the dependency on "test-jar" would always
2468 ;; result in the tests to be run.
2469 (substitute* "build.xml"
2470 (("depends=\"jars,test-jar") "depends=\"jars"))
2471 (invoke "bash" "bootstrap.sh"
2472 (string-append "-Ddist.dir="
2473 (assoc-ref outputs "out")))))))))
2474 (native-inputs
2475 `(("jdk" ,icedtea-8 "jdk")
2476 ("zip" ,zip)
2477 ("unzip" ,unzip)))))
2478
2479 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2480 ;; requires Java 8.
2481 (define-public ant
2482 (package (inherit ant/java8)
2483 (version "1.9.15")
2484 (source (origin
2485 (method url-fetch)
2486 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2487 version "-src.tar.gz"))
2488 (sha256
2489 (base32
2490 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2491 (native-inputs
2492 `(("jdk" ,icedtea-7 "jdk")
2493 ("zip" ,zip)
2494 ("unzip" ,unzip)))))
2495
2496 (define-public ant-apache-bcel
2497 (package
2498 (inherit ant/java8)
2499 (name "ant-apache-bcel")
2500 (arguments
2501 (substitute-keyword-arguments (package-arguments ant/java8)
2502 ((#:phases phases)
2503 `(modify-phases ,phases
2504 (add-after 'unpack 'link-bcel
2505 (lambda* (#:key inputs #:allow-other-keys)
2506 (for-each (lambda (file)
2507 (symlink file
2508 (string-append "lib/optional/"
2509 (basename file))))
2510 (find-files (assoc-ref inputs "java-commons-bcel")
2511 "\\.jar$"))
2512 #t))
2513 (add-after 'build 'install
2514 (lambda* (#:key outputs #:allow-other-keys)
2515 (let* ((out (assoc-ref outputs "out"))
2516 (share (string-append out "/share/java"))
2517 (bin (string-append out "/bin"))
2518 (lib (string-append out "/lib")))
2519 (mkdir-p share)
2520 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2521 (delete-file-recursively bin)
2522 (delete-file-recursively lib)
2523 #t)))))))
2524 (inputs
2525 `(("java-commons-bcel" ,java-commons-bcel)
2526 ,@(package-inputs ant/java8)))))
2527
2528 (define-public ant-junit
2529 (package
2530 (inherit ant/java8)
2531 (name "ant-junit")
2532 (arguments
2533 (substitute-keyword-arguments (package-arguments ant/java8)
2534 ((#:phases phases)
2535 `(modify-phases ,phases
2536 (add-after 'unpack 'link-junit
2537 (lambda* (#:key inputs #:allow-other-keys)
2538 (for-each (lambda (file)
2539 (symlink file
2540 (string-append "lib/optional/"
2541 (basename file))))
2542 (find-files (assoc-ref inputs "java-junit")
2543 "\\.jar$"))
2544 #t))
2545 (add-after 'build 'install
2546 (lambda* (#:key outputs #:allow-other-keys)
2547 (let* ((out (assoc-ref outputs "out"))
2548 (share (string-append out "/share/java"))
2549 (bin (string-append out "/bin"))
2550 (lib (string-append out "/lib")))
2551 (mkdir-p share)
2552 (install-file (string-append lib "/ant-junit.jar") share)
2553 (delete-file-recursively bin)
2554 (delete-file-recursively lib)
2555 #t)))))))
2556 (inputs
2557 `(("java-junit" ,java-junit)
2558 ,@(package-inputs ant/java8)))))
2559
2560 (define-public java-openjfx-build
2561 (package
2562 (name "java-openjfx-build")
2563 ;; This is a java-8 version
2564 (version "8.202")
2565 (source (origin
2566 (method hg-fetch)
2567 (uri (hg-reference
2568 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2569 (changeset (string-append
2570 (string-join (string-split version #\.) "u")
2571 "-ga"))))
2572 (file-name (string-append name "-" version "-checkout"))
2573 (modules '((guix build utils)))
2574 (snippet
2575 '(begin
2576 ;; Delete included gradle jar
2577 (delete-file-recursively "gradle/wrapper")
2578 #t))
2579 (sha256
2580 (base32
2581 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2582 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2583 (build-system ant-build-system)
2584 (arguments
2585 `(#:jar-name "java-openjfx.jar"
2586 #:source-dir "buildSrc/src/main/java"
2587 #:test-dir "buildSrc/src/test"
2588 #:phases
2589 (modify-phases %standard-phases
2590 (add-before 'configure 'generate-jsl-parser
2591 (lambda _
2592 (invoke "antlr3" "-o"
2593 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2594 "buildSrc/src/main/antlr/JSL.g"))))))
2595 (inputs
2596 `(("antlr3" ,antlr3)
2597 ("java-stringtemplate" ,java-stringtemplate)))
2598 (native-inputs
2599 `(("java-junit" ,java-junit)
2600 ("java-hamcrest-core" ,java-hamcrest-core)))
2601 (home-page "https://openjfx.io")
2602 (synopsis "Graphical application toolkit in Java")
2603 (description "OpenJFX is a client application platform for desktop,
2604 mobile and embedded systems built on Java. Its goal is to produce a
2605 modern, efficient, and fully featured toolkit for developing rich client
2606 applications. This package contains base classes for the OpenJFX
2607 distribution and helper classes for building other parts of the
2608 distribution.")
2609 (license license:gpl2))) ;gpl2 only, with classpath exception
2610
2611 (define-public java-openjfx-base
2612 (package (inherit java-openjfx-build)
2613 (name "java-openjfx-base")
2614 (arguments
2615 `(#:jar-name "java-openjfx-base.jar"
2616 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2617 #:test-dir "modules/base/src/test"
2618 #:phases
2619 (modify-phases %standard-phases
2620 (add-before 'check 'remove-empty-file
2621 (lambda _
2622 (with-directory-excursion "modules/base/src/test/java"
2623 ;; These files are completely commented, but junit expects them to
2624 ;; contain a class, so tests fail.
2625 (delete-file
2626 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2627 (delete-file
2628 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2629 (delete-file "javafx/beans/property/PropertiesTest.java")
2630 (delete-file
2631 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2632 ;; This one fails
2633 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2634 #t)))))
2635 (propagated-inputs
2636 `(("java-openjfx-build" ,java-openjfx-build)))
2637 (description "OpenJFX is a client application platform for desktop,
2638 mobile and embedded systems built on Java. Its goal is to produce a
2639 modern, efficient, and fully featured toolkit for developing rich client
2640 applications. This package contains base classes for the OpenJFX
2641 distribution.")))
2642
2643 (define-public java-openjfx-graphics
2644 (package (inherit java-openjfx-build)
2645 (name "java-openjfx-graphics")
2646 (arguments
2647 `(#:jar-name "java-openjfx-graphics.jar"
2648 #:source-dir "modules/graphics/src/main/java"
2649 #:tests? #f; require X
2650 #:test-dir "modules/graphics/src/test"))
2651 (propagated-inputs
2652 `(("java-openjfx-base" ,java-openjfx-base)
2653 ("java-swt" ,java-swt)))
2654 (description "OpenJFX is a client application platform for desktop,
2655 mobile and embedded systems built on Java. Its goal is to produce a
2656 modern, efficient, and fully featured toolkit for developing rich client
2657 applications. This package contains graphics-related classes for the
2658 OpenJFX distribution.")))
2659
2660 (define-public java-openjfx-media
2661 (package (inherit java-openjfx-build)
2662 (name "java-openjfx-media")
2663 (propagated-inputs
2664 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2665 (arguments
2666 `(#:jar-name "java-openjfx-media.jar"
2667 #:source-dir "modules/media/src/main/java"
2668 #:tests? #f)); no tests
2669 (description "OpenJFX is a client application platform for desktop,
2670 mobile and embedded systems built on Java. Its goal is to produce a
2671 modern, efficient, and fully featured toolkit for developing rich client
2672 applications. This package contains media-related classes for the
2673 OpenJFX distribution.")))
2674
2675 (define-public javacc-4
2676 (package
2677 (name "javacc")
2678 (version "4.1")
2679 (source (origin
2680 (method git-fetch)
2681 (uri (git-reference
2682 (url "https://github.com/javacc/javacc")
2683 (commit "release_41")))
2684 (file-name (string-append "javacc-" version "-checkout"))
2685 (sha256
2686 (base32
2687 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2688 (modules '((guix build utils)))
2689 ;; delete bundled jars
2690 (snippet '(begin (delete-file-recursively "lib") #t))))
2691 (build-system ant-build-system)
2692 ;; Tests fail with
2693 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2694 ;; JAVACODE failed
2695 (arguments
2696 `(#:tests? #f
2697 #:phases
2698 (modify-phases %standard-phases
2699 ;; Delete tests to avoid build failure (we don't run them anyway).
2700 (add-after 'unpack 'delete-tests
2701 (lambda _
2702 (for-each delete-file
2703 '("src/org/javacc/JavaCCTestCase.java"
2704 "src/org/javacc/parser/ExpansionTest.java"
2705 "src/org/javacc/parser/OptionsTest.java"
2706 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2707 (for-each delete-file-recursively
2708 '("src/org/javacc/parser/test"
2709 "src/org/javacc/jjdoc/test"))
2710 #t))
2711 (replace 'install (install-jars "bin/lib")))))
2712 (home-page "https://javacc.org/")
2713 (synopsis "Java parser generator")
2714 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2715 generator for use with Java applications. A parser generator is a tool that
2716 reads a grammar specification and converts it to a Java program that can
2717 recognize matches to the grammar. In addition to the parser generator itself,
2718 JavaCC provides other standard capabilities related to parser generation such
2719 as tree building (via a tool called JJTree included with JavaCC), actions,
2720 debugging, etc.")
2721 (license license:bsd-3)))
2722
2723 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2724 ;; in the bootstrap/ directory.
2725 (define-public javacc-3
2726 (package
2727 (inherit javacc-4)
2728 (version "3.2")
2729 (source (origin
2730 (method git-fetch)
2731 (uri (git-reference
2732 (url "https://github.com/javacc/javacc.git")
2733 (commit "release_32")))
2734 (file-name (string-append "javacc-" version "-checkout"))
2735 (sha256
2736 (base32
2737 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2738 (arguments
2739 `(#:tests? #f
2740 #:phases
2741 (modify-phases %standard-phases
2742 (add-before 'build 'set-java-version
2743 (lambda _
2744 (for-each
2745 (lambda (file)
2746 (substitute* file
2747 (("debug=") "source=\"1.4\" debug=")))
2748 (find-files "." "build.xml"))
2749 #t))
2750 (replace 'install (install-jars "bin/lib")))))))
2751
2752 (define-public javacc
2753 (package
2754 (inherit javacc-4)
2755 (version "7.0.4")
2756 (source
2757 (origin
2758 (method git-fetch)
2759 (uri (git-reference
2760 (url "https://github.com/javacc/javacc")
2761 (commit version)))
2762 (file-name (git-file-name "javacc" version))
2763 (sha256
2764 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2765 (modules '((guix build utils)))
2766 ;; Delete bundled jars.
2767 (snippet '(begin (for-each delete-file-recursively
2768 '("bootstrap" "lib"))
2769 #t))))
2770 (arguments
2771 `(#:make-flags ; bootstrap from javacc-4
2772 (list (string-append "-Dbootstrap-jar="
2773 (assoc-ref %build-inputs "javacc")
2774 "/share/java/javacc.jar"))
2775 #:test-target "test"
2776 #:phases
2777 (modify-phases %standard-phases
2778 (replace 'install (install-jars "target"))
2779 (add-after 'install 'install-bin
2780 (lambda* (#:key outputs inputs #:allow-other-keys)
2781 (let* ((out (assoc-ref outputs "out"))
2782 (dir (string-append out "/share/java"))
2783 (bin (string-append out "/bin"))
2784 (javacc (string-append bin "/javacc")))
2785 (mkdir-p bin)
2786 (with-output-to-file javacc
2787 (lambda _
2788 (display
2789 (string-append "#!/bin/sh\n"
2790 (assoc-ref inputs "jdk") "/bin/java"
2791 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2792 (chmod javacc #o755)
2793 ;; symlink to different names to affect the first argument and
2794 ;; change the behavior of the jar file.
2795 (symlink javacc (string-append bin "/jjdoc"))
2796 (symlink javacc (string-append bin "/jjtree"))
2797 #t))))))
2798
2799 (native-inputs
2800 `(("javacc" ,javacc-4)))))
2801
2802 ;; This is the last 3.x release of ECJ
2803 (define-public java-ecj-3
2804 (package
2805 (name "java-ecj")
2806 (version "3.8.2")
2807 (source (origin
2808 (method url-fetch)
2809 (uri (string-append "http://archive.eclipse.org/eclipse/"
2810 "downloads/drops/R-" version
2811 "-201301310800/ecjsrc-" version ".jar"))
2812 (sha256
2813 (base32
2814 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2815 (build-system ant-build-system)
2816 (arguments
2817 `(#:tests? #f ; none included
2818 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2819 #:make-flags (list "-f" "src/build.xml")
2820 #:build-target "build"
2821 #:phases
2822 (modify-phases %standard-phases
2823 (add-after 'unpack 'fix-manifest
2824 (lambda _
2825 ;; Record the main class to make ecj executable.
2826 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2827 (lambda (in out)
2828 (display "Manifest-Version: 1.0
2829 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2830 out)))
2831 #t))
2832 (replace 'install (install-jars ".")))))
2833 (home-page "https://eclipse.org")
2834 (synopsis "Eclipse Java development tools core batch compiler")
2835 (description "This package provides the Eclipse Java core batch compiler.")
2836 (license license:epl1.0)))
2837
2838 ;; This is needed for java-cisd-args4j
2839 (define-public java-ecj-3.5
2840 (package (inherit java-ecj-3)
2841 (version "3.5.1")
2842 (source (origin
2843 (method url-fetch/zipbomb)
2844 (uri (string-append "http://archive.eclipse.org/eclipse/"
2845 "downloads/drops/R-" version
2846 "-200909170800/ecjsrc-" version ".zip"))
2847 (sha256
2848 (base32
2849 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
2850 (build-system ant-build-system)
2851 (arguments
2852 `(#:tests? #f ; none included
2853 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2854 #:build-target "build"
2855 #:phases
2856 (modify-phases %standard-phases
2857 (add-after 'unpack 'fix-manifest
2858 (lambda _
2859 ;; Record the main class to make ecj executable.
2860 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
2861 (lambda (in out)
2862 (dump-port in out)
2863 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2864 out)))
2865 #t))
2866 (replace 'install (install-jars ".")))))
2867 (native-inputs
2868 `(("unzip" ,unzip)))))
2869
2870 (define-public java-ecj
2871 (package (inherit java-ecj-3)
2872 (version "4.6.3")
2873 (source
2874 (origin
2875 (method url-fetch)
2876 (uri (string-append
2877 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
2878 version
2879 "-201703010400/ecjsrc-"
2880 version
2881 ".jar"))
2882 (sha256
2883 (base32
2884 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2885 (arguments
2886 `(#:tests? #f ; none included
2887 #:build-target "build"
2888 #:phases
2889 (modify-phases %standard-phases
2890 (add-after 'unpack 'fix-build.xml
2891 (lambda _
2892 (substitute* "src/build.xml"
2893 (("^.*MANIFEST.*$")
2894 ""))
2895 #t))
2896 (add-after 'unpack 'fix-prop
2897 (lambda _
2898 (substitute* "src/build.xml"
2899 (("^.*properties.*$")
2900 "<include name=\"**/*.properties\"/>
2901 <include name=\"**/*.props\"/>"))
2902 #t))
2903 (add-before 'build 'chdir
2904 (lambda _
2905 (chdir "src")
2906 #t))
2907 (replace 'install (install-jars ".")))))))
2908
2909 (define-public java-cisd-base
2910 (let ((revision 38938)
2911 (base-version "14.12.0"))
2912 (package
2913 (name "java-cisd-base")
2914 (version (string-append base-version "-" (number->string revision)))
2915 (source (origin
2916 (method svn-fetch)
2917 (uri (svn-reference
2918 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2919 "base/tags/release/"
2920 (version-major+minor base-version)
2921 ".x/" base-version "/base/"))
2922 (revision revision)))
2923 (file-name (string-append "java-cisd-base-" version "-checkout"))
2924 (sha256
2925 (base32
2926 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2927 (modules '((guix build utils)))
2928 (snippet
2929 '(begin
2930 ;; Delete included gradle jar
2931 (delete-file-recursively "gradle/wrapper")
2932 ;; Delete pre-built native libraries
2933 (delete-file-recursively "libs")
2934 #t))))
2935 (build-system ant-build-system)
2936 (arguments
2937 `(#:make-flags '("-file" "build/build.xml")
2938 #:test-target "jar-test"
2939 #:jdk ,icedtea-8
2940 #:phases
2941 (modify-phases %standard-phases
2942 (add-after 'unpack 'unpack-build-resources
2943 (lambda* (#:key inputs #:allow-other-keys)
2944 (copy-recursively (assoc-ref inputs "build-resources")
2945 "../build_resources")
2946 #t))
2947 (add-after 'unpack-build-resources 'fix-dependencies
2948 (lambda* (#:key inputs #:allow-other-keys)
2949 (substitute* "build/build.xml"
2950 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2951 (string-append (assoc-ref inputs "java-testng")
2952 "/share/java/java-testng.jar"))
2953 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2954 (string-append (assoc-ref inputs "java-commons-lang")
2955 "/share/java/commons-lang-"
2956 ,(package-version java-commons-lang) ".jar"))
2957 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2958 (string-append (assoc-ref inputs "java-commons-io")
2959 "/lib/m2/commons-io/commons-io/"
2960 ,(package-version java-commons-io)
2961 "/commons-io-"
2962 ,(package-version java-commons-io)
2963 ".jar"))
2964 ;; Remove dependency on svn
2965 (("<build-info.*") "")
2966 (("\\$\\{revision.number\\}")
2967 ,(number->string revision))
2968 (("\\$\\{version.number\\}") ,base-version))
2969 ;; Remove dependency on classycle
2970 (substitute* "../build_resources/ant/build-common.xml"
2971 (("<taskdef name=\"dependency-checker.*") "")
2972 (("classname=\"classycle.*") "")
2973 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2974 #t))
2975 ;; A few tests fail because of the lack of a proper /etc/groups and
2976 ;; /etc/passwd file in the build container.
2977 (add-after 'unpack 'disable-broken-tests
2978 (lambda _
2979 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2980 (("Unix.isOperational\\(\\)") "false"))
2981 #t))
2982 ;; These decorators are almost useless and pull in an unpackaged
2983 ;; dependency.
2984 (add-after 'unpack 'remove-useless-decorators
2985 (lambda _
2986 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2987 (("@Private") "")
2988 (("import ch.rinn.restrictions.Private;") ""))
2989 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2990 (("@Friend.*") "")
2991 (("import ch.rinn.restrictions.Friend;") ""))
2992 #t))
2993 (add-before 'configure 'build-native-code
2994 (lambda* (#:key inputs #:allow-other-keys)
2995 (let ((jdk (assoc-ref inputs "jdk"))
2996 (dir ,(match (%current-system)
2997 ("i686-linux"
2998 "i386-Linux")
2999 ((or "armhf-linux" "aarch64-linux")
3000 "arm-Linux")
3001 ((or "x86_64-linux")
3002 "amd64-Linux")
3003 (_ "unknown-Linux"))))
3004 (with-directory-excursion "source/c"
3005 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3006 (string-append "-I" jdk "/include")
3007 (string-append "-I" jdk "/include/linux")
3008 "-o" "libunix.so")
3009 (invoke "gcc" "-shared" "-O3" "-fPIC"
3010 "-DMACHINE_BYTE_ORDER=1"
3011 "copyCommon.c"
3012 "copyByteChar.c"
3013 "copyByteDouble.c"
3014 "copyByteFloat.c"
3015 "copyByteInt.c"
3016 "copyByteLong.c"
3017 "copyByteShort.c"
3018 (string-append "-I" jdk "/include")
3019 (string-append "-I" jdk "/include/linux")
3020 "-o" "libnativedata.so"))
3021 (install-file "source/c/libunix.so"
3022 (string-append "libs/native/unix/" dir))
3023 (install-file "source/c/libnativedata.so"
3024 (string-append "libs/native/nativedata/" dir))
3025 #t)))
3026 ;; In the "check" phase we only build the test executable.
3027 (add-after 'check 'run-tests
3028 (lambda _
3029 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3030 (delete-file "targets/dist/sis-base-test.jar")
3031 #t))
3032 (replace 'install (install-jars "targets/dist")))))
3033 (native-inputs
3034 `(("jdk" ,icedtea-8)
3035 ("java-commons-lang" ,java-commons-lang)
3036 ("java-commons-io" ,java-commons-io)
3037 ("java-testng" ,java-testng)
3038 ("build-resources"
3039 ,(origin
3040 (method svn-fetch)
3041 (uri (svn-reference
3042 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3043 "base/tags/release/"
3044 (version-major+minor base-version)
3045 ".x/" base-version
3046 "/build_resources/"))
3047 (revision revision)))
3048 (sha256
3049 (base32
3050 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3051 (home-page "http://svnsis.ethz.ch")
3052 (synopsis "Utility classes for libraries from ETH Zurich")
3053 (description "This library supplies some utility classes needed for
3054 libraries from the SIS division at ETH Zurich like jHDF5.")
3055 ;; The C sources are under a non-copyleft license, which looks like a
3056 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3057 (license (list license:asl2.0
3058 (license:non-copyleft "file://source/c/COPYING"))))))
3059
3060 (define-public java-cisd-args4j
3061 (let ((revision 39162)
3062 (base-version "9.11.2"))
3063 (package
3064 (name "java-cisd-args4j")
3065 (version (string-append base-version "-" (number->string revision)))
3066 (source (origin
3067 (method svn-fetch)
3068 (uri (svn-reference
3069 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3070 "args4j/tags/release/"
3071 (version-major+minor base-version)
3072 ".x/" base-version "/args4j/"))
3073 (revision revision)))
3074 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3075 (sha256
3076 (base32
3077 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3078 (build-system ant-build-system)
3079 (arguments
3080 `(#:make-flags '("-file" "build/build.xml")
3081 #:tests? #f ; there are no tests
3082 ;; There are weird build failures with JDK8, such as: "The type
3083 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3084 ;; referenced from required .class files"
3085 #:jdk ,icedtea-7
3086 #:modules ((guix build ant-build-system)
3087 (guix build utils)
3088 (guix build java-utils)
3089 (sxml simple)
3090 (sxml transform)
3091 (sxml xpath))
3092 #:phases
3093 (modify-phases %standard-phases
3094 (add-after 'unpack 'unpack-build-resources
3095 (lambda* (#:key inputs #:allow-other-keys)
3096 (mkdir-p "../build_resources")
3097 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3098 "-C" "../build_resources"
3099 "--strip-components=1")
3100 (mkdir-p "../build_resources/lib")
3101 #t))
3102 (add-after 'unpack-build-resources 'fix-dependencies
3103 (lambda* (#:key inputs #:allow-other-keys)
3104 ;; FIXME: There should be a more convenient abstraction for
3105 ;; editing XML files.
3106 (with-directory-excursion "../build_resources/ant/"
3107 (chmod "build-common.xml" #o664)
3108 (call-with-output-file "build-common.xml.new"
3109 (lambda (port)
3110 (sxml->xml
3111 (pre-post-order
3112 (with-input-from-file "build-common.xml"
3113 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3114 `(;; Remove dependency on classycle and custom ant tasks
3115 (taskdef . ,(lambda (tag . kids)
3116 (let ((name ((sxpath '(name *text*)) kids)))
3117 (if (or (member "build-info" name)
3118 (member "dependency-checker" name)
3119 (member "build-java-subprojects" name)
3120 (member "project-classpath" name))
3121 '() ; skip
3122 `(,tag ,@kids)))))
3123 (typedef . ,(lambda (tag . kids)
3124 (let ((name ((sxpath '(name *text*)) kids)))
3125 (if (member "recursive-jar" name)
3126 '() ; skip
3127 `(,tag ,@kids)))))
3128 (build-java-subprojects . ,(lambda _ '()))
3129 ;; Ignore everything else
3130 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3131 (*text* . ,(lambda (_ txt) txt))))
3132 port)))
3133 (rename-file "build-common.xml.new" "build-common.xml"))
3134 (substitute* "build/build.xml"
3135 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3136 (string-append (assoc-ref inputs "java-cisd-base")
3137 "/share/java/sis-base.jar"))
3138 ;; Remove dependency on svn
3139 (("<build-info.*") "")
3140 (("\\$\\{revision.number\\}")
3141 ,(number->string revision))
3142 (("\\$\\{version.number\\}") ,base-version)
3143 ;; Don't use custom ant tasks.
3144 (("recursive-jar") "jar")
3145 (("<project-classpath.*") ""))
3146 #t))
3147 (replace 'install (install-jars "targets/dist")))))
3148 (inputs
3149 `(("java-cisd-base" ,java-cisd-base)))
3150 (native-inputs
3151 `(("ecj" ,java-ecj-3.5)
3152 ("build-resources"
3153 ,(origin
3154 (method svn-fetch)
3155 (uri (svn-reference
3156 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3157 "args4j/tags/release/"
3158 (version-major+minor base-version)
3159 ".x/" base-version
3160 "/build_resources/"))
3161 (revision revision)))
3162 (sha256
3163 (base32
3164 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3165 (modules '((guix build utils)))
3166 ;; Delete bundled pre-built jars.
3167 (snippet
3168 '(begin (delete-file-recursively "lib/") #t))))))
3169 (home-page "http://svnsis.ethz.ch")
3170 (synopsis "Command line parser library")
3171 (description "This package provides a parser for command line arguments.")
3172 (license license:asl2.0))))
3173
3174 (define-public java-cisd-jhdf5
3175 (let ((revision 39162)
3176 (base-version "14.12.6"))
3177 (package
3178 (name "java-cisd-jhdf5")
3179 (version (string-append base-version "-" (number->string revision)))
3180 (source (origin
3181 (method svn-fetch)
3182 (uri (svn-reference
3183 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3184 "jhdf5/tags/release/"
3185 (version-major+minor base-version)
3186 ".x/" base-version "/jhdf5/"))
3187 (revision revision)))
3188 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3189 (sha256
3190 (base32
3191 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3192 (modules '((guix build utils)))
3193 (snippet
3194 '(begin
3195 ;; Delete included gradle jar
3196 (delete-file-recursively "gradle/wrapper")
3197 ;; Delete pre-built native libraries
3198 (delete-file-recursively "libs")
3199 #t))))
3200 (build-system ant-build-system)
3201 (arguments
3202 `(#:make-flags '("-file" "build/build.xml")
3203 #:build-target "jar-all"
3204 #:test-target "jar-test"
3205 #:jdk ,icedtea-8
3206 #:phases
3207 (modify-phases %standard-phases
3208 ;; FIXME: this build phase fails.
3209 (delete 'generate-jar-indices)
3210 ;; Don't erase results from the build phase when building tests.
3211 (add-after 'unpack 'separate-test-target-from-clean
3212 (lambda _
3213 (substitute* "build/build.xml"
3214 (("\"jar-test\" depends=\"clean, ")
3215 "\"jar-test\" depends=\""))
3216 #t))
3217 (add-after 'unpack 'unpack-build-resources
3218 (lambda* (#:key inputs #:allow-other-keys)
3219 (copy-recursively (assoc-ref inputs "build-resources")
3220 "../build_resources")
3221 (delete-file-recursively "../build_resources/lib/")
3222 (mkdir-p "../build_resources/lib")
3223 ;; Remove dependency on classycle
3224 (substitute* "../build_resources/ant/build-common.xml"
3225 (("<taskdef name=\"dependency-checker.*") "")
3226 (("classname=\"classycle.*") "")
3227 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3228 ;; Remove dependency on svn
3229 (substitute* "build/build.xml"
3230 (("<build-info.*") "")
3231 (("\\$\\{revision.number\\}")
3232 ,(number->string revision))
3233 (("\\$\\{version.number\\}") ,base-version))
3234 #t))
3235 (add-after 'unpack-build-resources 'fix-dependencies
3236 (lambda* (#:key inputs #:allow-other-keys)
3237 (substitute* "../build_resources/ant/build-common.xml"
3238 (("../libraries/testng/testng-jdk15.jar")
3239 (string-append (assoc-ref inputs "java-testng")
3240 "/share/java/java-testng.jar")))
3241 (substitute* "build/build.xml"
3242 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3243 (string-append (assoc-ref inputs "java-cisd-base")
3244 "/share/java/sis-base.jar"))
3245 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3246 (string-append (assoc-ref inputs "java-cisd-args4j")
3247 "/share/java/cisd-args4j.jar"))
3248 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3249 (string-append (assoc-ref inputs "java-commons-lang")
3250 "/share/java/commons-lang-"
3251 ,(package-version java-commons-lang) ".jar"))
3252 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3253 (string-append (assoc-ref inputs "java-commons-io")
3254 "/lib/m2/commons-io/commons-io/"
3255 ,(package-version java-commons-io)
3256 "/commons-io-"
3257 ,(package-version java-commons-io)
3258 ".jar"))
3259 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3260 (string-append (assoc-ref inputs "java-testng")
3261 "/share/java/java-testng.jar"))
3262 (("\\$\\{lib\\}/junit4/junit.jar")
3263 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3264 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3265 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3266 "jar$"))))
3267 ;; Remove dependency on ch.rinn.restrictions
3268 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3269 (substitute* '("BitSetConversionUtils.java"
3270 "HDF5Utils.java")
3271 (("import ch.rinn.restrictions.Private;") "")
3272 (("@Private") "")))
3273 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3274 (substitute* '("BitSetConversionTest.java"
3275 "h5ar/HDF5ArchiverTest.java")
3276 (("import ch.rinn.restrictions.Friend;") "")
3277 (("@Friend.*") ""))
3278 ;; Remove leftovers from removing @Friend
3279 (substitute* "h5ar/HDF5ArchiverTest.java"
3280 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3281 "")))
3282 #t))
3283 (add-before 'configure 'build-native-library
3284 (lambda* (#:key inputs #:allow-other-keys)
3285 (let ((jdk (assoc-ref inputs "jdk"))
3286 (hdf5 (assoc-ref inputs "hdf5"))
3287 (dir ,(match (%current-system)
3288 ("i686-linux"
3289 "i386-Linux")
3290 ((or "armhf-linux" "aarch64-linux")
3291 "arm-Linux")
3292 ((or "x86_64-linux")
3293 "amd64-Linux")
3294 (_ "unknown-Linux"))))
3295 (with-directory-excursion "source/c"
3296 (apply invoke `("gcc" "-shared" "-O3"
3297 "-fPIC"
3298 "-Wl,--exclude-libs,ALL"
3299 ,@(find-files "jhdf5" "\\.c$")
3300 ,@(find-files "hdf-java" "\\.c$")
3301 ,(string-append "-I" hdf5 "/include")
3302 ,(string-append "-I" jdk "/include")
3303 ,(string-append "-I" jdk "/include/linux")
3304 ,(string-append hdf5 "/lib/libhdf5.a")
3305 "-o" "libjhdf5.so" "-lz")))
3306 (install-file "source/c/libjhdf5.so"
3307 (string-append "libs/native/jhdf5/" dir))
3308 #t)))
3309 ;; In the "check" phase we only build the test executable.
3310 (add-after 'check 'run-tests
3311 (lambda _
3312 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3313 (delete-file "targets/dist/sis-jhdf5-test.jar")
3314 #t))
3315 (replace 'install
3316 (install-jars "targets/dist")))))
3317 (inputs
3318 `(("java-cisd-base" ,java-cisd-base)
3319 ("java-cisd-args4j" ,java-cisd-args4j)
3320 ("java-commons-lang" ,java-commons-lang)
3321 ("java-commons-io" ,java-commons-io)
3322 ("hdf5" ,hdf5)
3323 ("zlib" ,zlib)))
3324 (native-inputs
3325 `(("jdk" ,icedtea-8)
3326 ("java-testng" ,java-testng)
3327 ("java-junit" ,java-junit)
3328 ("java-jmock" ,java-jmock)
3329 ("java-hamcrest-core" ,java-hamcrest-core)
3330 ("build-resources"
3331 ,(origin
3332 (method svn-fetch)
3333 (uri (svn-reference
3334 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3335 "jhdf5/tags/release/"
3336 (version-major+minor base-version)
3337 ".x/" base-version
3338 "/build_resources/"))
3339 (revision revision)))
3340 (sha256
3341 (base32
3342 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3343 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3344 (synopsis "Java binding for HDF5")
3345 (description "JHDF5 is a high-level API in Java for reading and writing
3346 HDF5 files, building on the libraries provided by the HDF Group.")
3347 ;; The C sources are under a non-copyleft license, which looks like a
3348 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3349 (license (list license:asl2.0
3350 (license:non-copyleft "file://source/c/COPYING"))))))
3351
3352 (define-public java-classpathx-servletapi
3353 (package
3354 (name "java-classpathx-servletapi")
3355 (version "3.0.1")
3356 (source (origin
3357 (method url-fetch)
3358 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3359 "servletapi-" version ".tar.gz"))
3360 (sha256
3361 (base32
3362 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3363 (build-system ant-build-system)
3364 (arguments
3365 `(#:tests? #f ; there is no test target
3366 #:build-target "compile"
3367 #:make-flags
3368 (list "-Dbuild.compiler=javac1.8"
3369 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3370 #:phases
3371 (modify-phases %standard-phases
3372 (replace 'install
3373 (lambda* (#:key make-flags #:allow-other-keys)
3374 (apply invoke `("ant" "dist" ,@make-flags)))))))
3375 (home-page "https://www.gnu.org/software/classpathx/")
3376 (synopsis "Java servlet API implementation")
3377 (description "This is the GNU servlet API distribution, part of the
3378 ClasspathX project. It provides implementations of version 3.0 of the servlet
3379 API and version 2.1 of the Java ServerPages API.")
3380 (license license:gpl3+)))
3381
3382 (define-public java-javaee-servletapi
3383 (package
3384 (name "java-javaee-servletapi")
3385 (version "3.1.0")
3386 (source (origin
3387 (method git-fetch)
3388 (uri (git-reference
3389 (url "https://github.com/javaee/servlet-spec")
3390 (commit version)))
3391 (file-name (git-file-name name version))
3392 (sha256
3393 (base32
3394 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3395 (build-system ant-build-system)
3396 (arguments
3397 `(#:jar-name "javax-servletapi.jar"
3398 ;; no tests
3399 #:tests? #f
3400 #:source-dir "src/main/java"
3401 #:phases
3402 (modify-phases %standard-phases
3403 (add-before 'build 'copy-resources
3404 (lambda _
3405 (mkdir-p "build/classes/javax/servlet/http")
3406 (let ((from-prefix "src/main/java/javax/servlet/")
3407 (to-prefix "build/classes/javax/servlet/"))
3408 (for-each (lambda (f)
3409 (copy-file (string-append from-prefix f)
3410 (string-append to-prefix f)))
3411 (list "LocalStrings_ja.properties"
3412 "LocalStrings.properties"
3413 "LocalStrings_fr.properties"
3414 "http/LocalStrings_es.properties"
3415 "http/LocalStrings_ja.properties"
3416 "http/LocalStrings.properties"
3417 "http/LocalStrings_fr.properties")))
3418 #t)))))
3419 (native-inputs
3420 `(("unzip" ,unzip)))
3421 (home-page "https://javaee.github.io/servlet-spec/")
3422 (synopsis "Java servlet API")
3423 (description "Java Servlet is the foundation web specification in the
3424 Java Enterprise Platform. Developers can build web applications using the
3425 Servlet API to interact with the request/response workflow. This project
3426 provides information on the continued development of the Java Servlet
3427 specification.")
3428 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3429 ;; Some files are licensed under ASL 2.0.
3430 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3431
3432 (define-public java-swt
3433 (package
3434 (name "java-swt")
3435 (version "4.7.1a")
3436 (source
3437 ;; The types of many variables and procedures differ in the sources
3438 ;; dependent on whether the target architecture is a 32-bit system or a
3439 ;; 64-bit system. Instead of patching the sources on demand in a build
3440 ;; phase we download either the 32-bit archive (which mostly uses "int"
3441 ;; types) or the 64-bit archive (which mostly uses "long" types).
3442 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3443 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3444 (file32 "x86")
3445 (file64 "x86_64"))
3446 (let-values (((hash file)
3447 (match (or (%current-target-system) (%current-system))
3448 ("x86_64-linux" (values hash64 file64))
3449 (_ (values hash32 file32)))))
3450 (origin
3451 (method url-fetch)
3452 (uri (string-append
3453 "http://download.eclipse.org/eclipse/downloads/drops4/"
3454 "R-" version "-201710090410/swt-" version
3455 "-gtk-linux-" file ".zip"))
3456 (sha256 (base32 hash))))))
3457 (build-system ant-build-system)
3458 (arguments
3459 `(#:jar-name "swt.jar"
3460 #:jdk ,icedtea-8
3461 #:tests? #f ; no "check" target
3462 #:phases
3463 (modify-phases %standard-phases
3464 (replace 'unpack
3465 (lambda* (#:key source #:allow-other-keys)
3466 (mkdir "swt")
3467 (invoke "unzip" source "-d" "swt")
3468 (chdir "swt")
3469 (mkdir "src")
3470 (invoke "unzip" "src.zip" "-d" "src")))
3471 ;; The classpath contains invalid icecat jars. Since we don't need
3472 ;; anything other than the JDK on the classpath, we can simply unset
3473 ;; it.
3474 (add-after 'configure 'unset-classpath
3475 (lambda _ (unsetenv "CLASSPATH") #t))
3476 (add-before 'build 'build-native
3477 (lambda* (#:key inputs outputs #:allow-other-keys)
3478 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3479 ;; Build shared libraries. Users of SWT have to set the system
3480 ;; property swt.library.path to the "lib" directory of this
3481 ;; package output.
3482 (mkdir-p lib)
3483 (setenv "OUTPUT_DIR" lib)
3484 (with-directory-excursion "src"
3485 (invoke "bash" "build.sh")))))
3486 (add-after 'install 'install-native
3487 (lambda* (#:key outputs #:allow-other-keys)
3488 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3489 (for-each (lambda (file)
3490 (install-file file lib))
3491 (find-files "." "\\.so$"))
3492 #t))))))
3493 (inputs
3494 `(("gtk" ,gtk+-2)
3495 ("libxtst" ,libxtst)
3496 ("libxt" ,libxt)
3497 ("mesa" ,mesa)
3498 ("glu" ,glu)))
3499 (native-inputs
3500 `(("pkg-config" ,pkg-config)
3501 ("unzip" ,unzip)))
3502 (home-page "https://www.eclipse.org/swt/")
3503 (synopsis "Widget toolkit for Java")
3504 (description
3505 "SWT is a widget toolkit for Java designed to provide efficient, portable
3506 access to the user-interface facilities of the operating systems on which it
3507 is implemented.")
3508 ;; SWT code is licensed under EPL1.0
3509 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3510 ;; Cairo bindings contain code under MPL1.1
3511 ;; XULRunner 1.9 bindings contain code under MPL2.0
3512 (license (list
3513 license:epl1.0
3514 license:mpl1.1
3515 license:mpl2.0
3516 license:lgpl2.1+))))
3517
3518 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3519 ;; of the latest release.
3520 (define-public java-qdox-1.12
3521 (package
3522 (name "java-qdox")
3523 (version "1.12.1")
3524 (source (origin
3525 (method url-fetch)
3526 (uri (string-append "https://repo1.maven.org/maven2/"
3527 "com/thoughtworks/qdox/qdox/" version
3528 "/qdox-" version "-sources.jar"))
3529 (sha256
3530 (base32
3531 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3532 (build-system ant-build-system)
3533 (arguments
3534 `(;; Tests require junit
3535 #:tests? #f
3536 #:jar-name "qdox.jar"
3537 #:phases
3538 (modify-phases %standard-phases
3539 (replace 'unpack
3540 (lambda* (#:key source #:allow-other-keys)
3541 (mkdir "src")
3542 (with-directory-excursion "src"
3543 (invoke "jar" "-xf" source))))
3544 ;; At this point we don't have junit, so we must remove the API
3545 ;; tests.
3546 (add-after 'unpack 'delete-tests
3547 (lambda _
3548 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3549 #t)))))
3550 (home-page "https://github.com/codehaus/qdox")
3551 (synopsis "Parse definitions from Java source files")
3552 (description
3553 "QDox is a high speed, small footprint parser for extracting
3554 class/interface/method definitions from source files complete with JavaDoc
3555 @code{@@tags}. It is designed to be used by active code generators or
3556 documentation tools.")
3557 (license license:asl2.0)))
3558
3559 (define-public java-qdox
3560 (package
3561 (name "java-qdox")
3562 ; Newer version exists, but this version is required by java-plexus-component-metadata
3563 (version "2.0-M2")
3564 (source (origin
3565 (method url-fetch)
3566 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3567 ;; Older releases at https://github.com/codehaus/qdox/
3568 ;; Note: The release at maven is pre-generated. The release at
3569 ;; github requires jflex.
3570 (uri (string-append "https://repo1.maven.org/maven2/"
3571 "com/thoughtworks/qdox/qdox/" version
3572 "/qdox-" version "-sources.jar"))
3573 (sha256
3574 (base32
3575 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3576 (build-system ant-build-system)
3577 (arguments
3578 `(#:jar-name "qdox.jar"
3579 #:tests? #f; no tests
3580 #:modules
3581 ((guix build ant-build-system)
3582 (guix build java-utils)
3583 (guix build utils)
3584 (sxml simple))
3585 #:phases
3586 (modify-phases %standard-phases
3587 (add-before 'install 'create-pom
3588 (lambda _
3589 (with-output-to-file "pom.xml"
3590 (lambda _
3591 (sxml->xml
3592 `((project
3593 (modelVersion "4.0.0")
3594 (name "QDox")
3595 (groupId "com.thoughtworks.qdox")
3596 (artifactId "qdox")
3597 (version ,,version))))))
3598 #t))
3599 (replace 'install
3600 (install-from-pom "pom.xml")))))
3601 (home-page "https://github.com/codehaus/qdox")
3602 (synopsis "Parse definitions from Java source files")
3603 (description "QDox is a high speed, small footprint parser for extracting
3604 class/interface/method definitions from source files complete with JavaDoc
3605 @code{@@tags}. It is designed to be used by active code generators or
3606 documentation tools.")
3607 (license license:asl2.0)))
3608
3609 (define-public java-qdox-2-M9
3610 (package
3611 (inherit java-qdox)
3612 (version "2.0-M9"); required by plexus-java
3613 (source (origin
3614 (method url-fetch)
3615 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3616 ;; Older releases at https://github.com/codehaus/qdox/
3617 ;; Note: The release at maven is pre-generated. The release at
3618 ;; github requires jflex.
3619 (uri (string-append "https://repo1.maven.org/maven2/"
3620 "com/thoughtworks/qdox/qdox/" version
3621 "/qdox-" version "-sources.jar"))
3622 (sha256
3623 (base32
3624 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3625
3626 (define-public java-jarjar
3627 (package
3628 (name "java-jarjar")
3629 (version "1.4")
3630 (source (origin
3631 (method url-fetch)
3632 (uri (string-append
3633 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3634 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3635 (sha256
3636 (base32
3637 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3638 (modules '((guix build utils)))
3639 (snippet
3640 '(begin
3641 ;; Delete bundled thirds-party jar archives.
3642 (delete-file-recursively "lib")
3643 (delete-file "src/test/enumtest.jar")
3644 ;; the CLASSPATH needs this directory, create an empty one
3645 (mkdir-p "lib")
3646 #t))))
3647 (build-system ant-build-system)
3648 (arguments
3649 `(;; Tests require junit, which ultimately depends on this package.
3650 #:tests? #f
3651 #:build-target "jar"
3652 #:phases
3653 (modify-phases %standard-phases
3654 (add-before 'build 'do-not-use-bundled-asm
3655 (lambda* (#:key inputs #:allow-other-keys)
3656 (substitute* "build.xml"
3657 (("<path id=\"path.build\">")
3658 (string-append "<path id=\"path.build\"><fileset dir=\""
3659 (assoc-ref inputs "java-asm-bootstrap")
3660 "/lib/m2\" includes=\"**/*.jar\"/>"))
3661 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3662 (("lib/asm-commons-4.0.jar")
3663 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3664 "asm-6.0.jar")))
3665 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3666 (string-append "<include name=\"org/objectweb/asm/"
3667 "commons/Remap*.class\"/>"
3668 "<include name=\"org/objectweb/asm/*.class\"/>"
3669 "<include name=\"org/objectweb/asm/"
3670 "signature/*.class\"/>"
3671 "<include name=\"org/objectweb/asm/"
3672 "commons/SignatureRemapper.class\"/>")))
3673 #t))
3674 (add-before 'build 'remove-maven-dependency
3675 (lambda _
3676 ;; We do not need to build jarjar as a maven plugin just yet, so
3677 ;; remove this file. Maven requires jarjar (but not that plugin),
3678 ;; so removing it improves the bootstrap.
3679 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3680 #t))
3681 (replace 'install
3682 (lambda* (#:key outputs #:allow-other-keys)
3683 (let ((target (string-append (assoc-ref outputs "out")
3684 "/share/java")))
3685 (install-file (string-append "dist/jarjar-" ,version ".jar")
3686 target))
3687 #t)))))
3688 (inputs
3689 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3690 (native-inputs
3691 `(("unzip" ,unzip)))
3692 (home-page "https://code.google.com/archive/p/jarjar/")
3693 (synopsis "Repackage Java libraries")
3694 (description
3695 "Jar Jar Links is a utility that makes it easy to repackage Java
3696 libraries and embed them into your own distribution. Jar Jar Links includes
3697 an Ant task that extends the built-in @code{jar} task.")
3698 (license license:asl2.0)))
3699
3700 (define-public java-hamcrest-core
3701 (package
3702 (name "java-hamcrest-core")
3703 (version "1.3")
3704 (source (origin
3705 (method git-fetch)
3706 (uri (git-reference
3707 (url "https://github.com/hamcrest/JavaHamcrest/")
3708 (commit (string-append "hamcrest-java-" version))))
3709 (file-name (git-file-name name version))
3710 (sha256
3711 (base32
3712 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3713 (modules '((guix build utils)))
3714 (snippet
3715 '(begin
3716 ;; Delete bundled thirds-party jar archives.
3717 (delete-file-recursively "lib")
3718 #t))))
3719 (build-system ant-build-system)
3720 (arguments
3721 `(#:tests? #f ; Tests require junit
3722 #:modules ((guix build ant-build-system)
3723 (guix build java-utils)
3724 (guix build utils)
3725 (srfi srfi-1))
3726 #:make-flags (list (string-append "-Dversion=" ,version))
3727 #:test-target "unit-test"
3728 #:build-target "core"
3729 #:phases
3730 (modify-phases %standard-phases
3731 ;; Disable unit tests, because they require junit, which requires
3732 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3733 ;; attribute from the manifest for reproducibility.
3734 (add-before 'configure 'patch-build.xml
3735 (lambda _
3736 (substitute* "build.xml"
3737 (("unit-test, ") "")
3738 (("\\$\\{build.timestamp\\}") "guix"))
3739 #t))
3740 ;; Java's "getMethods()" returns methods in an unpredictable order.
3741 ;; To make the output of the generated code deterministic we must
3742 ;; sort the array of methods.
3743 (add-after 'unpack 'make-method-order-deterministic
3744 (lambda _
3745 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3746 (("import java\\.util\\.Iterator;" line)
3747 (string-append line "\n"
3748 "import java.util.Arrays; import java.util.Comparator;"))
3749 (("allMethods = cls\\.getMethods\\(\\);" line)
3750 (string-append "_" line
3751 "
3752 private Method[] getSortedMethods() {
3753 Arrays.sort(_allMethods, new Comparator<Method>() {
3754 @Override
3755 public int compare(Method a, Method b) {
3756 return a.toString().compareTo(b.toString());
3757 }
3758 });
3759 return _allMethods;
3760 }
3761
3762 private Method[] allMethods = getSortedMethods();")))
3763 #t))
3764 (add-before 'build 'do-not-use-bundled-qdox
3765 (lambda* (#:key inputs #:allow-other-keys)
3766 (substitute* "build.xml"
3767 (("lib/generator/qdox-1.12.jar")
3768 (string-append (assoc-ref inputs "java-qdox-1.12")
3769 "/share/java/qdox.jar")))
3770 #t))
3771 ;; build.xml searches for .jar files in this directoy, which
3772 ;; we remove from the source archive.
3773 (add-before 'build 'create-dummy-directories
3774 (lambda _
3775 (mkdir-p "lib/integration")
3776 #t))
3777 (add-before 'build 'create-pom
3778 (lambda _
3779 (substitute* "pom/hamcrest-core.pom"
3780 (("@VERSION@") ,version))
3781 #t))
3782 (replace 'install
3783 (install-from-pom "pom/hamcrest-core.pom")))))
3784 (native-inputs
3785 `(("java-qdox-1.12" ,java-qdox-1.12)
3786 ("java-jarjar" ,java-jarjar)))
3787 (propagated-inputs
3788 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3789 (home-page "http://hamcrest.org/")
3790 (synopsis "Library of matchers for building test expressions")
3791 (description
3792 "This package provides a library of matcher objects (also known as
3793 constraints or predicates) allowing @code{match} rules to be defined
3794 declaratively, to be used in other frameworks. Typical scenarios include
3795 testing frameworks, mocking libraries and UI validation rules.")
3796 (license license:bsd-2)))
3797
3798 (define java-hamcrest-parent-pom
3799 (package
3800 (inherit java-hamcrest-core)
3801 (name "java-hamcrest-parent-pom")
3802 (propagated-inputs '())
3803 (native-inputs '())
3804 (arguments
3805 `(#:tests? #f
3806 #:phases
3807 (modify-phases %standard-phases
3808 (delete 'configure)
3809 (replace 'build
3810 (lambda _
3811 (substitute* "pom/hamcrest-parent.pom"
3812 (("@VERSION@") ,(package-version java-hamcrest-core)))
3813 #t))
3814 (replace 'install
3815 (install-pom-file "pom/hamcrest-parent.pom")))))))
3816
3817 (define-public java-hamcrest-library
3818 (package
3819 (inherit java-hamcrest-core)
3820 (name "java-hamcrest-library")
3821 (arguments
3822 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3823 ((#:build-target _) "library")
3824 ((#:phases phases)
3825 `(modify-phases ,phases
3826 (add-after 'unpack 'patch-classpath-for-integration
3827 (lambda* (#:key inputs #:allow-other-keys)
3828 (substitute* "build.xml"
3829 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3830 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3831 "jar$"))))
3832 #t))
3833 (replace 'create-pom
3834 (lambda _
3835 (substitute* "pom/hamcrest-library.pom"
3836 (("@VERSION@") ,(package-version java-hamcrest-core)))
3837 #t))
3838 (replace 'install
3839 (install-from-pom "pom/hamcrest-library.pom"))))))
3840 (propagated-inputs
3841 `(("java-hamcrest-core" ,java-hamcrest-core)
3842 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
3843
3844 (define-public java-junit
3845 (package
3846 (name "java-junit")
3847 (version "4.12")
3848 (source (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/junit-team/junit/")
3852 (commit (string-append "r" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32
3856 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3857 (modules '((guix build utils)))
3858 (snippet
3859 '(begin
3860 ;; Delete bundled jar archives.
3861 (delete-file-recursively "lib")
3862 #t))))
3863 (build-system ant-build-system)
3864 (arguments
3865 `(#:jar-name "junit.jar"
3866 #:source-dir "src/main/java"
3867 #:test-dir "src/test"
3868 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3869 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3870 #:phases
3871 (modify-phases %standard-phases
3872 (add-before 'check 'copy-test-resources
3873 (lambda _
3874 (copy-recursively "src/test/resources" "build/test-classes")
3875 #t))
3876 (replace 'install
3877 (install-from-pom "pom.xml")))))
3878 (propagated-inputs
3879 `(("java-hamcrest-core" ,java-hamcrest-core)))
3880 (native-inputs
3881 `(("java-hamcrest-library" ,java-hamcrest-library)))
3882 (home-page "https://junit.org/junit4/")
3883 (synopsis "Test framework for Java")
3884 (description
3885 "JUnit is a simple framework to write repeatable tests for Java projects.
3886 JUnit provides assertions for testing expected results, test fixtures for
3887 sharing common test data, and test runners for running tests.")
3888 (license license:epl1.0)))
3889
3890 (define-public java-junitparams
3891 (package
3892 (name "java-junitparams")
3893 (version "1.1.1")
3894 (source (origin
3895 (method git-fetch)
3896 (uri (git-reference
3897 (url "https://github.com/Pragmatists/JUnitParams")
3898 (commit (string-append "JUnitParams-" version))))
3899 (file-name (git-file-name name version))
3900 (sha256
3901 (base32
3902 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3903 (build-system ant-build-system)
3904 (arguments
3905 `(#:jar-name "junitparams.jar"
3906 #:source-dir "src/main/java"
3907 #:test-dir "src/test"
3908 #:test-exclude (list "**/SuperclassTest.java")))
3909 (inputs
3910 `(("java-junit" ,java-junit)))
3911 (native-inputs
3912 `(("java-junit" ,java-junit)
3913 ("java-hamcrest-core" ,java-hamcrest-core)
3914 ("java-assertj" ,java-assertj)))
3915 (home-page "https://github.com/Pragmatists/JUnitParams")
3916 (synopsis "Parameterised test support for JUnit")
3917 (description "The JUnitParams project adds a new runner to JUnit and
3918 provides much easier and readable parametrised tests for JUnit.")
3919 (license license:asl2.0)))
3920
3921 (define-public java-plexus-utils
3922 (package
3923 (name "java-plexus-utils")
3924 ;; sisu-build-api needs this version, later versions don't work
3925 (version "3.2.1")
3926 (source (origin
3927 (method git-fetch)
3928 (uri (git-reference
3929 (url "https://github.com/codehaus-plexus/plexus-utils")
3930 (commit (string-append "plexus-utils-" version))))
3931 (file-name (git-file-name name version))
3932 (sha256
3933 (base32
3934 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
3935 (build-system ant-build-system)
3936 ;; FIXME: The default build.xml does not include a target to install
3937 ;; javadoc files.
3938 (arguments
3939 `(#:jar-name "plexus-utils.jar"
3940 #:source-dir "src/main"
3941 #:phases
3942 (modify-phases %standard-phases
3943 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3944 (lambda _
3945 (substitute* "src/main/java/org/codehaus/plexus/util/\
3946 cli/shell/BourneShell.java"
3947 (("/bin/sh") (which "sh"))
3948 (("/usr/") (getcwd)))
3949 #t))
3950 (add-after 'unpack 'fix-or-disable-broken-tests
3951 (lambda _
3952 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3953 (substitute* '("cli/CommandlineTest.java"
3954 "cli/shell/BourneShellTest.java")
3955 (("/bin/sh") (which "sh"))
3956 (("/bin/echo") (which "echo")))
3957
3958 ;; This test depends on MavenProjectStub, but we don't have
3959 ;; a package for Maven.
3960 (delete-file "introspection/ReflectionValueExtractorTest.java")
3961
3962 ;; FIXME: The command line tests fail, maybe because they use
3963 ;; absolute paths.
3964 (delete-file "cli/CommandlineTest.java")
3965
3966 ;; These tests require openjdk jmh, which is not packaged yet
3967 (for-each delete-file (find-files "." "PerfTest.java$")))
3968 #t))
3969 (add-before 'build 'copy-resources
3970 (lambda _
3971 (copy-recursively "src/main/resources" "build/classes")
3972 #t))
3973 (replace 'install (install-from-pom "pom.xml")))))
3974 (native-inputs
3975 `(("java-hamcrest-core" ,java-hamcrest-core)
3976 ("java-junit" ,java-junit)))
3977 (propagated-inputs
3978 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
3979 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3980 (synopsis "Common utilities for the Plexus framework")
3981 (description "This package provides various Java utility classes for the
3982 Plexus framework to ease working with strings, files, command lines, XML and
3983 more.")
3984 (license license:asl2.0)))
3985
3986 (define-public java-plexus-utils-3.3.0
3987 (package
3988 (inherit java-plexus-utils)
3989 (version "3.3.0")
3990 (source (origin
3991 (method git-fetch)
3992 (uri (git-reference
3993 (url "https://github.com/codehaus-plexus/plexus-utils")
3994 (commit (string-append "plexus-utils-" version))))
3995 (file-name (git-file-name "java-plexus-utils" version))
3996 (sha256
3997 (base32
3998 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
3999
4000 (define-public java-plexus-interpolation
4001 (package
4002 (name "java-plexus-interpolation")
4003 (version "1.26")
4004 (source (origin
4005 (method git-fetch)
4006 (uri (git-reference
4007 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4008 (commit (string-append "plexus-interpolation-" version))))
4009 (file-name (git-file-name name version))
4010 (sha256
4011 (base32
4012 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4013 (build-system ant-build-system)
4014 (arguments
4015 `(#:jar-name "plexus-interpolation.jar"
4016 #:source-dir "src/main"
4017 #:phases
4018 (modify-phases %standard-phases
4019 (replace 'install (install-from-pom "pom.xml")))))
4020 (propagated-inputs
4021 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4022 (native-inputs
4023 `(("java-junit" ,java-junit)
4024 ("java-hamcrest-core" ,java-hamcrest-core)))
4025 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4026 (synopsis "Java components for interpolating ${} strings and the like")
4027 (description "Plexus interpolator is a modular, flexible interpolation
4028 framework for the expression language style commonly seen in Maven, Plexus,
4029 and other related projects.
4030
4031 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4032 package within @code{plexus-utils}, but has been separated in order to allow
4033 these two libraries to vary independently of one another.")
4034 (license license:asl2.0)))
4035
4036 (define-public java-plexus-classworlds
4037 (package
4038 (name "java-plexus-classworlds")
4039 (version "2.6.0")
4040 (source (origin
4041 (method git-fetch)
4042 (uri (git-reference
4043 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4044 (commit (string-append "plexus-classworlds-" version))))
4045 (file-name (git-file-name name version))
4046 (sha256
4047 (base32
4048 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4049 (build-system ant-build-system)
4050 (arguments
4051 `(#:jar-name "plexus-classworlds.jar"
4052 #:source-dir "src/main"
4053 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4054 #:phases
4055 (modify-phases %standard-phases
4056 (replace 'install (install-from-pom "pom.xml")))))
4057 (propagated-inputs
4058 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4059 (native-inputs
4060 `(("java-junit" ,java-junit)))
4061 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4062 (synopsis "Java class loader framework")
4063 (description "Plexus classworlds replaces the native @code{ClassLoader}
4064 mechanism of Java. It is especially useful for dynamic loading of application
4065 components.")
4066 (license license:asl2.0)))
4067
4068 (define java-plexus-container-default-bootstrap
4069 (package
4070 (name "java-plexus-container-default-bootstrap")
4071 (version "1.7.1")
4072 (source (origin
4073 (method git-fetch)
4074 (uri (git-reference
4075 (url "https://github.com/codehaus-plexus/plexus-containers")
4076 (commit (string-append "plexus-containers-" version))))
4077 (file-name (git-file-name name version))
4078 (sha256
4079 (base32
4080 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4081 (build-system ant-build-system)
4082 (arguments
4083 `(#:jar-name "container-default.jar"
4084 #:source-dir "plexus-container-default/src/main/java"
4085 #:test-dir "plexus-container-default/src/test"
4086 #:tests? #f; requires plexus-archiver, which depends on this package
4087 #:phases
4088 (modify-phases %standard-phases
4089 (add-before 'build 'fix-google-collections
4090 (lambda _
4091 ;; Google collections are now replaced with guava
4092 (substitute* "plexus-container-default/pom.xml"
4093 (("google-collections") "guava")
4094 (("com.google.collections") "com.google.guava"))
4095 #t))
4096 (add-before 'build 'copy-resources
4097 (lambda _
4098 (copy-recursively
4099 "plexus-container-default/src/main/resources/"
4100 "build/classes")
4101 #t))
4102 (replace 'install
4103 (install-from-pom "plexus-container-default/pom.xml")))))
4104 (propagated-inputs
4105 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4106 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4107 ("java-plexus-utils" ,java-plexus-utils)
4108 ("java-junit" ,java-junit)
4109 ("java-guava" ,java-guava)
4110 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4111 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4112 (synopsis "Inversion-of-control container")
4113 (description "Plexus-default-container is Plexus' inversion-of-control
4114 (@dfn{IoC}) container. It is composed of its public API and its default
4115 implementation.")
4116 (license license:asl2.0)))
4117
4118 (define java-plexus-containers-parent-pom
4119 (package
4120 (inherit java-plexus-container-default-bootstrap)
4121 (name "java-plexus-containers-parent-pom")
4122 (arguments
4123 `(#:tests? #f
4124 #:phases
4125 (modify-phases %standard-phases
4126 (delete 'configure)
4127 (delete 'build)
4128 (replace 'install
4129 (install-pom-file "pom.xml")))))
4130 (propagated-inputs
4131 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4132
4133 (define-public java-plexus-io
4134 (package
4135 (name "java-plexus-io")
4136 (version "3.2.0")
4137 (source (origin
4138 (method git-fetch)
4139 (uri (git-reference
4140 (url "https://github.com/codehaus-plexus/plexus-io")
4141 (commit (string-append "plexus-io-" version))))
4142 (file-name (git-file-name name version))
4143 (sha256
4144 (base32
4145 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4146 (build-system ant-build-system)
4147 (arguments
4148 `(#:jar-name "plexus-io.jar"
4149 #:source-dir "src/main/java"
4150 #:test-dir "src/test"
4151 #:phases
4152 (modify-phases %standard-phases
4153 (add-before 'build 'copy-resources
4154 (lambda _
4155 (mkdir-p "build/classes")
4156 (copy-recursively "src/main/resources" "build/classes")
4157 (mkdir-p "build/test-classes")
4158 (copy-recursively "src/test/resources" "build/test-classes")
4159 #t))
4160 (replace 'install (install-from-pom "pom.xml")))))
4161 (propagated-inputs
4162 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4163 ("java-commons-io" ,java-commons-io)
4164 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4165 (inputs
4166 `(("java-jsr305" ,java-jsr305)))
4167 (native-inputs
4168 `(("junit" ,java-junit)
4169 ("hamcrest" ,java-hamcrest-core)
4170 ("guava" ,java-guava)
4171 ("classworlds" ,java-plexus-classworlds)
4172 ("xbean" ,java-geronimo-xbean-reflect)
4173 ("container-default" ,java-plexus-container-default-bootstrap)))
4174 (home-page "https://github.com/codehaus-plexus/plexus-io")
4175 (synopsis "I/O plexus components")
4176 (description "Plexus IO is a set of plexus components, which are designed
4177 for use in I/O operations. This implementation using plexus components allows
4178 reusing it in maven.")
4179 (license license:asl2.0)))
4180
4181 (define-public java-plexus-archiver
4182 (package
4183 (name "java-plexus-archiver")
4184 (version "4.2.2")
4185 (source (origin
4186 (method url-fetch)
4187 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4188 "/archive/plexus-archiver-" version ".tar.gz"))
4189 (sha256
4190 (base32
4191 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4192 (build-system ant-build-system)
4193 (arguments
4194 `(#:jar-name "plexus-archiver.jar"
4195 #:source-dir "src/main/java"
4196 #:test-dir "src/test"
4197 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4198 #:phases
4199 (modify-phases %standard-phases
4200 (add-before 'check 'remove-failing
4201 (lambda _
4202 ;; Requires an older version of plexus container
4203 (delete-file
4204 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4205 #t))
4206 (add-before 'check 'fix-test-building
4207 (lambda _
4208 (substitute* "build.xml"
4209 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4210 #t))
4211 (add-before 'build 'copy-resources
4212 (lambda _
4213 (mkdir-p "build/classes")
4214 (copy-recursively "src/main/resources" "build/classes")
4215 (mkdir-p "build/test-classes")
4216 (copy-recursively "src/test/resources" "build/test-classes")
4217 #t))
4218 (replace 'install (install-from-pom "pom.xml")))))
4219 (propagated-inputs
4220 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4221 ("java-plexus-io" ,java-plexus-io)
4222 ("java-iq80-snappy" ,java-iq80-snappy)
4223 ("java-commons-compress" ,java-commons-compress)
4224 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4225 (inputs
4226 `(("java-jsr305" ,java-jsr305)
4227 ("java-plexus-container-default"
4228 ,java-plexus-container-default-bootstrap)))
4229 (native-inputs
4230 `(("java-hamcrest-core" ,java-hamcrest-core)
4231 ("junit" ,java-junit)
4232 ("classworld" ,java-plexus-classworlds)
4233 ("xbean" ,java-geronimo-xbean-reflect)
4234 ("xz" ,java-xz)
4235 ("guava" ,java-guava)))
4236 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4237 (synopsis "Archiver component of the Plexus project")
4238 (description "Plexus-archiver contains a component to deal with project
4239 archives (jar).")
4240 (license license:asl2.0)))
4241
4242 (define-public java-plexus-container-default
4243 (package
4244 (inherit java-plexus-container-default-bootstrap)
4245 (name "java-plexus-container-default")
4246 (arguments
4247 `(#:jar-name "container-default.jar"
4248 #:source-dir "plexus-container-default/src/main/java"
4249 #:test-dir "plexus-container-default/src/test"
4250 #:test-exclude (list ;"**/*Test.java"
4251 "**/Abstract*.java"
4252 ;; Requires plexus-hierarchy
4253 "**/PlexusHierarchyTest.java"
4254 ;; Failures
4255 "**/ComponentRealmCompositionTest.java"
4256 "**/PlexusContainerTest.java")
4257 #:phases
4258 (modify-phases %standard-phases
4259 (add-before 'build 'fix-google-collections
4260 (lambda _
4261 ;; Google collections are now replaced with guava
4262 (substitute* "plexus-container-default/pom.xml"
4263 (("google-collections") "guava")
4264 (("com.google.collections") "com.google.guava"))
4265 #t))
4266 (add-before 'build 'copy-resources
4267 (lambda _
4268 (copy-recursively
4269 "plexus-container-default/src/main/resources/"
4270 "build/classes")
4271 #t))
4272 (add-before 'check 'fix-paths
4273 (lambda _
4274 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4275 (substitute*
4276 (string-append
4277 dir "/plexus/component/composition/"
4278 "ComponentRealmCompositionTest.java")
4279 (("src/test") "plexus-container-default/src/test"))
4280 #t)))
4281 (replace 'install
4282 (install-from-pom "plexus-container-default/pom.xml")))))
4283 (inputs
4284 `(("worldclass" ,java-plexus-classworlds)
4285 ("xbean" ,java-geronimo-xbean-reflect)
4286 ("utils" ,java-plexus-utils)
4287 ("junit" ,java-junit)
4288 ("guava" ,java-guava)))
4289 (native-inputs
4290 `(("archiver" ,java-plexus-archiver)
4291 ("hamcrest" ,java-hamcrest-core)))))
4292
4293 (define-public java-plexus-component-annotations
4294 (package
4295 (inherit java-plexus-container-default)
4296 (name "java-plexus-component-annotations")
4297 (arguments
4298 `(#:jar-name "plexus-component-annotations.jar"
4299 #:source-dir "plexus-component-annotations/src/main/java"
4300 #:tests? #f; no tests
4301 #:phases
4302 (modify-phases %standard-phases
4303 (replace 'install
4304 (install-from-pom "plexus-component-annotations/pom.xml")))))
4305 (propagated-inputs
4306 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4307 (inputs '())
4308 (native-inputs '())
4309 (synopsis "Plexus descriptors generator")
4310 (description "This package is a Maven plugin to generate Plexus descriptors
4311 from source tags and class annotations.")))
4312
4313 (define-public java-plexus-component-metadata
4314 (package
4315 (inherit java-plexus-container-default)
4316 (name "java-plexus-component-metadata")
4317 (arguments
4318 `(#:jar-name "plexus-component-metadata.jar"
4319 #:source-dir "src/main/java"
4320 #:test-dir "src/test"
4321 #:jdk ,icedtea-8
4322 #:phases
4323 (modify-phases %standard-phases
4324 (add-before 'configure 'chdir
4325 (lambda _
4326 (chdir "plexus-component-metadata")
4327 #t))
4328 (add-before 'build 'copy-resources
4329 (lambda _
4330 (copy-recursively "src/main/resources"
4331 "build/classes/")
4332 #t)))))
4333 (propagated-inputs
4334 `(("java-plexus-container-default" ,java-plexus-container-default)
4335 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4336 ("java-plexus-utils" ,java-plexus-utils)
4337 ("java-plexus-cli" ,java-plexus-cli)
4338 ("java-plexus-classworlds" ,java-plexus-classworlds)
4339 ("maven-plugin-api" ,maven-plugin-api)
4340 ("maven-plugin-annotations" ,maven-plugin-annotations)
4341 ("maven-core-bootstrap" ,maven-core-bootstrap)
4342 ("maven-model" ,maven-model)
4343 ("java-commons-cli" ,java-commons-cli)
4344 ("java-qdox" ,java-qdox)
4345 ("java-jdom2" ,java-jdom2)
4346 ("java-asm" ,java-asm)))
4347 (native-inputs
4348 `(("java-junit" ,java-junit)
4349 ("java-guava" ,java-guava)
4350 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4351 (synopsis "Inversion-of-control container for Maven")
4352 (description "The Plexus project provides a full software stack for creating
4353 and executing software projects. Based on the Plexus container, the
4354 applications can utilise component-oriented programming to build modular,
4355 reusable components that can easily be assembled and reused. This package
4356 provides the Maven plugin generating the component metadata.")))
4357
4358 (define-public java-plexus-cipher
4359 (package
4360 (name "java-plexus-cipher")
4361 (version "1.7")
4362 (source (origin
4363 (method git-fetch)
4364 (uri (git-reference
4365 (url "https://github.com/codehaus-plexus/plexus-cipher")
4366 (commit (string-append "plexus-cipher-" version))))
4367 (file-name (git-file-name name version))
4368 (sha256
4369 (base32
4370 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4371 (build-system ant-build-system)
4372 (arguments
4373 `(#:jar-name "plexus-cipher.jar"
4374 #:source-dir "src/main/java"
4375 #:tests? #f; FIXME: requires sisu-inject-bean
4376 #:phases
4377 (modify-phases %standard-phases
4378 (add-before 'build 'copy-resources
4379 (lambda _
4380 (copy-recursively "src/main/resources" "build/classes")
4381 (mkdir-p "build/classes/META-INF/sisu")
4382 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4383 (lambda _
4384 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4385 #t))
4386 (add-before 'install 'fix-test-dependency
4387 (lambda _
4388 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4389 (substitute* "pom.xml"
4390 (("provided") "test"))
4391 #t))
4392 (replace 'install (install-from-pom "pom.xml")))))
4393 (inputs
4394 `(("java-cdi-api" ,java-cdi-api)
4395 ("java-javax-inject" ,java-javax-inject)))
4396 (propagated-inputs
4397 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4398 (native-inputs
4399 `(("java-junit" ,java-junit)))
4400 (home-page "https://github.com/sonatype/plexus-cipher")
4401 (synopsis "Encryption/decryption Component")
4402 (description "Plexus-cipher contains a component to deal with encryption
4403 and decryption.")
4404 (license license:asl2.0)))
4405
4406 (define-public java-plexus-java
4407 (package
4408 (name "java-plexus-java")
4409 (version "0.9.10")
4410 (source (origin
4411 (method git-fetch)
4412 (uri (git-reference
4413 (url "https://github.com/codehaus-plexus/plexus-languages")
4414 (commit (string-append "plexus-languages-" version))))
4415 (file-name (git-file-name name version))
4416 (sha256
4417 (base32
4418 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4419 (modules '((guix build utils)))
4420 (snippet
4421 `(begin
4422 (for-each delete-file (find-files "." ".*.jar$"))
4423 #t))))
4424 (build-system ant-build-system)
4425 (arguments
4426 `(#:jar-name "plexus-java.java"
4427 #:source-dir "plexus-java/src/main/java"
4428 #:test-dir "plexus-java/src/test"
4429 #:tests? #f; require mockito 2
4430 #:phases
4431 (modify-phases %standard-phases
4432 (add-after 'build 'generate-metadata
4433 (lambda _
4434 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4435 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4436 "--source" "plexus-java/src/main/java"
4437 "--output" "build/classes/META-INF/plexus/components.xml"
4438 "--classes" "build/classes"
4439 "--descriptors" "build/classes/META-INF")
4440 (invoke "ant" "jar")
4441 #t))
4442 (add-before 'install 'install-parent
4443 (install-pom-file "pom.xml"))
4444 (replace 'install
4445 (install-from-pom "plexus-java/pom.xml")))))
4446 (propagated-inputs
4447 `(("java-asm" ,java-asm)
4448 ("java-qdox" ,java-qdox-2-M9)
4449 ("java-javax-inject" ,java-javax-inject)
4450 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4451 (inputs
4452 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4453 (native-inputs
4454 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4455 ("java-junit" ,java-junit)))
4456 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4457 (synopsis "Shared language features for Java")
4458 (description "This package contains shared language features of the Java
4459 language, for the plexus project.")
4460 (license license:asl2.0)))
4461
4462 (define-public java-plexus-compiler-api
4463 (package
4464 (name "java-plexus-compiler-api")
4465 (version "2.8.4")
4466 (source (origin
4467 (method git-fetch)
4468 (uri (git-reference
4469 (url "https://github.com/codehaus-plexus/plexus-compiler")
4470 (commit (string-append "plexus-compiler-" version))))
4471 (file-name (git-file-name name version))
4472 (sha256
4473 (base32
4474 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4475 (build-system ant-build-system)
4476 (arguments
4477 `(#:jar-name "plexus-compiler-api.jar"
4478 #:source-dir "plexus-compiler-api/src/main/java"
4479 #:test-dir "plexus-compiler-api/src/test"
4480 #:phases
4481 (modify-phases %standard-phases
4482 (replace 'install
4483 (install-from-pom "plexus-compiler-api/pom.xml")))))
4484 (propagated-inputs
4485 `(("java-plexus-container-default" ,java-plexus-container-default)
4486 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4487 ("java-plexus-util" ,java-plexus-utils)))
4488 (native-inputs
4489 `(("java-junit" ,java-junit)))
4490 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4491 (synopsis "Plexus Compilers component's API to manipulate compilers")
4492 (description "This package contains the API used by components to manipulate
4493 compilers.")
4494 (license (list license:asl2.0
4495 license:expat))))
4496
4497 (define java-plexus-compiler-pom
4498 (package
4499 (inherit java-plexus-compiler-api)
4500 (name "java-plexus-compiler-pom")
4501 (arguments
4502 `(#:tests? #f
4503 #:phases
4504 (modify-phases %standard-phases
4505 (delete 'configure)
4506 (delete 'build)
4507 (replace 'install
4508 (install-pom-file "pom.xml"))
4509 (add-after 'install 'install-compilers
4510 (install-pom-file "plexus-compilers/pom.xml")))))
4511 (propagated-inputs
4512 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4513
4514 (define plexus-components-parent-pom-4.0
4515 (package
4516 (name "plexus-components-parent-pom")
4517 (version "4.0")
4518 (source (origin
4519 (method git-fetch)
4520 (uri (git-reference
4521 (url "https://github.com/codehaus-plexus/plexus-components")
4522 (commit (string-append "plexus-components-" version))))
4523 (file-name (git-file-name name version))
4524 (sha256
4525 (base32
4526 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4527 (build-system ant-build-system)
4528 (arguments
4529 `(#:tests? #f
4530 #:phases
4531 (modify-phases %standard-phases
4532 (delete 'configure)
4533 (delete 'build)
4534 (replace 'install
4535 (install-pom-file "pom.xml")))))
4536 (propagated-inputs
4537 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4538 (home-page "https://codehaus-plexus.github.io/plexus-components")
4539 (synopsis "Plexus parent pom")
4540 (description "This package contains the Plexus components parent POM.")
4541 (license license:asl2.0)))
4542
4543 (define-public java-plexus-compiler-manager
4544 (package
4545 (inherit java-plexus-compiler-api)
4546 (name "java-plexus-compiler-manager")
4547 (arguments
4548 `(#:jar-name "compiler-compiler-manager.java"
4549 #:source-dir "plexus-compiler-manager/src/main/java"
4550 #:test-dir "plexus-compiler-manager/src/test"
4551 #:tests? #f
4552 #:phases
4553 (modify-phases %standard-phases
4554 (add-after 'build 'generate-metadata
4555 (lambda _
4556 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4557 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4558 "--source" "plexus-compiler-manager/src/main/java"
4559 "--output" "build/classes/META-INF/plexus/components.xml"
4560 "--classes" "build/classes"
4561 "--descriptors" "build/classes/META-INF")
4562 (invoke "ant" "jar")
4563 #t))
4564 (add-after 'generate-metadata 'rebuild
4565 (lambda _
4566 (invoke "ant" "jar")
4567 #t))
4568 (replace 'install
4569 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4570 (propagated-inputs
4571 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4572 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4573 ("java-plexus-container-default" ,java-plexus-container-default)))
4574 (native-inputs
4575 `(("unzip" ,unzip)
4576 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4577 (synopsis "Compiler management for Plexus Compiler component")
4578 (description "Plexus Compiler is a Plexus component to use different
4579 compilers through a uniform API. This component chooses the compiler
4580 implementation to use in a project.")))
4581
4582 (define-public java-plexus-compiler-javac
4583 (package
4584 (inherit java-plexus-compiler-api)
4585 (name "java-plexus-compiler-javac")
4586 (arguments
4587 `(#:jar-name "plexus-compiler-javac.jar"
4588 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4589 #:jdk ,icedtea-8
4590 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4591 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4592 #:modules ((guix build ant-build-system)
4593 (guix build utils)
4594 (guix build java-utils)
4595 (sxml simple))
4596 #:phases
4597 (modify-phases %standard-phases
4598 ;; We cannot use java-plexus-component-metadata to generate the metadata
4599 ;; because it ultimately depends on this package.
4600 ;; Create it manually instead
4601 (add-before 'build 'create-metadata
4602 (lambda _
4603 (let* ((dir "build/classes/META-INF/plexus")
4604 (file (string-append dir "/components.xml")))
4605 (mkdir-p dir)
4606 (with-output-to-file file
4607 (lambda _
4608 (sxml->xml
4609 `(component-set
4610 (components
4611 (component
4612 (role "org.codehaus.plexus.compiler.Compiler")
4613 (role-hint "javac")
4614 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4615 (isolated-realm "false"))))))))
4616 #t))
4617 (replace 'install
4618 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4619 (propagated-inputs
4620 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4621 ("java-plexus-utils" ,java-plexus-utils)
4622 ("java-plexus-container-default" ,java-plexus-container-default)))
4623 (synopsis "Javac Compiler support for Plexus Compiler component")
4624 (description "This package contains the Javac Compiler support for Plexus
4625 Compiler component.")))
4626
4627 (define plexus-components-pom-1.1.20
4628 (package
4629 (name "plexus-components-pom-1.1.20")
4630 (version "1.1.20")
4631 (source (origin
4632 (method git-fetch)
4633 (uri (git-reference
4634 (url "https://github.com/codehaus-plexus/plexus-components")
4635 (commit (string-append "plexus-components-" version))))
4636 (file-name (git-file-name name version))
4637 (sha256
4638 (base32
4639 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4640 (build-system ant-build-system)
4641 (arguments
4642 `(#:tests? #f
4643 #:phases
4644 (modify-phases %standard-phases
4645 (delete 'configure)
4646 (delete 'build)
4647 (replace 'install
4648 (install-pom-file "pom.xml")))))
4649 (propagated-inputs
4650 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4651 (home-page "https://github.com/codehaus-plexus/plexus-components")
4652 (synopsis "Maven parent pom for plexus packages")
4653 (description "This package contains the parent pom for plexus component
4654 packages.")
4655 (license license:asl2.0)))
4656
4657 (define-public java-plexus-digest
4658 (package
4659 (name "java-plexus-digest")
4660 (version "1.2")
4661 (source (origin
4662 (method git-fetch)
4663 (uri (git-reference
4664 (url "https://github.com/codehaus-plexus/plexus-digest")
4665 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4666 (file-name (git-file-name name version))
4667 (sha256
4668 (base32
4669 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4670 (build-system ant-build-system)
4671 (arguments
4672 `(#:jar-name "plexus-digest.jar"
4673 #:source-dir "src/main/java"
4674 #:tests? #f
4675 #:phases
4676 (modify-phases %standard-phases
4677 (replace 'install
4678 (install-from-pom "pom.xml")))))
4679 (propagated-inputs
4680 `(("java-plexus-utils" ,java-plexus-utils)
4681 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4682 (native-inputs
4683 `(("java-junit" ,java-junit)))
4684 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4685 (synopsis "Hash function utilities for Java")
4686 (description "This package is a plexus component that contains hash
4687 function utilities.")
4688 (license license:asl2.0)))
4689
4690 (define-public java-plexus-sec-dispatcher
4691 (package
4692 (name "java-plexus-sec-dispatcher")
4693 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4694 (source (origin
4695 ;; This project doesn't tag releases or publish tarballs, so we take
4696 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4697 (method git-fetch)
4698 (uri (git-reference
4699 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4700 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4701 (sha256
4702 (base32
4703 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4704 (file-name (git-file-name name version))))
4705 (arguments
4706 `(#:jar-name "plexus-sec-dispatcher.jar"
4707 #:source-dir "src/main/java"
4708 #:phases
4709 (modify-phases %standard-phases
4710 (add-before 'build 'generate-models
4711 (lambda* (#:key inputs #:allow-other-keys)
4712 (define (modello-single-mode file version mode)
4713 (invoke "java"
4714 "org.codehaus.modello.ModelloCli"
4715 file mode "src/main/java" version
4716 "false" "true"))
4717 (let ((file "src/main/mdo/settings-security.mdo"))
4718 (modello-single-mode file "1.0.0" "java")
4719 (modello-single-mode file "1.0.0" "xpp3-reader")
4720 (modello-single-mode file "1.0.0" "xpp3-writer"))
4721 #t))
4722 (add-before 'build 'generate-components.xml
4723 (lambda _
4724 (mkdir-p "build/classes/META-INF/plexus")
4725 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4726 (lambda _
4727 (display
4728 "<component-set>\n
4729 <components>\n
4730 <component>\n
4731 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4732 <role-hint>default</role-hint>\n
4733 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4734 <description></description>\n
4735 <requirements>\n
4736 <requirement>\n
4737 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4738 <field-name>_cipher</field-name>\n
4739 </requirement>\n
4740 <requirement>\n
4741 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4742 <field-name>_decryptors</field-name>\n
4743 </requirement>\n
4744 </requirements>\n
4745 <configuration>\n
4746 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4747 </configuration>\n
4748 </component>\n
4749 </components>\n
4750 </component-set>\n")))
4751 #t))
4752 (add-before 'check 'fix-paths
4753 (lambda _
4754 (copy-recursively "src/test/resources" "target")
4755 #t))
4756 (replace 'install (install-from-pom "pom.xml")))))
4757 (propagated-inputs
4758 `(("java-plexus-utils" ,java-plexus-utils)
4759 ("java-plexus-cipher" ,java-plexus-cipher)
4760 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4761 (native-inputs
4762 `(("java-modello-core" ,java-modello-core)
4763 ;; for modello:
4764 ("java-plexus-container-default" ,java-plexus-container-default)
4765 ("java-plexus-classworlds" ,java-plexus-classworlds)
4766 ("java-plexus-utils" ,java-plexus-utils)
4767 ("java-guava" ,java-guava)
4768 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4769 ("java-sisu-build-api" ,java-sisu-build-api)
4770 ;; modello plugins:
4771 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4772 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4773 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4774 ;; for tests
4775 ("java-junit" ,java-junit)))
4776 (build-system ant-build-system)
4777 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4778 (synopsis "Plexus Security Dispatcher Component")
4779 (description "This package is the Plexus Security Dispatcher Component.
4780 This component decrypts a string passed to it.")
4781 (license license:asl2.0)))
4782
4783 (define-public java-plexus-cli
4784 (package
4785 (name "java-plexus-cli")
4786 (version "1.7")
4787 (source (origin
4788 (method git-fetch)
4789 (uri (git-reference
4790 (url "https://github.com/sonatype/plexus-cli")
4791 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4792 (file-name (string-append name "-" version))
4793 (sha256
4794 (base32
4795 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4796 (build-system ant-build-system)
4797 (arguments
4798 `(#:jar-name "plexus-cli.jar"
4799 #:source-dir "src/main/java"
4800 #:jdk ,icedtea-8
4801 #:test-dir "src/test"))
4802 (inputs
4803 `(("java-commons-cli" ,java-commons-cli)
4804 ("java-plexus-container-default" ,java-plexus-container-default)
4805 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4806 (native-inputs
4807 `(("java-plexus-utils" ,java-plexus-utils)
4808 ("java-junit" ,java-junit)
4809 ("java-guava" ,java-guava)))
4810 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4811 (synopsis "CLI building library for plexus")
4812 (description "This package is a library to help creating CLI around
4813 Plexus components.")
4814 (license license:asl2.0)))
4815
4816 (define-public java-sisu-build-api
4817 (package
4818 (name "java-sisu-build-api")
4819 (version "0.0.7")
4820 (source (origin
4821 (method git-fetch)
4822 (uri (git-reference
4823 (url "https://github.com/sonatype/sisu-build-api")
4824 (commit (string-append "plexus-build-api-" version))))
4825 (file-name (git-file-name name version))
4826 (sha256
4827 (base32
4828 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4829 (build-system ant-build-system)
4830 (arguments
4831 `(#:jar-name "sisu-build-api.jar"
4832 #:source-dir "src/main/java"
4833 #:jdk ,icedtea-8
4834 #:tests? #f; FIXME: how to run the tests?
4835 #:phases
4836 (modify-phases %standard-phases
4837 (add-before 'build 'copy-resources
4838 (lambda _
4839 (copy-recursively "src/main/resources" "build/classes")
4840 (substitute* (find-files "build/classes")
4841 (("\\$\\{project.version\\}") ,version))
4842 #t))
4843 (add-before 'build 'generate-plexus-compontent
4844 (lambda _
4845 (mkdir-p "build/classes/META-INF/plexus")
4846 ;; This file is required for plexus to inject this package.
4847 ;; FIXME: how is it generated?
4848 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4849 (lambda _
4850 (display
4851 "<component-set>\n
4852 <components>\n
4853 <component>\n
4854 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4855 <role-hint>default</role-hint>\n
4856 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4857 <description>Filesystem based non-incremental build context implementation\n
4858 which behaves as if all files were just created.</description>\n
4859 </component>\n
4860 </components>\n
4861 </component-set>\n")))
4862 #t))
4863 (replace 'install
4864 (install-from-pom "pom.xml")))))
4865 (inputs
4866 `(("java-plexus-utils" ,java-plexus-utils)
4867 ("java-plexus-container-default" ,java-plexus-container-default)))
4868 (home-page "https://github.com/sonatype/sisu-build-api/")
4869 (synopsis "Base build API for maven")
4870 (description "This package contains the base build API for maven and
4871 a default implementation of it. This API is about scanning files in a
4872 project and determining what files need to be rebuilt.")
4873 (license license:asl2.0)))
4874
4875 (define-public java-modello-core
4876 (package
4877 (name "java-modello-core")
4878 (version "1.9.1")
4879 (source (origin
4880 (method git-fetch)
4881 (uri (git-reference
4882 (url "https://github.com/codehaus-plexus/modello")
4883 (commit (string-append "modello-" version))))
4884 (file-name (git-file-name name version))
4885 (sha256
4886 (base32
4887 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
4888 (build-system ant-build-system)
4889 (arguments
4890 `(#:jar-name "modello-core.jar"
4891 #:source-dir "modello-core/src/main/java"
4892 #:test-dir "modello-core/src/test"
4893 #:main-class "org.codehaus.modello.ModelloCli"
4894 #:jdk ,icedtea-8
4895 #:phases
4896 (modify-phases %standard-phases
4897 (add-before 'build 'copy-resources
4898 (lambda _
4899 (mkdir-p "build/classes/META-INF/plexus")
4900 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4901 "build/classes/META-INF/plexus/components.xml")
4902 #t))
4903 (add-before 'check 'fix-tests
4904 (lambda _
4905 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4906 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4907 "modello/core/io/ModelReaderTest.java")
4908 (("src/test") "modello-core/src/test")))
4909 #t)))))
4910 (propagated-inputs
4911 `(("java-plexus-utils" ,java-plexus-utils)
4912 ("java-plexus-container-default" ,java-plexus-container-default)
4913 ("java-sisu-build-api" ,java-sisu-build-api)))
4914 (native-inputs
4915 `(("java-junit" ,java-junit)
4916 ("java-plexus-classworlds" ,java-plexus-classworlds)
4917 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4918 ("java-guava" ,java-guava)))
4919 (home-page "https://codehaus-plexus.github.io/modello/")
4920 (synopsis "Framework for code generation from a simple model")
4921 (description "Modello is a framework for code generation from a simple model.
4922
4923 Modello generates code from a simple model format: based on a plugin
4924 architecture, various types of code and descriptors can be generated from the
4925 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4926 XSD and documentation.")
4927 (license (list
4928 license:expat
4929 ;; Although this package uses only files licensed under expat,
4930 ;; other parts of the source are licensed under different
4931 ;; licenses. We include them to be inherited by other packages.
4932 license:asl2.0
4933 ;; Some files in modello-plugin-java are licensed under a
4934 ;; 5-clause BSD license.
4935 (license:non-copyleft
4936 (string-append "file:///modello-plugins/modello-plugin-java/"
4937 "src/main/java/org/codehaus/modello/plugin/"
4938 "java/javasource/JNaming.java"))))))
4939
4940 (define-public java-modello-plugins-java
4941 (package
4942 (inherit java-modello-core)
4943 (name "java-modello-plugins-java")
4944 (arguments
4945 `(#:jar-name "modello-plugins-java.jar"
4946 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4947 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4948 #:jdk ,icedtea-8
4949 #:tests? #f; requires maven-model, which depends on this package
4950 #:phases
4951 (modify-phases %standard-phases
4952 (add-before 'build 'copy-resources
4953 (lambda _
4954 (mkdir-p "build/classes")
4955 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4956 "build/classes")
4957 #t)))))
4958 (inputs
4959 `(("java-modello-core" ,java-modello-core)))
4960 (synopsis "Modello Java Plugin")
4961 (description "Modello Java Plugin generates Java objects for the model.")))
4962
4963 (define-public java-modello-plugins-xml
4964 (package
4965 (inherit java-modello-core)
4966 (name "java-modello-plugins-xml")
4967 (arguments
4968 `(#:jar-name "modello-plugins-xml.jar"
4969 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
4970 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
4971 #:jdk ,icedtea-8
4972 #:phases
4973 (modify-phases %standard-phases
4974 (add-before 'build 'copy-resources
4975 (lambda _
4976 (mkdir-p "build/classes")
4977 (copy-recursively
4978 "modello-plugins/modello-plugin-xml/src/main/resources"
4979 "build/classes")
4980 #t))
4981 (add-before 'check 'fix-paths
4982 (lambda _
4983 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
4984 (substitute*
4985 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
4986 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
4987 #t)))))
4988 (propagated-inputs
4989 `(("java-modello-core" ,java-modello-core)
4990 ("java-modello-plugins-java" ,java-modello-plugins-java)))
4991 (synopsis "Modello XML Plugin")
4992 (description "Modello XML Plugin contains shared code for every plugins
4993 working on XML representation of the model.")))
4994
4995 (define-public java-modello-test
4996 (package
4997 (inherit java-modello-core)
4998 (name "java-modello-test")
4999 (arguments
5000 `(#:jar-name "modello-test.jar"
5001 #:source-dir "modello-test/src/main/java"
5002 #:tests? #f; no tests
5003 #:jdk ,icedtea-8))
5004 (inputs
5005 `(("java-plexus-utils" ,java-plexus-utils)
5006 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5007 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5008 ("java-plexus-container-default" ,java-plexus-container-default)))
5009 (synopsis "Modello test package")
5010 (description "The modello test package contains the basis to create
5011 Modello generator unit-tests, including sample models and xml files to test
5012 every feature for every plugin.")))
5013
5014 (define-public java-modello-plugins-xpp3
5015 (package
5016 (inherit java-modello-core)
5017 (name "java-modello-plugins-xpp3")
5018 (arguments
5019 `(#:jar-name "modello-plugins-xpp3.jar"
5020 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5021 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5022 ;; One of the test dependencies is maven-model which depends on this package.
5023 #:tests? #f
5024 #:jdk ,icedtea-8
5025 #:phases
5026 (modify-phases %standard-phases
5027 (add-before 'build 'copy-resources
5028 (lambda _
5029 (mkdir-p "build/classes")
5030 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5031 "build/classes")
5032 #t)))))
5033 (propagated-inputs
5034 `(("java-modello-core" ,java-modello-core)
5035 ("java-modello-plugins-java" ,java-modello-plugins-java)
5036 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5037 (native-inputs
5038 `(("java-xmlunit" ,java-xmlunit)
5039 ("java-modello-test" ,java-modello-test)
5040 ,@(package-native-inputs java-modello-core)))
5041 (synopsis "Modello XPP3 Plugin")
5042 (description "The modello XPP3 plugin generates XML readers and writers based
5043 on the XPP3 API (XML Pull Parser).")))
5044
5045 (define-public java-asm
5046 (package
5047 (name "java-asm")
5048 (version "6.0")
5049 (source (origin
5050 (method url-fetch)
5051 (uri (string-append "https://download.forge.ow2.org/asm/"
5052 "asm-" version ".tar.gz"))
5053 (sha256
5054 (base32
5055 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5056 (build-system ant-build-system)
5057 (arguments
5058 `(#:build-target "compile"
5059 ;; The tests require an old version of Janino, which no longer compiles
5060 ;; with the JDK7.
5061 #:tests? #f
5062 #:make-flags
5063 (list
5064 ;; We don't need these extra ant tasks, but the build system asks us to
5065 ;; provide a path anyway.
5066 "-Dobjectweb.ant.tasks.path=dummy-path"
5067 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5068 ;; used during the build automatically by ant-build-system, but
5069 ;; java-asm's build.xml fails unless we provide something here.
5070 "-Dbiz.aQute.bnd.path=dummy-path")
5071 #:phases
5072 (modify-phases %standard-phases
5073 (add-before 'build 'remove-bnd-dependency
5074 (lambda _
5075 ;; This file is the only one to require bnd, and is not needed
5076 ;; because we don't build a bundle.
5077 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5078 #t))
5079 (add-before 'install 'build-jars
5080 (lambda* (#:key make-flags #:allow-other-keys)
5081 ;; We cannot use the "jar" target because it depends on a couple
5082 ;; of unpackaged, complicated tools.
5083 (mkdir "dist")
5084 (invoke "jar"
5085 "-cf" (string-append "dist/asm-" ,version ".jar")
5086 "-C" "output/build/tmp" ".")))
5087 (add-before 'install 'fix-pom
5088 (lambda _
5089 (substitute* (find-files "archive" "\\.pom$")
5090 (("@product.artifact@") ,version))
5091 #t))
5092 (add-before 'install 'install-parent
5093 (install-pom-file "archive/asm-parent.pom"))
5094 (replace 'install
5095 (install-from-pom "archive/asm.pom")))))
5096 (native-inputs
5097 `(("java-junit" ,java-junit)))
5098 (propagated-inputs
5099 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5100 (home-page "https://asm.ow2.io/")
5101 (synopsis "Very small and fast Java bytecode manipulation framework")
5102 (description "ASM is an all purpose Java bytecode manipulation and
5103 analysis framework. It can be used to modify existing classes or dynamically
5104 generate classes, directly in binary form. The provided common
5105 transformations and analysis algorithms allow easily assembling custom
5106 complex transformations and code analysis tools.")
5107 (license license:bsd-3)))
5108
5109 (define java-org-ow2-parent-pom-1.3
5110 (package
5111 (name "java-org-ow2-parent-pom")
5112 (version "1.3")
5113 (source (origin
5114 (method url-fetch)
5115 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5116 (sha256
5117 (base32
5118 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5119 (build-system ant-build-system)
5120 (arguments
5121 `(#:tests? #f
5122 #:phases
5123 (modify-phases %standard-phases
5124 (delete 'unpack)
5125 (delete 'build)
5126 (delete 'configure)
5127 (replace 'install
5128 (install-pom-file (assoc-ref %build-inputs "source"))))))
5129 (home-page "https://ow2.org")
5130 (synopsis "Ow2.org parent pom")
5131 (description "This package contains the parent pom for projects from ow2.org,
5132 including java-asm.")
5133 (license license:lgpl2.1+)))
5134
5135 (define java-asm-bootstrap
5136 (package
5137 (inherit java-asm)
5138 (name "java-asm-bootstrap")
5139 (arguments
5140 (substitute-keyword-arguments (package-arguments java-asm)
5141 ((#:tests? _) #f)))
5142 (native-inputs `())))
5143
5144 (define-public java-asm-8
5145 (package
5146 (inherit java-asm)
5147 (version "8.0.1")
5148 (source (origin
5149 (method git-fetch)
5150 (uri (git-reference
5151 (url "https://gitlab.ow2.org/asm/asm")
5152 (commit (string-append
5153 "ASM_" (string-join (string-split version #\.)
5154 "_")))))
5155 (file-name (git-file-name "java-asm" version))
5156 (sha256
5157 (base32
5158 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5159 (arguments
5160 `(#:jar-name "asm8.jar"
5161 #:source-dir "asm/src/main/java"
5162 #:test-dir "asm/src/test"
5163 ;; tests depend on junit5
5164 #:tests? #f))
5165 (propagated-inputs '())
5166 (native-inputs '())))
5167
5168 (define-public java-asm-tree-8
5169 (package
5170 (inherit java-asm-8)
5171 (name "java-asm-tree")
5172 (arguments
5173 `(#:jar-name "asm-tree.jar"
5174 #:source-dir "asm-tree/src/main/java"
5175 #:test-dir "asm-tree/src/test"
5176 ;; tests depend on junit5
5177 #:tests? #f))
5178 (inputs
5179 `(("java-asm" ,java-asm-8)))))
5180
5181 (define-public java-asm-analysis-8
5182 (package
5183 (inherit java-asm-8)
5184 (name "java-asm-analysis")
5185 (arguments
5186 `(#:jar-name "asm-analysis.jar"
5187 #:source-dir "asm-analysis/src/main/java"
5188 #:test-dir "asm-analysis/src/test"
5189 ;; tests depend on junit5
5190 #:tests? #f))
5191 (inputs
5192 `(("java-asm" ,java-asm-8)
5193 ("java-asm-tree" ,java-asm-tree-8)))))
5194
5195 (define-public java-asm-util-8
5196 (package
5197 (inherit java-asm-8)
5198 (name "java-asm-util")
5199 (arguments
5200 `(#:jar-name "asm-util8.jar"
5201 #:source-dir "asm-util/src/main/java"
5202 #:test-dir "asm-util/src/test"
5203 ;; tests depend on junit5
5204 #:tests? #f))
5205 (inputs
5206 `(("java-asm" ,java-asm-8)
5207 ("java-asm-analysis" ,java-asm-analysis-8)
5208 ("java-asm-tree" ,java-asm-tree-8)))))
5209
5210 (define-public java-cglib
5211 (package
5212 (name "java-cglib")
5213 (version "3.2.4")
5214 (source
5215 (origin
5216 (method git-fetch)
5217 (uri (git-reference
5218 (url "https://github.com/cglib/cglib")
5219 (commit (string-append
5220 "RELEASE_"
5221 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5222 version)))))
5223 (file-name (git-file-name name version))
5224 (sha256
5225 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5226 (build-system ant-build-system)
5227 (arguments
5228 `(;; FIXME: tests fail because junit runs
5229 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5230 ;; to describe a test at all.
5231 #:tests? #f
5232 #:jar-name "cglib.jar"
5233 #:phases
5234 (modify-phases %standard-phases
5235 (add-after 'unpack 'chdir
5236 (lambda _ (chdir "cglib") #t)))))
5237 (inputs
5238 `(("java-asm" ,java-asm)
5239 ("java-junit" ,java-junit)))
5240 (home-page "https://github.com/cglib/cglib/")
5241 (synopsis "Java byte code generation library")
5242 (description "The byte code generation library CGLIB is a high level API
5243 to generate and transform Java byte code.")
5244 (license license:asl2.0)))
5245
5246 (define-public java-objenesis
5247 (package
5248 (name "java-objenesis")
5249 (version "2.5.1")
5250 (source (origin
5251 (method git-fetch)
5252 (uri (git-reference
5253 (url "https://github.com/easymock/objenesis")
5254 (commit version)))
5255 (file-name (git-file-name name version))
5256 (sha256
5257 (base32
5258 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5259 (build-system ant-build-system)
5260 (arguments
5261 `(#:jar-name "objenesis.jar"
5262 #:source-dir "main/src/"
5263 #:test-dir "main/src/test/"))
5264 (native-inputs
5265 `(("java-junit" ,java-junit)
5266 ("java-hamcrest-core" ,java-hamcrest-core)))
5267 (home-page "http://objenesis.org/")
5268 (synopsis "Bypass the constructor when creating an object")
5269 (description "Objenesis is a small Java library that serves one purpose:
5270 to instantiate a new object of a particular class. It is common to see
5271 restrictions in libraries stating that classes must require a default
5272 constructor. Objenesis aims to overcome these restrictions by bypassing the
5273 constructor on object instantiation.")
5274 (license license:asl2.0)))
5275
5276 (define-public java-easymock
5277 (package
5278 (name "java-easymock")
5279 (version "3.4")
5280 (source (origin
5281 (method git-fetch)
5282 (uri (git-reference
5283 (url "https://github.com/easymock/easymock/")
5284 (commit (string-append "easymock-" version))))
5285 (file-name (git-file-name name version))
5286 (sha256
5287 (base32
5288 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5289 (build-system ant-build-system)
5290 (arguments
5291 `(#:jar-name "easymock.jar"
5292 #:source-dir "core/src/main"
5293 #:test-dir "core/src/test"
5294 #:phases
5295 (modify-phases %standard-phases
5296 ;; FIXME: Android support requires the following packages to be
5297 ;; available: com.google.dexmaker.stock.ProxyBuilder
5298 (add-after 'unpack 'delete-android-support
5299 (lambda _
5300 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5301 (substitute* "MocksControl.java"
5302 (("AndroidSupport.isAndroid\\(\\)") "false")
5303 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5304 (delete-file "AndroidClassProxyFactory.java"))
5305 #t))
5306 (add-after 'unpack 'delete-broken-tests
5307 (lambda _
5308 (with-directory-excursion "core/src/test/java/org/easymock"
5309 ;; This test depends on dexmaker.
5310 (delete-file "tests2/ClassExtensionHelperTest.java")
5311
5312 ;; This is not a test.
5313 (delete-file "tests/BaseEasyMockRunnerTest.java")
5314
5315 ;; This test should be executed with a different runner...
5316 (delete-file "tests2/EasyMockAnnotationsTest.java")
5317 ;; ...but deleting it means that we also have to delete these
5318 ;; dependent files.
5319 (delete-file "tests2/EasyMockRunnerTest.java")
5320 (delete-file "tests2/EasyMockRuleTest.java")
5321
5322 ;; This test fails because the file "easymock.properties" does
5323 ;; not exist.
5324 (delete-file "tests2/EasyMockPropertiesTest.java"))
5325 #t)))))
5326 (inputs
5327 `(("java-asm" ,java-asm)
5328 ("java-cglib" ,java-cglib)
5329 ("java-objenesis" ,java-objenesis)))
5330 (native-inputs
5331 `(("java-junit" ,java-junit)
5332 ("java-hamcrest-core" ,java-hamcrest-core)))
5333 (home-page "https://easymock.org/")
5334 (synopsis "Java library providing mock objects for unit tests")
5335 (description "EasyMock is a Java library that provides an easy way to use
5336 mock objects in unit testing.")
5337 (license license:asl2.0)))
5338
5339 (define-public java-jmock-1
5340 (package
5341 (name "java-jmock")
5342 (version "1.2.0")
5343 (source (origin
5344 (method git-fetch)
5345 (uri (git-reference
5346 (url "https://github.com/jmock-developers/jmock-library")
5347 (commit version)))
5348 (file-name (git-file-name name version))
5349 (sha256
5350 (base32
5351 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5352 (build-system ant-build-system)
5353 (arguments
5354 `(#:build-target "jars"
5355 #:test-target "run.tests"
5356 #:phases
5357 (modify-phases %standard-phases
5358 (replace 'install (install-jars "build")))))
5359 (home-page "http://jmock.org/")
5360 (synopsis "Mock object library for test-driven development")
5361 (description "JMock is a library that supports test-driven development of
5362 Java code with mock objects. Mock objects help you design and test the
5363 interactions between the objects in your programs.
5364
5365 The jMock library
5366
5367 @itemize
5368 @item makes it quick and easy to define mock objects
5369 @item lets you precisely specify the interactions between
5370 your objects, reducing the brittleness of your tests
5371 @item plugs into your favourite test framework
5372 @item is easy to extend.
5373 @end itemize\n")
5374 (license license:bsd-3)))
5375
5376 (define-public java-jmock
5377 (package
5378 (inherit java-jmock-1)
5379 (name "java-jmock")
5380 (version "2.8.2")
5381 (source (origin
5382 (method git-fetch)
5383 (uri (git-reference
5384 (url "https://github.com/jmock-developers/jmock-library")
5385 (commit version)))
5386 (file-name (git-file-name name version))
5387 (sha256
5388 (base32
5389 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5390 (inputs
5391 `(("java-hamcrest-all" ,java-hamcrest-all)
5392 ("java-asm" ,java-asm)
5393 ("java-bsh" ,java-bsh)
5394 ("java-junit" ,java-junit)))
5395 (native-inputs
5396 `(("cglib" ,java-cglib)))
5397 (arguments
5398 `(#:jar-name "java-jmock.jar"
5399 #:source-dir "jmock/src/main/java"
5400 #:test-dir "jmock/src/test"))))
5401
5402 (define-public java-jmock-junit4
5403 (package
5404 (inherit java-jmock)
5405 (name "java-jmock-junit4")
5406 (arguments
5407 `(#:jar-name "java-jmock-junit4.jar"
5408 #:source-dir "jmock-junit4/src/main/java"
5409 #:test-dir "jmock-junit4/src/test"))
5410 (inputs
5411 `(("java-hamcrest-all" ,java-hamcrest-all)
5412 ("java-asm" ,java-asm)
5413 ("java-bsh" ,java-bsh)
5414 ("java-jmock" ,java-jmock)
5415 ("java-jumit" ,java-junit)))))
5416
5417 (define-public java-jmock-legacy
5418 (package
5419 (inherit java-jmock)
5420 (name "java-jmock-legacy")
5421 (arguments
5422 `(#:jar-name "java-jmock-legacy.jar"
5423 #:source-dir "jmock-legacy/src/main/java"
5424 #:test-dir "jmock-legacy/src/test"
5425 #:phases
5426 (modify-phases %standard-phases
5427 (add-before 'check 'copy-tests
5428 (lambda _
5429 ;; This file is a dependancy of some tests
5430 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5431 (copy-file (string-append "jmock/src/test/java/" file)
5432 (string-append "jmock-legacy/src/test/java/" file))
5433 #t))))))
5434 (inputs
5435 `(("java-hamcrest-all" ,java-hamcrest-all)
5436 ("java-objenesis" ,java-objenesis)
5437 ("java-cglib" ,java-cglib)
5438 ("java-jmock" ,java-jmock)
5439 ("java-asm" ,java-asm)
5440 ("java-bsh" ,java-bsh)
5441 ("java-junit" ,java-junit)))
5442 (native-inputs
5443 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5444
5445 (define-public java-hamcrest-all
5446 (package (inherit java-hamcrest-core)
5447 (name "java-hamcrest-all")
5448 (arguments
5449 `(#:jdk ,icedtea-8
5450 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5451 ((#:build-target _) "bigjar")
5452 ((#:phases phases)
5453 `(modify-phases ,phases
5454 ;; Some build targets override the classpath, so we need to patch
5455 ;; the build.xml to ensure that required dependencies are on the
5456 ;; classpath.
5457 (add-after 'unpack 'patch-classpath-for-integration
5458 (lambda* (#:key inputs #:allow-other-keys)
5459 (substitute* "build.xml"
5460 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5461 (string-join
5462 (cons line
5463 (append
5464 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5465 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5466 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5467 ";"))
5468 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5469 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5470 "jar$"))))
5471 #t))
5472 (replace 'install
5473 (lambda* (#:key outputs #:allow-other-keys)
5474 (let* ((target (string-append (assoc-ref outputs "out")
5475 "/share/java/"))
5476 (version-suffix
5477 ,(string-append
5478 "-" (package-version java-hamcrest-core) ".jar"))
5479 (install-without-version-suffix
5480 (lambda (jar)
5481 (copy-file jar
5482 (string-append target
5483 (basename jar version-suffix)
5484 ".jar")))))
5485 (mkdir-p target)
5486 (for-each
5487 install-without-version-suffix
5488 (find-files "build"
5489 (lambda (name _)
5490 (and (string-suffix? ".jar" name)
5491 (not (string-suffix? "-sources.jar" name)))))))
5492 #t)))))))
5493 (inputs
5494 `(("java-junit" ,java-junit)
5495 ("java-jmock" ,java-jmock-1)
5496 ;; This is necessary because of what seems to be a race condition.
5497 ;; This package would sometimes fail to build because hamcrest-core.jar
5498 ;; could not be found, even though it is built as part of this package.
5499 ;; Adding java-hamcrest-core appears to fix this problem. See
5500 ;; https://debbugs.gnu.org/31390 for more information.
5501 ("java-hamcrest-core" ,java-hamcrest-core)
5502 ("java-easymock" ,java-easymock)
5503 ,@(package-inputs java-hamcrest-core)))))
5504
5505 (define-public java-jopt-simple
5506 (package
5507 (name "java-jopt-simple")
5508 (version "5.0.3")
5509 (source (origin
5510 (method url-fetch)
5511 (uri (string-append "http://repo1.maven.org/maven2/"
5512 "net/sf/jopt-simple/jopt-simple/"
5513 version "/jopt-simple-"
5514 version "-sources.jar"))
5515 (sha256
5516 (base32
5517 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5518 (build-system ant-build-system)
5519 (arguments
5520 `(#:tests? #f ; there are no tests
5521 #:jar-name "jopt-simple.jar"))
5522 (home-page "https://pholser.github.io/jopt-simple/")
5523 (synopsis "Java library for parsing command line options")
5524 (description "JOpt Simple is a Java library for parsing command line
5525 options, such as those you might pass to an invocation of @code{javac}. In
5526 the interest of striving for simplicity, as closely as possible JOpt Simple
5527 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5528 GNU @code{getopt_long}. It also aims to make option parser configuration and
5529 retrieval of options and their arguments simple and expressive, without being
5530 overly clever.")
5531 (license license:expat)))
5532
5533 (define-public java-commons-math3
5534 (package
5535 (name "java-commons-math3")
5536 (version "3.6.1")
5537 (source (origin
5538 (method url-fetch)
5539 (uri (string-append "mirror://apache/commons/math/source/"
5540 "commons-math3-" version "-src.tar.gz"))
5541 (sha256
5542 (base32
5543 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5544 (build-system ant-build-system)
5545 (arguments
5546 `(#:build-target "jar"
5547 #:test-target "test"
5548 #:make-flags
5549 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5550 (junit (assoc-ref %build-inputs "java-junit")))
5551 (list (string-append "-Djunit.jar="
5552 (car (find-files junit "jar$")))
5553 (string-append "-Dhamcrest.jar="
5554 (car (find-files hamcrest ".*.jar$")))))
5555 #:phases
5556 (modify-phases %standard-phases
5557 ;; We want to build the jar in the build phase and run the tests
5558 ;; later in a separate phase.
5559 (add-after 'unpack 'untangle-targets
5560 (lambda _
5561 (substitute* "build.xml"
5562 (("name=\"jar\" depends=\"test\"")
5563 "name=\"jar\" depends=\"compile\""))
5564 #t))
5565 ;; There is no install target.
5566 (replace 'install
5567 (install-jars "target")))))
5568 (native-inputs
5569 `(("java-junit" ,java-junit)
5570 ("java-hamcrest-core" ,java-hamcrest-core)))
5571 (home-page "https://commons.apache.org/math/")
5572 (synopsis "Apache Commons mathematics library")
5573 (description "Commons Math is a library of lightweight, self-contained
5574 mathematics and statistics components addressing the most common problems not
5575 available in the Java programming language or Commons Lang.")
5576 (license license:asl2.0)))
5577
5578 (define-public java-jmh
5579 (package
5580 (name "java-jmh")
5581 (version "1.17.5")
5582 (source (origin
5583 (method hg-fetch)
5584 (uri (hg-reference
5585 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5586 (changeset version)))
5587 (file-name (string-append name "-" version "-checkout"))
5588 (sha256
5589 (base32
5590 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5591 (build-system ant-build-system)
5592 (arguments
5593 `(#:jar-name "jmh-core.jar"
5594 #:source-dir "jmh-core/src/main"
5595 #:test-dir "jmh-core/src/test"
5596 #:phases
5597 (modify-phases %standard-phases
5598 ;; This seems to be a bug in the JDK. It may not be necessary in
5599 ;; future versions of the JDK.
5600 (add-after 'unpack 'fix-bug
5601 (lambda _
5602 (with-directory-excursion
5603 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5604 (substitute* '("IntegerValueConverter.java"
5605 "ThreadsValueConverter.java")
5606 (("public Class<Integer> valueType")
5607 "public Class<? extends Integer> valueType")))
5608 #t)))))
5609 (inputs
5610 `(("java-jopt-simple" ,java-jopt-simple)
5611 ("java-commons-math3" ,java-commons-math3)))
5612 (native-inputs
5613 `(("java-junit" ,java-junit)
5614 ("java-hamcrest-core" ,java-hamcrest-core)))
5615 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5616 (synopsis "Benchmark harness for the JVM")
5617 (description "JMH is a Java harness for building, running, and analysing
5618 nano/micro/milli/macro benchmarks written in Java and other languages
5619 targeting the JVM.")
5620 ;; GPLv2 only
5621 (license license:gpl2)))
5622
5623 (define-public java-commons-collections4
5624 (package
5625 (name "java-commons-collections4")
5626 (version "4.1")
5627 (source (origin
5628 (method url-fetch)
5629 (uri (string-append "mirror://apache/commons/collections/source/"
5630 "commons-collections4-" version "-src.tar.gz"))
5631 (sha256
5632 (base32
5633 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5634 (build-system ant-build-system)
5635 (arguments
5636 `(#:test-target "test"
5637 #:make-flags
5638 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5639 (junit (assoc-ref %build-inputs "java-junit"))
5640 (easymock (assoc-ref %build-inputs "java-easymock")))
5641 (list (string-append "-Djunit.jar="
5642 (car (find-files junit "jar$")))
5643 (string-append "-Dhamcrest.jar="
5644 (car (find-files hamcrest "jar$")))
5645 (string-append "-Deasymock.jar=" easymock
5646 "/share/java/easymock.jar")))
5647 #:phases
5648 (modify-phases %standard-phases
5649 (replace 'install
5650 (install-jars "target")))))
5651 (native-inputs
5652 `(("java-junit" ,java-junit)
5653 ("java-hamcrest-core" ,java-hamcrest-core)
5654 ("java-easymock" ,java-easymock)))
5655 (home-page "https://commons.apache.org/collections/")
5656 (synopsis "Collections framework")
5657 (description "The Java Collections Framework is the recognised standard
5658 for collection handling in Java. Commons-Collections seek to build upon the
5659 JDK classes by providing new interfaces, implementations and utilities. There
5660 are many features, including:
5661
5662 @itemize
5663 @item @code{Bag} interface for collections that have a number of copies of
5664 each object
5665 @item @code{BidiMap} interface for maps that can be looked up from value to
5666 key as well and key to value
5667 @item @code{MapIterator} interface to provide simple and quick iteration over
5668 maps
5669 @item Transforming decorators that alter each object as it is added to the
5670 collection
5671 @item Composite collections that make multiple collections look like one
5672 @item Ordered maps and sets that retain the order elements are added in,
5673 including an LRU based map
5674 @item Reference map that allows keys and/or values to be garbage collected
5675 under close control
5676 @item Many comparator implementations
5677 @item Many iterator implementations
5678 @item Adapter classes from array and enumerations to collections
5679 @item Utilities to test or create typical set-theory properties of collections
5680 such as union, intersection, and closure.
5681 @end itemize\n")
5682 (license license:asl2.0)))
5683
5684 (define-public java-commons-collections
5685 (package
5686 (inherit java-commons-collections4)
5687 (name "java-commons-collections")
5688 (version "3.2.2")
5689 (source (origin
5690 (method url-fetch)
5691 (uri (string-append "mirror://apache/commons/collections/source/"
5692 "commons-collections-" version "-src.tar.gz"))
5693 (sha256
5694 (base32
5695 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5696 (patches
5697 (search-patches "java-commons-collections-fix-java8.patch"))))
5698 (arguments
5699 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5700 ((#:phases phases)
5701 `(modify-phases ,phases
5702 ;; The manifest is required by the build procedure
5703 (add-before 'build 'add-manifest
5704 (lambda _
5705 (mkdir-p "build/conf")
5706 (call-with-output-file "build/conf/MANIFEST.MF"
5707 (lambda (file)
5708 (format file "Manifest-Version: 1.0\n")))
5709 #t))
5710 (replace 'install
5711 (install-jars "build"))))))))
5712
5713 (define java-commons-collections-test-classes
5714 (package
5715 (inherit java-commons-collections)
5716 (arguments
5717 `(#:jar-name "commons-collections-test-classes.jar"
5718 #:source-dir "src/test"
5719 #:tests? #f))
5720 (inputs
5721 `(("collection" ,java-commons-collections)))))
5722
5723 (define-public java-commons-beanutils
5724 (package
5725 (name "java-commons-beanutils")
5726 (version "1.9.3")
5727 (source (origin
5728 (method url-fetch)
5729 (uri (string-append "mirror://apache/commons/beanutils/source/"
5730 "commons-beanutils-" version "-src.tar.gz"))
5731 (sha256
5732 (base32
5733 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5734 (build-system ant-build-system)
5735 (arguments
5736 `(#:test-target "test"
5737 #:tests? #f
5738 #:phases
5739 (modify-phases %standard-phases
5740 (replace 'install
5741 (lambda* (#:key outputs #:allow-other-keys)
5742 (rename-file (string-append "dist/commons-beanutils-" ,version
5743 "-SNAPSHOT.jar")
5744 "commons-beanutils.jar")
5745 (install-file "commons-beanutils.jar"
5746 (string-append (assoc-ref outputs "out") "/share/java/"))
5747 #t)))))
5748 (inputs
5749 `(("logging" ,java-commons-logging-minimal)
5750 ("collections" ,java-commons-collections)))
5751 (native-inputs
5752 `(("junit" ,java-junit)
5753 ("collections-test" ,java-commons-collections-test-classes)))
5754 (home-page "https://commons.apache.org/beanutils/")
5755 (synopsis "Dynamically set or get properties in Java")
5756 (description "BeanUtils provides a simplified interface to reflection and
5757 introspection to set or get dynamically determined properties through their
5758 setter and getter method.")
5759 (license license:asl2.0)))
5760
5761 (define-public java-commons-io
5762 (package
5763 (name "java-commons-io")
5764 (version "2.5")
5765 (source
5766 (origin
5767 (method url-fetch)
5768 (uri (string-append "mirror://apache/commons/io/source/"
5769 "commons-io-" version "-src.tar.gz"))
5770 (sha256
5771 (base32
5772 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5773 (build-system ant-build-system)
5774 (outputs '("out" "doc"))
5775 (arguments
5776 `(#:test-target "test"
5777 #:make-flags
5778 (list (string-append "-Djunit.jar="
5779 (car (find-files (assoc-ref %build-inputs "java-junit")
5780 "jar$"))))
5781 #:phases
5782 (modify-phases %standard-phases
5783 (add-after 'build 'build-javadoc ant-build-javadoc)
5784 (replace 'install (install-from-pom "pom.xml"))
5785 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5786 (native-inputs
5787 `(("java-junit" ,java-junit)
5788 ("java-hamcrest-core" ,java-hamcrest-core)))
5789 (propagated-inputs
5790 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5791 (home-page "https://commons.apache.org/io/")
5792 (synopsis "Common useful IO related classes")
5793 (description "Commons-IO contains utility classes, stream implementations,
5794 file filters and endian classes.")
5795 (license license:asl2.0)))
5796
5797 (define-public java-commons-exec-1.1
5798 (package
5799 (name "java-commons-exec")
5800 (version "1.1")
5801 (source
5802 (origin
5803 (method url-fetch)
5804 (uri (string-append "mirror://apache/commons/exec/source/"
5805 "commons-exec-" version "-src.tar.gz"))
5806 (sha256
5807 (base32
5808 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5809 (build-system ant-build-system)
5810 (arguments
5811 `(#:test-target "test"
5812 #:make-flags
5813 (list (string-append "-Dmaven.junit.jar="
5814 (car (find-files (assoc-ref %build-inputs "java-junit")
5815 "jar$"))))
5816 #:phases
5817 (modify-phases %standard-phases
5818 (add-before 'build 'delete-network-tests
5819 (lambda _
5820 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5821 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5822 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5823 #t))
5824 ;; The "build" phase automatically tests.
5825 (delete 'check)
5826 (replace 'install (install-jars "target")))))
5827 (native-inputs
5828 `(("java-junit" ,java-junit)))
5829 (home-page "https://commons.apache.org/proper/commons-exec/")
5830 (synopsis "Common program execution related classes")
5831 (description "Commons-Exec simplifies executing external processes.")
5832 (license license:asl2.0)))
5833
5834 (define-public java-commons-exec
5835 (package
5836 (inherit java-commons-exec-1.1)
5837 (version "1.3")
5838 (source
5839 (origin
5840 (method url-fetch)
5841 (uri (string-append "mirror://apache/commons/exec/source/"
5842 "commons-exec-" version "-src.tar.gz"))
5843 (sha256
5844 (base32
5845 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
5846 (arguments
5847 `(#:test-target "test"
5848 #:make-flags
5849 (list (string-append "-Dmaven.junit.jar="
5850 (car (find-files (assoc-ref %build-inputs "java-junit")
5851 "jar$")))
5852 "-Dmaven.compiler.source=1.7"
5853 "-Dmaven.compiler.target=1.7")
5854 #:phases
5855 (modify-phases %standard-phases
5856 (add-before 'build 'delete-network-tests
5857 (lambda* (#:key inputs #:allow-other-keys)
5858 ;; This test hangs indefinitely.
5859 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
5860 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
5861 (("ping -c 10 127.0.0.1") "sleep 10"))
5862 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
5863 (("/bin/ls") "ls"))
5864 (call-with-output-file "src/test/scripts/ping.sh"
5865 (lambda (port)
5866 (format port "#!~a/bin/sh\nsleep $1\n"
5867 (assoc-ref inputs "bash"))))
5868 #t))
5869 ;; The "build" phase automatically tests.
5870 (delete 'check)
5871 (replace 'install (install-jars "target")))))
5872 (native-inputs
5873 `(("java-junit" ,java-junit)
5874 ("java-hamcrest-core" ,java-hamcrest-core)))))
5875
5876 (define-public java-commons-lang
5877 (package
5878 (name "java-commons-lang")
5879 (version "2.6")
5880 (source
5881 (origin
5882 (method url-fetch)
5883 (uri (string-append "mirror://apache/commons/lang/source/"
5884 "commons-lang-" version "-src.tar.gz"))
5885 (sha256
5886 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
5887 (build-system ant-build-system)
5888 (outputs '("out" "doc"))
5889 (arguments
5890 `(#:test-target "test"
5891 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
5892 #:phases
5893 (modify-phases %standard-phases
5894 (add-after 'build 'build-javadoc ant-build-javadoc)
5895 (add-before 'check 'disable-failing-test
5896 (lambda _
5897 ;; Disable a failing test
5898 (substitute* "src/test/java/org/apache/commons/lang/\
5899 time/FastDateFormatTest.java"
5900 (("public void testFormat\\(\\)")
5901 "public void disabled_testFormat()"))
5902 #t))
5903 (replace 'install (install-jars "target"))
5904 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5905 (native-inputs
5906 `(("java-junit" ,java-junit)))
5907 (home-page "https://commons.apache.org/lang/")
5908 (synopsis "Extension of the java.lang package")
5909 (description "The Commons Lang components contains a set of Java classes
5910 that provide helper methods for standard Java classes, especially those found
5911 in the @code{java.lang} package in the Sun JDK. The following classes are
5912 included:
5913
5914 @itemize
5915 @item StringUtils - Helper for @code{java.lang.String}.
5916 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
5917 of characters such as @code{[a-z]} and @code{[abcdez]}.
5918 @item RandomStringUtils - Helper for creating randomised strings.
5919 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5920 @item NumberRange - A range of numbers with an upper and lower bound.
5921 @item ObjectUtils - Helper for @code{java.lang.Object}.
5922 @item SerializationUtils - Helper for serializing objects.
5923 @item SystemUtils - Utility class defining the Java system properties.
5924 @item NestedException package - A sub-package for the creation of nested
5925 exceptions.
5926 @item Enum package - A sub-package for the creation of enumerated types.
5927 @item Builder package - A sub-package for the creation of @code{equals},
5928 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5929 @end itemize\n")
5930 (license license:asl2.0)))
5931
5932 (define-public java-commons-lang3
5933 (package
5934 (name "java-commons-lang3")
5935 (version "3.9")
5936 (source
5937 (origin
5938 (method url-fetch)
5939 (uri (string-append "mirror://apache/commons/lang/source/"
5940 "commons-lang3-" version "-src.tar.gz"))
5941 (sha256
5942 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
5943 (build-system ant-build-system)
5944 (arguments
5945 `(#:jar-name "commons-lang3.jar"
5946 #:source-dir "src/main/java"
5947 #:tests? #f; require junit5
5948 #:phases
5949 (modify-phases %standard-phases
5950 (replace 'install (install-from-pom "pom.xml")))))
5951 (propagated-inputs
5952 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
5953 (home-page "https://commons.apache.org/lang/")
5954 (synopsis "Extension of the java.lang package")
5955 (description "The Commons Lang components contains a set of Java classes
5956 that provide helper methods for standard Java classes, especially those found
5957 in the @code{java.lang} package. The following classes are included:
5958
5959 @itemize
5960 @item StringUtils - Helper for @code{java.lang.String}.
5961 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
5962 characters such as @code{[a-z]} and @code{[abcdez]}.
5963 @item RandomStringUtils - Helper for creating randomised strings.
5964 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
5965 @item NumberRange - A range of numbers with an upper and lower bound.
5966 @item ObjectUtils - Helper for @code{java.lang.Object}.
5967 @item SerializationUtils - Helper for serializing objects.
5968 @item SystemUtils - Utility class defining the Java system properties.
5969 @item NestedException package - A sub-package for the creation of nested
5970 exceptions.
5971 @item Enum package - A sub-package for the creation of enumerated types.
5972 @item Builder package - A sub-package for the creation of @code{equals},
5973 @code{hashCode}, @code{compareTo} and @code{toString} methods.
5974 @end itemize\n")
5975 (license license:asl2.0)))
5976
5977 (define-public java-commons-bsf
5978 (package
5979 (name "java-commons-bsf")
5980 (version "2.4.0")
5981 (source (origin
5982 (method url-fetch)
5983 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
5984 version ".tar.gz"))
5985 (sha256
5986 (base32
5987 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
5988 (modules '((guix build utils)))
5989 (snippet
5990 '(begin
5991 (for-each delete-file
5992 (find-files "." "\\.jar$"))
5993 #t))))
5994 (build-system ant-build-system)
5995 (arguments
5996 `(#:build-target "jar"
5997 #:tests? #f; No test file
5998 #:modules ((guix build ant-build-system)
5999 (guix build utils)
6000 (guix build java-utils)
6001 (sxml simple))
6002 #:phases
6003 (modify-phases %standard-phases
6004 (add-before 'build 'create-properties
6005 (lambda _
6006 ;; This file is missing from the distribution
6007 (call-with-output-file "build-properties.xml"
6008 (lambda (port)
6009 (sxml->xml
6010 `(project (@ (basedir ".") (name "build-properties") (default ""))
6011 (property (@ (name "project.name") (value "bsf")))
6012 (property (@ (name "source.level") (value "1.5")))
6013 (property (@ (name "build.lib") (value "build/jar")))
6014 (property (@ (name "src.dir") (value "src")))
6015 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6016 (property (@ (name "build.tests") (value "build/test-classes")))
6017 (property (@ (name "build.dest") (value "build/classes"))))
6018 port)))
6019 #t))
6020 (replace 'install (install-jars "build")))))
6021 (native-inputs
6022 `(("java-junit" ,java-junit)))
6023 (inputs
6024 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6025 (home-page "https://commons.apache.org/proper/commons-bsf")
6026 (synopsis "Bean Scripting Framework")
6027 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6028 which provides scripting language support within Java applications, and access
6029 to Java objects and methods from scripting languages. BSF allows one to write
6030 JSPs in languages other than Java while providing access to the Java class
6031 library. In addition, BSF permits any Java application to be implemented in
6032 part (or dynamically extended) by a language that is embedded within it. This
6033 is achieved by providing an API that permits calling scripting language engines
6034 from within Java, as well as an object registry that exposes Java objects to
6035 these scripting language engines.")
6036 (license license:asl2.0)))
6037
6038 (define-public java-commons-jxpath
6039 (package
6040 (name "java-commons-jxpath")
6041 (version "1.3")
6042 (source (origin
6043 (method url-fetch)
6044 (uri (string-append "mirror://apache/commons/jxpath/source/"
6045 "commons-jxpath-" version "-src.tar.gz"))
6046 (sha256
6047 (base32
6048 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6049 (build-system ant-build-system)
6050 (arguments
6051 `(#:jar-name "commons-jxpath.jar"
6052 ;; tests require more dependencies, including mockrunner which depends on old software
6053 #:tests? #f
6054 #:source-dir "src/java"))
6055 (inputs
6056 `(("servlet" ,java-classpathx-servletapi)
6057 ("java-jdom" ,java-jdom)
6058 ("java-commons-beanutils" ,java-commons-beanutils)))
6059 (native-inputs
6060 `(("java-junit" ,java-junit)))
6061 (home-page "https://commons.apache.org/jxpath/")
6062 (synopsis "Simple interpreter of an expression language called XPath.")
6063 (description "The org.apache.commons.jxpath package defines a simple
6064 interpreter of an expression language called XPath. JXPath applies XPath
6065 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6066 contexts, DOM etc, including mixtures thereof.")
6067 (license license:asl2.0)))
6068
6069 (define-public java-commons-pool
6070 (package
6071 (name "java-commons-pool")
6072 (version "2.6.2")
6073 (source (origin
6074 (method url-fetch)
6075 (uri (string-append "mirror://apache/commons/pool/source/"
6076 "commons-pool2-" version "-src.tar.gz"))
6077 (sha256
6078 (base32
6079 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6080 (arguments
6081 `(#:jar-name "common-pool.jar"
6082 #:source-dir "src/main/java"
6083 #:test-exclude
6084 (list "**/PerformanceTest.java")))
6085 (build-system ant-build-system)
6086 (inputs
6087 `(("java-cglib" ,java-cglib)))
6088 (native-inputs
6089 `(("java-junit" ,java-junit)
6090 ("java-hamcrest-core" ,java-hamcrest-core)
6091 ("java-asm" ,java-asm)
6092 ("java-objenesis" ,java-objenesis)))
6093 (home-page "https://commons.apache.org/proper/commons-pool/")
6094 (synopsis "Object-pooling API in Java")
6095 (description "The commons-pool package provides an object-pooling API
6096 and a number of object pool implementations. This package defines a
6097 handful of pooling interfaces and some base classes that may be useful when
6098 creating new pool implementations.")
6099 (license license:asl2.0)))
6100
6101 (define-public java-commons-dbcp
6102 (package
6103 (name "java-commons-dbcp")
6104 (version "2.6.0")
6105 (source (origin
6106 (method url-fetch)
6107 (uri (string-append "mirror://apache/commons/dbcp/source/"
6108 "commons-dbcp2-" version "-src.tar.gz"))
6109 (sha256
6110 (base32
6111 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6112 (arguments
6113 `(#:source-dir "src/main/java"
6114 #:jar-name "java-commons-dbcp.jar"
6115 #:tests? #f)); requires apache-geronimo
6116 (inputs
6117 `(("java-commons-pool" ,java-commons-pool)
6118 ("java-commons-logging" ,java-commons-logging-minimal)
6119 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6120 (native-inputs
6121 `(("java-junit" ,java-junit)))
6122 (build-system ant-build-system)
6123 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6124 (synopsis "Database Connection Pool for Java")
6125 (description "Commons-dbcp allows you to share a pool of database
6126 connections between users. Creating a new connection for each user can be
6127 time consuming and even unfeasible when the number of simultaneous users is
6128 very large. This package provides a way to share a poole of connections to
6129 reduce that load.")
6130 (license license:asl2.0)))
6131
6132 (define-public java-commons-jcs
6133 (package
6134 (name "java-commons-jcs")
6135 (version "2.2.1")
6136 (source (origin
6137 (method url-fetch)
6138 (uri (string-append "mirror://apache/commons/jcs/source/"
6139 "commons-jcs-dist-" version "-src.tar.gz"))
6140 (sha256
6141 (base32
6142 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6143 (build-system ant-build-system)
6144 (arguments
6145 `(#:jar-name "commons-jcs.jar"
6146 #:source-dir "commons-jcs-core/src/main/java"
6147 #:test-dir "commons-jcs-core/src/test"
6148 #:tests? #f; requires hsqldb
6149 #:phases
6150 (modify-phases %standard-phases
6151 (add-before 'build 'prepare
6152 (lambda _
6153 (with-directory-excursion
6154 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6155 (substitute*
6156 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6157 (("commons.dbcp") "commons.dbcp2")
6158 ((".*\\.setMaxActive.*") ""))
6159 ;;; Remove dependency on velocity-tools
6160 (delete-file "admin/servlet/JCSAdminServlet.java"))
6161 #t)))))
6162 (propagated-inputs
6163 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6164 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6165 ("java-commons-httpclient" ,java-commons-httpclient)
6166 ("java-commons-dbcp" ,java-commons-dbcp)))
6167 (native-inputs
6168 `(("java-junit" ,java-junit)))
6169 (home-page "https://commons.apache.org/proper/commons-jcs/")
6170 (synopsis "Distributed caching system in Java")
6171 (description "JCS is a distributed caching system written in Java. It
6172 is intended to speed up applications by providing a means to manage cached
6173 data of various dynamic natures. Like any caching system, JCS is most useful
6174 for high read, low put applications. Latency times drop sharply and
6175 bottlenecks move away from the database in an effectively cached system.")
6176 (license license:asl2.0)))
6177
6178 (define-public java-jsr250
6179 (package
6180 (name "java-jsr250")
6181 (version "1.3")
6182 (source (origin
6183 (method url-fetch)
6184 (uri (string-append "https://repo1.maven.org/maven2/"
6185 "javax/annotation/javax.annotation-api/"
6186 version "/javax.annotation-api-"
6187 version "-sources.jar"))
6188 (sha256
6189 (base32
6190 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6191 (build-system ant-build-system)
6192 (arguments
6193 `(#:tests? #f ; no tests included
6194 #:jdk ,icedtea-8
6195 #:jar-name "jsr250.jar"
6196 #:modules ((guix build ant-build-system)
6197 (guix build utils)
6198 (guix build maven pom)
6199 (guix build java-utils)
6200 (sxml simple))
6201 #:phases
6202 (modify-phases %standard-phases
6203 (add-before 'install 'create-pom
6204 (lambda _
6205 (with-output-to-file "pom.xml"
6206 (lambda _
6207 (sxml->xml
6208 `((project
6209 (modelVersion "4.0.0")
6210 (name "jsr250")
6211 (groupId "javax.annotation")
6212 (artifactId "jsr250-api")
6213 (version ,,version))))))
6214 #t))
6215 (replace 'install
6216 (install-from-pom "pom.xml")))))
6217 (home-page "https://jcp.org/en/jsr/detail?id=250")
6218 (synopsis "Security-related annotations")
6219 (description "This package provides annotations for security. It provides
6220 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6221 namespaces.")
6222 ;; either cddl or gpl2 only, with classpath exception
6223 (license (list license:cddl1.0
6224 license:gpl2))))
6225
6226 (define-public java-jsr305
6227 (package
6228 (name "java-jsr305")
6229 (version "3.0.1")
6230 (source (origin
6231 (method url-fetch)
6232 (uri (string-append "https://repo1.maven.org/maven2/"
6233 "com/google/code/findbugs/"
6234 "jsr305/" version "/jsr305-"
6235 version "-sources.jar"))
6236 (sha256
6237 (base32
6238 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6239 (build-system ant-build-system)
6240 (arguments
6241 `(#:tests? #f ; no tests included
6242 #:jar-name "jsr305.jar"
6243 #:modules ((guix build ant-build-system)
6244 (guix build java-utils)
6245 (guix build maven pom)
6246 (guix build utils)
6247 (sxml simple))
6248 #:phases
6249 (modify-phases %standard-phases
6250 (add-before 'install 'create-pom
6251 (lambda _
6252 (with-output-to-file "pom.xml"
6253 (lambda _
6254 (sxml->xml
6255 `((project
6256 (modelVersion "4.0.0")
6257 (name "jsr305")
6258 (groupId "com.google.code.findbugs")
6259 (artifactId "jsr305")
6260 (version ,,version))))))
6261 #t))
6262 (replace 'install
6263 (install-from-pom "pom.xml")))))
6264 (home-page "http://findbugs.sourceforge.net/")
6265 (synopsis "Annotations for the static analyzer called findbugs")
6266 (description "This package provides annotations for the findbugs package.
6267 It provides packages in the @code{javax.annotations} namespace.")
6268 (license license:asl2.0)))
6269
6270 (define-public java-guava
6271 (package
6272 (name "java-guava")
6273 ;; This is the last release of Guava that can be built with Java 7.
6274 (version "20.0")
6275 (source (origin
6276 (method git-fetch)
6277 (uri (git-reference
6278 (url "https://github.com/google/guava/")
6279 (commit (string-append "v" version))))
6280 (file-name (git-file-name name version))
6281 (sha256
6282 (base32
6283 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6284 (build-system ant-build-system)
6285 (arguments
6286 `(#:tests? #f ; no tests included
6287 #:jar-name "guava.jar"
6288 #:source-dir "guava/src"
6289 #:phases
6290 (modify-phases %standard-phases
6291 (add-after 'unpack 'trim-sources
6292 (lambda _
6293 (with-directory-excursion "guava/src/com/google/common"
6294 ;; Remove annotations to avoid extra dependencies:
6295 ;; * "j2objc" annotations are used when converting Java to
6296 ;; Objective C;
6297 ;; * "errorprone" annotations catch common Java mistakes at
6298 ;; compile time;
6299 ;; * "IgnoreJRERequirement" is used for Android.
6300 (substitute* (find-files "." "\\.java$")
6301 (("import com.google.j2objc.*") "")
6302 (("import com.google.errorprone.annotation.*") "")
6303 (("import org.codehaus.mojo.animal_sniffer.*") "")
6304 (("@CanIgnoreReturnValue") "")
6305 (("@LazyInit") "")
6306 (("@WeakOuter") "")
6307 (("@RetainedWith") "")
6308 (("@Weak") "")
6309 (("@ForOverride") "")
6310 (("@J2ObjCIncompatible") "")
6311 (("@IgnoreJRERequirement") "")))
6312 #t))
6313 (replace 'install (install-from-pom "guava/pom.xml")))))
6314 (inputs
6315 `(("java-jsr305" ,java-jsr305)))
6316 (propagated-inputs
6317 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6318 (home-page "https://github.com/google/guava")
6319 (synopsis "Google core libraries for Java")
6320 (description "Guava is a set of core libraries that includes new
6321 collection types (such as multimap and multiset), immutable collections, a
6322 graph library, functional types, an in-memory cache, and APIs/utilities for
6323 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6324 more!")
6325 (license license:asl2.0)))
6326
6327 (define java-guava-parent-pom
6328 (package
6329 (inherit java-guava)
6330 (name "java-guava-parent-pom")
6331 (arguments
6332 `(#:tests? #f
6333 #:phases
6334 (modify-phases %standard-phases
6335 (delete 'configure)
6336 (delete 'build)
6337 (replace 'install
6338 (install-pom-file "pom.xml")))))
6339 (propagated-inputs
6340 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6341
6342 ;; The java-commons-logging package provides adapters to many different
6343 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6344 ;; it with only a minimal set of adapters.
6345 (define-public java-commons-logging-minimal
6346 (package
6347 (name "java-commons-logging-minimal")
6348 (version "1.2")
6349 (source (origin
6350 (method url-fetch)
6351 (uri (string-append "mirror://apache/commons/logging/source/"
6352 "commons-logging-" version "-src.tar.gz"))
6353 (sha256
6354 (base32
6355 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6356 (build-system ant-build-system)
6357 (arguments
6358 `(#:tests? #f ; avoid dependency on logging frameworks
6359 #:jar-name "commons-logging-minimal.jar"
6360 #:phases
6361 (modify-phases %standard-phases
6362 (add-after 'unpack 'delete-adapters-and-tests
6363 (lambda _
6364 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6365 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6366 ;; is used by applications; SimpleLog is the only actually usable
6367 ;; implementation that does not depend on another logging
6368 ;; framework.
6369 (for-each
6370 (lambda (file)
6371 (delete-file (string-append
6372 "src/main/java/org/apache/commons/logging/impl/" file)))
6373 (list "Jdk13LumberjackLogger.java"
6374 "WeakHashtable.java"
6375 "Log4JLogger.java"
6376 "ServletContextCleaner.java"
6377 "Jdk14Logger.java"
6378 "AvalonLogger.java"
6379 "LogKitLogger.java"))
6380 (delete-file-recursively "src/test")
6381 #t)))))
6382 (home-page "https://commons.apache.org/logging/")
6383 (synopsis "Common API for logging implementations")
6384 (description "The Logging package is a thin bridge between different
6385 logging implementations. A library that uses the commons-logging API can be
6386 used with any logging implementation at runtime.")
6387 (license license:asl2.0)))
6388
6389 ;; This is the last release of the 1.x series.
6390 (define-public java-mockito-1
6391 (package
6392 (name "java-mockito")
6393 (version "1.10.19")
6394 (source (origin
6395 (method url-fetch)
6396 (uri (string-append "http://repo1.maven.org/maven2/"
6397 "org/mockito/mockito-core/" version
6398 "/mockito-core-" version "-sources.jar"))
6399 (sha256
6400 (base32
6401 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6402 (build-system ant-build-system)
6403 (arguments
6404 `(#:jar-name "mockito.jar"
6405 #:tests? #f ; no tests included
6406 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6407 ;; patches in build phases.
6408 #:phases
6409 (modify-phases %standard-phases
6410 ;; Mockito was developed against a different version of hamcrest,
6411 ;; which does not require matcher implementations to provide an
6412 ;; implementation of the "describeMismatch" method. We add this
6413 ;; simple definition to pass the build with our version of hamcrest.
6414 (add-after 'unpack 'fix-hamcrest-build-error
6415 (lambda _
6416 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6417 (("public Matcher getActualMatcher\\(\\) .*" line)
6418 (string-append "
6419 public void describeMismatch(Object item, Description description) {
6420 actualMatcher.describeMismatch(item, description);
6421 }"
6422 line)))
6423 #t))
6424 ;; Mockito bundles cglib. We have a cglib package, so let's use
6425 ;; that instead.
6426 (add-after 'unpack 'use-system-libraries
6427 (lambda _
6428 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6429 (substitute* '("CGLIBHacker.java"
6430 "CglibMockMaker.java"
6431 "ClassImposterizer.java"
6432 "DelegatingMockitoMethodProxy.java"
6433 "MethodInterceptorFilter.java"
6434 "MockitoNamingPolicy.java"
6435 "SerializableMockitoMethodProxy.java"
6436 "SerializableNoOp.java")
6437 (("import org.mockito.cglib") "import net.sf.cglib")))
6438 #t)))))
6439 (inputs
6440 `(("java-junit" ,java-junit)
6441 ("java-objenesis" ,java-objenesis)
6442 ("java-cglib" ,java-cglib)
6443 ("java-hamcrest-core" ,java-hamcrest-core)))
6444 (home-page "http://mockito.org")
6445 (synopsis "Mockito is a mock library for Java")
6446 (description "Mockito is a mocking library for Java which lets you write
6447 tests with a clean and simple API. It generates mocks using reflection, and
6448 it records all mock invocations, including methods arguments.")
6449 (license license:asl2.0)))
6450
6451 (define-public java-httpcomponents-httpcore
6452 (package
6453 (name "java-httpcomponents-httpcore")
6454 (version "4.4.6")
6455 (source (origin
6456 (method url-fetch)
6457 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6458 "source/httpcomponents-core-"
6459 version "-src.tar.gz"))
6460 (sha256
6461 (base32
6462 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6463 (build-system ant-build-system)
6464 (arguments
6465 `(#:jar-name "httpcomponents-httpcore.jar"
6466 #:phases
6467 (modify-phases %standard-phases
6468 (add-after 'unpack 'chdir
6469 (lambda _ (chdir "httpcore") #t)))))
6470 (inputs
6471 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6472 ("java-commons-lang3" ,java-commons-lang3)))
6473 (native-inputs
6474 `(("java-junit" ,java-junit)
6475 ("java-mockito" ,java-mockito-1)))
6476 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6477 (synopsis "Low level HTTP transport components")
6478 (description "HttpCore is a set of low level HTTP transport components
6479 that can be used to build custom client and server side HTTP services with a
6480 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6481 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6482 NIO.
6483
6484 This package provides the blocking I/O model library.")
6485 (license license:asl2.0)))
6486
6487 (define-public java-httpcomponents-httpcore-nio
6488 (package (inherit java-httpcomponents-httpcore)
6489 (name "java-httpcomponents-httpcore-nio")
6490 (arguments
6491 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6492 #:phases
6493 (modify-phases %standard-phases
6494 (add-after 'unpack 'chdir
6495 (lambda _ (chdir "httpcore-nio") #t)))))
6496 (inputs
6497 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6498 ("java-hamcrest-core" ,java-hamcrest-core)
6499 ,@(package-inputs java-httpcomponents-httpcore)))
6500 (description "HttpCore is a set of low level HTTP transport components
6501 that can be used to build custom client and server side HTTP services with a
6502 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6503 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6504 NIO.
6505
6506 This package provides the non-blocking I/O model library based on Java
6507 NIO.")))
6508
6509 (define-public java-httpcomponents-httpcore-ab
6510 (package (inherit java-httpcomponents-httpcore)
6511 (name "java-httpcomponents-httpcore-ab")
6512 (arguments
6513 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6514 #:phases
6515 (modify-phases %standard-phases
6516 (add-after 'unpack 'chdir
6517 (lambda _ (chdir "httpcore-ab") #t)))))
6518 (inputs
6519 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6520 ("java-commons-cli" ,java-commons-cli)
6521 ("java-hamcrest-core" ,java-hamcrest-core)
6522 ,@(package-inputs java-httpcomponents-httpcore)))
6523 (synopsis "Apache HttpCore benchmarking tool")
6524 (description "This package provides the HttpCore benchmarking tool. It is
6525 an Apache AB clone based on HttpCore.")))
6526
6527 (define-public java-httpcomponents-httpclient
6528 (package
6529 (name "java-httpcomponents-httpclient")
6530 (version "4.5.12")
6531 (source (origin
6532 (method url-fetch)
6533 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6534 "source/httpcomponents-client-"
6535 version "-src.tar.gz"))
6536 (sha256
6537 (base32
6538 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6539 (build-system ant-build-system)
6540 (arguments
6541 `(#:jar-name "httpcomponents-httpclient.jar"
6542 #:phases
6543 (modify-phases %standard-phases
6544 (add-after 'unpack 'chdir
6545 (lambda _ (chdir "httpclient") #t)))))
6546 (inputs
6547 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6548 ("java-commons-codec" ,java-commons-codec)
6549 ("java-hamcrest-core" ,java-hamcrest-core)
6550 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6551 ("java-mockito" ,java-mockito-1)
6552 ("java-junit" ,java-junit)))
6553 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6554 (synopsis "HTTP client library for Java")
6555 (description "Although the @code{java.net} package provides basic
6556 functionality for accessing resources via HTTP, it doesn't provide the full
6557 flexibility or functionality needed by many applications. @code{HttpClient}
6558 seeks to fill this void by providing an efficient, up-to-date, and
6559 feature-rich package implementing the client side of the most recent HTTP
6560 standards and recommendations.")
6561 (license license:asl2.0)))
6562
6563 (define-public java-httpcomponents-httpmime
6564 (package (inherit java-httpcomponents-httpclient)
6565 (name "java-httpcomponents-httpmime")
6566 (arguments
6567 `(#:jar-name "httpcomponents-httpmime.jar"
6568 #:phases
6569 (modify-phases %standard-phases
6570 (add-after 'unpack 'chdir
6571 (lambda _ (chdir "httpmime") #t)))))
6572 (inputs
6573 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6574 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6575 ("java-junit" ,java-junit)
6576 ("java-hamcrest-core" ,java-hamcrest-core)))))
6577
6578 (define-public java-commons-net
6579 (package
6580 (name "java-commons-net")
6581 (version "3.6")
6582 (source (origin
6583 (method url-fetch)
6584 (uri (string-append "mirror://apache/commons/net/source/"
6585 "commons-net-" version "-src.tar.gz"))
6586 (sha256
6587 (base32
6588 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6589 (build-system ant-build-system)
6590 (arguments
6591 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6592 ;; should be "resources/examples/examples.properties"), but gets "null"
6593 ;; instead.
6594 #:tests? #f
6595 #:jar-name "commons-net.jar"))
6596 (native-inputs
6597 `(("java-junit" ,java-junit)
6598 ("java-hamcrest-core" ,java-hamcrest-core)))
6599 (home-page "https://commons.apache.org/net/")
6600 (synopsis "Client library for many basic Internet protocols")
6601 (description "The Apache Commons Net library implements the client side of
6602 many basic Internet protocols. The purpose of the library is to provide
6603 fundamental protocol access, not higher-level abstractions.")
6604 (license license:asl2.0)))
6605
6606 (define-public java-jsch
6607 (package
6608 (name "java-jsch")
6609 (version "0.1.55")
6610 (source (origin
6611 (method url-fetch)
6612 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6613 version "/jsch-" version ".zip"))
6614 (sha256
6615 (base32
6616 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6617 (build-system ant-build-system)
6618 (arguments
6619 `(#:build-target "dist"
6620 #:tests? #f ; no tests included
6621 #:phases
6622 (modify-phases %standard-phases
6623 (replace 'install (install-jars "dist")))))
6624 (native-inputs
6625 `(("unzip" ,unzip)))
6626 (home-page "http://www.jcraft.com/jsch/")
6627 (synopsis "Pure Java implementation of SSH2")
6628 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6629 to connect to an SSH server and use port forwarding, X11 forwarding, file
6630 transfer, etc., and you can integrate its functionality into your own Java
6631 programs.")
6632 (license license:bsd-3)))
6633
6634 (define-public java-commons-compress
6635 (package
6636 (name "java-commons-compress")
6637 (version "1.13")
6638 (source (origin
6639 (method url-fetch)
6640 (uri (string-append "mirror://apache/commons/compress/source/"
6641 "commons-compress-" version "-src.tar.gz"))
6642 (sha256
6643 (base32
6644 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6645 (build-system ant-build-system)
6646 (arguments
6647 `(#:jar-name "commons-compress.jar"
6648 #:phases
6649 (modify-phases %standard-phases
6650 (add-after 'unpack 'delete-bad-tests
6651 (lambda _
6652 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6653 ;; FIXME: These tests really should not fail. Maybe they are
6654 ;; indicative of problems with our Java packaging work.
6655
6656 ;; This test fails with a null pointer exception.
6657 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6658 ;; This test fails to open test resources.
6659 (delete-file "archivers/zip/ExplodeSupportTest.java")
6660
6661 ;; FIXME: This test adds a dependency on powermock, which is hard to
6662 ;; package at this point.
6663 ;; https://github.com/powermock/powermock
6664 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6665 #t))
6666 (replace 'install (install-from-pom "pom.xml")))))
6667 (propagated-inputs
6668 `(("java-xz" ,java-xz)
6669 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6670 (native-inputs
6671 `(("java-junit" ,java-junit)
6672 ("java-mockito" ,java-mockito-1)))
6673 (home-page "https://commons.apache.org/proper/commons-compress/")
6674 (synopsis "Java library for working with compressed files")
6675 (description "The Apache Commons Compress library defines an API for
6676 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6677 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6678 (license license:asl2.0)))
6679
6680 (define-public java-commons-csv
6681 (package
6682 (name "java-commons-csv")
6683 (version "1.4")
6684 (source (origin
6685 (method url-fetch)
6686 (uri (string-append "mirror://apache/commons/csv/source/"
6687 "commons-csv-" version "-src.tar.gz"))
6688 (sha256
6689 (base32
6690 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6691 (build-system ant-build-system)
6692 (arguments
6693 `(#:jar-name "commons-csv.jar"
6694 #:source-dir "src/main/java"
6695 #:tests? #f)); FIXME: requires java-h2
6696 (inputs
6697 `(("java-hamcrest-core" ,java-hamcrest-core)
6698 ("java-commons-io" ,java-commons-io)
6699 ("java-commons-lang3" ,java-commons-lang3)
6700 ("junit" ,java-junit)))
6701 (home-page "https://commons.apache.org/proper/commons-csv/")
6702 (synopsis "Read and write CSV documents")
6703 (description "Commons CSV reads and writes files in variations of the Comma
6704 Separated Value (CSV) format. The most common CSV formats are predefined in the
6705 CSVFormat class:
6706
6707 @itemize
6708 @item Microsoft Excel
6709 @item Informix UNLOAD
6710 @item Informix UNLOAD CSV
6711 @item MySQL
6712 @item RFC 4180
6713 @item TDF
6714 @end itemize
6715
6716 Custom formats can be created using a fluent style API.")
6717 (license license:asl2.0)))
6718
6719 (define-public java-osgi-annotation
6720 (package
6721 (name "java-osgi-annotation")
6722 (version "6.0.0")
6723 (source (origin
6724 (method url-fetch)
6725 (uri (string-append "https://repo1.maven.org/maven2/"
6726 "org/osgi/org.osgi.annotation/" version "/"
6727 "org.osgi.annotation-" version "-sources.jar"))
6728 (sha256
6729 (base32
6730 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6731 (build-system ant-build-system)
6732 (arguments
6733 `(#:tests? #f ; no tests
6734 #:jar-name "osgi-annotation.jar"))
6735 (home-page "https://www.osgi.org")
6736 (synopsis "Annotation module of OSGi framework")
6737 (description
6738 "OSGi, for Open Services Gateway initiative framework, is a module system
6739 and service platform for the Java programming language. This package contains
6740 the OSGi annotation module, providing additional services to help dynamic
6741 components.")
6742 (license license:asl2.0)))
6743
6744 (define-public java-osgi-core
6745 (package
6746 (name "java-osgi-core")
6747 (version "6.0.0")
6748 (source (origin
6749 (method url-fetch)
6750 (uri (string-append "https://repo1.maven.org/maven2/"
6751 "org/osgi/org.osgi.core/" version "/"
6752 "org.osgi.core-" version "-sources.jar"))
6753 (sha256
6754 (base32
6755 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6756 (build-system ant-build-system)
6757 (arguments
6758 `(#:tests? #f ; no tests
6759 #:jar-name "osgi-core.jar"))
6760 (inputs
6761 `(("java-osgi-annotation" ,java-osgi-annotation)))
6762 (home-page "https://www.osgi.org")
6763 (synopsis "Core module of OSGi framework")
6764 (description
6765 "OSGi, for Open Services Gateway initiative framework, is a module system
6766 and service platform for the Java programming language. This package contains
6767 the OSGi Core module.")
6768 (license license:asl2.0)))
6769
6770 (define-public java-osgi-service-event
6771 (package
6772 (name "java-osgi-service-event")
6773 (version "1.3.1")
6774 (source (origin
6775 (method url-fetch)
6776 (uri (string-append "https://repo1.maven.org/maven2/"
6777 "org/osgi/org.osgi.service.event/"
6778 version "/org.osgi.service.event-"
6779 version "-sources.jar"))
6780 (sha256
6781 (base32
6782 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6783 (build-system ant-build-system)
6784 (arguments
6785 `(#:tests? #f ; no tests
6786 #:jar-name "osgi-service-event.jar"))
6787 (inputs
6788 `(("java-osgi-annotation" ,java-osgi-annotation)
6789 ("java-osgi-core" ,java-osgi-core)))
6790 (home-page "https://www.osgi.org")
6791 (synopsis "OSGi service event module")
6792 (description
6793 "OSGi, for Open Services Gateway initiative framework, is a module system
6794 and service platform for the Java programming language. This package contains
6795 the OSGi @code{org.osgi.service.event} module.")
6796 (license license:asl2.0)))
6797
6798 (define-public java-eclipse-osgi
6799 (package
6800 (name "java-eclipse-osgi")
6801 (version "3.11.3")
6802 (source (origin
6803 (method url-fetch)
6804 (uri (string-append "https://repo1.maven.org/maven2/"
6805 "org/eclipse/platform/org.eclipse.osgi/"
6806 version "/org.eclipse.osgi-"
6807 version "-sources.jar"))
6808 (sha256
6809 (base32
6810 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6811 (build-system ant-build-system)
6812 (arguments
6813 `(#:tests? #f ; no tests included
6814 #:jar-name "eclipse-equinox-osgi.jar"))
6815 (inputs
6816 `(("java-osgi-annotation" ,java-osgi-annotation)))
6817 (home-page "http://www.eclipse.org/equinox/")
6818 (synopsis "Eclipse Equinox OSGi framework")
6819 (description "This package provides an implementation of the OSGi Core
6820 specification.")
6821 (license license:epl1.0)))
6822
6823 (define-public java-eclipse-equinox-common
6824 (package
6825 (name "java-eclipse-equinox-common")
6826 (version "3.10.200")
6827 (source (origin
6828 (method url-fetch)
6829 (uri (string-append "https://repo1.maven.org/maven2/"
6830 "org/eclipse/platform/org.eclipse.equinox.common/"
6831 version "/org.eclipse.equinox.common-"
6832 version "-sources.jar"))
6833 (sha256
6834 (base32
6835 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
6836 (build-system ant-build-system)
6837 (arguments
6838 `(#:tests? #f ; no tests included
6839 #:jar-name "eclipse-equinox-common.jar"))
6840 (inputs
6841 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
6842 (home-page "http://www.eclipse.org/equinox/")
6843 (synopsis "Common Eclipse runtime")
6844 (description "This package provides the common Eclipse runtime.")
6845 (license license:epl1.0)))
6846
6847 (define-public java-eclipse-core-jobs
6848 (package
6849 (name "java-eclipse-core-jobs")
6850 (version "3.8.0")
6851 (source (origin
6852 (method url-fetch)
6853 (uri (string-append "https://repo1.maven.org/maven2/"
6854 "org/eclipse/platform/org.eclipse.core.jobs/"
6855 version "/org.eclipse.core.jobs-"
6856 version "-sources.jar"))
6857 (sha256
6858 (base32
6859 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
6860 (build-system ant-build-system)
6861 (arguments
6862 `(#:tests? #f ; no tests included
6863 #:jar-name "eclipse-core-jobs.jar"))
6864 (inputs
6865 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6866 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6867 (home-page "http://www.eclipse.org/equinox/")
6868 (synopsis "Eclipse jobs mechanism")
6869 (description "This package provides the Eclipse jobs mechanism.")
6870 (license license:epl1.0)))
6871
6872 (define-public java-eclipse-equinox-registry
6873 (package
6874 (name "java-eclipse-equinox-registry")
6875 (version "3.6.100")
6876 (source (origin
6877 (method url-fetch)
6878 (uri (string-append "https://repo1.maven.org/maven2/"
6879 "org/eclipse/platform/org.eclipse.equinox.registry/"
6880 version "/org.eclipse.equinox.registry-"
6881 version "-sources.jar"))
6882 (sha256
6883 (base32
6884 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
6885 (build-system ant-build-system)
6886 (arguments
6887 `(#:tests? #f ; no tests included
6888 #:jar-name "eclipse-equinox-registry.jar"))
6889 (inputs
6890 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
6891 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6892 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6893 (home-page "http://www.eclipse.org/equinox/")
6894 (synopsis "Eclipse extension registry support")
6895 (description "This package provides support for the Eclipse extension
6896 registry.")
6897 (license license:epl1.0)))
6898
6899 (define-public java-eclipse-equinox-app
6900 (package
6901 (name "java-eclipse-equinox-app")
6902 (version "1.3.400")
6903 (source (origin
6904 (method url-fetch)
6905 (uri (string-append "https://repo1.maven.org/maven2/"
6906 "org/eclipse/platform/org.eclipse.equinox.app/"
6907 version "/org.eclipse.equinox.app-"
6908 version "-sources.jar"))
6909 (sha256
6910 (base32
6911 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
6912 (build-system ant-build-system)
6913 (arguments
6914 `(#:tests? #f ; no tests included
6915 #:jar-name "eclipse-equinox-app.jar"))
6916 (inputs
6917 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6918 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6919 ("java-eclipse-osgi" ,java-eclipse-osgi)
6920 ("java-osgi-service-event" ,java-osgi-service-event)))
6921 (home-page "http://www.eclipse.org/equinox/")
6922 (synopsis "Equinox application container")
6923 (description "This package provides the Equinox application container for
6924 Eclipse.")
6925 (license license:epl1.0)))
6926
6927 (define-public java-eclipse-equinox-preferences
6928 (package
6929 (name "java-eclipse-equinox-preferences")
6930 (version "3.6.1")
6931 (source (origin
6932 (method url-fetch)
6933 (uri (string-append "https://repo1.maven.org/maven2/"
6934 "org/eclipse/platform/org.eclipse.equinox.preferences/"
6935 version "/org.eclipse.equinox.preferences-"
6936 version "-sources.jar"))
6937 (sha256
6938 (base32
6939 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
6940 (build-system ant-build-system)
6941 (arguments
6942 `(#:tests? #f ; no tests included
6943 #:jar-name "eclipse-equinox-preferences.jar"))
6944 (inputs
6945 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6946 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6947 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6948 (home-page "http://www.eclipse.org/equinox/")
6949 (synopsis "Eclipse preferences mechanism")
6950 (description "This package provides the Eclipse preferences mechanism with
6951 the module @code{org.eclipse.equinox.preferences}.")
6952 (license license:epl1.0)))
6953
6954 (define-public java-eclipse-core-contenttype
6955 (package
6956 (name "java-eclipse-core-contenttype")
6957 (version "3.5.100")
6958 (source (origin
6959 (method url-fetch)
6960 (uri (string-append "https://repo1.maven.org/maven2/"
6961 "org/eclipse/platform/org.eclipse.core.contenttype/"
6962 version "/org.eclipse.core.contenttype-"
6963 version "-sources.jar"))
6964 (sha256
6965 (base32
6966 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
6967 (build-system ant-build-system)
6968 (arguments
6969 `(#:tests? #f ; no tests included
6970 #:jar-name "eclipse-core-contenttype.jar"))
6971 (inputs
6972 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
6973 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
6974 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
6975 ("java-eclipse-osgi" ,java-eclipse-osgi)))
6976 (home-page "http://www.eclipse.org/")
6977 (synopsis "Eclipse content mechanism")
6978 (description "This package provides the Eclipse content mechanism in the
6979 @code{org.eclipse.core.contenttype} module.")
6980 (license license:epl1.0)))
6981
6982 (define-public java-eclipse-core-runtime
6983 (package
6984 (name "java-eclipse-core-runtime")
6985 (version "3.15.100")
6986 (source (origin
6987 (method url-fetch)
6988 (uri (string-append "https://repo1.maven.org/maven2/"
6989 "org/eclipse/platform/org.eclipse.core.runtime/"
6990 version "/org.eclipse.core.runtime-"
6991 version "-sources.jar"))
6992 (sha256
6993 (base32
6994 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
6995 (build-system ant-build-system)
6996 (arguments
6997 `(#:tests? #f ; no tests included
6998 #:jar-name "eclipse-core-runtime.jar"))
6999 (inputs
7000 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7001 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7002 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7003 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7004 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7005 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7006 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7007 (home-page "https://www.eclipse.org/")
7008 (synopsis "Eclipse core runtime")
7009 (description "This package provides the Eclipse core runtime with the
7010 module @code{org.eclipse.core.runtime}.")
7011 (license license:epl1.0)))
7012
7013 (define-public java-eclipse-core-filesystem
7014 (package
7015 (name "java-eclipse-core-filesystem")
7016 (version "1.6.1")
7017 (source (origin
7018 (method url-fetch)
7019 (uri (string-append "https://repo1.maven.org/maven2/"
7020 "org/eclipse/platform/org.eclipse.core.filesystem/"
7021 version "/org.eclipse.core.filesystem-"
7022 version "-sources.jar"))
7023 (sha256
7024 (base32
7025 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7026 (build-system ant-build-system)
7027 (arguments
7028 `(#:tests? #f ; no tests included
7029 #:jar-name "eclipse-core-filesystem.jar"))
7030 (inputs
7031 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7032 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7033 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7034 (home-page "https://www.eclipse.org/")
7035 (synopsis "Eclipse core file system")
7036 (description "This package provides the Eclipse core file system with the
7037 module @code{org.eclipse.core.filesystem}.")
7038 (license license:epl1.0)))
7039
7040 (define-public java-eclipse-core-expressions
7041 (package
7042 (name "java-eclipse-core-expressions")
7043 (version "3.5.100")
7044 (source (origin
7045 (method url-fetch)
7046 (uri (string-append "https://repo1.maven.org/maven2/"
7047 "org/eclipse/platform/org.eclipse.core.expressions/"
7048 version "/org.eclipse.core.expressions-"
7049 version "-sources.jar"))
7050 (sha256
7051 (base32
7052 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7053 (build-system ant-build-system)
7054 (arguments
7055 `(#:tests? #f ; no tests included
7056 #:jar-name "eclipse-core-expressions.jar"))
7057 (inputs
7058 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7059 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7060 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7061 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7062 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7063 (home-page "https://www.eclipse.org/")
7064 (synopsis "Eclipse core expression language")
7065 (description "This package provides the Eclipse core expression language
7066 with the @code{org.eclipse.core.expressions} module.")
7067 (license license:epl1.0)))
7068
7069 (define-public java-eclipse-core-variables
7070 (package
7071 (name "java-eclipse-core-variables")
7072 (version "3.3.0")
7073 (source (origin
7074 (method url-fetch)
7075 (uri (string-append "https://repo1.maven.org/maven2/"
7076 "org/eclipse/platform/org.eclipse.core.variables/"
7077 version "/org.eclipse.core.variables-"
7078 version "-sources.jar"))
7079 (sha256
7080 (base32
7081 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7082 (build-system ant-build-system)
7083 (arguments
7084 `(#:tests? #f ; no tests included
7085 #:jar-name "eclipse-core-variables.jar"))
7086 (inputs
7087 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7088 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7089 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7090 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7091 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7092 (home-page "https://www.eclipse.org/platform")
7093 (synopsis "Eclipse core variables")
7094 (description "This package provides the Eclipse core variables module
7095 @code{org.eclipse.core.variables}.")
7096 (license license:epl1.0)))
7097
7098 (define-public java-eclipse-ant-core
7099 (package
7100 (name "java-eclipse-ant-core")
7101 (version "3.4.100")
7102 (source (origin
7103 (method url-fetch)
7104 (uri (string-append "https://repo1.maven.org/maven2/"
7105 "org/eclipse/platform/org.eclipse.ant.core/"
7106 version "/org.eclipse.ant.core-"
7107 version "-sources.jar"))
7108 (sha256
7109 (base32
7110 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7111 (build-system ant-build-system)
7112 (arguments
7113 `(#:tests? #f ; no tests included
7114 #:jar-name "eclipse-ant-core.jar"))
7115 (inputs
7116 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7117 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7118 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7119 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7120 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7121 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7122 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7123 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7124 (home-page "https://www.eclipse.org/platform")
7125 (synopsis "Ant build tool core libraries")
7126 (description "This package provides the ant build tool core libraries with
7127 the module @code{org.eclipse.ant.core}.")
7128 (license license:epl1.0)))
7129
7130 (define-public java-eclipse-core-resources
7131 (package
7132 (name "java-eclipse-core-resources")
7133 (version "3.13.200")
7134 (source (origin
7135 (method url-fetch)
7136 (uri (string-append "https://repo1.maven.org/maven2/"
7137 "org/eclipse/platform/org.eclipse.core.resources/"
7138 version "/org.eclipse.core.resources-"
7139 version "-sources.jar"))
7140 (sha256
7141 (base32
7142 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7143 (build-system ant-build-system)
7144 (arguments
7145 `(#:tests? #f ; no tests included
7146 #:jar-name "eclipse-core-resources.jar"))
7147 (inputs
7148 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7149 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7150 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7151 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7152 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7153 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7154 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7155 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7156 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7157 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7158 (home-page "https://www.eclipse.org/")
7159 (synopsis "Eclipse core resource management")
7160 (description "This package provides the Eclipse core resource management
7161 module @code{org.eclipse.core.resources}.")
7162 (license license:epl1.0)))
7163
7164 (define-public java-eclipse-compare-core
7165 (package
7166 (name "java-eclipse-compare-core")
7167 (version "3.6.0")
7168 (source (origin
7169 (method url-fetch)
7170 (uri (string-append "https://repo1.maven.org/maven2/"
7171 "org/eclipse/platform/org.eclipse.compare.core/"
7172 version "/org.eclipse.compare.core-"
7173 version "-sources.jar"))
7174 (sha256
7175 (base32
7176 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7177 (build-system ant-build-system)
7178 (arguments
7179 `(#:tests? #f ; no tests included
7180 #:jar-name "eclipse-compare-core.jar"))
7181 (inputs
7182 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7183 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7184 ("java-eclipse-osgi" ,java-eclipse-osgi)
7185 ("java-icu4j" ,java-icu4j)))
7186 (home-page "https://www.eclipse.org/")
7187 (synopsis "Eclipse core compare support")
7188 (description "This package provides the Eclipse core compare support
7189 module @code{org.eclipse.compare.core}.")
7190 (license license:epl1.0)))
7191
7192 (define-public java-eclipse-team-core
7193 (package
7194 (name "java-eclipse-team-core")
7195 (version "3.8.0")
7196 (source (origin
7197 (method url-fetch)
7198 (uri (string-append "https://repo1.maven.org/maven2/"
7199 "org/eclipse/platform/org.eclipse.team.core/"
7200 version "/org.eclipse.team.core-"
7201 version "-sources.jar"))
7202 (sha256
7203 (base32
7204 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7205 (build-system ant-build-system)
7206 (arguments
7207 `(#:tests? #f ; no tests included
7208 #:jar-name "eclipse-team-core.jar"))
7209 (inputs
7210 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7211 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7212 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7213 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7214 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7215 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7216 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7217 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7218 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7219 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7220 (home-page "https://www.eclipse.org/platform")
7221 (synopsis "Eclipse team support core")
7222 (description "This package provides the Eclipse team support core module
7223 @code{org.eclipse.team.core}.")
7224 (license license:epl1.0)))
7225
7226 (define-public java-eclipse-core-commands
7227 (package
7228 (name "java-eclipse-core-commands")
7229 (version "3.8.1")
7230 (source (origin
7231 (method url-fetch)
7232 (uri (string-append "https://repo1.maven.org/maven2/"
7233 "org/eclipse/platform/org.eclipse.core.commands/"
7234 version "/org.eclipse.core.commands-"
7235 version "-sources.jar"))
7236 (sha256
7237 (base32
7238 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7239 (build-system ant-build-system)
7240 (arguments
7241 `(#:tests? #f ; no tests included
7242 #:jar-name "eclipse-core-commands.jar"))
7243 (inputs
7244 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7245 (home-page "https://www.eclipse.org/platform")
7246 (synopsis "Eclipse core commands")
7247 (description "This package provides Eclipse core commands in the module
7248 @code{org.eclipse.core.commands}.")
7249 (license license:epl1.0)))
7250
7251 (define-public java-eclipse-text
7252 (package
7253 (name "java-eclipse-text")
7254 (version "3.6.0")
7255 (source (origin
7256 (method url-fetch)
7257 (uri (string-append "https://repo1.maven.org/maven2/"
7258 "org/eclipse/platform/org.eclipse.text/"
7259 version "/org.eclipse.text-"
7260 version "-sources.jar"))
7261 (sha256
7262 (base32
7263 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7264 (build-system ant-build-system)
7265 (arguments
7266 `(#:tests? #f ; no tests included
7267 #:jar-name "eclipse-text.jar"
7268 #:phases
7269 (modify-phases %standard-phases
7270 ;; When creating a new category we must make sure that the new list
7271 ;; matches List<Position>. By default it seems to be too generic
7272 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7273 ;; Without this we get this error:
7274 ;;
7275 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7276 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7277 ;; [javac] fPositions.put(category, new ArrayList<>());
7278 ;; [javac] ^
7279 ;; [javac] required: String,List<Position>
7280 ;; [javac] found: String,ArrayList<Object>
7281 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7282 ;; to List<Position> by method invocation conversion
7283 ;; [javac] where K,V are type-variables:
7284 ;; [javac] K extends Object declared in interface Map
7285 ;; [javac] V extends Object declared in interface Map
7286 ;;
7287 ;; I don't know if this is a good fix. I suspect it is not, but it
7288 ;; seems to work.
7289 (add-after 'unpack 'fix-compilation-error
7290 (lambda _
7291 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7292 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7293 "Positions.put(category, new ArrayList<Position>());"))
7294 #t)))))
7295 (inputs
7296 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7297 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7298 ("java-icu4j" ,java-icu4j)))
7299 (home-page "http://www.eclipse.org/platform")
7300 (synopsis "Eclipse text library")
7301 (description "Platform Text is part of the Platform UI project and
7302 provides the basic building blocks for text and text editors within Eclipse
7303 and contributes the Eclipse default text editor.")
7304 (license license:epl1.0)))
7305
7306 (define-public java-eclipse-jdt-core
7307 (package
7308 (name "java-eclipse-jdt-core")
7309 (version "3.16.0")
7310 (source (origin
7311 (method url-fetch)
7312 (uri (string-append "https://repo1.maven.org/maven2/"
7313 "org/eclipse/jdt/org.eclipse.jdt.core/"
7314 version "/org.eclipse.jdt.core-"
7315 version "-sources.jar"))
7316 (sha256
7317 (base32
7318 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7319 (build-system ant-build-system)
7320 (arguments
7321 `(#:tests? #f ; no tests included
7322 #:jar-name "eclipse-jdt-core.jar"
7323 #:phases
7324 (modify-phases %standard-phases
7325 (add-after 'unpack 'move-sources
7326 (lambda _
7327 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7328 (for-each (lambda (file)
7329 (install-file file (string-append "../" (dirname file))))
7330 (find-files "." ".*")))
7331 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7332 #t))
7333 (add-before 'build 'copy-resources
7334 (lambda _
7335 (with-directory-excursion "src"
7336 (for-each (lambda (file)
7337 (install-file file (string-append "../build/classes/" (dirname file))))
7338 (find-files "." ".*.(props|properties|rsc)")))
7339 #t)))))
7340 (inputs
7341 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7342 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7343 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7344 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7345 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7346 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7347 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7348 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7349 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7350 ("java-eclipse-osgi" ,java-eclipse-osgi)
7351 ("java-eclipse-text" ,java-eclipse-text)))
7352 (home-page "https://www.eclipse.org/jdt")
7353 (synopsis "Java development tools core libraries")
7354 (description "This package provides the core libraries of the Eclipse Java
7355 development tools.")
7356 (license license:epl1.0)))
7357
7358 (define-public java-eclipse-jdt-compiler-apt
7359 (package
7360 (name "java-eclipse-jdt-compiler-apt")
7361 (version "1.3.400")
7362 (source (origin
7363 (method url-fetch)
7364 (uri (string-append "https://repo1.maven.org/maven2/"
7365 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7366 version "/org.eclipse.jdt.compiler.apt-"
7367 version "-sources.jar"))
7368 (sha256
7369 (base32
7370 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7371 (build-system ant-build-system)
7372 (arguments
7373 `(#:tests? #f ; no tests included
7374 #:jar-name "eclipse-jdt-compiler-apt.jar"
7375 #:jdk ,openjdk11))
7376 (inputs
7377 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7378 (home-page "https://www.eclipse.org/jdt/apt/")
7379 (synopsis "Annotation processing tool")
7380 (description "APT stands for Annotation Processing Tool. APT provides a
7381 means for generating files and compiling new Java classes based on annotations
7382 found in your source code.")
7383 (license license:epl2.0)))
7384
7385 (define-public java-javax-mail
7386 (package
7387 (name "java-javax-mail")
7388 (version "1.5.6")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (string-append "https://repo1.maven.org/maven2/"
7392 "com/sun/mail/javax.mail/"
7393 version "/javax.mail-"
7394 version "-sources.jar"))
7395 (sha256
7396 (base32
7397 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7398 (build-system ant-build-system)
7399 (arguments
7400 `(#:tests? #f ; no tests
7401 #:jar-name "javax-mail.jar"))
7402 (home-page "https://javamail.java.net")
7403 (synopsis "Reference implementation of the JavaMail API")
7404 (description
7405 "This package provides versions of the JavaMail API implementation, IMAP,
7406 SMTP, and POP3 service providers, some examples, and documentation for the
7407 JavaMail API.")
7408 ;; GPLv2 only with "classpath exception".
7409 (license license:gpl2)))
7410
7411 (define-public java-log4j-api
7412 (package
7413 (name "java-log4j-api")
7414 (version "2.4.1")
7415 (source (origin
7416 (method url-fetch)
7417 (uri (string-append "mirror://apache/logging/log4j/" version
7418 "/apache-log4j-" version "-src.tar.gz"))
7419 (sha256
7420 (base32
7421 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7422 (build-system ant-build-system)
7423 (arguments
7424 `(#:tests? #f ; tests require unpackaged software
7425 #:jar-name "log4j-api.jar"
7426 #:make-flags
7427 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7428 "/share/java"))
7429 #:phases
7430 (modify-phases %standard-phases
7431 (add-after 'unpack 'enter-dir
7432 (lambda _ (chdir "log4j-api") #t))
7433 ;; FIXME: The tests require additional software that has not been
7434 ;; packaged yet, such as
7435 ;; * org.apache.maven
7436 ;; * org.apache.felix
7437 (add-after 'enter-dir 'delete-tests
7438 (lambda _ (delete-file-recursively "src/test") #t)))))
7439 (inputs
7440 `(("java-osgi-core" ,java-osgi-core)
7441 ("java-hamcrest-core" ,java-hamcrest-core)
7442 ("java-junit" ,java-junit)))
7443 (home-page "https://logging.apache.org/log4j/2.x/")
7444 (synopsis "API module of the Log4j logging framework for Java")
7445 (description
7446 "This package provides the API module of the Log4j logging framework for
7447 Java.")
7448 (license license:asl2.0)))
7449
7450 (define-public java-log4j-core
7451 (package
7452 (inherit java-log4j-api)
7453 (name "java-log4j-core")
7454 (inputs
7455 `(("java-osgi-core" ,java-osgi-core)
7456 ("java-hamcrest-core" ,java-hamcrest-core)
7457 ("java-log4j-api" ,java-log4j-api)
7458 ("java-mail" ,java-mail)
7459 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7460 ("java-lmax-disruptor" ,java-lmax-disruptor)
7461 ("java-kafka" ,java-kafka-clients)
7462 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7463 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7464 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7465 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7466 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7467 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7468 ("java-commons-compress" ,java-commons-compress)
7469 ("java-commons-csv" ,java-commons-csv)
7470 ("java-jeromq" ,java-jeromq)
7471 ("java-junit" ,java-junit)))
7472 (native-inputs
7473 `(("hamcrest" ,java-hamcrest-all)
7474 ("java-commons-io" ,java-commons-io)
7475 ("java-commons-lang3" ,java-commons-lang3)
7476 ("slf4j" ,java-slf4j-api)))
7477 (arguments
7478 `(#:tests? #f ; tests require more dependencies
7479 #:test-dir "src/test"
7480 #:source-dir "src/main/java"
7481 #:jar-name "log4j-core.jar"
7482 #:jdk ,icedtea-8
7483 #:make-flags
7484 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7485 "/share/java"))
7486 #:phases
7487 (modify-phases %standard-phases
7488 (add-after 'unpack 'enter-dir
7489 (lambda _ (chdir "log4j-core") #t)))))
7490 (synopsis "Core component of the Log4j framework")
7491 (description "This package provides the core component of the Log4j
7492 logging framework for Java.")))
7493
7494 (define-public java-log4j-1.2-api
7495 (package
7496 (inherit java-log4j-api)
7497 (name "java-log4j-1.2-api")
7498 (arguments
7499 `(#:jar-name "java-log4j-1.2-api.jar"
7500 #:source-dir "log4j-1.2-api/src/main/java"
7501 #:jdk ,icedtea-8
7502 ;; Tests require maven-model (and other maven subprojects), which is a
7503 ;; cyclic dependency.
7504 #:tests? #f))
7505 (inputs
7506 `(("log4j-api" ,java-log4j-api)
7507 ("log4j-core" ,java-log4j-core)
7508 ("osgi-core" ,java-osgi-core)
7509 ("eclipse-osgi" ,java-eclipse-osgi)
7510 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7511
7512 (define-public java-commons-cli
7513 (package
7514 (name "java-commons-cli")
7515 (version "1.4")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (string-append "mirror://apache/commons/cli/source/"
7519 "commons-cli-" version "-src.tar.gz"))
7520 (sha256
7521 (base32
7522 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7523 (build-system ant-build-system)
7524 ;; TODO: javadoc
7525 (arguments
7526 `(#:jar-name "commons-cli.jar"
7527 #:phases
7528 (modify-phases %standard-phases
7529 (replace 'install
7530 (install-from-pom "pom.xml")))))
7531 (native-inputs
7532 `(("java-junit" ,java-junit)
7533 ("java-hamcrest-core" ,java-hamcrest-core)))
7534 (home-page "https://commons.apache.org/cli/")
7535 (synopsis "Command line arguments and options parsing library")
7536 (description "The Apache Commons CLI library provides an API for parsing
7537 command line options passed to programs. It is also able to print help
7538 messages detailing the options available for a command line tool.
7539
7540 Commons CLI supports different types of options:
7541
7542 @itemize
7543 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7544 @item GNU like long options (ie. du --human-readable --max-depth=1)
7545 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7546 @item Short options with value attached (ie. gcc -O2 foo.c)
7547 @item long options with single hyphen (ie. ant -projecthelp)
7548 @end itemize
7549
7550 This is a part of the Apache Commons Project.")
7551 (license license:asl2.0)))
7552
7553 (define-public java-commons-codec
7554 (package
7555 (name "java-commons-codec")
7556 (version "1.14")
7557 (source (origin
7558 (method url-fetch)
7559 (uri (string-append "mirror://apache/commons/codec/source/"
7560 "commons-codec-" version "-src.tar.gz"))
7561 (sha256
7562 (base32
7563 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7564 (build-system ant-build-system)
7565 (arguments
7566 `(#:jar-name "java-commons-codec.jar"
7567 #:source-dir "src/main/java"
7568 #:test-dir "src/test"
7569 #:test-exclude (list "**/*AbstractTest.java")
7570 #:phases
7571 (modify-phases %standard-phases
7572 (add-before 'build 'copy-resources
7573 (lambda _
7574 (copy-recursively "src/main/resources"
7575 "build/classes")
7576 #t))
7577 (add-before 'check 'copy-test-resources
7578 (lambda _
7579 (copy-recursively "src/test/resources"
7580 "build/test-classes")
7581 #t))
7582 (replace 'install (install-from-pom "pom.xml")))))
7583 (native-inputs
7584 `(("java-commons-lang3" ,java-commons-lang3)
7585 ("java-junit" ,java-junit)))
7586 (propagated-inputs
7587 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7588 (home-page "https://commons.apache.org/codec/")
7589 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7590 (description "The codec package contains simple encoder and decoders for
7591 various formats such as Base64 and Hexadecimal. In addition to these widely
7592 used encoders and decoders, the codec package also maintains a collection of
7593 phonetic encoding utilities.
7594
7595 This is a part of the Apache Commons Project.")
7596 (license license:asl2.0)))
7597
7598 (define-public java-commons-daemon
7599 (package
7600 (name "java-commons-daemon")
7601 (version "1.1.0")
7602 (source (origin
7603 (method url-fetch)
7604 (uri (string-append "mirror://apache/commons/daemon/source/"
7605 "commons-daemon-" version "-src.tar.gz"))
7606 (sha256
7607 (base32
7608 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7609 (build-system ant-build-system)
7610 (arguments
7611 `(#:test-target "test"
7612 #:phases
7613 (modify-phases %standard-phases
7614 (add-after 'build 'build-javadoc ant-build-javadoc)
7615 (replace 'install (install-jars "dist"))
7616 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7617 (native-inputs
7618 `(("java-junit" ,java-junit)))
7619 (home-page "https://commons.apache.org/daemon/")
7620 (synopsis "Library to launch Java applications as daemons")
7621 (description "The Daemon package from Apache Commons can be used to
7622 implement Java applications which can be launched as daemons. For example the
7623 program will be notified about a shutdown so that it can perform cleanup tasks
7624 before its process of execution is destroyed by the operation system.
7625
7626 This package contains the Java library. You will also need the actual binary
7627 for your architecture which is provided by the jsvc package.
7628
7629 This is a part of the Apache Commons Project.")
7630 (license license:asl2.0)))
7631
7632 (define-public java-javaewah
7633 (package
7634 (name "java-javaewah")
7635 (version "1.1.6")
7636 (source (origin
7637 (method git-fetch)
7638 (uri (git-reference
7639 (url "https://github.com/lemire/javaewah/")
7640 (commit (string-append "JavaEWAH-" version))))
7641 (file-name (git-file-name name version))
7642 (sha256
7643 (base32
7644 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7645 (build-system ant-build-system)
7646 (arguments `(#:jar-name "javaewah.jar"))
7647 (inputs
7648 `(("java-junit" ,java-junit)
7649 ("java-hamcrest-core" ,java-hamcrest-core)))
7650 (home-page "https://github.com/lemire/javaewah")
7651 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7652 (description "This is a word-aligned compressed variant of the Java
7653 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7654 compression scheme. It can be used to implement bitmap indexes.
7655
7656 The goal of word-aligned compression is not to achieve the best compression,
7657 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7658 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7659 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7660 @code{BitSet} class by Sun).")
7661 ;; GPL2.0 derivates are explicitly allowed.
7662 (license license:asl2.0)))
7663
7664 (define-public java-slf4j-api
7665 (package
7666 (name "java-slf4j-api")
7667 (version "1.7.25")
7668 (source (origin
7669 (method url-fetch)
7670 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7671 version ".tar.gz"))
7672 (sha256
7673 (base32
7674 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7675 (modules '((guix build utils)))
7676 ;; Delete bundled jars.
7677 (snippet
7678 '(begin
7679 (for-each delete-file (find-files "." "\\.jar$"))
7680 #t))))
7681 (build-system ant-build-system)
7682 (arguments
7683 `(#:jar-name "slf4j-api.jar"
7684 #:source-dir "slf4j-api/src/main"
7685 #:test-dir "slf4j-api/src/test"
7686 #:phases
7687 (modify-phases %standard-phases
7688 (add-after 'build 'regenerate-jar
7689 (lambda _
7690 ;; pom.xml ignores these files in the jar creation process. If we don't,
7691 ;; we get the error "This code should have never made it into slf4j-api.jar"
7692 (delete-file-recursively "build/classes/org/slf4j/impl")
7693 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7694 "build/classes" ".")))
7695 (add-before 'check 'dont-test-abstract-classes
7696 (lambda _
7697 ;; abstract classes are not meant to be run with junit
7698 (substitute* "build.xml"
7699 (("<include name=\"\\*\\*/\\*Test.java\" />")
7700 (string-append "<include name=\"**/*Test.java\" />"
7701 "<exclude name=\"**/MultithreadedInitializationTest"
7702 ".java\" />")))
7703 #t))
7704 (replace 'install
7705 (install-from-pom "slf4j-api/pom.xml")))))
7706 (propagated-inputs
7707 `(("java-slf4j-parent" ,java-slf4j-parent)))
7708 (native-inputs
7709 `(("java-junit" ,java-junit)
7710 ("java-hamcrest-core" ,java-hamcrest-core)))
7711 (home-page "https://www.slf4j.org/")
7712 (synopsis "Simple logging facade for Java")
7713 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7714 simple facade or abstraction for various logging
7715 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7716 allowing the end user to plug in the desired logging framework at deployment
7717 time.")
7718 (license license:expat)))
7719
7720 (define java-slf4j-parent
7721 (package
7722 (inherit java-slf4j-api)
7723 (name "java-slf4j-parent")
7724 (native-inputs `())
7725 (propagated-inputs '())
7726 (arguments
7727 `(#:tests? #f
7728 #:phases
7729 (modify-phases %standard-phases
7730 (delete 'build)
7731 (delete 'configure)
7732 (replace 'install
7733 (install-pom-file "pom.xml")))))))
7734
7735 (define-public java-slf4j-simple
7736 (package
7737 (name "java-slf4j-simple")
7738 (version "1.7.25")
7739 (source (package-source java-slf4j-api))
7740 (build-system ant-build-system)
7741 (arguments
7742 `(#:jar-name "slf4j-simple.jar"
7743 #:source-dir "slf4j-simple/src/main"
7744 #:test-dir "slf4j-simple/src/test"
7745 #:phases
7746 (modify-phases %standard-phases
7747 ;; The tests need some test classes from slf4j-api
7748 (add-before 'check 'build-slf4j-api-test-helpers
7749 (lambda _
7750 ;; Add current dir to CLASSPATH ...
7751 (setenv "CLASSPATH"
7752 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7753 ;; ... and build test helper classes here:
7754 (apply invoke
7755 `("javac" "-d" "."
7756 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7757 (replace 'install
7758 (install-from-pom "slf4j-simple/pom.xml")))))
7759 (propagated-inputs
7760 `(("java-slf4j-api" ,java-slf4j-api)))
7761 (native-inputs
7762 `(("java-junit" ,java-junit)
7763 ("java-hamcrest-core" ,java-hamcrest-core)))
7764 (home-page "https://www.slf4j.org/")
7765 (synopsis "Simple implementation of simple logging facade for Java")
7766 (description "SLF4J binding for the Simple implementation, which outputs
7767 all events to System.err. Only messages of level INFO and higher are
7768 printed.")
7769 (license license:expat)))
7770
7771 (define-public antlr2
7772 (package
7773 (name "antlr2")
7774 (version "2.7.7")
7775 (source (origin
7776 (method url-fetch)
7777 (uri (string-append "https://www.antlr2.org/download/antlr-"
7778 version ".tar.gz"))
7779 (sha256
7780 (base32
7781 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7782 (modules '((guix build utils)))
7783 (snippet
7784 '(begin
7785 (delete-file "antlr.jar")
7786 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7787 (("#include <map>")
7788 (string-append
7789 "#include <map>\n"
7790 "#define EOF (-1)\n"
7791 "#include <strings.h>")))
7792 (substitute* "configure"
7793 (("/bin/sh") "sh"))
7794 #t))))
7795 (build-system gnu-build-system)
7796 (arguments
7797 `(#:tests? #f ; no test target
7798 #:imported-modules ((guix build ant-build-system)
7799 (guix build syscalls)
7800 ,@%gnu-build-system-modules)
7801 #:modules (((guix build ant-build-system) #:prefix ant:)
7802 (guix build gnu-build-system)
7803 (guix build utils))
7804 #:phases
7805 (modify-phases %standard-phases
7806 (add-after 'install 'strip-jar-timestamps
7807 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7808 (add-before 'configure 'fix-timestamp
7809 (lambda _
7810 (substitute* "configure"
7811 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7812 #t))
7813 (add-after 'configure 'fix-bin-ls
7814 (lambda _
7815 (substitute* (find-files "." "Makefile")
7816 (("/bin/ls") "ls"))
7817 #t)))))
7818 (native-inputs
7819 `(("which" ,which)
7820 ("zip" ,zip)
7821 ("java" ,icedtea "jdk")))
7822 (inputs
7823 `(("java" ,icedtea)))
7824 (home-page "https://www.antlr2.org")
7825 (synopsis "Framework for constructing recognizers, compilers, and translators")
7826 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7827 is a language tool that provides a framework for constructing recognizers,
7828 compilers, and translators from grammatical descriptions containing Java, C#,
7829 C++, or Python actions. ANTLR provides excellent support for tree construction,
7830 tree walking, and translation.")
7831 (license license:public-domain)))
7832
7833 (define-public java-stringtemplate-3
7834 (package
7835 (name "java-stringtemplate")
7836 (version "3.2.1")
7837 (source (origin
7838 (method url-fetch)
7839 (uri (string-append "https://github.com/antlr/website-st4/raw/"
7840 "gh-pages/download/stringtemplate-"
7841 version ".tar.gz"))
7842 (sha256
7843 (base32
7844 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
7845 (build-system ant-build-system)
7846 (arguments
7847 `(#:jar-name (string-append ,name "-" ,version ".jar")
7848 #:test-dir "test"
7849 #:modules ((guix build ant-build-system)
7850 (guix build utils)
7851 (srfi srfi-1))
7852 #:phases
7853 (modify-phases %standard-phases
7854 (add-before 'check 'fix-tests
7855 (lambda _
7856 (substitute* "build.xml"
7857 (("\\$\\{test.home\\}/java")
7858 "${test.home}/org"))
7859 #t))
7860 (add-before 'build 'generate-grammar
7861 (lambda _
7862 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
7863 (for-each (lambda (file)
7864 (format #t "~a\n" file)
7865 (invoke "antlr" file))
7866 '("template.g" "angle.bracket.template.g" "action.g"
7867 "eval.g" "group.g" "interface.g")))
7868 #t)))))
7869 (native-inputs
7870 `(("antlr" ,antlr2)
7871 ("java-junit" ,java-junit)))
7872 (home-page "https://www.stringtemplate.org")
7873 (synopsis "Template engine to generate formatted text output")
7874 (description "StringTemplate is a java template engine (with ports for C#,
7875 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
7876 or any other formatted text output. StringTemplate is particularly good at
7877 code generators, multiple site skins, and internationalization / localization.
7878 StringTemplate also powers ANTLR.")
7879 (license license:bsd-3)))
7880
7881 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
7882 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
7883 ;; files and uses antlr3 at runtime. The latest version requires a recent version
7884 ;; of antlr3 at runtime.
7885 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
7886 ;; This version of ST4 is sufficient for the latest antlr3.
7887 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
7888 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
7889 ;; against the latest ST4.
7890 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
7891 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
7892 ;; only grammar files with the antlr2 syntax.
7893 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
7894
7895 (define-public java-stringtemplate
7896 (package (inherit java-stringtemplate-3)
7897 (name "java-stringtemplate")
7898 (version "4.0.8")
7899 (source (origin
7900 (method url-fetch)
7901 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
7902 version ".tar.gz"))
7903 (file-name (string-append name "-" version ".tar.gz"))
7904 (sha256
7905 (base32
7906 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
7907 (build-system ant-build-system)
7908 (arguments
7909 `(#:jar-name (string-append ,name "-" ,version ".jar")
7910 #:tests? #f ; FIXME: tests fail for unknown reasons
7911 #:test-dir "test"
7912 #:modules ((guix build ant-build-system)
7913 (guix build utils)
7914 (srfi srfi-1))
7915 #:phases
7916 (modify-phases %standard-phases
7917 (add-before 'check 'fix-test-target
7918 (lambda _
7919 (substitute* "build.xml"
7920 (("\\$\\{test.home\\}/java") "${test.home}/")
7921 (("\\*Test.java") "Test*.java"))
7922 #t))
7923 (add-before 'build 'generate-grammar
7924 (lambda _
7925 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
7926 (for-each (lambda (file)
7927 (format #t "~a\n" file)
7928 (invoke "antlr3" file))
7929 '("STParser.g" "Group.g" "CodeGenerator.g")))
7930 #t)))))
7931 (inputs
7932 `(("antlr3" ,antlr3-bootstrap)
7933 ("antlr2" ,antlr2)
7934 ("java-stringtemplate" ,java-stringtemplate-3)
7935 ("java-junit" ,java-junit)))))
7936
7937 (define java-stringtemplate-4.0.6
7938 (package (inherit java-stringtemplate)
7939 (name "java-stringtemplate")
7940 (version "4.0.6")
7941 (source (origin
7942 (method url-fetch)
7943 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
7944 version ".tar.gz"))
7945 (file-name (string-append name "-" version ".tar.gz"))
7946 (sha256
7947 (base32
7948 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
7949 (inputs
7950 `(("antlr3" ,antlr3-3.3)
7951 ("antlr2" ,antlr2)
7952 ("java-stringtemplate" ,java-stringtemplate-3)))))
7953
7954 (define-public antlr3
7955 (package
7956 (name "antlr3")
7957 (version "3.5.2")
7958 (source (origin
7959 (method git-fetch)
7960 (uri (git-reference
7961 (url "https://github.com/antlr/antlr3")
7962 (commit version)))
7963 (file-name (git-file-name name version))
7964 (sha256
7965 (base32
7966 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
7967 (build-system ant-build-system)
7968 (arguments
7969 `(#:jar-name (string-append ,name "-" ,version ".jar")
7970 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
7971 #:tests? #f
7972 #:phases
7973 (modify-phases %standard-phases
7974 (add-after 'install 'bin-install
7975 (lambda* (#:key inputs outputs #:allow-other-keys)
7976 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
7977 (bin (string-append (assoc-ref outputs "out") "/bin")))
7978 (mkdir-p bin)
7979 (with-output-to-file (string-append bin "/antlr3")
7980 (lambda _
7981 (display
7982 (string-append "#!" (which "sh") "\n"
7983 "java -cp " jar "/" ,name "-" ,version ".jar:"
7984 (string-concatenate
7985 (find-files (assoc-ref inputs "stringtemplate")
7986 ".*\\.jar"))
7987 ":"
7988 (string-concatenate
7989 (find-files (assoc-ref inputs "stringtemplate4")
7990 ".*\\.jar"))
7991 ":"
7992 (string-concatenate
7993 (find-files (string-append
7994 (assoc-ref inputs "antlr")
7995 "/lib")
7996 ".*\\.jar"))
7997 " org.antlr.Tool $*"))))
7998 (chmod (string-append bin "/antlr3") #o755))
7999 #t))
8000 (add-before 'build 'generate-grammar
8001 (lambda _
8002 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8003 (for-each (lambda (file)
8004 (display file)
8005 (newline)
8006 (invoke "antlr3" file))
8007 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8008 "AssignTokenTypesWalker.g"
8009 "ActionTranslator.g" "TreeToNFAConverter.g"
8010 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8011 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8012 (substitute* "ANTLRParser.java"
8013 (("public Object getTree") "public GrammarAST getTree"))
8014 (substitute* "ANTLRv3Parser.java"
8015 (("public Object getTree") "public CommonTree getTree"))
8016 (chdir "../../../../../java")
8017 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8018 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8019 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8020 (substitute* "org/antlr/tool/ErrorManager.java"
8021 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8022 (chdir "../../../..")
8023 #t))
8024 (add-before 'build 'fix-build-xml
8025 (lambda _
8026 (substitute* "build.xml"
8027 (("target name=\"compile\">")
8028 "target name=\"compile\">
8029 <copy todir=\"${classes.dir}\">
8030 <fileset dir=\"tool/src/main/resources\">
8031 <include name=\"**/*.stg\"/>
8032 <include name=\"**/*.st\"/>
8033 <include name=\"**/*.sti\"/>
8034 <include name=\"**/STLexer.tokens\"/>
8035 </fileset>
8036 </copy>"))
8037 #t)))))
8038 (native-inputs
8039 `(("antlr" ,antlr2)
8040 ("antlr3" ,antlr3-bootstrap)))
8041 (inputs
8042 `(("junit" ,java-junit)
8043 ("stringtemplate" ,java-stringtemplate-3)
8044 ("stringtemplate4" ,java-stringtemplate)))
8045 (propagated-inputs
8046 `(("stringtemplate" ,java-stringtemplate-3)
8047 ("antlr" ,antlr2)
8048 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8049 (home-page "https://www.antlr3.org")
8050 (synopsis "Framework for constructing recognizers, compilers, and translators")
8051 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8052 is a language tool that provides a framework for constructing recognizers,
8053 compilers, and translators from grammatical descriptions containing Java, C#,
8054 C++, or Python actions. ANTLR provides excellent support for tree construction,
8055 tree walking, and translation.")
8056 (license license:bsd-3)))
8057
8058 (define antlr3-bootstrap
8059 (package
8060 (inherit antlr3)
8061 (name "antlr3-bootstrap")
8062 (native-inputs
8063 `(("antlr" ,antlr2)
8064 ("antlr3" ,antlr3-3.3)))
8065 (inputs
8066 `(("junit" ,java-junit)))))
8067
8068 (define-public antlr3-3.3
8069 (package
8070 (inherit antlr3)
8071 (name "antlr3")
8072 (version "3.3")
8073 (source (origin
8074 (method url-fetch)
8075 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8076 "gh-pages/download/antlr-"
8077 version ".tar.gz"))
8078 (sha256
8079 (base32
8080 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8081 (patches
8082 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8083 (arguments
8084 `(#:jar-name (string-append ,name "-" ,version ".jar")
8085 #:source-dir (string-join '("tool/src/main/java"
8086 "runtime/Java/src/main/java"
8087 "tool/src/main/antlr2"
8088 "tool/src/main/antlr3")
8089 ":")
8090 #:tests? #f ; FIXME: tests seem to require maven plugin
8091 #:modules ((guix build ant-build-system)
8092 (guix build utils)
8093 (srfi srfi-1))
8094 #:phases
8095 (modify-phases %standard-phases
8096 (add-after 'install 'bin-install
8097 (lambda* (#:key inputs outputs #:allow-other-keys)
8098 (let* ((out (assoc-ref outputs "out"))
8099 (jar (string-append out "/share/java"))
8100 (bin (string-append out "/bin")))
8101 (mkdir-p bin)
8102 (with-output-to-file (string-append bin "/antlr3")
8103 (lambda _
8104 (display
8105 (string-append
8106 "#!" (which "sh") "\n"
8107 "java -cp " jar "/antlr3-3.3.jar:"
8108 (string-join
8109 (append (find-files (assoc-ref inputs "java-stringtemplate")
8110 ".*\\.jar$")
8111 (find-files (string-append (assoc-ref inputs "antlr")
8112 "/lib")
8113 ".*\\.jar$"))
8114 ":")
8115 " org.antlr.Tool $*"))))
8116 (chmod (string-append bin "/antlr3") #o755)
8117 #t)))
8118 (add-before 'build 'generate-grammar
8119 (lambda _
8120 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8121 (("import org.antlr.grammar.v2.\\*;")
8122 "import org.antlr.grammar.v2.*;\n
8123 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8124 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8125 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8126 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8127 (for-each (lambda (file)
8128 (format #t "~a\n" file)
8129 (invoke "antlr" file))
8130 '("antlr.g" "antlr.print.g" "assign.types.g"
8131 "buildnfa.g" "codegen.g" "define.g")))
8132 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8133 (for-each (lambda (file)
8134 (format #t "~a\n" file)
8135 (invoke "antlr3" file))
8136 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8137 "ANTLRv3Tree.g")))
8138 #t))
8139 (add-before 'build 'fix-build-xml
8140 (lambda _
8141 (substitute* "build.xml"
8142 (("target name=\"compile\">")
8143 "target name=\"compile\">
8144 <copy todir=\"${classes.dir}\">
8145 <fileset dir=\"tool/src/main/resources\">
8146 <include name=\"**/*.stg\"/>
8147 <include name=\"**/*.st\"/>
8148 <include name=\"**/*.sti\"/>
8149 <include name=\"**/STLexer.tokens\"/>
8150 </fileset>
8151 </copy>"))
8152 #t)))))
8153 (native-inputs
8154 `(("antlr" ,antlr2)
8155 ("antlr3" ,antlr3-3.1)))
8156 (inputs
8157 `(("junit" ,java-junit)))
8158 (propagated-inputs
8159 `(("java-stringtemplate" ,java-stringtemplate-3)
8160 ("antlr" ,antlr2)))))
8161
8162 (define-public antlr3-3.1
8163 (package
8164 (inherit antlr3)
8165 (version "3.1")
8166 (source (origin
8167 (method url-fetch)
8168 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8169 "gh-pages/download/antlr-"
8170 version ".tar.gz"))
8171 (sha256
8172 (base32
8173 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8174 (patches
8175 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8176 (arguments
8177 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8178 #:source-dir "src:runtime/Java/src"
8179 #:tests? #f
8180 #:phases
8181 (modify-phases %standard-phases
8182 (add-after 'install 'bin-install
8183 (lambda* (#:key inputs outputs #:allow-other-keys)
8184 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8185 (bin (string-append (assoc-ref outputs "out") "/bin")))
8186 (mkdir-p bin)
8187 (with-output-to-file (string-append bin "/antlr3")
8188 (lambda _
8189 (display
8190 (string-append "#!" (which "sh") "\n"
8191 "java -cp " jar "/antlr3-3.1.jar:"
8192 (string-concatenate
8193 (find-files (assoc-ref inputs "stringtemplate")
8194 ".*\\.jar"))
8195 ":"
8196 (string-concatenate
8197 (find-files (string-append
8198 (assoc-ref inputs "antlr")
8199 "/lib")
8200 ".*\\.jar"))
8201 " org.antlr.Tool $*"))))
8202 (chmod (string-append bin "/antlr3") #o755))
8203 #t))
8204 (add-before 'build 'generate-grammar
8205 (lambda _
8206 (let ((dir "src/org/antlr/tool/"))
8207 (for-each (lambda (file)
8208 (display file)
8209 (newline)
8210 (invoke "antlr" "-o" dir (string-append dir file)))
8211 '("antlr.g" "antlr.print.g" "assign.types.g"
8212 "buildnfa.g" "define.g")))
8213 (format #t "codegen.g\n")
8214 (invoke "antlr" "-o" "src/org/antlr/codegen"
8215 "src/org/antlr/codegen/codegen.g")
8216 #t))
8217 (add-before 'build 'fix-build-xml
8218 (lambda _
8219 (substitute* "build.xml"
8220 (("target name=\"compile\">")
8221 "target name=\"compile\">
8222 <copy todir=\"${classes.dir}\">
8223 <fileset dir=\"src\">
8224 <include name=\"**/*.stg\"/>
8225 <include name=\"**/*.st\"/>
8226 <include name=\"**/*.sti\"/>
8227 <include name=\"**/STLexer.tokens\"/>
8228 </fileset>
8229 </copy>"))
8230 #t)))))
8231 (native-inputs
8232 `(("antlr" ,antlr2)))
8233 (inputs
8234 `(("junit" ,java-junit)))
8235 (propagated-inputs
8236 `(("stringtemplate" ,java-stringtemplate-3)))))
8237
8238 (define-public java-treelayout
8239 (package
8240 (name "java-treelayout")
8241 (version "1.0.3")
8242 (source (origin
8243 (method git-fetch)
8244 (uri (git-reference
8245 (url "https://github.com/abego/treelayout")
8246 (commit (string-append "v" version))))
8247 (file-name (git-file-name name version))
8248 (sha256
8249 (base32
8250 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8251 (build-system ant-build-system)
8252 (arguments
8253 `(#:jar-name (string-append ,name "-" ,version ".jar")
8254 #:source-dir "org.abego.treelayout/src/main/java"
8255 #:test-dir "org.abego.treelayout/src/test"))
8256 (inputs
8257 `(("java-junit" ,java-junit)))
8258 (native-inputs
8259 `(("java-hamcrest-core" ,java-hamcrest-core)))
8260 (home-page "http://treelayout.sourceforge.net")
8261 (synopsis "Tree Layout Algorithm in Java")
8262 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8263 not restricted to a specific output or format, but can be used for any kind of
8264 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8265 This is possible because TreeLayout separates the layout of a tree from the
8266 actual rendering.")
8267 (license license:bsd-3)))
8268
8269 (define-public java-antlr4-runtime
8270 (package
8271 (name "java-antlr4-runtime")
8272 (version "4.8")
8273 (source (origin
8274 (method git-fetch)
8275 (uri (git-reference
8276 (url "https://github.com/antlr/antlr4")
8277 (commit version)))
8278 (file-name (git-file-name name version))
8279 (sha256
8280 (base32
8281 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8282 (patches
8283 (search-patches "java-antlr4-Add-standalone-generator.patch"
8284 "java-antlr4-fix-code-too-large.java"))))
8285 (build-system ant-build-system)
8286 (arguments
8287 `(#:jar-name "java-antlr4-runtime.jar"
8288 #:source-dir "runtime/Java/src/org"
8289 #:tests? #f; tests depend on java-antlr4 itself
8290 #:phases
8291 (modify-phases %standard-phases
8292 (add-before 'build 'copy-resources
8293 (lambda _
8294 (copy-recursively "runtime/Java/src/main/dot"
8295 "build/classes")
8296 #t)))))
8297 (home-page "https://antlr.org")
8298 (synopsis "ANTLR runtime library")
8299 (description "This package contains the runtime library used with generated
8300 sources by ANTLR.")
8301 (license license:bsd-3)))
8302
8303 (define-public antlr4
8304 (package
8305 (inherit java-antlr4-runtime)
8306 (name "antlr4")
8307 (arguments
8308 `(#:jar-name "antlr4.jar"
8309 #:source-dir "tool/src"
8310 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8311 #:test-include (list "**/Test*.java")
8312 #:test-exclude (list
8313 ;; no runnable method
8314 "**/TestOutputReading.java"
8315 ;; no @Test methods
8316 "**/TestParserErrors.java"
8317 "**/TestSemPredEvalParser.java"
8318 "**/TestSets.java"
8319 "**/TestListeners.java"
8320 "**/TestParseTrees.java"
8321 "**/TestParserExec.java"
8322 "**/TestLexerErrors.java"
8323 "**/TestPerformance.java"
8324 "**/TestCompositeParsers.java"
8325 "**/TestLexerExec.java"
8326 "**/TestSemPredEvalLexer.java"
8327 "**/TestLeftRecursion.java"
8328 "**/TestFullContextParsing.java"
8329 "**/TestCompositeLexers.java"
8330 ;; Null pointer exception
8331 "**/TestCompositeGrammars.java"
8332 ;; Wrong assumption on emoji
8333 "**/TestUnicodeData.java")
8334 #:phases
8335 (modify-phases %standard-phases
8336 (add-before 'build 'fix-build.xml
8337 (lambda _
8338 ;; tests are not in a java subdirectory
8339 (substitute* "build.xml"
8340 (("\\$\\{test.home\\}/java") "${test.home}"))
8341 #t))
8342 ;; tests require to have a working antlr4 binary
8343 (delete 'check)
8344 (add-after 'bin-install 'check
8345 (lambda _
8346 (invoke "ant" "compile-tests")
8347 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8348 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8349 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8350 #t))
8351 (add-before 'check 'remove-unrelated-languages
8352 (lambda _
8353 ;; There are tests for other languages that ANTLR can generate, but
8354 ;; we don't have the infrastructure for that yet. Let's test Java
8355 ;; generation only.
8356 (for-each
8357 (lambda (language)
8358 (delete-file-recursively
8359 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8360 language)))
8361 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8362 "python3" "swift"))
8363 #t))
8364 (add-before 'check 'generate-test-parsers
8365 (lambda* (#:key outputs #:allow-other-keys)
8366 (define (run-antlr dir filename package)
8367 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8368 "-package" package (string-append dir "/" filename)
8369 "-Xlog"))
8370 (setenv "PATH" (string-append (getenv "PATH") ":"
8371 (assoc-ref outputs "out") "/bin"))
8372 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8373 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8374 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8375 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8376 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8377 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8378 #t))
8379 (add-before 'check 'remove-graphemes
8380 (lambda _
8381 ;; When running antlr on grahemes.g4, we get a runtime exception:
8382 ;; set is empty. So delete the file that depends on it.
8383 (delete-file
8384 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8385 #t))
8386 (add-after 'install 'bin-install
8387 (lambda* (#:key inputs outputs #:allow-other-keys)
8388 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8389 (bin (string-append (assoc-ref outputs "out") "/bin")))
8390 (mkdir-p bin)
8391 (with-output-to-file (string-append bin "/antlr4")
8392 (lambda _
8393 (display
8394 (string-append "#!" (which "sh") "\n"
8395 "java -cp " jar "/antlr4.jar:"
8396 (string-join
8397 (apply
8398 append
8399 (map
8400 (lambda (input)
8401 (find-files (assoc-ref inputs input)
8402 ".*\\.jar"))
8403 '("antlr3" "java-stringtemplate"
8404 "java-antlr4-runtime" "java-treelayout"
8405 "java-jsonp-api" "java-icu4j")))
8406 ":")
8407 " org.antlr.v4.Tool $*"))))
8408 (chmod (string-append bin "/antlr4") #o755)
8409 #t)))
8410 (add-before 'build 'copy-resources
8411 (lambda _
8412 (copy-recursively "tool/resources/" "build/classes")
8413 #t))
8414 (add-before 'build 'generate-unicode
8415 (lambda _
8416 ;; First: build the generator
8417 (invoke "javac" "-cp" (getenv "CLASSPATH")
8418 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8419 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8420 ;; Then use it
8421 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8422 ":tool/src:runtime/Java")
8423 "org.antlr.v4.unicode.UnicodeRenderer"
8424 "tool/resources/org/antlr/v4/tool/templates"
8425 "unicodedata"
8426 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8427 ;; It seems there is a bug with our ST4
8428 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8429 (("\\\\>") ">"))
8430 ;; Remove the additional file
8431 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8432 #t))
8433 (add-before 'build 'generate-grammar
8434 (lambda* (#:key inputs #:allow-other-keys)
8435 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8436 (for-each (lambda (file)
8437 (display file)
8438 (newline)
8439 (invoke "antlr3" file))
8440 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8441 "GrammarTreeVisitor.g" "ATNBuilder.g"
8442 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8443 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8444 (install-file "../parse/ANTLRParser.tokens" ".")
8445 (display "SourceGenTriggers.g\n")
8446 (invoke "antlr3" "SourceGenTriggers.g"))
8447 #t)))))
8448 (inputs
8449 `(("antlr3" ,antlr3)
8450 ("java-antlr4-runtime" ,java-antlr4-runtime)
8451 ("java-icu4j" ,java-icu4j)
8452 ("java-jsonp-api" ,java-jsonp-api)
8453 ("java-stringtemplate" ,java-stringtemplate)
8454 ("java-treelayout" ,java-treelayout)))
8455 (native-inputs
8456 `(("java-junit" ,java-junit)))
8457 (synopsis "Parser and lexer generator in Java")
8458 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8459 parser generator for reading, processing, executing, or translating structured
8460 text or binary files. It's widely used to build languages, tools, and
8461 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8462 parse trees.")))
8463
8464 (define-public java-antlr4-runtime-4.1
8465 (package
8466 (inherit java-antlr4-runtime)
8467 (version "4.1")
8468 (source (origin
8469 (method git-fetch)
8470 (uri (git-reference
8471 (url "https://github.com/antlr/antlr4")
8472 (commit version)))
8473 (file-name (git-file-name "antlr4" version))
8474 (sha256
8475 (base32
8476 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8477 (arguments
8478 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8479 ((#:phases phases)
8480 `(modify-phases ,phases
8481 (add-before 'configure 'chmod
8482 (lambda _
8483 (chmod "build.xml" #o644)
8484 #t))))))
8485 (inputs
8486 `(("java-treelayout" ,java-treelayout)))))
8487
8488 (define-public antlr4-4.1
8489 (package
8490 (inherit antlr4)
8491 (version (package-version java-antlr4-runtime-4.1))
8492 (source (package-source java-antlr4-runtime-4.1))
8493 (arguments
8494 (substitute-keyword-arguments (package-arguments antlr4)
8495 ((#:test-dir _)
8496 "tool/test")
8497 ((#:test-exclude excludes)
8498 `(list "**/TestParseErrors.java"
8499 "**/TestTopologicalSort.java"
8500 ,@excludes))
8501 ((#:phases phases)
8502 `(modify-phases ,phases
8503 (delete 'generate-unicode)
8504 (replace 'check
8505 (lambda _
8506 (invoke "ant" "check")
8507 #t))
8508 (add-before 'configure 'chmod
8509 (lambda _
8510 (chmod "build.xml" #o644)
8511 #t))
8512 (delete 'remove-graphemes)
8513 (delete 'remove-unrelated-languages)
8514 (delete 'generate-test-parsers)))))
8515 (inputs
8516 (alist-replace
8517 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8518 (package-inputs antlr4)))))
8519
8520 (define-public java-commons-cli-1.2
8521 ;; This is a bootstrap dependency for Maven2.
8522 (package
8523 (inherit java-commons-cli)
8524 (version "1.2")
8525 (source (origin
8526 (method url-fetch)
8527 (uri (string-append "mirror://apache/commons/cli/source/"
8528 "commons-cli-" version "-src.tar.gz"))
8529 (sha256
8530 (base32
8531 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8532 (arguments
8533 `(#:jar-name "commons-cli.jar"
8534 #:phases
8535 (modify-phases %standard-phases
8536 (add-before 'check 'fix-build-xml
8537 (lambda* (#:key inputs #:allow-other-keys)
8538 (substitute* "build.xml"
8539 (("dir=\"\\$\\{test.home\\}/java\"")
8540 "dir=\"${test.home}\""))
8541 #t)))))
8542 (native-inputs
8543 `(("java-junit" ,java-junit)))))
8544
8545 (define-public java-microemulator-cldc
8546 (package
8547 (name "java-microemulator-cldc")
8548 (version "2.0.4")
8549 (source (origin
8550 (method url-fetch)
8551 (uri (string-append "https://github.com/barteo/microemu/archive/"
8552 "microemulator_"
8553 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8554 version)
8555 ".tar.gz"))
8556 (file-name (string-append name "-" version ".tar.gz"))
8557 (sha256
8558 (base32
8559 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8560 (build-system ant-build-system)
8561 (arguments
8562 `(#:jar-name "microemulator-cldc.jar"
8563 #:source-dir "microemu-cldc/src/main/java"
8564 #:tests? #f)); Requires even older software
8565 (home-page "https://github.com/barteo/microemu")
8566 (synopsis "J2ME CLDC emulator")
8567 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8568 Emulator. It demonstrates MIDlet based applications in web browser
8569 applet and can be run as a standalone java application.")
8570 (license (list license:asl2.0
8571 ;; or altenatively:
8572 license:lgpl2.1+))))
8573
8574 (define-public java-datanucleus-javax-persistence
8575 (package
8576 (name "java-datanucleus-javax-persistence")
8577 (version "2.2.0")
8578 (source (origin
8579 (method url-fetch)
8580 (uri (string-append "https://github.com/datanucleus/"
8581 "javax.persistence/archive/javax.persistence-"
8582 version "-release.tar.gz"))
8583 (sha256
8584 (base32
8585 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8586 (build-system ant-build-system)
8587 (arguments
8588 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8589 #:jdk ,icedtea-8
8590 #:source-dir "src/main/java"
8591 #:tests? #f)); no tests
8592 (home-page "https://github.com/datanucleus/javax.persistence")
8593 (synopsis "JPA API")
8594 (description "This package contains a clean definition of JPA API intended
8595 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8596 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8597 used to generate this API.")
8598 (license (list license:edl1.0 license:epl1.0))))
8599
8600 (define-public java-osgi-cmpn
8601 (package
8602 (name "java-osgi-cmpn")
8603 (version "6.0.0")
8604 (source (origin
8605 (method url-fetch)
8606 (uri (string-append "https://repo1.maven.org/maven2/"
8607 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8608 version "-sources.jar"))
8609 (sha256
8610 (base32
8611 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8612 (build-system ant-build-system)
8613 (arguments
8614 `(#:jar-name "osgi-cmpn.jar"
8615 #:tests? #f)); no tests
8616 (inputs
8617 `(("annotation" ,java-osgi-annotation)
8618 ("core" ,java-osgi-core)
8619 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8620 ("microemulator" ,java-microemulator-cldc)
8621 ("servlet" ,java-classpathx-servletapi)))
8622 (home-page "https://www.osgi.org")
8623 (synopsis "Compendium specification module of OSGi framework")
8624 (description
8625 "OSGi, for Open Services Gateway initiative framework, is a module system
8626 and service platform for the Java programming language. This package contains
8627 the compendium specification module, providing interfaces and classes for use
8628 in compiling bundles.")
8629 (license license:asl2.0)))
8630
8631 (define-public java-osgi-service-component-annotations
8632 (package
8633 (name "java-osgi-service-component-annotations")
8634 (version "1.3.0")
8635 (source (origin
8636 (method url-fetch)
8637 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8638 "org.osgi.service.component.annotations/"
8639 version "/org.osgi.service.component.annotations-"
8640 version "-sources.jar"))
8641 (sha256
8642 (base32
8643 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8644 (build-system ant-build-system)
8645 (arguments
8646 `(#:jar-name "osgi-service-component-annotations.jar"
8647 #:tests? #f)); no tests
8648 (inputs
8649 `(("annotation" ,java-osgi-annotation)))
8650 (home-page "https://www.osgi.org")
8651 (synopsis "Support annotations for osgi-service-component")
8652 (description
8653 "OSGi, for Open Services Gateway initiative framework, is a module system
8654 and service platform for the Java programming language. This package contains
8655 the support annotations for osgi-service-component.")
8656 (license license:asl2.0)))
8657
8658 (define-public java-osgi-dto
8659 (package
8660 (name "java-osgi-dto")
8661 (version "1.0.0")
8662 (source (origin
8663 (method url-fetch)
8664 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8665 "org.osgi.dto/" version "/org.osgi.dto-"
8666 version "-sources.jar"))
8667 (sha256
8668 (base32
8669 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8670 (build-system ant-build-system)
8671 (arguments
8672 `(#:jar-name "osgi-dto.jar"
8673 #:tests? #f)); no tests
8674 (inputs
8675 `(("annotation" ,java-osgi-annotation)))
8676 (home-page "https://www.osgi.org")
8677 (synopsis "Data Transfer Objects")
8678 (description
8679 "OSGi, for Open Services Gateway initiative framework, is a module system
8680 and service platform for the Java programming language. This package contains
8681 the Data Transfer Objects. It is easily serializable having only public fields
8682 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8683 Map and array aggregates may also be used. The aggregates must only hold
8684 objects of the listed types or aggregates.")
8685 (license license:asl2.0)))
8686
8687 (define-public java-osgi-resource
8688 (package
8689 (name "java-osgi-resource")
8690 (version "1.0.0")
8691 (source (origin
8692 (method url-fetch)
8693 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8694 "org.osgi.resource/"
8695 version "/org.osgi.resource-"
8696 version "-sources.jar"))
8697 (sha256
8698 (base32
8699 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8700 (build-system ant-build-system)
8701 (arguments
8702 `(#:jar-name "osgi-resource.jar"
8703 #:tests? #f)); no tests
8704 (inputs
8705 `(("annotation" ,java-osgi-annotation)
8706 ("dto" ,java-osgi-dto)))
8707 (home-page "https://www.osgi.org")
8708 (synopsis "OSGI Resource")
8709 (description
8710 "OSGi, for Open Services Gateway initiative framework, is a module system
8711 and service platform for the Java programming language. This package contains
8712 the definition of common types in osgi packages.")
8713 (license license:asl2.0)))
8714
8715 (define-public java-osgi-namespace-contract
8716 (package
8717 (name "java-osgi-namespace-contract")
8718 (version "1.0.0")
8719 (source (origin
8720 (method url-fetch)
8721 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8722 "org.osgi.namespace.contract/"
8723 version "/org.osgi.namespace.contract-"
8724 version "-sources.jar"))
8725 (sha256
8726 (base32
8727 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
8728 (build-system ant-build-system)
8729 (inputs
8730 `(("resource" ,java-osgi-resource)
8731 ("annotation" ,java-osgi-annotation)))
8732 (arguments
8733 `(#:jar-name "osgi-namespace-contract.jar"
8734 #:tests? #f)); no tests
8735 (home-page "https://www.osgi.org")
8736 (synopsis "Contract Capability and Requirement Namespace")
8737 (description
8738 "OSGi, for Open Services Gateway initiative framework, is a module system
8739 and service platform for the Java programming language. This package contains
8740 the names for the attributes and directives for a namespace with contracts.")
8741 (license license:asl2.0)))
8742
8743 (define-public java-osgi-namespace-extender
8744 (package
8745 (name "java-osgi-namespace-extender")
8746 (version "1.0.1")
8747 (source (origin
8748 (method url-fetch)
8749 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8750 "org.osgi.namespace.extender/"
8751 version "/org.osgi.namespace.extender-"
8752 version "-sources.jar"))
8753 (sha256
8754 (base32
8755 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
8756 (build-system ant-build-system)
8757 (inputs
8758 `(("resource" ,java-osgi-resource)
8759 ("annotation" ,java-osgi-annotation)))
8760 (arguments
8761 `(#:jar-name "osgi-namespace-extendent.jar"
8762 #:tests? #f)); no tests
8763 (home-page "https://www.osgi.org")
8764 (synopsis "Extender Capability and Requirement Namespace")
8765 (description
8766 "OSGi, for Open Services Gateway initiative framework, is a module system
8767 and service platform for the Java programming language. This package contains
8768 the names for the attributes and directives for an extender namespace.")
8769 (license license:asl2.0)))
8770
8771 (define-public java-osgi-namespace-service
8772 (package
8773 (name "java-osgi-namespace-service")
8774 (version "1.0.0")
8775 (source (origin
8776 (method url-fetch)
8777 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8778 "org.osgi.namespace.service/"
8779 version "/org.osgi.namespace.service-"
8780 version "-sources.jar"))
8781 (sha256
8782 (base32
8783 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
8784 (build-system ant-build-system)
8785 (inputs
8786 `(("resource" ,java-osgi-resource)
8787 ("annotation" ,java-osgi-annotation)))
8788 (arguments
8789 `(#:jar-name "osgi-namespace-service.jar"
8790 #:tests? #f)); no tests
8791 (home-page "https://www.osgi.org")
8792 (synopsis "Service Capability and Requirement Namespace")
8793 (description
8794 "OSGi, for Open Services Gateway initiative framework, is a module system
8795 and service platform for the Java programming language. This package contains
8796 the names for the attributes and directives for a service namespace.")
8797 (license license:asl2.0)))
8798
8799 (define-public java-osgi-util-function
8800 (package
8801 (name "java-osgi-util-function")
8802 (version "1.0.0")
8803 (source (origin
8804 (method url-fetch)
8805 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8806 "org.osgi.util.function/"
8807 version "/org.osgi.util.function-"
8808 version "-sources.jar"))
8809 (sha256
8810 (base32
8811 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
8812 (build-system ant-build-system)
8813 (arguments
8814 `(#:jar-name "osgi-util-function.jar"
8815 #:tests? #f)); no tests
8816 (inputs
8817 `(("annotation" ,java-osgi-annotation)))
8818 (home-page "https://www.osgi.org")
8819 (synopsis "OSGI Util Function")
8820 (description
8821 "OSGi, for Open Services Gateway initiative framework, is a module system
8822 and service platform for the Java programming language. This package contains
8823 an interface for a function that accepts a single argument and produces a result.")
8824 (license license:asl2.0)))
8825
8826 (define-public java-osgi-util-promise
8827 (package
8828 (name "java-osgi-util-promise")
8829 (version "1.0.0")
8830 (source (origin
8831 (method url-fetch)
8832 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8833 "org.osgi.util.promise/"
8834 version "/org.osgi.util.promise-"
8835 version "-sources.jar"))
8836 (sha256
8837 (base32
8838 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
8839 (build-system ant-build-system)
8840 (arguments
8841 `(#:jar-name "osgi-util-promise.jar"
8842 #:tests? #f)); no tests
8843 (inputs
8844 `(("annotation" ,java-osgi-annotation)
8845 ("function" ,java-osgi-util-function)))
8846 (home-page "https://www.osgi.org")
8847 (synopsis "Promise of a value")
8848 (description
8849 "OSGi, for Open Services Gateway initiative framework, is a module system
8850 and service platform for the Java programming language. This package contains
8851 an interface and utilitary classes for promises. A Promise represents a future
8852 value. It handles the interactions for asynchronous processing.")
8853 (license license:asl2.0)))
8854
8855 (define-public java-osgi-service-metatype-annotations
8856 (package
8857 (name "java-osgi-service-metatype-annotations")
8858 (version "1.3.0")
8859 (source (origin
8860 (method url-fetch)
8861 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8862 "org.osgi.service.metatype.annotations/"
8863 version "/org.osgi.service.metatype.annotations-"
8864 version "-sources.jar"))
8865 (sha256
8866 (base32
8867 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
8868 (build-system ant-build-system)
8869 (arguments
8870 `(#:jar-name "osgi-service-metatype-annotations.jar"
8871 #:tests? #f)); no tests
8872 (inputs
8873 `(("annotation" ,java-osgi-annotation)))
8874 (home-page "https://www.osgi.org")
8875 (synopsis "Support annotations for metatype")
8876 (description
8877 "OSGi, for Open Services Gateway initiative framework, is a module system
8878 and service platform for the Java programming language. This package contains
8879 the support annotations for metatype.")
8880 (license license:asl2.0)))
8881
8882 (define-public java-osgi-service-repository
8883 (package
8884 (name "java-osgi-service-repository")
8885 (version "1.1.0")
8886 (source (origin
8887 (method url-fetch)
8888 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8889 "org.osgi.service.repository/"
8890 version "/org.osgi.service.repository-"
8891 version "-sources.jar"))
8892 (sha256
8893 (base32
8894 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
8895 (build-system ant-build-system)
8896 (arguments
8897 `(#:jar-name "osgi-service-repository.jar"
8898 #:tests? #f)); no tests
8899 (inputs
8900 `(("annotation" ,java-osgi-annotation)
8901 ("promise" ,java-osgi-util-promise)
8902 ("resource" ,java-osgi-resource)))
8903 (home-page "https://www.osgi.org")
8904 (synopsis "OSGI service repository")
8905 (description
8906 "OSGi, for Open Services Gateway initiative framework, is a module system
8907 and service platform for the Java programming language. This package contains
8908 a repository service that contains resources.")
8909 (license license:asl2.0)))
8910
8911 (define-public java-osgi-framework
8912 (package
8913 (name "java-osgi-framework")
8914 (version "1.8.0")
8915 (source (origin
8916 (method url-fetch)
8917 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8918 "org.osgi.framework/" version "/org.osgi.framework-"
8919 version "-sources.jar"))
8920 (sha256
8921 (base32
8922 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
8923 (build-system ant-build-system)
8924 (arguments
8925 `(#:jar-name "osgi-framework.jar"
8926 #:tests? #f)); no tests
8927 (inputs
8928 `(("annotation" ,java-osgi-annotation)
8929 ("resource" ,java-osgi-resource)
8930 ("dto" ,java-osgi-dto)))
8931 (home-page "https://www.osgi.org")
8932 (synopsis "OSGi framework")
8933 (description
8934 "OSGi, for Open Services Gateway initiative framework, is a module system
8935 and service platform for the Java programming language.")
8936 (license license:asl2.0)))
8937
8938 (define-public java-osgi-service-log
8939 (package
8940 (name "java-osgi-service-log")
8941 (version "1.3.0")
8942 (source (origin
8943 (method url-fetch)
8944 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8945 "org.osgi.service.log/"
8946 version "/org.osgi.service.log-"
8947 version "-sources.jar"))
8948 (sha256
8949 (base32
8950 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
8951 (build-system ant-build-system)
8952 (arguments
8953 `(#:jar-name "osgi-service-log.jar"
8954 #:tests? #f)); no tests
8955 (inputs
8956 `(("java-osgi-framework" ,java-osgi-framework)))
8957 (home-page "https://www.osgi.org")
8958 (synopsis "Provides methods for bundles to write messages to the log")
8959 (description
8960 "OSGi, for Open Services Gateway initiative framework, is a module system
8961 and service platform for the Java programming language. This package contains
8962 the log service.")
8963 (license license:asl2.0)))
8964
8965 (define-public java-osgi-service-jdbc
8966 (package
8967 (name "java-osgi-service-jdbc")
8968 (version "1.0.0")
8969 (source (origin
8970 (method url-fetch)
8971 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8972 "org.osgi.service.jdbc/"
8973 version "/org.osgi.service.jdbc-"
8974 version "-sources.jar"))
8975 (sha256
8976 (base32
8977 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
8978 (build-system ant-build-system)
8979 (arguments
8980 `(#:jar-name "osgi-service-jdbc.jar"
8981 #:tests? #f)); no tests
8982 (home-page "https://www.osgi.org")
8983 (synopsis "Factory for JDBC connection factories")
8984 (description
8985 "OSGi, for Open Services Gateway initiative framework, is a module system
8986 and service platform for the Java programming language. This package contains
8987 a factory for JDBC connection factories. There are 3 preferred connection
8988 factories for getting JDBC connections:
8989
8990 @itemize
8991 @item @code{javax.sql.DataSource};
8992 @item @code{javax.sql.ConnectionPoolDataSource};
8993 @item @code{javax.sql.XADataSource}.
8994 @end itemize")
8995 (license license:asl2.0)))
8996
8997 (define-public java-osgi-service-resolver
8998 (package
8999 (name "java-osgi-service-resolver")
9000 (version "1.0.1")
9001 (source (origin
9002 (method url-fetch)
9003 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9004 "org.osgi.service.resolver/"
9005 version "/org.osgi.service.resolver-"
9006 version "-sources.jar"))
9007 (sha256
9008 (base32
9009 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9010 (build-system ant-build-system)
9011 (arguments
9012 `(#:jar-name "osgi-service-resolver.jar"
9013 #:tests? #f)); no tests
9014 (inputs
9015 `(("annotation" ,java-osgi-annotation)
9016 ("resource" ,java-osgi-resource)))
9017 (home-page "https://www.osgi.org")
9018 (synopsis "OSGI Resolver service")
9019 (description
9020 "OSGi, for Open Services Gateway initiative framework, is a module system
9021 and service platform for the Java programming language. This package contains
9022 a resolver service that resolves the specified resources in the context supplied
9023 by the caller.")
9024 (license license:asl2.0)))
9025
9026 (define-public java-osgi-util-tracker
9027 (package
9028 (name "java-osgi-util-tracker")
9029 (version "1.5.1")
9030 (source (origin
9031 (method url-fetch)
9032 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9033 "org.osgi.util.tracker/"
9034 version "/org.osgi.util.tracker-"
9035 version "-sources.jar"))
9036 (sha256
9037 (base32
9038 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9039 (build-system ant-build-system)
9040 (arguments
9041 `(#:jar-name "osgi-util-tracker.jar"
9042 #:tests? #f)); no tests
9043 (inputs
9044 `(("framework" ,java-osgi-framework)
9045 ("annotation" ,java-osgi-annotation)))
9046 (home-page "https://www.osgi.org")
9047 (synopsis "Bundle tracking")
9048 (description
9049 "OSGi, for Open Services Gateway initiative framework, is a module system
9050 and service platform for the Java programming language. This package contains
9051 bundle tracking utility classes.")
9052 (license license:asl2.0)))
9053
9054 (define-public java-osgi-service-cm
9055 (package
9056 (name "java-osgi-service-cm")
9057 (version "1.5.0")
9058 (source (origin
9059 (method url-fetch)
9060 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9061 "org.osgi.service.cm/"
9062 version "/org.osgi.service.cm-"
9063 version "-sources.jar"))
9064 (sha256
9065 (base32
9066 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9067 (build-system ant-build-system)
9068 (arguments
9069 `(#:jar-name "osgi-service-cm.jar"
9070 #:tests? #f)); no tests
9071 (inputs
9072 `(("framework" ,java-osgi-framework)
9073 ("annotation" ,java-osgi-annotation)))
9074 (home-page "https://www.osgi.org")
9075 (synopsis "OSGI Configuration Management")
9076 (description
9077 "OSGi, for Open Services Gateway initiative framework, is a module system
9078 and service platform for the Java programming language. This package contains
9079 utility classes for the configuration of services.")
9080 (license license:asl2.0)))
9081
9082 (define-public java-osgi-service-packageadmin
9083 (package
9084 (name "java-osgi-service-packageadmin")
9085 (version "1.2.0")
9086 (source (origin
9087 (method url-fetch)
9088 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9089 "org.osgi.service.packageadmin/"
9090 version "/org.osgi.service.packageadmin-"
9091 version "-sources.jar"))
9092 (sha256
9093 (base32
9094 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9095 (build-system ant-build-system)
9096 (arguments
9097 `(#:jar-name "osgi-service-packageadmin.jar"
9098 #:tests? #f)); no tests
9099 (inputs
9100 `(("framework" ,java-osgi-framework)))
9101 (home-page "https://www.osgi.org")
9102 (synopsis "OSGI Package Administration")
9103 (description
9104 "OSGi, for Open Services Gateway initiative framework, is a module system
9105 and service platform for the Java programming language. This package contains
9106 the packageadmin service.")
9107 (license license:asl2.0)))
9108
9109 (define-public java-ops4j-base-lang
9110 (package
9111 (name "java-ops4j-base-lang")
9112 (version "1.5.0")
9113 (source (origin
9114 (method url-fetch)
9115 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9116 "archive/base-" version ".tar.gz"))
9117 (sha256
9118 (base32
9119 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9120 (build-system ant-build-system)
9121 (arguments
9122 `(#:jar-name "java-ops4j-base-lang.jar"
9123 #:source-dir "ops4j-base-lang/src/main/java"
9124 #:tests? #f; no tests
9125 #:phases
9126 (modify-phases %standard-phases
9127 (add-before 'build 'add-test-file
9128 (lambda _
9129 ;; That file is required by a test in ops4j-pax-exam-core-spi
9130 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9131 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9132 (lambda _
9133 (display
9134 (string-append
9135 "version=" ,version "\n"
9136 "groupId=org.ops4j.base"
9137 "artifactId=ops4j-base-lang\n"))))
9138 #t)))))
9139 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9140 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9141 (description "OPS4J stands for Open Participation Software for Java. This
9142 package contains utilities and extensions related to @code{java.lang}.")
9143 (license license:asl2.0)))
9144
9145 (define-public java-ops4j-base-monitors
9146 (package
9147 (inherit java-ops4j-base-lang)
9148 (name "java-ops4j-base-monitors")
9149 (arguments
9150 `(#:jar-name "java-ops4j-base-monitors.jar"
9151 #:source-dir "ops4j-base-monitors/src/main/java"
9152 #:tests? #f)); no tests
9153 (inputs
9154 `(("lang" ,java-ops4j-base-lang)))
9155 (description "OPS4J stands for Open Participation Software for Java. This
9156 package contains utilities and extensions related to monitoring.")))
9157
9158 (define-public java-ops4j-base-io
9159 (package
9160 (inherit java-ops4j-base-lang)
9161 (name "java-ops4j-base-io")
9162 (arguments
9163 `(#:jar-name "java-ops4j-base-io.jar"
9164 #:source-dir "ops4j-base-io/src/main/java"
9165 #:test-dir "ops4j-base-io/src/test"
9166 #:test-exclude
9167 (list "**/ListerTest.java")))
9168 (inputs
9169 `(("lang" ,java-ops4j-base-monitors)
9170 ("lang" ,java-ops4j-base-lang)))
9171 (native-inputs
9172 `(("junit" ,java-junit)
9173 ("hamcrest" ,java-hamcrest-core)))
9174 (description "OPS4J stands for Open Participation Software for Java. This
9175 package contains utilities and extensions related to handling streams and files.")))
9176
9177 (define-public java-ops4j-base-util
9178 (package
9179 (inherit java-ops4j-base-lang)
9180 (name "java-ops4j-base-util")
9181 (arguments
9182 `(#:jar-name "java-ops4j-base-util.jar"
9183 #:source-dir "ops4j-base-util/src/main/java"
9184 #:test-dir "ops4j-base-util/src/test"))
9185 (inputs
9186 `(("lang" ,java-ops4j-base-lang)))
9187 (native-inputs
9188 `(("junit" ,java-junit)))
9189 (description "OPS4J stands for Open Participation Software for Java. This
9190 package contains utilities and extensions related to environment, i18n and
9191 mime types.")))
9192
9193 (define-public java-ops4j-base-util-property
9194 (package
9195 (inherit java-ops4j-base-lang)
9196 (name "java-ops4j-base-util-property")
9197 (arguments
9198 `(#:jar-name "java-ops4j-base-util-property.jar"
9199 #:source-dir "ops4j-base-util-property/src/main/java"
9200 #:tests? #f)); no tests
9201 (inputs
9202 `(("lang" ,java-ops4j-base-lang)
9203 ("util" ,java-ops4j-base-util)))
9204 (description "OPS4J stands for Open Participation Software for Java. This
9205 package contains utilities and extensions related to resolving properties from
9206 different sources.")))
9207
9208 (define-public java-ops4j-base-store
9209 (package
9210 (inherit java-ops4j-base-lang)
9211 (name "java-ops4j-base-store")
9212 (arguments
9213 `(#:jar-name "java-ops4j-base-store.jar"
9214 #:source-dir "ops4j-base-store/src/main/java"
9215 #:tests? #f)); no tests
9216 (inputs
9217 `(("lang" ,java-ops4j-base-lang)
9218 ("slf4j" ,java-slf4j-api)
9219 ("io" ,java-ops4j-base-io)))
9220 (description "OPS4J stands for Open Participation Software for Java. This
9221 package contains utilities for storing and retrieving data from an
9222 @code{InputStream}.")))
9223
9224 (define-public java-ops4j-base-spi
9225 (package
9226 (inherit java-ops4j-base-lang)
9227 (name "java-ops4j-base-spi")
9228 (arguments
9229 `(#:jar-name "java-ops4j-base-spi.jar"
9230 #:source-dir "ops4j-base-spi/src/main/java"
9231 #:test-dir "ops4j-base-spi/src/test"))
9232 (native-inputs
9233 `(("junit" ,java-junit)
9234 ("hamcrest" ,java-hamcrest-core)))
9235 (description "OPS4J stands for Open Participation Software for Java. This
9236 package contains utilities for obtaining services via the Java SE 6
9237 @code{ServiceLoader}.")))
9238
9239 (define-public java-aqute-bnd-annotation
9240 (package
9241 (name "java-aqute-bnd-annotation")
9242 (version "3.5.0")
9243 (source (origin
9244 (method url-fetch)
9245 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9246 version ".REL.tar.gz"))
9247 (file-name (string-append name "-" version ".tar.gz"))
9248 (sha256
9249 (base32
9250 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9251 (build-system ant-build-system)
9252 (arguments
9253 `(#:jar-name "java-aqute-bnd-annotation.jar"
9254 #:source-dir "biz.aQute.bnd.annotation/src"
9255 #:tests? #f)); empty test dir
9256 (home-page "https://bnd.bndtools.org/")
9257 (synopsis "Tools for OSGi")
9258 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9259 headers based on analyzing the class code, it verifies the project settings,
9260 it manages project dependencies, gives diffs jars, and much more.")
9261 (license license:asl2.0)))
9262
9263 (define-public java-aqute-libg
9264 (package
9265 (inherit java-aqute-bnd-annotation)
9266 (name "java-aqute-libg")
9267 (arguments
9268 `(#:jar-name "java-aqute-libg.jar"
9269 ;; The build fails when source/target more recent than 1.7. This
9270 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9271 ;;
9272 ;; It is closed as won't fix. There is no way to change the source
9273 ;; so that it works on 1.8, and still works on 1.6, the upstream
9274 ;; target. It work fine on 1.7, so we use 1.7.
9275 #:make-flags (list "-Dant.build.javac.source=1.7"
9276 "-Dant.build.javac.target=1.7")
9277 #:phases
9278 (modify-phases %standard-phases
9279 (add-before 'configure 'chdir
9280 ;; Change to aQute.libg directory, so that the relative
9281 ;; paths in the tests aren't broken.
9282 (lambda _
9283 (chdir "aQute.libg")
9284 #t))
9285 (add-before 'check 'create-test-directory
9286 ;; Copy the test directory to test/java, since that's where
9287 ;; ant-build-system's default project in build.xml expects to find
9288 ;; the test classes. Leave a copy in the original place to not
9289 ;; break paths in tests.
9290 (lambda _
9291 (mkdir "src/test")
9292 (copy-recursively "test" "src/test/java")
9293 #t)))))
9294 (inputs
9295 `(("slf4j" ,java-slf4j-api)
9296 ("osgi-annot" ,java-osgi-annotation)
9297 ("java-osgi-cmpn" ,java-osgi-cmpn)
9298 ("osgi" ,java-osgi-core)))
9299 (native-inputs
9300 `(("hamcrest" ,java-hamcrest-core)
9301 ("java-junit" ,java-junit)))))
9302
9303 (define-public java-aqute-bndlib
9304 (package
9305 (inherit java-aqute-bnd-annotation)
9306 (name "java-aqute-bndlib")
9307 (arguments
9308 `(#:jar-name "java-bndlib.jar"
9309 #:source-dir "biz.aQute.bndlib/src"
9310 #:tests? #f)); no tests
9311 (inputs
9312 `(("slf4j" ,java-slf4j-api)
9313 ("osgi-annot" ,java-osgi-annotation)
9314 ("java-aqute-libg" ,java-aqute-libg)
9315 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9316 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9317 ("java-osgi-service-repository" ,java-osgi-service-repository)
9318 ("java-osgi-service-log" ,java-osgi-service-log)
9319 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9320 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9321 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9322 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9323 ("promise" ,java-osgi-util-promise)
9324 ("osgi" ,java-osgi-core)))))
9325
9326 (define-public java-ops4j-pax-tinybundles
9327 (package
9328 (name "java-ops4j-pax-tinybundles")
9329 (version "2.1.1")
9330 (source (origin
9331 (method url-fetch)
9332 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9333 "archive/tinybundles-" version ".tar.gz"))
9334 (sha256
9335 (base32
9336 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9337 (arguments
9338 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9339 #:source-dir "src/main/java"
9340 #:test-exclude
9341 ;; Abstract base classes for other tests
9342 (list "**/BndTest.java" "**/CoreTest.java")
9343 #:phases
9344 (modify-phases %standard-phases
9345 (add-before 'check 'fix-version
9346 (lambda _
9347 ;; This test has a reference to an old version of bndlib we are not
9348 ;; packaging. It uses the version referenced in pom.xml. We replace
9349 ;; it with our own version.
9350 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9351 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9352 ,(package-version java-aqute-bndlib)))
9353 #t)))))
9354 (inputs
9355 `(("lang" ,java-ops4j-base-lang)
9356 ("io" ,java-ops4j-base-io)
9357 ("store" ,java-ops4j-base-store)
9358 ("slf4j" ,java-slf4j-api)
9359 ("libg" ,java-aqute-libg)
9360 ("bndlib" ,java-aqute-bndlib)))
9361 (native-inputs
9362 `(("junit" ,java-junit)
9363 ("hamcrest" ,java-hamcrest-core)
9364 ("log4j" ,java-log4j-api)
9365 ("bndannotation" ,java-aqute-bnd-annotation)
9366 ("framework" ,java-osgi-framework)))
9367 (build-system ant-build-system)
9368 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9369 (synopsis "Java APIs to create OSGi related artifacts")
9370 (description "Tinybundles is all about creating OSGi related artifacts like
9371 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9372 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9373 other hand, this library can be a foundation of real end user tools that need
9374 to create those artifacts.")
9375 (license license:asl2.0)))
9376
9377 (define-public java-ops4j-pax-exam-core
9378 (package
9379 (name "java-ops4j-pax-exam-core")
9380 (version "4.11.0")
9381 (source (origin
9382 (method url-fetch)
9383 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9384 "archive/exam-reactor-" version ".tar.gz"))
9385 (sha256
9386 (base32
9387 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9388 (arguments
9389 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9390 #:source-dir "core/pax-exam/src/main/java"
9391 #:test-dir "core/pax-exam/src/test"))
9392 (inputs
9393 `(("slf4j" ,java-slf4j-api)
9394 ("lang" ,java-ops4j-base-lang)
9395 ("io" ,java-ops4j-base-io)
9396 ("util-property" ,java-ops4j-base-util-property)
9397 ("util-store" ,java-ops4j-base-store)
9398 ("java-osgi-core" ,java-osgi-core)))
9399 (native-inputs
9400 `(("junit" ,java-junit)
9401 ("hamcrest" ,java-hamcrest-core)))
9402 (build-system ant-build-system)
9403 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9404 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9405 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9406 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9407 the system under test at the same time.")
9408 (license license:asl2.0)))
9409
9410 (define-public java-ops4j-pax-exam-core-spi
9411 (package
9412 (inherit java-ops4j-pax-exam-core)
9413 (name "java-ops4j-pax-exam-core-spi")
9414 (arguments
9415 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9416 #:source-dir "src/main/java"
9417 #:test-exclude
9418 (list
9419 ;; Abstract base class, not a test
9420 "**/BaseStagedReactorTest.java"
9421 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9422 "**/WarBuilderTest.java")
9423 #:phases
9424 (modify-phases %standard-phases
9425 (add-before 'configure 'chdir
9426 (lambda _
9427 ;; Tests assume we are in this directory
9428 (chdir "core/pax-exam-spi")
9429 #t))
9430 (add-before 'check 'fix-tests
9431 (lambda _
9432 ;; One test checks that this file is present.
9433 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9434 (with-output-to-file
9435 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9436 (lambda _
9437 (display
9438 (string-append "artifactId = pax-exam-spi\n"
9439 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9440 ;; Maven puts compilation results in the target directory, while we
9441 ;; put them in the build directory.
9442 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9443 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9444 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9445 (("target") "build"))
9446 ;; One test is expected to fail, but it doesn't throw the expected exception
9447 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9448 (("AssertionError") "IllegalArgumentException"))
9449 #t)))))
9450 (inputs
9451 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9452 ("lang" ,java-ops4j-base-lang)
9453 ("monitors" ,java-ops4j-base-monitors)
9454 ("store" ,java-ops4j-base-store)
9455 ("io" ,java-ops4j-base-io)
9456 ("spi" ,java-ops4j-base-spi)
9457 ("osgi" ,java-osgi-core)
9458 ("slf4j" ,java-slf4j-api)
9459 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9460 (native-inputs
9461 `(("mockito" ,java-mockito-1)
9462 ("junit" ,java-junit)
9463 ("hamcrest" ,java-hamcrest-core)
9464 ("cglib" ,java-cglib)
9465 ("objenesis" ,java-objenesis)
9466 ("asm" ,java-asm)))))
9467
9468 (define-public java-ops4j-pax-exam-core-junit
9469 (package
9470 (inherit java-ops4j-pax-exam-core)
9471 (name "java-ops4j-pax-exam-core-junit")
9472 (arguments
9473 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9474 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9475 #:tests? #f)); no tests
9476 (inputs
9477 `(("junit" ,java-junit)
9478 ("slf4j" ,java-slf4j-api)
9479 ("core" ,java-ops4j-pax-exam-core)
9480 ("spi" ,java-ops4j-pax-exam-core-spi)))
9481 (native-inputs '())))
9482
9483 (define-public java-fasterxml-jackson-annotations
9484 (package
9485 (name "java-fasterxml-jackson-annotations")
9486 (version "2.9.4")
9487 (source (origin
9488 (method url-fetch)
9489 (uri (string-append "https://github.com/FasterXML/"
9490 "jackson-annotations/archive/"
9491 "jackson-annotations-" version ".tar.gz"))
9492 (sha256
9493 (base32
9494 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9495 (build-system ant-build-system)
9496 (arguments
9497 `(#:jar-name "jackson-annotations.jar"
9498 #:source-dir "src/main/java"
9499 #:test-dir "src/test"))
9500 (native-inputs
9501 `(("junit" ,java-junit)))
9502 (home-page "https://github.com/FasterXML/jackson-annotations")
9503 (synopsis "General purpose annotations for the Jackson Data Processor")
9504 (description "This package contains general purpose annotations for the
9505 Jackson Data Processor, used on value and handler types. The only annotations
9506 not included are ones that require dependency to the Databind package.")
9507 (license license:asl2.0)))
9508
9509 (define-public java-fasterxml-jackson-core
9510 (package
9511 (name "java-fasterxml-jackson-core")
9512 (version "2.9.4")
9513 (source (origin
9514 (method url-fetch)
9515 (uri (string-append "https://github.com/FasterXML/"
9516 "jackson-core/archive/"
9517 "jackson-core-" version ".tar.gz"))
9518 (sha256
9519 (base32
9520 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9521 (build-system ant-build-system)
9522 (arguments
9523 `(#:jar-name "jackson-core.jar"
9524 #:source-dir "src/main/java"
9525 #:test-dir "src/test"
9526 #:test-exclude
9527 (list
9528 ;; Expected failure. pom.xml excludes these
9529 "**/failing/**"
9530 ;; Base classes that have no constructor for junit
9531 "**/BaseTest.java"
9532 "**/ConcurrencyReadTest.java"
9533 "**/ManualCharAccessTest.java"
9534 "**/ManualCharAccessTest.java"
9535 "**/TrailingCommasTest.java"
9536 "**/AsyncMissingValuesInObjectTest.java"
9537 "**/AsyncMissingValuesInArrayTest.java")
9538 #:phases
9539 (modify-phases %standard-phases
9540 (add-before 'configure 'generate-PackageVersion.java
9541 (lambda _
9542 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9543 (in (string-append out ".in")))
9544 (copy-file in out)
9545 (substitute* out
9546 (("@package@") "com.fasterxml.jackson.core.json")
9547 (("@projectversion@") ,version)
9548 (("@projectgroupid@") "com.fasterxml.jackson.core")
9549 (("@projectartifactid@") "jackson-core")))
9550 #t))
9551 (add-before 'build 'copy-resources
9552 (lambda _
9553 (copy-recursively "src/main/resources"
9554 "build/classes")
9555 #t))
9556 (add-before 'check 'copy-test-resources
9557 (lambda _
9558 (copy-recursively "src/test/resources"
9559 "build/test-classes")
9560 #t)))))
9561 (native-inputs
9562 `(("junit" ,java-junit)
9563 ("hamcrest" ,java-hamcrest-core)))
9564 (home-page "https://github.com/FasterXML/jackson-core")
9565 (synopsis "")
9566 (description "")
9567 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9568
9569 (define-public java-fasterxml-jackson-databind
9570 (package
9571 (name "java-fasterxml-jackson-databind")
9572 (version "2.9.4")
9573 (source (origin
9574 (method url-fetch)
9575 (uri (string-append "https://github.com/FasterXML/"
9576 "jackson-databind/archive/"
9577 "jackson-databind-" version ".tar.gz"))
9578 (sha256
9579 (base32
9580 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9581 (build-system ant-build-system)
9582 (arguments
9583 `(#:jar-name "jackson-databind.jar"
9584 #:source-dir "src/main/java"
9585 #:tests? #f; requires javax.measures for which I can't find a free implementation
9586 #:phases
9587 (modify-phases %standard-phases
9588 (add-before 'configure 'generate-PackageVersion.java
9589 (lambda _
9590 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9591 (in (string-append out ".in")))
9592 (copy-file in out)
9593 (substitute* out
9594 (("@package@") "com.fasterxml.jackson.databind.cfg")
9595 (("@projectversion@") ,version)
9596 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9597 (("@projectartifactid@") "jackson-databind")))
9598 #t))
9599 (add-before 'build 'copy-resources
9600 (lambda _
9601 (copy-recursively "src/main/resources" "build/classes")
9602 #t)))))
9603 (inputs
9604 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9605 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9606 (home-page "https://github.com/FasterXML/jackson-databind")
9607 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9608 (description "This package contains the general-purpose data-binding
9609 functionality and tree-model for Jackson Data Processor. It builds on core
9610 streaming parser/generator package, and uses Jackson Annotations for
9611 configuration.")
9612 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9613
9614 (define-public java-fasterxml-jackson-modules-base-jaxb
9615 (package
9616 (name "java-fasterxml-jackson-modules-base-jaxb")
9617 (version "2.9.4")
9618 (source (origin
9619 (method url-fetch)
9620 (uri (string-append "https://github.com/FasterXML/"
9621 "jackson-modules-base/archive/"
9622 "jackson-modules-base-" version ".tar.gz"))
9623 (sha256
9624 (base32
9625 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9626 (build-system ant-build-system)
9627 (arguments
9628 `(#:jar-name "jackson-modules-base-jaxb.jar"
9629 #:source-dir "jaxb/src/main/java"
9630 #:test-dir "jaxb/src/test"
9631 #:test-exclude
9632 ;; Base class for tests
9633 (list "**/BaseJaxbTest.java")
9634 #:phases
9635 (modify-phases %standard-phases
9636 (add-before 'configure 'generate-PackageVersion.java
9637 (lambda _
9638 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9639 "jackson/module/jaxb/PackageVersion.java"))
9640 (in (string-append out ".in")))
9641 (copy-file in out)
9642 (substitute* out
9643 (("@package@") "com.fasterxml.jackson.module.jaxb")
9644 (("@projectversion@") ,version)
9645 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9646 (("@projectartifactid@") "jackson-module-jaxb")))
9647 #t))
9648 (add-before 'build 'copy-resources
9649 (lambda _
9650 (copy-recursively "jaxb/src/main/resources" "build/classes")
9651 #t)))))
9652 (inputs
9653 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9654 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9655 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9656 (native-inputs
9657 `(("java-junit" ,java-junit)))
9658 (home-page "https://github.com/FasterXML/jackson-modules-base")
9659 (synopsis "Jaxb annotations jackson module")
9660 (description "This package is the jaxb annotations module for jackson.")
9661 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9662
9663 (define-public java-fasterxml-jackson-modules-base-mrbean
9664 (package
9665 (name "java-fasterxml-jackson-modules-base-mrbean")
9666 (version "2.9.4")
9667 (source (origin
9668 (method url-fetch)
9669 (uri (string-append "https://github.com/FasterXML/"
9670 "jackson-modules-base/archive/"
9671 "jackson-modules-base-" version ".tar.gz"))
9672 (sha256
9673 (base32
9674 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9675 (build-system ant-build-system)
9676 (arguments
9677 `(#:jar-name "jackson-modules-base-mrbean.jar"
9678 #:source-dir "mrbean/src/main/java"
9679 #:test-dir "mrbean/src/test"
9680 #:test-exclude
9681 ;; Base class for tests
9682 (list "**/BaseTest.java")
9683 #:phases
9684 (modify-phases %standard-phases
9685 (add-before 'configure 'generate-PackageVersion.java
9686 (lambda _
9687 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9688 "jackson/module/mrbean/PackageVersion.java"))
9689 (in (string-append out ".in")))
9690 (copy-file in out)
9691 (substitute* out
9692 (("@package@") "com.fasterxml.jackson.module.mrbean")
9693 (("@projectversion@") ,version)
9694 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9695 (("@projectartifactid@") "jackson-module-mrbean")))
9696 #t)))))
9697 (inputs
9698 `(("java-asm" ,java-asm)
9699 ("java-fasterxml-jackson-annotations"
9700 ,java-fasterxml-jackson-annotations)
9701 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9702 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9703 (native-inputs
9704 `(("java-junit" ,java-junit)))
9705 (home-page "https://github.com/FasterXML/jackson-modules-base")
9706 (synopsis "POJO type materialization for Java")
9707 (description "This package implements POJO type materialization.
9708 Databinders can construct implementation classes for Java interfaces as part
9709 of deserialization.")
9710 (license license:asl2.0)))
9711
9712 (define-public java-snakeyaml
9713 (package
9714 (name "java-snakeyaml")
9715 (version "1.18")
9716 (source (origin
9717 (method url-fetch)
9718 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
9719 version ".tar.gz"))
9720 (file-name (string-append name "-" version ".tar.gz"))
9721 (sha256
9722 (base32
9723 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
9724 (build-system ant-build-system)
9725 (arguments
9726 `(#:jar-name "java-snakeyaml.jar"
9727 #:source-dir "src/main/java"
9728 ;; Tests require velocity, a cyclic dependency, and
9729 ;; java-spring-framework-context which is not packaged.
9730 #:tests? #f))
9731 (home-page "https://bitbucket.org/asomov/snakeyaml")
9732 (synopsis "YAML processor")
9733 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
9734 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9735
9736 (define-public java-fasterxml-jackson-dataformat-yaml
9737 (package
9738 (name "java-fasterxml-jackson-dataformat-yaml")
9739 (version "2.9.4")
9740 (source (origin
9741 (method url-fetch)
9742 (uri (string-append "https://github.com/FasterXML/"
9743 "jackson-dataformats-text/archive/"
9744 "jackson-dataformats-text-" version ".tar.gz"))
9745 (sha256
9746 (base32
9747 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
9748 (build-system ant-build-system)
9749 (arguments
9750 `(#:jar-name "jackson-dataformat-yaml.jar"
9751 #:source-dir "yaml/src/main/java"
9752 #:test-dir "yaml/src/test"
9753 #:test-exclude (list "**/failing/**.java")
9754 #:phases
9755 (modify-phases %standard-phases
9756 (add-before 'configure 'generate-PackageVersion.java
9757 (lambda _
9758 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
9759 (in (string-append out ".in")))
9760 (copy-file in out)
9761 (substitute* out
9762 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
9763 (("@projectversion@") ,version)
9764 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
9765 (("@projectartifactid@") "jackson-dataformat-yaml")))
9766 #t)))))
9767 (inputs
9768 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9769 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9770 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
9771 ("java-snakeyaml" ,java-snakeyaml)))
9772 (native-inputs
9773 `(("junit" ,java-junit)
9774 ("hamcrest" ,java-hamcrest-core)
9775 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
9776 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
9777 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
9778 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
9779 (synopsis "Yaml backend for Jackson")
9780 (description "Dataformat backends are used to support format alternatives
9781 to JSON, supported by default. This is done by sub-classing Jackson core
9782 abstractions.")
9783 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9784
9785 (define-public java-stax2-api
9786 (package
9787 (name "java-stax2-api")
9788 (version "4.0.0")
9789 (source (origin
9790 (method url-fetch)
9791 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
9792 "stax2-api-" version ".tar.gz"))
9793 (sha256
9794 (base32
9795 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
9796 (build-system ant-build-system)
9797 (arguments
9798 `(#:jar-name "java-stax2-api.jar"
9799 #:source-dir "src/main/java"
9800 #:tests? #f)); no tests
9801 (home-page "https://github.com/FasterXML/stax2-api")
9802 (synopsis "Stax2 API")
9803 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
9804 significant new functionalities, such as full-featured bi-direction validation
9805 interface and high-performance Typed Access API.")
9806 (license license:bsd-2)))
9807
9808 (define-public java-woodstox-core
9809 (package
9810 (name "java-woodstox-core")
9811 (version "5.0.3")
9812 (source (origin
9813 (method url-fetch)
9814 (uri (string-append "https://github.com/FasterXML/woodstox/archive/"
9815 "woodstox-core-" version ".tar.gz"))
9816 (sha256
9817 (base32
9818 "1i7pdgb8jbw6gdy5kmm0l6rz109n2ns92pqalpyp24vb8vlvdfd4"))))
9819 (build-system ant-build-system)
9820 (arguments
9821 `(#:jar-name "woodstox.jar"
9822 #:test-exclude
9823 (list "**/Base*.java" "failing/**")
9824 #:phases
9825 (modify-phases %standard-phases
9826 (add-before 'build 'remove-msv-dep
9827 (lambda _
9828 ;; we don't need osgi, and it depends on msv
9829 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
9830 ;; msv's latest release is from 2011 and we don't need it
9831 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
9832 (delete-file-recursively "src/test/java/wstxtest/osgi")
9833 (delete-file-recursively "src/test/java/wstxtest/msv")
9834 #t))
9835 (add-before 'build 'copy-resources
9836 (lambda _
9837 (copy-recursively "src/main/resources" "build/classes")
9838 #t)))))
9839 (inputs
9840 `(("stax2" ,java-stax2-api)))
9841 (native-inputs
9842 `(("junit" ,java-junit)))
9843 (home-page "https://github.com/FasterXML/woodstox")
9844 (synopsis "Stax XML API implementation")
9845 (description "Woodstox is a stax XML API implementation.")
9846 (license license:asl2.0)))
9847
9848 (define-public java-fasterxml-jackson-dataformat-xml
9849 (package
9850 (name "java-fasterxml-jackson-dataformat-xml")
9851 (version "2.9.4")
9852 (source (origin
9853 (method url-fetch)
9854 (uri (string-append "https://github.com/FasterXML/"
9855 "jackson-dataformat-xml/archive/"
9856 "jackson-dataformat-xml-" version ".tar.gz"))
9857 (sha256
9858 (base32
9859 "111fkkl90w31jbf30kgj82qdcxlw4sxppki7i198liw0ck1jcavq"))))
9860 (build-system ant-build-system)
9861 (arguments
9862 `(#:jar-name "jackson-dataformat-xml.jar"
9863 #:source-dir "src/main/java"
9864 #:test-exclude
9865 (list "**/failing/**")
9866 #:phases
9867 (modify-phases %standard-phases
9868 (add-before 'configure 'generate-PackageVersion.java
9869 (lambda _
9870 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
9871 (in (string-append out ".in")))
9872 (copy-file in out)
9873 (newline)
9874 (substitute* out
9875 (("@package@") "com.fasterxml.jackson.dataformat.xml")
9876 (("@projectversion@") ,version)
9877 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
9878 (("@projectartifactid@") "jackson-dataformat-xml")))
9879 #t))
9880 (add-before 'build 'copy-resources
9881 (lambda _
9882 (copy-recursively "src/main/resources" "build/classes")
9883 #t)))))
9884 (inputs
9885 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
9886 ("jackson-core" ,java-fasterxml-jackson-core)
9887 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
9888 ("jackson-databind" ,java-fasterxml-jackson-databind)
9889 ("stax2-api" ,java-stax2-api)
9890 ("woodstox" ,java-woodstox-core)))
9891 (native-inputs
9892 `(("junit" ,java-junit)
9893 ("hamcrest" ,java-hamcrest-core)))
9894 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
9895 (synopsis "Read and write XML")
9896 (description "This package contains Jackson extension component for reading
9897 and writing XML encoded data.
9898
9899 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
9900 approach (that is, no support is added for \"Schema-first\" approach). Support
9901 for JAXB annotations is provided by JAXB annotation module; this module
9902 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
9903 @code{JsonFactory}) as well as small number of higher level overrides needed to
9904 make data-binding work.")
9905 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9906
9907 (define-public java-hdrhistogram
9908 (package
9909 (name "java-hdrhistogram")
9910 (version "2.1.9")
9911 (source (origin
9912 (method git-fetch)
9913 (uri (git-reference
9914 (url "https://github.com/HdrHistogram/HdrHistogram")
9915 (commit (string-append "HdrHistogram-" version))))
9916 (file-name (git-file-name name version))
9917 (sha256
9918 (base32
9919 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
9920 (build-system ant-build-system)
9921 (arguments
9922 `(#:jar-name "java-hdrhistogram.jar"
9923 #:source-dir "src/main/java"
9924 #:phases
9925 (modify-phases %standard-phases
9926 (add-after 'unpack 'make-files-writable
9927 (lambda _
9928 (for-each make-file-writable (find-files "."))
9929 #t))
9930 (add-before 'configure 'set-version
9931 (lambda _
9932 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
9933 (template (string-append version-java ".template")))
9934 (copy-file template version-java)
9935 (substitute* version-java
9936 (("\\$VERSION\\$") ,version)
9937 (("\\$BUILD_TIME\\$") "0"))
9938 #t))))))
9939 (native-inputs
9940 `(("junit" ,java-junit)
9941 ("hamcrest" ,java-hamcrest-core)))
9942 (home-page "https://hdrhistogram.github.io/HdrHistogram")
9943 (synopsis "High dynamic range histogram")
9944 (description "Hdrhistogram creates histograms that support
9945 recording and analyzing sampled data value counts across a configurable integer
9946 value range with configurable value precision within the range. Value precision
9947 is expressed as the number of significant digits in the value recording, and
9948 provides control over value quantization behavior across the value range and
9949 the subsequent value resolution at any given level.")
9950 (license license:public-domain)))
9951
9952 (define-public java-cofoja
9953 (package
9954 (name "java-cofoja")
9955 (version "1.3")
9956 (source (origin
9957 (method git-fetch)
9958 (uri (git-reference
9959 (url "https://github.com/nhatminhle/cofoja")
9960 (commit (string-append "v" version))))
9961 (file-name (string-append "java-cofoja-" version "-checkout"))
9962 (sha256
9963 (base32
9964 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
9965 (build-system ant-build-system)
9966 (arguments
9967 `(#:build-target "dist"
9968 #:test-target "test"
9969 #:jdk ,icedtea-8
9970 #:make-flags
9971 (list "-Ddist.dir=dist")
9972 #:modules ((guix build ant-build-system)
9973 (guix build java-utils)
9974 (guix build utils)
9975 (srfi srfi-1)
9976 (ice-9 match))
9977 #:phases
9978 (modify-phases %standard-phases
9979 ;; The bulid system ignores the class path the ant-build-system sets
9980 ;; up and instead expects to find all dependencies in the "lib"
9981 ;; directory.
9982 (add-after 'unpack 'create-libdir
9983 (lambda* (#:key inputs #:allow-other-keys)
9984 (mkdir-p "lib")
9985 (for-each
9986 (lambda (file)
9987 (let ((target (string-append "lib/" (basename file))))
9988 (unless (file-exists? target)
9989 (symlink file target))))
9990 (append-map (match-lambda
9991 ((label . dir)
9992 (find-files dir "\\.jar$")))
9993 inputs))
9994 #t))
9995 (replace 'install (install-jars "dist")))))
9996 (inputs
9997 `(("java-asm" ,java-asm)))
9998 (native-inputs
9999 `(("java-junit" ,java-junit)))
10000 (home-page "https://github.com/nhatminhle/cofoja")
10001 (synopsis "Contracts for Java")
10002 (description "Contracts for Java, or Cofoja for short, is a contract
10003 programming framework and test tool for Java, which uses annotation processing
10004 and bytecode instrumentation to provide run-time checking. (In particular,
10005 this is not a static analysis tool.)")
10006 (license license:lgpl3+)))
10007
10008 (define-public java-aopalliance
10009 (package
10010 (name "java-aopalliance")
10011 (version "1.0")
10012 (source (origin
10013 (method git-fetch)
10014 ;; Note: this git repository is not official, but contains the
10015 ;; source code that is in the CVS repository. Downloading the
10016 ;; tarball from sourceforge is undeterministic, and the cvs download
10017 ;; fails.
10018 (uri (git-reference
10019 (url "https://github.com/hoverruan/aopalliance")
10020 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10021 (file-name (string-append name "-" version))
10022 (sha256
10023 (base32
10024 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10025 (build-system ant-build-system)
10026 (arguments
10027 `(#:jar-name "java-aopalliance.jar"
10028 #:jdk ,icedtea-8
10029 #:tests? #f; no tests
10030 #:source-dir "aopalliance/src/main"
10031 #:modules ((guix build ant-build-system)
10032 (guix build utils)
10033 (guix build maven pom)
10034 (guix build java-utils)
10035 (sxml simple))
10036 #:phases
10037 (modify-phases %standard-phases
10038 (add-before 'install 'create-pom
10039 (lambda _
10040 (with-output-to-file "pom.xml"
10041 (lambda _
10042 (sxml->xml
10043 `((project
10044 (modelVersion "4.0.0")
10045 (name "aopalliance")
10046 (groupId "aopalliance")
10047 (artifactId "aopalliance")
10048 (version "1.0"))))))
10049 #t))
10050 (replace 'install
10051 (install-from-pom "pom.xml")))))
10052 (home-page "http://aopalliance.sourceforge.net")
10053 (synopsis "Aspect-Oriented Programming")
10054 (description "The AOP Alliance project is a joint project between several
10055 software engineering people who are interested in Aspect-Oriented Programming
10056 (AOP) and Java.")
10057 (license license:public-domain)))
10058
10059 (define-public java-javax-inject
10060 (package
10061 (name "java-javax-inject")
10062 (version "1")
10063 (source (origin
10064 (method git-fetch)
10065 (uri (git-reference
10066 (url "https://github.com/javax-inject/javax-inject")
10067 (commit version)))
10068 (file-name (git-file-name name version))
10069 (sha256
10070 (base32
10071 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10072 (build-system ant-build-system)
10073 (arguments
10074 `(#:jar-name "java-javax-inject.jar"
10075 #:tests? #f; no tests
10076 #:phases
10077 (modify-phases %standard-phases
10078 (replace 'install
10079 (install-from-pom "pom.xml")))))
10080 (home-page "https://github.com/javax-inject/javax-inject")
10081 (synopsis "JSR-330: Dependency Injection for Java")
10082 (description "This package specifies a means for obtaining objects in such
10083 a way as to maximize reusability, testability and maintainability compared to
10084 traditional approaches such as constructors, factories, and service locators
10085 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10086 most nontrivial applications.
10087
10088 Many types depend on other types. For example, a @var{Stopwatch} might depend
10089 on a @var{TimeSource}. The types on which a type depends are known as its
10090 dependencies. The process of finding an instance of a dependency to use at run
10091 time is known as resolving the dependency. If no such instance can be found,
10092 the dependency is said to be unsatisfied, and the application is broken.")
10093 (license license:asl2.0)))
10094
10095 (define-public java-guice
10096 (package
10097 (name "java-guice")
10098 (version "4.1")
10099 (source (origin
10100 (method git-fetch)
10101 (uri (git-reference
10102 (url "https://github.com/google/guice")
10103 (commit version)))
10104 (file-name (git-file-name name version))
10105 (modules '((guix build utils)))
10106 (snippet
10107 `(begin
10108 (for-each delete-file (find-files "." ".*.jar")) #t))
10109 (sha256
10110 (base32
10111 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10112 (build-system ant-build-system)
10113 (arguments
10114 `(#:jar-name "java-guice.jar"
10115 #:jdk ,icedtea-8
10116 #:tests? #f; FIXME: tests are not in a java sub directory
10117 #:source-dir "core/src"
10118 #:phases
10119 (modify-phases %standard-phases
10120 (add-after 'unpack 'make-files-writable
10121 (lambda _
10122 (for-each make-file-writable (find-files "."))
10123 #t))
10124 (replace 'install
10125 (install-from-pom "core/pom.xml")))))
10126 (propagated-inputs
10127 `(("java-aopalliance" ,java-aopalliance)
10128 ("java-asm" ,java-asm)
10129 ("java-cglib" ,java-cglib)
10130 ("java-guava" ,java-guava)
10131 ("java-javax-inject" ,java-javax-inject)
10132 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10133 (home-page "https://github.com/google/guice")
10134 (synopsis "Lightweight dependency injection framework")
10135 (description "Guice is a lightweight dependency injection framework for
10136 Java 6 and above.")
10137 (license license:asl2.0)))
10138
10139 (define-public java-guice-servlet
10140 (package
10141 (inherit java-guice)
10142 (name "java-guice-servlet")
10143 (arguments
10144 `(#:jar-name "guice-servlet.jar"
10145 #:source-dir "extensions/servlet/src/"
10146 #:jdk ,icedtea-8
10147 #:tests? #f ; FIXME: not in a java subdir
10148 #:phases
10149 (modify-phases %standard-phases
10150 (add-after 'unpack 'make-files-writable
10151 (lambda _
10152 (for-each make-file-writable (find-files "."))
10153 #t)))))
10154 (inputs
10155 `(("guice" ,java-guice)
10156 ("servlet" ,java-classpathx-servletapi)
10157 ,@(package-inputs java-guice)))))
10158
10159 (define java-guice-parent-pom
10160 (package
10161 (inherit java-guice)
10162 (name "java-guice-parent-pom")
10163 (arguments
10164 `(#:tests? #f
10165 #:phases
10166 (modify-phases %standard-phases
10167 (delete 'configure)
10168 (delete 'build)
10169 (add-after 'install 'install-extensions
10170 (install-pom-file "extensions/pom.xml"))
10171 (replace 'install
10172 (install-pom-file "pom.xml")))))
10173 (propagated-inputs
10174 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10175
10176 (define java-google-parent-pom-5
10177 (package
10178 (name "java-google-parent-pom")
10179 (version "5")
10180 (source (origin
10181 (method git-fetch)
10182 (uri (git-reference
10183 (url "https://github.com/google/google-maven-parents")
10184 (commit (string-append "google-" version))))
10185 (file-name (git-file-name name version))
10186 (sha256
10187 (base32
10188 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10189 (build-system ant-build-system)
10190 (arguments
10191 `(#:tests? #f
10192 #:phases
10193 (modify-phases %standard-phases
10194 (delete 'configure)
10195 (delete 'build)
10196 (replace 'install
10197 (install-pom-file "pom.xml")))))
10198 (home-page "https://github.com/google/google-maven-parents")
10199 (synopsis "Google parent pom")
10200 (description "This package contains the Maven parent POM for other Google
10201 Java projects.")
10202 (license license:asl2.0)))
10203
10204 (define-public java-assertj
10205 (package
10206 (name "java-assertj")
10207 (version "3.8.0")
10208 (source (origin
10209 (method git-fetch)
10210 (uri (git-reference
10211 (url "https://github.com/joel-costigliola/assertj-core")
10212 (commit (string-append "assertj-core-" version))))
10213 (file-name (git-file-name name version))
10214 (sha256
10215 (base32
10216 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10217 (build-system ant-build-system)
10218 (arguments
10219 `(#:jar-name "java-assertj.jar"
10220 #:jdk ,icedtea-8
10221 #:source-dir "src/main/java"
10222 #:tests? #f)); depends on tng-junit which depends on assertj
10223 (inputs
10224 `(("cglib" ,java-cglib)
10225 ("junit" ,java-junit)
10226 ("hamcrest" ,java-hamcrest-core)))
10227 (native-inputs
10228 `(("mockito" ,java-mockito-1)))
10229 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10230 (synopsis "Fluent assertions for java")
10231 (description "AssertJ core is a Java library that provides a fluent
10232 interface for writing assertions. Its main goal is to improve test code
10233 readability and make maintenance of tests easier.")
10234 (license license:asl2.0)))
10235
10236 (define-public java-jboss-javassist
10237 (package
10238 (name "java-jboss-javassist")
10239 (version "3.21.0")
10240 (source (origin
10241 (method git-fetch)
10242 (uri (git-reference
10243 (url "https://github.com/jboss-javassist/javassist")
10244 (commit
10245 (string-append "rel_"
10246 (string-map
10247 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10248 "_ga"))))
10249 (file-name (git-file-name name version))
10250 (sha256
10251 (base32
10252 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10253 (modules '((guix build utils)))
10254 (snippet
10255 '(begin
10256 (delete-file "javassist.jar")))))
10257 (build-system ant-build-system)
10258 (arguments
10259 `(#:jar-name "java-jboss-javassist.jar"
10260 #:jdk ,icedtea-8
10261 #:source-dir "src/main"
10262 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10263 #:phases
10264 (modify-phases %standard-phases
10265 (add-after 'unpack 'make-files-writable
10266 (lambda _
10267 (for-each make-file-writable (find-files "."))
10268 #t)))))
10269 (native-inputs
10270 `(("junit" ,java-junit)))
10271 (home-page "https://github.com/jboss-javassist/javassist")
10272 (synopsis "Java bytecode engineering toolkit")
10273 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10274 manipulation simple. It is a class library for editing bytecodes in Java; it
10275 enables Java programs to define a new class at runtime and to modify a class
10276 file when the JVM loads it.")
10277 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10278
10279 (define-public java-jcommander
10280 (package
10281 (name "java-jcommander")
10282 (version "1.71")
10283 (source (origin
10284 (method git-fetch)
10285 (uri (git-reference
10286 (url "https://github.com/cbeust/jcommander")
10287 (commit version)))
10288 (file-name (git-file-name name version))
10289 (sha256
10290 (base32
10291 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10292 (build-system ant-build-system)
10293 (arguments
10294 `(#:jar-name "java-jcommander.jar"
10295 #:jdk ,icedtea-8
10296 #:tests? #f; requires testng which depends on jcommander
10297 #:source-dir "src/main/java"))
10298 (home-page "https://jcommander.org")
10299 (synopsis "Command line parameters parser")
10300 (description "JCommander is a very small Java framework that makes it
10301 trivial to parse command line parameters. Parameters are declared with
10302 annotations.")
10303 (license license:asl2.0)))
10304
10305 (define-public java-bsh
10306 (package
10307 (name "java-bsh")
10308 (version "2.0b6")
10309 (source (origin
10310 (method git-fetch)
10311 (uri (git-reference
10312 (url "https://github.com/beanshell/beanshell")
10313 (commit version)))
10314 (file-name (git-file-name name version))
10315 (sha256
10316 (base32
10317 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10318 (modules '((guix build utils)))
10319 (snippet
10320 '(begin
10321 ;; Delete bundled third-party jar archives.
10322 (for-each delete-file (find-files "." ".*.jar$"))
10323 (for-each (lambda (file) (chmod file #o644))
10324 (find-files "." "."))
10325 #t))))
10326 (build-system ant-build-system)
10327 (arguments
10328 `(#:build-target "jarall"
10329 #:test-target "junit-tests-all"
10330 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10331 #:phases
10332 (modify-phases %standard-phases
10333 (add-before 'install 'fix-pom
10334 (lambda _
10335 (substitute* "pom.xml"
10336 (("org.apache-extras.beanshell") "org.beanshell"))
10337 #t))
10338 (replace 'install
10339 (install-from-pom "pom.xml")))))
10340 (inputs
10341 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10342 ("java-commons-bsf" ,java-commons-bsf)))
10343 (native-inputs
10344 `(("java-junit" ,java-junit)
10345 ("javacc" ,javacc-3)))
10346 (home-page "http://beanshell.org/")
10347 (synopsis "Lightweight Scripting for Java")
10348 (description "BeanShell is a small, free, embeddable Java source
10349 interpreter with object scripting language features, written in Java.
10350 BeanShell dynamically executes standard Java syntax and extends it with common
10351 scripting conveniences such as loose types, commands, and method closures like
10352 those in Perl and JavaScript.")
10353 (license license:asl2.0)))
10354
10355 (define-public java-fest-util
10356 (package
10357 (name "java-fest-util")
10358 (version "1.2.5")
10359 (source (origin
10360 (method git-fetch)
10361 (uri (git-reference
10362 (url "https://github.com/alexruiz/fest-util/")
10363 (commit (string-append "fest-util-" version))))
10364 (file-name (git-file-name name version))
10365 (sha256
10366 (base32
10367 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10368 (build-system ant-build-system)
10369 (arguments
10370 `(#:jar-name "java-fest-util.jar"
10371 #:source-dir "src/main/java"))
10372 (native-inputs
10373 `(("junit" ,java-junit)
10374 ("hamcrest" ,java-hamcrest-core)))
10375 (home-page "https://github.com/alexruiz/fest-util")
10376 (synopsis "FEST common utilities")
10377 (description "Common utilities used in all FEST module.")
10378 (license license:asl2.0)))
10379
10380 (define-public java-fest-test
10381 (package
10382 (name "java-fest-test")
10383 (version "2.1.0")
10384 (source (origin
10385 (method git-fetch)
10386 (uri (git-reference
10387 (url "https://github.com/alexruiz/fest-test/")
10388 (commit (string-append "fest-test-" version))))
10389 (file-name (git-file-name name version))
10390 (sha256
10391 (base32
10392 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10393 (build-system ant-build-system)
10394 (arguments
10395 `(#:jar-name "java-fest-test.jar"
10396 #:source-dir "src/main/java"
10397 #:tests? #f)); no tests
10398 (inputs
10399 `(("junit" ,java-junit)))
10400 (home-page "https://github.com/alexruiz/fest-test")
10401 (synopsis "Common FEST testing infrastructure")
10402 (description "Fest-test contains the common FEST testing infrastructure.")
10403 (license license:asl2.0)))
10404
10405 (define-public java-fest-assert
10406 (package
10407 (name "java-fest-assert")
10408 (version "2.0M10")
10409 (source (origin
10410 (method git-fetch)
10411 (uri (git-reference
10412 (url "https://github.com/alexruiz/fest-assert-2.x/")
10413 (commit (string-append "fest-assert-core-" version))))
10414 (file-name (git-file-name name version))
10415 (sha256
10416 (base32
10417 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10418 (build-system ant-build-system)
10419 (arguments
10420 `(#:jar-name "java-fest-assert.jar"
10421 #:source-dir "src/main/java"
10422 #:test-exclude
10423 (list
10424 "**/Abstract*.java"
10425 "**/*BaseTest.java"
10426 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10427 "**/MessageFormatter_format_Test.java"
10428 "**/internal/*/*_assert*_Test.java")))
10429 (inputs
10430 `(("java-fest-util" ,java-fest-util)))
10431 (native-inputs
10432 `(("java-junit" ,java-junit)
10433 ("java-fest-test" ,java-fest-test)
10434 ("java-hamcrest-core" ,java-hamcrest-core)
10435 ("java-mockito" ,java-mockito-1)
10436 ("java-cglib" ,java-cglib)
10437 ("java-objenesis" ,java-objenesis)
10438 ("java-asm" ,java-asm)))
10439 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10440 (synopsis "FEST fluent assertions")
10441 (description "FEST-Assert provides a fluent interface for assertions.")
10442 (license license:asl2.0)))
10443
10444 (define-public java-testng
10445 (package
10446 (name "java-testng")
10447 (version "6.14.3")
10448 (source (origin
10449 (method git-fetch)
10450 (uri (git-reference
10451 (url "https://github.com/cbeust/testng")
10452 (commit version)))
10453 (file-name (string-append name "-" version "-checkout"))
10454 (sha256
10455 (base32
10456 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10457 (build-system ant-build-system)
10458 (arguments
10459 `(#:jdk ,icedtea-8; java.util.function
10460 #:jar-name "java-testng.jar"
10461 #:source-dir "src/main/java"
10462 #:phases
10463 (modify-phases %standard-phases
10464 ;; FIXME: I don't know why these tests fail
10465 (add-after 'unpack 'delete-failing-tests
10466 (lambda _
10467 (substitute* "src/test/resources/testng.xml"
10468 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10469 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10470 #t))
10471 ;; We don't have groovy
10472 (add-after 'unpack 'delete-groovy-tests
10473 (lambda _
10474 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10475 (substitute* "src/test/resources/testng.xml"
10476 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10477 #t))
10478 (add-before 'build 'copy-resources
10479 (lambda _
10480 (copy-recursively "src/main/resources" "build/classes")
10481 #t))
10482 (add-before 'check 'copy-test-resources
10483 (lambda _
10484 (copy-recursively "src/test/resources" "build/test-classes")
10485 #t))
10486 (replace 'check
10487 (lambda _
10488 (invoke "ant" "compile-tests")
10489 ;; we don't have groovy
10490 (substitute* "src/test/resources/testng.xml"
10491 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10492 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10493 ":build/classes"
10494 ":build/test-classes")
10495 "-Dtest.resources.dir=src/test/resources"
10496 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10497 (propagated-inputs
10498 `(("junit" ,java-junit)
10499 ("java-jsr305" ,java-jsr305)
10500 ("java-bsh" ,java-bsh)
10501 ("java-jcommander" ,java-jcommander)
10502 ("java-guice" ,java-guice)
10503 ("snakeyaml" ,java-snakeyaml)))
10504 (native-inputs
10505 `(("guava" ,java-guava)
10506 ("java-javax-inject" ,java-javax-inject)
10507 ("java-hamcrest" ,java-hamcrest-all)
10508 ("java-assertj" ,java-assertj)
10509 ("java-mockito" ,java-mockito-1)
10510 ("cglib" ,java-cglib)
10511 ("asm" ,java-asm)
10512 ("aopalliance" ,java-aopalliance)))
10513 (home-page "https://testng.org")
10514 (synopsis "Testing framework")
10515 (description "TestNG is a testing framework inspired from JUnit and NUnit
10516 but introducing some new functionalities that make it more powerful and easier
10517 to use.")
10518 (license license:asl2.0)))
10519
10520 (define-public java-jnacl
10521 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10522 (revision "2"))
10523 (package
10524 (name "java-jnacl")
10525 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10526 (source (origin
10527 (method git-fetch)
10528 (uri (git-reference
10529 (url "https://github.com/neilalexander/jnacl")
10530 (commit commit)))
10531 (file-name (git-file-name name version))
10532 (sha256
10533 (base32
10534 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10535 (build-system ant-build-system)
10536 (arguments
10537 `(#:jar-name "jnacl.jar"
10538 #:source-dir "src/main/java"
10539 #:jdk ,icedtea-8
10540 #:phases
10541 (modify-phases %standard-phases
10542 (add-before 'build 'fix-tests
10543 (lambda _
10544 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10545 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10546 (("assertions.Assertions") "assertions.api.Assertions"))
10547 #t))
10548 (replace 'check
10549 (lambda _
10550 (invoke "ant" "compile-tests")
10551 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10552 ":build/classes"
10553 ":build/test-classes")
10554 "org.testng.TestNG" "-testclass"
10555 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10556 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10557 ":build/classes"
10558 ":build/test-classes")
10559 "org.testng.TestNG" "-testclass"
10560 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10561 (native-inputs
10562 `(("java-testng" ,java-testng)
10563 ("java-fest-util" ,java-fest-util)
10564 ("java-fest-assert" ,java-fest-assert)))
10565 (home-page "https://github.com/neilalexander/jnacl")
10566 (synopsis "Java implementation of NaCl")
10567 (description "Pure Java implementation of the NaCl: Networking and
10568 Cryptography library.")
10569 (license license:bsd-2))))
10570
10571 (define-public java-mvel2
10572 (package
10573 (name "java-mvel2")
10574 (version "2.3.1")
10575 (source (origin
10576 (method url-fetch)
10577 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10578 version ".Final.tar.gz"))
10579 (sha256
10580 (base32
10581 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10582 (build-system ant-build-system)
10583 (arguments
10584 `(#:jar-name "mvel2.jar"
10585 #:source-dir "src/main/java"
10586 #:test-exclude
10587 (list "**/Abstract*.java"
10588 ;; Base class with no tests
10589 "**/MVELThreadTest.java")
10590 #:phases
10591 (modify-phases %standard-phases
10592 (add-after 'install 'install-bin
10593 (lambda* (#:key outputs #:allow-other-keys)
10594 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10595 (mkdir-p bin)
10596 (with-output-to-file (string-append bin "/mvel2")
10597 (lambda _
10598 (display
10599 (string-append
10600 "#!" (which "bash") "\n"
10601 "if [ \"$#\" -ne \"2\" ]; then\n"
10602 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10603 "exit\n"
10604 "fi\n"
10605 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10606 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10607 " org.mvel2.sh.Main $1"))))
10608 (chmod (string-append bin "/mvel2") #o755))
10609 #t)))))
10610 (native-inputs
10611 `(("junit" ,java-junit)
10612 ("hamcrest" ,java-hamcrest-core)))
10613 (home-page "https://github.com/mvel/mvel")
10614 (synopsis "MVFLEX Expression Language")
10615 (description "MVEL has largely been inspired by Java syntax, but has some
10616 fundamental differences aimed at making it more efficient as an expression
10617 language, such as operators that directly support collection, array and string
10618 matching, as well as regular expressions. MVEL is used to evaluate expressions
10619 written using Java syntax.
10620
10621 In addition to the expression language, MVEL serves as a templating language for
10622 configuration and string construction.")
10623 (license license:asl2.0)))
10624
10625 (define-public java-commons-jexl-2
10626 (package
10627 (name "java-commons-jexl")
10628 (version "2.1.1")
10629 (source (origin
10630 (method url-fetch)
10631 (uri (string-append "mirror://apache/commons/jexl/source/"
10632 "commons-jexl-" version "-src.tar.gz"))
10633 (sha256
10634 (base32
10635 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10636 (build-system ant-build-system)
10637 (arguments
10638 `(#:jar-name "commons-jexl-2.jar"
10639 #:jdk ,icedtea-8
10640 #:source-dir "src/main/java"
10641 #:phases
10642 (modify-phases %standard-phases
10643 (add-before 'check 'disable-broken-tests
10644 (lambda* (#:key inputs #:allow-other-keys)
10645 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10646 (substitute* "ArithmeticTest.java"
10647 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10648 (("asserter.assertExpression\\(\"imanull") "//"))
10649 ;; This test fails with "ambiguous method invocation"
10650 (delete-file "CacheTest.java")
10651 ;; This test doesn't have access to the temp directory
10652 (substitute* "ClassCreatorTest.java"
10653 (("java.io.tmpdir") "user.dir"))
10654 ;; This test fails in trying to detect whether it can run.
10655 (substitute* "ClassCreator.java"
10656 (("boolean canRun =.*") "boolean canRun = false;\n"))
10657 ;; ...and these tests depend on it.
10658 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10659 (delete-file "scripting/JexlScriptEngineTest.java"))
10660 #t))
10661 (add-before 'build 'run-javacc
10662 (lambda _
10663 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10664 (invoke "java" "jjtree" "Parser.jjt")
10665 (invoke "java" "javacc" "Parser.jj"))
10666 #t)))))
10667 (inputs
10668 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10669 (native-inputs
10670 `(("java-junit" ,java-junit)
10671 ("java-hamcrest-core" ,java-hamcrest-core)
10672 ("javacc" ,javacc-4)))
10673 (home-page "https://commons.apache.org/proper/commons-jexl/")
10674 (synopsis "Java Expression Language ")
10675 (description "JEXL is a library intended to facilitate the implementation
10676 of dynamic and scripting features in applications and frameworks written in
10677 Java. JEXL implements an Expression Language based on some extensions to the
10678 JSTL Expression Language supporting most of the constructs seen in
10679 shell-script or ECMAScript. Its goal is to expose scripting features usable
10680 by technical operatives or consultants working with enterprise platforms.")
10681 (license license:asl2.0)))
10682
10683 (define-public java-lz4
10684 (package
10685 (name "java-lz4")
10686 (version "1.4.0")
10687 (source (origin
10688 (method git-fetch)
10689 (uri (git-reference
10690 (url "https://github.com/lz4/lz4-java")
10691 (commit version)))
10692 (file-name (git-file-name name version))
10693 (sha256
10694 (base32
10695 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10696 (build-system ant-build-system)
10697 (arguments
10698 `(#:jar-name "lz4.jar"
10699 #:jdk ,icedtea-8
10700 #:source-dir "src/java:src/java-unsafe"
10701 #:tests? #f; FIXME: requires more dependencies
10702 #:phases
10703 (modify-phases %standard-phases
10704 (add-after 'unpack 'make-files-writable
10705 (lambda _
10706 (for-each make-file-writable (find-files "."))
10707 #t))
10708 (add-before 'configure 'generate-source
10709 (lambda _
10710 (with-directory-excursion "src/build/source_templates"
10711 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
10712 #t)))))
10713 (native-inputs
10714 `(("mvel" ,java-mvel2)))
10715 (home-page "https://jpountz.github.io/lz4-java")
10716 (synopsis "Compression algorithm")
10717 (description "LZ4 - Java is a Java port of the popular lz4 compression
10718 algorithms and xxHash hashing algorithm.")
10719 (license license:asl2.0)))
10720
10721 (define-public java-bouncycastle
10722 (package
10723 (name "java-bouncycastle")
10724 (version "1.60")
10725 (source (origin
10726 (method git-fetch)
10727 (uri (git-reference
10728 (url "http://git.bouncycastle.org/repositories/bc-java")
10729 ;(url "https://github.com/bcgit/bc-java")
10730 (commit (string-append "r1rv" (substring version 2 4)))))
10731 (file-name (git-file-name name version))
10732 (sha256
10733 (base32
10734 "1m921a1ac2dl797ffzg3d4j97ch308f25spb4jgsj3npfmmys5gb"))
10735 (modules '((guix build utils)))
10736 (snippet
10737 '(begin
10738 (for-each delete-file
10739 (find-files "." "\\.jar$"))
10740 #t))))
10741 (build-system ant-build-system)
10742 (arguments
10743 `(#:jdk ,icedtea-8
10744 #:tests? #f
10745 #:phases
10746 (modify-phases %standard-phases
10747 (replace 'build
10748 (lambda _
10749 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
10750 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
10751 ;; FIXME: the tests freeze.
10752 ;; (replace 'check
10753 ;; (lambda _
10754 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
10755 (replace 'install
10756 (install-jars "build/artifacts/jdk1.5/jars")))))
10757 (inputs
10758 `(("java-javax-mail" ,java-javax-mail)))
10759 (native-inputs
10760 `(("unzip" ,unzip)
10761 ("junit" ,java-junit)
10762 ("java-native-access" ,java-native-access)
10763 ("java-native-access-platform" ,java-native-access-platform)))
10764 (home-page "https://www.bouncycastle.org")
10765 (synopsis "Cryptographic library")
10766 (description "Bouncy Castle is a cryptographic library for the Java
10767 programming language.")
10768 (license license:expat)))
10769
10770 (define-public java-lmax-disruptor
10771 (package
10772 (name "java-lmax-disruptor")
10773 (version "3.3.7")
10774 (source (origin
10775 (method url-fetch)
10776 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
10777 "archive/" version ".tar.gz"))
10778 (file-name (string-append name "-" version ".tar.gz"))
10779 (sha256
10780 (base32
10781 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
10782 (build-system ant-build-system)
10783 (arguments
10784 `(#:jar-name "java-lmax-disruptor.jar"
10785 #:jdk ,icedtea-8
10786 #:tests? #f)); tests hang
10787 (inputs
10788 `(("junit" ,java-junit)
10789 ("java-hdrhistogram" ,java-hdrhistogram)
10790 ("java-jmock" ,java-jmock)
10791 ("java-jmock-legacy" ,java-jmock-legacy)
10792 ("java-jmock-junit4" ,java-jmock-junit4)
10793 ("java-hamcrest-all" ,java-hamcrest-all)))
10794 (native-inputs
10795 `(("cglib" ,java-cglib)
10796 ("objenesis" ,java-objenesis)
10797 ("asm" ,java-asm)))
10798 (home-page "https://www.lmax.com/disruptor")
10799 (synopsis "High performance inter-thread communication")
10800 (description "LMAX Disruptor is a software pattern and software component
10801 for high performance inter-thread communication that avoids the need for
10802 message queues or resource locking.")
10803 (license license:asl2.0)))
10804
10805 (define-public java-commons-bcel
10806 (package
10807 (name "java-commons-bcel")
10808 (version "6.1")
10809 (source (origin
10810 (method url-fetch)
10811 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
10812 version "-src.tar.gz"))
10813 (sha256
10814 (base32
10815 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
10816 (build-system ant-build-system)
10817 (arguments
10818 `(#:jar-name "bcel.jar"
10819 #:jdk ,icedtea-8
10820 #:source-dir "src/main/java"
10821 #:test-dir "src/test/java"
10822 ;; FIXME: Tests require the unpackaged jna.
10823 #:tests? #f))
10824 (home-page "https://commons.apache.org/proper/commons-bcel/")
10825 (synopsis "Byte code engineering library")
10826 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
10827 intended to give users a convenient way to analyze, create, and
10828 manipulate (binary) Java class files. Classes are represented by objects
10829 which contain all the symbolic information of the given class: methods, fields
10830 and byte code instructions, in particular.
10831
10832 Such objects can be read from an existing file, be transformed by a
10833 program (e.g. a class loader at run-time) and written to a file again. An
10834 even more interesting application is the creation of classes from scratch at
10835 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
10836 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
10837 of Java @code{.class} files.")
10838 (license license:asl2.0)))
10839
10840 (define-public java-xerial-core
10841 (package
10842 (name "java-xerial-core")
10843 (version "2.1")
10844 (source (origin
10845 (method url-fetch)
10846 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
10847 version ".tar.gz"))
10848 (file-name (string-append name "-" version ".tar.gz"))
10849 (sha256
10850 (base32
10851 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
10852 (build-system ant-build-system)
10853 (arguments
10854 `(#:jar-name "xerial-core.jar"
10855 #:source-dir "xerial-core/src/main/java"
10856 #:test-dir "xerial-core/src/test"
10857 #:phases
10858 (modify-phases %standard-phases
10859 (add-before 'build 'copy-resources
10860 (lambda _
10861 (copy-recursively "xerial-core/src/main/resources"
10862 "build/classes")
10863 #t)))))
10864 (native-inputs
10865 `(("junit" ,java-junit)
10866 ("hamcrest" ,java-hamcrest-core)))
10867 (home-page "https://github.com/xerial/xerial-java")
10868 (synopsis "Data management libraries for Java")
10869 (description "Xerial is a set of data management libraries for the Java
10870 programming language. The ultimate goal of the Xerial project is to manage
10871 everything as database, including class objects, text format data, data
10872 streams, etc.")
10873 (license license:asl2.0)))
10874
10875 (define-public java-powermock-reflect
10876 (package
10877 (name "java-powermock-reflect")
10878 (version "1.7.3")
10879 (source (origin
10880 (method url-fetch)
10881 (uri (string-append "https://github.com/powermock/powermock/"
10882 "archive/powermock-" version ".tar.gz"))
10883 (file-name (string-append name "-" version ".tar.gz"))
10884 (sha256
10885 (base32
10886 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
10887 (patches
10888 (search-patches "java-powermock-fix-java-files.patch"))))
10889 (build-system ant-build-system)
10890 (arguments
10891 `(#:jar-name "java-powermock-reflect.jar"
10892 #:jdk ,icedtea-8
10893 #:source-dir "powermock-reflect/src/main/java"
10894 #:test-dir "powermock-reflect/src/test"))
10895 (inputs
10896 `(("java-objenesis" ,java-objenesis)))
10897 (native-inputs
10898 `(("junit" ,java-junit)
10899 ("cglib" ,java-cglib)
10900 ("asm" ,java-asm)
10901 ("hamcrest" ,java-hamcrest-core)
10902 ("assertj" ,java-assertj)))
10903 (home-page "https://github.com/powermock/powermock")
10904 (synopsis "Mock library extension framework")
10905 (description "PowerMock is a framework that extends other mock libraries
10906 such as EasyMock with more powerful capabilities. PowerMock uses a custom
10907 classloader and bytecode manipulation to enable mocking of static methods,
10908 constructors, final classes and methods, private methods, removal of static
10909 initializers and more. By using a custom classloader no changes need to be
10910 done to the IDE or continuous integration servers which simplifies adoption.")
10911 (license license:asl2.0)))
10912
10913 (define-public java-powermock-core
10914 (package
10915 (inherit java-powermock-reflect)
10916 (name "java-powermock-core")
10917 (arguments
10918 `(#:jar-name "java-powermock-core.jar"
10919 #:source-dir "powermock-core/src/main/java"
10920 #:test-dir "powermock-core/src/test"
10921 #:tests? #f; requires powermock-api
10922 #:jdk ,icedtea-8
10923 #:phases
10924 (modify-phases %standard-phases
10925 (add-before 'build 'copy-resources
10926 (lambda _
10927 (copy-recursively "powermock-core/src/main/resources"
10928 "build/classes")
10929 #t)))))
10930 (inputs
10931 `(("reflect" ,java-powermock-reflect)
10932 ("javassist" ,java-jboss-javassist)))
10933 (native-inputs
10934 `(("junit" ,java-junit)
10935 ("assertj" ,java-assertj)
10936 ("mockito" ,java-mockito-1)))))
10937
10938 (define-public java-powermock-api-support
10939 (package
10940 (inherit java-powermock-reflect)
10941 (name "java-powermock-api-support")
10942 (build-system ant-build-system)
10943 (arguments
10944 `(#:jar-name "java-powermock-api-support.jar"
10945 #:jdk ,icedtea-8
10946 #:source-dir "powermock-api/powermock-api-support/src/main/java"
10947 #:tests? #f)); no tests
10948 (inputs
10949 `(("core" ,java-powermock-core)
10950 ("reflect" ,java-powermock-reflect)))))
10951
10952 (define-public java-powermock-modules-junit4-common
10953 (package
10954 (inherit java-powermock-reflect)
10955 (name "java-powermock-modules-junit4-common")
10956 (build-system ant-build-system)
10957 (arguments
10958 `(#:jar-name "java-powermock-modules-junit4-common.jar"
10959 #:jdk ,icedtea-8
10960 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
10961 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
10962 (inputs
10963 `(("core" ,java-powermock-core)
10964 ("easymock" ,java-easymock)
10965 ("reflect" ,java-powermock-reflect)
10966 ("hamcrest" ,java-hamcrest-core)
10967 ("cglib" ,java-cglib)))))
10968
10969 (define-public java-powermock-modules-junit4
10970 (package
10971 (inherit java-powermock-reflect)
10972 (name "java-powermock-modules-junit4")
10973 (build-system ant-build-system)
10974 (arguments
10975 `(#:jar-name "java-powermock-modules-junit4.jar"
10976 #:jdk ,icedtea-8
10977 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
10978 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
10979 #:phases
10980 (modify-phases %standard-phases
10981 (add-before 'build 'fix-junit-detection
10982 (lambda _
10983 ;; Our junit version is 4.12-SNAPSHOT
10984 (substitute* (find-files "powermock-modules/powermock-module-junit4"
10985 "PowerMockJUnit4MethodValidator.java")
10986 (("4.12") "4.12-SNAPSHOT"))
10987 #t)))))
10988 (inputs
10989 `(("core" ,java-powermock-core)
10990 ("reflect" ,java-powermock-reflect)
10991 ("common" ,java-powermock-modules-junit4-common)
10992 ("cglib" ,java-cglib)))
10993 (native-inputs
10994 `(("easymock" ,java-easymock)
10995 ("hamcrest" ,java-hamcrest-core)
10996 ("objenesis" ,java-objenesis)
10997 ("asm" ,java-asm)
10998 ("junit" ,java-junit)))))
10999
11000 (define-public java-powermock-api-easymock
11001 (package
11002 (inherit java-powermock-reflect)
11003 (name "java-powermock-api-easymock")
11004 (build-system ant-build-system)
11005 (arguments
11006 `(#:jar-name "java-powermock-api-easymock.jar"
11007 #:jdk ,icedtea-8
11008 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11009 #:tests? #f; no tests
11010 #:phases
11011 (modify-phases %standard-phases
11012 (add-before 'build 'fix-file
11013 (lambda _
11014 ;; FIXME: This looks wrong, but it fixes a build error.
11015 (with-directory-excursion "powermock-api/powermock-api-easymock"
11016 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11017 (("classLoader instanceof MockClassLoader") "false")
11018 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11019 #t)))))
11020 (inputs
11021 `(("core" ,java-powermock-core)
11022 ("easymock" ,java-easymock)
11023 ("reflect" ,java-powermock-reflect)
11024 ("support" ,java-powermock-api-support)
11025 ("cglib" ,java-cglib)))))
11026
11027 (define-public java-jboss-jms-api-spec
11028 (package
11029 (name "java-jboss-jms-api-spec")
11030 (version "2.0")
11031 (source (origin
11032 (method url-fetch)
11033 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11034 "archive/jboss-jms-api_" version
11035 "_spec-1.0.1.Final.tar.gz"))
11036 (sha256
11037 (base32
11038 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11039 (build-system ant-build-system)
11040 (arguments
11041 `(#:jar-name "java-jboss-jms-api_spec.jar"
11042 #:jdk ,icedtea-8
11043 #:source-dir "."
11044 #:tests? #f)); no tests
11045 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11046 (synopsis "Java Message Service API specification")
11047 (description "Java Message Service (JMS) API is used to send messages
11048 messages between two or more clients. It is a messaging standard that allows
11049 application components to create, send, receive, and read messages.")
11050 ; either gpl2 only with GPL Classpath Exception, or cddl.
11051 (license (list license:gpl2 license:cddl1.0))))
11052
11053 (define-public java-mail
11054 (package
11055 (name "java-mail")
11056 (version "1.6.0")
11057 (source (origin
11058 (method url-fetch)
11059 (uri (string-append "https://github.com/javaee/javamail/archive/"
11060 "JAVAMAIL-1_6_0.tar.gz"))
11061 (sha256
11062 (base32
11063 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11064 (build-system ant-build-system)
11065 (arguments
11066 `(#:jar-name "java-mail.jar"
11067 #:jdk ,icedtea-8
11068 #:source-dir "mail/src/main/java"
11069 #:test-dir "mail/src/test"
11070 #:test-exclude
11071 (list "**/CollectorFormatterTest.java"
11072 "**/CompactFormatterTest.java"
11073 "**/DurationFilterTest.java"
11074 "**/MailHandlerTest.java"
11075 "**/GetLocalAddressTest.java"
11076 ;; FIXME: both end with:
11077 ;; java.lang.ClassNotFoundException:
11078 ;; javax.mail.internet.MimeMultipartParseTest
11079 "**/MimeMultipartParseTest.java"
11080 "**/SearchTermSerializationTest.java")
11081 #:phases
11082 (modify-phases %standard-phases
11083 (add-before 'configure 'move-version.java
11084 (lambda _
11085 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11086 "mail/src/main/java/javax/mail/Version.java")
11087 #t))
11088 (add-before 'build 'copy-resources
11089 (lambda _
11090 (copy-recursively "mail/src/main/resources/META-INF"
11091 "build/classes/META-INF")
11092 #t)))))
11093 (native-inputs
11094 `(("junit" ,java-junit)
11095 ("hamcrest" ,java-hamcrest-core)))
11096 (home-page "https://javaee.github.io/javamail/")
11097 (synopsis "Mail-related functionality in Java")
11098 (description "The JavaMail API provides a platform-independent and
11099 protocol-independent framework to build mail and messaging applications.")
11100 ;; General Public License Version 2 only ("GPL") or the Common Development
11101 ;; and Distribution License("CDDL")
11102 (license (list license:cddl1.1
11103 license:gpl2)))); with classpath exception
11104
11105 (define-public java-jeromq
11106 (package
11107 (name "java-jeromq")
11108 (version "0.4.3")
11109 (source (origin
11110 (method git-fetch)
11111 (uri (git-reference
11112 (url "https://github.com/zeromq/jeromq")
11113 (commit (string-append "v" version))))
11114 (file-name (string-append name "-" version "-checkout"))
11115 (sha256
11116 (base32
11117 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11118 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11119 (build-system ant-build-system)
11120 (arguments
11121 `(#:jar-name "java-jeromq.jar"
11122 #:source-dir "src/main/java"
11123 #:jdk ,icedtea-8
11124 #:test-exclude
11125 (list
11126 "**/Abstract*.java"
11127 ;; Requires network
11128 "**/ZBeaconTest.java"
11129 ;; Failures
11130 "**/DealerSpecTest.java"
11131 "**/CustomDecoderTest.java"
11132 "**/CustomEncoderTest.java"
11133 "**/ConnectRidTest.java"
11134 "**/ReqSpecTest.java"
11135 "**/PushPullSpecTest.java"
11136 "**/PubSubHwmTest.java"
11137 "**/RouterSpecTest.java"
11138 "**/ProxyTest.java")))
11139 (inputs
11140 `(("java-jnacl" ,java-jnacl)))
11141 (native-inputs
11142 `(("java-hamcrest-core" ,java-hamcrest-core)
11143 ("junit" ,java-junit)))
11144 (home-page "http://zeromq.org/bindings:java")
11145 (synopsis "Java binding for 0MQ")
11146 (description "Jeromq provides the java bindings for 0MQ.")
11147 (license license:mpl2.0)))
11148
11149 (define-public java-kafka-clients
11150 (package
11151 (name "java-kafka-clients")
11152 (version "1.0.0")
11153 (source (origin
11154 (method url-fetch)
11155 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11156 version "-src.tgz"))
11157 (sha256
11158 (base32
11159 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11160 (build-system ant-build-system)
11161 (arguments
11162 `(#:jar-name "java-kafka-clients.jar"
11163 #:jdk ,icedtea-8
11164 #:source-dir "clients/src/main/java"
11165 #:test-dir "clients/src/test"
11166 #:test-exclude
11167 (list
11168 ;; This file does not contain a class
11169 "**/IntegrationTest.java"
11170 ;; Requires network
11171 "**/ClientUtilsTest.java"
11172 ;; End with errors that seem related to our powermock
11173 "**/KafkaProducerTest.java"
11174 "**/BufferPoolTest.java")))
11175 (inputs
11176 `(("java-slf4j-api" ,java-slf4j-api)
11177 ("java-lz4" ,java-lz4)))
11178 (native-inputs
11179 `(("junit" ,java-junit)
11180 ("hamcrest" ,java-hamcrest-all)
11181 ("objenesis" ,java-objenesis)
11182 ("asm" ,java-asm)
11183 ("cglib" ,java-cglib)
11184 ("javassist" ,java-jboss-javassist)
11185 ("snappy" ,java-snappy)
11186 ("easymock" ,java-easymock)
11187 ("powermock" ,java-powermock-core)
11188 ("powermock-easymock" ,java-powermock-api-easymock)
11189 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11190 ("powermock-junit4" ,java-powermock-modules-junit4)
11191 ("powermock-support" ,java-powermock-api-support)
11192 ("java-bouncycastle" ,java-bouncycastle)))
11193 (home-page "https://kafka.apache.org")
11194 (synopsis "Distributed streaming platform")
11195 (description "Kafka is a distributed streaming platform, which means:
11196 @itemize
11197 @item it can publish and subscribe to streams of records;
11198 @item it can store streams of records in a fault-tolerant way;
11199 @item it can process streams of records as they occur.
11200 @end itemize")
11201 ;; Either cddl or gpl2 only.
11202 (license (list license:cddl1.1; actually cddl1.1
11203 license:gpl2)))); with classpath exception
11204
11205 (define-public java-jdom
11206 (package
11207 (name "java-jdom")
11208 (version "1.1.3")
11209 (source (origin
11210 (method url-fetch)
11211 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11212 version ".tar.gz"))
11213 (sha256
11214 (base32
11215 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11216 (build-system ant-build-system)
11217 (arguments
11218 `(#:build-target "package"
11219 #:tests? #f; tests are run as part of the build process
11220 #:phases
11221 (modify-phases %standard-phases
11222 (replace 'install
11223 (install-jars "build")))))
11224 (home-page "http://jdom.org/")
11225 (synopsis "Access, manipulate, and output XML data")
11226 (description "Java-based solution for accessing, manipulating, and
11227 outputting XML data from Java code.")
11228 (license license:bsd-4)))
11229
11230 (define-public java-geronimo-xbean-reflect
11231 (package
11232 (name "java-geronimo-xbean-reflect")
11233 (version "4.5")
11234 (source (origin
11235 (method svn-fetch)
11236 (uri (svn-reference
11237 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11238 (revision 1807396)))
11239 (file-name (string-append name "-" version))
11240 (sha256
11241 (base32
11242 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11243 (build-system ant-build-system)
11244 (arguments
11245 `(#:jar-name "geronimo-xbean-reflect.jar"
11246 #:source-dir "xbean-reflect/src/main/java"
11247 #:test-dir "xbean-reflect/src/test"
11248 #:jdk ,icedtea-8
11249 #:test-exclude
11250 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11251 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11252 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11253 #:phases
11254 (modify-phases %standard-phases
11255 (add-before 'build 'fix-source
11256 (lambda _
11257 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11258 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11259 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11260 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11261 #t)))
11262 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11263 (inputs
11264 `(("asm" ,java-asm)
11265 ("log4j" ,java-log4j-api)
11266 ("log4j-1.2" ,java-log4j-1.2-api)
11267 ("log4j-core" ,java-log4j-core)
11268 ("logging" ,java-commons-logging-minimal)))
11269 (propagated-inputs
11270 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11271 (native-inputs
11272 `(("junit" ,java-junit)))
11273 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11274 (synopsis "Dependency injection helper")
11275 (description "Xbean-reflect provides very flexible ways to create objects
11276 and graphs of objects for dependency injection frameworks")
11277 (license license:asl2.0)))
11278
11279 (define java-geronimo-genesis-2.1
11280 (package
11281 (name "java-geronimo-genesis")
11282 (version "2.1")
11283 (source (origin
11284 (method svn-fetch)
11285 (uri (svn-reference
11286 (url (string-append "https://svn.apache.org/repos/asf/"
11287 "geronimo/genesis/tags/genesis-"
11288 version))
11289 (revision 1807396)))
11290 (file-name (string-append name "-" version "-source"))
11291 (sha256
11292 (base32
11293 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11294 (build-system ant-build-system)
11295 (arguments
11296 `(#:tests? #f
11297 #:phases
11298 (modify-phases %standard-phases
11299 (delete 'configure)
11300 (delete 'build)
11301 (replace 'install
11302 (install-pom-file "pom.xml"))
11303 (add-after 'install 'install-enforcer-rules
11304 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11305 (add-after 'install 'install-flava
11306 (install-pom-file "genesis-default-flava/pom.xml"))
11307 (add-after 'install 'install-packaging
11308 (install-pom-file "genesis-packaging/pom.xml"))
11309 (add-after 'install-flava 'install-flava-java4
11310 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11311 (add-after 'install-flava 'install-flava-java5
11312 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11313 (add-after 'install-flava 'install-flava-java6
11314 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11315 (propagated-inputs
11316 `(("apache-parent-pom" ,apache-parent-pom-13)))
11317 (home-page "https://geronimo.apache.org")
11318 (synopsis "Collection of maven POM files for the Geronimo project")
11319 (description "Apache Geronimo is a server runtime. This package contains
11320 only pom files used by other components in the Geronimo project.")
11321 (license license:asl2.0)))
11322
11323 (define java-geronimo-parent-pom
11324 (package
11325 (inherit java-geronimo-xbean-reflect)
11326 (name "java-geronimo-parent-pom")
11327 (arguments
11328 `(#:tests? #f
11329 #:phases
11330 (modify-phases %standard-phases
11331 (delete 'configure)
11332 (delete 'build)
11333 (replace 'install
11334 (install-pom-file "pom.xml")))))
11335 (propagated-inputs
11336 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11337
11338 (define-public java-geronimo-xbean-bundleutils
11339 (package
11340 (inherit java-geronimo-xbean-reflect)
11341 (name "java-geronimo-xbean-bundleutils")
11342 (arguments
11343 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11344 #:source-dir "xbean-bundleutils/src/main/java"
11345 #:test-dir "xbean-bundleutils/src/test"
11346 #:phases
11347 (modify-phases %standard-phases
11348 (add-before 'build 'fix-java
11349 (lambda _
11350 ;; We use a more recent version of osgi, so this file requires
11351 ;; more interface method implementations.
11352 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11353 (("import org.osgi.framework.ServiceRegistration;")
11354 "import org.osgi.framework.ServiceRegistration;
11355 import org.osgi.framework.ServiceFactory;
11356 import java.util.Collection;
11357 import org.osgi.framework.ServiceObjects;")
11358 (("public Bundle getBundle\\(\\)")
11359 "@Override
11360 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11361 throw new UnsupportedOperationException();
11362 }
11363 @Override
11364 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11365 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11366 throw new UnsupportedOperationException();
11367 }
11368 public Bundle getBundle()"))
11369 #t)))))
11370 (inputs
11371 `(("java-slf4j" ,java-slf4j-api)
11372 ("java-asm" ,java-asm)
11373 ("java-osgi-framework" ,java-osgi-framework)
11374 ("java-eclipse-osgi" ,java-eclipse-osgi)
11375 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11376
11377 (define-public java-geronimo-xbean-asm-util
11378 (package
11379 (inherit java-geronimo-xbean-reflect)
11380 (name "java-geronimo-xbean-asm-util")
11381 (arguments
11382 `(#:jar-name "geronimo-xbean-asm-util.jar"
11383 #:source-dir "xbean-asm-util/src/main/java"
11384 #:tests? #f)); no tests
11385 (inputs
11386 `(("java-asm" ,java-asm)))
11387 (native-inputs '())))
11388
11389 (define-public java-geronimo-xbean-finder
11390 (package
11391 (inherit java-geronimo-xbean-reflect)
11392 (name "java-geronimo-xbean-finder")
11393 (arguments
11394 `(#:jar-name "geronimo-xbean-finder.jar"
11395 #:source-dir "xbean-finder/src/main/java"
11396 #:test-dir "xbean-finder/src/test"))
11397 (inputs
11398 `(("java-slf4j-api" ,java-slf4j-api)
11399 ("java-asm" ,java-asm)
11400 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11401 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11402 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11403 ("java-osgi-framework" ,java-osgi-framework)))
11404 (native-inputs
11405 `(("java-junit" ,java-junit)
11406 ("java-hamcrest-core" ,java-hamcrest-core)))))
11407
11408 (define-public java-gson
11409 (package
11410 (name "java-gson")
11411 (version "2.8.2")
11412 (source (origin
11413 (method url-fetch)
11414 (uri (string-append "https://github.com/google/gson/archive/"
11415 "gson-parent-" version ".tar.gz"))
11416 (sha256
11417 (base32
11418 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11419 (build-system ant-build-system)
11420 (arguments
11421 `(#:jar-name "gson.jar"
11422 #:source-dir "gson/src/main/java"
11423 #:test-dir "gson/src/test"))
11424 (native-inputs
11425 `(("java-junit" ,java-junit)
11426 ("java-hamcrest-core" ,java-hamcrest-core)))
11427 (home-page "https://github.com/google/gson")
11428 (synopsis "Java serialization/deserialization library from/to JSON")
11429 (description "Gson is a Java library that can be used to convert Java
11430 Objects into their JSON representation. It can also be used to convert a JSON
11431 string to an equivalent Java object. Gson can work with arbitrary Java objects
11432 including pre-existing objects that you do not have source-code of.")
11433 (license license:asl2.0)))
11434
11435 (define-public java-hawtjni
11436 (package
11437 (name "java-hawtjni")
11438 (version "1.15")
11439 (source (origin
11440 (method url-fetch)
11441 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11442 "hawtjni-project-" version ".tar.gz"))
11443 (sha256
11444 (base32
11445 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11446 (build-system ant-build-system)
11447 (arguments
11448 `(#:jar-name "hawtjni.jar"
11449 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11450 #:tests? #f; no tests
11451 #:phases
11452 (modify-phases %standard-phases
11453 (add-before 'build 'build-native
11454 (lambda* (#:key inputs #:allow-other-keys)
11455 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11456 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11457 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11458 "-fPIC" "-O2" include)
11459 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11460 "-fPIC" "-O2" include)
11461 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11462 "hawtjni.o" "hawtjni-callback.o")))
11463 #t))
11464 (add-after 'install 'install-native
11465 (lambda* (#:key outputs #:allow-other-keys)
11466 (let* ((out (assoc-ref outputs "out"))
11467 (lib (string-append out "/lib"))
11468 (inc (string-append out "/include")))
11469 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11470 (install-file "libhawtjni.so" lib)
11471 (install-file "hawtjni.h" inc)))
11472 #t))
11473 (add-before 'install 'install-parent
11474 (install-pom-file "pom.xml"))
11475 (replace 'install
11476 (install-from-pom "hawtjni-runtime/pom.xml")))))
11477 (inputs
11478 `(("java-commons-cli" ,java-commons-cli)
11479 ("java-asm" ,java-asm)
11480 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11481 (home-page "https://fusesource.github.io/hawtjni/")
11482 (synopsis "JNI code generator")
11483 (description "HawtJNI is a code generator that produces the JNI code needed
11484 to implement Java native methods. It is based on the jnigen code generator
11485 that is part of the SWT Tools project.")
11486 (license license:asl2.0)))
11487
11488 (define-public java-jansi-native
11489 (package
11490 (name "java-jansi-native")
11491 (version "1.7")
11492 (source (origin
11493 (method url-fetch)
11494 (uri (string-append "https://github.com/fusesource/jansi-native/"
11495 "archive/jansi-native-" version ".tar.gz"))
11496 (sha256
11497 (base32
11498 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11499 (build-system ant-build-system)
11500 (arguments
11501 `(#:jar-name "jansi-native.jar"
11502 #:source-dir "src/main/java"
11503 #:tests? #f; no tests
11504 #:phases
11505 (modify-phases %standard-phases
11506 (add-before 'build 'build-native
11507 (lambda* (#:key inputs #:allow-other-keys)
11508 ;; there are more required files for windows in windows/
11509 (with-directory-excursion "src/main/native-package/src"
11510 (substitute* "jansi_ttyname.c"
11511 (("#include \"jansi_.*") ""))
11512 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11513 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11514 "/include")
11515 (string-append "-I" (assoc-ref inputs "jdk")
11516 "/include/linux")
11517 "-fPIC" "-O2")
11518 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11519 (add-before 'build 'install-native
11520 (lambda _
11521 (let ((dir (string-append "build/classes/META-INF/native/"
11522 ,(match (%current-system)
11523 ((or "i686-linux" "armhf-linux")
11524 "linux32")
11525 ((or "x86_64-linux" "aarch64-linux"
11526 "mips64el-linux")
11527 "linux64")
11528 (_ "unknown-kernel")))))
11529 (install-file "src/main/native-package/src/libjansi.so" dir))
11530 #t))
11531 (add-after 'install 'install-native
11532 (lambda* (#:key outputs #:allow-other-keys)
11533 (install-file "src/main/native-package/src/jansi.h"
11534 (string-append (assoc-ref outputs "out") "/include"))
11535 #t))
11536 (add-before 'install 'fix-pom
11537 (lambda _
11538 ;; pom contains variables to complete name, but we don't support that
11539 (substitute* "pom.xml"
11540 (("\\$\\{platform\\}") "native"))
11541 #t))
11542 (replace 'install
11543 (install-from-pom "pom.xml")))))
11544 (propagated-inputs
11545 `(("java-hawtjni" ,java-hawtjni)))
11546 (home-page "https://fusesource.github.io/jansi/")
11547 (synopsis "Native library for jansi")
11548 (description "This package provides the native library for jansi, a small
11549 Java library that allows you to use ANSI escape sequences to format your
11550 console output.")
11551 (license license:asl2.0)))
11552
11553 (define-public java-jansi
11554 (package
11555 (name "java-jansi")
11556 (version "1.16")
11557 (source (origin
11558 (method url-fetch)
11559 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11560 "jansi-project-" version ".tar.gz"))
11561 (sha256
11562 (base32
11563 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11564 (build-system ant-build-system)
11565 (arguments
11566 `(#:jar-name "jansi.jar"
11567 #:source-dir "jansi/src/main/java"
11568 #:test-dir "jansi/src/test"
11569 #:phases
11570 (modify-phases %standard-phases
11571 (add-after 'check 'clear-term
11572 (lambda _
11573 (invoke "echo" "-e" "\\e[0m")))
11574 (add-before 'install 'install-parent
11575 (install-pom-file "pom.xml"))
11576 (add-before 'install 'fix-pom
11577 (lambda _
11578 ;; pom adds jansi native versions for different platforms, but we
11579 ;; only need one, so use native instead
11580 (substitute* "jansi/pom.xml"
11581 (("windows32") "native")
11582 (("windows64") "native")
11583 (("osx") "native")
11584 (("linux32") "native")
11585 (("linux64") "native")
11586 (("freebsd32") "native")
11587 (("freebsd64") "native"))
11588 #t))
11589 (replace 'install
11590 (install-from-pom "jansi/pom.xml")))))
11591 (propagated-inputs
11592 `(("java-jansi-native" ,java-jansi-native)))
11593 (native-inputs
11594 `(("java-junit" ,java-junit)
11595 ("java-hamcrest-core" ,java-hamcrest-core)))
11596 (home-page "https://fusesource.github.io/jansi/")
11597 (synopsis "Portable ANSI escape sequences")
11598 (description "Jansi is a Java library that allows you to use ANSI escape
11599 sequences to format your console output which works on every platform.")
11600 (license license:asl2.0)))
11601
11602 (define-public java-jboss-el-api-spec
11603 (package
11604 (name "java-jboss-el-api-spec")
11605 (version "3.0")
11606 (source (origin
11607 (method url-fetch)
11608 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11609 "archive/jboss-el-api_" version
11610 "_spec-1.0.7.Final.tar.gz"))
11611 (sha256
11612 (base32
11613 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11614 (build-system ant-build-system)
11615 (arguments
11616 `(#:jar-name "java-jboss-el-api_spec.jar"
11617 #:modules ((guix build ant-build-system)
11618 (guix build utils)
11619 (guix build maven pom)
11620 (guix build java-utils)
11621 (sxml simple))
11622 #:phases
11623 (modify-phases %standard-phases
11624 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11625 ;; instead, which implements the same thing. We override the pom file
11626 ;; to "rename" the package so it can be found by maven.
11627 (add-before 'install 'override-pom
11628 (lambda _
11629 (delete-file "pom.xml")
11630 (with-output-to-file "pom.xml"
11631 (lambda _
11632 (sxml->xml
11633 `(project
11634 (modelVersion "4.0.0")
11635 (name "el-api")
11636 (groupId "javax.el")
11637 (artifactId "javax.el-api")
11638 (version "3.0")))))
11639 #t))
11640 (replace 'install
11641 (install-from-pom "pom.xml")))))
11642 (inputs
11643 `(("java-junit" ,java-junit)))
11644 (home-page "https://github.com/jboss/jboss-el-api_spec")
11645 (synopsis "JSR-341 expression language 3.0 API")
11646 (description "This package contains an implementation of the JSR-341
11647 specification for the expression language 3.0. It implements an expression
11648 language inspired by ECMAScript and XPath. This language is used with
11649 JavaServer Pages (JSP).")
11650 ;; Either GPL2 only or CDDL.
11651 (license (list license:gpl2 license:cddl1.1))))
11652
11653 (define-public java-jboss-interceptors-api-spec
11654 (package
11655 (name "java-jboss-interceptors-api-spec")
11656 (version "1.2")
11657 (source (origin
11658 (method url-fetch)
11659 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11660 "archive/jboss-interceptors-api_" version
11661 "_spec-1.0.0.Final.tar.gz"))
11662 (sha256
11663 (base32
11664 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11665 (build-system ant-build-system)
11666 (arguments
11667 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11668 #:jdk ,icedtea-8
11669 #:source-dir "."
11670 #:tests? #f; no tests
11671 #:modules ((guix build ant-build-system)
11672 (guix build utils)
11673 (guix build maven pom)
11674 (guix build java-utils)
11675 (sxml simple))
11676 #:phases
11677 (modify-phases %standard-phases
11678 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11679 ;; so we use this package instead, which implements the same thing.
11680 ;; We override the pom file to "rename" the package so it can be found
11681 ;; by maven.
11682 (add-before 'install 'override-pom
11683 (lambda _
11684 (delete-file "pom.xml")
11685 (with-output-to-file "pom.xml"
11686 (lambda _
11687 (sxml->xml
11688 `(project
11689 (modelVersion "4.0.0")
11690 (name "interceptor-api")
11691 (groupId "javax.interceptor")
11692 (artifactId "javax.interceptor-api")
11693 (version "3.0")))))
11694 #t))
11695 (replace 'install
11696 (install-from-pom "pom.xml")))))
11697 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11698 (synopsis "Interceptors 1.2 API classes from JSR 318")
11699 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11700 API. Interceptors are used to interpose on business method invocations and
11701 specific events.")
11702 ;; Either GPL2 only or CDDL.
11703 (license (list license:gpl2 license:cddl1.1))))
11704
11705 (define-public java-cdi-api
11706 (package
11707 (name "java-cdi-api")
11708 (version "2.0")
11709 (source (origin
11710 (method url-fetch)
11711 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
11712 version ".tar.gz"))
11713 (file-name (string-append name "-" version ".tar.gz"))
11714 (sha256
11715 (base32
11716 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
11717 (build-system ant-build-system)
11718 (arguments
11719 `(#:source-dir "api/src/main/java"
11720 #:jar-name "java-cdi-api.jar"
11721 #:test-dir "api/src/test"
11722 #:jdk ,icedtea-8
11723 #:tests? #f; Tests fail because we don't have a CDI provider yet
11724 #:phases
11725 (modify-phases %standard-phases
11726 (replace 'install
11727 (install-from-pom "api/pom.xml")))))
11728 (propagated-inputs
11729 `(("java-javax-inject" ,java-javax-inject)
11730 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
11731 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
11732 ("java-weld-parent-pom" ,java-weld-parent-pom)))
11733 (native-inputs
11734 `(("java-testng" ,java-testng)
11735 ("java-hamcrest-core" ,java-hamcrest-core)))
11736 (home-page "http://cdi-spec.org/")
11737 (synopsis "Contexts and Dependency Injection APIs")
11738 (description "Java-cdi-api contains the required APIs for Contexts and
11739 Dependency Injection (CDI).")
11740 (license license:asl2.0)))
11741
11742 (define-public java-joda-convert
11743 (package
11744 (name "java-joda-convert")
11745 (version "1.9.2")
11746 (source (origin
11747 (method url-fetch)
11748 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
11749 version ".tar.gz"))
11750 (file-name (string-append name "-" version ".tar.gz"))
11751 (sha256
11752 (base32
11753 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
11754 (build-system ant-build-system)
11755 (arguments
11756 `(#:jar-name (string-append ,name "-" ,version ".jar")
11757 #:source-dir "src/main/java"
11758 #:test-include (list "**/Test*.java")
11759 ;; Contains only interfaces and base classes (no test)
11760 #:test-exclude (list "**/test*/**.java")))
11761 (inputs
11762 `(("java-guava" ,java-guava)))
11763 (native-inputs
11764 `(("java-junit" ,java-junit)
11765 ("java-hamcrest-core" ,java-hamcrest-core)))
11766 (home-page "https://www.joda.org/joda-convert/")
11767 (synopsis "Conversion between Objects and Strings")
11768 (description "Joda-Convert provides a small set of classes to aid
11769 conversion between Objects and Strings. It is not intended to tackle the
11770 wider problem of Object to Object transformation.")
11771 (license license:asl2.0)))
11772
11773 (define-public java-joda-time
11774 (package
11775 (name "java-joda-time")
11776 (version "2.9.9")
11777 (source (origin
11778 (method url-fetch)
11779 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
11780 version ".tar.gz"))
11781 (file-name (string-append name "-" version ".tar.gz"))
11782 (sha256
11783 (base32
11784 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
11785 (build-system ant-build-system)
11786 (arguments
11787 `(#:jar-name "java-joda-time.jar"
11788 #:source-dir "src/main/java"
11789 #:test-include (list "**/Test*.java")
11790 ;; There is no runnable test in these files
11791 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
11792 #:phases
11793 (modify-phases %standard-phases
11794 (add-after 'build 'build-resources
11795 (lambda _
11796 (mkdir-p "build/classes/org/joda/time/tz/data")
11797 (mkdir-p "build/classes/org/joda/time/format")
11798 ;; This will produce the following exception:
11799 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
11800 ;; which is normal, because it doesn't exist yet. It still generates
11801 ;; the same file as in the binary one can find on maven.
11802 (invoke "java" "-cp"
11803 (string-append "build/classes:" (getenv "CLASSPATH"))
11804 "org.joda.time.tz.ZoneInfoCompiler"
11805 "-src" "src/main/java/org/joda/time/tz/src"
11806 "-dst" "build/classes/org/joda/time/tz/data"
11807 "africa" "antarctica" "asia" "australasia"
11808 "europe" "northamerica" "southamerica"
11809 "pacificnew" "etcetera" "backward" "systemv")
11810 (for-each (lambda (f)
11811 (copy-file f (string-append
11812 "build/classes/org/joda/time/format/"
11813 (basename f))))
11814 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
11815 #t))
11816 (add-before 'install 'regenerate-jar
11817 (lambda _
11818 ;; We need to regenerate the jar file to add generated data.
11819 (delete-file "build/jar/java-joda-time.jar")
11820 (invoke "ant" "jar")))
11821 (add-before 'check 'copy-test-resources
11822 (lambda _
11823 (mkdir-p "build/test-classes/org/joda/time/tz/data")
11824 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
11825 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
11826 (copy-recursively "src/test/resources" "build/test-classes")
11827 #t)))))
11828 (inputs
11829 `(("java-joda-convert" ,java-joda-convert)))
11830 (native-inputs
11831 `(("java-junit" ,java-junit)
11832 ("java-hamcrest-core" ,java-hamcrest-core)
11833 ("tzdata" ,tzdata)))
11834 (home-page "https://www.joda.org/joda-time/")
11835 (synopsis "Replacement for the Java date and time classes")
11836 (description "Joda-Time is a replacement for the Java date and time
11837 classes prior to Java SE 8.")
11838 (license license:asl2.0)))
11839
11840 (define-public java-xerces
11841 (package
11842 (name "java-xerces")
11843 (version "2.12.1")
11844 (source
11845 (origin
11846 (method url-fetch)
11847 (uri (string-append "mirror://apache/xerces/j/source/"
11848 "Xerces-J-src." version ".tar.gz"))
11849 (sha256
11850 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
11851 (patches (search-patches
11852 "java-xerces-xjavac_taskdef.patch"
11853 "java-xerces-build_dont_unzip.patch"
11854 "java-xerces-bootclasspath.patch"))))
11855 (build-system ant-build-system)
11856 (arguments
11857 `(#:tests? #f;; Test files are not present
11858 #:test-target "test"
11859 #:jdk ,icedtea-8
11860 #:phases
11861 (modify-phases %standard-phases
11862 (add-after 'unpack 'create-build.properties
11863 (lambda* (#:key inputs #:allow-other-keys)
11864 (let ((jaxp (assoc-ref inputs "java-jaxp"))
11865 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
11866 (with-output-to-file "build.properties"
11867 (lambda _
11868 (format #t
11869 "jar.jaxp = ~a/share/java/jaxp.jar~@
11870 jar.apis-ext = ~a/share/java/jaxp.jar~@
11871 jar.resolver = ~a/share/java/xml-resolver.jar~%"
11872 jaxp jaxp resolver)))
11873 ;; Make xerces use our version of jaxp in tests
11874 (substitute* "build.xml"
11875 (("xml-apis.jar")
11876 (string-append jaxp "/share/java/jaxp.jar"))
11877 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
11878 "${jar.apis}")))
11879 #t))
11880 (replace 'install (install-jars "build")))))
11881 (inputs
11882 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
11883 ("java-jaxp" ,java-jaxp)))
11884 (home-page "https://xerces.apache.org/xerces2-j/")
11885 (synopsis "Validating XML parser for Java with DOM level 3 support")
11886 (description "The Xerces2 Java parser is the reference implementation of
11887 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
11888 processor.
11889
11890 Xerces2-J supports the following standards and APIs:
11891
11892 @itemize
11893 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
11894 @item Namespaces in XML Recommendation
11895 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
11896 Range Recommendations
11897 @item Simple API for XML (SAX) 2.0.1 Core and Extension
11898 @item Java APIs for XML Processing (JAXP) 1.2.01
11899 @item XML Schema 1.0 Structures and Datatypes Recommendations
11900 @item Experimental implementation of the Document Object Model (DOM) Level 3
11901 Core and Load/Save Working Drafts
11902 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
11903 Candidate Recommendation
11904 @end itemize
11905
11906 Xerces is now able to parse documents written according to the XML 1.1
11907 Candidate Recommendation, except that it does not yet provide an option to
11908 enable normalization checking as described in section 2.13 of this
11909 specification. It also handles namespaces according to the XML Namespaces 1.1
11910 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
11911 the DOM level 3 load/save API's are in use.")
11912 (license license:asl2.0)))
11913
11914 (define-public java-jakarta-regexp
11915 (package
11916 (name "java-jakarta-regexp")
11917 (version "1.5")
11918 (source
11919 (origin
11920 (method url-fetch)
11921 (uri (string-append
11922 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
11923 version ".tar.gz"))
11924 (sha256
11925 (base32
11926 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
11927 (build-system ant-build-system)
11928 (arguments
11929 `(#:test-target "test"
11930 #:phases
11931 (modify-phases %standard-phases
11932 (replace 'install
11933 (lambda* (#:key outputs #:allow-other-keys)
11934 (let* ((out (assoc-ref outputs "out"))
11935 (out-share (string-append out "/share/java")))
11936 (mkdir-p out-share)
11937 (for-each (lambda (name)
11938 (install-file name out-share))
11939 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
11940 #t))))))
11941 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
11942 (synopsis "Regular expression parser generator for Java.")
11943 (description "@code{jakarta-regexp} is an old regular expression parser
11944 generator for Java.")
11945 (license license:asl2.0)))
11946
11947 (define-public java-jline
11948 (package
11949 (name "java-jline")
11950 (version "1.0")
11951 (source (origin
11952 (method url-fetch)
11953 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
11954 version ".tar.gz"))
11955 (sha256
11956 (base32
11957 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
11958 (build-system ant-build-system)
11959 (arguments
11960 `(#:jar-name "jline.jar"
11961 #:source-dir "src/main/java"
11962 #:test-dir "src/test"
11963 #:phases
11964 (modify-phases %standard-phases
11965 (add-before 'build 'copy-resources
11966 (lambda _
11967 (copy-recursively "src/main/resources" "build/classes")
11968 #t)))))
11969 (native-inputs
11970 `(("java-junit" ,java-junit)))
11971 (home-page "https://jline.github.io")
11972 (synopsis "Console input handling library")
11973 (description "JLine is a Java library for handling console input. It is
11974 similar in functionality to BSD editline and GNU readline but with additional
11975 features that bring it on par with the Z shell line editor.")
11976 (license license:bsd-3)))
11977
11978 (define-public java-jline-2
11979 (package
11980 (inherit java-jline)
11981 (version "2.14.5")
11982 (source (origin
11983 (method url-fetch)
11984 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
11985 version ".tar.gz"))
11986 (sha256
11987 (base32
11988 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
11989 (arguments
11990 `(#:jdk ,icedtea-8
11991 ,@(package-arguments java-jline)))
11992 (inputs
11993 `(("java-jansi" ,java-jansi)
11994 ("java-jansi-native" ,java-jansi-native)))
11995 (native-inputs
11996 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
11997 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
11998 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
11999 ("java-powermock-api-support" ,java-powermock-api-support)
12000 ("java-powermock-core" ,java-powermock-core)
12001 ("java-powermock-reflect" ,java-powermock-reflect)
12002 ("java-easymock" ,java-easymock)
12003 ("java-jboss-javassist" ,java-jboss-javassist)
12004 ("java-objenesis" ,java-objenesis)
12005 ("java-asm" ,java-asm)
12006 ("java-hamcrest-core" ,java-hamcrest-core)
12007 ("java-cglib" ,java-cglib)
12008 ("java-junit" ,java-junit)
12009 ("java-hawtjni" ,java-hawtjni)))))
12010
12011 (define-public java-xmlunit
12012 (package
12013 (name "java-xmlunit")
12014 (version "2.5.1")
12015 (source (origin
12016 (method url-fetch)
12017 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12018 version ".tar.gz"))
12019 (file-name (string-append name "-" version ".tar.gz"))
12020 (sha256
12021 (base32
12022 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12023 (build-system ant-build-system)
12024 (arguments
12025 `(#:jar-name "java-xmlunit.jar"
12026 #:source-dir "xmlunit-core/src/main/java"
12027 #:test-dir "xmlunit-core/src/test"
12028 #:phases
12029 (modify-phases %standard-phases
12030 (add-before 'check 'copy-test-resources
12031 (lambda* (#:key inputs #:allow-other-keys)
12032 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12033 #t)))))
12034 (native-inputs
12035 `(("java-junit" ,java-junit)
12036 ("java-mockito-1" ,java-mockito-1)
12037 ("java-hamcrest-all" ,java-hamcrest-all)
12038 ("java-objenesis" ,java-objenesis)
12039 ("java-asm" ,java-asm)
12040 ("java-cglib" ,java-cglib)
12041 ("resources"
12042 ,(origin
12043 (method git-fetch)
12044 (uri (git-reference
12045 (url "https://github.com/xmlunit/test-resources")
12046 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12047 (file-name "java-xmlunit-test-resources")
12048 (sha256
12049 (base32
12050 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12051 (home-page "https://www.xmlunit.org/")
12052 (synopsis "XML output testing")
12053 (description "XMLUnit provides you with the tools to verify the XML you
12054 emit is the one you want to create. It provides helpers to validate against
12055 an XML Schema, assert the values of XPath queries or compare XML documents
12056 against expected outcomes.")
12057 (license license:asl2.0)))
12058
12059 (define-public java-xmlunit-legacy
12060 (package
12061 (inherit java-xmlunit)
12062 (name "java-xmlunit-legacy")
12063 (arguments
12064 `(#:jar-name "java-xmlunit-legacy.jar"
12065 #:source-dir "xmlunit-legacy/src/main/java"
12066 #:test-dir "xmlunit-legacy/src/test"))
12067 (inputs
12068 `(("java-xmlunit" ,java-xmlunit)
12069 ("java-junit" ,java-junit)))
12070 (native-inputs
12071 `(("java-mockito-1" ,java-mockito-1)))))
12072
12073 (define-public java-xmlunit-matchers
12074 (package
12075 (inherit java-xmlunit)
12076 (name "java-xmlunit-matchers")
12077 (arguments
12078 `(#:jar-name "java-xmlunit-matchers.jar"
12079 #:source-dir "xmlunit-matchers/src/main/java"
12080 #:test-dir "xmlunit-matchers/src/test"
12081 #:test-exclude
12082 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12083 (list "**/ValidationMatcherTest.java")
12084 #:phases
12085 (modify-phases %standard-phases
12086 (add-before 'build 'copy-test-class
12087 (lambda _
12088 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12089 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12090 #t))
12091 (add-before 'build 'fix-test-resources-path
12092 (lambda _
12093 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12094 (("../test-resources") "test-resources"))
12095 #t))
12096 (add-before 'check 'copy-test-resources
12097 (lambda* (#:key inputs #:allow-other-keys)
12098 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12099 #t)))))
12100 (inputs
12101 `(("java-xmlunit" ,java-xmlunit)
12102 ("java-junit" ,java-junit)))))
12103
12104 (define-public java-openchart2
12105 (package
12106 (name "java-openchart2")
12107 (version "1.4.3")
12108 (source (origin
12109 (method url-fetch)
12110 (uri (string-append "http://download.approximatrix.com/openchart2/"
12111 "openchart2-" version ".source.zip"))
12112 (sha256
12113 (base32
12114 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12115 (build-system ant-build-system)
12116 (arguments
12117 `(#:test-target "test"
12118 #:phases
12119 (modify-phases %standard-phases
12120 (add-after 'unpack 'fix-junit-errors
12121 (lambda _
12122 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12123 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12124 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12125 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12126 "model/DefaultChartDataModelConstraintsTest.java"
12127 "model/MultiScatterDataModelConstraintsTest.java"
12128 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12129 (("(assertEquals[^;]+);" before _)
12130 (string-append (string-drop-right before 2) ", 1E-6);"))))
12131 #t))
12132 (replace 'install (install-jars ".")))))
12133 (native-inputs
12134 `(("unzip" ,unzip)
12135 ("java-junit" ,java-junit)
12136 ("java-hamcrest-core" ,java-hamcrest-core)))
12137 (home-page "https://approximatrix.com/products/openchart2/")
12138 (synopsis "Simple plotting for Java")
12139 (description "Openchart2 provides a simple, yet powerful, interface for
12140 Java programmers to create two-dimensional charts and plots. The library
12141 features an assortment of graph styles, including advanced scatter plots, bar
12142 graphs, and pie charts.")
12143 (license license:lgpl2.1+)))
12144
12145 (define-public java-commons-httpclient
12146 (package
12147 (name "java-commons-httpclient")
12148 (version "3.1")
12149 (source (origin
12150 (method url-fetch)
12151 (uri (string-append "mirror://apache/httpcomponents/"
12152 "commons-httpclient/source/commons-httpclient-"
12153 version "-src.tar.gz"))
12154 (sha256
12155 (base32
12156 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12157 (build-system ant-build-system)
12158 (arguments
12159 `(#:build-target "compile"
12160 #:test-target "test"
12161 #:tests? #f; requires junit-textui (junit 3)
12162 #:phases
12163 (modify-phases %standard-phases
12164 (add-before 'build 'fix-accent
12165 (lambda _
12166 (for-each (lambda (file)
12167 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12168 (substitute* file
12169 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12170 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12171 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12172 "src/test/org/apache/commons/httpclient/TestHttps.java"
12173 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12174 #t))
12175 (replace 'install
12176 (lambda* (#:key outputs #:allow-other-keys)
12177 (invoke "ant" "dist"
12178 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12179 "/share/java"))
12180 #t)))))
12181 (propagated-inputs
12182 `(("java-commons-logging" ,java-commons-logging-minimal)
12183 ("java-commons-codec" ,java-commons-codec)))
12184 (home-page "https://hc.apache.org")
12185 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12186 (description "This package contains an HTTP/1.1 compliant HTTP agent
12187 implementation. It also provides reusable components for client-side
12188 authentication, HTTP state management, and HTTP connection management.")
12189 (license license:asl2.0)))
12190
12191 (define-public java-commons-vfs
12192 (package
12193 (name "java-commons-vfs")
12194 (version "2.2")
12195 (source (origin
12196 (method url-fetch)
12197 (uri (string-append "mirror://apache/commons/vfs/source/"
12198 "commons-vfs2-distribution-" version "-src.tar.gz"))
12199 (file-name (string-append name "-" version ".tar.gz"))
12200 (sha256
12201 (base32
12202 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12203 (modules '((guix build utils)))
12204 (snippet
12205 '(begin
12206 (for-each delete-file
12207 (find-files "." "\\.jar$"))
12208 #t))))
12209 (build-system ant-build-system)
12210 (arguments
12211 `(#:jar-name "commons-vfs.jar"
12212 #:source-dir "commons-vfs2/src/main/java"
12213 #:test-dir "commons-vfs2/src/test"
12214 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12215 #:tests? #f
12216 #:phases
12217 (modify-phases %standard-phases
12218 (add-before 'build 'remove-hadoop-and-webdav
12219 ; Remove these files as they are not required and depend on difficult
12220 ; packages.
12221 (lambda _
12222 (for-each delete-file-recursively
12223 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12224 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12225 #t)))))
12226 (inputs
12227 `(("java-commons-collections4" ,java-commons-collections4)
12228 ("java-commons-compress" ,java-commons-compress)
12229 ("java-commons-httpclient" ,java-commons-httpclient)
12230 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12231 ("java-commons-net" ,java-commons-net)
12232 ("java-jsch" ,java-jsch)))
12233 (home-page "https://commons.apache.org/proper/commons-vfs/")
12234 (synopsis "Java file system library")
12235 (description "Commons VFS provides a single API for accessing various
12236 different file systems. It presents a uniform view of the files from various
12237 different sources, such as the files on local disk, on an HTTP server, or
12238 inside a Zip archive.")
12239 (license license:asl2.0)))
12240
12241 (define-public java-jakarta-oro
12242 (package
12243 (name "java-jakarta-oro")
12244 (version "2.0.8")
12245 (source (origin
12246 (method url-fetch)
12247 (uri (string-append "mirror://apache/jakarta/oro/"
12248 "jakarta-oro-" version ".tar.gz"))
12249 (sha256
12250 (base32
12251 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12252 (modules '((guix build utils)))
12253 (snippet
12254 `(begin
12255 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12256 #t))))
12257 (build-system ant-build-system)
12258 (arguments
12259 `(#:build-target "package"
12260 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12261 #:tests? #f; tests are run as part of the build process
12262 #:phases
12263 (modify-phases %standard-phases
12264 (replace 'install
12265 (install-jars ,(string-append "jakarta-oro-" version))))))
12266 (home-page "https://jakarta.apache.org/oro/")
12267 (synopsis "Text-processing for Java")
12268 (description "The Jakarta-ORO Java classes are a set of text-processing
12269 Java classes that provide Perl5 compatible regular expressions, AWK-like
12270 regular expressions, glob expressions, and utility classes for performing
12271 substitutions, splits, filtering filenames, etc. This library is the successor
12272 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12273 from ORO, Inc.")
12274 (license license:asl1.1)))
12275
12276 (define-public java-native-access
12277 (package
12278 (name "java-native-access")
12279 (version "4.5.1")
12280 (source (origin
12281 (method url-fetch)
12282 (uri (string-append "https://github.com/java-native-access/jna/"
12283 "archive/" version ".tar.gz"))
12284 (file-name (string-append name "-" version ".tar.gz"))
12285 (sha256
12286 (base32
12287 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12288 (modules '((guix build utils)))
12289 (snippet
12290 `(begin
12291 (for-each delete-file (find-files "." ".*.jar"))
12292 (delete-file-recursively "native/libffi")
12293 (delete-file-recursively "dist")
12294 #t))))
12295 (build-system ant-build-system)
12296 (arguments
12297 `(#:tests? #f; FIXME: tests require reflections.jar
12298 #:test-target "test"
12299 #:make-flags (list "-Ddynlink.native=true")
12300 #:phases
12301 (modify-phases %standard-phases
12302 (add-before 'build 'fix-build.xml
12303 (lambda* (#:key inputs #:allow-other-keys)
12304 (substitute* "build.xml"
12305 ;; Since we removed the bundled ant.jar, give the correct path
12306 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12307 ;; We removed generated native libraries. We can only rebuild one
12308 ;; so don't fail if we can't find a native library for another architecture.
12309 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12310 ;; Copy test dependencies
12311 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12312 "lib/junit.jar")
12313 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12314 "jar$"))
12315 "lib/hamcrest-core.jar")
12316 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12317 #t))
12318 (add-before 'build 'build-native
12319 (lambda _
12320 (invoke "ant" "-Ddynlink.native=true" "native")
12321 #t))
12322 (replace 'install
12323 (install-jars "build")))))
12324 (inputs
12325 `(("libffi" ,libffi)
12326 ("libx11" ,libx11)
12327 ("libxt" ,libxt)))
12328 (native-inputs
12329 `(("java-junit" ,java-junit)
12330 ("java-hamcrest-core" ,java-hamcrest-core)))
12331 (home-page "https://github.com/java-native-access/jna")
12332 (synopsis "Access to native shared libraries from Java")
12333 (description "JNA provides Java programs easy access to native shared
12334 libraries without writing anything but Java code - no JNI or native code is
12335 required. JNA allows you to call directly into native functions using natural
12336 Java method invocation.")
12337 ;; Java Native Access project (JNA) is dual-licensed under 2
12338 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12339 (license (list
12340 license:asl2.0
12341 license:lgpl2.1+))))
12342
12343 (define-public java-native-access-platform
12344 (package
12345 (inherit java-native-access)
12346 (name "java-native-access-platform")
12347 (arguments
12348 `(#:test-target "test"
12349 #:tests? #f; require jna-test.jar
12350 #:phases
12351 (modify-phases %standard-phases
12352 (add-before 'build 'chdir
12353 (lambda _
12354 (chdir "contrib/platform")
12355 #t))
12356 (add-after 'chdir 'fix-ant
12357 (lambda* (#:key inputs #:allow-other-keys)
12358 (substitute* "nbproject/project.properties"
12359 (("../../build/jna.jar")
12360 (string-append (assoc-ref inputs "java-native-access")
12361 "/share/java/jna.jar"))
12362 (("../../lib/hamcrest-core-.*.jar")
12363 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12364 "jar$")))
12365 (("../../lib/junit.jar")
12366 (car (find-files (assoc-ref inputs "java-junit")
12367 "jar$"))))
12368 #t))
12369 (replace 'install
12370 (install-jars "dist")))))
12371 (inputs
12372 `(("java-native-access" ,java-native-access)))
12373 (synopsis "Cross-platform mappings for jna")
12374 (description "java-native-access-platform has cross-platform mappings
12375 and mappings for a number of commonly used platform functions, including a
12376 large number of Win32 mappings as well as a set of utility classes that
12377 simplify native access.")))
12378
12379 (define-public java-jsch-agentproxy-core
12380 (package
12381 (name "java-jsch-agentproxy-core")
12382 (version "0.0.8")
12383 (source (origin
12384 (method url-fetch)
12385 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12386 version ".tar.gz"))
12387 (file-name (string-append name "-" version ".tar.gz"))
12388 (sha256
12389 (base32
12390 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12391 (build-system ant-build-system)
12392 (arguments
12393 `(#:jar-name "jsch-agentproxy-core.jar"
12394 #:source-dir "jsch-agent-proxy-core/src/main/java"
12395 #:tests? #f)); no tests
12396 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12397 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12398 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12399 and Pageant included Putty. It will be easily integrated into JSch, and users
12400 will be allowed to use these programs for authentication.")
12401 (license license:bsd-3)))
12402
12403 (define-public java-jsch-agentproxy-sshagent
12404 (package
12405 (inherit java-jsch-agentproxy-core)
12406 (name "java-jsch-agentproxy-sshagent")
12407 (arguments
12408 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12409 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12410 #:tests? #f)); no tests
12411 (inputs
12412 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12413 (synopsis "Proxy to ssh-agent")
12414 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12415 and Pageant included in Putty. This component contains the code for a proxy to
12416 ssh-agent.")))
12417
12418 (define-public java-jsch-agentproxy-usocket-jna
12419 (package
12420 (inherit java-jsch-agentproxy-core)
12421 (name "java-jsch-agentproxy-usocket-jna")
12422 (arguments
12423 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12424 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12425 #:tests? #f)); no tests
12426 (inputs
12427 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12428 ("java-native-access" ,java-native-access)))
12429 (synopsis "USocketFactory implementation using JNA")
12430 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12431 and Pageant included in Putty. This component contains an implementation of
12432 USocketFactory using @dfn{JNA} (Java Native Access).")))
12433
12434 (define-public java-jsch-agentproxy-pageant
12435 (package
12436 (inherit java-jsch-agentproxy-core)
12437 (name "java-jsch-agentproxy-pageant")
12438 (arguments
12439 `(#:jar-name "jsch-agentproxy-pageant.jar"
12440 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12441 #:tests? #f)); no tests
12442 (inputs
12443 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12444 ("java-native-access" ,java-native-access)
12445 ("java-native-access-platform" ,java-native-access-platform)))
12446 (synopsis "Proxy to pageant")
12447 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12448 and Pageant included in Putty. This component contains the code for a proxy to
12449 pageant.")))
12450
12451 (define-public java-jsch-agentproxy-usocket-nc
12452 (package
12453 (inherit java-jsch-agentproxy-core)
12454 (name "java-jsch-agentproxy-usocket-nc")
12455 (arguments
12456 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12457 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12458 #:tests? #f)); no tests
12459 (inputs
12460 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12461 (synopsis "USocketFactory implementation using netcat")
12462 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12463 and Pageant included in Putty. This component contains an implementation of
12464 USocketFactory using netcat.")))
12465
12466 (define-public java-jsch-agentproxy-connector-factory
12467 (package
12468 (inherit java-jsch-agentproxy-core)
12469 (name "java-jsch-agentproxy-connector-factory")
12470 (arguments
12471 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12472 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12473 #:tests? #f)); no tests
12474 (inputs
12475 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12476 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12477 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12478 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12479 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12480 (synopsis "Connector factory for jsch agent proxy")
12481 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12482 and Pageant included in Putty. This component contains a connector factory.")))
12483
12484 (define-public java-jsch-agentproxy-jsch
12485 (package
12486 (inherit java-jsch-agentproxy-core)
12487 (name "java-jsch-agentproxy-jsch")
12488 (arguments
12489 `(#:jar-name "jsch-agentproxy-jsch.jar"
12490 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12491 #:tests? #f)); no tests
12492 (inputs
12493 `(("java-jsch" ,java-jsch)
12494 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12495 (synopsis "JSch integration library for agentproxy")
12496 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12497 and Pageant included in Putty. This component contains a library to use
12498 jsch-agent-proxy with JSch.")))
12499
12500 (define-public java-apache-ivy
12501 (package
12502 (name "java-apache-ivy")
12503 (version "2.4.0")
12504 (source (origin
12505 (method url-fetch)
12506 (uri (string-append "mirror://apache//ant/ivy/" version
12507 "/apache-ivy-" version "-src.tar.gz"))
12508 (sha256
12509 (base32
12510 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12511 (patches
12512 (search-patches
12513 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12514 (build-system ant-build-system)
12515 (arguments
12516 `(#:jar-name "ivy.jar"
12517 #:tests? #f
12518 #:phases
12519 (modify-phases %standard-phases
12520 (add-before 'build 'remove-example
12521 (lambda _
12522 (delete-file-recursively "src/example")
12523 #t))
12524 (add-before 'build 'copy-resources
12525 (lambda _
12526 (with-directory-excursion "src/java"
12527 (for-each (lambda (file)
12528 (install-file file (string-append "../../build/classes/" (dirname file))))
12529 (append
12530 (find-files "." ".*.css")
12531 (find-files "." ".*.ent")
12532 (find-files "." ".*.html")
12533 (find-files "." ".*.properties")
12534 (find-files "." ".*.xsd")
12535 (find-files "." ".*.xsl")
12536 (find-files "." ".*.xml"))))
12537 #t))
12538 (add-before 'build 'fix-vfs
12539 (lambda _
12540 (substitute*
12541 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12542 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12543 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12544 #t))
12545 (add-before 'install 'copy-manifest
12546 (lambda _
12547 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12548 #t))
12549 (add-before 'install 'repack
12550 (lambda _
12551 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12552 "-C" "build/classes" ".")))
12553 (add-after 'install 'install-bin
12554 (lambda* (#:key outputs #:allow-other-keys)
12555 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12556 (ivy (string-append bin "/ivy"))
12557 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12558 (mkdir-p bin)
12559 (with-output-to-file ivy
12560 (lambda _
12561 (display (string-append
12562 "#!" (which "sh") "\n"
12563 "if [[ -z $CLASSPATH ]]; then\n"
12564 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12565 "else\n"
12566 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12567 "fi\n"
12568 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12569 (chmod ivy #o755)
12570 #t))))))
12571 (inputs
12572 `(("java-bouncycastle" ,java-bouncycastle)
12573 ("java-commons-cli" ,java-commons-cli)
12574 ("java-commons-collections" ,java-commons-collections)
12575 ("java-commons-httpclient" ,java-commons-httpclient)
12576 ("java-commons-lang" ,java-commons-lang)
12577 ("java-commons-vfs" ,java-commons-vfs)
12578 ("java-jakarta-oro" ,java-jakarta-oro)
12579 ("java-jsch" ,java-jsch)
12580 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12581 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12582 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12583 ("java-junit" ,java-junit)))
12584 (home-page "https://ant.apache.org/ivy")
12585 (synopsis "Dependency manager for the Java programming language")
12586 (description "Ivy is a tool for managing (recording, tracking, resolving
12587 and reporting) project dependencies. It is characterized by the following:
12588
12589 @itemize
12590 @item flexibility and configurability - Ivy is essentially process agnostic
12591 and is not tied to any methodology or structure. Instead it provides the
12592 necessary flexibility and configurability to be adapted to a broad range
12593 of dependency management and build processes.
12594 @item tight integration with Apache Ant - while available as a standalone tool,
12595 Ivy works particularly well with Apache Ant providing a number of
12596 powerful Ant tasks ranging from dependency resolution to dependency
12597 reporting and publication.
12598 @end itemize")
12599 (license license:asl2.0)))
12600
12601 (define-public java-eclipse-sisu-inject
12602 (package
12603 (name "java-eclipse-sisu-inject")
12604 (version "0.3.4")
12605 (source (origin
12606 (method git-fetch)
12607 (uri (git-reference
12608 (url "https://github.com/eclipse/sisu.inject/")
12609 (commit (string-append "releases/" version))))
12610 (file-name (git-file-name name version))
12611 (sha256
12612 (base32
12613 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12614 (build-system ant-build-system)
12615 (arguments
12616 `(#:jar-name "eclipse-sisu-inject.jar"
12617 #:source-dir "org.eclipse.sisu.inject/src"
12618 #:tests? #f; no tests
12619 #:phases
12620 (modify-phases %standard-phases
12621 (replace 'install
12622 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12623 (propagated-inputs
12624 `(("java-guice" ,java-guice)
12625 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12626 (inputs
12627 `(("java-guice-servlet" ,java-guice-servlet)
12628 ("java-javax-inject" ,java-javax-inject)
12629 ("java-javaee-servletapi" ,java-javaee-servletapi)
12630 ("java-junit" ,java-junit)
12631 ("java-slf4j-api" ,java-slf4j-api)
12632 ("java-jsr305" ,java-jsr305)
12633 ("java-jsr250" ,java-jsr250)
12634 ("java-cdi-api" ,java-cdi-api)
12635 ("java-osgi-framework" ,java-osgi-framework)
12636 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12637 ("java-testng" ,java-testng)))
12638 (home-page "https://www.eclipse.org/sisu/")
12639 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12640 (description "Sisu is a modular JSR330-based container that supports
12641 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12642 Google-Guice to perform dependency injection and provide the core JSR330
12643 support, but removes the need to write explicit bindings in Guice modules.
12644 Integration with other containers via the Eclipse Extension Registry and the
12645 OSGi Service Registry is a goal of this project.")
12646 (license license:epl1.0)))
12647
12648 (define java-sisu-inject-parent-pom
12649 (package
12650 (inherit java-eclipse-sisu-inject)
12651 (name "java-sisu-inject-parent-pom")
12652 (arguments
12653 `(#:tests? #f
12654 #:phases
12655 (modify-phases %standard-phases
12656 (delete 'configure)
12657 (delete 'build)
12658 (replace 'install
12659 (install-pom-file "pom.xml")))))
12660 (propagated-inputs '())))
12661
12662 (define-public java-eclipse-sisu-plexus
12663 (package
12664 (name "java-eclipse-sisu-plexus")
12665 (version "0.3.4")
12666 (source (origin
12667 (method git-fetch)
12668 (uri (git-reference
12669 (url "https://github.com/eclipse/sisu.plexus")
12670 (commit (string-append "releases/" version))))
12671 (file-name (git-file-name name version))
12672 (sha256
12673 (base32
12674 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12675 (modules '((guix build utils)))
12676 (snippet
12677 '(begin
12678 (for-each delete-file (find-files "." ".*.jar"))
12679 (rename-file "org.eclipse.sisu.plexus.tests/src"
12680 "org.eclipse.sisu.plexus.tests/java")
12681 #t))))
12682 (build-system ant-build-system)
12683 (arguments
12684 `(#:jar-name "eclipse-sisu-plexus.jar"
12685 #:source-dir "org.eclipse.sisu.plexus/src"
12686 #:test-dir "org.eclipse.sisu.plexus.tests"
12687 #:test-exclude
12688 (list
12689 ;; This test fails probably because we can't generate the necessary
12690 ;; meta-inf files.
12691 "**/PlexusLoggingTest.*"
12692 ;; FIXME: This test fails because of some injection error
12693 "**/PlexusRequirementTest.*")
12694 #:jdk ,icedtea-8
12695 #:phases
12696 (modify-phases %standard-phases
12697 (add-before 'build 'copy-resources
12698 (lambda _
12699 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12700 "build/classes/META-INF/plexus")
12701 #t))
12702 (add-before 'check 'build-test-jar
12703 (lambda _
12704 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
12705 (mkdir "build")
12706 (with-directory-excursion "java"
12707 (apply invoke "javac" "-cp"
12708 (string-append (getenv "CLASSPATH")
12709 ":../../../../../build/classes")
12710 (find-files "." ".*.java"))
12711 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
12712 (find-files "." ".*.jar")))
12713 (mkdir-p "build/META-INF/plexus")
12714 (copy-file "resources/META-INF/plexus/components.xml"
12715 "build/META-INF/plexus/components.xml")
12716 (with-directory-excursion "build"
12717 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
12718 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
12719 (copy-recursively "META-INF" "../build/test-classes/META-INF")
12720 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
12721 (("resources/component-jar")
12722 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
12723 #t))
12724 (replace 'install
12725 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
12726 (propagated-inputs
12727 `(("java-plexus-classworlds" ,java-plexus-classworlds)
12728 ("java-plexus-utils" ,java-plexus-utils)
12729 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
12730 ("java-cdi-api" ,java-cdi-api)
12731 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
12732 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
12733 (inputs
12734 `(("java-osgi-framework" ,java-osgi-framework)
12735 ("java-slf4j-api" ,java-slf4j-api)
12736 ("java-javax-inject" ,java-javax-inject)
12737 ("java-guice" ,java-guice)
12738 ("java-guava" ,java-guava)
12739 ("java-aopalliance" ,java-aopalliance)
12740 ("java-asm" ,java-asm)
12741 ("java-cglib" ,java-cglib)))
12742 (native-inputs
12743 `(("java-junit" ,java-junit)))
12744 (home-page "https://www.eclipse.org/sisu/")
12745 (synopsis "Plexus support for the sisu container")
12746 (description "Sisu is a modular JSR330-based container that supports
12747 classpath scanning, auto-binding, and dynamic auto-wiring. This package
12748 adds Plexus support to the Sisu-Inject container.")
12749 (license license:epl1.0)))
12750
12751 (define java-sisu-plexus-parent-pom
12752 (package
12753 (inherit java-eclipse-sisu-plexus)
12754 (name "java-sisu-plexus-parent-pom")
12755 (arguments
12756 `(#:tests? #f
12757 #:phases
12758 (modify-phases %standard-phases
12759 (delete 'configure)
12760 (delete 'build)
12761 (replace 'install
12762 (install-pom-file "pom.xml")))))
12763 (propagated-inputs
12764 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
12765
12766 (define-public java-commons-compiler
12767 (package
12768 (name "java-commons-compiler")
12769 (version "3.0.8")
12770 (source (origin
12771 (method git-fetch)
12772 (uri (git-reference
12773 (url "https://github.com/janino-compiler/janino")
12774 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
12775 (file-name (string-append name "-" version))
12776 (sha256
12777 (base32
12778 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
12779 (modules '((guix build utils)))
12780 (snippet
12781 '(begin
12782 (for-each delete-file
12783 (find-files "." "\\.jar$"))
12784 #t))))
12785 (build-system ant-build-system)
12786 (arguments
12787 `(#:jar-name "commons-compiler.jar"
12788 #:source-dir "commons-compiler/src/main"
12789 #:tests? #f)); no tests
12790 (home-page "https://github.com/janino-compiler/janino")
12791 (synopsis "Java compiler")
12792 (description "Commons-compiler contains an API for janino, including the
12793 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
12794 and @code{ISimpleCompiler} interfaces.")
12795 (license license:bsd-3)))
12796
12797 (define-public java-janino
12798 (package
12799 (inherit java-commons-compiler)
12800 (name "java-janino")
12801 (arguments
12802 `(#:jar-name "janino.jar"
12803 #:source-dir "src/main/java"
12804 #:phases
12805 (modify-phases %standard-phases
12806 (add-before 'configure 'chdir
12807 (lambda _
12808 (chdir "janino")
12809 #t)))))
12810 (inputs
12811 `(("java-commons-compiler" ,java-commons-compiler)))
12812 (native-inputs
12813 `(("java-junit" ,java-junit)
12814 ("java-hamcrest-core" ,java-hamcrest-core)))
12815 (description "Janino is a Java compiler. Janino can compile a set of
12816 source files to a set of class files like @code{javac}, but also compile a
12817 Java expression, block, class body or source file in memory, load the bytecode
12818 and execute it directly in the same JVM. @code{janino} can also be used for
12819 static code analysis or code manipulation.")))
12820
12821 (define-public java-logback-core
12822 (package
12823 (name "java-logback-core")
12824 (version "1.2.3")
12825 (source (origin
12826 (method url-fetch)
12827 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
12828 version ".tar.gz"))
12829 (file-name (string-append name "-" version ".tar.gz"))
12830 (sha256
12831 (base32
12832 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
12833 (modules '((guix build utils)))
12834 (snippet
12835 '(begin
12836 (delete-file-recursively "logback-access/lib")
12837 #t))))
12838 (build-system ant-build-system)
12839 (arguments
12840 `(#:jar-name "logback.jar"
12841 #:source-dir "src/main/java"
12842 #:test-dir "src/test"
12843 #:test-exclude
12844 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
12845 ;; which creates FastClasses
12846 (list "**/AllCoreTest.*"
12847 "**/AutoFlushingObjectWriterTest.*"
12848 "**/PackageTest.*"
12849 "**/ResilientOutputStreamTest.*"
12850 ;; And we still don't want to run abstract classes
12851 "**/Abstract*.*")
12852 #:phases
12853 (modify-phases %standard-phases
12854 (add-before 'configure 'chdir
12855 (lambda _
12856 (chdir "logback-core")
12857 #t)))))
12858 (inputs
12859 `(("java-javax-mail" ,java-javax-mail)
12860 ("servlet" ,java-javaee-servletapi)
12861 ("java-commons-compiler" ,java-commons-compiler)
12862 ("java-janino" ,java-janino)))
12863 (native-inputs
12864 `(("java-junit" ,java-junit)
12865 ("java-hamcrest-core" ,java-hamcrest-core)
12866 ("java-mockito-1" ,java-mockito-1)
12867 ("java-cglib" ,java-cglib)
12868 ("java-asm" ,java-asm)
12869 ("java-objenesis" ,java-objenesis)
12870 ("java-joda-time" ,java-joda-time)))
12871 (home-page "https://logback.qos.ch")
12872 (synopsis "Logging for java")
12873 (description "Logback is intended as a successor to the popular log4j project.
12874 This module lays the groundwork for the other two modules.")
12875 ;; Either epl1.0 or lgpl2.1
12876 (license (list license:epl1.0
12877 license:lgpl2.1))))
12878
12879 (define-public java-logback-classic
12880 (package
12881 (inherit java-logback-core)
12882 (name "java-logback-classic")
12883 (arguments
12884 `(#:jar-name "logback-classic.jar"
12885 #:source-dir "src/main/java"
12886 #:test-dir "src/test"
12887 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
12888 #:jdk ,icedtea-8
12889 #:phases
12890 (modify-phases %standard-phases
12891 (add-before 'configure 'chdir
12892 (lambda _
12893 (chdir "logback-classic")
12894 #t))
12895 (replace 'build
12896 (lambda* (#:key inputs #:allow-other-keys)
12897 (mkdir-p "build/classes")
12898 (setenv "CLASSPATH"
12899 (string-join
12900 (apply append (map (lambda (input)
12901 (find-files (assoc-ref inputs input)
12902 ".*.jar"))
12903 '("java-logback-core" "java-slf4j-api"
12904 "java-commons-compiler" "servlet"
12905 "groovy")))
12906 ":"))
12907 (apply invoke "groovyc" "-d" "build/classes" "-j"
12908 (find-files "src/main/" ".*\\.(groovy|java)$"))
12909 (invoke "ant" "jar")
12910 #t)))))
12911 (inputs
12912 `(("java-logback-core" ,java-logback-core)
12913 ("java-slf4j-api" ,java-slf4j-api)
12914 ,@(package-inputs java-logback-core)))
12915 (native-inputs
12916 `(("groovy" ,groovy)))
12917 (description "Logback is intended as a successor to the popular log4j project.
12918 This module can be assimilated to a significantly improved version of log4j.
12919 Moreover, @code{logback-classic} natively implements the slf4j API so that you
12920 can readily switch back and forth between logback and other logging frameworks
12921 such as log4j or @code{java.util.logging} (JUL).")))
12922
12923 (define-public java-jgit
12924 (package
12925 (name "java-jgit")
12926 (version "4.7.0.201704051617-r")
12927 (source (origin
12928 (method url-fetch)
12929 (uri (string-append "https://repo1.maven.org/maven2/"
12930 "org/eclipse/jgit/org.eclipse.jgit/"
12931 version "/org.eclipse.jgit-"
12932 version "-sources.jar"))
12933 (sha256
12934 (base32
12935 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
12936 (build-system ant-build-system)
12937 (arguments
12938 `(#:tests? #f ; There are no tests to run.
12939 #:jar-name "jgit.jar"
12940 ;; JGit must be built with a JDK supporting Java 8.
12941 #:jdk ,icedtea-8
12942 ;; Target our older default JDK.
12943 #:make-flags (list "-Dtarget=1.7")
12944 #:phases
12945 (modify-phases %standard-phases
12946 ;; The jar file generated by the default build.xml does not include
12947 ;; the text properties files, so we need to add them.
12948 (add-after 'build 'add-properties
12949 (lambda* (#:key jar-name #:allow-other-keys)
12950 (with-directory-excursion "src"
12951 (apply invoke "jar" "-uf"
12952 (string-append "../build/jar/" jar-name)
12953 (find-files "." "\\.properties$")))
12954 #t)))))
12955 (inputs
12956 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
12957 ("java-javaewah" ,java-javaewah)
12958 ("java-jsch" ,java-jsch)
12959 ("java-slf4j-api" ,java-slf4j-api)))
12960 (home-page "https://eclipse.org/jgit/")
12961 (synopsis "Java library implementing the Git version control system")
12962 (description "JGit is a lightweight, pure Java library implementing the
12963 Git version control system, providing repository access routines, support for
12964 network protocols, and core version control algorithms.")
12965 (license license:edl1.0)))
12966
12967 ;; For axoloti. This package can still be built with icedtea-7, which is
12968 ;; currently used as the default JDK.
12969 (define-public java-jgit-4.2
12970 (package (inherit java-jgit)
12971 (version "4.2.0.201601211800-r")
12972 (source (origin
12973 (method url-fetch)
12974 (uri (string-append "https://repo1.maven.org/maven2/"
12975 "org/eclipse/jgit/org.eclipse.jgit/"
12976 version "/org.eclipse.jgit-"
12977 version "-sources.jar"))
12978 (sha256
12979 (base32
12980 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
12981 (build-system ant-build-system)
12982 (arguments
12983 (substitute-keyword-arguments (package-arguments java-jgit)
12984 ;; Build for default JDK.
12985 ((#:jdk _) icedtea-7)
12986 ((#:phases phases)
12987 `(modify-phases ,phases
12988 (add-after 'unpack 'use-latest-javaewah-API
12989 (lambda _
12990 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
12991 (("wordinbits") "WORD_IN_BITS"))
12992 #t))))))
12993 (inputs
12994 `(("java-javaewah" ,java-javaewah)
12995 ("java-jsch" ,java-jsch)
12996 ("java-slf4j-api" ,java-slf4j-api)))))
12997
12998 (define-public abcl
12999 (package
13000 (name "abcl")
13001 (version "1.6.0")
13002 (source
13003 (origin
13004 (method url-fetch)
13005 (uri (string-append "https://abcl.org/releases/"
13006 version "/abcl-src-" version ".tar.gz"))
13007 (sha256
13008 (base32
13009 "0hvbcsffr8n2xwdixc8wyw1bfl9fxn2gyy0c4nma7j9zbn0wwgw9"))
13010 (patches
13011 (search-patches
13012 "abcl-fix-build-xml.patch"))))
13013 (build-system ant-build-system)
13014 (native-inputs
13015 `(("java-junit" ,java-junit)))
13016 (arguments
13017 `(#:build-target "abcl.jar"
13018 #:test-target "abcl.test"
13019 #:phases
13020 (modify-phases %standard-phases
13021 (replace 'install
13022 (lambda* (#:key outputs #:allow-other-keys)
13023 (let ((share (string-append (assoc-ref outputs "out")
13024 "/share/java/"))
13025 (bin (string-append (assoc-ref outputs "out")
13026 "/bin/")))
13027 (mkdir-p share)
13028 (install-file "dist/abcl.jar" share)
13029 (install-file "dist/abcl-contrib.jar" share)
13030 (mkdir-p bin)
13031 (with-output-to-file (string-append bin "abcl")
13032 (lambda _
13033 (let ((classpath (string-append
13034 share "abcl.jar"
13035 ":"
13036 share "abcl-contrib.jar")))
13037 (display (string-append
13038 "#!" (which "sh") "\n"
13039 "if [[ -z $CLASSPATH ]]; then\n"
13040 " cp=\"" classpath "\"\n"
13041 "else\n"
13042 " cp=\"" classpath ":$CLASSPATH\"\n"
13043 "fi\n"
13044 "exec " (which "java")
13045 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13046 (chmod (string-append bin "abcl") #o755)
13047 #t))))))
13048 (home-page "https://abcl.org/")
13049 (synopsis "Common Lisp Implementation on the JVM")
13050 (description
13051 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13052 Lisp language featuring both an interpreter and a compiler, running in the
13053 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13054 in any Java application. Additionally, it can be used to implement (parts of)
13055 the application using Java to Lisp integration APIs.")
13056 (license (list license:gpl2+
13057 ;; named-readtables is released under 3 clause BSD
13058 license:bsd-3
13059 ;; jfli is released under CPL 1.0
13060 license:cpl1.0))))
13061
13062 (define-public java-jsonp-api
13063 (package
13064 (name "java-jsonp-api")
13065 (version "1.1.6")
13066 (source (origin
13067 (method git-fetch)
13068 (uri (git-reference
13069 (url "https://github.com/eclipse-ee4j/jsonp")
13070 (commit (string-append "1.1-" version "-RELEASE"))))
13071 (file-name (git-file-name name version))
13072 (sha256
13073 (base32
13074 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13075 (build-system ant-build-system)
13076 (arguments
13077 `(#:jar-name "jsonp-api.jar"
13078 #:tests? #f
13079 #:source-dir "api/src/main/java"
13080 #:test-dir "api/src/test"))
13081 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13082 (synopsis "JSON Processing in Java")
13083 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13084 parse, generate, transform and query) JSON messages. It produces and
13085 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13086 and allows building a Java object model for JSON text using API classes
13087 (similar to DOM API for XML).")
13088 ;; either gpl2 only with classpath exception, or epl2.0.
13089 (license (list license:gpl2
13090 license:epl2.0))))
13091
13092 (define-public java-jsonp-impl
13093 (package
13094 (inherit java-jsonp-api)
13095 (name "java-jsonp-impl")
13096 (arguments
13097 `(#:jar-name "jsonp-impl.jar"
13098 #:tests? #f
13099 #:source-dir "impl/src/main/java"
13100 #:test-dir "impl/src/test"
13101 #:phases
13102 (modify-phases %standard-phases
13103 (add-before 'build 'copy-resources
13104 (lambda _
13105 (copy-recursively
13106 "impl/src/main/resources/"
13107 "build/classes")
13108 #t)))))
13109 (propagated-inputs
13110 `(("java-jsonp-api" ,java-jsonp-api)))
13111 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13112 parse, generate, transform and query) JSON messages. This package contains
13113 a reference implementation of that API.")))
13114
13115 (define-public java-xmp
13116 (package
13117 (name "java-xmp")
13118 (version "5.1.3")
13119 (source (origin
13120 (method url-fetch)
13121 (uri (string-append "http://download.macromedia.com/pub/developer"
13122 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13123 (sha256
13124 (base32
13125 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13126 (build-system ant-build-system)
13127 (arguments
13128 `(#:build-target "build"
13129 #:tests? #f; no tests
13130 #:phases
13131 (modify-phases %standard-phases
13132 (add-after 'unpack 'chdir
13133 (lambda _
13134 (chdir "XMPCore")
13135 #t))
13136 (add-before 'build 'fix-timestamp
13137 (lambda _
13138 (substitute* "build.xml"
13139 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13140 #t))
13141 (replace 'install
13142 (install-jars "."))
13143 (add-after 'install 'install-doc
13144 (lambda* (#:key outputs #:allow-other-keys)
13145 (copy-recursively
13146 "docs"
13147 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13148 #t)))))
13149 (native-inputs
13150 `(("unzip" ,unzip)))
13151 (home-page "https://www.adobe.com/devnet/xmp.html")
13152 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13153 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13154 technology that allows you to embed data about a file, known as metadata,
13155 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13156 library and the API is similar.")
13157 (license license:bsd-3)))
13158
13159 (define-public java-metadata-extractor
13160 (package
13161 (name "java-metadata-extractor")
13162 (version "2.11.0")
13163 (source (origin
13164 (method git-fetch)
13165 (uri (git-reference
13166 (url "https://github.com/drewnoakes/metadata-extractor")
13167 (commit version)))
13168 (file-name (git-file-name name version))
13169 (sha256
13170 (base32
13171 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13172 (build-system ant-build-system)
13173 (arguments
13174 `(#:jar-name "metadata-extractor.jar"
13175 #:source-dir "Source"
13176 #:test-dir "Tests"
13177 #:phases
13178 (modify-phases %standard-phases
13179 (add-before 'check 'fix-test-dir
13180 (lambda _
13181 (substitute* "build.xml"
13182 (("/java\">") "\">"))
13183 #t)))))
13184 (propagated-inputs
13185 `(("java-xmp" ,java-xmp)))
13186 (native-inputs
13187 `(("java-hamcrest-core" ,java-hamcrest-core)
13188 ("java-junit" ,java-junit)))
13189 (home-page "https://github.com/drewnoakes/metadata-extractor")
13190 (synopsis "Extract metadata from image and video files")
13191 (description "Metadata-extractor is a straightforward Java library for
13192 reading metadata from image files. It is able to read metadata in Exif,
13193 IPTC, XMP, ICC and more formats.")
13194 (license license:asl2.0)))
13195
13196 (define-public java-svg-salamander
13197 (package
13198 (name "java-svg-salamander")
13199 (version "1.1.2")
13200 (source (origin
13201 (method git-fetch)
13202 (uri (git-reference
13203 (url "https://github.com/blackears/svgSalamander")
13204 (commit (string-append "v" version))))
13205 (file-name (git-file-name name version))
13206 (sha256
13207 (base32
13208 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13209 (modules '((guix build utils)))
13210 (snippet
13211 '(begin
13212 (for-each delete-file (find-files "." ".*.jar"))
13213 #t))
13214 (patches
13215 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13216 (build-system ant-build-system)
13217 (arguments
13218 `(#:tests? #f; no tests
13219 #:phases
13220 (modify-phases %standard-phases
13221 (add-after 'unpack 'chdir
13222 (lambda _
13223 (chdir "svg-core")
13224 #t))
13225 (add-before 'build 'copy-jars
13226 (lambda* (#:key inputs #:allow-other-keys)
13227 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13228 "../libraries/javacc.jar")
13229 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13230 "../libraries/ant.jar")
13231 #t))
13232 (replace 'install
13233 (install-jars "dist")))))
13234 (native-inputs
13235 `(("javacc" ,javacc)))
13236 (home-page "https://github.com/blackears/svgSalamander")
13237 (synopsis "SVG engine for Java")
13238 (description "SVG Salamander is an SVG engine for Java that's designed
13239 to be small, fast, and allow programmers to use it with a minimum of fuss.
13240 It's in particular targeted for making it easy to integrate SVG into Java
13241 games and making it much easier for artists to design 2D game content - from
13242 rich interactive menus to charts and graphcs to complex animations.")
13243 (license license:bsd-2)))
13244
13245 (define-public java-jboss-transaction-api-spec
13246 (package
13247 (name "java-jboss-transaction-api-spec")
13248 (version "1.2+1.1.1")
13249 (source (origin
13250 (method git-fetch)
13251 (uri (git-reference
13252 (url "https://github.com/jboss/jboss-transaction-api_spec")
13253 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13254 (file-name (git-file-name name version))
13255 (sha256
13256 (base32
13257 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13258 (build-system ant-build-system)
13259 (arguments
13260 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13261 #:source-dir "src/main/java"
13262 #:tests? #f)); no tests
13263 (inputs
13264 `(("java-cdi-api" ,java-cdi-api)
13265 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13266 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13267 (synopsis "Generic transaction management API in Java")
13268 (description "Java-jboss-transaction-api-spec implements the Transactions
13269 API. A transaction is a unit of work containing one or more operations
13270 involving one or more shared resources having ACID (Atomicity, Consistency,
13271 Isolation and Durability) properties.")
13272 ;; either gpl2 only with classpath exception or cddl.
13273 (license (list license:gpl2 license:cddl1.0))))
13274
13275 (define-public java-picocli
13276 (package
13277 (name "java-picocli")
13278 (version "4.3.2")
13279 (source (origin
13280 (method git-fetch)
13281 (uri (git-reference
13282 (url "https://github.com/remkop/picocli")
13283 (commit (string-append "v" version))))
13284 (file-name (git-file-name name version))
13285 (sha256
13286 (base32
13287 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13288 (build-system ant-build-system)
13289 (arguments
13290 `(#:jar-name "picocli.jar"
13291 #:source-dir "src/main/java"
13292 ;; Tests require missing dependencies (junitparams, system-rules)
13293 #:tests? #f))
13294 (home-page "https://picocli.info")
13295 (synopsis "REPL for the JVM")
13296 (description "Picocli is a framework for building command line applications
13297 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13298 in Java, usable from Groovy, Kotlin, Scala, etc.")
13299 (license license:asl2.0)))
13300
13301 (define-public java-jetbrains-annotations
13302 (package
13303 (name "java-jetbrains-annotations")
13304 (version "19.0.0")
13305 (source (origin
13306 (method git-fetch)
13307 (uri (git-reference
13308 (url "https://github.com/JetBrains/java-annotations")
13309 (commit version)))
13310 (file-name (git-file-name name version))
13311 (sha256
13312 (base32
13313 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13314 (build-system ant-build-system)
13315 (arguments
13316 `(#:jar-name "jetbrains-annotations.jar"
13317 #:source-dir "common/src/main/java:java8/src/main/java"
13318 #:tests? #f)); no tests
13319 (home-page "https://github.com/JetBrains/java-annotations")
13320 (synopsis "Annotations for Java and other JVM languages")
13321 (description "This package contains a set of Java annotations which can be
13322 used in JVM-based languages. They serve as an additional documentation and
13323 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13324 (license license:expat)))