projects/guix·blob nckx-patch-1 · refs

14870 lines · 618.7 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015-2024 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016 Leo Famulari <[email protected]>
4;;; Copyright © 2016, 2017 Roel Janssen <[email protected]>
5;;; Copyright © 2017, 2019, 2021 Carlo Zancanaro <[email protected]>
6;;; Copyright © 2017-2022 Julien Lepiller <[email protected]>
7;;; Copyright © 2017 Thomas Danckaert <[email protected]>
8;;; Copyright © 2016, 2017, 2018 Alex Vong <[email protected]>
9;;; Copyright © 2017, 2019, 2021 Tobias Geerinckx-Rice <[email protected]>
10;;; Copyright © 2018, 2019 Gábor Boskovits <[email protected]>
11;;; Copyright © 2018 Chris Marusich <[email protected]>
12;;; Copyright © 2018-2024 Efraim Flashner <[email protected]>
13;;; Copyright © 2019, 2020, 2021 Björn Höfling <[email protected]>
14;;; Copyright © 2020, 2025 Janneke Nieuwenhuizen <[email protected]>
15;;; Copyright © 2020 Raghav Gururajan <[email protected]>
16;;; Copyright © 2020, 2022, 2025-2026 Maxim Cournoyer <[email protected]>
17;;; Copyright © 2021 Vincent Legoll <[email protected]>
18;;; Copyright © 2021 Mike Gerwitz <[email protected]>
19;;; Copyright © 2021 Pierre Langlois <[email protected]>
20;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
21;;; Copyright © 2022, 2024, 2025 Artyom V. Poptsov <[email protected]>
22;;; Copyright © 2024 Paul A. Patience <[email protected]>
23;;; Copyright © 2024 Raven Hallsby <[email protected]>
24;;; Copyright © 2024 Hartmut Goebel <[email protected]>
25;;; Copyright © 2025 Zheng Junjie <[email protected]>
26;;; Copyright © 2025 Julian Flake <[email protected]>
27;;; Copyright © 2026 Mathieu Lirzin <[email protected]>
28;;;
29;;; This file is part of GNU Guix.
30;;;
31;;; GNU Guix is free software; you can redistribute it and/or modify it
32;;; under the terms of the GNU General Public License as published by
33;;; the Free Software Foundation; either version 3 of the License, or (at
34;;; your option) any later version.
35;;;
36;;; GNU Guix is distributed in the hope that it will be useful, but
37;;; WITHOUT ANY WARRANTY; without even the implied warranty of
38;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
39;;; GNU General Public License for more details.
40;;;
41;;; You should have received a copy of the GNU General Public License
42;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
43
44(define-module (gnu packages java)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix hg-download)
49 #:use-module (guix git-download)
50 #:use-module (guix svn-download)
51 #:use-module ((guix build utils) #:select (alist-replace))
52 #:use-module (guix utils)
53 #:use-module (guix gexp)
54 #:use-module (guix build-system ant)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system maven)
58 #:use-module (guix build-system pyproject)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages nss)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages cpio)
67 #:use-module (gnu packages cups)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages elf)
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages freedesktop) ; wayland
72 #:use-module (gnu packages gawk)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages gettext)
75 #:use-module (gnu packages gl)
76 #:use-module (gnu packages ghostscript) ;lcms
77 #:use-module (gnu packages gnome)
78 #:use-module (gnu packages groovy)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages icu4c)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages java-bootstrap)
84 #:use-module (gnu packages java-compression)
85 #:use-module (gnu packages java-xml)
86 #:use-module (gnu packages libffi)
87 #:use-module (gnu packages linux) ;alsa
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages maven)
90 #:use-module (gnu packages maven-parent-pom)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages onc-rpc)
94 #:use-module (gnu packages web)
95 #:use-module (gnu packages wget)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages popt)
99 #:use-module (gnu packages python-build)
100 #:use-module (gnu packages kerberos)
101 #:use-module (gnu packages security-token)
102 #:use-module (gnu packages xml)
103 #:use-module (gnu packages xdisorg)
104 #:use-module (gnu packages xorg)
105 #:use-module (gnu packages texinfo)
106 #:use-module ((srfi srfi-1) #:select (first fold alist-delete))
107 #:use-module (srfi srfi-11)
108 #:use-module (ice-9 match))
109
110(define* (system->icedtea-arch #:optional (system (or (%current-target-system)
111 (%current-system))))
112 "Return the Icedtea architecture string, such as \"ppc64le\", of SYSTEM."
113 ;; See INSTALL_ARCH_DIR in the configure script of icedtea.
114 (match system
115 ("i686-linux" "i386")
116 ("x86_64-linux" "amd64")
117 ("armhf-linux" "arm")
118 ("powerpc-linux" "ppc")
119 ("powerpc64le-linux" "ppc64le")
120 (system
121 ;; Turn e.g. "aarch64-linux" into "aarch64".
122 (first (string-split system #\-)))))
123
124(define-public icedtea-7
125 (let* ((version "2.6.13")
126 (drop (lambda* (name hash #:optional (patches '()))
127 (origin
128 (method url-fetch)
129 (uri (string-append
130 "http://icedtea.classpath.org/download/drops"
131 "/icedtea7/" version "/" name ".tar.bz2"))
132 (sha256 (base32 hash))
133 (patches patches)))))
134 (package
135 (name "icedtea")
136 (version version)
137 (source (origin
138 (method url-fetch)
139 (uri (string-append
140 "http://icedtea.wildebeest.org/download/source/icedtea-"
141 version ".tar.xz"))
142 (sha256
143 (base32
144 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
145 (modules '((guix build utils)))
146 (snippet
147 '(substitute* "Makefile.in"
148 ;; do not leak information about the build host
149 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
150 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
151 (build-system gnu-build-system)
152 (outputs '("out" ; Java Runtime Environment
153 "jdk" ; Java Development Kit
154 "doc")) ; all documentation
155 (arguments
156 (list
157 ;; There are many test failures. Some are known to fail upstream,
158 ;; others relate to not having an X server running at test time, yet
159 ;; others are a complete mystery to me.
160
161 ;; hotspot: passed: 241; failed: 45; error: 2
162 ;; langtools: passed: 1,934; failed: 26
163 ;; jdk: unknown
164 #:tests? #f
165 ;; The validate-runpath phase fails on internal libraries depending on
166 ;; libraries found under e.g. 'lib/amd64' on x86_64, and the build
167 ;; system blissfully ignores LDFLAGS; disable it.
168 #:validate-runpath? #f
169 #:modules '((guix build utils)
170 (guix build gnu-build-system)
171 (ice-9 match)
172 (ice-9 popen)
173 (srfi srfi-19)
174 (srfi srfi-26))
175 #:configure-flags
176 ;; TODO: package sctp and add to inputs
177 #~(list "--disable-system-sctp"
178 "--enable-system-pcsc"
179 "--enable-system-lcms"
180 "--enable-bootstrap"
181 "--enable-nss"
182 "--without-rhino"
183 (string-append "--with-parallel-jobs="
184 (number->string (parallel-job-count)))
185 "--disable-downloading"
186 "--disable-tests" ;they are run in the check phase instead
187 "--with-openjdk-src-dir=./openjdk.src"
188 (string-append
189 "--with-ecj=" (search-input-file %build-inputs "bin/javac"))
190 (string-append "--with-jdk-home="
191 #$(this-package-native-input "classpath"))
192 (string-append "--with-java="
193 (search-input-file %build-inputs "bin/jamvm"))
194 (string-append "--with-jar="
195 (search-input-file %build-inputs "/bin/gjar")))
196 #:phases
197 #~(modify-phases %standard-phases
198 (replace 'unpack
199 (lambda* (#:key source inputs #:allow-other-keys)
200 (let ((target (string-append "icedtea-"
201 #$(package-version this-package)))
202 (unpack (lambda* (name #:optional dir)
203 (let ((dir (or dir
204 (string-drop-right name 5))))
205 (mkdir dir)
206 (invoke "tar" "xvf"
207 (assoc-ref inputs name)
208 "-C" dir
209 "--strip-components=1")))))
210 (mkdir target)
211 (invoke "tar" "xvf" source
212 "-C" target "--strip-components=1")
213 (chdir target)
214 (unpack "openjdk-src" "openjdk.src")
215 (with-directory-excursion "openjdk.src"
216 (for-each unpack
217 (filter (cut string-suffix? "-drop" <>)
218 (map (match-lambda
219 ((name . _) name))
220 inputs)))))))
221 (add-after 'unpack 'use-classpath
222 (lambda* (#:key inputs #:allow-other-keys)
223 (let ((tools (search-input-file inputs
224 "share/classpath/tools.zip"))
225 (rt.jar (search-input-file inputs "lib/rt.jar")))
226 ;; GNU Classpath does not provide rt.jar, but jamvm provides
227 ;; Classpath's glibj.zip as rt.jar, so we just use that.
228 (substitute* "Makefile.in"
229 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
230 ;; Make sure we can find all classes.
231 (setenv "CLASSPATH"
232 (string-append rt.jar ":" tools))
233 (setenv "JAVACFLAGS"
234 (string-append "-cp " rt.jar ":" tools)))))
235 (add-after 'unpack 'patch-bitrot
236 (lambda _
237 (substitute*
238 '("patches/boot/revert-6973616.patch"
239 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
240 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
241 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
242 ;; As of attr 2.4.48 this header is no longer
243 ;; included. It is provided by the libc instead.
244 (substitute* '("configure"
245 "openjdk.src/jdk/src/solaris/native/sun/\
246nio/fs/LinuxNativeDispatcher.c")
247 (("attr/xattr.h") "sys/xattr.h"))))
248 (add-after 'unpack 'fix-openjdk
249 (lambda _
250 (with-directory-excursion "openjdk.src"
251 (substitute* "jdk/make/common/Defs-linux.gmk"
252 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
253 (string-append all
254 " -fcommon"
255 " -Wno-error=implicit-function-declaration"
256 " -Wno-error=implicit-int"
257 " -Wno-error=incompatible-pointer-types"
258 " -Wno-error=int-conversion")))
259 (substitute*
260 '("jdk/src/solaris/native/java/net/PlainSocketImpl.c"
261 "jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
262 (("#include <sys/sysctl.h>")
263 "#include <linux/sysctl.h>"))
264
265 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
266 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
267 ;; It is only used as a verification step, so ignore it; try
268 ;; removing this substitution for newer versions of glibc.
269 (substitute* "jdk/make/common/shared/Defs-linux.gmk"
270 (("\\$\\(LDD\\) \\$1 &&")
271 ""))
272
273 ;; It looks like the "h = 31 * h + c" line of the jsum()
274 ;; function gets miscompiled. After a few iterations of the
275 ;; loop the result of "31 * h" is always 0x8000000000000000.
276 ;; Disable optimizations of dump.cpp as a workaround.
277 (substitute* "hotspot/make/linux/makefiles/gcc.make"
278 (("OPT_CFLAGS/NOOPT.*" all)
279 (string-append all "\n"
280 "OPT_CFLAGS/dump.o += -O0"))))))
281 (add-after 'unpack 'fix-x11-extension-include-path
282 (lambda* (#:key inputs #:allow-other-keys)
283 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
284 (((string-append "\\$\\(firstword \\$\\(wildcard "
285 "\\$\\(OPENWIN_HOME\\)"
286 "/include/X11/extensions\\).*$"))
287 (string-append #$(this-package-input "libxrender")
288 "/include/X11/extensions"
289 " -I" #$(this-package-input "libxtst")
290 "/include/X11/extensions"
291 " -I" #$(this-package-input "libxinerama")
292 "/include/X11/extensions"))
293 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
294 (add-after 'unpack 'patch-paths
295 (lambda* (#:key native-inputs inputs #:allow-other-keys)
296 ;; buildtree.make generates shell scripts, so we need to replace
297 ;; the generated shebang.
298 (with-directory-excursion "openjdk.src"
299 (substitute* "hotspot/make/linux/makefiles/buildtree.make"
300 (("/bin/sh") (which "bash")))
301
302 (let ((corebin (dirname (search-input-file
303 (or native-inputs inputs)
304 "bin/cp")))) ;coreutils
305 (substitute* '("jdk/make/common/shared/Defs-linux.gmk"
306 "corba/make/common/shared/Defs-linux.gmk")
307 (("UNIXCOMMAND_PATH = /bin")
308 (string-append "UNIXCOMMAND_PATH = " corebin))
309 (("USRBIN_PATH = /usr/bin")
310 (string-append "USRBIN_PATH = " corebin))
311 (("DEVTOOLS_PATH *= */usr/bin")
312 (string-append "DEVTOOLS_PATH = " corebin))
313 (("COMPILER_PATH *= */usr/bin")
314 (string-append "COMPILER_PATH = "
315 (dirname (search-input-file
316 (or native-inputs inputs)
317 "bin/gcc"))))
318 (("DEF_OBJCOPY *=.*objcopy")
319 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
320
321 ;; Fix path to alsa header.
322 (substitute* "jdk/make/common/shared/Sanity.gmk"
323 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
324 (string-append "ALSA_INCLUDE="
325 (search-input-file
326 inputs "include/alsa/version.h"))))
327
328 ;; Fix hard-coded utility paths.
329 (substitute* '("jdk/make/common/shared/Defs-utils.gmk"
330 "corba/make/common/shared/Defs-utils.gmk")
331 (("ECHO *=.*echo")
332 (string-append "ECHO = " (which "echo")))
333 (("^GREP *=.*grep")
334 (string-append "GREP = " (which "grep")))
335 (("EGREP *=.*egrep")
336 (string-append "EGREP = " (which "egrep")))
337 (("CPIO *=.*cpio")
338 (string-append "CPIO = " (which "cpio")))
339 (("READELF *=.*readelf")
340 (string-append "READELF = " (which "readelf")))
341 (("^ *AR *=.*ar")
342 (string-append "AR = " (which "ar")))
343 (("^ *TAR *=.*tar")
344 (string-append "TAR = " (which "tar")))
345 (("AS *=.*as")
346 (string-append "AS = " (which "as")))
347 (("LD *=.*ld")
348 (string-append "LD = " (which "ld")))
349 (("STRIP *=.*strip")
350 (string-append "STRIP = " (which "strip")))
351 (("NM *=.*nm")
352 (string-append "NM = " (which "nm")))
353 (("^SH *=.*sh")
354 (string-append "SH = " (which "bash")))
355 (("^FIND *=.*find")
356 (string-append "FIND = " (which "find")))
357 (("LDD *=.*ldd")
358 (string-append "LDD = " (which "ldd")))
359 (("NAWK *=.*(n|g)awk")
360 (string-append "NAWK = " (which "gawk")))
361 (("XARGS *=.*xargs")
362 (string-append "XARGS = " (which "xargs")))
363 (("UNZIP *=.*unzip")
364 (string-append "UNZIP = " (which "unzip")))
365 (("ZIPEXE *=.*zip")
366 (string-append "ZIPEXE = " (which "zip")))
367 (("SED *=.*sed")
368 (string-append "SED = " (which "sed"))))
369
370 ;; Some of these timestamps cause problems as they are more than
371 ;; 10 years ago, failing the build process.
372 (substitute* "jdk/src/share/classes/java/util/\
373CurrencyData.properties"
374 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
375 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
376 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
377 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))))
378 (add-before 'configure 'set-additional-paths
379 (lambda* (#:key inputs #:allow-other-keys)
380 (setenv "CC" "gcc")
381 (setenv "CPATH"
382 (string-append #$(this-package-input "libxcomposite")
383 "/include/X11/extensions" ":"
384 #$(this-package-input "libxrender")
385 "/include/X11/extensions" ":"
386 #$(this-package-input "libxtst")
387 "/include/X11/extensions" ":"
388 #$(this-package-input "libxinerama")
389 "/include/X11/extensions" ":"
390 (or (getenv "CPATH") "")))
391 (setenv "ALT_OBJCOPY" (which "objcopy"))
392 (setenv "ALT_CUPS_HEADERS_PATH"
393 (string-append #$(this-package-input "cups")
394 "/include"))
395 (setenv "ALT_FREETYPE_HEADERS_PATH"
396 (string-append #$(this-package-input "freetype")
397 "/include"))
398 (setenv "ALT_FREETYPE_LIB_PATH"
399 (string-append #$(this-package-input "freetype")
400 "/lib"))))
401 (add-before 'build 'disable-os-version-check
402 ;; allow build on linux major version change
403 (lambda _
404 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
405 (add-before 'check 'fix-test-framework
406 (lambda _
407 ;; Fix PATH in test environment
408 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
409 (("PATH=/bin:/usr/bin")
410 (string-append "PATH=" (getenv "PATH"))))
411 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
412 (("/usr/bin/env") (which "env")))
413 (substitute* "openjdk.src/hotspot/test/test_env.sh"
414 (("/bin/rm") (which "rm"))
415 (("/bin/cp") (which "cp"))
416 (("/bin/mv") (which "mv")))))
417 (add-before 'check 'fix-hotspot-tests
418 (lambda _
419 (with-directory-excursion "openjdk.src/hotspot/test/"
420 (substitute* "jprt.config"
421 (("PATH=\"\\$\\{path4sdk\\}\"")
422 (string-append "PATH=" (getenv "PATH")))
423 (("make=/usr/bin/make")
424 (string-append "make=" (which "make"))))
425 (substitute* '("runtime/6626217/Test6626217.sh"
426 "runtime/7110720/Test7110720.sh")
427 (("/bin/rm") (which "rm"))
428 (("/bin/cp") (which "cp"))
429 (("/bin/mv") (which "mv"))))))
430 (add-before 'check 'fix-jdk-tests
431 (lambda _
432 (with-directory-excursion "openjdk.src/jdk/test/"
433 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
434 (("/bin/pwd") (which "pwd")))
435 (substitute* "com/sun/jdi/ShellScaffold.sh"
436 (("/bin/kill") (which "kill")))
437 (substitute* "start-Xvfb.sh"
438 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
439 (("/usr/bin/nohup") (which "nohup")))
440 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
441 (("/bin/rm") (which "rm")))
442 (substitute* "tools/launcher/MultipleJRE.sh"
443 (("echo \"#!/bin/sh\"")
444 (string-append "echo \"#!" (which "rm") "\""))
445 (("/usr/bin/zip") (which "zip")))
446 (substitute* "com/sun/jdi/OnThrowTest.java"
447 (("#!/bin/sh") (string-append "#!" (which "sh"))))
448 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
449 (("/usr/bin/uptime") (which "uptime")))
450 (substitute* "java/lang/ProcessBuilder/Basic.java"
451 (("/usr/bin/env") (which "env"))
452 (("/bin/false") (which "false"))
453 (("/bin/true") (which "true"))
454 (("/bin/cp") (which "cp"))
455 (("/bin/sh") (which "sh")))
456 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
457 (("/bin/sh") (which "sh")))
458 (substitute* "java/lang/ProcessBuilder/Zombies.java"
459 (("/usr/bin/perl") (which "perl"))
460 (("/bin/ps") (which "ps"))
461 (("/bin/true") (which "true")))
462 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
463 (("/usr/bin/tee") (which "tee")))
464 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
465 (("/bin/true") (which "true")))
466 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
467 (("/bin/cat") (which "cat")))
468 (substitute* "java/lang/Runtime/exec/ExitValue.java"
469 (("/bin/sh") (which "sh"))
470 (("/bin/true") (which "true"))
471 (("/bin/kill") (which "kill")))
472 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
473 (("/usr/bin/echo") (which "echo")))
474 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
475 (("/usr/bin/cat") (which "cat")))
476 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
477 (("/bin/cat") (which "cat"))
478 (("/bin/sleep") (which "sleep"))
479 (("/bin/sh") (which "sh")))
480 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
481 (("/bin/cat") (which "cat")))
482 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
483 (("/bin/chmod") (which "chmod")))
484 (substitute* "java/util/zip/ZipFile/Assortment.java"
485 (("/bin/sh") (which "sh"))))))
486 (replace 'check
487 (lambda* (#:key tests? #:allow-other-keys)
488 ;; The "make check-*" targets always return zero, so we need to
489 ;; check for errors in the associated log files to determine
490 ;; whether any tests have failed.
491 (when tests?
492 (use-modules (ice-9 rdelim))
493 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
494 (checker (lambda (port)
495 (let loop ()
496 (let ((line (read-line port)))
497 (cond
498 ((eof-object? line) #t)
499 ((regexp-exec error-pattern line)
500 (error "test failed"))
501 (else (loop)))))))
502 (run-test (lambda (test)
503 (invoke "make" test)
504 (call-with-input-file
505 (string-append "test/" test ".log")
506 checker))))
507 (run-test "check-hotspot")
508 (run-test "check-langtools")
509 (run-test "check-jdk")))))
510 (replace 'install
511 (lambda _
512 (copy-recursively "openjdk.build/docs"
513 (string-append #$output:doc
514 "/share/doc/icedtea"))
515 (copy-recursively "openjdk.build/j2re-image" #$output)
516 (copy-recursively "openjdk.build/j2sdk-image" #$output:jdk)))
517 (add-after 'install 'install-libjvm
518 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
519 ;; But that shared object is located in the server/ folder, so it
520 ;; cannot be found. This phase creates a symbolic link in the
521 ;; lib/amd64 folder so that the other libraries can find it.
522 ;;
523 ;; See:
524 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
525 ;;
526 ;; FIXME: Find the bug in the build system, so that this symlink is
527 ;; not needed.
528 (lambda _
529 (let ((lib-path (string-append #$output "/lib/"
530 #$(system->icedtea-arch))))
531 (symlink (string-append lib-path "/server/libjvm.so")
532 (string-append lib-path "/libjvm.so")))))
533 ;; By default IcedTea only generates an empty keystore. In order to
534 ;; be able to use certificates in Java programs we need to generate a
535 ;; keystore from a set of certificates. For convenience we use the
536 ;; certificates from the nss-certs package.
537 (add-after 'install 'install-keystore
538 (lambda* (#:key inputs #:allow-other-keys)
539 (use-modules (ice-9 rdelim))
540 (let* ((keystore "cacerts")
541 (certs-dir (search-input-directory inputs
542 "etc/ssl/certs"))
543 (keytool (string-append #$output:jdk "/bin/keytool")))
544 (define (extract-cert file target)
545 (call-with-input-file file
546 (lambda (in)
547 (call-with-output-file target
548 (lambda (out)
549 (let loop ((line (read-line in 'concat))
550 (copying? #f))
551 (cond
552 ((eof-object? line) #t)
553 ((string-prefix? "-----BEGIN" line)
554 (display line out)
555 (loop (read-line in 'concat) #t))
556 ((string-prefix? "-----END" line)
557 (display line out)
558 #t)
559 (else
560 (when copying? (display line out))
561 (loop (read-line in 'concat) copying?)))))))))
562 (define (import-cert cert)
563 (format #t "Importing certificate ~a\n" (basename cert))
564 (let ((temp "tmpcert"))
565 (extract-cert cert temp)
566 (let ((port (open-pipe* OPEN_WRITE keytool
567 "-import"
568 "-alias" (basename cert)
569 "-keystore" keystore
570 "-storepass" "changeit"
571 "-file" temp)))
572 (display "yes\n" port)
573 (when (not (zero? (status:exit-val (close-pipe port))))
574 (format #t "failed to import ~a\n" cert)))
575 (delete-file temp)))
576
577 ;; This is necessary because the certificate directory contains
578 ;; files with non-ASCII characters in their names.
579 (setlocale LC_ALL "C.UTF-8")
580 (setenv "LC_ALL" "C.UTF-8")
581
582 (for-each import-cert (find-files certs-dir "\\.pem$"))
583 (mkdir-p (string-append #$output "/lib/security"))
584 (mkdir-p (string-append #$output:jdk "/jre/lib/security"))
585
586 ;; The cacerts files we are going to overwrite are chmod'ed as
587 ;; read-only (444) in icedtea-8 (which derives from this
588 ;; package). We have to change this so we can overwrite them.
589 (chmod (string-append #$output "/lib/security/" keystore)
590 #o644)
591 (chmod (string-append #$output:jdk
592 "/jre/lib/security/" keystore) #o644)
593
594 (install-file keystore
595 (string-append #$output "/lib/security"))
596 (install-file keystore
597 (string-append #$output:jdk
598 "/jre/lib/security"))))))))
599 (native-inputs
600 ;; XXX: Compiling with gcc-14 will encounter the following error:
601 ;; BUILD FAILED:
602 ;; /tmp/guix-build-icedtea-2.6.13.drv-0/icedtea-2.6.13/openjdk/langtools/
603 ;; make/build.xml:452: The following error occurred while executing this
604 ;; line:
605 ;; java.lang.AbstractMethodError: java.lang.Throwable.toString()Ljava/lang/String;
606 `(("gcc" ,gcc-13)
607 ("openjdk-src"
608 ,(drop "openjdk"
609 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
610 ("corba-drop"
611 ,(drop "corba"
612 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
613 ("jaxp-drop"
614 ,(drop "jaxp"
615 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
616 ("jaxws-drop"
617 ,(drop "jaxws"
618 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
619 ("jdk-drop"
620 ,(drop "jdk"
621 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
622 (search-patches "jdk-currency-time-bomb.patch")))
623 ("langtools-drop"
624 ,(drop "langtools"
625 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
626 ("hotspot-drop"
627 ,(origin
628 (method url-fetch)
629 (uri (string-append
630 "http://icedtea.classpath.org/downloads/drops"
631 "/icedtea7/" version "/hotspot.tar.bz2"))
632 (sha256
633 (base32
634 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
635 (patches (search-patches
636 "icedtea-7-hotspot-aarch64-use-c++98.patch"
637 "icedtea-7-hotspot-pointer-comparison.patch"))))
638 ("ant" ,ant-bootstrap)
639 ("attr" ,attr)
640 ("classpath" ,classpath-devel)
641 ("coreutils" ,coreutils)
642 ("diffutils" ,diffutils) ;for tests
643 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
644 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
645 ("gawk" ,gawk)
646 ("grep" ,grep)
647 ("jamvm" ,jamvm-with-ecj4)
648 ("libtool" ,libtool)
649 ("pkg-config" ,pkg-config)
650 ("wget" ,wget)
651 ("which" ,which)
652 ("cpio" ,cpio)
653 ("zip" ,zip)
654 ("unzip" ,unzip)
655 ("libxslt" ,libxslt) ;for xsltproc
656 ("nss-certs" ,nss-certs)
657 ("perl" ,perl)
658 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
659 (inputs
660 (list alsa-lib
661 cups
662 fontconfig
663 freetype
664 giflib
665 gtk+-2
666 lcms
667 libjpeg-turbo
668 libpng
669 libx11
670 libxcomposite
671 libxi
672 libxinerama
673 libxrender
674 libxt
675 libxtst
676 mit-krb5
677 nss
678 pcsc-lite
679 zlib))
680 (home-page "https://icedtea.classpath.org")
681 (synopsis "Java development kit")
682 (description
683 "This package provides the Java development kit OpenJDK built with the
684IcedTea build harness.")
685
686 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
687 (supported-systems (delete "mips64el-linux" %supported-systems))
688
689 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
690 ;; same license as both GNU Classpath and OpenJDK.
691 (license license:gpl2+))))
692
693(define-public icedtea-8
694 (let* ((version "3.19.0")
695 (drop (lambda* (name hash #:optional (patches '()))
696 (origin
697 (method url-fetch)
698 (uri (string-append
699 "http://icedtea.classpath.org/download/drops"
700 "/icedtea8/" version "/" name ".tar.xz"))
701 (sha256 (base32 hash))
702 (patches patches)))))
703 (package
704 (inherit icedtea-7)
705 (version "3.19.0")
706 (source (origin
707 (method url-fetch)
708 (uri (string-append
709 "http://icedtea.wildebeest.org/download/source/icedtea-"
710 version ".tar.xz"))
711 (sha256
712 (base32
713 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
714 (modules '((guix build utils)))
715 (snippet
716 '(substitute* '("configure"
717 "acinclude.m4")
718 ;; Do not embed build time
719 (("(DIST_ID=\"Custom build).*$" _ prefix)
720 (string-append prefix "\"\n"))
721 ;; Do not leak information about the build host
722 (("DIST_NAME=\"\\$build_os\"")
723 "DIST_NAME=\"guix\"")))))
724 (arguments
725 (substitute-keyword-arguments (package-arguments icedtea-7)
726 ((#:imported-modules modules %default-gnu-imported-modules)
727 (cons '(guix build ant-build-system) modules))
728 ((#:disallowed-references refs '())
729 (cons (gexp-input
730 (this-package-native-input "jdk")
731 "jdk")
732 refs))
733 ((#:modules modules %default-gnu-modules)
734 (append '(((guix build ant-build-system) #:prefix ant:)
735 (ice-9 match)
736 (ice-9 popen)
737 (srfi srfi-1)
738 (srfi srfi-19)
739 (srfi srfi-26))
740 modules))
741 ((#:configure-flags _ '())
742 #~(let ((jdk (assoc-ref %build-inputs "jdk")))
743 (list (string-append "CFLAGS=-fcommon"
744 " -Wno-error=implicit-function-declaration"
745 " -Wno-error=implicit-int"
746 " -Wno-error=incompatible-pointer-types"
747 " -Wno-error=int-conversion")
748 "CXXFLAGS=-fcommon"
749 "--enable-bootstrap"
750 "--enable-nss"
751 (string-append "--with-parallel-jobs="
752 (number->string (parallel-job-count)))
753 ;; Java Flight Recorder isn't supported on some architectures.
754 #$@(if (target-ppc32?)
755 #~("--enable-jfr=no")
756 #~())
757 "--disable-docs" ; This phase can take hours on slow machines.
758 "--disable-downloading"
759 "--disable-system-pcsc"
760 "--disable-system-sctp"
761 "--disable-tests" ;they are run in the check phase instead
762 "--with-openjdk-src-dir=./openjdk.src"
763 (string-append "--with-jdk-home=" jdk))))
764 ((#:phases phases '%standard-phases)
765 #~(modify-phases #$phases
766 (delete 'fix-x11-extension-include-path)
767 (delete 'patch-paths)
768 (delete 'set-additional-paths)
769 (delete 'patch-patches)
770 (delete 'patch-bitrot)
771 (delete 'use-classpath)
772 (replace 'build
773 (lambda* (#:key (make-flags '()) #:allow-other-keys)
774 ;; Prevent passing -j (parallel-job-count) to make, which
775 ;; is rejected by the build Makefiles; this does *not*
776 ;; disable parallel builds.
777 (apply invoke "make" make-flags)))
778 ;; Prevent the keytool from recording the current time when
779 ;; adding certificates at build time.
780 (add-after 'unpack 'patch-keystore
781 (lambda _
782 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
783 (("date = new Date\\(\\);")
784 "\
785date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
786new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
787new Date();"))))
788 (add-after 'unpack 'patch-jni-libs
789 ;; Hardcode dynamically loaded libraries.
790 (lambda _
791 (define (icedtea-or-openjdk? path)
792 (or (string-contains path "openjdk")
793 (string-contains path "icedtea")))
794
795 (let* ((library-path (remove icedtea-or-openjdk?
796 (search-path-as-string->list
797 (getenv "LIBRARY_PATH"))))
798 (find-library (lambda (name)
799 (or (search-path
800 library-path
801 (string-append "lib" name ".so"))
802 (string-append "lib" name ".so")))))
803 (for-each
804 (lambda (file)
805 (catch 'decoding-error
806 (lambda ()
807 (substitute* file
808 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
809 _ name version)
810 (string-append "\"" (find-library name) "\""))
811 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
812 (string-append "\"" (find-library name) "\""))))
813 (lambda _
814 ;; Those are safe to skip.
815 (format (current-error-port)
816 "warning: failed to substitute: ~a~%"
817 file))))
818 (find-files "openjdk.src/jdk/src/solaris/native"
819 "\\.c|\\.h")))))
820 (replace 'fix-openjdk
821 (lambda _
822 (substitute*
823 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
824 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
825 (("#include <sys/sysctl.h>")
826 "#include <linux/sysctl.h>"))))
827 (replace 'install
828 (lambda _
829 (copy-recursively "openjdk.build/docs"
830 (string-append #$output:doc
831 "/share/doc/icedtea"))
832 (copy-recursively "openjdk.build/images/j2re-image" #$output)
833 (copy-recursively "openjdk.build/images/j2sdk-image" #$output:jdk)
834 ;; Install the nss.cfg file to JRE to enable SSL/TLS
835 ;; support via NSS.
836 (copy-file (string-append #$output:jdk
837 "/jre/lib/security/nss.cfg")
838 (string-append #$output "/lib/security/nss.cfg"))))
839 (add-after 'install 'strip-jar-timestamps
840 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))
841 (native-inputs
842 `(("jdk" ,icedtea-7 "jdk")
843 ("openjdk-src"
844 ,(drop "openjdk"
845 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
846 ("aarch32-drop"
847 ,(drop "aarch32"
848 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
849 ("corba-drop"
850 ,(drop "corba"
851 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
852 ("jaxp-drop"
853 ,(drop "jaxp"
854 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
855 ("jaxws-drop"
856 ,(drop "jaxws"
857 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
858 ("jdk-drop"
859 ,(drop "jdk"
860 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
861 (search-patches "jdk-currency-time-bomb2.patch")))
862 ("langtools-drop"
863 ,(drop "langtools"
864 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
865 ("hotspot-drop"
866 ,(drop "hotspot"
867 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
868 ("nashorn-drop"
869 ,(drop "nashorn"
870 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
871 ("shenandoah-drop"
872 ,(drop "shenandoah"
873 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
874 ,@(fold alist-delete (package-native-inputs icedtea-7)
875 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
876 "jdk-drop" "langtools-drop" "hotspot-drop"
877 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
878
879(define-public icedtea icedtea-8)
880
881(define-public openjdk9
882 (package
883 (name "openjdk")
884 (version "9.181")
885 (source (origin
886 (method hg-fetch)
887 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
888 (changeset "jdk-9+181")))
889 (file-name (hg-file-name name version))
890 (modules '((guix build utils)))
891 (snippet '(for-each delete-file
892 (find-files "." ".*.(bin|exe|jar)$")))
893 (sha256
894 (base32
895 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
896 (patches
897 (search-patches "openjdk-9-pointer-comparison.patch"
898 "openjdk-9-classlist-reproducibility.patch"
899 "openjdk-currency-time-bomb.patch"
900 "openjdk-9-jar-reproducibility.patch"
901 "openjdk-9-module-reproducibility.patch"
902 "openjdk-9-module2-reproducibility.patch"
903 "openjdk-9-module3-reproducibility.patch"
904 "openjdk-9-idlj-reproducibility.patch"
905 "openjdk-9-setsignalhandler.patch"))))
906 (build-system gnu-build-system)
907 (outputs '("out" "jdk" "doc"))
908 (arguments
909 (list
910 #:imported-modules
911 (cons '(guix build ant-build-system)
912 %default-gnu-imported-modules)
913 #:modules
914 (append '((ice-9 match)
915 (ice-9 popen)
916 (srfi srfi-1)
917 (srfi srfi-26))
918 %default-gnu-modules)
919 #:tests? #f ; require jtreg
920 #:make-flags #~(list "all")
921 #:disallowed-references
922 (list (this-package-native-input "icedtea")
923 (gexp-input (this-package-native-input "icedtea") "jdk"))
924
925 #:phases
926 #~(modify-phases %standard-phases
927 #$@(if (target-aarch64?)
928 #~((add-after 'unpack 'patch-for-aarch64
929 (lambda _
930 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
931 ;; This line is duplicated, so remove both occurrences,
932 ;; then add back one occurrence by substituting a
933 ;; comment that occurs once.
934 (("using MacroAssembler::call_VM_leaf_base;") "")
935 (("Interpreter specific version of call_VM_base")
936 "Interpreter specific version of call_VM_base
937 using MacroAssembler::call_VM_leaf_base;")))))
938 #~())
939 (add-after 'patch-source-shebangs 'fix-java-shebangs
940 (lambda _
941 ;; This file was "fixed" by patch-source-shebangs, but it requires
942 ;; this exact first line.
943 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
944 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
945 (replace 'configure
946 (lambda* (#:key inputs #:allow-other-keys)
947 ;; TODO: unbundle libpng and lcms
948 (invoke "bash" "./configure"
949 ;; Add flags for compilation with gcc >= 10
950 (string-append "--with-extra-cflags=-fcommon"
951 " -fno-delete-null-pointer-checks"
952 " -fno-lifetime-dse"
953 ;; flags for compilation with gcc >= 14.
954 " -Wno-error=int-conversion")
955 (string-append "--with-freetype="
956 (assoc-ref inputs "freetype"))
957 "--disable-freetype-bundling"
958 "--disable-warnings-as-errors"
959 "--disable-hotspot-gtest"
960 "--with-giflib=system"
961 "--with-libjpeg=system"
962 (string-append "--prefix=" #$output))))
963 (add-before 'build 'write-source-revision-file
964 (lambda _
965 (with-output-to-file ".src-rev"
966 (lambda _
967 (display #$(package-version this-package))))))
968 (replace 'build
969 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
970 (apply invoke "make"
971 (format #f "JOBS=~a" (if parallel-build?
972 (parallel-job-count)
973 1))
974 make-flags)))
975 (add-after 'unpack 'patch-jni-libs
976 ;; Hardcode dynamically loaded libraries.
977 (lambda _
978 (define (icedtea-or-openjdk? path)
979 (or (string-contains path "openjdk")
980 (string-contains path "icedtea")))
981
982 (let* ((library-path (remove icedtea-or-openjdk?
983 (search-path-as-string->list
984 (getenv "LIBRARY_PATH"))))
985 (find-library (lambda (name)
986 (or (search-path
987 library-path
988 (string-append "lib" name ".so"))
989 (string-append "lib" name ".so")))))
990 (for-each
991 (lambda (file)
992 (catch 'decoding-error
993 (lambda ()
994 (substitute* file
995 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
996 _ name version)
997 (string-append "\"" (find-library name) "\""))
998 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
999 (string-append "\"" (find-library name) "\""))))
1000 (lambda _
1001 ;; Those are safe to skip.
1002 (format (current-error-port)
1003 "warning: failed to substitute: ~a~%"
1004 file))))
1005 (find-files "."
1006 "\\.c$|\\.h$")))))
1007 ;; By default OpenJDK only generates an empty keystore. In order to
1008 ;; be able to use certificates in Java programs we need to generate a
1009 ;; keystore from a set of certificates. For convenience we use the
1010 ;; certificates from the nss-certs package.
1011 (add-after 'install 'install-keystore
1012 (lambda* (#:key inputs #:allow-other-keys)
1013 (use-modules (ice-9 rdelim))
1014 (let* ((keystore "cacerts")
1015 (certs-dir (search-input-directory inputs
1016 "etc/ssl/certs"))
1017 (keytool (string-append #$output:jdk "/bin/keytool")))
1018 (define (extract-cert file target)
1019 (call-with-input-file file
1020 (lambda (in)
1021 (call-with-output-file target
1022 (lambda (out)
1023 (let loop ((line (read-line in 'concat))
1024 (copying? #f))
1025 (cond
1026 ((eof-object? line) #t)
1027 ((string-prefix? "-----BEGIN" line)
1028 (display line out)
1029 (loop (read-line in 'concat) #t))
1030 ((string-prefix? "-----END" line)
1031 (display line out)
1032 #t)
1033 (else
1034 (when copying? (display line out))
1035 (loop (read-line in 'concat) copying?)))))))))
1036 (define (import-cert cert)
1037 (format #t "Importing certificate ~a\n" (basename cert))
1038 (let ((temp "tmpcert"))
1039 (extract-cert cert temp)
1040 (let ((port (open-pipe* OPEN_WRITE keytool
1041 "-import"
1042 "-alias" (basename cert)
1043 "-keystore" keystore
1044 "-storepass" "changeit"
1045 "-file" temp)))
1046 (display "yes\n" port)
1047 (when (not (zero? (status:exit-val (close-pipe port))))
1048 (format #t "failed to import ~a\n" cert)))
1049 (delete-file temp)))
1050
1051 ;; This is necessary because the certificate directory contains
1052 ;; files with non-ASCII characters in their names.
1053 (setlocale LC_ALL "C.UTF-8")
1054 (setenv "LC_ALL" "C.UTF-8")
1055
1056 (copy-file (string-append #$output
1057 "/lib/security/cacerts")
1058 keystore)
1059 (chmod keystore #o644)
1060 (for-each import-cert (find-files certs-dir "\\.pem$"))
1061 (mkdir-p (string-append #$output "/lib/security"))
1062 (mkdir-p (string-append #$output:jdk "/lib/security"))
1063
1064 ;; The cacerts files we are going to overwrite are chmod'ed as
1065 ;; read-only (444) in icedtea-8 (which derives from this
1066 ;; package). We have to change this so we can overwrite them.
1067 (chmod (string-append #$output
1068 "/lib/security/" keystore) #o644)
1069 (chmod (string-append #$output:jdk
1070 "/lib/security/" keystore) #o644)
1071
1072 (install-file keystore
1073 (string-append #$output
1074 "/lib/security"))
1075 (install-file keystore
1076 (string-append #$output:jdk
1077 "/lib/security")))))
1078 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1079 ;; But that shared object is located in the server/ folder, so it
1080 ;; cannot be found. This phase creates a symbolic link in the
1081 ;; lib/ folder so that the other libraries can find it.
1082 ;;
1083 ;; See:
1084 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1085 ;;
1086 ;; FIXME: Find the bug in the build system, so that this symlink is
1087 ;; not needed.
1088 (add-after 'install 'install-libjvm
1089 (lambda* (#:key inputs #:allow-other-keys)
1090 (let* ((lib-out (string-append #$output "/lib"))
1091 (lib-jdk (string-append #$output:jdk "/lib")))
1092 (symlink (string-append lib-jdk "/server/libjvm.so")
1093 (string-append lib-jdk "/libjvm.so"))
1094 (symlink (string-append lib-out "/server/libjvm.so")
1095 (string-append lib-out "/libjvm.so")))))
1096 (replace 'install
1097 (lambda* (#:key outputs #:allow-other-keys)
1098 (let ((images (car (find-files "build" ".*-server-release"
1099 #:directories? #t))))
1100 (copy-recursively (string-append images "/images/jdk")
1101 #$output:jdk)
1102 (copy-recursively (string-append images "/images/jre") #$output)
1103 (copy-recursively (string-append images "/images/docs")
1104 #$output:doc))))
1105 (add-after 'install 'remove-extraneous-files
1106 (lambda* (#:key outputs #:allow-other-keys)
1107 ;; Remove the *.diz and src.zip files for space considerations.
1108 ;; The former are compressed debuginfo files not typically
1109 ;; shipped with Java distributions, while the later corresponds
1110 ;; to Java core API source files.
1111 (for-each delete-file
1112 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1113 (map (match-lambda
1114 ((name . dir)
1115 dir))
1116 outputs)))))
1117 (add-after 'remove-extraneous-files 'strip-zip-timestamps
1118 (lambda* (#:key outputs #:allow-other-keys)
1119 (for-each
1120 (lambda (zip)
1121 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1122 (with-directory-excursion dir
1123 ;; This is an exact copy of the implementation of invoke,
1124 ;; but this accepts exit code 1 as OK.
1125 (let ((code (system* "unzip" "--" zip)))
1126 ;; jmod files are zip files with an extra header in
1127 ;; front. unzip will warn about that -- but otherwise
1128 ;; work.
1129 (when (> (status:exit-val code) 1) ; 1 is just a warning
1130 (raise
1131 (condition
1132 (&invoke-error
1133 (program "unzip")
1134 (arguments (list "--" zip))
1135 (exit-status (status:exit-val code))
1136 (term-signal (status:term-sig code))
1137 (stop-signal (status:stop-sig code))))))))
1138 (delete-file zip)
1139 (for-each (lambda (file)
1140 (let ((s (lstat file)))
1141 (format #t "reset ~a~%" file)
1142 (utime file 1 1 0 0
1143 AT_SYMLINK_NOFOLLOW)))
1144 (find-files dir #:directories? #t))
1145 (with-directory-excursion dir
1146 (let ((files (cons "./META-INF/MANIFEST.MF"
1147 (append
1148 (find-files "./META-INF" ".*")
1149 ;; for jmod:
1150 (list "./classes/module-info.class")
1151 (find-files "." ".*")))))
1152 (apply invoke "zip" "--symlinks" "-0" "-X" zip files)
1153 (when (string-suffix? ".jmod" zip)
1154 (let ((new-zip (string-append zip "n"))
1155 (contents (call-with-input-file zip
1156 (@ (ice-9 binary-ports)
1157 get-bytevector-all))))
1158 (call-with-output-file new-zip
1159 (lambda (output-port)
1160 ((@ (ice-9 binary-ports) put-bytevector)
1161 output-port
1162 #vu8(#x4a #x4d #x01 #x00)) ; JM
1163 ((@ (ice-9 binary-ports) put-bytevector)
1164 output-port
1165 contents)))
1166 (rename-file new-zip zip)))))))
1167 (append (find-files (string-append #$output:doc "/api")
1168 "\\.zip$")
1169 (find-files #$output:jdk "\\.jmod$")
1170 (list (string-append #$output:jdk
1171 "/lib/jrt-fs.jar"))
1172 (find-files (string-append #$output:jdk "/demo")
1173 "\\.jar$"))))))))
1174 (inputs
1175 (list alsa-lib
1176 cups
1177 fontconfig
1178 freetype
1179 giflib
1180 lcms
1181 elfutils
1182 libjpeg-turbo
1183 libice
1184 libpng
1185 libx11
1186 libxcomposite
1187 libxi
1188 libxinerama
1189 libxrender
1190 libxt
1191 libxtst))
1192 (native-inputs
1193 (list icedtea-8
1194 `(,icedtea-8 "jdk")
1195 ;; XXX: The build system fails with newer versions of GNU Make.
1196 gnu-make-4.2
1197 nss-certs
1198 unzip
1199 which
1200 zip))
1201 (home-page "https://openjdk.org/projects/jdk9/")
1202 (synopsis "Java development kit")
1203 (description
1204 "This package provides the Java development kit OpenJDK.")
1205 (license license:gpl2+)))
1206
1207(define-public openjdk10
1208 (package
1209 (inherit openjdk9)
1210 (name "openjdk")
1211 (version "10.46")
1212 (source (origin
1213 (method hg-fetch)
1214 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1215 (changeset "jdk-10+46")))
1216 (file-name (hg-file-name name version))
1217 (modules '((guix build utils)))
1218 (snippet `(begin
1219 (for-each delete-file
1220 (find-files "." ".*.(bin|exe|jar)$"))))
1221 (sha256
1222 (base32
1223 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1224 (patches (search-patches
1225 "openjdk-10-char-reproducibility.patch"
1226 "openjdk-10-classlist-reproducibility.patch"
1227 "openjdk-10-corba-reproducibility.patch"
1228 "openjdk-10-idlj-reproducibility.patch"
1229 "openjdk-10-module-reproducibility.patch"
1230 "openjdk-10-module3-reproducibility.patch"
1231 "openjdk-10-module4-reproducibility.patch"
1232 "openjdk-10-jar-reproducibility.patch"
1233 "openjdk-10-jtask-reproducibility.patch"
1234 "openjdk-10-pointer-comparison.patch"
1235 "openjdk-10-setsignalhandler.patch"
1236 "openjdk-currency-time-bomb2.patch"))))
1237 (arguments
1238 (substitute-keyword-arguments (package-arguments openjdk9)
1239 ((#:phases phases '%standard-phases)
1240 #~(modify-phases #$phases
1241 #$@(if (target-aarch64?)
1242 #~((replace 'patch-for-aarch64
1243 (lambda _
1244 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1245 ;; This line is duplicated, so remove both occurrences,
1246 ;; then add back one occurrence by substituting a
1247 ;; comment that occurs once.
1248 (("using MacroAssembler::call_VM_leaf_base;") "")
1249 (("Interpreter specific version of call_VM_base")
1250 (string-append "Interpreter specific version of call_VM_base\n"
1251 " using MacroAssembler::call_VM_leaf_base;"))))))
1252 #~())
1253 (replace 'fix-java-shebangs
1254 (lambda _
1255 ;; This file was "fixed" by patch-source-shebangs, but it requires
1256 ;; this exact first line.
1257 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1258 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
1259 (add-after 'unpack 'remove-timestamping
1260 (lambda _
1261 (substitute* "./src/hotspot/share/runtime/vm_version.cpp"
1262 (("__DATE__") "")
1263 (("__TIME__") ""))))
1264 (replace 'configure
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 (invoke "bash" "./configure"
1267 ;; Add flags for compilation with gcc >= 10
1268 (string-append "--with-extra-cflags=-fcommon"
1269 " -fno-delete-null-pointer-checks"
1270 " -fno-lifetime-dse"
1271 ;; flags for compilation with gcc >= 14.
1272 " -Wno-error=int-conversion")
1273 (string-append "--with-freetype="
1274 (assoc-ref inputs "freetype"))
1275 "--disable-freetype-bundling"
1276 "--disable-warnings-as-errors"
1277 "--disable-hotspot-gtest"
1278 "--with-giflib=system"
1279 "--with-libjpeg=system"
1280 "--with-native-debug-symbols=zipped"
1281 (string-append "--prefix=" #$output))))
1282 (add-after 'unpack 'disable-warnings-as-errors
1283 (lambda _
1284 ;; It looks like the "--disable-warnings-as-errors" option of
1285 ;; the 'configure' phase is not working.
1286 (substitute* "make/autoconf/generated-configure.sh"
1287 (("-Werror") ""))))))
1288 ((#:disallowed-references refs '())
1289 (cons* (this-package-native-input "openjdk")
1290 (gexp-input (this-package-native-input "openjdk") "jdk")
1291 refs))))
1292 (native-inputs
1293 (list gnu-make-4.2
1294 openjdk9
1295 `(,openjdk9 "jdk")
1296 nss-certs
1297 unzip
1298 which
1299 zip))))
1300
1301(define-public openjdk11
1302 (package
1303 (name "openjdk")
1304 (version "11.0.22")
1305 (source (origin
1306 (method url-fetch)
1307 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1308 version "-ga.tar.xz"))
1309 (file-name (string-append name "-" version ".tar.xz"))
1310 (sha256
1311 (base32
1312 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1313 (modules '((guix build utils)))
1314 (snippet
1315 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1316 (patches
1317 (search-patches "openjdk-10-module3-reproducibility.patch"
1318 "openjdk-10-module4-reproducibility.patch"
1319 "openjdk-10-char-reproducibility.patch"
1320 "openjdk-11-classlist-reproducibility.patch"
1321 "openjdk-10-jar-reproducibility.patch"
1322 "openjdk-10-jtask-reproducibility.patch"
1323 "openjdk-currency-time-bomb2.patch"))))
1324 (build-system gnu-build-system)
1325 (outputs '("out" "jdk" "doc"))
1326 (arguments
1327 (list
1328 ;; Prevent a java.util.ConcurrentModificationException.
1329 #:parallel-build? #f
1330 #:modules `((guix build gnu-build-system)
1331 (guix build utils)
1332 (ice-9 match)
1333 (ice-9 popen)
1334 (srfi srfi-1)
1335 (srfi srfi-26))
1336
1337 #:disallowed-references
1338 (list (this-package-native-input "openjdk")
1339 (gexp-input (this-package-native-input "openjdk")
1340 "jdk"))
1341
1342 #:tests? #f ; requires jtreg
1343 ;; TODO package jtreg
1344 #:configure-flags
1345 #~(list
1346 "--disable-hotspot-gtest" ;not currently running tests
1347 ;; Add flags for compilation with gcc >= 10.
1348 #$(string-append "--with-extra-cflags=-fcommon"
1349 " -fno-delete-null-pointer-checks"
1350 " -fno-lifetime-dse"
1351 ;; flags for compilation with gcc >= 14.
1352 " -Wno-error=int-conversion")
1353 ;; Otherwise, the '--enable-fast-install' causes an error.
1354 "--disable-option-checking"
1355 "--disable-warnings-as-errors"
1356 ;; Make validate-runpath pass (see:
1357 ;; http://issues.guix.info/issue/32894).
1358 "--with-native-debug-symbols=zipped"
1359 ;; Do not use the bundled libraries.
1360 "--with-giflib=system"
1361 "--with-lcms=system"
1362 "--with-libjpeg=system"
1363 "--with-libpng=system"
1364 "--with-version-pre="
1365 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1366 ;; set; do it manually.
1367 "--with-hotspot-build-time=1970-01-01T00:00:01"
1368 "--enable-reproducible-build" ; to be sure
1369 ;; Allow the build system to locate the system freetype.
1370 (string-append "--with-freetype-include="
1371 #$(this-package-input "freetype") "/include")
1372 (string-append "--with-freetype-lib="
1373 #$(this-package-input "freetype") "/lib"))
1374 #:phases
1375 #~(modify-phases %standard-phases
1376 (add-after 'patch-source-shebangs 'fix-java-shebangs
1377 (lambda _
1378 ;; This file was "fixed" by patch-source-shebangs, but it requires
1379 ;; this exact first line.
1380 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1381 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1382 (add-after 'unpack 'remove-timestamping
1383 (lambda _
1384 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1385 (("__DATE__") "")
1386 (("__TIME__") ""))))
1387 (add-after 'unpack 'patch-jni-libs
1388 ;; Hardcode dynamically loaded libraries.
1389 (lambda _
1390 (define (icedtea-or-openjdk? path)
1391 (or (string-contains path "openjdk")
1392 (string-contains path "icedtea")))
1393
1394 (let* ((library-path (remove icedtea-or-openjdk?
1395 (search-path-as-string->list
1396 (getenv "LIBRARY_PATH"))))
1397 (find-library (lambda (name)
1398 (or (search-path
1399 library-path
1400 (string-append "lib" name ".so"))
1401 (string-append "lib" name ".so")))))
1402 (for-each
1403 (lambda (file)
1404 (catch 'decoding-error
1405 (lambda ()
1406 (substitute* file
1407 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1408 _ name version)
1409 (string-append "\"" (find-library name) "\""))
1410 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1411 (string-append "\"" (find-library name) "\""))))
1412 (lambda _
1413 ;; Those are safe to skip.
1414 (format (current-error-port)
1415 "warning: failed to substitute: ~a~%"
1416 file))))
1417 (find-files "." "\\.c$|\\.h$")))))
1418 (add-before 'build 'write-source-revision-file
1419 (lambda _
1420 (with-output-to-file ".src-rev"
1421 (lambda _
1422 (display #$(package-version this-package))))))
1423 (replace 'build
1424 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1425 (apply invoke "make" "all"
1426 (format #f "JOBS=~a" (if parallel-build?
1427 (parallel-job-count)
1428 1))
1429 make-flags)))
1430 ;; jdk 11 does not build jre by default any more; so explicitly build
1431 ;; it (see:
1432 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1433 (add-after 'build 'build-jre
1434 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1435 (apply invoke "make" "legacy-jre-image"
1436 (format #f "JOBS=~a" (if parallel-build?
1437 (parallel-job-count)
1438 1))
1439 make-flags)))
1440 (replace 'install
1441 (lambda _
1442 (let ((images (car (find-files "build" "-server-release"
1443 #:directories? #t))))
1444 (copy-recursively (string-append images "/images/jdk")
1445 #$output:jdk)
1446 (copy-recursively (string-append images "/images/jre")
1447 #$output)
1448 (copy-recursively (string-append images "/images/docs")
1449 #$output:doc))))
1450 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1451 ;; But that shared object is located in the server/ folder, so it
1452 ;; cannot be found. This phase creates a symbolic link in the
1453 ;; lib/ folder so that the other libraries can find it.
1454 ;;
1455 ;; See:
1456 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1457 ;;
1458 ;; FIXME: Find the bug in the build system, so that this symlink is
1459 ;; not needed.
1460 (add-after 'install 'install-libjvm
1461 (lambda _
1462 (let ((lib-out (string-append #$output "/lib"))
1463 (lib-jdk (string-append #$output:jdk "/lib")))
1464 (symlink (string-append lib-jdk "/server/libjvm.so")
1465 (string-append lib-jdk "/libjvm.so"))
1466 (symlink (string-append lib-out "/server/libjvm.so")
1467 (string-append lib-out "/libjvm.so")))))
1468 (add-after 'install 'remove-extraneous-files
1469 (lambda* (#:key outputs #:allow-other-keys)
1470 ;; Remove the *.diz and src.zip files for space considerations.
1471 ;; The former are compressed debuginfo files not typically
1472 ;; shipped with Java distributions, while the later corresponds
1473 ;; to Java core API source files.
1474 (for-each delete-file
1475 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1476 (map (match-lambda
1477 ((name . dir)
1478 dir))
1479 outputs)))))
1480 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1481 (lambda _
1482 (use-modules (ice-9 binary-ports)
1483 (rnrs bytevectors))
1484 (letrec ((repack-archive
1485 (lambda (archive)
1486 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1487 (with-directory-excursion dir
1488 (invoke "unzip" archive))
1489 (delete-file archive)
1490 (for-each (compose repack-archive canonicalize-path)
1491 (find-files dir "(ct\\.sym|\\.jar)$"))
1492 (let ((reset-file-timestamp
1493 (lambda (file)
1494 (let ((s (lstat file)))
1495 (unless (eq? (stat:type s) 'symlink)
1496 (format #t "reset ~a~%" file)
1497 (utime file 0 0 0 0))))))
1498 (for-each reset-file-timestamp
1499 (find-files dir #:directories? #t)))
1500 (with-directory-excursion dir
1501 (let ((files (find-files "." #:directories? #t)))
1502 (apply invoke "zip" "-0" "-X" archive files)))))))
1503 (for-each repack-archive
1504 (find-files #$output:doc "\\.zip$"))
1505 (for-each repack-archive
1506 (find-files #$output:jdk "\\.(zip|jar)$"))
1507 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1508 (let ((repack-jmod
1509 (lambda (file-name)
1510 (call-with-input-file file-name
1511 (lambda (file)
1512 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1513 (if (equal? (get-bytevector-n
1514 file (bytevector-length header))
1515 header)
1516 (let* ((header-length (bytevector-length header))
1517 (temp-file (mkstemp!
1518 (string-copy
1519 "temp-file.XXXXXX")))
1520 (temp-filename (port-filename temp-file))
1521 (content-length
1522 (- (stat:size (stat file))
1523 header-length)))
1524 (sendfile temp-file file content-length header-length)
1525 (delete-file file-name)
1526 (close-port temp-file)
1527 (repack-archive (canonicalize-path temp-filename))
1528 (call-with-output-file file-name
1529 (lambda (file)
1530 (put-bytevector file header)
1531 (call-with-input-file temp-filename
1532 (lambda (temp-file)
1533 (sendfile
1534 file temp-file
1535 (stat:size (stat temp-file)) 0)))))))))))))
1536 (for-each repack-jmod
1537 (find-files #$output:jdk "\\.jmod$"))))))
1538 (add-after 'install 'remove-timestamp-from-api-summary
1539 (lambda _
1540 (substitute* (string-append #$output:doc
1541 "/api/overview-summary.html")
1542 (("Generated by javadoc \\(11-internal\\).*$")
1543 "Generated by javadoc (11-internal) -->\n")))))))
1544 (inputs
1545 (list alsa-lib
1546 cups
1547 fontconfig
1548 freetype
1549 giflib
1550 lcms
1551 libjpeg-turbo
1552 libpng
1553 libx11
1554 libxext
1555 libxrandr
1556 libxrender
1557 libxt
1558 libxtst))
1559 (native-inputs
1560 (list autoconf
1561 bash ; not bash-minimal, needs ulimit
1562 openjdk10
1563 `(,openjdk10 "jdk")
1564 gnu-make-4.2
1565 nss-certs
1566 pkg-config
1567 unzip
1568 which
1569 zip))
1570 (home-page "https://openjdk.org/projects/jdk/11/")
1571 (synopsis "Java development kit")
1572 (description
1573 "This package provides the Java development kit OpenJDK.")
1574 (license license:gpl2+)
1575 (properties
1576 ;; At least on a Blackbird powerpc64le machine, the build takes more than
1577 ;; the default 3600s of silent timeout.
1578 `((max-silent-time . ,(* 3600 2))))))
1579
1580(define-syntax make-openjdk
1581 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1582 ;; the bootstrap package. One or more FIELD can be provided to further
1583 ;; refine the package definition; for convenience, the BASE, NAME and
1584 ;; VERSION are defined in their scope.
1585 (lambda (x)
1586 (syntax-case x ()
1587 ((_ bootstrap version* hash field ...)
1588 (with-syntax ((base (datum->syntax x 'base))
1589 (name (datum->syntax x 'name))
1590 (version (datum->syntax x 'version)))
1591 #'(let ((base (package
1592 (inherit bootstrap)
1593 (name "openjdk")
1594 (version version*)
1595 (source
1596 (origin
1597 (inherit (package-source bootstrap))
1598 (method git-fetch)
1599 (uri (git-reference
1600 (url (format
1601 #f "https://github.com/openjdk/jdk~au"
1602 (version-major version*)))
1603 (commit (string-append "jdk-" version*
1604 "-ga"))))
1605 (file-name (git-file-name name version))
1606 (sha256 (base32 hash))))
1607 (properties
1608 '((release-tag-prefix . "jdk-")
1609 (release-tag-suffix . "-ga")
1610 (release-tag-version-delimiter . ".")))
1611 (native-inputs
1612 (modify-inputs native-inputs
1613 (replace "openjdk" bootstrap)))
1614 (home-page (string-append
1615 "https://openjdk.java.net/projects/jdk/"
1616 (version-major version)))))
1617 (name "openjdk")
1618 (version version*))
1619 (package
1620 (inherit base)
1621 field
1622 ...)))))))
1623
1624(define-public openjdk12
1625 (make-openjdk
1626 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1631 (file-name (string-append name "-" version ".tar.bz2"))
1632 (sha256
1633 (base32
1634 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1635 (modules '((guix build utils)))
1636 (snippet
1637 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1638 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1639 (arguments
1640 (substitute-keyword-arguments (package-arguments openjdk11)
1641 ;; Re-enable parallel build.
1642 ((#:parallel-build? _ #t) #t)
1643 ((#:phases phases)
1644 #~(modify-phases #$phases
1645 #$@(if (target-aarch64?)
1646 #~((add-after 'unpack 'patch-for-aarch64
1647 (lambda _
1648 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1649 ;; This line is duplicated, so remove both occurrences,
1650 ;; then add back one occurrence by substituting a
1651 ;; comment that occurs once.
1652 (("using MacroAssembler::call_VM_leaf_base;") "")
1653 (("Interpreter specific version of call_VM_base")
1654 (string-append "Interpreter specific version of call_VM_base\n"
1655 " using MacroAssembler::call_VM_leaf_base;"))))))
1656 #~())
1657 (replace 'remove-timestamping
1658 (lambda _
1659 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1660 (("__DATE__") "")
1661 (("__TIME__") ""))))
1662 (replace 'fix-java-shebangs
1663 (lambda _
1664 ;; 'blocked' was renamed to 'blacklisted' in this version for
1665 ;; some reason.
1666 (substitute* "make/data/blacklistedcertsconverter/\
1667blacklisted.certs.pem"
1668 (("^#!.*")
1669 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1670
1671(define-public openjdk13
1672 (make-openjdk openjdk12 "13.0.14"
1673 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1674 (source (origin
1675 (inherit (package-source base))
1676 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1677 "openjdk-10-jtask-reproducibility.patch"))))
1678 (arguments
1679 (substitute-keyword-arguments (package-arguments openjdk12)
1680 ((#:phases phases)
1681 #~(modify-phases #$phases
1682 (replace 'remove-timestamping
1683 (lambda _
1684 (substitute*
1685 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1686 (("__DATE__") "")
1687 (("__TIME__") ""))))))))))
1688
1689(define-public openjdk14
1690 (make-openjdk
1691 openjdk13 "14.0.2"
1692 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1693 (source (origin
1694 (inherit (package-source base))
1695 (snippet ;override snippet
1696 '(begin
1697 ;; The m4 macro uses 'help' to search for builtins, which is
1698 ;; not available in bash-minimal
1699 (substitute* "make/autoconf/basics.m4"
1700 (("if help") "if command -v"))
1701 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1702 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1703 "openjdk-10-jtask-reproducibility.patch"
1704 "openjdk-13-classlist-reproducibility.patch"))))))
1705
1706(define-public openjdk15
1707 (make-openjdk
1708 openjdk14 "15.0.10"
1709 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1710 (source (origin
1711 (inherit (package-source base))
1712 (modules '())
1713 (snippet #f)
1714 (patches
1715 (search-patches "openjdk-15-jtask-reproducibility.patch"
1716 "openjdk-15-xcursor-no-dynamic.patch"))))
1717 (inputs
1718 (modify-inputs inputs
1719 (append libxcursor))) ;for our patch to work
1720 (arguments
1721 (substitute-keyword-arguments (package-arguments base)
1722 ((#:implicit-inputs? _ #t)
1723 ;; This is necessary to avoid include ordering errors when adding a
1724 ;; lower GCC to native-inputs to avoid errors like "error: 'fesetround'
1725 ;; was not declared in this scope; did you mean 'setreuid'?"
1726 #f)
1727 ((#:configure-flags flags '%standard-phases)
1728 #~(cons "--without-gtest" ;this replaces...
1729 (delete "--disable-hotspot-gtest" #$flags))))) ;... this
1730 (native-inputs
1731 (append (modify-inputs native-inputs
1732 (delete "make" ;remove old gnu-make-4.2
1733 "openjdk") ;to remove non-jdk output
1734 (append `(,openjdk14 "jdk")))
1735 ;; On powerpc64le at least, GCC 14 cannot be used otherwise JDK 15
1736 ;; fails to bootstrap JDK 16, with incomprehensible errors like:
1737 ;; src/java.base/share/classes/java/lang/reflect/Proxy.java:1311:
1738 ;; error: integer number too large.
1739 (modify-inputs (%final-inputs)
1740 (replace "gcc" gcc-11))))))
1741
1742(define-public openjdk16
1743 (make-openjdk
1744 openjdk15 "16.0.2"
1745 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1746 (source (origin
1747 (inherit (package-source base))
1748 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1749 "openjdk-10-setsignalhandler.patch"))))))
1750
1751(define-public openjdk17
1752 (make-openjdk
1753 openjdk16 "17.0.10"
1754 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1755 (source (origin
1756 (inherit (package-source base))
1757 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1758 (arguments
1759 (substitute-keyword-arguments (package-arguments base)
1760 ((#:implicit-inputs? _ #t) #t) ;restore default
1761 ((#:phases phases)
1762 #~(modify-phases #$phases
1763 (replace 'fix-java-shebangs
1764 (lambda _
1765 ;; 'blacklisted' was renamed back to 'blocked'.
1766 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1767 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))
1768 (native-inputs
1769 ;; Resume using the implicit inputs, including the current GCC.
1770 (fold alist-delete (package-native-inputs base)
1771 (map first (%final-inputs))))))
1772
1773(define-public openjdk18
1774 (make-openjdk openjdk17 "18.0.2.1"
1775 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1776
1777(define-public openjdk19
1778 (make-openjdk openjdk18 "19.0.2"
1779 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1780 (arguments
1781 (substitute-keyword-arguments (package-arguments openjdk18)
1782 ((#:phases phases)
1783 #~(modify-phases #$phases
1784 (replace 'fix-java-shebangs
1785 (lambda _
1786 ;; Update file path.
1787 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1788 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1789 (add-before 'configure 'define-java-environment-variables
1790 (lambda* (#:key inputs #:allow-other-keys)
1791 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1792 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1793
1794(define-public openjdk20
1795 (make-openjdk openjdk19 "20.0.2"
1796 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1797
1798(define-public openjdk21
1799 (make-openjdk openjdk20 "21.0.2"
1800 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1801 (source (origin
1802 (inherit (package-source base))
1803 (patches (search-patches "openjdk-21-fix-rpath.patch"
1804 "openjdk-15-xcursor-no-dynamic.patch"))))
1805 (arguments
1806 (substitute-keyword-arguments (package-arguments base)
1807 ((#:phases phases)
1808 #~(modify-phases #$phases
1809 (replace 'fix-java-shebangs
1810 (lambda _
1811 ;; 'blacklisted' was renamed back to 'blocked'.
1812 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1813 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1814
1815(define-public openjdk22
1816 (make-openjdk
1817 openjdk21 "22.0.2"
1818 "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6"
1819 (arguments
1820 (substitute-keyword-arguments (package-arguments base)
1821 ((#:phases phases)
1822 #~(modify-phases #$phases
1823 (add-after 'unpack 'do-not-disable-new-dtags
1824 (lambda _
1825 ;; Our validate-runpath phases checks for RUNPATH, not RPATH.
1826 (substitute* "make/autoconf/flags-cflags.m4"
1827 ((" -Wl,--disable-new-dtags") ""))))))))))
1828
1829(define-public openjdk23
1830 (make-openjdk
1831 openjdk22 "23.0.2"
1832 "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf"
1833 (source (origin
1834 (inherit (package-source base))
1835 ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it
1836 ;; appears not needed anymore. The
1837 ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore;
1838 ;; the fix should be pursued in libx11 (see:
1839 ;; https://issues.guix.gnu.org/54654)
1840 (patches '())))))
1841
1842(define-public openjdk24
1843 (make-openjdk
1844 openjdk23 "24.0.1"
1845 "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx"))
1846
1847(define-public openjdk25
1848 (make-openjdk
1849 openjdk24 "25.0.2"
1850 "03aa34lscr3qbdl6qz3gqyp0nzkqfj02362mzmpkiq3y2g5xdnrj"))
1851
1852;;; Convenience alias to point to the latest version of OpenJDK.
1853(define-public openjdk openjdk25)
1854
1855
1856;; This version of JBR is here in order to be able to build custom
1857;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1858;; tests.
1859(define-public jbr11
1860 (package
1861 (inherit openjdk11)
1862 (name "jbr")
1863 (version "11_0_16-b2248")
1864 (source (origin
1865 (method git-fetch)
1866 (uri (git-reference
1867 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1868 (commit (string-append "jb" version))))
1869 (file-name (string-append name "-" version "-checkout"))
1870 (sha256
1871 (base32
1872 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1873 (arguments
1874 (substitute-keyword-arguments (package-arguments openjdk11)
1875 ((#:configure-flags configure-flags)
1876 #~(append #$configure-flags
1877 (list "--with-jvm-features=shenandoahgc"
1878 "--enable-cds=yes"
1879 "--with-vendor-name=JetBrains s.r.o"
1880 "--with-vendor-url=https://www.jetbrains.com/"
1881 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1882 (synopsis "JetBrains Java Runtime")
1883 (description "This package provides a Java runtime environment for
1884and Java development kit. It supports enhanced class redefinition (DCEVM),
1885includes a number of improvements in font rendering, keyboards support,
1886windowing/focus subsystems, HiDPI, accessibility, and performance,
1887provides better desktop integration and bugfixes not yet present in
1888OpenJDK.")
1889 (home-page "https://www.jetbrains.com/")
1890 (license license:gpl2+)))
1891
1892(define-public jbr17
1893 (package
1894 (inherit openjdk17)
1895 (name "jbr")
1896 (version "17.0.11b1207.30")
1897 (source (origin
1898 (method git-fetch)
1899 (uri (git-reference
1900 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1901 (commit (string-append "jbr-release-" version))))
1902 (file-name (string-append name "-" version "-checkout"))
1903 (sha256
1904 (base32
1905 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1906 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1907 (arguments
1908 (substitute-keyword-arguments (package-arguments openjdk17)
1909 ((#:configure-flags configure-flags)
1910 #~(append #$configure-flags
1911 (list "--with-jvm-features=shenandoahgc"
1912 "--enable-cds=yes"
1913 "--with-vendor-name=JetBrains s.r.o"
1914 "--with-vendor-url=https://www.jetbrains.com/"
1915 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1916 (synopsis "JetBrains Java Runtime")
1917 (description "This package provides a Java runtime environment for
1918and Java development kit. It supports enhanced class redefinition (DCEVM),
1919includes a number of improvements in font rendering, keyboards support,
1920windowing/focus subsystems, HiDPI, accessibility, and performance,
1921provides better desktop integration and bugfixes not yet present in
1922OpenJDK.")
1923 (home-page "https://www.jetbrains.com/")
1924 (license license:gpl2+)))
1925
1926(define-public jbr21
1927 (package
1928 (inherit openjdk21)
1929 (name "jbr")
1930 (version "21.0.3b509.11")
1931 (source (origin
1932 (method git-fetch)
1933 (uri (git-reference
1934 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1935 (commit (string-append "jbr-release-" version))))
1936 (file-name (string-append name "-" version "-checkout"))
1937 (sha256
1938 (base32
1939 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1940 (patches (search-patches "openjdk-21-fix-rpath.patch"
1941 "jbr-17-xcursor-no-dynamic.patch"))))
1942 (inputs
1943 `(("wayland" ,wayland)
1944 ("libxkbcommon" ,libxkbcommon) ; for wayland
1945 ,@(package-inputs openjdk21)))
1946 (arguments
1947 (substitute-keyword-arguments (package-arguments openjdk21)
1948 ((#:configure-flags configure-flags)
1949 #~(append #$configure-flags
1950 (list "--with-jvm-features=shenandoahgc"
1951 "--enable-cds=yes"
1952 "--with-vendor-name=JetBrains s.r.o"
1953 "--with-vendor-url=https://www.jetbrains.com/"
1954 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1955 (synopsis "JetBrains Java Runtime")
1956 (description "This package provides a Java runtime environment for
1957and Java development kit. It supports enhanced class redefinition (DCEVM),
1958includes a number of improvements in font rendering, keyboards support,
1959windowing/focus subsystems, HiDPI, accessibility, and performance,
1960provides better desktop integration and bugfixes not yet present in
1961OpenJDK.")
1962 (home-page "https://www.jetbrains.com/")
1963 (license license:gpl2+)))
1964
1965
1966(define-public ant/java8
1967 (package
1968 (name "ant")
1969 (version "1.10.15")
1970 (source (origin
1971 (method url-fetch)
1972 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1973 version "-src.tar.gz"))
1974 (sha256
1975 (base32
1976 "1ccr852dxg5affdqafg04gi3l89q5c6l9lqrz50jhj05kidljax2"))
1977 (modules '((guix build utils)))
1978 (snippet
1979 '(begin
1980 (for-each delete-file
1981 (find-files "lib/optional" "\\.jar$"))
1982 #t))))
1983 (build-system gnu-build-system)
1984 (arguments
1985 (list
1986 #:modules '((srfi srfi-1)
1987 (guix build gnu-build-system)
1988 (guix build utils))
1989 #:tests? #f ;no "check" target
1990 #:phases
1991 #~(modify-phases %standard-phases
1992 (add-after 'unpack 'remove-scripts
1993 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1994 ;; wrappers.
1995 (lambda _
1996 (for-each delete-file
1997 (find-files "src/script"
1998 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
1999 (delete 'bootstrap)
2000 (delete 'configure)
2001 (replace 'build
2002 (lambda* (#:key inputs #:allow-other-keys)
2003 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2004
2005 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2006 ;; Ant to build. This is necessary in addition to disabling the
2007 ;; "check" phase, because the dependency on "test-jar" would always
2008 ;; result in the tests to be run.
2009 (substitute* "build.xml"
2010 (("depends=\"jars,test-jar") "depends=\"jars"))
2011 (invoke "bash" "bootstrap.sh"
2012 (string-append "-Ddist.dir=" #$output))))
2013 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2014 (lambda _
2015 (define (repack-archive jar)
2016 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2017 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2018 (with-directory-excursion dir
2019 (invoke "unzip" jar))
2020 (delete-file jar)
2021 ;; XXX: copied from (gnu build install)
2022 (for-each (lambda (file)
2023 (let ((s (lstat file)))
2024 (unless (eq? (stat:type s) 'symlink)
2025 (utime file 0 0 0 0))))
2026 (find-files dir #:directories? #t))
2027 ;; It is important that the manifest appears first.
2028 (with-directory-excursion dir
2029 (let* ((files (find-files "." ".*" #:directories? #t))
2030 ;; To ensure that the reference scanner can
2031 ;; detect all store references in the jars
2032 ;; we disable compression with the "-0" option.
2033 (command (if (file-exists? manifest)
2034 `("zip" "-0" "-X" ,jar ,manifest
2035 ,@files)
2036 `("zip" "-0" "-X" ,jar ,@files))))
2037 (apply invoke command)))))
2038 (for-each repack-archive
2039 (find-files
2040 (string-append #$output "/lib")
2041 "\\.jar$"))))
2042 (delete 'install))))
2043 (native-inputs
2044 `(("jdk" ,icedtea-8 "jdk")
2045 ("zip" ,zip)
2046 ("unzip" ,unzip)))
2047 (home-page "https://ant.apache.org")
2048 (synopsis "Build tool for Java")
2049 (description
2050 "Ant is a platform-independent build tool for Java. It is similar to
2051make but is implemented using the Java language, requires the Java platform,
2052and is best suited to building Java projects. Ant uses XML to describe the
2053build process and its dependencies, whereas Make uses Makefile format.")
2054 (license license:asl2.0)))
2055
2056;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2057;; requires Java 8.
2058(define-public ant
2059 (package (inherit ant/java8)
2060 (version "1.9.15")
2061 (source (origin
2062 (method url-fetch)
2063 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2064 version "-src.tar.gz"))
2065 (sha256
2066 (base32
2067 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2068 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2069 ;; later.
2070 (arguments
2071 (substitute-keyword-arguments
2072 `(#:modules ((srfi srfi-1)
2073 (guix build gnu-build-system)
2074 (guix build utils))
2075 #:tests? #f ; no "check" target
2076 #:phases
2077 (modify-phases %standard-phases
2078 (delete 'bootstrap)
2079 (delete 'configure)
2080 (add-before 'build 'define-java-environment-variables
2081 (lambda* (#:key inputs #:allow-other-keys)
2082 ;; First, set environment variables (eases debugging on -K).
2083 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2084 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2085 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2086 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2087 (replace 'build
2088 (lambda* (#:key inputs outputs #:allow-other-keys)
2089 ;; Ant complains if this file doesn't exist.
2090 (setenv "HOME" "/tmp")
2091 (with-output-to-file "/tmp/.ant.properties"
2092 (lambda _ (display "")))
2093
2094 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2095 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2096
2097 ;; jikes produces lots of warnings, but they are not very
2098 ;; interesting, so we silence them.
2099 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2100
2101 ;; Without these JamVM options the build may freeze.
2102 (substitute* "bootstrap.sh"
2103 (("^\"\\$\\{JAVACMD\\}\" " m)
2104 ,@(if (string-prefix? "armhf" (or (%current-system)
2105 (%current-target-system)))
2106 `((string-append m "-Xnocompact "))
2107 `((string-append m "-Xnocompact -Xnoinlining ")))))
2108
2109 ;; Disable tests because we are bootstrapping and thus don't have
2110 ;; any of the dependencies required to build and run the tests.
2111 (substitute* "build.xml"
2112 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2113 (invoke "bash" "bootstrap.sh"
2114 (string-append "-Ddist.dir="
2115 (assoc-ref outputs "out")))))
2116 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2117 (lambda* (#:key outputs #:allow-other-keys)
2118 (define (repack-archive jar)
2119 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2120 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2121 (with-directory-excursion dir
2122 (invoke "unzip" jar))
2123 (delete-file jar)
2124 ;; XXX: copied from (gnu build install)
2125 (for-each (lambda (file)
2126 (let ((s (lstat file)))
2127 (unless (eq? (stat:type s) 'symlink)
2128 (utime file 0 0 0 0))))
2129 (find-files dir #:directories? #t))
2130 ;; It is important that the manifest appears first.
2131 (with-directory-excursion dir
2132 (let* ((files (find-files "." ".*" #:directories? #t))
2133 ;; To ensure that the reference scanner can
2134 ;; detect all store references in the jars
2135 ;; we disable compression with the "-0" option.
2136 (command (if (file-exists? manifest)
2137 `("zip" "-0" "-X" ,jar ,manifest
2138 ,@files)
2139 `("zip" "-0" "-X" ,jar ,@files))))
2140 (apply invoke command)))))
2141 (for-each repack-archive
2142 (find-files
2143 (string-append (assoc-ref %outputs "out") "/lib")
2144 "\\.jar$"))))
2145 (delete 'install)))
2146 ((#:phases phases)
2147 `(modify-phases ,phases
2148 (delete 'define-java-environment-variables)
2149 (add-after 'unpack 'remove-scripts
2150 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2151 ;; wrappers.
2152 (lambda _
2153 (for-each delete-file
2154 (find-files "src/script"
2155 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2156 #t))
2157 (replace 'build
2158 (lambda* (#:key inputs outputs #:allow-other-keys)
2159 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2160
2161 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2162 ;; Ant to build. This is necessary in addition to disabling the
2163 ;; "check" phase, because the dependency on "test-jar" would always
2164 ;; result in the tests to be run.
2165 (substitute* "build.xml"
2166 (("depends=\"jars,test-jar") "depends=\"jars"))
2167 (invoke "bash" "bootstrap.sh"
2168 (string-append "-Ddist.dir="
2169 (assoc-ref outputs "out")))))))))
2170 (native-inputs
2171 `(("jdk" ,icedtea-7 "jdk")
2172 ("zip" ,zip)
2173 ("unzip" ,unzip)))))
2174
2175(define-public ant-apache-bcel
2176 (package
2177 (inherit ant/java8)
2178 (name "ant-apache-bcel")
2179 (arguments
2180 (substitute-keyword-arguments (package-arguments ant/java8)
2181 ((#:phases phases)
2182 #~(modify-phases #$phases
2183 (add-after 'unpack 'link-bcel
2184 (lambda* (#:key inputs #:allow-other-keys)
2185 (for-each (lambda (file)
2186 (symlink file
2187 (string-append "lib/optional/"
2188 (basename file))))
2189 (find-files (assoc-ref inputs "java-commons-bcel")
2190 "\\.jar$"))))
2191 (add-after 'build 'install
2192 (lambda _
2193 (let ((share (string-append #$output "/share/java"))
2194 (bin (string-append #$output "/bin"))
2195 (lib (string-append #$output "/lib")))
2196 (mkdir-p share)
2197 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2198 (delete-file-recursively bin)
2199 (delete-file-recursively lib))))))))
2200 (inputs
2201 (modify-inputs (package-inputs ant/java8)
2202 (prepend java-commons-bcel)))))
2203
2204(define-public ant-junit
2205 (package
2206 (inherit ant/java8)
2207 (name "ant-junit")
2208 (arguments
2209 (substitute-keyword-arguments (package-arguments ant/java8)
2210 ((#:phases phases)
2211 #~(modify-phases #$phases
2212 (add-after 'unpack 'link-junit
2213 (lambda* (#:key inputs #:allow-other-keys)
2214 (for-each (lambda (file)
2215 (symlink file
2216 (string-append "lib/optional/"
2217 (basename file))))
2218 (find-files (assoc-ref inputs "java-junit")
2219 "\\.jar$"))))
2220 (add-after 'build 'install
2221 (lambda _
2222 (let ((share (string-append #$output "/share/java"))
2223 (bin (string-append #$output "/bin"))
2224 (lib (string-append #$output "/lib")))
2225 (mkdir-p share)
2226 (install-file (string-append lib "/ant-junit.jar") share)
2227 (delete-file-recursively bin)
2228 (delete-file-recursively lib))))))))
2229 (inputs
2230 (modify-inputs (package-inputs ant/java8)
2231 (prepend java-junit)))))
2232
2233(define-public libantlr3c
2234 (package
2235 (name "libantlr3c")
2236 (version "3.4")
2237 (source
2238 (origin
2239 (method url-fetch)
2240 (uri
2241 (string-append "https://www.antlr3.org/download/C/"
2242 name "-" version ".tar.gz"))
2243 (sha256
2244 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2245 (build-system gnu-build-system)
2246 (arguments
2247 (list #:configure-flags
2248 #~(list "--enable-debuginfo"
2249 "--disable-static"
2250 #$@(if (target-64bit?)
2251 #~("--enable-64bit")
2252 #~())
2253 #$@(if (target-riscv64?)
2254 #~("--disable-abiflags")
2255 #~()))))
2256 (synopsis "ANTLR C Library")
2257 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2258Tool for Language Recognition v3).")
2259 (home-page "https://www.antlr3.org/")
2260 (license license:bsd-3)))
2261
2262(define-public drip
2263 ;; Last release is from 2014, with a few important commits afterwards.
2264 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2265 (package
2266 (name "drip")
2267 (version (git-version "0.2.4" "1" commit))
2268 (source (origin
2269 (method git-fetch)
2270 (uri (git-reference
2271 (url "https://github.com/ninjudd/drip")
2272 (commit commit)))
2273 (file-name (git-file-name name version))
2274 (sha256
2275 (base32
2276 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2277 (build-system gnu-build-system)
2278 (native-inputs
2279 `(("jdk" ,icedtea "jdk")))
2280 (arguments
2281 (list #:tests? #f ; No tests.
2282 #:phases
2283 #~(modify-phases %standard-phases
2284 (delete 'configure)
2285 (add-before 'build 'relax-gcc-14-strictness
2286 (lambda _
2287 (substitute* "Makefile"
2288 ((" gcc(.*)$" all options)
2289 (string-append
2290 " gcc"
2291 " -Wno-error=incompatible-pointer-types"
2292 " -Wno-error=implicit-function-declaration"
2293 options)))))
2294 (add-before 'install 'fix-wrapper
2295 (lambda* (#:key inputs #:allow-other-keys)
2296 (let ((jps (search-input-file inputs "/bin/jps")))
2297 (substitute* "bin/drip"
2298 (("jps") jps)
2299 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2300 ;; No need to make:
2301 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2302 ;; No need to include source:
2303 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2304 "true")))))
2305 (replace 'install
2306 (lambda* (#:key outputs #:allow-other-keys)
2307 (let* ((bin (string-append #$output "/bin"))
2308 (share (string-append #$output "/share/drip")))
2309 (mkdir-p bin)
2310 (for-each
2311 (lambda (file)
2312 (install-file (string-append "bin/" file) bin))
2313 '("drip" "drip_daemon" "drip_proxy"))
2314 (install-file "drip.jar" share)
2315 (substitute* (string-append bin "/drip")
2316 (("drip_dir=\\$bin_dir/..")
2317 (string-append "drip_dir=" share)))))))))
2318 (home-page "https://github.com/ninjudd/drip")
2319 (synopsis "Faster Java Virtual Machine launching")
2320 (description "Drip is a launcher for the Java Virtual Machine that
2321provides much faster startup times than the @command{java} command. The @command{drip}
2322script is intended to be a drop-in replacement for the @command{java} command,
2323only faster.")
2324 (license license:epl1.0))))
2325
2326(define-public java-openjfx-build
2327 (package
2328 (name "java-openjfx-build")
2329 ;; This is a java-8 version
2330 (version "8.202")
2331 (source (origin
2332 (method hg-fetch)
2333 (uri (hg-reference
2334 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2335 (changeset (string-append
2336 (string-join (string-split version #\.) "u")
2337 "-ga"))))
2338 (file-name (string-append name "-" version "-checkout"))
2339 (modules '((guix build utils)))
2340 (snippet
2341 '(begin
2342 ;; Delete included gradle jar
2343 (delete-file-recursively "gradle/wrapper")
2344 #t))
2345 (sha256
2346 (base32
2347 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2348 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2349 (build-system ant-build-system)
2350 (arguments
2351 `(#:jar-name "java-openjfx.jar"
2352 #:source-dir "buildSrc/src/main/java"
2353 #:test-dir "buildSrc/src/test"
2354 #:phases
2355 (modify-phases %standard-phases
2356 (add-before 'configure 'generate-jsl-parser
2357 (lambda _
2358 (invoke "antlr3" "-o"
2359 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2360 "buildSrc/src/main/antlr/JSL.g"))))))
2361 (inputs
2362 (list antlr3 java-stringtemplate))
2363 (native-inputs
2364 (list java-junit java-hamcrest-core))
2365 (home-page "https://openjfx.io")
2366 (synopsis "Graphical application toolkit in Java")
2367 (description "OpenJFX is a client application platform for desktop,
2368mobile and embedded systems built on Java. Its goal is to produce a
2369modern, efficient, and fully featured toolkit for developing rich client
2370applications. This package contains base classes for the OpenJFX
2371distribution and helper classes for building other parts of the
2372distribution.")
2373 (license license:gpl2))) ;gpl2 only, with classpath exception
2374
2375(define-public java-openjfx-base
2376 (package (inherit java-openjfx-build)
2377 (name "java-openjfx-base")
2378 (arguments
2379 `(#:jar-name "java-openjfx-base.jar"
2380 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2381 #:test-dir "modules/base/src/test"
2382 #:phases
2383 (modify-phases %standard-phases
2384 (add-before 'check 'remove-empty-file
2385 (lambda _
2386 (with-directory-excursion "modules/base/src/test/java"
2387 ;; These files are completely commented, but junit expects them to
2388 ;; contain a class, so tests fail.
2389 (delete-file
2390 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2391 (delete-file
2392 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2393 (delete-file "javafx/beans/property/PropertiesTest.java")
2394 (delete-file
2395 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2396 ;; This one fails
2397 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2398 #t)))))
2399 (propagated-inputs
2400 (list java-openjfx-build))
2401 (description "OpenJFX is a client application platform for desktop,
2402mobile and embedded systems built on Java. Its goal is to produce a
2403modern, efficient, and fully featured toolkit for developing rich client
2404applications. This package contains base classes for the OpenJFX
2405distribution.")))
2406
2407(define-public java-openjfx-graphics
2408 (package (inherit java-openjfx-build)
2409 (name "java-openjfx-graphics")
2410 (arguments
2411 `(#:jar-name "java-openjfx-graphics.jar"
2412 #:source-dir "modules/graphics/src/main/java"
2413 #:tests? #f; require X
2414 #:test-dir "modules/graphics/src/test"
2415 #:phases
2416 (modify-phases %standard-phases
2417 (add-after 'unpack 'copy-missing-file
2418 (lambda* (#:key inputs #:allow-other-keys)
2419 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2420 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2421 ;; XXX: looks like the missing file we found isn't *quite*
2422 ;; compatible...
2423 (substitute* target
2424 (("case TYPE_INT_ARGB:") "")))))
2425 (add-after 'build 'build-native
2426 (lambda* (#:key inputs outputs #:allow-other-keys)
2427 (let ((jdk (assoc-ref inputs "jdk"))
2428 (class-file->class-name
2429 (lambda (class-file)
2430 (string-map (lambda (c)
2431 (if (char=? c #\/) #\. c))
2432 (string-drop-right class-file
2433 (string-length ".class"))))))
2434 (setenv "CPPFLAGS"
2435 (string-append "-DINLINE=inline "
2436 "-DLINUX "
2437 "-I" jdk "/include "
2438 "-I" jdk "/include/linux "
2439 "-I " (getcwd) "/build/classes/include "
2440 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2441
2442 ;; Instructions have been adapted from buildSrc/linux.gradle
2443 (with-directory-excursion "build/classes"
2444 ;; Build prism
2445 (mkdir-p "include")
2446
2447 ;; Generate headers for prism
2448 (apply invoke "javah" "-d" "include" "-cp" "."
2449 (map class-file->class-name
2450 (append (find-files "com/sun/prism/impl" "\\.class$")
2451 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2452
2453 ;; ...then for prism_sw
2454 (apply invoke "javah" "-d" "include" "-cp" "."
2455 (map class-file->class-name
2456 (find-files "com/sun/pisces" "\\.class$")))
2457
2458 ;; ...and for prism_es2
2459 (apply invoke "javah" "-d" "include" "-cp" "."
2460 (map class-file->class-name
2461 (find-files "com/sun/prism/es2" "\\.class$")))))
2462
2463 (with-directory-excursion "netbeans/native-prism"
2464 (invoke "make" "CONF=Release"))
2465 (with-directory-excursion "netbeans/native-prism-sw"
2466 (invoke "make" "CONF=Release"))
2467 ;; TODO: This fails due to unknown EGL procedure names
2468 #;
2469 (with-directory-excursion "netbeans/native-prism-es2"
2470 (invoke "make" "CONF=Release"))
2471
2472 (let* ((out (assoc-ref outputs "out"))
2473 (dir ,(match (%current-system)
2474 ("i686-linux"
2475 "i386")
2476 ((or "armhf-linux" "aarch64-linux")
2477 "arm")
2478 ((or "x86_64-linux")
2479 "amd64")
2480 (_ "unknown")))
2481 (target (string-append out "/share/" dir "/")))
2482 (mkdir-p target)
2483 (for-each (lambda (file)
2484 (let ((new-name
2485 (string-append "lib"
2486 (string-map
2487 (lambda (c)
2488 (if (char=? c #\-) #\_ c))
2489 (string-drop (basename file)
2490 (string-length "libnative-"))))))
2491 (copy-file file
2492 (string-append target new-name))))
2493 (find-files "netbeans" "\\.so$"))))))))
2494 (propagated-inputs
2495 (list java-openjfx-base))
2496 (inputs
2497 (list java-swt))
2498 ;; XXX: for unknown reasons
2499 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2500 ;; in this revision.
2501 (native-inputs
2502 `(("JNativeSurface.c"
2503 ,(origin
2504 (method url-fetch)
2505 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2506/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2507 (sha256
2508 (base32
2509 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2510 (description "OpenJFX is a client application platform for desktop,
2511mobile and embedded systems built on Java. Its goal is to produce a
2512modern, efficient, and fully featured toolkit for developing rich client
2513applications. This package contains graphics-related classes for the
2514OpenJFX distribution.")))
2515
2516(define-public java-openjfx-media
2517 (package (inherit java-openjfx-build)
2518 (name "java-openjfx-media")
2519 (propagated-inputs
2520 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2521 (arguments
2522 `(#:jar-name "java-openjfx-media.jar"
2523 #:source-dir "modules/media/src/main/java"
2524 #:tests? #f)); no tests
2525 (description "OpenJFX is a client application platform for desktop,
2526mobile and embedded systems built on Java. Its goal is to produce a
2527modern, efficient, and fully featured toolkit for developing rich client
2528applications. This package contains media-related classes for the
2529OpenJFX distribution.")))
2530
2531(define-public java-openjfx-controls
2532 (package (inherit java-openjfx-build)
2533 (name "java-openjfx-controls")
2534 (propagated-inputs
2535 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2536 (arguments
2537 `(#:jar-name "java-openjfx-controls.jar"
2538 #:source-dir "modules/controls/src/main/java"
2539 #:test-dir "modules/controls/src/test"
2540 ;; TODO: tests require com.sun.javafx.pgstub,
2541 ;; javafx.collections.MockSetObserver, and
2542 ;; com.sun.javafx.binding.ExpressionHelperUtility
2543 #:tests? #false
2544 #:phases
2545 (modify-phases %standard-phases
2546 (add-after 'unpack 'copy-resources
2547 (lambda _
2548 (copy-recursively "modules/controls/src/test/resources"
2549 "build/test-classes")
2550 (copy-recursively "modules/controls/src/main/resources"
2551 "build/classes"))))))
2552 (description "OpenJFX is a client application platform for desktop,
2553mobile and embedded systems built on Java. Its goal is to produce a
2554modern, efficient, and fully featured toolkit for developing rich client
2555applications. This package contains UI control classes for the
2556OpenJFX distribution.")))
2557
2558(define-public javacc-4
2559 (package
2560 (name "javacc")
2561 (version "4.1")
2562 (source (origin
2563 (method git-fetch)
2564 (uri (git-reference
2565 (url "https://github.com/javacc/javacc")
2566 (commit "release_41")))
2567 (file-name (string-append "javacc-" version "-checkout"))
2568 (sha256
2569 (base32
2570 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2571 (modules '((guix build utils)))
2572 ;; delete bundled jars
2573 (snippet '(begin (delete-file-recursively "lib") #t))))
2574 (build-system ant-build-system)
2575 ;; Tests fail with
2576 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2577 ;; JAVACODE failed
2578 (arguments
2579 `(#:tests? #f
2580 #:phases
2581 (modify-phases %standard-phases
2582 ;; Delete tests to avoid build failure (we don't run them anyway).
2583 (add-after 'unpack 'delete-tests
2584 (lambda _
2585 (for-each delete-file
2586 '("src/org/javacc/JavaCCTestCase.java"
2587 "src/org/javacc/parser/ExpansionTest.java"
2588 "src/org/javacc/parser/OptionsTest.java"
2589 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2590 (for-each delete-file-recursively
2591 '("src/org/javacc/parser/test"
2592 "src/org/javacc/jjdoc/test"))
2593 #t))
2594 (replace 'install (install-jars "bin/lib")))))
2595 (home-page "https://javacc.org/")
2596 (synopsis "Java parser generator")
2597 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2598generator for use with Java applications. A parser generator is a tool that
2599reads a grammar specification and converts it to a Java program that can
2600recognize matches to the grammar. In addition to the parser generator itself,
2601JavaCC provides other standard capabilities related to parser generation such
2602as tree building (via a tool called JJTree included with JavaCC), actions,
2603debugging, etc.")
2604 (license license:bsd-3)))
2605
2606;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2607;; in the bootstrap/ directory.
2608(define-public javacc-3
2609 (package
2610 (inherit javacc-4)
2611 (version "3.2")
2612 (source (origin
2613 (method git-fetch)
2614 (uri (git-reference
2615 (url "https://github.com/javacc/javacc")
2616 (commit "release_32")))
2617 (file-name (string-append "javacc-" version "-checkout"))
2618 (sha256
2619 (base32
2620 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2621 (arguments
2622 `(#:tests? #f
2623 #:phases
2624 (modify-phases %standard-phases
2625 (add-before 'build 'set-java-version
2626 (lambda _
2627 (for-each
2628 (lambda (file)
2629 (substitute* file
2630 (("debug=") "source=\"1.4\" debug=")))
2631 (find-files "." "build.xml"))
2632 #t))
2633 (replace 'install (install-jars "bin/lib")))))))
2634
2635(define-public javacc
2636 (package
2637 (inherit javacc-4)
2638 (version "7.0.4")
2639 (source
2640 (origin
2641 (method git-fetch)
2642 (uri (git-reference
2643 (url "https://github.com/javacc/javacc")
2644 (commit version)))
2645 (file-name (git-file-name "javacc" version))
2646 (sha256
2647 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2648 (modules '((guix build utils)))
2649 ;; Delete bundled jars.
2650 (snippet '(begin (for-each delete-file-recursively
2651 '("bootstrap" "lib"))))))
2652 (arguments
2653 `(#:make-flags ; bootstrap from javacc-4
2654 ,#~(list (string-append "-Dbootstrap-jar="
2655 #$(this-package-native-input "javacc")
2656 "/share/java/javacc.jar"))
2657 #:test-target "test"
2658 #:phases
2659 (modify-phases %standard-phases
2660 (replace 'install (install-jars "target"))
2661 (add-after 'install 'install-bin
2662 (lambda* (#:key outputs inputs #:allow-other-keys)
2663 (let* ((out (assoc-ref outputs "out"))
2664 (dir (string-append out "/share/java"))
2665 (bin (string-append out "/bin"))
2666 (javacc (string-append bin "/javacc")))
2667 (mkdir-p bin)
2668 (with-output-to-file javacc
2669 (lambda _
2670 (display
2671 (string-append "#!/bin/sh\n"
2672 (assoc-ref inputs "icedtea") "/bin/java"
2673 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2674 (chmod javacc #o755)
2675 ;; symlink to different names to affect the first argument and
2676 ;; change the behavior of the jar file.
2677 (symlink javacc (string-append bin "/jjdoc"))
2678 (symlink javacc (string-append bin "/jjtree"))))))))
2679 (native-inputs
2680 (list javacc-4))
2681 (inputs (list icedtea-8))))
2682
2683(define-public java-ecj
2684 (package
2685 (name "java-ecj")
2686 (version "4.6.3")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (string-append "http://archive.eclipse.org/eclipse/"
2691 "downloads/drops4/R-" version "-201703010400/"
2692 "ecjsrc-" version ".jar"))
2693 (sha256
2694 (base32
2695 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2696 (build-system ant-build-system)
2697 (arguments
2698 `(#:tests? #f ; none included
2699 #:build-target "build"
2700 #:phases
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'fix-build.xml
2703 (lambda _
2704 (substitute* "src/build.xml"
2705 (("^.*MANIFEST.*$")
2706 "")
2707 (("^.*properties.*$")
2708 "<include name=\"**/*.properties\"/>
2709 <include name=\"**/*.props\"/>"))))
2710 (add-before 'build 'chdir
2711 (lambda _ (chdir "src")))
2712 (replace 'install (install-jars ".")))))
2713 (home-page "https://eclipse.org")
2714 (synopsis "Eclipse Java development tools core batch compiler")
2715 (description "This package provides the Eclipse Java core batch compiler.")
2716 (license license:epl1.0)))
2717
2718(define-public java-cisd-base
2719 (let ((revision 38938)
2720 (base-version "14.12.0"))
2721 (package
2722 (name "java-cisd-base")
2723 (version (string-append base-version "-" (number->string revision)))
2724 (source (origin
2725 (method svn-fetch)
2726 (uri (svn-reference
2727 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2728 "base/tags/release/"
2729 (version-major+minor base-version)
2730 ".x/" base-version "/base/"))
2731 (revision revision)))
2732 (file-name (string-append "java-cisd-base-" version "-checkout"))
2733 (sha256
2734 (base32
2735 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2736 (modules '((guix build utils)))
2737 (snippet
2738 '(begin
2739 ;; Delete included gradle jar
2740 (delete-file-recursively "gradle/wrapper")
2741 ;; Delete pre-built native libraries
2742 (delete-file-recursively "libs")
2743 #t))))
2744 (build-system ant-build-system)
2745 (arguments
2746 `(#:make-flags '("-file" "build/build.xml")
2747 #:test-target "jar-test"
2748 #:jdk ,icedtea-8
2749 #:phases
2750 (modify-phases %standard-phases
2751 (add-after 'unpack 'unpack-build-resources
2752 (lambda* (#:key inputs #:allow-other-keys)
2753 (copy-recursively (assoc-ref inputs "build-resources")
2754 "../build_resources")
2755 #t))
2756 (add-after 'unpack-build-resources 'fix-dependencies
2757 (lambda* (#:key inputs #:allow-other-keys)
2758 (substitute* "build/build.xml"
2759 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2760 (search-input-file inputs
2761 "/share/java/java-testng.jar"))
2762 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2763 (search-input-file inputs
2764 (string-append
2765 "/share/java/commons-lang-"
2766 ,(package-version java-commons-lang)
2767 ".jar")))
2768 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2769 (search-input-file inputs
2770 (string-append
2771 "/lib/m2/commons-io/commons-io/"
2772 ,(package-version java-commons-io)
2773 "/commons-io-"
2774 ,(package-version java-commons-io)
2775 ".jar")))
2776 ;; Remove dependency on svn
2777 (("<build-info.*") "")
2778 (("\\$\\{revision.number\\}")
2779 ,(number->string revision))
2780 (("\\$\\{version.number\\}") ,base-version))
2781 ;; Remove dependency on classycle
2782 (substitute* "../build_resources/ant/build-common.xml"
2783 (("<taskdef name=\"dependency-checker.*") "")
2784 (("classname=\"classycle.*") "")
2785 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2786 #t))
2787 ;; A few tests fail because of the lack of a proper /etc/groups and
2788 ;; /etc/passwd file in the build container.
2789 (add-after 'unpack 'disable-broken-tests
2790 (lambda _
2791 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2792 (("Unix.isOperational\\(\\)") "false"))
2793 #t))
2794 ;; These decorators are almost useless and pull in an unpackaged
2795 ;; dependency.
2796 (add-after 'unpack 'remove-useless-decorators
2797 (lambda _
2798 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2799 (("@Private") "")
2800 (("import ch.rinn.restrictions.Private;") ""))
2801 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2802 (("@Friend.*") "")
2803 (("import ch.rinn.restrictions.Friend;") ""))
2804 #t))
2805 (add-before 'configure 'build-native-code
2806 (lambda* (#:key inputs #:allow-other-keys)
2807 (let ((jdk (assoc-ref inputs "jdk"))
2808 (dir ,(match (%current-system)
2809 ("i686-linux"
2810 "i386-Linux")
2811 ((or "armhf-linux" "aarch64-linux")
2812 "arm-Linux")
2813 ((or "x86_64-linux")
2814 "amd64-Linux")
2815 (_ "unknown-Linux"))))
2816 (with-directory-excursion "source/c"
2817 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2818 (string-append "-I" jdk "/include")
2819 (string-append "-I" jdk "/include/linux")
2820 "-o" "libunix.so")
2821 (invoke "gcc" "-shared" "-O3" "-fPIC"
2822 "-DMACHINE_BYTE_ORDER=1"
2823 "copyCommon.c"
2824 "copyByteChar.c"
2825 "copyByteDouble.c"
2826 "copyByteFloat.c"
2827 "copyByteInt.c"
2828 "copyByteLong.c"
2829 "copyByteShort.c"
2830 (string-append "-I" jdk "/include")
2831 (string-append "-I" jdk "/include/linux")
2832 "-o" "libnativedata.so"))
2833 (install-file "source/c/libunix.so"
2834 (string-append "libs/native/unix/" dir))
2835 (install-file "source/c/libnativedata.so"
2836 (string-append "libs/native/nativedata/" dir))
2837 #t)))
2838 ;; In the "check" phase we only build the test executable.
2839 (add-after 'check 'run-tests
2840 (lambda _
2841 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2842 (delete-file "targets/dist/sis-base-test.jar")
2843 #t))
2844 (replace 'install (install-jars "targets/dist")))))
2845 (native-inputs
2846 `(("jdk" ,icedtea-8)
2847 ("java-commons-lang" ,java-commons-lang)
2848 ("java-commons-io" ,java-commons-io)
2849 ("java-testng" ,java-testng)
2850 ("build-resources"
2851 ,(origin
2852 (method svn-fetch)
2853 (uri (svn-reference
2854 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2855 "base/tags/release/"
2856 (version-major+minor base-version)
2857 ".x/" base-version
2858 "/build_resources/"))
2859 (revision revision)))
2860 (sha256
2861 (base32
2862 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2863 (home-page "https://svnsis.ethz.ch")
2864 (synopsis "Utility classes for libraries from ETH Zurich")
2865 (description "This library supplies some utility classes needed for
2866libraries from the SIS division at ETH Zurich like jHDF5.")
2867 ;; The C sources are under a non-copyleft license, which looks like a
2868 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2869 (license (list license:asl2.0
2870 (license:non-copyleft "file://source/c/COPYING"))))))
2871
2872(define-public java-cisd-args4j
2873 (let ((revision 39162)
2874 (base-version "9.11.2"))
2875 (package
2876 (name "java-cisd-args4j")
2877 (version (string-append base-version "-" (number->string revision)))
2878 (source (origin
2879 (method svn-fetch)
2880 (uri (svn-reference
2881 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2882 "args4j/tags/release/"
2883 (version-major+minor base-version)
2884 ".x/" base-version "/args4j/"))
2885 (revision revision)))
2886 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2887 (sha256
2888 (base32
2889 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2890 (build-system ant-build-system)
2891 (arguments
2892 `(#:make-flags '("-file" "build/build.xml")
2893 #:tests? #f ; there are no tests
2894 #:modules ((guix build ant-build-system)
2895 (guix build utils)
2896 (guix build java-utils)
2897 (sxml simple)
2898 (sxml transform)
2899 (sxml xpath))
2900 #:phases
2901 (modify-phases %standard-phases
2902 (add-after 'unpack 'unpack-build-resources
2903 (lambda* (#:key inputs #:allow-other-keys)
2904 (mkdir-p "../build_resources")
2905 (copy-recursively (assoc-ref inputs "build-resources")
2906 "../build_resources")
2907 (mkdir-p "../build_resources/lib")))
2908 (add-after 'unpack-build-resources 'fix-dependencies
2909 (lambda* (#:key inputs #:allow-other-keys)
2910 ;; FIXME: There should be a more convenient abstraction for
2911 ;; editing XML files.
2912 (with-directory-excursion "../build_resources/ant/"
2913 (chmod "build-common.xml" #o664)
2914 (call-with-output-file "build-common.xml.new"
2915 (lambda (port)
2916 (sxml->xml
2917 (pre-post-order
2918 (with-input-from-file "build-common.xml"
2919 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2920 `(;; Remove dependency on classycle and custom ant tasks
2921 (taskdef . ,(lambda (tag . kids)
2922 (let ((name ((sxpath '(name *text*)) kids)))
2923 (if (or (member "build-info" name)
2924 (member "dependency-checker" name)
2925 (member "build-java-subprojects" name)
2926 (member "project-classpath" name))
2927 '() ; skip
2928 `(,tag ,@kids)))))
2929 (typedef . ,(lambda (tag . kids)
2930 (let ((name ((sxpath '(name *text*)) kids)))
2931 (if (member "recursive-jar" name)
2932 '() ; skip
2933 `(,tag ,@kids)))))
2934 (build-java-subprojects . ,(lambda _ '()))
2935 ;; Ignore everything else
2936 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2937 (*text* . ,(lambda (_ txt) txt))))
2938 port)))
2939 (rename-file "build-common.xml.new" "build-common.xml"))
2940 (substitute* "build/build.xml"
2941 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2942 (search-input-file inputs "/share/java/sis-base.jar"))
2943 ;; Remove dependency on svn
2944 (("<build-info.*") "")
2945 (("\\$\\{revision.number\\}")
2946 ,(number->string revision))
2947 (("\\$\\{version.number\\}") ,base-version)
2948 ;; Don't use custom ant tasks.
2949 (("recursive-jar") "jar")
2950 (("<project-classpath.*") ""))))
2951 (replace 'install (install-jars "targets/dist")))))
2952 (inputs
2953 (list java-cisd-base))
2954 (native-inputs
2955 `(("ecj" ,java-ecj)
2956 ("build-resources"
2957 ,(origin
2958 (method svn-fetch)
2959 (uri (svn-reference
2960 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2961 "args4j/tags/release/"
2962 (version-major+minor base-version)
2963 ".x/" base-version
2964 "/build_resources/"))
2965 (revision revision)))
2966 (sha256
2967 (base32
2968 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2969 (modules '((guix build utils)))
2970 ;; Delete bundled pre-built jars.
2971 (snippet
2972 '(begin (delete-file-recursively "lib/") #t))))))
2973 (home-page "https://svnsis.ethz.ch")
2974 (synopsis "Command line parser library")
2975 (description "This package provides a parser for command line arguments.")
2976 (license license:asl2.0))))
2977
2978(define-public java-cisd-jhdf5
2979 (let ((revision 39162)
2980 (base-version "14.12.6"))
2981 (package
2982 (name "java-cisd-jhdf5")
2983 (version (string-append base-version "-" (number->string revision)))
2984 (source (origin
2985 (method svn-fetch)
2986 (uri (svn-reference
2987 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2988 "jhdf5/tags/release/"
2989 (version-major+minor base-version)
2990 ".x/" base-version "/jhdf5/"))
2991 (revision revision)))
2992 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2993 (sha256
2994 (base32
2995 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2996 (modules '((guix build utils)))
2997 (snippet
2998 '(begin
2999 ;; Delete included gradle jar
3000 (delete-file-recursively "gradle/wrapper")
3001 ;; Delete pre-built native libraries
3002 (delete-file-recursively "libs")))))
3003 (build-system ant-build-system)
3004 (arguments
3005 `(#:make-flags '("-file" "build/build.xml")
3006 #:build-target "jar-all"
3007 #:test-target "jar-test"
3008 #:phases
3009 (modify-phases %standard-phases
3010 ;; FIXME: this build phase fails.
3011 (delete 'generate-jar-indices)
3012 ;; Don't erase results from the build phase when building tests.
3013 (add-after 'unpack 'separate-test-target-from-clean
3014 (lambda _
3015 (substitute* "build/build.xml"
3016 (("\"jar-test\" depends=\"clean, ")
3017 "\"jar-test\" depends=\""))))
3018 (add-after 'unpack 'unpack-build-resources
3019 (lambda* (#:key inputs #:allow-other-keys)
3020 (copy-recursively (assoc-ref inputs "build-resources")
3021 "../build_resources")
3022 (delete-file-recursively "../build_resources/lib/")
3023 (mkdir-p "../build_resources/lib")
3024 ;; Remove dependency on classycle
3025 (substitute* "../build_resources/ant/build-common.xml"
3026 (("<taskdef name=\"dependency-checker.*") "")
3027 (("classname=\"classycle.*") "")
3028 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3029 ;; Remove dependency on svn
3030 (substitute* "build/build.xml"
3031 (("<build-info.*") "")
3032 (("\\$\\{revision.number\\}")
3033 ,(number->string revision))
3034 (("\\$\\{version.number\\}") ,base-version))))
3035 (add-after 'unpack-build-resources 'fix-dependencies
3036 (lambda* (#:key inputs #:allow-other-keys)
3037 (substitute* "../build_resources/ant/build-common.xml"
3038 (("../libraries/testng/testng-jdk15.jar")
3039 (search-input-file inputs
3040 "/share/java/java-testng.jar")))
3041 (substitute* "build/build.xml"
3042 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3043 (search-input-file inputs
3044 "/share/java/sis-base.jar"))
3045 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3046 (search-input-file inputs
3047 "/share/java/cisd-args4j.jar"))
3048 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3049 (search-input-file inputs
3050 (string-append
3051 "/share/java/commons-lang-"
3052 ,(package-version java-commons-lang)
3053 ".jar")))
3054 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3055 (search-input-file inputs
3056 (string-append
3057 "/lib/m2/commons-io/commons-io/"
3058 ,(package-version java-commons-io)
3059 "/commons-io-"
3060 ,(package-version java-commons-io)
3061 ".jar")))
3062 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3063 (search-input-file inputs
3064 "/share/java/java-testng.jar"))
3065 (("\\$\\{lib\\}/junit4/junit.jar")
3066 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3067 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3068 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3069 "jar$"))))
3070 ;; Remove dependency on ch.rinn.restrictions
3071 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3072 (substitute* '("BitSetConversionUtils.java"
3073 "HDF5Utils.java")
3074 (("import ch.rinn.restrictions.Private;") "")
3075 (("@Private") "")))
3076 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3077 (substitute* '("BitSetConversionTest.java"
3078 "h5ar/HDF5ArchiverTest.java")
3079 (("import ch.rinn.restrictions.Friend;") "")
3080 (("@Friend.*") ""))
3081 ;; Remove leftovers from removing @Friend
3082 (substitute* "h5ar/HDF5ArchiverTest.java"
3083 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3084 "")))))
3085 (add-before 'configure 'build-native-library
3086 (lambda* (#:key inputs #:allow-other-keys)
3087 (let ((jdk (assoc-ref inputs "jdk"))
3088 (hdf5 (assoc-ref inputs "hdf5"))
3089 (dir ,(match (%current-system)
3090 ("i686-linux"
3091 "i386-Linux")
3092 ((or "armhf-linux" "aarch64-linux")
3093 "arm-Linux")
3094 ((or "x86_64-linux")
3095 "amd64-Linux")
3096 (_ "unknown-Linux"))))
3097 (with-directory-excursion "source/c"
3098 (apply invoke `("gcc" "-shared" "-O3"
3099 "-fPIC"
3100 "-Wl,--exclude-libs,ALL"
3101 "-Wno-error=implicit-function-declaration"
3102 ,@(find-files "jhdf5" "\\.c$")
3103 ,@(find-files "hdf-java" "\\.c$")
3104 ,(string-append "-I" hdf5 "/include")
3105 ,(string-append "-I" jdk "/include")
3106 ,(string-append "-I" jdk "/include/linux")
3107 ,(string-append hdf5 "/lib/libhdf5.a")
3108 "-o" "libjhdf5.so" "-lz")))
3109 (install-file "source/c/libjhdf5.so"
3110 (string-append "libs/native/jhdf5/" dir)))))
3111 ;; In the "check" phase we only build the test executable.
3112 (add-after 'check 'run-tests
3113 (lambda _
3114 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3115 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3116 (replace 'install
3117 (install-jars "targets/dist")))))
3118 (inputs
3119 (list java-cisd-base
3120 java-cisd-args4j
3121 java-commons-lang
3122 java-commons-io
3123 hdf5-1.8
3124 zlib))
3125 (native-inputs
3126 `(("jdk" ,icedtea-8)
3127 ("java-testng" ,java-testng)
3128 ("java-junit" ,java-junit)
3129 ("java-jmock" ,java-jmock)
3130 ("java-hamcrest-core" ,java-hamcrest-core)
3131 ("build-resources"
3132 ,(origin
3133 (method svn-fetch)
3134 (uri (svn-reference
3135 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3136 "jhdf5/tags/release/"
3137 (version-major+minor base-version)
3138 ".x/" base-version
3139 "/build_resources/"))
3140 (revision revision)))
3141 (sha256
3142 (base32
3143 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3144 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3145 (synopsis "Java binding for HDF5")
3146 (description "JHDF5 is a high-level API in Java for reading and writing
3147HDF5 files, building on the libraries provided by the HDF Group.")
3148 ;; The C sources are under a non-copyleft license, which looks like a
3149 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3150 (license (list license:asl2.0
3151 (license:non-copyleft "file://source/c/COPYING"))))))
3152
3153(define-public java-classpathx-servletapi
3154 (package
3155 (name "java-classpathx-servletapi")
3156 (version "3.0.1")
3157 (source (origin
3158 (method url-fetch)
3159 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3160 "servletapi-" version ".tar.gz"))
3161 (sha256
3162 (base32
3163 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3164 (build-system ant-build-system)
3165 (arguments
3166 `(#:tests? #f ; there is no test target
3167 #:build-target "compile"
3168 #:make-flags
3169 ,#~(list "-Dbuild.compiler=javac1.8"
3170 (string-append "-Ddist=" #$output))
3171 #:phases
3172 (modify-phases %standard-phases
3173 (replace 'install
3174 (lambda* (#:key make-flags #:allow-other-keys)
3175 (apply invoke `("ant" "dist" ,@make-flags)))))))
3176 (home-page "https://www.gnu.org/software/classpathx/")
3177 (synopsis "Java servlet API implementation")
3178 (description "This is the GNU servlet API distribution, part of the
3179ClasspathX project. It provides implementations of version 3.0 of the servlet
3180API and version 2.1 of the Java ServerPages API.")
3181 (license license:gpl3+)))
3182
3183(define-public java-javaee-servletapi
3184 (package
3185 (name "java-javaee-servletapi")
3186 (version "3.1.0")
3187 (source (origin
3188 (method git-fetch)
3189 (uri (git-reference
3190 (url "https://github.com/javaee/servlet-spec")
3191 (commit version)))
3192 (file-name (git-file-name name version))
3193 (sha256
3194 (base32
3195 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3196 (build-system ant-build-system)
3197 (arguments
3198 `(#:jar-name "javax-servletapi.jar"
3199 ;; no tests
3200 #:tests? #f
3201 #:source-dir "src/main/java"
3202 #:phases
3203 (modify-phases %standard-phases
3204 (add-before 'build 'copy-resources
3205 (lambda _
3206 (mkdir-p "build/classes/javax/servlet/http")
3207 (let ((from-prefix "src/main/java/javax/servlet/")
3208 (to-prefix "build/classes/javax/servlet/"))
3209 (for-each (lambda (f)
3210 (copy-file (string-append from-prefix f)
3211 (string-append to-prefix f)))
3212 (list "LocalStrings_ja.properties"
3213 "LocalStrings.properties"
3214 "LocalStrings_fr.properties"
3215 "http/LocalStrings_es.properties"
3216 "http/LocalStrings_ja.properties"
3217 "http/LocalStrings.properties"
3218 "http/LocalStrings_fr.properties")))
3219 #t)))))
3220 (native-inputs
3221 (list unzip))
3222 (home-page "https://javaee.github.io/servlet-spec/")
3223 (synopsis "Java servlet API")
3224 (description "Java Servlet is the foundation web specification in the
3225Java Enterprise Platform. Developers can build web applications using the
3226Servlet API to interact with the request/response workflow. This project
3227provides information on the continued development of the Java Servlet
3228specification.")
3229 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3230 ;; Some files are licensed under ASL 2.0.
3231 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3232
3233(define-public java-swt
3234 (package
3235 (name "java-swt")
3236 (version "4.7.1a")
3237 (source
3238 ;; The types of many variables and procedures differ in the sources
3239 ;; dependent on whether the target architecture is a 32-bit system or a
3240 ;; 64-bit system. Instead of patching the sources on demand in a build
3241 ;; phase we download either the 32-bit archive (which mostly uses "int"
3242 ;; types) or the 64-bit archive (which mostly uses "long" types).
3243 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3244 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3245 (file32 "x86")
3246 (file64 "x86_64"))
3247 (let-values (((hash file)
3248 (match (or (%current-target-system) (%current-system))
3249 ("x86_64-linux" (values hash64 file64))
3250 (_ (values hash32 file32)))))
3251 (origin
3252 (method url-fetch)
3253 (uri (string-append
3254 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3255 "R-" version "-201710090410/swt-" version
3256 "-gtk-linux-" file ".zip"))
3257 (sha256 (base32 hash))))))
3258 (build-system ant-build-system)
3259 (arguments
3260 `(#:jar-name "swt.jar"
3261 #:jdk ,icedtea-8
3262 #:tests? #f ; no "check" target
3263 #:phases
3264 (modify-phases %standard-phases
3265 (replace 'unpack
3266 (lambda* (#:key source #:allow-other-keys)
3267 (mkdir "swt")
3268 (invoke "unzip" source "-d" "swt")
3269 (chdir "swt")
3270 (mkdir "src")
3271 (invoke "unzip" "src.zip" "-d" "src")))
3272 ;; The classpath contains invalid icecat jars. Since we don't need
3273 ;; anything other than the JDK on the classpath, we can simply unset
3274 ;; it.
3275 (add-after 'configure 'unset-classpath
3276 (lambda _ (unsetenv "CLASSPATH") #t))
3277 (add-before 'build 'build-native
3278 (lambda* (#:key inputs outputs #:allow-other-keys)
3279 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3280 ;; Build shared libraries. Users of SWT have to set the system
3281 ;; property swt.library.path to the "lib" directory of this
3282 ;; package output.
3283 (mkdir-p lib)
3284 (setenv "OUTPUT_DIR" lib)
3285 (setenv "CC" ,(cc-for-target))
3286 (with-directory-excursion "src"
3287 (invoke "bash" "build.sh")))))
3288 (add-after 'install 'install-native
3289 (lambda* (#:key outputs #:allow-other-keys)
3290 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3291 (for-each (lambda (file)
3292 (install-file file lib))
3293 (find-files "." "\\.so$"))
3294 #t))))))
3295 (inputs
3296 `(("gtk" ,gtk+-2)
3297 ("libxtst" ,libxtst)
3298 ("libxt" ,libxt)
3299 ("mesa" ,mesa)
3300 ("glu" ,glu)))
3301 (native-inputs
3302 (list pkg-config unzip))
3303 (home-page "https://www.eclipse.org/swt/")
3304 (synopsis "Widget toolkit for Java")
3305 (description
3306 "SWT is a widget toolkit for Java designed to provide efficient, portable
3307access to the user-interface facilities of the operating systems on which it
3308is implemented.")
3309 ;; SWT code is licensed under EPL1.0
3310 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3311 ;; Cairo bindings contain code under MPL1.1
3312 ;; XULRunner 1.9 bindings contain code under MPL2.0
3313 (license (list
3314 license:epl1.0
3315 license:mpl1.1
3316 license:mpl2.0
3317 license:lgpl2.1+))))
3318
3319;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3320;; of the latest release.
3321(define-public java-qdox-1.12
3322 (package
3323 (name "java-qdox")
3324 (version "1.12.1")
3325 (source (origin
3326 (method url-fetch)
3327 (uri (string-append "https://repo1.maven.org/maven2/"
3328 "com/thoughtworks/qdox/qdox/" version
3329 "/qdox-" version "-sources.jar"))
3330 (sha256
3331 (base32
3332 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3333 (build-system ant-build-system)
3334 (arguments
3335 `(;; Tests require junit
3336 #:tests? #f
3337 #:jar-name "qdox.jar"
3338 #:phases
3339 (modify-phases %standard-phases
3340 (replace 'unpack
3341 (lambda* (#:key source #:allow-other-keys)
3342 (mkdir "src")
3343 (with-directory-excursion "src"
3344 (invoke "jar" "-xf" source))))
3345 ;; At this point we don't have junit, so we must remove the API
3346 ;; tests.
3347 (add-after 'unpack 'delete-tests
3348 (lambda _
3349 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3350 #t)))))
3351 (home-page "https://github.com/codehaus/qdox")
3352 (synopsis "Parse definitions from Java source files")
3353 (description
3354 "QDox is a high speed, small footprint parser for extracting
3355class/interface/method definitions from source files complete with JavaDoc
3356@code{@@tags}. It is designed to be used by active code generators or
3357documentation tools.")
3358 (license license:asl2.0)))
3359
3360(define-public java-qdox
3361 (package
3362 (name "java-qdox")
3363 ; Newer version exists, but this version is required by java-plexus-component-metadata
3364 (version "2.0-M2")
3365 (source (origin
3366 (method url-fetch)
3367 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3368 ;; Older releases at https://github.com/codehaus/qdox/
3369 ;; Note: The release at maven is pre-generated. The release at
3370 ;; github requires jflex.
3371 (uri (string-append "https://repo1.maven.org/maven2/"
3372 "com/thoughtworks/qdox/qdox/" version
3373 "/qdox-" version "-sources.jar"))
3374 (sha256
3375 (base32
3376 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3377 (build-system ant-build-system)
3378 (arguments
3379 `(#:jar-name "qdox.jar"
3380 #:tests? #f; no tests
3381 #:phases
3382 (modify-phases %standard-phases
3383 (add-before 'install 'create-pom
3384 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3385 #:name "QDox"))
3386 (replace 'install
3387 (install-from-pom "pom.xml")))))
3388 (home-page "https://github.com/codehaus/qdox")
3389 (synopsis "Parse definitions from Java source files")
3390 (description "QDox is a high speed, small footprint parser for extracting
3391class/interface/method definitions from source files complete with JavaDoc
3392@code{@@tags}. It is designed to be used by active code generators or
3393documentation tools.")
3394 (license license:asl2.0)))
3395
3396(define-public java-qdox-2-M9
3397 (package
3398 (inherit java-qdox)
3399 (version "2.0-M9"); required by plexus-java
3400 (source (origin
3401 (method url-fetch)
3402 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3403 ;; Older releases at https://github.com/codehaus/qdox/
3404 ;; Note: The release at maven is pre-generated. The release at
3405 ;; github requires jflex.
3406 (uri (string-append "https://repo1.maven.org/maven2/"
3407 "com/thoughtworks/qdox/qdox/" version
3408 "/qdox-" version "-sources.jar"))
3409 (sha256
3410 (base32
3411 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3412 (arguments
3413 (substitute-keyword-arguments (package-arguments java-qdox)
3414 ((#:phases phases)
3415 `(modify-phases ,phases
3416 (replace 'create-pom
3417 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3418 #:name "QDox"))))))))
3419
3420(define-public java-jarjar
3421 (package
3422 (name "java-jarjar")
3423 (version "1.4")
3424 (source (origin
3425 (method url-fetch)
3426 (uri (string-append
3427 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3428 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3429 (sha256
3430 (base32
3431 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3432 (modules '((guix build utils)))
3433 (snippet
3434 '(begin
3435 ;; Delete bundled thirds-party jar archives.
3436 (delete-file-recursively "lib")
3437 (delete-file "src/test/enumtest.jar")
3438 ;; the CLASSPATH needs this directory, create an empty one
3439 (mkdir-p "lib")
3440 #t))))
3441 (build-system ant-build-system)
3442 (arguments
3443 `(;; Tests require junit, which ultimately depends on this package.
3444 #:tests? #f
3445 #:build-target "jar"
3446 #:phases
3447 (modify-phases %standard-phases
3448 (add-before 'build 'do-not-use-bundled-asm
3449 (lambda* (#:key inputs #:allow-other-keys)
3450 (substitute* "build.xml"
3451 (("<path id=\"path.build\">")
3452 (string-append "<path id=\"path.build\"><fileset dir=\""
3453 (assoc-ref inputs "java-asm-bootstrap")
3454 "/lib/m2\" includes=\"**/*.jar\"/>"))
3455 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3456 (("lib/asm-commons-4.0.jar")
3457 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3458 "asm-6.0.jar")))
3459 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3460 (string-append "<include name=\"org/objectweb/asm/"
3461 "commons/Remap*.class\"/>"
3462 "<include name=\"org/objectweb/asm/*.class\"/>"
3463 "<include name=\"org/objectweb/asm/"
3464 "signature/*.class\"/>"
3465 "<include name=\"org/objectweb/asm/"
3466 "commons/SignatureRemapper.class\"/>")))
3467 #t))
3468 (add-before 'build 'remove-maven-dependency
3469 (lambda _
3470 ;; We do not need to build jarjar as a maven plugin just yet, so
3471 ;; remove this file. Maven requires jarjar (but not that plugin),
3472 ;; so removing it improves the bootstrap.
3473 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3474 #t))
3475 (replace 'install
3476 (lambda* (#:key outputs #:allow-other-keys)
3477 (let ((target (string-append (assoc-ref outputs "out")
3478 "/share/java")))
3479 (install-file (string-append "dist/jarjar-" ,version ".jar")
3480 target))
3481 #t)))))
3482 (inputs
3483 (list java-asm-bootstrap))
3484 (native-inputs
3485 (list unzip))
3486 (home-page "https://code.google.com/archive/p/jarjar/")
3487 (synopsis "Repackage Java libraries")
3488 (description
3489 "Jar Jar Links is a utility that makes it easy to repackage Java
3490libraries and embed them into your own distribution. Jar Jar Links includes
3491an Ant task that extends the built-in @code{jar} task.")
3492 (license license:asl2.0)))
3493
3494(define-public java-hamcrest
3495 (package
3496 (name "java-hamcrest")
3497 (version "3.0")
3498 (source (origin
3499 (method git-fetch)
3500 (uri (git-reference
3501 (url "https://github.com/hamcrest/JavaHamcrest/")
3502 (commit (string-append "v" version))))
3503 (file-name (git-file-name name version))
3504 (sha256
3505 (base32
3506 "07cagv2ncs4y02fmwbll3r4rqpjf3zxs163ync24q3x9fplrxmly"))))
3507 (build-system ant-build-system)
3508 (arguments
3509 `(#:tests? #f ; Tests require junit
3510 #:source-dir "hamcrest/src/main"
3511 #:jar-name "hamcrest.jar"))
3512 (home-page "https://hamcrest.org/")
3513 (synopsis "Library of matchers for building test expressions")
3514 (description
3515 "This package provides a library of matcher objects (also known as
3516constraints or predicates) allowing @code{match} rules to be defined
3517declaratively, to be used in other frameworks. Typical scenarios include
3518testing frameworks, mocking libraries and UI validation rules.")
3519 (license license:bsd-3)))
3520
3521(define-public java-hamcrest-core
3522 (package
3523 (name "java-hamcrest-core")
3524 (version "1.3")
3525 (properties `((superseded . ,java-hamcrest)))
3526 (source (origin
3527 (method git-fetch)
3528 (uri (git-reference
3529 (url "https://github.com/hamcrest/JavaHamcrest/")
3530 (commit (string-append "hamcrest-java-" version))))
3531 (file-name (git-file-name name version))
3532 (sha256
3533 (base32
3534 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3535 (modules '((guix build utils)))
3536 (snippet
3537 '(begin
3538 ;; Delete bundled thirds-party jar archives.
3539 (delete-file-recursively "lib")
3540 #t))))
3541 (build-system ant-build-system)
3542 (arguments
3543 `(#:tests? #f ; Tests require junit
3544 #:modules ((guix build ant-build-system)
3545 (guix build java-utils)
3546 (guix build utils)
3547 (srfi srfi-1))
3548 #:make-flags (list (string-append "-Dversion=" ,version))
3549 #:test-target "unit-test"
3550 #:build-target "core"
3551 #:phases
3552 (modify-phases %standard-phases
3553 ;; Disable unit tests, because they require junit, which requires
3554 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3555 ;; attribute from the manifest for reproducibility.
3556 (add-before 'configure 'patch-build.xml
3557 (lambda _
3558 (substitute* "build.xml"
3559 (("unit-test, ") "")
3560 (("\\$\\{build.timestamp\\}") "guix"))
3561 #t))
3562 ;; Java's "getMethods()" returns methods in an unpredictable order.
3563 ;; To make the output of the generated code deterministic we must
3564 ;; sort the array of methods.
3565 (add-after 'unpack 'make-method-order-deterministic
3566 (lambda _
3567 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3568 (("import java\\.util\\.Iterator;" line)
3569 (string-append line "\n"
3570 "import java.util.Arrays; import java.util.Comparator;"))
3571 (("allMethods = cls\\.getMethods\\(\\);" line)
3572 (string-append "_" line
3573 "
3574private Method[] getSortedMethods() {
3575 Arrays.sort(_allMethods, new Comparator<Method>() {
3576 @Override
3577 public int compare(Method a, Method b) {
3578 return a.toString().compareTo(b.toString());
3579 }
3580 });
3581 return _allMethods;
3582}
3583
3584private Method[] allMethods = getSortedMethods();")))
3585 #t))
3586 (add-before 'build 'do-not-use-bundled-qdox
3587 (lambda* (#:key inputs #:allow-other-keys)
3588 (substitute* "build.xml"
3589 (("lib/generator/qdox-1.12.jar")
3590 (string-append (assoc-ref inputs "java-qdox-1.12")
3591 "/share/java/qdox.jar")))
3592 #t))
3593 ;; build.xml searches for .jar files in this directoy, which
3594 ;; we remove from the source archive.
3595 (add-before 'build 'create-dummy-directories
3596 (lambda _
3597 (mkdir-p "lib/integration")
3598 #t))
3599 (add-before 'build 'create-pom
3600 (lambda _
3601 (substitute* "pom/hamcrest-core.pom"
3602 (("@VERSION@") ,version))
3603 #t))
3604 (replace 'install
3605 (install-from-pom "pom/hamcrest-core.pom")))))
3606 (native-inputs
3607 `(("java-qdox-1.12" ,java-qdox-1.12)
3608 ("java-jarjar" ,java-jarjar)))
3609 (propagated-inputs
3610 (list java-hamcrest-parent-pom))
3611 (home-page "https://hamcrest.org/")
3612 (synopsis "Library of matchers for building test expressions")
3613 (description
3614 "This package provides a library of matcher objects (also known as
3615constraints or predicates) allowing @code{match} rules to be defined
3616declaratively, to be used in other frameworks. Typical scenarios include
3617testing frameworks, mocking libraries and UI validation rules.")
3618 (license license:bsd-2)))
3619
3620(define-public java-hamcrest-parent-pom
3621 (package
3622 (inherit java-hamcrest-core)
3623 (properties '((hidden? . #t)))
3624 (name "java-hamcrest-parent-pom")
3625 (propagated-inputs '())
3626 (native-inputs '())
3627 (arguments
3628 `(#:tests? #f
3629 #:phases
3630 (modify-phases %standard-phases
3631 (delete 'configure)
3632 (replace 'build
3633 (lambda _
3634 (substitute* "pom/hamcrest-parent.pom"
3635 (("@VERSION@") ,(package-version java-hamcrest-core)))
3636 #t))
3637 (replace 'install
3638 (install-pom-file "pom/hamcrest-parent.pom")))))))
3639
3640(define-public java-hamcrest-library
3641 (package
3642 (inherit java-hamcrest-core)
3643 (name "java-hamcrest-library")
3644 (properties `((superseded . ,java-hamcrest)))
3645 (arguments
3646 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3647 ((#:build-target _) "library")
3648 ((#:phases phases)
3649 `(modify-phases ,phases
3650 (add-after 'unpack 'patch-classpath-for-integration
3651 (lambda* (#:key inputs #:allow-other-keys)
3652 (substitute* "build.xml"
3653 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3654 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3655 "jar$"))))
3656 #t))
3657 (replace 'create-pom
3658 (lambda _
3659 (substitute* "pom/hamcrest-library.pom"
3660 (("@VERSION@") ,(package-version java-hamcrest-core)))
3661 #t))
3662 (replace 'install
3663 (install-from-pom "pom/hamcrest-library.pom"))))))
3664 (propagated-inputs
3665 (list java-hamcrest-core java-hamcrest-parent-pom))))
3666
3667(define-public java-junit
3668 (package
3669 (name "java-junit")
3670 (version "4.12")
3671 (source (origin
3672 (method git-fetch)
3673 (uri (git-reference
3674 (url "https://github.com/junit-team/junit/")
3675 (commit (string-append "r" version))))
3676 (file-name (git-file-name name version))
3677 (sha256
3678 (base32
3679 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3680 (modules '((guix build utils)))
3681 (snippet
3682 '(begin
3683 ;; Delete bundled jar archives.
3684 (delete-file-recursively "lib")
3685 #t))))
3686 (build-system ant-build-system)
3687 (arguments
3688 `(#:jar-name "junit.jar"
3689 #:source-dir "src/main/java"
3690 #:test-dir "src/test"
3691 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3692 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3693 #:phases
3694 (modify-phases %standard-phases
3695 (add-before 'check 'copy-test-resources
3696 (lambda _
3697 (copy-recursively "src/test/resources" "build/test-classes")
3698 #t))
3699 (replace 'install
3700 (install-from-pom "pom.xml")))))
3701 (propagated-inputs
3702 (list java-hamcrest-core))
3703 (native-inputs
3704 (list java-hamcrest-library))
3705 (home-page "https://junit.org/junit4/")
3706 (synopsis "Test framework for Java")
3707 (description
3708 "JUnit is a simple framework to write repeatable tests for Java projects.
3709JUnit provides assertions for testing expected results, test fixtures for
3710sharing common test data, and test runners for running tests.")
3711 (license license:epl1.0)))
3712
3713(define-public java-junitparams
3714 (package
3715 (name "java-junitparams")
3716 (version "1.1.1")
3717 (source (origin
3718 (method git-fetch)
3719 (uri (git-reference
3720 (url "https://github.com/Pragmatists/JUnitParams")
3721 (commit (string-append "JUnitParams-" version))))
3722 (file-name (git-file-name name version))
3723 (sha256
3724 (base32
3725 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3726 (build-system ant-build-system)
3727 (arguments
3728 `(#:jar-name "junitparams.jar"
3729 #:source-dir "src/main/java"
3730 #:test-dir "src/test"
3731 #:test-exclude (list "**/SuperclassTest.java")))
3732 (inputs
3733 (list java-junit))
3734 (native-inputs
3735 (list java-junit java-hamcrest-core java-assertj))
3736 (home-page "https://github.com/Pragmatists/JUnitParams")
3737 (synopsis "Parameterised test support for JUnit")
3738 (description "The JUnitParams project adds a new runner to JUnit and
3739provides much easier and readable parametrised tests for JUnit.")
3740 (license license:asl2.0)))
3741
3742(define-public java-plexus-utils
3743 (package
3744 (name "java-plexus-utils")
3745 (version "3.3.0")
3746 (source (origin
3747 (method git-fetch)
3748 (uri (git-reference
3749 (url "https://github.com/codehaus-plexus/plexus-utils")
3750 (commit (string-append "plexus-utils-" version))))
3751 (file-name (git-file-name name version))
3752 (sha256
3753 (base32
3754 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3755 (build-system ant-build-system)
3756 ;; FIXME: The default build.xml does not include a target to install
3757 ;; javadoc files.
3758 (arguments
3759 `(#:jar-name "plexus-utils.jar"
3760 #:source-dir "src/main"
3761 #:phases
3762 (modify-phases %standard-phases
3763 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3764 (lambda _
3765 (substitute* "src/main/java/org/codehaus/plexus/util/\
3766cli/shell/BourneShell.java"
3767 (("/bin/sh") (which "sh"))
3768 (("/usr/") (getcwd)))
3769 #t))
3770 (add-after 'unpack 'fix-or-disable-broken-tests
3771 (lambda _
3772 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3773 (substitute* '("cli/CommandlineTest.java"
3774 "cli/shell/BourneShellTest.java")
3775 (("/bin/sh") (which "sh"))
3776 (("/bin/echo") (which "echo")))
3777
3778 ;; This test depends on MavenProjectStub, but we don't have
3779 ;; a package for Maven.
3780 (delete-file "introspection/ReflectionValueExtractorTest.java")
3781
3782 ;; FIXME: The command line tests fail, maybe because they use
3783 ;; absolute paths.
3784 (delete-file "cli/CommandlineTest.java")
3785
3786 ;; These tests require openjdk jmh, which is not packaged yet
3787 (for-each delete-file (find-files "." "PerfTest.java$")))
3788 #t))
3789 (add-before 'build 'copy-resources
3790 (lambda _
3791 (copy-recursively "src/main/resources" "build/classes")
3792 #t))
3793 (replace 'install (install-from-pom "pom.xml")))))
3794 (native-inputs
3795 (list java-hamcrest-core java-junit))
3796 (propagated-inputs
3797 (list plexus-parent-pom-5.1))
3798 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3799 (synopsis "Common utilities for the Plexus framework")
3800 (description "This package provides various Java utility classes for the
3801Plexus framework to ease working with strings, files, command lines, XML and
3802more.")
3803 (license license:asl2.0)))
3804
3805(define-public java-plexus-utils-3.2.1
3806 (package
3807 (inherit java-plexus-utils)
3808 ;; plexus-build-api needs this version, later versions don't work
3809 (version "3.2.1")
3810 (source (origin
3811 (method git-fetch)
3812 (uri (git-reference
3813 (url "https://github.com/codehaus-plexus/plexus-utils")
3814 (commit (string-append "plexus-utils-" version))))
3815 (file-name (git-file-name "java-plexus-utils" version))
3816 (sha256
3817 (base32
3818 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3819
3820(define-public java-plexus-interpolation
3821 (package
3822 (name "java-plexus-interpolation")
3823 (version "1.26")
3824 (source (origin
3825 (method git-fetch)
3826 (uri (git-reference
3827 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3828 (commit (string-append "plexus-interpolation-" version))))
3829 (file-name (git-file-name name version))
3830 (sha256
3831 (base32
3832 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3833 (build-system ant-build-system)
3834 (arguments
3835 `(#:jar-name "plexus-interpolation.jar"
3836 #:source-dir "src/main"
3837 #:phases
3838 (modify-phases %standard-phases
3839 (replace 'install (install-from-pom "pom.xml")))))
3840 (propagated-inputs
3841 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3842 (native-inputs
3843 (list java-junit java-hamcrest-core))
3844 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3845 (synopsis "Java components for interpolating ${} strings and the like")
3846 (description "Plexus interpolator is a modular, flexible interpolation
3847framework for the expression language style commonly seen in Maven, Plexus,
3848and other related projects.
3849
3850It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3851package within @code{plexus-utils}, but has been separated in order to allow
3852these two libraries to vary independently of one another.")
3853 (license license:asl2.0)))
3854
3855(define-public java-plexus-classworlds
3856 (package
3857 (name "java-plexus-classworlds")
3858 (version "2.6.0")
3859 (source (origin
3860 (method git-fetch)
3861 (uri (git-reference
3862 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3863 (commit (string-append "plexus-classworlds-" version))))
3864 (file-name (git-file-name name version))
3865 (sha256
3866 (base32
3867 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3868 (build-system ant-build-system)
3869 (arguments
3870 `(#:jar-name "plexus-classworlds.jar"
3871 #:source-dir "src/main"
3872 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3873 #:phases
3874 (modify-phases %standard-phases
3875 (replace 'install (install-from-pom "pom.xml")))))
3876 (propagated-inputs
3877 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3878 (native-inputs
3879 (list java-junit))
3880 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3881 (synopsis "Java class loader framework")
3882 (description "Plexus classworlds replaces the native @code{ClassLoader}
3883mechanism of Java. It is especially useful for dynamic loading of application
3884components.")
3885 (license license:asl2.0)))
3886
3887(define-public java-plexus-container-default-bootstrap
3888 (package
3889 (name "java-plexus-container-default-bootstrap")
3890 (version "2.1.0")
3891 (source (origin
3892 (method git-fetch)
3893 (uri (git-reference
3894 (url "https://github.com/codehaus-plexus/plexus-containers")
3895 (commit (string-append "plexus-containers-" version))))
3896 (file-name (git-file-name name version))
3897 (sha256
3898 (base32
3899 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
3900 (build-system ant-build-system)
3901 (arguments
3902 `(#:jar-name "container-default.jar"
3903 #:source-dir "plexus-container-default/src/main/java"
3904 #:test-dir "plexus-container-default/src/test"
3905 #:tests? #f; requires plexus-archiver, which depends on this package
3906 #:phases
3907 (modify-phases %standard-phases
3908 (add-before 'build 'fix-google-collections
3909 (lambda _
3910 ;; Google collections are now replaced with guava
3911 (substitute* "plexus-container-default/pom.xml"
3912 (("google-collections") "guava")
3913 (("com.google.collections") "com.google.guava"))
3914 #t))
3915 (add-before 'build 'copy-resources
3916 (lambda _
3917 (copy-recursively
3918 "plexus-container-default/src/main/resources/"
3919 "build/classes")
3920 #t))
3921 (replace 'install
3922 (install-from-pom "plexus-container-default/pom.xml")))))
3923 (propagated-inputs
3924 `(("java-plexus-worldclass" ,java-plexus-classworlds)
3925 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3926 ("java-plexus-utils" ,java-plexus-utils)
3927 ("java-junit" ,java-junit)
3928 ("java-guava" ,java-guava)
3929 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3930 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3931 (synopsis "Inversion-of-control container")
3932 (description "Plexus-default-container is Plexus' inversion-of-control
3933(@dfn{IoC}) container. It is composed of its public API and its default
3934implementation.")
3935 (properties '((hidden? . #t))) ;for bootstrapping purposes only
3936 (license license:asl2.0)))
3937
3938(define java-plexus-containers-parent-pom
3939 (package
3940 (inherit java-plexus-container-default-bootstrap)
3941 (name "java-plexus-containers-parent-pom")
3942 (arguments
3943 `(#:tests? #f
3944 #:phases
3945 (modify-phases %standard-phases
3946 (delete 'configure)
3947 (delete 'build)
3948 (replace 'install
3949 (install-pom-file "pom.xml")))))
3950 (propagated-inputs
3951 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3952
3953(define-public java-plexus-io
3954 (package
3955 (name "java-plexus-io")
3956 (version "3.2.0")
3957 (source (origin
3958 (method git-fetch)
3959 (uri (git-reference
3960 (url "https://github.com/codehaus-plexus/plexus-io")
3961 (commit (string-append "plexus-io-" version))))
3962 (file-name (git-file-name name version))
3963 (sha256
3964 (base32
3965 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
3966 (build-system ant-build-system)
3967 (arguments
3968 `(#:jar-name "plexus-io.jar"
3969 #:source-dir "src/main/java"
3970 #:test-dir "src/test"
3971 #:phases
3972 (modify-phases %standard-phases
3973 (add-before 'build 'copy-resources
3974 (lambda _
3975 (mkdir-p "build/classes")
3976 (copy-recursively "src/main/resources" "build/classes")
3977 (mkdir-p "build/test-classes")
3978 (copy-recursively "src/test/resources" "build/test-classes")
3979 #t))
3980 (replace 'install (install-from-pom "pom.xml")))))
3981 (propagated-inputs
3982 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
3983 (inputs
3984 (list java-jsr305))
3985 (native-inputs
3986 `(("junit" ,java-junit)
3987 ("hamcrest" ,java-hamcrest-core)
3988 ("guava" ,java-guava)
3989 ("classworlds" ,java-plexus-classworlds)
3990 ("xbean" ,java-geronimo-xbean-reflect)
3991 ("container-default" ,java-plexus-container-default-bootstrap)))
3992 (home-page "https://github.com/codehaus-plexus/plexus-io")
3993 (synopsis "I/O plexus components")
3994 (description "Plexus IO is a set of plexus components, which are designed
3995for use in I/O operations. This implementation using plexus components allows
3996reusing it in maven.")
3997 (license license:asl2.0)))
3998
3999(define-public java-plexus-archiver
4000 (package
4001 (name "java-plexus-archiver")
4002 (version "4.2.2")
4003 (source (origin
4004 (method url-fetch)
4005 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4006 "/archive/plexus-archiver-" version ".tar.gz"))
4007 (sha256
4008 (base32
4009 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4010 (build-system ant-build-system)
4011 (arguments
4012 `(#:jar-name "plexus-archiver.jar"
4013 #:source-dir "src/main/java"
4014 #:test-dir "src/test"
4015 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4016 #:phases
4017 (modify-phases %standard-phases
4018 (add-before 'check 'remove-failing
4019 (lambda _
4020 ;; Requires an older version of plexus container
4021 (delete-file
4022 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4023 #t))
4024 (add-before 'check 'fix-test-building
4025 (lambda _
4026 (substitute* "build.xml"
4027 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4028 #t))
4029 (add-before 'build 'copy-resources
4030 (lambda _
4031 (mkdir-p "build/classes")
4032 (copy-recursively "src/main/resources" "build/classes")
4033 (mkdir-p "build/test-classes")
4034 (copy-recursively "src/test/resources" "build/test-classes")
4035 #t))
4036 (replace 'install (install-from-pom "pom.xml")))))
4037 (propagated-inputs
4038 (list java-plexus-utils java-plexus-io java-iq80-snappy
4039 java-commons-compress-1.21 plexus-parent-pom-6.1))
4040 (inputs
4041 `(("java-jsr305" ,java-jsr305)
4042 ("java-plexus-container-default"
4043 ,java-plexus-container-default-bootstrap)))
4044 (native-inputs
4045 `(("java-hamcrest-core" ,java-hamcrest-core)
4046 ("junit" ,java-junit)
4047 ("classworld" ,java-plexus-classworlds)
4048 ("xbean" ,java-geronimo-xbean-reflect)
4049 ("xz" ,java-xz)
4050 ("guava" ,java-guava)))
4051 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4052 (synopsis "Archiver component of the Plexus project")
4053 (description "Plexus-archiver contains a component to deal with project
4054archives (jar).")
4055 (license license:asl2.0)))
4056
4057(define-public java-plexus-container-default
4058 (package
4059 (inherit java-plexus-container-default-bootstrap)
4060 (name "java-plexus-container-default")
4061 (arguments
4062 `(#:jar-name "container-default.jar"
4063 #:source-dir "plexus-container-default/src/main/java"
4064 #:test-dir "plexus-container-default/src/test"
4065 #:test-exclude (list ;"**/*Test.java"
4066 "**/Abstract*.java"
4067 ;; Requires plexus-hierarchy
4068 "**/PlexusHierarchyTest.java"
4069 ;; Failures
4070 "**/ComponentRealmCompositionTest.java"
4071 "**/PlexusContainerTest.java")
4072 #:phases
4073 (modify-phases %standard-phases
4074 (add-before 'build 'fix-google-collections
4075 (lambda _
4076 ;; Google collections are now replaced with guava
4077 (substitute* "plexus-container-default/pom.xml"
4078 (("google-collections") "guava")
4079 (("com.google.collections") "com.google.guava"))
4080 #t))
4081 (add-before 'build 'copy-resources
4082 (lambda _
4083 (copy-recursively
4084 "plexus-container-default/src/main/resources/"
4085 "build/classes")
4086 #t))
4087 (add-before 'check 'fix-paths
4088 (lambda _
4089 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4090 (substitute*
4091 (string-append
4092 dir "/plexus/component/composition/"
4093 "ComponentRealmCompositionTest.java")
4094 (("src/test") "plexus-container-default/src/test"))
4095 #t)))
4096 (replace 'install
4097 (install-from-pom "plexus-container-default/pom.xml")))))
4098 (inputs
4099 `(("worldclass" ,java-plexus-classworlds)
4100 ("xbean" ,java-geronimo-xbean-reflect)
4101 ("utils" ,java-plexus-utils)
4102 ("junit" ,java-junit)
4103 ("guava" ,java-guava)))
4104 (native-inputs
4105 `(("archiver" ,java-plexus-archiver)
4106 ("hamcrest" ,java-hamcrest-core)))
4107 (properties
4108 (alist-delete
4109 'hidden?
4110 (package-properties java-plexus-container-default-bootstrap)))))
4111
4112(define-public java-plexus-component-annotations
4113 (package
4114 (inherit java-plexus-container-default)
4115 (name "java-plexus-component-annotations")
4116 (arguments
4117 `(#:jar-name "plexus-component-annotations.jar"
4118 #:source-dir "plexus-component-annotations/src/main/java"
4119 #:tests? #f; no tests
4120 #:phases
4121 (modify-phases %standard-phases
4122 (replace 'install
4123 (install-from-pom "plexus-component-annotations/pom.xml")))))
4124 (propagated-inputs
4125 (list java-plexus-containers-parent-pom))
4126 (inputs '())
4127 (native-inputs '())
4128 (synopsis "Plexus descriptors generator")
4129 (description "This package is a Maven plugin to generate Plexus descriptors
4130from source tags and class annotations.")))
4131
4132(define-public java-plexus-component-metadata
4133 (package
4134 (inherit java-plexus-container-default)
4135 (name "java-plexus-component-metadata")
4136 (arguments
4137 `(#:jar-name "plexus-component-metadata.jar"
4138 #:source-dir "src/main/java"
4139 #:test-dir "src/test"
4140 #:jdk ,icedtea-8
4141 #:phases
4142 (modify-phases %standard-phases
4143 (add-before 'configure 'chdir
4144 (lambda _
4145 (chdir "plexus-component-metadata")
4146 #t))
4147 (add-before 'build 'copy-resources
4148 (lambda _
4149 (copy-recursively "src/main/resources"
4150 "build/classes/")
4151 #t))
4152 (add-before 'build 'fix-jdom
4153 (lambda _
4154 ;; The newer version of jdom now sets multiple features by default
4155 ;; that are not supported.
4156 ;; Skip these features
4157 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4158 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4159 "// skip"))))
4160 (add-before 'build 'reinstate-cli
4161 ;; The CLI was removed in 2.1.0, but we still need it to build some
4162 ;; maven dependencies, and some parts of maven itself. We can't use
4163 ;; the maven plugin for that yet.
4164 (lambda _
4165 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4166 (lambda _
4167 ;; Copied from a previous version of this package.
4168 (display "package org.codehaus.plexus.metadata;
4169
4170import java.io.File;
4171import java.util.Arrays;
4172import java.util.Collections;
4173
4174import org.apache.commons.cli.CommandLine;
4175import org.apache.commons.cli.OptionBuilder;
4176import org.apache.commons.cli.Options;
4177import org.codehaus.plexus.PlexusContainer;
4178import org.codehaus.plexus.tools.cli.AbstractCli;
4179
4180public class PlexusMetadataGeneratorCli
4181 extends AbstractCli
4182{
4183 public static final char SOURCE_DIRECTORY = 's';
4184 public static final char SOURCE_ENCODING = 'e';
4185 public static final char CLASSES_DIRECTORY = 'c';
4186 public static final char OUTPUT_FILE = 'o';
4187 public static final char DESCRIPTORS_DIRECTORY = 'm';
4188
4189 public static void main( String[] args )
4190 throws Exception
4191 {
4192 new PlexusMetadataGeneratorCli().execute( args );
4193 }
4194
4195 @Override
4196 public String getPomPropertiesPath()
4197 {
4198 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4199 }
4200
4201 @Override
4202 @SuppressWarnings(\"static-access\")
4203 public Options buildCliOptions( Options options )
4204 {
4205 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4206 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4207 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4208 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4209 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4210 return options;
4211 }
4212
4213 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4214 throws Exception
4215 {
4216 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4217
4218 MetadataGenerationRequest request = new MetadataGenerationRequest();
4219 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4220 request.classpath = Collections.emptyList();
4221 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4222 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4223 request.useContextClassLoader = true;
4224 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4225 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4226
4227 metadataGenerator.generateDescriptor( request );
4228 }
4229}")))))
4230 (add-before 'check 'fix-test-location
4231 (lambda _
4232 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4233 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4234 (("target") "build")))))))
4235 (propagated-inputs
4236 `(("java-plexus-container-default" ,java-plexus-container-default)
4237 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4238 ("java-plexus-utils" ,java-plexus-utils)
4239 ("java-plexus-cli" ,java-plexus-cli)
4240 ("java-plexus-classworlds" ,java-plexus-classworlds)
4241 ("maven-plugin-api" ,maven-plugin-api)
4242 ("maven-plugin-annotations" ,maven-plugin-annotations)
4243 ("maven-core-bootstrap" ,maven-core-bootstrap)
4244 ("maven-model" ,maven-model)
4245 ("java-commons-cli" ,java-commons-cli)
4246 ("java-qdox" ,java-qdox)
4247 ("java-jdom2" ,java-jdom2)
4248 ("java-asm-8" ,java-asm-8)))
4249 (native-inputs
4250 (list java-junit java-guava java-geronimo-xbean-reflect))
4251 (synopsis "Inversion-of-control container for Maven")
4252 (description "The Plexus project provides a full software stack for creating
4253and executing software projects. Based on the Plexus container, the
4254applications can utilise component-oriented programming to build modular,
4255reusable components that can easily be assembled and reused. This package
4256provides the Maven plugin generating the component metadata.")))
4257
4258(define-public java-plexus-container-default-1.7
4259 (package
4260 (inherit java-plexus-container-default)
4261 (version "1.7.1")
4262 (source (origin
4263 (method git-fetch)
4264 (uri (git-reference
4265 (url "https://github.com/codehaus-plexus/plexus-containers")
4266 (commit (string-append "plexus-containers-" version))))
4267 (file-name (git-file-name "java-plexus-container-default" version))
4268 (sha256
4269 (base32
4270 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4271
4272(define java-plexus-containers-parent-pom-1.7
4273 (package
4274 (inherit java-plexus-container-default-1.7)
4275 (name "java-plexus-containers-parent-pom")
4276 (arguments
4277 `(#:tests? #f
4278 #:phases
4279 (modify-phases %standard-phases
4280 (delete 'configure)
4281 (delete 'build)
4282 (replace 'install
4283 (install-pom-file "pom.xml")))))
4284 (propagated-inputs
4285 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4286
4287(define-public java-plexus-component-annotations-1.7
4288 (package
4289 (inherit java-plexus-container-default-1.7)
4290 (name "java-plexus-component-annotations")
4291 (arguments
4292 `(#:jar-name "plexus-component-annotations.jar"
4293 #:source-dir "plexus-component-annotations/src/main/java"
4294 #:tests? #f; no tests
4295 #:phases
4296 (modify-phases %standard-phases
4297 (replace 'install
4298 (install-from-pom "plexus-component-annotations/pom.xml")))))
4299 (propagated-inputs
4300 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4301 (inputs '())
4302 (native-inputs '())
4303 (synopsis "Plexus descriptors generator")
4304 (description "This package is a Maven plugin to generate Plexus descriptors
4305from source tags and class annotations.")))
4306
4307(define-public java-plexus-component-metadata-1.7
4308 (package
4309 (inherit java-plexus-container-default-1.7)
4310 (name "java-plexus-component-metadata")
4311 (arguments
4312 `(#:jar-name "plexus-component-metadata.jar"
4313 #:source-dir "src/main/java"
4314 #:test-dir "src/test"
4315 #:phases
4316 (modify-phases %standard-phases
4317 (add-before 'configure 'chdir
4318 (lambda _
4319 (chdir "plexus-component-metadata")
4320 #t))
4321 (add-before 'build 'copy-resources
4322 (lambda _
4323 (copy-recursively "src/main/resources"
4324 "build/classes/")
4325 #t))
4326 (add-before 'build 'fix-jdom
4327 (lambda _
4328 ;; The newer version of jdom now sets multiple features by default
4329 ;; that are not supported.
4330 ;; Skip these features
4331 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4332 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4333 "// skip"))))
4334 (add-before 'check 'fix-test-location
4335 (lambda _
4336 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4337 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4338 (("target") "build")))))))
4339 (propagated-inputs
4340 (list java-plexus-container-default-1.7
4341 java-plexus-component-annotations-1.7
4342 java-plexus-utils
4343 java-plexus-cli
4344 java-plexus-cli
4345 java-plexus-classworlds
4346 maven-plugin-api
4347 maven-plugin-annotations
4348 maven-core-bootstrap
4349 maven-model
4350 java-commons-cli
4351 java-qdox
4352 java-jdom2
4353 java-asm-8))
4354 (native-inputs
4355 (list java-junit java-guava java-geronimo-xbean-reflect))
4356 (synopsis "Inversion-of-control container for Maven")
4357 (description "The Plexus project provides a full software stack for creating
4358and executing software projects. Based on the Plexus container, the
4359applications can utilise component-oriented programming to build modular,
4360reusable components that can easily be assembled and reused. This package
4361provides the Maven plugin generating the component metadata.")))
4362
4363(define-public java-plexus-cipher
4364 (package
4365 (name "java-plexus-cipher")
4366 (version "2.0")
4367 (source (origin
4368 (method git-fetch)
4369 (uri (git-reference
4370 (url "https://github.com/codehaus-plexus/plexus-cipher")
4371 (commit (string-append "plexus-cipher-" version))))
4372 (file-name (git-file-name name version))
4373 (sha256
4374 (base32
4375 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4376 (build-system ant-build-system)
4377 (arguments
4378 `(#:jar-name "plexus-cipher.jar"
4379 #:source-dir "src/main/java"
4380 #:phases
4381 (modify-phases %standard-phases
4382 (add-before 'build 'generate-javax.inject.Named
4383 (lambda _
4384 (mkdir-p "build/classes/META-INF/sisu")
4385 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4386 (lambda _
4387 (display
4388 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4389 #t))
4390 (replace 'install (install-from-pom "pom.xml")))))
4391 (inputs
4392 `(("java-cdi-api" ,java-cdi-api)
4393 ("java-javax-inject" ,java-javax-inject)))
4394 (propagated-inputs
4395 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4396 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4397 (native-inputs
4398 `(("java-junit" ,java-junit)))
4399 (home-page "https://github.com/sonatype/plexus-cipher")
4400 (synopsis "Encryption/decryption Component")
4401 (description "Plexus-cipher contains a component to deal with encryption
4402and decryption.")
4403 (license license:asl2.0)))
4404
4405(define-public java-plexus-cipher-1.7
4406 (package
4407 (inherit java-plexus-cipher)
4408 (version "1.7")
4409 (source (origin
4410 (method git-fetch)
4411 (uri (git-reference
4412 (url "https://github.com/codehaus-plexus/plexus-cipher")
4413 (commit (string-append "plexus-cipher-" version))))
4414 (file-name (git-file-name "java-plexus-cipher" version))
4415 (sha256
4416 (base32
4417 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4418 (arguments
4419 `(#:jar-name "plexus-cipher.jar"
4420 #:source-dir "src/main/java"
4421 #:tests? #f; FIXME: requires sisu-inject-bean
4422 #:phases
4423 (modify-phases %standard-phases
4424 (add-before 'build 'copy-resources
4425 (lambda _
4426 (copy-recursively "src/main/resources" "build/classes")
4427 (mkdir-p "build/classes/META-INF/sisu")
4428 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4429 (lambda _
4430 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4431 #t))
4432 (add-before 'install 'fix-test-dependency
4433 (lambda _
4434 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4435 (substitute* "pom.xml"
4436 (("provided") "test"))
4437 #t))
4438 (replace 'install (install-from-pom "pom.xml")))))
4439 (propagated-inputs
4440 (list java-sonatype-spice-parent-pom-15))))
4441
4442(define-public java-plexus-java
4443 (package
4444 (name "java-plexus-java")
4445 (version "0.9.10")
4446 (source (origin
4447 (method git-fetch)
4448 (uri (git-reference
4449 (url "https://github.com/codehaus-plexus/plexus-languages")
4450 (commit (string-append "plexus-languages-" version))))
4451 (file-name (git-file-name name version))
4452 (sha256
4453 (base32
4454 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4455 (modules '((guix build utils)))
4456 (snippet
4457 `(begin
4458 (for-each delete-file (find-files "." ".*.jar$"))
4459 #t))))
4460 (build-system ant-build-system)
4461 (arguments
4462 `(#:jar-name "plexus-java.java"
4463 #:source-dir "plexus-java/src/main/java"
4464 #:test-dir "plexus-java/src/test"
4465 #:tests? #f; require mockito 2
4466 #:phases
4467 (modify-phases %standard-phases
4468 (add-after 'build 'generate-metadata
4469 (lambda _
4470 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4471 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4472 "--source" "plexus-java/src/main/java"
4473 "--output" "build/classes/META-INF/plexus/components.xml"
4474 "--classes" "build/classes"
4475 "--descriptors" "build/classes/META-INF")
4476 (invoke "ant" "jar")
4477 #t))
4478 (add-before 'install 'install-parent
4479 (install-pom-file "pom.xml"))
4480 (replace 'install
4481 (install-from-pom "plexus-java/pom.xml")))))
4482 (propagated-inputs
4483 (list java-asm java-qdox-2-M9 java-javax-inject
4484 plexus-parent-pom-4.0))
4485 (inputs
4486 (list java-plexus-component-annotations-1.7))
4487 (native-inputs
4488 (list java-plexus-component-metadata-1.7 java-junit))
4489 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4490 (synopsis "Shared language features for Java")
4491 (description "This package contains shared language features of the Java
4492language, for the plexus project.")
4493 (license license:asl2.0)))
4494
4495(define-public java-plexus-compiler-api
4496 (package
4497 (name "java-plexus-compiler-api")
4498 (version "2.8.4")
4499 (source (origin
4500 (method git-fetch)
4501 (uri (git-reference
4502 (url "https://github.com/codehaus-plexus/plexus-compiler")
4503 (commit (string-append "plexus-compiler-" version))))
4504 (file-name (git-file-name name version))
4505 (sha256
4506 (base32
4507 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4508 (build-system ant-build-system)
4509 (arguments
4510 `(#:jar-name "plexus-compiler-api.jar"
4511 #:source-dir "plexus-compiler-api/src/main/java"
4512 #:test-dir "plexus-compiler-api/src/test"
4513 #:phases
4514 (modify-phases %standard-phases
4515 (replace 'install
4516 (install-from-pom "plexus-compiler-api/pom.xml")))))
4517 (propagated-inputs
4518 `(("java-plexus-container-default" ,java-plexus-container-default)
4519 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4520 ("java-plexus-util" ,java-plexus-utils)))
4521 (native-inputs
4522 (list java-junit))
4523 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4524 (synopsis "Plexus Compilers component's API to manipulate compilers")
4525 (description "This package contains the API used by components to manipulate
4526compilers.")
4527 (license (list license:asl2.0
4528 license:expat))))
4529
4530(define java-plexus-compiler-pom
4531 (package
4532 (inherit java-plexus-compiler-api)
4533 (name "java-plexus-compiler-pom")
4534 (arguments
4535 `(#:tests? #f
4536 #:phases
4537 (modify-phases %standard-phases
4538 (delete 'configure)
4539 (delete 'build)
4540 (replace 'install
4541 (install-pom-file "pom.xml"))
4542 (add-after 'install 'install-compilers
4543 (install-pom-file "plexus-compilers/pom.xml")))))
4544 (propagated-inputs
4545 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4546
4547(define plexus-components-parent-pom-4.0
4548 (package
4549 (name "plexus-components-parent-pom")
4550 (version "4.0")
4551 (source (origin
4552 (method git-fetch)
4553 (uri (git-reference
4554 (url "https://github.com/codehaus-plexus/plexus-components")
4555 (commit (string-append "plexus-components-" version))))
4556 (file-name (git-file-name name version))
4557 (sha256
4558 (base32
4559 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4560 (build-system ant-build-system)
4561 (arguments
4562 `(#:tests? #f
4563 #:phases
4564 (modify-phases %standard-phases
4565 (delete 'configure)
4566 (delete 'build)
4567 (replace 'install
4568 (install-pom-file "pom.xml")))))
4569 (propagated-inputs
4570 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4571 (home-page "https://codehaus-plexus.github.io/plexus-components")
4572 (synopsis "Plexus parent pom")
4573 (description "This package contains the Plexus components parent POM.")
4574 (license license:asl2.0)))
4575
4576(define-public java-plexus-compiler-manager
4577 (package
4578 (inherit java-plexus-compiler-api)
4579 (name "java-plexus-compiler-manager")
4580 (arguments
4581 `(#:jar-name "compiler-compiler-manager.java"
4582 #:source-dir "plexus-compiler-manager/src/main/java"
4583 #:test-dir "plexus-compiler-manager/src/test"
4584 #:tests? #f
4585 #:phases
4586 (modify-phases %standard-phases
4587 (add-after 'build 'generate-metadata
4588 (lambda _
4589 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4590 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4591 "--source" "plexus-compiler-manager/src/main/java"
4592 "--output" "build/classes/META-INF/plexus/components.xml"
4593 "--classes" "build/classes"
4594 "--descriptors" "build/classes/META-INF")
4595 (invoke "ant" "jar")
4596 #t))
4597 (add-after 'generate-metadata 'rebuild
4598 (lambda _
4599 (invoke "ant" "jar")
4600 #t))
4601 (replace 'install
4602 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4603 (propagated-inputs
4604 (list java-plexus-compiler-api java-plexus-compiler-pom
4605 java-plexus-container-default-1.7))
4606 (native-inputs
4607 (list unzip java-plexus-component-metadata-1.7))
4608 (synopsis "Compiler management for Plexus Compiler component")
4609 (description "Plexus Compiler is a Plexus component to use different
4610compilers through a uniform API. This component chooses the compiler
4611implementation to use in a project.")))
4612
4613(define-public java-plexus-compiler-javac
4614 (package
4615 (inherit java-plexus-compiler-api)
4616 (name "java-plexus-compiler-javac")
4617 (arguments
4618 `(#:jar-name "plexus-compiler-javac.jar"
4619 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4620 #:jdk ,icedtea-8
4621 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4622 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4623 #:modules ((guix build ant-build-system)
4624 (guix build utils)
4625 (guix build java-utils)
4626 (sxml simple))
4627 #:phases
4628 (modify-phases %standard-phases
4629 ;; We cannot use java-plexus-component-metadata to generate the metadata
4630 ;; because it ultimately depends on this package.
4631 ;; Create it manually instead
4632 (add-before 'build 'create-metadata
4633 (lambda _
4634 (let* ((dir "build/classes/META-INF/plexus")
4635 (file (string-append dir "/components.xml")))
4636 (mkdir-p dir)
4637 (with-output-to-file file
4638 (lambda _
4639 (sxml->xml
4640 `(component-set
4641 (components
4642 (component
4643 (role "org.codehaus.plexus.compiler.Compiler")
4644 (role-hint "javac")
4645 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4646 (isolated-realm "false"))))))))
4647 #t))
4648 (replace 'install
4649 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4650 (propagated-inputs
4651 (list java-plexus-compiler-api java-plexus-utils
4652 java-plexus-container-default))
4653 (synopsis "Javac Compiler support for Plexus Compiler component")
4654 (description "This package contains the Javac Compiler support for Plexus
4655Compiler component.")))
4656
4657(define plexus-components-pom-1.1.20
4658 (package
4659 (name "plexus-components-pom-1.1.20")
4660 (version "1.1.20")
4661 (source (origin
4662 (method git-fetch)
4663 (uri (git-reference
4664 (url "https://github.com/codehaus-plexus/plexus-components")
4665 (commit (string-append "plexus-components-" version))))
4666 (file-name (git-file-name name version))
4667 (sha256
4668 (base32
4669 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4670 (build-system ant-build-system)
4671 (arguments
4672 `(#:tests? #f
4673 #:phases
4674 (modify-phases %standard-phases
4675 (delete 'configure)
4676 (delete 'build)
4677 (replace 'install
4678 (install-pom-file "pom.xml")))))
4679 (propagated-inputs
4680 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4681 (home-page "https://github.com/codehaus-plexus/plexus-components")
4682 (synopsis "Maven parent pom for plexus packages")
4683 (description "This package contains the parent pom for plexus component
4684packages.")
4685 (license license:asl2.0)))
4686
4687(define-public java-plexus-digest
4688 (package
4689 (name "java-plexus-digest")
4690 (version "1.2")
4691 (source (origin
4692 (method git-fetch)
4693 (uri (git-reference
4694 (url "https://github.com/codehaus-plexus/plexus-digest")
4695 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4696 (file-name (git-file-name name version))
4697 (sha256
4698 (base32
4699 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4700 (build-system ant-build-system)
4701 (arguments
4702 `(#:jar-name "plexus-digest.jar"
4703 #:source-dir "src/main/java"
4704 #:tests? #f
4705 #:phases
4706 (modify-phases %standard-phases
4707 (replace 'install
4708 (install-from-pom "pom.xml")))))
4709 (propagated-inputs
4710 (list java-plexus-utils plexus-components-pom-1.1.20))
4711 (native-inputs
4712 (list java-junit))
4713 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4714 (synopsis "Hash function utilities for Java")
4715 (description "This package is a plexus component that contains hash
4716function utilities.")
4717 (license license:asl2.0)))
4718
4719(define-public java-plexus-sec-dispatcher
4720 (package
4721 (name "java-plexus-sec-dispatcher")
4722 (version "2.0")
4723 (source (origin
4724 (method git-fetch)
4725 (uri (git-reference
4726 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4727 (commit (string-append "plexus-sec-dispatcher-" version))))
4728 (sha256
4729 (base32
4730 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4731 (file-name (git-file-name name version))))
4732 (arguments
4733 `(#:jar-name "plexus-sec-dispatcher.jar"
4734 #:source-dir "src/main/java"
4735 #:phases
4736 (modify-phases %standard-phases
4737 (add-before 'build 'generate-models
4738 (lambda* (#:key inputs #:allow-other-keys)
4739 (define (modello-single-mode file version mode)
4740 (invoke "java"
4741 "org.codehaus.modello.ModelloCli"
4742 file mode "src/main/java" version
4743 "false" "true"))
4744 (let ((file "src/main/mdo/settings-security.mdo"))
4745 (modello-single-mode file "1.0.0" "java")
4746 (modello-single-mode file "1.0.0" "xpp3-reader")
4747 (modello-single-mode file "1.0.0" "xpp3-writer"))
4748 #t))
4749 (add-before 'build 'generate-javax.inject.Named
4750 (lambda _
4751 (mkdir-p "build/classes/META-INF/sisu")
4752 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4753 (lambda _
4754 (display
4755 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4756 #t))
4757 (add-before 'check 'fix-paths
4758 (lambda _
4759 (copy-recursively "src/test/resources" "target")
4760 #t))
4761 (replace 'install (install-from-pom "pom.xml")))))
4762 (propagated-inputs
4763 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4764 (native-inputs
4765 (list java-javax-inject
4766 java-modello-core
4767 ;; for modello
4768 java-plexus-container-default
4769 java-plexus-classworlds
4770 java-plexus-utils
4771 java-guava
4772 java-geronimo-xbean-reflect
4773 ;; modello plugins
4774 java-modello-plugins-java
4775 java-modello-plugins-xml
4776 java-modello-plugins-xpp3
4777 ;; for tests
4778 java-junit))
4779 (build-system ant-build-system)
4780 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4781 (synopsis "Plexus Security Dispatcher Component")
4782 (description "This package is the Plexus Security Dispatcher Component.
4783This component decrypts a string passed to it.")
4784 (license license:asl2.0)))
4785
4786(define-public java-plexus-sec-dispatcher-1.4
4787 (package
4788 (inherit java-plexus-sec-dispatcher)
4789 (version "1.4")
4790 (source (origin
4791 (method git-fetch)
4792 (uri (git-reference
4793 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4794 (commit (string-append "sec-dispatcher-" version))))
4795 (sha256
4796 (base32
4797 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4798 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4799 (arguments
4800 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4801 ((#:phases phases)
4802 `(modify-phases ,phases
4803 (delete 'generate-javax.inject.Named)
4804 (add-before 'build 'generate-components.xml
4805 (lambda _
4806 (mkdir-p "build/classes/META-INF/plexus")
4807 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4808 (lambda _
4809 (display
4810 "<component-set>\n
4811 <components>\n
4812 <component>\n
4813 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4814 <role-hint>default</role-hint>\n
4815 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4816 <description></description>\n
4817 <requirements>\n
4818 <requirement>\n
4819 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4820 <field-name>_cipher</field-name>\n
4821 </requirement>\n
4822 <requirement>\n
4823 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4824 <field-name>_decryptors</field-name>\n
4825 </requirement>\n
4826 </requirements>\n
4827 <configuration>\n
4828 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4829 </configuration>\n
4830 </component>\n
4831 </components>\n
4832</component-set>\n")))))))))
4833 (propagated-inputs
4834 (list java-plexus-utils java-plexus-cipher-1.7
4835 java-sonatype-spice-parent-pom-12))))
4836
4837(define-public java-plexus-cli
4838 (package
4839 (name "java-plexus-cli")
4840 (version "1.7")
4841 (source (origin
4842 (method git-fetch)
4843 (uri (git-reference
4844 (url "https://github.com/sonatype/plexus-cli")
4845 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4846 (file-name (string-append name "-" version))
4847 (sha256
4848 (base32
4849 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4850 (build-system ant-build-system)
4851 (arguments
4852 `(#:jar-name "plexus-cli.jar"
4853 #:source-dir "src/main/java"
4854 #:jdk ,icedtea-8
4855 #:test-dir "src/test"))
4856 (inputs
4857 (list java-commons-cli java-plexus-container-default
4858 java-plexus-classworlds))
4859 (native-inputs
4860 (list java-plexus-utils java-junit java-guava))
4861 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4862 (synopsis "CLI building library for plexus")
4863 (description "This package is a library to help creating CLI around
4864Plexus components.")
4865 (license license:asl2.0)))
4866
4867(define-public java-plexus-build-api
4868 (package
4869 (name "java-plexus-build-api")
4870 (version "0.0.7")
4871 (source (origin
4872 (method git-fetch)
4873 (uri (git-reference
4874 (url "https://github.com/codehaus-plexus/plexus-build-api")
4875 (commit (string-append "plexus-build-api-" version))))
4876 (file-name (git-file-name name version))
4877 (sha256
4878 (base32
4879 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4880 (build-system ant-build-system)
4881 (arguments
4882 `(#:jar-name "plexus-build-api.jar"
4883 #:source-dir "src/main/java"
4884 #:jdk ,icedtea-8
4885 #:tests? #f; FIXME: how to run the tests?
4886 #:phases
4887 (modify-phases %standard-phases
4888 (add-before 'build 'copy-resources
4889 (lambda _
4890 (copy-recursively "src/main/resources" "build/classes")
4891 (substitute* (find-files "build/classes")
4892 (("\\$\\{project.version\\}") ,version))
4893 #t))
4894 (add-before 'build 'generate-plexus-compontent
4895 (lambda _
4896 (mkdir-p "build/classes/META-INF/plexus")
4897 ;; This file is required for plexus to inject this package.
4898 ;; FIXME: how is it generated?
4899 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4900 (lambda _
4901 (display
4902 "<component-set>\n
4903 <components>\n
4904 <component>\n
4905 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4906 <role-hint>default</role-hint>\n
4907 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4908 <description>Filesystem based non-incremental build context implementation\n
4909which behaves as if all files were just created.</description>\n
4910 </component>\n
4911 </components>\n
4912</component-set>\n")))
4913 #t))
4914 (replace 'install
4915 (install-from-pom "pom.xml")))))
4916 (inputs
4917 (list java-plexus-utils-3.2.1 java-plexus-container-default))
4918 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
4919 (synopsis "Base build API for maven")
4920 (description "This package contains the base build API for maven and
4921a default implementation of it. This API is about scanning files in a
4922project and determining what files need to be rebuilt.")
4923 (license license:asl2.0)))
4924
4925(define-public java-modello-core
4926 (package
4927 (name "java-modello-core")
4928 (version "1.11")
4929 (source (origin
4930 (method git-fetch)
4931 (uri (git-reference
4932 (url "https://github.com/codehaus-plexus/modello")
4933 (commit (string-append "modello-" version))))
4934 (file-name (git-file-name name version))
4935 (sha256
4936 (base32
4937 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
4938 (build-system ant-build-system)
4939 (arguments
4940 `(#:jar-name "modello-core.jar"
4941 #:source-dir "modello-core/src/main/java"
4942 #:test-dir "modello-core/src/test"
4943 #:main-class "org.codehaus.modello.ModelloCli"
4944 #:jdk ,icedtea-8
4945 #:phases
4946 (modify-phases %standard-phases
4947 (add-before 'build 'copy-resources
4948 (lambda _
4949 (mkdir-p "build/classes/META-INF/plexus")
4950 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4951 "build/classes/META-INF/plexus/components.xml")
4952 #t))
4953 (add-before 'check 'fix-tests
4954 (lambda _
4955 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4956 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4957 "modello/core/io/ModelReaderTest.java")
4958 (("src/test") "modello-core/src/test")))
4959 #t)))))
4960 (propagated-inputs
4961 (list java-plexus-utils java-plexus-container-default
4962 java-plexus-build-api))
4963 (native-inputs
4964 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
4965 java-guava))
4966 (home-page "https://codehaus-plexus.github.io/modello/")
4967 (synopsis "Framework for code generation from a simple model")
4968 (description "Modello is a framework for code generation from a simple model.
4969
4970Modello generates code from a simple model format: based on a plugin
4971architecture, various types of code and descriptors can be generated from the
4972single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4973XSD and documentation.")
4974 (license (list
4975 license:expat
4976 ;; Although this package uses only files licensed under expat,
4977 ;; other parts of the source are licensed under different
4978 ;; licenses. We include them to be inherited by other packages.
4979 license:asl2.0
4980 ;; Some files in modello-plugin-java are licensed under a
4981 ;; 5-clause BSD license.
4982 (license:non-copyleft
4983 (string-append "file:///modello-plugins/modello-plugin-java/"
4984 "src/main/java/org/codehaus/modello/plugin/"
4985 "java/javasource/JNaming.java"))))))
4986
4987(define-public java-modello-plugins-java
4988 (package
4989 (inherit java-modello-core)
4990 (name "java-modello-plugins-java")
4991 (arguments
4992 `(#:jar-name "modello-plugins-java.jar"
4993 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4994 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4995 #:jdk ,icedtea-8
4996 #:tests? #f; requires maven-model, which depends on this package
4997 #:phases
4998 (modify-phases %standard-phases
4999 (add-before 'build 'copy-resources
5000 (lambda _
5001 (mkdir-p "build/classes")
5002 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5003 "build/classes")
5004 #t)))))
5005 (inputs
5006 (list java-modello-core))
5007 (synopsis "Modello Java Plugin")
5008 (description "Modello Java Plugin generates Java objects for the model.")))
5009
5010(define-public java-modello-plugins-xml
5011 (package
5012 (inherit java-modello-core)
5013 (name "java-modello-plugins-xml")
5014 (arguments
5015 `(#:jar-name "modello-plugins-xml.jar"
5016 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5017 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5018 #:jdk ,icedtea-8
5019 #:phases
5020 (modify-phases %standard-phases
5021 (add-before 'build 'copy-resources
5022 (lambda _
5023 (mkdir-p "build/classes")
5024 (copy-recursively
5025 "modello-plugins/modello-plugin-xml/src/main/resources"
5026 "build/classes")
5027 #t))
5028 (add-before 'check 'fix-paths
5029 (lambda _
5030 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5031 (substitute*
5032 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5033 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5034 #t)))))
5035 (propagated-inputs
5036 (list java-modello-core java-modello-plugins-java))
5037 (synopsis "Modello XML Plugin")
5038 (description "Modello XML Plugin contains shared code for every plugins
5039working on XML representation of the model.")))
5040
5041(define-public java-modello-test
5042 (package
5043 (inherit java-modello-core)
5044 (name "java-modello-test")
5045 (arguments
5046 `(#:jar-name "modello-test.jar"
5047 #:source-dir "modello-test/src/main/java"
5048 #:tests? #f; no tests
5049 #:jdk ,icedtea-8))
5050 (inputs
5051 (list java-plexus-utils java-plexus-compiler-api
5052 java-plexus-compiler-javac java-plexus-container-default))
5053 (synopsis "Modello test package")
5054 (description "The modello test package contains the basis to create
5055Modello generator unit-tests, including sample models and xml files to test
5056every feature for every plugin.")))
5057
5058(define-public java-modello-plugins-xpp3
5059 (package
5060 (inherit java-modello-core)
5061 (name "java-modello-plugins-xpp3")
5062 (arguments
5063 `(#:jar-name "modello-plugins-xpp3.jar"
5064 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5065 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5066 ;; One of the test dependencies is maven-model which depends on this package.
5067 #:tests? #f
5068 #:jdk ,icedtea-8
5069 #:phases
5070 (modify-phases %standard-phases
5071 (add-before 'build 'copy-resources
5072 (lambda _
5073 (mkdir-p "build/classes")
5074 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5075 "build/classes")
5076 #t)))))
5077 (propagated-inputs
5078 (list java-modello-core java-modello-plugins-java
5079 java-modello-plugins-xml))
5080 (native-inputs
5081 (modify-inputs native-inputs
5082 (prepend java-xmlunit java-modello-test)))
5083 (synopsis "Modello XPP3 Plugin")
5084 (description "The modello XPP3 plugin generates XML readers and writers based
5085on the XPP3 API (XML Pull Parser).")))
5086
5087(define-public java-ow-util-ant-tasks
5088 (package
5089 (name "java-ow-util-ant-tasks")
5090 (version "1.3.2")
5091 (source (origin
5092 (method url-fetch)
5093 (uri (string-append
5094 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5095 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5096 (sha256
5097 (base32
5098 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5099 (build-system ant-build-system)
5100 (arguments
5101 `(#:jar-name "ow-util-ant-tasks.jar"
5102 #:tests? #f; no tests
5103 #:phases
5104 (modify-phases %standard-phases
5105 (add-before 'build 'delete-cyclic-dependency
5106 (lambda _
5107 ;; This file depends on asm-3, which depends on this package
5108 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5109 ;; This file depends on xalan
5110 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5111 (add-before 'build 'fix-new-ant
5112 (lambda _
5113 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5114 ((", destFile.getAbsolutePath\\(\\)")
5115 ", new String[] { destFile.getAbsolutePath() }")))))))
5116 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5117 (synopsis "Replacement for base ant tasks")
5118 (description "This library is used in the legacy build process of several
5119key frameworks developed by ObjectWeb, among them legacy versions of the
5120ObjectWeb ASM bytecode manipulation framework.")
5121 (license license:lgpl2.0+)))
5122
5123(define-public java-asm
5124 (package
5125 (name "java-asm")
5126 (version "6.0")
5127 (source (origin
5128 (method url-fetch)
5129 (uri (string-append "https://download.forge.ow2.org/asm/"
5130 "asm-" version ".tar.gz"))
5131 (sha256
5132 (base32
5133 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5134 (build-system ant-build-system)
5135 (arguments
5136 `(#:build-target "compile"
5137 ;; The tests require an old version of Janino, which no longer compiles
5138 ;; with the JDK7.
5139 #:tests? #f
5140 #:make-flags
5141 (list
5142 ;; We don't need these extra ant tasks, but the build system asks us to
5143 ;; provide a path anyway.
5144 "-Dobjectweb.ant.tasks.path=dummy-path"
5145 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5146 ;; used during the build automatically by ant-build-system, but
5147 ;; java-asm's build.xml fails unless we provide something here.
5148 "-Dbiz.aQute.bnd.path=dummy-path")
5149 #:phases
5150 (modify-phases %standard-phases
5151 (add-before 'build 'remove-bnd-dependency
5152 (lambda _
5153 ;; This file is the only one to require bnd, and is not needed
5154 ;; because we don't build a bundle.
5155 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5156 #t))
5157 (add-before 'install 'build-jars
5158 (lambda* (#:key make-flags #:allow-other-keys)
5159 ;; We cannot use the "jar" target because it depends on a couple
5160 ;; of unpackaged, complicated tools.
5161 (mkdir "dist")
5162 (invoke "jar"
5163 "-cf" (string-append "dist/asm-" ,version ".jar")
5164 "-C" "output/build/tmp" ".")))
5165 (add-before 'install 'fix-pom
5166 (lambda _
5167 (substitute* (find-files "archive" "\\.pom$")
5168 (("@product.artifact@") ,version))
5169 #t))
5170 (add-before 'install 'install-parent
5171 (install-pom-file "archive/asm-parent.pom"))
5172 (replace 'install
5173 (install-from-pom "archive/asm.pom")))))
5174 (native-inputs
5175 (list java-junit))
5176 (propagated-inputs
5177 (list java-org-ow2-parent-pom-1.3))
5178 (home-page "https://asm.ow2.io/")
5179 (synopsis "Very small and fast Java bytecode manipulation framework")
5180 (description "ASM is an all purpose Java bytecode manipulation and
5181analysis framework. It can be used to modify existing classes or dynamically
5182generate classes, directly in binary form. The provided common
5183transformations and analysis algorithms allow easily assembling custom
5184complex transformations and code analysis tools.")
5185 (license license:bsd-3)))
5186
5187(define-public java-org-ow2-parent-pom-1.3
5188 (package
5189 (name "java-org-ow2-parent-pom")
5190 (version "1.3")
5191 (source (origin
5192 (method url-fetch)
5193 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5194 (sha256
5195 (base32
5196 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5197 (build-system ant-build-system)
5198 (arguments
5199 `(#:tests? #f
5200 #:phases
5201 (modify-phases %standard-phases
5202 (delete 'unpack)
5203 (delete 'build)
5204 (delete 'configure)
5205 (replace 'install
5206 ,#~(install-pom-file #$source)))))
5207 (home-page "https://ow2.org")
5208 (synopsis "Ow2.org parent pom")
5209 (description "This package contains the parent pom for projects from ow2.org,
5210including java-asm.")
5211 (properties '((hidden? . #t)))
5212 (license license:lgpl2.1+)))
5213
5214(define-public java-asm-bootstrap
5215 (package
5216 (inherit java-asm)
5217 (name "java-asm-bootstrap")
5218 (properties '((hidden? . #t)))
5219 (arguments
5220 (substitute-keyword-arguments (package-arguments java-asm)
5221 ((#:tests? _) #f)))
5222 (native-inputs `())))
5223
5224(define-public java-asm-3
5225 (package
5226 (inherit java-asm)
5227 (version "3.1")
5228 (source (origin
5229 (method git-fetch)
5230 (uri (git-reference
5231 (url "https://gitlab.ow2.org/asm/asm")
5232 (commit "ASM_3_1")))
5233 (file-name (git-file-name "java-asm" version))
5234 (sha256
5235 (base32
5236 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5237 (modules '((guix build utils)))
5238 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5239 (arguments
5240 `(#:build-target "jar"
5241 #:test-target "test"
5242 #:tests? #f; require legacy test software
5243 #:phases
5244 (modify-phases %standard-phases
5245 (replace 'install (install-jars "output/dist"))
5246 (delete 'generate-jar-indices))))
5247 (native-inputs (list java-ow-util-ant-tasks))))
5248
5249(define-public java-asm-8
5250 (package
5251 (inherit java-asm)
5252 (version "8.0.1")
5253 (source (origin
5254 (method git-fetch)
5255 (uri (git-reference
5256 (url "https://gitlab.ow2.org/asm/asm")
5257 (commit (string-append
5258 "ASM_" (string-join (string-split version #\.)
5259 "_")))))
5260 (file-name (git-file-name "java-asm" version))
5261 (sha256
5262 (base32
5263 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5264 (arguments
5265 `(#:jar-name "asm8.jar"
5266 #:source-dir "asm/src/main/java"
5267 #:test-dir "asm/src/test"
5268 ;; tests depend on junit5
5269 #:tests? #f))
5270 (propagated-inputs '())
5271 (native-inputs '())))
5272
5273(define-public java-asm-tree-8
5274 (package
5275 (inherit java-asm-8)
5276 (name "java-asm-tree")
5277 (arguments
5278 `(#:jar-name "asm-tree.jar"
5279 #:source-dir "asm-tree/src/main/java"
5280 #:test-dir "asm-tree/src/test"
5281 ;; tests depend on junit5
5282 #:tests? #f))
5283 (inputs
5284 (list java-asm-8))))
5285
5286(define-public java-asm-analysis-8
5287 (package
5288 (inherit java-asm-8)
5289 (name "java-asm-analysis")
5290 (arguments
5291 `(#:jar-name "asm-analysis.jar"
5292 #:source-dir "asm-analysis/src/main/java"
5293 #:test-dir "asm-analysis/src/test"
5294 ;; tests depend on junit5
5295 #:tests? #f))
5296 (inputs
5297 (list java-asm-8 java-asm-tree-8))))
5298
5299(define-public java-asm-util-8
5300 (package
5301 (inherit java-asm-8)
5302 (name "java-asm-util")
5303 (arguments
5304 `(#:jar-name "asm-util8.jar"
5305 #:source-dir "asm-util/src/main/java"
5306 #:test-dir "asm-util/src/test"
5307 ;; tests depend on junit5
5308 #:tests? #f))
5309 (inputs
5310 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5311
5312(define-public java-asm-commons-8
5313 (package
5314 (inherit java-asm-8)
5315 (name "java-asm-commons")
5316 (arguments
5317 (list #:jar-name "asm-commons8.jar"
5318 #:source-dir "asm-commons/src/main/java"
5319 #:test-dir "asm-commons/src/test"
5320 ;; tests depend on junit5
5321 #:tests? #f))
5322 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5323
5324(define-public java-asm-9
5325 (package
5326 (inherit java-asm)
5327 (version "9.4")
5328 (source (origin
5329 (method git-fetch)
5330 (uri (git-reference
5331 (url "https://gitlab.ow2.org/asm/asm")
5332 (commit (string-append
5333 "ASM_" (string-join (string-split version #\.)
5334 "_")))))
5335 (file-name (git-file-name "java-asm" version))
5336 (sha256
5337 (base32
5338 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5339 (arguments
5340 `(#:jar-name "asm9.jar"
5341 #:source-dir "asm/src/main/java"
5342 #:test-dir "asm/src/test"
5343 ;; tests depend on junit5
5344 #:tests? #f))
5345 (propagated-inputs '())
5346 (native-inputs '())))
5347
5348(define-public java-asm-tree-9
5349 (package
5350 (inherit java-asm-9)
5351 (name "java-asm-tree")
5352 (arguments
5353 `(#:jar-name "asm-tree.jar"
5354 #:source-dir "asm-tree/src/main/java"
5355 #:test-dir "asm-tree/src/test"
5356 ;; tests depend on junit5
5357 #:tests? #f))
5358 (inputs
5359 (list java-asm-9))))
5360
5361(define-public java-asm-analysis-9
5362 (package
5363 (inherit java-asm-9)
5364 (name "java-asm-analysis")
5365 (arguments
5366 `(#:jar-name "asm-analysis.jar"
5367 #:source-dir "asm-analysis/src/main/java"
5368 #:test-dir "asm-analysis/src/test"
5369 ;; tests depend on junit5
5370 #:tests? #f))
5371 (inputs
5372 (list java-asm-9 java-asm-tree-9))))
5373
5374(define-public java-asm-util-9
5375 (package
5376 (inherit java-asm-9)
5377 (name "java-asm-util")
5378 (arguments
5379 `(#:jar-name "asm-util8.jar"
5380 #:source-dir "asm-util/src/main/java"
5381 #:test-dir "asm-util/src/test"
5382 ;; tests depend on junit5
5383 #:tests? #f))
5384 (inputs
5385 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5386
5387(define-public java-asm-commons-9
5388 (package
5389 (inherit java-asm-9)
5390 (name "java-asm-commons")
5391 (arguments
5392 (list #:jar-name "asm-commons8.jar"
5393 #:source-dir "asm-commons/src/main/java"
5394 #:test-dir "asm-commons/src/test"
5395 ;; tests depend on junit5
5396 #:tests? #f))
5397 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5398
5399(define-public java-cglib
5400 (package
5401 (name "java-cglib")
5402 (version "3.3.0")
5403 (source
5404 (origin
5405 (method git-fetch)
5406 (uri (git-reference
5407 (url "https://github.com/cglib/cglib")
5408 (commit (string-append
5409 "RELEASE_"
5410 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5411 version)))))
5412 (file-name (git-file-name name version))
5413 (sha256
5414 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5415 (build-system ant-build-system)
5416 (arguments
5417 `(;; FIXME: tests fail because junit runs
5418 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5419 ;; to describe a test at all.
5420 #:tests? #f
5421 #:jar-name "cglib.jar"
5422 #:phases
5423 (modify-phases %standard-phases
5424 (add-after 'unpack 'chdir
5425 (lambda _ (chdir "cglib") #t)))))
5426 (native-inputs (list java-junit))
5427 (propagated-inputs (list java-asm-8))
5428 (home-page "https://github.com/cglib/cglib/")
5429 (synopsis "Java byte code generation library")
5430 (description "The byte code generation library CGLIB is a high level API
5431to generate and transform Java byte code.")
5432 (license license:asl2.0)))
5433
5434(define-public java-objenesis
5435 (package
5436 (name "java-objenesis")
5437 (version "3.3")
5438 (source (origin
5439 (method git-fetch)
5440 (uri (git-reference
5441 (url "https://github.com/easymock/objenesis")
5442 (commit version)))
5443 (file-name (git-file-name name version))
5444 (sha256
5445 (base32
5446 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5447 (build-system ant-build-system)
5448 (arguments
5449 `(#:tests? #f; require junit-5
5450 #:jar-name "objenesis.jar"
5451 #:source-dir "main/src/main/java"
5452 #:test-dir "main/src/test/"))
5453 (native-inputs
5454 (list java-junit java-hamcrest-core))
5455 (home-page "http://objenesis.org/")
5456 (synopsis "Bypass the constructor when creating an object")
5457 (description "Objenesis is a small Java library that serves one purpose:
5458to instantiate a new object of a particular class. It is common to see
5459restrictions in libraries stating that classes must require a default
5460constructor. Objenesis aims to overcome these restrictions by bypassing the
5461constructor on object instantiation.")
5462 (license license:asl2.0)))
5463
5464(define-public java-easymock
5465 (package
5466 (name "java-easymock")
5467 (version "3.4")
5468 (source (origin
5469 (method git-fetch)
5470 (uri (git-reference
5471 (url "https://github.com/easymock/easymock/")
5472 (commit (string-append "easymock-" version))))
5473 (file-name (git-file-name name version))
5474 (sha256
5475 (base32
5476 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5477 (build-system ant-build-system)
5478 (arguments
5479 `(#:jar-name "easymock.jar"
5480 #:source-dir "core/src/main"
5481 #:test-dir "core/src/test"
5482 #:phases
5483 (modify-phases %standard-phases
5484 ;; FIXME: Android support requires the following packages to be
5485 ;; available: com.google.dexmaker.stock.ProxyBuilder
5486 (add-after 'unpack 'delete-android-support
5487 (lambda _
5488 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5489 (substitute* "MocksControl.java"
5490 (("AndroidSupport.isAndroid\\(\\)") "false")
5491 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5492 (delete-file "AndroidClassProxyFactory.java"))
5493 #t))
5494 (add-after 'unpack 'delete-broken-tests
5495 (lambda _
5496 (with-directory-excursion "core/src/test/java/org/easymock"
5497 ;; This test depends on dexmaker.
5498 (delete-file "tests2/ClassExtensionHelperTest.java")
5499
5500 ;; This is not a test.
5501 (delete-file "tests/BaseEasyMockRunnerTest.java")
5502
5503 ;; This test should be executed with a different runner...
5504 (delete-file "tests2/EasyMockAnnotationsTest.java")
5505 ;; ...but deleting it means that we also have to delete these
5506 ;; dependent files.
5507 (delete-file "tests2/EasyMockRunnerTest.java")
5508 (delete-file "tests2/EasyMockRuleTest.java")
5509
5510 ;; This test fails because the file "easymock.properties" does
5511 ;; not exist.
5512 (delete-file "tests2/EasyMockPropertiesTest.java"))
5513 #t)))))
5514 (inputs
5515 (list java-cglib java-objenesis))
5516 (native-inputs
5517 (list java-junit java-hamcrest-core))
5518 (home-page "https://easymock.org/")
5519 (synopsis "Java library providing mock objects for unit tests")
5520 (description "EasyMock is a Java library that provides an easy way to use
5521mock objects in unit testing.")
5522 (license license:asl2.0)))
5523
5524(define-public java-easymock-3.2
5525 (package
5526 (inherit java-easymock)
5527 (name "java-easymock")
5528 (version "3.2")
5529 (source (origin
5530 (method git-fetch)
5531 (uri (git-reference
5532 (url "https://github.com/easymock/easymock/")
5533 (commit (string-append "easymock-" version))))
5534 (file-name (git-file-name name version))
5535 (sha256
5536 (base32
5537 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
5538 (arguments
5539 (list #:jar-name "easymock.jar"
5540 #:source-dir "easymock/src/main"
5541 #:test-dir "easymock/src/test"
5542 #:phases
5543 #~(modify-phases %standard-phases
5544 (add-after 'unpack 'delete-android-support
5545 (lambda _
5546 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
5547 (substitute* "MocksControl.java"
5548 (("AndroidSupport.isAndroid\\(\\)") "false")
5549 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5550 (delete-file "AndroidClassProxyFactory.java"))))
5551 (add-after 'unpack 'delete-broken-tests
5552 (lambda _
5553 (with-directory-excursion "easymock/src/test/java/org/easymock"
5554 ;; This test depends on dexmaker.
5555 (delete-file "tests2/ClassExtensionHelperTest.java")
5556 ;; This is not a test.
5557 (delete-file "tests/BaseEasyMockRunnerTest.java")
5558 ;; ...but deleting it means that we also have to delete these
5559 ;; dependent files.
5560 (delete-file "tests2/EasyMockRunnerTest.java")
5561 ;; This test fails because the file "easymock.properties" does
5562 ;; not exist.
5563 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
5564
5565(define-public java-easymock-class-extension
5566 (package
5567 (inherit java-easymock-3.2)
5568 (name "java-easymock-class-extension")
5569 (build-system ant-build-system)
5570 (arguments
5571 (list #:jar-name "easymock-class-extensions.jar"
5572 #:source-dir "easymock-classextension/src/main/java"
5573 #:test-dir "easymock-classextension/src/test"))
5574 (inputs (list java-asm-8
5575 java-easymock-3.2
5576 java-cglib
5577 java-objenesis))
5578 (native-inputs
5579 (list java-junit java-hamcrest-core))
5580 (home-page "https://easymock.org/")
5581 (synopsis "Easymock extension to mock classes")
5582 (description "This package provides an extension to earlier versions of
5583easymock that allows mocking classes.")
5584 (license license:asl2.0)))
5585
5586(define-public java-jmock-1
5587 (package
5588 (name "java-jmock")
5589 (version "1.2.0")
5590 (source (origin
5591 (method git-fetch)
5592 (uri (git-reference
5593 (url "https://github.com/jmock-developers/jmock-library")
5594 (commit version)))
5595 (file-name (git-file-name name version))
5596 (sha256
5597 (base32
5598 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5599 (build-system ant-build-system)
5600 (arguments
5601 `(#:build-target "jars"
5602 #:test-target "run.tests"
5603 #:phases
5604 (modify-phases %standard-phases
5605 (replace 'install (install-jars "build")))))
5606 (home-page "http://jmock.org/")
5607 (synopsis "Mock object library for test-driven development")
5608 (description "JMock is a library that supports test-driven development of
5609Java code with mock objects. Mock objects help you design and test the
5610interactions between the objects in your programs.
5611
5612The jMock library
5613
5614@itemize
5615@item makes it quick and easy to define mock objects
5616@item lets you precisely specify the interactions between
5617 your objects, reducing the brittleness of your tests
5618@item plugs into your favourite test framework
5619@item is easy to extend.
5620@end itemize\n")
5621 (license license:bsd-3)))
5622
5623(define-public java-jmock
5624 (package
5625 (inherit java-jmock-1)
5626 (name "java-jmock")
5627 (version "2.8.2")
5628 (source (origin
5629 (method git-fetch)
5630 (uri (git-reference
5631 (url "https://github.com/jmock-developers/jmock-library")
5632 (commit version)))
5633 (file-name (git-file-name name version))
5634 (sha256
5635 (base32
5636 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5637 (inputs
5638 (list java-hamcrest-all java-bsh java-junit))
5639 (native-inputs
5640 `(("cglib" ,java-cglib)))
5641 (arguments
5642 `(#:jar-name "java-jmock.jar"
5643 #:source-dir "jmock/src/main/java"
5644 #:test-dir "jmock/src/test"))))
5645
5646(define-public java-jmock-junit4
5647 (package
5648 (inherit java-jmock)
5649 (name "java-jmock-junit4")
5650 (arguments
5651 `(#:jar-name "java-jmock-junit4.jar"
5652 #:source-dir "jmock-junit4/src/main/java"
5653 #:test-dir "jmock-junit4/src/test"))
5654 (inputs
5655 `(("java-hamcrest-all" ,java-hamcrest-all)
5656 ("java-bsh" ,java-bsh)
5657 ("java-jmock" ,java-jmock)
5658 ("java-jumit" ,java-junit)))))
5659
5660(define-public java-jmock-legacy
5661 (package
5662 (inherit java-jmock)
5663 (name "java-jmock-legacy")
5664 (arguments
5665 `(#:jar-name "java-jmock-legacy.jar"
5666 #:source-dir "jmock-legacy/src/main/java"
5667 #:test-dir "jmock-legacy/src/test"
5668 #:phases
5669 (modify-phases %standard-phases
5670 (add-before 'check 'copy-tests
5671 (lambda _
5672 ;; This file is a dependancy of some tests
5673 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5674 (copy-file (string-append "jmock/src/test/java/" file)
5675 (string-append "jmock-legacy/src/test/java/" file))
5676 #t))))))
5677 (inputs
5678 (list java-hamcrest-all
5679 java-objenesis
5680 java-cglib
5681 java-jmock
5682 java-bsh
5683 java-junit))
5684 (native-inputs
5685 (list java-jmock-junit4))))
5686
5687(define-public java-hamcrest-all
5688 (package (inherit java-hamcrest-core)
5689 (name "java-hamcrest-all")
5690 (properties `((superseded . ,java-hamcrest)))
5691 (arguments
5692 `(#:jdk ,icedtea-8
5693 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5694 ((#:build-target _) "bigjar")
5695 ((#:phases phases)
5696 `(modify-phases ,phases
5697 ;; Some build targets override the classpath, so we need to patch
5698 ;; the build.xml to ensure that required dependencies are on the
5699 ;; classpath.
5700 (add-after 'unpack 'patch-classpath-for-integration
5701 (lambda* (#:key inputs #:allow-other-keys)
5702 (substitute* "build.xml"
5703 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5704 (string-join
5705 (cons line
5706 (append
5707 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5708 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5709 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5710 ";"))
5711 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5712 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5713 "jar$"))))
5714 #t))
5715 (replace 'install
5716 (lambda* (#:key outputs #:allow-other-keys)
5717 (let* ((target (string-append (assoc-ref outputs "out")
5718 "/share/java/"))
5719 (version-suffix
5720 ,(string-append
5721 "-" (package-version java-hamcrest-core) ".jar"))
5722 (install-without-version-suffix
5723 (lambda (jar)
5724 (copy-file jar
5725 (string-append target
5726 (basename jar version-suffix)
5727 ".jar")))))
5728 (mkdir-p target)
5729 (for-each
5730 install-without-version-suffix
5731 (find-files "build"
5732 (lambda (name _)
5733 (and (string-suffix? ".jar" name)
5734 (not (string-suffix? "-sources.jar" name)))))))
5735 #t)))))))
5736 (inputs
5737 (modify-inputs inputs
5738 (prepend java-junit
5739 java-jmock-1
5740 ;; This is necessary because of what seems to be a race condition.
5741 ;; This package would sometimes fail to build because hamcrest-core.jar
5742 ;; could not be found, even though it is built as part of this package.
5743 ;; Adding java-hamcrest-core appears to fix this problem. See
5744 ;; https://debbugs.gnu.org/31390 for more information.
5745 java-hamcrest-core
5746 java-easymock)))))
5747
5748(define-public java-jopt-simple
5749 (package
5750 (name "java-jopt-simple")
5751 (version "5.0.3")
5752 (source (origin
5753 (method url-fetch)
5754 (uri (string-append "https://repo1.maven.org/maven2/"
5755 "net/sf/jopt-simple/jopt-simple/"
5756 version "/jopt-simple-"
5757 version "-sources.jar"))
5758 (sha256
5759 (base32
5760 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5761 (build-system ant-build-system)
5762 (arguments
5763 `(#:tests? #f ; there are no tests
5764 #:jar-name "jopt-simple.jar"
5765 #:phases
5766 (modify-phases %standard-phases
5767 (add-before 'install 'create-pom
5768 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5769 (replace 'install
5770 (install-from-pom "pom.xml")))))
5771 (home-page "https://jopt-simple.github.io/jopt-simple/")
5772 (synopsis "Java library for parsing command line options")
5773 (description "JOpt Simple is a Java library for parsing command line
5774options, such as those you might pass to an invocation of @code{javac}. In
5775the interest of striving for simplicity, as closely as possible JOpt Simple
5776attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5777GNU @code{getopt_long}. It also aims to make option parser configuration and
5778retrieval of options and their arguments simple and expressive, without being
5779overly clever.")
5780 (license license:expat)))
5781
5782;; Required by jmh
5783(define-public java-jopt-simple-4
5784 (package
5785 (inherit java-jopt-simple)
5786 (version "4.6")
5787 (source (origin
5788 (method url-fetch)
5789 (uri (string-append "https://repo1.maven.org/maven2/"
5790 "net/sf/jopt-simple/jopt-simple/"
5791 version "/jopt-simple-"
5792 version "-sources.jar"))
5793 (sha256
5794 (base32
5795 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5796 (arguments
5797 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5798 ((#:phases phases)
5799 `(modify-phases ,phases
5800 (replace 'create-pom
5801 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5802 ,version))))))))
5803
5804(define-public java-commons-math3
5805 (package
5806 (name "java-commons-math3")
5807 (version "3.6.1")
5808 (source (origin
5809 (method url-fetch)
5810 (uri (string-append "mirror://apache/commons/math/source/"
5811 "commons-math3-" version "-src.tar.gz"))
5812 (sha256
5813 (base32
5814 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5815 (build-system ant-build-system)
5816 (arguments
5817 `(#:build-target "jar"
5818 #:test-target "test"
5819 #:make-flags
5820 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5821 (junit #$(this-package-native-input "java-junit")))
5822 (list (string-append "-Djunit.jar="
5823 (car (find-files junit "jar$")))
5824 (string-append "-Dhamcrest.jar="
5825 (car (find-files hamcrest ".*.jar$")))))
5826 #:phases
5827 (modify-phases %standard-phases
5828 ;; We want to build the jar in the build phase and run the tests
5829 ;; later in a separate phase.
5830 (add-after 'unpack 'untangle-targets
5831 (lambda _
5832 (substitute* "build.xml"
5833 (("name=\"jar\" depends=\"test\"")
5834 "name=\"jar\" depends=\"compile\""))))
5835 ;; There is no install target.
5836 (replace 'install
5837 (install-from-pom "pom.xml")))))
5838 (native-inputs
5839 (list java-junit java-hamcrest-core))
5840 (home-page "https://commons.apache.org/math/")
5841 (synopsis "Apache Commons mathematics library")
5842 (description "Commons Math is a library of lightweight, self-contained
5843mathematics and statistics components addressing the most common problems not
5844available in the Java programming language or Commons Lang.")
5845 (license license:asl2.0)))
5846
5847(define-public java-jmh
5848 (package
5849 (name "java-jmh")
5850 (version "1.32")
5851 (source (origin
5852 (method git-fetch)
5853 (uri (git-reference
5854 (url "https://github.com/openjdk/jmh")
5855 (commit version)))
5856 (file-name (git-file-name name version))
5857 (sha256
5858 (base32
5859 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5860 (build-system maven-build-system)
5861 (arguments
5862 `(#:exclude
5863 (("org.apache.maven.plugins" .
5864 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5865 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5866 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5867 ("org.apache.maven.wagon" . ("wagon-ssh")))
5868 #:maven-plugins
5869 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5870 ,@(default-maven-plugins))
5871 #:phases
5872 (modify-phases %standard-phases
5873 (add-after 'unpack 'remove-unnecessary
5874 (lambda _
5875 ;; requires org.apache.maven.archetype:archetype-packaging.
5876 ;; Its subprojects also require groovy, kotlin and scala,
5877 ;; respectively.
5878 (delete-file-recursively "jmh-archetypes"))))))
5879 (propagated-inputs
5880 (list java-jopt-simple-4 java-commons-math3))
5881 (native-inputs
5882 (list java-junit java-hamcrest-core))
5883 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5884 (synopsis "Benchmark harness for the JVM")
5885 (description "JMH is a Java harness for building, running, and analysing
5886nano/micro/milli/macro benchmarks written in Java and other languages
5887targeting the JVM.")
5888 ;; GPLv2 only
5889 (license license:gpl2)))
5890
5891(define-public java-commons-collections4
5892 (package
5893 (name "java-commons-collections4")
5894 (version "4.1")
5895 (source (origin
5896 (method url-fetch)
5897 (uri (string-append "mirror://apache/commons/collections/source/"
5898 "commons-collections4-" version "-src.tar.gz"))
5899 (sha256
5900 (base32
5901 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5902 (build-system ant-build-system)
5903 (arguments
5904 `(#:test-target "test"
5905 #:make-flags
5906 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5907 (junit #$(this-package-native-input "java-junit"))
5908 (easymock #$(this-package-native-input "java-easymock")))
5909 (list (string-append "-Djunit.jar="
5910 (car (find-files junit "jar$")))
5911 (string-append "-Dhamcrest.jar="
5912 (car (find-files hamcrest "jar$")))
5913 (string-append "-Deasymock.jar=" easymock
5914 "/share/java/easymock.jar")))
5915 #:phases
5916 (modify-phases %standard-phases
5917 (replace 'install
5918 (install-jars "target")))))
5919 (native-inputs
5920 (list java-junit java-hamcrest-core java-easymock))
5921 (home-page "https://commons.apache.org/collections/")
5922 (synopsis "Collections framework")
5923 (description "The Java Collections Framework is the recognised standard
5924for collection handling in Java. Commons-Collections seek to build upon the
5925JDK classes by providing new interfaces, implementations and utilities. There
5926are many features, including:
5927
5928@itemize
5929@item @code{Bag} interface for collections that have a number of copies of
5930 each object
5931@item @code{BidiMap} interface for maps that can be looked up from value to
5932 key as well and key to value
5933@item @code{MapIterator} interface to provide simple and quick iteration over
5934 maps
5935@item Transforming decorators that alter each object as it is added to the
5936 collection
5937@item Composite collections that make multiple collections look like one
5938@item Ordered maps and sets that retain the order elements are added in,
5939 including an LRU based map
5940@item Reference map that allows keys and/or values to be garbage collected
5941 under close control
5942@item Many comparator implementations
5943@item Many iterator implementations
5944@item Adapter classes from array and enumerations to collections
5945@item Utilities to test or create typical set-theory properties of collections
5946 such as union, intersection, and closure.
5947@end itemize\n")
5948 (license license:asl2.0)))
5949
5950(define-public java-commons-collections
5951 (package
5952 (inherit java-commons-collections4)
5953 (name "java-commons-collections")
5954 (version "3.2.2")
5955 (source (origin
5956 (method url-fetch)
5957 (uri (string-append "mirror://apache/commons/collections/source/"
5958 "commons-collections-" version "-src.tar.gz"))
5959 (sha256
5960 (base32
5961 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5962 (patches
5963 (search-patches "java-commons-collections-fix-java8.patch"))))
5964 (arguments
5965 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5966 ((#:phases phases)
5967 `(modify-phases ,phases
5968 ;; The manifest is required by the build procedure
5969 (add-before 'build 'add-manifest
5970 (lambda _
5971 (mkdir-p "build/conf")
5972 (call-with-output-file "build/conf/MANIFEST.MF"
5973 (lambda (file)
5974 (format file "Manifest-Version: 1.0\n")))
5975 #t))
5976 (replace 'install
5977 (install-jars "build"))))))))
5978
5979(define java-commons-collections-test-classes
5980 (package
5981 (inherit java-commons-collections)
5982 (arguments
5983 `(#:jar-name "commons-collections-test-classes.jar"
5984 #:source-dir "src/test"
5985 #:tests? #f))
5986 (inputs
5987 `(("collection" ,java-commons-collections)))))
5988
5989(define-public java-commons-beanutils
5990 (package
5991 (name "java-commons-beanutils")
5992 (version "1.9.3")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (string-append "mirror://apache/commons/beanutils/source/"
5996 "commons-beanutils-" version "-src.tar.gz"))
5997 (sha256
5998 (base32
5999 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
6000 (build-system ant-build-system)
6001 (arguments
6002 `(#:test-target "test"
6003 #:tests? #f
6004 #:phases
6005 (modify-phases %standard-phases
6006 (replace 'install
6007 (lambda* (#:key outputs #:allow-other-keys)
6008 (rename-file (string-append "dist/commons-beanutils-" ,version
6009 "-SNAPSHOT.jar")
6010 "commons-beanutils.jar")
6011 (install-file "commons-beanutils.jar"
6012 (string-append (assoc-ref outputs "out") "/share/java/"))
6013 #t)))))
6014 (inputs
6015 `(("logging" ,java-commons-logging-minimal)
6016 ("collections" ,java-commons-collections)))
6017 (native-inputs
6018 `(("junit" ,java-junit)
6019 ("collections-test" ,java-commons-collections-test-classes)))
6020 (home-page "https://commons.apache.org/beanutils/")
6021 (synopsis "Dynamically set or get properties in Java")
6022 (description "BeanUtils provides a simplified interface to reflection and
6023introspection to set or get dynamically determined properties through their
6024setter and getter method.")
6025 (license license:asl2.0)))
6026
6027(define-public java-commons-io
6028 (package
6029 (name "java-commons-io")
6030 (version "2.5")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (string-append "mirror://apache/commons/io/source/"
6035 "commons-io-" version "-src.tar.gz"))
6036 (sha256
6037 (base32
6038 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6039 (build-system ant-build-system)
6040 (outputs '("out" "doc"))
6041 (arguments
6042 `(#:test-target "test"
6043 #:make-flags
6044 ,#~(list (string-append "-Djunit.jar="
6045 (car (find-files #$(this-package-native-input "java-junit")
6046 "jar$"))))
6047 #:phases
6048 (modify-phases %standard-phases
6049 (add-after 'build 'build-javadoc ant-build-javadoc)
6050 (replace 'install (install-from-pom "pom.xml"))
6051 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6052 (native-inputs
6053 (list java-junit java-hamcrest-core))
6054 (propagated-inputs
6055 (list apache-commons-parent-pom-39))
6056 (home-page "https://commons.apache.org/io/")
6057 (synopsis "Common useful IO related classes")
6058 (description "Commons-IO contains utility classes, stream implementations,
6059file filters and endian classes.")
6060 (license license:asl2.0)))
6061
6062(define-public java-commons-io-latest
6063 (package
6064 (inherit java-commons-io)
6065 (version "2.21.0")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (string-append "mirror://apache/commons/io/source/"
6070 "commons-io-" version "-src.tar.gz"))
6071 (sha256
6072 (base32
6073 "0rr6hb8mm7fd6nrr8f81mvdpfalq01k03l3mzrlxx7g7lda40mb3"))))
6074 (outputs '("out"))
6075 (arguments
6076 `(#:tests? #f ;; tests require too many not yet packaged packages
6077 #:source-dir "src/main/java"
6078 #:jar-name "commons-io.jar"
6079 #:phases
6080 (modify-phases %standard-phases
6081 (replace 'install (install-from-pom "pom.xml")))))
6082 (native-inputs
6083 (list))
6084 (propagated-inputs
6085 (list apache-commons-parent-pom-78))))
6086
6087(define-public java-commons-exec-1.1
6088 (package
6089 (name "java-commons-exec")
6090 (version "1.1")
6091 (source
6092 (origin
6093 (method url-fetch)
6094 (uri (string-append "mirror://apache/commons/exec/source/"
6095 "commons-exec-" version "-src.tar.gz"))
6096 (sha256
6097 (base32
6098 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6099 (build-system ant-build-system)
6100 (arguments
6101 `(#:test-target "test"
6102 #:make-flags
6103 ,#~(list (string-append "-Dmaven.junit.jar="
6104 (car (find-files #$(this-package-native-input "java-junit")
6105 "jar$"))))
6106 #:phases
6107 (modify-phases %standard-phases
6108 (add-before 'build 'delete-network-tests
6109 (lambda _
6110 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6111 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6112 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6113 #t))
6114 ;; The "build" phase automatically tests.
6115 (delete 'check)
6116 (replace 'install (install-jars "target")))))
6117 (native-inputs
6118 (list java-junit))
6119 (home-page "https://commons.apache.org/proper/commons-exec/")
6120 (synopsis "Common program execution related classes")
6121 (description "Commons-Exec simplifies executing external processes.")
6122 (license license:asl2.0)))
6123
6124(define-public java-commons-exec
6125 (package
6126 (inherit java-commons-exec-1.1)
6127 (version "1.3")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (string-append "mirror://apache/commons/exec/source/"
6132 "commons-exec-" version "-src.tar.gz"))
6133 (sha256
6134 (base32
6135 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6136 (arguments
6137 `(#:test-target "test"
6138 #:make-flags
6139 ,#~(list (string-append "-Dmaven.junit.jar="
6140 (car (find-files #$(this-package-native-input "java-junit")
6141 "jar$")))
6142 "-Dmaven.compiler.source=1.7"
6143 "-Dmaven.compiler.target=1.7")
6144 #:phases
6145 (modify-phases %standard-phases
6146 (add-before 'build 'delete-network-tests
6147 (lambda* (#:key inputs #:allow-other-keys)
6148 ;; This test hangs indefinitely.
6149 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6150 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6151 (("ping -c 10 127.0.0.1") "sleep 10"))
6152 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6153 (("/bin/ls") "ls"))
6154 (call-with-output-file "src/test/scripts/ping.sh"
6155 (lambda (port)
6156 (format port "#!~a/bin/sh\nsleep $1\n"
6157 (assoc-ref inputs "bash"))))
6158 #t))
6159 ;; The "build" phase automatically tests.
6160 (delete 'check)
6161 (replace 'install (install-jars "target")))))
6162 (native-inputs
6163 (list java-junit java-hamcrest-core))))
6164
6165(define-public java-commons-lang
6166 (package
6167 (name "java-commons-lang")
6168 (version "2.6")
6169 (source
6170 (origin
6171 (method url-fetch)
6172 (uri (string-append "mirror://apache/commons/lang/source/"
6173 "commons-lang-" version "-src.tar.gz"))
6174 (sha256
6175 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6176 (build-system ant-build-system)
6177 (outputs '("out" "doc"))
6178 (arguments
6179 `(#:test-target "test"
6180 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6181 #:phases
6182 (modify-phases %standard-phases
6183 (add-after 'build 'build-javadoc ant-build-javadoc)
6184 (add-before 'check 'disable-failing-test
6185 (lambda _
6186 ;; Disable a failing test
6187 (substitute* "src/test/java/org/apache/commons/lang/\
6188time/FastDateFormatTest.java"
6189 (("public void testFormat\\(\\)")
6190 "public void disabled_testFormat()"))
6191 #t))
6192 (replace 'install (install-jars "target"))
6193 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6194 (native-inputs
6195 (list java-junit))
6196 (home-page "https://commons.apache.org/lang/")
6197 (synopsis "Extension of the java.lang package")
6198 (description "The Commons Lang components contains a set of Java classes
6199that provide helper methods for standard Java classes, especially those found
6200in the @code{java.lang} package in the Sun JDK. The following classes are
6201included:
6202
6203@itemize
6204@item StringUtils - Helper for @code{java.lang.String}.
6205@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6206 of characters such as @code{[a-z]} and @code{[abcdez]}.
6207@item RandomStringUtils - Helper for creating randomised strings.
6208@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6209@item NumberRange - A range of numbers with an upper and lower bound.
6210@item ObjectUtils - Helper for @code{java.lang.Object}.
6211@item SerializationUtils - Helper for serializing objects.
6212@item SystemUtils - Utility class defining the Java system properties.
6213@item NestedException package - A sub-package for the creation of nested
6214 exceptions.
6215@item Enum package - A sub-package for the creation of enumerated types.
6216@item Builder package - A sub-package for the creation of @code{equals},
6217 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6218@end itemize\n")
6219 (license license:asl2.0)))
6220
6221(define-public java-commons-lang3
6222 (package
6223 (name "java-commons-lang3")
6224 (version "3.20.0")
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (string-append "mirror://apache/commons/lang/source/"
6229 "commons-lang3-" version "-src.tar.gz"))
6230 (sha256
6231 (base32 "05b2zfmw1y6bnzf7v32zkhix0c0sab82lmr3ilxciza0l5w6nwya"))))
6232 (build-system ant-build-system)
6233 (arguments
6234 `(#:jar-name "commons-lang3.jar"
6235 #:source-dir "src/main/java"
6236 #:tests? #f; require junit5
6237 #:phases
6238 (modify-phases %standard-phases
6239 (replace 'install (install-from-pom "pom.xml")))))
6240 (propagated-inputs
6241 (list apache-commons-parent-pom-92))
6242 (home-page "https://commons.apache.org/lang/")
6243 (synopsis "Extension of the java.lang package")
6244 (description "The Commons Lang components contains a set of Java classes
6245that provide helper methods for standard Java classes, especially those found
6246in the @code{java.lang} package. The following classes are included:
6247
6248@itemize
6249@item StringUtils - Helper for @code{java.lang.String}.
6250@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6251 characters such as @code{[a-z]} and @code{[abcdez]}.
6252@item RandomStringUtils - Helper for creating randomised strings.
6253@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6254@item NumberRange - A range of numbers with an upper and lower bound.
6255@item ObjectUtils - Helper for @code{java.lang.Object}.
6256@item SerializationUtils - Helper for serializing objects.
6257@item SystemUtils - Utility class defining the Java system properties.
6258@item NestedException package - A sub-package for the creation of nested
6259 exceptions.
6260@item Enum package - A sub-package for the creation of enumerated types.
6261@item Builder package - A sub-package for the creation of @code{equals},
6262 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6263@end itemize\n")
6264 (license license:asl2.0)))
6265
6266(define-public java-commons-bsf
6267 (package
6268 (name "java-commons-bsf")
6269 (version "2.4.0")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6273 version ".tar.gz"))
6274 (sha256
6275 (base32
6276 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6277 (modules '((guix build utils)))
6278 (snippet
6279 '(begin
6280 (for-each delete-file
6281 (find-files "." "\\.jar$"))
6282 #t))))
6283 (build-system ant-build-system)
6284 (arguments
6285 `(#:build-target "jar"
6286 #:tests? #f; No test file
6287 #:modules ((guix build ant-build-system)
6288 (guix build utils)
6289 (guix build java-utils)
6290 (sxml simple))
6291 #:phases
6292 (modify-phases %standard-phases
6293 (add-before 'build 'create-properties
6294 (lambda _
6295 ;; This file is missing from the distribution
6296 (call-with-output-file "build-properties.xml"
6297 (lambda (port)
6298 (sxml->xml
6299 `(project (@ (basedir ".") (name "build-properties") (default ""))
6300 (property (@ (name "project.name") (value "bsf")))
6301 (property (@ (name "source.level") (value "1.5")))
6302 (property (@ (name "build.lib") (value "build/jar")))
6303 (property (@ (name "src.dir") (value "src")))
6304 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6305 (property (@ (name "build.tests") (value "build/test-classes")))
6306 (property (@ (name "build.dest") (value "build/classes"))))
6307 port)))
6308 #t))
6309 (replace 'install (install-jars "build")))))
6310 (native-inputs
6311 (list java-junit))
6312 (inputs
6313 (list java-commons-logging-minimal))
6314 (home-page "https://commons.apache.org/proper/commons-bsf")
6315 (synopsis "Bean Scripting Framework")
6316 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6317which provides scripting language support within Java applications, and access
6318to Java objects and methods from scripting languages. BSF allows one to write
6319JSPs in languages other than Java while providing access to the Java class
6320library. In addition, BSF permits any Java application to be implemented in
6321part (or dynamically extended) by a language that is embedded within it. This
6322is achieved by providing an API that permits calling scripting language engines
6323from within Java, as well as an object registry that exposes Java objects to
6324these scripting language engines.")
6325 (properties '((upstream-name . "bsf")))
6326 (license license:asl2.0)))
6327
6328(define-public java-commons-jxpath
6329 (package
6330 (name "java-commons-jxpath")
6331 (version "1.3")
6332 (source (origin
6333 (method url-fetch)
6334 (uri (string-append "mirror://apache/commons/jxpath/source/"
6335 "commons-jxpath-" version "-src.tar.gz"))
6336 (sha256
6337 (base32
6338 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6339 (build-system ant-build-system)
6340 (arguments
6341 `(#:jar-name "commons-jxpath.jar"
6342 ;; tests require more dependencies, including mockrunner which depends on old software
6343 #:tests? #f
6344 #:source-dir "src/java"))
6345 (inputs
6346 `(("servlet" ,java-classpathx-servletapi)
6347 ("java-jdom" ,java-jdom)
6348 ("java-commons-beanutils" ,java-commons-beanutils)))
6349 (native-inputs
6350 (list java-junit))
6351 (home-page "https://commons.apache.org/jxpath/")
6352 (synopsis "Simple interpreter of an expression language called XPath")
6353 (description "The org.apache.commons.jxpath package defines a simple
6354interpreter of an expression language called XPath. JXPath applies XPath
6355expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6356contexts, DOM etc, including mixtures thereof.")
6357 (license license:asl2.0)))
6358
6359(define-public java-commons-pool
6360 (package
6361 (name "java-commons-pool")
6362 (version "2.6.2")
6363 (source (origin
6364 (method url-fetch)
6365 (uri (string-append "mirror://apache/commons/pool/source/"
6366 "commons-pool2-" version "-src.tar.gz"))
6367 (sha256
6368 (base32
6369 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6370 (arguments
6371 `(#:jar-name "common-pool.jar"
6372 #:source-dir "src/main/java"
6373 #:test-exclude
6374 (list "**/PerformanceTest.java")))
6375 (build-system ant-build-system)
6376 (inputs
6377 (list java-cglib))
6378 (native-inputs
6379 (list java-junit java-hamcrest-core java-asm java-objenesis))
6380 (home-page "https://commons.apache.org/proper/commons-pool/")
6381 (synopsis "Object-pooling API in Java")
6382 (description "The commons-pool package provides an object-pooling API
6383and a number of object pool implementations. This package defines a
6384handful of pooling interfaces and some base classes that may be useful when
6385creating new pool implementations.")
6386 (properties '((upstream-name . "commons-pool2")))
6387 (license license:asl2.0)))
6388
6389(define-public java-commons-dbcp
6390 (package
6391 (name "java-commons-dbcp")
6392 (version "2.6.0")
6393 (source (origin
6394 (method url-fetch)
6395 (uri (string-append "mirror://apache/commons/dbcp/source/"
6396 "commons-dbcp2-" version "-src.tar.gz"))
6397 (sha256
6398 (base32
6399 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6400 (arguments
6401 `(#:source-dir "src/main/java"
6402 #:jar-name "java-commons-dbcp.jar"
6403 #:tests? #f)); requires apache-geronimo
6404 (inputs
6405 `(("java-commons-pool" ,java-commons-pool)
6406 ("java-commons-logging" ,java-commons-logging-minimal)
6407 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6408 (native-inputs
6409 (list java-junit))
6410 (build-system ant-build-system)
6411 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6412 (synopsis "Database Connection Pool for Java")
6413 (description "Commons-dbcp allows you to share a pool of database
6414connections between users. Creating a new connection for each user can be
6415time consuming and even unfeasible when the number of simultaneous users is
6416very large. This package provides a way to share a poole of connections to
6417reduce that load.")
6418 (properties '((upstream-name . "commons-dbcp2")))
6419 (license license:asl2.0)))
6420
6421(define-public java-commons-jcs
6422 (package
6423 (name "java-commons-jcs")
6424 (version "3.1")
6425 (source (origin
6426 (method url-fetch)
6427 (uri (string-append "mirror://apache/commons/jcs/source/"
6428 "commons-jcs3-dist-" version "-src.tar.gz"))
6429 (sha256
6430 (base32
6431 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6432 (build-system ant-build-system)
6433 (arguments
6434 `(#:jar-name "commons-jcs.jar"
6435 #:source-dir "commons-jcs-core/src/main/java"
6436 #:test-dir "commons-jcs-core/src/test"
6437 #:tests? #f; requires hsqldb
6438 #:phases
6439 (modify-phases %standard-phases
6440 (add-before 'build 'copy-resources
6441 (lambda _
6442 (copy-recursively "commons-jcs-core/src/main/resources"
6443 "build/classes"))))))
6444 (propagated-inputs
6445 (list java-classpathx-servletapi
6446 java-commons-dbcp
6447 java-httpcomponents-httpclient
6448 java-httpcomponents-httpcore
6449 java-log4j-api))
6450 (native-inputs
6451 (list java-junit))
6452 (home-page "https://commons.apache.org/proper/commons-jcs/")
6453 (synopsis "Distributed caching system in Java")
6454 (description "JCS is a distributed caching system written in Java. It
6455is intended to speed up applications by providing a means to manage cached
6456data of various dynamic natures. Like any caching system, JCS is most useful
6457for high read, low put applications. Latency times drop sharply and
6458bottlenecks move away from the database in an effectively cached system.")
6459 (properties '((upstream-name . "commons-jcs3-dist")))
6460 (license license:asl2.0)))
6461
6462(define-public java-jsr250
6463 (package
6464 (name "java-jsr250")
6465 (version "1.3")
6466 (source (origin
6467 (method git-fetch)
6468 (uri (git-reference
6469 (url "https://github.com/javaee/javax.annotation")
6470 (commit version)))
6471 (file-name (git-file-name name version))
6472 (sha256
6473 (base32
6474 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6475 (build-system ant-build-system)
6476 (arguments
6477 `(#:tests? #f ; no tests included
6478 #:jdk ,icedtea-8
6479 #:jar-name "jsr250.jar"
6480 #:phases
6481 (modify-phases %standard-phases
6482 (replace 'install
6483 (install-from-pom "pom.xml")))))
6484 (propagated-inputs (list java-jvnet-parent-pom-3))
6485 (home-page "https://jcp.org/en/jsr/detail?id=250")
6486 (synopsis "Security-related annotations")
6487 (description "This package provides annotations for security. It provides
6488packages in the @code{javax.annotation} and @code{javax.annotation.security}
6489namespaces.")
6490 ;; either cddl or gpl2 only, with classpath exception
6491 (license (list license:cddl1.0
6492 license:gpl2))))
6493
6494(define-public java-jsr305
6495 (package
6496 (name "java-jsr305")
6497 (version "3.0.1")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "https://repo1.maven.org/maven2/"
6501 "com/google/code/findbugs/"
6502 "jsr305/" version "/jsr305-"
6503 version "-sources.jar"))
6504 (sha256
6505 (base32
6506 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6507 (build-system ant-build-system)
6508 (arguments
6509 `(#:tests? #f ; no tests included
6510 #:jar-name "jsr305.jar"
6511 #:phases
6512 (modify-phases %standard-phases
6513 (add-before 'install 'create-pom
6514 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6515 (replace 'install
6516 (install-from-pom "pom.xml")))))
6517 (home-page "https://findbugs.sourceforge.net/")
6518 (synopsis "Annotations for the static analyzer called findbugs")
6519 (description "This package provides annotations for the findbugs package.
6520It provides packages in the @code{javax.annotations} namespace.")
6521 (license license:asl2.0)))
6522
6523(define-public java-error-prone-annotations
6524 (package
6525 (name "java-error-prone-annotations")
6526 (version "2.18.0")
6527 (source (origin
6528 (method git-fetch)
6529 (uri (git-reference
6530 (url "https://github.com/google/error-prone")
6531 (commit (string-append "v" version))))
6532 (file-name (git-file-name "java-error-prone" version))
6533 (sha256
6534 (base32
6535 "19sqsz0b308rhadr3ff10azdbqjq37nvrn9c06224dwpxap0931f"))))
6536 (build-system ant-build-system)
6537 (arguments
6538 `(#:tests? #f; no tests
6539 #:jar-name (string-append ,name "-" ,version ".jar")
6540 #:source-dir "annotations/src/main/java"
6541 #:test-dir "annotations/src/altest"
6542 #:phases
6543 (modify-phases %standard-phases
6544 (replace 'install (install-from-pom "annotations/pom.xml")))))
6545 (propagated-inputs (list java-error-prone-parent-pom java-jsr305))
6546 (home-page "https://errorprone.info")
6547 (synopsis "Java static analyzer at compile-time")
6548 (description "Error Prone is a static analysis tool for Java that catches
6549common programming mistakes at compile-time. This package contains annotations
6550used by programmers to guide the static analysis.")
6551 (license license:asl2.0)))
6552
6553(define java-error-prone-parent-pom
6554 (package
6555 (inherit java-error-prone-annotations)
6556 (name "java-error-prone-parent-pom")
6557 (arguments
6558 `(#:tests? #f
6559 #:phases
6560 (modify-phases %standard-phases
6561 (delete 'configure)
6562 (delete 'build)
6563 (replace 'install
6564 (install-pom-file "pom.xml")))))
6565 (propagated-inputs '())))
6566
6567(define-public java-guava
6568 (package
6569 (name "java-guava")
6570 (version "31.1")
6571 (source (origin
6572 (method git-fetch)
6573 (uri (git-reference
6574 (url "https://github.com/google/guava/")
6575 (commit (string-append "v" version))))
6576 (file-name (git-file-name name version))
6577 (sha256
6578 (base32
6579 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
6580 (patches
6581 (search-patches "java-guava-remove-annotation-deps.patch"))))
6582 (build-system ant-build-system)
6583 (arguments
6584 `(#:tests? #f ; no tests included
6585 #:jar-name "guava.jar"
6586 #:source-dir "guava/src"
6587 #:phases
6588 (modify-phases %standard-phases
6589 (add-after 'unpack 'trim-sources
6590 (lambda _
6591 (with-directory-excursion "guava/src/com/google/common"
6592 ;; Remove annotations to avoid extra dependencies:
6593 ;; * "j2objc" annotations are used when converting Java to
6594 ;; Objective C;
6595 ;; * "IgnoreJRERequirement" is used for Android.
6596 ;; * "Nullable" is used to catch NPE at build time.
6597 (substitute* (find-files "." "\\.java$")
6598 (("import com.google.j2objc.*") "")
6599 (("import org.checkerframework.checker.*") "")
6600 (("@ReflectionSupport.*") "")
6601 (("@WeakOuter") "")
6602 (("@RetainedWith") "")
6603 (("@Weak") "")
6604 (("@J2ObjCIncompatible") "")
6605 (("@IgnoreJRERequirement") "")
6606 (("@Nullable") "")))))
6607 ;; This is required by guava, but this is just an empty stub
6608 (add-before 'install 'install-listenablefuture-stub
6609 (install-pom-file "futures/listenablefuture9999/pom.xml"))
6610 (replace 'install (install-from-pom "guava/pom.xml")))))
6611 (inputs
6612 (list java-error-prone-annotations java-jsr305))
6613 (propagated-inputs
6614 (list java-guava-futures-failureaccess java-guava-parent-pom))
6615 (home-page "https://github.com/google/guava")
6616 (synopsis "Google core libraries for Java")
6617 (description "Guava is a set of core libraries that includes new
6618collection types (such as multimap and multiset), immutable collections, a
6619graph library, functional types, an in-memory cache, and APIs/utilities for
6620concurrency, I/O, hashing, primitives, reflection, string processing, and much
6621more!")
6622 (license license:asl2.0)))
6623
6624(define-public java-guava-futures-failureaccess
6625 (package
6626 (inherit java-guava)
6627 (name "java-guava-futures-failureaccess")
6628 (arguments
6629 `(#:tests? #f; no tests
6630 #:jar-name "guava-futures-failureaccess.jar"
6631 #:source-dir "futures/failureaccess/src"
6632 #:phases
6633 (modify-phases %standard-phases
6634 (replace 'install
6635 (install-from-pom "futures/failureaccess/pom.xml")))))
6636 (propagated-inputs
6637 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6638
6639(define java-guava-parent-pom
6640 (package
6641 (inherit java-guava)
6642 (name "java-guava-parent-pom")
6643 (arguments
6644 `(#:tests? #f
6645 #:phases
6646 (modify-phases %standard-phases
6647 (delete 'configure)
6648 (delete 'build)
6649 (replace 'install
6650 (install-pom-file "pom.xml")))))
6651 (propagated-inputs
6652 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6653
6654;; The java-commons-logging package provides adapters to many different
6655;; logging frameworks. To avoid an excessive dependency graph we try to build
6656;; it with only a minimal set of adapters.
6657(define-public java-commons-logging-minimal
6658 (package
6659 (name "java-commons-logging-minimal")
6660 (version "1.2")
6661 (source (origin
6662 (method url-fetch)
6663 (uri (string-append "mirror://apache/commons/logging/source/"
6664 "commons-logging-" version "-src.tar.gz"))
6665 (sha256
6666 (base32
6667 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6668 (build-system ant-build-system)
6669 (arguments
6670 `(#:tests? #f ; avoid dependency on logging frameworks
6671 #:jar-name "commons-logging-minimal.jar"
6672 #:phases
6673 (modify-phases %standard-phases
6674 (add-after 'unpack 'delete-adapters-and-tests
6675 (lambda _
6676 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6677 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6678 ;; is used by applications; SimpleLog is the only actually usable
6679 ;; implementation that does not depend on another logging
6680 ;; framework.
6681 (for-each
6682 (lambda (file)
6683 (delete-file (string-append
6684 "src/main/java/org/apache/commons/logging/impl/" file)))
6685 (list "Jdk13LumberjackLogger.java"
6686 "WeakHashtable.java"
6687 "Log4JLogger.java"
6688 "ServletContextCleaner.java"
6689 "Jdk14Logger.java"
6690 "AvalonLogger.java"
6691 "LogKitLogger.java"))
6692 (delete-file-recursively "src/test")
6693 #t)))))
6694 (home-page "https://commons.apache.org/logging/")
6695 (synopsis "Common API for logging implementations")
6696 (description "The Logging package is a thin bridge between different
6697logging implementations. A library that uses the commons-logging API can be
6698used with any logging implementation at runtime.")
6699 (properties '((upstream-name . "commons-logging")))
6700 (license license:asl2.0)))
6701
6702;; This is the last release of the 1.x series.
6703(define-public java-mockito-1
6704 (package
6705 (name "java-mockito")
6706 (version "1.10.19")
6707 (source (origin
6708 (method url-fetch)
6709 (uri (string-append "https://repo1.maven.org/maven2/"
6710 "org/mockito/mockito-core/" version
6711 "/mockito-core-" version "-sources.jar"))
6712 (sha256
6713 (base32
6714 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6715 (build-system ant-build-system)
6716 (arguments
6717 `(#:jar-name "mockito.jar"
6718 #:tests? #f ; no tests included
6719 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6720 ;; patches in build phases.
6721 #:phases
6722 (modify-phases %standard-phases
6723 ;; Mockito was developed against a different version of hamcrest,
6724 ;; which does not require matcher implementations to provide an
6725 ;; implementation of the "describeMismatch" method. We add this
6726 ;; simple definition to pass the build with our version of hamcrest.
6727 (add-after 'unpack 'fix-hamcrest-build-error
6728 (lambda _
6729 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6730 (("public Matcher getActualMatcher\\(\\) .*" line)
6731 (string-append "
6732 public void describeMismatch(Object item, Description description) {
6733 actualMatcher.describeMismatch(item, description);
6734 }"
6735 line)))
6736 #t))
6737 ;; Mockito bundles cglib. We have a cglib package, so let's use
6738 ;; that instead.
6739 (add-after 'unpack 'use-system-libraries
6740 (lambda _
6741 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6742 (substitute* '("CGLIBHacker.java"
6743 "CglibMockMaker.java"
6744 "ClassImposterizer.java"
6745 "DelegatingMockitoMethodProxy.java"
6746 "MethodInterceptorFilter.java"
6747 "MockitoNamingPolicy.java"
6748 "SerializableMockitoMethodProxy.java"
6749 "SerializableNoOp.java")
6750 (("import org.mockito.cglib") "import net.sf.cglib")))
6751 #t)))))
6752 (inputs
6753 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6754 (home-page "http://mockito.org")
6755 (synopsis "Mockito is a mock library for Java")
6756 (description "Mockito is a mocking library for Java which lets you write
6757tests with a clean and simple API. It generates mocks using reflection, and
6758it records all mock invocations, including methods arguments.")
6759 (license license:asl2.0)))
6760
6761(define-public java-httpcomponents-httpcore
6762 (package
6763 (name "java-httpcomponents-httpcore")
6764 (version "4.4.6")
6765 (source (origin
6766 (method url-fetch)
6767 (uri (string-append "mirror://apache/httpcomponents/httpcore/"
6768 "source/httpcomponents-core-"
6769 version "-src.tar.gz"))
6770 (sha256
6771 (base32
6772 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6773 (build-system ant-build-system)
6774 (arguments
6775 `(#:jar-name "httpcomponents-httpcore.jar"
6776 #:phases
6777 (modify-phases %standard-phases
6778 (add-after 'unpack 'chdir
6779 (lambda _ (chdir "httpcore") #t)))))
6780 (inputs
6781 (list java-commons-logging-minimal java-commons-lang3))
6782 (native-inputs
6783 (list java-junit java-mockito-1))
6784 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6785 (synopsis "Low level HTTP transport components")
6786 (description "HttpCore is a set of low level HTTP transport components
6787that can be used to build custom client and server side HTTP services with a
6788minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6789on the classic Java I/O and non-blocking, event driven I/O model based on Java
6790NIO.
6791
6792This package provides the blocking I/O model library.")
6793 (license license:asl2.0)))
6794
6795(define-public java-httpcomponents-httpcore-nio
6796 (package (inherit java-httpcomponents-httpcore)
6797 (name "java-httpcomponents-httpcore-nio")
6798 (arguments
6799 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6800 #:phases
6801 (modify-phases %standard-phases
6802 (add-after 'unpack 'chdir
6803 (lambda _ (chdir "httpcore-nio") #t)))))
6804 (inputs
6805 (modify-inputs inputs
6806 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6807 (description "HttpCore is a set of low level HTTP transport components
6808that can be used to build custom client and server side HTTP services with a
6809minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6810on the classic Java I/O and non-blocking, event driven I/O model based on Java
6811NIO.
6812
6813This package provides the non-blocking I/O model library based on Java
6814NIO.")))
6815
6816(define-public java-httpcomponents-httpcore-ab
6817 (package (inherit java-httpcomponents-httpcore)
6818 (name "java-httpcomponents-httpcore-ab")
6819 (arguments
6820 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6821 #:phases
6822 (modify-phases %standard-phases
6823 (add-after 'unpack 'chdir
6824 (lambda _ (chdir "httpcore-ab") #t)))))
6825 (inputs
6826 (modify-inputs inputs
6827 (prepend java-httpcomponents-httpcore java-commons-cli
6828 java-hamcrest-core)))
6829 (synopsis "Apache HttpCore benchmarking tool")
6830 (description "This package provides the HttpCore benchmarking tool. It is
6831an Apache AB clone based on HttpCore.")))
6832
6833(define-public java-httpcomponents-httpcore-osgi
6834 (package (inherit java-httpcomponents-httpcore)
6835 (name "java-httpcomponents-httpcore-osgi")
6836 (arguments
6837 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
6838 #:phases
6839 (modify-phases %standard-phases
6840 (add-after 'unpack 'chdir
6841 (lambda _ (chdir "httpcore-osgi"))))))
6842 (inputs
6843 (modify-inputs inputs
6844 (prepend java-httpcomponents-httpcore
6845 java-httpcomponents-httpcore-nio
6846 java-hamcrest-core)))
6847 (native-inputs (list java-ops4j-pax-exam-core
6848 java-ops4j-pax-exam-core-junit
6849 java-ops4j-pax-exam-core-spi
6850 java-junit))
6851 (description "HttpCore is a set of low level HTTP transport components
6852that can be used to build custom client and server side HTTP services with a
6853minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6854on the classic Java I/O and non-blocking, event driven I/O model based on Java
6855NIO.
6856
6857This package provides... some tests.")))
6858
6859(define-public java-httpcomponents-httpclient
6860 (package
6861 (name "java-httpcomponents-httpclient")
6862 (version "4.5.12")
6863 (source (origin
6864 (method url-fetch)
6865 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6866 "source/httpcomponents-client-"
6867 version "-src.tar.gz"))
6868 (sha256
6869 (base32
6870 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6871 (build-system ant-build-system)
6872 (arguments
6873 `(#:jar-name "httpcomponents-httpclient.jar"
6874 #:phases
6875 (modify-phases %standard-phases
6876 (add-after 'unpack 'chdir
6877 (lambda _ (chdir "httpclient") #t)))))
6878 (inputs
6879 (list java-commons-logging-minimal
6880 java-commons-codec
6881 java-hamcrest-core
6882 java-httpcomponents-httpcore
6883 java-mockito-1
6884 java-junit))
6885 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6886 (synopsis "HTTP client library for Java")
6887 (description "Although the @code{java.net} package provides basic
6888functionality for accessing resources via HTTP, it doesn't provide the full
6889flexibility or functionality needed by many applications. @code{HttpClient}
6890seeks to fill this void by providing an efficient, up-to-date, and
6891feature-rich package implementing the client side of the most recent HTTP
6892standards and recommendations.")
6893 (properties '((upstream-name . "httpcomponents-client")))
6894 (license license:asl2.0)))
6895
6896(define-public java-httpcomponents-httpclient-cache
6897 (package (inherit java-httpcomponents-httpclient)
6898 (name "java-httpcomponents-httpclient-cache")
6899 (arguments
6900 `(#:jar-name "httpcomponents-httpclient-cache.jar"
6901 #:source-dir "src/main/java"
6902 #:test-dir "src/test"
6903 #:tests? #f; tests are broken with current cglib.
6904 #:phases
6905 (modify-phases %standard-phases
6906 (add-after 'unpack 'delete-unused-impls
6907 (lambda _
6908 (for-each
6909 delete-file-recursively
6910 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
6911 "src/main/java/org/apache/http/impl/client/cache/memcached/"
6912 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
6913 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
6914 (add-after 'unpack 'chdir
6915 (lambda _ (chdir "httpclient-cache"))))))
6916 (inputs
6917 (modify-inputs inputs
6918 (prepend java-httpcomponents-httpclient
6919 java-httpcomponents-httpmime
6920 java-hamcrest-core)))
6921 (description "This package provides an API for caching accessed HTTP
6922resources.")))
6923
6924(define-public java-httpcomponents-httpclient-osgi
6925 (package (inherit java-httpcomponents-httpclient)
6926 (name "java-httpcomponents-httpclient-osgi")
6927 (arguments
6928 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
6929 #:tests? #f; tests are broken with current cglib.
6930 #:phases
6931 (modify-phases %standard-phases
6932 (add-after 'unpack 'chdir
6933 (lambda _ (chdir "httpclient-osgi") #t)))))
6934 (inputs
6935 (modify-inputs inputs
6936 (prepend java-httpcomponents-httpclient
6937 java-httpcomponents-httpclient-cache
6938 java-osgi-framework
6939 java-osgi-service-cm
6940 java-hamcrest-core)))))
6941
6942(define-public java-httpcomponents-httpmime
6943 (package (inherit java-httpcomponents-httpclient)
6944 (name "java-httpcomponents-httpmime")
6945 (arguments
6946 `(#:jar-name "httpcomponents-httpmime.jar"
6947 #:phases
6948 (modify-phases %standard-phases
6949 (add-after 'unpack 'chdir
6950 (lambda _ (chdir "httpmime") #t)))))
6951 (inputs
6952 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6953 java-junit java-hamcrest-core))))
6954
6955(define-public java-commons-net
6956 (package
6957 (name "java-commons-net")
6958 (version "3.6")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (string-append "mirror://apache/commons/net/source/"
6962 "commons-net-" version "-src.tar.gz"))
6963 (sha256
6964 (base32
6965 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6966 (build-system ant-build-system)
6967 (arguments
6968 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6969 ;; should be "resources/examples/examples.properties"), but gets "null"
6970 ;; instead.
6971 #:tests? #f
6972 #:jar-name "commons-net.jar"))
6973 (native-inputs
6974 (list java-junit java-hamcrest-core))
6975 (home-page "https://commons.apache.org/net/")
6976 (synopsis "Client library for many basic Internet protocols")
6977 (description "The Apache Commons Net library implements the client side of
6978many basic Internet protocols. The purpose of the library is to provide
6979fundamental protocol access, not higher-level abstractions.")
6980 (license license:asl2.0)))
6981
6982(define-public java-jsch
6983 (package
6984 (name "java-jsch")
6985 (version "0.1.55")
6986 (source (origin
6987 (method url-fetch)
6988 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6989 version "/jsch-" version ".zip"))
6990 (sha256
6991 (base32
6992 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6993 (build-system ant-build-system)
6994 (arguments
6995 `(#:build-target "dist"
6996 #:tests? #f ; no tests included
6997 #:phases
6998 (modify-phases %standard-phases
6999 (replace 'install (install-jars "dist")))))
7000 (native-inputs
7001 (list unzip))
7002 (home-page "http://www.jcraft.com/jsch/")
7003 (synopsis "Pure Java implementation of SSH2")
7004 (description "JSch is a pure Java implementation of SSH2. JSch allows you
7005to connect to an SSH server and use port forwarding, X11 forwarding, file
7006transfer, etc., and you can integrate its functionality into your own Java
7007programs.")
7008 (license license:bsd-3)))
7009
7010(define-public java-commons-compress
7011 (package
7012 (name "java-commons-compress")
7013 (version "1.28.0")
7014 (source (origin
7015 (method url-fetch)
7016 (uri (string-append "mirror://apache/commons/compress/source/"
7017 "commons-compress-" version "-src.tar.gz"))
7018 (sha256
7019 (base32
7020 "0qkn70dfb1f9xihc34mbpbr5ag8qm4qq18hh3p4286r2ajj0z1sw"))))
7021 (build-system ant-build-system)
7022 (arguments
7023 `(#:jar-name "commons-compress.jar"
7024 #:source-dir "src/main/java"
7025 #:tests? #f; requires java-mockito-3
7026 #:phases
7027 (modify-phases %standard-phases
7028 (replace 'install (install-from-pom "pom.xml")))))
7029 (propagated-inputs
7030 (list java-commons-lang3
7031 java-commons-io-latest
7032 java-commons-codec
7033 java-asm-9
7034 java-brotli
7035 java-xz
7036 java-zstd
7037 apache-commons-parent-pom-85))
7038 (home-page "https://commons.apache.org/proper/commons-compress/")
7039 (synopsis "Java library for working with compressed files")
7040 (description "The Apache Commons Compress library defines an API for
7041working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
7042Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
7043 (license license:asl2.0)))
7044
7045(define-public java-commons-compress-1.21
7046 (package
7047 (inherit java-commons-compress)
7048 (version "1.21")
7049 (source (origin
7050 (method url-fetch)
7051 (uri (string-append "mirror://apache/commons/compress/source/"
7052 "commons-compress-" version "-src.tar.gz"))
7053 (sha256
7054 (base32
7055 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
7056 (propagated-inputs
7057 (list java-asm-3
7058 java-brotli
7059 java-osgi-core
7060 java-xz
7061 java-zstd
7062 apache-commons-parent-pom-52))))
7063
7064(define-public java-commons-csv
7065 (package
7066 (name "java-commons-csv")
7067 (version "1.4")
7068 (source (origin
7069 (method url-fetch)
7070 (uri (string-append "mirror://apache/commons/csv/source/"
7071 "commons-csv-" version "-src.tar.gz"))
7072 (sha256
7073 (base32
7074 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
7075 (build-system ant-build-system)
7076 (arguments
7077 `(#:jar-name "commons-csv.jar"
7078 #:source-dir "src/main/java"
7079 #:tests? #f)); FIXME: requires java-h2
7080 (inputs
7081 `(("java-hamcrest-core" ,java-hamcrest-core)
7082 ("java-commons-io" ,java-commons-io)
7083 ("java-commons-lang3" ,java-commons-lang3)
7084 ("junit" ,java-junit)))
7085 (home-page "https://commons.apache.org/proper/commons-csv/")
7086 (synopsis "Read and write CSV documents")
7087 (description "Commons CSV reads and writes files in variations of the Comma
7088Separated Value (CSV) format. The most common CSV formats are predefined in the
7089CSVFormat class:
7090
7091@itemize
7092@item Microsoft Excel
7093@item Informix UNLOAD
7094@item Informix UNLOAD CSV
7095@item MySQL
7096@item RFC 4180
7097@item TDF
7098@end itemize
7099
7100Custom formats can be created using a fluent style API.")
7101 (license license:asl2.0)))
7102
7103(define-public java-osgi-annotation
7104 (package
7105 (name "java-osgi-annotation")
7106 (version "6.0.0")
7107 (source (origin
7108 (method url-fetch)
7109 (uri (string-append "https://repo1.maven.org/maven2/"
7110 "org/osgi/org.osgi.annotation/" version "/"
7111 "org.osgi.annotation-" version "-sources.jar"))
7112 (sha256
7113 (base32
7114 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
7115 (build-system ant-build-system)
7116 (arguments
7117 `(#:tests? #f ; no tests
7118 #:jar-name "osgi-annotation.jar"
7119 #:phases
7120 (modify-phases %standard-phases
7121 (add-before 'install 'create-pom
7122 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
7123 (replace 'install (install-from-pom "pom.xml")))))
7124 (home-page "https://www.osgi.org")
7125 (synopsis "Annotation module of OSGi framework")
7126 (description
7127 "OSGi, for Open Services Gateway initiative framework, is a module system
7128and service platform for the Java programming language. This package contains
7129the OSGi annotation module, providing additional services to help dynamic
7130components.")
7131 (license license:asl2.0)))
7132
7133(define-public java-osgi-core
7134 (package
7135 (name "java-osgi-core")
7136 (version "6.0.0")
7137 (source (origin
7138 (method url-fetch)
7139 (uri (string-append "https://repo1.maven.org/maven2/"
7140 "org/osgi/org.osgi.core/" version "/"
7141 "org.osgi.core-" version "-sources.jar"))
7142 (sha256
7143 (base32
7144 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
7145 (build-system ant-build-system)
7146 (arguments
7147 `(#:tests? #f ; no tests
7148 #:jar-name "osgi-core.jar"
7149 #:phases
7150 (modify-phases %standard-phases
7151 (add-before 'install 'create-pom
7152 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
7153 (replace 'install (install-from-pom "pom.xml")))))
7154 (inputs
7155 (list java-osgi-annotation))
7156 (home-page "https://www.osgi.org")
7157 (synopsis "Core module of OSGi framework")
7158 (description
7159 "OSGi, for Open Services Gateway initiative framework, is a module system
7160and service platform for the Java programming language. This package contains
7161the OSGi Core module.")
7162 (license license:asl2.0)))
7163
7164(define-public java-osgi-service-event
7165 (package
7166 (name "java-osgi-service-event")
7167 (version "1.3.1")
7168 (source (origin
7169 (method url-fetch)
7170 (uri (string-append "https://repo1.maven.org/maven2/"
7171 "org/osgi/org.osgi.service.event/"
7172 version "/org.osgi.service.event-"
7173 version "-sources.jar"))
7174 (sha256
7175 (base32
7176 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
7177 (build-system ant-build-system)
7178 (arguments
7179 `(#:tests? #f ; no tests
7180 #:jar-name "osgi-service-event.jar"))
7181 (inputs
7182 (list java-osgi-annotation java-osgi-core))
7183 (home-page "https://www.osgi.org")
7184 (synopsis "OSGi service event module")
7185 (description
7186 "OSGi, for Open Services Gateway initiative framework, is a module system
7187and service platform for the Java programming language. This package contains
7188the OSGi @code{org.osgi.service.event} module.")
7189 (license license:asl2.0)))
7190
7191(define-public java-eclipse-osgi
7192 (package
7193 (name "java-eclipse-osgi")
7194 (version "3.11.3")
7195 (source (origin
7196 (method url-fetch)
7197 (uri (string-append "https://repo1.maven.org/maven2/"
7198 "org/eclipse/platform/org.eclipse.osgi/"
7199 version "/org.eclipse.osgi-"
7200 version "-sources.jar"))
7201 (sha256
7202 (base32
7203 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7204 (build-system ant-build-system)
7205 (arguments
7206 `(#:tests? #f ; no tests included
7207 #:jar-name "eclipse-equinox-osgi.jar"))
7208 (inputs
7209 (list java-osgi-annotation))
7210 (home-page "https://www.eclipse.org/equinox/")
7211 (synopsis "Eclipse Equinox OSGi framework")
7212 (description "This package provides an implementation of the OSGi Core
7213specification.")
7214 (license license:epl1.0)))
7215
7216(define-public java-eclipse-equinox-common
7217 (package
7218 (name "java-eclipse-equinox-common")
7219 (version "3.10.200")
7220 (source (origin
7221 (method url-fetch)
7222 (uri (string-append "https://repo1.maven.org/maven2/"
7223 "org/eclipse/platform/org.eclipse.equinox.common/"
7224 version "/org.eclipse.equinox.common-"
7225 version "-sources.jar"))
7226 (sha256
7227 (base32
7228 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7229 (build-system ant-build-system)
7230 (arguments
7231 `(#:tests? #f ; no tests included
7232 #:jar-name "eclipse-equinox-common.jar"))
7233 (inputs
7234 (list java-eclipse-osgi))
7235 (home-page "https://www.eclipse.org/equinox/")
7236 (synopsis "Common Eclipse runtime")
7237 (description "This package provides the common Eclipse runtime.")
7238 (license license:epl1.0)))
7239
7240(define-public java-eclipse-core-jobs
7241 (package
7242 (name "java-eclipse-core-jobs")
7243 (version "3.8.0")
7244 (source (origin
7245 (method url-fetch)
7246 (uri (string-append "https://repo1.maven.org/maven2/"
7247 "org/eclipse/platform/org.eclipse.core.jobs/"
7248 version "/org.eclipse.core.jobs-"
7249 version "-sources.jar"))
7250 (sha256
7251 (base32
7252 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7253 (build-system ant-build-system)
7254 (arguments
7255 `(#:tests? #f ; no tests included
7256 #:jar-name "eclipse-core-jobs.jar"))
7257 (inputs
7258 (list java-eclipse-equinox-common java-eclipse-osgi))
7259 (home-page "https://www.eclipse.org/equinox/")
7260 (synopsis "Eclipse jobs mechanism")
7261 (description "This package provides the Eclipse jobs mechanism.")
7262 (license license:epl1.0)))
7263
7264(define-public java-eclipse-equinox-registry
7265 (package
7266 (name "java-eclipse-equinox-registry")
7267 (version "3.6.100")
7268 (source (origin
7269 (method url-fetch)
7270 (uri (string-append "https://repo1.maven.org/maven2/"
7271 "org/eclipse/platform/org.eclipse.equinox.registry/"
7272 version "/org.eclipse.equinox.registry-"
7273 version "-sources.jar"))
7274 (sha256
7275 (base32
7276 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7277 (build-system ant-build-system)
7278 (arguments
7279 `(#:tests? #f ; no tests included
7280 #:jar-name "eclipse-equinox-registry.jar"))
7281 (inputs
7282 (list java-eclipse-core-jobs java-eclipse-equinox-common
7283 java-eclipse-osgi))
7284 (home-page "https://www.eclipse.org/equinox/")
7285 (synopsis "Eclipse extension registry support")
7286 (description "This package provides support for the Eclipse extension
7287registry.")
7288 (license license:epl1.0)))
7289
7290(define-public java-eclipse-equinox-app
7291 (package
7292 (name "java-eclipse-equinox-app")
7293 (version "1.3.400")
7294 (source (origin
7295 (method url-fetch)
7296 (uri (string-append "https://repo1.maven.org/maven2/"
7297 "org/eclipse/platform/org.eclipse.equinox.app/"
7298 version "/org.eclipse.equinox.app-"
7299 version "-sources.jar"))
7300 (sha256
7301 (base32
7302 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7303 (build-system ant-build-system)
7304 (arguments
7305 `(#:tests? #f ; no tests included
7306 #:jar-name "eclipse-equinox-app.jar"))
7307 (inputs
7308 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7309 java-eclipse-osgi java-osgi-service-event))
7310 (home-page "https://www.eclipse.org/equinox/")
7311 (synopsis "Equinox application container")
7312 (description "This package provides the Equinox application container for
7313Eclipse.")
7314 (license license:epl1.0)))
7315
7316(define-public java-eclipse-equinox-preferences
7317 (package
7318 (name "java-eclipse-equinox-preferences")
7319 (version "3.6.1")
7320 (source (origin
7321 (method url-fetch)
7322 (uri (string-append "https://repo1.maven.org/maven2/"
7323 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7324 version "/org.eclipse.equinox.preferences-"
7325 version "-sources.jar"))
7326 (sha256
7327 (base32
7328 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7329 (build-system ant-build-system)
7330 (arguments
7331 `(#:tests? #f ; no tests included
7332 #:jar-name "eclipse-equinox-preferences.jar"))
7333 (inputs
7334 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7335 java-eclipse-osgi))
7336 (home-page "https://www.eclipse.org/equinox/")
7337 (synopsis "Eclipse preferences mechanism")
7338 (description "This package provides the Eclipse preferences mechanism with
7339the module @code{org.eclipse.equinox.preferences}.")
7340 (license license:epl1.0)))
7341
7342(define-public java-eclipse-core-contenttype
7343 (package
7344 (name "java-eclipse-core-contenttype")
7345 (version "3.5.100")
7346 (source (origin
7347 (method url-fetch)
7348 (uri (string-append "https://repo1.maven.org/maven2/"
7349 "org/eclipse/platform/org.eclipse.core.contenttype/"
7350 version "/org.eclipse.core.contenttype-"
7351 version "-sources.jar"))
7352 (sha256
7353 (base32
7354 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7355 (build-system ant-build-system)
7356 (arguments
7357 `(#:tests? #f ; no tests included
7358 #:jar-name "eclipse-core-contenttype.jar"))
7359 (inputs
7360 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
7361 java-eclipse-equinox-registry java-eclipse-osgi))
7362 (home-page "https://www.eclipse.org/")
7363 (synopsis "Eclipse content mechanism")
7364 (description "This package provides the Eclipse content mechanism in the
7365@code{org.eclipse.core.contenttype} module.")
7366 (license license:epl1.0)))
7367
7368(define-public java-eclipse-core-runtime
7369 (package
7370 (name "java-eclipse-core-runtime")
7371 (version "3.15.100")
7372 (source (origin
7373 (method url-fetch)
7374 (uri (string-append "https://repo1.maven.org/maven2/"
7375 "org/eclipse/platform/org.eclipse.core.runtime/"
7376 version "/org.eclipse.core.runtime-"
7377 version "-sources.jar"))
7378 (sha256
7379 (base32
7380 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7381 (build-system ant-build-system)
7382 (arguments
7383 `(#:tests? #f ; no tests included
7384 #:jar-name "eclipse-core-runtime.jar"))
7385 (inputs
7386 (list java-eclipse-core-contenttype
7387 java-eclipse-core-jobs
7388 java-eclipse-equinox-app
7389 java-eclipse-equinox-common
7390 java-eclipse-equinox-registry
7391 java-eclipse-equinox-preferences
7392 java-eclipse-osgi))
7393 (home-page "https://www.eclipse.org/")
7394 (synopsis "Eclipse core runtime")
7395 (description "This package provides the Eclipse core runtime with the
7396module @code{org.eclipse.core.runtime}.")
7397 (license license:epl1.0)))
7398
7399(define-public java-eclipse-core-filesystem
7400 (package
7401 (name "java-eclipse-core-filesystem")
7402 (version "1.6.1")
7403 (source (origin
7404 (method url-fetch)
7405 (uri (string-append "https://repo1.maven.org/maven2/"
7406 "org/eclipse/platform/org.eclipse.core.filesystem/"
7407 version "/org.eclipse.core.filesystem-"
7408 version "-sources.jar"))
7409 (sha256
7410 (base32
7411 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7412 (build-system ant-build-system)
7413 (arguments
7414 `(#:tests? #f ; no tests included
7415 #:jar-name "eclipse-core-filesystem.jar"))
7416 (inputs
7417 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7418 java-eclipse-osgi))
7419 (home-page "https://www.eclipse.org/")
7420 (synopsis "Eclipse core file system")
7421 (description "This package provides the Eclipse core file system with the
7422module @code{org.eclipse.core.filesystem}.")
7423 (license license:epl1.0)))
7424
7425(define-public java-eclipse-core-expressions
7426 (package
7427 (name "java-eclipse-core-expressions")
7428 (version "3.5.100")
7429 (source (origin
7430 (method url-fetch)
7431 (uri (string-append "https://repo1.maven.org/maven2/"
7432 "org/eclipse/platform/org.eclipse.core.expressions/"
7433 version "/org.eclipse.core.expressions-"
7434 version "-sources.jar"))
7435 (sha256
7436 (base32
7437 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7438 (build-system ant-build-system)
7439 (arguments
7440 `(#:tests? #f ; no tests included
7441 #:jar-name "eclipse-core-expressions.jar"))
7442 (inputs
7443 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7444 java-eclipse-equinox-preferences java-eclipse-core-runtime
7445 java-eclipse-osgi))
7446 (home-page "https://www.eclipse.org/")
7447 (synopsis "Eclipse core expression language")
7448 (description "This package provides the Eclipse core expression language
7449with the @code{org.eclipse.core.expressions} module.")
7450 (license license:epl1.0)))
7451
7452(define-public java-eclipse-core-variables
7453 (package
7454 (name "java-eclipse-core-variables")
7455 (version "3.3.0")
7456 (source (origin
7457 (method url-fetch)
7458 (uri (string-append "https://repo1.maven.org/maven2/"
7459 "org/eclipse/platform/org.eclipse.core.variables/"
7460 version "/org.eclipse.core.variables-"
7461 version "-sources.jar"))
7462 (sha256
7463 (base32
7464 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7465 (build-system ant-build-system)
7466 (arguments
7467 `(#:tests? #f ; no tests included
7468 #:jar-name "eclipse-core-variables.jar"))
7469 (inputs
7470 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7471 java-eclipse-equinox-preferences java-eclipse-core-runtime
7472 java-eclipse-osgi))
7473 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7474 (synopsis "Eclipse core variables")
7475 (description "This package provides the Eclipse core variables module
7476@code{org.eclipse.core.variables}.")
7477 (license license:epl1.0)))
7478
7479(define-public java-eclipse-ant-core
7480 (package
7481 (name "java-eclipse-ant-core")
7482 (version "3.4.100")
7483 (source (origin
7484 (method url-fetch)
7485 (uri (string-append "https://repo1.maven.org/maven2/"
7486 "org/eclipse/platform/org.eclipse.ant.core/"
7487 version "/org.eclipse.ant.core-"
7488 version "-sources.jar"))
7489 (sha256
7490 (base32
7491 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7492 (build-system ant-build-system)
7493 (arguments
7494 `(#:tests? #f ; no tests included
7495 #:jar-name "eclipse-ant-core.jar"))
7496 (inputs
7497 (list java-eclipse-equinox-app
7498 java-eclipse-equinox-common
7499 java-eclipse-equinox-registry
7500 java-eclipse-equinox-preferences
7501 java-eclipse-core-contenttype
7502 java-eclipse-core-runtime
7503 java-eclipse-core-variables
7504 java-eclipse-osgi))
7505 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7506 (synopsis "Ant build tool core libraries")
7507 (description "This package provides the ant build tool core libraries with
7508the module @code{org.eclipse.ant.core}.")
7509 (license license:epl1.0)))
7510
7511(define-public java-eclipse-core-resources
7512 (package
7513 (name "java-eclipse-core-resources")
7514 (version "3.13.200")
7515 (source (origin
7516 (method url-fetch)
7517 (uri (string-append "https://repo1.maven.org/maven2/"
7518 "org/eclipse/platform/org.eclipse.core.resources/"
7519 version "/org.eclipse.core.resources-"
7520 version "-sources.jar"))
7521 (sha256
7522 (base32
7523 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7524 (build-system ant-build-system)
7525 (arguments
7526 `(#:tests? #f ; no tests included
7527 #:jar-name "eclipse-core-resources.jar"))
7528 (inputs
7529 (list java-eclipse-equinox-common
7530 java-eclipse-equinox-preferences
7531 java-eclipse-equinox-registry
7532 java-eclipse-core-contenttype
7533 java-eclipse-core-expressions
7534 java-eclipse-core-filesystem
7535 java-eclipse-core-jobs
7536 java-eclipse-core-runtime
7537 java-eclipse-ant-core
7538 java-eclipse-osgi))
7539 (home-page "https://www.eclipse.org/")
7540 (synopsis "Eclipse core resource management")
7541 (description "This package provides the Eclipse core resource management
7542module @code{org.eclipse.core.resources}.")
7543 (license license:epl1.0)))
7544
7545(define-public java-eclipse-compare-core
7546 (package
7547 (name "java-eclipse-compare-core")
7548 (version "3.6.0")
7549 (source (origin
7550 (method url-fetch)
7551 (uri (string-append "https://repo1.maven.org/maven2/"
7552 "org/eclipse/platform/org.eclipse.compare.core/"
7553 version "/org.eclipse.compare.core-"
7554 version "-sources.jar"))
7555 (sha256
7556 (base32
7557 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7558 (build-system ant-build-system)
7559 (arguments
7560 `(#:tests? #f ; no tests included
7561 #:jar-name "eclipse-compare-core.jar"))
7562 (inputs
7563 (list java-eclipse-core-runtime java-eclipse-equinox-common
7564 java-eclipse-osgi java-icu4j))
7565 (home-page "https://www.eclipse.org/")
7566 (synopsis "Eclipse core compare support")
7567 (description "This package provides the Eclipse core compare support
7568module @code{org.eclipse.compare.core}.")
7569 (license license:epl1.0)))
7570
7571(define-public java-eclipse-team-core
7572 (package
7573 (name "java-eclipse-team-core")
7574 (version "3.8.0")
7575 (source (origin
7576 (method url-fetch)
7577 (uri (string-append "https://repo1.maven.org/maven2/"
7578 "org/eclipse/platform/org.eclipse.team.core/"
7579 version "/org.eclipse.team.core-"
7580 version "-sources.jar"))
7581 (sha256
7582 (base32
7583 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7584 (build-system ant-build-system)
7585 (arguments
7586 `(#:tests? #f ; no tests included
7587 #:jar-name "eclipse-team-core.jar"))
7588 (inputs
7589 (list java-eclipse-compare-core
7590 java-eclipse-core-contenttype
7591 java-eclipse-core-filesystem
7592 java-eclipse-core-jobs
7593 java-eclipse-core-resources
7594 java-eclipse-core-runtime
7595 java-eclipse-equinox-common
7596 java-eclipse-equinox-registry
7597 java-eclipse-equinox-preferences
7598 java-eclipse-osgi))
7599 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7600 (synopsis "Eclipse team support core")
7601 (description "This package provides the Eclipse team support core module
7602@code{org.eclipse.team.core}.")
7603 (license license:epl1.0)))
7604
7605(define-public java-eclipse-core-commands
7606 (package
7607 (name "java-eclipse-core-commands")
7608 (version "3.8.1")
7609 (source (origin
7610 (method url-fetch)
7611 (uri (string-append "https://repo1.maven.org/maven2/"
7612 "org/eclipse/platform/org.eclipse.core.commands/"
7613 version "/org.eclipse.core.commands-"
7614 version "-sources.jar"))
7615 (sha256
7616 (base32
7617 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7618 (build-system ant-build-system)
7619 (arguments
7620 `(#:tests? #f ; no tests included
7621 #:jar-name "eclipse-core-commands.jar"))
7622 (inputs
7623 (list java-eclipse-equinox-common))
7624 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7625 (synopsis "Eclipse core commands")
7626 (description "This package provides Eclipse core commands in the module
7627@code{org.eclipse.core.commands}.")
7628 (license license:epl1.0)))
7629
7630(define-public java-eclipse-text
7631 (package
7632 (name "java-eclipse-text")
7633 (version "3.6.0")
7634 (source (origin
7635 (method url-fetch)
7636 (uri (string-append "https://repo1.maven.org/maven2/"
7637 "org/eclipse/platform/org.eclipse.text/"
7638 version "/org.eclipse.text-"
7639 version "-sources.jar"))
7640 (sha256
7641 (base32
7642 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7643 (build-system ant-build-system)
7644 (arguments
7645 `(#:tests? #f ; no tests included
7646 #:jar-name "eclipse-text.jar"
7647 #:phases
7648 (modify-phases %standard-phases
7649 ;; When creating a new category we must make sure that the new list
7650 ;; matches List<Position>. By default it seems to be too generic
7651 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7652 ;; Without this we get this error:
7653 ;;
7654 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7655 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7656 ;; [javac] fPositions.put(category, new ArrayList<>());
7657 ;; [javac] ^
7658 ;; [javac] required: String,List<Position>
7659 ;; [javac] found: String,ArrayList<Object>
7660 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7661 ;; to List<Position> by method invocation conversion
7662 ;; [javac] where K,V are type-variables:
7663 ;; [javac] K extends Object declared in interface Map
7664 ;; [javac] V extends Object declared in interface Map
7665 ;;
7666 ;; I don't know if this is a good fix. I suspect it is not, but it
7667 ;; seems to work.
7668 (add-after 'unpack 'fix-compilation-error
7669 (lambda _
7670 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7671 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7672 "Positions.put(category, new ArrayList<Position>());"))
7673 #t)))))
7674 (inputs
7675 (list java-eclipse-equinox-common java-eclipse-core-commands
7676 java-icu4j))
7677 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7678 (synopsis "Eclipse text library")
7679 (description "Platform Text is part of the Platform UI project and
7680provides the basic building blocks for text and text editors within Eclipse
7681and contributes the Eclipse default text editor.")
7682 (license license:epl1.0)))
7683
7684(define-public java-eclipse-jdt-core
7685 (package
7686 (name "java-eclipse-jdt-core")
7687 (version "3.16.0")
7688 (source (origin
7689 (method url-fetch)
7690 (uri (string-append "https://repo1.maven.org/maven2/"
7691 "org/eclipse/jdt/org.eclipse.jdt.core/"
7692 version "/org.eclipse.jdt.core-"
7693 version "-sources.jar"))
7694 (sha256
7695 (base32
7696 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7697 (build-system ant-build-system)
7698 (arguments
7699 `(#:tests? #f ; no tests included
7700 #:jar-name "eclipse-jdt-core.jar"
7701 #:phases
7702 (modify-phases %standard-phases
7703 (add-after 'unpack 'move-sources
7704 (lambda _
7705 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7706 (for-each (lambda (file)
7707 (install-file file (string-append "../" (dirname file))))
7708 (find-files "." ".*")))
7709 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7710 #t))
7711 (add-before 'build 'copy-resources
7712 (lambda _
7713 (with-directory-excursion "src"
7714 (for-each (lambda (file)
7715 (install-file file (string-append "../build/classes/" (dirname file))))
7716 (find-files "." ".*.(props|properties|rsc)")))
7717 #t)))))
7718 (inputs
7719 (list java-eclipse-core-contenttype
7720 java-eclipse-core-filesystem
7721 java-eclipse-core-jobs
7722 java-eclipse-core-resources
7723 java-eclipse-core-runtime
7724 java-eclipse-equinox-app
7725 java-eclipse-equinox-common
7726 java-eclipse-equinox-preferences
7727 java-eclipse-equinox-registry
7728 java-eclipse-osgi
7729 java-eclipse-text))
7730 (home-page "https://www.eclipse.org/jdt")
7731 (synopsis "Java development tools core libraries")
7732 (description "This package provides the core libraries of the Eclipse Java
7733development tools.")
7734 (license license:epl1.0)))
7735
7736(define-public java-eclipse-jdt-compiler-apt
7737 (package
7738 (name "java-eclipse-jdt-compiler-apt")
7739 (version "1.3.400")
7740 (source (origin
7741 (method url-fetch)
7742 (uri (string-append "https://repo1.maven.org/maven2/"
7743 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7744 version "/org.eclipse.jdt.compiler.apt-"
7745 version "-sources.jar"))
7746 (sha256
7747 (base32
7748 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7749 (build-system ant-build-system)
7750 (arguments
7751 `(#:tests? #f ; no tests included
7752 #:jar-name "eclipse-jdt-compiler-apt.jar"
7753 #:jdk ,openjdk11))
7754 (inputs
7755 (list java-eclipse-jdt-core))
7756 (home-page "https://www.eclipse.org/jdt/apt/")
7757 (synopsis "Annotation processing tool")
7758 (description "APT stands for Annotation Processing Tool. APT provides a
7759means for generating files and compiling new Java classes based on annotations
7760found in your source code.")
7761 (license license:epl2.0)))
7762
7763(define-public java-eclipse-lsp4j-common
7764 (package
7765 (name "java-eclipse-lsp4j-common")
7766 (version "0.10.0")
7767 (source (origin
7768 (method git-fetch)
7769 (uri (git-reference
7770 (url "https://github.com/eclipse/lsp4j")
7771 (commit (string-append "v" version))))
7772 (file-name (git-file-name name version))
7773 (sha256
7774 (base32
7775 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7776 (build-system ant-build-system)
7777 (home-page "https://eclipse.org/lsp4j/")
7778 (synopsis "LSP4J common package")
7779 (description "Eclipse LSP4J provides Java bindings for the Language
7780Server Protocol and the Debug Adapter Protocol. This package is a common
7781definition intended to be inherited by other packages.")
7782 (license license:epl2.0)))
7783
7784(define-public java-eclipse-lsp4j-debug
7785 (package
7786 (inherit java-eclipse-lsp4j-common)
7787 (name "java-eclipse-lsp4j-debug")
7788 (arguments
7789 `(#:jar-name "eclipse-lsp4j-debug.jar"
7790 #:jdk ,openjdk11
7791 #:tests? #f; tests fail with reflection errors
7792 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7793 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7794 #:phases
7795 (modify-phases %standard-phases
7796 (add-before 'build 'copy-xtend
7797 (lambda _
7798 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7799 "org.eclipse.lsp4j.debug/src/main/java"))))))
7800 (native-inputs
7801 (list java-junit))
7802 (inputs
7803 `(("java-gson" ,java-gson-2.8.6)
7804 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7805 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7806 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7807 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7808 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7809 (description "Eclipse LSP4J provides Java bindings for the Language
7810Server Protocol and the Debug Adapter Protocol. This package contains its
7811LSP4J Java bindings for the Debug Server Protocol.")))
7812
7813(define-public java-eclipse-lsp4j-generator
7814 (package
7815 (inherit java-eclipse-lsp4j-common)
7816 (name "java-eclipse-lsp4j-generator")
7817 (arguments
7818 `(#:jar-name "eclipse-lsp4j-generator.jar"
7819 #:jdk ,openjdk11
7820 #:tests? #f; no tests
7821 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7822 (inputs
7823 (list java-eclipse-lsp4j-jsonrpc))
7824 (synopsis "Eclipse LSP4J Generator")
7825 (description "Eclipse LSP4J provides Java bindings for the Language
7826Server Protocol and the Debug Adapter Protocol. This package contains its
7827LSP4J code generator for Language Server Protocol classes.")))
7828
7829(define-public java-eclipse-lsp4j-jsonrpc
7830 (package
7831 (inherit java-eclipse-lsp4j-common)
7832 (name "java-eclipse-lsp4j-jsonrpc")
7833 (arguments
7834 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7835 #:jdk ,openjdk11
7836 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7837 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7838 (native-inputs
7839 (list java-junit))
7840 (inputs
7841 (list java-gson-2.8.6))
7842 (synopsis "Java JSON-RPC implementation")
7843 (description "Eclipse LSP4J provides Java bindings for the Language
7844Server Protocol and the Debug Adapter Protocol. This package contains its
7845JSON-RPC implementation.")))
7846
7847(define-public java-eclipse-lsp4j-jsonrpc-debug
7848 (package
7849 (inherit java-eclipse-lsp4j-common)
7850 (name "java-eclipse-lsp4j-jsonrpc-debug")
7851 (arguments
7852 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7853 #:jdk ,openjdk11
7854 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7855 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7856 (native-inputs
7857 (list java-junit))
7858 (inputs
7859 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7860 (synopsis "Java JSON-RPC implementation (debug protocol)")
7861 (description "Eclipse LSP4J provides Java bindings for the Language
7862Server Protocol and the Debug Adapter Protocol. This package contains its
7863JSON-RPC implementation's debug protocol.")))
7864
7865(define-public java-eclipse-xtext-xbase-lib
7866 (package
7867 (name "java-eclipse-xtext-xbase-lib")
7868 (version "2.25.0")
7869 (source (origin
7870 (method git-fetch)
7871 (uri (git-reference
7872 (url "https://github.com/eclipse/xtext-lib")
7873 (commit (string-append "v" version))))
7874 (file-name (git-file-name name version))
7875 (sha256
7876 (base32
7877 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7878 (build-system ant-build-system)
7879 (arguments
7880 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7881 #:jdk ,openjdk11
7882 #:tests? #f; TODO (maybe needs newer guava version?)
7883 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7884 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7885 (native-inputs
7886 (list java-junit))
7887 (inputs
7888 (list java-guava))
7889 (home-page "https://www.eclipse.org/Xtext/")
7890 (synopsis "Eclipse Xbase Runtime Library")
7891 (description "This package contains runtime libraries for Xbase languages
7892such as Xtend.")
7893 (license license:epl2.0)))
7894
7895(define-public java-javax-mail
7896 (package
7897 (name "java-javax-mail")
7898 (version "1.5.6")
7899 (source (origin
7900 (method url-fetch)
7901 (uri (string-append "https://repo1.maven.org/maven2/"
7902 "com/sun/mail/javax.mail/"
7903 version "/javax.mail-"
7904 version "-sources.jar"))
7905 (sha256
7906 (base32
7907 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7908 (build-system ant-build-system)
7909 (arguments
7910 `(#:tests? #f ; no tests
7911 #:jar-name "javax-mail.jar"))
7912 (home-page "https://javamail.java.net")
7913 (synopsis "Reference implementation of the JavaMail API")
7914 (description
7915 "This package provides versions of the JavaMail API implementation, IMAP,
7916SMTP, and POP3 service providers, some examples, and documentation for the
7917JavaMail API.")
7918 ;; GPLv2 only with "classpath exception".
7919 (license license:gpl2)))
7920
7921(define-public java-log4j-api
7922 (package
7923 (name "java-log4j-api")
7924 (version "2.17.1")
7925 (source (origin
7926 (method url-fetch)
7927 (uri (string-append "mirror://apache/logging/log4j/" version
7928 "/apache-log4j-" version "-src.tar.gz"))
7929 (sha256
7930 (base32
7931 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7932 (build-system ant-build-system)
7933 (arguments
7934 `(#:tests? #f ; tests require unpackaged software
7935 #:jar-name "log4j-api.jar"
7936 #:make-flags
7937 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7938 #:phases
7939 (modify-phases %standard-phases
7940 (add-after 'unpack 'enter-dir
7941 (lambda _ (chdir "log4j-api") #t))
7942 ;; FIXME: The tests require additional software that has not been
7943 ;; packaged yet, such as
7944 ;; * org.apache.maven
7945 ;; * org.apache.felix
7946 (add-after 'enter-dir 'delete-tests
7947 (lambda _ (delete-file-recursively "src/test") #t)))))
7948 (inputs
7949 (list java-osgi-core java-hamcrest-core java-junit))
7950 (properties '((cpe-name . "log4j")))
7951 (home-page "https://logging.apache.org/log4j/2.x/")
7952 (synopsis "API module of the Log4j logging framework for Java")
7953 (description
7954 "This package provides the API module of the Log4j logging framework for
7955Java.")
7956 (license license:asl2.0)))
7957
7958(define-public java-log4j-core
7959 (package
7960 (inherit java-log4j-api)
7961 (name "java-log4j-core")
7962 (inputs
7963 `(("java-osgi-core" ,java-osgi-core)
7964 ("java-hamcrest-core" ,java-hamcrest-core)
7965 ("java-log4j-api" ,java-log4j-api)
7966 ("java-mail" ,java-mail)
7967 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7968 ("java-conversant-disruptor" ,java-conversant-disruptor)
7969 ("java-lmax-disruptor" ,java-lmax-disruptor)
7970 ("java-jctools-core" ,java-jctools-core-1)
7971 ("java-stax2-api" ,java-stax2-api)
7972 ("java-jansi" ,java-jansi)
7973 ("java-kafka" ,java-kafka-clients)
7974 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7975 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7976 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7977 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7978 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7979 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7980 ("java-commons-compress" ,java-commons-compress)
7981 ("java-commons-csv" ,java-commons-csv)
7982 ("java-jeromq" ,java-jeromq)
7983 ("java-junit" ,java-junit)))
7984 (native-inputs
7985 `(("hamcrest" ,java-hamcrest-all)
7986 ("java-commons-io" ,java-commons-io)
7987 ("java-commons-lang3" ,java-commons-lang3)
7988 ("slf4j" ,java-slf4j-api)))
7989 (arguments
7990 `(#:tests? #f ; tests require more dependencies
7991 #:test-dir "src/test"
7992 #:source-dir "src/main/java"
7993 #:jar-name "log4j-core.jar"
7994 #:jdk ,icedtea-8
7995 #:make-flags
7996 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7997 #:phases
7998 (modify-phases %standard-phases
7999 (add-after 'unpack 'enter-dir
8000 (lambda _ (chdir "log4j-core") #t)))))
8001 (synopsis "Core component of the Log4j framework")
8002 (description "This package provides the core component of the Log4j
8003logging framework for Java.")))
8004
8005(define-public java-log4j-1.2-api
8006 (package
8007 (inherit java-log4j-api)
8008 (name "java-log4j-1.2-api")
8009 (arguments
8010 `(#:jar-name "java-log4j-1.2-api.jar"
8011 #:source-dir "log4j-1.2-api/src/main/java"
8012 #:jdk ,icedtea-8
8013 ;; Tests require maven-model (and other maven subprojects), which is a
8014 ;; cyclic dependency.
8015 #:tests? #f))
8016 (inputs
8017 `(("log4j-api" ,java-log4j-api)
8018 ("log4j-core" ,java-log4j-core)
8019 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
8020 ("osgi-core" ,java-osgi-core)
8021 ("eclipse-osgi" ,java-eclipse-osgi)
8022 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
8023
8024(define-public java-commons-cli
8025 (package
8026 (name "java-commons-cli")
8027 (version "1.4")
8028 (source (origin
8029 (method url-fetch)
8030 (uri (string-append "mirror://apache/commons/cli/source/"
8031 "commons-cli-" version "-src.tar.gz"))
8032 (sha256
8033 (base32
8034 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
8035 (build-system ant-build-system)
8036 ;; TODO: javadoc
8037 (arguments
8038 `(#:jar-name "commons-cli.jar"
8039 #:phases
8040 (modify-phases %standard-phases
8041 (replace 'install
8042 (install-from-pom "pom.xml")))))
8043 (native-inputs
8044 (list java-junit java-hamcrest-core))
8045 (home-page "https://commons.apache.org/cli/")
8046 (synopsis "Command line arguments and options parsing library")
8047 (description "The Apache Commons CLI library provides an API for parsing
8048command line options passed to programs. It is also able to print help
8049messages detailing the options available for a command line tool.
8050
8051Commons CLI supports different types of options:
8052
8053@itemize
8054@item POSIX like options (ie. tar -zxvf foo.tar.gz)
8055@item GNU like long options (ie. du --human-readable --max-depth=1)
8056@item Java like properties (ie. java -Djava.awt.headless=true Foo)
8057@item Short options with value attached (ie. gcc -O2 foo.c)
8058@item long options with single hyphen (ie. ant -projecthelp)
8059@end itemize
8060
8061This is a part of the Apache Commons Project.")
8062 (license license:asl2.0)))
8063
8064(define-public java-commons-text
8065 (package
8066 (name "java-commons-text")
8067 (version "1.15.0")
8068 (source (origin
8069 (method url-fetch)
8070 (uri (string-append "mirror://apache/commons/text/source/"
8071 "commons-text-" version "-src.tar.gz"))
8072 (sha256
8073 (base32
8074 "0k0y3pkgrzm84a0z1ifi4b9ydaglzm9pgvaw9phxdcwmcqxjbkc8"))))
8075 (build-system ant-build-system)
8076 (arguments
8077 (list #:jar-name "java-commons-text.jar"
8078 #:source-dir "src/main/java"
8079 #:test-dir "src/test"
8080 #:tests? #f ; Tests require JUnit5.
8081 #:phases
8082 #~(modify-phases %standard-phases
8083 (replace 'install
8084 (install-from-pom "pom.xml")))))
8085 (inputs
8086 (list java-commons-io))
8087 (propagated-inputs
8088 (list java-commons-lang3
8089 apache-commons-parent-pom-51))
8090 (home-page "https://commons.apache.org/text/")
8091 (synopsis "Library focused on algorithms working on strings")
8092 (description "Apache Commons Text is a library focused on algorithms
8093working on strings.
8094
8095This is a part of the Apache Commons Project.")
8096 (license license:asl2.0)))
8097
8098(define-public java-commons-codec
8099 (package
8100 (name "java-commons-codec")
8101 (version "1.15")
8102 (source (origin
8103 (method url-fetch)
8104 (uri (string-append "mirror://apache/commons/codec/source/"
8105 "commons-codec-" version "-src.tar.gz"))
8106 (sha256
8107 (base32
8108 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
8109 (build-system ant-build-system)
8110 (arguments
8111 `(#:jar-name "java-commons-codec.jar"
8112 #:source-dir "src/main/java"
8113 #:test-dir "src/test"
8114 #:test-exclude (list "**/*AbstractTest.java")
8115 #:phases
8116 (modify-phases %standard-phases
8117 (add-before 'build 'copy-resources
8118 (lambda _
8119 (copy-recursively "src/main/resources"
8120 "build/classes")))
8121 (add-before 'check 'copy-test-resources
8122 (lambda _
8123 (copy-recursively "src/test/resources"
8124 "build/test-classes")))
8125 (add-before 'check 'skip-ravenous-test
8126 (lambda _
8127 ;; This test admits to being "memory hungry", but reliably fails
8128 ;; even on a machine that should have plenty (12 GiB). Skip it.
8129 (substitute*
8130 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
8131 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
8132 "return;"))))
8133 (replace 'install (install-from-pom "pom.xml")))))
8134 (native-inputs
8135 (list java-commons-lang3 java-junit))
8136 (propagated-inputs
8137 (list apache-commons-parent-pom-52))
8138 (home-page "https://commons.apache.org/codec/")
8139 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
8140 (description "The codec package contains simple encoder and decoders for
8141various formats such as Base64 and Hexadecimal. In addition to these widely
8142used encoders and decoders, the codec package also maintains a collection of
8143phonetic encoding utilities.
8144
8145This is a part of the Apache Commons Project.")
8146 (license license:asl2.0)))
8147
8148(define-public java-commons-daemon
8149 (package
8150 (name "java-commons-daemon")
8151 (version "1.1.0")
8152 (source (origin
8153 (method url-fetch)
8154 (uri (string-append "mirror://apache/commons/daemon/source/"
8155 "commons-daemon-" version "-src.tar.gz"))
8156 (sha256
8157 (base32
8158 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
8159 (build-system ant-build-system)
8160 (arguments
8161 `(#:test-target "test"
8162 #:phases
8163 (modify-phases %standard-phases
8164 (add-after 'build 'build-javadoc ant-build-javadoc)
8165 (replace 'install (install-jars "dist"))
8166 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
8167 (native-inputs
8168 (list java-junit))
8169 (home-page "https://commons.apache.org/daemon/")
8170 (synopsis "Library to launch Java applications as daemons")
8171 (description "The Daemon package from Apache Commons can be used to
8172implement Java applications which can be launched as daemons. For example the
8173program will be notified about a shutdown so that it can perform cleanup tasks
8174before its process of execution is destroyed by the operation system.
8175
8176This package contains the Java library. You will also need the actual binary
8177for your architecture which is provided by the jsvc package.
8178
8179This is a part of the Apache Commons Project.")
8180 (license license:asl2.0)))
8181
8182(define-public java-javaewah
8183 (package
8184 (name "java-javaewah")
8185 (version "1.1.6")
8186 (source (origin
8187 (method git-fetch)
8188 (uri (git-reference
8189 (url "https://github.com/lemire/javaewah/")
8190 (commit (string-append "JavaEWAH-" version))))
8191 (file-name (git-file-name name version))
8192 (sha256
8193 (base32
8194 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
8195 (build-system ant-build-system)
8196 (arguments `(#:jar-name "javaewah.jar"))
8197 (inputs
8198 (list java-junit java-hamcrest-core))
8199 (home-page "https://github.com/lemire/javaewah")
8200 (synopsis "Compressed alternative to the Java @code{BitSet} class")
8201 (description "This is a word-aligned compressed variant of the Java
8202@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
8203compression scheme. It can be used to implement bitmap indexes.
8204
8205The goal of word-aligned compression is not to achieve the best compression,
8206but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
8207cycles, maybe at the expense of storage. However, the EWAH scheme is always
8208more efficient storage-wise than an uncompressed bitmap (as implemented in the
8209@code{BitSet} class by Sun).")
8210 ;; GPL2.0 derivates are explicitly allowed.
8211 (license license:asl2.0)))
8212
8213(define-public java-slf4j-api
8214 (package
8215 (name "java-slf4j-api")
8216 (version "1.7.25")
8217 (source (origin
8218 (method git-fetch)
8219 (uri (git-reference
8220 (url "https://github.com/qos-ch/slf4j")
8221 (commit (string-append "v_" version))))
8222 (file-name (git-file-name name version))
8223 (sha256
8224 (base32
8225 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
8226 (modules '((guix build utils)))
8227 ;; Delete bundled jars.
8228 (snippet
8229 '(begin
8230 (for-each delete-file (find-files "." "\\.jar$"))
8231 #t))))
8232 (build-system ant-build-system)
8233 (arguments
8234 `(#:jar-name "slf4j-api.jar"
8235 #:source-dir "slf4j-api/src/main"
8236 #:test-dir "slf4j-api/src/test"
8237 #:phases
8238 (modify-phases %standard-phases
8239 (add-after 'build 'regenerate-jar
8240 (lambda _
8241 ;; pom.xml ignores these files in the jar creation process. If we don't,
8242 ;; we get the error "This code should have never made it into slf4j-api.jar"
8243 (delete-file-recursively "build/classes/org/slf4j/impl")
8244 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
8245 "build/classes" ".")))
8246 (add-before 'check 'dont-test-abstract-classes
8247 (lambda _
8248 ;; abstract classes are not meant to be run with junit
8249 (substitute* "build.xml"
8250 (("<include name=\"\\*\\*/\\*Test.java\" />")
8251 (string-append "<include name=\"**/*Test.java\" />"
8252 "<exclude name=\"**/MultithreadedInitializationTest"
8253 ".java\" />")))
8254 #t))
8255 (replace 'install
8256 (install-from-pom "slf4j-api/pom.xml")))))
8257 (propagated-inputs
8258 (list java-slf4j-parent))
8259 (native-inputs
8260 (list java-junit java-hamcrest-core))
8261 (home-page "https://www.slf4j.org/")
8262 (synopsis "Simple logging facade for Java")
8263 (description "The Simple Logging Facade for Java (SLF4J) serves as a
8264simple facade or abstraction for various logging
8265frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
8266allowing the end user to plug in the desired logging framework at deployment
8267time.")
8268 (license license:expat)))
8269
8270(define java-slf4j-parent
8271 (package
8272 (inherit java-slf4j-api)
8273 (name "java-slf4j-parent")
8274 (native-inputs `())
8275 (propagated-inputs '())
8276 (arguments
8277 `(#:tests? #f
8278 #:phases
8279 (modify-phases %standard-phases
8280 (delete 'build)
8281 (delete 'configure)
8282 (replace 'install
8283 (install-pom-file "pom.xml")))))))
8284
8285(define-public java-slf4j-simple
8286 (package
8287 (name "java-slf4j-simple")
8288 (version "1.7.25")
8289 (source (package-source java-slf4j-api))
8290 (build-system ant-build-system)
8291 (arguments
8292 `(#:jar-name "slf4j-simple.jar"
8293 #:source-dir "slf4j-simple/src/main"
8294 #:test-dir "slf4j-simple/src/test"
8295 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
8296 #:phases
8297 (modify-phases %standard-phases
8298 ;; The tests need some test classes from slf4j-api
8299 (add-before 'check 'build-slf4j-api-test-helpers
8300 (lambda _
8301 ;; Add current dir to CLASSPATH ...
8302 (setenv "CLASSPATH"
8303 (string-append (getcwd) ":" (getenv "CLASSPATH")))
8304 ;; ... and build test helper classes here:
8305 (apply invoke
8306 `("javac" "-d" "."
8307 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8308 (replace 'install
8309 (install-from-pom "slf4j-simple/pom.xml")))))
8310 (propagated-inputs
8311 (list java-slf4j-api))
8312 (native-inputs
8313 (list java-junit java-hamcrest-core))
8314 (home-page "https://www.slf4j.org/")
8315 (synopsis "Simple implementation of simple logging facade for Java")
8316 (description "SLF4J binding for the Simple implementation, which outputs
8317all events to System.err. Only messages of level INFO and higher are
8318printed.")
8319 (license license:expat)))
8320
8321(define-public java-slf4j-nop
8322 (package
8323 (name "java-slf4j-nop")
8324 (version "1.7.25")
8325 (source (package-source java-slf4j-api))
8326 (build-system ant-build-system)
8327 (arguments
8328 `(#:jar-name "slf4j-nop.jar"
8329 #:source-dir "slf4j-nop/src/main"
8330 #:test-dir "slf4j-nop/src/test"
8331 #:phases (modify-phases %standard-phases
8332 ;; The tests need some test classes from slf4j-api
8333 (add-before 'check 'build-slf4j-api-test-helpers
8334 (lambda _
8335 ;; Add current dir to CLASSPATH ...
8336 (setenv "CLASSPATH"
8337 (string-append (getcwd) ":"
8338 (getenv "CLASSPATH")))
8339 ;; ... and build test helper classes here:
8340 (apply invoke
8341 `("javac" "-d" "."
8342 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8343 (replace 'install
8344 (install-from-pom "slf4j-nop/pom.xml")))))
8345 (propagated-inputs (list java-slf4j-api))
8346 (native-inputs (list java-junit java-hamcrest-core))
8347 (home-page "https://www.slf4j.org/")
8348 (synopsis "SLF4J binding that silently discards all logging messages")
8349 (description "Binding/provider for NOP, an implementation that silently
8350discards all logging messages.")
8351 (license license:expat)))
8352
8353(define-public antlr2
8354 (package
8355 (name "antlr2")
8356 (version "2.7.7")
8357 (source (origin
8358 (method url-fetch)
8359 (uri (string-append "https://www.antlr2.org/download/antlr-"
8360 version ".tar.gz"))
8361 (sha256
8362 (base32
8363 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
8364 (modules '((guix build utils)))
8365 (snippet
8366 '(begin
8367 (delete-file "antlr.jar")
8368 (substitute* "lib/cpp/antlr/CharScanner.hpp"
8369 (("#include <map>")
8370 (string-append
8371 "#include <map>\n"
8372 "#define EOF (-1)\n"
8373 "#include <strings.h>")))
8374 (substitute* "configure"
8375 (("/bin/sh") "sh"))
8376 #t))))
8377 (build-system gnu-build-system)
8378 (arguments
8379 `(#:tests? #f ; no test target
8380 #:imported-modules ((guix build ant-build-system)
8381 ,@%default-gnu-imported-modules)
8382 #:modules (((guix build ant-build-system) #:prefix ant:)
8383 (guix build gnu-build-system)
8384 (guix build utils))
8385 #:phases
8386 (modify-phases %standard-phases
8387 (add-after 'install 'strip-jar-timestamps
8388 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8389 (add-before 'configure 'fix-timestamp
8390 (lambda _
8391 (substitute* "configure"
8392 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8393 #t))
8394 (add-after 'configure 'fix-bin-ls
8395 (lambda _
8396 (substitute* (find-files "." "Makefile")
8397 (("/bin/ls") "ls"))
8398 #t)))))
8399 (native-inputs
8400 `(("which" ,which)
8401 ("zip" ,zip)
8402 ("java" ,icedtea "jdk")))
8403 (inputs
8404 `(("java" ,icedtea)))
8405 (home-page "https://www.antlr2.org")
8406 (synopsis "Framework for constructing recognizers, compilers, and translators")
8407 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8408is a language tool that provides a framework for constructing recognizers,
8409compilers, and translators from grammatical descriptions containing Java, C#,
8410C++, or Python actions. ANTLR provides excellent support for tree construction,
8411tree walking, and translation.")
8412 (license license:public-domain)))
8413
8414(define-public java-stringtemplate-3
8415 (package
8416 (name "java-stringtemplate")
8417 (version "3.2.1")
8418 (source (origin
8419 (method url-fetch)
8420 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8421 "gh-pages/download/stringtemplate-"
8422 version ".tar.gz"))
8423 (sha256
8424 (base32
8425 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8426 (build-system ant-build-system)
8427 (arguments
8428 `(#:jar-name (string-append ,name "-" ,version ".jar")
8429 #:test-dir "test"
8430 #:modules ((guix build ant-build-system)
8431 (guix build utils)
8432 (srfi srfi-1))
8433 #:phases
8434 (modify-phases %standard-phases
8435 (add-before 'check 'fix-tests
8436 (lambda _
8437 (substitute* "build.xml"
8438 (("\\$\\{test.home\\}/java")
8439 "${test.home}/org"))
8440 #t))
8441 (add-before 'build 'generate-grammar
8442 (lambda _
8443 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8444 (for-each (lambda (file)
8445 (format #t "~a\n" file)
8446 (invoke "antlr" file))
8447 '("template.g" "angle.bracket.template.g" "action.g"
8448 "eval.g" "group.g" "interface.g")))
8449 #t)))))
8450 (native-inputs
8451 `(("antlr" ,antlr2)
8452 ("java-junit" ,java-junit)))
8453 (home-page "https://www.stringtemplate.org")
8454 (synopsis "Template engine to generate formatted text output")
8455 (description "StringTemplate is a java template engine (with ports for C#,
8456Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8457or any other formatted text output. StringTemplate is particularly good at
8458code generators, multiple site skins, and internationalization / localization.
8459StringTemplate also powers ANTLR.")
8460 (license license:bsd-3)))
8461
8462;; antlr3 is partially written using antlr3 grammar files. It also depends on
8463;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8464;; files and uses antlr3 at runtime. The latest version requires a recent version
8465;; of antlr3 at runtime.
8466;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8467;; This version of ST4 is sufficient for the latest antlr3.
8468;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8469;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8470;; against the latest ST4.
8471;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8472;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8473;; only grammar files with the antlr2 syntax.
8474;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8475
8476(define-public java-stringtemplate
8477 (package (inherit java-stringtemplate-3)
8478 (name "java-stringtemplate")
8479 (version "4.0.8")
8480 (source (origin
8481 (method url-fetch)
8482 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8483 version ".tar.gz"))
8484 (file-name (string-append name "-" version ".tar.gz"))
8485 (sha256
8486 (base32
8487 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8488 (build-system ant-build-system)
8489 (arguments
8490 `(#:jar-name (string-append ,name "-" ,version ".jar")
8491 #:tests? #f ; FIXME: tests fail for unknown reasons
8492 #:test-dir "test"
8493 #:modules ((guix build ant-build-system)
8494 (guix build utils)
8495 (srfi srfi-1))
8496 #:phases
8497 (modify-phases %standard-phases
8498 (add-before 'check 'fix-test-target
8499 (lambda _
8500 (substitute* "build.xml"
8501 (("\\$\\{test.home\\}/java") "${test.home}/")
8502 (("\\*Test.java") "Test*.java"))
8503 #t))
8504 (add-before 'build 'generate-grammar
8505 (lambda _
8506 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8507 (for-each (lambda (file)
8508 (format #t "~a\n" file)
8509 (invoke "antlr3" file))
8510 '("STParser.g" "Group.g" "CodeGenerator.g")))
8511 #t)))))
8512 (inputs
8513 `(("antlr3" ,antlr3-bootstrap)
8514 ("antlr2" ,antlr2)
8515 ("java-stringtemplate" ,java-stringtemplate-3)
8516 ("java-junit" ,java-junit)))))
8517
8518(define-public java-stringtemplate-4.0.6
8519 (package (inherit java-stringtemplate)
8520 (name "java-stringtemplate")
8521 (version "4.0.6")
8522 (source (origin
8523 (method url-fetch)
8524 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8525 version ".tar.gz"))
8526 (file-name (string-append name "-" version ".tar.gz"))
8527 (sha256
8528 (base32
8529 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8530 (inputs
8531 `(("antlr3" ,antlr3-3.3)
8532 ("antlr2" ,antlr2)
8533 ("java-stringtemplate" ,java-stringtemplate-3)))))
8534
8535(define-public antlr3
8536 (package
8537 (name "antlr3")
8538 (version "3.5.2")
8539 (source (origin
8540 (method git-fetch)
8541 (uri (git-reference
8542 (url "https://github.com/antlr/antlr3")
8543 (commit version)))
8544 (file-name (git-file-name name version))
8545 (sha256
8546 (base32
8547 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8548 (build-system ant-build-system)
8549 (arguments
8550 `(#:jar-name (string-append ,name "-" ,version ".jar")
8551 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8552 #:tests? #f
8553 #:phases
8554 (modify-phases %standard-phases
8555 (add-after 'install 'bin-install
8556 (lambda* (#:key inputs outputs #:allow-other-keys)
8557 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8558 (bin (string-append (assoc-ref outputs "out") "/bin")))
8559 (mkdir-p bin)
8560 (with-output-to-file (string-append bin "/antlr3")
8561 (lambda _
8562 (display
8563 (string-append "#!" (which "sh") "\n"
8564 "java -cp " jar "/" ,name "-" ,version ".jar:"
8565 (string-concatenate
8566 (find-files (assoc-ref inputs "stringtemplate")
8567 ".*\\.jar"))
8568 ":"
8569 (string-concatenate
8570 (find-files (assoc-ref inputs "stringtemplate4")
8571 ".*\\.jar"))
8572 ":"
8573 (string-concatenate
8574 (find-files (string-append
8575 (assoc-ref inputs "antlr")
8576 "/lib")
8577 ".*\\.jar"))
8578 " org.antlr.Tool $*"))))
8579 (chmod (string-append bin "/antlr3") #o755))
8580 #t))
8581 (add-before 'build 'generate-grammar
8582 (lambda _
8583 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8584 (for-each (lambda (file)
8585 (display file)
8586 (newline)
8587 (invoke "antlr3" file))
8588 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8589 "AssignTokenTypesWalker.g"
8590 "ActionTranslator.g" "TreeToNFAConverter.g"
8591 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8592 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8593 (substitute* "ANTLRParser.java"
8594 (("public Object getTree") "public GrammarAST getTree"))
8595 (substitute* "ANTLRv3Parser.java"
8596 (("public Object getTree") "public CommonTree getTree"))
8597 (chdir "../../../../../java")
8598 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8599 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8600import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8601 (substitute* "org/antlr/tool/ErrorManager.java"
8602 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8603 (chdir "../../../..")
8604 #t))
8605 (add-before 'build 'fix-build-xml
8606 (lambda _
8607 (substitute* "build.xml"
8608 (("target name=\"compile\">")
8609 "target name=\"compile\">
8610<copy todir=\"${classes.dir}\">
8611<fileset dir=\"tool/src/main/resources\">
8612<include name=\"**/*.stg\"/>
8613<include name=\"**/*.st\"/>
8614<include name=\"**/*.sti\"/>
8615<include name=\"**/STLexer.tokens\"/>
8616</fileset>
8617</copy>"))
8618 #t)))))
8619 (native-inputs
8620 `(("antlr" ,antlr2)
8621 ("antlr3" ,antlr3-bootstrap)))
8622 (inputs
8623 `(("junit" ,java-junit)
8624 ("stringtemplate" ,java-stringtemplate-3)
8625 ("stringtemplate4" ,java-stringtemplate)))
8626 (propagated-inputs
8627 `(("stringtemplate" ,java-stringtemplate-3)
8628 ("antlr" ,antlr2)
8629 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8630 (home-page "https://www.antlr3.org")
8631 (synopsis "Framework for constructing recognizers, compilers, and translators")
8632 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8633is a language tool that provides a framework for constructing recognizers,
8634compilers, and translators from grammatical descriptions containing Java, C#,
8635C++, or Python actions. ANTLR provides excellent support for tree construction,
8636tree walking, and translation.")
8637 (license license:bsd-3)))
8638
8639(define-public antlr3-bootstrap
8640 (package
8641 (inherit antlr3)
8642 (name "antlr3-bootstrap")
8643 (native-inputs
8644 `(("antlr" ,antlr2)
8645 ("antlr3" ,antlr3-3.3)))
8646 (inputs
8647 `(("junit" ,java-junit)))
8648 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
8649
8650(define-public antlr3-3.3
8651 (package
8652 (inherit antlr3)
8653 (name "antlr3")
8654 (version "3.3")
8655 (source (origin
8656 (method url-fetch)
8657 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8658 "gh-pages/download/antlr-"
8659 version ".tar.gz"))
8660 (sha256
8661 (base32
8662 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8663 (patches
8664 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8665 (arguments
8666 `(#:jar-name (string-append ,name "-" ,version ".jar")
8667 #:source-dir (string-join '("tool/src/main/java"
8668 "runtime/Java/src/main/java"
8669 "tool/src/main/antlr2"
8670 "tool/src/main/antlr3")
8671 ":")
8672 #:tests? #f ; FIXME: tests seem to require maven plugin
8673 #:modules ((guix build ant-build-system)
8674 (guix build utils)
8675 (srfi srfi-1))
8676 #:phases
8677 (modify-phases %standard-phases
8678 (add-after 'install 'bin-install
8679 (lambda* (#:key inputs outputs #:allow-other-keys)
8680 (let* ((out (assoc-ref outputs "out"))
8681 (jar (string-append out "/share/java"))
8682 (bin (string-append out "/bin")))
8683 (mkdir-p bin)
8684 (with-output-to-file (string-append bin "/antlr3")
8685 (lambda _
8686 (display
8687 (string-append
8688 "#!" (which "sh") "\n"
8689 "java -cp " jar "/antlr3-3.3.jar:"
8690 (string-join
8691 (append (find-files (assoc-ref inputs "java-stringtemplate")
8692 ".*\\.jar$")
8693 (find-files (string-append (assoc-ref inputs "antlr")
8694 "/lib")
8695 ".*\\.jar$"))
8696 ":")
8697 " org.antlr.Tool $*"))))
8698 (chmod (string-append bin "/antlr3") #o755)
8699 #t)))
8700 (add-before 'build 'generate-grammar
8701 (lambda _
8702 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8703 (("import org.antlr.grammar.v2.\\*;")
8704 "import org.antlr.grammar.v2.*;\n
8705import org.antlr.grammar.v2.TreeToNFAConverter;\n
8706import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8707import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8708 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8709 (for-each (lambda (file)
8710 (format #t "~a\n" file)
8711 (invoke "antlr" file))
8712 '("antlr.g" "antlr.print.g" "assign.types.g"
8713 "buildnfa.g" "codegen.g" "define.g")))
8714 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8715 (for-each (lambda (file)
8716 (format #t "~a\n" file)
8717 (invoke "antlr3" file))
8718 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8719 "ANTLRv3Tree.g")))
8720 #t))
8721 (add-before 'build 'fix-build-xml
8722 (lambda _
8723 (substitute* "build.xml"
8724 (("target name=\"compile\">")
8725 "target name=\"compile\">
8726<copy todir=\"${classes.dir}\">
8727<fileset dir=\"tool/src/main/resources\">
8728<include name=\"**/*.stg\"/>
8729<include name=\"**/*.st\"/>
8730<include name=\"**/*.sti\"/>
8731<include name=\"**/STLexer.tokens\"/>
8732</fileset>
8733</copy>"))
8734 #t)))))
8735 (native-inputs
8736 `(("antlr" ,antlr2)
8737 ("antlr3" ,antlr3-3.1)))
8738 (inputs
8739 `(("junit" ,java-junit)))
8740 (propagated-inputs
8741 `(("java-stringtemplate" ,java-stringtemplate-3)
8742 ("antlr" ,antlr2)))
8743 (properties (alist-delete 'hidden? (package-properties antlr3)))))
8744
8745(define-public antlr3-3.1
8746 (package
8747 (inherit antlr3)
8748 (version "3.1")
8749 (source (origin
8750 (method url-fetch)
8751 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8752 "gh-pages/download/antlr-"
8753 version ".tar.gz"))
8754 (sha256
8755 (base32
8756 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8757 (patches
8758 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8759 (arguments
8760 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8761 #:source-dir "src:runtime/Java/src"
8762 #:tests? #f
8763 #:phases
8764 (modify-phases %standard-phases
8765 (add-after 'install 'bin-install
8766 (lambda* (#:key inputs outputs #:allow-other-keys)
8767 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8768 (bin (string-append (assoc-ref outputs "out") "/bin")))
8769 (mkdir-p bin)
8770 (with-output-to-file (string-append bin "/antlr3")
8771 (lambda _
8772 (display
8773 (string-append "#!" (which "sh") "\n"
8774 "java -cp " jar "/antlr3-3.1.jar:"
8775 (string-concatenate
8776 (find-files (assoc-ref inputs "stringtemplate")
8777 ".*\\.jar"))
8778 ":"
8779 (string-concatenate
8780 (find-files (string-append
8781 (assoc-ref inputs "antlr")
8782 "/lib")
8783 ".*\\.jar"))
8784 " org.antlr.Tool $*"))))
8785 (chmod (string-append bin "/antlr3") #o755))
8786 #t))
8787 (add-before 'build 'generate-grammar
8788 (lambda _
8789 (let ((dir "src/org/antlr/tool/"))
8790 (for-each (lambda (file)
8791 (display file)
8792 (newline)
8793 (invoke "antlr" "-o" dir (string-append dir file)))
8794 '("antlr.g" "antlr.print.g" "assign.types.g"
8795 "buildnfa.g" "define.g")))
8796 (format #t "codegen.g\n")
8797 (invoke "antlr" "-o" "src/org/antlr/codegen"
8798 "src/org/antlr/codegen/codegen.g")
8799 #t))
8800 (add-before 'build 'fix-build-xml
8801 (lambda _
8802 (substitute* "build.xml"
8803 (("target name=\"compile\">")
8804 "target name=\"compile\">
8805<copy todir=\"${classes.dir}\">
8806<fileset dir=\"src\">
8807<include name=\"**/*.stg\"/>
8808<include name=\"**/*.st\"/>
8809<include name=\"**/*.sti\"/>
8810<include name=\"**/STLexer.tokens\"/>
8811</fileset>
8812</copy>"))
8813 #t)))))
8814 (native-inputs
8815 `(("antlr" ,antlr2)))
8816 (inputs
8817 `(("junit" ,java-junit)))
8818 (propagated-inputs
8819 `(("stringtemplate" ,java-stringtemplate-3)))))
8820
8821(define-public java-treelayout
8822 (package
8823 (name "java-treelayout")
8824 (version "1.0.3")
8825 (source (origin
8826 (method git-fetch)
8827 (uri (git-reference
8828 (url "https://github.com/abego/treelayout")
8829 (commit (string-append "v" version))))
8830 (file-name (git-file-name name version))
8831 (sha256
8832 (base32
8833 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8834 (build-system ant-build-system)
8835 (arguments
8836 `(#:jar-name (string-append ,name "-" ,version ".jar")
8837 #:source-dir "org.abego.treelayout/src/main/java"
8838 #:test-dir "org.abego.treelayout/src/test"))
8839 (inputs
8840 (list java-junit))
8841 (native-inputs
8842 (list java-hamcrest-core))
8843 (home-page "https://treelayout.sourceforge.net")
8844 (synopsis "Tree Layout Algorithm in Java")
8845 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8846not restricted to a specific output or format, but can be used for any kind of
8847two dimensional diagram. Examples are Swing based components, SVG files, etc.
8848This is possible because TreeLayout separates the layout of a tree from the
8849actual rendering.")
8850 (license license:bsd-3)))
8851
8852(define-public java-antlr4-runtime
8853 (package
8854 (name "java-antlr4-runtime")
8855 (version "4.10.1")
8856 (source (origin
8857 (method git-fetch)
8858 (uri (git-reference
8859 (url "https://github.com/antlr/antlr4")
8860 (commit version)))
8861 (file-name (git-file-name name version))
8862 (sha256
8863 (base32
8864 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8865 (patches
8866 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8867 (build-system ant-build-system)
8868 (arguments
8869 `(#:jar-name "java-antlr4-runtime.jar"
8870 #:source-dir "runtime/Java/src/org"
8871 #:tests? #f; tests depend on java-antlr4 itself
8872 #:phases
8873 (modify-phases %standard-phases
8874 (add-before 'build 'copy-resources
8875 (lambda _
8876 (copy-recursively "runtime/Java/src/main/dot"
8877 "build/classes")
8878 #t)))))
8879 (home-page "https://www.antlr.org")
8880 (synopsis "ANTLR runtime library")
8881 (description "This package contains the runtime library used with generated
8882sources by ANTLR.")
8883 (license license:bsd-3)))
8884
8885(define-public cpp-antlr4-runtime
8886 (package
8887 (inherit java-antlr4-runtime)
8888 (name "cpp-antlr4-runtime")
8889 (properties '((upstream-name . "antlr4-cpp-runtime")))
8890 (outputs '("out" "static"))
8891 (build-system cmake-build-system)
8892 (arguments
8893 (list
8894 ;; TODO: try to run the tests under
8895 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8896 #:phases
8897 #~(modify-phases %standard-phases
8898 (add-after 'unpack 'chdir
8899 (lambda _
8900 (chdir "runtime/Cpp")))
8901 (add-after 'chdir 'unbundle-googletest
8902 (lambda _
8903 (substitute* "runtime/CMakeLists.txt"
8904 (("^ FetchContent_MakeAvailable.*")
8905 "")
8906 (("gtest_main" all)
8907 (string-append "gtest " all)))))
8908 (add-after 'install 'move-static-library
8909 (lambda* (#:key outputs #:allow-other-keys)
8910 (let ((static (assoc-ref outputs "static"))
8911 (libantlr4-runtime.a (search-input-file
8912 outputs "lib/libantlr4-runtime.a")))
8913 (mkdir-p (string-append static "/lib"))
8914 (rename-file
8915 libantlr4-runtime.a
8916 (string-append static "/lib/"
8917 (basename libantlr4-runtime.a)))))))))
8918 (native-inputs (list googletest pkg-config))
8919 (inputs (list `(,util-linux "lib"))) ;libuuid
8920 (synopsis "ANTLR C++ runtime library")
8921 (description "This package contains the C++ runtime library used with C++
8922generated sources by ANTLR.")))
8923
8924(define-deprecated-package java-antlr4-runtime-cpp
8925 cpp-antlr4-runtime)
8926
8927(define-public python-antlr4-runtime
8928 (package
8929 (inherit java-antlr4-runtime)
8930 (name "python-antlr4-runtime")
8931 (properties '((upstream-name . "antlr4-python3-runtime")))
8932 (build-system pyproject-build-system)
8933 (arguments
8934 (list
8935 #:test-backend #~'custom
8936 #:test-flags #~'("tests/run.py" "--verbose")
8937 #:phases
8938 #~(modify-phases %standard-phases
8939 (add-after 'unpack 'chdir
8940 (lambda _
8941 (chdir "runtime/Python3")))
8942 (add-after 'chdir 'regenerate-parsers
8943 (lambda _
8944 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
8945 "src/antlr4/xpath/XPathLexer.g4")
8946 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
8947 "tests/expr/Expr.g4"))))))
8948 (native-inputs (list antlr4 python-setuptools))
8949 (synopsis "ANTLR Python runtime library")
8950 (description "This package contains the Python runtime library used with
8951Python generated sources by ANTLR.")))
8952
8953(define-deprecated-package java-antlr4-runtime-python
8954 python-antlr4-runtime)
8955
8956(define-public antlr4
8957 (package
8958 (inherit java-antlr4-runtime)
8959 (name "antlr4")
8960 (arguments
8961 `(#:jar-name "antlr4.jar"
8962 #:source-dir "tool/src"
8963 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8964 #:test-include (list "**/Test*.java")
8965 #:test-exclude (list
8966 ;; These have no runnable methods and fail because
8967 ;; test-include above is too broad.
8968 "**/TestContext.java"
8969 "**/TestOutputReading.java"
8970 ;; no @Test methods
8971 "**/TestParserErrors.java"
8972 "**/TestSemPredEvalParser.java"
8973 "**/TestSets.java"
8974 "**/TestListeners.java"
8975 "**/TestParseTrees.java"
8976 "**/TestParserExec.java"
8977 "**/TestLexerErrors.java"
8978 "**/TestPerformance.java"
8979 "**/TestCompositeParsers.java"
8980 "**/TestLexerExec.java"
8981 "**/TestSemPredEvalLexer.java"
8982 "**/TestLeftRecursion.java"
8983 "**/TestFullContextParsing.java"
8984 "**/TestCompositeLexers.java"
8985 ;; Null pointer exception
8986 "**/TestCompositeGrammars.java")
8987 #:phases
8988 (modify-phases %standard-phases
8989 (add-before 'build 'fix-build.xml
8990 (lambda _
8991 ;; tests are not in a java subdirectory
8992 (substitute* "build.xml"
8993 (("\\$\\{test.home\\}/java") "${test.home}"))
8994 #t))
8995 ;; tests require to have a working antlr4 binary
8996 (delete 'check)
8997 (add-after 'install 'check
8998 (lambda _
8999 (invoke "ant" "compile-tests")
9000 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
9001 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
9002 #t))
9003 (add-before 'check 'remove-unrelated-languages
9004 (lambda _
9005 ;; There are tests for other languages that ANTLR can generate, but
9006 ;; we don't have the infrastructure for that yet. Let's test Java
9007 ;; generation only.
9008 (for-each
9009 (lambda (language)
9010 (delete-file-recursively
9011 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
9012 language)))
9013 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
9014 "python3" "swift"))
9015 #t))
9016 (add-before 'check 'generate-test-parsers
9017 (lambda* (#:key outputs #:allow-other-keys)
9018 (define (run-antlr dir filename package)
9019 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
9020 "-package" package (string-append dir "/" filename)
9021 "-Xlog"))
9022 (setenv "PATH" (string-append (getenv "PATH") ":"
9023 (assoc-ref outputs "out") "/bin"))
9024 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9025 "Java.g4" "org.antlr.v4.test.runtime.java.api")
9026 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9027 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
9028 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9029 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
9030 #t))
9031 (add-before 'check 'remove-graphemes
9032 (lambda _
9033 ;; When running antlr on grahemes.g4, we get a runtime exception:
9034 ;; set is empty. So delete the file that depends on it.
9035 (delete-file
9036 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
9037 #t))
9038 (add-after 'install 'bin-install
9039 (lambda* (#:key inputs outputs #:allow-other-keys)
9040 (let* ((output (assoc-ref outputs "out"))
9041 (bin (string-append output "/bin"))
9042 (bin/antlr4 (string-append bin "/antlr4")))
9043 (mkdir-p bin)
9044 (with-output-to-file bin/antlr4
9045 (lambda _
9046 (display
9047 (string-append
9048 "#!"
9049 (search-input-file inputs "bin/sh")
9050 "\n"
9051 (string-append (assoc-ref inputs "openjdk")
9052 "/bin/java")
9053 " -cp "
9054 (string-append output "/share/java/antlr4.jar")
9055 ":"
9056 (string-join
9057 (apply append
9058 (map (lambda (input)
9059 (find-files (assoc-ref inputs input)
9060 "\\.jar$"))
9061 '("antlr3" "java-stringtemplate"
9062 "java-antlr4-runtime" "java-treelayout"
9063 "java-jsonp-api" "java-icu4j")))
9064 ":")
9065 " org.antlr.v4.Tool $*\n"))))
9066 (chmod bin/antlr4 #o755))))
9067 (add-before 'build 'copy-resources
9068 (lambda _
9069 (copy-recursively "tool/resources/" "build/classes")
9070 #t))
9071 (add-before 'build 'generate-unicode
9072 (lambda _
9073 ;; First: build the generator
9074 (invoke "javac" "-cp" (getenv "CLASSPATH")
9075 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
9076 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
9077 ;; Then use it
9078 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9079 ":tool/src:runtime/Java")
9080 "org.antlr.v4.unicode.UnicodeRenderer"
9081 "tool/resources/org/antlr/v4/tool/templates"
9082 "unicodedata"
9083 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
9084 ;; It seems there is a bug with our ST4
9085 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
9086 (("\\\\>") ">"))
9087 ;; Remove the additional file
9088 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
9089 #t))
9090 (add-before 'build 'generate-grammar
9091 (lambda* (#:key inputs #:allow-other-keys)
9092 (with-directory-excursion "tool/src/org/antlr/v4/parse"
9093 (for-each (lambda (file)
9094 (display file)
9095 (newline)
9096 (invoke "antlr3" file))
9097 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
9098 "GrammarTreeVisitor.g" "ATNBuilder.g"
9099 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
9100 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
9101 (install-file "../parse/ANTLRParser.tokens" ".")
9102 (display "SourceGenTriggers.g\n")
9103 (invoke "antlr3" "SourceGenTriggers.g"))
9104 #t)))))
9105 (inputs
9106 (list antlr3
9107 java-antlr4-runtime
9108 java-icu4j
9109 java-jsonp-api
9110 java-stringtemplate
9111 java-treelayout
9112 openjdk))
9113 (native-inputs
9114 (list java-junit))
9115 (synopsis "Parser and lexer generator in Java")
9116 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
9117parser generator for reading, processing, executing, or translating structured
9118text or binary files. It's widely used to build languages, tools, and
9119frameworks. From a grammar, ANTLR generates a parser that can build and walk
9120parse trees.")))
9121
9122(define-public java-antlr4-runtime-4.1
9123 (package
9124 (inherit java-antlr4-runtime)
9125 (version "4.1")
9126 (source (origin
9127 (method git-fetch)
9128 (uri (git-reference
9129 (url "https://github.com/antlr/antlr4")
9130 (commit version)))
9131 (file-name (git-file-name "antlr4" version))
9132 (sha256
9133 (base32
9134 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
9135 (arguments
9136 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
9137 ((#:phases phases)
9138 `(modify-phases ,phases
9139 (add-before 'configure 'chmod
9140 (lambda _
9141 (chmod "build.xml" #o644)
9142 #t))))))
9143 (inputs
9144 (list java-treelayout))))
9145
9146(define-public antlr4-4.1
9147 (package
9148 (inherit antlr4)
9149 (version (package-version java-antlr4-runtime-4.1))
9150 (source (package-source java-antlr4-runtime-4.1))
9151 (arguments
9152 (substitute-keyword-arguments (package-arguments antlr4)
9153 ((#:test-dir _)
9154 "tool/test")
9155 ((#:test-exclude excludes)
9156 `(list "**/TestParseErrors.java"
9157 "**/TestTopologicalSort.java"
9158 ,@excludes))
9159 ((#:phases phases)
9160 `(modify-phases ,phases
9161 (delete 'generate-unicode)
9162 (replace 'check
9163 (lambda _
9164 (invoke "ant" "check")
9165 #t))
9166 (add-before 'configure 'chmod
9167 (lambda _
9168 (chmod "build.xml" #o644)
9169 #t))
9170 (delete 'remove-graphemes)
9171 (delete 'remove-unrelated-languages)
9172 (delete 'generate-test-parsers)))))
9173 (inputs
9174 (alist-replace
9175 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
9176 (package-inputs antlr4)))))
9177
9178(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
9179 (package
9180 (inherit java-antlr4-runtime)
9181 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
9182 (version "4.7.4")
9183 (source (origin
9184 (method git-fetch)
9185 (uri (git-reference
9186 (url "https://github.com/tunnelvisionlabs/antlr4")
9187 (commit (string-append version "-opt"))))
9188 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
9189 (sha256
9190 (base32
9191 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
9192 (patches
9193 (search-patches "java-antlr4-Add-standalone-generator.patch"
9194 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
9195 (arguments
9196 `(#:jar-name "java-antlr4-runtime-annotations.jar"
9197 #:source-dir "runtime/JavaAnnotations/src"
9198 #:tests? #f; no tests
9199 #:phases
9200 (modify-phases %standard-phases
9201 (add-after 'build 'copy-resources
9202 (lambda _
9203 (copy-recursively "runtime/JavaAnnotations/resources"
9204 "build/classes")
9205 #t))
9206 (add-after 'copy-resources 'rebuild-jar
9207 (lambda _
9208 (invoke "ant" "jar")
9209 #t)))))
9210 (inputs '())
9211 (native-inputs '())
9212 (synopsis "Annotations for ANTLR's runtime library")
9213 (description "This package contains annotations used during the build of
9214the runtime library of ANTLR.")))
9215
9216;; the runtime of this library requires a lexer that is generated by antlr4.
9217;; However, antlr4 itself requires this library at build and run-time. We
9218;; use [email protected], the closest version of antlr that doesn't need this
9219;; bootstrap process, to generate the lexer. The generated lexer is built
9220;; for the 4.1 runtime, which is slightly different from this runtime.
9221;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
9222;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
9223;; the proper, working, runtime to build antlr4 again.
9224(define-public java-tunnelvisionlabs-antlr4-runtime-bootstrap
9225 (package
9226 (inherit java-antlr4-runtime)
9227 (name "java-tunnelvisionlabs-antlr4-runtime")
9228 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9229 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9230 (arguments
9231 `(#:jar-name "java-antlr4-runtime.jar"
9232 #:source-dir "runtime/Java/src"
9233 #:tests? #f; tests require antlr4, but antlr4 depends on this package
9234 #:phases
9235 (modify-phases %standard-phases
9236 (add-before 'build 'generate-xpath-lexer
9237 (lambda _
9238 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
9239 "-visitor" "-no-listener"
9240 "-package" "org.antlr.v4.runtime.tree.xpath"
9241 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
9242 ;; Generated code is for an incompatible version of the runtime
9243 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
9244 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
9245 "LexerATNSimulator(this,_ATN)"))
9246 #t))
9247 (add-before 'build 'copy-resources
9248 (lambda _
9249 (copy-recursively "runtime/Java/src/main/dot"
9250 "build/classes")
9251 #t)))))
9252 (native-inputs
9253 `(("antlr4" ,antlr4-4.1)
9254 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9255 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))
9256 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9257
9258(define-public java-tunnelvisionlabs-antlr4-bootstrap
9259 (package
9260 (inherit antlr4)
9261 (name "java-tunnelvisionlabs-antlr4")
9262 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9263 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9264 (arguments
9265 (substitute-keyword-arguments (package-arguments antlr4)
9266 ((#:test-dir _)
9267 "tool/test:runtime-testsuite/src")
9268 ((#:phases phases)
9269 `(modify-phases ,phases
9270 (delete 'remove-unrelated-languages)
9271 (delete 'remove-graphemes)
9272 (delete 'generate-test-parsers)
9273 (delete 'check)))))
9274 (native-inputs '())
9275 (inputs
9276 `(("antlr3" ,antlr3)
9277 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9278 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9279 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
9280 ("java-icu4j" ,java-icu4j)
9281 ("java-jsonp-api" ,java-jsonp-api)
9282 ("java-stringtemplate" ,java-stringtemplate)
9283 ("java-treelayout" ,java-treelayout)
9284 ("openjdk" ,openjdk)))
9285 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9286
9287(define-public java-tunnelvisionlabs-antlr4-runtime
9288 (package
9289 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9290 (native-inputs
9291 (alist-replace
9292 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
9293 (package-native-inputs
9294 java-tunnelvisionlabs-antlr4-runtime-bootstrap)))
9295 (properties
9296 (alist-delete
9297 'hidden?
9298 (package-properties java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
9299
9300(define-public java-tunnelvisionlabs-antlr4
9301 (package
9302 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
9303 (inputs
9304 (alist-replace
9305 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
9306 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))
9307 (properties
9308 (alist-delete
9309 'hidden?
9310 (package-properties java-tunnelvisionlabs-antlr4-bootstrap)))))
9311
9312(define-public java-commons-cli-1.2
9313 ;; This is a bootstrap dependency for Maven2.
9314 (package
9315 (inherit java-commons-cli)
9316 (version "1.2")
9317 (source (origin
9318 (method url-fetch)
9319 (uri (string-append "mirror://apache/commons/cli/source/"
9320 "commons-cli-" version "-src.tar.gz"))
9321 (sha256
9322 (base32
9323 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
9324 (arguments
9325 `(#:jar-name "commons-cli.jar"
9326 #:phases
9327 (modify-phases %standard-phases
9328 (add-before 'check 'fix-build-xml
9329 (lambda* (#:key inputs #:allow-other-keys)
9330 (substitute* "build.xml"
9331 (("dir=\"\\$\\{test.home\\}/java\"")
9332 "dir=\"${test.home}\""))
9333 #t)))))
9334 (native-inputs
9335 (list java-junit))))
9336
9337(define-public java-microemulator-cldc
9338 (package
9339 (name "java-microemulator-cldc")
9340 (version "2.0.4")
9341 (source (origin
9342 (method url-fetch)
9343 (uri (string-append "https://github.com/barteo/microemu/archive/"
9344 "microemulator_"
9345 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
9346 version)
9347 ".tar.gz"))
9348 (file-name (string-append name "-" version ".tar.gz"))
9349 (sha256
9350 (base32
9351 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
9352 (build-system ant-build-system)
9353 (arguments
9354 `(#:jar-name "microemulator-cldc.jar"
9355 #:source-dir "microemu-cldc/src/main/java"
9356 #:tests? #f)); Requires even older software
9357 (home-page "https://github.com/barteo/microemu")
9358 (synopsis "J2ME CLDC emulator")
9359 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
9360Emulator. It demonstrates MIDlet based applications in web browser
9361applet and can be run as a standalone java application.")
9362 (license (list license:asl2.0
9363 ;; or altenatively:
9364 license:lgpl2.1+))))
9365
9366(define-public java-datanucleus-javax-persistence
9367 (package
9368 (name "java-datanucleus-javax-persistence")
9369 (version "2.2.0")
9370 (source (origin
9371 (method url-fetch)
9372 (uri (string-append "https://github.com/datanucleus/"
9373 "javax.persistence/archive/javax.persistence-"
9374 version "-release.tar.gz"))
9375 (sha256
9376 (base32
9377 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
9378 (build-system ant-build-system)
9379 (arguments
9380 `(#:jar-name "java-datanucleus-javax-persistence.jar"
9381 #:jdk ,icedtea-8
9382 #:source-dir "src/main/java"
9383 #:tests? #f)); no tests
9384 (home-page "https://github.com/datanucleus/javax.persistence")
9385 (synopsis "JPA API")
9386 (description "This package contains a clean definition of JPA API intended
9387for use with DataNucleus JPA since the JCP haven't provided an official JPA API
9388jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
9389used to generate this API.")
9390 (license (list license:edl1.0 license:epl1.0))))
9391
9392(define-public java-osgi-cmpn
9393 (package
9394 (name "java-osgi-cmpn")
9395 (version "6.0.0")
9396 (source (origin
9397 (method url-fetch)
9398 (uri (string-append "https://repo1.maven.org/maven2/"
9399 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
9400 version "-sources.jar"))
9401 (sha256
9402 (base32
9403 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
9404 (build-system ant-build-system)
9405 (arguments
9406 `(#:jar-name "osgi-cmpn.jar"
9407 #:tests? #f)); no tests
9408 (inputs
9409 `(("annotation" ,java-osgi-annotation)
9410 ("core" ,java-osgi-core)
9411 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
9412 ("microemulator" ,java-microemulator-cldc)
9413 ("servlet" ,java-classpathx-servletapi)))
9414 (home-page "https://www.osgi.org")
9415 (synopsis "Compendium specification module of OSGi framework")
9416 (description
9417 "OSGi, for Open Services Gateway initiative framework, is a module system
9418and service platform for the Java programming language. This package contains
9419the compendium specification module, providing interfaces and classes for use
9420in compiling bundles.")
9421 (license license:asl2.0)))
9422
9423(define-public java-osgi-service-component-annotations
9424 (package
9425 (name "java-osgi-service-component-annotations")
9426 (version "1.3.0")
9427 (source (origin
9428 (method url-fetch)
9429 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9430 "org.osgi.service.component.annotations/"
9431 version "/org.osgi.service.component.annotations-"
9432 version "-sources.jar"))
9433 (sha256
9434 (base32
9435 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
9436 (build-system ant-build-system)
9437 (arguments
9438 `(#:jar-name "osgi-service-component-annotations.jar"
9439 #:tests? #f)); no tests
9440 (inputs
9441 `(("annotation" ,java-osgi-annotation)))
9442 (home-page "https://www.osgi.org")
9443 (synopsis "Support annotations for osgi-service-component")
9444 (description
9445 "OSGi, for Open Services Gateway initiative framework, is a module system
9446and service platform for the Java programming language. This package contains
9447the support annotations for osgi-service-component.")
9448 (license license:asl2.0)))
9449
9450(define-public java-osgi-dto
9451 (package
9452 (name "java-osgi-dto")
9453 (version "1.0.0")
9454 (source (origin
9455 (method url-fetch)
9456 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9457 "org.osgi.dto/" version "/org.osgi.dto-"
9458 version "-sources.jar"))
9459 (sha256
9460 (base32
9461 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
9462 (build-system ant-build-system)
9463 (arguments
9464 `(#:jar-name "osgi-dto.jar"
9465 #:tests? #f)); no tests
9466 (inputs
9467 `(("annotation" ,java-osgi-annotation)))
9468 (home-page "https://www.osgi.org")
9469 (synopsis "Data Transfer Objects")
9470 (description
9471 "OSGi, for Open Services Gateway initiative framework, is a module system
9472and service platform for the Java programming language. This package contains
9473the Data Transfer Objects. It is easily serializable having only public fields
9474of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9475Map and array aggregates may also be used. The aggregates must only hold
9476objects of the listed types or aggregates.")
9477 (license license:asl2.0)))
9478
9479(define-public java-osgi-resource
9480 (package
9481 (name "java-osgi-resource")
9482 (version "1.0.0")
9483 (source (origin
9484 (method url-fetch)
9485 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9486 "org.osgi.resource/"
9487 version "/org.osgi.resource-"
9488 version "-sources.jar"))
9489 (sha256
9490 (base32
9491 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9492 (build-system ant-build-system)
9493 (arguments
9494 `(#:jar-name "osgi-resource.jar"
9495 #:tests? #f)); no tests
9496 (inputs
9497 `(("annotation" ,java-osgi-annotation)
9498 ("dto" ,java-osgi-dto)))
9499 (home-page "https://www.osgi.org")
9500 (synopsis "OSGI Resource")
9501 (description
9502 "OSGi, for Open Services Gateway initiative framework, is a module system
9503and service platform for the Java programming language. This package contains
9504the definition of common types in osgi packages.")
9505 (license license:asl2.0)))
9506
9507(define-public java-osgi-namespace-contract
9508 (package
9509 (name "java-osgi-namespace-contract")
9510 (version "1.0.0")
9511 (source (origin
9512 (method url-fetch)
9513 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9514 "org.osgi.namespace.contract/"
9515 version "/org.osgi.namespace.contract-"
9516 version "-sources.jar"))
9517 (sha256
9518 (base32
9519 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9520 (build-system ant-build-system)
9521 (inputs
9522 `(("resource" ,java-osgi-resource)
9523 ("annotation" ,java-osgi-annotation)))
9524 (arguments
9525 `(#:jar-name "osgi-namespace-contract.jar"
9526 #:tests? #f)); no tests
9527 (home-page "https://www.osgi.org")
9528 (synopsis "Contract Capability and Requirement Namespace")
9529 (description
9530 "OSGi, for Open Services Gateway initiative framework, is a module system
9531and service platform for the Java programming language. This package contains
9532the names for the attributes and directives for a namespace with contracts.")
9533 (license license:asl2.0)))
9534
9535(define-public java-osgi-namespace-extender
9536 (package
9537 (name "java-osgi-namespace-extender")
9538 (version "1.0.1")
9539 (source (origin
9540 (method url-fetch)
9541 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9542 "org.osgi.namespace.extender/"
9543 version "/org.osgi.namespace.extender-"
9544 version "-sources.jar"))
9545 (sha256
9546 (base32
9547 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9548 (build-system ant-build-system)
9549 (inputs
9550 `(("resource" ,java-osgi-resource)
9551 ("annotation" ,java-osgi-annotation)))
9552 (arguments
9553 `(#:jar-name "osgi-namespace-extendent.jar"
9554 #:tests? #f)); no tests
9555 (home-page "https://www.osgi.org")
9556 (synopsis "Extender Capability and Requirement Namespace")
9557 (description
9558 "OSGi, for Open Services Gateway initiative framework, is a module system
9559and service platform for the Java programming language. This package contains
9560the names for the attributes and directives for an extender namespace.")
9561 (license license:asl2.0)))
9562
9563(define-public java-osgi-namespace-service
9564 (package
9565 (name "java-osgi-namespace-service")
9566 (version "1.0.0")
9567 (source (origin
9568 (method url-fetch)
9569 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9570 "org.osgi.namespace.service/"
9571 version "/org.osgi.namespace.service-"
9572 version "-sources.jar"))
9573 (sha256
9574 (base32
9575 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9576 (build-system ant-build-system)
9577 (inputs
9578 `(("resource" ,java-osgi-resource)
9579 ("annotation" ,java-osgi-annotation)))
9580 (arguments
9581 `(#:jar-name "osgi-namespace-service.jar"
9582 #:tests? #f)); no tests
9583 (home-page "https://www.osgi.org")
9584 (synopsis "Service Capability and Requirement Namespace")
9585 (description
9586 "OSGi, for Open Services Gateway initiative framework, is a module system
9587and service platform for the Java programming language. This package contains
9588the names for the attributes and directives for a service namespace.")
9589 (license license:asl2.0)))
9590
9591(define-public java-osgi-util-function
9592 (package
9593 (name "java-osgi-util-function")
9594 (version "1.0.0")
9595 (source (origin
9596 (method url-fetch)
9597 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9598 "org.osgi.util.function/"
9599 version "/org.osgi.util.function-"
9600 version "-sources.jar"))
9601 (sha256
9602 (base32
9603 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9604 (build-system ant-build-system)
9605 (arguments
9606 `(#:jar-name "osgi-util-function.jar"
9607 #:tests? #f)); no tests
9608 (inputs
9609 `(("annotation" ,java-osgi-annotation)))
9610 (home-page "https://www.osgi.org")
9611 (synopsis "OSGI Util Function")
9612 (description
9613 "OSGi, for Open Services Gateway initiative framework, is a module system
9614and service platform for the Java programming language. This package contains
9615an interface for a function that accepts a single argument and produces a result.")
9616 (license license:asl2.0)))
9617
9618(define-public java-osgi-util-promise
9619 (package
9620 (name "java-osgi-util-promise")
9621 (version "1.0.0")
9622 (source (origin
9623 (method url-fetch)
9624 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9625 "org.osgi.util.promise/"
9626 version "/org.osgi.util.promise-"
9627 version "-sources.jar"))
9628 (sha256
9629 (base32
9630 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9631 (build-system ant-build-system)
9632 (arguments
9633 `(#:jar-name "osgi-util-promise.jar"
9634 #:tests? #f)); no tests
9635 (inputs
9636 `(("annotation" ,java-osgi-annotation)
9637 ("function" ,java-osgi-util-function)))
9638 (home-page "https://www.osgi.org")
9639 (synopsis "Promise of a value")
9640 (description
9641 "OSGi, for Open Services Gateway initiative framework, is a module system
9642and service platform for the Java programming language. This package contains
9643an interface and utilitary classes for promises. A Promise represents a future
9644value. It handles the interactions for asynchronous processing.")
9645 (license license:asl2.0)))
9646
9647(define-public java-osgi-service-metatype-annotations
9648 (package
9649 (name "java-osgi-service-metatype-annotations")
9650 (version "1.3.0")
9651 (source (origin
9652 (method url-fetch)
9653 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9654 "org.osgi.service.metatype.annotations/"
9655 version "/org.osgi.service.metatype.annotations-"
9656 version "-sources.jar"))
9657 (sha256
9658 (base32
9659 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9660 (build-system ant-build-system)
9661 (arguments
9662 `(#:jar-name "osgi-service-metatype-annotations.jar"
9663 #:tests? #f)); no tests
9664 (inputs
9665 `(("annotation" ,java-osgi-annotation)))
9666 (home-page "https://www.osgi.org")
9667 (synopsis "Support annotations for metatype")
9668 (description
9669 "OSGi, for Open Services Gateway initiative framework, is a module system
9670and service platform for the Java programming language. This package contains
9671the support annotations for metatype.")
9672 (license license:asl2.0)))
9673
9674(define-public java-osgi-service-repository
9675 (package
9676 (name "java-osgi-service-repository")
9677 (version "1.1.0")
9678 (source (origin
9679 (method url-fetch)
9680 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9681 "org.osgi.service.repository/"
9682 version "/org.osgi.service.repository-"
9683 version "-sources.jar"))
9684 (sha256
9685 (base32
9686 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9687 (build-system ant-build-system)
9688 (arguments
9689 `(#:jar-name "osgi-service-repository.jar"
9690 #:tests? #f)); no tests
9691 (inputs
9692 `(("annotation" ,java-osgi-annotation)
9693 ("promise" ,java-osgi-util-promise)
9694 ("resource" ,java-osgi-resource)))
9695 (home-page "https://www.osgi.org")
9696 (synopsis "OSGI service repository")
9697 (description
9698 "OSGi, for Open Services Gateway initiative framework, is a module system
9699and service platform for the Java programming language. This package contains
9700a repository service that contains resources.")
9701 (license license:asl2.0)))
9702
9703(define-public java-osgi-framework
9704 (package
9705 (name "java-osgi-framework")
9706 (version "1.8.0")
9707 (source (origin
9708 (method url-fetch)
9709 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9710 "org.osgi.framework/" version "/org.osgi.framework-"
9711 version "-sources.jar"))
9712 (sha256
9713 (base32
9714 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9715 (build-system ant-build-system)
9716 (arguments
9717 `(#:jar-name "osgi-framework.jar"
9718 #:tests? #f)); no tests
9719 (inputs
9720 `(("annotation" ,java-osgi-annotation)
9721 ("resource" ,java-osgi-resource)
9722 ("dto" ,java-osgi-dto)))
9723 (home-page "https://www.osgi.org")
9724 (synopsis "OSGi framework")
9725 (description
9726 "OSGi, for Open Services Gateway initiative framework, is a module system
9727and service platform for the Java programming language.")
9728 (license license:asl2.0)))
9729
9730(define-public java-osgi-service-log
9731 (package
9732 (name "java-osgi-service-log")
9733 (version "1.3.0")
9734 (source (origin
9735 (method url-fetch)
9736 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9737 "org.osgi.service.log/"
9738 version "/org.osgi.service.log-"
9739 version "-sources.jar"))
9740 (sha256
9741 (base32
9742 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9743 (build-system ant-build-system)
9744 (arguments
9745 `(#:jar-name "osgi-service-log.jar"
9746 #:tests? #f)); no tests
9747 (inputs
9748 (list java-osgi-framework))
9749 (home-page "https://www.osgi.org")
9750 (synopsis "Provides methods for bundles to write messages to the log")
9751 (description
9752 "OSGi, for Open Services Gateway initiative framework, is a module system
9753and service platform for the Java programming language. This package contains
9754the log service.")
9755 (license license:asl2.0)))
9756
9757(define-public java-osgi-service-jdbc
9758 (package
9759 (name "java-osgi-service-jdbc")
9760 (version "1.0.0")
9761 (source (origin
9762 (method url-fetch)
9763 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9764 "org.osgi.service.jdbc/"
9765 version "/org.osgi.service.jdbc-"
9766 version "-sources.jar"))
9767 (sha256
9768 (base32
9769 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9770 (build-system ant-build-system)
9771 (arguments
9772 `(#:jar-name "osgi-service-jdbc.jar"
9773 #:tests? #f)); no tests
9774 (home-page "https://www.osgi.org")
9775 (synopsis "Factory for JDBC connection factories")
9776 (description
9777 "OSGi, for Open Services Gateway initiative framework, is a module system
9778and service platform for the Java programming language. This package contains
9779a factory for JDBC connection factories. There are 3 preferred connection
9780factories for getting JDBC connections:
9781
9782@itemize
9783@item @code{javax.sql.DataSource};
9784@item @code{javax.sql.ConnectionPoolDataSource};
9785@item @code{javax.sql.XADataSource}.
9786@end itemize")
9787 (license license:asl2.0)))
9788
9789(define-public java-osgi-service-resolver
9790 (package
9791 (name "java-osgi-service-resolver")
9792 (version "1.0.1")
9793 (source (origin
9794 (method url-fetch)
9795 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9796 "org.osgi.service.resolver/"
9797 version "/org.osgi.service.resolver-"
9798 version "-sources.jar"))
9799 (sha256
9800 (base32
9801 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9802 (build-system ant-build-system)
9803 (arguments
9804 `(#:jar-name "osgi-service-resolver.jar"
9805 #:tests? #f)); no tests
9806 (inputs
9807 `(("annotation" ,java-osgi-annotation)
9808 ("resource" ,java-osgi-resource)))
9809 (home-page "https://www.osgi.org")
9810 (synopsis "OSGI Resolver service")
9811 (description
9812 "OSGi, for Open Services Gateway initiative framework, is a module system
9813and service platform for the Java programming language. This package contains
9814a resolver service that resolves the specified resources in the context supplied
9815by the caller.")
9816 (license license:asl2.0)))
9817
9818(define-public java-osgi-util-tracker
9819 (package
9820 (name "java-osgi-util-tracker")
9821 (version "1.5.1")
9822 (source (origin
9823 (method url-fetch)
9824 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9825 "org.osgi.util.tracker/"
9826 version "/org.osgi.util.tracker-"
9827 version "-sources.jar"))
9828 (sha256
9829 (base32
9830 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9831 (build-system ant-build-system)
9832 (arguments
9833 `(#:jar-name "osgi-util-tracker.jar"
9834 #:tests? #f)); no tests
9835 (inputs
9836 `(("framework" ,java-osgi-framework)
9837 ("annotation" ,java-osgi-annotation)))
9838 (home-page "https://www.osgi.org")
9839 (synopsis "Bundle tracking")
9840 (description
9841 "OSGi, for Open Services Gateway initiative framework, is a module system
9842and service platform for the Java programming language. This package contains
9843bundle tracking utility classes.")
9844 (license license:asl2.0)))
9845
9846(define-public java-osgi-service-cm
9847 (package
9848 (name "java-osgi-service-cm")
9849 (version "1.5.0")
9850 (source (origin
9851 (method url-fetch)
9852 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9853 "org.osgi.service.cm/"
9854 version "/org.osgi.service.cm-"
9855 version "-sources.jar"))
9856 (sha256
9857 (base32
9858 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9859 (build-system ant-build-system)
9860 (arguments
9861 `(#:jar-name "osgi-service-cm.jar"
9862 #:tests? #f)); no tests
9863 (inputs
9864 `(("framework" ,java-osgi-framework)
9865 ("annotation" ,java-osgi-annotation)))
9866 (home-page "https://www.osgi.org")
9867 (synopsis "OSGI Configuration Management")
9868 (description
9869 "OSGi, for Open Services Gateway initiative framework, is a module system
9870and service platform for the Java programming language. This package contains
9871utility classes for the configuration of services.")
9872 (license license:asl2.0)))
9873
9874(define-public java-osgi-service-packageadmin
9875 (package
9876 (name "java-osgi-service-packageadmin")
9877 (version "1.2.0")
9878 (source (origin
9879 (method url-fetch)
9880 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9881 "org.osgi.service.packageadmin/"
9882 version "/org.osgi.service.packageadmin-"
9883 version "-sources.jar"))
9884 (sha256
9885 (base32
9886 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9887 (build-system ant-build-system)
9888 (arguments
9889 `(#:jar-name "osgi-service-packageadmin.jar"
9890 #:tests? #f)); no tests
9891 (inputs
9892 `(("framework" ,java-osgi-framework)))
9893 (home-page "https://www.osgi.org")
9894 (synopsis "OSGI Package Administration")
9895 (description
9896 "OSGi, for Open Services Gateway initiative framework, is a module system
9897and service platform for the Java programming language. This package contains
9898the packageadmin service.")
9899 (license license:asl2.0)))
9900
9901(define-public java-ops4j-base-lang
9902 (package
9903 (name "java-ops4j-base-lang")
9904 (version "1.5.0")
9905 (source (origin
9906 (method url-fetch)
9907 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9908 "archive/base-" version ".tar.gz"))
9909 (sha256
9910 (base32
9911 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9912 (build-system ant-build-system)
9913 (arguments
9914 `(#:jar-name "java-ops4j-base-lang.jar"
9915 #:source-dir "ops4j-base-lang/src/main/java"
9916 #:tests? #f; no tests
9917 #:phases
9918 (modify-phases %standard-phases
9919 (add-before 'build 'add-test-file
9920 (lambda _
9921 ;; That file is required by a test in ops4j-pax-exam-core-spi
9922 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9923 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9924 (lambda _
9925 (display
9926 (string-append
9927 "version=" ,version "\n"
9928 "groupId=org.ops4j.base"
9929 "artifactId=ops4j-base-lang\n"))))
9930 #t)))))
9931 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9932 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9933 (description "OPS4J stands for Open Participation Software for Java. This
9934package contains utilities and extensions related to @code{java.lang}.")
9935 (license license:asl2.0)))
9936
9937(define-public java-ops4j-base-monitors
9938 (package
9939 (inherit java-ops4j-base-lang)
9940 (name "java-ops4j-base-monitors")
9941 (arguments
9942 `(#:jar-name "java-ops4j-base-monitors.jar"
9943 #:source-dir "ops4j-base-monitors/src/main/java"
9944 #:tests? #f)); no tests
9945 (inputs
9946 `(("lang" ,java-ops4j-base-lang)))
9947 (description "OPS4J stands for Open Participation Software for Java. This
9948package contains utilities and extensions related to monitoring.")))
9949
9950(define-public java-ops4j-base-io
9951 (package
9952 (inherit java-ops4j-base-lang)
9953 (name "java-ops4j-base-io")
9954 (arguments
9955 `(#:jar-name "java-ops4j-base-io.jar"
9956 #:source-dir "ops4j-base-io/src/main/java"
9957 #:test-dir "ops4j-base-io/src/test"
9958 #:test-exclude
9959 (list "**/ListerTest.java")))
9960 (inputs
9961 `(("lang" ,java-ops4j-base-monitors)
9962 ("lang" ,java-ops4j-base-lang)))
9963 (native-inputs
9964 `(("junit" ,java-junit)
9965 ("hamcrest" ,java-hamcrest-core)))
9966 (description "OPS4J stands for Open Participation Software for Java. This
9967package contains utilities and extensions related to handling streams and files.")))
9968
9969(define-public java-ops4j-base-util
9970 (package
9971 (inherit java-ops4j-base-lang)
9972 (name "java-ops4j-base-util")
9973 (arguments
9974 `(#:jar-name "java-ops4j-base-util.jar"
9975 #:source-dir "ops4j-base-util/src/main/java"
9976 #:test-dir "ops4j-base-util/src/test"))
9977 (inputs
9978 `(("lang" ,java-ops4j-base-lang)))
9979 (native-inputs
9980 `(("junit" ,java-junit)))
9981 (description "OPS4J stands for Open Participation Software for Java. This
9982package contains utilities and extensions related to environment, i18n and
9983mime types.")))
9984
9985(define-public java-ops4j-base-util-property
9986 (package
9987 (inherit java-ops4j-base-lang)
9988 (name "java-ops4j-base-util-property")
9989 (arguments
9990 `(#:jar-name "java-ops4j-base-util-property.jar"
9991 #:source-dir "ops4j-base-util-property/src/main/java"
9992 #:tests? #f)); no tests
9993 (inputs
9994 `(("lang" ,java-ops4j-base-lang)
9995 ("util" ,java-ops4j-base-util)))
9996 (description "OPS4J stands for Open Participation Software for Java. This
9997package contains utilities and extensions related to resolving properties from
9998different sources.")))
9999
10000(define-public java-ops4j-base-store
10001 (package
10002 (inherit java-ops4j-base-lang)
10003 (name "java-ops4j-base-store")
10004 (arguments
10005 `(#:jar-name "java-ops4j-base-store.jar"
10006 #:source-dir "ops4j-base-store/src/main/java"
10007 #:tests? #f)); no tests
10008 (inputs
10009 `(("lang" ,java-ops4j-base-lang)
10010 ("slf4j" ,java-slf4j-api)
10011 ("io" ,java-ops4j-base-io)))
10012 (description "OPS4J stands for Open Participation Software for Java. This
10013package contains utilities for storing and retrieving data from an
10014@code{InputStream}.")))
10015
10016(define-public java-ops4j-base-spi
10017 (package
10018 (inherit java-ops4j-base-lang)
10019 (name "java-ops4j-base-spi")
10020 (arguments
10021 `(#:jar-name "java-ops4j-base-spi.jar"
10022 #:source-dir "ops4j-base-spi/src/main/java"
10023 #:test-dir "ops4j-base-spi/src/test"))
10024 (native-inputs
10025 `(("junit" ,java-junit)
10026 ("hamcrest" ,java-hamcrest-core)))
10027 (description "OPS4J stands for Open Participation Software for Java. This
10028package contains utilities for obtaining services via the Java SE 6
10029@code{ServiceLoader}.")))
10030
10031(define-public java-aqute-bnd-annotation
10032 (package
10033 (name "java-aqute-bnd-annotation")
10034 (version "3.5.0")
10035 (source (origin
10036 (method url-fetch)
10037 (uri (string-append "https://github.com/bndtools/bnd/archive/"
10038 version ".REL.tar.gz"))
10039 (file-name (string-append name "-" version ".tar.gz"))
10040 (sha256
10041 (base32
10042 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
10043 (build-system ant-build-system)
10044 (arguments
10045 `(#:jar-name "java-aqute-bnd-annotation.jar"
10046 #:source-dir "biz.aQute.bnd.annotation/src"
10047 #:tests? #f)); empty test dir
10048 (home-page "https://bnd.bndtools.org/")
10049 (synopsis "Tools for OSGi")
10050 (description "Bnd is a swiss army knife for OSGi, it creates manifest
10051headers based on analyzing the class code, it verifies the project settings,
10052it manages project dependencies, gives diffs jars, and much more.")
10053 (license license:asl2.0)))
10054
10055(define-public java-aqute-libg
10056 (package
10057 (inherit java-aqute-bnd-annotation)
10058 (name "java-aqute-libg")
10059 (arguments
10060 `(#:jar-name "java-aqute-libg.jar"
10061 ;; The build fails when source/target more recent than 1.7. This
10062 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
10063 ;;
10064 ;; It is closed as won't fix. There is no way to change the source
10065 ;; so that it works on 1.8, and still works on 1.6, the upstream
10066 ;; target. It work fine on 1.7, so we use 1.7.
10067 #:make-flags (list "-Dant.build.javac.source=1.7"
10068 "-Dant.build.javac.target=1.7")
10069 #:phases
10070 (modify-phases %standard-phases
10071 (add-before 'configure 'chdir
10072 ;; Change to aQute.libg directory, so that the relative
10073 ;; paths in the tests aren't broken.
10074 (lambda _
10075 (chdir "aQute.libg")
10076 #t))
10077 (add-before 'check 'create-test-directory
10078 ;; Copy the test directory to test/java, since that's where
10079 ;; ant-build-system's default project in build.xml expects to find
10080 ;; the test classes. Leave a copy in the original place to not
10081 ;; break paths in tests.
10082 (lambda _
10083 (mkdir "src/test")
10084 (copy-recursively "test" "src/test/java")
10085 #t)))))
10086 (inputs
10087 `(("slf4j" ,java-slf4j-api)
10088 ("osgi-annot" ,java-osgi-annotation)
10089 ("java-osgi-cmpn" ,java-osgi-cmpn)
10090 ("osgi" ,java-osgi-core)))
10091 (native-inputs
10092 `(("hamcrest" ,java-hamcrest-core)
10093 ("java-junit" ,java-junit)))))
10094
10095(define-public java-aqute-bndlib
10096 (package
10097 (inherit java-aqute-bnd-annotation)
10098 (name "java-aqute-bndlib")
10099 (arguments
10100 `(#:jar-name "java-bndlib.jar"
10101 #:source-dir "biz.aQute.bndlib/src"
10102 #:tests? #f)); no tests
10103 (inputs
10104 `(("slf4j" ,java-slf4j-api)
10105 ("osgi-annot" ,java-osgi-annotation)
10106 ("java-aqute-libg" ,java-aqute-libg)
10107 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
10108 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
10109 ("java-osgi-service-repository" ,java-osgi-service-repository)
10110 ("java-osgi-service-log" ,java-osgi-service-log)
10111 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
10112 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
10113 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
10114 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
10115 ("promise" ,java-osgi-util-promise)
10116 ("osgi" ,java-osgi-core)))))
10117
10118(define-public java-ops4j-pax-tinybundles
10119 (package
10120 (name "java-ops4j-pax-tinybundles")
10121 (version "2.1.1")
10122 (source (origin
10123 (method url-fetch)
10124 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
10125 "archive/tinybundles-" version ".tar.gz"))
10126 (sha256
10127 (base32
10128 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
10129 (arguments
10130 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
10131 #:source-dir "src/main/java"
10132 #:test-exclude
10133 ;; Abstract base classes for other tests
10134 (list "**/BndTest.java" "**/CoreTest.java")
10135 #:phases
10136 (modify-phases %standard-phases
10137 (add-before 'check 'fix-version
10138 (lambda _
10139 ;; This test has a reference to an old version of bndlib we are not
10140 ;; packaging. It uses the version referenced in pom.xml. We replace
10141 ;; it with our own version.
10142 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
10143 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
10144 ,(package-version java-aqute-bndlib)))
10145 #t)))))
10146 (inputs
10147 `(("lang" ,java-ops4j-base-lang)
10148 ("io" ,java-ops4j-base-io)
10149 ("store" ,java-ops4j-base-store)
10150 ("slf4j" ,java-slf4j-api)
10151 ("libg" ,java-aqute-libg)
10152 ("bndlib" ,java-aqute-bndlib)))
10153 (native-inputs
10154 `(("junit" ,java-junit)
10155 ("hamcrest" ,java-hamcrest-core)
10156 ("log4j" ,java-log4j-api)
10157 ("bndannotation" ,java-aqute-bnd-annotation)
10158 ("framework" ,java-osgi-framework)))
10159 (build-system ant-build-system)
10160 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
10161 (synopsis "Java APIs to create OSGi related artifacts")
10162 (description "Tinybundles is all about creating OSGi related artifacts like
10163Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
10164to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
10165other hand, this library can be a foundation of real end user tools that need
10166to create those artifacts.")
10167 (license license:asl2.0)))
10168
10169(define-public java-ops4j-pax-exam-core
10170 (package
10171 (name "java-ops4j-pax-exam-core")
10172 (version "4.11.0")
10173 (source (origin
10174 (method url-fetch)
10175 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
10176 "archive/exam-reactor-" version ".tar.gz"))
10177 (sha256
10178 (base32
10179 "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26"))))
10180 (arguments
10181 (list #:jar-name "java-ops4j-pax-exam-core.jar"
10182 #:source-dir "core/pax-exam/src/main/java"
10183 #:test-dir "core/pax-exam/src/test"))
10184 (inputs
10185 (list java-slf4j-api
10186 java-ops4j-base-lang
10187 java-ops4j-base-io
10188 java-ops4j-base-util-property
10189 java-ops4j-base-store
10190 java-osgi-core))
10191 (native-inputs
10192 (list java-junit
10193 java-hamcrest-core))
10194 (build-system ant-build-system)
10195 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
10196 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
10197 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
10198the user take control of the OSGi framework, the test framework (e.g. JUnit) and
10199the system under test at the same time.")
10200 (license license:asl2.0)))
10201
10202(define-public java-ops4j-pax-exam-core-spi
10203 (package
10204 (inherit java-ops4j-pax-exam-core)
10205 (name "java-ops4j-pax-exam-core-spi")
10206 (arguments
10207 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
10208 #:source-dir "src/main/java"
10209 #:test-exclude
10210 (list
10211 ;; Abstract base class, not a test
10212 "**/BaseStagedReactorTest.java"
10213 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
10214 "**/WarBuilderTest.java")
10215 #:phases
10216 (modify-phases %standard-phases
10217 (add-before 'configure 'chdir
10218 (lambda _
10219 ;; Tests assume we are in this directory
10220 (chdir "core/pax-exam-spi")
10221 #t))
10222 (add-before 'check 'fix-tests
10223 (lambda _
10224 ;; One test checks that this file is present.
10225 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
10226 (with-output-to-file
10227 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
10228 (lambda _
10229 (display
10230 (string-append "artifactId = pax-exam-spi\n"
10231 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
10232 ;; Maven puts compilation results in the target directory, while we
10233 ;; put them in the build directory.
10234 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
10235 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
10236 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
10237 (("target") "build"))
10238 ;; One test is expected to fail, but it doesn't throw the expected exception
10239 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
10240 (("AssertionError") "IllegalArgumentException"))
10241 #t)))))
10242 (inputs
10243 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
10244 ("lang" ,java-ops4j-base-lang)
10245 ("monitors" ,java-ops4j-base-monitors)
10246 ("store" ,java-ops4j-base-store)
10247 ("io" ,java-ops4j-base-io)
10248 ("spi" ,java-ops4j-base-spi)
10249 ("osgi" ,java-osgi-core)
10250 ("slf4j" ,java-slf4j-api)
10251 ("tinybundles" ,java-ops4j-pax-tinybundles)))
10252 (native-inputs
10253 `(("mockito" ,java-mockito-1)
10254 ("junit" ,java-junit)
10255 ("hamcrest" ,java-hamcrest-core)
10256 ("cglib" ,java-cglib)
10257 ("objenesis" ,java-objenesis)))))
10258
10259(define-public java-ops4j-pax-exam-core-junit
10260 (package
10261 (inherit java-ops4j-pax-exam-core)
10262 (name "java-ops4j-pax-exam-core-junit")
10263 (arguments
10264 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
10265 #:source-dir "drivers/pax-exam-junit4/src/main/java"
10266 #:tests? #f)); no tests
10267 (inputs
10268 `(("junit" ,java-junit)
10269 ("slf4j" ,java-slf4j-api)
10270 ("core" ,java-ops4j-pax-exam-core)
10271 ("spi" ,java-ops4j-pax-exam-core-spi)))
10272 (native-inputs '())))
10273
10274(define-public java-fasterxml-jackson-annotations
10275 (package
10276 (name "java-fasterxml-jackson-annotations")
10277 (version "2.9.4")
10278 (source (origin
10279 (method url-fetch)
10280 (uri (string-append "https://github.com/FasterXML/"
10281 "jackson-annotations/archive/"
10282 "jackson-annotations-" version ".tar.gz"))
10283 (sha256
10284 (base32
10285 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
10286 (build-system ant-build-system)
10287 (arguments
10288 `(#:jar-name "jackson-annotations.jar"
10289 #:source-dir "src/main/java"
10290 #:test-dir "src/test"))
10291 (native-inputs
10292 `(("junit" ,java-junit)))
10293 (home-page "https://github.com/FasterXML/jackson-annotations")
10294 (synopsis "General purpose annotations for the Jackson Data Processor")
10295 (description "This package contains general purpose annotations for the
10296Jackson Data Processor, used on value and handler types. The only annotations
10297not included are ones that require dependency to the Databind package.")
10298 (license license:asl2.0)))
10299
10300(define-public java-fasterxml-jackson-core
10301 (package
10302 (name "java-fasterxml-jackson-core")
10303 (version "2.9.4")
10304 (source (origin
10305 (method url-fetch)
10306 (uri (string-append "https://github.com/FasterXML/"
10307 "jackson-core/archive/"
10308 "jackson-core-" version ".tar.gz"))
10309 (sha256
10310 (base32
10311 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
10312 (build-system ant-build-system)
10313 (arguments
10314 `(#:jar-name "jackson-core.jar"
10315 #:source-dir "src/main/java"
10316 #:test-dir "src/test"
10317 #:test-exclude
10318 (list
10319 ;; Expected failure. pom.xml excludes these
10320 "**/failing/**"
10321 ;; Base classes that have no constructor for junit
10322 "**/BaseTest.java"
10323 "**/ConcurrencyReadTest.java"
10324 "**/ManualCharAccessTest.java"
10325 "**/ManualCharAccessTest.java"
10326 "**/TrailingCommasTest.java"
10327 "**/AsyncMissingValuesInObjectTest.java"
10328 "**/AsyncMissingValuesInArrayTest.java")
10329 #:phases
10330 (modify-phases %standard-phases
10331 (add-before 'configure 'generate-PackageVersion.java
10332 (lambda _
10333 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
10334 (in (string-append out ".in")))
10335 (copy-file in out)
10336 (substitute* out
10337 (("@package@") "com.fasterxml.jackson.core.json")
10338 (("@projectversion@") ,version)
10339 (("@projectgroupid@") "com.fasterxml.jackson.core")
10340 (("@projectartifactid@") "jackson-core")))
10341 #t))
10342 (add-before 'build 'copy-resources
10343 (lambda _
10344 (copy-recursively "src/main/resources"
10345 "build/classes")
10346 #t))
10347 (add-before 'check 'copy-test-resources
10348 (lambda _
10349 (copy-recursively "src/test/resources"
10350 "build/test-classes")
10351 #t)))))
10352 (native-inputs
10353 `(("junit" ,java-junit)
10354 ("hamcrest" ,java-hamcrest-core)))
10355 (home-page "https://github.com/FasterXML/jackson-core")
10356 (synopsis "Low-level streaming parser and generator abstractions")
10357 (description "This package contains core low-level incremental
10358(streaming) parser and generator abstractions used by the Jackson Data
10359Processor. It also includes the default implementation of handler types
10360(parser, generator) that handle JSON format.")
10361 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10362
10363(define-public java-fasterxml-jackson-databind
10364 (package
10365 (name "java-fasterxml-jackson-databind")
10366 (version "2.9.4")
10367 (source (origin
10368 (method url-fetch)
10369 (uri (string-append "https://github.com/FasterXML/"
10370 "jackson-databind/archive/"
10371 "jackson-databind-" version ".tar.gz"))
10372 (sha256
10373 (base32
10374 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
10375 (build-system ant-build-system)
10376 (arguments
10377 `(#:jar-name "jackson-databind.jar"
10378 #:source-dir "src/main/java"
10379 #:tests? #f; requires javax.measures for which I can't find a free implementation
10380 #:phases
10381 (modify-phases %standard-phases
10382 (add-before 'configure 'generate-PackageVersion.java
10383 (lambda _
10384 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
10385 (in (string-append out ".in")))
10386 (copy-file in out)
10387 (substitute* out
10388 (("@package@") "com.fasterxml.jackson.databind.cfg")
10389 (("@projectversion@") ,version)
10390 (("@projectgroupid@") "com.fasterxml.jackson.databind")
10391 (("@projectartifactid@") "jackson-databind")))
10392 #t))
10393 (add-before 'build 'copy-resources
10394 (lambda _
10395 (copy-recursively "src/main/resources" "build/classes")
10396 #t)))))
10397 (inputs
10398 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
10399 (home-page "https://github.com/FasterXML/jackson-databind")
10400 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
10401 (description "This package contains the general-purpose data-binding
10402functionality and tree-model for Jackson Data Processor. It builds on core
10403streaming parser/generator package, and uses Jackson Annotations for
10404configuration.")
10405 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10406
10407(define-public java-fasterxml-jackson-modules-base-jaxb
10408 (package
10409 (name "java-fasterxml-jackson-modules-base-jaxb")
10410 (version "2.9.4")
10411 (source (origin
10412 (method url-fetch)
10413 (uri (string-append "https://github.com/FasterXML/"
10414 "jackson-modules-base/archive/"
10415 "jackson-modules-base-" version ".tar.gz"))
10416 (sha256
10417 (base32
10418 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10419 (build-system ant-build-system)
10420 (arguments
10421 `(#:jar-name "jackson-modules-base-jaxb.jar"
10422 #:source-dir "jaxb/src/main/java"
10423 #:test-dir "jaxb/src/test"
10424 #:test-exclude
10425 ;; Base class for tests
10426 (list "**/BaseJaxbTest.java")
10427 #:phases
10428 (modify-phases %standard-phases
10429 (add-before 'configure 'generate-PackageVersion.java
10430 (lambda _
10431 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
10432 "jackson/module/jaxb/PackageVersion.java"))
10433 (in (string-append out ".in")))
10434 (copy-file in out)
10435 (substitute* out
10436 (("@package@") "com.fasterxml.jackson.module.jaxb")
10437 (("@projectversion@") ,version)
10438 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
10439 (("@projectartifactid@") "jackson-module-jaxb")))
10440 #t))
10441 (add-before 'build 'copy-resources
10442 (lambda _
10443 (copy-recursively "jaxb/src/main/resources" "build/classes")
10444 #t)))))
10445 (inputs
10446 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10447 java-fasterxml-jackson-databind))
10448 (native-inputs
10449 (list java-junit))
10450 (home-page "https://github.com/FasterXML/jackson-modules-base")
10451 (synopsis "Jaxb annotations jackson module")
10452 (description "This package is the jaxb annotations module for jackson.")
10453 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10454
10455(define-public java-fasterxml-jackson-modules-base-mrbean
10456 (package
10457 (name "java-fasterxml-jackson-modules-base-mrbean")
10458 (version "2.9.4")
10459 (source (origin
10460 (method url-fetch)
10461 (uri (string-append "https://github.com/FasterXML/"
10462 "jackson-modules-base/archive/"
10463 "jackson-modules-base-" version ".tar.gz"))
10464 (sha256
10465 (base32
10466 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10467 (build-system ant-build-system)
10468 (arguments
10469 `(#:jar-name "jackson-modules-base-mrbean.jar"
10470 #:source-dir "mrbean/src/main/java"
10471 #:test-dir "mrbean/src/test"
10472 #:test-exclude
10473 ;; Base class for tests
10474 (list "**/BaseTest.java")
10475 #:phases
10476 (modify-phases %standard-phases
10477 (add-before 'configure 'generate-PackageVersion.java
10478 (lambda _
10479 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10480 "jackson/module/mrbean/PackageVersion.java"))
10481 (in (string-append out ".in")))
10482 (copy-file in out)
10483 (substitute* out
10484 (("@package@") "com.fasterxml.jackson.module.mrbean")
10485 (("@projectversion@") ,version)
10486 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10487 (("@projectartifactid@") "jackson-module-mrbean")))
10488 #t)))))
10489 (inputs
10490 (list java-asm java-fasterxml-jackson-annotations
10491 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
10492 (native-inputs
10493 (list java-junit))
10494 (home-page "https://github.com/FasterXML/jackson-modules-base")
10495 (synopsis "POJO type materialization for Java")
10496 (description "This package implements POJO type materialization.
10497Databinders can construct implementation classes for Java interfaces as part
10498of deserialization.")
10499 (license license:asl2.0)))
10500
10501(define-public java-snakeyaml
10502 (package
10503 (name "java-snakeyaml")
10504 (version "1.18")
10505 (source (origin
10506 (method url-fetch)
10507 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10508 version ".tar.gz"))
10509 (file-name (string-append name "-" version ".tar.gz"))
10510 (sha256
10511 (base32
10512 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10513 (build-system ant-build-system)
10514 (arguments
10515 `(#:jar-name "java-snakeyaml.jar"
10516 #:source-dir "src/main/java"
10517 ;; Tests require velocity, a cyclic dependency, and
10518 ;; java-spring-framework-context which is not packaged.
10519 #:tests? #f))
10520 (home-page "https://bitbucket.org/asomov/snakeyaml")
10521 (synopsis "YAML processor")
10522 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10523 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10524
10525(define-public java-fasterxml-jackson-dataformat-yaml
10526 (package
10527 (name "java-fasterxml-jackson-dataformat-yaml")
10528 (version "2.9.4")
10529 (source (origin
10530 (method url-fetch)
10531 (uri (string-append "https://github.com/FasterXML/"
10532 "jackson-dataformats-text/archive/"
10533 "jackson-dataformats-text-" version ".tar.gz"))
10534 (sha256
10535 (base32
10536 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10537 (build-system ant-build-system)
10538 (arguments
10539 `(#:jar-name "jackson-dataformat-yaml.jar"
10540 #:source-dir "yaml/src/main/java"
10541 #:test-dir "yaml/src/test"
10542 #:test-exclude (list "**/failing/**.java")
10543 #:phases
10544 (modify-phases %standard-phases
10545 (add-before 'configure 'generate-PackageVersion.java
10546 (lambda _
10547 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10548 (in (string-append out ".in")))
10549 (copy-file in out)
10550 (substitute* out
10551 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10552 (("@projectversion@") ,version)
10553 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10554 (("@projectartifactid@") "jackson-dataformat-yaml")))
10555 #t)))))
10556 (inputs
10557 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10558 java-fasterxml-jackson-databind java-snakeyaml))
10559 (native-inputs
10560 `(("junit" ,java-junit)
10561 ("hamcrest" ,java-hamcrest-core)
10562 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10563 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10564 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10565 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10566 (synopsis "Yaml backend for Jackson")
10567 (description "Dataformat backends are used to support format alternatives
10568to JSON, supported by default. This is done by sub-classing Jackson core
10569abstractions.")
10570 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10571
10572(define-public java-stax2-api
10573 (package
10574 (name "java-stax2-api")
10575 (version "4.0.0")
10576 (source (origin
10577 (method url-fetch)
10578 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10579 "stax2-api-" version ".tar.gz"))
10580 (sha256
10581 (base32
10582 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10583 (build-system ant-build-system)
10584 (arguments
10585 `(#:jar-name "java-stax2-api.jar"
10586 #:source-dir "src/main/java"
10587 #:tests? #f)); no tests
10588 (home-page "https://github.com/FasterXML/stax2-api")
10589 (synopsis "Stax2 API")
10590 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10591significant new functionalities, such as full-featured bi-direction validation
10592interface and high-performance Typed Access API.")
10593 (license license:bsd-2)))
10594
10595(define-public java-woodstox-core
10596 (package
10597 (name "java-woodstox-core")
10598 (version "5.0.3")
10599 (source (origin
10600 (method git-fetch)
10601 (uri (git-reference
10602 (url "https://github.com/FasterXML/woodstox")
10603 (commit (string-append "woodstox-core-" version))))
10604 (file-name (git-file-name name version))
10605 (sha256
10606 (base32
10607 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10608 (build-system ant-build-system)
10609 (arguments
10610 `(#:jar-name "woodstox.jar"
10611 #:test-exclude
10612 (list "**/Base*.java" "failing/**")
10613 #:phases
10614 (modify-phases %standard-phases
10615 (add-before 'build 'remove-msv-dep
10616 (lambda _
10617 ;; we don't need osgi, and it depends on msv
10618 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10619 ;; msv's latest release is from 2011 and we don't need it
10620 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10621 (delete-file-recursively "src/test/java/wstxtest/osgi")
10622 (delete-file-recursively "src/test/java/wstxtest/msv")
10623 #t))
10624 (add-before 'build 'copy-resources
10625 (lambda _
10626 (copy-recursively "src/main/resources" "build/classes")
10627 #t)))))
10628 (inputs
10629 `(("stax2" ,java-stax2-api)))
10630 (native-inputs
10631 `(("junit" ,java-junit)))
10632 (home-page "https://github.com/FasterXML/woodstox")
10633 (synopsis "Stax XML API implementation")
10634 (description "Woodstox is a stax XML API implementation.")
10635 (license license:asl2.0)))
10636
10637(define-public java-fasterxml-jackson-dataformat-xml
10638 (package
10639 (name "java-fasterxml-jackson-dataformat-xml")
10640 (version "2.9.4")
10641 (source (origin
10642 (method git-fetch)
10643 (uri (git-reference
10644 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10645 (commit (string-append "jackson-dataformat-xml-" version))))
10646 (file-name (git-file-name name version))
10647 (sha256
10648 (base32
10649 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10650 (build-system ant-build-system)
10651 (arguments
10652 `(#:jar-name "jackson-dataformat-xml.jar"
10653 #:source-dir "src/main/java"
10654 #:test-exclude
10655 (list "**/failing/**")
10656 #:phases
10657 (modify-phases %standard-phases
10658 (add-before 'configure 'generate-PackageVersion.java
10659 (lambda _
10660 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10661 (in (string-append out ".in")))
10662 (copy-file in out)
10663 (newline)
10664 (substitute* out
10665 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10666 (("@projectversion@") ,version)
10667 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10668 (("@projectartifactid@") "jackson-dataformat-xml")))
10669 #t))
10670 (add-before 'build 'copy-resources
10671 (lambda _
10672 (copy-recursively "src/main/resources" "build/classes")
10673 #t)))))
10674 (inputs
10675 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10676 ("jackson-core" ,java-fasterxml-jackson-core)
10677 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10678 ("jackson-databind" ,java-fasterxml-jackson-databind)
10679 ("stax2-api" ,java-stax2-api)
10680 ("woodstox" ,java-woodstox-core)))
10681 (native-inputs
10682 `(("junit" ,java-junit)
10683 ("hamcrest" ,java-hamcrest-core)))
10684 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10685 (synopsis "Read and write XML")
10686 (description "This package contains Jackson extension component for reading
10687and writing XML encoded data.
10688
10689Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10690approach (that is, no support is added for \"Schema-first\" approach). Support
10691for JAXB annotations is provided by JAXB annotation module; this module
10692provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10693@code{JsonFactory}) as well as small number of higher level overrides needed to
10694make data-binding work.")
10695 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10696
10697(define-public java-hdrhistogram
10698 (package
10699 (name "java-hdrhistogram")
10700 (version "2.1.9")
10701 (source (origin
10702 (method git-fetch)
10703 (uri (git-reference
10704 (url "https://github.com/HdrHistogram/HdrHistogram")
10705 (commit (string-append "HdrHistogram-" version))))
10706 (file-name (git-file-name name version))
10707 (sha256
10708 (base32
10709 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10710 (build-system ant-build-system)
10711 (arguments
10712 `(#:jar-name "java-hdrhistogram.jar"
10713 #:source-dir "src/main/java"
10714 #:phases
10715 (modify-phases %standard-phases
10716 (add-after 'unpack 'make-files-writable
10717 (lambda _
10718 (for-each make-file-writable (find-files "."))
10719 #t))
10720 (add-before 'configure 'set-version
10721 (lambda _
10722 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10723 (template (string-append version-java ".template")))
10724 (copy-file template version-java)
10725 (substitute* version-java
10726 (("\\$VERSION\\$") ,version)
10727 (("\\$BUILD_TIME\\$") "0"))
10728 #t))))))
10729 (native-inputs
10730 `(("junit" ,java-junit)
10731 ("hamcrest" ,java-hamcrest-core)))
10732 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10733 (synopsis "High dynamic range histogram")
10734 (description "Hdrhistogram creates histograms that support
10735recording and analyzing sampled data value counts across a configurable integer
10736value range with configurable value precision within the range. Value precision
10737is expressed as the number of significant digits in the value recording, and
10738provides control over value quantization behavior across the value range and
10739the subsequent value resolution at any given level.")
10740 (license license:public-domain)))
10741
10742(define-public java-cofoja
10743 (package
10744 (name "java-cofoja")
10745 (version "1.3")
10746 (source (origin
10747 (method git-fetch)
10748 (uri (git-reference
10749 (url "https://github.com/nhatminhle/cofoja")
10750 (commit (string-append "v" version))))
10751 (file-name (string-append "java-cofoja-" version "-checkout"))
10752 (sha256
10753 (base32
10754 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10755 (build-system ant-build-system)
10756 (arguments
10757 `(#:build-target "dist"
10758 #:test-target "test"
10759 #:jdk ,icedtea-8
10760 #:make-flags
10761 (list "-Ddist.dir=dist")
10762 #:modules ((guix build ant-build-system)
10763 (guix build java-utils)
10764 (guix build utils)
10765 (srfi srfi-1)
10766 (ice-9 match))
10767 #:phases
10768 (modify-phases %standard-phases
10769 ;; The bulid system ignores the class path the ant-build-system sets
10770 ;; up and instead expects to find all dependencies in the "lib"
10771 ;; directory.
10772 (add-after 'unpack 'create-libdir
10773 (lambda* (#:key inputs #:allow-other-keys)
10774 (mkdir-p "lib")
10775 (for-each
10776 (lambda (file)
10777 (let ((target (string-append "lib/" (basename file))))
10778 (unless (file-exists? target)
10779 (symlink file target))))
10780 (append-map (match-lambda
10781 ((label . dir)
10782 (find-files dir "\\.jar$")))
10783 inputs))
10784 #t))
10785 (replace 'install (install-jars "dist")))))
10786 (inputs
10787 (list java-asm))
10788 (native-inputs
10789 (list java-junit))
10790 (home-page "https://github.com/nhatminhle/cofoja")
10791 (synopsis "Contracts for Java")
10792 (description "Contracts for Java, or Cofoja for short, is a contract
10793programming framework and test tool for Java, which uses annotation processing
10794and bytecode instrumentation to provide run-time checking. (In particular,
10795this is not a static analysis tool.)")
10796 (license license:lgpl3+)))
10797
10798(define-public java-aopalliance
10799 (package
10800 (name "java-aopalliance")
10801 (version "1.0")
10802 (source (origin
10803 (method git-fetch)
10804 ;; Note: this git repository is not official, but contains the
10805 ;; source code that is in the CVS repository. Downloading the
10806 ;; tarball from sourceforge is undeterministic, and the cvs download
10807 ;; fails.
10808 (uri (git-reference
10809 (url "https://github.com/hoverruan/aopalliance")
10810 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10811 (file-name (string-append name "-" version))
10812 (sha256
10813 (base32
10814 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10815 (build-system ant-build-system)
10816 (arguments
10817 `(#:jar-name "java-aopalliance.jar"
10818 #:jdk ,icedtea-8
10819 #:tests? #f; no tests
10820 #:source-dir "aopalliance/src/main"
10821 #:phases
10822 (modify-phases %standard-phases
10823 (add-before 'install 'create-pom
10824 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10825 (replace 'install
10826 (install-from-pom "pom.xml")))))
10827 (home-page "https://aopalliance.sourceforge.net")
10828 (synopsis "Aspect-Oriented Programming")
10829 (description "The AOP Alliance project is a joint project between several
10830software engineering people who are interested in Aspect-Oriented Programming
10831(AOP) and Java.")
10832 (license license:public-domain)))
10833
10834(define-public java-javax-inject
10835 (package
10836 (name "java-javax-inject")
10837 (version "1")
10838 (source (origin
10839 (method git-fetch)
10840 (uri (git-reference
10841 (url "https://github.com/javax-inject/javax-inject")
10842 (commit version)))
10843 (file-name (git-file-name name version))
10844 (sha256
10845 (base32
10846 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10847 (build-system ant-build-system)
10848 (arguments
10849 `(#:jar-name "java-javax-inject.jar"
10850 #:tests? #f; no tests
10851 #:phases
10852 (modify-phases %standard-phases
10853 (replace 'install
10854 (install-from-pom "pom.xml")))))
10855 (home-page "https://github.com/javax-inject/javax-inject")
10856 (synopsis "JSR-330: Dependency Injection for Java")
10857 (description "This package specifies a means for obtaining objects in such
10858a way as to maximize reusability, testability and maintainability compared to
10859traditional approaches such as constructors, factories, and service locators
10860(e.g., JNDI). This process, known as dependency injection, is beneficial to
10861most nontrivial applications.
10862
10863Many types depend on other types. For example, a @var{Stopwatch} might depend
10864on a @var{TimeSource}. The types on which a type depends are known as its
10865dependencies. The process of finding an instance of a dependency to use at run
10866time is known as resolving the dependency. If no such instance can be found,
10867the dependency is said to be unsatisfied, and the application is broken.")
10868 (license license:asl2.0)))
10869
10870(define-public java-guice
10871 (package
10872 (name "java-guice")
10873 (version "4.1")
10874 (source (origin
10875 (method git-fetch)
10876 (uri (git-reference
10877 (url "https://github.com/google/guice")
10878 (commit version)))
10879 (file-name (git-file-name name version))
10880 (modules '((guix build utils)))
10881 (snippet
10882 `(begin
10883 (for-each delete-file (find-files "." ".*.jar")) #t))
10884 (sha256
10885 (base32
10886 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10887 (build-system ant-build-system)
10888 (arguments
10889 `(#:jar-name "java-guice.jar"
10890 #:jdk ,icedtea-8
10891 #:tests? #f; FIXME: tests are not in a java sub directory
10892 #:source-dir "core/src"
10893 #:phases
10894 (modify-phases %standard-phases
10895 (add-after 'unpack 'make-files-writable
10896 (lambda _
10897 (for-each make-file-writable (find-files "."))
10898 #t))
10899 (replace 'install
10900 (install-from-pom "core/pom.xml")))))
10901 (propagated-inputs
10902 (list java-aopalliance
10903 java-cglib
10904 java-guava
10905 java-javax-inject
10906 java-guice-parent-pom))
10907 (home-page "https://github.com/google/guice")
10908 (synopsis "Lightweight dependency injection framework")
10909 (description "Guice is a lightweight dependency injection framework for
10910Java 6 and above.")
10911 (license license:asl2.0)))
10912
10913(define-public java-guice-servlet
10914 (package
10915 (inherit java-guice)
10916 (name "java-guice-servlet")
10917 (arguments
10918 `(#:jar-name "guice-servlet.jar"
10919 #:source-dir "extensions/servlet/src/"
10920 #:jdk ,icedtea-8
10921 #:tests? #f ; FIXME: not in a java subdir
10922 #:phases
10923 (modify-phases %standard-phases
10924 (add-after 'unpack 'make-files-writable
10925 (lambda _
10926 (for-each make-file-writable (find-files "."))
10927 #t)))))
10928 (inputs
10929 `(("guice" ,java-guice)
10930 ("servlet" ,java-classpathx-servletapi)
10931 ,@(package-inputs java-guice)))))
10932
10933(define java-guice-parent-pom
10934 (package
10935 (inherit java-guice)
10936 (name "java-guice-parent-pom")
10937 (arguments
10938 `(#:tests? #f
10939 #:phases
10940 (modify-phases %standard-phases
10941 (delete 'configure)
10942 (delete 'build)
10943 (add-after 'install 'install-extensions
10944 (install-pom-file "extensions/pom.xml"))
10945 (replace 'install
10946 (install-pom-file "pom.xml")))))
10947 (propagated-inputs
10948 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10949
10950(define java-google-parent-pom-5
10951 (package
10952 (name "java-google-parent-pom")
10953 (version "5")
10954 (source (origin
10955 (method git-fetch)
10956 (uri (git-reference
10957 (url "https://github.com/google/google-maven-parents")
10958 (commit (string-append "google-" version))))
10959 (file-name (git-file-name name version))
10960 (sha256
10961 (base32
10962 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10963 (build-system ant-build-system)
10964 (arguments
10965 `(#:tests? #f
10966 #:phases
10967 (modify-phases %standard-phases
10968 (delete 'configure)
10969 (delete 'build)
10970 (replace 'install
10971 (install-pom-file "pom.xml")))))
10972 (home-page "https://github.com/google/google-maven-parents")
10973 (synopsis "Google parent pom")
10974 (description "This package contains the Maven parent POM for other Google
10975Java projects.")
10976 (license license:asl2.0)))
10977
10978(define-public java-assertj
10979 (package
10980 (name "java-assertj")
10981 (version "3.8.0")
10982 (source (origin
10983 (method git-fetch)
10984 (uri (git-reference
10985 (url "https://github.com/joel-costigliola/assertj-core")
10986 (commit (string-append "assertj-core-" version))))
10987 (file-name (git-file-name name version))
10988 (sha256
10989 (base32
10990 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10991 (build-system ant-build-system)
10992 (arguments
10993 `(#:jar-name "java-assertj.jar"
10994 #:jdk ,icedtea-8
10995 #:source-dir "src/main/java"
10996 #:tests? #f)); depends on tng-junit which depends on assertj
10997 (inputs
10998 `(("cglib" ,java-cglib)
10999 ("junit" ,java-junit)
11000 ("hamcrest" ,java-hamcrest-core)))
11001 (native-inputs
11002 `(("mockito" ,java-mockito-1)))
11003 (home-page "https://joel-costigliola.github.io/assertj/index.html")
11004 (synopsis "Fluent assertions for java")
11005 (description "AssertJ core is a Java library that provides a fluent
11006interface for writing assertions. Its main goal is to improve test code
11007readability and make maintenance of tests easier.")
11008 (license license:asl2.0)))
11009
11010(define-public java-jboss-javassist
11011 (package
11012 (name "java-jboss-javassist")
11013 (version "3.21.0")
11014 (source (origin
11015 (method git-fetch)
11016 (uri (git-reference
11017 (url "https://github.com/jboss-javassist/javassist")
11018 (commit
11019 (string-append "rel_"
11020 (string-map
11021 (lambda (x) (if (eq? x #\.) #\_ x)) version)
11022 "_ga"))))
11023 (file-name (git-file-name name version))
11024 (sha256
11025 (base32
11026 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
11027 (modules '((guix build utils)))
11028 (snippet
11029 '(begin
11030 (delete-file "javassist.jar")))))
11031 (build-system ant-build-system)
11032 (arguments
11033 `(#:jar-name "java-jboss-javassist.jar"
11034 #:jdk ,icedtea-8
11035 #:source-dir "src/main"
11036 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
11037 #:phases
11038 (modify-phases %standard-phases
11039 (add-after 'unpack 'make-files-writable
11040 (lambda _
11041 (for-each make-file-writable (find-files "."))
11042 #t)))))
11043 (native-inputs
11044 `(("junit" ,java-junit)))
11045 (home-page "https://github.com/jboss-javassist/javassist")
11046 (synopsis "Java bytecode engineering toolkit")
11047 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
11048manipulation simple. It is a class library for editing bytecodes in Java; it
11049enables Java programs to define a new class at runtime and to modify a class
11050file when the JVM loads it.")
11051 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
11052
11053(define-public java-jcommander
11054 (package
11055 (name "java-jcommander")
11056 (version "1.71")
11057 (source (origin
11058 (method git-fetch)
11059 (uri (git-reference
11060 (url "https://github.com/cbeust/jcommander")
11061 (commit version)))
11062 (file-name (git-file-name name version))
11063 (sha256
11064 (base32
11065 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
11066 (build-system ant-build-system)
11067 (arguments
11068 `(#:jar-name "java-jcommander.jar"
11069 #:jdk ,icedtea-8
11070 #:tests? #f; requires testng which depends on jcommander
11071 #:source-dir "src/main/java"))
11072 (home-page "https://jcommander.org")
11073 (synopsis "Command line parameters parser")
11074 (description "JCommander is a very small Java framework that makes it
11075trivial to parse command line parameters. Parameters are declared with
11076annotations.")
11077 (license license:asl2.0)))
11078
11079(define-public java-bsh
11080 (package
11081 (name "java-bsh")
11082 (version "2.1.1")
11083 (source (origin
11084 (method git-fetch)
11085 (uri (git-reference
11086 (url "https://github.com/beanshell/beanshell")
11087 (commit version)))
11088 (file-name (git-file-name name version))
11089 (sha256
11090 (base32
11091 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
11092 (modules '((guix build utils)))
11093 (snippet
11094 '(begin
11095 ;; Delete bundled third-party jar archives.
11096 (for-each delete-file (find-files "." ".*.jar$"))
11097 (for-each (lambda (file) (chmod file #o644))
11098 (find-files "." "."))
11099 #t))))
11100 (build-system ant-build-system)
11101 (arguments
11102 `(#:build-target "jarall"
11103 #:test-target "junit-tests-all"
11104 #:make-flags (list "-DDATE" "(no date for reproducibility)")
11105 #:phases
11106 (modify-phases %standard-phases
11107 (add-before 'check 'fix-test
11108 (lambda _
11109 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
11110 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
11111 (replace 'install
11112 (install-from-pom "pom.xml")))))
11113 (inputs
11114 (list java-classpathx-servletapi java-commons-bsf))
11115 (native-inputs
11116 (list java-junit javacc-3))
11117 (home-page "http://beanshell.org/")
11118 (synopsis "Lightweight Scripting for Java")
11119 (description "BeanShell is a small, free, embeddable Java source
11120interpreter with object scripting language features, written in Java.
11121BeanShell dynamically executes standard Java syntax and extends it with common
11122scripting conveniences such as loose types, commands, and method closures like
11123those in Perl and JavaScript.")
11124 (license license:asl2.0)))
11125
11126(define-public java-fest-util
11127 (package
11128 (name "java-fest-util")
11129 (version "1.2.5")
11130 (source (origin
11131 (method git-fetch)
11132 (uri (git-reference
11133 (url "https://github.com/alexruiz/fest-util/")
11134 (commit (string-append "fest-util-" version))))
11135 (file-name (git-file-name name version))
11136 (sha256
11137 (base32
11138 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
11139 (build-system ant-build-system)
11140 (arguments
11141 `(#:jar-name "java-fest-util.jar"
11142 #:source-dir "src/main/java"))
11143 (native-inputs
11144 `(("junit" ,java-junit)
11145 ("hamcrest" ,java-hamcrest-core)))
11146 (home-page "https://github.com/alexruiz/fest-util")
11147 (synopsis "FEST common utilities")
11148 (description "Common utilities used in all FEST module.")
11149 (license license:asl2.0)))
11150
11151(define-public java-fest-test
11152 (package
11153 (name "java-fest-test")
11154 (version "2.1.0")
11155 (source (origin
11156 (method git-fetch)
11157 (uri (git-reference
11158 (url "https://github.com/alexruiz/fest-test/")
11159 (commit (string-append "fest-test-" version))))
11160 (file-name (git-file-name name version))
11161 (sha256
11162 (base32
11163 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
11164 (build-system ant-build-system)
11165 (arguments
11166 `(#:jar-name "java-fest-test.jar"
11167 #:source-dir "src/main/java"
11168 #:tests? #f)); no tests
11169 (inputs
11170 `(("junit" ,java-junit)))
11171 (home-page "https://github.com/alexruiz/fest-test")
11172 (synopsis "Common FEST testing infrastructure")
11173 (description "Fest-test contains the common FEST testing infrastructure.")
11174 (license license:asl2.0)))
11175
11176(define-public java-fest-assert
11177 (package
11178 (name "java-fest-assert")
11179 (version "2.0M10")
11180 (source (origin
11181 (method git-fetch)
11182 (uri (git-reference
11183 (url "https://github.com/alexruiz/fest-assert-2.x/")
11184 (commit (string-append "fest-assert-core-" version))))
11185 (file-name (git-file-name name version))
11186 (sha256
11187 (base32
11188 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
11189 (build-system ant-build-system)
11190 (arguments
11191 `(#:jar-name "java-fest-assert.jar"
11192 #:source-dir "src/main/java"
11193 #:test-exclude
11194 (list
11195 "**/Abstract*.java"
11196 "**/*BaseTest.java"
11197 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
11198 "**/MessageFormatter_format_Test.java"
11199 "**/internal/*/*_assert*_Test.java")))
11200 (inputs
11201 (list java-fest-util))
11202 (native-inputs
11203 (list java-junit
11204 java-fest-test
11205 java-hamcrest-core
11206 java-mockito-1
11207 java-cglib
11208 java-objenesis))
11209 (home-page "https://github.com/alexruiz/fest-assert-2.x")
11210 (synopsis "FEST fluent assertions")
11211 (description "FEST-Assert provides a fluent interface for assertions.")
11212 (license license:asl2.0)))
11213
11214(define-public java-testng
11215 (package
11216 (name "java-testng")
11217 (version "6.14.3")
11218 (source (origin
11219 (method git-fetch)
11220 (uri (git-reference
11221 (url "https://github.com/cbeust/testng")
11222 (commit version)))
11223 (file-name (string-append name "-" version "-checkout"))
11224 (sha256
11225 (base32
11226 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
11227 (build-system ant-build-system)
11228 (arguments
11229 (list
11230 #:jdk icedtea-8; java.util.function
11231 #:jar-name "java-testng.jar"
11232 #:source-dir "src/main/java"
11233 #:phases
11234 '(modify-phases %standard-phases
11235 (add-after 'unpack 'delete-failing-tests
11236 (lambda _
11237 ;; FIXME: I don't know why these tests fail
11238 (substitute* "src/test/resources/testng.xml"
11239 ;; expected:<[0]> but was:<[3]>
11240 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
11241 ;; expected [3] but found [2]
11242 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
11243 ;; This is a parallel test and we've observed that it fails
11244 ;; sometimes.
11245 (("<class name=\"test.dataprovider.DataProviderTest\"/>") ""))))
11246 ;; We don't have groovy
11247 (add-after 'unpack 'delete-groovy-tests
11248 (lambda _
11249 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
11250 (substitute* "src/test/resources/testng.xml"
11251 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
11252 (add-before 'build 'copy-resources
11253 (lambda _
11254 (copy-recursively "src/main/resources" "build/classes")))
11255 (add-before 'check 'copy-test-resources
11256 (lambda _
11257 (copy-recursively "src/test/resources" "build/test-classes")))
11258 (replace 'check
11259 (lambda _
11260 (invoke "ant" "compile-tests")
11261 ;; we don't have groovy
11262 (substitute* "src/test/resources/testng.xml"
11263 (("<class name=\"test.groovy.GroovyTest\" />") ""))
11264 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11265 ":build/classes"
11266 ":build/test-classes")
11267 "-Dtest.resources.dir=src/test/resources"
11268 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
11269 (propagated-inputs
11270 (list java-junit
11271 java-jsr305
11272 java-bsh
11273 java-jcommander
11274 java-guice
11275 java-snakeyaml))
11276 (native-inputs
11277 (list java-guava
11278 java-javax-inject
11279 java-hamcrest-all
11280 java-assertj
11281 java-mockito-1
11282 java-cglib
11283 java-aopalliance))
11284 (home-page "https://testng.org")
11285 (synopsis "Testing framework")
11286 (description "TestNG is a testing framework inspired from JUnit and NUnit
11287but introducing some new functionalities that make it more powerful and easier
11288to use.")
11289 (license license:asl2.0)))
11290
11291(define-public java-jnacl
11292 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
11293 (revision "2"))
11294 (package
11295 (name "java-jnacl")
11296 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
11297 (source (origin
11298 (method git-fetch)
11299 (uri (git-reference
11300 (url "https://github.com/neilalexander/jnacl")
11301 (commit commit)))
11302 (file-name (git-file-name name version))
11303 (sha256
11304 (base32
11305 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
11306 (build-system ant-build-system)
11307 (arguments
11308 `(#:jar-name "jnacl.jar"
11309 #:source-dir "src/main/java"
11310 #:jdk ,icedtea-8
11311 #:phases
11312 (modify-phases %standard-phases
11313 (add-before 'build 'fix-tests
11314 (lambda _
11315 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
11316 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
11317 (("assertions.Assertions") "assertions.api.Assertions"))
11318 #t))
11319 (replace 'check
11320 (lambda _
11321 (invoke "ant" "compile-tests")
11322 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11323 ":build/classes"
11324 ":build/test-classes")
11325 "org.testng.TestNG" "-testclass"
11326 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
11327 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11328 ":build/classes"
11329 ":build/test-classes")
11330 "org.testng.TestNG" "-testclass"
11331 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
11332 (native-inputs
11333 (list java-testng java-fest-util java-fest-assert))
11334 (home-page "https://github.com/neilalexander/jnacl")
11335 (synopsis "Java implementation of NaCl")
11336 (description "Pure Java implementation of the NaCl: Networking and
11337Cryptography library.")
11338 (license license:bsd-2))))
11339
11340(define-public java-mvel2
11341 (package
11342 (name "java-mvel2")
11343 (version "2.3.1")
11344 (source (origin
11345 (method url-fetch)
11346 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
11347 version ".Final.tar.gz"))
11348 (sha256
11349 (base32
11350 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
11351 (build-system ant-build-system)
11352 (arguments
11353 `(#:jar-name "mvel2.jar"
11354 #:source-dir "src/main/java"
11355 #:test-exclude
11356 (list "**/Abstract*.java"
11357 ;; Base class with no tests
11358 "**/MVELThreadTest.java")
11359 #:phases
11360 (modify-phases %standard-phases
11361 (add-after 'install 'install-bin
11362 (lambda* (#:key outputs #:allow-other-keys)
11363 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
11364 (mkdir-p bin)
11365 (with-output-to-file (string-append bin "/mvel2")
11366 (lambda _
11367 (display
11368 (string-append
11369 "#!" (which "bash") "\n"
11370 "if [ \"$#\" -ne \"2\" ]; then\n"
11371 "echo 'Usage: mvel2 <script> <out.dir>'\n"
11372 "exit\n"
11373 "fi\n"
11374 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
11375 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
11376 " org.mvel2.sh.Main $1"))))
11377 (chmod (string-append bin "/mvel2") #o755))
11378 #t)))))
11379 (native-inputs
11380 `(("junit" ,java-junit)
11381 ("hamcrest" ,java-hamcrest-core)))
11382 (home-page "https://github.com/mvel/mvel")
11383 (synopsis "MVFLEX Expression Language")
11384 (description "MVEL has largely been inspired by Java syntax, but has some
11385fundamental differences aimed at making it more efficient as an expression
11386language, such as operators that directly support collection, array and string
11387matching, as well as regular expressions. MVEL is used to evaluate expressions
11388written using Java syntax.
11389
11390In addition to the expression language, MVEL serves as a templating language for
11391configuration and string construction.")
11392 (license license:asl2.0)))
11393
11394(define-public java-commons-jexl-2
11395 (package
11396 (name "java-commons-jexl")
11397 (version "2.1.1")
11398 (source (origin
11399 (method url-fetch)
11400 (uri (string-append "mirror://apache/commons/jexl/source/"
11401 "commons-jexl-" version "-src.tar.gz"))
11402 (sha256
11403 (base32
11404 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
11405 (build-system ant-build-system)
11406 (arguments
11407 `(#:jar-name "commons-jexl-2.jar"
11408 #:jdk ,icedtea-8
11409 #:source-dir "src/main/java"
11410 #:phases
11411 (modify-phases %standard-phases
11412 (add-before 'check 'disable-broken-tests
11413 (lambda* (#:key inputs #:allow-other-keys)
11414 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
11415 (substitute* "ArithmeticTest.java"
11416 (("asserter.assertExpression\\(\"3 / 0\"") "//")
11417 (("asserter.assertExpression\\(\"imanull") "//"))
11418 ;; This test fails with "ambiguous method invocation"
11419 (delete-file "CacheTest.java")
11420 ;; This test doesn't have access to the temp directory
11421 (substitute* "ClassCreatorTest.java"
11422 (("java.io.tmpdir") "user.dir"))
11423 ;; This test fails in trying to detect whether it can run.
11424 (substitute* "ClassCreator.java"
11425 (("boolean canRun =.*") "boolean canRun = false;\n"))
11426 ;; ...and these tests depend on it.
11427 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
11428 (delete-file "scripting/JexlScriptEngineTest.java"))
11429 #t))
11430 (add-before 'build 'run-javacc
11431 (lambda _
11432 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
11433 (invoke "java" "jjtree" "Parser.jjt")
11434 (invoke "java" "javacc" "Parser.jj"))
11435 #t)))))
11436 (inputs
11437 (list java-commons-logging-minimal))
11438 (native-inputs
11439 (list java-junit java-hamcrest-core javacc-4))
11440 (home-page "https://commons.apache.org/proper/commons-jexl/")
11441 (synopsis "Java Expression Language")
11442 (description "JEXL is a library intended to facilitate the implementation
11443of dynamic and scripting features in applications and frameworks written in
11444Java. JEXL implements an Expression Language based on some extensions to the
11445JSTL Expression Language supporting most of the constructs seen in
11446shell-script or ECMAScript. Its goal is to expose scripting features usable
11447by technical operatives or consultants working with enterprise platforms.")
11448 (license license:asl2.0)))
11449
11450(define-public java-lz4
11451 (package
11452 (name "java-lz4")
11453 (version "1.4.0")
11454 (source (origin
11455 (method git-fetch)
11456 (uri (git-reference
11457 (url "https://github.com/lz4/lz4-java")
11458 (commit version)))
11459 (file-name (git-file-name name version))
11460 (sha256
11461 (base32
11462 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11463 (build-system ant-build-system)
11464 (arguments
11465 `(#:jar-name "lz4.jar"
11466 #:jdk ,icedtea-8
11467 #:source-dir "src/java:src/java-unsafe"
11468 #:tests? #f; FIXME: requires more dependencies
11469 #:phases
11470 (modify-phases %standard-phases
11471 (add-after 'unpack 'make-files-writable
11472 (lambda _
11473 (for-each make-file-writable (find-files "."))
11474 #t))
11475 (add-before 'configure 'generate-source
11476 (lambda _
11477 (with-directory-excursion "src/build/source_templates"
11478 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11479 #t)))))
11480 (native-inputs
11481 `(("mvel" ,java-mvel2)))
11482 (home-page "https://jpountz.github.io/lz4-java")
11483 (synopsis "Compression algorithm")
11484 (description "LZ4 - Java is a Java port of the popular lz4 compression
11485algorithms and xxHash hashing algorithm.")
11486 (license license:asl2.0)))
11487
11488(define-public java-bouncycastle
11489 (package
11490 (name "java-bouncycastle")
11491 (version "1.67")
11492 (source (origin
11493 (method git-fetch)
11494 (uri (git-reference
11495 (url "http://git.bouncycastle.org/repositories/bc-java")
11496 ;(url "https://github.com/bcgit/bc-java")
11497 (commit (string-append "r1rv" (substring version 2 4)))))
11498 (file-name (git-file-name name version))
11499 (sha256
11500 (base32
11501 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11502 (modules '((guix build utils)))
11503 (snippet
11504 '(begin
11505 (for-each delete-file
11506 (find-files "." "\\.jar$"))
11507 #t))))
11508 (build-system ant-build-system)
11509 (arguments
11510 `(#:jdk ,icedtea-8
11511 #:tests? #f
11512 #:phases
11513 (modify-phases %standard-phases
11514 (replace 'build
11515 (lambda _
11516 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11517 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11518 ;; FIXME: the tests freeze.
11519 ;; (replace 'check
11520 ;; (lambda _
11521 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11522 (replace 'install
11523 (install-jars "build/artifacts/jdk1.5/jars")))))
11524 (inputs
11525 (list java-javax-mail))
11526 (native-inputs
11527 `(("unzip" ,unzip)
11528 ("junit" ,java-junit)
11529 ("java-native-access" ,java-native-access)
11530 ("java-native-access-platform" ,java-native-access-platform)))
11531 (home-page "https://www.bouncycastle.org")
11532 (synopsis "Cryptographic library")
11533 (description "Bouncy Castle is a cryptographic library for the Java
11534programming language.")
11535 (license license:expat)))
11536
11537(define-public java-lmax-disruptor
11538 (package
11539 (name "java-lmax-disruptor")
11540 (version "3.4.4")
11541 (source (origin
11542 (method git-fetch)
11543 (uri (git-reference
11544 (url "https://github.com/LMAX-Exchange/disruptor")
11545 (commit version)))
11546 (file-name (git-file-name name version))
11547 (sha256
11548 (base32
11549 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
11550 (build-system ant-build-system)
11551 (arguments
11552 `(#:jar-name "java-lmax-disruptor.jar"
11553 #:jdk ,icedtea-8
11554 #:tests? #f)); tests hang
11555 (inputs
11556 `(("junit" ,java-junit)
11557 ("java-hdrhistogram" ,java-hdrhistogram)
11558 ("java-jmock" ,java-jmock)
11559 ("java-jmock-legacy" ,java-jmock-legacy)
11560 ("java-jmock-junit4" ,java-jmock-junit4)
11561 ("java-hamcrest-all" ,java-hamcrest-all)))
11562 (native-inputs
11563 `(("cglib" ,java-cglib)
11564 ("objenesis" ,java-objenesis)))
11565 (home-page "https://www.lmax.com/disruptor")
11566 (synopsis "High performance inter-thread communication")
11567 (description "LMAX Disruptor is a software pattern and software component
11568for high performance inter-thread communication that avoids the need for
11569message queues or resource locking.")
11570 (license license:asl2.0)))
11571
11572(define-public java-conversant-disruptor
11573 (package
11574 (name "java-conversant-disruptor")
11575 (version "1.2.19")
11576 (source (origin
11577 (method git-fetch)
11578 (uri (git-reference
11579 (url "https://github.com/conversant/disruptor")
11580 (commit version)))
11581 (file-name (git-file-name name version))
11582 (sha256
11583 (base32
11584 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
11585 (build-system ant-build-system)
11586 (arguments
11587 `(#:jar-name "java-conversant-disruptor.jar"
11588 #:source-dir "src/main/java"
11589 #:phases
11590 (modify-phases %standard-phases
11591 (add-before 'build 'copy-resources
11592 (lambda _
11593 (copy-recursively "src/main/resources" "build/classes")))
11594 (add-before 'build 'remove-module
11595 (lambda _
11596 (delete-file "src/main/java/module-info.java"))))))
11597 (native-inputs
11598 (list java-junit))
11599 (home-page "https://github.com/conversant/disruptor")
11600 (synopsis "High performance intra-thread communication")
11601 (description "Conversant Disruptor is the highest performing intra-thread
11602transfer mechanism available in Java. Conversant Disruptor is an implementation
11603of this type of ring buffer that has almost no overhead and that exploits a
11604particularly simple design.")
11605 (license license:asl2.0)))
11606
11607(define-public java-jctools-core-1
11608 (package
11609 (name "java-jctools-core")
11610 (version "1.2.1")
11611 (source (origin
11612 (method git-fetch)
11613 (uri (git-reference
11614 (url "https://github.com/JCTools/JCTools")
11615 (commit (string-append "v" version))))
11616 (file-name (git-file-name name version))
11617 (sha256
11618 (base32
11619 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11620 (build-system ant-build-system)
11621 (arguments
11622 `(#:jar-name "java-jctools-core.jar"
11623 #:source-dir "jctools-core/src/main/java"
11624 #:test-dir "jctools-core/src/test"
11625 ;; The tests timeout on some architectures.
11626 #:tests? ,(not (or (target-aarch64?)
11627 (%current-target-system)))))
11628 (native-inputs
11629 (list java-junit java-hamcrest-all))
11630 (home-page "https://github.com/JCTools/JCTools")
11631 (synopsis "Concurrency tools for Java")
11632 (description "This library implements concurrent data structures that are
11633not natively available in Java.")
11634 (license license:asl2.0)))
11635
11636(define-public java-commons-bcel
11637 (package
11638 (name "java-commons-bcel")
11639 (version "6.1")
11640 (source (origin
11641 (method url-fetch)
11642 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11643 version "-src.tar.gz"))
11644 (sha256
11645 (base32
11646 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11647 (build-system ant-build-system)
11648 (arguments
11649 `(#:jar-name "bcel.jar"
11650 #:jdk ,icedtea-8
11651 #:source-dir "src/main/java"
11652 #:test-dir "src/test/java"
11653 ;; FIXME: Tests require the unpackaged jna.
11654 #:tests? #f))
11655 (home-page "https://commons.apache.org/proper/commons-bcel/")
11656 (synopsis "Byte code engineering library")
11657 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11658intended to give users a convenient way to analyze, create, and
11659manipulate (binary) Java class files. Classes are represented by objects
11660which contain all the symbolic information of the given class: methods, fields
11661and byte code instructions, in particular.
11662
11663Such objects can be read from an existing file, be transformed by a
11664program (e.g. a class loader at run-time) and written to a file again. An
11665even more interesting application is the creation of classes from scratch at
11666run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11667if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11668of Java @code{.class} files.")
11669 (properties '((upstream-name . "bcel")))
11670 (license license:asl2.0)))
11671
11672(define-public java-xerial-core
11673 (package
11674 (name "java-xerial-core")
11675 (version "2.1")
11676 (source (origin
11677 (method url-fetch)
11678 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11679 version ".tar.gz"))
11680 (file-name (string-append name "-" version ".tar.gz"))
11681 (sha256
11682 (base32
11683 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11684 (build-system ant-build-system)
11685 (arguments
11686 `(#:jar-name "xerial-core.jar"
11687 #:source-dir "xerial-core/src/main/java"
11688 #:test-dir "xerial-core/src/test"
11689 #:phases
11690 (modify-phases %standard-phases
11691 (add-before 'build 'copy-resources
11692 (lambda _
11693 (copy-recursively "xerial-core/src/main/resources"
11694 "build/classes")
11695 #t)))))
11696 (native-inputs
11697 `(("junit" ,java-junit)
11698 ("hamcrest" ,java-hamcrest-core)))
11699 (home-page "https://github.com/xerial/xerial-java")
11700 (synopsis "Data management libraries for Java")
11701 (description "Xerial is a set of data management libraries for the Java
11702programming language. The ultimate goal of the Xerial project is to manage
11703everything as database, including class objects, text format data, data
11704streams, etc.")
11705 (license license:asl2.0)))
11706
11707(define-public java-byte-buddy-dep
11708 (package
11709 (name "java-byte-buddy-dep")
11710 (version "1.14.0")
11711 (source (origin
11712 (method git-fetch)
11713 (uri (git-reference
11714 (url "https://github.com/raphw/byte-buddy")
11715 (commit (string-append "byte-buddy-" version))))
11716 (file-name (git-file-name name version))
11717 (sha256
11718 (base32
11719 "03jmsnkjb9d3z9brqs8fc512hhs5b5iab3a5wbax9zi03dskgvh2"))))
11720 (build-system ant-build-system)
11721 (arguments
11722 `(#:jar-name "byte-buddy-dep.jar"
11723 #:source-dir "byte-buddy-dep/src/main/java"
11724 #:test-dir "byte-buddy-dep/src/test"
11725 #:tests? #f; would build java files that are incompatible with current jdk
11726 #:phases
11727 (modify-phases %standard-phases
11728 (add-before 'build 'remove-annotations
11729 (lambda _
11730 (with-directory-excursion "byte-buddy-dep/src/main/java/net/bytebuddy"
11731 (substitute* (find-files "." ".*.java")
11732 (("@EqualsAndHashCode.*") "")
11733 (("import lombok.EqualsAndHashCode;") "")
11734 (("@SuppressFBWarnings.*") "")
11735 (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") ""))
11736 (substitute* '("description/type/TypeDescription.java"
11737 "dynamic/loading/ClassInjector.java")
11738 (("^ *value = .*") "")
11739 (("^ *justification = .*") ""))))))))
11740 (inputs
11741 (list java-asm-9 java-asm-commons-9 java-jsr305 java-native-access))
11742 (home-page "http://bytebuddy.net/")
11743 (synopsis "Runtime code generation for the Java virtual machine")
11744 (description "Byte Buddy is a code generation and manipulation library for
11745creating and modifying Java classes during the runtime of a Java application
11746and without the help of a compiler.")
11747 (license license:asl2.0)))
11748
11749(define-public java-powermock-reflect
11750 (package
11751 (name "java-powermock-reflect")
11752 (version "2.0.9")
11753 (source (origin
11754 (method git-fetch)
11755 (uri (git-reference
11756 (url "https://github.com/powermock/powermock")
11757 (commit (string-append "powermock-" version))))
11758 (file-name (git-file-name name version))
11759 (sha256
11760 (base32
11761 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
11762 (patches
11763 (search-patches "java-powermock-fix-java-files.patch"))))
11764 (build-system ant-build-system)
11765 (arguments
11766 `(#:jar-name "java-powermock-reflect.jar"
11767 #:source-dir "powermock-reflect/src/main/java"
11768 #:test-dir "powermock-reflect/src/test"))
11769 (inputs
11770 (list java-asm-9 java-objenesis))
11771 (native-inputs
11772 (list java-assertj java-cglib java-hamcrest-core java-junit))
11773 (home-page "https://github.com/powermock/powermock")
11774 (synopsis "Mock library extension framework")
11775 (description "PowerMock is a framework that extends other mock libraries
11776such as EasyMock with more powerful capabilities. PowerMock uses a custom
11777classloader and bytecode manipulation to enable mocking of static methods,
11778constructors, final classes and methods, private methods, removal of static
11779initializers and more. By using a custom classloader no changes need to be
11780done to the IDE or continuous integration servers which simplifies adoption.")
11781 (license license:asl2.0)))
11782
11783(define-public java-powermock-core
11784 (package
11785 (inherit java-powermock-reflect)
11786 (name "java-powermock-core")
11787 (arguments
11788 `(#:jar-name "java-powermock-core.jar"
11789 #:source-dir "powermock-core/src/main/java"
11790 #:test-dir "powermock-core/src/test"
11791 #:tests? #f; requires powermock-api
11792 #:jdk ,icedtea-8
11793 #:phases
11794 (modify-phases %standard-phases
11795 (add-before 'build 'copy-resources
11796 (lambda _
11797 (copy-recursively "powermock-core/src/main/resources"
11798 "build/classes")
11799 #t)))))
11800 (inputs
11801 (list java-asm-9
11802 java-byte-buddy-dep
11803 java-jboss-javassist
11804 java-powermock-reflect))
11805 (native-inputs
11806 (list java-assertj java-mockito-1 java-junit))))
11807
11808(define-public java-powermock-api-support
11809 (package
11810 (inherit java-powermock-reflect)
11811 (name "java-powermock-api-support")
11812 (build-system ant-build-system)
11813 (arguments
11814 `(#:jar-name "java-powermock-api-support.jar"
11815 #:jdk ,icedtea-8
11816 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11817 #:tests? #f)); no tests
11818 (inputs
11819 (list java-powermock-core java-powermock-reflect))))
11820
11821(define-public java-powermock-modules-junit4-common
11822 (package
11823 (inherit java-powermock-reflect)
11824 (name "java-powermock-modules-junit4-common")
11825 (build-system ant-build-system)
11826 (arguments
11827 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11828 #:jdk ,icedtea-8
11829 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11830 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11831 (inputs
11832 (list java-cglib
11833 java-easymock
11834 java-hamcrest-core
11835 java-powermock-core
11836 java-powermock-reflect))))
11837
11838(define-public java-powermock-modules-junit4
11839 (package
11840 (inherit java-powermock-reflect)
11841 (name "java-powermock-modules-junit4")
11842 (build-system ant-build-system)
11843 (arguments
11844 `(#:jar-name "java-powermock-modules-junit4.jar"
11845 #:tests? #f; require easymock 4, which introduces a loop with testng
11846 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11847 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11848 #:phases
11849 (modify-phases %standard-phases
11850 (add-before 'build 'fix-junit-detection
11851 (lambda _
11852 ;; Our junit version is 4.12-SNAPSHOT
11853 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11854 "PowerMockJUnit4MethodValidator.java")
11855 (("4.12") "4.12-SNAPSHOT"))
11856 #t)))))
11857 (inputs
11858 (list java-cglib
11859 java-powermock-core
11860 java-powermock-reflect
11861 java-powermock-modules-junit4-common))
11862 (native-inputs
11863 (list java-easymock
11864 java-hamcrest-core
11865 java-junit
11866 java-objenesis))))
11867
11868(define-public java-powermock-api-easymock
11869 (package
11870 (inherit java-powermock-reflect)
11871 (name "java-powermock-api-easymock")
11872 (build-system ant-build-system)
11873 (arguments
11874 `(#:jar-name "java-powermock-api-easymock.jar"
11875 #:jdk ,icedtea-8
11876 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11877 #:tests? #f; no tests
11878 #:phases
11879 (modify-phases %standard-phases
11880 (add-before 'build 'fix-file
11881 (lambda _
11882 ;; FIXME: This looks wrong, but it fixes a build error.
11883 (with-directory-excursion "powermock-api/powermock-api-easymock"
11884 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11885 (("classLoader instanceof MockClassLoader") "false")
11886 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11887 #t)))))
11888 (inputs
11889 (list java-cglib
11890 java-easymock
11891 java-powermock-api-support
11892 java-powermock-core
11893 java-powermock-reflect))))
11894
11895(define-public java-jboss-jms-api-spec
11896 (package
11897 (name "java-jboss-jms-api-spec")
11898 (version "2.0")
11899 (source (origin
11900 (method url-fetch)
11901 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11902 "archive/jboss-jms-api_" version
11903 "_spec-1.0.1.Final.tar.gz"))
11904 (sha256
11905 (base32
11906 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11907 (build-system ant-build-system)
11908 (arguments
11909 `(#:jar-name "java-jboss-jms-api_spec.jar"
11910 #:jdk ,icedtea-8
11911 #:source-dir "."
11912 #:tests? #f)); no tests
11913 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11914 (synopsis "Java Message Service API specification")
11915 (description "Java Message Service (JMS) API is used to send messages
11916messages between two or more clients. It is a messaging standard that allows
11917application components to create, send, receive, and read messages.")
11918 ; either gpl2 only with GPL Classpath Exception, or cddl.
11919 (license (list license:gpl2 license:cddl1.0))))
11920
11921(define-public java-mail
11922 (package
11923 (name "java-mail")
11924 (version "1.6.0")
11925 (source (origin
11926 (method url-fetch)
11927 (uri (string-append "https://github.com/javaee/javamail/archive/"
11928 "JAVAMAIL-1_6_0.tar.gz"))
11929 (sha256
11930 (base32
11931 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11932 (build-system ant-build-system)
11933 (arguments
11934 `(#:jar-name "java-mail.jar"
11935 #:jdk ,icedtea-8
11936 #:source-dir "mail/src/main/java"
11937 #:test-dir "mail/src/test"
11938 #:test-exclude
11939 (list "**/CollectorFormatterTest.java"
11940 "**/CompactFormatterTest.java"
11941 "**/DurationFilterTest.java"
11942 "**/MailHandlerTest.java"
11943 "**/GetLocalAddressTest.java"
11944 ;; SSLHandshakeException: No appropriate protocol
11945 "**/WriteTimeoutSocketTest.java"
11946 ;; FIXME: both end with:
11947 ;; java.lang.ClassNotFoundException:
11948 ;; javax.mail.internet.MimeMultipartParseTest
11949 "**/MimeMultipartParseTest.java"
11950 "**/SearchTermSerializationTest.java")
11951 #:phases
11952 (modify-phases %standard-phases
11953 (add-before 'configure 'move-version.java
11954 (lambda _
11955 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11956 "mail/src/main/java/javax/mail/Version.java")))
11957 (add-before 'build 'copy-resources
11958 (lambda _
11959 (copy-recursively "mail/src/main/resources/META-INF"
11960 "build/classes/META-INF"))))))
11961 (native-inputs
11962 (list java-junit java-hamcrest-core))
11963 (home-page "https://javaee.github.io/javamail/")
11964 (synopsis "Mail-related functionality in Java")
11965 (description "The JavaMail API provides a platform-independent and
11966protocol-independent framework to build mail and messaging applications.")
11967 ;; General Public License Version 2 only ("GPL") or the Common Development
11968 ;; and Distribution License("CDDL")
11969 (license (list license:cddl1.1
11970 license:gpl2)))); with classpath exception
11971
11972(define-public java-mapdb
11973 (package
11974 (name "java-mapdb")
11975 (version "1.0.9")
11976 (source (origin
11977 (method git-fetch)
11978 (uri (git-reference
11979 (url "https://github.com/jankotek/mapdb")
11980 (commit (string-append "mapdb-" version))))
11981 (file-name (git-file-name name version))
11982 (sha256
11983 (base32
11984 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
11985 (build-system ant-build-system)
11986 (arguments
11987 (list #:jar-name "mapdb.jar"
11988 #:source-dir "src/main/java"
11989 #:test-dir "src/test"
11990 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
11991 "**/ConcurrentMapInterfaceTest.java"
11992 "**/EngineTest.java"
11993 "**/Issue664Test.java"
11994 "**/MapInterfaceTest.java")
11995 #:phases #~(modify-phases %standard-phases
11996 (replace 'install (install-from-pom "pom.xml")))))
11997 (native-inputs (list java-junit))
11998 (home-page "https://mapdb.org/")
11999 (synopsis "Concurrent data structures")
12000 (description "MapDB provides concurrent maps, sets and queues backed by
12001disk storage or off-heap memory.")
12002 (license license:bsd-3)))
12003
12004(define-public java-mime4j-core
12005 (package
12006 (name "java-mime4j-core")
12007 (version "0.8.13")
12008 (source (origin
12009 (method url-fetch)
12010 (uri (string-append "mirror://apache/james/mime4j/" version
12011 "/james-mime4j-sources-" version ".zip"))
12012 (sha256
12013 (base32
12014 "0f1r0ywa1qdw2b227c93v3fksqp9bgll00bqw1md1894v3szm9ca"))))
12015 (build-system ant-build-system)
12016 (arguments
12017 `(#:tests? #f ;; has no tests
12018 #:source-dir "core/src/main/java"
12019 #:jar-name "apache-mime4j-core.jar"))
12020 (native-inputs
12021 (list java-commons-io-latest ;; requries >= 2.7
12022 java-junit
12023 unzip))
12024 (home-page "https://james.apache.org/mime4j/apache-mime4j-core/")
12025 (synopsis "Java stream based MIME message parser")
12026 (description "Apache James Mime4J provides a parser, MimeStreamParser, for
12027e-mail message streams in plain rfc822 and MIME format. The parser uses a
12028callback mechanism to report parsing events such as the start of an entity
12029header, the start of a body, etc. If you are familiar with the SAX XML parser
12030interface you should have no problem getting started with mime4j.")
12031 (license license:asl2.0)))
12032
12033(define-public java-jeromq
12034 (package
12035 (name "java-jeromq")
12036 (version "0.4.3")
12037 (source (origin
12038 (method git-fetch)
12039 (uri (git-reference
12040 (url "https://github.com/zeromq/jeromq")
12041 (commit (string-append "v" version))))
12042 (file-name (string-append name "-" version "-checkout"))
12043 (sha256
12044 (base32
12045 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
12046 (patches (search-patches "java-jeromq-fix-tests.patch"))))
12047 (build-system ant-build-system)
12048 (arguments
12049 `(#:jar-name "java-jeromq.jar"
12050 #:source-dir "src/main/java"
12051 #:jdk ,icedtea-8
12052 #:test-exclude
12053 (list
12054 "**/Abstract*.java"
12055 ;; Requires network
12056 "**/ZBeaconTest.java"
12057 ;; Failures
12058 "**/DealerSpecTest.java"
12059 "**/CustomDecoderTest.java"
12060 "**/CustomEncoderTest.java"
12061 "**/ConnectRidTest.java"
12062 "**/ReqSpecTest.java"
12063 "**/PushPullSpecTest.java"
12064 "**/PubSubHwmTest.java"
12065 "**/RouterSpecTest.java"
12066 "**/ProxyTest.java")))
12067 (inputs
12068 (list java-jnacl))
12069 (native-inputs
12070 `(("java-hamcrest-core" ,java-hamcrest-core)
12071 ("junit" ,java-junit)))
12072 (home-page "https://zeromq.org/bindings:java")
12073 (synopsis "Java binding for 0MQ")
12074 (description "Jeromq provides the java bindings for 0MQ.")
12075 (license license:mpl2.0)))
12076
12077(define-public java-kafka-clients
12078 (package
12079 (name "java-kafka-clients")
12080 (version "1.1.1")
12081 (source (origin
12082 (method url-fetch)
12083 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
12084 version "-src.tgz"))
12085 (sha256
12086 (base32
12087 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
12088 (build-system ant-build-system)
12089 (arguments
12090 `(#:jar-name "java-kafka-clients.jar"
12091 #:jdk ,icedtea-8
12092 #:source-dir "clients/src/main/java"
12093 #:test-dir "clients/src/test"
12094 #:test-exclude
12095 (list
12096 ;; This file does not contain a class
12097 "**/IntegrationTest.java"
12098 ;; Requires network
12099 "**/ClientUtilsTest.java"
12100 ;; This test fails on i686
12101 "**/SerializationTest.java"
12102 ;; "protocol is disabled or cipher suites are inappropriate"
12103 "**/SslTransportLayerTest.java"
12104 ;; End with errors that seem related to our powermock
12105 "**/KafkaProducerTest.java"
12106 "**/BufferPoolTest.java"
12107 ;; Undeterministic failure, seems to affect mostly ci
12108 "**/GarbageCollectedMemoryPoolTest.java")))
12109 (inputs
12110 (list java-slf4j-api java-lz4))
12111 (native-inputs
12112 (list java-bouncycastle
12113 java-cglib
12114 java-easymock
12115 java-hamcrest-all
12116 java-jboss-javassist
12117 java-junit
12118 java-objenesis
12119 java-powermock-api-easymock
12120 java-powermock-api-support
12121 java-powermock-core
12122 java-powermock-modules-junit4
12123 java-powermock-modules-junit4-common
12124 java-snappy))
12125 (home-page "https://kafka.apache.org")
12126 (synopsis "Distributed streaming platform")
12127 (description "Kafka is a distributed streaming platform, which means:
12128@itemize
12129@item it can publish and subscribe to streams of records;
12130@item it can store streams of records in a fault-tolerant way;
12131@item it can process streams of records as they occur.
12132@end itemize")
12133 ;; Either cddl or gpl2 only.
12134 (license (list license:cddl1.1; actually cddl1.1
12135 license:gpl2)))); with classpath exception
12136
12137(define-public java-jdom
12138 (package
12139 (name "java-jdom")
12140 (version "1.1.3")
12141 (source (origin
12142 (method url-fetch)
12143 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
12144 version ".tar.gz"))
12145 (sha256
12146 (base32
12147 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
12148 (build-system ant-build-system)
12149 (arguments
12150 `(#:build-target "package"
12151 #:tests? #f; tests are run as part of the build process
12152 #:phases
12153 (modify-phases %standard-phases
12154 (replace 'install
12155 (install-jars "build")))))
12156 (home-page "http://jdom.org/")
12157 (synopsis "Access, manipulate, and output XML data")
12158 (description "Java-based solution for accessing, manipulating, and
12159outputting XML data from Java code.")
12160 (license license:bsd-4)))
12161
12162(define-public java-geronimo-xbean-reflect
12163 (package
12164 (name "java-geronimo-xbean-reflect")
12165 (version "4.5")
12166 (source (origin
12167 (method svn-fetch)
12168 (uri (svn-reference
12169 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
12170 (revision 1807396)))
12171 (file-name (string-append name "-" version))
12172 (sha256
12173 (base32
12174 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
12175 (build-system ant-build-system)
12176 (arguments
12177 `(#:jar-name "geronimo-xbean-reflect.jar"
12178 #:source-dir "xbean-reflect/src/main/java"
12179 #:test-dir "xbean-reflect/src/test"
12180 #:jdk ,icedtea-8
12181 #:test-exclude
12182 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
12183 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
12184 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
12185 #:phases
12186 (modify-phases %standard-phases
12187 (add-before 'build 'fix-source
12188 (lambda _
12189 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
12190 ;; org.apache.xbean.asm6 is actually repackaged java-asm
12191 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
12192 (("org.apache.xbean.asm5") "org.objectweb.asm"))
12193 #t)))
12194 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
12195 (inputs
12196 `(("asm" ,java-asm)
12197 ("log4j" ,java-log4j-api)
12198 ("log4j-1.2" ,java-log4j-1.2-api)
12199 ("log4j-core" ,java-log4j-core)
12200 ("logging" ,java-commons-logging-minimal)))
12201 (propagated-inputs
12202 (list java-geronimo-parent-pom))
12203 (native-inputs
12204 `(("junit" ,java-junit)))
12205 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
12206 (synopsis "Dependency injection helper")
12207 (description "Xbean-reflect provides very flexible ways to create objects
12208and graphs of objects for dependency injection frameworks")
12209 (license license:asl2.0)))
12210
12211(define-public java-geronimo-genesis-2.1
12212 (package
12213 (name "java-geronimo-genesis")
12214 (version "2.1")
12215 (source (origin
12216 (method svn-fetch)
12217 (uri (svn-reference
12218 (url (string-append "https://svn.apache.org/repos/asf/"
12219 "geronimo/genesis/tags/genesis-"
12220 version))
12221 (revision 1807396)))
12222 (file-name (string-append name "-" version "-source"))
12223 (sha256
12224 (base32
12225 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
12226 (build-system ant-build-system)
12227 (arguments
12228 `(#:tests? #f
12229 #:phases
12230 (modify-phases %standard-phases
12231 (delete 'configure)
12232 (delete 'build)
12233 (replace 'install
12234 (install-pom-file "pom.xml"))
12235 (add-after 'install 'install-enforcer-rules
12236 (install-pom-file "genesis-enforcer-rules/pom.xml"))
12237 (add-after 'install 'install-flava
12238 (install-pom-file "genesis-default-flava/pom.xml"))
12239 (add-after 'install 'install-packaging
12240 (install-pom-file "genesis-packaging/pom.xml"))
12241 (add-after 'install-flava 'install-flava-java4
12242 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
12243 (add-after 'install-flava 'install-flava-java5
12244 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
12245 (add-after 'install-flava 'install-flava-java6
12246 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
12247 (propagated-inputs
12248 `(("apache-parent-pom" ,apache-parent-pom-13)))
12249 (home-page "https://geronimo.apache.org")
12250 (synopsis "Collection of maven POM files for the Geronimo project")
12251 (description "Apache Geronimo is a server runtime. This package contains
12252only pom files used by other components in the Geronimo project.")
12253 (license license:asl2.0)))
12254
12255(define java-geronimo-parent-pom
12256 (package
12257 (inherit java-geronimo-xbean-reflect)
12258 (name "java-geronimo-parent-pom")
12259 (arguments
12260 `(#:tests? #f
12261 #:phases
12262 (modify-phases %standard-phases
12263 (delete 'configure)
12264 (delete 'build)
12265 (replace 'install
12266 (install-pom-file "pom.xml")))))
12267 (propagated-inputs
12268 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
12269
12270(define-public java-geronimo-xbean-bundleutils
12271 (package
12272 (inherit java-geronimo-xbean-reflect)
12273 (name "java-geronimo-xbean-bundleutils")
12274 (arguments
12275 `(#:jar-name "geronimo-xbean-bundleutils.jar"
12276 #:source-dir "xbean-bundleutils/src/main/java"
12277 #:test-dir "xbean-bundleutils/src/test"
12278 #:phases
12279 (modify-phases %standard-phases
12280 (add-before 'build 'fix-java
12281 (lambda _
12282 ;; We use a more recent version of osgi, so this file requires
12283 ;; more interface method implementations.
12284 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
12285 (("import org.osgi.framework.ServiceRegistration;")
12286 "import org.osgi.framework.ServiceRegistration;
12287import org.osgi.framework.ServiceFactory;
12288import java.util.Collection;
12289import org.osgi.framework.ServiceObjects;")
12290 (("public Bundle getBundle\\(\\)")
12291 "@Override
12292public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
12293 throw new UnsupportedOperationException();
12294}
12295@Override
12296public <S> ServiceRegistration<S> registerService(Class<S> clazz,
12297 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
12298 throw new UnsupportedOperationException();
12299}
12300public Bundle getBundle()"))
12301 #t)))))
12302 (inputs
12303 `(("java-slf4j" ,java-slf4j-api)
12304 ("java-asm" ,java-asm)
12305 ("java-osgi-framework" ,java-osgi-framework)
12306 ("java-eclipse-osgi" ,java-eclipse-osgi)
12307 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
12308
12309(define-public java-geronimo-xbean-asm-util
12310 (package
12311 (inherit java-geronimo-xbean-reflect)
12312 (name "java-geronimo-xbean-asm-util")
12313 (arguments
12314 `(#:jar-name "geronimo-xbean-asm-util.jar"
12315 #:source-dir "xbean-asm-util/src/main/java"
12316 #:tests? #f)); no tests
12317 (inputs
12318 (list java-asm))
12319 (native-inputs '())))
12320
12321(define-public java-geronimo-xbean-finder
12322 (package
12323 (inherit java-geronimo-xbean-reflect)
12324 (name "java-geronimo-xbean-finder")
12325 (arguments
12326 `(#:jar-name "geronimo-xbean-finder.jar"
12327 #:source-dir "xbean-finder/src/main/java"
12328 #:test-dir "xbean-finder/src/test"))
12329 (inputs
12330 (list java-slf4j-api
12331 java-asm
12332 java-geronimo-xbean-bundleutils
12333 java-geronimo-xbean-asm-util
12334 java-osgi-service-packageadmin
12335 java-osgi-framework))
12336 (native-inputs
12337 (list java-junit java-hamcrest-core))))
12338
12339(define-public java-gson
12340 (package
12341 (name "java-gson")
12342 (version "2.8.2")
12343 (source (origin
12344 (method url-fetch)
12345 (uri (string-append "https://github.com/google/gson/archive/"
12346 "gson-parent-" version ".tar.gz"))
12347 (sha256
12348 (base32
12349 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
12350 (build-system ant-build-system)
12351 (arguments
12352 `(#:jar-name "gson.jar"
12353 #:source-dir "gson/src/main/java"
12354 #:test-dir "gson/src/test"))
12355 (native-inputs
12356 (list java-junit java-hamcrest-core))
12357 (home-page "https://github.com/google/gson")
12358 (synopsis "Java serialization/deserialization library from/to JSON")
12359 (description "Gson is a Java library that can be used to convert Java
12360Objects into their JSON representation. It can also be used to convert a JSON
12361string to an equivalent Java object. Gson can work with arbitrary Java objects
12362including pre-existing objects that you do not have source-code of.")
12363 (license license:asl2.0)))
12364
12365;; This requires a different Java version than 2.8.2 above
12366(define-public java-gson-2.8.6
12367 (package
12368 (inherit java-gson)
12369 (name "java-gson")
12370 (version "2.8.6")
12371 (source (origin
12372 (method git-fetch)
12373 (uri (git-reference
12374 (url "https://github.com/google/gson")
12375 (commit (string-append "gson-parent-" version))))
12376 (file-name (git-file-name name version))
12377 (sha256
12378 (base32
12379 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
12380 (arguments
12381 `(#:jar-name "gson.jar"
12382 #:jdk ,openjdk11
12383 #:source-dir "gson/src/main/java"
12384 #:test-dir "gson/src/test"
12385 #:phases
12386 (modify-phases %standard-phases
12387 ;; avoid Maven dependency
12388 (add-before 'build 'fill-template
12389 (lambda _
12390 (with-directory-excursion "gson/src/main"
12391 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
12392 "java/com/google/gson/internal/GsonBuildConfig.java")
12393 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
12394 (("\\$\\{project.version\\}") ,version))))))))))
12395
12396(define-public java-hawtjni
12397 (package
12398 (name "java-hawtjni")
12399 (version "1.15")
12400 (source (origin
12401 (method url-fetch)
12402 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
12403 "hawtjni-project-" version ".tar.gz"))
12404 (sha256
12405 (base32
12406 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
12407 (build-system ant-build-system)
12408 (arguments
12409 `(#:jar-name "hawtjni.jar"
12410 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
12411 #:tests? #f; no tests
12412 #:phases
12413 (modify-phases %standard-phases
12414 (add-before 'build 'build-native
12415 (lambda* (#:key inputs #:allow-other-keys)
12416 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
12417 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12418 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
12419 "-fPIC" "-O2" include)
12420 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
12421 "-fPIC" "-O2" include)
12422 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
12423 "hawtjni.o" "hawtjni-callback.o")))
12424 #t))
12425 (add-after 'install 'install-native
12426 (lambda* (#:key outputs #:allow-other-keys)
12427 (let* ((out (assoc-ref outputs "out"))
12428 (lib (string-append out "/lib"))
12429 (inc (string-append out "/include")))
12430 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12431 (install-file "libhawtjni.so" lib)
12432 (install-file "hawtjni.h" inc)))
12433 #t))
12434 (add-before 'install 'install-parent
12435 (install-pom-file "pom.xml"))
12436 (replace 'install
12437 (install-from-pom "hawtjni-runtime/pom.xml")))))
12438 (inputs
12439 (list java-commons-cli java-asm java-geronimo-xbean-finder))
12440 (home-page "https://fusesource.github.io/hawtjni/")
12441 (synopsis "JNI code generator")
12442 (description "HawtJNI is a code generator that produces the JNI code needed
12443to implement Java native methods. It is based on the jnigen code generator
12444that is part of the SWT Tools project.")
12445 (license license:asl2.0)))
12446
12447(define-public java-jansi-native
12448 (package
12449 (name "java-jansi-native")
12450 (version "1.7")
12451 (source (origin
12452 (method url-fetch)
12453 (uri (string-append "https://github.com/fusesource/jansi-native/"
12454 "archive/jansi-native-" version ".tar.gz"))
12455 (sha256
12456 (base32
12457 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
12458 (build-system ant-build-system)
12459 (arguments
12460 `(#:jar-name "jansi-native.jar"
12461 #:source-dir "src/main/java"
12462 #:tests? #f; no tests
12463 #:phases
12464 (modify-phases %standard-phases
12465 (add-before 'build 'build-native
12466 (lambda* (#:key inputs #:allow-other-keys)
12467 ;; there are more required files for windows in windows/
12468 (with-directory-excursion "src/main/native-package/src"
12469 (substitute* "jansi_ttyname.c"
12470 (("#include \"jansi_.*") ""))
12471 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
12472 (string-append "-I" (assoc-ref inputs "java-hawtjni")
12473 "/include")
12474 (string-append "-I" (assoc-ref inputs "jdk")
12475 "/include/linux")
12476 "-fPIC" "-O2")
12477 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
12478 (add-before 'build 'install-native
12479 (lambda _
12480 (let ((dir (string-append "build/classes/META-INF/native/"
12481 ,(match (%current-system)
12482 ((or "i686-linux" "armhf-linux")
12483 "linux32")
12484 ((or "x86_64-linux" "aarch64-linux"
12485 "mips64el-linux")
12486 "linux64")
12487 (_ "unknown-kernel")))))
12488 (install-file "src/main/native-package/src/libjansi.so" dir))
12489 #t))
12490 (add-after 'install 'install-native
12491 (lambda* (#:key outputs #:allow-other-keys)
12492 (install-file "src/main/native-package/src/jansi.h"
12493 (string-append (assoc-ref outputs "out") "/include"))
12494 #t))
12495 (add-before 'install 'fix-pom
12496 (lambda _
12497 ;; pom contains variables to complete name, but we don't support that
12498 (substitute* "pom.xml"
12499 (("\\$\\{platform\\}") "native"))
12500 #t))
12501 (replace 'install
12502 (install-from-pom "pom.xml")))))
12503 (propagated-inputs
12504 (list java-hawtjni))
12505 (home-page "https://fusesource.github.io/jansi/")
12506 (synopsis "Native library for jansi")
12507 (description "This package provides the native library for jansi, a small
12508Java library that allows you to use ANSI escape sequences to format your
12509console output.")
12510 (license license:asl2.0)))
12511
12512(define-public java-jansi
12513 (package
12514 (name "java-jansi")
12515 (version "2.4.0")
12516 (source (origin
12517 (method git-fetch)
12518 (uri (git-reference
12519 (url "https://github.com/fusesource/jansi")
12520 (commit (string-append "jansi-" version))))
12521 (file-name (git-file-name name version))
12522 (sha256
12523 (base32
12524 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
12525 (modules '((guix build utils)))
12526 (snippet
12527 ;; contains pre-compiled libraries
12528 '(delete-file-recursively
12529 "src/main/resources/org/fusesource/jansi/internal"))))
12530 (build-system ant-build-system)
12531 (arguments
12532 `(#:jar-name "jansi.jar"
12533 #:source-dir "src/main/java"
12534 #:test-dir "src/test"
12535 #:tests? #f; require junit 3
12536 #:phases
12537 (modify-phases %standard-phases
12538 (add-before 'build 'build-native
12539 (lambda* (#:key inputs #:allow-other-keys)
12540 (with-directory-excursion "src/main/native"
12541 (for-each
12542 (lambda (cfile)
12543 (let ((cfile (basename cfile))
12544 (ofile (string-append (basename cfile ".c") ".o")))
12545 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
12546 (string-append "-I" (assoc-ref inputs "jdk")
12547 "/include/linux")
12548 "-fPIC" "-O2")))
12549 (find-files "." "\\.c$"))
12550 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
12551 (find-files "." "\\.o$")))))
12552 (add-before 'build 'install-native
12553 (lambda _
12554 (let ((dir (string-append "build/classes/org/fusesource/"
12555 "jansi/internal/native/"
12556 ,(match (or (%current-target-system) (%current-system))
12557 ("i686-linux" "Linux/x86")
12558 ("x86_64-linux" "Linux/x86_64")
12559 ("armhf-linux" "Linux/armv7")
12560 ("aarch64-linux" "Linux/arm64")
12561 ("mips64el-linux" "Linux/mips64")
12562 (_ "unknown-kernel")))))
12563 (install-file "src/main/native/libjansi.so" dir))))
12564 (add-before 'build 'copy-resources
12565 (lambda _
12566 (copy-recursively "src/main/resources" "build/classes")))
12567 (replace 'install
12568 (install-from-pom "pom.xml")))))
12569 (home-page "https://fusesource.github.io/jansi/")
12570 (synopsis "Portable ANSI escape sequences")
12571 (description "Jansi is a Java library that allows you to use ANSI escape
12572sequences to format your console output which works on every platform.")
12573 (license license:asl2.0)))
12574
12575(define-public java-jansi-1
12576 (package
12577 (inherit java-jansi)
12578 (version "1.16")
12579 (source (origin
12580 (method git-fetch)
12581 (uri (git-reference
12582 (url "https://github.com/fusesource/jansi")
12583 (commit (string-append "jansi-project-" version))))
12584 (file-name (git-file-name "jansi" version))
12585 (sha256
12586 (base32
12587 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
12588 (arguments
12589 `(#:jar-name "jansi.jar"
12590 #:source-dir "jansi/src/main/java"
12591 #:test-dir "jansi/src/test"
12592 #:phases
12593 (modify-phases %standard-phases
12594 (add-after 'check 'clear-term
12595 (lambda _
12596 (invoke "echo" "-e" "\\e[0m")))
12597 (add-before 'install 'install-parent
12598 (install-pom-file "pom.xml"))
12599 (add-before 'install 'fix-pom
12600 (lambda _
12601 ;; pom adds jansi native versions for different platforms, but we
12602 ;; only need one, so use native instead
12603 (substitute* "jansi/pom.xml"
12604 (("windows32") "native")
12605 (("windows64") "native")
12606 (("osx") "native")
12607 (("linux32") "native")
12608 (("linux64") "native")
12609 (("freebsd32") "native")
12610 (("freebsd64") "native"))
12611 #t))
12612 (replace 'install
12613 (install-from-pom "jansi/pom.xml")))))
12614 (propagated-inputs
12615 (list java-jansi-native))
12616 (native-inputs
12617 (list java-junit java-hamcrest-core))))
12618
12619(define-public java-jboss-el-api-spec
12620 (package
12621 (name "java-jboss-el-api-spec")
12622 (version "3.0")
12623 (source (origin
12624 (method url-fetch)
12625 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
12626 "archive/jboss-el-api_" version
12627 "_spec-1.0.7.Final.tar.gz"))
12628 (sha256
12629 (base32
12630 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
12631 (build-system ant-build-system)
12632 (arguments
12633 `(#:jar-name "java-jboss-el-api_spec.jar"
12634 #:phases
12635 (modify-phases %standard-phases
12636 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
12637 ;; instead, which implements the same thing. We override the pom file
12638 ;; to "rename" the package so it can be found by maven.
12639 (add-before 'install 'override-pom
12640 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
12641 #:name "el-api"))
12642 (replace 'install
12643 (install-from-pom "pom.xml")))))
12644 (inputs
12645 (list java-junit))
12646 (home-page "https://github.com/jboss/jboss-el-api_spec")
12647 (synopsis "JSR-341 expression language 3.0 API")
12648 (description "This package contains an implementation of the JSR-341
12649specification for the expression language 3.0. It implements an expression
12650language inspired by ECMAScript and XPath. This language is used with
12651JavaServer Pages (JSP).")
12652 ;; Either GPL2 only or CDDL.
12653 (license (list license:gpl2 license:cddl1.1))))
12654
12655(define-public java-jboss-interceptors-api-spec
12656 (package
12657 (name "java-jboss-interceptors-api-spec")
12658 (version "1.2")
12659 (source (origin
12660 (method url-fetch)
12661 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
12662 "archive/jboss-interceptors-api_" version
12663 "_spec-1.0.0.Final.tar.gz"))
12664 (sha256
12665 (base32
12666 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
12667 (build-system ant-build-system)
12668 (arguments
12669 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12670 #:jdk ,icedtea-8
12671 #:source-dir "."
12672 #:tests? #f; no tests
12673 #:phases
12674 (modify-phases %standard-phases
12675 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12676 ;; so we use this package instead, which implements the same thing.
12677 ;; We override the pom file to "rename" the package so it can be found
12678 ;; by maven.
12679 (add-before 'install 'override-pom
12680 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
12681 "3.0" #:name "interceptor-api"))
12682 (replace 'install
12683 (install-from-pom "pom.xml")))))
12684 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12685 (synopsis "Interceptors 1.2 API classes from JSR 318")
12686 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12687API. Interceptors are used to interpose on business method invocations and
12688specific events.")
12689 ;; Either GPL2 only or CDDL.
12690 (license (list license:gpl2 license:cddl1.1))))
12691
12692(define-public java-cdi-api
12693 (package
12694 (name "java-cdi-api")
12695 (version "2.0")
12696 (source (origin
12697 (method url-fetch)
12698 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12699 version ".tar.gz"))
12700 (file-name (string-append name "-" version ".tar.gz"))
12701 (sha256
12702 (base32
12703 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12704 (build-system ant-build-system)
12705 (arguments
12706 `(#:source-dir "api/src/main/java"
12707 #:jar-name "java-cdi-api.jar"
12708 #:test-dir "api/src/test"
12709 #:jdk ,icedtea-8
12710 #:tests? #f; Tests fail because we don't have a CDI provider yet
12711 #:phases
12712 (modify-phases %standard-phases
12713 (replace 'install
12714 (install-from-pom "api/pom.xml")))))
12715 (propagated-inputs
12716 (list java-javax-inject java-jboss-el-api-spec
12717 java-jboss-interceptors-api-spec java-weld-parent-pom))
12718 (native-inputs
12719 (list java-testng java-hamcrest-core))
12720 (home-page "https://cdi-spec.org/")
12721 (synopsis "Contexts and Dependency Injection APIs")
12722 (description "Java-cdi-api contains the required APIs for Contexts and
12723Dependency Injection (CDI).")
12724 (license license:asl2.0)))
12725
12726(define-public java-joda-convert
12727 (package
12728 (name "java-joda-convert")
12729 (version "1.9.2")
12730 (source (origin
12731 (method url-fetch)
12732 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12733 version ".tar.gz"))
12734 (file-name (string-append name "-" version ".tar.gz"))
12735 (sha256
12736 (base32
12737 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12738 (build-system ant-build-system)
12739 (arguments
12740 `(#:jar-name (string-append ,name "-" ,version ".jar")
12741 #:source-dir "src/main/java"
12742 #:test-include (list "**/Test*.java")
12743 ;; Contains only interfaces and base classes (no test)
12744 #:test-exclude (list "**/test*/**.java")))
12745 (inputs
12746 (list java-guava))
12747 (native-inputs
12748 (list java-junit java-hamcrest-core))
12749 (home-page "https://www.joda.org/joda-convert/")
12750 (synopsis "Conversion between Objects and Strings")
12751 (description "Joda-Convert provides a small set of classes to aid
12752conversion between Objects and Strings. It is not intended to tackle the
12753wider problem of Object to Object transformation.")
12754 (license license:asl2.0)))
12755
12756(define-public java-joda-time
12757 (package
12758 (name "java-joda-time")
12759 (version "2.9.9")
12760 (source (origin
12761 (method url-fetch)
12762 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12763 version ".tar.gz"))
12764 (file-name (string-append name "-" version ".tar.gz"))
12765 (sha256
12766 (base32
12767 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12768 (build-system ant-build-system)
12769 (arguments
12770 `(#:jar-name "java-joda-time.jar"
12771 #:source-dir "src/main/java"
12772 #:test-include (list "**/Test*.java")
12773 ;; There is no runnable test in these files
12774 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12775 #:phases
12776 (modify-phases %standard-phases
12777 (add-after 'build 'build-resources
12778 (lambda _
12779 (mkdir-p "build/classes/org/joda/time/tz/data")
12780 (mkdir-p "build/classes/org/joda/time/format")
12781 ;; This will produce the following exception:
12782 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12783 ;; which is normal, because it doesn't exist yet. It still generates
12784 ;; the same file as in the binary one can find on maven.
12785 (invoke "java" "-cp"
12786 (string-append "build/classes:" (getenv "CLASSPATH"))
12787 "org.joda.time.tz.ZoneInfoCompiler"
12788 "-src" "src/main/java/org/joda/time/tz/src"
12789 "-dst" "build/classes/org/joda/time/tz/data"
12790 "africa" "antarctica" "asia" "australasia"
12791 "europe" "northamerica" "southamerica"
12792 "pacificnew" "etcetera" "backward" "systemv")
12793 (for-each (lambda (f)
12794 (copy-file f (string-append
12795 "build/classes/org/joda/time/format/"
12796 (basename f))))
12797 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12798 #t))
12799 (add-before 'install 'regenerate-jar
12800 (lambda _
12801 ;; We need to regenerate the jar file to add generated data.
12802 (delete-file "build/jar/java-joda-time.jar")
12803 (invoke "ant" "jar")))
12804 (add-before 'check 'copy-test-resources
12805 (lambda _
12806 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12807 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12808 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12809 (copy-recursively "src/test/resources" "build/test-classes")
12810 #t)))))
12811 (inputs
12812 (list java-joda-convert))
12813 (native-inputs
12814 (list java-junit java-hamcrest-core tzdata))
12815 (home-page "https://www.joda.org/joda-time/")
12816 (synopsis "Replacement for the Java date and time classes")
12817 (description "Joda-Time is a replacement for the Java date and time
12818classes prior to Java SE 8.")
12819 (license license:asl2.0)))
12820
12821(define-public java-xerces
12822 (package
12823 (name "java-xerces")
12824 (version "2.12.2")
12825 (source
12826 (origin
12827 (method url-fetch)
12828 (uri (string-append "mirror://apache/xerces/j/source/"
12829 "Xerces-J-src." version ".tar.gz"))
12830 (sha256
12831 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
12832 (patches (search-patches
12833 "java-xerces-xjavac_taskdef.patch"
12834 "java-xerces-build_dont_unzip.patch"
12835 "java-xerces-bootclasspath.patch"))))
12836 (build-system ant-build-system)
12837 (arguments
12838 `(#:tests? #f;; Test files are not present
12839 #:test-target "test"
12840 #:jdk ,icedtea-8
12841 #:phases
12842 (modify-phases %standard-phases
12843 (add-after 'unpack 'create-build.properties
12844 (lambda* (#:key inputs #:allow-other-keys)
12845 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12846 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12847 (with-output-to-file "build.properties"
12848 (lambda _
12849 (format #t
12850 "jar.jaxp = ~a/share/java/jaxp.jar~@
12851 jar.apis-ext = ~a/share/java/jaxp.jar~@
12852 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12853 jaxp jaxp resolver)))
12854 ;; Make xerces use our version of jaxp in tests
12855 (substitute* "build.xml"
12856 (("xml-apis.jar")
12857 (string-append jaxp "/share/java/jaxp.jar"))
12858 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12859 "${jar.apis}")))
12860 #t))
12861 (replace 'install (install-jars "build")))))
12862 (inputs
12863 (list java-apache-xml-commons-resolver java-jaxp))
12864 (home-page "https://xerces.apache.org/xerces2-j/")
12865 (synopsis "Validating XML parser for Java with DOM level 3 support")
12866 (description "The Xerces2 Java parser is the reference implementation of
12867XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12868processor.
12869
12870Xerces2-J supports the following standards and APIs:
12871
12872@itemize
12873@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12874@item Namespaces in XML Recommendation
12875@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12876 Range Recommendations
12877@item Simple API for XML (SAX) 2.0.1 Core and Extension
12878@item Java APIs for XML Processing (JAXP) 1.2.01
12879@item XML Schema 1.0 Structures and Datatypes Recommendations
12880@item Experimental implementation of the Document Object Model (DOM) Level 3
12881 Core and Load/Save Working Drafts
12882@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12883 Candidate Recommendation
12884@end itemize
12885
12886Xerces is now able to parse documents written according to the XML 1.1
12887Candidate Recommendation, except that it does not yet provide an option to
12888enable normalization checking as described in section 2.13 of this
12889specification. It also handles namespaces according to the XML Namespaces 1.1
12890Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12891the DOM level 3 load/save API's are in use.")
12892 (license license:asl2.0)))
12893
12894(define-public java-jakarta-regexp
12895 (package
12896 (name "java-jakarta-regexp")
12897 (version "1.5")
12898 (source
12899 (origin
12900 (method url-fetch)
12901 (uri (string-append
12902 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12903 version ".tar.gz"))
12904 (sha256
12905 (base32
12906 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12907 (build-system ant-build-system)
12908 (arguments
12909 `(#:test-target "test"
12910 #:phases
12911 (modify-phases %standard-phases
12912 (replace 'install
12913 (lambda* (#:key outputs #:allow-other-keys)
12914 (let* ((out (assoc-ref outputs "out"))
12915 (out-share (string-append out "/share/java")))
12916 (mkdir-p out-share)
12917 (for-each (lambda (name)
12918 (install-file name out-share))
12919 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12920 #t))))))
12921 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12922 (synopsis "Regular expression parser generator for Java")
12923 (description "@code{jakarta-regexp} is an old regular expression parser
12924generator for Java.")
12925 (license license:asl2.0)))
12926
12927(define-public java-jline
12928 (package
12929 (name "java-jline")
12930 (version "1.0")
12931 (source (origin
12932 (method url-fetch)
12933 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12934 version ".tar.gz"))
12935 (sha256
12936 (base32
12937 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12938 (build-system ant-build-system)
12939 (arguments
12940 `(#:jar-name "jline.jar"
12941 #:source-dir "src/main/java"
12942 #:test-dir "src/test"
12943 #:phases
12944 (modify-phases %standard-phases
12945 (add-before 'build 'copy-resources
12946 (lambda _
12947 (copy-recursively "src/main/resources" "build/classes")
12948 #t)))))
12949 (native-inputs
12950 (list java-junit))
12951 (home-page "https://jline.github.io")
12952 (synopsis "Console input handling library")
12953 (description "JLine is a Java library for handling console input. It is
12954similar in functionality to BSD editline and GNU readline but with additional
12955features that bring it on par with the Z shell line editor.")
12956 (license license:bsd-3)))
12957
12958(define-public java-jline-2
12959 (package
12960 (inherit java-jline)
12961 (version "2.14.5")
12962 (source (origin
12963 (method url-fetch)
12964 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12965 version ".tar.gz"))
12966 (sha256
12967 (base32
12968 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12969 (arguments
12970 `(#:jdk ,icedtea-8
12971 ,@(package-arguments java-jline)))
12972 (inputs
12973 (list java-jansi-1 java-jansi-native))
12974 (native-inputs
12975 (list java-powermock-modules-junit4
12976 java-powermock-modules-junit4-common
12977 java-powermock-api-easymock
12978 java-powermock-api-support
12979 java-powermock-core
12980 java-powermock-reflect
12981 java-easymock
12982 java-jboss-javassist
12983 java-objenesis
12984 java-hamcrest-core
12985 java-cglib
12986 java-junit
12987 java-hawtjni))))
12988
12989(define-public java-jline-terminal
12990 (package
12991 (name "java-jline-terminal")
12992 (version "3.14.1")
12993 (source (origin
12994 (method git-fetch)
12995 (uri (git-reference
12996 (url "https://github.com/jline/jline3")
12997 (commit (string-append "jline-parent-" version))))
12998 (file-name (git-file-name name version))
12999 (sha256
13000 (base32
13001 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
13002 (build-system ant-build-system)
13003 (arguments
13004 `(#:jar-name "jline-terminal.jar"
13005 #:jdk ,openjdk11
13006 #:tests? #f; TODO: tests fail on *.caps resource lookups
13007 #:source-dir "terminal/src/main/java"
13008 #:test-dir "terminal/src/test"
13009 #:phases
13010 (modify-phases %standard-phases
13011 (add-after 'unpack 'remove-build-file
13012 (lambda _
13013 ;; Conflicts with build directory generated by ant-build-system.
13014 (delete-file "build")))
13015 (add-after 'unpack 'patch-paths
13016 (lambda* (#:key inputs #:allow-other-keys)
13017 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
13018 (("= \"infocmp\"")
13019 (string-append "= \"" (assoc-ref inputs "ncurses")
13020 "/bin/infocmp\""))
13021 (("= \"(s?tty)\"" _ cmd)
13022 (string-append "= \"" (assoc-ref inputs "coreutils")
13023 "/bin/" cmd "\"")))))
13024 ;; Resources are not added to the JAR by ant-build-system.
13025 (add-after 'build 'add-resources
13026 (lambda* (#:key jar-name source-dir #:allow-other-keys)
13027 (let ((build (string-append (getcwd) "/build")))
13028 (with-directory-excursion
13029 (string-append source-dir "/../resources")
13030 (apply invoke "jar" "-uvf"
13031 (string-append build "/jar/" jar-name)
13032 (find-files ".")))))))))
13033 (inputs
13034 (list ncurses)); infocmp
13035 (home-page "https://github.com/jline/jline3")
13036 (synopsis "Java JLine Terminal API and implementations")
13037 (description "JLine is a Java library for handling console input. It is
13038similar in functionality to BSD editline and GNU readline but with additional
13039features that bring it in par with ZSH line editor. People familiar with the
13040readline/editline capabilities for modern shells (such as bash and tcsh) will
13041find most of the command editing features of JLine to be familiar.
13042
13043This package includes the @var{Terminal} API and implementations.")
13044 (license license:bsd-3)))
13045
13046(define-public java-jline-reader
13047 (package
13048 (name "java-jline-reader")
13049 (version "3.14.1")
13050 (source (origin
13051 (method git-fetch)
13052 (uri (git-reference
13053 (url "https://github.com/jline/jline3")
13054 (commit (string-append "jline-parent-" version))))
13055 (file-name (git-file-name name version))
13056 (sha256
13057 (base32
13058 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
13059 (build-system ant-build-system)
13060 (arguments
13061 `(#:jar-name "jline-reader.jar"
13062 #:jdk ,openjdk11
13063 #:source-dir "reader/src/main/java"
13064 #:test-dir "reader/src/test"
13065 #:phases
13066 (modify-phases %standard-phases
13067 (add-before 'build 'remove-build-file
13068 (lambda _
13069 ;; conflicts with build directory generated by ant-build-system
13070 (delete-file "build"))))))
13071 (native-inputs
13072 (list java-junit java-easymock))
13073 (inputs
13074 (list java-jline-terminal))
13075 (home-page "https://github.com/jline/jline3")
13076 (synopsis "Java JLine line reader")
13077 (description "JLine is a Java library for handling console input. It is
13078similar in functionality to BSD editline and GNU readline but with additional
13079features that bring it in par with ZSH line editor. People familiar with the
13080readline/editline capabilities for modern shells (such as bash and tcsh) will
13081find most of the command editing features of JLine to be familiar.
13082
13083This package includes the line reader.")
13084 (license license:bsd-3)))
13085
13086(define-public java-xmlunit
13087 (package
13088 (name "java-xmlunit")
13089 (version "2.5.1")
13090 (source (origin
13091 (method url-fetch)
13092 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
13093 version ".tar.gz"))
13094 (file-name (string-append name "-" version ".tar.gz"))
13095 (sha256
13096 (base32
13097 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
13098 (build-system ant-build-system)
13099 (arguments
13100 `(#:jar-name "java-xmlunit.jar"
13101 #:source-dir "xmlunit-core/src/main/java"
13102 #:test-dir "xmlunit-core/src/test"
13103 #:phases
13104 (modify-phases %standard-phases
13105 (add-before 'check 'copy-test-resources
13106 (lambda* (#:key inputs #:allow-other-keys)
13107 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
13108 #t)))))
13109 (native-inputs
13110 `(("java-junit" ,java-junit)
13111 ("java-mockito-1" ,java-mockito-1)
13112 ("java-hamcrest-all" ,java-hamcrest-all)
13113 ("java-objenesis" ,java-objenesis)
13114 ("java-cglib" ,java-cglib)
13115 ("resources"
13116 ,(origin
13117 (method git-fetch)
13118 (uri (git-reference
13119 (url "https://github.com/xmlunit/test-resources")
13120 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
13121 (file-name "java-xmlunit-test-resources")
13122 (sha256
13123 (base32
13124 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
13125 (home-page "https://www.xmlunit.org/")
13126 (synopsis "XML output testing")
13127 (description "XMLUnit provides you with the tools to verify the XML you
13128emit is the one you want to create. It provides helpers to validate against
13129an XML Schema, assert the values of XPath queries or compare XML documents
13130against expected outcomes.")
13131 (license license:asl2.0)))
13132
13133(define-public java-xmlunit-legacy
13134 (package
13135 (inherit java-xmlunit)
13136 (name "java-xmlunit-legacy")
13137 (arguments
13138 `(#:jar-name "java-xmlunit-legacy.jar"
13139 #:source-dir "xmlunit-legacy/src/main/java"
13140 #:test-dir "xmlunit-legacy/src/test"))
13141 (inputs
13142 (list java-xmlunit java-junit))
13143 (native-inputs
13144 `(("java-mockito-1" ,java-mockito-1)))))
13145
13146(define-public java-xmlunit-matchers
13147 (package
13148 (inherit java-xmlunit)
13149 (name "java-xmlunit-matchers")
13150 (arguments
13151 `(#:jar-name "java-xmlunit-matchers.jar"
13152 #:source-dir "xmlunit-matchers/src/main/java"
13153 #:test-dir "xmlunit-matchers/src/test"
13154 #:test-exclude
13155 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
13156 (list "**/ValidationMatcherTest.java")
13157 #:phases
13158 (modify-phases %standard-phases
13159 (add-before 'build 'copy-test-class
13160 (lambda _
13161 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
13162 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
13163 #t))
13164 (add-before 'build 'fix-test-resources-path
13165 (lambda _
13166 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
13167 (("../test-resources") "test-resources"))
13168 #t))
13169 (add-before 'check 'copy-test-resources
13170 (lambda* (#:key inputs #:allow-other-keys)
13171 (copy-recursively (assoc-ref inputs "resources") "test-resources")
13172 #t)))))
13173 (inputs
13174 (list java-xmlunit java-junit))))
13175
13176(define-public java-openchart2
13177 (package
13178 (name "java-openchart2")
13179 (version "1.4.3")
13180 (source (origin
13181 (method url-fetch)
13182 (uri (string-append "http://download.approximatrix.com/openchart2/"
13183 "openchart2-" version ".source.zip"))
13184 (sha256
13185 (base32
13186 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
13187 (build-system ant-build-system)
13188 (arguments
13189 `(#:test-target "test"
13190 #:phases
13191 (modify-phases %standard-phases
13192 (add-after 'unpack 'fix-junit-errors
13193 (lambda _
13194 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
13195 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
13196 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
13197 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
13198 "model/DefaultChartDataModelConstraintsTest.java"
13199 "model/MultiScatterDataModelConstraintsTest.java"
13200 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
13201 (("(assertEquals[^;]+);" before _)
13202 (string-append (string-drop-right before 2) ", 1E-6);"))))
13203 #t))
13204 (replace 'install (install-jars ".")))))
13205 (native-inputs
13206 (list unzip java-junit java-hamcrest-core))
13207 (home-page "https://approximatrix.com/products/openchart2/")
13208 (synopsis "Simple plotting for Java")
13209 (description "Openchart2 provides a simple, yet powerful, interface for
13210Java programmers to create two-dimensional charts and plots. The library
13211features an assortment of graph styles, including advanced scatter plots, bar
13212graphs, and pie charts.")
13213 (license license:lgpl2.1+)))
13214
13215(define-public java-commons-httpclient
13216 (package
13217 (name "java-commons-httpclient")
13218 (version "3.1")
13219 (source (origin
13220 (method url-fetch)
13221 (uri (string-append "mirror://apache/httpcomponents/"
13222 "commons-httpclient/source/commons-httpclient-"
13223 version "-src.tar.gz"))
13224 (sha256
13225 (base32
13226 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
13227 (build-system ant-build-system)
13228 (arguments
13229 `(#:build-target "compile"
13230 #:test-target "test"
13231 #:tests? #f; requires junit-textui (junit 3)
13232 #:phases
13233 (modify-phases %standard-phases
13234 (add-before 'build 'fix-accent
13235 (lambda _
13236 (for-each (lambda (file)
13237 (with-fluids ((%default-port-encoding "ISO-8859-1"))
13238 (substitute* file
13239 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
13240 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
13241 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
13242 "src/test/org/apache/commons/httpclient/TestHttps.java"
13243 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
13244 #t))
13245 (replace 'install
13246 (lambda* (#:key outputs #:allow-other-keys)
13247 (invoke "ant" "dist"
13248 (string-append "-Ddist.home=" (assoc-ref outputs "out")
13249 "/share/java"))
13250 #t)))))
13251 (propagated-inputs
13252 `(("java-commons-logging" ,java-commons-logging-minimal)
13253 ("java-commons-codec" ,java-commons-codec)))
13254 (home-page "https://hc.apache.org")
13255 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
13256 (description "This package contains an HTTP/1.1 compliant HTTP agent
13257implementation. It also provides reusable components for client-side
13258authentication, HTTP state management, and HTTP connection management.")
13259 (license license:asl2.0)))
13260
13261(define-public java-commons-vfs
13262 (package
13263 (name "java-commons-vfs")
13264 (version "2.2")
13265 (source (origin
13266 (method url-fetch)
13267 (uri (string-append "mirror://apache/commons/vfs/source/"
13268 "commons-vfs2-distribution-" version "-src.tar.gz"))
13269 (file-name (string-append name "-" version ".tar.gz"))
13270 (sha256
13271 (base32
13272 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
13273 (modules '((guix build utils)))
13274 (snippet
13275 '(begin
13276 (for-each delete-file
13277 (find-files "." "\\.jar$"))
13278 #t))))
13279 (build-system ant-build-system)
13280 (arguments
13281 `(#:jar-name "commons-vfs.jar"
13282 #:source-dir "commons-vfs2/src/main/java"
13283 #:test-dir "commons-vfs2/src/test"
13284 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
13285 #:tests? #f
13286 #:phases
13287 (modify-phases %standard-phases
13288 (add-before 'build 'remove-hadoop-and-webdav
13289 ; Remove these files as they are not required and depend on difficult
13290 ; packages.
13291 (lambda _
13292 (for-each delete-file-recursively
13293 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
13294 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
13295 #t)))))
13296 (inputs
13297 (list java-commons-collections4
13298 java-commons-compress
13299 java-commons-httpclient
13300 java-commons-logging-minimal
13301 java-commons-net
13302 java-jsch))
13303 (home-page "https://commons.apache.org/proper/commons-vfs/")
13304 (synopsis "Java file system library")
13305 (description "Commons VFS provides a single API for accessing various
13306different file systems. It presents a uniform view of the files from various
13307different sources, such as the files on local disk, on an HTTP server, or
13308inside a Zip archive.")
13309 (license license:asl2.0)))
13310
13311(define-public java-jakarta-oro
13312 (package
13313 (name "java-jakarta-oro")
13314 (version "2.0.8")
13315 (source (origin
13316 (method url-fetch)
13317 (uri (string-append "mirror://apache/jakarta/oro/"
13318 "jakarta-oro-" version ".tar.gz"))
13319 (sha256
13320 (base32
13321 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
13322 (modules '((guix build utils)))
13323 (snippet
13324 `(begin
13325 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
13326 #t))))
13327 (build-system ant-build-system)
13328 (arguments
13329 `(#:build-target "package"
13330 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
13331 #:tests? #f; tests are run as part of the build process
13332 #:phases
13333 (modify-phases %standard-phases
13334 (replace 'install
13335 (install-jars ,(string-append "jakarta-oro-" version))))))
13336 (home-page "https://jakarta.apache.org/oro/")
13337 (synopsis "Text-processing for Java")
13338 (description "The Jakarta-ORO Java classes are a set of text-processing
13339Java classes that provide Perl5 compatible regular expressions, AWK-like
13340regular expressions, glob expressions, and utility classes for performing
13341substitutions, splits, filtering filenames, etc. This library is the successor
13342of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
13343from ORO, Inc.")
13344 (license license:asl1.1)))
13345
13346(define-public java-native-access
13347 (package
13348 (name "java-native-access")
13349 (version "4.5.1")
13350 (source (origin
13351 (method url-fetch)
13352 (uri (string-append "https://github.com/java-native-access/jna/"
13353 "archive/" version ".tar.gz"))
13354 (file-name (string-append name "-" version ".tar.gz"))
13355 (sha256
13356 (base32
13357 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
13358 (modules '((guix build utils)))
13359 (snippet
13360 `(begin
13361 (for-each delete-file (find-files "." ".*.jar"))
13362 (delete-file-recursively "native/libffi")
13363 (delete-file-recursively "dist")
13364 #t))))
13365 (build-system ant-build-system)
13366 (arguments
13367 `(#:tests? #f; FIXME: tests require reflections.jar
13368 #:test-target "test"
13369 #:make-flags (list "-Ddynlink.native=true")
13370 #:phases
13371 (modify-phases %standard-phases
13372 (add-before 'build 'fix-build.xml
13373 (lambda* (#:key inputs #:allow-other-keys)
13374 (substitute* "build.xml"
13375 ;; Since we removed the bundled ant.jar, give the correct path
13376 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
13377 ;; We removed generated native libraries. We can only rebuild one
13378 ;; so don't fail if we can't find a native library for another architecture.
13379 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
13380 ;; Copy test dependencies
13381 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
13382 "lib/junit.jar")
13383 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
13384 "jar$"))
13385 "lib/hamcrest-core.jar")
13386 ;; FIXME: once reflections.jar is built, copy it to lib/test.
13387 #t))
13388 (add-before 'build 'build-native
13389 (lambda _
13390 (invoke "ant" "-Ddynlink.native=true" "native")
13391 #t))
13392 (replace 'install
13393 (install-jars "build")))))
13394 (inputs
13395 (list libffi libx11 libxt))
13396 (native-inputs
13397 (list gcc-7 java-junit java-hamcrest-core))
13398 (home-page "https://github.com/java-native-access/jna")
13399 (synopsis "Access to native shared libraries from Java")
13400 (description "JNA provides Java programs easy access to native shared
13401libraries without writing anything but Java code - no JNI or native code is
13402required. JNA allows you to call directly into native functions using natural
13403Java method invocation.")
13404 ;; Java Native Access project (JNA) is dual-licensed under 2
13405 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
13406 (license (list
13407 license:asl2.0
13408 license:lgpl2.1+))))
13409
13410(define-public java-native-access-platform
13411 (package
13412 (inherit java-native-access)
13413 (name "java-native-access-platform")
13414 (arguments
13415 `(#:test-target "test"
13416 #:tests? #f; require jna-test.jar
13417 #:phases
13418 (modify-phases %standard-phases
13419 (add-before 'build 'chdir
13420 (lambda _
13421 (chdir "contrib/platform")
13422 #t))
13423 (add-after 'chdir 'fix-ant
13424 (lambda* (#:key inputs #:allow-other-keys)
13425 (substitute* "nbproject/project.properties"
13426 (("../../build/jna.jar")
13427 (search-input-file inputs "/share/java/jna.jar"))
13428 (("../../lib/hamcrest-core-.*.jar")
13429 (car (find-files (assoc-ref inputs "java-hamcrest-core")
13430 "jar$")))
13431 (("../../lib/junit.jar")
13432 (car (find-files (assoc-ref inputs "java-junit")
13433 "jar$"))))
13434 #t))
13435 (replace 'install
13436 (install-jars "dist")))))
13437 (inputs
13438 (list java-native-access))
13439 (synopsis "Cross-platform mappings for jna")
13440 (description "java-native-access-platform has cross-platform mappings
13441and mappings for a number of commonly used platform functions, including a
13442large number of Win32 mappings as well as a set of utility classes that
13443simplify native access.")))
13444
13445(define-public java-jsch-agentproxy-core
13446 (package
13447 (name "java-jsch-agentproxy-core")
13448 (version "0.0.8")
13449 (source (origin
13450 (method url-fetch)
13451 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
13452 version ".tar.gz"))
13453 (file-name (string-append name "-" version ".tar.gz"))
13454 (sha256
13455 (base32
13456 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
13457 (build-system ant-build-system)
13458 (arguments
13459 `(#:jar-name "jsch-agentproxy-core.jar"
13460 #:source-dir "jsch-agent-proxy-core/src/main/java"
13461 #:tests? #f)); no tests
13462 (home-page "https://github.com/ymnk/jsch-agent-proxy")
13463 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
13464 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13465and Pageant included Putty. It will be easily integrated into JSch, and users
13466will be allowed to use these programs for authentication.")
13467 (license license:bsd-3)))
13468
13469(define-public java-jsch-agentproxy-sshagent
13470 (package
13471 (inherit java-jsch-agentproxy-core)
13472 (name "java-jsch-agentproxy-sshagent")
13473 (arguments
13474 `(#:jar-name "jsch-agentproxy-sshagent.jar"
13475 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
13476 #:tests? #f)); no tests
13477 (inputs
13478 (list java-jsch-agentproxy-core))
13479 (synopsis "Proxy to ssh-agent")
13480 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13481and Pageant included in Putty. This component contains the code for a proxy to
13482ssh-agent.")))
13483
13484(define-public java-jsch-agentproxy-usocket-jna
13485 (package
13486 (inherit java-jsch-agentproxy-core)
13487 (name "java-jsch-agentproxy-usocket-jna")
13488 (arguments
13489 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
13490 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
13491 #:tests? #f)); no tests
13492 (inputs
13493 (list java-jsch-agentproxy-core java-native-access))
13494 (synopsis "USocketFactory implementation using JNA")
13495 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13496and Pageant included in Putty. This component contains an implementation of
13497USocketFactory using @dfn{JNA} (Java Native Access).")))
13498
13499(define-public java-jsch-agentproxy-pageant
13500 (package
13501 (inherit java-jsch-agentproxy-core)
13502 (name "java-jsch-agentproxy-pageant")
13503 (arguments
13504 `(#:jar-name "jsch-agentproxy-pageant.jar"
13505 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
13506 #:tests? #f)); no tests
13507 (inputs
13508 (list java-jsch-agentproxy-core java-native-access
13509 java-native-access-platform))
13510 (synopsis "Proxy to pageant")
13511 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13512and Pageant included in Putty. This component contains the code for a proxy to
13513pageant.")))
13514
13515(define-public java-jsch-agentproxy-usocket-nc
13516 (package
13517 (inherit java-jsch-agentproxy-core)
13518 (name "java-jsch-agentproxy-usocket-nc")
13519 (arguments
13520 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
13521 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
13522 #:tests? #f)); no tests
13523 (inputs
13524 (list java-jsch-agentproxy-core))
13525 (synopsis "USocketFactory implementation using netcat")
13526 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13527and Pageant included in Putty. This component contains an implementation of
13528USocketFactory using netcat.")))
13529
13530(define-public java-jsch-agentproxy-connector-factory
13531 (package
13532 (inherit java-jsch-agentproxy-core)
13533 (name "java-jsch-agentproxy-connector-factory")
13534 (arguments
13535 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
13536 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
13537 #:tests? #f)); no tests
13538 (inputs
13539 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
13540 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
13541 java-jsch-agentproxy-usocket-nc))
13542 (synopsis "Connector factory for jsch agent proxy")
13543 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13544and Pageant included in Putty. This component contains a connector factory.")))
13545
13546(define-public java-jsch-agentproxy-jsch
13547 (package
13548 (inherit java-jsch-agentproxy-core)
13549 (name "java-jsch-agentproxy-jsch")
13550 (arguments
13551 `(#:jar-name "jsch-agentproxy-jsch.jar"
13552 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
13553 #:tests? #f)); no tests
13554 (inputs
13555 (list java-jsch java-jsch-agentproxy-core))
13556 (synopsis "JSch integration library for agentproxy")
13557 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13558and Pageant included in Putty. This component contains a library to use
13559jsch-agent-proxy with JSch.")))
13560
13561(define-public java-apache-ivy
13562 (package
13563 (name "java-apache-ivy")
13564 (version "2.4.0")
13565 (source (origin
13566 (method url-fetch)
13567 (uri (string-append "mirror://apache/ant/ivy/" version
13568 "/apache-ivy-" version "-src.tar.gz"))
13569 (sha256
13570 (base32
13571 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
13572 (patches
13573 (search-patches
13574 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
13575 (build-system ant-build-system)
13576 (arguments
13577 `(#:jar-name "ivy.jar"
13578 #:tests? #f
13579 #:phases
13580 (modify-phases %standard-phases
13581 (add-before 'build 'remove-example
13582 (lambda _
13583 (delete-file-recursively "src/example")
13584 #t))
13585 (add-before 'build 'copy-resources
13586 (lambda _
13587 (with-directory-excursion "src/java"
13588 (for-each (lambda (file)
13589 (install-file file (string-append "../../build/classes/" (dirname file))))
13590 (append
13591 (find-files "." ".*.css")
13592 (find-files "." ".*.ent")
13593 (find-files "." ".*.html")
13594 (find-files "." ".*.properties")
13595 (find-files "." ".*.xsd")
13596 (find-files "." ".*.xsl")
13597 (find-files "." ".*.xml"))))
13598 #t))
13599 (add-before 'build 'fix-vfs
13600 (lambda _
13601 (substitute*
13602 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
13603 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
13604 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
13605 #t))
13606 (add-before 'install 'copy-manifest
13607 (lambda _
13608 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
13609 #t))
13610 (add-before 'install 'repack
13611 (lambda _
13612 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
13613 "-C" "build/classes" ".")))
13614 (add-after 'install 'install-bin
13615 (lambda* (#:key outputs #:allow-other-keys)
13616 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
13617 (ivy (string-append bin "/ivy"))
13618 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
13619 (mkdir-p bin)
13620 (with-output-to-file ivy
13621 (lambda _
13622 (display (string-append
13623 "#!" (which "sh") "\n"
13624 "if [[ -z $CLASSPATH ]]; then\n"
13625 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
13626 "else\n"
13627 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
13628 "fi\n"
13629 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
13630 (chmod ivy #o755)
13631 #t))))))
13632 (inputs
13633 (list java-bouncycastle
13634 java-commons-cli
13635 java-commons-collections
13636 java-commons-httpclient
13637 java-commons-lang
13638 java-commons-vfs
13639 java-jakarta-oro
13640 java-jsch
13641 java-jsch-agentproxy-core
13642 java-jsch-agentproxy-connector-factory
13643 java-jsch-agentproxy-jsch
13644 java-junit))
13645 (home-page "https://ant.apache.org/ivy")
13646 (synopsis "Dependency manager for the Java programming language")
13647 (description "Ivy is a tool for managing (recording, tracking, resolving
13648and reporting) project dependencies. It is characterized by the following:
13649
13650@itemize
13651@item flexibility and configurability - Ivy is essentially process agnostic
13652 and is not tied to any methodology or structure. Instead it provides the
13653 necessary flexibility and configurability to be adapted to a broad range
13654 of dependency management and build processes.
13655@item tight integration with Apache Ant - while available as a standalone tool,
13656 Ivy works particularly well with Apache Ant providing a number of
13657 powerful Ant tasks ranging from dependency resolution to dependency
13658 reporting and publication.
13659@end itemize")
13660 (license license:asl2.0)))
13661
13662(define-public java-eclipse-sisu-inject
13663 (package
13664 (name "java-eclipse-sisu-inject")
13665 (version "0.3.5")
13666 (source (origin
13667 (method git-fetch)
13668 (uri (git-reference
13669 (url "https://github.com/eclipse/sisu.inject/")
13670 (commit (string-append "releases/" version))))
13671 (file-name (git-file-name name version))
13672 (sha256
13673 (base32
13674 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
13675 (build-system ant-build-system)
13676 (arguments
13677 `(#:jar-name "eclipse-sisu-inject.jar"
13678 #:source-dir "org.eclipse.sisu.inject/src"
13679 #:tests? #f; no tests
13680 #:phases
13681 (modify-phases %standard-phases
13682 (replace 'install
13683 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13684 (propagated-inputs
13685 (list java-guice java-sisu-inject-parent-pom))
13686 (inputs
13687 (list java-guice-servlet
13688 java-javax-inject
13689 java-javaee-servletapi
13690 java-junit
13691 java-slf4j-api
13692 java-jsr305
13693 java-jsr250
13694 java-cdi-api
13695 java-osgi-framework
13696 java-osgi-util-tracker
13697 java-testng))
13698 (home-page "https://www.eclipse.org/sisu/")
13699 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13700 (description "Sisu is a modular JSR330-based container that supports
13701classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13702Google-Guice to perform dependency injection and provide the core JSR330
13703support, but removes the need to write explicit bindings in Guice modules.
13704Integration with other containers via the Eclipse Extension Registry and the
13705OSGi Service Registry is a goal of this project.")
13706 (license license:epl1.0)))
13707
13708(define java-sisu-inject-parent-pom
13709 (package
13710 (inherit java-eclipse-sisu-inject)
13711 (name "java-sisu-inject-parent-pom")
13712 (arguments
13713 `(#:tests? #f
13714 #:phases
13715 (modify-phases %standard-phases
13716 (delete 'configure)
13717 (delete 'build)
13718 (replace 'install
13719 (install-pom-file "pom.xml")))))
13720 (propagated-inputs '())))
13721
13722(define-public java-eclipse-sisu-plexus
13723 (package
13724 (name "java-eclipse-sisu-plexus")
13725 (version "0.3.5")
13726 (source (origin
13727 (method git-fetch)
13728 (uri (git-reference
13729 (url "https://github.com/eclipse/sisu.plexus")
13730 (commit (string-append "releases/" version))))
13731 (file-name (git-file-name name version))
13732 (sha256
13733 (base32
13734 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13735 (modules '((guix build utils)))
13736 (snippet
13737 '(begin
13738 (for-each delete-file (find-files "." ".*.jar"))
13739 (rename-file "org.eclipse.sisu.plexus.tests/src"
13740 "org.eclipse.sisu.plexus.tests/java")
13741 #t))))
13742 (build-system ant-build-system)
13743 (arguments
13744 `(#:jar-name "eclipse-sisu-plexus.jar"
13745 #:source-dir "org.eclipse.sisu.plexus/src"
13746 #:test-dir "org.eclipse.sisu.plexus.tests"
13747 #:test-exclude
13748 (list
13749 ;; This test fails probably because we can't generate the necessary
13750 ;; meta-inf files.
13751 "**/PlexusLoggingTest.*"
13752 ;; FIXME: This test fails because of some injection error
13753 "**/PlexusRequirementTest.*")
13754 #:jdk ,icedtea-8
13755 #:phases
13756 (modify-phases %standard-phases
13757 (add-before 'build 'copy-resources
13758 (lambda _
13759 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13760 "build/classes/META-INF/plexus")
13761 #t))
13762 (add-before 'check 'build-test-jar
13763 (lambda _
13764 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13765 (mkdir "build")
13766 (with-directory-excursion "java"
13767 (apply invoke "javac" "-cp"
13768 (string-append (getenv "CLASSPATH")
13769 ":../../../../../build/classes")
13770 (find-files "." ".*.java"))
13771 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13772 (find-files "." ".*.jar")))
13773 (mkdir-p "build/META-INF/plexus")
13774 (copy-file "resources/META-INF/plexus/components.xml"
13775 "build/META-INF/plexus/components.xml")
13776 (with-directory-excursion "build"
13777 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13778 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13779 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13780 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13781 (("resources/component-jar")
13782 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13783 #t))
13784 (replace 'install
13785 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13786 (propagated-inputs
13787 (list java-jsr250
13788 java-plexus-classworlds
13789 java-plexus-utils
13790 java-plexus-component-annotations
13791 java-cdi-api
13792 java-eclipse-sisu-inject
13793 java-sisu-plexus-parent-pom))
13794 (inputs
13795 (list java-osgi-framework
13796 java-slf4j-api
13797 java-javax-inject
13798 java-guice
13799 java-guava
13800 java-aopalliance
13801 java-cglib))
13802 (native-inputs
13803 (list java-junit))
13804 (home-page "https://www.eclipse.org/sisu/")
13805 (synopsis "Plexus support for the sisu container")
13806 (description "Sisu is a modular JSR330-based container that supports
13807classpath scanning, auto-binding, and dynamic auto-wiring. This package
13808adds Plexus support to the Sisu-Inject container.")
13809 (license license:epl1.0)))
13810
13811(define java-sisu-plexus-parent-pom
13812 (package
13813 (inherit java-eclipse-sisu-plexus)
13814 (name "java-sisu-plexus-parent-pom")
13815 (arguments
13816 `(#:tests? #f
13817 #:phases
13818 (modify-phases %standard-phases
13819 (delete 'configure)
13820 (delete 'build)
13821 (replace 'install
13822 (install-pom-file "pom.xml")))))
13823 (propagated-inputs
13824 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13825
13826(define-public java-commons-compiler
13827 (package
13828 (name "java-commons-compiler")
13829 (version "3.0.8")
13830 (source (origin
13831 (method git-fetch)
13832 (uri (git-reference
13833 (url "https://github.com/janino-compiler/janino")
13834 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13835 (file-name (string-append name "-" version))
13836 (sha256
13837 (base32
13838 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13839 (modules '((guix build utils)))
13840 (snippet
13841 '(begin
13842 (for-each delete-file
13843 (find-files "." "\\.jar$"))
13844 #t))))
13845 (build-system ant-build-system)
13846 (arguments
13847 `(#:jar-name "commons-compiler.jar"
13848 #:source-dir "commons-compiler/src/main"
13849 #:tests? #f)); no tests
13850 (home-page "https://github.com/janino-compiler/janino")
13851 (synopsis "Java compiler")
13852 (description "Commons-compiler contains an API for janino, including the
13853@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13854and @code{ISimpleCompiler} interfaces.")
13855 (license license:bsd-3)))
13856
13857(define-public java-janino
13858 (package
13859 (inherit java-commons-compiler)
13860 (name "java-janino")
13861 (arguments
13862 `(#:jar-name "janino.jar"
13863 #:source-dir "src/main/java"
13864 #:phases
13865 (modify-phases %standard-phases
13866 (add-before 'configure 'chdir
13867 (lambda _
13868 (chdir "janino")
13869 #t)))))
13870 (inputs
13871 (list java-commons-compiler))
13872 (native-inputs
13873 (list java-junit java-hamcrest-core))
13874 (description "Janino is a Java compiler. Janino can compile a set of
13875source files to a set of class files like @code{javac}, but also compile a
13876Java expression, block, class body or source file in memory, load the bytecode
13877and execute it directly in the same JVM. @code{janino} can also be used for
13878static code analysis or code manipulation.")))
13879
13880(define-public java-logback-core
13881 (package
13882 (name "java-logback-core")
13883 (version "1.2.3")
13884 (source (origin
13885 (method git-fetch)
13886 (uri (git-reference
13887 (url "https://github.com/qos-ch/logback/")
13888 (commit (string-append "v_" version))))
13889 (file-name (git-file-name name version))
13890 (sha256
13891 (base32
13892 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
13893 (modules '((guix build utils)))
13894 (snippet
13895 '(delete-file-recursively "logback-access/lib"))))
13896 (build-system ant-build-system)
13897 (arguments
13898 `(#:jar-name "logback.jar"
13899 #:source-dir "src/main/java"
13900 #:test-dir "src/test"
13901 #:test-exclude
13902 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13903 ;; which creates FastClasses
13904 (list "**/AllCoreTest.*"
13905 "**/AutoFlushingObjectWriterTest.*"
13906 "**/PackageTest.*"
13907 "**/ResilientOutputStreamTest.*"
13908 ;; And we still don't want to run abstract classes
13909 "**/Abstract*.*")
13910 #:phases
13911 (modify-phases %standard-phases
13912 (add-before 'configure 'chdir
13913 (lambda _ (chdir "logback-core"))))))
13914 (inputs
13915 (list java-javax-mail
13916 java-javaee-servletapi
13917 java-commons-compiler
13918 java-janino))
13919 (native-inputs
13920 (list java-junit
13921 java-hamcrest-core
13922 java-mockito-1
13923 java-cglib
13924 java-objenesis
13925 java-joda-time))
13926 (home-page "https://logback.qos.ch")
13927 (synopsis "Logging for java")
13928 (description "Logback is intended as a successor to the popular log4j project.
13929This module lays the groundwork for the other two modules.")
13930 ;; Either epl1.0 or lgpl2.1
13931 (license (list license:epl1.0
13932 license:lgpl2.1))))
13933
13934(define-public java-logback-classic
13935 (package
13936 (inherit java-logback-core)
13937 (name "java-logback-classic")
13938 (arguments
13939 `(#:jar-name "logback-classic.jar"
13940 #:source-dir "src/main/java"
13941 #:test-dir "src/test"
13942 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13943 #:jdk ,icedtea-8
13944 #:phases
13945 (modify-phases %standard-phases
13946 (add-before 'configure 'chdir
13947 (lambda _
13948 (chdir "logback-classic")
13949 #t))
13950 (replace 'build
13951 (lambda* (#:key inputs #:allow-other-keys)
13952 (mkdir-p "build/classes")
13953 (setenv "CLASSPATH"
13954 (string-join
13955 (apply append (map (lambda (input)
13956 (find-files (assoc-ref inputs input)
13957 ".*.jar"))
13958 '("java-logback-core" "java-slf4j-api"
13959 "java-commons-compiler" "java-javaee-servletapi"
13960 "groovy")))
13961 ":"))
13962 (apply invoke "groovyc" "-d" "build/classes" "-j"
13963 (find-files "src/main/" ".*\\.(groovy|java)$"))
13964 (invoke "ant" "jar")
13965 #t)))))
13966 (inputs
13967 (modify-inputs inputs
13968 (prepend java-logback-core java-slf4j-api)))
13969 (native-inputs
13970 (list groovy))
13971 (description "Logback is intended as a successor to the popular log4j project.
13972This module can be assimilated to a significantly improved version of log4j.
13973Moreover, @code{logback-classic} natively implements the slf4j API so that you
13974can readily switch back and forth between logback and other logging frameworks
13975such as log4j or @code{java.util.logging} (JUL).")))
13976
13977(define-public java-jgit
13978 (package
13979 (name "java-jgit")
13980 (version "4.7.0.201704051617-r")
13981 (source (origin
13982 (method url-fetch)
13983 (uri (string-append "https://repo1.maven.org/maven2/"
13984 "org/eclipse/jgit/org.eclipse.jgit/"
13985 version "/org.eclipse.jgit-"
13986 version "-sources.jar"))
13987 (sha256
13988 (base32
13989 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13990 (build-system ant-build-system)
13991 (arguments
13992 `(#:tests? #f ; There are no tests to run.
13993 #:jar-name "jgit.jar"
13994 ;; JGit must be built with a JDK supporting Java 8.
13995 #:jdk ,icedtea-8
13996 ;; Target our older default JDK.
13997 #:make-flags (list "-Dtarget=1.7")
13998 #:phases
13999 (modify-phases %standard-phases
14000 ;; The jar file generated by the default build.xml does not include
14001 ;; the text properties files, so we need to add them.
14002 (add-after 'build 'add-properties
14003 (lambda* (#:key jar-name #:allow-other-keys)
14004 (with-directory-excursion "src"
14005 (apply invoke "jar" "-uf"
14006 (string-append "../build/jar/" jar-name)
14007 (find-files "." "\\.properties$")))
14008 #t)))))
14009 (inputs
14010 (list java-classpathx-servletapi java-javaewah java-jsch
14011 java-slf4j-api))
14012 (home-page "https://eclipse.org/jgit/")
14013 (synopsis "Java library implementing the Git version control system")
14014 (description "JGit is a lightweight, pure Java library implementing the
14015Git version control system, providing repository access routines, support for
14016network protocols, and core version control algorithms.")
14017 (license license:edl1.0)))
14018
14019;; For axoloti.
14020(define-public java-jgit-4.2
14021 (package (inherit java-jgit)
14022 (version "4.2.0.201601211800-r")
14023 (source (origin
14024 (method url-fetch)
14025 (uri (string-append "https://repo1.maven.org/maven2/"
14026 "org/eclipse/jgit/org.eclipse.jgit/"
14027 version "/org.eclipse.jgit-"
14028 version "-sources.jar"))
14029 (sha256
14030 (base32
14031 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
14032 (build-system ant-build-system)
14033 (arguments
14034 (substitute-keyword-arguments (package-arguments java-jgit)
14035 ((#:phases phases)
14036 `(modify-phases ,phases
14037 (add-after 'unpack 'use-latest-javaewah-API
14038 (lambda _
14039 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
14040 (("wordinbits") "WORD_IN_BITS"))))))))
14041 (inputs
14042 (list java-javaewah java-jsch java-slf4j-api))))
14043
14044(define-public abcl
14045 (package
14046 (name "abcl")
14047 (version "1.9.3")
14048 (source
14049 (origin
14050 (method url-fetch)
14051 (uri (string-append "https://abcl.org/releases/"
14052 version "/abcl-src-" version ".tar.gz"))
14053 (sha256
14054 (base32
14055 "1zxjpwv98bq2yd5qg08sbkajj17m7b8xmzqhw296161s7lia215v"))
14056 (patches
14057 (search-patches
14058 "abcl-fix-build-xml.patch"))))
14059 (build-system ant-build-system)
14060 (native-inputs
14061 (list java-junit))
14062 (arguments
14063 `(#:build-target "abcl.jar"
14064 #:test-target "abcl.test"
14065 #:phases
14066 (modify-phases %standard-phases
14067 (replace 'install
14068 (lambda* (#:key outputs #:allow-other-keys)
14069 (let ((share (string-append (assoc-ref outputs "out")
14070 "/share/java/"))
14071 (bin (string-append (assoc-ref outputs "out")
14072 "/bin/")))
14073 (mkdir-p share)
14074 (install-file "dist/abcl.jar" share)
14075 (install-file "dist/abcl-contrib.jar" share)
14076 (mkdir-p bin)
14077 (with-output-to-file (string-append bin "abcl")
14078 (lambda _
14079 (let ((classpath (string-append
14080 share "abcl.jar"
14081 ":"
14082 share "abcl-contrib.jar")))
14083 (display (string-append
14084 "#!" (which "bash") "\n"
14085 "if [[ -z $CLASSPATH ]]; then\n"
14086 " cp=\"" classpath "\"\n"
14087 "else\n"
14088 " cp=\"" classpath ":$CLASSPATH\"\n"
14089 "fi\n"
14090 "exec " (which "java")
14091 " -cp \"$cp\" org.armedbear.lisp.Main \"$@\"\n")))))
14092 (chmod (string-append bin "abcl") #o755)
14093 #t))))))
14094 (home-page "https://abcl.org/")
14095 (synopsis "Common Lisp Implementation on the JVM")
14096 (description
14097 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
14098Lisp language featuring both an interpreter and a compiler, running in the
14099JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
14100in any Java application. Additionally, it can be used to implement (parts of)
14101the application using Java to Lisp integration APIs.")
14102 (native-search-paths
14103 (list (search-path-specification
14104 (variable "XDG_DATA_DIRS")
14105 (files '("share")))))
14106 (license (list license:gpl2+
14107 ;; named-readtables is released under 3 clause BSD
14108 license:bsd-3
14109 ;; jfli is released under CPL 1.0
14110 license:cpl1.0))))
14111
14112(define-public java-jsonp-api
14113 (package
14114 (name "java-jsonp-api")
14115 (version "1.1.6")
14116 (source (origin
14117 (method git-fetch)
14118 (uri (git-reference
14119 (url "https://github.com/eclipse-ee4j/jsonp")
14120 (commit (string-append "1.1-" version "-RELEASE"))))
14121 (file-name (git-file-name name version))
14122 (sha256
14123 (base32
14124 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
14125 (build-system ant-build-system)
14126 (arguments
14127 `(#:jar-name "jsonp-api.jar"
14128 #:tests? #f
14129 #:source-dir "api/src/main/java"
14130 #:test-dir "api/src/test"))
14131 (home-page "https://eclipse-ee4j.github.io/jsonp/")
14132 (synopsis "JSON Processing in Java")
14133 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14134parse, generate, transform and query) JSON messages. It produces and
14135consumes JSON text in a streaming fashion (similar to StAX API for XML)
14136and allows building a Java object model for JSON text using API classes
14137(similar to DOM API for XML).")
14138 ;; either gpl2 only with classpath exception, or epl2.0.
14139 (license (list license:gpl2
14140 license:epl2.0))))
14141
14142(define-public java-jsonp-impl
14143 (package
14144 (inherit java-jsonp-api)
14145 (name "java-jsonp-impl")
14146 (arguments
14147 `(#:jar-name "jsonp-impl.jar"
14148 #:tests? #f
14149 #:source-dir "impl/src/main/java"
14150 #:test-dir "impl/src/test"
14151 #:phases
14152 (modify-phases %standard-phases
14153 (add-before 'build 'copy-resources
14154 (lambda _
14155 (copy-recursively
14156 "impl/src/main/resources/"
14157 "build/classes")
14158 #t)))))
14159 (propagated-inputs
14160 (list java-jsonp-api))
14161 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14162parse, generate, transform and query) JSON messages. This package contains
14163a reference implementation of that API.")))
14164
14165(define-public java-jakarta-json
14166 (package
14167 (name "java-jakarta-json")
14168 (version "2.1.3")
14169 (source (origin
14170 (method git-fetch)
14171 (uri (git-reference
14172 (url "https://github.com/jakartaee/jsonp-api")
14173 (commit (string-append version "-RELEASE"))))
14174 (file-name (git-file-name name version))
14175 (sha256
14176 (base32
14177 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
14178 (build-system ant-build-system)
14179 (arguments
14180 `(#:jar-name "jakarta-json.jar"
14181 #:source-dir "api/src/main/java"
14182 #:tests? #f; no tests
14183 #:jdk ,openjdk11))
14184 (home-page "https://github.com/jakartaee/jsonp-api")
14185 (synopsis "Portable API for JSON handling in Java")
14186 (description "This project contains API and Compatible Implementation of
14187Jakarta JSON Processing specification. Jakarta JSON Processing provides
14188portable APIs to parse, generate, transform, and query JSON documents.")
14189 ;; with classpath exception
14190 (license license:epl2.0)))
14191
14192(define-public java-parsson
14193 (package
14194 (name "java-parsson")
14195 (version "1.1.5")
14196 (source (origin
14197 (method git-fetch)
14198 (uri (git-reference
14199 (url "https://github.com/eclipse-ee4j/parsson")
14200 (commit version)))
14201 (file-name (git-file-name name version))
14202 (sha256
14203 (base32
14204 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
14205 (build-system ant-build-system)
14206 (arguments
14207 `(#:jar-name "parsson.jar"
14208 #:source-dir "impl/src/main/java"
14209 #:test-dir "impl/src/test"
14210 #:use-java-modules? #t
14211 #:jdk ,openjdk11
14212 #:phases
14213 (modify-phases %standard-phases
14214 (add-after 'unpack 'copy-resources
14215 (lambda _
14216 (copy-recursively "impl/src/main/resources"
14217 "build/classes"))))))
14218 (inputs
14219 (list java-jakarta-json))
14220 (native-inputs
14221 (list java-junit))
14222 (home-page "https://github.com/eclipse-ee4j/parsson")
14223 (synopsis "Implementation of Jakarta JSON API")
14224 (description "Eclipse Parsson is an implementation of the Jakarta JSON
14225Processing specification.")
14226 ;; with classpath exception
14227 (license license:epl2.0)))
14228
14229(define-public java-jakarta-activation-api
14230 (package
14231 (name "java-jakarta-activation-api")
14232 (version "2.1.4")
14233 (source (origin
14234 (method git-fetch)
14235 (uri (git-reference
14236 (url "https://github.com/jakartaee/jaf-api")
14237 (commit version)))
14238 (file-name (git-file-name name version))
14239 (sha256
14240 (base32
14241 "125bf475cb0mdyhn1lj3c8gbwngbd28x10vnknq86zrc1vq4m6gx"))))
14242 (build-system ant-build-system)
14243 (arguments
14244 `(#:jar-name "jakarta-activation-api.jar"
14245 #:source-dir "api/src/main/java"
14246 #:tests? #f ;; has no tests
14247 #:jdk ,openjdk11))
14248 (home-page "https://github.com/jakartaee/jaf-api")
14249 (synopsis "Collection of Java activation")
14250 (description "Jakarta Activation lets you take advantage of standard
14251services to: determine the type of arbitrary piece of data; encapsulate access
14252to it; discover the operations available on it; and instantiate the
14253appropriate bean to perform the operation(s).")
14254 (license license:bsd-3)))
14255
14256(define-public java-jakarta-annotations-api
14257 (package
14258 (name "java-jakarta-annotations-api")
14259 (version "2.1.1")
14260 (source (origin
14261 (method git-fetch)
14262 (uri (git-reference
14263 (url "https://github.com/jakartaee/common-annotations-api")
14264 (commit version)))
14265 (file-name (git-file-name name version))
14266 (sha256
14267 (base32
14268 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
14269 (build-system ant-build-system)
14270 (arguments
14271 `(#:jar-name "jakarta-annotations-api.jar"
14272 #:source-dir "api/src/main/java"
14273 #:tests? #f; no tests
14274 #:jdk ,openjdk11))
14275 (home-page "https://github.com/jakartaee/common-annotations-api")
14276 (synopsis "Collection of Java annotations")
14277 (description "Jakarta Annotations defines a collection of annotations
14278representing common semantic concepts that enable a declarative style of
14279programming that applies across a variety of Java technologies.")
14280 ;; with classpath exception
14281 (license (list license:epl2.0
14282 license:gpl2))))
14283
14284(define-public java-xmp
14285 (package
14286 (name "java-xmp")
14287 (version "5.1.3")
14288 (source (origin
14289 (method url-fetch)
14290 (uri (string-append "http://download.macromedia.com/pub/developer"
14291 "/xmp/sdk/XMPCoreJava-" version ".zip"))
14292 (sha256
14293 (base32
14294 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
14295 (build-system ant-build-system)
14296 (arguments
14297 `(#:build-target "build"
14298 #:tests? #f; no tests
14299 #:phases
14300 (modify-phases %standard-phases
14301 (add-after 'unpack 'chdir
14302 (lambda _
14303 (chdir "XMPCore")
14304 #t))
14305 (add-before 'build 'fix-timestamp
14306 (lambda _
14307 (substitute* "build.xml"
14308 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
14309 #t))
14310 (replace 'install
14311 (install-jars "."))
14312 (add-after 'install 'install-doc
14313 (lambda* (#:key outputs #:allow-other-keys)
14314 (copy-recursively
14315 "docs"
14316 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
14317 #t)))))
14318 (native-inputs
14319 (list unzip))
14320 (home-page "https://www.adobe.com/devnet/xmp.html")
14321 (synopsis "Extensible Metadat Platform (XMP) support in Java")
14322 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
14323technology that allows you to embed data about a file, known as metadata,
14324into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
14325library and the API is similar.")
14326 (license license:bsd-3)))
14327
14328(define-public java-args4j
14329 (package
14330 (name "java-args4j")
14331 (version "2.33")
14332 (source (origin
14333 (method git-fetch)
14334 (uri (git-reference
14335 (url "https://github.com/kohsuke/args4j")
14336 (commit (string-append "args4j-site-" version))))
14337 (file-name (git-file-name name version))
14338 (sha256
14339 (base32
14340 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
14341 (build-system ant-build-system)
14342 (arguments
14343 `(#:jar-name "args4j.jar"
14344 #:source-dir "args4j/src"
14345 #:test-dir "args4j/test"
14346 #:test-exclude
14347 (list "**/ExampleTest.*"
14348 "**/ExternalConfiguredTest.*" ; fails to find a file
14349 ;; We still don't want to run abstract classes
14350 "**/Abstract*.*")
14351 #:phases
14352 (modify-phases %standard-phases
14353 (add-before 'check 'fix-test-dir
14354 (lambda _
14355 (substitute* "build.xml"
14356 (("/java\">") "\">"))
14357 #t))
14358 (add-before 'build 'copy-resources
14359 (lambda _
14360 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
14361 (to-prefix "build/classes/org/kohsuke/args4j/"))
14362 (for-each (lambda (f)
14363 (install-file
14364 (string-append from-prefix f)
14365 (string-append to-prefix (dirname f))))
14366 (list "Messages.properties"
14367 "Messages_de.properties"
14368 "Messages_en.properties"
14369 "Messages_ru.properties"
14370 "spi/Messages.properties"
14371 "spi/Messages_de.properties"
14372 "spi/Messages_en.properties"
14373 "spi/Messages_ru.properties")))
14374 #t)))))
14375 (native-inputs
14376 (list java-junit))
14377 (home-page "https://args4j.kohsuke.org/")
14378 (synopsis "Command line parser library")
14379 (description "Args4j is a small Java class library that makes it easy to
14380parse command line options/arguments in your CUI application.")
14381 (license license:expat)))
14382
14383(define-public java-argparse4j
14384 (package
14385 (name "java-argparse4j")
14386 (version "0.9.0")
14387 (source (origin
14388 (method git-fetch)
14389 (uri (git-reference
14390 (url "https://github.com/argparse4j/argparse4j")
14391 (commit (string-append "argparse4j-" version))))
14392 (file-name (git-file-name name version))
14393 (sha256
14394 (base32
14395 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
14396 (build-system ant-build-system)
14397 (arguments
14398 (list #:jar-name "java-argparse4j.jar"
14399 #:source-dir "main/src/main/"
14400 #:test-dir "main/src/test/"
14401 #:jdk openjdk11
14402 #:phases #~(modify-phases %standard-phases
14403 (add-after 'unpack 'copy-resources
14404 (lambda _
14405 (copy-recursively "main/src/test/resources"
14406 "target/test-classes")
14407 (copy-recursively "main/src/main/resources"
14408 "build/classes")))
14409 (replace 'install
14410 (install-from-pom "pom.xml")))))
14411 (inputs (list java-junit))
14412 (home-page "https://argparse4j.github.io/")
14413 (synopsis "Java command-line argument parser library")
14414 (description "Argparse4j is a command line argument parser library for
14415Java based on Python's @code{argparse} module.")
14416 (license license:expat)))
14417
14418(define-public java-metadata-extractor
14419 (package
14420 (name "java-metadata-extractor")
14421 (version "2.19.0")
14422 (source (origin
14423 (method git-fetch)
14424 (uri (git-reference
14425 (url "https://github.com/drewnoakes/metadata-extractor")
14426 (commit version)))
14427 (file-name (git-file-name name version))
14428 (sha256
14429 (base32
14430 "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna"))))
14431 (build-system ant-build-system)
14432 (arguments
14433 `(#:jar-name "metadata-extractor.jar"
14434 #:source-dir "Source"
14435 #:test-dir "Tests"
14436 #:phases
14437 (modify-phases %standard-phases
14438 (add-before 'build 'fix-xmp-path
14439 (lambda _
14440 ;; This version of metadata-extractor depends on java-xmp 6, which
14441 ;; is non-free. These changes allow using java-xmp 5, which is
14442 ;; the last free-software version of java-xmp.
14443 (substitute* (find-files "." ".*.java")
14444 (("com.adobe.internal.xmp") "com.adobe.xmp"))
14445 (substitute* "Source/com/drew/metadata/xmp/XmpReader.java"
14446 (("\\.setXMPNodesToLimit.*") ";"))
14447 ;; Test failure, most likely because we use a different java-xmp
14448 ;; version.
14449 (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java")))
14450 (add-before 'check 'fix-test-dir
14451 (lambda _
14452 (substitute* "build.xml"
14453 (("/java\">") "\">"))
14454 #t)))))
14455 (propagated-inputs
14456 (list java-xmp))
14457 (native-inputs
14458 (list java-hamcrest-core java-junit))
14459 (home-page "https://github.com/drewnoakes/metadata-extractor")
14460 (synopsis "Extract metadata from image and video files")
14461 (description "Metadata-extractor is a straightforward Java library for
14462reading metadata from image files. It is able to read metadata in Exif,
14463IPTC, XMP, ICC and more formats.")
14464 (license license:asl2.0)))
14465
14466(define-public java-svg-salamander
14467 (package
14468 (name "java-svg-salamander")
14469 (version "1.1.2")
14470 (source (origin
14471 (method git-fetch)
14472 (uri (git-reference
14473 (url "https://github.com/blackears/svgSalamander")
14474 (commit (string-append "v" version))))
14475 (file-name (git-file-name name version))
14476 (sha256
14477 (base32
14478 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
14479 (modules '((guix build utils)))
14480 (snippet
14481 '(begin
14482 (for-each delete-file (find-files "." ".*.jar"))
14483 #t))
14484 (patches
14485 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
14486 (build-system ant-build-system)
14487 (arguments
14488 `(#:tests? #f; no tests
14489 #:phases
14490 (modify-phases %standard-phases
14491 (add-after 'unpack 'chdir
14492 (lambda _
14493 (chdir "svg-core")
14494 #t))
14495 (add-before 'build 'copy-jars
14496 (lambda* (#:key inputs #:allow-other-keys)
14497 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
14498 "../libraries/javacc.jar")
14499 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
14500 "../libraries/ant.jar")
14501 #t))
14502 (replace 'install
14503 (install-jars "dist")))))
14504 (native-inputs
14505 (list javacc))
14506 (home-page "https://github.com/blackears/svgSalamander")
14507 (synopsis "SVG engine for Java")
14508 (description "SVG Salamander is an SVG engine for Java that's designed
14509to be small, fast, and allow programmers to use it with a minimum of fuss.
14510It's in particular targeted for making it easy to integrate SVG into Java
14511games and making it much easier for artists to design 2D game content - from
14512rich interactive menus to charts and graphcs to complex animations.")
14513 (license license:bsd-2)))
14514
14515(define-public java-jboss-transaction-api-spec
14516 (package
14517 (name "java-jboss-transaction-api-spec")
14518 (version "1.2+1.1.1")
14519 (source (origin
14520 (method git-fetch)
14521 (uri (git-reference
14522 (url "https://github.com/jboss/jboss-transaction-api_spec")
14523 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
14524 (file-name (git-file-name name version))
14525 (sha256
14526 (base32
14527 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
14528 (build-system ant-build-system)
14529 (arguments
14530 `(#:jar-name "java-jboss-transaction-api_spec.jar"
14531 #:source-dir "src/main/java"
14532 #:tests? #f)); no tests
14533 (inputs
14534 (list java-cdi-api java-jboss-interceptors-api-spec))
14535 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
14536 (synopsis "Generic transaction management API in Java")
14537 (description "Java-jboss-transaction-api-spec implements the Transactions
14538API. A transaction is a unit of work containing one or more operations
14539involving one or more shared resources having ACID (Atomicity, Consistency,
14540Isolation and Durability) properties.")
14541 ;; either gpl2 only with classpath exception or cddl.
14542 (license (list license:gpl2 license:cddl1.0))))
14543
14544(define-public java-picocli
14545 (package
14546 (name "java-picocli")
14547 (version "4.3.2")
14548 (source (origin
14549 (method git-fetch)
14550 (uri (git-reference
14551 (url "https://github.com/remkop/picocli")
14552 (commit (string-append "v" version))))
14553 (file-name (git-file-name name version))
14554 (sha256
14555 (base32
14556 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
14557 (build-system ant-build-system)
14558 (arguments
14559 `(#:jar-name "picocli.jar"
14560 #:source-dir "src/main/java"
14561 ;; Tests require missing dependencies (junitparams, system-rules)
14562 #:tests? #f))
14563 (home-page "https://picocli.info")
14564 (synopsis "REPL for the JVM")
14565 (description "Picocli is a framework for building command line applications
14566for the JVM. It supports colors, autocompletion, subcommands, and more. Written
14567in Java, usable from Groovy, Kotlin, Scala, etc.")
14568 (license license:asl2.0)))
14569
14570(define-public java-pj
14571 (package
14572 (name "java-pj")
14573 (version "20150107")
14574 (source (origin
14575 (method url-fetch)
14576 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
14577 version ".jar"))
14578 (sha256
14579 (base32
14580 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
14581 (modules '((guix build utils)))
14582 (snippet
14583 '(for-each delete-file
14584 (find-files "." "\\.class$")))))
14585 (build-system ant-build-system)
14586 (arguments
14587 (list
14588 #:tests? #false ;there are none
14589 #:phases
14590 #~(modify-phases %standard-phases
14591 (add-after 'unpack 'chdir
14592 (lambda _ (chdir "src/pj")))
14593 (add-after 'chdir 'patch-source-directory
14594 (lambda _
14595 (substitute* "compile"
14596 (("SRCDIR1=/home/ark/public_html/pj/lib")
14597 (string-append "SRCDIR1=" (getcwd) "/lib")))))
14598 (replace 'build
14599 (lambda _
14600 (invoke "bash" "./compile" "linux")
14601 (with-directory-excursion "lib"
14602 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
14603 (find-files "." "\\.class$")))))
14604 (replace 'install (install-jars ".")))))
14605 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
14606 (synopsis "Parallel programming in Java")
14607 (description "Parallel Java (PJ) is an API and middleware for parallel
14608programming in 100% Java on shared memory multiprocessor (SMP) parallel
14609computers, cluster parallel computers, and hybrid SMP cluster parallel
14610computers.")
14611 (license license:gpl3+)))
14612
14613(define-public java-jetbrains-annotations
14614 (package
14615 (name "java-jetbrains-annotations")
14616 (version "19.0.0")
14617 (source (origin
14618 (method git-fetch)
14619 (uri (git-reference
14620 (url "https://github.com/JetBrains/java-annotations")
14621 (commit version)))
14622 (file-name (git-file-name name version))
14623 (sha256
14624 (base32
14625 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
14626 (build-system ant-build-system)
14627 (arguments
14628 `(#:jar-name "jetbrains-annotations.jar"
14629 #:source-dir "common/src/main/java:java8/src/main/java"
14630 #:tests? #f)); no tests
14631 (home-page "https://github.com/JetBrains/java-annotations")
14632 (synopsis "Annotations for Java and other JVM languages")
14633 (description "This package contains a set of Java annotations which can be
14634used in JVM-based languages. They serve as an additional documentation and
14635can be interpreted by IDEs and static analysis tools to improve code analysis.")
14636 (license license:expat)))
14637
14638(define-public java-javaparser
14639 (package
14640 (name "java-javaparser")
14641 (version "3.16.1")
14642 (source (origin
14643 (method git-fetch)
14644 (uri (git-reference
14645 (url "https://github.com/javaparser/javaparser")
14646 (commit (string-append "javaparser-parent-" version))))
14647 (file-name (git-file-name name version))
14648 (sha256
14649 (base32
14650 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
14651 (modules '((guix build utils)))
14652 (snippet
14653 '(begin
14654 (for-each delete-file
14655 (find-files "." "\\.jar$"))
14656 #t))))
14657 (build-system ant-build-system)
14658 (arguments
14659 `(#:tests? #f; tests require jbehave and junit5
14660 #:phases
14661 (modify-phases %standard-phases
14662 (add-before 'build 'fill-template
14663 (lambda _
14664 (with-directory-excursion "javaparser-core/src/main"
14665 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
14666 "java/com/github/javaparser/JavaParserBuild.java")
14667 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
14668 (("\\$\\{project.version\\}") ,version)
14669 (("\\$\\{project.name\\}") "javaparser")
14670 (("\\$\\{project.build.finalName\\}") "javaparser")
14671 (("\\$\\{maven.version\\}") "fake")
14672 (("\\$\\{maven.build.version\\}") "fake")
14673 (("\\$\\{build.timestamp\\}") "0")
14674 (("\\$\\{java.vendor\\}") "Guix")
14675 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
14676 (("\\$\\{java.version\\}") "1.8")
14677 (("\\$\\{os.arch\\}") "any")
14678 (("\\$\\{os.name\\}") "Guix")
14679 (("\\$\\{os.version\\}") "not available")))
14680 #t))
14681 (add-before 'build 'generate-javacc
14682 (lambda _
14683 (with-directory-excursion "javaparser-core/src/main/java"
14684 (invoke "java" "javacc" "../javacc/java.jj"))
14685 #t))
14686 (add-before 'build 'copy-javacc-support
14687 (lambda _
14688 (with-directory-excursion "javaparser-core/src/main"
14689 (copy-recursively "javacc-support" "java"))
14690 #t))
14691 (replace 'build
14692 (lambda _
14693 (define (build name)
14694 (format #t "Building ~a~%" name)
14695 (delete-file-recursively "build/classes")
14696 (mkdir-p "build/classes")
14697 (apply invoke "javac"
14698 "-cp" (string-append (getenv "CLASSPATH") ":"
14699 (string-join (find-files "build/jar" ".")
14700 ":"))
14701 "-d" "build/classes"
14702 (find-files (string-append name "/src/main/java")
14703 ".*.java"))
14704 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
14705 "-C" "build/classes" "."))
14706 (mkdir-p "build/classes")
14707 (mkdir-p "build/test-classes")
14708 (mkdir-p "build/jar")
14709 (build "javaparser-core")
14710 (build "javaparser-core-serialization")
14711 (build "javaparser-core-generators")
14712 (build "javaparser-core-metamodel-generator")
14713 (build "javaparser-symbol-solver-core")
14714 #t))
14715 (replace 'install
14716 (install-jars "build/jar")))))
14717 (inputs
14718 (list java-guava java-jboss-javassist java-jsonp-api))
14719 (native-inputs
14720 (list javacc))
14721 (home-page "https://javaparser.org/")
14722 (synopsis "Parser for Java")
14723 (description
14724 "This project contains a set of libraries implementing a Java 1.0 - Java
1472511 Parser with advanced analysis functionalities.")
14726 (license (list
14727 ;; either lgpl or asl
14728 license:lgpl3+
14729 license:asl2.0))))
14730
14731(define-public tla2tools
14732 ;; This package was originally based on the "v1.8.0" tag, but that merely
14733 ;; points to the moving master branch. That might be because the ‘latest
14734 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
14735 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
14736 (let* ((release "1.7.1")
14737 (revision "0")
14738 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
14739 (package
14740 (name "tla2tools")
14741 (version (git-version release revision commit))
14742 (source (origin
14743 (method git-fetch)
14744 (uri (git-reference
14745 (url "https://github.com/tlaplus/tlaplus")
14746 (commit commit)))
14747 (file-name (git-file-name name version))
14748 (sha256
14749 (base32
14750 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
14751 (patches
14752 (search-patches "tla2tools-build-xml.patch"))
14753 (modules '((guix build utils)))
14754 (snippet
14755 '(begin
14756 ;; Remove packaged libraries (see 'replace-libs below)
14757 (for-each delete-file (find-files "." ".*.jar$"))))))
14758 (build-system ant-build-system)
14759 (arguments
14760 (let* ((tlatools "tlatools/org.lamport.tlatools/")
14761 (build-xml (string-append tlatools "customBuild.xml")))
14762 `(#:jdk ,openjdk11
14763 #:modules ((guix build ant-build-system)
14764 (guix build utils)
14765 (ice-9 match)
14766 (srfi srfi-26))
14767 #:make-flags '("-f" ,build-xml)
14768 #:phases
14769 (modify-phases %standard-phases
14770 ;; Replace packed libs with references to jars in store
14771 (add-after 'unpack 'replace-libs
14772 (lambda* (#:key inputs #:allow-other-keys)
14773 (define (input-jar input)
14774 (car (find-files (assoc-ref inputs input) "\\.jar$")))
14775 (for-each
14776 (match-lambda
14777 ((file . input)
14778 (symlink (input-jar input)
14779 (string-append ,tlatools "/lib/" file))))
14780 '(("gson/gson-2.8.6.jar" . "java-gson")
14781 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
14782 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
14783 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
14784 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
14785 "java-eclipse-lsp4j-debug")
14786 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
14787 "java-eclipse-lsp4j-jsonrpc")
14788 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
14789 "java-eclipse-lsp4j-jsonrpc-debug")
14790 ("junit-4.12.jar" . "java-junit")
14791 ("easymock-3.3.1.jar" . "java-easymock")))
14792 ;; Retain a tiny subset of the original X-Git-*
14793 ;; manifest values just to aid in debugging.
14794 (substitute* ,build-xml
14795 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
14796 (add-before 'check 'prepare-tests
14797 (lambda _
14798 ;; The pcal tests write to .cfg files.
14799 (for-each (cut chmod <> #o644)
14800 (find-files (string-append ,tlatools
14801 "/test-model/pcal")
14802 "\\.cfg$"))))
14803 (replace 'install
14804 (lambda* (#:key inputs outputs #:allow-other-keys)
14805 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
14806 (jar-name "tla2tools.jar"); set in project.properties
14807 (jar (string-append ,tlatools
14808 "/dist/" jar-name))
14809 (java-cp (string-append share "/" jar-name))
14810 (bin (string-append (assoc-ref outputs "out") "/bin"))
14811 (java (search-input-file inputs "/bin/java")))
14812 (install-file jar share)
14813 (mkdir-p bin)
14814 ;; Generate wrapper scripts for bin/, which invoke common
14815 ;; commands within tla2tools.jar. Users can still invoke
14816 ;; tla2tools.jar for the rest.
14817 (for-each
14818 (match-lambda
14819 ((wrapper . class)
14820 (let ((file (string-append bin "/" wrapper)))
14821 (begin
14822 (with-output-to-file file
14823 (lambda _
14824 (display
14825 (string-append
14826 "#!/bin/sh\n"
14827 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
14828 (chmod file #o755)))))
14829 ;; bin/wrapper . java-class
14830 '(("pcal" . "pcal.trans")
14831 ("tlatex" . "tla2tex.TLA")
14832 ("tla2sany" . "tla2sany.SANY")
14833 ("tlc2" . "tlc2.TLC")
14834 ("tlc2-repl" . "tlc2.REPL"))))))))))
14835 (native-inputs
14836 (list java-junit java-easymock))
14837 (inputs
14838 (list java-javax-mail
14839 java-gson-2.8.6
14840 java-jline-terminal
14841 java-jline-reader
14842 java-eclipse-lsp4j-jsonrpc
14843 java-eclipse-lsp4j-jsonrpc-debug
14844 java-eclipse-lsp4j-debug))
14845 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14846 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14847 (description "TLA+ is a high-level language for modeling programs and
14848systems---especially concurrent and distributed ones. It's based on the idea
14849that the best way to describe things precisely is with simple
14850mathematics. TLA+ and its tools are useful for eliminating fundamental design
14851errors, which are hard to find and expensive to correct in code.
14852
14853The following TLA+ tools are available in this distribution:
14854
14855@itemize
14856@item The Syntactic Analyzer: A parser and syntax checker for
14857 TLA+ specifications;
14858@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14859 specifications;
14860@item TLATeX: A program for typesetting TLA+ specifications;
14861@item Beta test versions of 1-3 for the TLA+2 language; and
14862@item The PlusCal translator.
14863@end itemize")
14864 (license license:expat))))
14865
14866;;;
14867;;; Avoid adding new packages to the end of this file. To reduce the chances
14868;;; of a merge conflict, place them above by existing packages with similar
14869;;; functionality or similar names.
14870;;;