news: Add 'de' translation.
[jackhill/guix/guix.git] / gnu / packages / java.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 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, 2021 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 ;;; Copyright © 2021 Vincent Legoll <vincent.legoll@gmail.com>
18 ;;;
19 ;;; This file is part of GNU Guix.
20 ;;;
21 ;;; GNU Guix is free software; you can redistribute it and/or modify it
22 ;;; under the terms of the GNU General Public License as published by
23 ;;; the Free Software Foundation; either version 3 of the License, or (at
24 ;;; your option) any later version.
25 ;;;
26 ;;; GNU Guix is distributed in the hope that it will be useful, but
27 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
28 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
29 ;;; GNU General Public License for more details.
30 ;;;
31 ;;; You should have received a copy of the GNU General Public License
32 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33
34 (define-module (gnu packages java)
35 #:use-module ((guix licenses) #:prefix license:)
36 #:use-module (guix packages)
37 #:use-module (guix download)
38 #:use-module (guix hg-download)
39 #:use-module (guix git-download)
40 #:use-module (guix svn-download)
41 #:use-module ((guix build utils) #:select (alist-replace))
42 #:use-module (guix utils)
43 #:use-module (guix build-system ant)
44 #:use-module (guix build-system gnu)
45 #:use-module (guix build-system trivial)
46 #:use-module (gnu packages)
47 #:use-module (gnu packages attr)
48 #:use-module (gnu packages autotools)
49 #:use-module (gnu packages base)
50 #:use-module (gnu packages bash)
51 #:use-module (gnu packages certs)
52 #:use-module (gnu packages cpio)
53 #:use-module (gnu packages cups)
54 #:use-module (gnu packages compression)
55 #:use-module (gnu packages elf)
56 #:use-module (gnu packages fontutils)
57 #:use-module (gnu packages gawk)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages gl)
60 #:use-module (gnu packages ghostscript) ;lcms
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages groovy)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages icu4c)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages java-compression)
68 #:use-module (gnu packages libffi)
69 #:use-module (gnu packages linux) ;alsa
70 #:use-module (gnu packages maths)
71 #:use-module (gnu packages maven)
72 #:use-module (gnu packages maven-parent-pom)
73 #:use-module (gnu packages nss)
74 #:use-module (gnu packages onc-rpc)
75 #:use-module (gnu packages web)
76 #:use-module (gnu packages wget)
77 #:use-module (gnu packages pkg-config)
78 #:use-module (gnu packages perl)
79 #:use-module (gnu packages popt)
80 #:use-module (gnu packages kerberos)
81 #:use-module (gnu packages xml)
82 #:use-module (gnu packages xorg)
83 #:use-module (gnu packages texinfo)
84 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
85 #:use-module (srfi srfi-11)
86 #:use-module (ice-9 match))
87
88 \f
89 ;;;
90 ;;; Java bootstrap toolchain.
91 ;;;
92
93 ;; The Java bootstrap begins with Jikes, a Java compiler written in C++. We
94 ;; use it to build a simple version of GNU Classpath, the Java standard
95 ;; library. We chose version 0.93 because it is the last version that can be
96 ;; built with Jikes. With Jikes and this version of GNU Classpath we can
97 ;; build JamVM, a Java Virtual Machine. We build version 1.5.1 because it is
98 ;; the last version of JamVM that works with a version of GNU classpath that
99 ;; does not require ECJ. These three packages make up the bootstrap JDK.
100
101 ;; This is sufficient to build an older version of Ant, which is needed to
102 ;; build an older version of ECJ, an incremental Java compiler, both of which
103 ;; are written in Java.
104 ;;
105 ;; ECJ is needed to build the latest release (0.99) and the development
106 ;; version of GNU Classpath. The development version of GNU Classpath has
107 ;; much more support for Java 1.6 than the latest release, but we need to
108 ;; build 0.99 first to get a working version of javah. ECJ, the development
109 ;; version of GNU Classpath, and the latest version of JamVM make up the
110 ;; second stage JDK with which we can build the OpenJDK with the Icedtea 1.x
111 ;; build framework. We then build the more recent JDKs Icedtea 2.x and
112 ;; Icedtea 3.x.
113
114 (define-public libantlr3c
115 (package
116 (name "libantlr3c")
117 (version "3.4")
118 (source
119 (origin
120 (method url-fetch)
121 (uri
122 (string-append "https://www.antlr3.org/download/C/"
123 name "-" version ".tar.gz"))
124 (sha256
125 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
126 (build-system gnu-build-system)
127 (arguments
128 `(#:configure-flags (list "--enable-debuginfo" "--disable-static")
129 #:phases (modify-phases %standard-phases
130 (replace 'configure
131 (lambda* (#:key build target native-inputs inputs outputs
132 (configure-flags '()) out-of-source? system
133 #:allow-other-keys)
134 (let ((configure (assoc-ref %standard-phases 'configure))
135 (enable-64bit? (member system '("aarch64-linux"
136 "x86_64-linux"
137 "mips64el-linux"))))
138 (configure #:build build #:target target
139 #:native-inputs native-inputs
140 #:inputs inputs #:outputs outputs
141 #:configure-flags `(,(if enable-64bit?
142 "--enable-64bit"
143 '())
144 ,@configure-flags)
145 #:out-of-source? out-of-source?)))))))
146 (synopsis "ANTLR C Library")
147 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
148 Tool for Language Recognition v3).")
149 (home-page "https://www.antlr3.org/")
150 (license license:bsd-3)))
151
152 (define jikes
153 (package
154 (name "jikes")
155 (version "1.22")
156 (source (origin
157 (method url-fetch)
158 (uri (string-append "mirror://sourceforge/jikes/Jikes/"
159 version "/jikes-" version ".tar.bz2"))
160 (sha256
161 (base32
162 "1qqldrp74pzpy5ly421srqn30qppmm9cvjiqdngk8hf47dv2rc0c"))))
163 (build-system gnu-build-system)
164 (home-page "http://jikes.sourceforge.net/")
165 (synopsis "Compiler for the Java language")
166 (description "Jikes is a compiler that translates Java source files as
167 defined in The Java Language Specification into the bytecoded instruction set
168 and binary format defined in The Java Virtual Machine Specification.")
169 (license license:ibmpl1.0)))
170
171 (define-public drip
172 ;; Last release is from 2014, with a few important commits afterwards.
173 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
174 (package
175 (name "drip")
176 (version (git-version "0.2.4" "1" commit))
177 (source (origin
178 (method git-fetch)
179 (uri (git-reference
180 (url "https://github.com/ninjudd/drip")
181 (commit commit)))
182 (file-name (git-file-name name version))
183 (sha256
184 (base32
185 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
186 (build-system gnu-build-system)
187 (native-inputs
188 `(("jdk" ,icedtea "jdk")))
189 (arguments
190 `(#:tests? #f ; No tests.
191 #:phases
192 (modify-phases %standard-phases
193 (delete 'configure)
194 (add-before 'install 'fix-wrapper
195 (lambda* (#:key inputs #:allow-other-keys)
196 (let ((jps (string-append (assoc-ref inputs "jdk") "/bin/jps")))
197 (substitute* "bin/drip"
198 (("jps") jps)
199 (("brew update && brew upgrade drip") "guix pull && guix install drip")
200 ;; No need to make:
201 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
202 ;; No need to include source:
203 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
204 "true"))
205 #t)))
206 (replace 'install
207 (lambda* (#:key outputs #:allow-other-keys)
208 (let* ((out (assoc-ref outputs "out"))
209 (bin (string-append out "/bin"))
210 (share (string-append out "/share/drip")))
211 (mkdir-p bin)
212 (for-each
213 (lambda (file)
214 (install-file (string-append "bin/" file) bin))
215 '("drip" "drip_daemon" "drip_proxy"))
216 (install-file "drip.jar" share)
217 (substitute* (string-append bin "/drip")
218 (("drip_dir=\\$bin_dir/..")
219 (string-append "drip_dir=" share)))
220 #t))))))
221 (home-page "https://github.com/ninjudd/drip")
222 (synopsis "Faster Java Virtual Machine launching")
223 (description "Drip is a launcher for the Java Virtual Machine that
224 provides much faster startup times than the @command{java} command. The @command{drip}
225 script is intended to be a drop-in replacement for the @command{java} command,
226 only faster.")
227 (license license:epl1.0))))
228
229 ;; This is the last version of GNU Classpath that can be built without ECJ.
230 (define classpath-bootstrap
231 (package
232 (name "classpath")
233 (version "0.93")
234 (source (origin
235 (method url-fetch)
236 (uri (string-append "mirror://gnu/classpath/classpath-"
237 version ".tar.gz"))
238 (sha256
239 (base32
240 "0i99wf9xd3hw1sj2sazychb9prx8nadxh2clgvk3zlmb28v0jbfz"))
241 (patches (search-patches "classpath-aarch64-support.patch"))))
242 (build-system gnu-build-system)
243 (arguments
244 `(#:configure-flags
245 (list (string-append "JAVAC="
246 (assoc-ref %build-inputs "jikes")
247 "/bin/jikes")
248 "--disable-Werror"
249 "--disable-gmp"
250 "--disable-gtk-peer"
251 "--disable-gconf-peer"
252 "--disable-plugin"
253 "--disable-dssi"
254 "--disable-alsa"
255 "--disable-gjdoc")
256 #:phases
257 (modify-phases %standard-phases
258 ;; XXX: This introduces a memory leak as we remove a call to free up
259 ;; memory for the file name string. This was necessary because of a
260 ;; runtime error that would have prevented us from building
261 ;; ant-bootstrap later. See https://issues.guix.gnu.org/issue/36685
262 ;; for the gnarly details.
263 (add-after 'unpack 'remove-call-to-free
264 (lambda _
265 (substitute* "native/jni/java-io/java_io_VMFile.c"
266 (("result = cpio_isFileExists.*" m)
267 (string-append m "\n//")))
268 #t))
269 (add-after 'install 'install-data
270 (lambda _ (invoke "make" "install-data"))))))
271 (native-inputs
272 `(("jikes" ,jikes)
273 ("fastjar" ,fastjar)
274 ("libltdl" ,libltdl)
275 ("pkg-config" ,pkg-config)))
276 (home-page "https://www.gnu.org/software/classpath/")
277 (synopsis "Essential libraries for Java")
278 (description "GNU Classpath is a project to create core class libraries
279 for use with runtimes, compilers and tools for the Java programming
280 language.")
281 ;; GPLv2 or later, with special linking exception.
282 (license license:gpl2+)))
283
284 ;; This is the last version of JamVM that works with a version of GNU
285 ;; classpath that does not require ECJ.
286 (define jamvm-1-bootstrap
287 (package
288 (name "jamvm")
289 (version "1.5.1")
290 (source (origin
291 (method url-fetch)
292 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
293 "JamVM%20" version "/jamvm-"
294 version ".tar.gz"))
295 (patches (search-patches "jamvm-1.5.1-aarch64-support.patch"
296 "jamvm-1.5.1-armv7-support.patch"))
297 (sha256
298 (base32
299 "06lhi03l3b0h48pc7x58bk9my2nrcf1flpmglvys3wyad6yraf36"))
300 (snippet
301 '(begin
302 ;; Remove precompiled software.
303 (delete-file "lib/classes.zip")
304 #t))))
305 (build-system gnu-build-system)
306 (arguments
307 `(#:configure-flags
308 (list (string-append "--with-classpath-install-dir="
309 (assoc-ref %build-inputs "classpath"))
310 "--disable-int-caching"
311 "--enable-runtime-reloc-checks"
312 "--enable-ffi")
313 #:phases
314 ,(if (string-prefix? "aarch64" (or (%current-system)
315 (%current-target-system)))
316 ;; Makefiles and the configure script need to be regenerated to
317 ;; incorporate support for AArch64.
318 '(modify-phases %standard-phases
319 (replace 'bootstrap
320 (lambda _ (invoke "autoreconf" "-vif"))))
321 '%standard-phases)))
322 (inputs
323 `(("classpath" ,classpath-bootstrap)
324 ("jikes" ,jikes)
325 ("libffi" ,libffi)
326 ("zip" ,zip)
327 ("zlib" ,zlib)))
328 (native-inputs
329 (if (string-prefix? "aarch64" (or (%current-system)
330 (%current-target-system)))
331 ;; Additional packages needed for autoreconf.
332 `(("autoconf" ,autoconf)
333 ("automake" ,automake)
334 ("libtool" ,libtool))
335 '()))
336 (home-page "http://jamvm.sourceforge.net/")
337 (synopsis "Small Java Virtual Machine")
338 (description "JamVM is a Java Virtual Machine conforming to the JVM
339 specification edition 2 (blue book). It is extremely small. However, unlike
340 other small VMs it supports the full spec, including object finalisation and
341 JNI.")
342 (license license:gpl2+)))
343
344 (define ant-bootstrap
345 (package
346 (name "ant-bootstrap")
347 ;; The 1.10.x series requires Java 8. 1.9.0 and later use generics, which
348 ;; are not supported. The 1.8.x series is the last to use only features
349 ;; supported by Jikes.
350 (version "1.8.4")
351 (source (origin
352 (method url-fetch)
353 (uri (string-append "mirror://apache/"
354 "ant/source/apache-ant-"
355 version "-src.tar.bz2"))
356 (sha256
357 (base32
358 "1cg0lga887qz5iizh6mlkxp01lciymrhmp7wzxpl6zpnldxmzrjx"))))
359 (build-system gnu-build-system)
360 (arguments
361 `(#:imported-modules ((guix build syscalls)
362 ,@%gnu-build-system-modules)
363 #:modules ((srfi srfi-1)
364 (guix build gnu-build-system)
365 (guix build utils)
366 (guix build syscalls))
367 #:tests? #f ; no "check" target
368 #:phases
369 (modify-phases %standard-phases
370 (delete 'bootstrap)
371 (delete 'configure)
372 (replace 'build
373 (lambda* (#:key inputs #:allow-other-keys)
374 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
375 (setenv "JAVACMD"
376 (string-append (assoc-ref inputs "jamvm")
377 "/bin/jamvm"))
378 (setenv "JAVAC"
379 (string-append (assoc-ref inputs "jikes")
380 "/bin/jikes"))
381 (setenv "CLASSPATH"
382 (string-append (assoc-ref inputs "jamvm")
383 "/lib/rt.jar"))
384
385 ;; Ant complains if this file doesn't exist.
386 (setenv "HOME" "/tmp")
387 (with-output-to-file "/tmp/.ant.properties"
388 (lambda _ (display "")))
389
390 ;; Use jikes instead of javac for <javac ...> tags in build.xml
391 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
392
393 ;; jikes produces lots of warnings, but they are not very
394 ;; interesting, so we silence them.
395 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
396
397 ;; Without these JamVM options the build may freeze.
398 (substitute* "bootstrap.sh"
399 (("^\"\\$\\{JAVACMD\\}\" " m)
400 ,@(if (string-prefix? "armhf" (or (%current-system)
401 (%current-target-system)))
402 `((string-append m "-Xnocompact "))
403 `((string-append m "-Xnocompact -Xnoinlining ")))))
404
405 ;; Disable tests because we are bootstrapping and thus don't have
406 ;; any of the dependencies required to build and run the tests.
407 (substitute* "build.xml"
408 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
409 (invoke "bash" "bootstrap.sh"
410 (string-append "-Ddist.dir="
411 (assoc-ref %outputs "out")))))
412 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
413 (lambda* (#:key outputs #:allow-other-keys)
414 (define (repack-archive jar)
415 (let* ((dir (mkdtemp! "jar-contents.XXXXXX"))
416 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
417 (with-directory-excursion dir
418 (invoke "unzip" jar))
419 (delete-file jar)
420 ;; XXX: copied from (gnu build install)
421 (for-each (lambda (file)
422 (let ((s (lstat file)))
423 (unless (eq? (stat:type s) 'symlink)
424 (utime file 0 0 0 0))))
425 (find-files dir #:directories? #t))
426 ;; It is important that the manifest appears first.
427 (with-directory-excursion dir
428 (let* ((files (find-files "." ".*" #:directories? #t))
429 ;; To ensure that the reference scanner can
430 ;; detect all store references in the jars
431 ;; we disable compression with the "-0" option.
432 (command (if (file-exists? manifest)
433 `("zip" "-0" "-X" ,jar ,manifest
434 ,@files)
435 `("zip" "-0" "-X" ,jar ,@files))))
436 (apply invoke command)))))
437 (for-each repack-archive
438 (find-files
439 (string-append (assoc-ref %outputs "out") "/lib")
440 "\\.jar$"))
441 #t))
442 (delete 'install))))
443 (native-inputs
444 `(("jikes" ,jikes)
445 ("jamvm" ,jamvm-1-bootstrap)
446 ("unzip" ,unzip)
447 ("zip" ,zip)))
448 (home-page "https://ant.apache.org")
449 (synopsis "Build tool for Java")
450 (description
451 "Ant is a platform-independent build tool for Java. It is similar to
452 make but is implemented using the Java language, requires the Java platform,
453 and is best suited to building Java projects. Ant uses XML to describe the
454 build process and its dependencies, whereas Make uses Makefile format.")
455 (license license:asl2.0)))
456
457 ;; Version 3.2.2 is the last version without a dependency on a full-fledged
458 ;; compiler for Java 1.5.
459 (define ecj-bootstrap
460 (package
461 (name "ecj-bootstrap")
462 (version "3.2.2")
463 (source (origin
464 (method url-fetch)
465 (uri (string-append "http://archive.eclipse.org/eclipse/"
466 "downloads/drops/R-" version
467 "-200702121330/ecjsrc.zip"))
468 (sha256
469 (base32
470 "05hj82kxd23qaglsjkaqcj944riisjha7acf7h3ljhrjyljx8307"))))
471 ;; It would be so much easier if we could use the ant-build-system, but we
472 ;; cannot as we don't have ant at this point. We use ecj for
473 ;; bootstrapping the JDK.
474 (build-system gnu-build-system)
475 (arguments
476 `(#:modules ((guix build gnu-build-system)
477 (guix build utils)
478 (srfi srfi-1))
479 #:tests? #f ; there are no tests
480 #:phases
481 (modify-phases %standard-phases
482 (replace 'configure
483 (lambda* (#:key inputs #:allow-other-keys)
484 (setenv "CLASSPATH"
485 (string-join
486 (cons (string-append (assoc-ref inputs "jamvm")
487 "/lib/rt.jar")
488 (find-files (string-append
489 (assoc-ref inputs "ant-bootstrap")
490 "/lib")
491 "\\.jar$"))
492 ":"))
493 #t))
494 (replace 'build
495 (lambda* (#:key inputs #:allow-other-keys)
496 ;; The unpack phase enters the "org" directory by mistake.
497 (chdir "..")
498
499 ;; Create a simple manifest to make ecj executable.
500 (with-output-to-file "manifest"
501 (lambda _
502 (display "Manifest-Version: 1.0
503 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n")))
504
505 ;; Compile it all!
506 (and (apply invoke "jikes"
507 (find-files "." "\\.java$"))
508 (invoke "fastjar" "cvfm"
509 "ecj-bootstrap.jar" "manifest" "."))))
510 (replace 'install
511 (lambda* (#:key outputs #:allow-other-keys)
512 (let ((share (string-append (assoc-ref outputs "out")
513 "/share/java/")))
514 (mkdir-p share)
515 (install-file "ecj-bootstrap.jar" share)
516 #t))))))
517 (native-inputs
518 `(("ant-bootstrap" ,ant-bootstrap)
519 ("unzip" ,unzip)
520 ("jikes" ,jikes)
521 ("jamvm" ,jamvm-1-bootstrap)
522 ("fastjar" ,fastjar)))
523 (home-page "https://eclipse.org")
524 (synopsis "Eclipse Java development tools core batch compiler")
525 (description "This package provides the Eclipse Java core batch compiler
526 for bootstrapping purposes. The @dfn{Eclipse compiler for Java} (ecj) is a
527 requirement for all GNU Classpath releases after version 0.93.")
528 (license license:epl1.0)))
529
530 (define ecj-javac-wrapper
531 (package (inherit ecj-bootstrap)
532 (name "ecj-javac-wrapper")
533 (source #f)
534 (build-system trivial-build-system)
535 (arguments
536 `(#:modules ((guix build utils))
537 #:builder
538 (begin
539 (use-modules (guix build utils))
540 (let* ((bin (string-append (assoc-ref %outputs "out") "/bin"))
541 (target (string-append bin "/javac"))
542 (guile (string-append (assoc-ref %build-inputs "guile")
543 "/bin/guile"))
544 (ecj (string-append (assoc-ref %build-inputs "ecj-bootstrap")
545 "/share/java/ecj-bootstrap.jar"))
546 (java (string-append (assoc-ref %build-inputs "jamvm")
547 "/bin/jamvm"))
548 (bootcp (let ((jvmlib (string-append (assoc-ref %build-inputs "classpath")
549 "/share/classpath")))
550 (string-append jvmlib "/glibj.zip:"
551 jvmlib "/tools.zip"))))
552 (mkdir-p bin)
553 (with-output-to-file target
554 (lambda _
555 (format #t "#!~a --no-auto-compile\n!#\n" guile)
556 (write
557 `(begin (use-modules (ice-9 match)
558 (ice-9 receive)
559 (ice-9 hash-table)
560 (srfi srfi-1)
561 (srfi srfi-26))
562 (define defaults
563 '(("-bootclasspath" ,bootcp)
564 ("-source" "1.5")
565 ("-target" "1.5")
566 ("-cp" ".")))
567 (define (main args)
568 (let ((classpath (getenv "CLASSPATH")))
569 (setenv "CLASSPATH"
570 (string-join (list ,ecj
571 ,(string-append (assoc-ref %build-inputs "jamvm")
572 "/lib/rt.jar")
573 (or classpath ""))
574 ":")))
575 (receive (vm-args other-args)
576 ;; Separate VM arguments from arguments to ECJ.
577 (partition (cut string-prefix? "-J" <>)
578 (fold (lambda (default acc)
579 (if (member (first default) acc)
580 acc (append default acc)))
581 args defaults))
582 (apply system* ,java
583 (append
584 ;; Remove "-J" prefix
585 (map (cut string-drop <> 2) vm-args)
586 '("org.eclipse.jdt.internal.compiler.batch.Main")
587 (cons "-nowarn" other-args)))))
588 ;; Entry point
589 (let ((args (cdr (command-line))))
590 (if (null? args)
591 (format (current-error-port) "javac: no arguments given!\n")
592 (main args)))))))
593 (chmod target #o755)
594 #t))))
595 (native-inputs
596 `(("guile" ,guile-2.2)
597 ("ecj-bootstrap" ,ecj-bootstrap)
598 ("jamvm" ,jamvm-1-bootstrap)
599 ("classpath" ,classpath-bootstrap)))
600 (description "This package provides a wrapper around the @dfn{Eclipse
601 compiler for Java} (ecj) with a command line interface that is compatible with
602 the standard javac executable.")))
603
604 ;; The classpath-bootstrap was built without a virtual machine, so it does not
605 ;; provide a wrapper for javah. We cannot build the development version of
606 ;; Classpath without javah.
607 (define classpath-0.99
608 (package (inherit classpath-bootstrap)
609 (version "0.99")
610 (source (origin
611 (method url-fetch)
612 (uri (string-append "mirror://gnu/classpath/classpath-"
613 version ".tar.gz"))
614 (sha256
615 (base32
616 "1j7cby4k66f1nvckm48xcmh352b1d1b33qk7l6hi7dp9i9zjjagr"))
617 (patches (search-patches "classpath-aarch64-support.patch"))))
618 (arguments
619 `(#:configure-flags
620 (list (string-append "--with-ecj-jar="
621 (assoc-ref %build-inputs "ecj-bootstrap")
622 "/share/java/ecj-bootstrap.jar")
623 (string-append "JAVAC="
624 (assoc-ref %build-inputs "ecj-javac-wrapper")
625 "/bin/javac")
626 (string-append "JAVA="
627 (assoc-ref %build-inputs "jamvm")
628 "/bin/jamvm")
629 "GCJ_JAVAC_TRUE=no"
630 "ac_cv_prog_java_works=yes" ; trust me
631 "--disable-Werror"
632 "--disable-gmp"
633 "--disable-gtk-peer"
634 "--disable-gconf-peer"
635 "--disable-plugin"
636 "--disable-dssi"
637 "--disable-alsa"
638 "--disable-gjdoc")
639 #:phases
640 (modify-phases %standard-phases
641 (add-after 'install 'install-data
642 (lambda _ (invoke "make" "install-data"))))))
643 (native-inputs
644 `(("ecj-bootstrap" ,ecj-bootstrap)
645 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
646 ("fastjar" ,fastjar)
647 ("jamvm" ,jamvm-1-bootstrap)
648 ("classpath" ,classpath-bootstrap)
649 ("libltdl" ,libltdl)
650 ("pkg-config" ,pkg-config)))))
651
652 ;; We need this because classpath-bootstrap does not provide all of the tools
653 ;; we need to build classpath-devel.
654 (define classpath-jamvm-wrappers
655 (package (inherit classpath-0.99)
656 (name "classpath-jamvm-wrappers")
657 (source #f)
658 (build-system trivial-build-system)
659 (arguments
660 `(#:modules ((guix build utils))
661 #:builder
662 (begin
663 (use-modules (guix build utils))
664 (let* ((bash (assoc-ref %build-inputs "bash"))
665 (jamvm (assoc-ref %build-inputs "jamvm"))
666 (classpath (assoc-ref %build-inputs "classpath"))
667 (bin (string-append (assoc-ref %outputs "out")
668 "/bin/")))
669 (mkdir-p bin)
670 (for-each (lambda (tool)
671 (with-output-to-file (string-append bin tool)
672 (lambda _
673 ,@(if (string-prefix? "armhf" (or (%current-system)
674 (%current-target-system)))
675 `((format #t "#!~a/bin/sh
676 ~a/bin/jamvm -Xnocompact -classpath ~a/share/classpath/tools.zip \
677 gnu.classpath.tools.~a.~a $@"
678 bash jamvm classpath tool
679 (if (string=? "native2ascii" tool)
680 "Native2ASCII" "Main")))
681 `((format #t "#!~a/bin/sh
682 ~a/bin/jamvm -Xnocompact -Xnoinlining -classpath ~a/share/classpath/tools.zip \
683 gnu.classpath.tools.~a.~a $@"
684 bash jamvm classpath tool
685 (if (string=? "native2ascii" tool)
686 "Native2ASCII" "Main"))))))
687 (chmod (string-append bin tool) #o755))
688 (list "javah"
689 "rmic"
690 "rmid"
691 "orbd"
692 "rmiregistry"
693 "native2ascii"))
694 #t))))
695 (native-inputs
696 `(("bash" ,bash)
697 ("jamvm" ,jamvm-1-bootstrap)
698 ("classpath" ,classpath-0.99)))
699 (inputs '())
700 (synopsis "Executables from GNU Classpath")
701 (description "This package provides wrappers around the tools provided by
702 the GNU Classpath library. They are executed by the JamVM virtual
703 machine.")))
704
705 ;; The last release of GNU Classpath is 0.99 and it happened in 2012. Since
706 ;; then Classpath has gained much more support for Java 1.6.
707 (define-public classpath-devel
708 (let ((commit "e7c13ee0cf2005206fbec0eca677f8cf66d5a103")
709 (revision "1"))
710 (package (inherit classpath-bootstrap)
711 (version (string-append "0.99-" revision "." (string-take commit 9)))
712 (source (origin
713 (method git-fetch)
714 (uri (git-reference
715 (url "https://git.savannah.gnu.org/git/classpath.git")
716 (commit commit)))
717 (file-name (string-append "classpath-" version "-checkout"))
718 (sha256
719 (base32
720 "1v2rww76ww322mpg3s12a1kkc6gkp31bm9gcxs532h0wq285fiw4"))
721 (patches (search-patches "classpath-aarch64-support.patch"))))
722 (arguments
723 `(#:make-flags
724 ;; Ensure that the initial heap size is smaller than the maximum
725 ;; size. By default only Xmx is set, which can lead to invalid
726 ;; memory settings on some machines with a lot of memory.
727 '("JAVAC_MEM_OPT=-J-Xms512M -J-Xmx768M")
728 #:configure-flags
729 (list (string-append "--with-ecj-jar="
730 (assoc-ref %build-inputs "ecj-bootstrap")
731 "/share/java/ecj-bootstrap.jar")
732 (string-append "--with-javac="
733 (assoc-ref %build-inputs "ecj-javac-wrapper")
734 "/bin/javac")
735 (string-append "JAVA="
736 (assoc-ref %build-inputs "jamvm")
737 "/bin/jamvm")
738 "GCJ_JAVAC_TRUE=no"
739 "ac_cv_prog_java_works=yes" ; trust me
740 "--disable-Werror"
741 "--disable-gmp"
742 "--disable-gtk-peer"
743 "--disable-gconf-peer"
744 "--disable-plugin"
745 "--disable-dssi"
746 "--disable-alsa"
747 "--disable-gjdoc")
748 #:phases
749 (modify-phases %standard-phases
750 ;; XXX The bootstrap phase executes autogen.sh, which fails after
751 ;; complaining about the lack of gettext.
752 (replace 'bootstrap
753 (lambda _ (invoke "autoreconf" "-vif")))
754 (add-after 'unpack 'remove-unsupported-annotations
755 (lambda _
756 (substitute* (find-files "java" "\\.java$")
757 (("@Override") ""))
758 #t))
759 (add-after 'install 'install-data
760 (lambda _ (invoke "make" "install-data"))))))
761 (native-inputs
762 `(("autoconf" ,autoconf)
763 ("automake" ,automake)
764 ("libtool" ,libtool)
765 ("gettext" ,gettext-minimal)
766 ("texinfo" ,texinfo)
767 ("classpath-jamvm-wrappers" ,classpath-jamvm-wrappers) ; for javah
768 ("ecj-bootstrap" ,ecj-bootstrap)
769 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
770 ("fastjar" ,fastjar)
771 ("jamvm" ,jamvm-1-bootstrap)
772 ("libltdl" ,libltdl)
773 ("pkg-config" ,pkg-config))))))
774
775 (define jamvm
776 (package (inherit jamvm-1-bootstrap)
777 (version "2.0.0")
778 (source (origin
779 (method url-fetch)
780 (uri (string-append "mirror://sourceforge/jamvm/jamvm/"
781 "JamVM%20" version "/jamvm-"
782 version ".tar.gz"))
783 (sha256
784 (base32
785 "1nl0zxz8y5x8gwsrm7n32bry4dx8x70p8z3s9jbdvs8avyb8whkn"))
786 (patches
787 (search-patches "jamvm-2.0.0-disable-branch-patching.patch"
788 "jamvm-2.0.0-opcode-guard.patch"
789 "jamvm-2.0.0-aarch64-support.patch"))
790 (snippet
791 '(begin
792 ;; Remove precompiled software.
793 (delete-file "src/classlib/gnuclasspath/lib/classes.zip")
794 #t))))
795 (build-system gnu-build-system)
796 (arguments
797 (substitute-keyword-arguments (package-arguments jamvm-1-bootstrap)
798 ((#:configure-flags _)
799 '(list (string-append "--with-classpath-install-dir="
800 (assoc-ref %build-inputs "classpath"))))))
801 (inputs
802 `(("classpath" ,classpath-devel)
803 ("ecj-javac-wrapper" ,ecj-javac-wrapper)
804 ("zip" ,zip)
805 ("zlib" ,zlib)))))
806
807 (define ecj-javac-wrapper-final
808 (package (inherit ecj-javac-wrapper)
809 (native-inputs
810 `(("guile" ,guile-2.2)
811 ("ecj-bootstrap" ,ecj-bootstrap)
812 ("jamvm" ,jamvm)
813 ("classpath" ,classpath-devel)))))
814
815 ;; The bootstrap JDK consisting of jamvm, classpath-devel,
816 ;; ecj-javac-wrapper-final cannot build Icedtea 2.x directly, because it's
817 ;; written in Java 7. It can, however, build the unmaintained Icedtea 1.x,
818 ;; which uses Java 6 only.
819 (define-public icedtea-6
820 (package
821 (name "icedtea")
822 (version "1.13.13")
823 (source (origin
824 (method url-fetch)
825 (uri (string-append
826 "http://icedtea.wildebeest.org/download/source/icedtea6-"
827 version ".tar.xz"))
828 (sha256
829 (base32
830 "0bg9sb4f7qbq77c0zf9m17p47ga0kf0r9622g9p12ysg26jd1ksg"))
831 (patches (search-patches
832 "icedtea-6-extend-hotspot-aarch64-support.patch"))
833 (modules '((guix build utils)))
834 (snippet
835 '(begin
836 (substitute* "Makefile.in"
837 ;; do not leak information about the build host
838 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
839 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
840 #t))))
841 (build-system gnu-build-system)
842 (outputs '("out" ; Java Runtime Environment
843 "jdk" ; Java Development Kit
844 "doc")) ; all documentation
845 (arguments
846 `(;; There are many failing tests and many are known to fail upstream.
847 #:tests? #f
848
849 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
850 ;; gremlin) doesn't support it yet, so skip this phase.
851 #:validate-runpath? #f
852
853 #:modules ((guix build utils)
854 (guix build gnu-build-system)
855 (srfi srfi-19))
856
857 #:configure-flags
858 `("--enable-bootstrap"
859 "--enable-nss"
860 "--without-rhino"
861 ,(string-append "--with-parallel-jobs="
862 (number->string (parallel-job-count)))
863 "--disable-downloading"
864 "--disable-tests"
865 ,(string-append "--with-ecj="
866 (assoc-ref %build-inputs "ecj")
867 "/share/java/ecj-bootstrap.jar")
868 ,(string-append "--with-jar="
869 (assoc-ref %build-inputs "fastjar")
870 "/bin/fastjar")
871 ,(string-append "--with-jdk-home="
872 (assoc-ref %build-inputs "classpath"))
873 ,(string-append "--with-java="
874 (assoc-ref %build-inputs "jamvm")
875 "/bin/jamvm"))
876 #:phases
877 (modify-phases %standard-phases
878 (replace 'unpack
879 (lambda* (#:key source inputs #:allow-other-keys)
880 (invoke "tar" "xvf" source)
881 (chdir (string-append "icedtea6-" ,version))
882 (mkdir "openjdk")
883 (copy-recursively (assoc-ref inputs "openjdk-src") "openjdk")
884 ;; The convenient OpenJDK source bundle is no longer
885 ;; available for download, so we have to take the sources
886 ;; from the Mercurial repositories and change the Makefile
887 ;; to avoid tests for the OpenJDK zip archive.
888 (with-directory-excursion "openjdk"
889 (for-each (lambda (part)
890 (mkdir part)
891 (copy-recursively
892 (assoc-ref inputs
893 (string-append part "-src"))
894 part))
895 '("jdk" "hotspot" "corba"
896 "langtools" "jaxp" "jaxws")))
897 (substitute* "patches/freetypeversion.patch"
898 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
899 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
900 (substitute* "Makefile.in"
901 (("echo \"ERROR: No up-to-date OpenJDK zip available\"; exit -1;")
902 "echo \"trust me\";")
903 ;; The contents of the bootstrap directory must be
904 ;; writeable but when copying from the store they are
905 ;; not.
906 (("mkdir -p lib/rt" line)
907 (string-append line "; chmod -R u+w $(BOOT_DIR)")))
908 (invoke "chmod" "-R" "u+w" "openjdk")))
909 (add-after 'unpack 'use-classpath
910 (lambda* (#:key inputs #:allow-other-keys)
911 (let ((jvmlib (assoc-ref inputs "classpath"))
912 (jamvm (assoc-ref inputs "jamvm")))
913 ;; Classpath does not provide rt.jar.
914 (substitute* "Makefile.in"
915 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar")
916 (string-append jvmlib "/share/classpath/glibj.zip")))
917 ;; Make sure we can find all classes.
918 (setenv "CLASSPATH"
919 (string-append jvmlib "/share/classpath/glibj.zip:"
920 jvmlib "/share/classpath/tools.zip:"
921 jamvm "/lib/rt.jar"))
922 (setenv "JAVACFLAGS"
923 (string-append "-cp "
924 jvmlib "/share/classpath/glibj.zip:"
925 jvmlib "/share/classpath/tools.zip")))
926 #t))
927 (add-after 'unpack 'patch-patches
928 (lambda _
929 ;; shebang in patches so that they apply cleanly
930 (substitute* '("patches/jtreg-jrunscript.patch"
931 "patches/hotspot/hs23/drop_unlicensed_test.patch")
932 (("#!/bin/sh") (string-append "#!" (which "sh"))))
933 #t))
934 (add-after 'unpack 'patch-paths
935 (lambda* (#:key inputs #:allow-other-keys)
936 ;; buildtree.make generates shell scripts, so we need to replace
937 ;; the generated shebang
938 (substitute* '("openjdk/hotspot/make/linux/makefiles/buildtree.make")
939 (("/bin/sh") (which "bash")))
940
941 (let ((corebin (string-append
942 (assoc-ref inputs "coreutils") "/bin/"))
943 (binbin (string-append
944 (assoc-ref inputs "binutils") "/bin/"))
945 (grepbin (string-append
946 (assoc-ref inputs "grep") "/bin/")))
947 (substitute* '("openjdk/jdk/make/common/shared/Defs-linux.gmk"
948 "openjdk/corba/make/common/shared/Defs-linux.gmk")
949 (("UNIXCOMMAND_PATH = /bin/")
950 (string-append "UNIXCOMMAND_PATH = " corebin))
951 (("USRBIN_PATH = /usr/bin/")
952 (string-append "USRBIN_PATH = " corebin))
953 (("DEVTOOLS_PATH *= */usr/bin/")
954 (string-append "DEVTOOLS_PATH = " corebin))
955 (("COMPILER_PATH *= */usr/bin/")
956 (string-append "COMPILER_PATH = "
957 (assoc-ref inputs "gcc") "/bin/"))
958 (("DEF_OBJCOPY *=.*objcopy")
959 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
960
961 ;; fix path to alsa header
962 (substitute* "openjdk/jdk/make/common/shared/Sanity.gmk"
963 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
964 (string-append "ALSA_INCLUDE="
965 (assoc-ref inputs "alsa-lib")
966 "/include/alsa/version.h")))
967
968 ;; fix hard-coded utility paths
969 (substitute* '("openjdk/jdk/make/common/shared/Defs-utils.gmk"
970 "openjdk/corba/make/common/shared/Defs-utils.gmk")
971 (("ECHO *=.*echo")
972 (string-append "ECHO = " (which "echo")))
973 (("^GREP *=.*grep")
974 (string-append "GREP = " (which "grep")))
975 (("EGREP *=.*egrep")
976 (string-append "EGREP = " (which "egrep")))
977 (("CPIO *=.*cpio")
978 (string-append "CPIO = " (which "cpio")))
979 (("READELF *=.*readelf")
980 (string-append "READELF = " (which "readelf")))
981 (("^ *AR *=.*ar")
982 (string-append "AR = " (which "ar")))
983 (("^ *TAR *=.*tar")
984 (string-append "TAR = " (which "tar")))
985 (("AS *=.*as")
986 (string-append "AS = " (which "as")))
987 (("LD *=.*ld")
988 (string-append "LD = " (which "ld")))
989 (("STRIP *=.*strip")
990 (string-append "STRIP = " (which "strip")))
991 (("NM *=.*nm")
992 (string-append "NM = " (which "nm")))
993 (("^SH *=.*sh")
994 (string-append "SH = " (which "bash")))
995 (("^FIND *=.*find")
996 (string-append "FIND = " (which "find")))
997 (("LDD *=.*ldd")
998 (string-append "LDD = " (which "ldd")))
999 (("NAWK *=.*(n|g)awk")
1000 (string-append "NAWK = " (which "gawk")))
1001 (("XARGS *=.*xargs")
1002 (string-append "XARGS = " (which "xargs")))
1003 (("UNZIP *=.*unzip")
1004 (string-append "UNZIP = " (which "unzip")))
1005 (("ZIPEXE *=.*zip")
1006 (string-append "ZIPEXE = " (which "zip")))
1007 (("SED *=.*sed")
1008 (string-append "SED = " (which "sed"))))
1009
1010 ;; Some of these timestamps cause problems as they are more than
1011 ;; 10 years ago, failing the build process.
1012 (substitute*
1013 "openjdk/jdk/src/share/classes/java/util/CurrencyData.properties"
1014 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1015 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1016 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1017 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))
1018 #t)))
1019 (add-before 'configure 'set-additional-paths
1020 (lambda* (#:key inputs #:allow-other-keys)
1021 (setenv "CPATH"
1022 (string-append (assoc-ref inputs "libxrender")
1023 "/include/X11/extensions" ":"
1024 (assoc-ref inputs "libxtst")
1025 "/include/X11/extensions" ":"
1026 (assoc-ref inputs "libxinerama")
1027 "/include/X11/extensions" ":"
1028 (or (getenv "CPATH") "")))
1029 (setenv "ALT_CUPS_HEADERS_PATH"
1030 (string-append (assoc-ref inputs "cups")
1031 "/include"))
1032 (setenv "ALT_FREETYPE_HEADERS_PATH"
1033 (string-append (assoc-ref inputs "freetype")
1034 "/include"))
1035 (setenv "ALT_FREETYPE_LIB_PATH"
1036 (string-append (assoc-ref inputs "freetype")
1037 "/lib"))
1038 #t))
1039 (add-before 'build 'disable-os-version-check
1040 ;; allow build on linux major version change
1041 (lambda _
1042 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1043 #t))
1044 (replace 'install
1045 (lambda* (#:key outputs #:allow-other-keys)
1046 (let ((doc (string-append (assoc-ref outputs "doc")
1047 "/share/doc/icedtea"))
1048 (jre (assoc-ref outputs "out"))
1049 (jdk (assoc-ref outputs "jdk")))
1050 (copy-recursively "openjdk.build/docs" doc)
1051 (copy-recursively "openjdk.build/j2re-image" jre)
1052 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1053 #t)))))
1054 (native-inputs
1055 `(("ant" ,ant-bootstrap)
1056 ("alsa-lib" ,alsa-lib)
1057 ("attr" ,attr)
1058 ("classpath" ,classpath-devel)
1059 ("coreutils" ,coreutils)
1060 ("cpio" ,cpio)
1061 ("cups" ,cups)
1062 ("ecj" ,ecj-bootstrap)
1063 ("ecj-javac" ,ecj-javac-wrapper-final)
1064 ("fastjar" ,fastjar)
1065 ("fontconfig" ,fontconfig)
1066 ("freetype" ,freetype)
1067 ("gtk" ,gtk+-2)
1068 ("gawk" ,gawk)
1069 ("giflib" ,giflib)
1070 ("grep" ,grep)
1071 ("jamvm" ,jamvm)
1072 ("lcms" ,lcms)
1073 ("libjpeg" ,libjpeg-turbo)
1074 ("libnsl" ,libnsl)
1075 ("libpng" ,libpng)
1076 ("libtool" ,libtool)
1077 ("libx11" ,libx11)
1078 ("libxcomposite" ,libxcomposite)
1079 ("libxi" ,libxi)
1080 ("libxinerama" ,libxinerama)
1081 ("libxrender" ,libxrender)
1082 ("libxslt" ,libxslt) ;for xsltproc
1083 ("libxt" ,libxt)
1084 ("libxtst" ,libxtst)
1085 ("mit-krb5" ,mit-krb5)
1086 ("nss" ,nss)
1087 ("nss-certs" ,nss-certs)
1088 ("perl" ,perl)
1089 ("pkg-config" ,pkg-config)
1090 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1091 ("unzip" ,unzip)
1092 ("wget" ,wget)
1093 ("which" ,which)
1094 ("zip" ,zip)
1095 ("zlib" ,zlib)
1096 ("openjdk-src"
1097 ,(origin
1098 (method hg-fetch)
1099 (uri (hg-reference
1100 (url "http://hg.openjdk.java.net/jdk6/jdk6/")
1101 (changeset "jdk6-b41")))
1102 (sha256
1103 (base32
1104 "14q47yfg586fs64w30g8mk92m5dkxsvr36zzh0ra99xk5x0x96mv"))))
1105 ("jdk-src"
1106 ,(origin
1107 (method hg-fetch)
1108 (uri (hg-reference
1109 (url "http://hg.openjdk.java.net/jdk6/jdk6/jdk/")
1110 (changeset "jdk6-b41")))
1111 (sha256
1112 (base32
1113 "165824nhg1k1dx6zs9dny0j49rmk35jw5b13dmz8c77jfajml4v9"))))
1114 ("hotspot-src"
1115 ,(origin
1116 (method hg-fetch)
1117 (uri (hg-reference
1118 (url "http://hg.openjdk.java.net/jdk6/jdk6/hotspot/")
1119 (changeset "jdk6-b41")))
1120 (sha256
1121 (base32
1122 "07lc1z4k5dj9nrc1wvwmpvxr3xgxrdkdh53xb95skk5ij49yagfd"))))
1123 ("corba-src"
1124 ,(origin
1125 (method hg-fetch)
1126 (uri (hg-reference
1127 (url "http://hg.openjdk.java.net/jdk6/jdk6/corba/")
1128 (changeset "jdk6-b41")))
1129 (sha256
1130 (base32
1131 "1p9g1r9dnax2iwp7yb59qx7m4nmshqhwmrb2b8jj8zgbd9dl2i3q"))))
1132 ("langtools-src"
1133 ,(origin
1134 (method hg-fetch)
1135 (uri (hg-reference
1136 (url "http://hg.openjdk.java.net/jdk6/jdk6/langtools/")
1137 (changeset "jdk6-b41")))
1138 (sha256
1139 (base32
1140 "1x52wd67fynbbd9ild6fb4wvba3f5hhwk03qdjfazd0a1qr37z3d"))))
1141 ("jaxp-src"
1142 ,(origin
1143 (method hg-fetch)
1144 (uri (hg-reference
1145 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxp/")
1146 (changeset "jdk6-b41")))
1147 (sha256
1148 (base32
1149 "0shlqrvzpr4nrkmv215lbxnby63s3yvbdh1yxcayznsyqwa4nlxm"))))
1150 ("jaxws-src"
1151 ,(origin
1152 (method hg-fetch)
1153 (uri (hg-reference
1154 (url "http://hg.openjdk.java.net/jdk6/jdk6/jaxws/")
1155 (changeset "jdk6-b41")))
1156 (sha256
1157 (base32
1158 "0835lkw8vib1xhp8lxnybhlvzdh699hbi4mclxanydjk63zbpxk0"))))))
1159 (home-page "http://icedtea.classpath.org")
1160 (synopsis "Java development kit")
1161 (description
1162 "This package provides the OpenJDK built with the IcedTea build harness.
1163 This version of the OpenJDK is no longer maintained and is only used for
1164 bootstrapping purposes.")
1165 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1166 ;; same license as both GNU Classpath and OpenJDK.
1167 (license license:gpl2+)))
1168
1169 (define-public icedtea-7
1170 (let* ((version "2.6.13")
1171 (drop (lambda (name hash)
1172 (origin
1173 (method url-fetch)
1174 (uri (string-append
1175 "http://icedtea.classpath.org/download/drops"
1176 "/icedtea7/" version "/" name ".tar.bz2"))
1177 (sha256 (base32 hash))))))
1178 (package
1179 (name "icedtea")
1180 (version version)
1181 (source (origin
1182 (method url-fetch)
1183 (uri (string-append
1184 "http://icedtea.wildebeest.org/download/source/icedtea-"
1185 version ".tar.xz"))
1186 (sha256
1187 (base32
1188 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
1189 (modules '((guix build utils)))
1190 (snippet
1191 '(begin
1192 (substitute* "Makefile.in"
1193 ;; do not leak information about the build host
1194 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
1195 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
1196 #t))))
1197 (build-system gnu-build-system)
1198 (outputs '("out" ; Java Runtime Environment
1199 "jdk" ; Java Development Kit
1200 "doc")) ; all documentation
1201 (arguments
1202 `(;; There are many test failures. Some are known to
1203 ;; fail upstream, others relate to not having an X
1204 ;; server running at test time, yet others are a
1205 ;; complete mystery to me.
1206
1207 ;; hotspot: passed: 241; failed: 45; error: 2
1208 ;; langtools: passed: 1,934; failed: 26
1209 ;; jdk: unknown
1210 #:tests? #f
1211
1212 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
1213 ;; gremlin) doesn't support it yet, so skip this phase.
1214 #:validate-runpath? #f
1215
1216 ;; Apparently, the C locale is needed for some of the tests.
1217 #:locale "C"
1218
1219 #:modules ((guix build utils)
1220 (guix build gnu-build-system)
1221 (ice-9 match)
1222 (ice-9 popen)
1223 (srfi srfi-19)
1224 (srfi srfi-26))
1225
1226 #:configure-flags
1227 ;; TODO: package pcsc and sctp, and add to inputs
1228 `("--disable-system-pcsc"
1229 "--disable-system-sctp"
1230 "--enable-bootstrap"
1231 "--enable-nss"
1232 "--without-rhino"
1233 ,(string-append "--with-parallel-jobs="
1234 (number->string (parallel-job-count)))
1235 "--disable-downloading"
1236 "--disable-tests" ;they are run in the check phase instead
1237 "--with-openjdk-src-dir=./openjdk.src"
1238 ,(string-append "--with-jdk-home="
1239 (assoc-ref %build-inputs "jdk")))
1240
1241 #:phases
1242 (modify-phases %standard-phases
1243 (replace 'unpack
1244 (lambda* (#:key source inputs #:allow-other-keys)
1245 (let ((target (string-append "icedtea-" ,version))
1246 (unpack (lambda* (name #:optional dir)
1247 (let ((dir (or dir
1248 (string-drop-right name 5))))
1249 (mkdir dir)
1250 (invoke "tar" "xvf"
1251 (assoc-ref inputs name)
1252 "-C" dir
1253 "--strip-components=1")))))
1254 (mkdir target)
1255 (invoke "tar" "xvf" source
1256 "-C" target "--strip-components=1")
1257 (chdir target)
1258 (unpack "openjdk-src" "openjdk.src")
1259 (with-directory-excursion "openjdk.src"
1260 (for-each unpack
1261 (filter (cut string-suffix? "-drop" <>)
1262 (map (match-lambda
1263 ((name . _) name))
1264 inputs))))
1265 #t)))
1266 (add-after 'unpack 'patch-bitrot
1267 (lambda _
1268 (substitute* '("patches/boot/revert-6973616.patch"
1269 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
1270 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
1271 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
1272 ;; As of attr 2.4.48 this header is no longer
1273 ;; included. It is provided by the libc instead.
1274 (substitute* '("configure"
1275 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
1276 (("attr/xattr.h") "sys/xattr.h"))
1277 #t))
1278 (add-after 'unpack 'fix-x11-extension-include-path
1279 (lambda* (#:key inputs #:allow-other-keys)
1280 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
1281 (((string-append "\\$\\(firstword \\$\\(wildcard "
1282 "\\$\\(OPENWIN_HOME\\)"
1283 "/include/X11/extensions\\).*$"))
1284 (string-append (assoc-ref inputs "libxrender")
1285 "/include/X11/extensions"
1286 " -I" (assoc-ref inputs "libxtst")
1287 "/include/X11/extensions"
1288 " -I" (assoc-ref inputs "libxinerama")
1289 "/include/X11/extensions"))
1290 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))
1291 #t))
1292 (add-after 'unpack 'patch-paths
1293 (lambda _
1294 ;; buildtree.make generates shell scripts, so we need to replace
1295 ;; the generated shebang
1296 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
1297 (("/bin/sh") (which "bash")))
1298
1299 (let ((corebin (string-append
1300 (assoc-ref %build-inputs "coreutils") "/bin/"))
1301 (binbin (string-append
1302 (assoc-ref %build-inputs "binutils") "/bin/"))
1303 (grepbin (string-append
1304 (assoc-ref %build-inputs "grep") "/bin/")))
1305 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
1306 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
1307 (("UNIXCOMMAND_PATH = /bin/")
1308 (string-append "UNIXCOMMAND_PATH = " corebin))
1309 (("USRBIN_PATH = /usr/bin/")
1310 (string-append "USRBIN_PATH = " corebin))
1311 (("DEVTOOLS_PATH *= */usr/bin/")
1312 (string-append "DEVTOOLS_PATH = " corebin))
1313 (("COMPILER_PATH *= */usr/bin/")
1314 (string-append "COMPILER_PATH = "
1315 (assoc-ref %build-inputs "gcc") "/bin/"))
1316 (("DEF_OBJCOPY *=.*objcopy")
1317 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
1318
1319 ;; fix path to alsa header
1320 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1321 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1322 (string-append "ALSA_INCLUDE="
1323 (assoc-ref %build-inputs "alsa-lib")
1324 "/include/alsa/version.h")))
1325
1326 ;; fix hard-coded utility paths
1327 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
1328 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
1329 (("ECHO *=.*echo")
1330 (string-append "ECHO = " (which "echo")))
1331 (("^GREP *=.*grep")
1332 (string-append "GREP = " (which "grep")))
1333 (("EGREP *=.*egrep")
1334 (string-append "EGREP = " (which "egrep")))
1335 (("CPIO *=.*cpio")
1336 (string-append "CPIO = " (which "cpio")))
1337 (("READELF *=.*readelf")
1338 (string-append "READELF = " (which "readelf")))
1339 (("^ *AR *=.*ar")
1340 (string-append "AR = " (which "ar")))
1341 (("^ *TAR *=.*tar")
1342 (string-append "TAR = " (which "tar")))
1343 (("AS *=.*as")
1344 (string-append "AS = " (which "as")))
1345 (("LD *=.*ld")
1346 (string-append "LD = " (which "ld")))
1347 (("STRIP *=.*strip")
1348 (string-append "STRIP = " (which "strip")))
1349 (("NM *=.*nm")
1350 (string-append "NM = " (which "nm")))
1351 (("^SH *=.*sh")
1352 (string-append "SH = " (which "bash")))
1353 (("^FIND *=.*find")
1354 (string-append "FIND = " (which "find")))
1355 (("LDD *=.*ldd")
1356 (string-append "LDD = " (which "ldd")))
1357 (("NAWK *=.*(n|g)awk")
1358 (string-append "NAWK = " (which "gawk")))
1359 (("XARGS *=.*xargs")
1360 (string-append "XARGS = " (which "xargs")))
1361 (("UNZIP *=.*unzip")
1362 (string-append "UNZIP = " (which "unzip")))
1363 (("ZIPEXE *=.*zip")
1364 (string-append "ZIPEXE = " (which "zip")))
1365 (("SED *=.*sed")
1366 (string-append "SED = " (which "sed"))))
1367
1368 ;; Some of these timestamps cause problems as they are more than
1369 ;; 10 years ago, failing the build process.
1370 (substitute*
1371 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
1372 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
1373 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
1374 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
1375 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))
1376 #t))
1377 (add-before 'configure 'set-additional-paths
1378 (lambda* (#:key inputs #:allow-other-keys)
1379 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
1380 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
1381 (string-append "ALSA_INCLUDE="
1382 (assoc-ref inputs "alsa-lib")
1383 "/include/alsa/version.h")))
1384 (setenv "CC" "gcc")
1385 (setenv "CPATH"
1386 (string-append (assoc-ref inputs "libxcomposite")
1387 "/include/X11/extensions" ":"
1388 (assoc-ref inputs "libxrender")
1389 "/include/X11/extensions" ":"
1390 (assoc-ref inputs "libxtst")
1391 "/include/X11/extensions" ":"
1392 (assoc-ref inputs "libxinerama")
1393 "/include/X11/extensions" ":"
1394 (or (getenv "CPATH") "")))
1395 (setenv "ALT_OBJCOPY" (which "objcopy"))
1396 (setenv "ALT_CUPS_HEADERS_PATH"
1397 (string-append (assoc-ref inputs "cups")
1398 "/include"))
1399 (setenv "ALT_FREETYPE_HEADERS_PATH"
1400 (string-append (assoc-ref inputs "freetype")
1401 "/include"))
1402 (setenv "ALT_FREETYPE_LIB_PATH"
1403 (string-append (assoc-ref inputs "freetype")
1404 "/lib"))
1405 #t))
1406 (add-before 'build 'disable-os-version-check
1407 ;; allow build on linux major version change
1408 (lambda _
1409 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")
1410 #t))
1411 (add-before 'check 'fix-test-framework
1412 (lambda _
1413 ;; Fix PATH in test environment
1414 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
1415 (("PATH=/bin:/usr/bin")
1416 (string-append "PATH=" (getenv "PATH"))))
1417 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
1418 (("/usr/bin/env") (which "env")))
1419 (substitute* "openjdk.src/hotspot/test/test_env.sh"
1420 (("/bin/rm") (which "rm"))
1421 (("/bin/cp") (which "cp"))
1422 (("/bin/mv") (which "mv")))
1423 #t))
1424 (add-before 'check 'fix-hotspot-tests
1425 (lambda _
1426 (with-directory-excursion "openjdk.src/hotspot/test/"
1427 (substitute* "jprt.config"
1428 (("PATH=\"\\$\\{path4sdk\\}\"")
1429 (string-append "PATH=" (getenv "PATH")))
1430 (("make=/usr/bin/make")
1431 (string-append "make=" (which "make"))))
1432 (substitute* '("runtime/6626217/Test6626217.sh"
1433 "runtime/7110720/Test7110720.sh")
1434 (("/bin/rm") (which "rm"))
1435 (("/bin/cp") (which "cp"))
1436 (("/bin/mv") (which "mv"))))
1437 #t))
1438 (add-before 'check 'fix-jdk-tests
1439 (lambda _
1440 (with-directory-excursion "openjdk.src/jdk/test/"
1441 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
1442 (("/bin/pwd") (which "pwd")))
1443 (substitute* "com/sun/jdi/ShellScaffold.sh"
1444 (("/bin/kill") (which "kill")))
1445 (substitute* "start-Xvfb.sh"
1446 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
1447 (("/usr/bin/nohup") (which "nohup")))
1448 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
1449 (("/bin/rm") (which "rm")))
1450 (substitute* "tools/launcher/MultipleJRE.sh"
1451 (("echo \"#!/bin/sh\"")
1452 (string-append "echo \"#!" (which "rm") "\""))
1453 (("/usr/bin/zip") (which "zip")))
1454 (substitute* "com/sun/jdi/OnThrowTest.java"
1455 (("#!/bin/sh") (string-append "#!" (which "sh"))))
1456 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
1457 (("/usr/bin/uptime") (which "uptime")))
1458 (substitute* "java/lang/ProcessBuilder/Basic.java"
1459 (("/usr/bin/env") (which "env"))
1460 (("/bin/false") (which "false"))
1461 (("/bin/true") (which "true"))
1462 (("/bin/cp") (which "cp"))
1463 (("/bin/sh") (which "sh")))
1464 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
1465 (("/bin/sh") (which "sh")))
1466 (substitute* "java/lang/ProcessBuilder/Zombies.java"
1467 (("/usr/bin/perl") (which "perl"))
1468 (("/bin/ps") (which "ps"))
1469 (("/bin/true") (which "true")))
1470 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
1471 (("/usr/bin/tee") (which "tee")))
1472 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
1473 (("/bin/true") (which "true")))
1474 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
1475 (("/bin/cat") (which "cat")))
1476 (substitute* "java/lang/Runtime/exec/ExitValue.java"
1477 (("/bin/sh") (which "sh"))
1478 (("/bin/true") (which "true"))
1479 (("/bin/kill") (which "kill")))
1480 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
1481 (("/usr/bin/echo") (which "echo")))
1482 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
1483 (("/usr/bin/cat") (which "cat")))
1484 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
1485 (("/bin/cat") (which "cat"))
1486 (("/bin/sleep") (which "sleep"))
1487 (("/bin/sh") (which "sh")))
1488 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
1489 (("/bin/cat") (which "cat")))
1490 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
1491 (("/bin/chmod") (which "chmod")))
1492 (substitute* "java/util/zip/ZipFile/Assortment.java"
1493 (("/bin/sh") (which "sh"))))
1494 #t))
1495 (replace 'check
1496 (lambda _
1497 ;; The "make check-*" targets always return zero, so we need to
1498 ;; check for errors in the associated log files to determine
1499 ;; whether any tests have failed.
1500 (use-modules (ice-9 rdelim))
1501 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
1502 (checker (lambda (port)
1503 (let loop ()
1504 (let ((line (read-line port)))
1505 (cond
1506 ((eof-object? line) #t)
1507 ((regexp-exec error-pattern line)
1508 (error "test failed"))
1509 (else (loop)))))))
1510 (run-test (lambda (test)
1511 (invoke "make" test)
1512 (call-with-input-file
1513 (string-append "test/" test ".log")
1514 checker))))
1515 (when #f ; skip tests
1516 (run-test "check-hotspot")
1517 (run-test "check-langtools")
1518 (run-test "check-jdk"))
1519 #t)))
1520 (replace 'install
1521 (lambda* (#:key outputs #:allow-other-keys)
1522 (let ((doc (string-append (assoc-ref outputs "doc")
1523 "/share/doc/icedtea"))
1524 (jre (assoc-ref outputs "out"))
1525 (jdk (assoc-ref outputs "jdk")))
1526 (copy-recursively "openjdk.build/docs" doc)
1527 (copy-recursively "openjdk.build/j2re-image" jre)
1528 (copy-recursively "openjdk.build/j2sdk-image" jdk))
1529 #t))
1530 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
1531 ;; But that shared object is located in the server/ folder, so it
1532 ;; cannot be found. This phase creates a symbolic link in the
1533 ;; lib/amd64 folder so that the other libraries can find it.
1534 ;;
1535 ;; See:
1536 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1537 ;;
1538 ;; FIXME: Find the bug in the build system, so that this symlink is
1539 ;; not needed.
1540 (add-after 'install 'install-libjvm
1541 (lambda* (#:key inputs outputs #:allow-other-keys)
1542 (let* ((lib-path (string-append (assoc-ref outputs "out")
1543 ;; See 'INSTALL_ARCH_DIR' in
1544 ;; 'configure'.
1545 ,(match (%current-system)
1546 ("i686-linux"
1547 "/lib/i386")
1548 ("x86_64-linux"
1549 "/lib/amd64")
1550 ("armhf-linux"
1551 "/lib/arm")
1552 ("aarch64-linux"
1553 "/lib/aarch64")
1554 ;; We need a catch-all, dropping
1555 ;; '-linux' works in most cases.
1556 (_
1557 (string-append
1558 "/lib/"
1559 (string-drop-right
1560 (%current-system) 6)))))))
1561 (symlink (string-append lib-path "/server/libjvm.so")
1562 (string-append lib-path "/libjvm.so")))
1563 #t))
1564 ;; By default IcedTea only generates an empty keystore. In order to
1565 ;; be able to use certificates in Java programs we need to generate a
1566 ;; keystore from a set of certificates. For convenience we use the
1567 ;; certificates from the nss-certs package.
1568 (add-after 'install 'install-keystore
1569 (lambda* (#:key inputs outputs #:allow-other-keys)
1570 (let* ((keystore "cacerts")
1571 (certs-dir (string-append (assoc-ref inputs "nss-certs")
1572 "/etc/ssl/certs"))
1573 (keytool (string-append (assoc-ref outputs "jdk")
1574 "/bin/keytool")))
1575 (define (extract-cert file target)
1576 (call-with-input-file file
1577 (lambda (in)
1578 (call-with-output-file target
1579 (lambda (out)
1580 (let loop ((line (read-line in 'concat))
1581 (copying? #f))
1582 (cond
1583 ((eof-object? line) #t)
1584 ((string-prefix? "-----BEGIN" line)
1585 (display line out)
1586 (loop (read-line in 'concat) #t))
1587 ((string-prefix? "-----END" line)
1588 (display line out)
1589 #t)
1590 (else
1591 (when copying? (display line out))
1592 (loop (read-line in 'concat) copying?)))))))))
1593 (define (import-cert cert)
1594 (format #t "Importing certificate ~a\n" (basename cert))
1595 (let ((temp "tmpcert"))
1596 (extract-cert cert temp)
1597 (let ((port (open-pipe* OPEN_WRITE keytool
1598 "-import"
1599 "-alias" (basename cert)
1600 "-keystore" keystore
1601 "-storepass" "changeit"
1602 "-file" temp)))
1603 (display "yes\n" port)
1604 (when (not (zero? (status:exit-val (close-pipe port))))
1605 (format #t "failed to import ~a\n" cert)))
1606 (delete-file temp)))
1607
1608 ;; This is necessary because the certificate directory contains
1609 ;; files with non-ASCII characters in their names.
1610 (setlocale LC_ALL "en_US.utf8")
1611 (setenv "LC_ALL" "en_US.utf8")
1612
1613 (for-each import-cert (find-files certs-dir "\\.pem$"))
1614 (mkdir-p (string-append (assoc-ref outputs "out")
1615 "/lib/security"))
1616 (mkdir-p (string-append (assoc-ref outputs "jdk")
1617 "/jre/lib/security"))
1618
1619 ;; The cacerts files we are going to overwrite are chmod'ed as
1620 ;; read-only (444) in icedtea-8 (which derives from this
1621 ;; package). We have to change this so we can overwrite them.
1622 (chmod (string-append (assoc-ref outputs "out")
1623 "/lib/security/" keystore) #o644)
1624 (chmod (string-append (assoc-ref outputs "jdk")
1625 "/jre/lib/security/" keystore) #o644)
1626
1627 (install-file keystore
1628 (string-append (assoc-ref outputs "out")
1629 "/lib/security"))
1630 (install-file keystore
1631 (string-append (assoc-ref outputs "jdk")
1632 "/jre/lib/security"))
1633 #t))))))
1634 (native-inputs
1635 `(("openjdk-src"
1636 ,(drop "openjdk"
1637 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
1638 ("corba-drop"
1639 ,(drop "corba"
1640 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
1641 ("jaxp-drop"
1642 ,(drop "jaxp"
1643 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
1644 ("jaxws-drop"
1645 ,(drop "jaxws"
1646 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
1647 ("jdk-drop"
1648 ,(drop "jdk"
1649 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"))
1650 ("langtools-drop"
1651 ,(drop "langtools"
1652 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
1653 ("hotspot-drop"
1654 ,(origin
1655 (method url-fetch)
1656 (uri (string-append
1657 "http://icedtea.classpath.org/downloads/drops"
1658 "/icedtea7/" version "/hotspot.tar.bz2"))
1659 (sha256
1660 (base32
1661 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
1662 (patches (search-patches
1663 "icedtea-7-hotspot-aarch64-use-c++98.patch"))))
1664 ("ant" ,ant-bootstrap)
1665 ("attr" ,attr)
1666 ("coreutils" ,coreutils)
1667 ("diffutils" ,diffutils) ;for tests
1668 ("gawk" ,gawk)
1669 ("grep" ,grep)
1670 ("libtool" ,libtool)
1671 ("pkg-config" ,pkg-config)
1672 ("wget" ,wget)
1673 ("which" ,which)
1674 ("cpio" ,cpio)
1675 ("zip" ,zip)
1676 ("unzip" ,unzip)
1677 ("fastjar" ,fastjar)
1678 ("libxslt" ,libxslt) ;for xsltproc
1679 ("nss-certs" ,nss-certs)
1680 ("perl" ,perl)
1681 ("procps" ,procps) ;for "free", even though I'm not sure we should use it
1682 ("jdk" ,icedtea-6 "jdk")))
1683 (inputs
1684 `(("alsa-lib" ,alsa-lib)
1685 ("cups" ,cups)
1686 ("libx11" ,libx11)
1687 ("libxcomposite" ,libxcomposite)
1688 ("libxt" ,libxt)
1689 ("libxtst" ,libxtst)
1690 ("libxi" ,libxi)
1691 ("libxinerama" ,libxinerama)
1692 ("libxrender" ,libxrender)
1693 ("libjpeg" ,libjpeg-turbo)
1694 ("libpng" ,libpng)
1695 ("mit-krb5" ,mit-krb5)
1696 ("nss" ,nss)
1697 ("giflib" ,giflib)
1698 ("fontconfig" ,fontconfig)
1699 ("freetype" ,freetype)
1700 ("lcms" ,lcms)
1701 ("zlib" ,zlib)
1702 ("gtk" ,gtk+-2)))
1703 (home-page "http://icedtea.classpath.org")
1704 (synopsis "Java development kit")
1705 (description
1706 "This package provides the Java development kit OpenJDK built with the
1707 IcedTea build harness.")
1708
1709 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
1710 (supported-systems (delete "mips64el-linux" %supported-systems))
1711
1712 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
1713 ;; same license as both GNU Classpath and OpenJDK.
1714 (license license:gpl2+))))
1715
1716 (define-public icedtea-8
1717 (let* ((version "3.7.0")
1718 (drop (lambda (name hash)
1719 (origin
1720 (method url-fetch)
1721 (uri (string-append
1722 "http://icedtea.classpath.org/download/drops"
1723 "/icedtea8/" version "/" name ".tar.xz"))
1724 (sha256 (base32 hash))))))
1725 (package (inherit icedtea-7)
1726 (version "3.7.0")
1727 (source (origin
1728 (method url-fetch)
1729 (uri (string-append
1730 "http://icedtea.wildebeest.org/download/source/icedtea-"
1731 version ".tar.xz"))
1732 (sha256
1733 (base32
1734 "09yqzn8rpccs7cyv89hhy5zlznpgqw5x3jz0w1ccp0cz1vgs8l5w"))
1735 (modules '((guix build utils)))
1736 (snippet
1737 '(begin
1738 (substitute* '("configure"
1739 "acinclude.m4")
1740 ;; Do not embed build time
1741 (("(DIST_ID=\"Custom build).*$" _ prefix)
1742 (string-append prefix "\"\n"))
1743 ;; Do not leak information about the build host
1744 (("DIST_NAME=\"\\$build_os\"")
1745 "DIST_NAME=\"guix\""))
1746 #t))))
1747 (arguments
1748 `(#:imported-modules
1749 ((guix build ant-build-system)
1750 (guix build syscalls)
1751 ,@%gnu-build-system-modules)
1752 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
1753 ((#:modules modules)
1754 `((guix build utils)
1755 (guix build gnu-build-system)
1756 ((guix build ant-build-system) #:prefix ant:)
1757 (ice-9 match)
1758 (ice-9 popen)
1759 (srfi srfi-19)
1760 (srfi srfi-26)))
1761 ((#:configure-flags flags)
1762 `(let ((jdk (assoc-ref %build-inputs "jdk")))
1763 `( ;;"--disable-bootstrap"
1764 "--enable-bootstrap"
1765 "--enable-nss"
1766 ,(string-append "--with-parallel-jobs="
1767 (number->string (parallel-job-count)))
1768 "--disable-downloading"
1769 "--disable-system-pcsc"
1770 "--disable-system-sctp"
1771 "--disable-tests" ;they are run in the check phase instead
1772 "--with-openjdk-src-dir=./openjdk.src"
1773 ,(string-append "--with-jdk-home=" jdk))))
1774 ((#:phases phases)
1775 `(modify-phases ,phases
1776 (delete 'fix-x11-extension-include-path)
1777 (delete 'patch-paths)
1778 (delete 'set-additional-paths)
1779 (delete 'patch-patches)
1780 (delete 'patch-bitrot)
1781 ;; Prevent the keytool from recording the current time when
1782 ;; adding certificates at build time.
1783 (add-after 'unpack 'patch-keystore
1784 (lambda _
1785 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
1786 (("date = new Date\\(\\);")
1787 "\
1788 date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
1789 new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
1790 new Date();"))
1791 #t))
1792 (add-after 'unpack 'patch-jni-libs
1793 ;; Hardcode dynamically loaded libraries.
1794 (lambda _
1795 (let* ((library-path (search-path-as-string->list
1796 (getenv "LIBRARY_PATH")))
1797 (find-library (lambda (name)
1798 (search-path
1799 library-path
1800 (string-append "lib" name ".so")))))
1801 (for-each
1802 (lambda (file)
1803 (catch 'decoding-error
1804 (lambda ()
1805 (substitute* file
1806 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1807 _ name version)
1808 (format #f "\"~a\"" (find-library name)))
1809 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1810 (format #f "\"~a\"" (find-library name)))))
1811 (lambda _
1812 ;; Those are safe to skip.
1813 (format (current-error-port)
1814 "warning: failed to substitute: ~a~%"
1815 file))))
1816 (find-files "openjdk.src/jdk/src/solaris/native"
1817 "\\.c|\\.h"))
1818 #t)))
1819 (replace 'install
1820 (lambda* (#:key outputs #:allow-other-keys)
1821 (let ((doc (string-append (assoc-ref outputs "doc")
1822 "/share/doc/icedtea"))
1823 (jre (assoc-ref outputs "out"))
1824 (jdk (assoc-ref outputs "jdk")))
1825 (copy-recursively "openjdk.build/docs" doc)
1826 (copy-recursively "openjdk.build/images/j2re-image" jre)
1827 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
1828 ;; Install the nss.cfg file to JRE to enable SSL/TLS
1829 ;; support via NSS.
1830 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
1831 (string-append jre "/lib/security/nss.cfg"))
1832 #t)))
1833 (add-after 'install 'strip-jar-timestamps
1834 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
1835 (native-inputs
1836 `(("jdk" ,icedtea-7 "jdk")
1837 ("openjdk-src"
1838 ,(drop "openjdk"
1839 "1mj6xgmw31i6qd30qi9dmv7160fbcfq5ikz1jwjihdg2793il19p"))
1840 ("aarch32-drop"
1841 ,(drop "aarch32"
1842 "1wb8k5zm40zld0986dvmlh5xh3gyixbg9h26sl662zy92amhmyyg"))
1843 ("corba-drop"
1844 ,(drop "corba"
1845 "11ma4zz0599cy70xd219v7a8vin7p96xrhhz3wsaw6cjhkzpagah"))
1846 ("jaxp-drop"
1847 ,(drop "jaxp"
1848 "14m1y0z0fbm5z5zjw3vnq85py8dma84bi3f9cw8rhdyc6skk8q4i"))
1849 ("jaxws-drop"
1850 ,(drop "jaxws"
1851 "09andnm6xaasnp963hgx42yiflifiljp9z7z85jrfyc5z8a5whmf"))
1852 ("jdk-drop"
1853 ,(drop "jdk"
1854 "0s6lcpc0zckz2fnq98aqf28nz9y3wbi41a3kyaqqa2abwbkm1zwl"))
1855 ("langtools-drop"
1856 ,(drop "langtools"
1857 "15wizy123vhk40chl1b4p552jf2pw2hdww0myf11qab425axz4nw"))
1858 ("hotspot-drop"
1859 ,(drop "hotspot"
1860 "1ciz1w9j0kz7s1dxdhyqq71nla9icyz6qvn0b9z2zgkklqa98qmm"))
1861 ("nashorn-drop"
1862 ,(drop "nashorn"
1863 "19pzl3ppaw8j6r5cnyp8qiw3hxijh3hdc46l39g5yfhdl4pr4hpa"))
1864 ("shenandoah-drop"
1865 ,(drop "shenandoah"
1866 "0k33anxdzw1icn072wynfmmdjhsv50hay0j1sfkfxny12rb3vgdy"))
1867 ,@(fold alist-delete (package-native-inputs icedtea-7)
1868 '("jdk" "openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
1869 "jdk-drop" "langtools-drop" "hotspot-drop")))))))
1870
1871 (define-public openjdk9
1872 (package
1873 (name "openjdk")
1874 (version "9.181")
1875 (source (origin
1876 (method url-fetch)
1877 (uri "https://hg.openjdk.java.net/jdk/jdk/archive/3cc80be736f2.tar.bz2")
1878 (file-name (string-append name "-" version ".tar.bz2"))
1879 (sha256
1880 (base32
1881 "01ihmyf7k5z17wbr7xig7y40l9f01d5zjgkcmawn1102hw5kchpq"))
1882 (modules '((guix build utils)))
1883 (snippet
1884 `(begin
1885 (for-each delete-file
1886 (find-files "." ".*.(bin|exe|jar)$"))
1887 #t))))
1888 (build-system gnu-build-system)
1889 (outputs '("out" "jdk" "doc"))
1890 (arguments
1891 `(#:tests? #f; require jtreg
1892 #:make-flags '("all")
1893 #:imported-modules
1894 ((guix build syscalls)
1895 ,@%gnu-build-system-modules)
1896 #:phases
1897 (modify-phases %standard-phases
1898 (add-after 'patch-source-shebangs 'fix-java-shebangs
1899 (lambda _
1900 ;; This file was "fixed" by patch-source-shebangs, but it requires
1901 ;; this exact first line.
1902 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1903 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
1904 #t))
1905 (replace 'configure
1906 (lambda* (#:key inputs outputs #:allow-other-keys)
1907 ;; TODO: unbundle libpng and lcms
1908 (invoke "bash" "./configure"
1909 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
1910 "--disable-freetype-bundling"
1911 "--disable-warnings-as-errors"
1912 "--disable-hotspot-gtest"
1913 "--with-giflib=system"
1914 "--with-libjpeg=system"
1915 (string-append "--prefix=" (assoc-ref outputs "out")))
1916 #t))
1917 (add-before 'build 'write-source-revision-file
1918 (lambda _
1919 (with-output-to-file ".src-rev"
1920 (lambda _
1921 (display ,version)))
1922 #t))
1923 (replace 'build
1924 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1925 (apply invoke "make"
1926 `(,@(if parallel-build?
1927 (list (string-append "JOBS="
1928 (number->string (parallel-job-count))))
1929 '())
1930 ,@make-flags))))
1931 (add-after 'unpack 'patch-jni-libs
1932 ;; Hardcode dynamically loaded libraries.
1933 (lambda _
1934 (let* ((library-path (search-path-as-string->list
1935 (getenv "LIBRARY_PATH")))
1936 (find-library (lambda (name)
1937 (search-path
1938 library-path
1939 (string-append "lib" name ".so")))))
1940 (for-each
1941 (lambda (file)
1942 (catch 'decoding-error
1943 (lambda ()
1944 (substitute* file
1945 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1946 _ name version)
1947 (format #f "\"~a\"" (find-library name)))
1948 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1949 (format #f "\"~a\"" (find-library name)))))
1950 (lambda _
1951 ;; Those are safe to skip.
1952 (format (current-error-port)
1953 "warning: failed to substitute: ~a~%"
1954 file))))
1955 (find-files "."
1956 "\\.c$|\\.h$"))
1957 #t)))
1958 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1959 ;; But that shared object is located in the server/ folder, so it
1960 ;; cannot be found. This phase creates a symbolic link in the
1961 ;; lib/ folder so that the other libraries can find it.
1962 ;;
1963 ;; See:
1964 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1965 ;;
1966 ;; FIXME: Find the bug in the build system, so that this symlink is
1967 ;; not needed.
1968 (add-after 'install 'install-libjvm
1969 (lambda* (#:key inputs outputs #:allow-other-keys)
1970 (let* ((lib-out (string-append (assoc-ref outputs "out")
1971 "/lib"))
1972 (lib-jdk (string-append (assoc-ref outputs "jdk")
1973 "/lib")))
1974 (symlink (string-append lib-jdk "/server/libjvm.so")
1975 (string-append lib-jdk "/libjvm.so"))
1976 (symlink (string-append lib-out "/server/libjvm.so")
1977 (string-append lib-out "/libjvm.so")))
1978 #t))
1979 (replace 'install
1980 (lambda* (#:key outputs #:allow-other-keys)
1981 (let ((out (assoc-ref outputs "out"))
1982 (jdk (assoc-ref outputs "jdk"))
1983 (doc (assoc-ref outputs "doc"))
1984 (images (car (find-files "build" ".*-server-release"
1985 #:directories? #t))))
1986 (copy-recursively (string-append images "/images/jdk") jdk)
1987 (copy-recursively (string-append images "/images/jre") out)
1988 (copy-recursively (string-append images "/images/docs") doc))
1989 #t))
1990 (add-after 'install 'strip-zip-timestamps
1991 (lambda* (#:key outputs #:allow-other-keys)
1992 (use-modules (guix build syscalls))
1993 (for-each (lambda (zip)
1994 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
1995 (with-directory-excursion dir
1996 (invoke "unzip" zip))
1997 (delete-file zip)
1998 (for-each (lambda (file)
1999 (let ((s (lstat file)))
2000 (unless (eq? (stat:type s) 'symlink)
2001 (format #t "reset ~a~%" file)
2002 (utime file 0 0 0 0))))
2003 (find-files dir #:directories? #t))
2004 (with-directory-excursion dir
2005 (let ((files (find-files "." ".*" #:directories? #t)))
2006 (apply invoke "zip" "-0" "-X" zip files)))))
2007 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2008 #t)))))
2009 (inputs
2010 `(("alsa-lib" ,alsa-lib)
2011 ("cups" ,cups)
2012 ("fontconfig" ,fontconfig)
2013 ("freetype" ,freetype)
2014 ("giflib" ,giflib)
2015 ("lcms" ,lcms)
2016 ("libelf" ,libelf)
2017 ("libjpeg" ,libjpeg-turbo)
2018 ("libice" ,libice)
2019 ("libpng" ,libpng)
2020 ("libx11" ,libx11)
2021 ("libxcomposite" ,libxcomposite)
2022 ("libxi" ,libxi)
2023 ("libxinerama" ,libxinerama)
2024 ("libxrender" ,libxrender)
2025 ("libxt" ,libxt)
2026 ("libxtst" ,libxtst)))
2027 (native-inputs
2028 `(("icedtea-8" ,icedtea-8)
2029 ("icedtea-8:jdk" ,icedtea-8 "jdk")
2030 ;; XXX: The build system fails with newer versions of GNU Make.
2031 ("make@4.2" ,gnu-make-4.2)
2032 ("unzip" ,unzip)
2033 ("which" ,which)
2034 ("zip" ,zip)))
2035 (home-page "https://openjdk.java.net/projects/jdk9/")
2036 (synopsis "Java development kit")
2037 (description
2038 "This package provides the Java development kit OpenJDK.")
2039 (license license:gpl2+)))
2040
2041 (define-public openjdk10
2042 (package
2043 (inherit openjdk9)
2044 (name "openjdk")
2045 (version "10.46")
2046 (source (origin
2047 (method url-fetch)
2048 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/6fa770f9f8ab.tar.bz2")
2049 (file-name (string-append name "-" version ".tar.bz2"))
2050 (sha256
2051 (base32
2052 "0zywq2203b4hx4jms9vbwvjcj1d3k2v3qpx4s33729fkpmid97r4"))
2053 (patches (search-patches
2054 "openjdk-10-idlj-reproducibility.patch"))
2055 (modules '((guix build utils)))
2056 (snippet
2057 `(begin
2058 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2059 #t))))
2060 (arguments
2061 (substitute-keyword-arguments (package-arguments openjdk9)
2062 ((#:phases phases)
2063 `(modify-phases ,phases
2064 (replace 'fix-java-shebangs
2065 (lambda _
2066 ;; This file was "fixed" by patch-source-shebangs, but it requires
2067 ;; this exact first line.
2068 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2069 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2070 #t))
2071 (replace 'configure
2072 (lambda* (#:key inputs outputs #:allow-other-keys)
2073 (invoke "bash" "./configure"
2074 (string-append "--with-freetype=" (assoc-ref inputs "freetype"))
2075 "--disable-freetype-bundling"
2076 "--disable-warnings-as-errors"
2077 "--disable-hotspot-gtest"
2078 "--with-giflib=system"
2079 "--with-libjpeg=system"
2080 "--with-native-debug-symbols=zipped"
2081 (string-append "--prefix=" (assoc-ref outputs "out")))
2082 #t))))))
2083 (native-inputs
2084 `(("openjdk9" ,openjdk9)
2085 ("openjdk9:jdk" ,openjdk9 "jdk")
2086 ("make@4.2" ,gnu-make-4.2)
2087 ("unzip" ,unzip)
2088 ("which" ,which)
2089 ("zip" ,zip)))))
2090
2091 (define-public openjdk11
2092 (package
2093 (name "openjdk")
2094 (version "11.28")
2095 (source (origin
2096 (method url-fetch)
2097 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/76072a077ee1.tar.bz2")
2098 (file-name (string-append name "-" version ".tar.bz2"))
2099 (sha256
2100 (base32
2101 "0v705w1s9lrqalzahir78pk397rkk9gfvzq821yv8h3xha0bqi6w"))
2102 (modules '((guix build utils)))
2103 (snippet
2104 `(begin
2105 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2106 #t))))
2107 (build-system gnu-build-system)
2108 (outputs '("out" "jdk" "doc"))
2109 (arguments
2110 `(#:imported-modules
2111 ((guix build syscalls)
2112 (ice-9 binary-ports)
2113 (rnrs bytevectors)
2114 ,@%gnu-build-system-modules)
2115 #:tests? #f; requires jtreg
2116 ;; TODO package jtreg
2117 #:configure-flags
2118 `("--disable-option-checking" ; --enable-fast-install default flag errors otherwise
2119 "--disable-warnings-as-errors"
2120 ;; make validate-runpath pass, see: http://issues.guix.info/issue/32894
2121 "--with-native-debug-symbols=zipped"
2122 ;; do not use the bundled libraries
2123 "--with-giflib=system"
2124 "--with-lcms=system"
2125 "--with-libjpeg=system"
2126 "--with-libpng=system"
2127 "--with-version-pre="
2128 ;; allow the build system to locate the system freetype
2129 ,(string-append "--with-freetype-include="
2130 (assoc-ref %build-inputs "freetype") "/include")
2131 ,(string-append "--with-freetype-lib="
2132 (assoc-ref %build-inputs "freetype") "/lib"))
2133 #:phases
2134 (modify-phases %standard-phases
2135 (add-after 'patch-source-shebangs 'fix-java-shebangs
2136 (lambda _
2137 ;; This file was "fixed" by patch-source-shebangs, but it requires
2138 ;; this exact first line.
2139 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
2140 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))
2141 #t))
2142 (add-after 'unpack 'patch-jni-libs
2143 ;; Hardcode dynamically loaded libraries.
2144 (lambda _
2145 (let* ((library-path (search-path-as-string->list
2146 (getenv "LIBRARY_PATH")))
2147 (find-library (lambda (name)
2148 (search-path
2149 library-path
2150 (string-append "lib" name ".so")))))
2151 (for-each
2152 (lambda (file)
2153 (catch 'decoding-error
2154 (lambda ()
2155 (substitute* file
2156 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
2157 _ name version)
2158 (format #f "\"~a\"" (find-library name)))
2159 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
2160 (format #f "\"~a\"" (find-library name)))))
2161 (lambda _
2162 ;; Those are safe to skip.
2163 (format (current-error-port)
2164 "warning: failed to substitute: ~a~%"
2165 file))))
2166 (find-files "."
2167 "\\.c$|\\.h$"))
2168 #t)))
2169 (add-before 'build 'write-source-revision-file
2170 (lambda _
2171 (with-output-to-file ".src-rev"
2172 (lambda _
2173 (display ,version)))
2174 #t))
2175 (replace 'build
2176 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2177 (apply invoke "make" "all"
2178 `(,@(if parallel-build?
2179 (list (string-append "JOBS="
2180 (number->string (parallel-job-count))))
2181 '())
2182 ,@make-flags))))
2183 ;; jdk 11 does not build jre by default any more
2184 ;; building it anyways
2185 ;; for further information see:
2186 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356
2187 (add-after 'build 'build-jre
2188 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
2189 (apply invoke "make" "legacy-jre-image"
2190 `(,@(if parallel-build?
2191 (list (string-append "JOBS="
2192 (number->string (parallel-job-count))))
2193 '())
2194 ,@make-flags))))
2195 (replace 'install
2196 (lambda* (#:key outputs #:allow-other-keys)
2197 (let ((out (assoc-ref outputs "out"))
2198 (jdk (assoc-ref outputs "jdk"))
2199 (doc (assoc-ref outputs "doc"))
2200 (images (car (find-files "build" ".*-server-release"
2201 #:directories? #t))))
2202 (copy-recursively (string-append images "/images/jdk") jdk)
2203 (copy-recursively (string-append images "/images/jre") out)
2204 (copy-recursively (string-append images "/images/docs") doc))
2205 #t))
2206 ;; Some of the libraries in the lib/ folder link to libjvm.so.
2207 ;; But that shared object is located in the server/ folder, so it
2208 ;; cannot be found. This phase creates a symbolic link in the
2209 ;; lib/ folder so that the other libraries can find it.
2210 ;;
2211 ;; See:
2212 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
2213 ;;
2214 ;; FIXME: Find the bug in the build system, so that this symlink is
2215 ;; not needed.
2216 (add-after 'install 'install-libjvm
2217 (lambda* (#:key inputs outputs #:allow-other-keys)
2218 (let* ((lib-out (string-append (assoc-ref outputs "out")
2219 "/lib"))
2220 (lib-jdk (string-append (assoc-ref outputs "jdk")
2221 "/lib")))
2222 (symlink (string-append lib-jdk "/server/libjvm.so")
2223 (string-append lib-jdk "/libjvm.so"))
2224 (symlink (string-append lib-out "/server/libjvm.so")
2225 (string-append lib-out "/libjvm.so")))
2226 #t))
2227 (add-after 'install 'strip-character-data-timestamps
2228 (lambda* (#:key outputs #:allow-other-keys)
2229 (use-modules (guix build syscalls))
2230 (let ((archive (string-append
2231 (assoc-ref outputs "jdk") "/lib/src.zip"))
2232 (dir (mkdtemp! "zip-contents.XXXXXX")))
2233 (with-directory-excursion dir
2234 (invoke "unzip" archive))
2235 (delete-file archive)
2236 (with-directory-excursion dir
2237 (let ((char-data-files (find-files "." "CharacterData.*")))
2238 (for-each (lambda (file)
2239 (substitute* file
2240 (((string-append "This file was generated "
2241 "AUTOMATICALLY from a template "
2242 "file.*"))
2243 (string-append "This file was generated "
2244 "AUTOMATICALLY from a template "
2245 "file"))))
2246 char-data-files)))
2247 (with-directory-excursion dir
2248 (let ((files (find-files "." ".*" #:directories? #t)))
2249 (apply invoke "zip" "-0" "-X" archive files))))))
2250 (add-after 'strip-character-data-timestamps 'strip-archive-timestamps
2251 (lambda* (#:key outputs #:allow-other-keys)
2252 (use-modules (guix build syscalls)
2253 (ice-9 binary-ports)
2254 (rnrs bytevectors))
2255 (letrec ((repack-archive
2256 (lambda (archive)
2257 (let ((dir (mkdtemp! "zip-contents.XXXXXX")))
2258 (with-directory-excursion dir
2259 (invoke "unzip" archive))
2260 (delete-file archive)
2261 (for-each (compose repack-archive canonicalize-path)
2262 (find-files dir "(ct.sym|.*.jar)$"))
2263 (let ((reset-file-timestamp
2264 (lambda (file)
2265 (let ((s (lstat file)))
2266 (unless (eq? (stat:type s) 'symlink)
2267 (format #t "reset ~a~%" file)
2268 (utime file 0 0 0 0))))))
2269 (for-each reset-file-timestamp
2270 (find-files dir #:directories? #t)))
2271 (with-directory-excursion dir
2272 (let ((files (find-files "." ".*" #:directories? #t)))
2273 (apply invoke "zip" "-0" "-X" archive files)))))))
2274 (for-each repack-archive
2275 (find-files (assoc-ref outputs "doc") ".*.zip$"))
2276 (for-each repack-archive
2277 (find-files (assoc-ref outputs "jdk")
2278 ".*.(zip|jar|diz)$"))
2279 (repack-archive (string-append (assoc-ref outputs "jdk") "/lib/ct.sym"))
2280 (let ((repack-jmod
2281 (lambda (file-name)
2282 (call-with-input-file file-name
2283 (lambda (file)
2284 (let ((header #vu8(#x4a #x4d #x01 #x00)))
2285 (if (equal? (get-bytevector-n
2286 file (bytevector-length header))
2287 header)
2288 (let* ((header-length (bytevector-length header))
2289 (temp-file (mkstemp!
2290 (string-copy
2291 "temp-file.XXXXXX")))
2292 (temp-filename (port-filename temp-file))
2293 (content-length
2294 (- (stat:size (stat file))
2295 header-length)))
2296 (sendfile temp-file file content-length header-length)
2297 (delete-file file-name)
2298 (close-port temp-file)
2299 (repack-archive (canonicalize-path temp-filename))
2300 (call-with-output-file file-name
2301 (lambda (file)
2302 (put-bytevector file header)
2303 (call-with-input-file temp-filename
2304 (lambda (temp-file)
2305 (sendfile
2306 file temp-file
2307 (stat:size (stat temp-file)) 0)))))))))))))
2308 (for-each repack-jmod
2309 (find-files (assoc-ref outputs "jdk") ".*.jmod$")))
2310 #t)))
2311 (add-after 'install 'remove-timestamp-from-api-summary
2312 (lambda* (#:key outputs #:allow-other-keys)
2313 (substitute* (string-append (assoc-ref outputs "doc")
2314 "/api/overview-summary.html")
2315 (("Generated by javadoc \\(11-internal\\).*$")
2316 "Generated by javadoc (11-internal) -->\n"))
2317 #t)))))
2318 (inputs
2319 `(("alsa-lib" ,alsa-lib)
2320 ("cups" ,cups)
2321 ("fontconfig" ,fontconfig)
2322 ("freetype" ,freetype)
2323 ("giflib" ,giflib)
2324 ("lcms" ,lcms)
2325 ("libjpeg" ,libjpeg-turbo)
2326 ("libpng" ,libpng)
2327 ("libx11" ,libx11)
2328 ("libxext" ,libxext)
2329 ("libxrender" ,libxrender)
2330 ("libxt" ,libxt)
2331 ("libxtst" ,libxtst)))
2332 (native-inputs
2333 `(("autoconf" ,autoconf)
2334 ("openjdk10" ,openjdk10)
2335 ("openjdk10:jdk" ,openjdk10 "jdk")
2336 ("make" ,gnu-make-4.2)
2337 ("pkg-config" ,pkg-config)
2338 ("unzip" ,unzip)
2339 ("which" ,which)
2340 ("zip" ,zip)))
2341 (home-page "https://openjdk.java.net/projects/jdk/11/")
2342 (synopsis "Java development kit")
2343 (description
2344 "This package provides the Java development kit OpenJDK.")
2345 (license license:gpl2+)))
2346
2347 (define-public openjdk12
2348 (package
2349 (inherit openjdk11)
2350 (name "openjdk")
2351 (version "12.33")
2352 (source (origin
2353 (method url-fetch)
2354 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
2355 (file-name (string-append name "-" version ".tar.bz2"))
2356 (sha256
2357 (base32
2358 "0mbhdrk12b6878kby0flnbak7444dlpm0ihlmf92vk59y1c02bc2"))
2359 (modules '((guix build utils)))
2360 (snippet
2361 `(begin
2362 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2363 #t))))
2364 (inputs
2365 `(("alsa-lib" ,alsa-lib)
2366 ("cups" ,cups)
2367 ("fontconfig" ,fontconfig)
2368 ("freetype" ,freetype)
2369 ("giflib" ,giflib)
2370 ("lcms" ,lcms)
2371 ("libjpeg" ,libjpeg-turbo)
2372 ("libpng" ,libpng)
2373 ("libx11" ,libx11)
2374 ("libxext" ,libxext)
2375 ("libxrandr" ,libxrandr)
2376 ("libxrender" ,libxrender)
2377 ("libxt" ,libxt)
2378 ("libxtst" ,libxtst)))
2379 (native-inputs
2380 `(("autoconf" ,autoconf)
2381 ("openjdk11" ,openjdk11)
2382 ("openjdk11:jdk" ,openjdk11 "jdk")
2383 ("make@4.2" ,gnu-make-4.2)
2384 ("pkg-config" ,pkg-config)
2385 ("unzip" ,unzip)
2386 ("which" ,which)
2387 ("zip" ,zip)))
2388 (home-page "https://openjdk.java.net/projects/jdk/12")))
2389
2390 (define-public openjdk13
2391 (package
2392 (inherit openjdk12)
2393 (name "openjdk")
2394 (version "13.0")
2395 (source (origin
2396 (method url-fetch)
2397 (uri "http://hg.openjdk.java.net/jdk/jdk13/archive/9c250a7600e1.tar.bz2")
2398 (file-name (string-append name "-" version ".tar.bz2"))
2399 (sha256
2400 (base32
2401 "0v0ljvx5dyzp96dw4z4ksw3pvasil7783mgnmd1wk9gads5ab8iq"))
2402 (modules '((guix build utils)))
2403 (snippet
2404 `(begin
2405 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2406 #t))))
2407 (inputs
2408 `(("alsa-lib" ,alsa-lib)
2409 ("cups" ,cups)
2410 ("fontconfig" ,fontconfig)
2411 ("freetype" ,freetype)
2412 ("giflib" ,giflib)
2413 ("lcms" ,lcms)
2414 ("libjpeg" ,libjpeg-turbo)
2415 ("libpng" ,libpng)
2416 ("libx11" ,libx11)
2417 ("libxext" ,libxext)
2418 ("libxrandr" ,libxrandr)
2419 ("libxrender" ,libxrender)
2420 ("libxt" ,libxt)
2421 ("libxtst" ,libxtst)))
2422 (native-inputs
2423 `(("autoconf" ,autoconf)
2424 ("openjdk12:jdk" ,openjdk12 "jdk")
2425 ("make@4.2" ,gnu-make-4.2)
2426 ("pkg-config" ,pkg-config)
2427 ("unzip" ,unzip)
2428 ("which" ,which)
2429 ("zip" ,zip)))
2430 (home-page "https://openjdk.java.net/projects/jdk/13")))
2431
2432 (define-public openjdk14
2433 (package
2434 (inherit openjdk13)
2435 (name "openjdk")
2436 (version "14.0")
2437 (source (origin
2438 (method url-fetch)
2439 (uri "http://hg.openjdk.java.net/jdk/jdk14/archive/bc54620a3848.tar.bz2")
2440 (file-name (string-append name "-" version ".tar.bz2"))
2441 (sha256
2442 (base32
2443 "0z485pk7r1xpw8004g4nrwrzj17sabgx8yfdbxwfvzkjp8qyajch"))
2444 (modules '((guix build utils)))
2445 (snippet
2446 `(begin
2447 ;; The m4 macro uses 'help' to search for builtins, which is
2448 ;; not available in bash-minimal
2449 (substitute* "make/autoconf/basics.m4"
2450 (("if help") "if command -v"))
2451 (for-each delete-file (find-files "." ".*.(bin|exe|jar)$"))
2452 #t))))
2453 (inputs
2454 `(("alsa-lib" ,alsa-lib)
2455 ("cups" ,cups)
2456 ("fontconfig" ,fontconfig)
2457 ("freetype" ,freetype)
2458 ("giflib" ,giflib)
2459 ("lcms" ,lcms)
2460 ("libjpeg" ,libjpeg-turbo)
2461 ("libpng" ,libpng)
2462 ("libx11" ,libx11)
2463 ("libxext" ,libxext)
2464 ("libxrandr" ,libxrandr)
2465 ("libxrender" ,libxrender)
2466 ("libxt" ,libxt)
2467 ("libxtst" ,libxtst)))
2468 (native-inputs
2469 `(("autoconf" ,autoconf)
2470 ("make@4.2" ,gnu-make-4.2)
2471 ("openjdk13:jdk" ,openjdk13 "jdk")
2472 ("pkg-config" ,pkg-config)
2473 ("unzip" ,unzip)
2474 ("which" ,which)
2475 ("zip" ,zip)))
2476 (home-page "https://openjdk.java.net/projects/jdk/14")))
2477
2478 (define-public icedtea icedtea-8)
2479
2480 \f
2481 (define-public ant/java8
2482 (package (inherit ant-bootstrap)
2483 (name "ant")
2484 (version "1.10.9")
2485 (source (origin
2486 (method url-fetch)
2487 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2488 version "-src.tar.gz"))
2489 (sha256
2490 (base32
2491 "0x78434q5ab193ma7ys27m9kwpdgrfzqj00hrf1szwcgk0lzw01z"))
2492 (modules '((guix build utils)))
2493 (snippet
2494 '(begin
2495 (for-each delete-file
2496 (find-files "lib/optional" "\\.jar$"))
2497 #t))))
2498 (arguments
2499 (substitute-keyword-arguments (package-arguments ant-bootstrap)
2500 ((#:phases phases)
2501 `(modify-phases ,phases
2502 (add-after 'unpack 'remove-scripts
2503 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2504 ;; wrappers.
2505 (lambda _
2506 (for-each delete-file
2507 (find-files "src/script"
2508 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2509 #t))
2510 (replace 'build
2511 (lambda* (#:key inputs outputs #:allow-other-keys)
2512 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2513
2514 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2515 ;; Ant to build. This is necessary in addition to disabling the
2516 ;; "check" phase, because the dependency on "test-jar" would always
2517 ;; result in the tests to be run.
2518 (substitute* "build.xml"
2519 (("depends=\"jars,test-jar") "depends=\"jars"))
2520 (invoke "bash" "bootstrap.sh"
2521 (string-append "-Ddist.dir="
2522 (assoc-ref outputs "out")))))))))
2523 (native-inputs
2524 `(("jdk" ,icedtea-8 "jdk")
2525 ("zip" ,zip)
2526 ("unzip" ,unzip)))))
2527
2528 ;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2529 ;; requires Java 8.
2530 (define-public ant
2531 (package (inherit ant/java8)
2532 (version "1.9.15")
2533 (source (origin
2534 (method url-fetch)
2535 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2536 version "-src.tar.gz"))
2537 (sha256
2538 (base32
2539 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2540 (native-inputs
2541 `(("jdk" ,icedtea-7 "jdk")
2542 ("zip" ,zip)
2543 ("unzip" ,unzip)))))
2544
2545 (define-public ant-apache-bcel
2546 (package
2547 (inherit ant/java8)
2548 (name "ant-apache-bcel")
2549 (arguments
2550 (substitute-keyword-arguments (package-arguments ant/java8)
2551 ((#:phases phases)
2552 `(modify-phases ,phases
2553 (add-after 'unpack 'link-bcel
2554 (lambda* (#:key inputs #:allow-other-keys)
2555 (for-each (lambda (file)
2556 (symlink file
2557 (string-append "lib/optional/"
2558 (basename file))))
2559 (find-files (assoc-ref inputs "java-commons-bcel")
2560 "\\.jar$"))
2561 #t))
2562 (add-after 'build 'install
2563 (lambda* (#:key outputs #:allow-other-keys)
2564 (let* ((out (assoc-ref outputs "out"))
2565 (share (string-append out "/share/java"))
2566 (bin (string-append out "/bin"))
2567 (lib (string-append out "/lib")))
2568 (mkdir-p share)
2569 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2570 (delete-file-recursively bin)
2571 (delete-file-recursively lib)
2572 #t)))))))
2573 (inputs
2574 `(("java-commons-bcel" ,java-commons-bcel)
2575 ,@(package-inputs ant/java8)))))
2576
2577 (define-public ant-junit
2578 (package
2579 (inherit ant/java8)
2580 (name "ant-junit")
2581 (arguments
2582 (substitute-keyword-arguments (package-arguments ant/java8)
2583 ((#:phases phases)
2584 `(modify-phases ,phases
2585 (add-after 'unpack 'link-junit
2586 (lambda* (#:key inputs #:allow-other-keys)
2587 (for-each (lambda (file)
2588 (symlink file
2589 (string-append "lib/optional/"
2590 (basename file))))
2591 (find-files (assoc-ref inputs "java-junit")
2592 "\\.jar$"))
2593 #t))
2594 (add-after 'build 'install
2595 (lambda* (#:key outputs #:allow-other-keys)
2596 (let* ((out (assoc-ref outputs "out"))
2597 (share (string-append out "/share/java"))
2598 (bin (string-append out "/bin"))
2599 (lib (string-append out "/lib")))
2600 (mkdir-p share)
2601 (install-file (string-append lib "/ant-junit.jar") share)
2602 (delete-file-recursively bin)
2603 (delete-file-recursively lib)
2604 #t)))))))
2605 (inputs
2606 `(("java-junit" ,java-junit)
2607 ,@(package-inputs ant/java8)))))
2608
2609 (define-public java-openjfx-build
2610 (package
2611 (name "java-openjfx-build")
2612 ;; This is a java-8 version
2613 (version "8.202")
2614 (source (origin
2615 (method hg-fetch)
2616 (uri (hg-reference
2617 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2618 (changeset (string-append
2619 (string-join (string-split version #\.) "u")
2620 "-ga"))))
2621 (file-name (string-append name "-" version "-checkout"))
2622 (modules '((guix build utils)))
2623 (snippet
2624 '(begin
2625 ;; Delete included gradle jar
2626 (delete-file-recursively "gradle/wrapper")
2627 #t))
2628 (sha256
2629 (base32
2630 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2631 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2632 (build-system ant-build-system)
2633 (arguments
2634 `(#:jar-name "java-openjfx.jar"
2635 #:source-dir "buildSrc/src/main/java"
2636 #:test-dir "buildSrc/src/test"
2637 #:phases
2638 (modify-phases %standard-phases
2639 (add-before 'configure 'generate-jsl-parser
2640 (lambda _
2641 (invoke "antlr3" "-o"
2642 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2643 "buildSrc/src/main/antlr/JSL.g"))))))
2644 (inputs
2645 `(("antlr3" ,antlr3)
2646 ("java-stringtemplate" ,java-stringtemplate)))
2647 (native-inputs
2648 `(("java-junit" ,java-junit)
2649 ("java-hamcrest-core" ,java-hamcrest-core)))
2650 (home-page "https://openjfx.io")
2651 (synopsis "Graphical application toolkit in Java")
2652 (description "OpenJFX is a client application platform for desktop,
2653 mobile and embedded systems built on Java. Its goal is to produce a
2654 modern, efficient, and fully featured toolkit for developing rich client
2655 applications. This package contains base classes for the OpenJFX
2656 distribution and helper classes for building other parts of the
2657 distribution.")
2658 (license license:gpl2))) ;gpl2 only, with classpath exception
2659
2660 (define-public java-openjfx-base
2661 (package (inherit java-openjfx-build)
2662 (name "java-openjfx-base")
2663 (arguments
2664 `(#:jar-name "java-openjfx-base.jar"
2665 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2666 #:test-dir "modules/base/src/test"
2667 #:phases
2668 (modify-phases %standard-phases
2669 (add-before 'check 'remove-empty-file
2670 (lambda _
2671 (with-directory-excursion "modules/base/src/test/java"
2672 ;; These files are completely commented, but junit expects them to
2673 ;; contain a class, so tests fail.
2674 (delete-file
2675 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2676 (delete-file
2677 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2678 (delete-file "javafx/beans/property/PropertiesTest.java")
2679 (delete-file
2680 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2681 ;; This one fails
2682 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2683 #t)))))
2684 (propagated-inputs
2685 `(("java-openjfx-build" ,java-openjfx-build)))
2686 (description "OpenJFX is a client application platform for desktop,
2687 mobile and embedded systems built on Java. Its goal is to produce a
2688 modern, efficient, and fully featured toolkit for developing rich client
2689 applications. This package contains base classes for the OpenJFX
2690 distribution.")))
2691
2692 (define-public java-openjfx-graphics
2693 (package (inherit java-openjfx-build)
2694 (name "java-openjfx-graphics")
2695 (arguments
2696 `(#:jar-name "java-openjfx-graphics.jar"
2697 #:source-dir "modules/graphics/src/main/java"
2698 #:tests? #f; require X
2699 #:test-dir "modules/graphics/src/test"
2700 #:phases
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'copy-missing-file
2703 (lambda* (#:key inputs #:allow-other-keys)
2704 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2705 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2706 ;; XXX: looks like the missing file we found isn't *quite*
2707 ;; compatible...
2708 (substitute* target
2709 (("case TYPE_INT_ARGB:") "")))))
2710 (add-after 'build 'build-native
2711 (lambda* (#:key inputs outputs #:allow-other-keys)
2712 (let ((jdk (assoc-ref inputs "jdk"))
2713 (class-file->class-name
2714 (lambda (class-file)
2715 (string-map (lambda (c)
2716 (if (char=? c #\/) #\. c))
2717 (string-drop-right class-file
2718 (string-length ".class"))))))
2719 (setenv "CPPFLAGS"
2720 (string-append "-DINLINE=inline "
2721 "-DLINUX "
2722 "-I" jdk "/include "
2723 "-I" jdk "/include/linux "
2724 "-I " (getcwd) "/build/classes/include "
2725 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2726
2727 ;; Instructions have been adapted from buildSrc/linux.gradle
2728 (with-directory-excursion "build/classes"
2729 ;; Build prism
2730 (mkdir-p "include")
2731
2732 ;; Generate headers for prism
2733 (apply invoke "javah" "-d" "include" "-cp" "."
2734 (map class-file->class-name
2735 (append (find-files "com/sun/prism/impl" "\\.class$")
2736 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2737
2738 ;; ...then for prism_sw
2739 (apply invoke "javah" "-d" "include" "-cp" "."
2740 (map class-file->class-name
2741 (find-files "com/sun/pisces" "\\.class$")))
2742
2743 ;; ...and for prism_es2
2744 (apply invoke "javah" "-d" "include" "-cp" "."
2745 (map class-file->class-name
2746 (find-files "com/sun/prism/es2" "\\.class$")))))
2747
2748 (with-directory-excursion "netbeans/native-prism"
2749 (invoke "make" "CONF=Release"))
2750 (with-directory-excursion "netbeans/native-prism-sw"
2751 (invoke "make" "CONF=Release"))
2752 ;; TODO: This fails due to unknown EGL procedure names
2753 #;
2754 (with-directory-excursion "netbeans/native-prism-es2"
2755 (invoke "make" "CONF=Release"))
2756
2757 (let* ((out (assoc-ref outputs "out"))
2758 (dir ,(match (%current-system)
2759 ("i686-linux"
2760 "i386")
2761 ((or "armhf-linux" "aarch64-linux")
2762 "arm")
2763 ((or "x86_64-linux")
2764 "amd64")
2765 (_ "unknown")))
2766 (target (string-append out "/share/" dir "/")))
2767 (mkdir-p target)
2768 (for-each (lambda (file)
2769 (let ((new-name
2770 (string-append "lib"
2771 (string-map
2772 (lambda (c)
2773 (if (char=? c #\-) #\_ c))
2774 (string-drop (basename file)
2775 (string-length "libnative-"))))))
2776 (copy-file file
2777 (string-append target new-name))))
2778 (find-files "netbeans" "\\.so$"))))))))
2779 (propagated-inputs
2780 `(("java-openjfx-base" ,java-openjfx-base)
2781 ("java-swt" ,java-swt)))
2782 ;; XXX: for unknown reasons
2783 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2784 ;; in this revision.
2785 (native-inputs
2786 `(("JNativeSurface.c"
2787 ,(origin
2788 (method url-fetch)
2789 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2790 /modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2791 (sha256
2792 (base32
2793 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2794 (description "OpenJFX is a client application platform for desktop,
2795 mobile and embedded systems built on Java. Its goal is to produce a
2796 modern, efficient, and fully featured toolkit for developing rich client
2797 applications. This package contains graphics-related classes for the
2798 OpenJFX distribution.")))
2799
2800 (define-public java-openjfx-media
2801 (package (inherit java-openjfx-build)
2802 (name "java-openjfx-media")
2803 (propagated-inputs
2804 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2805 (arguments
2806 `(#:jar-name "java-openjfx-media.jar"
2807 #:source-dir "modules/media/src/main/java"
2808 #:tests? #f)); no tests
2809 (description "OpenJFX is a client application platform for desktop,
2810 mobile and embedded systems built on Java. Its goal is to produce a
2811 modern, efficient, and fully featured toolkit for developing rich client
2812 applications. This package contains media-related classes for the
2813 OpenJFX distribution.")))
2814
2815 (define-public java-openjfx-controls
2816 (package (inherit java-openjfx-build)
2817 (name "java-openjfx-controls")
2818 (propagated-inputs
2819 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2820 (arguments
2821 `(#:jar-name "java-openjfx-controls.jar"
2822 #:source-dir "modules/controls/src/main/java"
2823 #:test-dir "modules/controls/src/test"
2824 ;; TODO: tests require com.sun.javafx.pgstub,
2825 ;; javafx.collections.MockSetObserver, and
2826 ;; com.sun.javafx.binding.ExpressionHelperUtility
2827 #:tests? #false
2828 #:phases
2829 (modify-phases %standard-phases
2830 (add-after 'unpack 'copy-resources
2831 (lambda _
2832 (copy-recursively "modules/controls/src/test/resources"
2833 "build/test-classes")
2834 (copy-recursively "modules/controls/src/main/resources"
2835 "build/classes"))))))
2836 (description "OpenJFX is a client application platform for desktop,
2837 mobile and embedded systems built on Java. Its goal is to produce a
2838 modern, efficient, and fully featured toolkit for developing rich client
2839 applications. This package contains UI control classes for the
2840 OpenJFX distribution.")))
2841
2842 (define-public javacc-4
2843 (package
2844 (name "javacc")
2845 (version "4.1")
2846 (source (origin
2847 (method git-fetch)
2848 (uri (git-reference
2849 (url "https://github.com/javacc/javacc")
2850 (commit "release_41")))
2851 (file-name (string-append "javacc-" version "-checkout"))
2852 (sha256
2853 (base32
2854 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2855 (modules '((guix build utils)))
2856 ;; delete bundled jars
2857 (snippet '(begin (delete-file-recursively "lib") #t))))
2858 (build-system ant-build-system)
2859 ;; Tests fail with
2860 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2861 ;; JAVACODE failed
2862 (arguments
2863 `(#:tests? #f
2864 #:phases
2865 (modify-phases %standard-phases
2866 ;; Delete tests to avoid build failure (we don't run them anyway).
2867 (add-after 'unpack 'delete-tests
2868 (lambda _
2869 (for-each delete-file
2870 '("src/org/javacc/JavaCCTestCase.java"
2871 "src/org/javacc/parser/ExpansionTest.java"
2872 "src/org/javacc/parser/OptionsTest.java"
2873 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2874 (for-each delete-file-recursively
2875 '("src/org/javacc/parser/test"
2876 "src/org/javacc/jjdoc/test"))
2877 #t))
2878 (replace 'install (install-jars "bin/lib")))))
2879 (home-page "https://javacc.org/")
2880 (synopsis "Java parser generator")
2881 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2882 generator for use with Java applications. A parser generator is a tool that
2883 reads a grammar specification and converts it to a Java program that can
2884 recognize matches to the grammar. In addition to the parser generator itself,
2885 JavaCC provides other standard capabilities related to parser generation such
2886 as tree building (via a tool called JJTree included with JavaCC), actions,
2887 debugging, etc.")
2888 (license license:bsd-3)))
2889
2890 ;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2891 ;; in the bootstrap/ directory.
2892 (define-public javacc-3
2893 (package
2894 (inherit javacc-4)
2895 (version "3.2")
2896 (source (origin
2897 (method git-fetch)
2898 (uri (git-reference
2899 (url "https://github.com/javacc/javacc")
2900 (commit "release_32")))
2901 (file-name (string-append "javacc-" version "-checkout"))
2902 (sha256
2903 (base32
2904 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2905 (arguments
2906 `(#:tests? #f
2907 #:phases
2908 (modify-phases %standard-phases
2909 (add-before 'build 'set-java-version
2910 (lambda _
2911 (for-each
2912 (lambda (file)
2913 (substitute* file
2914 (("debug=") "source=\"1.4\" debug=")))
2915 (find-files "." "build.xml"))
2916 #t))
2917 (replace 'install (install-jars "bin/lib")))))))
2918
2919 (define-public javacc
2920 (package
2921 (inherit javacc-4)
2922 (version "7.0.4")
2923 (source
2924 (origin
2925 (method git-fetch)
2926 (uri (git-reference
2927 (url "https://github.com/javacc/javacc")
2928 (commit version)))
2929 (file-name (git-file-name "javacc" version))
2930 (sha256
2931 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2932 (modules '((guix build utils)))
2933 ;; Delete bundled jars.
2934 (snippet '(begin (for-each delete-file-recursively
2935 '("bootstrap" "lib"))
2936 #t))))
2937 (arguments
2938 `(#:make-flags ; bootstrap from javacc-4
2939 (list (string-append "-Dbootstrap-jar="
2940 (assoc-ref %build-inputs "javacc")
2941 "/share/java/javacc.jar"))
2942 #:test-target "test"
2943 #:phases
2944 (modify-phases %standard-phases
2945 (replace 'install (install-jars "target"))
2946 (add-after 'install 'install-bin
2947 (lambda* (#:key outputs inputs #:allow-other-keys)
2948 (let* ((out (assoc-ref outputs "out"))
2949 (dir (string-append out "/share/java"))
2950 (bin (string-append out "/bin"))
2951 (javacc (string-append bin "/javacc")))
2952 (mkdir-p bin)
2953 (with-output-to-file javacc
2954 (lambda _
2955 (display
2956 (string-append "#!/bin/sh\n"
2957 (assoc-ref inputs "jdk") "/bin/java"
2958 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2959 (chmod javacc #o755)
2960 ;; symlink to different names to affect the first argument and
2961 ;; change the behavior of the jar file.
2962 (symlink javacc (string-append bin "/jjdoc"))
2963 (symlink javacc (string-append bin "/jjtree"))
2964 #t))))))
2965
2966 (native-inputs
2967 `(("javacc" ,javacc-4)))))
2968
2969 ;; This is the last 3.x release of ECJ
2970 (define-public java-ecj-3
2971 (package
2972 (name "java-ecj")
2973 (version "3.8.2")
2974 (source (origin
2975 (method url-fetch)
2976 (uri (string-append "http://archive.eclipse.org/eclipse/"
2977 "downloads/drops/R-" version
2978 "-201301310800/ecjsrc-" version ".jar"))
2979 (sha256
2980 (base32
2981 "01mdj14jw11g1jfnki4fi8229p0c6zzckd38zqy2w4m3cjcvsx04"))))
2982 (build-system ant-build-system)
2983 (arguments
2984 `(#:tests? #f ; none included
2985 #:jdk ,icedtea-7 ; doesn't build with JDK8+
2986 #:make-flags (list "-f" "src/build.xml")
2987 #:build-target "build"
2988 #:phases
2989 (modify-phases %standard-phases
2990 (add-after 'unpack 'fix-manifest
2991 (lambda _
2992 ;; Record the main class to make ecj executable.
2993 (with-atomic-file-replacement "src/META-INF/MANIFEST.MF"
2994 (lambda (in out)
2995 (display "Manifest-Version: 1.0
2996 Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
2997 out)))
2998 #t))
2999 (replace 'install (install-jars ".")))))
3000 (home-page "https://eclipse.org")
3001 (synopsis "Eclipse Java development tools core batch compiler")
3002 (description "This package provides the Eclipse Java core batch compiler.")
3003 (license license:epl1.0)))
3004
3005 ;; This is needed for java-cisd-args4j
3006 (define-public java-ecj-3.5
3007 (package (inherit java-ecj-3)
3008 (version "3.5.1")
3009 (source (origin
3010 (method url-fetch/zipbomb)
3011 (uri (string-append "http://archive.eclipse.org/eclipse/"
3012 "downloads/drops/R-" version
3013 "-200909170800/ecjsrc-" version ".zip"))
3014 (sha256
3015 (base32
3016 "1vnl2mavisc567bip736xzsvvbjif5279wc4a7pbdik5wlir8qr7"))))
3017 (build-system ant-build-system)
3018 (arguments
3019 `(#:tests? #f ; none included
3020 #:jdk ,icedtea-7 ; doesn't build with JDK8+
3021 #:build-target "build"
3022 #:phases
3023 (modify-phases %standard-phases
3024 (add-after 'unpack 'fix-manifest
3025 (lambda _
3026 ;; Record the main class to make ecj executable.
3027 (with-atomic-file-replacement "META-INF/MANIFEST.MF"
3028 (lambda (in out)
3029 (dump-port in out)
3030 (display "Main-Class: org.eclipse.jdt.internal.compiler.batch.Main\n"
3031 out)))
3032 #t))
3033 (replace 'install (install-jars ".")))))
3034 (native-inputs
3035 `(("unzip" ,unzip)))))
3036
3037 (define-public java-ecj
3038 (package (inherit java-ecj-3)
3039 (version "4.6.3")
3040 (source
3041 (origin
3042 (method url-fetch)
3043 (uri (string-append
3044 "http://archive.eclipse.org/eclipse/downloads/drops4/R-"
3045 version
3046 "-201703010400/ecjsrc-"
3047 version
3048 ".jar"))
3049 (sha256
3050 (base32
3051 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
3052 (arguments
3053 `(#:tests? #f ; none included
3054 #:build-target "build"
3055 #:phases
3056 (modify-phases %standard-phases
3057 (add-after 'unpack 'fix-build.xml
3058 (lambda _
3059 (substitute* "src/build.xml"
3060 (("^.*MANIFEST.*$")
3061 ""))
3062 #t))
3063 (add-after 'unpack 'fix-prop
3064 (lambda _
3065 (substitute* "src/build.xml"
3066 (("^.*properties.*$")
3067 "<include name=\"**/*.properties\"/>
3068 <include name=\"**/*.props\"/>"))
3069 #t))
3070 (add-before 'build 'chdir
3071 (lambda _
3072 (chdir "src")
3073 #t))
3074 (replace 'install (install-jars ".")))))))
3075
3076 (define-public java-cisd-base
3077 (let ((revision 38938)
3078 (base-version "14.12.0"))
3079 (package
3080 (name "java-cisd-base")
3081 (version (string-append base-version "-" (number->string revision)))
3082 (source (origin
3083 (method svn-fetch)
3084 (uri (svn-reference
3085 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3086 "base/tags/release/"
3087 (version-major+minor base-version)
3088 ".x/" base-version "/base/"))
3089 (revision revision)))
3090 (file-name (string-append "java-cisd-base-" version "-checkout"))
3091 (sha256
3092 (base32
3093 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
3094 (modules '((guix build utils)))
3095 (snippet
3096 '(begin
3097 ;; Delete included gradle jar
3098 (delete-file-recursively "gradle/wrapper")
3099 ;; Delete pre-built native libraries
3100 (delete-file-recursively "libs")
3101 #t))))
3102 (build-system ant-build-system)
3103 (arguments
3104 `(#:make-flags '("-file" "build/build.xml")
3105 #:test-target "jar-test"
3106 #:jdk ,icedtea-8
3107 #:phases
3108 (modify-phases %standard-phases
3109 (add-after 'unpack 'unpack-build-resources
3110 (lambda* (#:key inputs #:allow-other-keys)
3111 (copy-recursively (assoc-ref inputs "build-resources")
3112 "../build_resources")
3113 #t))
3114 (add-after 'unpack-build-resources 'fix-dependencies
3115 (lambda* (#:key inputs #:allow-other-keys)
3116 (substitute* "build/build.xml"
3117 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3118 (string-append (assoc-ref inputs "java-testng")
3119 "/share/java/java-testng.jar"))
3120 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3121 (string-append (assoc-ref inputs "java-commons-lang")
3122 "/share/java/commons-lang-"
3123 ,(package-version java-commons-lang) ".jar"))
3124 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3125 (string-append (assoc-ref inputs "java-commons-io")
3126 "/lib/m2/commons-io/commons-io/"
3127 ,(package-version java-commons-io)
3128 "/commons-io-"
3129 ,(package-version java-commons-io)
3130 ".jar"))
3131 ;; Remove dependency on svn
3132 (("<build-info.*") "")
3133 (("\\$\\{revision.number\\}")
3134 ,(number->string revision))
3135 (("\\$\\{version.number\\}") ,base-version))
3136 ;; Remove dependency on classycle
3137 (substitute* "../build_resources/ant/build-common.xml"
3138 (("<taskdef name=\"dependency-checker.*") "")
3139 (("classname=\"classycle.*") "")
3140 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3141 #t))
3142 ;; A few tests fail because of the lack of a proper /etc/groups and
3143 ;; /etc/passwd file in the build container.
3144 (add-after 'unpack 'disable-broken-tests
3145 (lambda _
3146 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
3147 (("Unix.isOperational\\(\\)") "false"))
3148 #t))
3149 ;; These decorators are almost useless and pull in an unpackaged
3150 ;; dependency.
3151 (add-after 'unpack 'remove-useless-decorators
3152 (lambda _
3153 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
3154 (("@Private") "")
3155 (("import ch.rinn.restrictions.Private;") ""))
3156 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
3157 (("@Friend.*") "")
3158 (("import ch.rinn.restrictions.Friend;") ""))
3159 #t))
3160 (add-before 'configure 'build-native-code
3161 (lambda* (#:key inputs #:allow-other-keys)
3162 (let ((jdk (assoc-ref inputs "jdk"))
3163 (dir ,(match (%current-system)
3164 ("i686-linux"
3165 "i386-Linux")
3166 ((or "armhf-linux" "aarch64-linux")
3167 "arm-Linux")
3168 ((or "x86_64-linux")
3169 "amd64-Linux")
3170 (_ "unknown-Linux"))))
3171 (with-directory-excursion "source/c"
3172 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3173 (string-append "-I" jdk "/include")
3174 (string-append "-I" jdk "/include/linux")
3175 "-o" "libunix.so")
3176 (invoke "gcc" "-shared" "-O3" "-fPIC"
3177 "-DMACHINE_BYTE_ORDER=1"
3178 "copyCommon.c"
3179 "copyByteChar.c"
3180 "copyByteDouble.c"
3181 "copyByteFloat.c"
3182 "copyByteInt.c"
3183 "copyByteLong.c"
3184 "copyByteShort.c"
3185 (string-append "-I" jdk "/include")
3186 (string-append "-I" jdk "/include/linux")
3187 "-o" "libnativedata.so"))
3188 (install-file "source/c/libunix.so"
3189 (string-append "libs/native/unix/" dir))
3190 (install-file "source/c/libnativedata.so"
3191 (string-append "libs/native/nativedata/" dir))
3192 #t)))
3193 ;; In the "check" phase we only build the test executable.
3194 (add-after 'check 'run-tests
3195 (lambda _
3196 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3197 (delete-file "targets/dist/sis-base-test.jar")
3198 #t))
3199 (replace 'install (install-jars "targets/dist")))))
3200 (native-inputs
3201 `(("jdk" ,icedtea-8)
3202 ("java-commons-lang" ,java-commons-lang)
3203 ("java-commons-io" ,java-commons-io)
3204 ("java-testng" ,java-testng)
3205 ("build-resources"
3206 ,(origin
3207 (method svn-fetch)
3208 (uri (svn-reference
3209 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3210 "base/tags/release/"
3211 (version-major+minor base-version)
3212 ".x/" base-version
3213 "/build_resources/"))
3214 (revision revision)))
3215 (sha256
3216 (base32
3217 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3218 (home-page "http://svnsis.ethz.ch")
3219 (synopsis "Utility classes for libraries from ETH Zurich")
3220 (description "This library supplies some utility classes needed for
3221 libraries from the SIS division at ETH Zurich like jHDF5.")
3222 ;; The C sources are under a non-copyleft license, which looks like a
3223 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3224 (license (list license:asl2.0
3225 (license:non-copyleft "file://source/c/COPYING"))))))
3226
3227 (define-public java-cisd-args4j
3228 (let ((revision 39162)
3229 (base-version "9.11.2"))
3230 (package
3231 (name "java-cisd-args4j")
3232 (version (string-append base-version "-" (number->string revision)))
3233 (source (origin
3234 (method svn-fetch)
3235 (uri (svn-reference
3236 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3237 "args4j/tags/release/"
3238 (version-major+minor base-version)
3239 ".x/" base-version "/args4j/"))
3240 (revision revision)))
3241 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3242 (sha256
3243 (base32
3244 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3245 (build-system ant-build-system)
3246 (arguments
3247 `(#:make-flags '("-file" "build/build.xml")
3248 #:tests? #f ; there are no tests
3249 ;; There are weird build failures with JDK8, such as: "The type
3250 ;; java.io.ObjectInputStream cannot be resolved. It is indirectly
3251 ;; referenced from required .class files"
3252 #:jdk ,icedtea-7
3253 #:modules ((guix build ant-build-system)
3254 (guix build utils)
3255 (guix build java-utils)
3256 (sxml simple)
3257 (sxml transform)
3258 (sxml xpath))
3259 #:phases
3260 (modify-phases %standard-phases
3261 (add-after 'unpack 'unpack-build-resources
3262 (lambda* (#:key inputs #:allow-other-keys)
3263 (mkdir-p "../build_resources")
3264 (invoke "tar" "xf" (assoc-ref inputs "build-resources")
3265 "-C" "../build_resources"
3266 "--strip-components=1")
3267 (mkdir-p "../build_resources/lib")
3268 #t))
3269 (add-after 'unpack-build-resources 'fix-dependencies
3270 (lambda* (#:key inputs #:allow-other-keys)
3271 ;; FIXME: There should be a more convenient abstraction for
3272 ;; editing XML files.
3273 (with-directory-excursion "../build_resources/ant/"
3274 (chmod "build-common.xml" #o664)
3275 (call-with-output-file "build-common.xml.new"
3276 (lambda (port)
3277 (sxml->xml
3278 (pre-post-order
3279 (with-input-from-file "build-common.xml"
3280 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3281 `(;; Remove dependency on classycle and custom ant tasks
3282 (taskdef . ,(lambda (tag . kids)
3283 (let ((name ((sxpath '(name *text*)) kids)))
3284 (if (or (member "build-info" name)
3285 (member "dependency-checker" name)
3286 (member "build-java-subprojects" name)
3287 (member "project-classpath" name))
3288 '() ; skip
3289 `(,tag ,@kids)))))
3290 (typedef . ,(lambda (tag . kids)
3291 (let ((name ((sxpath '(name *text*)) kids)))
3292 (if (member "recursive-jar" name)
3293 '() ; skip
3294 `(,tag ,@kids)))))
3295 (build-java-subprojects . ,(lambda _ '()))
3296 ;; Ignore everything else
3297 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3298 (*text* . ,(lambda (_ txt) txt))))
3299 port)))
3300 (rename-file "build-common.xml.new" "build-common.xml"))
3301 (substitute* "build/build.xml"
3302 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3303 (string-append (assoc-ref inputs "java-cisd-base")
3304 "/share/java/sis-base.jar"))
3305 ;; Remove dependency on svn
3306 (("<build-info.*") "")
3307 (("\\$\\{revision.number\\}")
3308 ,(number->string revision))
3309 (("\\$\\{version.number\\}") ,base-version)
3310 ;; Don't use custom ant tasks.
3311 (("recursive-jar") "jar")
3312 (("<project-classpath.*") ""))
3313 #t))
3314 (replace 'install (install-jars "targets/dist")))))
3315 (inputs
3316 `(("java-cisd-base" ,java-cisd-base)))
3317 (native-inputs
3318 `(("ecj" ,java-ecj-3.5)
3319 ("build-resources"
3320 ,(origin
3321 (method svn-fetch)
3322 (uri (svn-reference
3323 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3324 "args4j/tags/release/"
3325 (version-major+minor base-version)
3326 ".x/" base-version
3327 "/build_resources/"))
3328 (revision revision)))
3329 (sha256
3330 (base32
3331 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3332 (modules '((guix build utils)))
3333 ;; Delete bundled pre-built jars.
3334 (snippet
3335 '(begin (delete-file-recursively "lib/") #t))))))
3336 (home-page "http://svnsis.ethz.ch")
3337 (synopsis "Command line parser library")
3338 (description "This package provides a parser for command line arguments.")
3339 (license license:asl2.0))))
3340
3341 (define-public java-cisd-jhdf5
3342 (let ((revision 39162)
3343 (base-version "14.12.6"))
3344 (package
3345 (name "java-cisd-jhdf5")
3346 (version (string-append base-version "-" (number->string revision)))
3347 (source (origin
3348 (method svn-fetch)
3349 (uri (svn-reference
3350 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3351 "jhdf5/tags/release/"
3352 (version-major+minor base-version)
3353 ".x/" base-version "/jhdf5/"))
3354 (revision revision)))
3355 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3356 (sha256
3357 (base32
3358 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3359 (modules '((guix build utils)))
3360 (snippet
3361 '(begin
3362 ;; Delete included gradle jar
3363 (delete-file-recursively "gradle/wrapper")
3364 ;; Delete pre-built native libraries
3365 (delete-file-recursively "libs")
3366 #t))))
3367 (build-system ant-build-system)
3368 (arguments
3369 `(#:make-flags '("-file" "build/build.xml")
3370 #:build-target "jar-all"
3371 #:test-target "jar-test"
3372 #:jdk ,icedtea-8
3373 #:phases
3374 (modify-phases %standard-phases
3375 ;; FIXME: this build phase fails.
3376 (delete 'generate-jar-indices)
3377 ;; Don't erase results from the build phase when building tests.
3378 (add-after 'unpack 'separate-test-target-from-clean
3379 (lambda _
3380 (substitute* "build/build.xml"
3381 (("\"jar-test\" depends=\"clean, ")
3382 "\"jar-test\" depends=\""))
3383 #t))
3384 (add-after 'unpack 'unpack-build-resources
3385 (lambda* (#:key inputs #:allow-other-keys)
3386 (copy-recursively (assoc-ref inputs "build-resources")
3387 "../build_resources")
3388 (delete-file-recursively "../build_resources/lib/")
3389 (mkdir-p "../build_resources/lib")
3390 ;; Remove dependency on classycle
3391 (substitute* "../build_resources/ant/build-common.xml"
3392 (("<taskdef name=\"dependency-checker.*") "")
3393 (("classname=\"classycle.*") "")
3394 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3395 ;; Remove dependency on svn
3396 (substitute* "build/build.xml"
3397 (("<build-info.*") "")
3398 (("\\$\\{revision.number\\}")
3399 ,(number->string revision))
3400 (("\\$\\{version.number\\}") ,base-version))
3401 #t))
3402 (add-after 'unpack-build-resources 'fix-dependencies
3403 (lambda* (#:key inputs #:allow-other-keys)
3404 (substitute* "../build_resources/ant/build-common.xml"
3405 (("../libraries/testng/testng-jdk15.jar")
3406 (string-append (assoc-ref inputs "java-testng")
3407 "/share/java/java-testng.jar")))
3408 (substitute* "build/build.xml"
3409 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3410 (string-append (assoc-ref inputs "java-cisd-base")
3411 "/share/java/sis-base.jar"))
3412 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3413 (string-append (assoc-ref inputs "java-cisd-args4j")
3414 "/share/java/cisd-args4j.jar"))
3415 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3416 (string-append (assoc-ref inputs "java-commons-lang")
3417 "/share/java/commons-lang-"
3418 ,(package-version java-commons-lang) ".jar"))
3419 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3420 (string-append (assoc-ref inputs "java-commons-io")
3421 "/lib/m2/commons-io/commons-io/"
3422 ,(package-version java-commons-io)
3423 "/commons-io-"
3424 ,(package-version java-commons-io)
3425 ".jar"))
3426 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3427 (string-append (assoc-ref inputs "java-testng")
3428 "/share/java/java-testng.jar"))
3429 (("\\$\\{lib\\}/junit4/junit.jar")
3430 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3431 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3432 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3433 "jar$"))))
3434 ;; Remove dependency on ch.rinn.restrictions
3435 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3436 (substitute* '("BitSetConversionUtils.java"
3437 "HDF5Utils.java")
3438 (("import ch.rinn.restrictions.Private;") "")
3439 (("@Private") "")))
3440 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3441 (substitute* '("BitSetConversionTest.java"
3442 "h5ar/HDF5ArchiverTest.java")
3443 (("import ch.rinn.restrictions.Friend;") "")
3444 (("@Friend.*") ""))
3445 ;; Remove leftovers from removing @Friend
3446 (substitute* "h5ar/HDF5ArchiverTest.java"
3447 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3448 "")))
3449 #t))
3450 (add-before 'configure 'build-native-library
3451 (lambda* (#:key inputs #:allow-other-keys)
3452 (let ((jdk (assoc-ref inputs "jdk"))
3453 (hdf5 (assoc-ref inputs "hdf5"))
3454 (dir ,(match (%current-system)
3455 ("i686-linux"
3456 "i386-Linux")
3457 ((or "armhf-linux" "aarch64-linux")
3458 "arm-Linux")
3459 ((or "x86_64-linux")
3460 "amd64-Linux")
3461 (_ "unknown-Linux"))))
3462 (with-directory-excursion "source/c"
3463 (apply invoke `("gcc" "-shared" "-O3"
3464 "-fPIC"
3465 "-Wl,--exclude-libs,ALL"
3466 ,@(find-files "jhdf5" "\\.c$")
3467 ,@(find-files "hdf-java" "\\.c$")
3468 ,(string-append "-I" hdf5 "/include")
3469 ,(string-append "-I" jdk "/include")
3470 ,(string-append "-I" jdk "/include/linux")
3471 ,(string-append hdf5 "/lib/libhdf5.a")
3472 "-o" "libjhdf5.so" "-lz")))
3473 (install-file "source/c/libjhdf5.so"
3474 (string-append "libs/native/jhdf5/" dir))
3475 #t)))
3476 ;; In the "check" phase we only build the test executable.
3477 (add-after 'check 'run-tests
3478 (lambda _
3479 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3480 (delete-file "targets/dist/sis-jhdf5-test.jar")
3481 #t))
3482 (replace 'install
3483 (install-jars "targets/dist")))))
3484 (inputs
3485 `(("java-cisd-base" ,java-cisd-base)
3486 ("java-cisd-args4j" ,java-cisd-args4j)
3487 ("java-commons-lang" ,java-commons-lang)
3488 ("java-commons-io" ,java-commons-io)
3489 ("hdf5" ,hdf5-1.8)
3490 ("zlib" ,zlib)))
3491 (native-inputs
3492 `(("jdk" ,icedtea-8)
3493 ("java-testng" ,java-testng)
3494 ("java-junit" ,java-junit)
3495 ("java-jmock" ,java-jmock)
3496 ("java-hamcrest-core" ,java-hamcrest-core)
3497 ("build-resources"
3498 ,(origin
3499 (method svn-fetch)
3500 (uri (svn-reference
3501 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3502 "jhdf5/tags/release/"
3503 (version-major+minor base-version)
3504 ".x/" base-version
3505 "/build_resources/"))
3506 (revision revision)))
3507 (sha256
3508 (base32
3509 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3510 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3511 (synopsis "Java binding for HDF5")
3512 (description "JHDF5 is a high-level API in Java for reading and writing
3513 HDF5 files, building on the libraries provided by the HDF Group.")
3514 ;; The C sources are under a non-copyleft license, which looks like a
3515 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3516 (license (list license:asl2.0
3517 (license:non-copyleft "file://source/c/COPYING"))))))
3518
3519 (define-public java-classpathx-servletapi
3520 (package
3521 (name "java-classpathx-servletapi")
3522 (version "3.0.1")
3523 (source (origin
3524 (method url-fetch)
3525 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3526 "servletapi-" version ".tar.gz"))
3527 (sha256
3528 (base32
3529 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3530 (build-system ant-build-system)
3531 (arguments
3532 `(#:tests? #f ; there is no test target
3533 #:build-target "compile"
3534 #:make-flags
3535 (list "-Dbuild.compiler=javac1.8"
3536 (string-append "-Ddist=" (assoc-ref %outputs "out")))
3537 #:phases
3538 (modify-phases %standard-phases
3539 (replace 'install
3540 (lambda* (#:key make-flags #:allow-other-keys)
3541 (apply invoke `("ant" "dist" ,@make-flags)))))))
3542 (home-page "https://www.gnu.org/software/classpathx/")
3543 (synopsis "Java servlet API implementation")
3544 (description "This is the GNU servlet API distribution, part of the
3545 ClasspathX project. It provides implementations of version 3.0 of the servlet
3546 API and version 2.1 of the Java ServerPages API.")
3547 (license license:gpl3+)))
3548
3549 (define-public java-javaee-servletapi
3550 (package
3551 (name "java-javaee-servletapi")
3552 (version "3.1.0")
3553 (source (origin
3554 (method git-fetch)
3555 (uri (git-reference
3556 (url "https://github.com/javaee/servlet-spec")
3557 (commit version)))
3558 (file-name (git-file-name name version))
3559 (sha256
3560 (base32
3561 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3562 (build-system ant-build-system)
3563 (arguments
3564 `(#:jar-name "javax-servletapi.jar"
3565 ;; no tests
3566 #:tests? #f
3567 #:source-dir "src/main/java"
3568 #:phases
3569 (modify-phases %standard-phases
3570 (add-before 'build 'copy-resources
3571 (lambda _
3572 (mkdir-p "build/classes/javax/servlet/http")
3573 (let ((from-prefix "src/main/java/javax/servlet/")
3574 (to-prefix "build/classes/javax/servlet/"))
3575 (for-each (lambda (f)
3576 (copy-file (string-append from-prefix f)
3577 (string-append to-prefix f)))
3578 (list "LocalStrings_ja.properties"
3579 "LocalStrings.properties"
3580 "LocalStrings_fr.properties"
3581 "http/LocalStrings_es.properties"
3582 "http/LocalStrings_ja.properties"
3583 "http/LocalStrings.properties"
3584 "http/LocalStrings_fr.properties")))
3585 #t)))))
3586 (native-inputs
3587 `(("unzip" ,unzip)))
3588 (home-page "https://javaee.github.io/servlet-spec/")
3589 (synopsis "Java servlet API")
3590 (description "Java Servlet is the foundation web specification in the
3591 Java Enterprise Platform. Developers can build web applications using the
3592 Servlet API to interact with the request/response workflow. This project
3593 provides information on the continued development of the Java Servlet
3594 specification.")
3595 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3596 ;; Some files are licensed under ASL 2.0.
3597 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3598
3599 (define-public java-swt
3600 (package
3601 (name "java-swt")
3602 (version "4.7.1a")
3603 (source
3604 ;; The types of many variables and procedures differ in the sources
3605 ;; dependent on whether the target architecture is a 32-bit system or a
3606 ;; 64-bit system. Instead of patching the sources on demand in a build
3607 ;; phase we download either the 32-bit archive (which mostly uses "int"
3608 ;; types) or the 64-bit archive (which mostly uses "long" types).
3609 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3610 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3611 (file32 "x86")
3612 (file64 "x86_64"))
3613 (let-values (((hash file)
3614 (match (or (%current-target-system) (%current-system))
3615 ("x86_64-linux" (values hash64 file64))
3616 (_ (values hash32 file32)))))
3617 (origin
3618 (method url-fetch)
3619 (uri (string-append
3620 "http://download.eclipse.org/eclipse/downloads/drops4/"
3621 "R-" version "-201710090410/swt-" version
3622 "-gtk-linux-" file ".zip"))
3623 (sha256 (base32 hash))))))
3624 (build-system ant-build-system)
3625 (arguments
3626 `(#:jar-name "swt.jar"
3627 #:jdk ,icedtea-8
3628 #:tests? #f ; no "check" target
3629 #:phases
3630 (modify-phases %standard-phases
3631 (replace 'unpack
3632 (lambda* (#:key source #:allow-other-keys)
3633 (mkdir "swt")
3634 (invoke "unzip" source "-d" "swt")
3635 (chdir "swt")
3636 (mkdir "src")
3637 (invoke "unzip" "src.zip" "-d" "src")))
3638 ;; The classpath contains invalid icecat jars. Since we don't need
3639 ;; anything other than the JDK on the classpath, we can simply unset
3640 ;; it.
3641 (add-after 'configure 'unset-classpath
3642 (lambda _ (unsetenv "CLASSPATH") #t))
3643 (add-before 'build 'build-native
3644 (lambda* (#:key inputs outputs #:allow-other-keys)
3645 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3646 ;; Build shared libraries. Users of SWT have to set the system
3647 ;; property swt.library.path to the "lib" directory of this
3648 ;; package output.
3649 (mkdir-p lib)
3650 (setenv "OUTPUT_DIR" lib)
3651 (with-directory-excursion "src"
3652 (invoke "bash" "build.sh")))))
3653 (add-after 'install 'install-native
3654 (lambda* (#:key outputs #:allow-other-keys)
3655 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3656 (for-each (lambda (file)
3657 (install-file file lib))
3658 (find-files "." "\\.so$"))
3659 #t))))))
3660 (inputs
3661 `(("gtk" ,gtk+-2)
3662 ("libxtst" ,libxtst)
3663 ("libxt" ,libxt)
3664 ("mesa" ,mesa)
3665 ("glu" ,glu)))
3666 (native-inputs
3667 `(("pkg-config" ,pkg-config)
3668 ("unzip" ,unzip)))
3669 (home-page "https://www.eclipse.org/swt/")
3670 (synopsis "Widget toolkit for Java")
3671 (description
3672 "SWT is a widget toolkit for Java designed to provide efficient, portable
3673 access to the user-interface facilities of the operating systems on which it
3674 is implemented.")
3675 ;; SWT code is licensed under EPL1.0
3676 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3677 ;; Cairo bindings contain code under MPL1.1
3678 ;; XULRunner 1.9 bindings contain code under MPL2.0
3679 (license (list
3680 license:epl1.0
3681 license:mpl1.1
3682 license:mpl2.0
3683 license:lgpl2.1+))))
3684
3685 ;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3686 ;; of the latest release.
3687 (define-public java-qdox-1.12
3688 (package
3689 (name "java-qdox")
3690 (version "1.12.1")
3691 (source (origin
3692 (method url-fetch)
3693 (uri (string-append "https://repo1.maven.org/maven2/"
3694 "com/thoughtworks/qdox/qdox/" version
3695 "/qdox-" version "-sources.jar"))
3696 (sha256
3697 (base32
3698 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3699 (build-system ant-build-system)
3700 (arguments
3701 `(;; Tests require junit
3702 #:tests? #f
3703 #:jar-name "qdox.jar"
3704 #:phases
3705 (modify-phases %standard-phases
3706 (replace 'unpack
3707 (lambda* (#:key source #:allow-other-keys)
3708 (mkdir "src")
3709 (with-directory-excursion "src"
3710 (invoke "jar" "-xf" source))))
3711 ;; At this point we don't have junit, so we must remove the API
3712 ;; tests.
3713 (add-after 'unpack 'delete-tests
3714 (lambda _
3715 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3716 #t)))))
3717 (home-page "https://github.com/codehaus/qdox")
3718 (synopsis "Parse definitions from Java source files")
3719 (description
3720 "QDox is a high speed, small footprint parser for extracting
3721 class/interface/method definitions from source files complete with JavaDoc
3722 @code{@@tags}. It is designed to be used by active code generators or
3723 documentation tools.")
3724 (license license:asl2.0)))
3725
3726 (define-public java-qdox
3727 (package
3728 (name "java-qdox")
3729 ; Newer version exists, but this version is required by java-plexus-component-metadata
3730 (version "2.0-M2")
3731 (source (origin
3732 (method url-fetch)
3733 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3734 ;; Older releases at https://github.com/codehaus/qdox/
3735 ;; Note: The release at maven is pre-generated. The release at
3736 ;; github requires jflex.
3737 (uri (string-append "https://repo1.maven.org/maven2/"
3738 "com/thoughtworks/qdox/qdox/" version
3739 "/qdox-" version "-sources.jar"))
3740 (sha256
3741 (base32
3742 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3743 (build-system ant-build-system)
3744 (arguments
3745 `(#:jar-name "qdox.jar"
3746 #:tests? #f; no tests
3747 #:modules
3748 ((guix build ant-build-system)
3749 (guix build java-utils)
3750 (guix build utils)
3751 (sxml simple))
3752 #:phases
3753 (modify-phases %standard-phases
3754 (add-before 'install 'create-pom
3755 (lambda _
3756 (with-output-to-file "pom.xml"
3757 (lambda _
3758 (sxml->xml
3759 `((project
3760 (modelVersion "4.0.0")
3761 (name "QDox")
3762 (groupId "com.thoughtworks.qdox")
3763 (artifactId "qdox")
3764 (version ,,version))))))
3765 #t))
3766 (replace 'install
3767 (install-from-pom "pom.xml")))))
3768 (home-page "https://github.com/codehaus/qdox")
3769 (synopsis "Parse definitions from Java source files")
3770 (description "QDox is a high speed, small footprint parser for extracting
3771 class/interface/method definitions from source files complete with JavaDoc
3772 @code{@@tags}. It is designed to be used by active code generators or
3773 documentation tools.")
3774 (license license:asl2.0)))
3775
3776 (define-public java-qdox-2-M9
3777 (package
3778 (inherit java-qdox)
3779 (version "2.0-M9"); required by plexus-java
3780 (source (origin
3781 (method url-fetch)
3782 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3783 ;; Older releases at https://github.com/codehaus/qdox/
3784 ;; Note: The release at maven is pre-generated. The release at
3785 ;; github requires jflex.
3786 (uri (string-append "https://repo1.maven.org/maven2/"
3787 "com/thoughtworks/qdox/qdox/" version
3788 "/qdox-" version "-sources.jar"))
3789 (sha256
3790 (base32
3791 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))))
3792
3793 (define-public java-jarjar
3794 (package
3795 (name "java-jarjar")
3796 (version "1.4")
3797 (source (origin
3798 (method url-fetch)
3799 (uri (string-append
3800 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3801 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3802 (sha256
3803 (base32
3804 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3805 (modules '((guix build utils)))
3806 (snippet
3807 '(begin
3808 ;; Delete bundled thirds-party jar archives.
3809 (delete-file-recursively "lib")
3810 (delete-file "src/test/enumtest.jar")
3811 ;; the CLASSPATH needs this directory, create an empty one
3812 (mkdir-p "lib")
3813 #t))))
3814 (build-system ant-build-system)
3815 (arguments
3816 `(;; Tests require junit, which ultimately depends on this package.
3817 #:tests? #f
3818 #:build-target "jar"
3819 #:phases
3820 (modify-phases %standard-phases
3821 (add-before 'build 'do-not-use-bundled-asm
3822 (lambda* (#:key inputs #:allow-other-keys)
3823 (substitute* "build.xml"
3824 (("<path id=\"path.build\">")
3825 (string-append "<path id=\"path.build\"><fileset dir=\""
3826 (assoc-ref inputs "java-asm-bootstrap")
3827 "/lib/m2\" includes=\"**/*.jar\"/>"))
3828 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3829 (("lib/asm-commons-4.0.jar")
3830 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3831 "asm-6.0.jar")))
3832 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3833 (string-append "<include name=\"org/objectweb/asm/"
3834 "commons/Remap*.class\"/>"
3835 "<include name=\"org/objectweb/asm/*.class\"/>"
3836 "<include name=\"org/objectweb/asm/"
3837 "signature/*.class\"/>"
3838 "<include name=\"org/objectweb/asm/"
3839 "commons/SignatureRemapper.class\"/>")))
3840 #t))
3841 (add-before 'build 'remove-maven-dependency
3842 (lambda _
3843 ;; We do not need to build jarjar as a maven plugin just yet, so
3844 ;; remove this file. Maven requires jarjar (but not that plugin),
3845 ;; so removing it improves the bootstrap.
3846 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3847 #t))
3848 (replace 'install
3849 (lambda* (#:key outputs #:allow-other-keys)
3850 (let ((target (string-append (assoc-ref outputs "out")
3851 "/share/java")))
3852 (install-file (string-append "dist/jarjar-" ,version ".jar")
3853 target))
3854 #t)))))
3855 (inputs
3856 `(("java-asm-bootstrap" ,java-asm-bootstrap)))
3857 (native-inputs
3858 `(("unzip" ,unzip)))
3859 (home-page "https://code.google.com/archive/p/jarjar/")
3860 (synopsis "Repackage Java libraries")
3861 (description
3862 "Jar Jar Links is a utility that makes it easy to repackage Java
3863 libraries and embed them into your own distribution. Jar Jar Links includes
3864 an Ant task that extends the built-in @code{jar} task.")
3865 (license license:asl2.0)))
3866
3867 (define-public java-hamcrest-core
3868 (package
3869 (name "java-hamcrest-core")
3870 (version "1.3")
3871 (source (origin
3872 (method git-fetch)
3873 (uri (git-reference
3874 (url "https://github.com/hamcrest/JavaHamcrest/")
3875 (commit (string-append "hamcrest-java-" version))))
3876 (file-name (git-file-name name version))
3877 (sha256
3878 (base32
3879 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3880 (modules '((guix build utils)))
3881 (snippet
3882 '(begin
3883 ;; Delete bundled thirds-party jar archives.
3884 (delete-file-recursively "lib")
3885 #t))))
3886 (build-system ant-build-system)
3887 (arguments
3888 `(#:tests? #f ; Tests require junit
3889 #:modules ((guix build ant-build-system)
3890 (guix build java-utils)
3891 (guix build utils)
3892 (srfi srfi-1))
3893 #:make-flags (list (string-append "-Dversion=" ,version))
3894 #:test-target "unit-test"
3895 #:build-target "core"
3896 #:phases
3897 (modify-phases %standard-phases
3898 ;; Disable unit tests, because they require junit, which requires
3899 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3900 ;; attribute from the manifest for reproducibility.
3901 (add-before 'configure 'patch-build.xml
3902 (lambda _
3903 (substitute* "build.xml"
3904 (("unit-test, ") "")
3905 (("\\$\\{build.timestamp\\}") "guix"))
3906 #t))
3907 ;; Java's "getMethods()" returns methods in an unpredictable order.
3908 ;; To make the output of the generated code deterministic we must
3909 ;; sort the array of methods.
3910 (add-after 'unpack 'make-method-order-deterministic
3911 (lambda _
3912 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3913 (("import java\\.util\\.Iterator;" line)
3914 (string-append line "\n"
3915 "import java.util.Arrays; import java.util.Comparator;"))
3916 (("allMethods = cls\\.getMethods\\(\\);" line)
3917 (string-append "_" line
3918 "
3919 private Method[] getSortedMethods() {
3920 Arrays.sort(_allMethods, new Comparator<Method>() {
3921 @Override
3922 public int compare(Method a, Method b) {
3923 return a.toString().compareTo(b.toString());
3924 }
3925 });
3926 return _allMethods;
3927 }
3928
3929 private Method[] allMethods = getSortedMethods();")))
3930 #t))
3931 (add-before 'build 'do-not-use-bundled-qdox
3932 (lambda* (#:key inputs #:allow-other-keys)
3933 (substitute* "build.xml"
3934 (("lib/generator/qdox-1.12.jar")
3935 (string-append (assoc-ref inputs "java-qdox-1.12")
3936 "/share/java/qdox.jar")))
3937 #t))
3938 ;; build.xml searches for .jar files in this directoy, which
3939 ;; we remove from the source archive.
3940 (add-before 'build 'create-dummy-directories
3941 (lambda _
3942 (mkdir-p "lib/integration")
3943 #t))
3944 (add-before 'build 'create-pom
3945 (lambda _
3946 (substitute* "pom/hamcrest-core.pom"
3947 (("@VERSION@") ,version))
3948 #t))
3949 (replace 'install
3950 (install-from-pom "pom/hamcrest-core.pom")))))
3951 (native-inputs
3952 `(("java-qdox-1.12" ,java-qdox-1.12)
3953 ("java-jarjar" ,java-jarjar)))
3954 (propagated-inputs
3955 `(("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))
3956 (home-page "http://hamcrest.org/")
3957 (synopsis "Library of matchers for building test expressions")
3958 (description
3959 "This package provides a library of matcher objects (also known as
3960 constraints or predicates) allowing @code{match} rules to be defined
3961 declaratively, to be used in other frameworks. Typical scenarios include
3962 testing frameworks, mocking libraries and UI validation rules.")
3963 (license license:bsd-2)))
3964
3965 (define java-hamcrest-parent-pom
3966 (package
3967 (inherit java-hamcrest-core)
3968 (name "java-hamcrest-parent-pom")
3969 (propagated-inputs '())
3970 (native-inputs '())
3971 (arguments
3972 `(#:tests? #f
3973 #:phases
3974 (modify-phases %standard-phases
3975 (delete 'configure)
3976 (replace 'build
3977 (lambda _
3978 (substitute* "pom/hamcrest-parent.pom"
3979 (("@VERSION@") ,(package-version java-hamcrest-core)))
3980 #t))
3981 (replace 'install
3982 (install-pom-file "pom/hamcrest-parent.pom")))))))
3983
3984 (define-public java-hamcrest-library
3985 (package
3986 (inherit java-hamcrest-core)
3987 (name "java-hamcrest-library")
3988 (arguments
3989 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3990 ((#:build-target _) "library")
3991 ((#:phases phases)
3992 `(modify-phases ,phases
3993 (add-after 'unpack 'patch-classpath-for-integration
3994 (lambda* (#:key inputs #:allow-other-keys)
3995 (substitute* "build.xml"
3996 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3997 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3998 "jar$"))))
3999 #t))
4000 (replace 'create-pom
4001 (lambda _
4002 (substitute* "pom/hamcrest-library.pom"
4003 (("@VERSION@") ,(package-version java-hamcrest-core)))
4004 #t))
4005 (replace 'install
4006 (install-from-pom "pom/hamcrest-library.pom"))))))
4007 (propagated-inputs
4008 `(("java-hamcrest-core" ,java-hamcrest-core)
4009 ("java-hamcrest-parent-pom" ,java-hamcrest-parent-pom)))))
4010
4011 (define-public java-junit
4012 (package
4013 (name "java-junit")
4014 (version "4.12")
4015 (source (origin
4016 (method git-fetch)
4017 (uri (git-reference
4018 (url "https://github.com/junit-team/junit/")
4019 (commit (string-append "r" version))))
4020 (file-name (git-file-name name version))
4021 (sha256
4022 (base32
4023 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4024 (modules '((guix build utils)))
4025 (snippet
4026 '(begin
4027 ;; Delete bundled jar archives.
4028 (delete-file-recursively "lib")
4029 #t))))
4030 (build-system ant-build-system)
4031 (arguments
4032 `(#:jar-name "junit.jar"
4033 #:source-dir "src/main/java"
4034 #:test-dir "src/test"
4035 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4036 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4037 #:phases
4038 (modify-phases %standard-phases
4039 (add-before 'check 'copy-test-resources
4040 (lambda _
4041 (copy-recursively "src/test/resources" "build/test-classes")
4042 #t))
4043 (replace 'install
4044 (install-from-pom "pom.xml")))))
4045 (propagated-inputs
4046 `(("java-hamcrest-core" ,java-hamcrest-core)))
4047 (native-inputs
4048 `(("java-hamcrest-library" ,java-hamcrest-library)))
4049 (home-page "https://junit.org/junit4/")
4050 (synopsis "Test framework for Java")
4051 (description
4052 "JUnit is a simple framework to write repeatable tests for Java projects.
4053 JUnit provides assertions for testing expected results, test fixtures for
4054 sharing common test data, and test runners for running tests.")
4055 (license license:epl1.0)))
4056
4057 (define-public java-junitparams
4058 (package
4059 (name "java-junitparams")
4060 (version "1.1.1")
4061 (source (origin
4062 (method git-fetch)
4063 (uri (git-reference
4064 (url "https://github.com/Pragmatists/JUnitParams")
4065 (commit (string-append "JUnitParams-" version))))
4066 (file-name (git-file-name name version))
4067 (sha256
4068 (base32
4069 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4070 (build-system ant-build-system)
4071 (arguments
4072 `(#:jar-name "junitparams.jar"
4073 #:source-dir "src/main/java"
4074 #:test-dir "src/test"
4075 #:test-exclude (list "**/SuperclassTest.java")))
4076 (inputs
4077 `(("java-junit" ,java-junit)))
4078 (native-inputs
4079 `(("java-junit" ,java-junit)
4080 ("java-hamcrest-core" ,java-hamcrest-core)
4081 ("java-assertj" ,java-assertj)))
4082 (home-page "https://github.com/Pragmatists/JUnitParams")
4083 (synopsis "Parameterised test support for JUnit")
4084 (description "The JUnitParams project adds a new runner to JUnit and
4085 provides much easier and readable parametrised tests for JUnit.")
4086 (license license:asl2.0)))
4087
4088 (define-public java-plexus-utils
4089 (package
4090 (name "java-plexus-utils")
4091 ;; sisu-build-api needs this version, later versions don't work
4092 (version "3.2.1")
4093 (source (origin
4094 (method git-fetch)
4095 (uri (git-reference
4096 (url "https://github.com/codehaus-plexus/plexus-utils")
4097 (commit (string-append "plexus-utils-" version))))
4098 (file-name (git-file-name name version))
4099 (sha256
4100 (base32
4101 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))
4102 (build-system ant-build-system)
4103 ;; FIXME: The default build.xml does not include a target to install
4104 ;; javadoc files.
4105 (arguments
4106 `(#:jar-name "plexus-utils.jar"
4107 #:source-dir "src/main"
4108 #:phases
4109 (modify-phases %standard-phases
4110 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4111 (lambda _
4112 (substitute* "src/main/java/org/codehaus/plexus/util/\
4113 cli/shell/BourneShell.java"
4114 (("/bin/sh") (which "sh"))
4115 (("/usr/") (getcwd)))
4116 #t))
4117 (add-after 'unpack 'fix-or-disable-broken-tests
4118 (lambda _
4119 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4120 (substitute* '("cli/CommandlineTest.java"
4121 "cli/shell/BourneShellTest.java")
4122 (("/bin/sh") (which "sh"))
4123 (("/bin/echo") (which "echo")))
4124
4125 ;; This test depends on MavenProjectStub, but we don't have
4126 ;; a package for Maven.
4127 (delete-file "introspection/ReflectionValueExtractorTest.java")
4128
4129 ;; FIXME: The command line tests fail, maybe because they use
4130 ;; absolute paths.
4131 (delete-file "cli/CommandlineTest.java")
4132
4133 ;; These tests require openjdk jmh, which is not packaged yet
4134 (for-each delete-file (find-files "." "PerfTest.java$")))
4135 #t))
4136 (add-before 'build 'copy-resources
4137 (lambda _
4138 (copy-recursively "src/main/resources" "build/classes")
4139 #t))
4140 (replace 'install (install-from-pom "pom.xml")))))
4141 (native-inputs
4142 `(("java-hamcrest-core" ,java-hamcrest-core)
4143 ("java-junit" ,java-junit)))
4144 (propagated-inputs
4145 `(("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4146 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4147 (synopsis "Common utilities for the Plexus framework")
4148 (description "This package provides various Java utility classes for the
4149 Plexus framework to ease working with strings, files, command lines, XML and
4150 more.")
4151 (license license:asl2.0)))
4152
4153 (define-public java-plexus-utils-3.3.0
4154 (package
4155 (inherit java-plexus-utils)
4156 (version "3.3.0")
4157 (source (origin
4158 (method git-fetch)
4159 (uri (git-reference
4160 (url "https://github.com/codehaus-plexus/plexus-utils")
4161 (commit (string-append "plexus-utils-" version))))
4162 (file-name (git-file-name "java-plexus-utils" version))
4163 (sha256
4164 (base32
4165 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))))
4166
4167 (define-public java-plexus-interpolation
4168 (package
4169 (name "java-plexus-interpolation")
4170 (version "1.26")
4171 (source (origin
4172 (method git-fetch)
4173 (uri (git-reference
4174 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4175 (commit (string-append "plexus-interpolation-" version))))
4176 (file-name (git-file-name name version))
4177 (sha256
4178 (base32
4179 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4180 (build-system ant-build-system)
4181 (arguments
4182 `(#:jar-name "plexus-interpolation.jar"
4183 #:source-dir "src/main"
4184 #:phases
4185 (modify-phases %standard-phases
4186 (replace 'install (install-from-pom "pom.xml")))))
4187 (propagated-inputs
4188 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4189 (native-inputs
4190 `(("java-junit" ,java-junit)
4191 ("java-hamcrest-core" ,java-hamcrest-core)))
4192 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4193 (synopsis "Java components for interpolating ${} strings and the like")
4194 (description "Plexus interpolator is a modular, flexible interpolation
4195 framework for the expression language style commonly seen in Maven, Plexus,
4196 and other related projects.
4197
4198 It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4199 package within @code{plexus-utils}, but has been separated in order to allow
4200 these two libraries to vary independently of one another.")
4201 (license license:asl2.0)))
4202
4203 (define-public java-plexus-classworlds
4204 (package
4205 (name "java-plexus-classworlds")
4206 (version "2.6.0")
4207 (source (origin
4208 (method git-fetch)
4209 (uri (git-reference
4210 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4211 (commit (string-append "plexus-classworlds-" version))))
4212 (file-name (git-file-name name version))
4213 (sha256
4214 (base32
4215 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4216 (build-system ant-build-system)
4217 (arguments
4218 `(#:jar-name "plexus-classworlds.jar"
4219 #:source-dir "src/main"
4220 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4221 #:phases
4222 (modify-phases %standard-phases
4223 (replace 'install (install-from-pom "pom.xml")))))
4224 (propagated-inputs
4225 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4226 (native-inputs
4227 `(("java-junit" ,java-junit)))
4228 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4229 (synopsis "Java class loader framework")
4230 (description "Plexus classworlds replaces the native @code{ClassLoader}
4231 mechanism of Java. It is especially useful for dynamic loading of application
4232 components.")
4233 (license license:asl2.0)))
4234
4235 (define java-plexus-container-default-bootstrap
4236 (package
4237 (name "java-plexus-container-default-bootstrap")
4238 (version "1.7.1")
4239 (source (origin
4240 (method git-fetch)
4241 (uri (git-reference
4242 (url "https://github.com/codehaus-plexus/plexus-containers")
4243 (commit (string-append "plexus-containers-" version))))
4244 (file-name (git-file-name name version))
4245 (sha256
4246 (base32
4247 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
4248 (build-system ant-build-system)
4249 (arguments
4250 `(#:jar-name "container-default.jar"
4251 #:source-dir "plexus-container-default/src/main/java"
4252 #:test-dir "plexus-container-default/src/test"
4253 #:tests? #f; requires plexus-archiver, which depends on this package
4254 #:phases
4255 (modify-phases %standard-phases
4256 (add-before 'build 'fix-google-collections
4257 (lambda _
4258 ;; Google collections are now replaced with guava
4259 (substitute* "plexus-container-default/pom.xml"
4260 (("google-collections") "guava")
4261 (("com.google.collections") "com.google.guava"))
4262 #t))
4263 (add-before 'build 'copy-resources
4264 (lambda _
4265 (copy-recursively
4266 "plexus-container-default/src/main/resources/"
4267 "build/classes")
4268 #t))
4269 (replace 'install
4270 (install-from-pom "plexus-container-default/pom.xml")))))
4271 (propagated-inputs
4272 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4273 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4274 ("java-plexus-utils" ,java-plexus-utils)
4275 ("java-junit" ,java-junit)
4276 ("java-guava" ,java-guava)
4277 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4278 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4279 (synopsis "Inversion-of-control container")
4280 (description "Plexus-default-container is Plexus' inversion-of-control
4281 (@dfn{IoC}) container. It is composed of its public API and its default
4282 implementation.")
4283 (license license:asl2.0)))
4284
4285 (define java-plexus-containers-parent-pom
4286 (package
4287 (inherit java-plexus-container-default-bootstrap)
4288 (name "java-plexus-containers-parent-pom")
4289 (arguments
4290 `(#:tests? #f
4291 #:phases
4292 (modify-phases %standard-phases
4293 (delete 'configure)
4294 (delete 'build)
4295 (replace 'install
4296 (install-pom-file "pom.xml")))))
4297 (propagated-inputs
4298 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4299
4300 (define-public java-plexus-io
4301 (package
4302 (name "java-plexus-io")
4303 (version "3.2.0")
4304 (source (origin
4305 (method git-fetch)
4306 (uri (git-reference
4307 (url "https://github.com/codehaus-plexus/plexus-io")
4308 (commit (string-append "plexus-io-" version))))
4309 (file-name (git-file-name name version))
4310 (sha256
4311 (base32
4312 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4313 (build-system ant-build-system)
4314 (arguments
4315 `(#:jar-name "plexus-io.jar"
4316 #:source-dir "src/main/java"
4317 #:test-dir "src/test"
4318 #:phases
4319 (modify-phases %standard-phases
4320 (add-before 'build 'copy-resources
4321 (lambda _
4322 (mkdir-p "build/classes")
4323 (copy-recursively "src/main/resources" "build/classes")
4324 (mkdir-p "build/test-classes")
4325 (copy-recursively "src/test/resources" "build/test-classes")
4326 #t))
4327 (replace 'install (install-from-pom "pom.xml")))))
4328 (propagated-inputs
4329 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4330 ("java-commons-io" ,java-commons-io)
4331 ("plexus-parent-pom" ,plexus-parent-pom-5.1)))
4332 (inputs
4333 `(("java-jsr305" ,java-jsr305)))
4334 (native-inputs
4335 `(("junit" ,java-junit)
4336 ("hamcrest" ,java-hamcrest-core)
4337 ("guava" ,java-guava)
4338 ("classworlds" ,java-plexus-classworlds)
4339 ("xbean" ,java-geronimo-xbean-reflect)
4340 ("container-default" ,java-plexus-container-default-bootstrap)))
4341 (home-page "https://github.com/codehaus-plexus/plexus-io")
4342 (synopsis "I/O plexus components")
4343 (description "Plexus IO is a set of plexus components, which are designed
4344 for use in I/O operations. This implementation using plexus components allows
4345 reusing it in maven.")
4346 (license license:asl2.0)))
4347
4348 (define-public java-plexus-archiver
4349 (package
4350 (name "java-plexus-archiver")
4351 (version "4.2.2")
4352 (source (origin
4353 (method url-fetch)
4354 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4355 "/archive/plexus-archiver-" version ".tar.gz"))
4356 (sha256
4357 (base32
4358 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4359 (build-system ant-build-system)
4360 (arguments
4361 `(#:jar-name "plexus-archiver.jar"
4362 #:source-dir "src/main/java"
4363 #:test-dir "src/test"
4364 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4365 #:phases
4366 (modify-phases %standard-phases
4367 (add-before 'check 'remove-failing
4368 (lambda _
4369 ;; Requires an older version of plexus container
4370 (delete-file
4371 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4372 #t))
4373 (add-before 'check 'fix-test-building
4374 (lambda _
4375 (substitute* "build.xml"
4376 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4377 #t))
4378 (add-before 'build 'copy-resources
4379 (lambda _
4380 (mkdir-p "build/classes")
4381 (copy-recursively "src/main/resources" "build/classes")
4382 (mkdir-p "build/test-classes")
4383 (copy-recursively "src/test/resources" "build/test-classes")
4384 #t))
4385 (replace 'install (install-from-pom "pom.xml")))))
4386 (propagated-inputs
4387 `(("java-plexus-utils" ,java-plexus-utils-3.3.0)
4388 ("java-plexus-io" ,java-plexus-io)
4389 ("java-iq80-snappy" ,java-iq80-snappy)
4390 ("java-commons-compress" ,java-commons-compress)
4391 ("plexus-parent-pom" ,plexus-parent-pom-6.1)))
4392 (inputs
4393 `(("java-jsr305" ,java-jsr305)
4394 ("java-plexus-container-default"
4395 ,java-plexus-container-default-bootstrap)))
4396 (native-inputs
4397 `(("java-hamcrest-core" ,java-hamcrest-core)
4398 ("junit" ,java-junit)
4399 ("classworld" ,java-plexus-classworlds)
4400 ("xbean" ,java-geronimo-xbean-reflect)
4401 ("xz" ,java-xz)
4402 ("guava" ,java-guava)))
4403 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4404 (synopsis "Archiver component of the Plexus project")
4405 (description "Plexus-archiver contains a component to deal with project
4406 archives (jar).")
4407 (license license:asl2.0)))
4408
4409 (define-public java-plexus-container-default
4410 (package
4411 (inherit java-plexus-container-default-bootstrap)
4412 (name "java-plexus-container-default")
4413 (arguments
4414 `(#:jar-name "container-default.jar"
4415 #:source-dir "plexus-container-default/src/main/java"
4416 #:test-dir "plexus-container-default/src/test"
4417 #:test-exclude (list ;"**/*Test.java"
4418 "**/Abstract*.java"
4419 ;; Requires plexus-hierarchy
4420 "**/PlexusHierarchyTest.java"
4421 ;; Failures
4422 "**/ComponentRealmCompositionTest.java"
4423 "**/PlexusContainerTest.java")
4424 #:phases
4425 (modify-phases %standard-phases
4426 (add-before 'build 'fix-google-collections
4427 (lambda _
4428 ;; Google collections are now replaced with guava
4429 (substitute* "plexus-container-default/pom.xml"
4430 (("google-collections") "guava")
4431 (("com.google.collections") "com.google.guava"))
4432 #t))
4433 (add-before 'build 'copy-resources
4434 (lambda _
4435 (copy-recursively
4436 "plexus-container-default/src/main/resources/"
4437 "build/classes")
4438 #t))
4439 (add-before 'check 'fix-paths
4440 (lambda _
4441 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4442 (substitute*
4443 (string-append
4444 dir "/plexus/component/composition/"
4445 "ComponentRealmCompositionTest.java")
4446 (("src/test") "plexus-container-default/src/test"))
4447 #t)))
4448 (replace 'install
4449 (install-from-pom "plexus-container-default/pom.xml")))))
4450 (inputs
4451 `(("worldclass" ,java-plexus-classworlds)
4452 ("xbean" ,java-geronimo-xbean-reflect)
4453 ("utils" ,java-plexus-utils)
4454 ("junit" ,java-junit)
4455 ("guava" ,java-guava)))
4456 (native-inputs
4457 `(("archiver" ,java-plexus-archiver)
4458 ("hamcrest" ,java-hamcrest-core)))))
4459
4460 (define-public java-plexus-component-annotations
4461 (package
4462 (inherit java-plexus-container-default)
4463 (name "java-plexus-component-annotations")
4464 (arguments
4465 `(#:jar-name "plexus-component-annotations.jar"
4466 #:source-dir "plexus-component-annotations/src/main/java"
4467 #:tests? #f; no tests
4468 #:phases
4469 (modify-phases %standard-phases
4470 (replace 'install
4471 (install-from-pom "plexus-component-annotations/pom.xml")))))
4472 (propagated-inputs
4473 `(("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4474 (inputs '())
4475 (native-inputs '())
4476 (synopsis "Plexus descriptors generator")
4477 (description "This package is a Maven plugin to generate Plexus descriptors
4478 from source tags and class annotations.")))
4479
4480 (define-public java-plexus-component-metadata
4481 (package
4482 (inherit java-plexus-container-default)
4483 (name "java-plexus-component-metadata")
4484 (arguments
4485 `(#:jar-name "plexus-component-metadata.jar"
4486 #:source-dir "src/main/java"
4487 #:test-dir "src/test"
4488 #:jdk ,icedtea-8
4489 #:phases
4490 (modify-phases %standard-phases
4491 (add-before 'configure 'chdir
4492 (lambda _
4493 (chdir "plexus-component-metadata")
4494 #t))
4495 (add-before 'build 'copy-resources
4496 (lambda _
4497 (copy-recursively "src/main/resources"
4498 "build/classes/")
4499 #t)))))
4500 (propagated-inputs
4501 `(("java-plexus-container-default" ,java-plexus-container-default)
4502 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4503 ("java-plexus-utils" ,java-plexus-utils)
4504 ("java-plexus-cli" ,java-plexus-cli)
4505 ("java-plexus-classworlds" ,java-plexus-classworlds)
4506 ("maven-plugin-api" ,maven-plugin-api)
4507 ("maven-plugin-annotations" ,maven-plugin-annotations)
4508 ("maven-core-bootstrap" ,maven-core-bootstrap)
4509 ("maven-model" ,maven-model)
4510 ("java-commons-cli" ,java-commons-cli)
4511 ("java-qdox" ,java-qdox)
4512 ("java-jdom2" ,java-jdom2)
4513 ("java-asm" ,java-asm)))
4514 (native-inputs
4515 `(("java-junit" ,java-junit)
4516 ("java-guava" ,java-guava)
4517 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
4518 (synopsis "Inversion-of-control container for Maven")
4519 (description "The Plexus project provides a full software stack for creating
4520 and executing software projects. Based on the Plexus container, the
4521 applications can utilise component-oriented programming to build modular,
4522 reusable components that can easily be assembled and reused. This package
4523 provides the Maven plugin generating the component metadata.")))
4524
4525 (define-public java-plexus-cipher
4526 (package
4527 (name "java-plexus-cipher")
4528 (version "1.7")
4529 (source (origin
4530 (method git-fetch)
4531 (uri (git-reference
4532 (url "https://github.com/codehaus-plexus/plexus-cipher")
4533 (commit (string-append "plexus-cipher-" version))))
4534 (file-name (git-file-name name version))
4535 (sha256
4536 (base32
4537 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4538 (build-system ant-build-system)
4539 (arguments
4540 `(#:jar-name "plexus-cipher.jar"
4541 #:source-dir "src/main/java"
4542 #:tests? #f; FIXME: requires sisu-inject-bean
4543 #:phases
4544 (modify-phases %standard-phases
4545 (add-before 'build 'copy-resources
4546 (lambda _
4547 (copy-recursively "src/main/resources" "build/classes")
4548 (mkdir-p "build/classes/META-INF/sisu")
4549 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4550 (lambda _
4551 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4552 #t))
4553 (add-before 'install 'fix-test-dependency
4554 (lambda _
4555 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4556 (substitute* "pom.xml"
4557 (("provided") "test"))
4558 #t))
4559 (replace 'install (install-from-pom "pom.xml")))))
4560 (inputs
4561 `(("java-cdi-api" ,java-cdi-api)
4562 ("java-javax-inject" ,java-javax-inject)))
4563 (propagated-inputs
4564 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)))
4565 (native-inputs
4566 `(("java-junit" ,java-junit)))
4567 (home-page "https://github.com/sonatype/plexus-cipher")
4568 (synopsis "Encryption/decryption Component")
4569 (description "Plexus-cipher contains a component to deal with encryption
4570 and decryption.")
4571 (license license:asl2.0)))
4572
4573 (define-public java-plexus-java
4574 (package
4575 (name "java-plexus-java")
4576 (version "0.9.10")
4577 (source (origin
4578 (method git-fetch)
4579 (uri (git-reference
4580 (url "https://github.com/codehaus-plexus/plexus-languages")
4581 (commit (string-append "plexus-languages-" version))))
4582 (file-name (git-file-name name version))
4583 (sha256
4584 (base32
4585 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4586 (modules '((guix build utils)))
4587 (snippet
4588 `(begin
4589 (for-each delete-file (find-files "." ".*.jar$"))
4590 #t))))
4591 (build-system ant-build-system)
4592 (arguments
4593 `(#:jar-name "plexus-java.java"
4594 #:source-dir "plexus-java/src/main/java"
4595 #:test-dir "plexus-java/src/test"
4596 #:tests? #f; require mockito 2
4597 #:phases
4598 (modify-phases %standard-phases
4599 (add-after 'build 'generate-metadata
4600 (lambda _
4601 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4602 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4603 "--source" "plexus-java/src/main/java"
4604 "--output" "build/classes/META-INF/plexus/components.xml"
4605 "--classes" "build/classes"
4606 "--descriptors" "build/classes/META-INF")
4607 (invoke "ant" "jar")
4608 #t))
4609 (add-before 'install 'install-parent
4610 (install-pom-file "pom.xml"))
4611 (replace 'install
4612 (install-from-pom "plexus-java/pom.xml")))))
4613 (propagated-inputs
4614 `(("java-asm" ,java-asm)
4615 ("java-qdox" ,java-qdox-2-M9)
4616 ("java-javax-inject" ,java-javax-inject)
4617 ("plexus-parent-pom" ,plexus-parent-pom-4.0)))
4618 (inputs
4619 `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
4620 (native-inputs
4621 `(("java-plexus-component-metadata" ,java-plexus-component-metadata)
4622 ("java-junit" ,java-junit)))
4623 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4624 (synopsis "Shared language features for Java")
4625 (description "This package contains shared language features of the Java
4626 language, for the plexus project.")
4627 (license license:asl2.0)))
4628
4629 (define-public java-plexus-compiler-api
4630 (package
4631 (name "java-plexus-compiler-api")
4632 (version "2.8.4")
4633 (source (origin
4634 (method git-fetch)
4635 (uri (git-reference
4636 (url "https://github.com/codehaus-plexus/plexus-compiler")
4637 (commit (string-append "plexus-compiler-" version))))
4638 (file-name (git-file-name name version))
4639 (sha256
4640 (base32
4641 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4642 (build-system ant-build-system)
4643 (arguments
4644 `(#:jar-name "plexus-compiler-api.jar"
4645 #:source-dir "plexus-compiler-api/src/main/java"
4646 #:test-dir "plexus-compiler-api/src/test"
4647 #:phases
4648 (modify-phases %standard-phases
4649 (replace 'install
4650 (install-from-pom "plexus-compiler-api/pom.xml")))))
4651 (propagated-inputs
4652 `(("java-plexus-container-default" ,java-plexus-container-default)
4653 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4654 ("java-plexus-util" ,java-plexus-utils)))
4655 (native-inputs
4656 `(("java-junit" ,java-junit)))
4657 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4658 (synopsis "Plexus Compilers component's API to manipulate compilers")
4659 (description "This package contains the API used by components to manipulate
4660 compilers.")
4661 (license (list license:asl2.0
4662 license:expat))))
4663
4664 (define java-plexus-compiler-pom
4665 (package
4666 (inherit java-plexus-compiler-api)
4667 (name "java-plexus-compiler-pom")
4668 (arguments
4669 `(#:tests? #f
4670 #:phases
4671 (modify-phases %standard-phases
4672 (delete 'configure)
4673 (delete 'build)
4674 (replace 'install
4675 (install-pom-file "pom.xml"))
4676 (add-after 'install 'install-compilers
4677 (install-pom-file "plexus-compilers/pom.xml")))))
4678 (propagated-inputs
4679 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4680
4681 (define plexus-components-parent-pom-4.0
4682 (package
4683 (name "plexus-components-parent-pom")
4684 (version "4.0")
4685 (source (origin
4686 (method git-fetch)
4687 (uri (git-reference
4688 (url "https://github.com/codehaus-plexus/plexus-components")
4689 (commit (string-append "plexus-components-" version))))
4690 (file-name (git-file-name name version))
4691 (sha256
4692 (base32
4693 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4694 (build-system ant-build-system)
4695 (arguments
4696 `(#:tests? #f
4697 #:phases
4698 (modify-phases %standard-phases
4699 (delete 'configure)
4700 (delete 'build)
4701 (replace 'install
4702 (install-pom-file "pom.xml")))))
4703 (propagated-inputs
4704 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4705 (home-page "https://codehaus-plexus.github.io/plexus-components")
4706 (synopsis "Plexus parent pom")
4707 (description "This package contains the Plexus components parent POM.")
4708 (license license:asl2.0)))
4709
4710 (define-public java-plexus-compiler-manager
4711 (package
4712 (inherit java-plexus-compiler-api)
4713 (name "java-plexus-compiler-manager")
4714 (arguments
4715 `(#:jar-name "compiler-compiler-manager.java"
4716 #:source-dir "plexus-compiler-manager/src/main/java"
4717 #:test-dir "plexus-compiler-manager/src/test"
4718 #:tests? #f
4719 #:phases
4720 (modify-phases %standard-phases
4721 (add-after 'build 'generate-metadata
4722 (lambda _
4723 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4724 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4725 "--source" "plexus-compiler-manager/src/main/java"
4726 "--output" "build/classes/META-INF/plexus/components.xml"
4727 "--classes" "build/classes"
4728 "--descriptors" "build/classes/META-INF")
4729 (invoke "ant" "jar")
4730 #t))
4731 (add-after 'generate-metadata 'rebuild
4732 (lambda _
4733 (invoke "ant" "jar")
4734 #t))
4735 (replace 'install
4736 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4737 (propagated-inputs
4738 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4739 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4740 ("java-plexus-container-default" ,java-plexus-container-default)))
4741 (native-inputs
4742 `(("unzip" ,unzip)
4743 ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
4744 (synopsis "Compiler management for Plexus Compiler component")
4745 (description "Plexus Compiler is a Plexus component to use different
4746 compilers through a uniform API. This component chooses the compiler
4747 implementation to use in a project.")))
4748
4749 (define-public java-plexus-compiler-javac
4750 (package
4751 (inherit java-plexus-compiler-api)
4752 (name "java-plexus-compiler-javac")
4753 (arguments
4754 `(#:jar-name "plexus-compiler-javac.jar"
4755 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4756 #:jdk ,icedtea-8
4757 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4758 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4759 #:modules ((guix build ant-build-system)
4760 (guix build utils)
4761 (guix build java-utils)
4762 (sxml simple))
4763 #:phases
4764 (modify-phases %standard-phases
4765 ;; We cannot use java-plexus-component-metadata to generate the metadata
4766 ;; because it ultimately depends on this package.
4767 ;; Create it manually instead
4768 (add-before 'build 'create-metadata
4769 (lambda _
4770 (let* ((dir "build/classes/META-INF/plexus")
4771 (file (string-append dir "/components.xml")))
4772 (mkdir-p dir)
4773 (with-output-to-file file
4774 (lambda _
4775 (sxml->xml
4776 `(component-set
4777 (components
4778 (component
4779 (role "org.codehaus.plexus.compiler.Compiler")
4780 (role-hint "javac")
4781 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4782 (isolated-realm "false"))))))))
4783 #t))
4784 (replace 'install
4785 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4786 (propagated-inputs
4787 `(("java-plexus-compiler-api" ,java-plexus-compiler-api)
4788 ("java-plexus-utils" ,java-plexus-utils)
4789 ("java-plexus-container-default" ,java-plexus-container-default)))
4790 (synopsis "Javac Compiler support for Plexus Compiler component")
4791 (description "This package contains the Javac Compiler support for Plexus
4792 Compiler component.")))
4793
4794 (define plexus-components-pom-1.1.20
4795 (package
4796 (name "plexus-components-pom-1.1.20")
4797 (version "1.1.20")
4798 (source (origin
4799 (method git-fetch)
4800 (uri (git-reference
4801 (url "https://github.com/codehaus-plexus/plexus-components")
4802 (commit (string-append "plexus-components-" version))))
4803 (file-name (git-file-name name version))
4804 (sha256
4805 (base32
4806 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4807 (build-system ant-build-system)
4808 (arguments
4809 `(#:tests? #f
4810 #:phases
4811 (modify-phases %standard-phases
4812 (delete 'configure)
4813 (delete 'build)
4814 (replace 'install
4815 (install-pom-file "pom.xml")))))
4816 (propagated-inputs
4817 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4818 (home-page "https://github.com/codehaus-plexus/plexus-components")
4819 (synopsis "Maven parent pom for plexus packages")
4820 (description "This package contains the parent pom for plexus component
4821 packages.")
4822 (license license:asl2.0)))
4823
4824 (define-public java-plexus-digest
4825 (package
4826 (name "java-plexus-digest")
4827 (version "1.2")
4828 (source (origin
4829 (method git-fetch)
4830 (uri (git-reference
4831 (url "https://github.com/codehaus-plexus/plexus-digest")
4832 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4833 (file-name (git-file-name name version))
4834 (sha256
4835 (base32
4836 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4837 (build-system ant-build-system)
4838 (arguments
4839 `(#:jar-name "plexus-digest.jar"
4840 #:source-dir "src/main/java"
4841 #:tests? #f
4842 #:phases
4843 (modify-phases %standard-phases
4844 (replace 'install
4845 (install-from-pom "pom.xml")))))
4846 (propagated-inputs
4847 `(("java-plexus-utils" ,java-plexus-utils)
4848 ("plexus-components-pom-1.1.20" ,plexus-components-pom-1.1.20)))
4849 (native-inputs
4850 `(("java-junit" ,java-junit)))
4851 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4852 (synopsis "Hash function utilities for Java")
4853 (description "This package is a plexus component that contains hash
4854 function utilities.")
4855 (license license:asl2.0)))
4856
4857 (define-public java-plexus-sec-dispatcher
4858 (package
4859 (name "java-plexus-sec-dispatcher")
4860 (version "1.4") ;; Newest release listed at the Maven Central Repository.
4861 (source (origin
4862 ;; This project doesn't tag releases or publish tarballs, so we take
4863 ;; the "prepare release plexus-sec-dispatcher-1.4" git commit.
4864 (method git-fetch)
4865 (uri (git-reference
4866 (url "https://github.com/sonatype/plexus-sec-dispatcher/")
4867 (commit "7db8f880486e192a1c5ea9544e01e756c3d49d0f")))
4868 (sha256
4869 (base32
4870 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4871 (file-name (git-file-name name version))))
4872 (arguments
4873 `(#:jar-name "plexus-sec-dispatcher.jar"
4874 #:source-dir "src/main/java"
4875 #:phases
4876 (modify-phases %standard-phases
4877 (add-before 'build 'generate-models
4878 (lambda* (#:key inputs #:allow-other-keys)
4879 (define (modello-single-mode file version mode)
4880 (invoke "java"
4881 "org.codehaus.modello.ModelloCli"
4882 file mode "src/main/java" version
4883 "false" "true"))
4884 (let ((file "src/main/mdo/settings-security.mdo"))
4885 (modello-single-mode file "1.0.0" "java")
4886 (modello-single-mode file "1.0.0" "xpp3-reader")
4887 (modello-single-mode file "1.0.0" "xpp3-writer"))
4888 #t))
4889 (add-before 'build 'generate-components.xml
4890 (lambda _
4891 (mkdir-p "build/classes/META-INF/plexus")
4892 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4893 (lambda _
4894 (display
4895 "<component-set>\n
4896 <components>\n
4897 <component>\n
4898 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4899 <role-hint>default</role-hint>\n
4900 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4901 <description></description>\n
4902 <requirements>\n
4903 <requirement>\n
4904 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4905 <field-name>_cipher</field-name>\n
4906 </requirement>\n
4907 <requirement>\n
4908 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4909 <field-name>_decryptors</field-name>\n
4910 </requirement>\n
4911 </requirements>\n
4912 <configuration>\n
4913 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4914 </configuration>\n
4915 </component>\n
4916 </components>\n
4917 </component-set>\n")))
4918 #t))
4919 (add-before 'check 'fix-paths
4920 (lambda _
4921 (copy-recursively "src/test/resources" "target")
4922 #t))
4923 (replace 'install (install-from-pom "pom.xml")))))
4924 (propagated-inputs
4925 `(("java-plexus-utils" ,java-plexus-utils)
4926 ("java-plexus-cipher" ,java-plexus-cipher)
4927 ("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-12)))
4928 (native-inputs
4929 `(("java-modello-core" ,java-modello-core)
4930 ;; for modello:
4931 ("java-plexus-container-default" ,java-plexus-container-default)
4932 ("java-plexus-classworlds" ,java-plexus-classworlds)
4933 ("java-plexus-utils" ,java-plexus-utils)
4934 ("java-guava" ,java-guava)
4935 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4936 ("java-sisu-build-api" ,java-sisu-build-api)
4937 ;; modello plugins:
4938 ("java-modellop-plugins-java" ,java-modello-plugins-java)
4939 ("java-modellop-plugins-xml" ,java-modello-plugins-xml)
4940 ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
4941 ;; for tests
4942 ("java-junit" ,java-junit)))
4943 (build-system ant-build-system)
4944 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4945 (synopsis "Plexus Security Dispatcher Component")
4946 (description "This package is the Plexus Security Dispatcher Component.
4947 This component decrypts a string passed to it.")
4948 (license license:asl2.0)))
4949
4950 (define-public java-plexus-cli
4951 (package
4952 (name "java-plexus-cli")
4953 (version "1.7")
4954 (source (origin
4955 (method git-fetch)
4956 (uri (git-reference
4957 (url "https://github.com/sonatype/plexus-cli")
4958 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4959 (file-name (string-append name "-" version))
4960 (sha256
4961 (base32
4962 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4963 (build-system ant-build-system)
4964 (arguments
4965 `(#:jar-name "plexus-cli.jar"
4966 #:source-dir "src/main/java"
4967 #:jdk ,icedtea-8
4968 #:test-dir "src/test"))
4969 (inputs
4970 `(("java-commons-cli" ,java-commons-cli)
4971 ("java-plexus-container-default" ,java-plexus-container-default)
4972 ("java-plexus-classworlds" ,java-plexus-classworlds)))
4973 (native-inputs
4974 `(("java-plexus-utils" ,java-plexus-utils)
4975 ("java-junit" ,java-junit)
4976 ("java-guava" ,java-guava)))
4977 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4978 (synopsis "CLI building library for plexus")
4979 (description "This package is a library to help creating CLI around
4980 Plexus components.")
4981 (license license:asl2.0)))
4982
4983 (define-public java-sisu-build-api
4984 (package
4985 (name "java-sisu-build-api")
4986 (version "0.0.7")
4987 (source (origin
4988 (method git-fetch)
4989 (uri (git-reference
4990 (url "https://github.com/sonatype/sisu-build-api")
4991 (commit (string-append "plexus-build-api-" version))))
4992 (file-name (git-file-name name version))
4993 (sha256
4994 (base32
4995 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4996 (build-system ant-build-system)
4997 (arguments
4998 `(#:jar-name "sisu-build-api.jar"
4999 #:source-dir "src/main/java"
5000 #:jdk ,icedtea-8
5001 #:tests? #f; FIXME: how to run the tests?
5002 #:phases
5003 (modify-phases %standard-phases
5004 (add-before 'build 'copy-resources
5005 (lambda _
5006 (copy-recursively "src/main/resources" "build/classes")
5007 (substitute* (find-files "build/classes")
5008 (("\\$\\{project.version\\}") ,version))
5009 #t))
5010 (add-before 'build 'generate-plexus-compontent
5011 (lambda _
5012 (mkdir-p "build/classes/META-INF/plexus")
5013 ;; This file is required for plexus to inject this package.
5014 ;; FIXME: how is it generated?
5015 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5016 (lambda _
5017 (display
5018 "<component-set>\n
5019 <components>\n
5020 <component>\n
5021 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5022 <role-hint>default</role-hint>\n
5023 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5024 <description>Filesystem based non-incremental build context implementation\n
5025 which behaves as if all files were just created.</description>\n
5026 </component>\n
5027 </components>\n
5028 </component-set>\n")))
5029 #t))
5030 (replace 'install
5031 (install-from-pom "pom.xml")))))
5032 (inputs
5033 `(("java-plexus-utils" ,java-plexus-utils)
5034 ("java-plexus-container-default" ,java-plexus-container-default)))
5035 (home-page "https://github.com/sonatype/sisu-build-api/")
5036 (synopsis "Base build API for maven")
5037 (description "This package contains the base build API for maven and
5038 a default implementation of it. This API is about scanning files in a
5039 project and determining what files need to be rebuilt.")
5040 (license license:asl2.0)))
5041
5042 (define-public java-modello-core
5043 (package
5044 (name "java-modello-core")
5045 (version "1.9.1")
5046 (source (origin
5047 (method git-fetch)
5048 (uri (git-reference
5049 (url "https://github.com/codehaus-plexus/modello")
5050 (commit (string-append "modello-" version))))
5051 (file-name (git-file-name name version))
5052 (sha256
5053 (base32
5054 "1di6ni42aqllpdvkpyfcw70352vr2i8wf6hd5nhd9kmqjb5dj5j4"))))
5055 (build-system ant-build-system)
5056 (arguments
5057 `(#:jar-name "modello-core.jar"
5058 #:source-dir "modello-core/src/main/java"
5059 #:test-dir "modello-core/src/test"
5060 #:main-class "org.codehaus.modello.ModelloCli"
5061 #:jdk ,icedtea-8
5062 #:phases
5063 (modify-phases %standard-phases
5064 (add-before 'build 'copy-resources
5065 (lambda _
5066 (mkdir-p "build/classes/META-INF/plexus")
5067 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5068 "build/classes/META-INF/plexus/components.xml")
5069 #t))
5070 (add-before 'check 'fix-tests
5071 (lambda _
5072 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5073 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5074 "modello/core/io/ModelReaderTest.java")
5075 (("src/test") "modello-core/src/test")))
5076 #t)))))
5077 (propagated-inputs
5078 `(("java-plexus-utils" ,java-plexus-utils)
5079 ("java-plexus-container-default" ,java-plexus-container-default)
5080 ("java-sisu-build-api" ,java-sisu-build-api)))
5081 (native-inputs
5082 `(("java-junit" ,java-junit)
5083 ("java-plexus-classworlds" ,java-plexus-classworlds)
5084 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
5085 ("java-guava" ,java-guava)))
5086 (home-page "https://codehaus-plexus.github.io/modello/")
5087 (synopsis "Framework for code generation from a simple model")
5088 (description "Modello is a framework for code generation from a simple model.
5089
5090 Modello generates code from a simple model format: based on a plugin
5091 architecture, various types of code and descriptors can be generated from the
5092 single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5093 XSD and documentation.")
5094 (license (list
5095 license:expat
5096 ;; Although this package uses only files licensed under expat,
5097 ;; other parts of the source are licensed under different
5098 ;; licenses. We include them to be inherited by other packages.
5099 license:asl2.0
5100 ;; Some files in modello-plugin-java are licensed under a
5101 ;; 5-clause BSD license.
5102 (license:non-copyleft
5103 (string-append "file:///modello-plugins/modello-plugin-java/"
5104 "src/main/java/org/codehaus/modello/plugin/"
5105 "java/javasource/JNaming.java"))))))
5106
5107 (define-public java-modello-plugins-java
5108 (package
5109 (inherit java-modello-core)
5110 (name "java-modello-plugins-java")
5111 (arguments
5112 `(#:jar-name "modello-plugins-java.jar"
5113 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5114 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5115 #:jdk ,icedtea-8
5116 #:tests? #f; requires maven-model, which depends on this package
5117 #:phases
5118 (modify-phases %standard-phases
5119 (add-before 'build 'copy-resources
5120 (lambda _
5121 (mkdir-p "build/classes")
5122 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5123 "build/classes")
5124 #t)))))
5125 (inputs
5126 `(("java-modello-core" ,java-modello-core)))
5127 (synopsis "Modello Java Plugin")
5128 (description "Modello Java Plugin generates Java objects for the model.")))
5129
5130 (define-public java-modello-plugins-xml
5131 (package
5132 (inherit java-modello-core)
5133 (name "java-modello-plugins-xml")
5134 (arguments
5135 `(#:jar-name "modello-plugins-xml.jar"
5136 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5137 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5138 #:jdk ,icedtea-8
5139 #:phases
5140 (modify-phases %standard-phases
5141 (add-before 'build 'copy-resources
5142 (lambda _
5143 (mkdir-p "build/classes")
5144 (copy-recursively
5145 "modello-plugins/modello-plugin-xml/src/main/resources"
5146 "build/classes")
5147 #t))
5148 (add-before 'check 'fix-paths
5149 (lambda _
5150 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5151 (substitute*
5152 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5153 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5154 #t)))))
5155 (propagated-inputs
5156 `(("java-modello-core" ,java-modello-core)
5157 ("java-modello-plugins-java" ,java-modello-plugins-java)))
5158 (synopsis "Modello XML Plugin")
5159 (description "Modello XML Plugin contains shared code for every plugins
5160 working on XML representation of the model.")))
5161
5162 (define-public java-modello-test
5163 (package
5164 (inherit java-modello-core)
5165 (name "java-modello-test")
5166 (arguments
5167 `(#:jar-name "modello-test.jar"
5168 #:source-dir "modello-test/src/main/java"
5169 #:tests? #f; no tests
5170 #:jdk ,icedtea-8))
5171 (inputs
5172 `(("java-plexus-utils" ,java-plexus-utils)
5173 ("java-plexus-compiler-api" ,java-plexus-compiler-api)
5174 ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
5175 ("java-plexus-container-default" ,java-plexus-container-default)))
5176 (synopsis "Modello test package")
5177 (description "The modello test package contains the basis to create
5178 Modello generator unit-tests, including sample models and xml files to test
5179 every feature for every plugin.")))
5180
5181 (define-public java-modello-plugins-xpp3
5182 (package
5183 (inherit java-modello-core)
5184 (name "java-modello-plugins-xpp3")
5185 (arguments
5186 `(#:jar-name "modello-plugins-xpp3.jar"
5187 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5188 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5189 ;; One of the test dependencies is maven-model which depends on this package.
5190 #:tests? #f
5191 #:jdk ,icedtea-8
5192 #:phases
5193 (modify-phases %standard-phases
5194 (add-before 'build 'copy-resources
5195 (lambda _
5196 (mkdir-p "build/classes")
5197 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5198 "build/classes")
5199 #t)))))
5200 (propagated-inputs
5201 `(("java-modello-core" ,java-modello-core)
5202 ("java-modello-plugins-java" ,java-modello-plugins-java)
5203 ("java-modello-plugins-xml" ,java-modello-plugins-xml)))
5204 (native-inputs
5205 `(("java-xmlunit" ,java-xmlunit)
5206 ("java-modello-test" ,java-modello-test)
5207 ,@(package-native-inputs java-modello-core)))
5208 (synopsis "Modello XPP3 Plugin")
5209 (description "The modello XPP3 plugin generates XML readers and writers based
5210 on the XPP3 API (XML Pull Parser).")))
5211
5212 (define-public java-asm
5213 (package
5214 (name "java-asm")
5215 (version "6.0")
5216 (source (origin
5217 (method url-fetch)
5218 (uri (string-append "https://download.forge.ow2.org/asm/"
5219 "asm-" version ".tar.gz"))
5220 (sha256
5221 (base32
5222 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5223 (build-system ant-build-system)
5224 (arguments
5225 `(#:build-target "compile"
5226 ;; The tests require an old version of Janino, which no longer compiles
5227 ;; with the JDK7.
5228 #:tests? #f
5229 #:make-flags
5230 (list
5231 ;; We don't need these extra ant tasks, but the build system asks us to
5232 ;; provide a path anyway.
5233 "-Dobjectweb.ant.tasks.path=dummy-path"
5234 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5235 ;; used during the build automatically by ant-build-system, but
5236 ;; java-asm's build.xml fails unless we provide something here.
5237 "-Dbiz.aQute.bnd.path=dummy-path")
5238 #:phases
5239 (modify-phases %standard-phases
5240 (add-before 'build 'remove-bnd-dependency
5241 (lambda _
5242 ;; This file is the only one to require bnd, and is not needed
5243 ;; because we don't build a bundle.
5244 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5245 #t))
5246 (add-before 'install 'build-jars
5247 (lambda* (#:key make-flags #:allow-other-keys)
5248 ;; We cannot use the "jar" target because it depends on a couple
5249 ;; of unpackaged, complicated tools.
5250 (mkdir "dist")
5251 (invoke "jar"
5252 "-cf" (string-append "dist/asm-" ,version ".jar")
5253 "-C" "output/build/tmp" ".")))
5254 (add-before 'install 'fix-pom
5255 (lambda _
5256 (substitute* (find-files "archive" "\\.pom$")
5257 (("@product.artifact@") ,version))
5258 #t))
5259 (add-before 'install 'install-parent
5260 (install-pom-file "archive/asm-parent.pom"))
5261 (replace 'install
5262 (install-from-pom "archive/asm.pom")))))
5263 (native-inputs
5264 `(("java-junit" ,java-junit)))
5265 (propagated-inputs
5266 `(("java-org-ow2-parent-pom" ,java-org-ow2-parent-pom-1.3)))
5267 (home-page "https://asm.ow2.io/")
5268 (synopsis "Very small and fast Java bytecode manipulation framework")
5269 (description "ASM is an all purpose Java bytecode manipulation and
5270 analysis framework. It can be used to modify existing classes or dynamically
5271 generate classes, directly in binary form. The provided common
5272 transformations and analysis algorithms allow easily assembling custom
5273 complex transformations and code analysis tools.")
5274 (license license:bsd-3)))
5275
5276 (define java-org-ow2-parent-pom-1.3
5277 (package
5278 (name "java-org-ow2-parent-pom")
5279 (version "1.3")
5280 (source (origin
5281 (method url-fetch)
5282 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5283 (sha256
5284 (base32
5285 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5286 (build-system ant-build-system)
5287 (arguments
5288 `(#:tests? #f
5289 #:phases
5290 (modify-phases %standard-phases
5291 (delete 'unpack)
5292 (delete 'build)
5293 (delete 'configure)
5294 (replace 'install
5295 (install-pom-file (assoc-ref %build-inputs "source"))))))
5296 (home-page "https://ow2.org")
5297 (synopsis "Ow2.org parent pom")
5298 (description "This package contains the parent pom for projects from ow2.org,
5299 including java-asm.")
5300 (license license:lgpl2.1+)))
5301
5302 (define java-asm-bootstrap
5303 (package
5304 (inherit java-asm)
5305 (name "java-asm-bootstrap")
5306 (arguments
5307 (substitute-keyword-arguments (package-arguments java-asm)
5308 ((#:tests? _) #f)))
5309 (native-inputs `())))
5310
5311 (define-public java-asm-8
5312 (package
5313 (inherit java-asm)
5314 (version "8.0.1")
5315 (source (origin
5316 (method git-fetch)
5317 (uri (git-reference
5318 (url "https://gitlab.ow2.org/asm/asm")
5319 (commit (string-append
5320 "ASM_" (string-join (string-split version #\.)
5321 "_")))))
5322 (file-name (git-file-name "java-asm" version))
5323 (sha256
5324 (base32
5325 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5326 (arguments
5327 `(#:jar-name "asm8.jar"
5328 #:source-dir "asm/src/main/java"
5329 #:test-dir "asm/src/test"
5330 ;; tests depend on junit5
5331 #:tests? #f))
5332 (propagated-inputs '())
5333 (native-inputs '())))
5334
5335 (define-public java-asm-tree-8
5336 (package
5337 (inherit java-asm-8)
5338 (name "java-asm-tree")
5339 (arguments
5340 `(#:jar-name "asm-tree.jar"
5341 #:source-dir "asm-tree/src/main/java"
5342 #:test-dir "asm-tree/src/test"
5343 ;; tests depend on junit5
5344 #:tests? #f))
5345 (inputs
5346 `(("java-asm" ,java-asm-8)))))
5347
5348 (define-public java-asm-analysis-8
5349 (package
5350 (inherit java-asm-8)
5351 (name "java-asm-analysis")
5352 (arguments
5353 `(#:jar-name "asm-analysis.jar"
5354 #:source-dir "asm-analysis/src/main/java"
5355 #:test-dir "asm-analysis/src/test"
5356 ;; tests depend on junit5
5357 #:tests? #f))
5358 (inputs
5359 `(("java-asm" ,java-asm-8)
5360 ("java-asm-tree" ,java-asm-tree-8)))))
5361
5362 (define-public java-asm-util-8
5363 (package
5364 (inherit java-asm-8)
5365 (name "java-asm-util")
5366 (arguments
5367 `(#:jar-name "asm-util8.jar"
5368 #:source-dir "asm-util/src/main/java"
5369 #:test-dir "asm-util/src/test"
5370 ;; tests depend on junit5
5371 #:tests? #f))
5372 (inputs
5373 `(("java-asm" ,java-asm-8)
5374 ("java-asm-analysis" ,java-asm-analysis-8)
5375 ("java-asm-tree" ,java-asm-tree-8)))))
5376
5377 (define-public java-cglib
5378 (package
5379 (name "java-cglib")
5380 (version "3.2.4")
5381 (source
5382 (origin
5383 (method git-fetch)
5384 (uri (git-reference
5385 (url "https://github.com/cglib/cglib")
5386 (commit (string-append
5387 "RELEASE_"
5388 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5389 version)))))
5390 (file-name (git-file-name name version))
5391 (sha256
5392 (base32 "186451jms2zfp47yd8kxd77az2cqal1my2br7klgyp8fpl4qfg8v"))))
5393 (build-system ant-build-system)
5394 (arguments
5395 `(;; FIXME: tests fail because junit runs
5396 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5397 ;; to describe a test at all.
5398 #:tests? #f
5399 #:jar-name "cglib.jar"
5400 #:phases
5401 (modify-phases %standard-phases
5402 (add-after 'unpack 'chdir
5403 (lambda _ (chdir "cglib") #t)))))
5404 (inputs
5405 `(("java-asm" ,java-asm)
5406 ("java-junit" ,java-junit)))
5407 (home-page "https://github.com/cglib/cglib/")
5408 (synopsis "Java byte code generation library")
5409 (description "The byte code generation library CGLIB is a high level API
5410 to generate and transform Java byte code.")
5411 (license license:asl2.0)))
5412
5413 (define-public java-objenesis
5414 (package
5415 (name "java-objenesis")
5416 (version "2.5.1")
5417 (source (origin
5418 (method git-fetch)
5419 (uri (git-reference
5420 (url "https://github.com/easymock/objenesis")
5421 (commit version)))
5422 (file-name (git-file-name name version))
5423 (sha256
5424 (base32
5425 "054yi200wj00x6dp1sxfrwgndwywadsbn8d8ij1j0v45j9g2vdya"))))
5426 (build-system ant-build-system)
5427 (arguments
5428 `(#:jar-name "objenesis.jar"
5429 #:source-dir "main/src/"
5430 #:test-dir "main/src/test/"))
5431 (native-inputs
5432 `(("java-junit" ,java-junit)
5433 ("java-hamcrest-core" ,java-hamcrest-core)))
5434 (home-page "http://objenesis.org/")
5435 (synopsis "Bypass the constructor when creating an object")
5436 (description "Objenesis is a small Java library that serves one purpose:
5437 to instantiate a new object of a particular class. It is common to see
5438 restrictions in libraries stating that classes must require a default
5439 constructor. Objenesis aims to overcome these restrictions by bypassing the
5440 constructor on object instantiation.")
5441 (license license:asl2.0)))
5442
5443 (define-public java-easymock
5444 (package
5445 (name "java-easymock")
5446 (version "3.4")
5447 (source (origin
5448 (method git-fetch)
5449 (uri (git-reference
5450 (url "https://github.com/easymock/easymock/")
5451 (commit (string-append "easymock-" version))))
5452 (file-name (git-file-name name version))
5453 (sha256
5454 (base32
5455 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5456 (build-system ant-build-system)
5457 (arguments
5458 `(#:jar-name "easymock.jar"
5459 #:source-dir "core/src/main"
5460 #:test-dir "core/src/test"
5461 #:phases
5462 (modify-phases %standard-phases
5463 ;; FIXME: Android support requires the following packages to be
5464 ;; available: com.google.dexmaker.stock.ProxyBuilder
5465 (add-after 'unpack 'delete-android-support
5466 (lambda _
5467 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5468 (substitute* "MocksControl.java"
5469 (("AndroidSupport.isAndroid\\(\\)") "false")
5470 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5471 (delete-file "AndroidClassProxyFactory.java"))
5472 #t))
5473 (add-after 'unpack 'delete-broken-tests
5474 (lambda _
5475 (with-directory-excursion "core/src/test/java/org/easymock"
5476 ;; This test depends on dexmaker.
5477 (delete-file "tests2/ClassExtensionHelperTest.java")
5478
5479 ;; This is not a test.
5480 (delete-file "tests/BaseEasyMockRunnerTest.java")
5481
5482 ;; This test should be executed with a different runner...
5483 (delete-file "tests2/EasyMockAnnotationsTest.java")
5484 ;; ...but deleting it means that we also have to delete these
5485 ;; dependent files.
5486 (delete-file "tests2/EasyMockRunnerTest.java")
5487 (delete-file "tests2/EasyMockRuleTest.java")
5488
5489 ;; This test fails because the file "easymock.properties" does
5490 ;; not exist.
5491 (delete-file "tests2/EasyMockPropertiesTest.java"))
5492 #t)))))
5493 (inputs
5494 `(("java-asm" ,java-asm)
5495 ("java-cglib" ,java-cglib)
5496 ("java-objenesis" ,java-objenesis)))
5497 (native-inputs
5498 `(("java-junit" ,java-junit)
5499 ("java-hamcrest-core" ,java-hamcrest-core)))
5500 (home-page "https://easymock.org/")
5501 (synopsis "Java library providing mock objects for unit tests")
5502 (description "EasyMock is a Java library that provides an easy way to use
5503 mock objects in unit testing.")
5504 (license license:asl2.0)))
5505
5506 (define-public java-jmock-1
5507 (package
5508 (name "java-jmock")
5509 (version "1.2.0")
5510 (source (origin
5511 (method git-fetch)
5512 (uri (git-reference
5513 (url "https://github.com/jmock-developers/jmock-library")
5514 (commit version)))
5515 (file-name (git-file-name name version))
5516 (sha256
5517 (base32
5518 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5519 (build-system ant-build-system)
5520 (arguments
5521 `(#:build-target "jars"
5522 #:test-target "run.tests"
5523 #:phases
5524 (modify-phases %standard-phases
5525 (replace 'install (install-jars "build")))))
5526 (home-page "http://jmock.org/")
5527 (synopsis "Mock object library for test-driven development")
5528 (description "JMock is a library that supports test-driven development of
5529 Java code with mock objects. Mock objects help you design and test the
5530 interactions between the objects in your programs.
5531
5532 The jMock library
5533
5534 @itemize
5535 @item makes it quick and easy to define mock objects
5536 @item lets you precisely specify the interactions between
5537 your objects, reducing the brittleness of your tests
5538 @item plugs into your favourite test framework
5539 @item is easy to extend.
5540 @end itemize\n")
5541 (license license:bsd-3)))
5542
5543 (define-public java-jmock
5544 (package
5545 (inherit java-jmock-1)
5546 (name "java-jmock")
5547 (version "2.8.2")
5548 (source (origin
5549 (method git-fetch)
5550 (uri (git-reference
5551 (url "https://github.com/jmock-developers/jmock-library")
5552 (commit version)))
5553 (file-name (git-file-name name version))
5554 (sha256
5555 (base32
5556 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5557 (inputs
5558 `(("java-hamcrest-all" ,java-hamcrest-all)
5559 ("java-asm" ,java-asm)
5560 ("java-bsh" ,java-bsh)
5561 ("java-junit" ,java-junit)))
5562 (native-inputs
5563 `(("cglib" ,java-cglib)))
5564 (arguments
5565 `(#:jar-name "java-jmock.jar"
5566 #:source-dir "jmock/src/main/java"
5567 #:test-dir "jmock/src/test"))))
5568
5569 (define-public java-jmock-junit4
5570 (package
5571 (inherit java-jmock)
5572 (name "java-jmock-junit4")
5573 (arguments
5574 `(#:jar-name "java-jmock-junit4.jar"
5575 #:source-dir "jmock-junit4/src/main/java"
5576 #:test-dir "jmock-junit4/src/test"))
5577 (inputs
5578 `(("java-hamcrest-all" ,java-hamcrest-all)
5579 ("java-asm" ,java-asm)
5580 ("java-bsh" ,java-bsh)
5581 ("java-jmock" ,java-jmock)
5582 ("java-jumit" ,java-junit)))))
5583
5584 (define-public java-jmock-legacy
5585 (package
5586 (inherit java-jmock)
5587 (name "java-jmock-legacy")
5588 (arguments
5589 `(#:jar-name "java-jmock-legacy.jar"
5590 #:source-dir "jmock-legacy/src/main/java"
5591 #:test-dir "jmock-legacy/src/test"
5592 #:phases
5593 (modify-phases %standard-phases
5594 (add-before 'check 'copy-tests
5595 (lambda _
5596 ;; This file is a dependancy of some tests
5597 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5598 (copy-file (string-append "jmock/src/test/java/" file)
5599 (string-append "jmock-legacy/src/test/java/" file))
5600 #t))))))
5601 (inputs
5602 `(("java-hamcrest-all" ,java-hamcrest-all)
5603 ("java-objenesis" ,java-objenesis)
5604 ("java-cglib" ,java-cglib)
5605 ("java-jmock" ,java-jmock)
5606 ("java-asm" ,java-asm)
5607 ("java-bsh" ,java-bsh)
5608 ("java-junit" ,java-junit)))
5609 (native-inputs
5610 `(("java-jmock-junit4" ,java-jmock-junit4)))))
5611
5612 (define-public java-hamcrest-all
5613 (package (inherit java-hamcrest-core)
5614 (name "java-hamcrest-all")
5615 (arguments
5616 `(#:jdk ,icedtea-8
5617 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5618 ((#:build-target _) "bigjar")
5619 ((#:phases phases)
5620 `(modify-phases ,phases
5621 ;; Some build targets override the classpath, so we need to patch
5622 ;; the build.xml to ensure that required dependencies are on the
5623 ;; classpath.
5624 (add-after 'unpack 'patch-classpath-for-integration
5625 (lambda* (#:key inputs #:allow-other-keys)
5626 (substitute* "build.xml"
5627 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5628 (string-join
5629 (cons line
5630 (append
5631 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5632 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5633 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5634 ";"))
5635 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5636 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5637 "jar$"))))
5638 #t))
5639 (replace 'install
5640 (lambda* (#:key outputs #:allow-other-keys)
5641 (let* ((target (string-append (assoc-ref outputs "out")
5642 "/share/java/"))
5643 (version-suffix
5644 ,(string-append
5645 "-" (package-version java-hamcrest-core) ".jar"))
5646 (install-without-version-suffix
5647 (lambda (jar)
5648 (copy-file jar
5649 (string-append target
5650 (basename jar version-suffix)
5651 ".jar")))))
5652 (mkdir-p target)
5653 (for-each
5654 install-without-version-suffix
5655 (find-files "build"
5656 (lambda (name _)
5657 (and (string-suffix? ".jar" name)
5658 (not (string-suffix? "-sources.jar" name)))))))
5659 #t)))))))
5660 (inputs
5661 `(("java-junit" ,java-junit)
5662 ("java-jmock" ,java-jmock-1)
5663 ;; This is necessary because of what seems to be a race condition.
5664 ;; This package would sometimes fail to build because hamcrest-core.jar
5665 ;; could not be found, even though it is built as part of this package.
5666 ;; Adding java-hamcrest-core appears to fix this problem. See
5667 ;; https://debbugs.gnu.org/31390 for more information.
5668 ("java-hamcrest-core" ,java-hamcrest-core)
5669 ("java-easymock" ,java-easymock)
5670 ,@(package-inputs java-hamcrest-core)))))
5671
5672 (define-public java-jopt-simple
5673 (package
5674 (name "java-jopt-simple")
5675 (version "5.0.3")
5676 (source (origin
5677 (method url-fetch)
5678 (uri (string-append "http://repo1.maven.org/maven2/"
5679 "net/sf/jopt-simple/jopt-simple/"
5680 version "/jopt-simple-"
5681 version "-sources.jar"))
5682 (sha256
5683 (base32
5684 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5685 (build-system ant-build-system)
5686 (arguments
5687 `(#:tests? #f ; there are no tests
5688 #:jar-name "jopt-simple.jar"))
5689 (home-page "https://pholser.github.io/jopt-simple/")
5690 (synopsis "Java library for parsing command line options")
5691 (description "JOpt Simple is a Java library for parsing command line
5692 options, such as those you might pass to an invocation of @code{javac}. In
5693 the interest of striving for simplicity, as closely as possible JOpt Simple
5694 attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5695 GNU @code{getopt_long}. It also aims to make option parser configuration and
5696 retrieval of options and their arguments simple and expressive, without being
5697 overly clever.")
5698 (license license:expat)))
5699
5700 (define-public java-commons-math3
5701 (package
5702 (name "java-commons-math3")
5703 (version "3.6.1")
5704 (source (origin
5705 (method url-fetch)
5706 (uri (string-append "mirror://apache/commons/math/source/"
5707 "commons-math3-" version "-src.tar.gz"))
5708 (sha256
5709 (base32
5710 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5711 (build-system ant-build-system)
5712 (arguments
5713 `(#:build-target "jar"
5714 #:test-target "test"
5715 #:make-flags
5716 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5717 (junit (assoc-ref %build-inputs "java-junit")))
5718 (list (string-append "-Djunit.jar="
5719 (car (find-files junit "jar$")))
5720 (string-append "-Dhamcrest.jar="
5721 (car (find-files hamcrest ".*.jar$")))))
5722 #:phases
5723 (modify-phases %standard-phases
5724 ;; We want to build the jar in the build phase and run the tests
5725 ;; later in a separate phase.
5726 (add-after 'unpack 'untangle-targets
5727 (lambda _
5728 (substitute* "build.xml"
5729 (("name=\"jar\" depends=\"test\"")
5730 "name=\"jar\" depends=\"compile\""))
5731 #t))
5732 ;; There is no install target.
5733 (replace 'install
5734 (install-jars "target")))))
5735 (native-inputs
5736 `(("java-junit" ,java-junit)
5737 ("java-hamcrest-core" ,java-hamcrest-core)))
5738 (home-page "https://commons.apache.org/math/")
5739 (synopsis "Apache Commons mathematics library")
5740 (description "Commons Math is a library of lightweight, self-contained
5741 mathematics and statistics components addressing the most common problems not
5742 available in the Java programming language or Commons Lang.")
5743 (license license:asl2.0)))
5744
5745 (define-public java-jmh
5746 (package
5747 (name "java-jmh")
5748 (version "1.17.5")
5749 (source (origin
5750 (method hg-fetch)
5751 (uri (hg-reference
5752 (url "http://hg.openjdk.java.net/code-tools/jmh/")
5753 (changeset version)))
5754 (file-name (string-append name "-" version "-checkout"))
5755 (sha256
5756 (base32
5757 "1fxyxhg9famwcg1prc4cgwb5wzyxqavn3cjm5vz8605xz7x5k084"))))
5758 (build-system ant-build-system)
5759 (arguments
5760 `(#:jar-name "jmh-core.jar"
5761 #:source-dir "jmh-core/src/main"
5762 #:test-dir "jmh-core/src/test"
5763 #:phases
5764 (modify-phases %standard-phases
5765 ;; This seems to be a bug in the JDK. It may not be necessary in
5766 ;; future versions of the JDK.
5767 (add-after 'unpack 'fix-bug
5768 (lambda _
5769 (with-directory-excursion
5770 "jmh-core/src/main/java/org/openjdk/jmh/runner/options"
5771 (substitute* '("IntegerValueConverter.java"
5772 "ThreadsValueConverter.java")
5773 (("public Class<Integer> valueType")
5774 "public Class<? extends Integer> valueType")))
5775 #t)))))
5776 (inputs
5777 `(("java-jopt-simple" ,java-jopt-simple)
5778 ("java-commons-math3" ,java-commons-math3)))
5779 (native-inputs
5780 `(("java-junit" ,java-junit)
5781 ("java-hamcrest-core" ,java-hamcrest-core)))
5782 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5783 (synopsis "Benchmark harness for the JVM")
5784 (description "JMH is a Java harness for building, running, and analysing
5785 nano/micro/milli/macro benchmarks written in Java and other languages
5786 targeting the JVM.")
5787 ;; GPLv2 only
5788 (license license:gpl2)))
5789
5790 (define-public java-commons-collections4
5791 (package
5792 (name "java-commons-collections4")
5793 (version "4.1")
5794 (source (origin
5795 (method url-fetch)
5796 (uri (string-append "mirror://apache/commons/collections/source/"
5797 "commons-collections4-" version "-src.tar.gz"))
5798 (sha256
5799 (base32
5800 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5801 (build-system ant-build-system)
5802 (arguments
5803 `(#:test-target "test"
5804 #:make-flags
5805 (let ((hamcrest (assoc-ref %build-inputs "java-hamcrest-core"))
5806 (junit (assoc-ref %build-inputs "java-junit"))
5807 (easymock (assoc-ref %build-inputs "java-easymock")))
5808 (list (string-append "-Djunit.jar="
5809 (car (find-files junit "jar$")))
5810 (string-append "-Dhamcrest.jar="
5811 (car (find-files hamcrest "jar$")))
5812 (string-append "-Deasymock.jar=" easymock
5813 "/share/java/easymock.jar")))
5814 #:phases
5815 (modify-phases %standard-phases
5816 (replace 'install
5817 (install-jars "target")))))
5818 (native-inputs
5819 `(("java-junit" ,java-junit)
5820 ("java-hamcrest-core" ,java-hamcrest-core)
5821 ("java-easymock" ,java-easymock)))
5822 (home-page "https://commons.apache.org/collections/")
5823 (synopsis "Collections framework")
5824 (description "The Java Collections Framework is the recognised standard
5825 for collection handling in Java. Commons-Collections seek to build upon the
5826 JDK classes by providing new interfaces, implementations and utilities. There
5827 are many features, including:
5828
5829 @itemize
5830 @item @code{Bag} interface for collections that have a number of copies of
5831 each object
5832 @item @code{BidiMap} interface for maps that can be looked up from value to
5833 key as well and key to value
5834 @item @code{MapIterator} interface to provide simple and quick iteration over
5835 maps
5836 @item Transforming decorators that alter each object as it is added to the
5837 collection
5838 @item Composite collections that make multiple collections look like one
5839 @item Ordered maps and sets that retain the order elements are added in,
5840 including an LRU based map
5841 @item Reference map that allows keys and/or values to be garbage collected
5842 under close control
5843 @item Many comparator implementations
5844 @item Many iterator implementations
5845 @item Adapter classes from array and enumerations to collections
5846 @item Utilities to test or create typical set-theory properties of collections
5847 such as union, intersection, and closure.
5848 @end itemize\n")
5849 (license license:asl2.0)))
5850
5851 (define-public java-commons-collections
5852 (package
5853 (inherit java-commons-collections4)
5854 (name "java-commons-collections")
5855 (version "3.2.2")
5856 (source (origin
5857 (method url-fetch)
5858 (uri (string-append "mirror://apache/commons/collections/source/"
5859 "commons-collections-" version "-src.tar.gz"))
5860 (sha256
5861 (base32
5862 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5863 (patches
5864 (search-patches "java-commons-collections-fix-java8.patch"))))
5865 (arguments
5866 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5867 ((#:phases phases)
5868 `(modify-phases ,phases
5869 ;; The manifest is required by the build procedure
5870 (add-before 'build 'add-manifest
5871 (lambda _
5872 (mkdir-p "build/conf")
5873 (call-with-output-file "build/conf/MANIFEST.MF"
5874 (lambda (file)
5875 (format file "Manifest-Version: 1.0\n")))
5876 #t))
5877 (replace 'install
5878 (install-jars "build"))))))))
5879
5880 (define java-commons-collections-test-classes
5881 (package
5882 (inherit java-commons-collections)
5883 (arguments
5884 `(#:jar-name "commons-collections-test-classes.jar"
5885 #:source-dir "src/test"
5886 #:tests? #f))
5887 (inputs
5888 `(("collection" ,java-commons-collections)))))
5889
5890 (define-public java-commons-beanutils
5891 (package
5892 (name "java-commons-beanutils")
5893 (version "1.9.3")
5894 (source (origin
5895 (method url-fetch)
5896 (uri (string-append "mirror://apache/commons/beanutils/source/"
5897 "commons-beanutils-" version "-src.tar.gz"))
5898 (sha256
5899 (base32
5900 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5901 (build-system ant-build-system)
5902 (arguments
5903 `(#:test-target "test"
5904 #:tests? #f
5905 #:phases
5906 (modify-phases %standard-phases
5907 (replace 'install
5908 (lambda* (#:key outputs #:allow-other-keys)
5909 (rename-file (string-append "dist/commons-beanutils-" ,version
5910 "-SNAPSHOT.jar")
5911 "commons-beanutils.jar")
5912 (install-file "commons-beanutils.jar"
5913 (string-append (assoc-ref outputs "out") "/share/java/"))
5914 #t)))))
5915 (inputs
5916 `(("logging" ,java-commons-logging-minimal)
5917 ("collections" ,java-commons-collections)))
5918 (native-inputs
5919 `(("junit" ,java-junit)
5920 ("collections-test" ,java-commons-collections-test-classes)))
5921 (home-page "https://commons.apache.org/beanutils/")
5922 (synopsis "Dynamically set or get properties in Java")
5923 (description "BeanUtils provides a simplified interface to reflection and
5924 introspection to set or get dynamically determined properties through their
5925 setter and getter method.")
5926 (license license:asl2.0)))
5927
5928 (define-public java-commons-io
5929 (package
5930 (name "java-commons-io")
5931 (version "2.5")
5932 (source
5933 (origin
5934 (method url-fetch)
5935 (uri (string-append "mirror://apache/commons/io/source/"
5936 "commons-io-" version "-src.tar.gz"))
5937 (sha256
5938 (base32
5939 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
5940 (build-system ant-build-system)
5941 (outputs '("out" "doc"))
5942 (arguments
5943 `(#:test-target "test"
5944 #:make-flags
5945 (list (string-append "-Djunit.jar="
5946 (car (find-files (assoc-ref %build-inputs "java-junit")
5947 "jar$"))))
5948 #:phases
5949 (modify-phases %standard-phases
5950 (add-after 'build 'build-javadoc ant-build-javadoc)
5951 (replace 'install (install-from-pom "pom.xml"))
5952 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
5953 (native-inputs
5954 `(("java-junit" ,java-junit)
5955 ("java-hamcrest-core" ,java-hamcrest-core)))
5956 (propagated-inputs
5957 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-39)))
5958 (home-page "https://commons.apache.org/io/")
5959 (synopsis "Common useful IO related classes")
5960 (description "Commons-IO contains utility classes, stream implementations,
5961 file filters and endian classes.")
5962 (license license:asl2.0)))
5963
5964 (define-public java-commons-exec-1.1
5965 (package
5966 (name "java-commons-exec")
5967 (version "1.1")
5968 (source
5969 (origin
5970 (method url-fetch)
5971 (uri (string-append "mirror://apache/commons/exec/source/"
5972 "commons-exec-" version "-src.tar.gz"))
5973 (sha256
5974 (base32
5975 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
5976 (build-system ant-build-system)
5977 (arguments
5978 `(#:test-target "test"
5979 #:make-flags
5980 (list (string-append "-Dmaven.junit.jar="
5981 (car (find-files (assoc-ref %build-inputs "java-junit")
5982 "jar$"))))
5983 #:phases
5984 (modify-phases %standard-phases
5985 (add-before 'build 'delete-network-tests
5986 (lambda _
5987 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
5988 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
5989 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
5990 #t))
5991 ;; The "build" phase automatically tests.
5992 (delete 'check)
5993 (replace 'install (install-jars "target")))))
5994 (native-inputs
5995 `(("java-junit" ,java-junit)))
5996 (home-page "https://commons.apache.org/proper/commons-exec/")
5997 (synopsis "Common program execution related classes")
5998 (description "Commons-Exec simplifies executing external processes.")
5999 (license license:asl2.0)))
6000
6001 (define-public java-commons-exec
6002 (package
6003 (inherit java-commons-exec-1.1)
6004 (version "1.3")
6005 (source
6006 (origin
6007 (method url-fetch)
6008 (uri (string-append "mirror://apache/commons/exec/source/"
6009 "commons-exec-" version "-src.tar.gz"))
6010 (sha256
6011 (base32
6012 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6013 (arguments
6014 `(#:test-target "test"
6015 #:make-flags
6016 (list (string-append "-Dmaven.junit.jar="
6017 (car (find-files (assoc-ref %build-inputs "java-junit")
6018 "jar$")))
6019 "-Dmaven.compiler.source=1.7"
6020 "-Dmaven.compiler.target=1.7")
6021 #:phases
6022 (modify-phases %standard-phases
6023 (add-before 'build 'delete-network-tests
6024 (lambda* (#:key inputs #:allow-other-keys)
6025 ;; This test hangs indefinitely.
6026 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6027 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6028 (("ping -c 10 127.0.0.1") "sleep 10"))
6029 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6030 (("/bin/ls") "ls"))
6031 (call-with-output-file "src/test/scripts/ping.sh"
6032 (lambda (port)
6033 (format port "#!~a/bin/sh\nsleep $1\n"
6034 (assoc-ref inputs "bash"))))
6035 #t))
6036 ;; The "build" phase automatically tests.
6037 (delete 'check)
6038 (replace 'install (install-jars "target")))))
6039 (native-inputs
6040 `(("java-junit" ,java-junit)
6041 ("java-hamcrest-core" ,java-hamcrest-core)))))
6042
6043 (define-public java-commons-lang
6044 (package
6045 (name "java-commons-lang")
6046 (version "2.6")
6047 (source
6048 (origin
6049 (method url-fetch)
6050 (uri (string-append "mirror://apache/commons/lang/source/"
6051 "commons-lang-" version "-src.tar.gz"))
6052 (sha256
6053 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6054 (build-system ant-build-system)
6055 (outputs '("out" "doc"))
6056 (arguments
6057 `(#:test-target "test"
6058 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6059 #:phases
6060 (modify-phases %standard-phases
6061 (add-after 'build 'build-javadoc ant-build-javadoc)
6062 (add-before 'check 'disable-failing-test
6063 (lambda _
6064 ;; Disable a failing test
6065 (substitute* "src/test/java/org/apache/commons/lang/\
6066 time/FastDateFormatTest.java"
6067 (("public void testFormat\\(\\)")
6068 "public void disabled_testFormat()"))
6069 #t))
6070 (replace 'install (install-jars "target"))
6071 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6072 (native-inputs
6073 `(("java-junit" ,java-junit)))
6074 (home-page "https://commons.apache.org/lang/")
6075 (synopsis "Extension of the java.lang package")
6076 (description "The Commons Lang components contains a set of Java classes
6077 that provide helper methods for standard Java classes, especially those found
6078 in the @code{java.lang} package in the Sun JDK. The following classes are
6079 included:
6080
6081 @itemize
6082 @item StringUtils - Helper for @code{java.lang.String}.
6083 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6084 of characters such as @code{[a-z]} and @code{[abcdez]}.
6085 @item RandomStringUtils - Helper for creating randomised strings.
6086 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6087 @item NumberRange - A range of numbers with an upper and lower bound.
6088 @item ObjectUtils - Helper for @code{java.lang.Object}.
6089 @item SerializationUtils - Helper for serializing objects.
6090 @item SystemUtils - Utility class defining the Java system properties.
6091 @item NestedException package - A sub-package for the creation of nested
6092 exceptions.
6093 @item Enum package - A sub-package for the creation of enumerated types.
6094 @item Builder package - A sub-package for the creation of @code{equals},
6095 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6096 @end itemize\n")
6097 (license license:asl2.0)))
6098
6099 (define-public java-commons-lang3
6100 (package
6101 (name "java-commons-lang3")
6102 (version "3.9")
6103 (source
6104 (origin
6105 (method url-fetch)
6106 (uri (string-append "mirror://apache/commons/lang/source/"
6107 "commons-lang3-" version "-src.tar.gz"))
6108 (sha256
6109 (base32 "0s4ffbvsyl16c90l45ximsg4dwd8hmz7wsza3p308fw43h6mwhb6"))))
6110 (build-system ant-build-system)
6111 (arguments
6112 `(#:jar-name "commons-lang3.jar"
6113 #:source-dir "src/main/java"
6114 #:tests? #f; require junit5
6115 #:phases
6116 (modify-phases %standard-phases
6117 (replace 'install (install-from-pom "pom.xml")))))
6118 (propagated-inputs
6119 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-48)))
6120 (home-page "https://commons.apache.org/lang/")
6121 (synopsis "Extension of the java.lang package")
6122 (description "The Commons Lang components contains a set of Java classes
6123 that provide helper methods for standard Java classes, especially those found
6124 in the @code{java.lang} package. The following classes are included:
6125
6126 @itemize
6127 @item StringUtils - Helper for @code{java.lang.String}.
6128 @item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6129 characters such as @code{[a-z]} and @code{[abcdez]}.
6130 @item RandomStringUtils - Helper for creating randomised strings.
6131 @item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6132 @item NumberRange - A range of numbers with an upper and lower bound.
6133 @item ObjectUtils - Helper for @code{java.lang.Object}.
6134 @item SerializationUtils - Helper for serializing objects.
6135 @item SystemUtils - Utility class defining the Java system properties.
6136 @item NestedException package - A sub-package for the creation of nested
6137 exceptions.
6138 @item Enum package - A sub-package for the creation of enumerated types.
6139 @item Builder package - A sub-package for the creation of @code{equals},
6140 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6141 @end itemize\n")
6142 (license license:asl2.0)))
6143
6144 (define-public java-commons-bsf
6145 (package
6146 (name "java-commons-bsf")
6147 (version "2.4.0")
6148 (source (origin
6149 (method url-fetch)
6150 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6151 version ".tar.gz"))
6152 (sha256
6153 (base32
6154 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6155 (modules '((guix build utils)))
6156 (snippet
6157 '(begin
6158 (for-each delete-file
6159 (find-files "." "\\.jar$"))
6160 #t))))
6161 (build-system ant-build-system)
6162 (arguments
6163 `(#:build-target "jar"
6164 #:tests? #f; No test file
6165 #:modules ((guix build ant-build-system)
6166 (guix build utils)
6167 (guix build java-utils)
6168 (sxml simple))
6169 #:phases
6170 (modify-phases %standard-phases
6171 (add-before 'build 'create-properties
6172 (lambda _
6173 ;; This file is missing from the distribution
6174 (call-with-output-file "build-properties.xml"
6175 (lambda (port)
6176 (sxml->xml
6177 `(project (@ (basedir ".") (name "build-properties") (default ""))
6178 (property (@ (name "project.name") (value "bsf")))
6179 (property (@ (name "source.level") (value "1.5")))
6180 (property (@ (name "build.lib") (value "build/jar")))
6181 (property (@ (name "src.dir") (value "src")))
6182 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6183 (property (@ (name "build.tests") (value "build/test-classes")))
6184 (property (@ (name "build.dest") (value "build/classes"))))
6185 port)))
6186 #t))
6187 (replace 'install (install-jars "build")))))
6188 (native-inputs
6189 `(("java-junit" ,java-junit)))
6190 (inputs
6191 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
6192 (home-page "https://commons.apache.org/proper/commons-bsf")
6193 (synopsis "Bean Scripting Framework")
6194 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6195 which provides scripting language support within Java applications, and access
6196 to Java objects and methods from scripting languages. BSF allows one to write
6197 JSPs in languages other than Java while providing access to the Java class
6198 library. In addition, BSF permits any Java application to be implemented in
6199 part (or dynamically extended) by a language that is embedded within it. This
6200 is achieved by providing an API that permits calling scripting language engines
6201 from within Java, as well as an object registry that exposes Java objects to
6202 these scripting language engines.")
6203 (license license:asl2.0)))
6204
6205 (define-public java-commons-jxpath
6206 (package
6207 (name "java-commons-jxpath")
6208 (version "1.3")
6209 (source (origin
6210 (method url-fetch)
6211 (uri (string-append "mirror://apache/commons/jxpath/source/"
6212 "commons-jxpath-" version "-src.tar.gz"))
6213 (sha256
6214 (base32
6215 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6216 (build-system ant-build-system)
6217 (arguments
6218 `(#:jar-name "commons-jxpath.jar"
6219 ;; tests require more dependencies, including mockrunner which depends on old software
6220 #:tests? #f
6221 #:source-dir "src/java"))
6222 (inputs
6223 `(("servlet" ,java-classpathx-servletapi)
6224 ("java-jdom" ,java-jdom)
6225 ("java-commons-beanutils" ,java-commons-beanutils)))
6226 (native-inputs
6227 `(("java-junit" ,java-junit)))
6228 (home-page "https://commons.apache.org/jxpath/")
6229 (synopsis "Simple interpreter of an expression language called XPath.")
6230 (description "The org.apache.commons.jxpath package defines a simple
6231 interpreter of an expression language called XPath. JXPath applies XPath
6232 expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6233 contexts, DOM etc, including mixtures thereof.")
6234 (license license:asl2.0)))
6235
6236 (define-public java-commons-pool
6237 (package
6238 (name "java-commons-pool")
6239 (version "2.6.2")
6240 (source (origin
6241 (method url-fetch)
6242 (uri (string-append "mirror://apache/commons/pool/source/"
6243 "commons-pool2-" version "-src.tar.gz"))
6244 (sha256
6245 (base32
6246 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6247 (arguments
6248 `(#:jar-name "common-pool.jar"
6249 #:source-dir "src/main/java"
6250 #:test-exclude
6251 (list "**/PerformanceTest.java")))
6252 (build-system ant-build-system)
6253 (inputs
6254 `(("java-cglib" ,java-cglib)))
6255 (native-inputs
6256 `(("java-junit" ,java-junit)
6257 ("java-hamcrest-core" ,java-hamcrest-core)
6258 ("java-asm" ,java-asm)
6259 ("java-objenesis" ,java-objenesis)))
6260 (home-page "https://commons.apache.org/proper/commons-pool/")
6261 (synopsis "Object-pooling API in Java")
6262 (description "The commons-pool package provides an object-pooling API
6263 and a number of object pool implementations. This package defines a
6264 handful of pooling interfaces and some base classes that may be useful when
6265 creating new pool implementations.")
6266 (license license:asl2.0)))
6267
6268 (define-public java-commons-dbcp
6269 (package
6270 (name "java-commons-dbcp")
6271 (version "2.6.0")
6272 (source (origin
6273 (method url-fetch)
6274 (uri (string-append "mirror://apache/commons/dbcp/source/"
6275 "commons-dbcp2-" version "-src.tar.gz"))
6276 (sha256
6277 (base32
6278 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6279 (arguments
6280 `(#:source-dir "src/main/java"
6281 #:jar-name "java-commons-dbcp.jar"
6282 #:tests? #f)); requires apache-geronimo
6283 (inputs
6284 `(("java-commons-pool" ,java-commons-pool)
6285 ("java-commons-logging" ,java-commons-logging-minimal)
6286 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6287 (native-inputs
6288 `(("java-junit" ,java-junit)))
6289 (build-system ant-build-system)
6290 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6291 (synopsis "Database Connection Pool for Java")
6292 (description "Commons-dbcp allows you to share a pool of database
6293 connections between users. Creating a new connection for each user can be
6294 time consuming and even unfeasible when the number of simultaneous users is
6295 very large. This package provides a way to share a poole of connections to
6296 reduce that load.")
6297 (license license:asl2.0)))
6298
6299 (define-public java-commons-jcs
6300 (package
6301 (name "java-commons-jcs")
6302 (version "2.2.1")
6303 (source (origin
6304 (method url-fetch)
6305 (uri (string-append "mirror://apache/commons/jcs/source/"
6306 "commons-jcs-dist-" version "-src.tar.gz"))
6307 (sha256
6308 (base32
6309 "0syhq2npjbrl0azqfjm0gvash1qd5qjy4qmysxcrqjsk0nf9fa1q"))))
6310 (build-system ant-build-system)
6311 (arguments
6312 `(#:jar-name "commons-jcs.jar"
6313 #:source-dir "commons-jcs-core/src/main/java"
6314 #:test-dir "commons-jcs-core/src/test"
6315 #:tests? #f; requires hsqldb
6316 #:phases
6317 (modify-phases %standard-phases
6318 (add-before 'build 'prepare
6319 (lambda _
6320 (with-directory-excursion
6321 "commons-jcs-core/src/main/java/org/apache/commons/jcs"
6322 (substitute*
6323 "auxiliary/disk/jdbc/dsfactory/SharedPoolDataSourceFactory.java"
6324 (("commons.dbcp") "commons.dbcp2")
6325 ((".*\\.setMaxActive.*") ""))
6326 ;;; Remove dependency on velocity-tools
6327 (delete-file "admin/servlet/JCSAdminServlet.java"))
6328 #t)))))
6329 (propagated-inputs
6330 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
6331 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
6332 ("java-commons-httpclient" ,java-commons-httpclient)
6333 ("java-commons-dbcp" ,java-commons-dbcp)))
6334 (native-inputs
6335 `(("java-junit" ,java-junit)))
6336 (home-page "https://commons.apache.org/proper/commons-jcs/")
6337 (synopsis "Distributed caching system in Java")
6338 (description "JCS is a distributed caching system written in Java. It
6339 is intended to speed up applications by providing a means to manage cached
6340 data of various dynamic natures. Like any caching system, JCS is most useful
6341 for high read, low put applications. Latency times drop sharply and
6342 bottlenecks move away from the database in an effectively cached system.")
6343 (license license:asl2.0)))
6344
6345 (define-public java-jsr250
6346 (package
6347 (name "java-jsr250")
6348 (version "1.3")
6349 (source (origin
6350 (method url-fetch)
6351 (uri (string-append "https://repo1.maven.org/maven2/"
6352 "javax/annotation/javax.annotation-api/"
6353 version "/javax.annotation-api-"
6354 version "-sources.jar"))
6355 (sha256
6356 (base32
6357 "08clh8n4n9wfglf75qsqfjs6yf79f7x6hqx38cn856pksszv50kz"))))
6358 (build-system ant-build-system)
6359 (arguments
6360 `(#:tests? #f ; no tests included
6361 #:jdk ,icedtea-8
6362 #:jar-name "jsr250.jar"
6363 #:modules ((guix build ant-build-system)
6364 (guix build utils)
6365 (guix build maven pom)
6366 (guix build java-utils)
6367 (sxml simple))
6368 #:phases
6369 (modify-phases %standard-phases
6370 (add-before 'install 'create-pom
6371 (lambda _
6372 (with-output-to-file "pom.xml"
6373 (lambda _
6374 (sxml->xml
6375 `((project
6376 (modelVersion "4.0.0")
6377 (name "jsr250")
6378 (groupId "javax.annotation")
6379 (artifactId "jsr250-api")
6380 (version ,,version))))))
6381 #t))
6382 (replace 'install
6383 (install-from-pom "pom.xml")))))
6384 (home-page "https://jcp.org/en/jsr/detail?id=250")
6385 (synopsis "Security-related annotations")
6386 (description "This package provides annotations for security. It provides
6387 packages in the @code{javax.annotation} and @code{javax.annotation.security}
6388 namespaces.")
6389 ;; either cddl or gpl2 only, with classpath exception
6390 (license (list license:cddl1.0
6391 license:gpl2))))
6392
6393 (define-public java-jsr305
6394 (package
6395 (name "java-jsr305")
6396 (version "3.0.1")
6397 (source (origin
6398 (method url-fetch)
6399 (uri (string-append "https://repo1.maven.org/maven2/"
6400 "com/google/code/findbugs/"
6401 "jsr305/" version "/jsr305-"
6402 version "-sources.jar"))
6403 (sha256
6404 (base32
6405 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6406 (build-system ant-build-system)
6407 (arguments
6408 `(#:tests? #f ; no tests included
6409 #:jar-name "jsr305.jar"
6410 #:modules ((guix build ant-build-system)
6411 (guix build java-utils)
6412 (guix build maven pom)
6413 (guix build utils)
6414 (sxml simple))
6415 #:phases
6416 (modify-phases %standard-phases
6417 (add-before 'install 'create-pom
6418 (lambda _
6419 (with-output-to-file "pom.xml"
6420 (lambda _
6421 (sxml->xml
6422 `((project
6423 (modelVersion "4.0.0")
6424 (name "jsr305")
6425 (groupId "com.google.code.findbugs")
6426 (artifactId "jsr305")
6427 (version ,,version))))))
6428 #t))
6429 (replace 'install
6430 (install-from-pom "pom.xml")))))
6431 (home-page "http://findbugs.sourceforge.net/")
6432 (synopsis "Annotations for the static analyzer called findbugs")
6433 (description "This package provides annotations for the findbugs package.
6434 It provides packages in the @code{javax.annotations} namespace.")
6435 (license license:asl2.0)))
6436
6437 (define-public java-guava
6438 (package
6439 (name "java-guava")
6440 ;; This is the last release of Guava that can be built with Java 7.
6441 (version "20.0")
6442 (source (origin
6443 (method git-fetch)
6444 (uri (git-reference
6445 (url "https://github.com/google/guava/")
6446 (commit (string-append "v" version))))
6447 (file-name (git-file-name name version))
6448 (sha256
6449 (base32
6450 "00h5cawdjic1vind3yivzh1f58flvm1yfmhsyqwyvmbvj1vakysp"))))
6451 (build-system ant-build-system)
6452 (arguments
6453 `(#:tests? #f ; no tests included
6454 #:jar-name "guava.jar"
6455 #:source-dir "guava/src"
6456 #:phases
6457 (modify-phases %standard-phases
6458 (add-after 'unpack 'trim-sources
6459 (lambda _
6460 (with-directory-excursion "guava/src/com/google/common"
6461 ;; Remove annotations to avoid extra dependencies:
6462 ;; * "j2objc" annotations are used when converting Java to
6463 ;; Objective C;
6464 ;; * "errorprone" annotations catch common Java mistakes at
6465 ;; compile time;
6466 ;; * "IgnoreJRERequirement" is used for Android.
6467 (substitute* (find-files "." "\\.java$")
6468 (("import com.google.j2objc.*") "")
6469 (("import com.google.errorprone.annotation.*") "")
6470 (("import org.codehaus.mojo.animal_sniffer.*") "")
6471 (("@CanIgnoreReturnValue") "")
6472 (("@LazyInit") "")
6473 (("@WeakOuter") "")
6474 (("@RetainedWith") "")
6475 (("@Weak") "")
6476 (("@ForOverride") "")
6477 (("@J2ObjCIncompatible") "")
6478 (("@IgnoreJRERequirement") "")))
6479 #t))
6480 (replace 'install (install-from-pom "guava/pom.xml")))))
6481 (inputs
6482 `(("java-jsr305" ,java-jsr305)))
6483 (propagated-inputs
6484 `(("java-guava-parent-pom" ,java-guava-parent-pom)))
6485 (home-page "https://github.com/google/guava")
6486 (synopsis "Google core libraries for Java")
6487 (description "Guava is a set of core libraries that includes new
6488 collection types (such as multimap and multiset), immutable collections, a
6489 graph library, functional types, an in-memory cache, and APIs/utilities for
6490 concurrency, I/O, hashing, primitives, reflection, string processing, and much
6491 more!")
6492 (license license:asl2.0)))
6493
6494 (define java-guava-parent-pom
6495 (package
6496 (inherit java-guava)
6497 (name "java-guava-parent-pom")
6498 (arguments
6499 `(#:tests? #f
6500 #:phases
6501 (modify-phases %standard-phases
6502 (delete 'configure)
6503 (delete 'build)
6504 (replace 'install
6505 (install-pom-file "pom.xml")))))
6506 (propagated-inputs
6507 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6508
6509 ;; The java-commons-logging package provides adapters to many different
6510 ;; logging frameworks. To avoid an excessive dependency graph we try to build
6511 ;; it with only a minimal set of adapters.
6512 (define-public java-commons-logging-minimal
6513 (package
6514 (name "java-commons-logging-minimal")
6515 (version "1.2")
6516 (source (origin
6517 (method url-fetch)
6518 (uri (string-append "mirror://apache/commons/logging/source/"
6519 "commons-logging-" version "-src.tar.gz"))
6520 (sha256
6521 (base32
6522 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6523 (build-system ant-build-system)
6524 (arguments
6525 `(#:tests? #f ; avoid dependency on logging frameworks
6526 #:jar-name "commons-logging-minimal.jar"
6527 #:phases
6528 (modify-phases %standard-phases
6529 (add-after 'unpack 'delete-adapters-and-tests
6530 (lambda _
6531 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6532 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6533 ;; is used by applications; SimpleLog is the only actually usable
6534 ;; implementation that does not depend on another logging
6535 ;; framework.
6536 (for-each
6537 (lambda (file)
6538 (delete-file (string-append
6539 "src/main/java/org/apache/commons/logging/impl/" file)))
6540 (list "Jdk13LumberjackLogger.java"
6541 "WeakHashtable.java"
6542 "Log4JLogger.java"
6543 "ServletContextCleaner.java"
6544 "Jdk14Logger.java"
6545 "AvalonLogger.java"
6546 "LogKitLogger.java"))
6547 (delete-file-recursively "src/test")
6548 #t)))))
6549 (home-page "https://commons.apache.org/logging/")
6550 (synopsis "Common API for logging implementations")
6551 (description "The Logging package is a thin bridge between different
6552 logging implementations. A library that uses the commons-logging API can be
6553 used with any logging implementation at runtime.")
6554 (license license:asl2.0)))
6555
6556 ;; This is the last release of the 1.x series.
6557 (define-public java-mockito-1
6558 (package
6559 (name "java-mockito")
6560 (version "1.10.19")
6561 (source (origin
6562 (method url-fetch)
6563 (uri (string-append "http://repo1.maven.org/maven2/"
6564 "org/mockito/mockito-core/" version
6565 "/mockito-core-" version "-sources.jar"))
6566 (sha256
6567 (base32
6568 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6569 (build-system ant-build-system)
6570 (arguments
6571 `(#:jar-name "mockito.jar"
6572 #:tests? #f ; no tests included
6573 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6574 ;; patches in build phases.
6575 #:phases
6576 (modify-phases %standard-phases
6577 ;; Mockito was developed against a different version of hamcrest,
6578 ;; which does not require matcher implementations to provide an
6579 ;; implementation of the "describeMismatch" method. We add this
6580 ;; simple definition to pass the build with our version of hamcrest.
6581 (add-after 'unpack 'fix-hamcrest-build-error
6582 (lambda _
6583 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6584 (("public Matcher getActualMatcher\\(\\) .*" line)
6585 (string-append "
6586 public void describeMismatch(Object item, Description description) {
6587 actualMatcher.describeMismatch(item, description);
6588 }"
6589 line)))
6590 #t))
6591 ;; Mockito bundles cglib. We have a cglib package, so let's use
6592 ;; that instead.
6593 (add-after 'unpack 'use-system-libraries
6594 (lambda _
6595 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6596 (substitute* '("CGLIBHacker.java"
6597 "CglibMockMaker.java"
6598 "ClassImposterizer.java"
6599 "DelegatingMockitoMethodProxy.java"
6600 "MethodInterceptorFilter.java"
6601 "MockitoNamingPolicy.java"
6602 "SerializableMockitoMethodProxy.java"
6603 "SerializableNoOp.java")
6604 (("import org.mockito.cglib") "import net.sf.cglib")))
6605 #t)))))
6606 (inputs
6607 `(("java-junit" ,java-junit)
6608 ("java-objenesis" ,java-objenesis)
6609 ("java-cglib" ,java-cglib)
6610 ("java-hamcrest-core" ,java-hamcrest-core)))
6611 (home-page "http://mockito.org")
6612 (synopsis "Mockito is a mock library for Java")
6613 (description "Mockito is a mocking library for Java which lets you write
6614 tests with a clean and simple API. It generates mocks using reflection, and
6615 it records all mock invocations, including methods arguments.")
6616 (license license:asl2.0)))
6617
6618 (define-public java-httpcomponents-httpcore
6619 (package
6620 (name "java-httpcomponents-httpcore")
6621 (version "4.4.6")
6622 (source (origin
6623 (method url-fetch)
6624 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6625 "source/httpcomponents-core-"
6626 version "-src.tar.gz"))
6627 (sha256
6628 (base32
6629 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6630 (build-system ant-build-system)
6631 (arguments
6632 `(#:jar-name "httpcomponents-httpcore.jar"
6633 #:phases
6634 (modify-phases %standard-phases
6635 (add-after 'unpack 'chdir
6636 (lambda _ (chdir "httpcore") #t)))))
6637 (inputs
6638 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6639 ("java-commons-lang3" ,java-commons-lang3)))
6640 (native-inputs
6641 `(("java-junit" ,java-junit)
6642 ("java-mockito" ,java-mockito-1)))
6643 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6644 (synopsis "Low level HTTP transport components")
6645 (description "HttpCore is a set of low level HTTP transport components
6646 that can be used to build custom client and server side HTTP services with a
6647 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6648 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6649 NIO.
6650
6651 This package provides the blocking I/O model library.")
6652 (license license:asl2.0)))
6653
6654 (define-public java-httpcomponents-httpcore-nio
6655 (package (inherit java-httpcomponents-httpcore)
6656 (name "java-httpcomponents-httpcore-nio")
6657 (arguments
6658 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6659 #:phases
6660 (modify-phases %standard-phases
6661 (add-after 'unpack 'chdir
6662 (lambda _ (chdir "httpcore-nio") #t)))))
6663 (inputs
6664 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6665 ("java-hamcrest-core" ,java-hamcrest-core)
6666 ,@(package-inputs java-httpcomponents-httpcore)))
6667 (description "HttpCore is a set of low level HTTP transport components
6668 that can be used to build custom client and server side HTTP services with a
6669 minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6670 on the classic Java I/O and non-blocking, event driven I/O model based on Java
6671 NIO.
6672
6673 This package provides the non-blocking I/O model library based on Java
6674 NIO.")))
6675
6676 (define-public java-httpcomponents-httpcore-ab
6677 (package (inherit java-httpcomponents-httpcore)
6678 (name "java-httpcomponents-httpcore-ab")
6679 (arguments
6680 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6681 #:phases
6682 (modify-phases %standard-phases
6683 (add-after 'unpack 'chdir
6684 (lambda _ (chdir "httpcore-ab") #t)))))
6685 (inputs
6686 `(("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6687 ("java-commons-cli" ,java-commons-cli)
6688 ("java-hamcrest-core" ,java-hamcrest-core)
6689 ,@(package-inputs java-httpcomponents-httpcore)))
6690 (synopsis "Apache HttpCore benchmarking tool")
6691 (description "This package provides the HttpCore benchmarking tool. It is
6692 an Apache AB clone based on HttpCore.")))
6693
6694 (define-public java-httpcomponents-httpclient
6695 (package
6696 (name "java-httpcomponents-httpclient")
6697 (version "4.5.12")
6698 (source (origin
6699 (method url-fetch)
6700 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6701 "source/httpcomponents-client-"
6702 version "-src.tar.gz"))
6703 (sha256
6704 (base32
6705 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6706 (build-system ant-build-system)
6707 (arguments
6708 `(#:jar-name "httpcomponents-httpclient.jar"
6709 #:phases
6710 (modify-phases %standard-phases
6711 (add-after 'unpack 'chdir
6712 (lambda _ (chdir "httpclient") #t)))))
6713 (inputs
6714 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)
6715 ("java-commons-codec" ,java-commons-codec)
6716 ("java-hamcrest-core" ,java-hamcrest-core)
6717 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6718 ("java-mockito" ,java-mockito-1)
6719 ("java-junit" ,java-junit)))
6720 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6721 (synopsis "HTTP client library for Java")
6722 (description "Although the @code{java.net} package provides basic
6723 functionality for accessing resources via HTTP, it doesn't provide the full
6724 flexibility or functionality needed by many applications. @code{HttpClient}
6725 seeks to fill this void by providing an efficient, up-to-date, and
6726 feature-rich package implementing the client side of the most recent HTTP
6727 standards and recommendations.")
6728 (license license:asl2.0)))
6729
6730 (define-public java-httpcomponents-httpmime
6731 (package (inherit java-httpcomponents-httpclient)
6732 (name "java-httpcomponents-httpmime")
6733 (arguments
6734 `(#:jar-name "httpcomponents-httpmime.jar"
6735 #:phases
6736 (modify-phases %standard-phases
6737 (add-after 'unpack 'chdir
6738 (lambda _ (chdir "httpmime") #t)))))
6739 (inputs
6740 `(("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient)
6741 ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore)
6742 ("java-junit" ,java-junit)
6743 ("java-hamcrest-core" ,java-hamcrest-core)))))
6744
6745 (define-public java-commons-net
6746 (package
6747 (name "java-commons-net")
6748 (version "3.6")
6749 (source (origin
6750 (method url-fetch)
6751 (uri (string-append "mirror://apache/commons/net/source/"
6752 "commons-net-" version "-src.tar.gz"))
6753 (sha256
6754 (base32
6755 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6756 (build-system ant-build-system)
6757 (arguments
6758 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6759 ;; should be "resources/examples/examples.properties"), but gets "null"
6760 ;; instead.
6761 #:tests? #f
6762 #:jar-name "commons-net.jar"))
6763 (native-inputs
6764 `(("java-junit" ,java-junit)
6765 ("java-hamcrest-core" ,java-hamcrest-core)))
6766 (home-page "https://commons.apache.org/net/")
6767 (synopsis "Client library for many basic Internet protocols")
6768 (description "The Apache Commons Net library implements the client side of
6769 many basic Internet protocols. The purpose of the library is to provide
6770 fundamental protocol access, not higher-level abstractions.")
6771 (license license:asl2.0)))
6772
6773 (define-public java-jsch
6774 (package
6775 (name "java-jsch")
6776 (version "0.1.55")
6777 (source (origin
6778 (method url-fetch)
6779 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6780 version "/jsch-" version ".zip"))
6781 (sha256
6782 (base32
6783 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6784 (build-system ant-build-system)
6785 (arguments
6786 `(#:build-target "dist"
6787 #:tests? #f ; no tests included
6788 #:phases
6789 (modify-phases %standard-phases
6790 (replace 'install (install-jars "dist")))))
6791 (native-inputs
6792 `(("unzip" ,unzip)))
6793 (home-page "http://www.jcraft.com/jsch/")
6794 (synopsis "Pure Java implementation of SSH2")
6795 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6796 to connect to an SSH server and use port forwarding, X11 forwarding, file
6797 transfer, etc., and you can integrate its functionality into your own Java
6798 programs.")
6799 (license license:bsd-3)))
6800
6801 (define-public java-commons-compress
6802 (package
6803 (name "java-commons-compress")
6804 (version "1.13")
6805 (source (origin
6806 (method url-fetch)
6807 (uri (string-append "mirror://apache/commons/compress/source/"
6808 "commons-compress-" version "-src.tar.gz"))
6809 (sha256
6810 (base32
6811 "1vjqvavrn0babffn1kciz6v52ibwq2vwhzlb95hazis3lgllnxc8"))))
6812 (build-system ant-build-system)
6813 (arguments
6814 `(#:jar-name "commons-compress.jar"
6815 #:phases
6816 (modify-phases %standard-phases
6817 (add-after 'unpack 'delete-bad-tests
6818 (lambda _
6819 (with-directory-excursion "src/test/java/org/apache/commons/compress/"
6820 ;; FIXME: These tests really should not fail. Maybe they are
6821 ;; indicative of problems with our Java packaging work.
6822
6823 ;; This test fails with a null pointer exception.
6824 (delete-file "archivers/sevenz/SevenZOutputFileTest.java")
6825 ;; This test fails to open test resources.
6826 (delete-file "archivers/zip/ExplodeSupportTest.java")
6827
6828 ;; FIXME: This test adds a dependency on powermock, which is hard to
6829 ;; package at this point.
6830 ;; https://github.com/powermock/powermock
6831 (delete-file "archivers/sevenz/SevenZNativeHeapTest.java"))
6832 #t))
6833 (replace 'install (install-from-pom "pom.xml")))))
6834 (propagated-inputs
6835 `(("java-xz" ,java-xz)
6836 ("apache-commons-parent-pom" ,apache-commons-parent-pom-41)))
6837 (native-inputs
6838 `(("java-junit" ,java-junit)
6839 ("java-mockito" ,java-mockito-1)))
6840 (home-page "https://commons.apache.org/proper/commons-compress/")
6841 (synopsis "Java library for working with compressed files")
6842 (description "The Apache Commons Compress library defines an API for
6843 working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6844 Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6845 (license license:asl2.0)))
6846
6847 (define-public java-commons-csv
6848 (package
6849 (name "java-commons-csv")
6850 (version "1.4")
6851 (source (origin
6852 (method url-fetch)
6853 (uri (string-append "mirror://apache/commons/csv/source/"
6854 "commons-csv-" version "-src.tar.gz"))
6855 (sha256
6856 (base32
6857 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
6858 (build-system ant-build-system)
6859 (arguments
6860 `(#:jar-name "commons-csv.jar"
6861 #:source-dir "src/main/java"
6862 #:tests? #f)); FIXME: requires java-h2
6863 (inputs
6864 `(("java-hamcrest-core" ,java-hamcrest-core)
6865 ("java-commons-io" ,java-commons-io)
6866 ("java-commons-lang3" ,java-commons-lang3)
6867 ("junit" ,java-junit)))
6868 (home-page "https://commons.apache.org/proper/commons-csv/")
6869 (synopsis "Read and write CSV documents")
6870 (description "Commons CSV reads and writes files in variations of the Comma
6871 Separated Value (CSV) format. The most common CSV formats are predefined in the
6872 CSVFormat class:
6873
6874 @itemize
6875 @item Microsoft Excel
6876 @item Informix UNLOAD
6877 @item Informix UNLOAD CSV
6878 @item MySQL
6879 @item RFC 4180
6880 @item TDF
6881 @end itemize
6882
6883 Custom formats can be created using a fluent style API.")
6884 (license license:asl2.0)))
6885
6886 (define-public java-osgi-annotation
6887 (package
6888 (name "java-osgi-annotation")
6889 (version "6.0.0")
6890 (source (origin
6891 (method url-fetch)
6892 (uri (string-append "https://repo1.maven.org/maven2/"
6893 "org/osgi/org.osgi.annotation/" version "/"
6894 "org.osgi.annotation-" version "-sources.jar"))
6895 (sha256
6896 (base32
6897 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
6898 (build-system ant-build-system)
6899 (arguments
6900 `(#:tests? #f ; no tests
6901 #:jar-name "osgi-annotation.jar"))
6902 (home-page "https://www.osgi.org")
6903 (synopsis "Annotation module of OSGi framework")
6904 (description
6905 "OSGi, for Open Services Gateway initiative framework, is a module system
6906 and service platform for the Java programming language. This package contains
6907 the OSGi annotation module, providing additional services to help dynamic
6908 components.")
6909 (license license:asl2.0)))
6910
6911 (define-public java-osgi-core
6912 (package
6913 (name "java-osgi-core")
6914 (version "6.0.0")
6915 (source (origin
6916 (method url-fetch)
6917 (uri (string-append "https://repo1.maven.org/maven2/"
6918 "org/osgi/org.osgi.core/" version "/"
6919 "org.osgi.core-" version "-sources.jar"))
6920 (sha256
6921 (base32
6922 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
6923 (build-system ant-build-system)
6924 (arguments
6925 `(#:tests? #f ; no tests
6926 #:jar-name "osgi-core.jar"))
6927 (inputs
6928 `(("java-osgi-annotation" ,java-osgi-annotation)))
6929 (home-page "https://www.osgi.org")
6930 (synopsis "Core module of OSGi framework")
6931 (description
6932 "OSGi, for Open Services Gateway initiative framework, is a module system
6933 and service platform for the Java programming language. This package contains
6934 the OSGi Core module.")
6935 (license license:asl2.0)))
6936
6937 (define-public java-osgi-service-event
6938 (package
6939 (name "java-osgi-service-event")
6940 (version "1.3.1")
6941 (source (origin
6942 (method url-fetch)
6943 (uri (string-append "https://repo1.maven.org/maven2/"
6944 "org/osgi/org.osgi.service.event/"
6945 version "/org.osgi.service.event-"
6946 version "-sources.jar"))
6947 (sha256
6948 (base32
6949 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
6950 (build-system ant-build-system)
6951 (arguments
6952 `(#:tests? #f ; no tests
6953 #:jar-name "osgi-service-event.jar"))
6954 (inputs
6955 `(("java-osgi-annotation" ,java-osgi-annotation)
6956 ("java-osgi-core" ,java-osgi-core)))
6957 (home-page "https://www.osgi.org")
6958 (synopsis "OSGi service event module")
6959 (description
6960 "OSGi, for Open Services Gateway initiative framework, is a module system
6961 and service platform for the Java programming language. This package contains
6962 the OSGi @code{org.osgi.service.event} module.")
6963 (license license:asl2.0)))
6964
6965 (define-public java-eclipse-osgi
6966 (package
6967 (name "java-eclipse-osgi")
6968 (version "3.11.3")
6969 (source (origin
6970 (method url-fetch)
6971 (uri (string-append "https://repo1.maven.org/maven2/"
6972 "org/eclipse/platform/org.eclipse.osgi/"
6973 version "/org.eclipse.osgi-"
6974 version "-sources.jar"))
6975 (sha256
6976 (base32
6977 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
6978 (build-system ant-build-system)
6979 (arguments
6980 `(#:tests? #f ; no tests included
6981 #:jar-name "eclipse-equinox-osgi.jar"))
6982 (inputs
6983 `(("java-osgi-annotation" ,java-osgi-annotation)))
6984 (home-page "http://www.eclipse.org/equinox/")
6985 (synopsis "Eclipse Equinox OSGi framework")
6986 (description "This package provides an implementation of the OSGi Core
6987 specification.")
6988 (license license:epl1.0)))
6989
6990 (define-public java-eclipse-equinox-common
6991 (package
6992 (name "java-eclipse-equinox-common")
6993 (version "3.10.200")
6994 (source (origin
6995 (method url-fetch)
6996 (uri (string-append "https://repo1.maven.org/maven2/"
6997 "org/eclipse/platform/org.eclipse.equinox.common/"
6998 version "/org.eclipse.equinox.common-"
6999 version "-sources.jar"))
7000 (sha256
7001 (base32
7002 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7003 (build-system ant-build-system)
7004 (arguments
7005 `(#:tests? #f ; no tests included
7006 #:jar-name "eclipse-equinox-common.jar"))
7007 (inputs
7008 `(("java-eclipse-osgi" ,java-eclipse-osgi)))
7009 (home-page "http://www.eclipse.org/equinox/")
7010 (synopsis "Common Eclipse runtime")
7011 (description "This package provides the common Eclipse runtime.")
7012 (license license:epl1.0)))
7013
7014 (define-public java-eclipse-core-jobs
7015 (package
7016 (name "java-eclipse-core-jobs")
7017 (version "3.8.0")
7018 (source (origin
7019 (method url-fetch)
7020 (uri (string-append "https://repo1.maven.org/maven2/"
7021 "org/eclipse/platform/org.eclipse.core.jobs/"
7022 version "/org.eclipse.core.jobs-"
7023 version "-sources.jar"))
7024 (sha256
7025 (base32
7026 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7027 (build-system ant-build-system)
7028 (arguments
7029 `(#:tests? #f ; no tests included
7030 #:jar-name "eclipse-core-jobs.jar"))
7031 (inputs
7032 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7033 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7034 (home-page "http://www.eclipse.org/equinox/")
7035 (synopsis "Eclipse jobs mechanism")
7036 (description "This package provides the Eclipse jobs mechanism.")
7037 (license license:epl1.0)))
7038
7039 (define-public java-eclipse-equinox-registry
7040 (package
7041 (name "java-eclipse-equinox-registry")
7042 (version "3.6.100")
7043 (source (origin
7044 (method url-fetch)
7045 (uri (string-append "https://repo1.maven.org/maven2/"
7046 "org/eclipse/platform/org.eclipse.equinox.registry/"
7047 version "/org.eclipse.equinox.registry-"
7048 version "-sources.jar"))
7049 (sha256
7050 (base32
7051 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7052 (build-system ant-build-system)
7053 (arguments
7054 `(#:tests? #f ; no tests included
7055 #:jar-name "eclipse-equinox-registry.jar"))
7056 (inputs
7057 `(("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7058 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7059 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7060 (home-page "http://www.eclipse.org/equinox/")
7061 (synopsis "Eclipse extension registry support")
7062 (description "This package provides support for the Eclipse extension
7063 registry.")
7064 (license license:epl1.0)))
7065
7066 (define-public java-eclipse-equinox-app
7067 (package
7068 (name "java-eclipse-equinox-app")
7069 (version "1.3.400")
7070 (source (origin
7071 (method url-fetch)
7072 (uri (string-append "https://repo1.maven.org/maven2/"
7073 "org/eclipse/platform/org.eclipse.equinox.app/"
7074 version "/org.eclipse.equinox.app-"
7075 version "-sources.jar"))
7076 (sha256
7077 (base32
7078 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7079 (build-system ant-build-system)
7080 (arguments
7081 `(#:tests? #f ; no tests included
7082 #:jar-name "eclipse-equinox-app.jar"))
7083 (inputs
7084 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7085 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7086 ("java-eclipse-osgi" ,java-eclipse-osgi)
7087 ("java-osgi-service-event" ,java-osgi-service-event)))
7088 (home-page "http://www.eclipse.org/equinox/")
7089 (synopsis "Equinox application container")
7090 (description "This package provides the Equinox application container for
7091 Eclipse.")
7092 (license license:epl1.0)))
7093
7094 (define-public java-eclipse-equinox-preferences
7095 (package
7096 (name "java-eclipse-equinox-preferences")
7097 (version "3.6.1")
7098 (source (origin
7099 (method url-fetch)
7100 (uri (string-append "https://repo1.maven.org/maven2/"
7101 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7102 version "/org.eclipse.equinox.preferences-"
7103 version "-sources.jar"))
7104 (sha256
7105 (base32
7106 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7107 (build-system ant-build-system)
7108 (arguments
7109 `(#:tests? #f ; no tests included
7110 #:jar-name "eclipse-equinox-preferences.jar"))
7111 (inputs
7112 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7113 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7114 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7115 (home-page "http://www.eclipse.org/equinox/")
7116 (synopsis "Eclipse preferences mechanism")
7117 (description "This package provides the Eclipse preferences mechanism with
7118 the module @code{org.eclipse.equinox.preferences}.")
7119 (license license:epl1.0)))
7120
7121 (define-public java-eclipse-core-contenttype
7122 (package
7123 (name "java-eclipse-core-contenttype")
7124 (version "3.5.100")
7125 (source (origin
7126 (method url-fetch)
7127 (uri (string-append "https://repo1.maven.org/maven2/"
7128 "org/eclipse/platform/org.eclipse.core.contenttype/"
7129 version "/org.eclipse.core.contenttype-"
7130 version "-sources.jar"))
7131 (sha256
7132 (base32
7133 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7134 (build-system ant-build-system)
7135 (arguments
7136 `(#:tests? #f ; no tests included
7137 #:jar-name "eclipse-core-contenttype.jar"))
7138 (inputs
7139 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7140 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7141 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7142 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7143 (home-page "http://www.eclipse.org/")
7144 (synopsis "Eclipse content mechanism")
7145 (description "This package provides the Eclipse content mechanism in the
7146 @code{org.eclipse.core.contenttype} module.")
7147 (license license:epl1.0)))
7148
7149 (define-public java-eclipse-core-runtime
7150 (package
7151 (name "java-eclipse-core-runtime")
7152 (version "3.15.100")
7153 (source (origin
7154 (method url-fetch)
7155 (uri (string-append "https://repo1.maven.org/maven2/"
7156 "org/eclipse/platform/org.eclipse.core.runtime/"
7157 version "/org.eclipse.core.runtime-"
7158 version "-sources.jar"))
7159 (sha256
7160 (base32
7161 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7162 (build-system ant-build-system)
7163 (arguments
7164 `(#:tests? #f ; no tests included
7165 #:jar-name "eclipse-core-runtime.jar"))
7166 (inputs
7167 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7168 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7169 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7170 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7171 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7172 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7173 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7174 (home-page "https://www.eclipse.org/")
7175 (synopsis "Eclipse core runtime")
7176 (description "This package provides the Eclipse core runtime with the
7177 module @code{org.eclipse.core.runtime}.")
7178 (license license:epl1.0)))
7179
7180 (define-public java-eclipse-core-filesystem
7181 (package
7182 (name "java-eclipse-core-filesystem")
7183 (version "1.6.1")
7184 (source (origin
7185 (method url-fetch)
7186 (uri (string-append "https://repo1.maven.org/maven2/"
7187 "org/eclipse/platform/org.eclipse.core.filesystem/"
7188 version "/org.eclipse.core.filesystem-"
7189 version "-sources.jar"))
7190 (sha256
7191 (base32
7192 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7193 (build-system ant-build-system)
7194 (arguments
7195 `(#:tests? #f ; no tests included
7196 #:jar-name "eclipse-core-filesystem.jar"))
7197 (inputs
7198 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7199 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7200 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7201 (home-page "https://www.eclipse.org/")
7202 (synopsis "Eclipse core file system")
7203 (description "This package provides the Eclipse core file system with the
7204 module @code{org.eclipse.core.filesystem}.")
7205 (license license:epl1.0)))
7206
7207 (define-public java-eclipse-core-expressions
7208 (package
7209 (name "java-eclipse-core-expressions")
7210 (version "3.5.100")
7211 (source (origin
7212 (method url-fetch)
7213 (uri (string-append "https://repo1.maven.org/maven2/"
7214 "org/eclipse/platform/org.eclipse.core.expressions/"
7215 version "/org.eclipse.core.expressions-"
7216 version "-sources.jar"))
7217 (sha256
7218 (base32
7219 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7220 (build-system ant-build-system)
7221 (arguments
7222 `(#:tests? #f ; no tests included
7223 #:jar-name "eclipse-core-expressions.jar"))
7224 (inputs
7225 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7226 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7227 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7228 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7229 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7230 (home-page "https://www.eclipse.org/")
7231 (synopsis "Eclipse core expression language")
7232 (description "This package provides the Eclipse core expression language
7233 with the @code{org.eclipse.core.expressions} module.")
7234 (license license:epl1.0)))
7235
7236 (define-public java-eclipse-core-variables
7237 (package
7238 (name "java-eclipse-core-variables")
7239 (version "3.3.0")
7240 (source (origin
7241 (method url-fetch)
7242 (uri (string-append "https://repo1.maven.org/maven2/"
7243 "org/eclipse/platform/org.eclipse.core.variables/"
7244 version "/org.eclipse.core.variables-"
7245 version "-sources.jar"))
7246 (sha256
7247 (base32
7248 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7249 (build-system ant-build-system)
7250 (arguments
7251 `(#:tests? #f ; no tests included
7252 #:jar-name "eclipse-core-variables.jar"))
7253 (inputs
7254 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7255 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7256 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7257 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7258 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7259 (home-page "https://www.eclipse.org/platform")
7260 (synopsis "Eclipse core variables")
7261 (description "This package provides the Eclipse core variables module
7262 @code{org.eclipse.core.variables}.")
7263 (license license:epl1.0)))
7264
7265 (define-public java-eclipse-ant-core
7266 (package
7267 (name "java-eclipse-ant-core")
7268 (version "3.4.100")
7269 (source (origin
7270 (method url-fetch)
7271 (uri (string-append "https://repo1.maven.org/maven2/"
7272 "org/eclipse/platform/org.eclipse.ant.core/"
7273 version "/org.eclipse.ant.core-"
7274 version "-sources.jar"))
7275 (sha256
7276 (base32
7277 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7278 (build-system ant-build-system)
7279 (arguments
7280 `(#:tests? #f ; no tests included
7281 #:jar-name "eclipse-ant-core.jar"))
7282 (inputs
7283 `(("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7284 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7285 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7286 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7287 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7288 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7289 ("java-eclipse-core-variables" ,java-eclipse-core-variables)
7290 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7291 (home-page "https://www.eclipse.org/platform")
7292 (synopsis "Ant build tool core libraries")
7293 (description "This package provides the ant build tool core libraries with
7294 the module @code{org.eclipse.ant.core}.")
7295 (license license:epl1.0)))
7296
7297 (define-public java-eclipse-core-resources
7298 (package
7299 (name "java-eclipse-core-resources")
7300 (version "3.13.200")
7301 (source (origin
7302 (method url-fetch)
7303 (uri (string-append "https://repo1.maven.org/maven2/"
7304 "org/eclipse/platform/org.eclipse.core.resources/"
7305 version "/org.eclipse.core.resources-"
7306 version "-sources.jar"))
7307 (sha256
7308 (base32
7309 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7310 (build-system ant-build-system)
7311 (arguments
7312 `(#:tests? #f ; no tests included
7313 #:jar-name "eclipse-core-resources.jar"))
7314 (inputs
7315 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7316 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7317 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7318 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7319 ("java-eclipse-core-expressions" ,java-eclipse-core-expressions)
7320 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7321 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7322 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7323 ("java-eclipse-ant-core" ,java-eclipse-ant-core)
7324 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7325 (home-page "https://www.eclipse.org/")
7326 (synopsis "Eclipse core resource management")
7327 (description "This package provides the Eclipse core resource management
7328 module @code{org.eclipse.core.resources}.")
7329 (license license:epl1.0)))
7330
7331 (define-public java-eclipse-compare-core
7332 (package
7333 (name "java-eclipse-compare-core")
7334 (version "3.6.0")
7335 (source (origin
7336 (method url-fetch)
7337 (uri (string-append "https://repo1.maven.org/maven2/"
7338 "org/eclipse/platform/org.eclipse.compare.core/"
7339 version "/org.eclipse.compare.core-"
7340 version "-sources.jar"))
7341 (sha256
7342 (base32
7343 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7344 (build-system ant-build-system)
7345 (arguments
7346 `(#:tests? #f ; no tests included
7347 #:jar-name "eclipse-compare-core.jar"))
7348 (inputs
7349 `(("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7350 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7351 ("java-eclipse-osgi" ,java-eclipse-osgi)
7352 ("java-icu4j" ,java-icu4j)))
7353 (home-page "https://www.eclipse.org/")
7354 (synopsis "Eclipse core compare support")
7355 (description "This package provides the Eclipse core compare support
7356 module @code{org.eclipse.compare.core}.")
7357 (license license:epl1.0)))
7358
7359 (define-public java-eclipse-team-core
7360 (package
7361 (name "java-eclipse-team-core")
7362 (version "3.8.0")
7363 (source (origin
7364 (method url-fetch)
7365 (uri (string-append "https://repo1.maven.org/maven2/"
7366 "org/eclipse/platform/org.eclipse.team.core/"
7367 version "/org.eclipse.team.core-"
7368 version "-sources.jar"))
7369 (sha256
7370 (base32
7371 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7372 (build-system ant-build-system)
7373 (arguments
7374 `(#:tests? #f ; no tests included
7375 #:jar-name "eclipse-team-core.jar"))
7376 (inputs
7377 `(("java-eclipse-compare-core" ,java-eclipse-compare-core)
7378 ("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7379 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7380 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7381 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7382 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7383 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7384 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7385 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7386 ("java-eclipse-osgi" ,java-eclipse-osgi)))
7387 (home-page "https://www.eclipse.org/platform")
7388 (synopsis "Eclipse team support core")
7389 (description "This package provides the Eclipse team support core module
7390 @code{org.eclipse.team.core}.")
7391 (license license:epl1.0)))
7392
7393 (define-public java-eclipse-core-commands
7394 (package
7395 (name "java-eclipse-core-commands")
7396 (version "3.8.1")
7397 (source (origin
7398 (method url-fetch)
7399 (uri (string-append "https://repo1.maven.org/maven2/"
7400 "org/eclipse/platform/org.eclipse.core.commands/"
7401 version "/org.eclipse.core.commands-"
7402 version "-sources.jar"))
7403 (sha256
7404 (base32
7405 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7406 (build-system ant-build-system)
7407 (arguments
7408 `(#:tests? #f ; no tests included
7409 #:jar-name "eclipse-core-commands.jar"))
7410 (inputs
7411 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)))
7412 (home-page "https://www.eclipse.org/platform")
7413 (synopsis "Eclipse core commands")
7414 (description "This package provides Eclipse core commands in the module
7415 @code{org.eclipse.core.commands}.")
7416 (license license:epl1.0)))
7417
7418 (define-public java-eclipse-text
7419 (package
7420 (name "java-eclipse-text")
7421 (version "3.6.0")
7422 (source (origin
7423 (method url-fetch)
7424 (uri (string-append "https://repo1.maven.org/maven2/"
7425 "org/eclipse/platform/org.eclipse.text/"
7426 version "/org.eclipse.text-"
7427 version "-sources.jar"))
7428 (sha256
7429 (base32
7430 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7431 (build-system ant-build-system)
7432 (arguments
7433 `(#:tests? #f ; no tests included
7434 #:jar-name "eclipse-text.jar"
7435 #:phases
7436 (modify-phases %standard-phases
7437 ;; When creating a new category we must make sure that the new list
7438 ;; matches List<Position>. By default it seems to be too generic
7439 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7440 ;; Without this we get this error:
7441 ;;
7442 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7443 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7444 ;; [javac] fPositions.put(category, new ArrayList<>());
7445 ;; [javac] ^
7446 ;; [javac] required: String,List<Position>
7447 ;; [javac] found: String,ArrayList<Object>
7448 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7449 ;; to List<Position> by method invocation conversion
7450 ;; [javac] where K,V are type-variables:
7451 ;; [javac] K extends Object declared in interface Map
7452 ;; [javac] V extends Object declared in interface Map
7453 ;;
7454 ;; I don't know if this is a good fix. I suspect it is not, but it
7455 ;; seems to work.
7456 (add-after 'unpack 'fix-compilation-error
7457 (lambda _
7458 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7459 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7460 "Positions.put(category, new ArrayList<Position>());"))
7461 #t)))))
7462 (inputs
7463 `(("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7464 ("java-eclipse-core-commands" ,java-eclipse-core-commands)
7465 ("java-icu4j" ,java-icu4j)))
7466 (home-page "http://www.eclipse.org/platform")
7467 (synopsis "Eclipse text library")
7468 (description "Platform Text is part of the Platform UI project and
7469 provides the basic building blocks for text and text editors within Eclipse
7470 and contributes the Eclipse default text editor.")
7471 (license license:epl1.0)))
7472
7473 (define-public java-eclipse-jdt-core
7474 (package
7475 (name "java-eclipse-jdt-core")
7476 (version "3.16.0")
7477 (source (origin
7478 (method url-fetch)
7479 (uri (string-append "https://repo1.maven.org/maven2/"
7480 "org/eclipse/jdt/org.eclipse.jdt.core/"
7481 version "/org.eclipse.jdt.core-"
7482 version "-sources.jar"))
7483 (sha256
7484 (base32
7485 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7486 (build-system ant-build-system)
7487 (arguments
7488 `(#:tests? #f ; no tests included
7489 #:jar-name "eclipse-jdt-core.jar"
7490 #:phases
7491 (modify-phases %standard-phases
7492 (add-after 'unpack 'move-sources
7493 (lambda _
7494 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7495 (for-each (lambda (file)
7496 (install-file file (string-append "../" (dirname file))))
7497 (find-files "." ".*")))
7498 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7499 #t))
7500 (add-before 'build 'copy-resources
7501 (lambda _
7502 (with-directory-excursion "src"
7503 (for-each (lambda (file)
7504 (install-file file (string-append "../build/classes/" (dirname file))))
7505 (find-files "." ".*.(props|properties|rsc)")))
7506 #t)))))
7507 (inputs
7508 `(("java-eclipse-core-contenttype" ,java-eclipse-core-contenttype)
7509 ("java-eclipse-core-filesystem" ,java-eclipse-core-filesystem)
7510 ("java-eclipse-core-jobs" ,java-eclipse-core-jobs)
7511 ("java-eclipse-core-resources" ,java-eclipse-core-resources)
7512 ("java-eclipse-core-runtime" ,java-eclipse-core-runtime)
7513 ("java-eclipse-equinox-app" ,java-eclipse-equinox-app)
7514 ("java-eclipse-equinox-common" ,java-eclipse-equinox-common)
7515 ("java-eclipse-equinox-preferences" ,java-eclipse-equinox-preferences)
7516 ("java-eclipse-equinox-registry" ,java-eclipse-equinox-registry)
7517 ("java-eclipse-osgi" ,java-eclipse-osgi)
7518 ("java-eclipse-text" ,java-eclipse-text)))
7519 (home-page "https://www.eclipse.org/jdt")
7520 (synopsis "Java development tools core libraries")
7521 (description "This package provides the core libraries of the Eclipse Java
7522 development tools.")
7523 (license license:epl1.0)))
7524
7525 (define-public java-eclipse-jdt-compiler-apt
7526 (package
7527 (name "java-eclipse-jdt-compiler-apt")
7528 (version "1.3.400")
7529 (source (origin
7530 (method url-fetch)
7531 (uri (string-append "https://repo1.maven.org/maven2/"
7532 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7533 version "/org.eclipse.jdt.compiler.apt-"
7534 version "-sources.jar"))
7535 (sha256
7536 (base32
7537 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7538 (build-system ant-build-system)
7539 (arguments
7540 `(#:tests? #f ; no tests included
7541 #:jar-name "eclipse-jdt-compiler-apt.jar"
7542 #:jdk ,openjdk11))
7543 (inputs
7544 `(("java-eclipse-jdt-core" ,java-eclipse-jdt-core)))
7545 (home-page "https://www.eclipse.org/jdt/apt/")
7546 (synopsis "Annotation processing tool")
7547 (description "APT stands for Annotation Processing Tool. APT provides a
7548 means for generating files and compiling new Java classes based on annotations
7549 found in your source code.")
7550 (license license:epl2.0)))
7551
7552 (define-public java-javax-mail
7553 (package
7554 (name "java-javax-mail")
7555 (version "1.5.6")
7556 (source (origin
7557 (method url-fetch)
7558 (uri (string-append "https://repo1.maven.org/maven2/"
7559 "com/sun/mail/javax.mail/"
7560 version "/javax.mail-"
7561 version "-sources.jar"))
7562 (sha256
7563 (base32
7564 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7565 (build-system ant-build-system)
7566 (arguments
7567 `(#:tests? #f ; no tests
7568 #:jar-name "javax-mail.jar"))
7569 (home-page "https://javamail.java.net")
7570 (synopsis "Reference implementation of the JavaMail API")
7571 (description
7572 "This package provides versions of the JavaMail API implementation, IMAP,
7573 SMTP, and POP3 service providers, some examples, and documentation for the
7574 JavaMail API.")
7575 ;; GPLv2 only with "classpath exception".
7576 (license license:gpl2)))
7577
7578 (define-public java-log4j-api
7579 (package
7580 (name "java-log4j-api")
7581 (version "2.4.1")
7582 (source (origin
7583 (method url-fetch)
7584 (uri (string-append "mirror://apache/logging/log4j/" version
7585 "/apache-log4j-" version "-src.tar.gz"))
7586 (sha256
7587 (base32
7588 "0j5p9gik0jysh37nlrckqbky12isy95cpwg2gv5fas1rcdqbraxd"))))
7589 (build-system ant-build-system)
7590 (arguments
7591 `(#:tests? #f ; tests require unpackaged software
7592 #:jar-name "log4j-api.jar"
7593 #:make-flags
7594 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7595 "/share/java"))
7596 #:phases
7597 (modify-phases %standard-phases
7598 (add-after 'unpack 'enter-dir
7599 (lambda _ (chdir "log4j-api") #t))
7600 ;; FIXME: The tests require additional software that has not been
7601 ;; packaged yet, such as
7602 ;; * org.apache.maven
7603 ;; * org.apache.felix
7604 (add-after 'enter-dir 'delete-tests
7605 (lambda _ (delete-file-recursively "src/test") #t)))))
7606 (inputs
7607 `(("java-osgi-core" ,java-osgi-core)
7608 ("java-hamcrest-core" ,java-hamcrest-core)
7609 ("java-junit" ,java-junit)))
7610 (home-page "https://logging.apache.org/log4j/2.x/")
7611 (synopsis "API module of the Log4j logging framework for Java")
7612 (description
7613 "This package provides the API module of the Log4j logging framework for
7614 Java.")
7615 (license license:asl2.0)))
7616
7617 (define-public java-log4j-core
7618 (package
7619 (inherit java-log4j-api)
7620 (name "java-log4j-core")
7621 (inputs
7622 `(("java-osgi-core" ,java-osgi-core)
7623 ("java-hamcrest-core" ,java-hamcrest-core)
7624 ("java-log4j-api" ,java-log4j-api)
7625 ("java-mail" ,java-mail)
7626 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7627 ("java-lmax-disruptor" ,java-lmax-disruptor)
7628 ("java-kafka" ,java-kafka-clients)
7629 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7630 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7631 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7632 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7633 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7634 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7635 ("java-commons-compress" ,java-commons-compress)
7636 ("java-commons-csv" ,java-commons-csv)
7637 ("java-jeromq" ,java-jeromq)
7638 ("java-junit" ,java-junit)))
7639 (native-inputs
7640 `(("hamcrest" ,java-hamcrest-all)
7641 ("java-commons-io" ,java-commons-io)
7642 ("java-commons-lang3" ,java-commons-lang3)
7643 ("slf4j" ,java-slf4j-api)))
7644 (arguments
7645 `(#:tests? #f ; tests require more dependencies
7646 #:test-dir "src/test"
7647 #:source-dir "src/main/java"
7648 #:jar-name "log4j-core.jar"
7649 #:jdk ,icedtea-8
7650 #:make-flags
7651 (list (string-append "-Ddist.dir=" (assoc-ref %outputs "out")
7652 "/share/java"))
7653 #:phases
7654 (modify-phases %standard-phases
7655 (add-after 'unpack 'enter-dir
7656 (lambda _ (chdir "log4j-core") #t)))))
7657 (synopsis "Core component of the Log4j framework")
7658 (description "This package provides the core component of the Log4j
7659 logging framework for Java.")))
7660
7661 (define-public java-log4j-1.2-api
7662 (package
7663 (inherit java-log4j-api)
7664 (name "java-log4j-1.2-api")
7665 (arguments
7666 `(#:jar-name "java-log4j-1.2-api.jar"
7667 #:source-dir "log4j-1.2-api/src/main/java"
7668 #:jdk ,icedtea-8
7669 ;; Tests require maven-model (and other maven subprojects), which is a
7670 ;; cyclic dependency.
7671 #:tests? #f))
7672 (inputs
7673 `(("log4j-api" ,java-log4j-api)
7674 ("log4j-core" ,java-log4j-core)
7675 ("osgi-core" ,java-osgi-core)
7676 ("eclipse-osgi" ,java-eclipse-osgi)
7677 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7678
7679 (define-public java-commons-cli
7680 (package
7681 (name "java-commons-cli")
7682 (version "1.4")
7683 (source (origin
7684 (method url-fetch)
7685 (uri (string-append "mirror://apache/commons/cli/source/"
7686 "commons-cli-" version "-src.tar.gz"))
7687 (sha256
7688 (base32
7689 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7690 (build-system ant-build-system)
7691 ;; TODO: javadoc
7692 (arguments
7693 `(#:jar-name "commons-cli.jar"
7694 #:phases
7695 (modify-phases %standard-phases
7696 (replace 'install
7697 (install-from-pom "pom.xml")))))
7698 (native-inputs
7699 `(("java-junit" ,java-junit)
7700 ("java-hamcrest-core" ,java-hamcrest-core)))
7701 (home-page "https://commons.apache.org/cli/")
7702 (synopsis "Command line arguments and options parsing library")
7703 (description "The Apache Commons CLI library provides an API for parsing
7704 command line options passed to programs. It is also able to print help
7705 messages detailing the options available for a command line tool.
7706
7707 Commons CLI supports different types of options:
7708
7709 @itemize
7710 @item POSIX like options (ie. tar -zxvf foo.tar.gz)
7711 @item GNU like long options (ie. du --human-readable --max-depth=1)
7712 @item Java like properties (ie. java -Djava.awt.headless=true Foo)
7713 @item Short options with value attached (ie. gcc -O2 foo.c)
7714 @item long options with single hyphen (ie. ant -projecthelp)
7715 @end itemize
7716
7717 This is a part of the Apache Commons Project.")
7718 (license license:asl2.0)))
7719
7720 (define-public java-commons-codec
7721 (package
7722 (name "java-commons-codec")
7723 (version "1.14")
7724 (source (origin
7725 (method url-fetch)
7726 (uri (string-append "mirror://apache/commons/codec/source/"
7727 "commons-codec-" version "-src.tar.gz"))
7728 (sha256
7729 (base32
7730 "11xr0agckkhm91pb5akf2mbk84yd54gyr178wj57gsm97fi7nkh9"))))
7731 (build-system ant-build-system)
7732 (arguments
7733 `(#:jar-name "java-commons-codec.jar"
7734 #:source-dir "src/main/java"
7735 #:test-dir "src/test"
7736 #:test-exclude (list "**/*AbstractTest.java")
7737 #:phases
7738 (modify-phases %standard-phases
7739 (add-before 'build 'copy-resources
7740 (lambda _
7741 (copy-recursively "src/main/resources"
7742 "build/classes")
7743 #t))
7744 (add-before 'check 'copy-test-resources
7745 (lambda _
7746 (copy-recursively "src/test/resources"
7747 "build/test-classes")
7748 #t))
7749 (replace 'install (install-from-pom "pom.xml")))))
7750 (native-inputs
7751 `(("java-commons-lang3" ,java-commons-lang3)
7752 ("java-junit" ,java-junit)))
7753 (propagated-inputs
7754 `(("apache-commons-parent-pom" ,apache-commons-parent-pom-50)))
7755 (home-page "https://commons.apache.org/codec/")
7756 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
7757 (description "The codec package contains simple encoder and decoders for
7758 various formats such as Base64 and Hexadecimal. In addition to these widely
7759 used encoders and decoders, the codec package also maintains a collection of
7760 phonetic encoding utilities.
7761
7762 This is a part of the Apache Commons Project.")
7763 (license license:asl2.0)))
7764
7765 (define-public java-commons-daemon
7766 (package
7767 (name "java-commons-daemon")
7768 (version "1.1.0")
7769 (source (origin
7770 (method url-fetch)
7771 (uri (string-append "mirror://apache/commons/daemon/source/"
7772 "commons-daemon-" version "-src.tar.gz"))
7773 (sha256
7774 (base32
7775 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
7776 (build-system ant-build-system)
7777 (arguments
7778 `(#:test-target "test"
7779 #:phases
7780 (modify-phases %standard-phases
7781 (add-after 'build 'build-javadoc ant-build-javadoc)
7782 (replace 'install (install-jars "dist"))
7783 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
7784 (native-inputs
7785 `(("java-junit" ,java-junit)))
7786 (home-page "https://commons.apache.org/daemon/")
7787 (synopsis "Library to launch Java applications as daemons")
7788 (description "The Daemon package from Apache Commons can be used to
7789 implement Java applications which can be launched as daemons. For example the
7790 program will be notified about a shutdown so that it can perform cleanup tasks
7791 before its process of execution is destroyed by the operation system.
7792
7793 This package contains the Java library. You will also need the actual binary
7794 for your architecture which is provided by the jsvc package.
7795
7796 This is a part of the Apache Commons Project.")
7797 (license license:asl2.0)))
7798
7799 (define-public java-javaewah
7800 (package
7801 (name "java-javaewah")
7802 (version "1.1.6")
7803 (source (origin
7804 (method git-fetch)
7805 (uri (git-reference
7806 (url "https://github.com/lemire/javaewah/")
7807 (commit (string-append "JavaEWAH-" version))))
7808 (file-name (git-file-name name version))
7809 (sha256
7810 (base32
7811 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
7812 (build-system ant-build-system)
7813 (arguments `(#:jar-name "javaewah.jar"))
7814 (inputs
7815 `(("java-junit" ,java-junit)
7816 ("java-hamcrest-core" ,java-hamcrest-core)))
7817 (home-page "https://github.com/lemire/javaewah")
7818 (synopsis "Compressed alternative to the Java @code{BitSet} class")
7819 (description "This is a word-aligned compressed variant of the Java
7820 @code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
7821 compression scheme. It can be used to implement bitmap indexes.
7822
7823 The goal of word-aligned compression is not to achieve the best compression,
7824 but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
7825 cycles, maybe at the expense of storage. However, the EWAH scheme is always
7826 more efficient storage-wise than an uncompressed bitmap (as implemented in the
7827 @code{BitSet} class by Sun).")
7828 ;; GPL2.0 derivates are explicitly allowed.
7829 (license license:asl2.0)))
7830
7831 (define-public java-slf4j-api
7832 (package
7833 (name "java-slf4j-api")
7834 (version "1.7.25")
7835 (source (origin
7836 (method url-fetch)
7837 (uri (string-append "https://www.slf4j.org/dist/slf4j-"
7838 version ".tar.gz"))
7839 (sha256
7840 (base32
7841 "13j51sgzmhhdrfa74gkal5zpip7r1440dh7zsi2c8bpb2zs1v8kb"))
7842 (modules '((guix build utils)))
7843 ;; Delete bundled jars.
7844 (snippet
7845 '(begin
7846 (for-each delete-file (find-files "." "\\.jar$"))
7847 #t))))
7848 (build-system ant-build-system)
7849 (arguments
7850 `(#:jar-name "slf4j-api.jar"
7851 #:source-dir "slf4j-api/src/main"
7852 #:test-dir "slf4j-api/src/test"
7853 #:phases
7854 (modify-phases %standard-phases
7855 (add-after 'build 'regenerate-jar
7856 (lambda _
7857 ;; pom.xml ignores these files in the jar creation process. If we don't,
7858 ;; we get the error "This code should have never made it into slf4j-api.jar"
7859 (delete-file-recursively "build/classes/org/slf4j/impl")
7860 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
7861 "build/classes" ".")))
7862 (add-before 'check 'dont-test-abstract-classes
7863 (lambda _
7864 ;; abstract classes are not meant to be run with junit
7865 (substitute* "build.xml"
7866 (("<include name=\"\\*\\*/\\*Test.java\" />")
7867 (string-append "<include name=\"**/*Test.java\" />"
7868 "<exclude name=\"**/MultithreadedInitializationTest"
7869 ".java\" />")))
7870 #t))
7871 (replace 'install
7872 (install-from-pom "slf4j-api/pom.xml")))))
7873 (propagated-inputs
7874 `(("java-slf4j-parent" ,java-slf4j-parent)))
7875 (native-inputs
7876 `(("java-junit" ,java-junit)
7877 ("java-hamcrest-core" ,java-hamcrest-core)))
7878 (home-page "https://www.slf4j.org/")
7879 (synopsis "Simple logging facade for Java")
7880 (description "The Simple Logging Facade for Java (SLF4J) serves as a
7881 simple facade or abstraction for various logging
7882 frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
7883 allowing the end user to plug in the desired logging framework at deployment
7884 time.")
7885 (license license:expat)))
7886
7887 (define java-slf4j-parent
7888 (package
7889 (inherit java-slf4j-api)
7890 (name "java-slf4j-parent")
7891 (native-inputs `())
7892 (propagated-inputs '())
7893 (arguments
7894 `(#:tests? #f
7895 #:phases
7896 (modify-phases %standard-phases
7897 (delete 'build)
7898 (delete 'configure)
7899 (replace 'install
7900 (install-pom-file "pom.xml")))))))
7901
7902 (define-public java-slf4j-simple
7903 (package
7904 (name "java-slf4j-simple")
7905 (version "1.7.25")
7906 (source (package-source java-slf4j-api))
7907 (build-system ant-build-system)
7908 (arguments
7909 `(#:jar-name "slf4j-simple.jar"
7910 #:source-dir "slf4j-simple/src/main"
7911 #:test-dir "slf4j-simple/src/test"
7912 #:phases
7913 (modify-phases %standard-phases
7914 ;; The tests need some test classes from slf4j-api
7915 (add-before 'check 'build-slf4j-api-test-helpers
7916 (lambda _
7917 ;; Add current dir to CLASSPATH ...
7918 (setenv "CLASSPATH"
7919 (string-append (getcwd) ":" (getenv "CLASSPATH")))
7920 ;; ... and build test helper classes here:
7921 (apply invoke
7922 `("javac" "-d" "."
7923 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
7924 (replace 'install
7925 (install-from-pom "slf4j-simple/pom.xml")))))
7926 (propagated-inputs
7927 `(("java-slf4j-api" ,java-slf4j-api)))
7928 (native-inputs
7929 `(("java-junit" ,java-junit)
7930 ("java-hamcrest-core" ,java-hamcrest-core)))
7931 (home-page "https://www.slf4j.org/")
7932 (synopsis "Simple implementation of simple logging facade for Java")
7933 (description "SLF4J binding for the Simple implementation, which outputs
7934 all events to System.err. Only messages of level INFO and higher are
7935 printed.")
7936 (license license:expat)))
7937
7938 (define-public antlr2
7939 (package
7940 (name "antlr2")
7941 (version "2.7.7")
7942 (source (origin
7943 (method url-fetch)
7944 (uri (string-append "https://www.antlr2.org/download/antlr-"
7945 version ".tar.gz"))
7946 (sha256
7947 (base32
7948 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
7949 (modules '((guix build utils)))
7950 (snippet
7951 '(begin
7952 (delete-file "antlr.jar")
7953 (substitute* "lib/cpp/antlr/CharScanner.hpp"
7954 (("#include <map>")
7955 (string-append
7956 "#include <map>\n"
7957 "#define EOF (-1)\n"
7958 "#include <strings.h>")))
7959 (substitute* "configure"
7960 (("/bin/sh") "sh"))
7961 #t))))
7962 (build-system gnu-build-system)
7963 (arguments
7964 `(#:tests? #f ; no test target
7965 #:imported-modules ((guix build ant-build-system)
7966 (guix build syscalls)
7967 ,@%gnu-build-system-modules)
7968 #:modules (((guix build ant-build-system) #:prefix ant:)
7969 (guix build gnu-build-system)
7970 (guix build utils))
7971 #:phases
7972 (modify-phases %standard-phases
7973 (add-after 'install 'strip-jar-timestamps
7974 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
7975 (add-before 'configure 'fix-timestamp
7976 (lambda _
7977 (substitute* "configure"
7978 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
7979 #t))
7980 (add-after 'configure 'fix-bin-ls
7981 (lambda _
7982 (substitute* (find-files "." "Makefile")
7983 (("/bin/ls") "ls"))
7984 #t)))))
7985 (native-inputs
7986 `(("which" ,which)
7987 ("zip" ,zip)
7988 ("java" ,icedtea "jdk")))
7989 (inputs
7990 `(("java" ,icedtea)))
7991 (home-page "https://www.antlr2.org")
7992 (synopsis "Framework for constructing recognizers, compilers, and translators")
7993 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
7994 is a language tool that provides a framework for constructing recognizers,
7995 compilers, and translators from grammatical descriptions containing Java, C#,
7996 C++, or Python actions. ANTLR provides excellent support for tree construction,
7997 tree walking, and translation.")
7998 (license license:public-domain)))
7999
8000 (define-public java-stringtemplate-3
8001 (package
8002 (name "java-stringtemplate")
8003 (version "3.2.1")
8004 (source (origin
8005 (method url-fetch)
8006 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8007 "gh-pages/download/stringtemplate-"
8008 version ".tar.gz"))
8009 (sha256
8010 (base32
8011 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8012 (build-system ant-build-system)
8013 (arguments
8014 `(#:jar-name (string-append ,name "-" ,version ".jar")
8015 #:test-dir "test"
8016 #:modules ((guix build ant-build-system)
8017 (guix build utils)
8018 (srfi srfi-1))
8019 #:phases
8020 (modify-phases %standard-phases
8021 (add-before 'check 'fix-tests
8022 (lambda _
8023 (substitute* "build.xml"
8024 (("\\$\\{test.home\\}/java")
8025 "${test.home}/org"))
8026 #t))
8027 (add-before 'build 'generate-grammar
8028 (lambda _
8029 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8030 (for-each (lambda (file)
8031 (format #t "~a\n" file)
8032 (invoke "antlr" file))
8033 '("template.g" "angle.bracket.template.g" "action.g"
8034 "eval.g" "group.g" "interface.g")))
8035 #t)))))
8036 (native-inputs
8037 `(("antlr" ,antlr2)
8038 ("java-junit" ,java-junit)))
8039 (home-page "https://www.stringtemplate.org")
8040 (synopsis "Template engine to generate formatted text output")
8041 (description "StringTemplate is a java template engine (with ports for C#,
8042 Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8043 or any other formatted text output. StringTemplate is particularly good at
8044 code generators, multiple site skins, and internationalization / localization.
8045 StringTemplate also powers ANTLR.")
8046 (license license:bsd-3)))
8047
8048 ;; antlr3 is partially written using antlr3 grammar files. It also depends on
8049 ;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8050 ;; files and uses antlr3 at runtime. The latest version requires a recent version
8051 ;; of antlr3 at runtime.
8052 ;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8053 ;; This version of ST4 is sufficient for the latest antlr3.
8054 ;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8055 ;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8056 ;; against the latest ST4.
8057 ;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8058 ;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8059 ;; only grammar files with the antlr2 syntax.
8060 ;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8061
8062 (define-public java-stringtemplate
8063 (package (inherit java-stringtemplate-3)
8064 (name "java-stringtemplate")
8065 (version "4.0.8")
8066 (source (origin
8067 (method url-fetch)
8068 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8069 version ".tar.gz"))
8070 (file-name (string-append name "-" version ".tar.gz"))
8071 (sha256
8072 (base32
8073 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8074 (build-system ant-build-system)
8075 (arguments
8076 `(#:jar-name (string-append ,name "-" ,version ".jar")
8077 #:tests? #f ; FIXME: tests fail for unknown reasons
8078 #:test-dir "test"
8079 #:modules ((guix build ant-build-system)
8080 (guix build utils)
8081 (srfi srfi-1))
8082 #:phases
8083 (modify-phases %standard-phases
8084 (add-before 'check 'fix-test-target
8085 (lambda _
8086 (substitute* "build.xml"
8087 (("\\$\\{test.home\\}/java") "${test.home}/")
8088 (("\\*Test.java") "Test*.java"))
8089 #t))
8090 (add-before 'build 'generate-grammar
8091 (lambda _
8092 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8093 (for-each (lambda (file)
8094 (format #t "~a\n" file)
8095 (invoke "antlr3" file))
8096 '("STParser.g" "Group.g" "CodeGenerator.g")))
8097 #t)))))
8098 (inputs
8099 `(("antlr3" ,antlr3-bootstrap)
8100 ("antlr2" ,antlr2)
8101 ("java-stringtemplate" ,java-stringtemplate-3)
8102 ("java-junit" ,java-junit)))))
8103
8104 (define java-stringtemplate-4.0.6
8105 (package (inherit java-stringtemplate)
8106 (name "java-stringtemplate")
8107 (version "4.0.6")
8108 (source (origin
8109 (method url-fetch)
8110 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8111 version ".tar.gz"))
8112 (file-name (string-append name "-" version ".tar.gz"))
8113 (sha256
8114 (base32
8115 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8116 (inputs
8117 `(("antlr3" ,antlr3-3.3)
8118 ("antlr2" ,antlr2)
8119 ("java-stringtemplate" ,java-stringtemplate-3)))))
8120
8121 (define-public antlr3
8122 (package
8123 (name "antlr3")
8124 (version "3.5.2")
8125 (source (origin
8126 (method git-fetch)
8127 (uri (git-reference
8128 (url "https://github.com/antlr/antlr3")
8129 (commit version)))
8130 (file-name (git-file-name name version))
8131 (sha256
8132 (base32
8133 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8134 (build-system ant-build-system)
8135 (arguments
8136 `(#:jar-name (string-append ,name "-" ,version ".jar")
8137 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8138 #:tests? #f
8139 #:phases
8140 (modify-phases %standard-phases
8141 (add-after 'install 'bin-install
8142 (lambda* (#:key inputs outputs #:allow-other-keys)
8143 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8144 (bin (string-append (assoc-ref outputs "out") "/bin")))
8145 (mkdir-p bin)
8146 (with-output-to-file (string-append bin "/antlr3")
8147 (lambda _
8148 (display
8149 (string-append "#!" (which "sh") "\n"
8150 "java -cp " jar "/" ,name "-" ,version ".jar:"
8151 (string-concatenate
8152 (find-files (assoc-ref inputs "stringtemplate")
8153 ".*\\.jar"))
8154 ":"
8155 (string-concatenate
8156 (find-files (assoc-ref inputs "stringtemplate4")
8157 ".*\\.jar"))
8158 ":"
8159 (string-concatenate
8160 (find-files (string-append
8161 (assoc-ref inputs "antlr")
8162 "/lib")
8163 ".*\\.jar"))
8164 " org.antlr.Tool $*"))))
8165 (chmod (string-append bin "/antlr3") #o755))
8166 #t))
8167 (add-before 'build 'generate-grammar
8168 (lambda _
8169 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8170 (for-each (lambda (file)
8171 (display file)
8172 (newline)
8173 (invoke "antlr3" file))
8174 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8175 "AssignTokenTypesWalker.g"
8176 "ActionTranslator.g" "TreeToNFAConverter.g"
8177 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8178 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8179 (substitute* "ANTLRParser.java"
8180 (("public Object getTree") "public GrammarAST getTree"))
8181 (substitute* "ANTLRv3Parser.java"
8182 (("public Object getTree") "public CommonTree getTree"))
8183 (chdir "../../../../../java")
8184 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8185 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8186 import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8187 (substitute* "org/antlr/tool/ErrorManager.java"
8188 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8189 (chdir "../../../..")
8190 #t))
8191 (add-before 'build 'fix-build-xml
8192 (lambda _
8193 (substitute* "build.xml"
8194 (("target name=\"compile\">")
8195 "target name=\"compile\">
8196 <copy todir=\"${classes.dir}\">
8197 <fileset dir=\"tool/src/main/resources\">
8198 <include name=\"**/*.stg\"/>
8199 <include name=\"**/*.st\"/>
8200 <include name=\"**/*.sti\"/>
8201 <include name=\"**/STLexer.tokens\"/>
8202 </fileset>
8203 </copy>"))
8204 #t)))))
8205 (native-inputs
8206 `(("antlr" ,antlr2)
8207 ("antlr3" ,antlr3-bootstrap)))
8208 (inputs
8209 `(("junit" ,java-junit)
8210 ("stringtemplate" ,java-stringtemplate-3)
8211 ("stringtemplate4" ,java-stringtemplate)))
8212 (propagated-inputs
8213 `(("stringtemplate" ,java-stringtemplate-3)
8214 ("antlr" ,antlr2)
8215 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8216 (home-page "https://www.antlr3.org")
8217 (synopsis "Framework for constructing recognizers, compilers, and translators")
8218 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8219 is a language tool that provides a framework for constructing recognizers,
8220 compilers, and translators from grammatical descriptions containing Java, C#,
8221 C++, or Python actions. ANTLR provides excellent support for tree construction,
8222 tree walking, and translation.")
8223 (license license:bsd-3)))
8224
8225 (define antlr3-bootstrap
8226 (package
8227 (inherit antlr3)
8228 (name "antlr3-bootstrap")
8229 (native-inputs
8230 `(("antlr" ,antlr2)
8231 ("antlr3" ,antlr3-3.3)))
8232 (inputs
8233 `(("junit" ,java-junit)))))
8234
8235 (define-public antlr3-3.3
8236 (package
8237 (inherit antlr3)
8238 (name "antlr3")
8239 (version "3.3")
8240 (source (origin
8241 (method url-fetch)
8242 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8243 "gh-pages/download/antlr-"
8244 version ".tar.gz"))
8245 (sha256
8246 (base32
8247 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8248 (patches
8249 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8250 (arguments
8251 `(#:jar-name (string-append ,name "-" ,version ".jar")
8252 #:source-dir (string-join '("tool/src/main/java"
8253 "runtime/Java/src/main/java"
8254 "tool/src/main/antlr2"
8255 "tool/src/main/antlr3")
8256 ":")
8257 #:tests? #f ; FIXME: tests seem to require maven plugin
8258 #:modules ((guix build ant-build-system)
8259 (guix build utils)
8260 (srfi srfi-1))
8261 #:phases
8262 (modify-phases %standard-phases
8263 (add-after 'install 'bin-install
8264 (lambda* (#:key inputs outputs #:allow-other-keys)
8265 (let* ((out (assoc-ref outputs "out"))
8266 (jar (string-append out "/share/java"))
8267 (bin (string-append out "/bin")))
8268 (mkdir-p bin)
8269 (with-output-to-file (string-append bin "/antlr3")
8270 (lambda _
8271 (display
8272 (string-append
8273 "#!" (which "sh") "\n"
8274 "java -cp " jar "/antlr3-3.3.jar:"
8275 (string-join
8276 (append (find-files (assoc-ref inputs "java-stringtemplate")
8277 ".*\\.jar$")
8278 (find-files (string-append (assoc-ref inputs "antlr")
8279 "/lib")
8280 ".*\\.jar$"))
8281 ":")
8282 " org.antlr.Tool $*"))))
8283 (chmod (string-append bin "/antlr3") #o755)
8284 #t)))
8285 (add-before 'build 'generate-grammar
8286 (lambda _
8287 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8288 (("import org.antlr.grammar.v2.\\*;")
8289 "import org.antlr.grammar.v2.*;\n
8290 import org.antlr.grammar.v2.TreeToNFAConverter;\n
8291 import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8292 import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8293 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8294 (for-each (lambda (file)
8295 (format #t "~a\n" file)
8296 (invoke "antlr" file))
8297 '("antlr.g" "antlr.print.g" "assign.types.g"
8298 "buildnfa.g" "codegen.g" "define.g")))
8299 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8300 (for-each (lambda (file)
8301 (format #t "~a\n" file)
8302 (invoke "antlr3" file))
8303 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8304 "ANTLRv3Tree.g")))
8305 #t))
8306 (add-before 'build 'fix-build-xml
8307 (lambda _
8308 (substitute* "build.xml"
8309 (("target name=\"compile\">")
8310 "target name=\"compile\">
8311 <copy todir=\"${classes.dir}\">
8312 <fileset dir=\"tool/src/main/resources\">
8313 <include name=\"**/*.stg\"/>
8314 <include name=\"**/*.st\"/>
8315 <include name=\"**/*.sti\"/>
8316 <include name=\"**/STLexer.tokens\"/>
8317 </fileset>
8318 </copy>"))
8319 #t)))))
8320 (native-inputs
8321 `(("antlr" ,antlr2)
8322 ("antlr3" ,antlr3-3.1)))
8323 (inputs
8324 `(("junit" ,java-junit)))
8325 (propagated-inputs
8326 `(("java-stringtemplate" ,java-stringtemplate-3)
8327 ("antlr" ,antlr2)))))
8328
8329 (define-public antlr3-3.1
8330 (package
8331 (inherit antlr3)
8332 (version "3.1")
8333 (source (origin
8334 (method url-fetch)
8335 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8336 "gh-pages/download/antlr-"
8337 version ".tar.gz"))
8338 (sha256
8339 (base32
8340 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8341 (patches
8342 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8343 (arguments
8344 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8345 #:source-dir "src:runtime/Java/src"
8346 #:tests? #f
8347 #:phases
8348 (modify-phases %standard-phases
8349 (add-after 'install 'bin-install
8350 (lambda* (#:key inputs outputs #:allow-other-keys)
8351 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8352 (bin (string-append (assoc-ref outputs "out") "/bin")))
8353 (mkdir-p bin)
8354 (with-output-to-file (string-append bin "/antlr3")
8355 (lambda _
8356 (display
8357 (string-append "#!" (which "sh") "\n"
8358 "java -cp " jar "/antlr3-3.1.jar:"
8359 (string-concatenate
8360 (find-files (assoc-ref inputs "stringtemplate")
8361 ".*\\.jar"))
8362 ":"
8363 (string-concatenate
8364 (find-files (string-append
8365 (assoc-ref inputs "antlr")
8366 "/lib")
8367 ".*\\.jar"))
8368 " org.antlr.Tool $*"))))
8369 (chmod (string-append bin "/antlr3") #o755))
8370 #t))
8371 (add-before 'build 'generate-grammar
8372 (lambda _
8373 (let ((dir "src/org/antlr/tool/"))
8374 (for-each (lambda (file)
8375 (display file)
8376 (newline)
8377 (invoke "antlr" "-o" dir (string-append dir file)))
8378 '("antlr.g" "antlr.print.g" "assign.types.g"
8379 "buildnfa.g" "define.g")))
8380 (format #t "codegen.g\n")
8381 (invoke "antlr" "-o" "src/org/antlr/codegen"
8382 "src/org/antlr/codegen/codegen.g")
8383 #t))
8384 (add-before 'build 'fix-build-xml
8385 (lambda _
8386 (substitute* "build.xml"
8387 (("target name=\"compile\">")
8388 "target name=\"compile\">
8389 <copy todir=\"${classes.dir}\">
8390 <fileset dir=\"src\">
8391 <include name=\"**/*.stg\"/>
8392 <include name=\"**/*.st\"/>
8393 <include name=\"**/*.sti\"/>
8394 <include name=\"**/STLexer.tokens\"/>
8395 </fileset>
8396 </copy>"))
8397 #t)))))
8398 (native-inputs
8399 `(("antlr" ,antlr2)))
8400 (inputs
8401 `(("junit" ,java-junit)))
8402 (propagated-inputs
8403 `(("stringtemplate" ,java-stringtemplate-3)))))
8404
8405 (define-public java-treelayout
8406 (package
8407 (name "java-treelayout")
8408 (version "1.0.3")
8409 (source (origin
8410 (method git-fetch)
8411 (uri (git-reference
8412 (url "https://github.com/abego/treelayout")
8413 (commit (string-append "v" version))))
8414 (file-name (git-file-name name version))
8415 (sha256
8416 (base32
8417 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8418 (build-system ant-build-system)
8419 (arguments
8420 `(#:jar-name (string-append ,name "-" ,version ".jar")
8421 #:source-dir "org.abego.treelayout/src/main/java"
8422 #:test-dir "org.abego.treelayout/src/test"))
8423 (inputs
8424 `(("java-junit" ,java-junit)))
8425 (native-inputs
8426 `(("java-hamcrest-core" ,java-hamcrest-core)))
8427 (home-page "http://treelayout.sourceforge.net")
8428 (synopsis "Tree Layout Algorithm in Java")
8429 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8430 not restricted to a specific output or format, but can be used for any kind of
8431 two dimensional diagram. Examples are Swing based components, SVG files, etc.
8432 This is possible because TreeLayout separates the layout of a tree from the
8433 actual rendering.")
8434 (license license:bsd-3)))
8435
8436 (define-public java-antlr4-runtime
8437 (package
8438 (name "java-antlr4-runtime")
8439 (version "4.8")
8440 (source (origin
8441 (method git-fetch)
8442 (uri (git-reference
8443 (url "https://github.com/antlr/antlr4")
8444 (commit version)))
8445 (file-name (git-file-name name version))
8446 (sha256
8447 (base32
8448 "1qal3add26qxskm85nk7r758arladn5rcyjinmhlhznmpbbv9j8m"))
8449 (patches
8450 (search-patches "java-antlr4-Add-standalone-generator.patch"
8451 "java-antlr4-fix-code-too-large.java"))))
8452 (build-system ant-build-system)
8453 (arguments
8454 `(#:jar-name "java-antlr4-runtime.jar"
8455 #:source-dir "runtime/Java/src/org"
8456 #:tests? #f; tests depend on java-antlr4 itself
8457 #:phases
8458 (modify-phases %standard-phases
8459 (add-before 'build 'copy-resources
8460 (lambda _
8461 (copy-recursively "runtime/Java/src/main/dot"
8462 "build/classes")
8463 #t)))))
8464 (home-page "https://www.antlr.org")
8465 (synopsis "ANTLR runtime library")
8466 (description "This package contains the runtime library used with generated
8467 sources by ANTLR.")
8468 (license license:bsd-3)))
8469
8470 (define-public antlr4
8471 (package
8472 (inherit java-antlr4-runtime)
8473 (name "antlr4")
8474 (arguments
8475 `(#:jar-name "antlr4.jar"
8476 #:source-dir "tool/src"
8477 #:test-dir "tool-testsuite/test:runtime-testsuite/test:runtime-testsuite/annotations/src"
8478 #:test-include (list "**/Test*.java")
8479 #:test-exclude (list
8480 ;; no runnable method
8481 "**/TestOutputReading.java"
8482 ;; no @Test methods
8483 "**/TestParserErrors.java"
8484 "**/TestSemPredEvalParser.java"
8485 "**/TestSets.java"
8486 "**/TestListeners.java"
8487 "**/TestParseTrees.java"
8488 "**/TestParserExec.java"
8489 "**/TestLexerErrors.java"
8490 "**/TestPerformance.java"
8491 "**/TestCompositeParsers.java"
8492 "**/TestLexerExec.java"
8493 "**/TestSemPredEvalLexer.java"
8494 "**/TestLeftRecursion.java"
8495 "**/TestFullContextParsing.java"
8496 "**/TestCompositeLexers.java"
8497 ;; Null pointer exception
8498 "**/TestCompositeGrammars.java"
8499 ;; Wrong assumption on emoji
8500 "**/TestUnicodeData.java")
8501 #:phases
8502 (modify-phases %standard-phases
8503 (add-before 'build 'fix-build.xml
8504 (lambda _
8505 ;; tests are not in a java subdirectory
8506 (substitute* "build.xml"
8507 (("\\$\\{test.home\\}/java") "${test.home}"))
8508 #t))
8509 ;; tests require to have a working antlr4 binary
8510 (delete 'check)
8511 (add-after 'bin-install 'check
8512 (lambda _
8513 (invoke "ant" "compile-tests")
8514 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/annotations/src")
8515 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8516 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8517 #t))
8518 (add-before 'check 'remove-unrelated-languages
8519 (lambda _
8520 ;; There are tests for other languages that ANTLR can generate, but
8521 ;; we don't have the infrastructure for that yet. Let's test Java
8522 ;; generation only.
8523 (for-each
8524 (lambda (language)
8525 (delete-file-recursively
8526 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8527 language)))
8528 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8529 "python3" "swift"))
8530 #t))
8531 (add-before 'check 'generate-test-parsers
8532 (lambda* (#:key outputs #:allow-other-keys)
8533 (define (run-antlr dir filename package)
8534 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8535 "-package" package (string-append dir "/" filename)
8536 "-Xlog"))
8537 (setenv "PATH" (string-append (getenv "PATH") ":"
8538 (assoc-ref outputs "out") "/bin"))
8539 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8540 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8541 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8542 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8543 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8544 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8545 #t))
8546 (add-before 'check 'remove-graphemes
8547 (lambda _
8548 ;; When running antlr on grahemes.g4, we get a runtime exception:
8549 ;; set is empty. So delete the file that depends on it.
8550 (delete-file
8551 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8552 #t))
8553 (add-after 'install 'bin-install
8554 (lambda* (#:key inputs outputs #:allow-other-keys)
8555 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8556 (bin (string-append (assoc-ref outputs "out") "/bin")))
8557 (mkdir-p bin)
8558 (with-output-to-file (string-append bin "/antlr4")
8559 (lambda _
8560 (display
8561 (string-append "#!" (which "sh") "\n"
8562 "java -cp " jar "/antlr4.jar:"
8563 (string-join
8564 (apply
8565 append
8566 (map
8567 (lambda (input)
8568 (find-files (assoc-ref inputs input)
8569 ".*\\.jar"))
8570 '("antlr3" "java-stringtemplate"
8571 "java-antlr4-runtime" "java-treelayout"
8572 "java-jsonp-api" "java-icu4j")))
8573 ":")
8574 " org.antlr.v4.Tool $*"))))
8575 (chmod (string-append bin "/antlr4") #o755)
8576 #t)))
8577 (add-before 'build 'copy-resources
8578 (lambda _
8579 (copy-recursively "tool/resources/" "build/classes")
8580 #t))
8581 (add-before 'build 'generate-unicode
8582 (lambda _
8583 ;; First: build the generator
8584 (invoke "javac" "-cp" (getenv "CLASSPATH")
8585 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8586 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8587 ;; Then use it
8588 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8589 ":tool/src:runtime/Java")
8590 "org.antlr.v4.unicode.UnicodeRenderer"
8591 "tool/resources/org/antlr/v4/tool/templates"
8592 "unicodedata"
8593 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8594 ;; It seems there is a bug with our ST4
8595 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8596 (("\\\\>") ">"))
8597 ;; Remove the additional file
8598 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8599 #t))
8600 (add-before 'build 'generate-grammar
8601 (lambda* (#:key inputs #:allow-other-keys)
8602 (with-directory-excursion "tool/src/org/antlr/v4/parse"
8603 (for-each (lambda (file)
8604 (display file)
8605 (newline)
8606 (invoke "antlr3" file))
8607 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
8608 "GrammarTreeVisitor.g" "ATNBuilder.g"
8609 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
8610 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
8611 (install-file "../parse/ANTLRParser.tokens" ".")
8612 (display "SourceGenTriggers.g\n")
8613 (invoke "antlr3" "SourceGenTriggers.g"))
8614 #t)))))
8615 (inputs
8616 `(("antlr3" ,antlr3)
8617 ("java-antlr4-runtime" ,java-antlr4-runtime)
8618 ("java-icu4j" ,java-icu4j)
8619 ("java-jsonp-api" ,java-jsonp-api)
8620 ("java-stringtemplate" ,java-stringtemplate)
8621 ("java-treelayout" ,java-treelayout)))
8622 (native-inputs
8623 `(("java-junit" ,java-junit)))
8624 (synopsis "Parser and lexer generator in Java")
8625 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
8626 parser generator for reading, processing, executing, or translating structured
8627 text or binary files. It's widely used to build languages, tools, and
8628 frameworks. From a grammar, ANTLR generates a parser that can build and walk
8629 parse trees.")))
8630
8631 (define-public java-antlr4-runtime-4.1
8632 (package
8633 (inherit java-antlr4-runtime)
8634 (version "4.1")
8635 (source (origin
8636 (method git-fetch)
8637 (uri (git-reference
8638 (url "https://github.com/antlr/antlr4")
8639 (commit version)))
8640 (file-name (git-file-name "antlr4" version))
8641 (sha256
8642 (base32
8643 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
8644 (arguments
8645 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
8646 ((#:phases phases)
8647 `(modify-phases ,phases
8648 (add-before 'configure 'chmod
8649 (lambda _
8650 (chmod "build.xml" #o644)
8651 #t))))))
8652 (inputs
8653 `(("java-treelayout" ,java-treelayout)))))
8654
8655 (define-public antlr4-4.1
8656 (package
8657 (inherit antlr4)
8658 (version (package-version java-antlr4-runtime-4.1))
8659 (source (package-source java-antlr4-runtime-4.1))
8660 (arguments
8661 (substitute-keyword-arguments (package-arguments antlr4)
8662 ((#:test-dir _)
8663 "tool/test")
8664 ((#:test-exclude excludes)
8665 `(list "**/TestParseErrors.java"
8666 "**/TestTopologicalSort.java"
8667 ,@excludes))
8668 ((#:phases phases)
8669 `(modify-phases ,phases
8670 (delete 'generate-unicode)
8671 (replace 'check
8672 (lambda _
8673 (invoke "ant" "check")
8674 #t))
8675 (add-before 'configure 'chmod
8676 (lambda _
8677 (chmod "build.xml" #o644)
8678 #t))
8679 (delete 'remove-graphemes)
8680 (delete 'remove-unrelated-languages)
8681 (delete 'generate-test-parsers)))))
8682 (inputs
8683 (alist-replace
8684 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
8685 (package-inputs antlr4)))))
8686
8687 (define-public java-tunnelvisionlabs-antlr4-runtime-annotations
8688 (package
8689 (inherit java-antlr4-runtime)
8690 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
8691 (version "4.7.4")
8692 (source (origin
8693 (method git-fetch)
8694 (uri (git-reference
8695 (url "https://github.com/tunnelvisionlabs/antlr4")
8696 (commit (string-append version "-opt"))))
8697 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
8698 (sha256
8699 (base32
8700 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
8701 (patches
8702 (search-patches "java-antlr4-Add-standalone-generator.patch"
8703 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
8704 (arguments
8705 `(#:jar-name "java-antlr4-runtime-annotations.jar"
8706 #:source-dir "runtime/JavaAnnotations/src"
8707 #:tests? #f; no tests
8708 #:phases
8709 (modify-phases %standard-phases
8710 (add-after 'build 'copy-resources
8711 (lambda _
8712 (copy-recursively "runtime/JavaAnnotations/resources"
8713 "build/classes")
8714 #t))
8715 (add-after 'copy-resources 'rebuild-jar
8716 (lambda _
8717 (invoke "ant" "jar")
8718 #t)))))
8719 (inputs '())
8720 (native-inputs '())
8721 (synopsis "Annotations for ANTLR's runtime library")
8722 (description "This package contains annotations used during the build of
8723 the runtime library of ANTLR.")))
8724
8725 ;; the runtime of this library requires a lexer that is generated by antlr4.
8726 ;; However, antlr4 itself requires this library at build and run-time. We
8727 ;; use antlr4@4.1, the closest version of antlr that doesn't need this
8728 ;; bootstrap process, to generate the lexer. The generated lexer is built
8729 ;; for the 4.1 runtime, which is slightly different from this runtime.
8730 ;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
8731 ;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
8732 ;; the proper, working, runtime to build antlr4 again.
8733 (define java-tunnelvisionlabs-antlr4-runtime-bootstrap
8734 (package
8735 (inherit java-antlr4-runtime)
8736 (name "java-tunnelvisionlabs-antlr4-runtime")
8737 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8738 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8739 (arguments
8740 `(#:jar-name "java-antlr4-runtime.jar"
8741 #:source-dir "runtime/Java/src"
8742 #:tests? #f; tests require antlr4, but antlr4 depends on this package
8743 #:phases
8744 (modify-phases %standard-phases
8745 (add-before 'build 'generate-xpath-lexer
8746 (lambda _
8747 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
8748 "-visitor" "-no-listener"
8749 "-package" "org.antlr.v4.runtime.tree.xpath"
8750 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
8751 ;; Generated code is for an incompatible version of the runtime
8752 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
8753 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
8754 "LexerATNSimulator(this,_ATN)"))
8755 #t))
8756 (add-before 'build 'copy-resources
8757 (lambda _
8758 (copy-recursively "runtime/Java/src/main/dot"
8759 "build/classes")
8760 #t)))))
8761 (native-inputs
8762 `(("antlr4" ,antlr4-4.1)
8763 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8764 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
8765
8766 (define java-tunnelvisionlabs-antlr4-bootstrap
8767 (package
8768 (inherit antlr4)
8769 (name "java-tunnelvisionlabs-antlr4")
8770 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
8771 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
8772 (arguments
8773 (substitute-keyword-arguments (package-arguments antlr4)
8774 ((#:test-dir _)
8775 "tool/test:runtime-testsuite/src")
8776 ((#:phases phases)
8777 `(modify-phases ,phases
8778 (delete 'remove-unrelated-languages)
8779 (delete 'remove-graphemes)
8780 (delete 'generate-test-parsers)
8781 (delete 'check)))))
8782 (native-inputs '())
8783 (inputs
8784 `(("antlr3" ,antlr3)
8785 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8786 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
8787 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
8788 ("java-icu4j" ,java-icu4j)
8789 ("java-jsonp-api" ,java-jsonp-api)
8790 ("java-stringtemplate" ,java-stringtemplate)
8791 ("java-treelayout" ,java-treelayout)))))
8792
8793 (define-public java-tunnelvisionlabs-antlr4-runtime
8794 (package
8795 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
8796 (native-inputs
8797 (alist-replace
8798 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
8799 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
8800
8801 (define-public java-tunnelvisionlabs-antlr4
8802 (package
8803 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
8804 (inputs
8805 (alist-replace
8806 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
8807 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
8808
8809 (define-public java-commons-cli-1.2
8810 ;; This is a bootstrap dependency for Maven2.
8811 (package
8812 (inherit java-commons-cli)
8813 (version "1.2")
8814 (source (origin
8815 (method url-fetch)
8816 (uri (string-append "mirror://apache/commons/cli/source/"
8817 "commons-cli-" version "-src.tar.gz"))
8818 (sha256
8819 (base32
8820 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
8821 (arguments
8822 `(#:jar-name "commons-cli.jar"
8823 #:phases
8824 (modify-phases %standard-phases
8825 (add-before 'check 'fix-build-xml
8826 (lambda* (#:key inputs #:allow-other-keys)
8827 (substitute* "build.xml"
8828 (("dir=\"\\$\\{test.home\\}/java\"")
8829 "dir=\"${test.home}\""))
8830 #t)))))
8831 (native-inputs
8832 `(("java-junit" ,java-junit)))))
8833
8834 (define-public java-microemulator-cldc
8835 (package
8836 (name "java-microemulator-cldc")
8837 (version "2.0.4")
8838 (source (origin
8839 (method url-fetch)
8840 (uri (string-append "https://github.com/barteo/microemu/archive/"
8841 "microemulator_"
8842 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
8843 version)
8844 ".tar.gz"))
8845 (file-name (string-append name "-" version ".tar.gz"))
8846 (sha256
8847 (base32
8848 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
8849 (build-system ant-build-system)
8850 (arguments
8851 `(#:jar-name "microemulator-cldc.jar"
8852 #:source-dir "microemu-cldc/src/main/java"
8853 #:tests? #f)); Requires even older software
8854 (home-page "https://github.com/barteo/microemu")
8855 (synopsis "J2ME CLDC emulator")
8856 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
8857 Emulator. It demonstrates MIDlet based applications in web browser
8858 applet and can be run as a standalone java application.")
8859 (license (list license:asl2.0
8860 ;; or altenatively:
8861 license:lgpl2.1+))))
8862
8863 (define-public java-datanucleus-javax-persistence
8864 (package
8865 (name "java-datanucleus-javax-persistence")
8866 (version "2.2.0")
8867 (source (origin
8868 (method url-fetch)
8869 (uri (string-append "https://github.com/datanucleus/"
8870 "javax.persistence/archive/javax.persistence-"
8871 version "-release.tar.gz"))
8872 (sha256
8873 (base32
8874 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
8875 (build-system ant-build-system)
8876 (arguments
8877 `(#:jar-name "java-datanucleus-javax-persistence.jar"
8878 #:jdk ,icedtea-8
8879 #:source-dir "src/main/java"
8880 #:tests? #f)); no tests
8881 (home-page "https://github.com/datanucleus/javax.persistence")
8882 (synopsis "JPA API")
8883 (description "This package contains a clean definition of JPA API intended
8884 for use with DataNucleus JPA since the JCP haven't provided an official JPA API
8885 jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
8886 used to generate this API.")
8887 (license (list license:edl1.0 license:epl1.0))))
8888
8889 (define-public java-osgi-cmpn
8890 (package
8891 (name "java-osgi-cmpn")
8892 (version "6.0.0")
8893 (source (origin
8894 (method url-fetch)
8895 (uri (string-append "https://repo1.maven.org/maven2/"
8896 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
8897 version "-sources.jar"))
8898 (sha256
8899 (base32
8900 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
8901 (build-system ant-build-system)
8902 (arguments
8903 `(#:jar-name "osgi-cmpn.jar"
8904 #:tests? #f)); no tests
8905 (inputs
8906 `(("annotation" ,java-osgi-annotation)
8907 ("core" ,java-osgi-core)
8908 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8909 ("microemulator" ,java-microemulator-cldc)
8910 ("servlet" ,java-classpathx-servletapi)))
8911 (home-page "https://www.osgi.org")
8912 (synopsis "Compendium specification module of OSGi framework")
8913 (description
8914 "OSGi, for Open Services Gateway initiative framework, is a module system
8915 and service platform for the Java programming language. This package contains
8916 the compendium specification module, providing interfaces and classes for use
8917 in compiling bundles.")
8918 (license license:asl2.0)))
8919
8920 (define-public java-osgi-service-component-annotations
8921 (package
8922 (name "java-osgi-service-component-annotations")
8923 (version "1.3.0")
8924 (source (origin
8925 (method url-fetch)
8926 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8927 "org.osgi.service.component.annotations/"
8928 version "/org.osgi.service.component.annotations-"
8929 version "-sources.jar"))
8930 (sha256
8931 (base32
8932 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
8933 (build-system ant-build-system)
8934 (arguments
8935 `(#:jar-name "osgi-service-component-annotations.jar"
8936 #:tests? #f)); no tests
8937 (inputs
8938 `(("annotation" ,java-osgi-annotation)))
8939 (home-page "https://www.osgi.org")
8940 (synopsis "Support annotations for osgi-service-component")
8941 (description
8942 "OSGi, for Open Services Gateway initiative framework, is a module system
8943 and service platform for the Java programming language. This package contains
8944 the support annotations for osgi-service-component.")
8945 (license license:asl2.0)))
8946
8947 (define-public java-osgi-dto
8948 (package
8949 (name "java-osgi-dto")
8950 (version "1.0.0")
8951 (source (origin
8952 (method url-fetch)
8953 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8954 "org.osgi.dto/" version "/org.osgi.dto-"
8955 version "-sources.jar"))
8956 (sha256
8957 (base32
8958 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
8959 (build-system ant-build-system)
8960 (arguments
8961 `(#:jar-name "osgi-dto.jar"
8962 #:tests? #f)); no tests
8963 (inputs
8964 `(("annotation" ,java-osgi-annotation)))
8965 (home-page "https://www.osgi.org")
8966 (synopsis "Data Transfer Objects")
8967 (description
8968 "OSGi, for Open Services Gateway initiative framework, is a module system
8969 and service platform for the Java programming language. This package contains
8970 the Data Transfer Objects. It is easily serializable having only public fields
8971 of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
8972 Map and array aggregates may also be used. The aggregates must only hold
8973 objects of the listed types or aggregates.")
8974 (license license:asl2.0)))
8975
8976 (define-public java-osgi-resource
8977 (package
8978 (name "java-osgi-resource")
8979 (version "1.0.0")
8980 (source (origin
8981 (method url-fetch)
8982 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
8983 "org.osgi.resource/"
8984 version "/org.osgi.resource-"
8985 version "-sources.jar"))
8986 (sha256
8987 (base32
8988 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
8989 (build-system ant-build-system)
8990 (arguments
8991 `(#:jar-name "osgi-resource.jar"
8992 #:tests? #f)); no tests
8993 (inputs
8994 `(("annotation" ,java-osgi-annotation)
8995 ("dto" ,java-osgi-dto)))
8996 (home-page "https://www.osgi.org")
8997 (synopsis "OSGI Resource")
8998 (description
8999 "OSGi, for Open Services Gateway initiative framework, is a module system
9000 and service platform for the Java programming language. This package contains
9001 the definition of common types in osgi packages.")
9002 (license license:asl2.0)))
9003
9004 (define-public java-osgi-namespace-contract
9005 (package
9006 (name "java-osgi-namespace-contract")
9007 (version "1.0.0")
9008 (source (origin
9009 (method url-fetch)
9010 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9011 "org.osgi.namespace.contract/"
9012 version "/org.osgi.namespace.contract-"
9013 version "-sources.jar"))
9014 (sha256
9015 (base32
9016 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9017 (build-system ant-build-system)
9018 (inputs
9019 `(("resource" ,java-osgi-resource)
9020 ("annotation" ,java-osgi-annotation)))
9021 (arguments
9022 `(#:jar-name "osgi-namespace-contract.jar"
9023 #:tests? #f)); no tests
9024 (home-page "https://www.osgi.org")
9025 (synopsis "Contract Capability and Requirement Namespace")
9026 (description
9027 "OSGi, for Open Services Gateway initiative framework, is a module system
9028 and service platform for the Java programming language. This package contains
9029 the names for the attributes and directives for a namespace with contracts.")
9030 (license license:asl2.0)))
9031
9032 (define-public java-osgi-namespace-extender
9033 (package
9034 (name "java-osgi-namespace-extender")
9035 (version "1.0.1")
9036 (source (origin
9037 (method url-fetch)
9038 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9039 "org.osgi.namespace.extender/"
9040 version "/org.osgi.namespace.extender-"
9041 version "-sources.jar"))
9042 (sha256
9043 (base32
9044 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9045 (build-system ant-build-system)
9046 (inputs
9047 `(("resource" ,java-osgi-resource)
9048 ("annotation" ,java-osgi-annotation)))
9049 (arguments
9050 `(#:jar-name "osgi-namespace-extendent.jar"
9051 #:tests? #f)); no tests
9052 (home-page "https://www.osgi.org")
9053 (synopsis "Extender Capability and Requirement Namespace")
9054 (description
9055 "OSGi, for Open Services Gateway initiative framework, is a module system
9056 and service platform for the Java programming language. This package contains
9057 the names for the attributes and directives for an extender namespace.")
9058 (license license:asl2.0)))
9059
9060 (define-public java-osgi-namespace-service
9061 (package
9062 (name "java-osgi-namespace-service")
9063 (version "1.0.0")
9064 (source (origin
9065 (method url-fetch)
9066 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9067 "org.osgi.namespace.service/"
9068 version "/org.osgi.namespace.service-"
9069 version "-sources.jar"))
9070 (sha256
9071 (base32
9072 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9073 (build-system ant-build-system)
9074 (inputs
9075 `(("resource" ,java-osgi-resource)
9076 ("annotation" ,java-osgi-annotation)))
9077 (arguments
9078 `(#:jar-name "osgi-namespace-service.jar"
9079 #:tests? #f)); no tests
9080 (home-page "https://www.osgi.org")
9081 (synopsis "Service Capability and Requirement Namespace")
9082 (description
9083 "OSGi, for Open Services Gateway initiative framework, is a module system
9084 and service platform for the Java programming language. This package contains
9085 the names for the attributes and directives for a service namespace.")
9086 (license license:asl2.0)))
9087
9088 (define-public java-osgi-util-function
9089 (package
9090 (name "java-osgi-util-function")
9091 (version "1.0.0")
9092 (source (origin
9093 (method url-fetch)
9094 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9095 "org.osgi.util.function/"
9096 version "/org.osgi.util.function-"
9097 version "-sources.jar"))
9098 (sha256
9099 (base32
9100 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9101 (build-system ant-build-system)
9102 (arguments
9103 `(#:jar-name "osgi-util-function.jar"
9104 #:tests? #f)); no tests
9105 (inputs
9106 `(("annotation" ,java-osgi-annotation)))
9107 (home-page "https://www.osgi.org")
9108 (synopsis "OSGI Util Function")
9109 (description
9110 "OSGi, for Open Services Gateway initiative framework, is a module system
9111 and service platform for the Java programming language. This package contains
9112 an interface for a function that accepts a single argument and produces a result.")
9113 (license license:asl2.0)))
9114
9115 (define-public java-osgi-util-promise
9116 (package
9117 (name "java-osgi-util-promise")
9118 (version "1.0.0")
9119 (source (origin
9120 (method url-fetch)
9121 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9122 "org.osgi.util.promise/"
9123 version "/org.osgi.util.promise-"
9124 version "-sources.jar"))
9125 (sha256
9126 (base32
9127 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9128 (build-system ant-build-system)
9129 (arguments
9130 `(#:jar-name "osgi-util-promise.jar"
9131 #:tests? #f)); no tests
9132 (inputs
9133 `(("annotation" ,java-osgi-annotation)
9134 ("function" ,java-osgi-util-function)))
9135 (home-page "https://www.osgi.org")
9136 (synopsis "Promise of a value")
9137 (description
9138 "OSGi, for Open Services Gateway initiative framework, is a module system
9139 and service platform for the Java programming language. This package contains
9140 an interface and utilitary classes for promises. A Promise represents a future
9141 value. It handles the interactions for asynchronous processing.")
9142 (license license:asl2.0)))
9143
9144 (define-public java-osgi-service-metatype-annotations
9145 (package
9146 (name "java-osgi-service-metatype-annotations")
9147 (version "1.3.0")
9148 (source (origin
9149 (method url-fetch)
9150 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9151 "org.osgi.service.metatype.annotations/"
9152 version "/org.osgi.service.metatype.annotations-"
9153 version "-sources.jar"))
9154 (sha256
9155 (base32
9156 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9157 (build-system ant-build-system)
9158 (arguments
9159 `(#:jar-name "osgi-service-metatype-annotations.jar"
9160 #:tests? #f)); no tests
9161 (inputs
9162 `(("annotation" ,java-osgi-annotation)))
9163 (home-page "https://www.osgi.org")
9164 (synopsis "Support annotations for metatype")
9165 (description
9166 "OSGi, for Open Services Gateway initiative framework, is a module system
9167 and service platform for the Java programming language. This package contains
9168 the support annotations for metatype.")
9169 (license license:asl2.0)))
9170
9171 (define-public java-osgi-service-repository
9172 (package
9173 (name "java-osgi-service-repository")
9174 (version "1.1.0")
9175 (source (origin
9176 (method url-fetch)
9177 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9178 "org.osgi.service.repository/"
9179 version "/org.osgi.service.repository-"
9180 version "-sources.jar"))
9181 (sha256
9182 (base32
9183 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9184 (build-system ant-build-system)
9185 (arguments
9186 `(#:jar-name "osgi-service-repository.jar"
9187 #:tests? #f)); no tests
9188 (inputs
9189 `(("annotation" ,java-osgi-annotation)
9190 ("promise" ,java-osgi-util-promise)
9191 ("resource" ,java-osgi-resource)))
9192 (home-page "https://www.osgi.org")
9193 (synopsis "OSGI service repository")
9194 (description
9195 "OSGi, for Open Services Gateway initiative framework, is a module system
9196 and service platform for the Java programming language. This package contains
9197 a repository service that contains resources.")
9198 (license license:asl2.0)))
9199
9200 (define-public java-osgi-framework
9201 (package
9202 (name "java-osgi-framework")
9203 (version "1.8.0")
9204 (source (origin
9205 (method url-fetch)
9206 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9207 "org.osgi.framework/" version "/org.osgi.framework-"
9208 version "-sources.jar"))
9209 (sha256
9210 (base32
9211 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9212 (build-system ant-build-system)
9213 (arguments
9214 `(#:jar-name "osgi-framework.jar"
9215 #:tests? #f)); no tests
9216 (inputs
9217 `(("annotation" ,java-osgi-annotation)
9218 ("resource" ,java-osgi-resource)
9219 ("dto" ,java-osgi-dto)))
9220 (home-page "https://www.osgi.org")
9221 (synopsis "OSGi framework")
9222 (description
9223 "OSGi, for Open Services Gateway initiative framework, is a module system
9224 and service platform for the Java programming language.")
9225 (license license:asl2.0)))
9226
9227 (define-public java-osgi-service-log
9228 (package
9229 (name "java-osgi-service-log")
9230 (version "1.3.0")
9231 (source (origin
9232 (method url-fetch)
9233 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9234 "org.osgi.service.log/"
9235 version "/org.osgi.service.log-"
9236 version "-sources.jar"))
9237 (sha256
9238 (base32
9239 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9240 (build-system ant-build-system)
9241 (arguments
9242 `(#:jar-name "osgi-service-log.jar"
9243 #:tests? #f)); no tests
9244 (inputs
9245 `(("java-osgi-framework" ,java-osgi-framework)))
9246 (home-page "https://www.osgi.org")
9247 (synopsis "Provides methods for bundles to write messages to the log")
9248 (description
9249 "OSGi, for Open Services Gateway initiative framework, is a module system
9250 and service platform for the Java programming language. This package contains
9251 the log service.")
9252 (license license:asl2.0)))
9253
9254 (define-public java-osgi-service-jdbc
9255 (package
9256 (name "java-osgi-service-jdbc")
9257 (version "1.0.0")
9258 (source (origin
9259 (method url-fetch)
9260 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9261 "org.osgi.service.jdbc/"
9262 version "/org.osgi.service.jdbc-"
9263 version "-sources.jar"))
9264 (sha256
9265 (base32
9266 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9267 (build-system ant-build-system)
9268 (arguments
9269 `(#:jar-name "osgi-service-jdbc.jar"
9270 #:tests? #f)); no tests
9271 (home-page "https://www.osgi.org")
9272 (synopsis "Factory for JDBC connection factories")
9273 (description
9274 "OSGi, for Open Services Gateway initiative framework, is a module system
9275 and service platform for the Java programming language. This package contains
9276 a factory for JDBC connection factories. There are 3 preferred connection
9277 factories for getting JDBC connections:
9278
9279 @itemize
9280 @item @code{javax.sql.DataSource};
9281 @item @code{javax.sql.ConnectionPoolDataSource};
9282 @item @code{javax.sql.XADataSource}.
9283 @end itemize")
9284 (license license:asl2.0)))
9285
9286 (define-public java-osgi-service-resolver
9287 (package
9288 (name "java-osgi-service-resolver")
9289 (version "1.0.1")
9290 (source (origin
9291 (method url-fetch)
9292 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9293 "org.osgi.service.resolver/"
9294 version "/org.osgi.service.resolver-"
9295 version "-sources.jar"))
9296 (sha256
9297 (base32
9298 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9299 (build-system ant-build-system)
9300 (arguments
9301 `(#:jar-name "osgi-service-resolver.jar"
9302 #:tests? #f)); no tests
9303 (inputs
9304 `(("annotation" ,java-osgi-annotation)
9305 ("resource" ,java-osgi-resource)))
9306 (home-page "https://www.osgi.org")
9307 (synopsis "OSGI Resolver service")
9308 (description
9309 "OSGi, for Open Services Gateway initiative framework, is a module system
9310 and service platform for the Java programming language. This package contains
9311 a resolver service that resolves the specified resources in the context supplied
9312 by the caller.")
9313 (license license:asl2.0)))
9314
9315 (define-public java-osgi-util-tracker
9316 (package
9317 (name "java-osgi-util-tracker")
9318 (version "1.5.1")
9319 (source (origin
9320 (method url-fetch)
9321 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9322 "org.osgi.util.tracker/"
9323 version "/org.osgi.util.tracker-"
9324 version "-sources.jar"))
9325 (sha256
9326 (base32
9327 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9328 (build-system ant-build-system)
9329 (arguments
9330 `(#:jar-name "osgi-util-tracker.jar"
9331 #:tests? #f)); no tests
9332 (inputs
9333 `(("framework" ,java-osgi-framework)
9334 ("annotation" ,java-osgi-annotation)))
9335 (home-page "https://www.osgi.org")
9336 (synopsis "Bundle tracking")
9337 (description
9338 "OSGi, for Open Services Gateway initiative framework, is a module system
9339 and service platform for the Java programming language. This package contains
9340 bundle tracking utility classes.")
9341 (license license:asl2.0)))
9342
9343 (define-public java-osgi-service-cm
9344 (package
9345 (name "java-osgi-service-cm")
9346 (version "1.5.0")
9347 (source (origin
9348 (method url-fetch)
9349 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9350 "org.osgi.service.cm/"
9351 version "/org.osgi.service.cm-"
9352 version "-sources.jar"))
9353 (sha256
9354 (base32
9355 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9356 (build-system ant-build-system)
9357 (arguments
9358 `(#:jar-name "osgi-service-cm.jar"
9359 #:tests? #f)); no tests
9360 (inputs
9361 `(("framework" ,java-osgi-framework)
9362 ("annotation" ,java-osgi-annotation)))
9363 (home-page "https://www.osgi.org")
9364 (synopsis "OSGI Configuration Management")
9365 (description
9366 "OSGi, for Open Services Gateway initiative framework, is a module system
9367 and service platform for the Java programming language. This package contains
9368 utility classes for the configuration of services.")
9369 (license license:asl2.0)))
9370
9371 (define-public java-osgi-service-packageadmin
9372 (package
9373 (name "java-osgi-service-packageadmin")
9374 (version "1.2.0")
9375 (source (origin
9376 (method url-fetch)
9377 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9378 "org.osgi.service.packageadmin/"
9379 version "/org.osgi.service.packageadmin-"
9380 version "-sources.jar"))
9381 (sha256
9382 (base32
9383 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9384 (build-system ant-build-system)
9385 (arguments
9386 `(#:jar-name "osgi-service-packageadmin.jar"
9387 #:tests? #f)); no tests
9388 (inputs
9389 `(("framework" ,java-osgi-framework)))
9390 (home-page "https://www.osgi.org")
9391 (synopsis "OSGI Package Administration")
9392 (description
9393 "OSGi, for Open Services Gateway initiative framework, is a module system
9394 and service platform for the Java programming language. This package contains
9395 the packageadmin service.")
9396 (license license:asl2.0)))
9397
9398 (define-public java-ops4j-base-lang
9399 (package
9400 (name "java-ops4j-base-lang")
9401 (version "1.5.0")
9402 (source (origin
9403 (method url-fetch)
9404 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9405 "archive/base-" version ".tar.gz"))
9406 (sha256
9407 (base32
9408 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9409 (build-system ant-build-system)
9410 (arguments
9411 `(#:jar-name "java-ops4j-base-lang.jar"
9412 #:source-dir "ops4j-base-lang/src/main/java"
9413 #:tests? #f; no tests
9414 #:phases
9415 (modify-phases %standard-phases
9416 (add-before 'build 'add-test-file
9417 (lambda _
9418 ;; That file is required by a test in ops4j-pax-exam-core-spi
9419 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9420 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9421 (lambda _
9422 (display
9423 (string-append
9424 "version=" ,version "\n"
9425 "groupId=org.ops4j.base"
9426 "artifactId=ops4j-base-lang\n"))))
9427 #t)))))
9428 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9429 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9430 (description "OPS4J stands for Open Participation Software for Java. This
9431 package contains utilities and extensions related to @code{java.lang}.")
9432 (license license:asl2.0)))
9433
9434 (define-public java-ops4j-base-monitors
9435 (package
9436 (inherit java-ops4j-base-lang)
9437 (name "java-ops4j-base-monitors")
9438 (arguments
9439 `(#:jar-name "java-ops4j-base-monitors.jar"
9440 #:source-dir "ops4j-base-monitors/src/main/java"
9441 #:tests? #f)); no tests
9442 (inputs
9443 `(("lang" ,java-ops4j-base-lang)))
9444 (description "OPS4J stands for Open Participation Software for Java. This
9445 package contains utilities and extensions related to monitoring.")))
9446
9447 (define-public java-ops4j-base-io
9448 (package
9449 (inherit java-ops4j-base-lang)
9450 (name "java-ops4j-base-io")
9451 (arguments
9452 `(#:jar-name "java-ops4j-base-io.jar"
9453 #:source-dir "ops4j-base-io/src/main/java"
9454 #:test-dir "ops4j-base-io/src/test"
9455 #:test-exclude
9456 (list "**/ListerTest.java")))
9457 (inputs
9458 `(("lang" ,java-ops4j-base-monitors)
9459 ("lang" ,java-ops4j-base-lang)))
9460 (native-inputs
9461 `(("junit" ,java-junit)
9462 ("hamcrest" ,java-hamcrest-core)))
9463 (description "OPS4J stands for Open Participation Software for Java. This
9464 package contains utilities and extensions related to handling streams and files.")))
9465
9466 (define-public java-ops4j-base-util
9467 (package
9468 (inherit java-ops4j-base-lang)
9469 (name "java-ops4j-base-util")
9470 (arguments
9471 `(#:jar-name "java-ops4j-base-util.jar"
9472 #:source-dir "ops4j-base-util/src/main/java"
9473 #:test-dir "ops4j-base-util/src/test"))
9474 (inputs
9475 `(("lang" ,java-ops4j-base-lang)))
9476 (native-inputs
9477 `(("junit" ,java-junit)))
9478 (description "OPS4J stands for Open Participation Software for Java. This
9479 package contains utilities and extensions related to environment, i18n and
9480 mime types.")))
9481
9482 (define-public java-ops4j-base-util-property
9483 (package
9484 (inherit java-ops4j-base-lang)
9485 (name "java-ops4j-base-util-property")
9486 (arguments
9487 `(#:jar-name "java-ops4j-base-util-property.jar"
9488 #:source-dir "ops4j-base-util-property/src/main/java"
9489 #:tests? #f)); no tests
9490 (inputs
9491 `(("lang" ,java-ops4j-base-lang)
9492 ("util" ,java-ops4j-base-util)))
9493 (description "OPS4J stands for Open Participation Software for Java. This
9494 package contains utilities and extensions related to resolving properties from
9495 different sources.")))
9496
9497 (define-public java-ops4j-base-store
9498 (package
9499 (inherit java-ops4j-base-lang)
9500 (name "java-ops4j-base-store")
9501 (arguments
9502 `(#:jar-name "java-ops4j-base-store.jar"
9503 #:source-dir "ops4j-base-store/src/main/java"
9504 #:tests? #f)); no tests
9505 (inputs
9506 `(("lang" ,java-ops4j-base-lang)
9507 ("slf4j" ,java-slf4j-api)
9508 ("io" ,java-ops4j-base-io)))
9509 (description "OPS4J stands for Open Participation Software for Java. This
9510 package contains utilities for storing and retrieving data from an
9511 @code{InputStream}.")))
9512
9513 (define-public java-ops4j-base-spi
9514 (package
9515 (inherit java-ops4j-base-lang)
9516 (name "java-ops4j-base-spi")
9517 (arguments
9518 `(#:jar-name "java-ops4j-base-spi.jar"
9519 #:source-dir "ops4j-base-spi/src/main/java"
9520 #:test-dir "ops4j-base-spi/src/test"))
9521 (native-inputs
9522 `(("junit" ,java-junit)
9523 ("hamcrest" ,java-hamcrest-core)))
9524 (description "OPS4J stands for Open Participation Software for Java. This
9525 package contains utilities for obtaining services via the Java SE 6
9526 @code{ServiceLoader}.")))
9527
9528 (define-public java-aqute-bnd-annotation
9529 (package
9530 (name "java-aqute-bnd-annotation")
9531 (version "3.5.0")
9532 (source (origin
9533 (method url-fetch)
9534 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9535 version ".REL.tar.gz"))
9536 (file-name (string-append name "-" version ".tar.gz"))
9537 (sha256
9538 (base32
9539 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9540 (build-system ant-build-system)
9541 (arguments
9542 `(#:jar-name "java-aqute-bnd-annotation.jar"
9543 #:source-dir "biz.aQute.bnd.annotation/src"
9544 #:tests? #f)); empty test dir
9545 (home-page "https://bnd.bndtools.org/")
9546 (synopsis "Tools for OSGi")
9547 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9548 headers based on analyzing the class code, it verifies the project settings,
9549 it manages project dependencies, gives diffs jars, and much more.")
9550 (license license:asl2.0)))
9551
9552 (define-public java-aqute-libg
9553 (package
9554 (inherit java-aqute-bnd-annotation)
9555 (name "java-aqute-libg")
9556 (arguments
9557 `(#:jar-name "java-aqute-libg.jar"
9558 ;; The build fails when source/target more recent than 1.7. This
9559 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9560 ;;
9561 ;; It is closed as won't fix. There is no way to change the source
9562 ;; so that it works on 1.8, and still works on 1.6, the upstream
9563 ;; target. It work fine on 1.7, so we use 1.7.
9564 #:make-flags (list "-Dant.build.javac.source=1.7"
9565 "-Dant.build.javac.target=1.7")
9566 #:phases
9567 (modify-phases %standard-phases
9568 (add-before 'configure 'chdir
9569 ;; Change to aQute.libg directory, so that the relative
9570 ;; paths in the tests aren't broken.
9571 (lambda _
9572 (chdir "aQute.libg")
9573 #t))
9574 (add-before 'check 'create-test-directory
9575 ;; Copy the test directory to test/java, since that's where
9576 ;; ant-build-system's default project in build.xml expects to find
9577 ;; the test classes. Leave a copy in the original place to not
9578 ;; break paths in tests.
9579 (lambda _
9580 (mkdir "src/test")
9581 (copy-recursively "test" "src/test/java")
9582 #t)))))
9583 (inputs
9584 `(("slf4j" ,java-slf4j-api)
9585 ("osgi-annot" ,java-osgi-annotation)
9586 ("java-osgi-cmpn" ,java-osgi-cmpn)
9587 ("osgi" ,java-osgi-core)))
9588 (native-inputs
9589 `(("hamcrest" ,java-hamcrest-core)
9590 ("java-junit" ,java-junit)))))
9591
9592 (define-public java-aqute-bndlib
9593 (package
9594 (inherit java-aqute-bnd-annotation)
9595 (name "java-aqute-bndlib")
9596 (arguments
9597 `(#:jar-name "java-bndlib.jar"
9598 #:source-dir "biz.aQute.bndlib/src"
9599 #:tests? #f)); no tests
9600 (inputs
9601 `(("slf4j" ,java-slf4j-api)
9602 ("osgi-annot" ,java-osgi-annotation)
9603 ("java-aqute-libg" ,java-aqute-libg)
9604 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
9605 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
9606 ("java-osgi-service-repository" ,java-osgi-service-repository)
9607 ("java-osgi-service-log" ,java-osgi-service-log)
9608 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
9609 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
9610 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
9611 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
9612 ("promise" ,java-osgi-util-promise)
9613 ("osgi" ,java-osgi-core)))))
9614
9615 (define-public java-ops4j-pax-tinybundles
9616 (package
9617 (name "java-ops4j-pax-tinybundles")
9618 (version "2.1.1")
9619 (source (origin
9620 (method url-fetch)
9621 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
9622 "archive/tinybundles-" version ".tar.gz"))
9623 (sha256
9624 (base32
9625 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
9626 (arguments
9627 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
9628 #:source-dir "src/main/java"
9629 #:test-exclude
9630 ;; Abstract base classes for other tests
9631 (list "**/BndTest.java" "**/CoreTest.java")
9632 #:phases
9633 (modify-phases %standard-phases
9634 (add-before 'check 'fix-version
9635 (lambda _
9636 ;; This test has a reference to an old version of bndlib we are not
9637 ;; packaging. It uses the version referenced in pom.xml. We replace
9638 ;; it with our own version.
9639 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
9640 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
9641 ,(package-version java-aqute-bndlib)))
9642 #t)))))
9643 (inputs
9644 `(("lang" ,java-ops4j-base-lang)
9645 ("io" ,java-ops4j-base-io)
9646 ("store" ,java-ops4j-base-store)
9647 ("slf4j" ,java-slf4j-api)
9648 ("libg" ,java-aqute-libg)
9649 ("bndlib" ,java-aqute-bndlib)))
9650 (native-inputs
9651 `(("junit" ,java-junit)
9652 ("hamcrest" ,java-hamcrest-core)
9653 ("log4j" ,java-log4j-api)
9654 ("bndannotation" ,java-aqute-bnd-annotation)
9655 ("framework" ,java-osgi-framework)))
9656 (build-system ant-build-system)
9657 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
9658 (synopsis "Java APIs to create OSGi related artifacts")
9659 (description "Tinybundles is all about creating OSGi related artifacts like
9660 Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
9661 to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
9662 other hand, this library can be a foundation of real end user tools that need
9663 to create those artifacts.")
9664 (license license:asl2.0)))
9665
9666 (define-public java-ops4j-pax-exam-core
9667 (package
9668 (name "java-ops4j-pax-exam-core")
9669 (version "4.11.0")
9670 (source (origin
9671 (method url-fetch)
9672 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
9673 "archive/exam-reactor-" version ".tar.gz"))
9674 (sha256
9675 (base32
9676 "08mzw8nkah3rj3vznlplnawspxhp61zgvb44ifqa1rni1cvbms2g"))))
9677 (arguments
9678 `(#:jar-name "java-ops4j-pax-exam-core.jar"
9679 #:source-dir "core/pax-exam/src/main/java"
9680 #:test-dir "core/pax-exam/src/test"))
9681 (inputs
9682 `(("slf4j" ,java-slf4j-api)
9683 ("lang" ,java-ops4j-base-lang)
9684 ("io" ,java-ops4j-base-io)
9685 ("util-property" ,java-ops4j-base-util-property)
9686 ("util-store" ,java-ops4j-base-store)
9687 ("java-osgi-core" ,java-osgi-core)))
9688 (native-inputs
9689 `(("junit" ,java-junit)
9690 ("hamcrest" ,java-hamcrest-core)))
9691 (build-system ant-build-system)
9692 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
9693 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
9694 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
9695 the user take control of the OSGi framework, the test framework (e.g. JUnit) and
9696 the system under test at the same time.")
9697 (license license:asl2.0)))
9698
9699 (define-public java-ops4j-pax-exam-core-spi
9700 (package
9701 (inherit java-ops4j-pax-exam-core)
9702 (name "java-ops4j-pax-exam-core-spi")
9703 (arguments
9704 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
9705 #:source-dir "src/main/java"
9706 #:test-exclude
9707 (list
9708 ;; Abstract base class, not a test
9709 "**/BaseStagedReactorTest.java"
9710 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
9711 "**/WarBuilderTest.java")
9712 #:phases
9713 (modify-phases %standard-phases
9714 (add-before 'configure 'chdir
9715 (lambda _
9716 ;; Tests assume we are in this directory
9717 (chdir "core/pax-exam-spi")
9718 #t))
9719 (add-before 'check 'fix-tests
9720 (lambda _
9721 ;; One test checks that this file is present.
9722 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
9723 (with-output-to-file
9724 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
9725 (lambda _
9726 (display
9727 (string-append "artifactId = pax-exam-spi\n"
9728 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
9729 ;; Maven puts compilation results in the target directory, while we
9730 ;; put them in the build directory.
9731 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
9732 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
9733 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
9734 (("target") "build"))
9735 ;; One test is expected to fail, but it doesn't throw the expected exception
9736 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
9737 (("AssertionError") "IllegalArgumentException"))
9738 #t)))))
9739 (inputs
9740 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
9741 ("lang" ,java-ops4j-base-lang)
9742 ("monitors" ,java-ops4j-base-monitors)
9743 ("store" ,java-ops4j-base-store)
9744 ("io" ,java-ops4j-base-io)
9745 ("spi" ,java-ops4j-base-spi)
9746 ("osgi" ,java-osgi-core)
9747 ("slf4j" ,java-slf4j-api)
9748 ("tinybundles" ,java-ops4j-pax-tinybundles)))
9749 (native-inputs
9750 `(("mockito" ,java-mockito-1)
9751 ("junit" ,java-junit)
9752 ("hamcrest" ,java-hamcrest-core)
9753 ("cglib" ,java-cglib)
9754 ("objenesis" ,java-objenesis)
9755 ("asm" ,java-asm)))))
9756
9757 (define-public java-ops4j-pax-exam-core-junit
9758 (package
9759 (inherit java-ops4j-pax-exam-core)
9760 (name "java-ops4j-pax-exam-core-junit")
9761 (arguments
9762 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
9763 #:source-dir "drivers/pax-exam-junit4/src/main/java"
9764 #:tests? #f)); no tests
9765 (inputs
9766 `(("junit" ,java-junit)
9767 ("slf4j" ,java-slf4j-api)
9768 ("core" ,java-ops4j-pax-exam-core)
9769 ("spi" ,java-ops4j-pax-exam-core-spi)))
9770 (native-inputs '())))
9771
9772 (define-public java-fasterxml-jackson-annotations
9773 (package
9774 (name "java-fasterxml-jackson-annotations")
9775 (version "2.9.4")
9776 (source (origin
9777 (method url-fetch)
9778 (uri (string-append "https://github.com/FasterXML/"
9779 "jackson-annotations/archive/"
9780 "jackson-annotations-" version ".tar.gz"))
9781 (sha256
9782 (base32
9783 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
9784 (build-system ant-build-system)
9785 (arguments
9786 `(#:jar-name "jackson-annotations.jar"
9787 #:source-dir "src/main/java"
9788 #:test-dir "src/test"))
9789 (native-inputs
9790 `(("junit" ,java-junit)))
9791 (home-page "https://github.com/FasterXML/jackson-annotations")
9792 (synopsis "General purpose annotations for the Jackson Data Processor")
9793 (description "This package contains general purpose annotations for the
9794 Jackson Data Processor, used on value and handler types. The only annotations
9795 not included are ones that require dependency to the Databind package.")
9796 (license license:asl2.0)))
9797
9798 (define-public java-fasterxml-jackson-core
9799 (package
9800 (name "java-fasterxml-jackson-core")
9801 (version "2.9.4")
9802 (source (origin
9803 (method url-fetch)
9804 (uri (string-append "https://github.com/FasterXML/"
9805 "jackson-core/archive/"
9806 "jackson-core-" version ".tar.gz"))
9807 (sha256
9808 (base32
9809 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
9810 (build-system ant-build-system)
9811 (arguments
9812 `(#:jar-name "jackson-core.jar"
9813 #:source-dir "src/main/java"
9814 #:test-dir "src/test"
9815 #:test-exclude
9816 (list
9817 ;; Expected failure. pom.xml excludes these
9818 "**/failing/**"
9819 ;; Base classes that have no constructor for junit
9820 "**/BaseTest.java"
9821 "**/ConcurrencyReadTest.java"
9822 "**/ManualCharAccessTest.java"
9823 "**/ManualCharAccessTest.java"
9824 "**/TrailingCommasTest.java"
9825 "**/AsyncMissingValuesInObjectTest.java"
9826 "**/AsyncMissingValuesInArrayTest.java")
9827 #:phases
9828 (modify-phases %standard-phases
9829 (add-before 'configure 'generate-PackageVersion.java
9830 (lambda _
9831 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
9832 (in (string-append out ".in")))
9833 (copy-file in out)
9834 (substitute* out
9835 (("@package@") "com.fasterxml.jackson.core.json")
9836 (("@projectversion@") ,version)
9837 (("@projectgroupid@") "com.fasterxml.jackson.core")
9838 (("@projectartifactid@") "jackson-core")))
9839 #t))
9840 (add-before 'build 'copy-resources
9841 (lambda _
9842 (copy-recursively "src/main/resources"
9843 "build/classes")
9844 #t))
9845 (add-before 'check 'copy-test-resources
9846 (lambda _
9847 (copy-recursively "src/test/resources"
9848 "build/test-classes")
9849 #t)))))
9850 (native-inputs
9851 `(("junit" ,java-junit)
9852 ("hamcrest" ,java-hamcrest-core)))
9853 (home-page "https://github.com/FasterXML/jackson-core")
9854 (synopsis "Low-level streaming parser and generator abstractions")
9855 (description "This package contains core low-level incremental
9856 (streaming) parser and generator abstractions used by the Jackson Data
9857 Processor. It also includes the default implementation of handler types
9858 (parser, generator) that handle JSON format.")
9859 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9860
9861 (define-public java-fasterxml-jackson-databind
9862 (package
9863 (name "java-fasterxml-jackson-databind")
9864 (version "2.9.4")
9865 (source (origin
9866 (method url-fetch)
9867 (uri (string-append "https://github.com/FasterXML/"
9868 "jackson-databind/archive/"
9869 "jackson-databind-" version ".tar.gz"))
9870 (sha256
9871 (base32
9872 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
9873 (build-system ant-build-system)
9874 (arguments
9875 `(#:jar-name "jackson-databind.jar"
9876 #:source-dir "src/main/java"
9877 #:tests? #f; requires javax.measures for which I can't find a free implementation
9878 #:phases
9879 (modify-phases %standard-phases
9880 (add-before 'configure 'generate-PackageVersion.java
9881 (lambda _
9882 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
9883 (in (string-append out ".in")))
9884 (copy-file in out)
9885 (substitute* out
9886 (("@package@") "com.fasterxml.jackson.databind.cfg")
9887 (("@projectversion@") ,version)
9888 (("@projectgroupid@") "com.fasterxml.jackson.databind")
9889 (("@projectartifactid@") "jackson-databind")))
9890 #t))
9891 (add-before 'build 'copy-resources
9892 (lambda _
9893 (copy-recursively "src/main/resources" "build/classes")
9894 #t)))))
9895 (inputs
9896 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9897 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)))
9898 (home-page "https://github.com/FasterXML/jackson-databind")
9899 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
9900 (description "This package contains the general-purpose data-binding
9901 functionality and tree-model for Jackson Data Processor. It builds on core
9902 streaming parser/generator package, and uses Jackson Annotations for
9903 configuration.")
9904 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9905
9906 (define-public java-fasterxml-jackson-modules-base-jaxb
9907 (package
9908 (name "java-fasterxml-jackson-modules-base-jaxb")
9909 (version "2.9.4")
9910 (source (origin
9911 (method url-fetch)
9912 (uri (string-append "https://github.com/FasterXML/"
9913 "jackson-modules-base/archive/"
9914 "jackson-modules-base-" version ".tar.gz"))
9915 (sha256
9916 (base32
9917 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9918 (build-system ant-build-system)
9919 (arguments
9920 `(#:jar-name "jackson-modules-base-jaxb.jar"
9921 #:source-dir "jaxb/src/main/java"
9922 #:test-dir "jaxb/src/test"
9923 #:test-exclude
9924 ;; Base class for tests
9925 (list "**/BaseJaxbTest.java")
9926 #:phases
9927 (modify-phases %standard-phases
9928 (add-before 'configure 'generate-PackageVersion.java
9929 (lambda _
9930 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
9931 "jackson/module/jaxb/PackageVersion.java"))
9932 (in (string-append out ".in")))
9933 (copy-file in out)
9934 (substitute* out
9935 (("@package@") "com.fasterxml.jackson.module.jaxb")
9936 (("@projectversion@") ,version)
9937 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
9938 (("@projectartifactid@") "jackson-module-jaxb")))
9939 #t))
9940 (add-before 'build 'copy-resources
9941 (lambda _
9942 (copy-recursively "jaxb/src/main/resources" "build/classes")
9943 #t)))))
9944 (inputs
9945 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
9946 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9947 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9948 (native-inputs
9949 `(("java-junit" ,java-junit)))
9950 (home-page "https://github.com/FasterXML/jackson-modules-base")
9951 (synopsis "Jaxb annotations jackson module")
9952 (description "This package is the jaxb annotations module for jackson.")
9953 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
9954
9955 (define-public java-fasterxml-jackson-modules-base-mrbean
9956 (package
9957 (name "java-fasterxml-jackson-modules-base-mrbean")
9958 (version "2.9.4")
9959 (source (origin
9960 (method url-fetch)
9961 (uri (string-append "https://github.com/FasterXML/"
9962 "jackson-modules-base/archive/"
9963 "jackson-modules-base-" version ".tar.gz"))
9964 (sha256
9965 (base32
9966 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
9967 (build-system ant-build-system)
9968 (arguments
9969 `(#:jar-name "jackson-modules-base-mrbean.jar"
9970 #:source-dir "mrbean/src/main/java"
9971 #:test-dir "mrbean/src/test"
9972 #:test-exclude
9973 ;; Base class for tests
9974 (list "**/BaseTest.java")
9975 #:phases
9976 (modify-phases %standard-phases
9977 (add-before 'configure 'generate-PackageVersion.java
9978 (lambda _
9979 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
9980 "jackson/module/mrbean/PackageVersion.java"))
9981 (in (string-append out ".in")))
9982 (copy-file in out)
9983 (substitute* out
9984 (("@package@") "com.fasterxml.jackson.module.mrbean")
9985 (("@projectversion@") ,version)
9986 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
9987 (("@projectartifactid@") "jackson-module-mrbean")))
9988 #t)))))
9989 (inputs
9990 `(("java-asm" ,java-asm)
9991 ("java-fasterxml-jackson-annotations"
9992 ,java-fasterxml-jackson-annotations)
9993 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
9994 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)))
9995 (native-inputs
9996 `(("java-junit" ,java-junit)))
9997 (home-page "https://github.com/FasterXML/jackson-modules-base")
9998 (synopsis "POJO type materialization for Java")
9999 (description "This package implements POJO type materialization.
10000 Databinders can construct implementation classes for Java interfaces as part
10001 of deserialization.")
10002 (license license:asl2.0)))
10003
10004 (define-public java-snakeyaml
10005 (package
10006 (name "java-snakeyaml")
10007 (version "1.18")
10008 (source (origin
10009 (method url-fetch)
10010 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10011 version ".tar.gz"))
10012 (file-name (string-append name "-" version ".tar.gz"))
10013 (sha256
10014 (base32
10015 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10016 (build-system ant-build-system)
10017 (arguments
10018 `(#:jar-name "java-snakeyaml.jar"
10019 #:source-dir "src/main/java"
10020 ;; Tests require velocity, a cyclic dependency, and
10021 ;; java-spring-framework-context which is not packaged.
10022 #:tests? #f))
10023 (home-page "https://bitbucket.org/asomov/snakeyaml")
10024 (synopsis "YAML processor")
10025 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10026 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10027
10028 (define-public java-fasterxml-jackson-dataformat-yaml
10029 (package
10030 (name "java-fasterxml-jackson-dataformat-yaml")
10031 (version "2.9.4")
10032 (source (origin
10033 (method url-fetch)
10034 (uri (string-append "https://github.com/FasterXML/"
10035 "jackson-dataformats-text/archive/"
10036 "jackson-dataformats-text-" version ".tar.gz"))
10037 (sha256
10038 (base32
10039 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10040 (build-system ant-build-system)
10041 (arguments
10042 `(#:jar-name "jackson-dataformat-yaml.jar"
10043 #:source-dir "yaml/src/main/java"
10044 #:test-dir "yaml/src/test"
10045 #:test-exclude (list "**/failing/**.java")
10046 #:phases
10047 (modify-phases %standard-phases
10048 (add-before 'configure 'generate-PackageVersion.java
10049 (lambda _
10050 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10051 (in (string-append out ".in")))
10052 (copy-file in out)
10053 (substitute* out
10054 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10055 (("@projectversion@") ,version)
10056 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10057 (("@projectartifactid@") "jackson-dataformat-yaml")))
10058 #t)))))
10059 (inputs
10060 `(("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
10061 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
10062 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
10063 ("java-snakeyaml" ,java-snakeyaml)))
10064 (native-inputs
10065 `(("junit" ,java-junit)
10066 ("hamcrest" ,java-hamcrest-core)
10067 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10068 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10069 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10070 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10071 (synopsis "Yaml backend for Jackson")
10072 (description "Dataformat backends are used to support format alternatives
10073 to JSON, supported by default. This is done by sub-classing Jackson core
10074 abstractions.")
10075 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10076
10077 (define-public java-stax2-api
10078 (package
10079 (name "java-stax2-api")
10080 (version "4.0.0")
10081 (source (origin
10082 (method url-fetch)
10083 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10084 "stax2-api-" version ".tar.gz"))
10085 (sha256
10086 (base32
10087 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10088 (build-system ant-build-system)
10089 (arguments
10090 `(#:jar-name "java-stax2-api.jar"
10091 #:source-dir "src/main/java"
10092 #:tests? #f)); no tests
10093 (home-page "https://github.com/FasterXML/stax2-api")
10094 (synopsis "Stax2 API")
10095 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10096 significant new functionalities, such as full-featured bi-direction validation
10097 interface and high-performance Typed Access API.")
10098 (license license:bsd-2)))
10099
10100 (define-public java-woodstox-core
10101 (package
10102 (name "java-woodstox-core")
10103 (version "5.0.3")
10104 (source (origin
10105 (method git-fetch)
10106 (uri (git-reference
10107 (url "https://github.com/FasterXML/woodstox")
10108 (commit (string-append "woodstox-core-" version))))
10109 (file-name (git-file-name name version))
10110 (sha256
10111 (base32
10112 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10113 (build-system ant-build-system)
10114 (arguments
10115 `(#:jar-name "woodstox.jar"
10116 #:test-exclude
10117 (list "**/Base*.java" "failing/**")
10118 #:phases
10119 (modify-phases %standard-phases
10120 (add-before 'build 'remove-msv-dep
10121 (lambda _
10122 ;; we don't need osgi, and it depends on msv
10123 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10124 ;; msv's latest release is from 2011 and we don't need it
10125 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10126 (delete-file-recursively "src/test/java/wstxtest/osgi")
10127 (delete-file-recursively "src/test/java/wstxtest/msv")
10128 #t))
10129 (add-before 'build 'copy-resources
10130 (lambda _
10131 (copy-recursively "src/main/resources" "build/classes")
10132 #t)))))
10133 (inputs
10134 `(("stax2" ,java-stax2-api)))
10135 (native-inputs
10136 `(("junit" ,java-junit)))
10137 (home-page "https://github.com/FasterXML/woodstox")
10138 (synopsis "Stax XML API implementation")
10139 (description "Woodstox is a stax XML API implementation.")
10140 (license license:asl2.0)))
10141
10142 (define-public java-fasterxml-jackson-dataformat-xml
10143 (package
10144 (name "java-fasterxml-jackson-dataformat-xml")
10145 (version "2.9.4")
10146 (source (origin
10147 (method git-fetch)
10148 (uri (git-reference
10149 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10150 (commit (string-append "jackson-dataformat-xml-" version))))
10151 (file-name (git-file-name name version))
10152 (sha256
10153 (base32
10154 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10155 (build-system ant-build-system)
10156 (arguments
10157 `(#:jar-name "jackson-dataformat-xml.jar"
10158 #:source-dir "src/main/java"
10159 #:test-exclude
10160 (list "**/failing/**")
10161 #:phases
10162 (modify-phases %standard-phases
10163 (add-before 'configure 'generate-PackageVersion.java
10164 (lambda _
10165 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10166 (in (string-append out ".in")))
10167 (copy-file in out)
10168 (newline)
10169 (substitute* out
10170 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10171 (("@projectversion@") ,version)
10172 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10173 (("@projectartifactid@") "jackson-dataformat-xml")))
10174 #t))
10175 (add-before 'build 'copy-resources
10176 (lambda _
10177 (copy-recursively "src/main/resources" "build/classes")
10178 #t)))))
10179 (inputs
10180 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10181 ("jackson-core" ,java-fasterxml-jackson-core)
10182 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10183 ("jackson-databind" ,java-fasterxml-jackson-databind)
10184 ("stax2-api" ,java-stax2-api)
10185 ("woodstox" ,java-woodstox-core)))
10186 (native-inputs
10187 `(("junit" ,java-junit)
10188 ("hamcrest" ,java-hamcrest-core)))
10189 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10190 (synopsis "Read and write XML")
10191 (description "This package contains Jackson extension component for reading
10192 and writing XML encoded data.
10193
10194 Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10195 approach (that is, no support is added for \"Schema-first\" approach). Support
10196 for JAXB annotations is provided by JAXB annotation module; this module
10197 provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10198 @code{JsonFactory}) as well as small number of higher level overrides needed to
10199 make data-binding work.")
10200 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10201
10202 (define-public java-hdrhistogram
10203 (package
10204 (name "java-hdrhistogram")
10205 (version "2.1.9")
10206 (source (origin
10207 (method git-fetch)
10208 (uri (git-reference
10209 (url "https://github.com/HdrHistogram/HdrHistogram")
10210 (commit (string-append "HdrHistogram-" version))))
10211 (file-name (git-file-name name version))
10212 (sha256
10213 (base32
10214 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10215 (build-system ant-build-system)
10216 (arguments
10217 `(#:jar-name "java-hdrhistogram.jar"
10218 #:source-dir "src/main/java"
10219 #:phases
10220 (modify-phases %standard-phases
10221 (add-after 'unpack 'make-files-writable
10222 (lambda _
10223 (for-each make-file-writable (find-files "."))
10224 #t))
10225 (add-before 'configure 'set-version
10226 (lambda _
10227 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10228 (template (string-append version-java ".template")))
10229 (copy-file template version-java)
10230 (substitute* version-java
10231 (("\\$VERSION\\$") ,version)
10232 (("\\$BUILD_TIME\\$") "0"))
10233 #t))))))
10234 (native-inputs
10235 `(("junit" ,java-junit)
10236 ("hamcrest" ,java-hamcrest-core)))
10237 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10238 (synopsis "High dynamic range histogram")
10239 (description "Hdrhistogram creates histograms that support
10240 recording and analyzing sampled data value counts across a configurable integer
10241 value range with configurable value precision within the range. Value precision
10242 is expressed as the number of significant digits in the value recording, and
10243 provides control over value quantization behavior across the value range and
10244 the subsequent value resolution at any given level.")
10245 (license license:public-domain)))
10246
10247 (define-public java-cofoja
10248 (package
10249 (name "java-cofoja")
10250 (version "1.3")
10251 (source (origin
10252 (method git-fetch)
10253 (uri (git-reference
10254 (url "https://github.com/nhatminhle/cofoja")
10255 (commit (string-append "v" version))))
10256 (file-name (string-append "java-cofoja-" version "-checkout"))
10257 (sha256
10258 (base32
10259 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10260 (build-system ant-build-system)
10261 (arguments
10262 `(#:build-target "dist"
10263 #:test-target "test"
10264 #:jdk ,icedtea-8
10265 #:make-flags
10266 (list "-Ddist.dir=dist")
10267 #:modules ((guix build ant-build-system)
10268 (guix build java-utils)
10269 (guix build utils)
10270 (srfi srfi-1)
10271 (ice-9 match))
10272 #:phases
10273 (modify-phases %standard-phases
10274 ;; The bulid system ignores the class path the ant-build-system sets
10275 ;; up and instead expects to find all dependencies in the "lib"
10276 ;; directory.
10277 (add-after 'unpack 'create-libdir
10278 (lambda* (#:key inputs #:allow-other-keys)
10279 (mkdir-p "lib")
10280 (for-each
10281 (lambda (file)
10282 (let ((target (string-append "lib/" (basename file))))
10283 (unless (file-exists? target)
10284 (symlink file target))))
10285 (append-map (match-lambda
10286 ((label . dir)
10287 (find-files dir "\\.jar$")))
10288 inputs))
10289 #t))
10290 (replace 'install (install-jars "dist")))))
10291 (inputs
10292 `(("java-asm" ,java-asm)))
10293 (native-inputs
10294 `(("java-junit" ,java-junit)))
10295 (home-page "https://github.com/nhatminhle/cofoja")
10296 (synopsis "Contracts for Java")
10297 (description "Contracts for Java, or Cofoja for short, is a contract
10298 programming framework and test tool for Java, which uses annotation processing
10299 and bytecode instrumentation to provide run-time checking. (In particular,
10300 this is not a static analysis tool.)")
10301 (license license:lgpl3+)))
10302
10303 (define-public java-aopalliance
10304 (package
10305 (name "java-aopalliance")
10306 (version "1.0")
10307 (source (origin
10308 (method git-fetch)
10309 ;; Note: this git repository is not official, but contains the
10310 ;; source code that is in the CVS repository. Downloading the
10311 ;; tarball from sourceforge is undeterministic, and the cvs download
10312 ;; fails.
10313 (uri (git-reference
10314 (url "https://github.com/hoverruan/aopalliance")
10315 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10316 (file-name (string-append name "-" version))
10317 (sha256
10318 (base32
10319 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10320 (build-system ant-build-system)
10321 (arguments
10322 `(#:jar-name "java-aopalliance.jar"
10323 #:jdk ,icedtea-8
10324 #:tests? #f; no tests
10325 #:source-dir "aopalliance/src/main"
10326 #:modules ((guix build ant-build-system)
10327 (guix build utils)
10328 (guix build maven pom)
10329 (guix build java-utils)
10330 (sxml simple))
10331 #:phases
10332 (modify-phases %standard-phases
10333 (add-before 'install 'create-pom
10334 (lambda _
10335 (with-output-to-file "pom.xml"
10336 (lambda _
10337 (sxml->xml
10338 `((project
10339 (modelVersion "4.0.0")
10340 (name "aopalliance")
10341 (groupId "aopalliance")
10342 (artifactId "aopalliance")
10343 (version "1.0"))))))
10344 #t))
10345 (replace 'install
10346 (install-from-pom "pom.xml")))))
10347 (home-page "http://aopalliance.sourceforge.net")
10348 (synopsis "Aspect-Oriented Programming")
10349 (description "The AOP Alliance project is a joint project between several
10350 software engineering people who are interested in Aspect-Oriented Programming
10351 (AOP) and Java.")
10352 (license license:public-domain)))
10353
10354 (define-public java-javax-inject
10355 (package
10356 (name "java-javax-inject")
10357 (version "1")
10358 (source (origin
10359 (method git-fetch)
10360 (uri (git-reference
10361 (url "https://github.com/javax-inject/javax-inject")
10362 (commit version)))
10363 (file-name (git-file-name name version))
10364 (sha256
10365 (base32
10366 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10367 (build-system ant-build-system)
10368 (arguments
10369 `(#:jar-name "java-javax-inject.jar"
10370 #:tests? #f; no tests
10371 #:phases
10372 (modify-phases %standard-phases
10373 (replace 'install
10374 (install-from-pom "pom.xml")))))
10375 (home-page "https://github.com/javax-inject/javax-inject")
10376 (synopsis "JSR-330: Dependency Injection for Java")
10377 (description "This package specifies a means for obtaining objects in such
10378 a way as to maximize reusability, testability and maintainability compared to
10379 traditional approaches such as constructors, factories, and service locators
10380 (e.g., JNDI). This process, known as dependency injection, is beneficial to
10381 most nontrivial applications.
10382
10383 Many types depend on other types. For example, a @var{Stopwatch} might depend
10384 on a @var{TimeSource}. The types on which a type depends are known as its
10385 dependencies. The process of finding an instance of a dependency to use at run
10386 time is known as resolving the dependency. If no such instance can be found,
10387 the dependency is said to be unsatisfied, and the application is broken.")
10388 (license license:asl2.0)))
10389
10390 (define-public java-guice
10391 (package
10392 (name "java-guice")
10393 (version "4.1")
10394 (source (origin
10395 (method git-fetch)
10396 (uri (git-reference
10397 (url "https://github.com/google/guice")
10398 (commit version)))
10399 (file-name (git-file-name name version))
10400 (modules '((guix build utils)))
10401 (snippet
10402 `(begin
10403 (for-each delete-file (find-files "." ".*.jar")) #t))
10404 (sha256
10405 (base32
10406 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10407 (build-system ant-build-system)
10408 (arguments
10409 `(#:jar-name "java-guice.jar"
10410 #:jdk ,icedtea-8
10411 #:tests? #f; FIXME: tests are not in a java sub directory
10412 #:source-dir "core/src"
10413 #:phases
10414 (modify-phases %standard-phases
10415 (add-after 'unpack 'make-files-writable
10416 (lambda _
10417 (for-each make-file-writable (find-files "."))
10418 #t))
10419 (replace 'install
10420 (install-from-pom "core/pom.xml")))))
10421 (propagated-inputs
10422 `(("java-aopalliance" ,java-aopalliance)
10423 ("java-asm" ,java-asm)
10424 ("java-cglib" ,java-cglib)
10425 ("java-guava" ,java-guava)
10426 ("java-javax-inject" ,java-javax-inject)
10427 ("java-guice-parent-pom" ,java-guice-parent-pom)))
10428 (home-page "https://github.com/google/guice")
10429 (synopsis "Lightweight dependency injection framework")
10430 (description "Guice is a lightweight dependency injection framework for
10431 Java 6 and above.")
10432 (license license:asl2.0)))
10433
10434 (define-public java-guice-servlet
10435 (package
10436 (inherit java-guice)
10437 (name "java-guice-servlet")
10438 (arguments
10439 `(#:jar-name "guice-servlet.jar"
10440 #:source-dir "extensions/servlet/src/"
10441 #:jdk ,icedtea-8
10442 #:tests? #f ; FIXME: not in a java subdir
10443 #:phases
10444 (modify-phases %standard-phases
10445 (add-after 'unpack 'make-files-writable
10446 (lambda _
10447 (for-each make-file-writable (find-files "."))
10448 #t)))))
10449 (inputs
10450 `(("guice" ,java-guice)
10451 ("servlet" ,java-classpathx-servletapi)
10452 ,@(package-inputs java-guice)))))
10453
10454 (define java-guice-parent-pom
10455 (package
10456 (inherit java-guice)
10457 (name "java-guice-parent-pom")
10458 (arguments
10459 `(#:tests? #f
10460 #:phases
10461 (modify-phases %standard-phases
10462 (delete 'configure)
10463 (delete 'build)
10464 (add-after 'install 'install-extensions
10465 (install-pom-file "extensions/pom.xml"))
10466 (replace 'install
10467 (install-pom-file "pom.xml")))))
10468 (propagated-inputs
10469 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10470
10471 (define java-google-parent-pom-5
10472 (package
10473 (name "java-google-parent-pom")
10474 (version "5")
10475 (source (origin
10476 (method git-fetch)
10477 (uri (git-reference
10478 (url "https://github.com/google/google-maven-parents")
10479 (commit (string-append "google-" version))))
10480 (file-name (git-file-name name version))
10481 (sha256
10482 (base32
10483 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10484 (build-system ant-build-system)
10485 (arguments
10486 `(#:tests? #f
10487 #:phases
10488 (modify-phases %standard-phases
10489 (delete 'configure)
10490 (delete 'build)
10491 (replace 'install
10492 (install-pom-file "pom.xml")))))
10493 (home-page "https://github.com/google/google-maven-parents")
10494 (synopsis "Google parent pom")
10495 (description "This package contains the Maven parent POM for other Google
10496 Java projects.")
10497 (license license:asl2.0)))
10498
10499 (define-public java-assertj
10500 (package
10501 (name "java-assertj")
10502 (version "3.8.0")
10503 (source (origin
10504 (method git-fetch)
10505 (uri (git-reference
10506 (url "https://github.com/joel-costigliola/assertj-core")
10507 (commit (string-append "assertj-core-" version))))
10508 (file-name (git-file-name name version))
10509 (sha256
10510 (base32
10511 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10512 (build-system ant-build-system)
10513 (arguments
10514 `(#:jar-name "java-assertj.jar"
10515 #:jdk ,icedtea-8
10516 #:source-dir "src/main/java"
10517 #:tests? #f)); depends on tng-junit which depends on assertj
10518 (inputs
10519 `(("cglib" ,java-cglib)
10520 ("junit" ,java-junit)
10521 ("hamcrest" ,java-hamcrest-core)))
10522 (native-inputs
10523 `(("mockito" ,java-mockito-1)))
10524 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10525 (synopsis "Fluent assertions for java")
10526 (description "AssertJ core is a Java library that provides a fluent
10527 interface for writing assertions. Its main goal is to improve test code
10528 readability and make maintenance of tests easier.")
10529 (license license:asl2.0)))
10530
10531 (define-public java-jboss-javassist
10532 (package
10533 (name "java-jboss-javassist")
10534 (version "3.21.0")
10535 (source (origin
10536 (method git-fetch)
10537 (uri (git-reference
10538 (url "https://github.com/jboss-javassist/javassist")
10539 (commit
10540 (string-append "rel_"
10541 (string-map
10542 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10543 "_ga"))))
10544 (file-name (git-file-name name version))
10545 (sha256
10546 (base32
10547 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10548 (modules '((guix build utils)))
10549 (snippet
10550 '(begin
10551 (delete-file "javassist.jar")))))
10552 (build-system ant-build-system)
10553 (arguments
10554 `(#:jar-name "java-jboss-javassist.jar"
10555 #:jdk ,icedtea-8
10556 #:source-dir "src/main"
10557 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10558 #:phases
10559 (modify-phases %standard-phases
10560 (add-after 'unpack 'make-files-writable
10561 (lambda _
10562 (for-each make-file-writable (find-files "."))
10563 #t)))))
10564 (native-inputs
10565 `(("junit" ,java-junit)))
10566 (home-page "https://github.com/jboss-javassist/javassist")
10567 (synopsis "Java bytecode engineering toolkit")
10568 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10569 manipulation simple. It is a class library for editing bytecodes in Java; it
10570 enables Java programs to define a new class at runtime and to modify a class
10571 file when the JVM loads it.")
10572 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10573
10574 (define-public java-jcommander
10575 (package
10576 (name "java-jcommander")
10577 (version "1.71")
10578 (source (origin
10579 (method git-fetch)
10580 (uri (git-reference
10581 (url "https://github.com/cbeust/jcommander")
10582 (commit version)))
10583 (file-name (git-file-name name version))
10584 (sha256
10585 (base32
10586 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10587 (build-system ant-build-system)
10588 (arguments
10589 `(#:jar-name "java-jcommander.jar"
10590 #:jdk ,icedtea-8
10591 #:tests? #f; requires testng which depends on jcommander
10592 #:source-dir "src/main/java"))
10593 (home-page "https://jcommander.org")
10594 (synopsis "Command line parameters parser")
10595 (description "JCommander is a very small Java framework that makes it
10596 trivial to parse command line parameters. Parameters are declared with
10597 annotations.")
10598 (license license:asl2.0)))
10599
10600 (define-public java-bsh
10601 (package
10602 (name "java-bsh")
10603 (version "2.0b6")
10604 (source (origin
10605 (method git-fetch)
10606 (uri (git-reference
10607 (url "https://github.com/beanshell/beanshell")
10608 (commit version)))
10609 (file-name (git-file-name name version))
10610 (sha256
10611 (base32
10612 "0kz3f0xjack6c9syssi4qjw1rbd3q5963sk5pmr143hiibxa9csw"))
10613 (modules '((guix build utils)))
10614 (snippet
10615 '(begin
10616 ;; Delete bundled third-party jar archives.
10617 (for-each delete-file (find-files "." ".*.jar$"))
10618 (for-each (lambda (file) (chmod file #o644))
10619 (find-files "." "."))
10620 #t))))
10621 (build-system ant-build-system)
10622 (arguments
10623 `(#:build-target "jarall"
10624 #:test-target "junit-tests-all"
10625 #:make-flags (list "-DDATE" "(no date for reproducibility)")
10626 #:phases
10627 (modify-phases %standard-phases
10628 (add-before 'install 'fix-pom
10629 (lambda _
10630 (substitute* "pom.xml"
10631 (("org.apache-extras.beanshell") "org.beanshell"))
10632 #t))
10633 (replace 'install
10634 (install-from-pom "pom.xml")))))
10635 (inputs
10636 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
10637 ("java-commons-bsf" ,java-commons-bsf)))
10638 (native-inputs
10639 `(("java-junit" ,java-junit)
10640 ("javacc" ,javacc-3)))
10641 (home-page "http://beanshell.org/")
10642 (synopsis "Lightweight Scripting for Java")
10643 (description "BeanShell is a small, free, embeddable Java source
10644 interpreter with object scripting language features, written in Java.
10645 BeanShell dynamically executes standard Java syntax and extends it with common
10646 scripting conveniences such as loose types, commands, and method closures like
10647 those in Perl and JavaScript.")
10648 (license license:asl2.0)))
10649
10650 (define-public java-fest-util
10651 (package
10652 (name "java-fest-util")
10653 (version "1.2.5")
10654 (source (origin
10655 (method git-fetch)
10656 (uri (git-reference
10657 (url "https://github.com/alexruiz/fest-util/")
10658 (commit (string-append "fest-util-" version))))
10659 (file-name (git-file-name name version))
10660 (sha256
10661 (base32
10662 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
10663 (build-system ant-build-system)
10664 (arguments
10665 `(#:jar-name "java-fest-util.jar"
10666 #:source-dir "src/main/java"))
10667 (native-inputs
10668 `(("junit" ,java-junit)
10669 ("hamcrest" ,java-hamcrest-core)))
10670 (home-page "https://github.com/alexruiz/fest-util")
10671 (synopsis "FEST common utilities")
10672 (description "Common utilities used in all FEST module.")
10673 (license license:asl2.0)))
10674
10675 (define-public java-fest-test
10676 (package
10677 (name "java-fest-test")
10678 (version "2.1.0")
10679 (source (origin
10680 (method git-fetch)
10681 (uri (git-reference
10682 (url "https://github.com/alexruiz/fest-test/")
10683 (commit (string-append "fest-test-" version))))
10684 (file-name (git-file-name name version))
10685 (sha256
10686 (base32
10687 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
10688 (build-system ant-build-system)
10689 (arguments
10690 `(#:jar-name "java-fest-test.jar"
10691 #:source-dir "src/main/java"
10692 #:tests? #f)); no tests
10693 (inputs
10694 `(("junit" ,java-junit)))
10695 (home-page "https://github.com/alexruiz/fest-test")
10696 (synopsis "Common FEST testing infrastructure")
10697 (description "Fest-test contains the common FEST testing infrastructure.")
10698 (license license:asl2.0)))
10699
10700 (define-public java-fest-assert
10701 (package
10702 (name "java-fest-assert")
10703 (version "2.0M10")
10704 (source (origin
10705 (method git-fetch)
10706 (uri (git-reference
10707 (url "https://github.com/alexruiz/fest-assert-2.x/")
10708 (commit (string-append "fest-assert-core-" version))))
10709 (file-name (git-file-name name version))
10710 (sha256
10711 (base32
10712 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
10713 (build-system ant-build-system)
10714 (arguments
10715 `(#:jar-name "java-fest-assert.jar"
10716 #:source-dir "src/main/java"
10717 #:test-exclude
10718 (list
10719 "**/Abstract*.java"
10720 "**/*BaseTest.java"
10721 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
10722 "**/MessageFormatter_format_Test.java"
10723 "**/internal/*/*_assert*_Test.java")))
10724 (inputs
10725 `(("java-fest-util" ,java-fest-util)))
10726 (native-inputs
10727 `(("java-junit" ,java-junit)
10728 ("java-fest-test" ,java-fest-test)
10729 ("java-hamcrest-core" ,java-hamcrest-core)
10730 ("java-mockito" ,java-mockito-1)
10731 ("java-cglib" ,java-cglib)
10732 ("java-objenesis" ,java-objenesis)
10733 ("java-asm" ,java-asm)))
10734 (home-page "https://github.com/alexruiz/fest-assert-2.x")
10735 (synopsis "FEST fluent assertions")
10736 (description "FEST-Assert provides a fluent interface for assertions.")
10737 (license license:asl2.0)))
10738
10739 (define-public java-testng
10740 (package
10741 (name "java-testng")
10742 (version "6.14.3")
10743 (source (origin
10744 (method git-fetch)
10745 (uri (git-reference
10746 (url "https://github.com/cbeust/testng")
10747 (commit version)))
10748 (file-name (string-append name "-" version "-checkout"))
10749 (sha256
10750 (base32
10751 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
10752 (build-system ant-build-system)
10753 (arguments
10754 `(#:jdk ,icedtea-8; java.util.function
10755 #:jar-name "java-testng.jar"
10756 #:source-dir "src/main/java"
10757 #:phases
10758 (modify-phases %standard-phases
10759 ;; FIXME: I don't know why these tests fail
10760 (add-after 'unpack 'delete-failing-tests
10761 (lambda _
10762 (substitute* "src/test/resources/testng.xml"
10763 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
10764 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") ""))
10765 #t))
10766 ;; We don't have groovy
10767 (add-after 'unpack 'delete-groovy-tests
10768 (lambda _
10769 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
10770 (substitute* "src/test/resources/testng.xml"
10771 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))
10772 #t))
10773 (add-before 'build 'copy-resources
10774 (lambda _
10775 (copy-recursively "src/main/resources" "build/classes")
10776 #t))
10777 (add-before 'check 'copy-test-resources
10778 (lambda _
10779 (copy-recursively "src/test/resources" "build/test-classes")
10780 #t))
10781 (replace 'check
10782 (lambda _
10783 (invoke "ant" "compile-tests")
10784 ;; we don't have groovy
10785 (substitute* "src/test/resources/testng.xml"
10786 (("<class name=\"test.groovy.GroovyTest\" />") ""))
10787 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10788 ":build/classes"
10789 ":build/test-classes")
10790 "-Dtest.resources.dir=src/test/resources"
10791 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
10792 (propagated-inputs
10793 `(("junit" ,java-junit)
10794 ("java-jsr305" ,java-jsr305)
10795 ("java-bsh" ,java-bsh)
10796 ("java-jcommander" ,java-jcommander)
10797 ("java-guice" ,java-guice)
10798 ("snakeyaml" ,java-snakeyaml)))
10799 (native-inputs
10800 `(("guava" ,java-guava)
10801 ("java-javax-inject" ,java-javax-inject)
10802 ("java-hamcrest" ,java-hamcrest-all)
10803 ("java-assertj" ,java-assertj)
10804 ("java-mockito" ,java-mockito-1)
10805 ("cglib" ,java-cglib)
10806 ("asm" ,java-asm)
10807 ("aopalliance" ,java-aopalliance)))
10808 (home-page "https://testng.org")
10809 (synopsis "Testing framework")
10810 (description "TestNG is a testing framework inspired from JUnit and NUnit
10811 but introducing some new functionalities that make it more powerful and easier
10812 to use.")
10813 (license license:asl2.0)))
10814
10815 (define-public java-jnacl
10816 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
10817 (revision "2"))
10818 (package
10819 (name "java-jnacl")
10820 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
10821 (source (origin
10822 (method git-fetch)
10823 (uri (git-reference
10824 (url "https://github.com/neilalexander/jnacl")
10825 (commit commit)))
10826 (file-name (git-file-name name version))
10827 (sha256
10828 (base32
10829 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
10830 (build-system ant-build-system)
10831 (arguments
10832 `(#:jar-name "jnacl.jar"
10833 #:source-dir "src/main/java"
10834 #:jdk ,icedtea-8
10835 #:phases
10836 (modify-phases %standard-phases
10837 (add-before 'build 'fix-tests
10838 (lambda _
10839 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
10840 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
10841 (("assertions.Assertions") "assertions.api.Assertions"))
10842 #t))
10843 (replace 'check
10844 (lambda _
10845 (invoke "ant" "compile-tests")
10846 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10847 ":build/classes"
10848 ":build/test-classes")
10849 "org.testng.TestNG" "-testclass"
10850 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
10851 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10852 ":build/classes"
10853 ":build/test-classes")
10854 "org.testng.TestNG" "-testclass"
10855 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
10856 (native-inputs
10857 `(("java-testng" ,java-testng)
10858 ("java-fest-util" ,java-fest-util)
10859 ("java-fest-assert" ,java-fest-assert)))
10860 (home-page "https://github.com/neilalexander/jnacl")
10861 (synopsis "Java implementation of NaCl")
10862 (description "Pure Java implementation of the NaCl: Networking and
10863 Cryptography library.")
10864 (license license:bsd-2))))
10865
10866 (define-public java-mvel2
10867 (package
10868 (name "java-mvel2")
10869 (version "2.3.1")
10870 (source (origin
10871 (method url-fetch)
10872 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
10873 version ".Final.tar.gz"))
10874 (sha256
10875 (base32
10876 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
10877 (build-system ant-build-system)
10878 (arguments
10879 `(#:jar-name "mvel2.jar"
10880 #:source-dir "src/main/java"
10881 #:test-exclude
10882 (list "**/Abstract*.java"
10883 ;; Base class with no tests
10884 "**/MVELThreadTest.java")
10885 #:phases
10886 (modify-phases %standard-phases
10887 (add-after 'install 'install-bin
10888 (lambda* (#:key outputs #:allow-other-keys)
10889 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
10890 (mkdir-p bin)
10891 (with-output-to-file (string-append bin "/mvel2")
10892 (lambda _
10893 (display
10894 (string-append
10895 "#!" (which "bash") "\n"
10896 "if [ \"$#\" -ne \"2\" ]; then\n"
10897 "echo 'Usage: mvel2 <script> <out.dir>'\n"
10898 "exit\n"
10899 "fi\n"
10900 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
10901 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
10902 " org.mvel2.sh.Main $1"))))
10903 (chmod (string-append bin "/mvel2") #o755))
10904 #t)))))
10905 (native-inputs
10906 `(("junit" ,java-junit)
10907 ("hamcrest" ,java-hamcrest-core)))
10908 (home-page "https://github.com/mvel/mvel")
10909 (synopsis "MVFLEX Expression Language")
10910 (description "MVEL has largely been inspired by Java syntax, but has some
10911 fundamental differences aimed at making it more efficient as an expression
10912 language, such as operators that directly support collection, array and string
10913 matching, as well as regular expressions. MVEL is used to evaluate expressions
10914 written using Java syntax.
10915
10916 In addition to the expression language, MVEL serves as a templating language for
10917 configuration and string construction.")
10918 (license license:asl2.0)))
10919
10920 (define-public java-commons-jexl-2
10921 (package
10922 (name "java-commons-jexl")
10923 (version "2.1.1")
10924 (source (origin
10925 (method url-fetch)
10926 (uri (string-append "mirror://apache/commons/jexl/source/"
10927 "commons-jexl-" version "-src.tar.gz"))
10928 (sha256
10929 (base32
10930 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
10931 (build-system ant-build-system)
10932 (arguments
10933 `(#:jar-name "commons-jexl-2.jar"
10934 #:jdk ,icedtea-8
10935 #:source-dir "src/main/java"
10936 #:phases
10937 (modify-phases %standard-phases
10938 (add-before 'check 'disable-broken-tests
10939 (lambda* (#:key inputs #:allow-other-keys)
10940 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
10941 (substitute* "ArithmeticTest.java"
10942 (("asserter.assertExpression\\(\"3 / 0\"") "//")
10943 (("asserter.assertExpression\\(\"imanull") "//"))
10944 ;; This test fails with "ambiguous method invocation"
10945 (delete-file "CacheTest.java")
10946 ;; This test doesn't have access to the temp directory
10947 (substitute* "ClassCreatorTest.java"
10948 (("java.io.tmpdir") "user.dir"))
10949 ;; This test fails in trying to detect whether it can run.
10950 (substitute* "ClassCreator.java"
10951 (("boolean canRun =.*") "boolean canRun = false;\n"))
10952 ;; ...and these tests depend on it.
10953 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
10954 (delete-file "scripting/JexlScriptEngineTest.java"))
10955 #t))
10956 (add-before 'build 'run-javacc
10957 (lambda _
10958 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
10959 (invoke "java" "jjtree" "Parser.jjt")
10960 (invoke "java" "javacc" "Parser.jj"))
10961 #t)))))
10962 (inputs
10963 `(("java-commons-logging-minimal" ,java-commons-logging-minimal)))
10964 (native-inputs
10965 `(("java-junit" ,java-junit)
10966 ("java-hamcrest-core" ,java-hamcrest-core)
10967 ("javacc" ,javacc-4)))
10968 (home-page "https://commons.apache.org/proper/commons-jexl/")
10969 (synopsis "Java Expression Language ")
10970 (description "JEXL is a library intended to facilitate the implementation
10971 of dynamic and scripting features in applications and frameworks written in
10972 Java. JEXL implements an Expression Language based on some extensions to the
10973 JSTL Expression Language supporting most of the constructs seen in
10974 shell-script or ECMAScript. Its goal is to expose scripting features usable
10975 by technical operatives or consultants working with enterprise platforms.")
10976 (license license:asl2.0)))
10977
10978 (define-public java-lz4
10979 (package
10980 (name "java-lz4")
10981 (version "1.4.0")
10982 (source (origin
10983 (method git-fetch)
10984 (uri (git-reference
10985 (url "https://github.com/lz4/lz4-java")
10986 (commit version)))
10987 (file-name (git-file-name name version))
10988 (sha256
10989 (base32
10990 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
10991 (build-system ant-build-system)
10992 (arguments
10993 `(#:jar-name "lz4.jar"
10994 #:jdk ,icedtea-8
10995 #:source-dir "src/java:src/java-unsafe"
10996 #:tests? #f; FIXME: requires more dependencies
10997 #:phases
10998 (modify-phases %standard-phases
10999 (add-after 'unpack 'make-files-writable
11000 (lambda _
11001 (for-each make-file-writable (find-files "."))
11002 #t))
11003 (add-before 'configure 'generate-source
11004 (lambda _
11005 (with-directory-excursion "src/build/source_templates"
11006 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11007 #t)))))
11008 (native-inputs
11009 `(("mvel" ,java-mvel2)))
11010 (home-page "https://jpountz.github.io/lz4-java")
11011 (synopsis "Compression algorithm")
11012 (description "LZ4 - Java is a Java port of the popular lz4 compression
11013 algorithms and xxHash hashing algorithm.")
11014 (license license:asl2.0)))
11015
11016 (define-public java-bouncycastle
11017 (package
11018 (name "java-bouncycastle")
11019 (version "1.67")
11020 (source (origin
11021 (method git-fetch)
11022 (uri (git-reference
11023 (url "http://git.bouncycastle.org/repositories/bc-java")
11024 ;(url "https://github.com/bcgit/bc-java")
11025 (commit (string-append "r1rv" (substring version 2 4)))))
11026 (file-name (git-file-name name version))
11027 (sha256
11028 (base32
11029 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11030 (modules '((guix build utils)))
11031 (snippet
11032 '(begin
11033 (for-each delete-file
11034 (find-files "." "\\.jar$"))
11035 #t))))
11036 (build-system ant-build-system)
11037 (arguments
11038 `(#:jdk ,icedtea-8
11039 #:tests? #f
11040 #:phases
11041 (modify-phases %standard-phases
11042 (replace 'build
11043 (lambda _
11044 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11045 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11046 ;; FIXME: the tests freeze.
11047 ;; (replace 'check
11048 ;; (lambda _
11049 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11050 (replace 'install
11051 (install-jars "build/artifacts/jdk1.5/jars")))))
11052 (inputs
11053 `(("java-javax-mail" ,java-javax-mail)))
11054 (native-inputs
11055 `(("unzip" ,unzip)
11056 ("junit" ,java-junit)
11057 ("java-native-access" ,java-native-access)
11058 ("java-native-access-platform" ,java-native-access-platform)))
11059 (home-page "https://www.bouncycastle.org")
11060 (synopsis "Cryptographic library")
11061 (description "Bouncy Castle is a cryptographic library for the Java
11062 programming language.")
11063 (license license:expat)))
11064
11065 (define-public java-lmax-disruptor
11066 (package
11067 (name "java-lmax-disruptor")
11068 (version "3.3.7")
11069 (source (origin
11070 (method url-fetch)
11071 (uri (string-append "https://github.com/LMAX-Exchange/disruptor/"
11072 "archive/" version ".tar.gz"))
11073 (file-name (string-append name "-" version ".tar.gz"))
11074 (sha256
11075 (base32
11076 "17da2gwj5abnlsfgn2xqjk5lgzbg4vkb0hdv2dvc8r2fx4bi7w3g"))))
11077 (build-system ant-build-system)
11078 (arguments
11079 `(#:jar-name "java-lmax-disruptor.jar"
11080 #:jdk ,icedtea-8
11081 #:tests? #f)); tests hang
11082 (inputs
11083 `(("junit" ,java-junit)
11084 ("java-hdrhistogram" ,java-hdrhistogram)
11085 ("java-jmock" ,java-jmock)
11086 ("java-jmock-legacy" ,java-jmock-legacy)
11087 ("java-jmock-junit4" ,java-jmock-junit4)
11088 ("java-hamcrest-all" ,java-hamcrest-all)))
11089 (native-inputs
11090 `(("cglib" ,java-cglib)
11091 ("objenesis" ,java-objenesis)
11092 ("asm" ,java-asm)))
11093 (home-page "https://www.lmax.com/disruptor")
11094 (synopsis "High performance inter-thread communication")
11095 (description "LMAX Disruptor is a software pattern and software component
11096 for high performance inter-thread communication that avoids the need for
11097 message queues or resource locking.")
11098 (license license:asl2.0)))
11099
11100 (define-public java-commons-bcel
11101 (package
11102 (name "java-commons-bcel")
11103 (version "6.1")
11104 (source (origin
11105 (method url-fetch)
11106 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11107 version "-src.tar.gz"))
11108 (sha256
11109 (base32
11110 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11111 (build-system ant-build-system)
11112 (arguments
11113 `(#:jar-name "bcel.jar"
11114 #:jdk ,icedtea-8
11115 #:source-dir "src/main/java"
11116 #:test-dir "src/test/java"
11117 ;; FIXME: Tests require the unpackaged jna.
11118 #:tests? #f))
11119 (home-page "https://commons.apache.org/proper/commons-bcel/")
11120 (synopsis "Byte code engineering library")
11121 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11122 intended to give users a convenient way to analyze, create, and
11123 manipulate (binary) Java class files. Classes are represented by objects
11124 which contain all the symbolic information of the given class: methods, fields
11125 and byte code instructions, in particular.
11126
11127 Such objects can be read from an existing file, be transformed by a
11128 program (e.g. a class loader at run-time) and written to a file again. An
11129 even more interesting application is the creation of classes from scratch at
11130 run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11131 if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11132 of Java @code{.class} files.")
11133 (license license:asl2.0)))
11134
11135 (define-public java-xerial-core
11136 (package
11137 (name "java-xerial-core")
11138 (version "2.1")
11139 (source (origin
11140 (method url-fetch)
11141 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11142 version ".tar.gz"))
11143 (file-name (string-append name "-" version ".tar.gz"))
11144 (sha256
11145 (base32
11146 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11147 (build-system ant-build-system)
11148 (arguments
11149 `(#:jar-name "xerial-core.jar"
11150 #:source-dir "xerial-core/src/main/java"
11151 #:test-dir "xerial-core/src/test"
11152 #:phases
11153 (modify-phases %standard-phases
11154 (add-before 'build 'copy-resources
11155 (lambda _
11156 (copy-recursively "xerial-core/src/main/resources"
11157 "build/classes")
11158 #t)))))
11159 (native-inputs
11160 `(("junit" ,java-junit)
11161 ("hamcrest" ,java-hamcrest-core)))
11162 (home-page "https://github.com/xerial/xerial-java")
11163 (synopsis "Data management libraries for Java")
11164 (description "Xerial is a set of data management libraries for the Java
11165 programming language. The ultimate goal of the Xerial project is to manage
11166 everything as database, including class objects, text format data, data
11167 streams, etc.")
11168 (license license:asl2.0)))
11169
11170 (define-public java-powermock-reflect
11171 (package
11172 (name "java-powermock-reflect")
11173 (version "1.7.3")
11174 (source (origin
11175 (method url-fetch)
11176 (uri (string-append "https://github.com/powermock/powermock/"
11177 "archive/powermock-" version ".tar.gz"))
11178 (file-name (string-append name "-" version ".tar.gz"))
11179 (sha256
11180 (base32
11181 "0sbgi5vqq7k72wzcdjb20s370vyd4hsbnx71pzb8ishml3gy7fwy"))
11182 (patches
11183 (search-patches "java-powermock-fix-java-files.patch"))))
11184 (build-system ant-build-system)
11185 (arguments
11186 `(#:jar-name "java-powermock-reflect.jar"
11187 #:jdk ,icedtea-8
11188 #:source-dir "powermock-reflect/src/main/java"
11189 #:test-dir "powermock-reflect/src/test"))
11190 (inputs
11191 `(("java-objenesis" ,java-objenesis)))
11192 (native-inputs
11193 `(("junit" ,java-junit)
11194 ("cglib" ,java-cglib)
11195 ("asm" ,java-asm)
11196 ("hamcrest" ,java-hamcrest-core)
11197 ("assertj" ,java-assertj)))
11198 (home-page "https://github.com/powermock/powermock")
11199 (synopsis "Mock library extension framework")
11200 (description "PowerMock is a framework that extends other mock libraries
11201 such as EasyMock with more powerful capabilities. PowerMock uses a custom
11202 classloader and bytecode manipulation to enable mocking of static methods,
11203 constructors, final classes and methods, private methods, removal of static
11204 initializers and more. By using a custom classloader no changes need to be
11205 done to the IDE or continuous integration servers which simplifies adoption.")
11206 (license license:asl2.0)))
11207
11208 (define-public java-powermock-core
11209 (package
11210 (inherit java-powermock-reflect)
11211 (name "java-powermock-core")
11212 (arguments
11213 `(#:jar-name "java-powermock-core.jar"
11214 #:source-dir "powermock-core/src/main/java"
11215 #:test-dir "powermock-core/src/test"
11216 #:tests? #f; requires powermock-api
11217 #:jdk ,icedtea-8
11218 #:phases
11219 (modify-phases %standard-phases
11220 (add-before 'build 'copy-resources
11221 (lambda _
11222 (copy-recursively "powermock-core/src/main/resources"
11223 "build/classes")
11224 #t)))))
11225 (inputs
11226 `(("reflect" ,java-powermock-reflect)
11227 ("javassist" ,java-jboss-javassist)))
11228 (native-inputs
11229 `(("junit" ,java-junit)
11230 ("assertj" ,java-assertj)
11231 ("mockito" ,java-mockito-1)))))
11232
11233 (define-public java-powermock-api-support
11234 (package
11235 (inherit java-powermock-reflect)
11236 (name "java-powermock-api-support")
11237 (build-system ant-build-system)
11238 (arguments
11239 `(#:jar-name "java-powermock-api-support.jar"
11240 #:jdk ,icedtea-8
11241 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11242 #:tests? #f)); no tests
11243 (inputs
11244 `(("core" ,java-powermock-core)
11245 ("reflect" ,java-powermock-reflect)))))
11246
11247 (define-public java-powermock-modules-junit4-common
11248 (package
11249 (inherit java-powermock-reflect)
11250 (name "java-powermock-modules-junit4-common")
11251 (build-system ant-build-system)
11252 (arguments
11253 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11254 #:jdk ,icedtea-8
11255 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11256 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11257 (inputs
11258 `(("core" ,java-powermock-core)
11259 ("easymock" ,java-easymock)
11260 ("reflect" ,java-powermock-reflect)
11261 ("hamcrest" ,java-hamcrest-core)
11262 ("cglib" ,java-cglib)))))
11263
11264 (define-public java-powermock-modules-junit4
11265 (package
11266 (inherit java-powermock-reflect)
11267 (name "java-powermock-modules-junit4")
11268 (build-system ant-build-system)
11269 (arguments
11270 `(#:jar-name "java-powermock-modules-junit4.jar"
11271 #:jdk ,icedtea-8
11272 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11273 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11274 #:phases
11275 (modify-phases %standard-phases
11276 (add-before 'build 'fix-junit-detection
11277 (lambda _
11278 ;; Our junit version is 4.12-SNAPSHOT
11279 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11280 "PowerMockJUnit4MethodValidator.java")
11281 (("4.12") "4.12-SNAPSHOT"))
11282 #t)))))
11283 (inputs
11284 `(("core" ,java-powermock-core)
11285 ("reflect" ,java-powermock-reflect)
11286 ("common" ,java-powermock-modules-junit4-common)
11287 ("cglib" ,java-cglib)))
11288 (native-inputs
11289 `(("easymock" ,java-easymock)
11290 ("hamcrest" ,java-hamcrest-core)
11291 ("objenesis" ,java-objenesis)
11292 ("asm" ,java-asm)
11293 ("junit" ,java-junit)))))
11294
11295 (define-public java-powermock-api-easymock
11296 (package
11297 (inherit java-powermock-reflect)
11298 (name "java-powermock-api-easymock")
11299 (build-system ant-build-system)
11300 (arguments
11301 `(#:jar-name "java-powermock-api-easymock.jar"
11302 #:jdk ,icedtea-8
11303 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11304 #:tests? #f; no tests
11305 #:phases
11306 (modify-phases %standard-phases
11307 (add-before 'build 'fix-file
11308 (lambda _
11309 ;; FIXME: This looks wrong, but it fixes a build error.
11310 (with-directory-excursion "powermock-api/powermock-api-easymock"
11311 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11312 (("classLoader instanceof MockClassLoader") "false")
11313 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11314 #t)))))
11315 (inputs
11316 `(("core" ,java-powermock-core)
11317 ("easymock" ,java-easymock)
11318 ("reflect" ,java-powermock-reflect)
11319 ("support" ,java-powermock-api-support)
11320 ("cglib" ,java-cglib)))))
11321
11322 (define-public java-jboss-jms-api-spec
11323 (package
11324 (name "java-jboss-jms-api-spec")
11325 (version "2.0")
11326 (source (origin
11327 (method url-fetch)
11328 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11329 "archive/jboss-jms-api_" version
11330 "_spec-1.0.1.Final.tar.gz"))
11331 (sha256
11332 (base32
11333 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11334 (build-system ant-build-system)
11335 (arguments
11336 `(#:jar-name "java-jboss-jms-api_spec.jar"
11337 #:jdk ,icedtea-8
11338 #:source-dir "."
11339 #:tests? #f)); no tests
11340 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11341 (synopsis "Java Message Service API specification")
11342 (description "Java Message Service (JMS) API is used to send messages
11343 messages between two or more clients. It is a messaging standard that allows
11344 application components to create, send, receive, and read messages.")
11345 ; either gpl2 only with GPL Classpath Exception, or cddl.
11346 (license (list license:gpl2 license:cddl1.0))))
11347
11348 (define-public java-mail
11349 (package
11350 (name "java-mail")
11351 (version "1.6.0")
11352 (source (origin
11353 (method url-fetch)
11354 (uri (string-append "https://github.com/javaee/javamail/archive/"
11355 "JAVAMAIL-1_6_0.tar.gz"))
11356 (sha256
11357 (base32
11358 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11359 (build-system ant-build-system)
11360 (arguments
11361 `(#:jar-name "java-mail.jar"
11362 #:jdk ,icedtea-8
11363 #:source-dir "mail/src/main/java"
11364 #:test-dir "mail/src/test"
11365 #:test-exclude
11366 (list "**/CollectorFormatterTest.java"
11367 "**/CompactFormatterTest.java"
11368 "**/DurationFilterTest.java"
11369 "**/MailHandlerTest.java"
11370 "**/GetLocalAddressTest.java"
11371 ;; FIXME: both end with:
11372 ;; java.lang.ClassNotFoundException:
11373 ;; javax.mail.internet.MimeMultipartParseTest
11374 "**/MimeMultipartParseTest.java"
11375 "**/SearchTermSerializationTest.java")
11376 #:phases
11377 (modify-phases %standard-phases
11378 (add-before 'configure 'move-version.java
11379 (lambda _
11380 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11381 "mail/src/main/java/javax/mail/Version.java")
11382 #t))
11383 (add-before 'build 'copy-resources
11384 (lambda _
11385 (copy-recursively "mail/src/main/resources/META-INF"
11386 "build/classes/META-INF")
11387 #t)))))
11388 (native-inputs
11389 `(("junit" ,java-junit)
11390 ("hamcrest" ,java-hamcrest-core)))
11391 (home-page "https://javaee.github.io/javamail/")
11392 (synopsis "Mail-related functionality in Java")
11393 (description "The JavaMail API provides a platform-independent and
11394 protocol-independent framework to build mail and messaging applications.")
11395 ;; General Public License Version 2 only ("GPL") or the Common Development
11396 ;; and Distribution License("CDDL")
11397 (license (list license:cddl1.1
11398 license:gpl2)))); with classpath exception
11399
11400 (define-public java-jeromq
11401 (package
11402 (name "java-jeromq")
11403 (version "0.4.3")
11404 (source (origin
11405 (method git-fetch)
11406 (uri (git-reference
11407 (url "https://github.com/zeromq/jeromq")
11408 (commit (string-append "v" version))))
11409 (file-name (string-append name "-" version "-checkout"))
11410 (sha256
11411 (base32
11412 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11413 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11414 (build-system ant-build-system)
11415 (arguments
11416 `(#:jar-name "java-jeromq.jar"
11417 #:source-dir "src/main/java"
11418 #:jdk ,icedtea-8
11419 #:test-exclude
11420 (list
11421 "**/Abstract*.java"
11422 ;; Requires network
11423 "**/ZBeaconTest.java"
11424 ;; Failures
11425 "**/DealerSpecTest.java"
11426 "**/CustomDecoderTest.java"
11427 "**/CustomEncoderTest.java"
11428 "**/ConnectRidTest.java"
11429 "**/ReqSpecTest.java"
11430 "**/PushPullSpecTest.java"
11431 "**/PubSubHwmTest.java"
11432 "**/RouterSpecTest.java"
11433 "**/ProxyTest.java")))
11434 (inputs
11435 `(("java-jnacl" ,java-jnacl)))
11436 (native-inputs
11437 `(("java-hamcrest-core" ,java-hamcrest-core)
11438 ("junit" ,java-junit)))
11439 (home-page "http://zeromq.org/bindings:java")
11440 (synopsis "Java binding for 0MQ")
11441 (description "Jeromq provides the java bindings for 0MQ.")
11442 (license license:mpl2.0)))
11443
11444 (define-public java-kafka-clients
11445 (package
11446 (name "java-kafka-clients")
11447 (version "1.0.0")
11448 (source (origin
11449 (method url-fetch)
11450 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11451 version "-src.tgz"))
11452 (sha256
11453 (base32
11454 "1yxmnsmliwm7671q5yy9bl4jdqyyn00n26cggz9brwczx80w1vfq"))))
11455 (build-system ant-build-system)
11456 (arguments
11457 `(#:jar-name "java-kafka-clients.jar"
11458 #:jdk ,icedtea-8
11459 #:source-dir "clients/src/main/java"
11460 #:test-dir "clients/src/test"
11461 #:test-exclude
11462 (list
11463 ;; This file does not contain a class
11464 "**/IntegrationTest.java"
11465 ;; Requires network
11466 "**/ClientUtilsTest.java"
11467 ;; End with errors that seem related to our powermock
11468 "**/KafkaProducerTest.java"
11469 "**/BufferPoolTest.java")))
11470 (inputs
11471 `(("java-slf4j-api" ,java-slf4j-api)
11472 ("java-lz4" ,java-lz4)))
11473 (native-inputs
11474 `(("junit" ,java-junit)
11475 ("hamcrest" ,java-hamcrest-all)
11476 ("objenesis" ,java-objenesis)
11477 ("asm" ,java-asm)
11478 ("cglib" ,java-cglib)
11479 ("javassist" ,java-jboss-javassist)
11480 ("snappy" ,java-snappy)
11481 ("easymock" ,java-easymock)
11482 ("powermock" ,java-powermock-core)
11483 ("powermock-easymock" ,java-powermock-api-easymock)
11484 ("powermock-junit4-common" ,java-powermock-modules-junit4-common)
11485 ("powermock-junit4" ,java-powermock-modules-junit4)
11486 ("powermock-support" ,java-powermock-api-support)
11487 ("java-bouncycastle" ,java-bouncycastle)))
11488 (home-page "https://kafka.apache.org")
11489 (synopsis "Distributed streaming platform")
11490 (description "Kafka is a distributed streaming platform, which means:
11491 @itemize
11492 @item it can publish and subscribe to streams of records;
11493 @item it can store streams of records in a fault-tolerant way;
11494 @item it can process streams of records as they occur.
11495 @end itemize")
11496 ;; Either cddl or gpl2 only.
11497 (license (list license:cddl1.1; actually cddl1.1
11498 license:gpl2)))); with classpath exception
11499
11500 (define-public java-jdom
11501 (package
11502 (name "java-jdom")
11503 (version "1.1.3")
11504 (source (origin
11505 (method url-fetch)
11506 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
11507 version ".tar.gz"))
11508 (sha256
11509 (base32
11510 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
11511 (build-system ant-build-system)
11512 (arguments
11513 `(#:build-target "package"
11514 #:tests? #f; tests are run as part of the build process
11515 #:phases
11516 (modify-phases %standard-phases
11517 (replace 'install
11518 (install-jars "build")))))
11519 (home-page "http://jdom.org/")
11520 (synopsis "Access, manipulate, and output XML data")
11521 (description "Java-based solution for accessing, manipulating, and
11522 outputting XML data from Java code.")
11523 (license license:bsd-4)))
11524
11525 (define-public java-geronimo-xbean-reflect
11526 (package
11527 (name "java-geronimo-xbean-reflect")
11528 (version "4.5")
11529 (source (origin
11530 (method svn-fetch)
11531 (uri (svn-reference
11532 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
11533 (revision 1807396)))
11534 (file-name (string-append name "-" version))
11535 (sha256
11536 (base32
11537 "18q3i6jgm6rkw8aysfgihgywrdc5nvijrwnslmi3ww497jvri6ja"))))
11538 (build-system ant-build-system)
11539 (arguments
11540 `(#:jar-name "geronimo-xbean-reflect.jar"
11541 #:source-dir "xbean-reflect/src/main/java"
11542 #:test-dir "xbean-reflect/src/test"
11543 #:jdk ,icedtea-8
11544 #:test-exclude
11545 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
11546 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
11547 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
11548 #:phases
11549 (modify-phases %standard-phases
11550 (add-before 'build 'fix-source
11551 (lambda _
11552 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
11553 ;; org.apache.xbean.asm6 is actually repackaged java-asm
11554 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
11555 (("org.apache.xbean.asm5") "org.objectweb.asm"))
11556 #t)))
11557 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
11558 (inputs
11559 `(("asm" ,java-asm)
11560 ("log4j" ,java-log4j-api)
11561 ("log4j-1.2" ,java-log4j-1.2-api)
11562 ("log4j-core" ,java-log4j-core)
11563 ("logging" ,java-commons-logging-minimal)))
11564 (propagated-inputs
11565 `(("java-geronimo-parent-pom" ,java-geronimo-parent-pom)))
11566 (native-inputs
11567 `(("junit" ,java-junit)))
11568 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
11569 (synopsis "Dependency injection helper")
11570 (description "Xbean-reflect provides very flexible ways to create objects
11571 and graphs of objects for dependency injection frameworks")
11572 (license license:asl2.0)))
11573
11574 (define java-geronimo-genesis-2.1
11575 (package
11576 (name "java-geronimo-genesis")
11577 (version "2.1")
11578 (source (origin
11579 (method svn-fetch)
11580 (uri (svn-reference
11581 (url (string-append "https://svn.apache.org/repos/asf/"
11582 "geronimo/genesis/tags/genesis-"
11583 version))
11584 (revision 1807396)))
11585 (file-name (string-append name "-" version "-source"))
11586 (sha256
11587 (base32
11588 "119yn795jvnjf52si84q192s8wag1k013iabg78b7wnadssnnh31"))))
11589 (build-system ant-build-system)
11590 (arguments
11591 `(#:tests? #f
11592 #:phases
11593 (modify-phases %standard-phases
11594 (delete 'configure)
11595 (delete 'build)
11596 (replace 'install
11597 (install-pom-file "pom.xml"))
11598 (add-after 'install 'install-enforcer-rules
11599 (install-pom-file "genesis-enforcer-rules/pom.xml"))
11600 (add-after 'install 'install-flava
11601 (install-pom-file "genesis-default-flava/pom.xml"))
11602 (add-after 'install 'install-packaging
11603 (install-pom-file "genesis-packaging/pom.xml"))
11604 (add-after 'install-flava 'install-flava-java4
11605 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
11606 (add-after 'install-flava 'install-flava-java5
11607 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
11608 (add-after 'install-flava 'install-flava-java6
11609 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
11610 (propagated-inputs
11611 `(("apache-parent-pom" ,apache-parent-pom-13)))
11612 (home-page "https://geronimo.apache.org")
11613 (synopsis "Collection of maven POM files for the Geronimo project")
11614 (description "Apache Geronimo is a server runtime. This package contains
11615 only pom files used by other components in the Geronimo project.")
11616 (license license:asl2.0)))
11617
11618 (define java-geronimo-parent-pom
11619 (package
11620 (inherit java-geronimo-xbean-reflect)
11621 (name "java-geronimo-parent-pom")
11622 (arguments
11623 `(#:tests? #f
11624 #:phases
11625 (modify-phases %standard-phases
11626 (delete 'configure)
11627 (delete 'build)
11628 (replace 'install
11629 (install-pom-file "pom.xml")))))
11630 (propagated-inputs
11631 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
11632
11633 (define-public java-geronimo-xbean-bundleutils
11634 (package
11635 (inherit java-geronimo-xbean-reflect)
11636 (name "java-geronimo-xbean-bundleutils")
11637 (arguments
11638 `(#:jar-name "geronimo-xbean-bundleutils.jar"
11639 #:source-dir "xbean-bundleutils/src/main/java"
11640 #:test-dir "xbean-bundleutils/src/test"
11641 #:phases
11642 (modify-phases %standard-phases
11643 (add-before 'build 'fix-java
11644 (lambda _
11645 ;; We use a more recent version of osgi, so this file requires
11646 ;; more interface method implementations.
11647 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
11648 (("import org.osgi.framework.ServiceRegistration;")
11649 "import org.osgi.framework.ServiceRegistration;
11650 import org.osgi.framework.ServiceFactory;
11651 import java.util.Collection;
11652 import org.osgi.framework.ServiceObjects;")
11653 (("public Bundle getBundle\\(\\)")
11654 "@Override
11655 public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
11656 throw new UnsupportedOperationException();
11657 }
11658 @Override
11659 public <S> ServiceRegistration<S> registerService(Class<S> clazz,
11660 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
11661 throw new UnsupportedOperationException();
11662 }
11663 public Bundle getBundle()"))
11664 #t)))))
11665 (inputs
11666 `(("java-slf4j" ,java-slf4j-api)
11667 ("java-asm" ,java-asm)
11668 ("java-osgi-framework" ,java-osgi-framework)
11669 ("java-eclipse-osgi" ,java-eclipse-osgi)
11670 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
11671
11672 (define-public java-geronimo-xbean-asm-util
11673 (package
11674 (inherit java-geronimo-xbean-reflect)
11675 (name "java-geronimo-xbean-asm-util")
11676 (arguments
11677 `(#:jar-name "geronimo-xbean-asm-util.jar"
11678 #:source-dir "xbean-asm-util/src/main/java"
11679 #:tests? #f)); no tests
11680 (inputs
11681 `(("java-asm" ,java-asm)))
11682 (native-inputs '())))
11683
11684 (define-public java-geronimo-xbean-finder
11685 (package
11686 (inherit java-geronimo-xbean-reflect)
11687 (name "java-geronimo-xbean-finder")
11688 (arguments
11689 `(#:jar-name "geronimo-xbean-finder.jar"
11690 #:source-dir "xbean-finder/src/main/java"
11691 #:test-dir "xbean-finder/src/test"))
11692 (inputs
11693 `(("java-slf4j-api" ,java-slf4j-api)
11694 ("java-asm" ,java-asm)
11695 ("java-geronimo-xbean-bundleutils" ,java-geronimo-xbean-bundleutils)
11696 ("java-geronimo-xbean-asm-util" ,java-geronimo-xbean-asm-util)
11697 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)
11698 ("java-osgi-framework" ,java-osgi-framework)))
11699 (native-inputs
11700 `(("java-junit" ,java-junit)
11701 ("java-hamcrest-core" ,java-hamcrest-core)))))
11702
11703 (define-public java-gson
11704 (package
11705 (name "java-gson")
11706 (version "2.8.2")
11707 (source (origin
11708 (method url-fetch)
11709 (uri (string-append "https://github.com/google/gson/archive/"
11710 "gson-parent-" version ".tar.gz"))
11711 (sha256
11712 (base32
11713 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
11714 (build-system ant-build-system)
11715 (arguments
11716 `(#:jar-name "gson.jar"
11717 #:source-dir "gson/src/main/java"
11718 #:test-dir "gson/src/test"))
11719 (native-inputs
11720 `(("java-junit" ,java-junit)
11721 ("java-hamcrest-core" ,java-hamcrest-core)))
11722 (home-page "https://github.com/google/gson")
11723 (synopsis "Java serialization/deserialization library from/to JSON")
11724 (description "Gson is a Java library that can be used to convert Java
11725 Objects into their JSON representation. It can also be used to convert a JSON
11726 string to an equivalent Java object. Gson can work with arbitrary Java objects
11727 including pre-existing objects that you do not have source-code of.")
11728 (license license:asl2.0)))
11729
11730 (define-public java-hawtjni
11731 (package
11732 (name "java-hawtjni")
11733 (version "1.15")
11734 (source (origin
11735 (method url-fetch)
11736 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
11737 "hawtjni-project-" version ".tar.gz"))
11738 (sha256
11739 (base32
11740 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
11741 (build-system ant-build-system)
11742 (arguments
11743 `(#:jar-name "hawtjni.jar"
11744 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
11745 #:tests? #f; no tests
11746 #:phases
11747 (modify-phases %standard-phases
11748 (add-before 'build 'build-native
11749 (lambda* (#:key inputs #:allow-other-keys)
11750 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
11751 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11752 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
11753 "-fPIC" "-O2" include)
11754 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
11755 "-fPIC" "-O2" include)
11756 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
11757 "hawtjni.o" "hawtjni-callback.o")))
11758 #t))
11759 (add-after 'install 'install-native
11760 (lambda* (#:key outputs #:allow-other-keys)
11761 (let* ((out (assoc-ref outputs "out"))
11762 (lib (string-append out "/lib"))
11763 (inc (string-append out "/include")))
11764 (with-directory-excursion "hawtjni-generator/src/main/resources/"
11765 (install-file "libhawtjni.so" lib)
11766 (install-file "hawtjni.h" inc)))
11767 #t))
11768 (add-before 'install 'install-parent
11769 (install-pom-file "pom.xml"))
11770 (replace 'install
11771 (install-from-pom "hawtjni-runtime/pom.xml")))))
11772 (inputs
11773 `(("java-commons-cli" ,java-commons-cli)
11774 ("java-asm" ,java-asm)
11775 ("java-geronimo-xbean-finder" ,java-geronimo-xbean-finder)))
11776 (home-page "https://fusesource.github.io/hawtjni/")
11777 (synopsis "JNI code generator")
11778 (description "HawtJNI is a code generator that produces the JNI code needed
11779 to implement Java native methods. It is based on the jnigen code generator
11780 that is part of the SWT Tools project.")
11781 (license license:asl2.0)))
11782
11783 (define-public java-jansi-native
11784 (package
11785 (name "java-jansi-native")
11786 (version "1.7")
11787 (source (origin
11788 (method url-fetch)
11789 (uri (string-append "https://github.com/fusesource/jansi-native/"
11790 "archive/jansi-native-" version ".tar.gz"))
11791 (sha256
11792 (base32
11793 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
11794 (build-system ant-build-system)
11795 (arguments
11796 `(#:jar-name "jansi-native.jar"
11797 #:source-dir "src/main/java"
11798 #:tests? #f; no tests
11799 #:phases
11800 (modify-phases %standard-phases
11801 (add-before 'build 'build-native
11802 (lambda* (#:key inputs #:allow-other-keys)
11803 ;; there are more required files for windows in windows/
11804 (with-directory-excursion "src/main/native-package/src"
11805 (substitute* "jansi_ttyname.c"
11806 (("#include \"jansi_.*") ""))
11807 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
11808 (string-append "-I" (assoc-ref inputs "java-hawtjni")
11809 "/include")
11810 (string-append "-I" (assoc-ref inputs "jdk")
11811 "/include/linux")
11812 "-fPIC" "-O2")
11813 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
11814 (add-before 'build 'install-native
11815 (lambda _
11816 (let ((dir (string-append "build/classes/META-INF/native/"
11817 ,(match (%current-system)
11818 ((or "i686-linux" "armhf-linux")
11819 "linux32")
11820 ((or "x86_64-linux" "aarch64-linux"
11821 "mips64el-linux")
11822 "linux64")
11823 (_ "unknown-kernel")))))
11824 (install-file "src/main/native-package/src/libjansi.so" dir))
11825 #t))
11826 (add-after 'install 'install-native
11827 (lambda* (#:key outputs #:allow-other-keys)
11828 (install-file "src/main/native-package/src/jansi.h"
11829 (string-append (assoc-ref outputs "out") "/include"))
11830 #t))
11831 (add-before 'install 'fix-pom
11832 (lambda _
11833 ;; pom contains variables to complete name, but we don't support that
11834 (substitute* "pom.xml"
11835 (("\\$\\{platform\\}") "native"))
11836 #t))
11837 (replace 'install
11838 (install-from-pom "pom.xml")))))
11839 (propagated-inputs
11840 `(("java-hawtjni" ,java-hawtjni)))
11841 (home-page "https://fusesource.github.io/jansi/")
11842 (synopsis "Native library for jansi")
11843 (description "This package provides the native library for jansi, a small
11844 Java library that allows you to use ANSI escape sequences to format your
11845 console output.")
11846 (license license:asl2.0)))
11847
11848 (define-public java-jansi
11849 (package
11850 (name "java-jansi")
11851 (version "1.16")
11852 (source (origin
11853 (method url-fetch)
11854 (uri (string-append "https://github.com/fusesource/jansi/archive/"
11855 "jansi-project-" version ".tar.gz"))
11856 (sha256
11857 (base32
11858 "11kh3144i3fzp21dpy8zg52mjmsr214k7km9p8ly0rqk2px0qq2z"))))
11859 (build-system ant-build-system)
11860 (arguments
11861 `(#:jar-name "jansi.jar"
11862 #:source-dir "jansi/src/main/java"
11863 #:test-dir "jansi/src/test"
11864 #:phases
11865 (modify-phases %standard-phases
11866 (add-after 'check 'clear-term
11867 (lambda _
11868 (invoke "echo" "-e" "\\e[0m")))
11869 (add-before 'install 'install-parent
11870 (install-pom-file "pom.xml"))
11871 (add-before 'install 'fix-pom
11872 (lambda _
11873 ;; pom adds jansi native versions for different platforms, but we
11874 ;; only need one, so use native instead
11875 (substitute* "jansi/pom.xml"
11876 (("windows32") "native")
11877 (("windows64") "native")
11878 (("osx") "native")
11879 (("linux32") "native")
11880 (("linux64") "native")
11881 (("freebsd32") "native")
11882 (("freebsd64") "native"))
11883 #t))
11884 (replace 'install
11885 (install-from-pom "jansi/pom.xml")))))
11886 (propagated-inputs
11887 `(("java-jansi-native" ,java-jansi-native)))
11888 (native-inputs
11889 `(("java-junit" ,java-junit)
11890 ("java-hamcrest-core" ,java-hamcrest-core)))
11891 (home-page "https://fusesource.github.io/jansi/")
11892 (synopsis "Portable ANSI escape sequences")
11893 (description "Jansi is a Java library that allows you to use ANSI escape
11894 sequences to format your console output which works on every platform.")
11895 (license license:asl2.0)))
11896
11897 (define-public java-jboss-el-api-spec
11898 (package
11899 (name "java-jboss-el-api-spec")
11900 (version "3.0")
11901 (source (origin
11902 (method url-fetch)
11903 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
11904 "archive/jboss-el-api_" version
11905 "_spec-1.0.7.Final.tar.gz"))
11906 (sha256
11907 (base32
11908 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
11909 (build-system ant-build-system)
11910 (arguments
11911 `(#:jar-name "java-jboss-el-api_spec.jar"
11912 #:modules ((guix build ant-build-system)
11913 (guix build utils)
11914 (guix build maven pom)
11915 (guix build java-utils)
11916 (sxml simple))
11917 #:phases
11918 (modify-phases %standard-phases
11919 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
11920 ;; instead, which implements the same thing. We override the pom file
11921 ;; to "rename" the package so it can be found by maven.
11922 (add-before 'install 'override-pom
11923 (lambda _
11924 (delete-file "pom.xml")
11925 (with-output-to-file "pom.xml"
11926 (lambda _
11927 (sxml->xml
11928 `(project
11929 (modelVersion "4.0.0")
11930 (name "el-api")
11931 (groupId "javax.el")
11932 (artifactId "javax.el-api")
11933 (version "3.0")))))
11934 #t))
11935 (replace 'install
11936 (install-from-pom "pom.xml")))))
11937 (inputs
11938 `(("java-junit" ,java-junit)))
11939 (home-page "https://github.com/jboss/jboss-el-api_spec")
11940 (synopsis "JSR-341 expression language 3.0 API")
11941 (description "This package contains an implementation of the JSR-341
11942 specification for the expression language 3.0. It implements an expression
11943 language inspired by ECMAScript and XPath. This language is used with
11944 JavaServer Pages (JSP).")
11945 ;; Either GPL2 only or CDDL.
11946 (license (list license:gpl2 license:cddl1.1))))
11947
11948 (define-public java-jboss-interceptors-api-spec
11949 (package
11950 (name "java-jboss-interceptors-api-spec")
11951 (version "1.2")
11952 (source (origin
11953 (method url-fetch)
11954 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
11955 "archive/jboss-interceptors-api_" version
11956 "_spec-1.0.0.Final.tar.gz"))
11957 (sha256
11958 (base32
11959 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
11960 (build-system ant-build-system)
11961 (arguments
11962 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
11963 #:jdk ,icedtea-8
11964 #:source-dir "."
11965 #:tests? #f; no tests
11966 #:modules ((guix build ant-build-system)
11967 (guix build utils)
11968 (guix build maven pom)
11969 (guix build java-utils)
11970 (sxml simple))
11971 #:phases
11972 (modify-phases %standard-phases
11973 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
11974 ;; so we use this package instead, which implements the same thing.
11975 ;; We override the pom file to "rename" the package so it can be found
11976 ;; by maven.
11977 (add-before 'install 'override-pom
11978 (lambda _
11979 (delete-file "pom.xml")
11980 (with-output-to-file "pom.xml"
11981 (lambda _
11982 (sxml->xml
11983 `(project
11984 (modelVersion "4.0.0")
11985 (name "interceptor-api")
11986 (groupId "javax.interceptor")
11987 (artifactId "javax.interceptor-api")
11988 (version "3.0")))))
11989 #t))
11990 (replace 'install
11991 (install-from-pom "pom.xml")))))
11992 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
11993 (synopsis "Interceptors 1.2 API classes from JSR 318")
11994 (description "Java-jboss-interceptors-api-spec implements the Interceptors
11995 API. Interceptors are used to interpose on business method invocations and
11996 specific events.")
11997 ;; Either GPL2 only or CDDL.
11998 (license (list license:gpl2 license:cddl1.1))))
11999
12000 (define-public java-cdi-api
12001 (package
12002 (name "java-cdi-api")
12003 (version "2.0")
12004 (source (origin
12005 (method url-fetch)
12006 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12007 version ".tar.gz"))
12008 (file-name (string-append name "-" version ".tar.gz"))
12009 (sha256
12010 (base32
12011 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12012 (build-system ant-build-system)
12013 (arguments
12014 `(#:source-dir "api/src/main/java"
12015 #:jar-name "java-cdi-api.jar"
12016 #:test-dir "api/src/test"
12017 #:jdk ,icedtea-8
12018 #:tests? #f; Tests fail because we don't have a CDI provider yet
12019 #:phases
12020 (modify-phases %standard-phases
12021 (replace 'install
12022 (install-from-pom "api/pom.xml")))))
12023 (propagated-inputs
12024 `(("java-javax-inject" ,java-javax-inject)
12025 ("java-jboss-el-api-spec" ,java-jboss-el-api-spec)
12026 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)
12027 ("java-weld-parent-pom" ,java-weld-parent-pom)))
12028 (native-inputs
12029 `(("java-testng" ,java-testng)
12030 ("java-hamcrest-core" ,java-hamcrest-core)))
12031 (home-page "http://cdi-spec.org/")
12032 (synopsis "Contexts and Dependency Injection APIs")
12033 (description "Java-cdi-api contains the required APIs for Contexts and
12034 Dependency Injection (CDI).")
12035 (license license:asl2.0)))
12036
12037 (define-public java-joda-convert
12038 (package
12039 (name "java-joda-convert")
12040 (version "1.9.2")
12041 (source (origin
12042 (method url-fetch)
12043 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12044 version ".tar.gz"))
12045 (file-name (string-append name "-" version ".tar.gz"))
12046 (sha256
12047 (base32
12048 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12049 (build-system ant-build-system)
12050 (arguments
12051 `(#:jar-name (string-append ,name "-" ,version ".jar")
12052 #:source-dir "src/main/java"
12053 #:test-include (list "**/Test*.java")
12054 ;; Contains only interfaces and base classes (no test)
12055 #:test-exclude (list "**/test*/**.java")))
12056 (inputs
12057 `(("java-guava" ,java-guava)))
12058 (native-inputs
12059 `(("java-junit" ,java-junit)
12060 ("java-hamcrest-core" ,java-hamcrest-core)))
12061 (home-page "https://www.joda.org/joda-convert/")
12062 (synopsis "Conversion between Objects and Strings")
12063 (description "Joda-Convert provides a small set of classes to aid
12064 conversion between Objects and Strings. It is not intended to tackle the
12065 wider problem of Object to Object transformation.")
12066 (license license:asl2.0)))
12067
12068 (define-public java-joda-time
12069 (package
12070 (name "java-joda-time")
12071 (version "2.9.9")
12072 (source (origin
12073 (method url-fetch)
12074 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12075 version ".tar.gz"))
12076 (file-name (string-append name "-" version ".tar.gz"))
12077 (sha256
12078 (base32
12079 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12080 (build-system ant-build-system)
12081 (arguments
12082 `(#:jar-name "java-joda-time.jar"
12083 #:source-dir "src/main/java"
12084 #:test-include (list "**/Test*.java")
12085 ;; There is no runnable test in these files
12086 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12087 #:phases
12088 (modify-phases %standard-phases
12089 (add-after 'build 'build-resources
12090 (lambda _
12091 (mkdir-p "build/classes/org/joda/time/tz/data")
12092 (mkdir-p "build/classes/org/joda/time/format")
12093 ;; This will produce the following exception:
12094 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12095 ;; which is normal, because it doesn't exist yet. It still generates
12096 ;; the same file as in the binary one can find on maven.
12097 (invoke "java" "-cp"
12098 (string-append "build/classes:" (getenv "CLASSPATH"))
12099 "org.joda.time.tz.ZoneInfoCompiler"
12100 "-src" "src/main/java/org/joda/time/tz/src"
12101 "-dst" "build/classes/org/joda/time/tz/data"
12102 "africa" "antarctica" "asia" "australasia"
12103 "europe" "northamerica" "southamerica"
12104 "pacificnew" "etcetera" "backward" "systemv")
12105 (for-each (lambda (f)
12106 (copy-file f (string-append
12107 "build/classes/org/joda/time/format/"
12108 (basename f))))
12109 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12110 #t))
12111 (add-before 'install 'regenerate-jar
12112 (lambda _
12113 ;; We need to regenerate the jar file to add generated data.
12114 (delete-file "build/jar/java-joda-time.jar")
12115 (invoke "ant" "jar")))
12116 (add-before 'check 'copy-test-resources
12117 (lambda _
12118 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12119 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12120 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12121 (copy-recursively "src/test/resources" "build/test-classes")
12122 #t)))))
12123 (inputs
12124 `(("java-joda-convert" ,java-joda-convert)))
12125 (native-inputs
12126 `(("java-junit" ,java-junit)
12127 ("java-hamcrest-core" ,java-hamcrest-core)
12128 ("tzdata" ,tzdata)))
12129 (home-page "https://www.joda.org/joda-time/")
12130 (synopsis "Replacement for the Java date and time classes")
12131 (description "Joda-Time is a replacement for the Java date and time
12132 classes prior to Java SE 8.")
12133 (license license:asl2.0)))
12134
12135 (define-public java-xerces
12136 (package
12137 (name "java-xerces")
12138 (version "2.12.1")
12139 (source
12140 (origin
12141 (method url-fetch)
12142 (uri (string-append "mirror://apache/xerces/j/source/"
12143 "Xerces-J-src." version ".tar.gz"))
12144 (sha256
12145 (base32 "0494kq36gw3nah19ifb720vwxbpg4ww0k6m3zq6wyanw6a083p6s"))
12146 (patches (search-patches
12147 "java-xerces-xjavac_taskdef.patch"
12148 "java-xerces-build_dont_unzip.patch"
12149 "java-xerces-bootclasspath.patch"))))
12150 (build-system ant-build-system)
12151 (arguments
12152 `(#:tests? #f;; Test files are not present
12153 #:test-target "test"
12154 #:jdk ,icedtea-8
12155 #:phases
12156 (modify-phases %standard-phases
12157 (add-after 'unpack 'create-build.properties
12158 (lambda* (#:key inputs #:allow-other-keys)
12159 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12160 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12161 (with-output-to-file "build.properties"
12162 (lambda _
12163 (format #t
12164 "jar.jaxp = ~a/share/java/jaxp.jar~@
12165 jar.apis-ext = ~a/share/java/jaxp.jar~@
12166 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12167 jaxp jaxp resolver)))
12168 ;; Make xerces use our version of jaxp in tests
12169 (substitute* "build.xml"
12170 (("xml-apis.jar")
12171 (string-append jaxp "/share/java/jaxp.jar"))
12172 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12173 "${jar.apis}")))
12174 #t))
12175 (replace 'install (install-jars "build")))))
12176 (inputs
12177 `(("java-apache-xml-commons-resolver" ,java-apache-xml-commons-resolver)
12178 ("java-jaxp" ,java-jaxp)))
12179 (home-page "https://xerces.apache.org/xerces2-j/")
12180 (synopsis "Validating XML parser for Java with DOM level 3 support")
12181 (description "The Xerces2 Java parser is the reference implementation of
12182 XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12183 processor.
12184
12185 Xerces2-J supports the following standards and APIs:
12186
12187 @itemize
12188 @item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12189 @item Namespaces in XML Recommendation
12190 @item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12191 Range Recommendations
12192 @item Simple API for XML (SAX) 2.0.1 Core and Extension
12193 @item Java APIs for XML Processing (JAXP) 1.2.01
12194 @item XML Schema 1.0 Structures and Datatypes Recommendations
12195 @item Experimental implementation of the Document Object Model (DOM) Level 3
12196 Core and Load/Save Working Drafts
12197 @item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12198 Candidate Recommendation
12199 @end itemize
12200
12201 Xerces is now able to parse documents written according to the XML 1.1
12202 Candidate Recommendation, except that it does not yet provide an option to
12203 enable normalization checking as described in section 2.13 of this
12204 specification. It also handles namespaces according to the XML Namespaces 1.1
12205 Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12206 the DOM level 3 load/save API's are in use.")
12207 (license license:asl2.0)))
12208
12209 (define-public java-jakarta-regexp
12210 (package
12211 (name "java-jakarta-regexp")
12212 (version "1.5")
12213 (source
12214 (origin
12215 (method url-fetch)
12216 (uri (string-append
12217 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12218 version ".tar.gz"))
12219 (sha256
12220 (base32
12221 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12222 (build-system ant-build-system)
12223 (arguments
12224 `(#:test-target "test"
12225 #:phases
12226 (modify-phases %standard-phases
12227 (replace 'install
12228 (lambda* (#:key outputs #:allow-other-keys)
12229 (let* ((out (assoc-ref outputs "out"))
12230 (out-share (string-append out "/share/java")))
12231 (mkdir-p out-share)
12232 (for-each (lambda (name)
12233 (install-file name out-share))
12234 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12235 #t))))))
12236 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12237 (synopsis "Regular expression parser generator for Java.")
12238 (description "@code{jakarta-regexp} is an old regular expression parser
12239 generator for Java.")
12240 (license license:asl2.0)))
12241
12242 (define-public java-jline
12243 (package
12244 (name "java-jline")
12245 (version "1.0")
12246 (source (origin
12247 (method url-fetch)
12248 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12249 version ".tar.gz"))
12250 (sha256
12251 (base32
12252 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12253 (build-system ant-build-system)
12254 (arguments
12255 `(#:jar-name "jline.jar"
12256 #:source-dir "src/main/java"
12257 #:test-dir "src/test"
12258 #:phases
12259 (modify-phases %standard-phases
12260 (add-before 'build 'copy-resources
12261 (lambda _
12262 (copy-recursively "src/main/resources" "build/classes")
12263 #t)))))
12264 (native-inputs
12265 `(("java-junit" ,java-junit)))
12266 (home-page "https://jline.github.io")
12267 (synopsis "Console input handling library")
12268 (description "JLine is a Java library for handling console input. It is
12269 similar in functionality to BSD editline and GNU readline but with additional
12270 features that bring it on par with the Z shell line editor.")
12271 (license license:bsd-3)))
12272
12273 (define-public java-jline-2
12274 (package
12275 (inherit java-jline)
12276 (version "2.14.5")
12277 (source (origin
12278 (method url-fetch)
12279 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12280 version ".tar.gz"))
12281 (sha256
12282 (base32
12283 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12284 (arguments
12285 `(#:jdk ,icedtea-8
12286 ,@(package-arguments java-jline)))
12287 (inputs
12288 `(("java-jansi" ,java-jansi)
12289 ("java-jansi-native" ,java-jansi-native)))
12290 (native-inputs
12291 `(("java-powermock-modules-junit4" ,java-powermock-modules-junit4)
12292 ("java-powermock-modules-junit4-common" ,java-powermock-modules-junit4-common)
12293 ("java-powermock-api-easymock" ,java-powermock-api-easymock)
12294 ("java-powermock-api-support" ,java-powermock-api-support)
12295 ("java-powermock-core" ,java-powermock-core)
12296 ("java-powermock-reflect" ,java-powermock-reflect)
12297 ("java-easymock" ,java-easymock)
12298 ("java-jboss-javassist" ,java-jboss-javassist)
12299 ("java-objenesis" ,java-objenesis)
12300 ("java-asm" ,java-asm)
12301 ("java-hamcrest-core" ,java-hamcrest-core)
12302 ("java-cglib" ,java-cglib)
12303 ("java-junit" ,java-junit)
12304 ("java-hawtjni" ,java-hawtjni)))))
12305
12306 (define-public java-xmlunit
12307 (package
12308 (name "java-xmlunit")
12309 (version "2.5.1")
12310 (source (origin
12311 (method url-fetch)
12312 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12313 version ".tar.gz"))
12314 (file-name (string-append name "-" version ".tar.gz"))
12315 (sha256
12316 (base32
12317 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12318 (build-system ant-build-system)
12319 (arguments
12320 `(#:jar-name "java-xmlunit.jar"
12321 #:source-dir "xmlunit-core/src/main/java"
12322 #:test-dir "xmlunit-core/src/test"
12323 #:phases
12324 (modify-phases %standard-phases
12325 (add-before 'check 'copy-test-resources
12326 (lambda* (#:key inputs #:allow-other-keys)
12327 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12328 #t)))))
12329 (native-inputs
12330 `(("java-junit" ,java-junit)
12331 ("java-mockito-1" ,java-mockito-1)
12332 ("java-hamcrest-all" ,java-hamcrest-all)
12333 ("java-objenesis" ,java-objenesis)
12334 ("java-asm" ,java-asm)
12335 ("java-cglib" ,java-cglib)
12336 ("resources"
12337 ,(origin
12338 (method git-fetch)
12339 (uri (git-reference
12340 (url "https://github.com/xmlunit/test-resources")
12341 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12342 (file-name "java-xmlunit-test-resources")
12343 (sha256
12344 (base32
12345 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12346 (home-page "https://www.xmlunit.org/")
12347 (synopsis "XML output testing")
12348 (description "XMLUnit provides you with the tools to verify the XML you
12349 emit is the one you want to create. It provides helpers to validate against
12350 an XML Schema, assert the values of XPath queries or compare XML documents
12351 against expected outcomes.")
12352 (license license:asl2.0)))
12353
12354 (define-public java-xmlunit-legacy
12355 (package
12356 (inherit java-xmlunit)
12357 (name "java-xmlunit-legacy")
12358 (arguments
12359 `(#:jar-name "java-xmlunit-legacy.jar"
12360 #:source-dir "xmlunit-legacy/src/main/java"
12361 #:test-dir "xmlunit-legacy/src/test"))
12362 (inputs
12363 `(("java-xmlunit" ,java-xmlunit)
12364 ("java-junit" ,java-junit)))
12365 (native-inputs
12366 `(("java-mockito-1" ,java-mockito-1)))))
12367
12368 (define-public java-xmlunit-matchers
12369 (package
12370 (inherit java-xmlunit)
12371 (name "java-xmlunit-matchers")
12372 (arguments
12373 `(#:jar-name "java-xmlunit-matchers.jar"
12374 #:source-dir "xmlunit-matchers/src/main/java"
12375 #:test-dir "xmlunit-matchers/src/test"
12376 #:test-exclude
12377 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
12378 (list "**/ValidationMatcherTest.java")
12379 #:phases
12380 (modify-phases %standard-phases
12381 (add-before 'build 'copy-test-class
12382 (lambda _
12383 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
12384 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
12385 #t))
12386 (add-before 'build 'fix-test-resources-path
12387 (lambda _
12388 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
12389 (("../test-resources") "test-resources"))
12390 #t))
12391 (add-before 'check 'copy-test-resources
12392 (lambda* (#:key inputs #:allow-other-keys)
12393 (copy-recursively (assoc-ref inputs "resources") "test-resources")
12394 #t)))))
12395 (inputs
12396 `(("java-xmlunit" ,java-xmlunit)
12397 ("java-junit" ,java-junit)))))
12398
12399 (define-public java-openchart2
12400 (package
12401 (name "java-openchart2")
12402 (version "1.4.3")
12403 (source (origin
12404 (method url-fetch)
12405 (uri (string-append "http://download.approximatrix.com/openchart2/"
12406 "openchart2-" version ".source.zip"))
12407 (sha256
12408 (base32
12409 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
12410 (build-system ant-build-system)
12411 (arguments
12412 `(#:test-target "test"
12413 #:phases
12414 (modify-phases %standard-phases
12415 (add-after 'unpack 'fix-junit-errors
12416 (lambda _
12417 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
12418 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
12419 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
12420 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
12421 "model/DefaultChartDataModelConstraintsTest.java"
12422 "model/MultiScatterDataModelConstraintsTest.java"
12423 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
12424 (("(assertEquals[^;]+);" before _)
12425 (string-append (string-drop-right before 2) ", 1E-6);"))))
12426 #t))
12427 (replace 'install (install-jars ".")))))
12428 (native-inputs
12429 `(("unzip" ,unzip)
12430 ("java-junit" ,java-junit)
12431 ("java-hamcrest-core" ,java-hamcrest-core)))
12432 (home-page "https://approximatrix.com/products/openchart2/")
12433 (synopsis "Simple plotting for Java")
12434 (description "Openchart2 provides a simple, yet powerful, interface for
12435 Java programmers to create two-dimensional charts and plots. The library
12436 features an assortment of graph styles, including advanced scatter plots, bar
12437 graphs, and pie charts.")
12438 (license license:lgpl2.1+)))
12439
12440 (define-public java-commons-httpclient
12441 (package
12442 (name "java-commons-httpclient")
12443 (version "3.1")
12444 (source (origin
12445 (method url-fetch)
12446 (uri (string-append "mirror://apache/httpcomponents/"
12447 "commons-httpclient/source/commons-httpclient-"
12448 version "-src.tar.gz"))
12449 (sha256
12450 (base32
12451 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
12452 (build-system ant-build-system)
12453 (arguments
12454 `(#:build-target "compile"
12455 #:test-target "test"
12456 #:tests? #f; requires junit-textui (junit 3)
12457 #:phases
12458 (modify-phases %standard-phases
12459 (add-before 'build 'fix-accent
12460 (lambda _
12461 (for-each (lambda (file)
12462 (with-fluids ((%default-port-encoding "ISO-8859-1"))
12463 (substitute* file
12464 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
12465 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
12466 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
12467 "src/test/org/apache/commons/httpclient/TestHttps.java"
12468 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
12469 #t))
12470 (replace 'install
12471 (lambda* (#:key outputs #:allow-other-keys)
12472 (invoke "ant" "dist"
12473 (string-append "-Ddist.home=" (assoc-ref outputs "out")
12474 "/share/java"))
12475 #t)))))
12476 (propagated-inputs
12477 `(("java-commons-logging" ,java-commons-logging-minimal)
12478 ("java-commons-codec" ,java-commons-codec)))
12479 (home-page "https://hc.apache.org")
12480 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
12481 (description "This package contains an HTTP/1.1 compliant HTTP agent
12482 implementation. It also provides reusable components for client-side
12483 authentication, HTTP state management, and HTTP connection management.")
12484 (license license:asl2.0)))
12485
12486 (define-public java-commons-vfs
12487 (package
12488 (name "java-commons-vfs")
12489 (version "2.2")
12490 (source (origin
12491 (method url-fetch)
12492 (uri (string-append "mirror://apache/commons/vfs/source/"
12493 "commons-vfs2-distribution-" version "-src.tar.gz"))
12494 (file-name (string-append name "-" version ".tar.gz"))
12495 (sha256
12496 (base32
12497 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
12498 (modules '((guix build utils)))
12499 (snippet
12500 '(begin
12501 (for-each delete-file
12502 (find-files "." "\\.jar$"))
12503 #t))))
12504 (build-system ant-build-system)
12505 (arguments
12506 `(#:jar-name "commons-vfs.jar"
12507 #:source-dir "commons-vfs2/src/main/java"
12508 #:test-dir "commons-vfs2/src/test"
12509 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
12510 #:tests? #f
12511 #:phases
12512 (modify-phases %standard-phases
12513 (add-before 'build 'remove-hadoop-and-webdav
12514 ; Remove these files as they are not required and depend on difficult
12515 ; packages.
12516 (lambda _
12517 (for-each delete-file-recursively
12518 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
12519 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
12520 #t)))))
12521 (inputs
12522 `(("java-commons-collections4" ,java-commons-collections4)
12523 ("java-commons-compress" ,java-commons-compress)
12524 ("java-commons-httpclient" ,java-commons-httpclient)
12525 ("java-commons-logging-minimal" ,java-commons-logging-minimal)
12526 ("java-commons-net" ,java-commons-net)
12527 ("java-jsch" ,java-jsch)))
12528 (home-page "https://commons.apache.org/proper/commons-vfs/")
12529 (synopsis "Java file system library")
12530 (description "Commons VFS provides a single API for accessing various
12531 different file systems. It presents a uniform view of the files from various
12532 different sources, such as the files on local disk, on an HTTP server, or
12533 inside a Zip archive.")
12534 (license license:asl2.0)))
12535
12536 (define-public java-jakarta-oro
12537 (package
12538 (name "java-jakarta-oro")
12539 (version "2.0.8")
12540 (source (origin
12541 (method url-fetch)
12542 (uri (string-append "mirror://apache/jakarta/oro/"
12543 "jakarta-oro-" version ".tar.gz"))
12544 (sha256
12545 (base32
12546 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
12547 (modules '((guix build utils)))
12548 (snippet
12549 `(begin
12550 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
12551 #t))))
12552 (build-system ant-build-system)
12553 (arguments
12554 `(#:build-target "package"
12555 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
12556 #:tests? #f; tests are run as part of the build process
12557 #:phases
12558 (modify-phases %standard-phases
12559 (replace 'install
12560 (install-jars ,(string-append "jakarta-oro-" version))))))
12561 (home-page "https://jakarta.apache.org/oro/")
12562 (synopsis "Text-processing for Java")
12563 (description "The Jakarta-ORO Java classes are a set of text-processing
12564 Java classes that provide Perl5 compatible regular expressions, AWK-like
12565 regular expressions, glob expressions, and utility classes for performing
12566 substitutions, splits, filtering filenames, etc. This library is the successor
12567 of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
12568 from ORO, Inc.")
12569 (license license:asl1.1)))
12570
12571 (define-public java-native-access
12572 (package
12573 (name "java-native-access")
12574 (version "4.5.1")
12575 (source (origin
12576 (method url-fetch)
12577 (uri (string-append "https://github.com/java-native-access/jna/"
12578 "archive/" version ".tar.gz"))
12579 (file-name (string-append name "-" version ".tar.gz"))
12580 (sha256
12581 (base32
12582 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
12583 (modules '((guix build utils)))
12584 (snippet
12585 `(begin
12586 (for-each delete-file (find-files "." ".*.jar"))
12587 (delete-file-recursively "native/libffi")
12588 (delete-file-recursively "dist")
12589 #t))))
12590 (build-system ant-build-system)
12591 (arguments
12592 `(#:tests? #f; FIXME: tests require reflections.jar
12593 #:test-target "test"
12594 #:make-flags (list "-Ddynlink.native=true")
12595 #:phases
12596 (modify-phases %standard-phases
12597 (add-before 'build 'fix-build.xml
12598 (lambda* (#:key inputs #:allow-other-keys)
12599 (substitute* "build.xml"
12600 ;; Since we removed the bundled ant.jar, give the correct path
12601 (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar"))
12602 ;; We removed generated native libraries. We can only rebuild one
12603 ;; so don't fail if we can't find a native library for another architecture.
12604 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
12605 ;; Copy test dependencies
12606 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
12607 "lib/junit.jar")
12608 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
12609 "jar$"))
12610 "lib/hamcrest-core.jar")
12611 ;; FIXME: once reflections.jar is built, copy it to lib/test.
12612 #t))
12613 (add-before 'build 'build-native
12614 (lambda _
12615 (invoke "ant" "-Ddynlink.native=true" "native")
12616 #t))
12617 (replace 'install
12618 (install-jars "build")))))
12619 (inputs
12620 `(("libffi" ,libffi)
12621 ("libx11" ,libx11)
12622 ("libxt" ,libxt)))
12623 (native-inputs
12624 `(("java-junit" ,java-junit)
12625 ("java-hamcrest-core" ,java-hamcrest-core)))
12626 (home-page "https://github.com/java-native-access/jna")
12627 (synopsis "Access to native shared libraries from Java")
12628 (description "JNA provides Java programs easy access to native shared
12629 libraries without writing anything but Java code - no JNI or native code is
12630 required. JNA allows you to call directly into native functions using natural
12631 Java method invocation.")
12632 ;; Java Native Access project (JNA) is dual-licensed under 2
12633 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
12634 (license (list
12635 license:asl2.0
12636 license:lgpl2.1+))))
12637
12638 (define-public java-native-access-platform
12639 (package
12640 (inherit java-native-access)
12641 (name "java-native-access-platform")
12642 (arguments
12643 `(#:test-target "test"
12644 #:tests? #f; require jna-test.jar
12645 #:phases
12646 (modify-phases %standard-phases
12647 (add-before 'build 'chdir
12648 (lambda _
12649 (chdir "contrib/platform")
12650 #t))
12651 (add-after 'chdir 'fix-ant
12652 (lambda* (#:key inputs #:allow-other-keys)
12653 (substitute* "nbproject/project.properties"
12654 (("../../build/jna.jar")
12655 (string-append (assoc-ref inputs "java-native-access")
12656 "/share/java/jna.jar"))
12657 (("../../lib/hamcrest-core-.*.jar")
12658 (car (find-files (assoc-ref inputs "java-hamcrest-core")
12659 "jar$")))
12660 (("../../lib/junit.jar")
12661 (car (find-files (assoc-ref inputs "java-junit")
12662 "jar$"))))
12663 #t))
12664 (replace 'install
12665 (install-jars "dist")))))
12666 (inputs
12667 `(("java-native-access" ,java-native-access)))
12668 (synopsis "Cross-platform mappings for jna")
12669 (description "java-native-access-platform has cross-platform mappings
12670 and mappings for a number of commonly used platform functions, including a
12671 large number of Win32 mappings as well as a set of utility classes that
12672 simplify native access.")))
12673
12674 (define-public java-jsch-agentproxy-core
12675 (package
12676 (name "java-jsch-agentproxy-core")
12677 (version "0.0.8")
12678 (source (origin
12679 (method url-fetch)
12680 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
12681 version ".tar.gz"))
12682 (file-name (string-append name "-" version ".tar.gz"))
12683 (sha256
12684 (base32
12685 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
12686 (build-system ant-build-system)
12687 (arguments
12688 `(#:jar-name "jsch-agentproxy-core.jar"
12689 #:source-dir "jsch-agent-proxy-core/src/main/java"
12690 #:tests? #f)); no tests
12691 (home-page "https://github.com/ymnk/jsch-agent-proxy")
12692 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
12693 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12694 and Pageant included Putty. It will be easily integrated into JSch, and users
12695 will be allowed to use these programs for authentication.")
12696 (license license:bsd-3)))
12697
12698 (define-public java-jsch-agentproxy-sshagent
12699 (package
12700 (inherit java-jsch-agentproxy-core)
12701 (name "java-jsch-agentproxy-sshagent")
12702 (arguments
12703 `(#:jar-name "jsch-agentproxy-sshagent.jar"
12704 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
12705 #:tests? #f)); no tests
12706 (inputs
12707 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12708 (synopsis "Proxy to ssh-agent")
12709 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12710 and Pageant included in Putty. This component contains the code for a proxy to
12711 ssh-agent.")))
12712
12713 (define-public java-jsch-agentproxy-usocket-jna
12714 (package
12715 (inherit java-jsch-agentproxy-core)
12716 (name "java-jsch-agentproxy-usocket-jna")
12717 (arguments
12718 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
12719 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
12720 #:tests? #f)); no tests
12721 (inputs
12722 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12723 ("java-native-access" ,java-native-access)))
12724 (synopsis "USocketFactory implementation using JNA")
12725 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12726 and Pageant included in Putty. This component contains an implementation of
12727 USocketFactory using @dfn{JNA} (Java Native Access).")))
12728
12729 (define-public java-jsch-agentproxy-pageant
12730 (package
12731 (inherit java-jsch-agentproxy-core)
12732 (name "java-jsch-agentproxy-pageant")
12733 (arguments
12734 `(#:jar-name "jsch-agentproxy-pageant.jar"
12735 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
12736 #:tests? #f)); no tests
12737 (inputs
12738 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12739 ("java-native-access" ,java-native-access)
12740 ("java-native-access-platform" ,java-native-access-platform)))
12741 (synopsis "Proxy to pageant")
12742 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12743 and Pageant included in Putty. This component contains the code for a proxy to
12744 pageant.")))
12745
12746 (define-public java-jsch-agentproxy-usocket-nc
12747 (package
12748 (inherit java-jsch-agentproxy-core)
12749 (name "java-jsch-agentproxy-usocket-nc")
12750 (arguments
12751 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
12752 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
12753 #:tests? #f)); no tests
12754 (inputs
12755 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12756 (synopsis "USocketFactory implementation using netcat")
12757 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12758 and Pageant included in Putty. This component contains an implementation of
12759 USocketFactory using netcat.")))
12760
12761 (define-public java-jsch-agentproxy-connector-factory
12762 (package
12763 (inherit java-jsch-agentproxy-core)
12764 (name "java-jsch-agentproxy-connector-factory")
12765 (arguments
12766 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
12767 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
12768 #:tests? #f)); no tests
12769 (inputs
12770 `(("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12771 ("java-jsch-agentproxy-sshagent" ,java-jsch-agentproxy-sshagent)
12772 ("java-jsch-agentproxy-usocket-jna" ,java-jsch-agentproxy-usocket-jna)
12773 ("java-jsch-agentproxy-pageant" ,java-jsch-agentproxy-pageant)
12774 ("java-jsch-agentproxy-usocket-nc" ,java-jsch-agentproxy-usocket-nc)))
12775 (synopsis "Connector factory for jsch agent proxy")
12776 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12777 and Pageant included in Putty. This component contains a connector factory.")))
12778
12779 (define-public java-jsch-agentproxy-jsch
12780 (package
12781 (inherit java-jsch-agentproxy-core)
12782 (name "java-jsch-agentproxy-jsch")
12783 (arguments
12784 `(#:jar-name "jsch-agentproxy-jsch.jar"
12785 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
12786 #:tests? #f)); no tests
12787 (inputs
12788 `(("java-jsch" ,java-jsch)
12789 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)))
12790 (synopsis "JSch integration library for agentproxy")
12791 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
12792 and Pageant included in Putty. This component contains a library to use
12793 jsch-agent-proxy with JSch.")))
12794
12795 (define-public java-apache-ivy
12796 (package
12797 (name "java-apache-ivy")
12798 (version "2.4.0")
12799 (source (origin
12800 (method url-fetch)
12801 (uri (string-append "mirror://apache//ant/ivy/" version
12802 "/apache-ivy-" version "-src.tar.gz"))
12803 (sha256
12804 (base32
12805 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
12806 (patches
12807 (search-patches
12808 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
12809 (build-system ant-build-system)
12810 (arguments
12811 `(#:jar-name "ivy.jar"
12812 #:tests? #f
12813 #:phases
12814 (modify-phases %standard-phases
12815 (add-before 'build 'remove-example
12816 (lambda _
12817 (delete-file-recursively "src/example")
12818 #t))
12819 (add-before 'build 'copy-resources
12820 (lambda _
12821 (with-directory-excursion "src/java"
12822 (for-each (lambda (file)
12823 (install-file file (string-append "../../build/classes/" (dirname file))))
12824 (append
12825 (find-files "." ".*.css")
12826 (find-files "." ".*.ent")
12827 (find-files "." ".*.html")
12828 (find-files "." ".*.properties")
12829 (find-files "." ".*.xsd")
12830 (find-files "." ".*.xsl")
12831 (find-files "." ".*.xml"))))
12832 #t))
12833 (add-before 'build 'fix-vfs
12834 (lambda _
12835 (substitute*
12836 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
12837 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
12838 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
12839 #t))
12840 (add-before 'install 'copy-manifest
12841 (lambda _
12842 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
12843 #t))
12844 (add-before 'install 'repack
12845 (lambda _
12846 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
12847 "-C" "build/classes" ".")))
12848 (add-after 'install 'install-bin
12849 (lambda* (#:key outputs #:allow-other-keys)
12850 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
12851 (ivy (string-append bin "/ivy"))
12852 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
12853 (mkdir-p bin)
12854 (with-output-to-file ivy
12855 (lambda _
12856 (display (string-append
12857 "#!" (which "sh") "\n"
12858 "if [[ -z $CLASSPATH ]]; then\n"
12859 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
12860 "else\n"
12861 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
12862 "fi\n"
12863 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
12864 (chmod ivy #o755)
12865 #t))))))
12866 (inputs
12867 `(("java-bouncycastle" ,java-bouncycastle)
12868 ("java-commons-cli" ,java-commons-cli)
12869 ("java-commons-collections" ,java-commons-collections)
12870 ("java-commons-httpclient" ,java-commons-httpclient)
12871 ("java-commons-lang" ,java-commons-lang)
12872 ("java-commons-vfs" ,java-commons-vfs)
12873 ("java-jakarta-oro" ,java-jakarta-oro)
12874 ("java-jsch" ,java-jsch)
12875 ("java-jsch-agentproxy-core" ,java-jsch-agentproxy-core)
12876 ("java-jsch-agentproxy-connector-factory" ,java-jsch-agentproxy-connector-factory)
12877 ("java-jsch-agentproxy-jsch" ,java-jsch-agentproxy-jsch)
12878 ("java-junit" ,java-junit)))
12879 (home-page "https://ant.apache.org/ivy")
12880 (synopsis "Dependency manager for the Java programming language")
12881 (description "Ivy is a tool for managing (recording, tracking, resolving
12882 and reporting) project dependencies. It is characterized by the following:
12883
12884 @itemize
12885 @item flexibility and configurability - Ivy is essentially process agnostic
12886 and is not tied to any methodology or structure. Instead it provides the
12887 necessary flexibility and configurability to be adapted to a broad range
12888 of dependency management and build processes.
12889 @item tight integration with Apache Ant - while available as a standalone tool,
12890 Ivy works particularly well with Apache Ant providing a number of
12891 powerful Ant tasks ranging from dependency resolution to dependency
12892 reporting and publication.
12893 @end itemize")
12894 (license license:asl2.0)))
12895
12896 (define-public java-eclipse-sisu-inject
12897 (package
12898 (name "java-eclipse-sisu-inject")
12899 (version "0.3.4")
12900 (source (origin
12901 (method git-fetch)
12902 (uri (git-reference
12903 (url "https://github.com/eclipse/sisu.inject/")
12904 (commit (string-append "releases/" version))))
12905 (file-name (git-file-name name version))
12906 (sha256
12907 (base32
12908 "16044sizdb0rjbhlfbmcnpds5y7by7dyn9b0c11606aikqi8k3x6"))))
12909 (build-system ant-build-system)
12910 (arguments
12911 `(#:jar-name "eclipse-sisu-inject.jar"
12912 #:source-dir "org.eclipse.sisu.inject/src"
12913 #:tests? #f; no tests
12914 #:phases
12915 (modify-phases %standard-phases
12916 (replace 'install
12917 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
12918 (propagated-inputs
12919 `(("java-guice" ,java-guice)
12920 ("java-sisu-inject-parent-pom" ,java-sisu-inject-parent-pom)))
12921 (inputs
12922 `(("java-guice-servlet" ,java-guice-servlet)
12923 ("java-javax-inject" ,java-javax-inject)
12924 ("java-javaee-servletapi" ,java-javaee-servletapi)
12925 ("java-junit" ,java-junit)
12926 ("java-slf4j-api" ,java-slf4j-api)
12927 ("java-jsr305" ,java-jsr305)
12928 ("java-jsr250" ,java-jsr250)
12929 ("java-cdi-api" ,java-cdi-api)
12930 ("java-osgi-framework" ,java-osgi-framework)
12931 ("java-osgi-util-tracker" ,java-osgi-util-tracker)
12932 ("java-testng" ,java-testng)))
12933 (home-page "https://www.eclipse.org/sisu/")
12934 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
12935 (description "Sisu is a modular JSR330-based container that supports
12936 classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
12937 Google-Guice to perform dependency injection and provide the core JSR330
12938 support, but removes the need to write explicit bindings in Guice modules.
12939 Integration with other containers via the Eclipse Extension Registry and the
12940 OSGi Service Registry is a goal of this project.")
12941 (license license:epl1.0)))
12942
12943 (define java-sisu-inject-parent-pom
12944 (package
12945 (inherit java-eclipse-sisu-inject)
12946 (name "java-sisu-inject-parent-pom")
12947 (arguments
12948 `(#:tests? #f
12949 #:phases
12950 (modify-phases %standard-phases
12951 (delete 'configure)
12952 (delete 'build)
12953 (replace 'install
12954 (install-pom-file "pom.xml")))))
12955 (propagated-inputs '())))
12956
12957 (define-public java-eclipse-sisu-plexus
12958 (package
12959 (name "java-eclipse-sisu-plexus")
12960 (version "0.3.4")
12961 (source (origin
12962 (method git-fetch)
12963 (uri (git-reference
12964 (url "https://github.com/eclipse/sisu.plexus")
12965 (commit (string-append "releases/" version))))
12966 (file-name (git-file-name name version))
12967 (sha256
12968 (base32
12969 "17mjlajnsqnk07cc58h1qpxrif85yb2m2y0pyba48yjjgikk8r9f"))
12970 (modules '((guix build utils)))
12971 (snippet
12972 '(begin
12973 (for-each delete-file (find-files "." ".*.jar"))
12974 (rename-file "org.eclipse.sisu.plexus.tests/src"
12975 "org.eclipse.sisu.plexus.tests/java")
12976 #t))))
12977 (build-system ant-build-system)
12978 (arguments
12979 `(#:jar-name "eclipse-sisu-plexus.jar"
12980 #:source-dir "org.eclipse.sisu.plexus/src"
12981 #:test-dir "org.eclipse.sisu.plexus.tests"
12982 #:test-exclude
12983 (list
12984 ;; This test fails probably because we can't generate the necessary
12985 ;; meta-inf files.
12986 "**/PlexusLoggingTest.*"
12987 ;; FIXME: This test fails because of some injection error
12988 "**/PlexusRequirementTest.*")
12989 #:jdk ,icedtea-8
12990 #:phases
12991 (modify-phases %standard-phases
12992 (add-before 'build 'copy-resources
12993 (lambda _
12994 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
12995 "build/classes/META-INF/plexus")
12996 #t))
12997 (add-before 'check 'build-test-jar
12998 (lambda _
12999 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13000 (mkdir "build")
13001 (with-directory-excursion "java"
13002 (apply invoke "javac" "-cp"
13003 (string-append (getenv "CLASSPATH")
13004 ":../../../../../build/classes")
13005 (find-files "." ".*.java"))
13006 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13007 (find-files "." ".*.jar")))
13008 (mkdir-p "build/META-INF/plexus")
13009 (copy-file "resources/META-INF/plexus/components.xml"
13010 "build/META-INF/plexus/components.xml")
13011 (with-directory-excursion "build"
13012 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13013 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13014 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13015 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13016 (("resources/component-jar")
13017 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13018 #t))
13019 (replace 'install
13020 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13021 (propagated-inputs
13022 `(("java-plexus-classworlds" ,java-plexus-classworlds)
13023 ("java-plexus-utils" ,java-plexus-utils)
13024 ("java-plexus-component-annotations" ,java-plexus-component-annotations)
13025 ("java-cdi-api" ,java-cdi-api)
13026 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
13027 ("java-sisu-plexus-parent-pom" ,java-sisu-plexus-parent-pom)))
13028 (inputs
13029 `(("java-osgi-framework" ,java-osgi-framework)
13030 ("java-slf4j-api" ,java-slf4j-api)
13031 ("java-javax-inject" ,java-javax-inject)
13032 ("java-guice" ,java-guice)
13033 ("java-guava" ,java-guava)
13034 ("java-aopalliance" ,java-aopalliance)
13035 ("java-asm" ,java-asm)
13036 ("java-cglib" ,java-cglib)))
13037 (native-inputs
13038 `(("java-junit" ,java-junit)))
13039 (home-page "https://www.eclipse.org/sisu/")
13040 (synopsis "Plexus support for the sisu container")
13041 (description "Sisu is a modular JSR330-based container that supports
13042 classpath scanning, auto-binding, and dynamic auto-wiring. This package
13043 adds Plexus support to the Sisu-Inject container.")
13044 (license license:epl1.0)))
13045
13046 (define java-sisu-plexus-parent-pom
13047 (package
13048 (inherit java-eclipse-sisu-plexus)
13049 (name "java-sisu-plexus-parent-pom")
13050 (arguments
13051 `(#:tests? #f
13052 #:phases
13053 (modify-phases %standard-phases
13054 (delete 'configure)
13055 (delete 'build)
13056 (replace 'install
13057 (install-pom-file "pom.xml")))))
13058 (propagated-inputs
13059 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13060
13061 (define-public java-commons-compiler
13062 (package
13063 (name "java-commons-compiler")
13064 (version "3.0.8")
13065 (source (origin
13066 (method git-fetch)
13067 (uri (git-reference
13068 (url "https://github.com/janino-compiler/janino")
13069 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13070 (file-name (string-append name "-" version))
13071 (sha256
13072 (base32
13073 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13074 (modules '((guix build utils)))
13075 (snippet
13076 '(begin
13077 (for-each delete-file
13078 (find-files "." "\\.jar$"))
13079 #t))))
13080 (build-system ant-build-system)
13081 (arguments
13082 `(#:jar-name "commons-compiler.jar"
13083 #:source-dir "commons-compiler/src/main"
13084 #:tests? #f)); no tests
13085 (home-page "https://github.com/janino-compiler/janino")
13086 (synopsis "Java compiler")
13087 (description "Commons-compiler contains an API for janino, including the
13088 @code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13089 and @code{ISimpleCompiler} interfaces.")
13090 (license license:bsd-3)))
13091
13092 (define-public java-janino
13093 (package
13094 (inherit java-commons-compiler)
13095 (name "java-janino")
13096 (arguments
13097 `(#:jar-name "janino.jar"
13098 #:source-dir "src/main/java"
13099 #:phases
13100 (modify-phases %standard-phases
13101 (add-before 'configure 'chdir
13102 (lambda _
13103 (chdir "janino")
13104 #t)))))
13105 (inputs
13106 `(("java-commons-compiler" ,java-commons-compiler)))
13107 (native-inputs
13108 `(("java-junit" ,java-junit)
13109 ("java-hamcrest-core" ,java-hamcrest-core)))
13110 (description "Janino is a Java compiler. Janino can compile a set of
13111 source files to a set of class files like @code{javac}, but also compile a
13112 Java expression, block, class body or source file in memory, load the bytecode
13113 and execute it directly in the same JVM. @code{janino} can also be used for
13114 static code analysis or code manipulation.")))
13115
13116 (define-public java-logback-core
13117 (package
13118 (name "java-logback-core")
13119 (version "1.2.3")
13120 (source (origin
13121 (method url-fetch)
13122 (uri (string-append "https://github.com/qos-ch/logback/archive/v_"
13123 version ".tar.gz"))
13124 (file-name (string-append name "-" version ".tar.gz"))
13125 (sha256
13126 (base32
13127 "1x6ga74yfgm94cfx98gybakbrlilx8i2gn6dx13l40kasmys06mi"))
13128 (modules '((guix build utils)))
13129 (snippet
13130 '(begin
13131 (delete-file-recursively "logback-access/lib")
13132 #t))))
13133 (build-system ant-build-system)
13134 (arguments
13135 `(#:jar-name "logback.jar"
13136 #:source-dir "src/main/java"
13137 #:test-dir "src/test"
13138 #:test-exclude
13139 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13140 ;; which creates FastClasses
13141 (list "**/AllCoreTest.*"
13142 "**/AutoFlushingObjectWriterTest.*"
13143 "**/PackageTest.*"
13144 "**/ResilientOutputStreamTest.*"
13145 ;; And we still don't want to run abstract classes
13146 "**/Abstract*.*")
13147 #:phases
13148 (modify-phases %standard-phases
13149 (add-before 'configure 'chdir
13150 (lambda _
13151 (chdir "logback-core")
13152 #t)))))
13153 (inputs
13154 `(("java-javax-mail" ,java-javax-mail)
13155 ("servlet" ,java-javaee-servletapi)
13156 ("java-commons-compiler" ,java-commons-compiler)
13157 ("java-janino" ,java-janino)))
13158 (native-inputs
13159 `(("java-junit" ,java-junit)
13160 ("java-hamcrest-core" ,java-hamcrest-core)
13161 ("java-mockito-1" ,java-mockito-1)
13162 ("java-cglib" ,java-cglib)
13163 ("java-asm" ,java-asm)
13164 ("java-objenesis" ,java-objenesis)
13165 ("java-joda-time" ,java-joda-time)))
13166 (home-page "https://logback.qos.ch")
13167 (synopsis "Logging for java")
13168 (description "Logback is intended as a successor to the popular log4j project.
13169 This module lays the groundwork for the other two modules.")
13170 ;; Either epl1.0 or lgpl2.1
13171 (license (list license:epl1.0
13172 license:lgpl2.1))))
13173
13174 (define-public java-logback-classic
13175 (package
13176 (inherit java-logback-core)
13177 (name "java-logback-classic")
13178 (arguments
13179 `(#:jar-name "logback-classic.jar"
13180 #:source-dir "src/main/java"
13181 #:test-dir "src/test"
13182 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13183 #:jdk ,icedtea-8
13184 #:phases
13185 (modify-phases %standard-phases
13186 (add-before 'configure 'chdir
13187 (lambda _
13188 (chdir "logback-classic")
13189 #t))
13190 (replace 'build
13191 (lambda* (#:key inputs #:allow-other-keys)
13192 (mkdir-p "build/classes")
13193 (setenv "CLASSPATH"
13194 (string-join
13195 (apply append (map (lambda (input)
13196 (find-files (assoc-ref inputs input)
13197 ".*.jar"))
13198 '("java-logback-core" "java-slf4j-api"
13199 "java-commons-compiler" "servlet"
13200 "groovy")))
13201 ":"))
13202 (apply invoke "groovyc" "-d" "build/classes" "-j"
13203 (find-files "src/main/" ".*\\.(groovy|java)$"))
13204 (invoke "ant" "jar")
13205 #t)))))
13206 (inputs
13207 `(("java-logback-core" ,java-logback-core)
13208 ("java-slf4j-api" ,java-slf4j-api)
13209 ,@(package-inputs java-logback-core)))
13210 (native-inputs
13211 `(("groovy" ,groovy)))
13212 (description "Logback is intended as a successor to the popular log4j project.
13213 This module can be assimilated to a significantly improved version of log4j.
13214 Moreover, @code{logback-classic} natively implements the slf4j API so that you
13215 can readily switch back and forth between logback and other logging frameworks
13216 such as log4j or @code{java.util.logging} (JUL).")))
13217
13218 (define-public java-jgit
13219 (package
13220 (name "java-jgit")
13221 (version "4.7.0.201704051617-r")
13222 (source (origin
13223 (method url-fetch)
13224 (uri (string-append "https://repo1.maven.org/maven2/"
13225 "org/eclipse/jgit/org.eclipse.jgit/"
13226 version "/org.eclipse.jgit-"
13227 version "-sources.jar"))
13228 (sha256
13229 (base32
13230 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13231 (build-system ant-build-system)
13232 (arguments
13233 `(#:tests? #f ; There are no tests to run.
13234 #:jar-name "jgit.jar"
13235 ;; JGit must be built with a JDK supporting Java 8.
13236 #:jdk ,icedtea-8
13237 ;; Target our older default JDK.
13238 #:make-flags (list "-Dtarget=1.7")
13239 #:phases
13240 (modify-phases %standard-phases
13241 ;; The jar file generated by the default build.xml does not include
13242 ;; the text properties files, so we need to add them.
13243 (add-after 'build 'add-properties
13244 (lambda* (#:key jar-name #:allow-other-keys)
13245 (with-directory-excursion "src"
13246 (apply invoke "jar" "-uf"
13247 (string-append "../build/jar/" jar-name)
13248 (find-files "." "\\.properties$")))
13249 #t)))))
13250 (inputs
13251 `(("java-classpathx-servletapi" ,java-classpathx-servletapi)
13252 ("java-javaewah" ,java-javaewah)
13253 ("java-jsch" ,java-jsch)
13254 ("java-slf4j-api" ,java-slf4j-api)))
13255 (home-page "https://eclipse.org/jgit/")
13256 (synopsis "Java library implementing the Git version control system")
13257 (description "JGit is a lightweight, pure Java library implementing the
13258 Git version control system, providing repository access routines, support for
13259 network protocols, and core version control algorithms.")
13260 (license license:edl1.0)))
13261
13262 ;; For axoloti. This package can still be built with icedtea-7, which is
13263 ;; currently used as the default JDK.
13264 (define-public java-jgit-4.2
13265 (package (inherit java-jgit)
13266 (version "4.2.0.201601211800-r")
13267 (source (origin
13268 (method url-fetch)
13269 (uri (string-append "https://repo1.maven.org/maven2/"
13270 "org/eclipse/jgit/org.eclipse.jgit/"
13271 version "/org.eclipse.jgit-"
13272 version "-sources.jar"))
13273 (sha256
13274 (base32
13275 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13276 (build-system ant-build-system)
13277 (arguments
13278 (substitute-keyword-arguments (package-arguments java-jgit)
13279 ;; Build for default JDK.
13280 ((#:jdk _) icedtea-7)
13281 ((#:phases phases)
13282 `(modify-phases ,phases
13283 (add-after 'unpack 'use-latest-javaewah-API
13284 (lambda _
13285 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13286 (("wordinbits") "WORD_IN_BITS"))
13287 #t))))))
13288 (inputs
13289 `(("java-javaewah" ,java-javaewah)
13290 ("java-jsch" ,java-jsch)
13291 ("java-slf4j-api" ,java-slf4j-api)))))
13292
13293 (define-public abcl
13294 (package
13295 (name "abcl")
13296 (version "1.8.0")
13297 (source
13298 (origin
13299 (method url-fetch)
13300 (uri (string-append "https://abcl.org/releases/"
13301 version "/abcl-src-" version ".tar.gz"))
13302 (sha256
13303 (base32
13304 "0zr5mmqyj484vza089l8vc88d07g0m8ymxzglvar3ydwyvi1x1qx"))
13305 (patches
13306 (search-patches
13307 "abcl-fix-build-xml.patch"))))
13308 (build-system ant-build-system)
13309 (native-inputs
13310 `(("java-junit" ,java-junit)))
13311 (arguments
13312 `(#:build-target "abcl.jar"
13313 #:test-target "abcl.test"
13314 #:phases
13315 (modify-phases %standard-phases
13316 (replace 'install
13317 (lambda* (#:key outputs #:allow-other-keys)
13318 (let ((share (string-append (assoc-ref outputs "out")
13319 "/share/java/"))
13320 (bin (string-append (assoc-ref outputs "out")
13321 "/bin/")))
13322 (mkdir-p share)
13323 (install-file "dist/abcl.jar" share)
13324 (install-file "dist/abcl-contrib.jar" share)
13325 (mkdir-p bin)
13326 (with-output-to-file (string-append bin "abcl")
13327 (lambda _
13328 (let ((classpath (string-append
13329 share "abcl.jar"
13330 ":"
13331 share "abcl-contrib.jar")))
13332 (display (string-append
13333 "#!" (which "sh") "\n"
13334 "if [[ -z $CLASSPATH ]]; then\n"
13335 " cp=\"" classpath "\"\n"
13336 "else\n"
13337 " cp=\"" classpath ":$CLASSPATH\"\n"
13338 "fi\n"
13339 "exec " (which "java")
13340 " -cp $cp org.armedbear.lisp.Main $@\n")))))
13341 (chmod (string-append bin "abcl") #o755)
13342 #t))))))
13343 (home-page "https://abcl.org/")
13344 (synopsis "Common Lisp Implementation on the JVM")
13345 (description
13346 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13347 Lisp language featuring both an interpreter and a compiler, running in the
13348 JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13349 in any Java application. Additionally, it can be used to implement (parts of)
13350 the application using Java to Lisp integration APIs.")
13351 (license (list license:gpl2+
13352 ;; named-readtables is released under 3 clause BSD
13353 license:bsd-3
13354 ;; jfli is released under CPL 1.0
13355 license:cpl1.0))))
13356
13357 (define-public java-jsonp-api
13358 (package
13359 (name "java-jsonp-api")
13360 (version "1.1.6")
13361 (source (origin
13362 (method git-fetch)
13363 (uri (git-reference
13364 (url "https://github.com/eclipse-ee4j/jsonp")
13365 (commit (string-append "1.1-" version "-RELEASE"))))
13366 (file-name (git-file-name name version))
13367 (sha256
13368 (base32
13369 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13370 (build-system ant-build-system)
13371 (arguments
13372 `(#:jar-name "jsonp-api.jar"
13373 #:tests? #f
13374 #:source-dir "api/src/main/java"
13375 #:test-dir "api/src/test"))
13376 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13377 (synopsis "JSON Processing in Java")
13378 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13379 parse, generate, transform and query) JSON messages. It produces and
13380 consumes JSON text in a streaming fashion (similar to StAX API for XML)
13381 and allows building a Java object model for JSON text using API classes
13382 (similar to DOM API for XML).")
13383 ;; either gpl2 only with classpath exception, or epl2.0.
13384 (license (list license:gpl2
13385 license:epl2.0))))
13386
13387 (define-public java-jsonp-impl
13388 (package
13389 (inherit java-jsonp-api)
13390 (name "java-jsonp-impl")
13391 (arguments
13392 `(#:jar-name "jsonp-impl.jar"
13393 #:tests? #f
13394 #:source-dir "impl/src/main/java"
13395 #:test-dir "impl/src/test"
13396 #:phases
13397 (modify-phases %standard-phases
13398 (add-before 'build 'copy-resources
13399 (lambda _
13400 (copy-recursively
13401 "impl/src/main/resources/"
13402 "build/classes")
13403 #t)))))
13404 (propagated-inputs
13405 `(("java-jsonp-api" ,java-jsonp-api)))
13406 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
13407 parse, generate, transform and query) JSON messages. This package contains
13408 a reference implementation of that API.")))
13409
13410 (define-public java-xmp
13411 (package
13412 (name "java-xmp")
13413 (version "5.1.3")
13414 (source (origin
13415 (method url-fetch)
13416 (uri (string-append "http://download.macromedia.com/pub/developer"
13417 "/xmp/sdk/XMPCoreJava-" version ".zip"))
13418 (sha256
13419 (base32
13420 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
13421 (build-system ant-build-system)
13422 (arguments
13423 `(#:build-target "build"
13424 #:tests? #f; no tests
13425 #:phases
13426 (modify-phases %standard-phases
13427 (add-after 'unpack 'chdir
13428 (lambda _
13429 (chdir "XMPCore")
13430 #t))
13431 (add-before 'build 'fix-timestamp
13432 (lambda _
13433 (substitute* "build.xml"
13434 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
13435 #t))
13436 (replace 'install
13437 (install-jars "."))
13438 (add-after 'install 'install-doc
13439 (lambda* (#:key outputs #:allow-other-keys)
13440 (copy-recursively
13441 "docs"
13442 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
13443 #t)))))
13444 (native-inputs
13445 `(("unzip" ,unzip)))
13446 (home-page "https://www.adobe.com/devnet/xmp.html")
13447 (synopsis "Extensible Metadat Platform (XMP) support in Java")
13448 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
13449 technology that allows you to embed data about a file, known as metadata,
13450 into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
13451 library and the API is similar.")
13452 (license license:bsd-3)))
13453
13454 (define-public java-args4j
13455 (package
13456 (name "java-args4j")
13457 (version "2.33")
13458 (source (origin
13459 (method git-fetch)
13460 (uri (git-reference
13461 (url "https://github.com/kohsuke/args4j")
13462 (commit (string-append "args4j-site-" version))))
13463 (file-name (git-file-name name version))
13464 (sha256
13465 (base32
13466 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
13467 (build-system ant-build-system)
13468 (arguments
13469 `(#:jar-name "args4j.jar"
13470 #:source-dir "args4j/src"
13471 #:test-dir "args4j/test"
13472 #:test-exclude
13473 (list "**/ExampleTest.*"
13474 "**/ExternalConfiguredTest.*" ; fails to find a file
13475 ;; We still don't want to run abstract classes
13476 "**/Abstract*.*")
13477 #:phases
13478 (modify-phases %standard-phases
13479 (add-before 'check 'fix-test-dir
13480 (lambda _
13481 (substitute* "build.xml"
13482 (("/java\">") "\">"))
13483 #t))
13484 (add-before 'build 'copy-resources
13485 (lambda _
13486 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
13487 (to-prefix "build/classes/org/kohsuke/args4j/"))
13488 (for-each (lambda (f)
13489 (install-file
13490 (string-append from-prefix f)
13491 (string-append to-prefix (dirname f))))
13492 (list "Messages.properties"
13493 "Messages_de.properties"
13494 "Messages_en.properties"
13495 "Messages_ru.properties"
13496 "spi/Messages.properties"
13497 "spi/Messages_de.properties"
13498 "spi/Messages_en.properties"
13499 "spi/Messages_ru.properties")))
13500 #t)))))
13501 (native-inputs
13502 `(("java-junit" ,java-junit)))
13503 (home-page "https://args4j.kohsuke.org/")
13504 (synopsis "Command line parser library")
13505 (description "Args4j is a small Java class library that makes it easy to
13506 parse command line options/arguments in your CUI application.")
13507 (license license:expat)))
13508
13509 (define-public java-metadata-extractor
13510 (package
13511 (name "java-metadata-extractor")
13512 (version "2.11.0")
13513 (source (origin
13514 (method git-fetch)
13515 (uri (git-reference
13516 (url "https://github.com/drewnoakes/metadata-extractor")
13517 (commit version)))
13518 (file-name (git-file-name name version))
13519 (sha256
13520 (base32
13521 "06yrq0swrl1r40yjbk5kqzjxr04jlkq9lfi711jvfgjf5kp2qinj"))))
13522 (build-system ant-build-system)
13523 (arguments
13524 `(#:jar-name "metadata-extractor.jar"
13525 #:source-dir "Source"
13526 #:test-dir "Tests"
13527 #:phases
13528 (modify-phases %standard-phases
13529 (add-before 'check 'fix-test-dir
13530 (lambda _
13531 (substitute* "build.xml"
13532 (("/java\">") "\">"))
13533 #t)))))
13534 (propagated-inputs
13535 `(("java-xmp" ,java-xmp)))
13536 (native-inputs
13537 `(("java-hamcrest-core" ,java-hamcrest-core)
13538 ("java-junit" ,java-junit)))
13539 (home-page "https://github.com/drewnoakes/metadata-extractor")
13540 (synopsis "Extract metadata from image and video files")
13541 (description "Metadata-extractor is a straightforward Java library for
13542 reading metadata from image files. It is able to read metadata in Exif,
13543 IPTC, XMP, ICC and more formats.")
13544 (license license:asl2.0)))
13545
13546 (define-public java-svg-salamander
13547 (package
13548 (name "java-svg-salamander")
13549 (version "1.1.2")
13550 (source (origin
13551 (method git-fetch)
13552 (uri (git-reference
13553 (url "https://github.com/blackears/svgSalamander")
13554 (commit (string-append "v" version))))
13555 (file-name (git-file-name name version))
13556 (sha256
13557 (base32
13558 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
13559 (modules '((guix build utils)))
13560 (snippet
13561 '(begin
13562 (for-each delete-file (find-files "." ".*.jar"))
13563 #t))
13564 (patches
13565 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
13566 (build-system ant-build-system)
13567 (arguments
13568 `(#:tests? #f; no tests
13569 #:phases
13570 (modify-phases %standard-phases
13571 (add-after 'unpack 'chdir
13572 (lambda _
13573 (chdir "svg-core")
13574 #t))
13575 (add-before 'build 'copy-jars
13576 (lambda* (#:key inputs #:allow-other-keys)
13577 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
13578 "../libraries/javacc.jar")
13579 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
13580 "../libraries/ant.jar")
13581 #t))
13582 (replace 'install
13583 (install-jars "dist")))))
13584 (native-inputs
13585 `(("javacc" ,javacc)))
13586 (home-page "https://github.com/blackears/svgSalamander")
13587 (synopsis "SVG engine for Java")
13588 (description "SVG Salamander is an SVG engine for Java that's designed
13589 to be small, fast, and allow programmers to use it with a minimum of fuss.
13590 It's in particular targeted for making it easy to integrate SVG into Java
13591 games and making it much easier for artists to design 2D game content - from
13592 rich interactive menus to charts and graphcs to complex animations.")
13593 (license license:bsd-2)))
13594
13595 (define-public java-jboss-transaction-api-spec
13596 (package
13597 (name "java-jboss-transaction-api-spec")
13598 (version "1.2+1.1.1")
13599 (source (origin
13600 (method git-fetch)
13601 (uri (git-reference
13602 (url "https://github.com/jboss/jboss-transaction-api_spec")
13603 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
13604 (file-name (git-file-name name version))
13605 (sha256
13606 (base32
13607 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
13608 (build-system ant-build-system)
13609 (arguments
13610 `(#:jar-name "java-jboss-transaction-api_spec.jar"
13611 #:source-dir "src/main/java"
13612 #:tests? #f)); no tests
13613 (inputs
13614 `(("java-cdi-api" ,java-cdi-api)
13615 ("java-jboss-interceptors-api-spec" ,java-jboss-interceptors-api-spec)))
13616 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
13617 (synopsis "Generic transaction management API in Java")
13618 (description "Java-jboss-transaction-api-spec implements the Transactions
13619 API. A transaction is a unit of work containing one or more operations
13620 involving one or more shared resources having ACID (Atomicity, Consistency,
13621 Isolation and Durability) properties.")
13622 ;; either gpl2 only with classpath exception or cddl.
13623 (license (list license:gpl2 license:cddl1.0))))
13624
13625 (define-public java-picocli
13626 (package
13627 (name "java-picocli")
13628 (version "4.3.2")
13629 (source (origin
13630 (method git-fetch)
13631 (uri (git-reference
13632 (url "https://github.com/remkop/picocli")
13633 (commit (string-append "v" version))))
13634 (file-name (git-file-name name version))
13635 (sha256
13636 (base32
13637 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
13638 (build-system ant-build-system)
13639 (arguments
13640 `(#:jar-name "picocli.jar"
13641 #:source-dir "src/main/java"
13642 ;; Tests require missing dependencies (junitparams, system-rules)
13643 #:tests? #f))
13644 (home-page "https://picocli.info")
13645 (synopsis "REPL for the JVM")
13646 (description "Picocli is a framework for building command line applications
13647 for the JVM. It supports colors, autocompletion, subcommands, and more. Written
13648 in Java, usable from Groovy, Kotlin, Scala, etc.")
13649 (license license:asl2.0)))
13650
13651 (define-public java-jetbrains-annotations
13652 (package
13653 (name "java-jetbrains-annotations")
13654 (version "19.0.0")
13655 (source (origin
13656 (method git-fetch)
13657 (uri (git-reference
13658 (url "https://github.com/JetBrains/java-annotations")
13659 (commit version)))
13660 (file-name (git-file-name name version))
13661 (sha256
13662 (base32
13663 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
13664 (build-system ant-build-system)
13665 (arguments
13666 `(#:jar-name "jetbrains-annotations.jar"
13667 #:source-dir "common/src/main/java:java8/src/main/java"
13668 #:tests? #f)); no tests
13669 (home-page "https://github.com/JetBrains/java-annotations")
13670 (synopsis "Annotations for Java and other JVM languages")
13671 (description "This package contains a set of Java annotations which can be
13672 used in JVM-based languages. They serve as an additional documentation and
13673 can be interpreted by IDEs and static analysis tools to improve code analysis.")
13674 (license license:expat)))
13675
13676 (define-public java-javaparser
13677 (package
13678 (name "java-javaparser")
13679 (version "3.16.1")
13680 (source (origin
13681 (method git-fetch)
13682 (uri (git-reference
13683 (url "https://github.com/javaparser/javaparser")
13684 (commit (string-append "javaparser-parent-" version))))
13685 (file-name (git-file-name name version))
13686 (sha256
13687 (base32
13688 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
13689 (modules '((guix build utils)))
13690 (snippet
13691 '(begin
13692 (for-each delete-file
13693 (find-files "." "\\.jar$"))
13694 #t))))
13695 (build-system ant-build-system)
13696 (arguments
13697 `(#:tests? #f; tests require jbehave and junit5
13698 #:phases
13699 (modify-phases %standard-phases
13700 (add-before 'build 'fill-template
13701 (lambda _
13702 (with-directory-excursion "javaparser-core/src/main"
13703 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
13704 "java/com/github/javaparser/JavaParserBuild.java")
13705 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
13706 (("\\$\\{project.version\\}") ,version)
13707 (("\\$\\{project.name\\}") "javaparser")
13708 (("\\$\\{project.build.finalName\\}") "javaparser")
13709 (("\\$\\{maven.version\\}") "fake")
13710 (("\\$\\{maven.build.version\\}") "fake")
13711 (("\\$\\{build.timestamp\\}") "0")
13712 (("\\$\\{java.vendor\\}") "Guix")
13713 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
13714 (("\\$\\{java.version\\}") "1.8")
13715 (("\\$\\{os.arch\\}") "any")
13716 (("\\$\\{os.name\\}") "GuixSD")
13717 (("\\$\\{os.version\\}") "not available")))
13718 #t))
13719 (add-before 'build 'generate-javacc
13720 (lambda _
13721 (with-directory-excursion "javaparser-core/src/main/java"
13722 (invoke "java" "javacc" "../javacc/java.jj"))
13723 #t))
13724 (add-before 'build 'copy-javacc-support
13725 (lambda _
13726 (with-directory-excursion "javaparser-core/src/main"
13727 (copy-recursively "javacc-support" "java"))
13728 #t))
13729 (replace 'build
13730 (lambda _
13731 (define (build name)
13732 (format #t "Building ~a~%" name)
13733 (delete-file-recursively "build/classes")
13734 (mkdir-p "build/classes")
13735 (apply invoke "javac"
13736 "-cp" (string-append (getenv "CLASSPATH") ":"
13737 (string-join (find-files "build/jar" ".")
13738 ":"))
13739 "-d" "build/classes"
13740 (find-files (string-append name "/src/main/java")
13741 ".*.java"))
13742 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
13743 "-C" "build/classes" "."))
13744 (mkdir-p "build/classes")
13745 (mkdir-p "build/test-classes")
13746 (mkdir-p "build/jar")
13747 (build "javaparser-core")
13748 (build "javaparser-core-serialization")
13749 (build "javaparser-core-generators")
13750 (build "javaparser-core-metamodel-generator")
13751 (build "javaparser-symbol-solver-core")
13752 #t))
13753 (replace 'install
13754 (install-jars "build/jar")))))
13755 (inputs
13756 `(("java-guava" ,java-guava)
13757 ("java-jboss-javassist" ,java-jboss-javassist)
13758 ("java-jsonp-api" ,java-jsonp-api)))
13759 (native-inputs
13760 `(("javacc" ,javacc)))
13761 (home-page "http://javaparser.org/")
13762 (synopsis "Parser for Java")
13763 (description
13764 "This project contains a set of libraries implementing a Java 1.0 - Java
13765 11 Parser with advanced analysis functionalities.")
13766 (license (list
13767 ;; either lgpl or asl
13768 license:lgpl3+
13769 license:asl2.0))))