projects/guix·blob python-team · refs

17191 lines · 716.9 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 (gnu packages attr)
46 #:use-module (gnu packages autotools)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages cpio)
52 #:use-module (gnu packages cups)
53 #:use-module (gnu packages elf)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages freedesktop) ; wayland
56 #:use-module (gnu packages gawk)
57 #:use-module (gnu packages gcc)
58 #:use-module (gnu packages gettext)
59 #:use-module (gnu packages ghostscript) ;lcms
60 #:use-module (gnu packages gl)
61 #:use-module (gnu packages gnome)
62 #:use-module (gnu packages groovy)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages guile)
65 #:use-module (gnu packages icu4c)
66 #:use-module (gnu packages image)
67 #:use-module (gnu packages java-bootstrap)
68 #:use-module (gnu packages java-compression)
69 #:use-module (gnu packages java-xml)
70 #:use-module (gnu packages kerberos)
71 #:use-module (gnu packages libffi)
72 #:use-module (gnu packages linux) ;alsa
73 #:use-module (gnu packages maths)
74 #:use-module (gnu packages maven)
75 #:use-module (gnu packages maven-parent-pom)
76 #:use-module (gnu packages ncurses)
77 #:use-module (gnu packages nss)
78 #:use-module (gnu packages nss)
79 #:use-module (gnu packages onc-rpc)
80 #:use-module (gnu packages perl)
81 #:use-module (gnu packages pkg-config)
82 #:use-module (gnu packages popt)
83 #:use-module (gnu packages python-build)
84 #:use-module (gnu packages security-token)
85 #:use-module (gnu packages texinfo)
86 #:use-module (gnu packages web)
87 #:use-module (gnu packages wget)
88 #:use-module (gnu packages xdisorg)
89 #:use-module (gnu packages xml)
90 #:use-module (gnu packages xorg)
91 #:use-module (gnu packages)
92 #:use-module ((guix build utils) #:select (alist-replace))
93 #:use-module (guix build-system ant)
94 #:use-module (guix build-system cmake)
95 #:use-module (guix build-system gnu)
96 #:use-module (guix build-system maven)
97 #:use-module (guix build-system pyproject)
98 #:use-module (guix deprecation)
99 #:use-module (guix download)
100 #:use-module (guix gexp)
101 #:use-module (guix git-download)
102 #:use-module (guix hg-download)
103 #:use-module ((guix licenses) #:prefix license:)
104 #:use-module (guix packages)
105 #:use-module (guix svn-download)
106 #:use-module (guix utils)
107 #:use-module (ice-9 match)
108 #:use-module ((srfi srfi-1) #:select (first fold alist-delete))
109 #:use-module (srfi srfi-11))
110
111(define* (system->icedtea-arch #:optional (system (or (%current-target-system)
112 (%current-system))))
113 "Return the Icedtea architecture string, such as \"ppc64le\", of SYSTEM."
114 ;; See INSTALL_ARCH_DIR in the configure script of icedtea.
115 (match system
116 ("i686-linux" "i386")
117 ("x86_64-linux" "amd64")
118 ("armhf-linux" "arm")
119 ("powerpc-linux" "ppc")
120 ("powerpc64le-linux" "ppc64le")
121 (system
122 ;; Turn e.g. "aarch64-linux" into "aarch64".
123 (first (string-split system #\-)))))
124
125(define-public icedtea-7
126 (let* ((version "2.6.13")
127 (drop (lambda* (name hash #:optional (patches '()))
128 (origin
129 (method url-fetch)
130 (uri (string-append
131 "http://icedtea.classpath.org/download/drops"
132 "/icedtea7/" version "/" name ".tar.bz2"))
133 (sha256 (base32 hash))
134 (patches patches)))))
135 (package
136 (name "icedtea")
137 (version version)
138 (source (origin
139 (method url-fetch)
140 (uri (string-append
141 "http://icedtea.wildebeest.org/download/source/icedtea-"
142 version ".tar.xz"))
143 (sha256
144 (base32
145 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
146 (modules '((guix build utils)))
147 (snippet
148 '(substitute* "Makefile.in"
149 ;; do not leak information about the build host
150 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
151 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
152 (build-system gnu-build-system)
153 (outputs '("out" ; Java Runtime Environment
154 "jdk" ; Java Development Kit
155 "doc")) ; all documentation
156 (arguments
157 (list
158 ;; There are many test failures. Some are known to fail upstream,
159 ;; others relate to not having an X server running at test time, yet
160 ;; others are a complete mystery to me.
161
162 ;; hotspot: passed: 241; failed: 45; error: 2
163 ;; langtools: passed: 1,934; failed: 26
164 ;; jdk: unknown
165 #:tests? #f
166 ;; The validate-runpath phase fails on internal libraries depending on
167 ;; libraries found under e.g. 'lib/amd64' on x86_64, and the build
168 ;; system blissfully ignores LDFLAGS; disable it.
169 #:validate-runpath? #f
170 #:modules '((guix build utils)
171 (guix build gnu-build-system)
172 (ice-9 match)
173 (ice-9 popen)
174 (srfi srfi-19)
175 (srfi srfi-26))
176 #:configure-flags
177 ;; TODO: package sctp and add to inputs
178 #~(list "--disable-system-sctp"
179 "--enable-system-pcsc"
180 "--enable-system-lcms"
181 "--enable-bootstrap"
182 "--enable-nss"
183 "--without-rhino"
184 (string-append "--with-parallel-jobs="
185 (number->string (parallel-job-count)))
186 "--disable-downloading"
187 "--disable-tests" ;they are run in the check phase instead
188 "--with-openjdk-src-dir=./openjdk.src"
189 (string-append
190 "--with-ecj=" (search-input-file %build-inputs "bin/javac"))
191 (string-append "--with-jdk-home="
192 #$(this-package-native-input "classpath"))
193 (string-append "--with-java="
194 (search-input-file %build-inputs "bin/jamvm"))
195 (string-append "--with-jar="
196 (search-input-file %build-inputs "/bin/gjar")))
197 #:phases
198 #~(modify-phases %standard-phases
199 (replace 'unpack
200 (lambda* (#:key source inputs #:allow-other-keys)
201 (let ((target (string-append "icedtea-"
202 #$(package-version this-package)))
203 (unpack (lambda* (name #:optional dir)
204 (let ((dir (or dir
205 (string-drop-right name 5))))
206 (mkdir dir)
207 (invoke "tar" "xvf"
208 (assoc-ref inputs name)
209 "-C" dir
210 "--strip-components=1")))))
211 (mkdir target)
212 (invoke "tar" "xvf" source
213 "-C" target "--strip-components=1")
214 (chdir target)
215 (unpack "openjdk-src" "openjdk.src")
216 (with-directory-excursion "openjdk.src"
217 (for-each unpack
218 (filter (cut string-suffix? "-drop" <>)
219 (map (match-lambda
220 ((name . _) name))
221 inputs)))))))
222 (add-after 'unpack 'use-classpath
223 (lambda* (#:key inputs #:allow-other-keys)
224 (let ((tools (search-input-file inputs
225 "share/classpath/tools.zip"))
226 (rt.jar (search-input-file inputs "lib/rt.jar")))
227 ;; GNU Classpath does not provide rt.jar, but jamvm provides
228 ;; Classpath's glibj.zip as rt.jar, so we just use that.
229 (substitute* "Makefile.in"
230 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
231 ;; Make sure we can find all classes.
232 (setenv "CLASSPATH"
233 (string-append rt.jar ":" tools))
234 (setenv "JAVACFLAGS"
235 (string-append "-cp " rt.jar ":" tools)))))
236 (add-after 'unpack 'patch-bitrot
237 (lambda _
238 (substitute*
239 '("patches/boot/revert-6973616.patch"
240 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
241 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
242 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
243 ;; As of attr 2.4.48 this header is no longer
244 ;; included. It is provided by the libc instead.
245 (substitute* '("configure"
246 "openjdk.src/jdk/src/solaris/native/sun/\
247nio/fs/LinuxNativeDispatcher.c")
248 (("attr/xattr.h") "sys/xattr.h"))))
249 (add-after 'unpack 'fix-openjdk
250 (lambda _
251 (with-directory-excursion "openjdk.src"
252 (substitute* "jdk/make/common/Defs-linux.gmk"
253 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
254 (string-append all
255 " -fcommon"
256 " -Wno-error=implicit-function-declaration"
257 " -Wno-error=implicit-int"
258 " -Wno-error=incompatible-pointer-types"
259 " -Wno-error=int-conversion")))
260 (substitute*
261 '("jdk/src/solaris/native/java/net/PlainSocketImpl.c"
262 "jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
263 (("#include <sys/sysctl.h>")
264 "#include <linux/sysctl.h>"))
265
266 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
267 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
268 ;; It is only used as a verification step, so ignore it; try
269 ;; removing this substitution for newer versions of glibc.
270 (substitute* "jdk/make/common/shared/Defs-linux.gmk"
271 (("\\$\\(LDD\\) \\$1 &&")
272 ""))
273
274 ;; It looks like the "h = 31 * h + c" line of the jsum()
275 ;; function gets miscompiled. After a few iterations of the
276 ;; loop the result of "31 * h" is always 0x8000000000000000.
277 ;; Disable optimizations of dump.cpp as a workaround.
278 (substitute* "hotspot/make/linux/makefiles/gcc.make"
279 (("OPT_CFLAGS/NOOPT.*" all)
280 (string-append all "\n"
281 "OPT_CFLAGS/dump.o += -O0"))))))
282 (add-after 'unpack 'fix-x11-extension-include-path
283 (lambda* (#:key inputs #:allow-other-keys)
284 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
285 (((string-append "\\$\\(firstword \\$\\(wildcard "
286 "\\$\\(OPENWIN_HOME\\)"
287 "/include/X11/extensions\\).*$"))
288 (string-append #$(this-package-input "libxrender")
289 "/include/X11/extensions"
290 " -I" #$(this-package-input "libxtst")
291 "/include/X11/extensions"
292 " -I" #$(this-package-input "libxinerama")
293 "/include/X11/extensions"))
294 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
295 (add-after 'unpack 'patch-paths
296 (lambda* (#:key native-inputs inputs #:allow-other-keys)
297 ;; buildtree.make generates shell scripts, so we need to replace
298 ;; the generated shebang.
299 (with-directory-excursion "openjdk.src"
300 (substitute* "hotspot/make/linux/makefiles/buildtree.make"
301 (("/bin/sh") (which "bash")))
302
303 (let ((corebin (dirname (search-input-file
304 (or native-inputs inputs)
305 "bin/cp")))) ;coreutils
306 (substitute* '("jdk/make/common/shared/Defs-linux.gmk"
307 "corba/make/common/shared/Defs-linux.gmk")
308 (("UNIXCOMMAND_PATH = /bin")
309 (string-append "UNIXCOMMAND_PATH = " corebin))
310 (("USRBIN_PATH = /usr/bin")
311 (string-append "USRBIN_PATH = " corebin))
312 (("DEVTOOLS_PATH *= */usr/bin")
313 (string-append "DEVTOOLS_PATH = " corebin))
314 (("COMPILER_PATH *= */usr/bin")
315 (string-append "COMPILER_PATH = "
316 (dirname (search-input-file
317 (or native-inputs inputs)
318 "bin/gcc"))))
319 (("DEF_OBJCOPY *=.*objcopy")
320 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
321
322 ;; Fix path to alsa header.
323 (substitute* "jdk/make/common/shared/Sanity.gmk"
324 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
325 (string-append "ALSA_INCLUDE="
326 (search-input-file
327 inputs "include/alsa/version.h"))))
328
329 ;; Fix hard-coded utility paths.
330 (substitute* '("jdk/make/common/shared/Defs-utils.gmk"
331 "corba/make/common/shared/Defs-utils.gmk")
332 (("ECHO *=.*echo")
333 (string-append "ECHO = " (which "echo")))
334 (("^GREP *=.*grep")
335 (string-append "GREP = " (which "grep")))
336 (("EGREP *=.*egrep")
337 (string-append "EGREP = " (which "egrep")))
338 (("CPIO *=.*cpio")
339 (string-append "CPIO = " (which "cpio")))
340 (("READELF *=.*readelf")
341 (string-append "READELF = " (which "readelf")))
342 (("^ *AR *=.*ar")
343 (string-append "AR = " (which "ar")))
344 (("^ *TAR *=.*tar")
345 (string-append "TAR = " (which "tar")))
346 (("AS *=.*as")
347 (string-append "AS = " (which "as")))
348 (("LD *=.*ld")
349 (string-append "LD = " (which "ld")))
350 (("STRIP *=.*strip")
351 (string-append "STRIP = " (which "strip")))
352 (("NM *=.*nm")
353 (string-append "NM = " (which "nm")))
354 (("^SH *=.*sh")
355 (string-append "SH = " (which "bash")))
356 (("^FIND *=.*find")
357 (string-append "FIND = " (which "find")))
358 (("LDD *=.*ldd")
359 (string-append "LDD = " (which "ldd")))
360 (("NAWK *=.*(n|g)awk")
361 (string-append "NAWK = " (which "gawk")))
362 (("XARGS *=.*xargs")
363 (string-append "XARGS = " (which "xargs")))
364 (("UNZIP *=.*unzip")
365 (string-append "UNZIP = " (which "unzip")))
366 (("ZIPEXE *=.*zip")
367 (string-append "ZIPEXE = " (which "zip")))
368 (("SED *=.*sed")
369 (string-append "SED = " (which "sed"))))
370
371 ;; Some of these timestamps cause problems as they are more than
372 ;; 10 years ago, failing the build process.
373 (substitute* "jdk/src/share/classes/java/util/\
374CurrencyData.properties"
375 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
376 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
377 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
378 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))))
379 (add-before 'configure 'set-additional-paths
380 (lambda* (#:key inputs #:allow-other-keys)
381 (setenv "CC" "gcc")
382 (setenv "CPATH"
383 (string-append #$(this-package-input "libxcomposite")
384 "/include/X11/extensions" ":"
385 #$(this-package-input "libxrender")
386 "/include/X11/extensions" ":"
387 #$(this-package-input "libxtst")
388 "/include/X11/extensions" ":"
389 #$(this-package-input "libxinerama")
390 "/include/X11/extensions" ":"
391 (or (getenv "CPATH") "")))
392 (setenv "ALT_OBJCOPY" (which "objcopy"))
393 (setenv "ALT_CUPS_HEADERS_PATH"
394 (string-append #$(this-package-input "cups")
395 "/include"))
396 (setenv "ALT_FREETYPE_HEADERS_PATH"
397 (string-append #$(this-package-input "freetype")
398 "/include"))
399 (setenv "ALT_FREETYPE_LIB_PATH"
400 (string-append #$(this-package-input "freetype")
401 "/lib"))))
402 (add-before 'build 'disable-os-version-check
403 ;; allow build on linux major version change
404 (lambda _
405 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
406 (add-before 'check 'fix-test-framework
407 (lambda _
408 ;; Fix PATH in test environment
409 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
410 (("PATH=/bin:/usr/bin")
411 (string-append "PATH=" (getenv "PATH"))))
412 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
413 (("/usr/bin/env") (which "env")))
414 (substitute* "openjdk.src/hotspot/test/test_env.sh"
415 (("/bin/rm") (which "rm"))
416 (("/bin/cp") (which "cp"))
417 (("/bin/mv") (which "mv")))))
418 (add-before 'check 'fix-hotspot-tests
419 (lambda _
420 (with-directory-excursion "openjdk.src/hotspot/test/"
421 (substitute* "jprt.config"
422 (("PATH=\"\\$\\{path4sdk\\}\"")
423 (string-append "PATH=" (getenv "PATH")))
424 (("make=/usr/bin/make")
425 (string-append "make=" (which "make"))))
426 (substitute* '("runtime/6626217/Test6626217.sh"
427 "runtime/7110720/Test7110720.sh")
428 (("/bin/rm") (which "rm"))
429 (("/bin/cp") (which "cp"))
430 (("/bin/mv") (which "mv"))))))
431 (add-before 'check 'fix-jdk-tests
432 (lambda _
433 (with-directory-excursion "openjdk.src/jdk/test/"
434 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
435 (("/bin/pwd") (which "pwd")))
436 (substitute* "com/sun/jdi/ShellScaffold.sh"
437 (("/bin/kill") (which "kill")))
438 (substitute* "start-Xvfb.sh"
439 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
440 (("/usr/bin/nohup") (which "nohup")))
441 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
442 (("/bin/rm") (which "rm")))
443 (substitute* "tools/launcher/MultipleJRE.sh"
444 (("echo \"#!/bin/sh\"")
445 (string-append "echo \"#!" (which "rm") "\""))
446 (("/usr/bin/zip") (which "zip")))
447 (substitute* "com/sun/jdi/OnThrowTest.java"
448 (("#!/bin/sh") (string-append "#!" (which "sh"))))
449 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
450 (("/usr/bin/uptime") (which "uptime")))
451 (substitute* "java/lang/ProcessBuilder/Basic.java"
452 (("/usr/bin/env") (which "env"))
453 (("/bin/false") (which "false"))
454 (("/bin/true") (which "true"))
455 (("/bin/cp") (which "cp"))
456 (("/bin/sh") (which "sh")))
457 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
458 (("/bin/sh") (which "sh")))
459 (substitute* "java/lang/ProcessBuilder/Zombies.java"
460 (("/usr/bin/perl") (which "perl"))
461 (("/bin/ps") (which "ps"))
462 (("/bin/true") (which "true")))
463 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
464 (("/usr/bin/tee") (which "tee")))
465 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
466 (("/bin/true") (which "true")))
467 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
468 (("/bin/cat") (which "cat")))
469 (substitute* "java/lang/Runtime/exec/ExitValue.java"
470 (("/bin/sh") (which "sh"))
471 (("/bin/true") (which "true"))
472 (("/bin/kill") (which "kill")))
473 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
474 (("/usr/bin/echo") (which "echo")))
475 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
476 (("/usr/bin/cat") (which "cat")))
477 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
478 (("/bin/cat") (which "cat"))
479 (("/bin/sleep") (which "sleep"))
480 (("/bin/sh") (which "sh")))
481 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
482 (("/bin/cat") (which "cat")))
483 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
484 (("/bin/chmod") (which "chmod")))
485 (substitute* "java/util/zip/ZipFile/Assortment.java"
486 (("/bin/sh") (which "sh"))))))
487 (replace 'check
488 (lambda* (#:key tests? #:allow-other-keys)
489 ;; The "make check-*" targets always return zero, so we need to
490 ;; check for errors in the associated log files to determine
491 ;; whether any tests have failed.
492 (when tests?
493 (use-modules (ice-9 rdelim))
494 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
495 (checker (lambda (port)
496 (let loop ()
497 (let ((line (read-line port)))
498 (cond
499 ((eof-object? line) #t)
500 ((regexp-exec error-pattern line)
501 (error "test failed"))
502 (else (loop)))))))
503 (run-test (lambda (test)
504 (invoke "make" test)
505 (call-with-input-file
506 (string-append "test/" test ".log")
507 checker))))
508 (run-test "check-hotspot")
509 (run-test "check-langtools")
510 (run-test "check-jdk")))))
511 (replace 'install
512 (lambda _
513 (copy-recursively "openjdk.build/docs"
514 (string-append #$output:doc
515 "/share/doc/icedtea"))
516 (copy-recursively "openjdk.build/j2re-image" #$output)
517 (copy-recursively "openjdk.build/j2sdk-image" #$output:jdk)))
518 (add-after 'install 'install-libjvm
519 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
520 ;; But that shared object is located in the server/ folder, so it
521 ;; cannot be found. This phase creates a symbolic link in the
522 ;; lib/amd64 folder so that the other libraries can find it.
523 ;;
524 ;; See:
525 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
526 ;;
527 ;; FIXME: Find the bug in the build system, so that this symlink is
528 ;; not needed.
529 (lambda _
530 (let ((lib-path (string-append #$output "/lib/"
531 #$(system->icedtea-arch))))
532 (symlink (string-append lib-path "/server/libjvm.so")
533 (string-append lib-path "/libjvm.so")))))
534 ;; By default IcedTea only generates an empty keystore. In order to
535 ;; be able to use certificates in Java programs we need to generate a
536 ;; keystore from a set of certificates. For convenience we use the
537 ;; certificates from the nss-certs package.
538 (add-after 'install 'install-keystore
539 (lambda* (#:key inputs #:allow-other-keys)
540 (use-modules (ice-9 rdelim))
541 (let* ((keystore "cacerts")
542 (certs-dir (search-input-directory inputs
543 "etc/ssl/certs"))
544 (keytool (string-append #$output:jdk "/bin/keytool")))
545 (define (extract-cert file target)
546 (call-with-input-file file
547 (lambda (in)
548 (call-with-output-file target
549 (lambda (out)
550 (let loop ((line (read-line in 'concat))
551 (copying? #f))
552 (cond
553 ((eof-object? line) #t)
554 ((string-prefix? "-----BEGIN" line)
555 (display line out)
556 (loop (read-line in 'concat) #t))
557 ((string-prefix? "-----END" line)
558 (display line out)
559 #t)
560 (else
561 (when copying? (display line out))
562 (loop (read-line in 'concat) copying?)))))))))
563 (define (import-cert cert)
564 (format #t "Importing certificate ~a\n" (basename cert))
565 (let ((temp "tmpcert"))
566 (extract-cert cert temp)
567 (let ((port (open-pipe* OPEN_WRITE keytool
568 "-import"
569 "-alias" (basename cert)
570 "-keystore" keystore
571 "-storepass" "changeit"
572 "-file" temp)))
573 (display "yes\n" port)
574 (when (not (zero? (status:exit-val (close-pipe port))))
575 (format #t "failed to import ~a\n" cert)))
576 (delete-file temp)))
577
578 ;; This is necessary because the certificate directory contains
579 ;; files with non-ASCII characters in their names.
580 (setlocale LC_ALL "C.UTF-8")
581 (setenv "LC_ALL" "C.UTF-8")
582
583 (for-each import-cert (find-files certs-dir "\\.pem$"))
584 (mkdir-p (string-append #$output "/lib/security"))
585 (mkdir-p (string-append #$output:jdk "/jre/lib/security"))
586
587 ;; The cacerts files we are going to overwrite are chmod'ed as
588 ;; read-only (444) in icedtea-8 (which derives from this
589 ;; package). We have to change this so we can overwrite them.
590 (chmod (string-append #$output "/lib/security/" keystore)
591 #o644)
592 (chmod (string-append #$output:jdk
593 "/jre/lib/security/" keystore) #o644)
594
595 (install-file keystore
596 (string-append #$output "/lib/security"))
597 (install-file keystore
598 (string-append #$output:jdk
599 "/jre/lib/security"))))))))
600 (native-inputs
601 ;; XXX: Compiling with gcc-14 will encounter the following error:
602 ;; BUILD FAILED:
603 ;; /tmp/guix-build-icedtea-2.6.13.drv-0/icedtea-2.6.13/openjdk/langtools/
604 ;; make/build.xml:452: The following error occurred while executing this
605 ;; line:
606 ;; java.lang.AbstractMethodError: java.lang.Throwable.toString()Ljava/lang/String;
607 `(("gcc" ,gcc-13)
608 ("openjdk-src"
609 ,(drop "openjdk"
610 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
611 ("corba-drop"
612 ,(drop "corba"
613 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
614 ("jaxp-drop"
615 ,(drop "jaxp"
616 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
617 ("jaxws-drop"
618 ,(drop "jaxws"
619 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
620 ("jdk-drop"
621 ,(drop "jdk"
622 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
623 (search-patches "jdk-currency-time-bomb.patch")))
624 ("langtools-drop"
625 ,(drop "langtools"
626 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
627 ("hotspot-drop"
628 ,(origin
629 (method url-fetch)
630 (uri (string-append
631 "http://icedtea.classpath.org/downloads/drops"
632 "/icedtea7/" version "/hotspot.tar.bz2"))
633 (sha256
634 (base32
635 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
636 (patches (search-patches
637 "icedtea-7-hotspot-aarch64-use-c++98.patch"
638 "icedtea-7-hotspot-pointer-comparison.patch"))))
639 ("ant" ,ant-bootstrap)
640 ("attr" ,attr)
641 ("classpath" ,classpath-devel)
642 ("coreutils" ,coreutils)
643 ("diffutils" ,diffutils) ;for tests
644 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
645 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
646 ("gawk" ,gawk)
647 ("grep" ,grep)
648 ("jamvm" ,jamvm-with-ecj4)
649 ("libtool" ,libtool)
650 ("pkg-config" ,pkg-config)
651 ("wget" ,wget)
652 ("which" ,which)
653 ("cpio" ,cpio)
654 ("zip" ,zip)
655 ("unzip" ,unzip)
656 ("libxslt" ,libxslt) ;for xsltproc
657 ("nss-certs" ,nss-certs)
658 ("perl" ,perl)
659 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
660 (inputs
661 (list alsa-lib
662 cups
663 fontconfig
664 freetype
665 giflib
666 gtk+-2
667 lcms
668 libjpeg-turbo
669 libpng
670 libx11
671 libxcomposite
672 libxi
673 libxinerama
674 libxrender
675 libxt
676 libxtst
677 mit-krb5
678 nss
679 pcsc-lite
680 zlib))
681 (home-page "https://icedtea.classpath.org")
682 (synopsis "Java development kit")
683 (description
684 "This package provides the Java development kit OpenJDK built with the
685IcedTea build harness.")
686
687 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
688 (supported-systems (delete "mips64el-linux" %supported-systems))
689
690 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
691 ;; same license as both GNU Classpath and OpenJDK.
692 (license license:gpl2+))))
693
694(define-public icedtea-8
695 (let* ((version "3.19.0")
696 (drop (lambda* (name hash #:optional (patches '()))
697 (origin
698 (method url-fetch)
699 (uri (string-append
700 "http://icedtea.classpath.org/download/drops"
701 "/icedtea8/" version "/" name ".tar.xz"))
702 (sha256 (base32 hash))
703 (patches patches)))))
704 (package
705 (inherit icedtea-7)
706 (version "3.19.0")
707 (source (origin
708 (method url-fetch)
709 (uri (string-append
710 "http://icedtea.wildebeest.org/download/source/icedtea-"
711 version ".tar.xz"))
712 (sha256
713 (base32
714 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
715 (modules '((guix build utils)))
716 (snippet
717 '(substitute* '("configure"
718 "acinclude.m4")
719 ;; Do not embed build time
720 (("(DIST_ID=\"Custom build).*$" _ prefix)
721 (string-append prefix "\"\n"))
722 ;; Do not leak information about the build host
723 (("DIST_NAME=\"\\$build_os\"")
724 "DIST_NAME=\"guix\"")))))
725 (arguments
726 (substitute-keyword-arguments (package-arguments icedtea-7)
727 ((#:imported-modules modules %default-gnu-imported-modules)
728 (cons '(guix build ant-build-system) modules))
729 ((#:disallowed-references refs '())
730 (cons (gexp-input
731 (this-package-native-input "jdk")
732 "jdk")
733 refs))
734 ((#:modules modules %default-gnu-modules)
735 (append '(((guix build ant-build-system) #:prefix ant:)
736 (ice-9 match)
737 (ice-9 popen)
738 (srfi srfi-1)
739 (srfi srfi-19)
740 (srfi srfi-26))
741 modules))
742 ((#:configure-flags _ '())
743 #~(let ((jdk (assoc-ref %build-inputs "jdk")))
744 (list (string-append "CFLAGS=-fcommon"
745 " -Wno-error=implicit-function-declaration"
746 " -Wno-error=implicit-int"
747 " -Wno-error=incompatible-pointer-types"
748 " -Wno-error=int-conversion")
749 "CXXFLAGS=-fcommon"
750 "--enable-bootstrap"
751 "--enable-nss"
752 (string-append "--with-parallel-jobs="
753 (number->string (parallel-job-count)))
754 ;; Java Flight Recorder isn't supported on some architectures.
755 #$@(if (target-ppc32?)
756 #~("--enable-jfr=no")
757 #~())
758 "--disable-docs" ; This phase can take hours on slow machines.
759 "--disable-downloading"
760 "--disable-system-pcsc"
761 "--disable-system-sctp"
762 "--disable-tests" ;they are run in the check phase instead
763 "--with-openjdk-src-dir=./openjdk.src"
764 (string-append "--with-jdk-home=" jdk))))
765 ((#:phases phases '%standard-phases)
766 #~(modify-phases #$phases
767 (delete 'fix-x11-extension-include-path)
768 (delete 'patch-paths)
769 (delete 'set-additional-paths)
770 (delete 'patch-patches)
771 (delete 'patch-bitrot)
772 (delete 'use-classpath)
773 (replace 'build
774 (lambda* (#:key (make-flags '()) #:allow-other-keys)
775 ;; Prevent passing -j (parallel-job-count) to make, which
776 ;; is rejected by the build Makefiles; this does *not*
777 ;; disable parallel builds.
778 (apply invoke "make" make-flags)))
779 ;; Prevent the keytool from recording the current time when
780 ;; adding certificates at build time.
781 (add-after 'unpack 'patch-keystore
782 (lambda _
783 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
784 (("date = new Date\\(\\);")
785 "\
786date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
787new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
788new Date();"))))
789 (add-after 'unpack 'patch-jni-libs
790 ;; Hardcode dynamically loaded libraries.
791 (lambda _
792 (define (icedtea-or-openjdk? path)
793 (or (string-contains path "openjdk")
794 (string-contains path "icedtea")))
795
796 (let* ((library-path (remove icedtea-or-openjdk?
797 (search-path-as-string->list
798 (getenv "LIBRARY_PATH"))))
799 (find-library (lambda (name)
800 (or (search-path
801 library-path
802 (string-append "lib" name ".so"))
803 (string-append "lib" name ".so")))))
804 (for-each
805 (lambda (file)
806 (catch 'decoding-error
807 (lambda ()
808 (substitute* file
809 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
810 _ name version)
811 (string-append "\"" (find-library name) "\""))
812 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
813 (string-append "\"" (find-library name) "\""))))
814 (lambda _
815 ;; Those are safe to skip.
816 (format (current-error-port)
817 "warning: failed to substitute: ~a~%"
818 file))))
819 (find-files "openjdk.src/jdk/src/solaris/native"
820 "\\.c|\\.h")))))
821 (replace 'fix-openjdk
822 (lambda _
823 (substitute*
824 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
825 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
826 (("#include <sys/sysctl.h>")
827 "#include <linux/sysctl.h>"))))
828 (replace 'install
829 (lambda _
830 (copy-recursively "openjdk.build/docs"
831 (string-append #$output:doc
832 "/share/doc/icedtea"))
833 (copy-recursively "openjdk.build/images/j2re-image" #$output)
834 (copy-recursively "openjdk.build/images/j2sdk-image" #$output:jdk)
835 ;; Install the nss.cfg file to JRE to enable SSL/TLS
836 ;; support via NSS.
837 (copy-file (string-append #$output:jdk
838 "/jre/lib/security/nss.cfg")
839 (string-append #$output "/lib/security/nss.cfg"))))
840 (add-after 'install 'strip-jar-timestamps
841 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))
842 (native-inputs
843 `(("jdk" ,icedtea-7 "jdk")
844 ("openjdk-src"
845 ,(drop "openjdk"
846 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
847 ("aarch32-drop"
848 ,(drop "aarch32"
849 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
850 ("corba-drop"
851 ,(drop "corba"
852 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
853 ("jaxp-drop"
854 ,(drop "jaxp"
855 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
856 ("jaxws-drop"
857 ,(drop "jaxws"
858 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
859 ("jdk-drop"
860 ,(drop "jdk"
861 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
862 (search-patches "jdk-currency-time-bomb2.patch")))
863 ("langtools-drop"
864 ,(drop "langtools"
865 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
866 ("hotspot-drop"
867 ,(drop "hotspot"
868 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
869 ("nashorn-drop"
870 ,(drop "nashorn"
871 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
872 ("shenandoah-drop"
873 ,(drop "shenandoah"
874 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
875 ,@(fold alist-delete (package-native-inputs icedtea-7)
876 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
877 "jdk-drop" "langtools-drop" "hotspot-drop"
878 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
879
880(define-public icedtea icedtea-8)
881
882(define-public openjdk9
883 (package
884 (name "openjdk")
885 (version "9.181")
886 (source (origin
887 (method hg-fetch)
888 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
889 (changeset "jdk-9+181")))
890 (file-name (hg-file-name name version))
891 (modules '((guix build utils)))
892 (snippet '(for-each delete-file
893 (find-files "." ".*.(bin|exe|jar)$")))
894 (sha256
895 (base32
896 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
897 (patches
898 (search-patches "openjdk-9-pointer-comparison.patch"
899 "openjdk-9-classlist-reproducibility.patch"
900 "openjdk-currency-time-bomb.patch"
901 "openjdk-9-jar-reproducibility.patch"
902 "openjdk-9-module-reproducibility.patch"
903 "openjdk-9-module2-reproducibility.patch"
904 "openjdk-9-module3-reproducibility.patch"
905 "openjdk-9-idlj-reproducibility.patch"
906 "openjdk-9-setsignalhandler.patch"))))
907 (build-system gnu-build-system)
908 (outputs '("out" "jdk" "doc"))
909 (arguments
910 (list
911 #:imported-modules
912 (cons '(guix build ant-build-system)
913 %default-gnu-imported-modules)
914 #:modules
915 (append '((ice-9 match)
916 (ice-9 popen)
917 (srfi srfi-1)
918 (srfi srfi-26))
919 %default-gnu-modules)
920 #:tests? #f ; require jtreg
921 #:make-flags #~(list "all")
922 #:disallowed-references
923 (list (this-package-native-input "icedtea")
924 (gexp-input (this-package-native-input "icedtea") "jdk"))
925
926 #:phases
927 #~(modify-phases %standard-phases
928 #$@(if (target-aarch64?)
929 #~((add-after 'unpack 'patch-for-aarch64
930 (lambda _
931 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
932 ;; This line is duplicated, so remove both occurrences,
933 ;; then add back one occurrence by substituting a
934 ;; comment that occurs once.
935 (("using MacroAssembler::call_VM_leaf_base;") "")
936 (("Interpreter specific version of call_VM_base")
937 "Interpreter specific version of call_VM_base
938 using MacroAssembler::call_VM_leaf_base;")))))
939 #~())
940 (add-after 'patch-source-shebangs 'fix-java-shebangs
941 (lambda _
942 ;; This file was "fixed" by patch-source-shebangs, but it requires
943 ;; this exact first line.
944 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
945 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
946 (replace 'configure
947 (lambda* (#:key inputs #:allow-other-keys)
948 ;; TODO: unbundle libpng and lcms
949 (invoke "bash" "./configure"
950 ;; Add flags for compilation with gcc >= 10
951 (string-append "--with-extra-cflags=-fcommon"
952 " -fno-delete-null-pointer-checks"
953 " -fno-lifetime-dse"
954 ;; flags for compilation with gcc >= 14.
955 " -Wno-error=int-conversion")
956 (string-append "--with-freetype="
957 (assoc-ref inputs "freetype"))
958 "--disable-freetype-bundling"
959 "--disable-warnings-as-errors"
960 "--disable-hotspot-gtest"
961 "--with-giflib=system"
962 "--with-libjpeg=system"
963 (string-append "--prefix=" #$output))))
964 (add-before 'build 'write-source-revision-file
965 (lambda _
966 (with-output-to-file ".src-rev"
967 (lambda _
968 (display #$(package-version this-package))))))
969 (replace 'build
970 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
971 (apply invoke "make"
972 (format #f "JOBS=~a" (if parallel-build?
973 (parallel-job-count)
974 1))
975 make-flags)))
976 (add-after 'unpack 'patch-jni-libs
977 ;; Hardcode dynamically loaded libraries.
978 (lambda _
979 (define (icedtea-or-openjdk? path)
980 (or (string-contains path "openjdk")
981 (string-contains path "icedtea")))
982
983 (let* ((library-path (remove icedtea-or-openjdk?
984 (search-path-as-string->list
985 (getenv "LIBRARY_PATH"))))
986 (find-library (lambda (name)
987 (or (search-path
988 library-path
989 (string-append "lib" name ".so"))
990 (string-append "lib" name ".so")))))
991 (for-each
992 (lambda (file)
993 (catch 'decoding-error
994 (lambda ()
995 (substitute* file
996 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
997 _ name version)
998 (string-append "\"" (find-library name) "\""))
999 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1000 (string-append "\"" (find-library name) "\""))))
1001 (lambda _
1002 ;; Those are safe to skip.
1003 (format (current-error-port)
1004 "warning: failed to substitute: ~a~%"
1005 file))))
1006 (find-files "."
1007 "\\.c$|\\.h$")))))
1008 ;; By default OpenJDK only generates an empty keystore. In order to
1009 ;; be able to use certificates in Java programs we need to generate a
1010 ;; keystore from a set of certificates. For convenience we use the
1011 ;; certificates from the nss-certs package.
1012 (add-after 'install 'install-keystore
1013 (lambda* (#:key inputs #:allow-other-keys)
1014 (use-modules (ice-9 rdelim))
1015 (let* ((keystore "cacerts")
1016 (certs-dir (search-input-directory inputs
1017 "etc/ssl/certs"))
1018 (keytool (string-append #$output:jdk "/bin/keytool")))
1019 (define (extract-cert file target)
1020 (call-with-input-file file
1021 (lambda (in)
1022 (call-with-output-file target
1023 (lambda (out)
1024 (let loop ((line (read-line in 'concat))
1025 (copying? #f))
1026 (cond
1027 ((eof-object? line) #t)
1028 ((string-prefix? "-----BEGIN" line)
1029 (display line out)
1030 (loop (read-line in 'concat) #t))
1031 ((string-prefix? "-----END" line)
1032 (display line out)
1033 #t)
1034 (else
1035 (when copying? (display line out))
1036 (loop (read-line in 'concat) copying?)))))))))
1037 (define (import-cert cert)
1038 (format #t "Importing certificate ~a\n" (basename cert))
1039 (let ((temp "tmpcert"))
1040 (extract-cert cert temp)
1041 (let ((port (open-pipe* OPEN_WRITE keytool
1042 "-import"
1043 "-alias" (basename cert)
1044 "-keystore" keystore
1045 "-storepass" "changeit"
1046 "-file" temp)))
1047 (display "yes\n" port)
1048 (when (not (zero? (status:exit-val (close-pipe port))))
1049 (format #t "failed to import ~a\n" cert)))
1050 (delete-file temp)))
1051
1052 ;; This is necessary because the certificate directory contains
1053 ;; files with non-ASCII characters in their names.
1054 (setlocale LC_ALL "C.UTF-8")
1055 (setenv "LC_ALL" "C.UTF-8")
1056
1057 (copy-file (string-append #$output
1058 "/lib/security/cacerts")
1059 keystore)
1060 (chmod keystore #o644)
1061 (for-each import-cert (find-files certs-dir "\\.pem$"))
1062 (mkdir-p (string-append #$output "/lib/security"))
1063 (mkdir-p (string-append #$output:jdk "/lib/security"))
1064
1065 ;; The cacerts files we are going to overwrite are chmod'ed as
1066 ;; read-only (444) in icedtea-8 (which derives from this
1067 ;; package). We have to change this so we can overwrite them.
1068 (chmod (string-append #$output
1069 "/lib/security/" keystore) #o644)
1070 (chmod (string-append #$output:jdk
1071 "/lib/security/" keystore) #o644)
1072
1073 (install-file keystore
1074 (string-append #$output
1075 "/lib/security"))
1076 (install-file keystore
1077 (string-append #$output:jdk
1078 "/lib/security")))))
1079 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1080 ;; But that shared object is located in the server/ folder, so it
1081 ;; cannot be found. This phase creates a symbolic link in the
1082 ;; lib/ folder so that the other libraries can find it.
1083 ;;
1084 ;; See:
1085 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1086 ;;
1087 ;; FIXME: Find the bug in the build system, so that this symlink is
1088 ;; not needed.
1089 (add-after 'install 'install-libjvm
1090 (lambda* (#:key inputs #:allow-other-keys)
1091 (let* ((lib-out (string-append #$output "/lib"))
1092 (lib-jdk (string-append #$output:jdk "/lib")))
1093 (symlink (string-append lib-jdk "/server/libjvm.so")
1094 (string-append lib-jdk "/libjvm.so"))
1095 (symlink (string-append lib-out "/server/libjvm.so")
1096 (string-append lib-out "/libjvm.so")))))
1097 (replace 'install
1098 (lambda* (#:key outputs #:allow-other-keys)
1099 (let ((images (car (find-files "build" ".*-server-release"
1100 #:directories? #t))))
1101 (copy-recursively (string-append images "/images/jdk")
1102 #$output:jdk)
1103 (copy-recursively (string-append images "/images/jre") #$output)
1104 (copy-recursively (string-append images "/images/docs")
1105 #$output:doc))))
1106 (add-after 'install 'remove-extraneous-files
1107 (lambda* (#:key outputs #:allow-other-keys)
1108 ;; Remove the *.diz and src.zip files for space considerations.
1109 ;; The former are compressed debuginfo files not typically
1110 ;; shipped with Java distributions, while the later corresponds
1111 ;; to Java core API source files.
1112 (for-each delete-file
1113 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1114 (map (match-lambda
1115 ((name . dir)
1116 dir))
1117 outputs)))))
1118 (add-after 'remove-extraneous-files 'strip-zip-timestamps
1119 (lambda* (#:key outputs #:allow-other-keys)
1120 (for-each
1121 (lambda (zip)
1122 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1123 (with-directory-excursion dir
1124 ;; This is an exact copy of the implementation of invoke,
1125 ;; but this accepts exit code 1 as OK.
1126 (let ((code (system* "unzip" "--" zip)))
1127 ;; jmod files are zip files with an extra header in
1128 ;; front. unzip will warn about that -- but otherwise
1129 ;; work.
1130 (when (> (status:exit-val code) 1) ; 1 is just a warning
1131 (raise
1132 (condition
1133 (&invoke-error
1134 (program "unzip")
1135 (arguments (list "--" zip))
1136 (exit-status (status:exit-val code))
1137 (term-signal (status:term-sig code))
1138 (stop-signal (status:stop-sig code))))))))
1139 (delete-file zip)
1140 (for-each (lambda (file)
1141 (let ((s (lstat file)))
1142 (format #t "reset ~a~%" file)
1143 (utime file 1 1 0 0
1144 AT_SYMLINK_NOFOLLOW)))
1145 (find-files dir #:directories? #t))
1146 (with-directory-excursion dir
1147 (let ((files (cons "./META-INF/MANIFEST.MF"
1148 (append
1149 (find-files "./META-INF" ".*")
1150 ;; for jmod:
1151 (list "./classes/module-info.class")
1152 (find-files "." ".*")))))
1153 (apply invoke "zip" "--symlinks" "-0" "-X" zip files)
1154 (when (string-suffix? ".jmod" zip)
1155 (let ((new-zip (string-append zip "n"))
1156 (contents (call-with-input-file zip
1157 (@ (ice-9 binary-ports)
1158 get-bytevector-all))))
1159 (call-with-output-file new-zip
1160 (lambda (output-port)
1161 ((@ (ice-9 binary-ports) put-bytevector)
1162 output-port
1163 #vu8(#x4a #x4d #x01 #x00)) ; JM
1164 ((@ (ice-9 binary-ports) put-bytevector)
1165 output-port
1166 contents)))
1167 (rename-file new-zip zip)))))))
1168 (append (find-files (string-append #$output:doc "/api")
1169 "\\.zip$")
1170 (find-files #$output:jdk "\\.jmod$")
1171 (list (string-append #$output:jdk
1172 "/lib/jrt-fs.jar"))
1173 (find-files (string-append #$output:jdk "/demo")
1174 "\\.jar$"))))))))
1175 (inputs
1176 (list alsa-lib
1177 cups
1178 fontconfig
1179 freetype
1180 giflib
1181 gtk+
1182 lcms
1183 elfutils
1184 libjpeg-turbo
1185 libice
1186 libpng
1187 libx11
1188 libxcomposite
1189 libxi
1190 libxinerama
1191 libxrender
1192 libxt
1193 libxtst))
1194 (native-inputs
1195 (list icedtea-8
1196 `(,icedtea-8 "jdk")
1197 ;; XXX: The build system fails with newer versions of GNU Make.
1198 gnu-make-4.2
1199 nss-certs
1200 unzip
1201 which
1202 zip))
1203 (home-page "https://openjdk.org/projects/jdk9/")
1204 (synopsis "Java development kit")
1205 (description
1206 "This package provides the Java development kit OpenJDK.")
1207 (license license:gpl2+)))
1208
1209(define-public openjdk10
1210 (package
1211 (inherit openjdk9)
1212 (name "openjdk")
1213 (version "10.46")
1214 (source (origin
1215 (method hg-fetch)
1216 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1217 (changeset "jdk-10+46")))
1218 (file-name (hg-file-name name version))
1219 (modules '((guix build utils)))
1220 (snippet `(begin
1221 (for-each delete-file
1222 (find-files "." ".*.(bin|exe|jar)$"))))
1223 (sha256
1224 (base32
1225 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1226 (patches (search-patches
1227 "openjdk-10-char-reproducibility.patch"
1228 "openjdk-10-classlist-reproducibility.patch"
1229 "openjdk-10-corba-reproducibility.patch"
1230 "openjdk-10-idlj-reproducibility.patch"
1231 "openjdk-10-module-reproducibility.patch"
1232 "openjdk-10-module3-reproducibility.patch"
1233 "openjdk-10-module4-reproducibility.patch"
1234 "openjdk-10-jar-reproducibility.patch"
1235 "openjdk-10-jtask-reproducibility.patch"
1236 "openjdk-10-pointer-comparison.patch"
1237 "openjdk-10-setsignalhandler.patch"
1238 "openjdk-currency-time-bomb2.patch"))))
1239 (arguments
1240 (substitute-keyword-arguments (package-arguments openjdk9)
1241 ((#:phases phases '%standard-phases)
1242 #~(modify-phases #$phases
1243 #$@(if (target-aarch64?)
1244 #~((replace 'patch-for-aarch64
1245 (lambda _
1246 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1247 ;; This line is duplicated, so remove both occurrences,
1248 ;; then add back one occurrence by substituting a
1249 ;; comment that occurs once.
1250 (("using MacroAssembler::call_VM_leaf_base;") "")
1251 (("Interpreter specific version of call_VM_base")
1252 (string-append "Interpreter specific version of call_VM_base\n"
1253 " using MacroAssembler::call_VM_leaf_base;"))))))
1254 #~())
1255 (replace 'fix-java-shebangs
1256 (lambda _
1257 ;; This file was "fixed" by patch-source-shebangs, but it requires
1258 ;; this exact first line.
1259 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1260 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
1261 (add-after 'unpack 'remove-timestamping
1262 (lambda _
1263 (substitute* "./src/hotspot/share/runtime/vm_version.cpp"
1264 (("__DATE__") "")
1265 (("__TIME__") ""))))
1266 (replace 'configure
1267 (lambda* (#:key inputs #:allow-other-keys)
1268 (invoke "bash" "./configure"
1269 ;; Add flags for compilation with gcc >= 10
1270 (string-append "--with-extra-cflags=-fcommon"
1271 " -fno-delete-null-pointer-checks"
1272 " -fno-lifetime-dse"
1273 ;; flags for compilation with gcc >= 14.
1274 " -Wno-error=int-conversion")
1275 (string-append "--with-freetype="
1276 (assoc-ref inputs "freetype"))
1277 "--disable-freetype-bundling"
1278 "--disable-warnings-as-errors"
1279 "--disable-hotspot-gtest"
1280 "--with-giflib=system"
1281 "--with-libjpeg=system"
1282 "--with-native-debug-symbols=zipped"
1283 (string-append "--prefix=" #$output))))
1284 (add-after 'unpack 'disable-warnings-as-errors
1285 (lambda _
1286 ;; It looks like the "--disable-warnings-as-errors" option of
1287 ;; the 'configure' phase is not working.
1288 (substitute* "make/autoconf/generated-configure.sh"
1289 (("-Werror") ""))))
1290 #$@(if (target-x86-32?)
1291 ;; On i686 the C2 compiler sometimes crashes when importing
1292 ;; certificates.
1293 #~((add-before 'install-keystore 'disable-C2-compiler
1294 (lambda _ (setenv "_JAVA_OPTIONS" "-XX:TieredStopAtLevel=1"))))
1295 #~())))
1296 ((#:disallowed-references refs '())
1297 (cons* (this-package-native-input "openjdk")
1298 (gexp-input (this-package-native-input "openjdk") "jdk")
1299 refs))))
1300 (native-inputs
1301 (list gnu-make-4.2
1302 openjdk9
1303 `(,openjdk9 "jdk")
1304 nss-certs
1305 unzip
1306 which
1307 zip))))
1308
1309(define-public openjdk11
1310 (package
1311 (name "openjdk")
1312 (version "11.0.22")
1313 (source (origin
1314 (method url-fetch)
1315 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1316 version "-ga.tar.xz"))
1317 (file-name (string-append name "-" version ".tar.xz"))
1318 (sha256
1319 (base32
1320 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1321 (modules '((guix build utils)))
1322 (snippet
1323 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1324 (patches
1325 (search-patches "openjdk-10-module3-reproducibility.patch"
1326 "openjdk-10-module4-reproducibility.patch"
1327 "openjdk-10-char-reproducibility.patch"
1328 "openjdk-11-classlist-reproducibility.patch"
1329 "openjdk-10-jar-reproducibility.patch"
1330 "openjdk-10-jtask-reproducibility.patch"
1331 "openjdk-currency-time-bomb2.patch"))))
1332 (build-system gnu-build-system)
1333 (outputs '("out" "jdk" "doc"))
1334 (arguments
1335 (list
1336 ;; Prevent a java.util.ConcurrentModificationException.
1337 #:parallel-build? #f
1338 #:modules `((guix build gnu-build-system)
1339 (guix build utils)
1340 (ice-9 match)
1341 (ice-9 popen)
1342 (srfi srfi-1)
1343 (srfi srfi-26))
1344
1345 #:disallowed-references
1346 (list (this-package-native-input "openjdk")
1347 (gexp-input (this-package-native-input "openjdk")
1348 "jdk"))
1349
1350 #:tests? #f ; requires jtreg
1351 ;; TODO package jtreg
1352 #:configure-flags
1353 #~(list
1354 "--disable-hotspot-gtest" ;not currently running tests
1355 ;; Add flags for compilation with gcc >= 10.
1356 #$(string-append "--with-extra-cflags=-fcommon"
1357 " -fno-delete-null-pointer-checks"
1358 " -fno-lifetime-dse"
1359 ;; flags for compilation with gcc >= 14.
1360 " -Wno-error=int-conversion")
1361 ;; Otherwise, the '--enable-fast-install' causes an error.
1362 "--disable-option-checking"
1363 "--disable-warnings-as-errors"
1364 ;; Make validate-runpath pass (see:
1365 ;; http://issues.guix.info/issue/32894).
1366 "--with-native-debug-symbols=zipped"
1367 ;; Do not use the bundled libraries.
1368 "--with-giflib=system"
1369 "--with-lcms=system"
1370 "--with-libjpeg=system"
1371 "--with-libpng=system"
1372 "--with-version-pre="
1373 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1374 ;; set; do it manually.
1375 "--with-hotspot-build-time=1970-01-01T00:00:01"
1376 "--enable-reproducible-build" ; to be sure
1377 ;; Allow the build system to locate the system freetype.
1378 (string-append "--with-freetype-include="
1379 #$(this-package-input "freetype") "/include")
1380 (string-append "--with-freetype-lib="
1381 #$(this-package-input "freetype") "/lib"))
1382 #:phases
1383 #~(modify-phases %standard-phases
1384 (add-after 'patch-source-shebangs 'fix-java-shebangs
1385 (lambda _
1386 ;; This file was "fixed" by patch-source-shebangs, but it requires
1387 ;; this exact first line.
1388 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1389 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1390 (add-after 'unpack 'remove-timestamping
1391 (lambda _
1392 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1393 (("__DATE__") "")
1394 (("__TIME__") ""))))
1395 (add-after 'unpack 'patch-jni-libs
1396 ;; Hardcode dynamically loaded libraries.
1397 (lambda _
1398 (define (icedtea-or-openjdk? path)
1399 (or (string-contains path "openjdk")
1400 (string-contains path "icedtea")))
1401
1402 (let* ((library-path (remove icedtea-or-openjdk?
1403 (search-path-as-string->list
1404 (getenv "LIBRARY_PATH"))))
1405 (find-library (lambda (name)
1406 (or (search-path
1407 library-path
1408 (string-append "lib" name ".so"))
1409 (string-append "lib" name ".so")))))
1410 (for-each
1411 (lambda (file)
1412 (catch 'decoding-error
1413 (lambda ()
1414 (substitute* file
1415 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1416 _ name version)
1417 (string-append "\"" (find-library name) "\""))
1418 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1419 (string-append "\"" (find-library name) "\""))))
1420 (lambda _
1421 ;; Those are safe to skip.
1422 (format (current-error-port)
1423 "warning: failed to substitute: ~a~%"
1424 file))))
1425 (find-files "." "\\.c$|\\.h$")))))
1426 (add-before 'build 'write-source-revision-file
1427 (lambda _
1428 (with-output-to-file ".src-rev"
1429 (lambda _
1430 (display #$(package-version this-package))))))
1431 (replace 'build
1432 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1433 (apply invoke "make" "all"
1434 (format #f "JOBS=~a" (if parallel-build?
1435 (parallel-job-count)
1436 1))
1437 make-flags)))
1438 ;; jdk 11 does not build jre by default any more; so explicitly build
1439 ;; it (see:
1440 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1441 (add-after 'build 'build-jre
1442 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1443 (apply invoke "make" "legacy-jre-image"
1444 (format #f "JOBS=~a" (if parallel-build?
1445 (parallel-job-count)
1446 1))
1447 make-flags)))
1448 (replace 'install
1449 (lambda _
1450 (let ((images (car (find-files "build" "-server-release"
1451 #:directories? #t))))
1452 (copy-recursively (string-append images "/images/jdk")
1453 #$output:jdk)
1454 (copy-recursively (string-append images "/images/jre")
1455 #$output)
1456 (copy-recursively (string-append images "/images/docs")
1457 #$output:doc))))
1458 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1459 ;; But that shared object is located in the server/ folder, so it
1460 ;; cannot be found. This phase creates a symbolic link in the
1461 ;; lib/ folder so that the other libraries can find it.
1462 ;;
1463 ;; See:
1464 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1465 ;;
1466 ;; FIXME: Find the bug in the build system, so that this symlink is
1467 ;; not needed.
1468 (add-after 'install 'install-libjvm
1469 (lambda _
1470 (let ((lib-out (string-append #$output "/lib"))
1471 (lib-jdk (string-append #$output:jdk "/lib")))
1472 (symlink (string-append lib-jdk "/server/libjvm.so")
1473 (string-append lib-jdk "/libjvm.so"))
1474 (symlink (string-append lib-out "/server/libjvm.so")
1475 (string-append lib-out "/libjvm.so")))))
1476 (add-after 'install 'remove-extraneous-files
1477 (lambda* (#:key outputs #:allow-other-keys)
1478 ;; Remove the *.diz and src.zip files for space considerations.
1479 ;; The former are compressed debuginfo files not typically
1480 ;; shipped with Java distributions, while the later corresponds
1481 ;; to Java core API source files.
1482 (for-each delete-file
1483 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1484 (map (match-lambda
1485 ((name . dir)
1486 dir))
1487 outputs)))))
1488 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1489 (lambda _
1490 (use-modules (ice-9 binary-ports)
1491 (rnrs bytevectors))
1492 (letrec ((repack-archive
1493 (lambda (archive)
1494 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1495 (with-directory-excursion dir
1496 (invoke "unzip" archive))
1497 (delete-file archive)
1498 (for-each (compose repack-archive canonicalize-path)
1499 (find-files dir "(ct\\.sym|\\.jar)$"))
1500 (let ((reset-file-timestamp
1501 (lambda (file)
1502 (let ((s (lstat file)))
1503 (unless (eq? (stat:type s) 'symlink)
1504 (format #t "reset ~a~%" file)
1505 (utime file 0 0 0 0))))))
1506 (for-each reset-file-timestamp
1507 (find-files dir #:directories? #t)))
1508 (with-directory-excursion dir
1509 (let ((files (find-files ".")))
1510 (apply invoke "zip" "-0" "-X" archive files)))))))
1511 (for-each repack-archive
1512 (find-files #$output:doc "\\.zip$"))
1513 (for-each repack-archive
1514 (find-files #$output:jdk "\\.(zip|jar)$"))
1515 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1516 (let ((repack-jmod
1517 (lambda (file-name)
1518 (call-with-input-file file-name
1519 (lambda (file)
1520 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1521 (if (equal? (get-bytevector-n
1522 file (bytevector-length header))
1523 header)
1524 (let* ((header-length (bytevector-length header))
1525 (temp-file (mkstemp!
1526 (string-copy
1527 "temp-file.XXXXXX")))
1528 (temp-filename (port-filename temp-file))
1529 (content-length
1530 (- (stat:size (stat file))
1531 header-length)))
1532 (sendfile temp-file file content-length header-length)
1533 (delete-file file-name)
1534 (close-port temp-file)
1535 (repack-archive (canonicalize-path temp-filename))
1536 (call-with-output-file file-name
1537 (lambda (file)
1538 (put-bytevector file header)
1539 (call-with-input-file temp-filename
1540 (lambda (temp-file)
1541 (sendfile
1542 file temp-file
1543 (stat:size (stat temp-file)) 0)))))))))))))
1544 (for-each repack-jmod
1545 (find-files #$output:jdk "\\.jmod$"))))))
1546 (add-after 'install 'remove-timestamp-from-api-summary
1547 (lambda _
1548 (substitute* (string-append #$output:doc
1549 "/api/overview-summary.html")
1550 (("Generated by javadoc \\(11-internal\\).*$")
1551 "Generated by javadoc (11-internal) -->\n")))))))
1552 (inputs
1553 (list alsa-lib
1554 cups
1555 fontconfig
1556 freetype
1557 giflib
1558 gtk+
1559 lcms
1560 libjpeg-turbo
1561 libpng
1562 libx11
1563 libxext
1564 libxrandr
1565 libxrender
1566 libxt
1567 libxtst))
1568 (native-inputs
1569 (list autoconf
1570 bash ; not bash-minimal, needs ulimit
1571 openjdk10
1572 `(,openjdk10 "jdk")
1573 gnu-make-4.2
1574 nss-certs
1575 pkg-config
1576 unzip
1577 which
1578 zip))
1579 (home-page "https://openjdk.org/projects/jdk/11/")
1580 (synopsis "Java development kit")
1581 (description
1582 "This package provides the Java development kit OpenJDK.")
1583 (license license:gpl2+)
1584 (properties
1585 ;; At least on a Blackbird powerpc64le machine, the build takes more than
1586 ;; the default 3600s of silent timeout.
1587 `((max-silent-time . ,(* 3600 2))))))
1588
1589(define-syntax make-openjdk
1590 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1591 ;; the bootstrap package. One or more FIELD can be provided to further
1592 ;; refine the package definition; for convenience, the BASE, NAME and
1593 ;; VERSION are defined in their scope.
1594 (lambda (x)
1595 (syntax-case x ()
1596 ((_ bootstrap version* hash field ...)
1597 (with-syntax ((base (datum->syntax x 'base))
1598 (name (datum->syntax x 'name))
1599 (version (datum->syntax x 'version)))
1600 #'(let ((base (package
1601 (inherit bootstrap)
1602 (name "openjdk")
1603 (version version*)
1604 (source
1605 (origin
1606 (inherit (package-source bootstrap))
1607 (method git-fetch)
1608 (uri (git-reference
1609 (url (format
1610 #f "https://github.com/openjdk/jdk~au"
1611 (version-major version*)))
1612 (commit (string-append "jdk-" version*
1613 "-ga"))))
1614 (file-name (git-file-name name version))
1615 (sha256 (base32 hash))))
1616 (properties
1617 '((release-tag-prefix . "jdk-")
1618 (release-tag-suffix . "-ga")
1619 (release-tag-version-delimiter . ".")))
1620 (native-inputs
1621 (modify-inputs native-inputs
1622 (replace "openjdk" bootstrap)))
1623 (home-page (string-append
1624 "https://openjdk.java.net/projects/jdk/"
1625 (version-major version)))))
1626 (name "openjdk")
1627 (version version*))
1628 (package
1629 (inherit base)
1630 field
1631 ...)))))))
1632
1633(define-public openjdk12
1634 (make-openjdk
1635 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1636 (source
1637 (origin
1638 (method url-fetch)
1639 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1640 (file-name (string-append name "-" version ".tar.bz2"))
1641 (sha256
1642 (base32
1643 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1644 (modules '((guix build utils)))
1645 (snippet
1646 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1647 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1648 (arguments
1649 (substitute-keyword-arguments (package-arguments openjdk11)
1650 ;; Re-enable parallel build.
1651 ((#:parallel-build? _ #t) #t)
1652 ((#:phases phases)
1653 #~(modify-phases #$phases
1654 #$@(if (target-aarch64?)
1655 #~((add-after 'unpack 'patch-for-aarch64
1656 (lambda _
1657 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1658 ;; This line is duplicated, so remove both occurrences,
1659 ;; then add back one occurrence by substituting a
1660 ;; comment that occurs once.
1661 (("using MacroAssembler::call_VM_leaf_base;") "")
1662 (("Interpreter specific version of call_VM_base")
1663 (string-append "Interpreter specific version of call_VM_base\n"
1664 " using MacroAssembler::call_VM_leaf_base;"))))))
1665 #~())
1666 (replace 'remove-timestamping
1667 (lambda _
1668 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1669 (("__DATE__") "")
1670 (("__TIME__") ""))))
1671 (replace 'fix-java-shebangs
1672 (lambda _
1673 ;; 'blocked' was renamed to 'blacklisted' in this version for
1674 ;; some reason.
1675 (substitute* "make/data/blacklistedcertsconverter/\
1676blacklisted.certs.pem"
1677 (("^#!.*")
1678 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1679
1680(define-public openjdk13
1681 (make-openjdk openjdk12 "13.0.14"
1682 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1683 (source (origin
1684 (inherit (package-source base))
1685 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1686 "openjdk-10-jtask-reproducibility.patch"))))
1687 (arguments
1688 (substitute-keyword-arguments (package-arguments openjdk12)
1689 ((#:phases phases)
1690 #~(modify-phases #$phases
1691 (replace 'remove-timestamping
1692 (lambda _
1693 (substitute*
1694 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1695 (("__DATE__") "")
1696 (("__TIME__") ""))))))))))
1697
1698(define-public openjdk14
1699 (make-openjdk
1700 openjdk13 "14.0.2"
1701 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1702 (source (origin
1703 (inherit (package-source base))
1704 (snippet ;override snippet
1705 '(begin
1706 ;; The m4 macro uses 'help' to search for builtins, which is
1707 ;; not available in bash-minimal
1708 (substitute* "make/autoconf/basics.m4"
1709 (("if help") "if command -v"))
1710 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1711 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1712 "openjdk-10-jtask-reproducibility.patch"
1713 "openjdk-13-classlist-reproducibility.patch"))))))
1714
1715(define-public openjdk15
1716 (make-openjdk
1717 openjdk14 "15.0.10"
1718 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1719 (source (origin
1720 (inherit (package-source base))
1721 (modules '())
1722 (snippet #f)
1723 (patches
1724 (search-patches "openjdk-15-jtask-reproducibility.patch"
1725 "openjdk-15-xcursor-no-dynamic.patch"))))
1726 (inputs
1727 (modify-inputs inputs
1728 (append libxcursor))) ;for our patch to work
1729 (arguments
1730 (substitute-keyword-arguments (package-arguments base)
1731 ((#:implicit-inputs? _ #t)
1732 ;; This is necessary to avoid include ordering errors when adding a
1733 ;; lower GCC to native-inputs to avoid errors like "error: 'fesetround'
1734 ;; was not declared in this scope; did you mean 'setreuid'?"
1735 #f)
1736 ((#:configure-flags flags '%standard-phases)
1737 #~(cons "--without-gtest" ;this replaces...
1738 (delete "--disable-hotspot-gtest" #$flags))))) ;... this
1739 (native-inputs
1740 (append (modify-inputs native-inputs
1741 (delete "make" ;remove old gnu-make-4.2
1742 "openjdk") ;to remove non-jdk output
1743 (append `(,openjdk14 "jdk")))
1744 ;; On powerpc64le at least, GCC 14 cannot be used otherwise JDK 15
1745 ;; fails to bootstrap JDK 16, with incomprehensible errors like:
1746 ;; src/java.base/share/classes/java/lang/reflect/Proxy.java:1311:
1747 ;; error: integer number too large.
1748 (modify-inputs (%final-inputs)
1749 (replace "gcc" gcc-11))))))
1750
1751(define-public openjdk16
1752 (make-openjdk
1753 openjdk15 "16.0.2"
1754 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1755 (source (origin
1756 (inherit (package-source base))
1757 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1758 "openjdk-10-setsignalhandler.patch"))))))
1759
1760(define-public openjdk17
1761 (make-openjdk
1762 openjdk16 "17.0.10"
1763 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1764 (source (origin
1765 (inherit (package-source base))
1766 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1767 (arguments
1768 (substitute-keyword-arguments (package-arguments base)
1769 ((#:implicit-inputs? _ #t) #t) ;restore default
1770 ((#:phases phases)
1771 #~(modify-phases #$phases
1772 (replace 'fix-java-shebangs
1773 (lambda _
1774 ;; 'blacklisted' was renamed back to 'blocked'.
1775 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1776 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))
1777 (native-inputs
1778 ;; Resume using the implicit inputs, including the current GCC.
1779 (fold alist-delete (package-native-inputs base)
1780 (map first (%final-inputs))))))
1781
1782(define-public openjdk18
1783 (make-openjdk openjdk17 "18.0.2.1"
1784 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1785
1786(define-public openjdk19
1787 (make-openjdk openjdk18 "19.0.2"
1788 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1789 (arguments
1790 (substitute-keyword-arguments (package-arguments openjdk18)
1791 ((#:phases phases)
1792 #~(modify-phases #$phases
1793 (replace 'fix-java-shebangs
1794 (lambda _
1795 ;; Update file path.
1796 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1797 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1798 (add-before 'configure 'define-java-environment-variables
1799 (lambda* (#:key inputs #:allow-other-keys)
1800 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1801 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1802
1803(define-public openjdk20
1804 (make-openjdk openjdk19 "20.0.2"
1805 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1806
1807(define-public openjdk21
1808 (make-openjdk openjdk20 "21.0.2"
1809 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1810 (source (origin
1811 (inherit (package-source base))
1812 (patches (search-patches "openjdk-21-fix-rpath.patch"
1813 "openjdk-15-xcursor-no-dynamic.patch"))))
1814 (arguments
1815 (substitute-keyword-arguments (package-arguments base)
1816 ((#:phases phases)
1817 #~(modify-phases #$phases
1818 (replace 'fix-java-shebangs
1819 (lambda _
1820 ;; 'blacklisted' was renamed back to 'blocked'.
1821 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1822 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1823
1824(define-public openjdk22
1825 (make-openjdk
1826 openjdk21 "22.0.2"
1827 "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6"
1828 (arguments
1829 (substitute-keyword-arguments (package-arguments base)
1830 ((#:phases phases)
1831 #~(modify-phases #$phases
1832 (add-after 'unpack 'do-not-disable-new-dtags
1833 (lambda _
1834 ;; Our validate-runpath phases checks for RUNPATH, not RPATH.
1835 (substitute* "make/autoconf/flags-cflags.m4"
1836 ((" -Wl,--disable-new-dtags") ""))))))))))
1837
1838(define-public openjdk23
1839 (make-openjdk
1840 openjdk22 "23.0.2"
1841 "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf"
1842 (source (origin
1843 (inherit (package-source base))
1844 ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it
1845 ;; appears not needed anymore. The
1846 ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore;
1847 ;; the fix should be pursued in libx11 (see:
1848 ;; https://issues.guix.gnu.org/54654)
1849 (patches '())))))
1850
1851(define-public openjdk24
1852 (make-openjdk
1853 openjdk23 "24.0.1"
1854 "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx"
1855 (arguments
1856 (substitute-keyword-arguments (package-arguments base)
1857 ((#:configure-flags flags #~(list))
1858 (if (target-x86-32?)
1859 #~(cons* "--enable-deprecated-ports=yes" #$flags)
1860 flags))))))
1861
1862(define-public openjdk25
1863 (make-openjdk
1864 openjdk24 "25.0.2"
1865 "03aa34lscr3qbdl6qz3gqyp0nzkqfj02362mzmpkiq3y2g5xdnrj"
1866 (arguments
1867 (substitute-keyword-arguments (package-arguments base)
1868 ((#:configure-flags flags #~(list))
1869 (if (target-x86-32?)
1870 ;; Full builds on 32-bit x86 architectures are not supported as of
1871 ;; this version. Best we can do is to build with the "zero" variant.
1872 #~(cons* "--with-jvm-variants=zero"
1873 "--disable-precompiled-headers"
1874 #$flags)
1875 flags))
1876 ((#:phases phases #~%standard-phases)
1877 (if (target-x86-32?)
1878 #~(modify-phases #$phases
1879 (replace 'install
1880 (lambda _
1881 (let ((images (car (find-files "build" "-zero-release"
1882 #:directories? #t))))
1883 (copy-recursively (string-append images "/images/jdk")
1884 #$output:jdk)
1885 (copy-recursively (string-append images "/images/jre")
1886 #$output)
1887 (copy-recursively (string-append images "/images/docs")
1888 #$output:doc))))
1889 (replace 'install-libjvm
1890 (lambda _
1891 (let ((lib-out (string-append #$output "/lib"))
1892 (lib-jdk (string-append #$output:jdk "/lib")))
1893 (symlink (string-append lib-jdk "/zero/libjvm.so")
1894 (string-append lib-jdk "/libjvm.so"))
1895 (symlink (string-append lib-out "/zero/libjvm.so")
1896 (string-append lib-out "/libjvm.so"))))))
1897 phases))))))
1898
1899;;; Convenience alias to point to the latest version of OpenJDK.
1900(define-public openjdk openjdk25)
1901
1902
1903;; This version of JBR is here in order to be able to build custom
1904;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1905;; tests.
1906(define-public jbr11
1907 (package
1908 (inherit openjdk11)
1909 (name "jbr")
1910 (version "11_0_16-b2248")
1911 (source (origin
1912 (method git-fetch)
1913 (uri (git-reference
1914 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1915 (commit (string-append "jb" version))))
1916 (file-name (string-append name "-" version "-checkout"))
1917 (sha256
1918 (base32
1919 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1920 (arguments
1921 (substitute-keyword-arguments (package-arguments openjdk11)
1922 ((#:configure-flags configure-flags)
1923 #~(append #$configure-flags
1924 (list "--with-jvm-features=shenandoahgc"
1925 "--enable-cds=yes"
1926 "--with-vendor-name=JetBrains s.r.o"
1927 "--with-vendor-url=https://www.jetbrains.com/"
1928 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1929 (synopsis "JetBrains Java Runtime")
1930 (description "This package provides a Java runtime environment for
1931and Java development kit. It supports enhanced class redefinition (DCEVM),
1932includes a number of improvements in font rendering, keyboards support,
1933windowing/focus subsystems, HiDPI, accessibility, and performance,
1934provides better desktop integration and bugfixes not yet present in
1935OpenJDK.")
1936 (home-page "https://www.jetbrains.com/")
1937 (license license:gpl2+)))
1938
1939(define-public jbr17
1940 (package
1941 (inherit openjdk17)
1942 (name "jbr")
1943 (version "17.0.11b1207.30")
1944 (source (origin
1945 (method git-fetch)
1946 (uri (git-reference
1947 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1948 (commit (string-append "jbr-release-" version))))
1949 (file-name (string-append name "-" version "-checkout"))
1950 (sha256
1951 (base32
1952 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1953 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1954 (arguments
1955 (substitute-keyword-arguments (package-arguments openjdk17)
1956 ((#:configure-flags configure-flags)
1957 #~(append #$configure-flags
1958 (list "--with-jvm-features=shenandoahgc"
1959 "--enable-cds=yes"
1960 "--with-vendor-name=JetBrains s.r.o"
1961 "--with-vendor-url=https://www.jetbrains.com/"
1962 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1963 (synopsis "JetBrains Java Runtime")
1964 (description "This package provides a Java runtime environment for
1965and Java development kit. It supports enhanced class redefinition (DCEVM),
1966includes a number of improvements in font rendering, keyboards support,
1967windowing/focus subsystems, HiDPI, accessibility, and performance,
1968provides better desktop integration and bugfixes not yet present in
1969OpenJDK.")
1970 (home-page "https://www.jetbrains.com/")
1971 (license license:gpl2+)))
1972
1973(define-public jbr21
1974 (package
1975 (inherit openjdk21)
1976 (name "jbr")
1977 (version "21.0.3b509.11")
1978 (source (origin
1979 (method git-fetch)
1980 (uri (git-reference
1981 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1982 (commit (string-append "jbr-release-" version))))
1983 (file-name (string-append name "-" version "-checkout"))
1984 (sha256
1985 (base32
1986 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1987 (patches (search-patches "openjdk-21-fix-rpath.patch"
1988 "jbr-17-xcursor-no-dynamic.patch"))))
1989 (inputs
1990 `(("wayland" ,wayland)
1991 ("libxkbcommon" ,libxkbcommon) ; for wayland
1992 ,@(package-inputs openjdk21)))
1993 (arguments
1994 (substitute-keyword-arguments (package-arguments openjdk21)
1995 ((#:configure-flags configure-flags)
1996 #~(append #$configure-flags
1997 (list "--with-jvm-features=shenandoahgc"
1998 "--enable-cds=yes"
1999 "--with-vendor-name=JetBrains s.r.o"
2000 "--with-vendor-url=https://www.jetbrains.com/"
2001 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
2002 (synopsis "JetBrains Java Runtime")
2003 (description "This package provides a Java runtime environment for
2004and Java development kit. It supports enhanced class redefinition (DCEVM),
2005includes a number of improvements in font rendering, keyboards support,
2006windowing/focus subsystems, HiDPI, accessibility, and performance,
2007provides better desktop integration and bugfixes not yet present in
2008OpenJDK.")
2009 (home-page "https://www.jetbrains.com/")
2010 (license license:gpl2+)))
2011
2012(define-public jbr25
2013 (package
2014 (inherit openjdk25)
2015 (name "jbr")
2016 (version "25.0.2b329.72")
2017 (source (origin
2018 (method git-fetch)
2019 (uri (git-reference
2020 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
2021 (commit (string-append "jbr-release-" version))))
2022 (file-name (string-append name "-" version "-checkout"))
2023 (sha256
2024 (base32
2025 "1m7pbz2ypx4h7n6iqss8bgymg9hqn14lnis4a2w87mgy51p370ib"))
2026 (patches
2027 (search-patches "jbr-25-wayland-drag-icon.patch"
2028 "jbr-25-wayland-intra-jvm-dnd.patch"))))
2029 (inputs
2030 `(("wayland" ,wayland)
2031 ("libxkbcommon" ,libxkbcommon) ; for wayland
2032 ,@(package-inputs openjdk25)))
2033 (native-inputs
2034 (modify-inputs (package-native-inputs openjdk25)
2035 (append wayland-protocols)))
2036 (arguments
2037 (substitute-keyword-arguments (package-arguments openjdk25)
2038 ((#:configure-flags configure-flags)
2039 #~(append #$configure-flags
2040 (list "--disable-warnings-as-errors"
2041 "--disable-java-warnings-as-errors"
2042 "--with-jvm-features=shenandoahgc"
2043 "--enable-cds=yes"
2044 (string-append "--with-wayland-protocols="
2045 (assoc-ref %build-inputs "wayland-protocols")
2046 "/share/wayland-protocols")
2047 "--with-vendor-name=JetBrains s.r.o"
2048 "--with-vendor-url=https://www.jetbrains.com/"
2049 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))
2050 ((#:phases phases)
2051 #~(modify-phases #$phases
2052 ;; JBR adds a 'static-jdk-image' target to 'make all' that
2053 ;; statically links both the Wayland and X11 AWT backends,
2054 ;; causing duplicate symbol errors. Build only what we need.
2055 ;; See also their workaround BROKEN_STATIC_LIBS make variable.
2056 (replace 'build
2057 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
2058 (apply invoke "make" "product-images" "all-docs-images"
2059 (format #f "JOBS=~a" (if parallel-build?
2060 (parallel-job-count)
2061 1))
2062 make-flags)))))))
2063 (synopsis "JetBrains Java Runtime")
2064 (description "This package provides a Java runtime environment for
2065and Java development kit. It supports enhanced class redefinition (DCEVM),
2066includes a number of improvements in font rendering, keyboards support,
2067windowing/focus subsystems, Wayland, HiDPI, accessibility, and performance,
2068provides better desktop integration and bugfixes not yet present in
2069OpenJDK.")
2070 (home-page "https://www.jetbrains.com/")
2071 (license license:gpl2+)))
2072
2073
2074(define-public ant/java8
2075 (package
2076 (name "ant")
2077 (version "1.10.17")
2078 (source (origin
2079 (method url-fetch)
2080 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2081 version "-src.tar.gz"))
2082 (sha256
2083 (base32
2084 "0p34pqknp2rbk5wk6zw8m6jfn7rkk7fyv3yvk9zhfxhhxrf0lfgh"))
2085 (modules '((guix build utils)))
2086 (snippet
2087 '(begin
2088 (for-each delete-file
2089 (find-files "lib/optional" "\\.jar$"))
2090 #t))))
2091 (build-system gnu-build-system)
2092 (arguments
2093 (list
2094 #:modules '((srfi srfi-1)
2095 (guix build gnu-build-system)
2096 (guix build utils))
2097 #:tests? #f ;no "check" target
2098 #:phases
2099 #~(modify-phases %standard-phases
2100 (add-after 'unpack 'remove-scripts
2101 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2102 ;; wrappers.
2103 (lambda _
2104 (for-each delete-file
2105 (find-files "src/script"
2106 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
2107 (delete 'bootstrap)
2108 (delete 'configure)
2109 (replace 'build
2110 (lambda* (#:key inputs #:allow-other-keys)
2111 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2112
2113 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2114 ;; Ant to build. This is necessary in addition to disabling the
2115 ;; "check" phase, because the dependency on "test-jar" would always
2116 ;; result in the tests to be run.
2117 (substitute* "build.xml"
2118 (("depends=\"jars,test-jar") "depends=\"jars"))
2119 (invoke "bash" "bootstrap.sh"
2120 (string-append "-Ddist.dir=" #$output))))
2121 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2122 (lambda _
2123 (define (repack-archive jar)
2124 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2125 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2126 (with-directory-excursion dir
2127 (invoke "unzip" jar))
2128 (delete-file jar)
2129 ;; XXX: copied from (gnu build install)
2130 (for-each (lambda (file)
2131 (let ((s (lstat file)))
2132 (unless (eq? (stat:type s) 'symlink)
2133 (utime file 0 0 0 0))))
2134 (find-files dir #:directories? #t))
2135 ;; It is important that the manifest appears first.
2136 (with-directory-excursion dir
2137 (let* ((files (find-files "." ".*" #:directories? #t))
2138 ;; To ensure that the reference scanner can
2139 ;; detect all store references in the jars
2140 ;; we disable compression with the "-0" option.
2141 (command (if (file-exists? manifest)
2142 `("zip" "-0" "-X" ,jar ,manifest
2143 ,@files)
2144 `("zip" "-0" "-X" ,jar ,@files))))
2145 (apply invoke command)))))
2146 (for-each repack-archive
2147 (find-files
2148 (string-append #$output "/lib")
2149 "\\.jar$"))))
2150 (delete 'install))))
2151 (native-inputs
2152 `(("jdk" ,icedtea-8 "jdk")
2153 ("zip" ,zip)
2154 ("unzip" ,unzip)))
2155 (home-page "https://ant.apache.org")
2156 (synopsis "Build tool for Java")
2157 (description
2158 "Ant is a platform-independent build tool for Java. It is similar to
2159make but is implemented using the Java language, requires the Java platform,
2160and is best suited to building Java projects. Ant uses XML to describe the
2161build process and its dependencies, whereas Make uses Makefile format.")
2162 (license license:asl2.0)))
2163
2164(define-public ant/java8-empty-etc
2165 (package
2166 (inherit ant/java8)
2167 (arguments
2168 (substitute-keyword-arguments (package-arguments ant/java8)
2169 ((#:phases phases)
2170 #~(modify-phases #$phases
2171 (add-after 'build 'add-empty-etc-directory
2172 (lambda* (#:key outputs #:allow-other-keys)
2173 (mkdir-p (string-append (assoc-ref outputs "out") "/etc"))))))))))
2174
2175(define-public ant-1.10.14
2176 (package
2177 (inherit ant/java8)
2178 (name "ant")
2179 (version "1.10.14")
2180 (source
2181 (origin
2182 (method url-fetch)
2183 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2184 version "-src.tar.gz"))
2185 (sha256
2186 (base32 "0m0vcazy1634nra8mcs3hvvf49avnbxf8f5y1icn5syi8hgy6pws"))
2187 (modules '((guix build utils)))
2188 (snippet
2189 '(begin
2190 (for-each delete-file
2191 (find-files "lib/optional" "\\.jar$"))
2192 #t))))
2193 (arguments
2194 (substitute-keyword-arguments (package-arguments ant/java8)
2195 ((#:phases phases)
2196 #~(modify-phases #$phases
2197 (replace 'remove-scripts
2198 (lambda _
2199 (for-each delete-file
2200 (find-files "src/script" ".*\\.(bat|cmd)$"))))
2201 (add-after 'build 'install-distribution-files
2202 (lambda* (#:key outputs #:allow-other-keys)
2203 (let* ((out (assoc-ref outputs "out"))
2204 (bin-dir (string-append out "/bin"))
2205 (etc-dir (string-append out "/etc"))
2206 (checkstyle-dir (string-append etc-dir "/checkstyle")))
2207 (for-each
2208 (lambda (file)
2209 (copy-file (string-append "src/script/" file)
2210 (string-append bin-dir "/" file))
2211 (chmod (string-append bin-dir "/" file) #o755))
2212 '("antRun" "antRun.pl" "runant.pl" "runant.py"))
2213 (mkdir-p checkstyle-dir)
2214 (for-each
2215 (lambda (file)
2216 (copy-file (string-append "src/etc/" file)
2217 (string-append etc-dir "/" file)))
2218 '("junit-frames.xsl"
2219 "junit-noframes.xsl"
2220 "junit-frames-xalan1.xsl"
2221 "coverage-frames.xsl"
2222 "maudit-frames.xsl"
2223 "mmetrics-frames.xsl"
2224 "changelog.xsl"
2225 "jdepend.xsl"
2226 "jdepend-frames.xsl"
2227 "log.xsl"
2228 "tagdiff.xsl"))
2229 (for-each
2230 (lambda (file)
2231 (copy-file (string-append "src/etc/checkstyle/" file)
2232 (string-append checkstyle-dir "/" file)))
2233 '("checkstyle-frames-sortby-check.xsl"
2234 "checkstyle-frames.xsl"
2235 "checkstyle-text.xsl"
2236 "checkstyle-xdoc.xsl"))
2237 (copy-file "build/lib/ant-bootstrap.jar"
2238 (string-append etc-dir "/ant-bootstrap.jar")))))))))))
2239
2240;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2241;; requires Java 8.
2242(define-public ant
2243 (package (inherit ant/java8)
2244 (version "1.9.15")
2245 (source (origin
2246 (method url-fetch)
2247 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2248 version "-src.tar.gz"))
2249 (sha256
2250 (base32
2251 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2252 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2253 ;; later.
2254 (arguments
2255 (substitute-keyword-arguments
2256 `(#:modules ((srfi srfi-1)
2257 (guix build gnu-build-system)
2258 (guix build utils))
2259 #:tests? #f ; no "check" target
2260 #:phases
2261 (modify-phases %standard-phases
2262 (delete 'bootstrap)
2263 (delete 'configure)
2264 (add-before 'build 'define-java-environment-variables
2265 (lambda* (#:key inputs #:allow-other-keys)
2266 ;; First, set environment variables (eases debugging on -K).
2267 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2268 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2269 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2270 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2271 (replace 'build
2272 (lambda* (#:key inputs outputs #:allow-other-keys)
2273 ;; Ant complains if this file doesn't exist.
2274 (setenv "HOME" "/tmp")
2275 (with-output-to-file "/tmp/.ant.properties"
2276 (lambda _ (display "")))
2277
2278 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2279 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2280
2281 ;; jikes produces lots of warnings, but they are not very
2282 ;; interesting, so we silence them.
2283 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2284
2285 ;; Without these JamVM options the build may freeze.
2286 (substitute* "bootstrap.sh"
2287 (("^\"\\$\\{JAVACMD\\}\" " m)
2288 ,@(if (string-prefix? "armhf" (or (%current-system)
2289 (%current-target-system)))
2290 `((string-append m "-Xnocompact "))
2291 `((string-append m "-Xnocompact -Xnoinlining ")))))
2292
2293 ;; Disable tests because we are bootstrapping and thus don't have
2294 ;; any of the dependencies required to build and run the tests.
2295 (substitute* "build.xml"
2296 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2297 (invoke "bash" "bootstrap.sh"
2298 (string-append "-Ddist.dir="
2299 (assoc-ref outputs "out")))))
2300 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2301 (lambda* (#:key outputs #:allow-other-keys)
2302 (define (repack-archive jar)
2303 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2304 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2305 (with-directory-excursion dir
2306 (invoke "unzip" jar))
2307 (delete-file jar)
2308 ;; XXX: copied from (gnu build install)
2309 (for-each (lambda (file)
2310 (let ((s (lstat file)))
2311 (unless (eq? (stat:type s) 'symlink)
2312 (utime file 0 0 0 0))))
2313 (find-files dir #:directories? #t))
2314 ;; It is important that the manifest appears first.
2315 (with-directory-excursion dir
2316 (let* ((files (find-files "." ".*" #:directories? #t))
2317 ;; To ensure that the reference scanner can
2318 ;; detect all store references in the jars
2319 ;; we disable compression with the "-0" option.
2320 (command (if (file-exists? manifest)
2321 `("zip" "-0" "-X" ,jar ,manifest
2322 ,@files)
2323 `("zip" "-0" "-X" ,jar ,@files))))
2324 (apply invoke command)))))
2325 (for-each repack-archive
2326 (find-files
2327 (string-append (assoc-ref %outputs "out") "/lib")
2328 "\\.jar$"))))
2329 (delete 'install)))
2330 ((#:phases phases)
2331 `(modify-phases ,phases
2332 (delete 'define-java-environment-variables)
2333 (add-after 'unpack 'remove-scripts
2334 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2335 ;; wrappers.
2336 (lambda _
2337 (for-each delete-file
2338 (find-files "src/script"
2339 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2340 #t))
2341 (replace 'build
2342 (lambda* (#:key inputs outputs #:allow-other-keys)
2343 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2344
2345 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2346 ;; Ant to build. This is necessary in addition to disabling the
2347 ;; "check" phase, because the dependency on "test-jar" would always
2348 ;; result in the tests to be run.
2349 (substitute* "build.xml"
2350 (("depends=\"jars,test-jar") "depends=\"jars"))
2351 (invoke "bash" "bootstrap.sh"
2352 (string-append "-Ddist.dir="
2353 (assoc-ref outputs "out")))))))))
2354 (native-inputs
2355 `(("jdk" ,icedtea-7 "jdk")
2356 ("zip" ,zip)
2357 ("unzip" ,unzip)))))
2358
2359(define-public ant-apache-bcel
2360 (package
2361 (inherit ant/java8)
2362 (name "ant-apache-bcel")
2363 (arguments
2364 (substitute-keyword-arguments (package-arguments ant/java8)
2365 ((#:phases phases)
2366 #~(modify-phases #$phases
2367 (add-after 'unpack 'link-bcel
2368 (lambda* (#:key inputs #:allow-other-keys)
2369 (for-each (lambda (file)
2370 (symlink file
2371 (string-append "lib/optional/"
2372 (basename file))))
2373 (find-files (assoc-ref inputs "java-commons-bcel")
2374 "\\.jar$"))))
2375 (add-after 'build 'install
2376 (lambda _
2377 (let ((share (string-append #$output "/share/java"))
2378 (bin (string-append #$output "/bin"))
2379 (lib (string-append #$output "/lib")))
2380 (mkdir-p share)
2381 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2382 (delete-file-recursively bin)
2383 (delete-file-recursively lib))))))))
2384 (inputs
2385 (modify-inputs (package-inputs ant/java8)
2386 (prepend java-commons-bcel)))))
2387
2388(define-public ant-junit
2389 (package
2390 (inherit ant/java8)
2391 (name "ant-junit")
2392 (arguments
2393 (substitute-keyword-arguments (package-arguments ant/java8)
2394 ((#:phases phases)
2395 #~(modify-phases #$phases
2396 (add-after 'unpack 'link-junit
2397 (lambda* (#:key inputs #:allow-other-keys)
2398 (for-each (lambda (file)
2399 (symlink file
2400 (string-append "lib/optional/"
2401 (basename file))))
2402 (find-files (assoc-ref inputs "java-junit")
2403 "\\.jar$"))))
2404 (add-after 'build 'install
2405 (lambda _
2406 (let ((share (string-append #$output "/share/java"))
2407 (bin (string-append #$output "/bin"))
2408 (lib (string-append #$output "/lib")))
2409 (mkdir-p share)
2410 (install-file (string-append lib "/ant-junit.jar") share)
2411 (delete-file-recursively bin)
2412 (delete-file-recursively lib))))))))
2413 (inputs
2414 (modify-inputs (package-inputs ant/java8)
2415 (prepend java-junit)))))
2416
2417(define-public libantlr3c
2418 (package
2419 (name "libantlr3c")
2420 (version "3.4")
2421 (source
2422 (origin
2423 (method url-fetch)
2424 (uri
2425 (string-append "https://www.antlr3.org/download/C/"
2426 name "-" version ".tar.gz"))
2427 (sha256
2428 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2429 (build-system gnu-build-system)
2430 (arguments
2431 (list #:configure-flags
2432 #~(list "--enable-debuginfo"
2433 "--disable-static"
2434 #$@(if (target-64bit?)
2435 #~("--enable-64bit")
2436 #~())
2437 #$@(if (target-riscv64?)
2438 #~("--disable-abiflags")
2439 #~()))))
2440 (synopsis "ANTLR C Library")
2441 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2442Tool for Language Recognition v3).")
2443 (home-page "https://www.antlr3.org/")
2444 (license license:bsd-3)))
2445
2446(define-public drip
2447 ;; Last release is from 2014, with a few important commits afterwards.
2448 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2449 (package
2450 (name "drip")
2451 (version (git-version "0.2.4" "1" commit))
2452 (source (origin
2453 (method git-fetch)
2454 (uri (git-reference
2455 (url "https://github.com/ninjudd/drip")
2456 (commit commit)))
2457 (file-name (git-file-name name version))
2458 (sha256
2459 (base32
2460 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2461 (build-system gnu-build-system)
2462 (native-inputs
2463 `(("jdk" ,icedtea "jdk")))
2464 (arguments
2465 (list #:tests? #f ; No tests.
2466 #:phases
2467 #~(modify-phases %standard-phases
2468 (delete 'configure)
2469 (add-before 'build 'relax-gcc-14-strictness
2470 (lambda _
2471 (substitute* "Makefile"
2472 ((" gcc(.*)$" all options)
2473 (string-append
2474 " gcc"
2475 " -Wno-error=incompatible-pointer-types"
2476 " -Wno-error=implicit-function-declaration"
2477 options)))))
2478 (add-before 'install 'fix-wrapper
2479 (lambda* (#:key inputs #:allow-other-keys)
2480 (let ((jps (search-input-file inputs "/bin/jps")))
2481 (substitute* "bin/drip"
2482 (("jps") jps)
2483 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2484 ;; No need to make:
2485 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2486 ;; No need to include source:
2487 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2488 "true")))))
2489 (replace 'install
2490 (lambda* (#:key outputs #:allow-other-keys)
2491 (let* ((bin (string-append #$output "/bin"))
2492 (share (string-append #$output "/share/drip")))
2493 (mkdir-p bin)
2494 (for-each
2495 (lambda (file)
2496 (install-file (string-append "bin/" file) bin))
2497 '("drip" "drip_daemon" "drip_proxy"))
2498 (install-file "drip.jar" share)
2499 (substitute* (string-append bin "/drip")
2500 (("drip_dir=\\$bin_dir/..")
2501 (string-append "drip_dir=" share)))))))))
2502 (home-page "https://github.com/ninjudd/drip")
2503 (synopsis "Faster Java Virtual Machine launching")
2504 (description "Drip is a launcher for the Java Virtual Machine that
2505provides much faster startup times than the @command{java} command. The @command{drip}
2506script is intended to be a drop-in replacement for the @command{java} command,
2507only faster.")
2508 (license license:epl1.0))))
2509
2510(define-public java-openjfx-build
2511 (package
2512 (name "java-openjfx-build")
2513 ;; This is a java-8 version
2514 (version "8.202")
2515 (source (origin
2516 (method hg-fetch)
2517 (uri (hg-reference
2518 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2519 (changeset (string-append
2520 (string-join (string-split version #\.) "u")
2521 "-ga"))))
2522 (file-name (string-append name "-" version "-checkout"))
2523 (modules '((guix build utils)))
2524 (snippet
2525 '(begin
2526 ;; Delete included gradle jar
2527 (delete-file-recursively "gradle/wrapper")
2528 #t))
2529 (sha256
2530 (base32
2531 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2532 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2533 (build-system ant-build-system)
2534 (arguments
2535 `(#:jar-name "java-openjfx.jar"
2536 #:source-dir "buildSrc/src/main/java"
2537 #:test-dir "buildSrc/src/test"
2538 #:phases
2539 (modify-phases %standard-phases
2540 (add-before 'configure 'generate-jsl-parser
2541 (lambda _
2542 (invoke "antlr3" "-o"
2543 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2544 "buildSrc/src/main/antlr/JSL.g"))))))
2545 (inputs
2546 (list antlr3 java-stringtemplate))
2547 (native-inputs
2548 (list java-junit java-hamcrest-core))
2549 (home-page "https://openjfx.io")
2550 (synopsis "Graphical application toolkit in Java")
2551 (description "OpenJFX is a client application platform for desktop,
2552mobile and embedded systems built on Java. Its goal is to produce a
2553modern, efficient, and fully featured toolkit for developing rich client
2554applications. This package contains base classes for the OpenJFX
2555distribution and helper classes for building other parts of the
2556distribution.")
2557 (license license:gpl2))) ;gpl2 only, with classpath exception
2558
2559(define-public java-openjfx-base
2560 (package (inherit java-openjfx-build)
2561 (name "java-openjfx-base")
2562 (arguments
2563 `(#:jar-name "java-openjfx-base.jar"
2564 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2565 #:test-dir "modules/base/src/test"
2566 #:phases
2567 (modify-phases %standard-phases
2568 (add-before 'check 'remove-empty-file
2569 (lambda _
2570 (with-directory-excursion "modules/base/src/test/java"
2571 ;; These files are completely commented, but junit expects them to
2572 ;; contain a class, so tests fail.
2573 (delete-file
2574 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2575 (delete-file
2576 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2577 (delete-file "javafx/beans/property/PropertiesTest.java")
2578 (delete-file
2579 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2580 ;; This one fails
2581 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2582 #t)))))
2583 (propagated-inputs
2584 (list java-openjfx-build))
2585 (description "OpenJFX is a client application platform for desktop,
2586mobile and embedded systems built on Java. Its goal is to produce a
2587modern, efficient, and fully featured toolkit for developing rich client
2588applications. This package contains base classes for the OpenJFX
2589distribution.")))
2590
2591(define-public java-openjfx-graphics
2592 (package (inherit java-openjfx-build)
2593 (name "java-openjfx-graphics")
2594 (arguments
2595 `(#:jar-name "java-openjfx-graphics.jar"
2596 #:source-dir "modules/graphics/src/main/java"
2597 #:tests? #f; require X
2598 #:test-dir "modules/graphics/src/test"
2599 #:phases
2600 (modify-phases %standard-phases
2601 (add-after 'unpack 'copy-missing-file
2602 (lambda* (#:key inputs #:allow-other-keys)
2603 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2604 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2605 ;; XXX: looks like the missing file we found isn't *quite*
2606 ;; compatible...
2607 (substitute* target
2608 (("case TYPE_INT_ARGB:") "")))))
2609 (add-after 'build 'build-native
2610 (lambda* (#:key inputs outputs #:allow-other-keys)
2611 (let ((jdk (assoc-ref inputs "jdk"))
2612 (class-file->class-name
2613 (lambda (class-file)
2614 (string-map (lambda (c)
2615 (if (char=? c #\/) #\. c))
2616 (string-drop-right class-file
2617 (string-length ".class"))))))
2618 (setenv "CPPFLAGS"
2619 (string-append "-DINLINE=inline "
2620 "-DLINUX "
2621 "-I" jdk "/include "
2622 "-I" jdk "/include/linux "
2623 "-I " (getcwd) "/build/classes/include "
2624 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2625
2626 ;; Instructions have been adapted from buildSrc/linux.gradle
2627 (with-directory-excursion "build/classes"
2628 ;; Build prism
2629 (mkdir-p "include")
2630
2631 ;; Generate headers for prism
2632 (apply invoke "javah" "-d" "include" "-cp" "."
2633 (map class-file->class-name
2634 (append (find-files "com/sun/prism/impl" "\\.class$")
2635 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2636
2637 ;; ...then for prism_sw
2638 (apply invoke "javah" "-d" "include" "-cp" "."
2639 (map class-file->class-name
2640 (find-files "com/sun/pisces" "\\.class$")))
2641
2642 ;; ...and for prism_es2
2643 (apply invoke "javah" "-d" "include" "-cp" "."
2644 (map class-file->class-name
2645 (find-files "com/sun/prism/es2" "\\.class$")))))
2646
2647 (with-directory-excursion "netbeans/native-prism"
2648 (invoke "make" "CONF=Release"))
2649 (with-directory-excursion "netbeans/native-prism-sw"
2650 (invoke "make" "CONF=Release"))
2651 ;; TODO: This fails due to unknown EGL procedure names
2652 #;
2653 (with-directory-excursion "netbeans/native-prism-es2"
2654 (invoke "make" "CONF=Release"))
2655
2656 (let* ((out (assoc-ref outputs "out"))
2657 (dir ,(match (%current-system)
2658 ("i686-linux"
2659 "i386")
2660 ((or "armhf-linux" "aarch64-linux")
2661 "arm")
2662 ((or "x86_64-linux")
2663 "amd64")
2664 (_ "unknown")))
2665 (target (string-append out "/share/" dir "/")))
2666 (mkdir-p target)
2667 (for-each (lambda (file)
2668 (let ((new-name
2669 (string-append "lib"
2670 (string-map
2671 (lambda (c)
2672 (if (char=? c #\-) #\_ c))
2673 (string-drop (basename file)
2674 (string-length "libnative-"))))))
2675 (copy-file file
2676 (string-append target new-name))))
2677 (find-files "netbeans" "\\.so$"))))))))
2678 (propagated-inputs
2679 (list java-openjfx-base))
2680 (inputs
2681 (list java-swt))
2682 ;; XXX: for unknown reasons
2683 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2684 ;; in this revision.
2685 (native-inputs
2686 `(("JNativeSurface.c"
2687 ,(origin
2688 (method url-fetch)
2689 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2690/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2691 (sha256
2692 (base32
2693 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2694 (description "OpenJFX is a client application platform for desktop,
2695mobile and embedded systems built on Java. Its goal is to produce a
2696modern, efficient, and fully featured toolkit for developing rich client
2697applications. This package contains graphics-related classes for the
2698OpenJFX distribution.")))
2699
2700(define-public java-openjfx-media
2701 (package (inherit java-openjfx-build)
2702 (name "java-openjfx-media")
2703 (propagated-inputs
2704 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2705 (arguments
2706 `(#:jar-name "java-openjfx-media.jar"
2707 #:source-dir "modules/media/src/main/java"
2708 #:tests? #f)); no tests
2709 (description "OpenJFX is a client application platform for desktop,
2710mobile and embedded systems built on Java. Its goal is to produce a
2711modern, efficient, and fully featured toolkit for developing rich client
2712applications. This package contains media-related classes for the
2713OpenJFX distribution.")))
2714
2715(define-public java-openjfx-controls
2716 (package (inherit java-openjfx-build)
2717 (name "java-openjfx-controls")
2718 (propagated-inputs
2719 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2720 (arguments
2721 `(#:jar-name "java-openjfx-controls.jar"
2722 #:source-dir "modules/controls/src/main/java"
2723 #:test-dir "modules/controls/src/test"
2724 ;; TODO: tests require com.sun.javafx.pgstub,
2725 ;; javafx.collections.MockSetObserver, and
2726 ;; com.sun.javafx.binding.ExpressionHelperUtility
2727 #:tests? #false
2728 #:phases
2729 (modify-phases %standard-phases
2730 (add-after 'unpack 'copy-resources
2731 (lambda _
2732 (copy-recursively "modules/controls/src/test/resources"
2733 "build/test-classes")
2734 (copy-recursively "modules/controls/src/main/resources"
2735 "build/classes"))))))
2736 (description "OpenJFX is a client application platform for desktop,
2737mobile and embedded systems built on Java. Its goal is to produce a
2738modern, efficient, and fully featured toolkit for developing rich client
2739applications. This package contains UI control classes for the
2740OpenJFX distribution.")))
2741
2742(define-public javacc-4
2743 (package
2744 (name "javacc")
2745 (version "4.1")
2746 (source (origin
2747 (method git-fetch)
2748 (uri (git-reference
2749 (url "https://github.com/javacc/javacc")
2750 (commit "release_41")))
2751 (file-name (string-append "javacc-" version "-checkout"))
2752 (sha256
2753 (base32
2754 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2755 (modules '((guix build utils)))
2756 ;; delete bundled jars
2757 (snippet '(begin (delete-file-recursively "lib") #t))))
2758 (build-system ant-build-system)
2759 ;; Tests fail with
2760 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2761 ;; JAVACODE failed
2762 (arguments
2763 `(#:tests? #f
2764 #:phases
2765 (modify-phases %standard-phases
2766 ;; Delete tests to avoid build failure (we don't run them anyway).
2767 (add-after 'unpack 'delete-tests
2768 (lambda _
2769 (for-each delete-file
2770 '("src/org/javacc/JavaCCTestCase.java"
2771 "src/org/javacc/parser/ExpansionTest.java"
2772 "src/org/javacc/parser/OptionsTest.java"
2773 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2774 (for-each delete-file-recursively
2775 '("src/org/javacc/parser/test"
2776 "src/org/javacc/jjdoc/test"))
2777 #t))
2778 (replace 'install (install-jars "bin/lib")))))
2779 (home-page "https://javacc.org/")
2780 (synopsis "Java parser generator")
2781 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2782generator for use with Java applications. A parser generator is a tool that
2783reads a grammar specification and converts it to a Java program that can
2784recognize matches to the grammar. In addition to the parser generator itself,
2785JavaCC provides other standard capabilities related to parser generation such
2786as tree building (via a tool called JJTree included with JavaCC), actions,
2787debugging, etc.")
2788 (license license:bsd-3)))
2789
2790;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2791;; in the bootstrap/ directory.
2792(define-public javacc-3
2793 (package
2794 (inherit javacc-4)
2795 (version "3.2")
2796 (source (origin
2797 (method git-fetch)
2798 (uri (git-reference
2799 (url "https://github.com/javacc/javacc")
2800 (commit "release_32")))
2801 (file-name (string-append "javacc-" version "-checkout"))
2802 (sha256
2803 (base32
2804 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2805 (arguments
2806 `(#:tests? #f
2807 #:phases
2808 (modify-phases %standard-phases
2809 (add-before 'build 'set-java-version
2810 (lambda _
2811 (for-each
2812 (lambda (file)
2813 (substitute* file
2814 (("debug=") "source=\"1.4\" debug=")))
2815 (find-files "." "build.xml"))
2816 #t))
2817 (replace 'install (install-jars "bin/lib")))))))
2818
2819(define-public javacc
2820 (package
2821 (inherit javacc-4)
2822 (version "7.0.4")
2823 (source
2824 (origin
2825 (method git-fetch)
2826 (uri (git-reference
2827 (url "https://github.com/javacc/javacc")
2828 (commit version)))
2829 (file-name (git-file-name "javacc" version))
2830 (sha256
2831 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2832 (modules '((guix build utils)))
2833 ;; Delete bundled jars.
2834 (snippet '(begin (for-each delete-file-recursively
2835 '("bootstrap" "lib"))))))
2836 (arguments
2837 `(#:make-flags ; bootstrap from javacc-4
2838 ,#~(list (string-append "-Dbootstrap-jar="
2839 #$(this-package-native-input "javacc")
2840 "/share/java/javacc.jar"))
2841 #:test-target "test"
2842 #:phases
2843 (modify-phases %standard-phases
2844 (replace 'install (install-jars "target"))
2845 (add-after 'install 'install-bin
2846 (lambda* (#:key outputs inputs #:allow-other-keys)
2847 (let* ((out (assoc-ref outputs "out"))
2848 (dir (string-append out "/share/java"))
2849 (bin (string-append out "/bin"))
2850 (javacc (string-append bin "/javacc")))
2851 (mkdir-p bin)
2852 (with-output-to-file javacc
2853 (lambda _
2854 (display
2855 (string-append "#!/bin/sh\n"
2856 (assoc-ref inputs "icedtea") "/bin/java"
2857 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2858 (chmod javacc #o755)
2859 ;; symlink to different names to affect the first argument and
2860 ;; change the behavior of the jar file.
2861 (symlink javacc (string-append bin "/jjdoc"))
2862 (symlink javacc (string-append bin "/jjtree"))))))))
2863 (native-inputs
2864 (list javacc-4))
2865 (inputs (list icedtea-8))))
2866
2867(define-public java-ecj
2868 (package
2869 (name "java-ecj")
2870 (version "4.6.3")
2871 (source
2872 (origin
2873 (method url-fetch)
2874 (uri (string-append "http://archive.eclipse.org/eclipse/"
2875 "downloads/drops4/R-" version "-201703010400/"
2876 "ecjsrc-" version ".jar"))
2877 (sha256
2878 (base32
2879 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2880 (build-system ant-build-system)
2881 (arguments
2882 `(#:tests? #f ; none included
2883 #:build-target "build"
2884 #:phases
2885 (modify-phases %standard-phases
2886 (add-after 'unpack 'fix-build.xml
2887 (lambda _
2888 (substitute* "src/build.xml"
2889 (("^.*MANIFEST.*$")
2890 "")
2891 (("^.*properties.*$")
2892 "<include name=\"**/*.properties\"/>
2893 <include name=\"**/*.props\"/>"))))
2894 (add-before 'build 'chdir
2895 (lambda _ (chdir "src")))
2896 (replace 'install (install-jars ".")))))
2897 (home-page "https://eclipse.org")
2898 (synopsis "Eclipse Java development tools core batch compiler")
2899 (description "This package provides the Eclipse Java core batch compiler.")
2900 (license license:epl1.0)))
2901
2902(define-public java-cisd-base
2903 (let ((revision 38938)
2904 (base-version "14.12.0"))
2905 (package
2906 (name "java-cisd-base")
2907 (version (string-append base-version "-" (number->string revision)))
2908 (source (origin
2909 (method svn-fetch)
2910 (uri (svn-reference
2911 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2912 "base/tags/release/"
2913 (version-major+minor base-version)
2914 ".x/" base-version "/base/"))
2915 (revision revision)))
2916 (file-name (string-append "java-cisd-base-" version "-checkout"))
2917 (sha256
2918 (base32
2919 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2920 (modules '((guix build utils)))
2921 (snippet
2922 '(begin
2923 ;; Delete included gradle jar
2924 (delete-file-recursively "gradle/wrapper")
2925 ;; Delete pre-built native libraries
2926 (delete-file-recursively "libs")
2927 #t))))
2928 (build-system ant-build-system)
2929 (arguments
2930 `(#:make-flags '("-file" "build/build.xml")
2931 #:test-target "jar-test"
2932 #:jdk ,icedtea-8
2933 #:phases
2934 (modify-phases %standard-phases
2935 (add-after 'unpack 'unpack-build-resources
2936 (lambda* (#:key inputs #:allow-other-keys)
2937 (copy-recursively (assoc-ref inputs "build-resources")
2938 "../build_resources")
2939 #t))
2940 (add-after 'unpack-build-resources 'fix-dependencies
2941 (lambda* (#:key inputs #:allow-other-keys)
2942 (substitute* "build/build.xml"
2943 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2944 (search-input-file inputs
2945 "/share/java/java-testng.jar"))
2946 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2947 (search-input-file inputs
2948 (string-append
2949 "/share/java/commons-lang-"
2950 ,(package-version java-commons-lang)
2951 ".jar")))
2952 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2953 (search-input-file inputs
2954 (string-append
2955 "/lib/m2/commons-io/commons-io/"
2956 ,(package-version java-commons-io)
2957 "/commons-io-"
2958 ,(package-version java-commons-io)
2959 ".jar")))
2960 ;; Remove dependency on svn
2961 (("<build-info.*") "")
2962 (("\\$\\{revision.number\\}")
2963 ,(number->string revision))
2964 (("\\$\\{version.number\\}") ,base-version))
2965 ;; Remove dependency on classycle
2966 (substitute* "../build_resources/ant/build-common.xml"
2967 (("<taskdef name=\"dependency-checker.*") "")
2968 (("classname=\"classycle.*") "")
2969 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2970 #t))
2971 ;; A few tests fail because of the lack of a proper /etc/groups and
2972 ;; /etc/passwd file in the build container.
2973 (add-after 'unpack 'disable-broken-tests
2974 (lambda _
2975 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2976 (("Unix.isOperational\\(\\)") "false"))
2977 #t))
2978 ;; These decorators are almost useless and pull in an unpackaged
2979 ;; dependency.
2980 (add-after 'unpack 'remove-useless-decorators
2981 (lambda _
2982 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2983 (("@Private") "")
2984 (("import ch.rinn.restrictions.Private;") ""))
2985 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2986 (("@Friend.*") "")
2987 (("import ch.rinn.restrictions.Friend;") ""))
2988 #t))
2989 (add-before 'configure 'build-native-code
2990 (lambda* (#:key inputs #:allow-other-keys)
2991 (let ((jdk (assoc-ref inputs "jdk"))
2992 (dir ,(match (%current-system)
2993 ("i686-linux"
2994 "i386-Linux")
2995 ((or "armhf-linux" "aarch64-linux")
2996 "arm-Linux")
2997 ((or "x86_64-linux")
2998 "amd64-Linux")
2999 (_ "unknown-Linux"))))
3000 (with-directory-excursion "source/c"
3001 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3002 (string-append "-I" jdk "/include")
3003 (string-append "-I" jdk "/include/linux")
3004 "-o" "libunix.so")
3005 (invoke "gcc" "-shared" "-O3" "-fPIC"
3006 "-DMACHINE_BYTE_ORDER=1"
3007 "copyCommon.c"
3008 "copyByteChar.c"
3009 "copyByteDouble.c"
3010 "copyByteFloat.c"
3011 "copyByteInt.c"
3012 "copyByteLong.c"
3013 "copyByteShort.c"
3014 (string-append "-I" jdk "/include")
3015 (string-append "-I" jdk "/include/linux")
3016 "-o" "libnativedata.so"))
3017 (install-file "source/c/libunix.so"
3018 (string-append "libs/native/unix/" dir))
3019 (install-file "source/c/libnativedata.so"
3020 (string-append "libs/native/nativedata/" dir))
3021 #t)))
3022 ;; In the "check" phase we only build the test executable.
3023 (add-after 'check 'run-tests
3024 (lambda _
3025 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3026 (delete-file "targets/dist/sis-base-test.jar")
3027 #t))
3028 (replace 'install (install-jars "targets/dist")))))
3029 (native-inputs
3030 `(("jdk" ,icedtea-8)
3031 ("java-commons-lang" ,java-commons-lang)
3032 ("java-commons-io" ,java-commons-io)
3033 ("java-testng" ,java-testng)
3034 ("build-resources"
3035 ,(origin
3036 (method svn-fetch)
3037 (uri (svn-reference
3038 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3039 "base/tags/release/"
3040 (version-major+minor base-version)
3041 ".x/" base-version
3042 "/build_resources/"))
3043 (revision revision)))
3044 (sha256
3045 (base32
3046 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3047 (home-page "https://svnsis.ethz.ch")
3048 (synopsis "Utility classes for libraries from ETH Zurich")
3049 (description "This library supplies some utility classes needed for
3050libraries from the SIS division at ETH Zurich like jHDF5.")
3051 ;; The C sources are under a non-copyleft license, which looks like a
3052 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3053 (license (list license:asl2.0
3054 (license:non-copyleft "file://source/c/COPYING"))))))
3055
3056(define-public java-cisd-args4j
3057 (let ((revision 39162)
3058 (base-version "9.11.2"))
3059 (package
3060 (name "java-cisd-args4j")
3061 (version (string-append base-version "-" (number->string revision)))
3062 (source (origin
3063 (method svn-fetch)
3064 (uri (svn-reference
3065 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3066 "args4j/tags/release/"
3067 (version-major+minor base-version)
3068 ".x/" base-version "/args4j/"))
3069 (revision revision)))
3070 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3071 (sha256
3072 (base32
3073 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3074 (build-system ant-build-system)
3075 (arguments
3076 `(#:make-flags '("-file" "build/build.xml")
3077 #:tests? #f ; there are no tests
3078 #:modules ((guix build ant-build-system)
3079 (guix build utils)
3080 (guix build java-utils)
3081 (sxml simple)
3082 (sxml transform)
3083 (sxml xpath))
3084 #:phases
3085 (modify-phases %standard-phases
3086 (add-after 'unpack 'unpack-build-resources
3087 (lambda* (#:key inputs #:allow-other-keys)
3088 (mkdir-p "../build_resources")
3089 (copy-recursively (assoc-ref inputs "build-resources")
3090 "../build_resources")
3091 (mkdir-p "../build_resources/lib")))
3092 (add-after 'unpack-build-resources 'fix-dependencies
3093 (lambda* (#:key inputs #:allow-other-keys)
3094 ;; FIXME: There should be a more convenient abstraction for
3095 ;; editing XML files.
3096 (with-directory-excursion "../build_resources/ant/"
3097 (chmod "build-common.xml" #o664)
3098 (call-with-output-file "build-common.xml.new"
3099 (lambda (port)
3100 (sxml->xml
3101 (pre-post-order
3102 (with-input-from-file "build-common.xml"
3103 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3104 `(;; Remove dependency on classycle and custom ant tasks
3105 (taskdef . ,(lambda (tag . kids)
3106 (let ((name ((sxpath '(name *text*)) kids)))
3107 (if (or (member "build-info" name)
3108 (member "dependency-checker" name)
3109 (member "build-java-subprojects" name)
3110 (member "project-classpath" name))
3111 '() ; skip
3112 `(,tag ,@kids)))))
3113 (typedef . ,(lambda (tag . kids)
3114 (let ((name ((sxpath '(name *text*)) kids)))
3115 (if (member "recursive-jar" name)
3116 '() ; skip
3117 `(,tag ,@kids)))))
3118 (build-java-subprojects . ,(lambda _ '()))
3119 ;; Ignore everything else
3120 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3121 (*text* . ,(lambda (_ txt) txt))))
3122 port)))
3123 (rename-file "build-common.xml.new" "build-common.xml"))
3124 (substitute* "build/build.xml"
3125 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3126 (search-input-file inputs "/share/java/sis-base.jar"))
3127 ;; Remove dependency on svn
3128 (("<build-info.*") "")
3129 (("\\$\\{revision.number\\}")
3130 ,(number->string revision))
3131 (("\\$\\{version.number\\}") ,base-version)
3132 ;; Don't use custom ant tasks.
3133 (("recursive-jar") "jar")
3134 (("<project-classpath.*") ""))))
3135 (replace 'install (install-jars "targets/dist")))))
3136 (inputs
3137 (list java-cisd-base))
3138 (native-inputs
3139 `(("ecj" ,java-ecj)
3140 ("build-resources"
3141 ,(origin
3142 (method svn-fetch)
3143 (uri (svn-reference
3144 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3145 "args4j/tags/release/"
3146 (version-major+minor base-version)
3147 ".x/" base-version
3148 "/build_resources/"))
3149 (revision revision)))
3150 (sha256
3151 (base32
3152 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3153 (modules '((guix build utils)))
3154 ;; Delete bundled pre-built jars.
3155 (snippet
3156 '(begin (delete-file-recursively "lib/") #t))))))
3157 (home-page "https://svnsis.ethz.ch")
3158 (synopsis "Command line parser library")
3159 (description "This package provides a parser for command line arguments.")
3160 (license license:asl2.0))))
3161
3162(define-public java-cisd-jhdf5
3163 (let ((revision 39162)
3164 (base-version "14.12.6"))
3165 (package
3166 (name "java-cisd-jhdf5")
3167 (version (string-append base-version "-" (number->string revision)))
3168 (source (origin
3169 (method svn-fetch)
3170 (uri (svn-reference
3171 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3172 "jhdf5/tags/release/"
3173 (version-major+minor base-version)
3174 ".x/" base-version "/jhdf5/"))
3175 (revision revision)))
3176 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3177 (sha256
3178 (base32
3179 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3180 (modules '((guix build utils)))
3181 (snippet
3182 '(begin
3183 ;; Delete included gradle jar
3184 (delete-file-recursively "gradle/wrapper")
3185 ;; Delete pre-built native libraries
3186 (delete-file-recursively "libs")))))
3187 (build-system ant-build-system)
3188 (arguments
3189 `(#:make-flags '("-file" "build/build.xml")
3190 #:build-target "jar-all"
3191 #:test-target "jar-test"
3192 #:phases
3193 (modify-phases %standard-phases
3194 ;; FIXME: this build phase fails.
3195 (delete 'generate-jar-indices)
3196 ;; Don't erase results from the build phase when building tests.
3197 (add-after 'unpack 'separate-test-target-from-clean
3198 (lambda _
3199 (substitute* "build/build.xml"
3200 (("\"jar-test\" depends=\"clean, ")
3201 "\"jar-test\" depends=\""))))
3202 (add-after 'unpack 'unpack-build-resources
3203 (lambda* (#:key inputs #:allow-other-keys)
3204 (copy-recursively (assoc-ref inputs "build-resources")
3205 "../build_resources")
3206 (delete-file-recursively "../build_resources/lib/")
3207 (mkdir-p "../build_resources/lib")
3208 ;; Remove dependency on classycle
3209 (substitute* "../build_resources/ant/build-common.xml"
3210 (("<taskdef name=\"dependency-checker.*") "")
3211 (("classname=\"classycle.*") "")
3212 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3213 ;; Remove dependency on svn
3214 (substitute* "build/build.xml"
3215 (("<build-info.*") "")
3216 (("\\$\\{revision.number\\}")
3217 ,(number->string revision))
3218 (("\\$\\{version.number\\}") ,base-version))))
3219 (add-after 'unpack-build-resources 'fix-dependencies
3220 (lambda* (#:key inputs #:allow-other-keys)
3221 (substitute* "../build_resources/ant/build-common.xml"
3222 (("../libraries/testng/testng-jdk15.jar")
3223 (search-input-file inputs
3224 "/share/java/java-testng.jar")))
3225 (substitute* "build/build.xml"
3226 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3227 (search-input-file inputs
3228 "/share/java/sis-base.jar"))
3229 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3230 (search-input-file inputs
3231 "/share/java/cisd-args4j.jar"))
3232 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3233 (search-input-file inputs
3234 (string-append
3235 "/share/java/commons-lang-"
3236 ,(package-version java-commons-lang)
3237 ".jar")))
3238 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3239 (search-input-file inputs
3240 (string-append
3241 "/lib/m2/commons-io/commons-io/"
3242 ,(package-version java-commons-io)
3243 "/commons-io-"
3244 ,(package-version java-commons-io)
3245 ".jar")))
3246 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3247 (search-input-file inputs
3248 "/share/java/java-testng.jar"))
3249 (("\\$\\{lib\\}/junit4/junit.jar")
3250 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3251 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3252 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3253 "jar$"))))
3254 ;; Remove dependency on ch.rinn.restrictions
3255 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3256 (substitute* '("BitSetConversionUtils.java"
3257 "HDF5Utils.java")
3258 (("import ch.rinn.restrictions.Private;") "")
3259 (("@Private") "")))
3260 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3261 (substitute* '("BitSetConversionTest.java"
3262 "h5ar/HDF5ArchiverTest.java")
3263 (("import ch.rinn.restrictions.Friend;") "")
3264 (("@Friend.*") ""))
3265 ;; Remove leftovers from removing @Friend
3266 (substitute* "h5ar/HDF5ArchiverTest.java"
3267 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3268 "")))))
3269 (add-before 'configure 'build-native-library
3270 (lambda* (#:key inputs #:allow-other-keys)
3271 (let ((jdk (assoc-ref inputs "jdk"))
3272 (hdf5 (assoc-ref inputs "hdf5"))
3273 (dir ,(match (%current-system)
3274 ("i686-linux"
3275 "i386-Linux")
3276 ((or "armhf-linux" "aarch64-linux")
3277 "arm-Linux")
3278 ((or "x86_64-linux")
3279 "amd64-Linux")
3280 (_ "unknown-Linux"))))
3281 (with-directory-excursion "source/c"
3282 (apply invoke `("gcc" "-shared" "-O3"
3283 "-fPIC"
3284 "-Wl,--exclude-libs,ALL"
3285 "-Wno-error=implicit-function-declaration"
3286 ,@(find-files "jhdf5" "\\.c$")
3287 ,@(find-files "hdf-java" "\\.c$")
3288 ,(string-append "-I" hdf5 "/include")
3289 ,(string-append "-I" jdk "/include")
3290 ,(string-append "-I" jdk "/include/linux")
3291 ,(string-append hdf5 "/lib/libhdf5.a")
3292 "-o" "libjhdf5.so" "-lz")))
3293 (install-file "source/c/libjhdf5.so"
3294 (string-append "libs/native/jhdf5/" dir)))))
3295 ;; In the "check" phase we only build the test executable.
3296 (add-after 'check 'run-tests
3297 (lambda _
3298 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3299 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3300 (replace 'install
3301 (install-jars "targets/dist")))))
3302 (inputs
3303 (list java-cisd-base
3304 java-cisd-args4j
3305 java-commons-lang
3306 java-commons-io
3307 hdf5-1.8
3308 zlib))
3309 (native-inputs
3310 `(("jdk" ,icedtea-8)
3311 ("java-testng" ,java-testng)
3312 ("java-junit" ,java-junit)
3313 ("java-jmock" ,java-jmock)
3314 ("java-hamcrest-core" ,java-hamcrest-core)
3315 ("build-resources"
3316 ,(origin
3317 (method svn-fetch)
3318 (uri (svn-reference
3319 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3320 "jhdf5/tags/release/"
3321 (version-major+minor base-version)
3322 ".x/" base-version
3323 "/build_resources/"))
3324 (revision revision)))
3325 (sha256
3326 (base32
3327 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3328 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3329 (synopsis "Java binding for HDF5")
3330 (description "JHDF5 is a high-level API in Java for reading and writing
3331HDF5 files, building on the libraries provided by the HDF Group.")
3332 ;; The C sources are under a non-copyleft license, which looks like a
3333 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3334 (license (list license:asl2.0
3335 (license:non-copyleft "file://source/c/COPYING"))))))
3336
3337(define-public java-classpathx-servletapi
3338 (package
3339 (name "java-classpathx-servletapi")
3340 (version "3.0.1")
3341 (source (origin
3342 (method url-fetch)
3343 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3344 "servletapi-" version ".tar.gz"))
3345 (sha256
3346 (base32
3347 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3348 (build-system ant-build-system)
3349 (arguments
3350 `(#:tests? #f ; there is no test target
3351 #:build-target "compile"
3352 #:make-flags
3353 ,#~(list "-Dbuild.compiler=javac1.8"
3354 (string-append "-Ddist=" #$output))
3355 #:phases
3356 (modify-phases %standard-phases
3357 (replace 'install
3358 (lambda* (#:key make-flags #:allow-other-keys)
3359 (apply invoke `("ant" "dist" ,@make-flags)))))))
3360 (home-page "https://www.gnu.org/software/classpathx/")
3361 (synopsis "Java servlet API implementation")
3362 (description "This is the GNU servlet API distribution, part of the
3363ClasspathX project. It provides implementations of version 3.0 of the servlet
3364API and version 2.1 of the Java ServerPages API.")
3365 (license license:gpl3+)))
3366
3367(define-public java-javaee-servletapi
3368 (package
3369 (name "java-javaee-servletapi")
3370 (version "3.1.0")
3371 (source (origin
3372 (method git-fetch)
3373 (uri (git-reference
3374 (url "https://github.com/javaee/servlet-spec")
3375 (commit version)))
3376 (file-name (git-file-name name version))
3377 (sha256
3378 (base32
3379 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3380 (build-system ant-build-system)
3381 (arguments
3382 `(#:jar-name "javax-servletapi.jar"
3383 ;; no tests
3384 #:tests? #f
3385 #:source-dir "src/main/java"
3386 #:phases
3387 (modify-phases %standard-phases
3388 (add-before 'build 'copy-resources
3389 (lambda _
3390 (mkdir-p "build/classes/javax/servlet/http")
3391 (let ((from-prefix "src/main/java/javax/servlet/")
3392 (to-prefix "build/classes/javax/servlet/"))
3393 (for-each (lambda (f)
3394 (copy-file (string-append from-prefix f)
3395 (string-append to-prefix f)))
3396 (list "LocalStrings_ja.properties"
3397 "LocalStrings.properties"
3398 "LocalStrings_fr.properties"
3399 "http/LocalStrings_es.properties"
3400 "http/LocalStrings_ja.properties"
3401 "http/LocalStrings.properties"
3402 "http/LocalStrings_fr.properties")))
3403 #t)))))
3404 (native-inputs
3405 (list unzip))
3406 (home-page "https://javaee.github.io/servlet-spec/")
3407 (synopsis "Java servlet API")
3408 (description "Java Servlet is the foundation web specification in the
3409Java Enterprise Platform. Developers can build web applications using the
3410Servlet API to interact with the request/response workflow. This project
3411provides information on the continued development of the Java Servlet
3412specification.")
3413 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3414 ;; Some files are licensed under ASL 2.0.
3415 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3416
3417(define-public java-jsvg-1.6.1
3418 (package
3419 (name "java-jsvg")
3420 (version "1.6.1")
3421 (source
3422 (origin
3423 (method git-fetch)
3424 (uri (git-reference
3425 (url "https://github.com/weisJ/jsvg")
3426 (commit "v1.6.1-rc1")))
3427 (file-name (git-file-name name version))
3428 (sha256
3429 (base32 "0rcphd1596ps87q31qmksnh1nc4m1x1rrkn9amk3ggwy9l2pavsy"))
3430 (modules '((guix build utils)))
3431 (snippet
3432 ;; Remove @MustBeInvokedByOverriders annotations; not present
3433 ;; in java-jetbrains-annotations 19.0.0.
3434 ;; TODO: Update java-jetbrains-annotations to >= 20.0.0.
3435 '(begin
3436 (substitute* (find-files "." "\\.java$")
3437 (("import org\\.jetbrains\\.annotations\\.MustBeInvokedByOverriders;")
3438 "")
3439 (("@MustBeInvokedByOverriders") ""))
3440 #t))))
3441 (build-system ant-build-system)
3442 (arguments
3443 (list
3444 #:jdk openjdk17
3445 #:tests? #f
3446 ;; ant-build-system does not export a default-modules constant.
3447 #:modules '((guix build ant-build-system)
3448 (guix build java-utils)
3449 (guix build utils)
3450 (sxml simple))
3451 #:phases
3452 #~(modify-phases %standard-phases
3453 (replace 'build
3454 (lambda* (#:key inputs #:allow-other-keys)
3455 (let* ((src-dir "jsvg/src/main/java")
3456 (classes-dir "build/classes")
3457 (jar-file
3458 (string-append "build/jsvg-" #$version ".jar"))
3459 (annotations-cp
3460 (string-join
3461 (append
3462 (find-files (assoc-ref inputs
3463 "java-jetbrains-annotations")
3464 "\\.jar$")
3465 (find-files (assoc-ref inputs
3466 "java-error-prone-annotations")
3467 "\\.jar$"))
3468 ":")))
3469 (mkdir-p classes-dir)
3470 (apply invoke "javac"
3471 "--release" "11"
3472 "-cp" annotations-cp
3473 "-d" classes-dir
3474 (find-files src-dir "\\.java$"))
3475 (invoke "jar" "-cf" jar-file
3476 "-C" classes-dir "."))))
3477 (add-before 'build 'generate-pom
3478 (lambda _
3479 (call-with-output-file "pom.xml"
3480 (lambda (port)
3481 (sxml->xml
3482 `(*TOP*
3483 (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
3484 (project
3485 (modelVersion "4.0.0")
3486 (groupId "com.github.weisj")
3487 (artifactId "jsvg")
3488 (version ,#$version)))
3489 port)))))
3490 (replace 'install
3491 (install-from-pom "pom.xml")))))
3492 (native-inputs
3493 (list java-jetbrains-annotations
3494 java-error-prone-annotations))
3495 (home-page "https://github.com/weisJ/jsvg")
3496 (synopsis "Java SVG rendering library")
3497 (description
3498 "JSVG is a Java library for rendering SVG images. It provides a
3499lightweight SVG parser and renderer using the Java2D API.")
3500 (license license:expat)))
3501
3502(define-public java-jtidy
3503 (package
3504 (name "java-jtidy")
3505 (version "8.0")
3506 (source
3507 (origin
3508 (method git-fetch)
3509 (uri (git-reference
3510 (url "https://github.com/jtidy/jtidy")
3511 (commit "r938")))
3512 (file-name (git-file-name name version))
3513 (sha256
3514 (base32 "1zksmvmrr10nzk5ya6sz0l8093yf3b08lkg76cn4fdv2jqm3cssp"))
3515 ;; Remove xerces:dom3-xml-apis dependency -- DOM Level 3 has been
3516 ;; part of the JDK since Java 5. install-from-pom calls
3517 ;; fix-pom-dependencies which throws no-such-input for
3518 ;; dependencies not in inputs and not test-scoped or optional.
3519 ;; A patch is used because programmatic removal does not work:
3520 ;;
3521 ;; - pre-post-order to filter the dependency from the parsed
3522 ;; SXML, then sxml->xml to write it back: xml->sxml expands
3523 ;; the default xmlns into long tag names like
3524 ;; http://maven.apache.org/POM/4.0.0:dependency, and
3525 ;; sxml->xml's check-name rejects symbols with more than
3526 ;; one colon ("Invalid QName").
3527 ;;
3528 ;; - fix-maven-xml from (guix build maven pom) strips those
3529 ;; namespace prefixes before sxml->xml, but it is not
3530 ;; exported.
3531 ;;
3532 ;; - fix-pom-dependencies #:excludes: the excludes parameter
3533 ;; only affects plugins (fix-plugins) and extensions
3534 ;; (fix-extensions), not dependencies -- fix-deps and
3535 ;; fix-dep do not check excludes.
3536 (patches
3537 (search-patches "java-jtidy-remove-xerces-dependency.patch"))))
3538 (build-system ant-build-system)
3539 (arguments
3540 (list
3541 #:jar-name "jtidy.jar"
3542 #:source-dir "src/main/java"
3543 #:test-dir "src/test"
3544 ;; Tests are disabled: upstream's pom.xml sets testFailureIgnore=true
3545 ;; because 140 of 216 .msg reference files have wrong expected message
3546 ;; counts -- the code changed but the test data was never updated.
3547 #:tests? #f
3548 #:phases
3549 #~(modify-phases %standard-phases
3550 (add-before 'build 'copy-resources
3551 (lambda _
3552 (copy-recursively "src/main/resources" "build/classes")))
3553 (replace 'install
3554 (install-from-pom "pom.xml")))))
3555 (inputs
3556 (list java-slf4j-api))
3557 (home-page "https://github.com/jtidy/jtidy")
3558 (synopsis "Java port of HTML Tidy, an HTML syntax checker and pretty printer")
3559 (description
3560 "JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
3561printer. Like its non-Java cousin, JTidy can be used as a tool for cleaning
3562up malformed and faulty HTML. In addition, JTidy provides a DOM interface to
3563the document that is being processed, which effectively makes it a Java HTML
3564parser.")
3565 (license license:w3c)))
3566
3567(define-public java-swt
3568 (package
3569 (name "java-swt")
3570 (version "4.7.1a")
3571 (source
3572 ;; The types of many variables and procedures differ in the sources
3573 ;; dependent on whether the target architecture is a 32-bit system or a
3574 ;; 64-bit system. Instead of patching the sources on demand in a build
3575 ;; phase we download either the 32-bit archive (which mostly uses "int"
3576 ;; types) or the 64-bit archive (which mostly uses "long" types).
3577 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3578 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3579 (file32 "x86")
3580 (file64 "x86_64"))
3581 (let-values (((hash file)
3582 (match (or (%current-target-system) (%current-system))
3583 ("x86_64-linux" (values hash64 file64))
3584 (_ (values hash32 file32)))))
3585 (origin
3586 (method url-fetch)
3587 (uri (string-append
3588 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3589 "R-" version "-201710090410/swt-" version
3590 "-gtk-linux-" file ".zip"))
3591 (sha256 (base32 hash))))))
3592 (build-system ant-build-system)
3593 (arguments
3594 `(#:jar-name "swt.jar"
3595 #:jdk ,icedtea-8
3596 #:tests? #f ; no "check" target
3597 #:phases
3598 (modify-phases %standard-phases
3599 (replace 'unpack
3600 (lambda* (#:key source #:allow-other-keys)
3601 (mkdir "swt")
3602 (invoke "unzip" source "-d" "swt")
3603 (chdir "swt")
3604 (mkdir "src")
3605 (invoke "unzip" "src.zip" "-d" "src")))
3606 ;; The classpath contains invalid icecat jars. Since we don't need
3607 ;; anything other than the JDK on the classpath, we can simply unset
3608 ;; it.
3609 (add-after 'configure 'unset-classpath
3610 (lambda _ (unsetenv "CLASSPATH") #t))
3611 (add-before 'build 'build-native
3612 (lambda* (#:key inputs outputs #:allow-other-keys)
3613 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3614 ;; Build shared libraries. Users of SWT have to set the system
3615 ;; property swt.library.path to the "lib" directory of this
3616 ;; package output.
3617 (mkdir-p lib)
3618 (setenv "OUTPUT_DIR" lib)
3619 (setenv "CC" ,(cc-for-target))
3620 (with-directory-excursion "src"
3621 (invoke "bash" "build.sh")))))
3622 (add-after 'install 'install-native
3623 (lambda* (#:key outputs #:allow-other-keys)
3624 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3625 (for-each (lambda (file)
3626 (install-file file lib))
3627 (find-files "." "\\.so$"))
3628 #t))))))
3629 (inputs
3630 `(("gtk" ,gtk+-2)
3631 ("libxtst" ,libxtst)
3632 ("libxt" ,libxt)
3633 ("mesa" ,mesa)
3634 ("glu" ,glu)))
3635 (native-inputs
3636 (list pkg-config unzip))
3637 (home-page "https://www.eclipse.org/swt/")
3638 (synopsis "Widget toolkit for Java")
3639 (description
3640 "SWT is a widget toolkit for Java designed to provide efficient, portable
3641access to the user-interface facilities of the operating systems on which it
3642is implemented.")
3643 ;; SWT code is licensed under EPL1.0
3644 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3645 ;; Cairo bindings contain code under MPL1.1
3646 ;; XULRunner 1.9 bindings contain code under MPL2.0
3647 (license (list
3648 license:epl1.0
3649 license:mpl1.1
3650 license:mpl2.0
3651 license:lgpl2.1+))))
3652
3653;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3654;; of the latest release.
3655(define-public java-qdox-1.12
3656 (package
3657 (name "java-qdox")
3658 (version "1.12.1")
3659 (source (origin
3660 (method url-fetch)
3661 (uri (string-append "https://repo1.maven.org/maven2/"
3662 "com/thoughtworks/qdox/qdox/" version
3663 "/qdox-" version "-sources.jar"))
3664 (sha256
3665 (base32
3666 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3667 (build-system ant-build-system)
3668 (arguments
3669 `(;; Tests require junit
3670 #:tests? #f
3671 #:jar-name "qdox.jar"
3672 #:phases
3673 (modify-phases %standard-phases
3674 (replace 'unpack
3675 (lambda* (#:key source #:allow-other-keys)
3676 (mkdir "src")
3677 (with-directory-excursion "src"
3678 (invoke "jar" "-xf" source))))
3679 ;; At this point we don't have junit, so we must remove the API
3680 ;; tests.
3681 (add-after 'unpack 'delete-tests
3682 (lambda _
3683 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3684 #t)))))
3685 (home-page "https://github.com/codehaus/qdox")
3686 (synopsis "Parse definitions from Java source files")
3687 (description
3688 "QDox is a high speed, small footprint parser for extracting
3689class/interface/method definitions from source files complete with JavaDoc
3690@code{@@tags}. It is designed to be used by active code generators or
3691documentation tools.")
3692 (license license:asl2.0)))
3693
3694(define-public java-qdox
3695 (package
3696 (name "java-qdox")
3697 ; Newer version exists, but this version is required by java-plexus-component-metadata
3698 (version "2.0-M2")
3699 (source (origin
3700 (method url-fetch)
3701 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3702 ;; Older releases at https://github.com/codehaus/qdox/
3703 ;; Note: The release at maven is pre-generated. The release at
3704 ;; github requires jflex.
3705 (uri (string-append "https://repo1.maven.org/maven2/"
3706 "com/thoughtworks/qdox/qdox/" version
3707 "/qdox-" version "-sources.jar"))
3708 (sha256
3709 (base32
3710 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3711 (build-system ant-build-system)
3712 (arguments
3713 `(#:jar-name "qdox.jar"
3714 #:tests? #f; no tests
3715 #:phases
3716 (modify-phases %standard-phases
3717 (add-before 'install 'create-pom
3718 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3719 #:name "QDox"))
3720 (replace 'install
3721 (install-from-pom "pom.xml")))))
3722 (home-page "https://github.com/codehaus/qdox")
3723 (synopsis "Parse definitions from Java source files")
3724 (description "QDox is a high speed, small footprint parser for extracting
3725class/interface/method definitions from source files complete with JavaDoc
3726@code{@@tags}. It is designed to be used by active code generators or
3727documentation tools.")
3728 (license license:asl2.0)))
3729
3730(define-public java-qdox-2-M9
3731 (package
3732 (inherit java-qdox)
3733 (version "2.0-M9"); required by plexus-java
3734 (source (origin
3735 (method url-fetch)
3736 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3737 ;; Older releases at https://github.com/codehaus/qdox/
3738 ;; Note: The release at maven is pre-generated. The release at
3739 ;; github requires jflex.
3740 (uri (string-append "https://repo1.maven.org/maven2/"
3741 "com/thoughtworks/qdox/qdox/" version
3742 "/qdox-" version "-sources.jar"))
3743 (sha256
3744 (base32
3745 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3746 (arguments
3747 (substitute-keyword-arguments (package-arguments java-qdox)
3748 ((#:phases phases)
3749 `(modify-phases ,phases
3750 (replace 'create-pom
3751 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3752 #:name "QDox"))))))))
3753
3754(define-public java-jarjar
3755 (package
3756 (name "java-jarjar")
3757 (version "1.4")
3758 (source (origin
3759 (method url-fetch)
3760 (uri (string-append
3761 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3762 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3763 (sha256
3764 (base32
3765 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3766 (modules '((guix build utils)))
3767 (snippet
3768 '(begin
3769 ;; Delete bundled thirds-party jar archives.
3770 (delete-file-recursively "lib")
3771 (delete-file "src/test/enumtest.jar")
3772 ;; the CLASSPATH needs this directory, create an empty one
3773 (mkdir-p "lib")
3774 #t))))
3775 (build-system ant-build-system)
3776 (arguments
3777 `(;; Tests require junit, which ultimately depends on this package.
3778 #:tests? #f
3779 #:build-target "jar"
3780 #:phases
3781 (modify-phases %standard-phases
3782 (add-before 'build 'do-not-use-bundled-asm
3783 (lambda* (#:key inputs #:allow-other-keys)
3784 (substitute* "build.xml"
3785 (("<path id=\"path.build\">")
3786 (string-append "<path id=\"path.build\"><fileset dir=\""
3787 (assoc-ref inputs "java-asm-bootstrap")
3788 "/lib/m2\" includes=\"**/*.jar\"/>"))
3789 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3790 (("lib/asm-commons-4.0.jar")
3791 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3792 "asm-6.0.jar")))
3793 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3794 (string-append "<include name=\"org/objectweb/asm/"
3795 "commons/Remap*.class\"/>"
3796 "<include name=\"org/objectweb/asm/*.class\"/>"
3797 "<include name=\"org/objectweb/asm/"
3798 "signature/*.class\"/>"
3799 "<include name=\"org/objectweb/asm/"
3800 "commons/SignatureRemapper.class\"/>")))
3801 #t))
3802 (add-before 'build 'remove-maven-dependency
3803 (lambda _
3804 ;; We do not need to build jarjar as a maven plugin just yet, so
3805 ;; remove this file. Maven requires jarjar (but not that plugin),
3806 ;; so removing it improves the bootstrap.
3807 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3808 #t))
3809 (replace 'install
3810 (lambda* (#:key outputs #:allow-other-keys)
3811 (let ((target (string-append (assoc-ref outputs "out")
3812 "/share/java")))
3813 (install-file (string-append "dist/jarjar-" ,version ".jar")
3814 target))
3815 #t)))))
3816 (inputs
3817 (list java-asm-bootstrap))
3818 (native-inputs
3819 (list unzip))
3820 (home-page "https://code.google.com/archive/p/jarjar/")
3821 (synopsis "Repackage Java libraries")
3822 (description
3823 "Jar Jar Links is a utility that makes it easy to repackage Java
3824libraries and embed them into your own distribution. Jar Jar Links includes
3825an Ant task that extends the built-in @code{jar} task.")
3826 (license license:asl2.0)))
3827
3828(define-public java-hamcrest
3829 (package
3830 (name "java-hamcrest")
3831 (version "3.0")
3832 (source (origin
3833 (method git-fetch)
3834 (uri (git-reference
3835 (url "https://github.com/hamcrest/JavaHamcrest/")
3836 (commit (string-append "v" version))))
3837 (file-name (git-file-name name version))
3838 (sha256
3839 (base32
3840 "07cagv2ncs4y02fmwbll3r4rqpjf3zxs163ync24q3x9fplrxmly"))))
3841 (build-system ant-build-system)
3842 (arguments
3843 `(#:tests? #f ; Tests require junit
3844 #:source-dir "hamcrest/src/main"
3845 #:jar-name "hamcrest.jar"))
3846 (home-page "https://hamcrest.org/")
3847 (synopsis "Library of matchers for building test expressions")
3848 (description
3849 "This package provides a library of matcher objects (also known as
3850constraints or predicates) allowing @code{match} rules to be defined
3851declaratively, to be used in other frameworks. Typical scenarios include
3852testing frameworks, mocking libraries and UI validation rules.")
3853 (license license:bsd-3)))
3854
3855(define-public java-hamcrest-core
3856 (package
3857 (name "java-hamcrest-core")
3858 (version "1.3")
3859 (properties `((superseded . ,java-hamcrest)))
3860 (source (origin
3861 (method git-fetch)
3862 (uri (git-reference
3863 (url "https://github.com/hamcrest/JavaHamcrest/")
3864 (commit (string-append "hamcrest-java-" version))))
3865 (file-name (git-file-name name version))
3866 (sha256
3867 (base32
3868 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3869 (modules '((guix build utils)))
3870 (snippet
3871 '(begin
3872 ;; Delete bundled thirds-party jar archives.
3873 (delete-file-recursively "lib")
3874 #t))))
3875 (build-system ant-build-system)
3876 (arguments
3877 `(#:tests? #f ; Tests require junit
3878 #:modules ((guix build ant-build-system)
3879 (guix build java-utils)
3880 (guix build utils)
3881 (srfi srfi-1))
3882 #:make-flags (list (string-append "-Dversion=" ,version))
3883 #:test-target "unit-test"
3884 #:build-target "core"
3885 #:phases
3886 (modify-phases %standard-phases
3887 ;; Disable unit tests, because they require junit, which requires
3888 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3889 ;; attribute from the manifest for reproducibility.
3890 (add-before 'configure 'patch-build.xml
3891 (lambda _
3892 (substitute* "build.xml"
3893 (("unit-test, ") "")
3894 (("\\$\\{build.timestamp\\}") "guix"))
3895 #t))
3896 ;; Java's "getMethods()" returns methods in an unpredictable order.
3897 ;; To make the output of the generated code deterministic we must
3898 ;; sort the array of methods.
3899 (add-after 'unpack 'make-method-order-deterministic
3900 (lambda _
3901 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3902 (("import java\\.util\\.Iterator;" line)
3903 (string-append line "\n"
3904 "import java.util.Arrays; import java.util.Comparator;"))
3905 (("allMethods = cls\\.getMethods\\(\\);" line)
3906 (string-append "_" line
3907 "
3908private Method[] getSortedMethods() {
3909 Arrays.sort(_allMethods, new Comparator<Method>() {
3910 @Override
3911 public int compare(Method a, Method b) {
3912 return a.toString().compareTo(b.toString());
3913 }
3914 });
3915 return _allMethods;
3916}
3917
3918private Method[] allMethods = getSortedMethods();")))
3919 #t))
3920 (add-before 'build 'do-not-use-bundled-qdox
3921 (lambda* (#:key inputs #:allow-other-keys)
3922 (substitute* "build.xml"
3923 (("lib/generator/qdox-1.12.jar")
3924 (string-append (assoc-ref inputs "java-qdox-1.12")
3925 "/share/java/qdox.jar")))
3926 #t))
3927 ;; build.xml searches for .jar files in this directoy, which
3928 ;; we remove from the source archive.
3929 (add-before 'build 'create-dummy-directories
3930 (lambda _
3931 (mkdir-p "lib/integration")
3932 #t))
3933 (add-before 'build 'create-pom
3934 (lambda _
3935 (substitute* "pom/hamcrest-core.pom"
3936 (("@VERSION@") ,version))
3937 #t))
3938 (replace 'install
3939 (install-from-pom "pom/hamcrest-core.pom")))))
3940 (native-inputs
3941 `(("java-qdox-1.12" ,java-qdox-1.12)
3942 ("java-jarjar" ,java-jarjar)))
3943 (propagated-inputs
3944 (list java-hamcrest-parent-pom))
3945 (home-page "https://hamcrest.org/")
3946 (synopsis "Library of matchers for building test expressions")
3947 (description
3948 "This package provides a library of matcher objects (also known as
3949constraints or predicates) allowing @code{match} rules to be defined
3950declaratively, to be used in other frameworks. Typical scenarios include
3951testing frameworks, mocking libraries and UI validation rules.")
3952 (license license:bsd-2)))
3953
3954(define-public java-hamcrest-parent-pom
3955 (package
3956 (inherit java-hamcrest-core)
3957 (properties '((hidden? . #t)))
3958 (name "java-hamcrest-parent-pom")
3959 (propagated-inputs '())
3960 (native-inputs '())
3961 (arguments
3962 `(#:tests? #f
3963 #:phases
3964 (modify-phases %standard-phases
3965 (delete 'configure)
3966 (replace 'build
3967 (lambda _
3968 (substitute* "pom/hamcrest-parent.pom"
3969 (("@VERSION@") ,(package-version java-hamcrest-core)))
3970 #t))
3971 (replace 'install
3972 (install-pom-file "pom/hamcrest-parent.pom")))))))
3973
3974(define-public java-hamcrest-library
3975 (package
3976 (inherit java-hamcrest-core)
3977 (name "java-hamcrest-library")
3978 (properties `((superseded . ,java-hamcrest)))
3979 (arguments
3980 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3981 ((#:build-target _) "library")
3982 ((#:phases phases)
3983 `(modify-phases ,phases
3984 (add-after 'unpack 'patch-classpath-for-integration
3985 (lambda* (#:key inputs #:allow-other-keys)
3986 (substitute* "build.xml"
3987 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3988 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3989 "jar$"))))
3990 #t))
3991 (replace 'create-pom
3992 (lambda _
3993 (substitute* "pom/hamcrest-library.pom"
3994 (("@VERSION@") ,(package-version java-hamcrest-core)))
3995 #t))
3996 (replace 'install
3997 (install-from-pom "pom/hamcrest-library.pom"))))))
3998 (propagated-inputs
3999 (list java-hamcrest-core java-hamcrest-parent-pom))))
4000
4001(define-public java-junit
4002 (package
4003 (name "java-junit")
4004 (version "4.12")
4005 (source (origin
4006 (method git-fetch)
4007 (uri (git-reference
4008 (url "https://github.com/junit-team/junit/")
4009 (commit (string-append "r" version))))
4010 (file-name (git-file-name name version))
4011 (sha256
4012 (base32
4013 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4014 (modules '((guix build utils)))
4015 (snippet
4016 '(begin
4017 ;; Delete bundled jar archives.
4018 (delete-file-recursively "lib")
4019 #t))))
4020 (build-system ant-build-system)
4021 (arguments
4022 `(#:jar-name "junit.jar"
4023 #:source-dir "src/main/java"
4024 #:test-dir "src/test"
4025 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4026 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4027 #:phases
4028 (modify-phases %standard-phases
4029 (add-before 'check 'copy-test-resources
4030 (lambda _
4031 (copy-recursively "src/test/resources" "build/test-classes")
4032 #t))
4033 (replace 'install
4034 (install-from-pom "pom.xml")))))
4035 (propagated-inputs
4036 (list java-hamcrest-core))
4037 (native-inputs
4038 (list java-hamcrest-library))
4039 (home-page "https://junit.org/junit4/")
4040 (synopsis "Test framework for Java")
4041 (description
4042 "JUnit is a simple framework to write repeatable tests for Java projects.
4043JUnit provides assertions for testing expected results, test fixtures for
4044sharing common test data, and test runners for running tests.")
4045 (license license:epl1.0)))
4046
4047(define-public java-junit-4.13.2
4048 (package
4049 (inherit java-junit)
4050 (name "java-junit")
4051 (version "4.13.2")
4052 (source
4053 (origin
4054 (method git-fetch)
4055 (uri (git-reference
4056 (url "https://github.com/junit-team/junit/")
4057 (commit (string-append "r" version))))
4058 (file-name (git-file-name "java-junit" version))
4059 (sha256
4060 (base32 "1r7k4zzscc8019np3is3bzfigw8fxd6s3259cbhzzh02q6d5p9h3"))))
4061 (propagated-inputs
4062 (list java-hamcrest))))
4063
4064(define-public java-junitparams
4065 (package
4066 (name "java-junitparams")
4067 (version "1.1.1")
4068 (source (origin
4069 (method git-fetch)
4070 (uri (git-reference
4071 (url "https://github.com/Pragmatists/JUnitParams")
4072 (commit (string-append "JUnitParams-" version))))
4073 (file-name (git-file-name name version))
4074 (sha256
4075 (base32
4076 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4077 (build-system ant-build-system)
4078 (arguments
4079 `(#:jar-name "junitparams.jar"
4080 #:source-dir "src/main/java"
4081 #:test-dir "src/test"
4082 #:test-exclude (list "**/SuperclassTest.java")))
4083 (inputs
4084 (list java-junit))
4085 (native-inputs
4086 (list java-junit java-hamcrest-core java-assertj))
4087 (home-page "https://github.com/Pragmatists/JUnitParams")
4088 (synopsis "Parameterised test support for JUnit")
4089 (description "The JUnitParams project adds a new runner to JUnit and
4090provides much easier and readable parametrised tests for JUnit.")
4091 (license license:asl2.0)))
4092
4093(define-public java-plexus-utils
4094 (package
4095 (name "java-plexus-utils")
4096 (version "3.3.0")
4097 (source (origin
4098 (method git-fetch)
4099 (uri (git-reference
4100 (url "https://github.com/codehaus-plexus/plexus-utils")
4101 (commit (string-append "plexus-utils-" version))))
4102 (file-name (git-file-name name version))
4103 (sha256
4104 (base32
4105 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
4106 (build-system ant-build-system)
4107 ;; FIXME: The default build.xml does not include a target to install
4108 ;; javadoc files.
4109 (arguments
4110 `(#:jar-name "plexus-utils.jar"
4111 #:source-dir "src/main"
4112 #:phases
4113 (modify-phases %standard-phases
4114 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4115 (lambda _
4116 (substitute* "src/main/java/org/codehaus/plexus/util/\
4117cli/shell/BourneShell.java"
4118 (("/bin/sh") (which "sh"))
4119 (("/usr/") (getcwd)))
4120 #t))
4121 (add-after 'unpack 'fix-or-disable-broken-tests
4122 (lambda _
4123 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4124 (substitute* '("cli/CommandlineTest.java"
4125 "cli/shell/BourneShellTest.java")
4126 (("/bin/sh") (which "sh"))
4127 (("/bin/echo") (which "echo")))
4128
4129 ;; This test depends on MavenProjectStub, but we don't have
4130 ;; a package for Maven.
4131 (delete-file "introspection/ReflectionValueExtractorTest.java")
4132
4133 ;; FIXME: The command line tests fail, maybe because they use
4134 ;; absolute paths.
4135 (delete-file "cli/CommandlineTest.java")
4136
4137 ;; These tests require openjdk jmh, which is not packaged yet
4138 (for-each delete-file (find-files "." "PerfTest.java$")))
4139 #t))
4140 (add-before 'build 'copy-resources
4141 (lambda _
4142 (copy-recursively "src/main/resources" "build/classes")
4143 #t))
4144 (replace 'install (install-from-pom "pom.xml")))))
4145 (native-inputs
4146 (list java-hamcrest-core java-junit))
4147 (propagated-inputs
4148 (list plexus-parent-pom-5.1))
4149 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4150 (synopsis "Common utilities for the Plexus framework")
4151 (description "This package provides various Java utility classes for the
4152Plexus framework to ease working with strings, files, command lines, XML and
4153more.")
4154 (license license:asl2.0)))
4155
4156(define-public java-plexus-utils-3.2.1
4157 (package
4158 (inherit java-plexus-utils)
4159 ;; plexus-build-api needs this version, later versions don't work
4160 (version "3.2.1")
4161 (source (origin
4162 (method git-fetch)
4163 (uri (git-reference
4164 (url "https://github.com/codehaus-plexus/plexus-utils")
4165 (commit (string-append "plexus-utils-" version))))
4166 (file-name (git-file-name "java-plexus-utils" version))
4167 (sha256
4168 (base32
4169 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
4170
4171(define-public java-plexus-interpolation
4172 (package
4173 (name "java-plexus-interpolation")
4174 (version "1.26")
4175 (source (origin
4176 (method git-fetch)
4177 (uri (git-reference
4178 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4179 (commit (string-append "plexus-interpolation-" version))))
4180 (file-name (git-file-name name version))
4181 (sha256
4182 (base32
4183 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4184 (build-system ant-build-system)
4185 (arguments
4186 `(#:jar-name "plexus-interpolation.jar"
4187 #:source-dir "src/main"
4188 #:phases
4189 (modify-phases %standard-phases
4190 (replace 'install (install-from-pom "pom.xml")))))
4191 (propagated-inputs
4192 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4193 (native-inputs
4194 (list java-junit java-hamcrest-core))
4195 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4196 (synopsis "Java components for interpolating ${} strings and the like")
4197 (description "Plexus interpolator is a modular, flexible interpolation
4198framework for the expression language style commonly seen in Maven, Plexus,
4199and other related projects.
4200
4201It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4202package within @code{plexus-utils}, but has been separated in order to allow
4203these two libraries to vary independently of one another.")
4204 (license license:asl2.0)))
4205
4206(define-public java-plexus-classworlds
4207 (package
4208 (name "java-plexus-classworlds")
4209 (version "2.6.0")
4210 (source (origin
4211 (method git-fetch)
4212 (uri (git-reference
4213 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4214 (commit (string-append "plexus-classworlds-" version))))
4215 (file-name (git-file-name name version))
4216 (sha256
4217 (base32
4218 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4219 (build-system ant-build-system)
4220 (arguments
4221 `(#:jar-name "plexus-classworlds.jar"
4222 #:source-dir "src/main"
4223 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4224 #:phases
4225 (modify-phases %standard-phases
4226 (replace 'install (install-from-pom "pom.xml")))))
4227 (propagated-inputs
4228 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4229 (native-inputs
4230 (list java-junit))
4231 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4232 (synopsis "Java class loader framework")
4233 (description "Plexus classworlds replaces the native @code{ClassLoader}
4234mechanism of Java. It is especially useful for dynamic loading of application
4235components.")
4236 (license license:asl2.0)))
4237
4238(define-public java-plexus-container-default-bootstrap
4239 (package
4240 (name "java-plexus-container-default-bootstrap")
4241 (version "2.1.0")
4242 (source (origin
4243 (method git-fetch)
4244 (uri (git-reference
4245 (url "https://github.com/codehaus-plexus/plexus-containers")
4246 (commit (string-append "plexus-containers-" version))))
4247 (file-name (git-file-name name version))
4248 (sha256
4249 (base32
4250 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
4251 (build-system ant-build-system)
4252 (arguments
4253 `(#:jar-name "container-default.jar"
4254 #:source-dir "plexus-container-default/src/main/java"
4255 #:test-dir "plexus-container-default/src/test"
4256 #:tests? #f; requires plexus-archiver, which depends on this package
4257 #:phases
4258 (modify-phases %standard-phases
4259 (add-before 'build 'fix-google-collections
4260 (lambda _
4261 ;; Google collections are now replaced with guava
4262 (substitute* "plexus-container-default/pom.xml"
4263 (("google-collections") "guava")
4264 (("com.google.collections") "com.google.guava"))
4265 #t))
4266 (add-before 'build 'copy-resources
4267 (lambda _
4268 (copy-recursively
4269 "plexus-container-default/src/main/resources/"
4270 "build/classes")
4271 #t))
4272 (replace 'install
4273 (install-from-pom "plexus-container-default/pom.xml")))))
4274 (propagated-inputs
4275 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4276 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4277 ("java-plexus-utils" ,java-plexus-utils)
4278 ("java-junit" ,java-junit)
4279 ("java-guava" ,java-guava)
4280 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4281 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4282 (synopsis "Inversion-of-control container")
4283 (description "Plexus-default-container is Plexus' inversion-of-control
4284(@dfn{IoC}) container. It is composed of its public API and its default
4285implementation.")
4286 (properties '((hidden? . #t))) ;for bootstrapping purposes only
4287 (license license:asl2.0)))
4288
4289(define java-plexus-containers-parent-pom
4290 (package
4291 (inherit java-plexus-container-default-bootstrap)
4292 (name "java-plexus-containers-parent-pom")
4293 (arguments
4294 `(#:tests? #f
4295 #:phases
4296 (modify-phases %standard-phases
4297 (delete 'configure)
4298 (delete 'build)
4299 (replace 'install
4300 (install-pom-file "pom.xml")))))
4301 (propagated-inputs
4302 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4303
4304(define-public java-plexus-io
4305 (package
4306 (name "java-plexus-io")
4307 (version "3.2.0")
4308 (source (origin
4309 (method git-fetch)
4310 (uri (git-reference
4311 (url "https://github.com/codehaus-plexus/plexus-io")
4312 (commit (string-append "plexus-io-" version))))
4313 (file-name (git-file-name name version))
4314 (sha256
4315 (base32
4316 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4317 (build-system ant-build-system)
4318 (arguments
4319 `(#:jar-name "plexus-io.jar"
4320 #:source-dir "src/main/java"
4321 #:test-dir "src/test"
4322 #:phases
4323 (modify-phases %standard-phases
4324 (add-before 'build 'copy-resources
4325 (lambda _
4326 (mkdir-p "build/classes")
4327 (copy-recursively "src/main/resources" "build/classes")
4328 (mkdir-p "build/test-classes")
4329 (copy-recursively "src/test/resources" "build/test-classes")
4330 #t))
4331 (replace 'install (install-from-pom "pom.xml")))))
4332 (propagated-inputs
4333 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
4334 (inputs
4335 (list java-jsr305))
4336 (native-inputs
4337 `(("junit" ,java-junit)
4338 ("hamcrest" ,java-hamcrest-core)
4339 ("guava" ,java-guava)
4340 ("classworlds" ,java-plexus-classworlds)
4341 ("xbean" ,java-geronimo-xbean-reflect)
4342 ("container-default" ,java-plexus-container-default-bootstrap)))
4343 (home-page "https://github.com/codehaus-plexus/plexus-io")
4344 (synopsis "I/O plexus components")
4345 (description "Plexus IO is a set of plexus components, which are designed
4346for use in I/O operations. This implementation using plexus components allows
4347reusing it in maven.")
4348 (license license:asl2.0)))
4349
4350(define-public java-plexus-archiver
4351 (package
4352 (name "java-plexus-archiver")
4353 (version "4.2.2")
4354 (source (origin
4355 (method url-fetch)
4356 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4357 "/archive/plexus-archiver-" version ".tar.gz"))
4358 (sha256
4359 (base32
4360 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4361 (build-system ant-build-system)
4362 (arguments
4363 `(#:jar-name "plexus-archiver.jar"
4364 #:source-dir "src/main/java"
4365 #:test-dir "src/test"
4366 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4367 #:phases
4368 (modify-phases %standard-phases
4369 (add-before 'check 'remove-failing
4370 (lambda _
4371 ;; Requires an older version of plexus container
4372 (delete-file
4373 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4374 #t))
4375 (add-before 'check 'fix-test-building
4376 (lambda _
4377 (substitute* "build.xml"
4378 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4379 #t))
4380 (add-before 'build 'copy-resources
4381 (lambda _
4382 (mkdir-p "build/classes")
4383 (copy-recursively "src/main/resources" "build/classes")
4384 (mkdir-p "build/test-classes")
4385 (copy-recursively "src/test/resources" "build/test-classes")
4386 #t))
4387 (replace 'install (install-from-pom "pom.xml")))))
4388 (propagated-inputs
4389 (list java-plexus-utils java-plexus-io java-iq80-snappy
4390 java-commons-compress-1.21 plexus-parent-pom-6.1))
4391 (inputs
4392 `(("java-jsr305" ,java-jsr305)
4393 ("java-plexus-container-default"
4394 ,java-plexus-container-default-bootstrap)))
4395 (native-inputs
4396 `(("java-hamcrest-core" ,java-hamcrest-core)
4397 ("junit" ,java-junit)
4398 ("classworld" ,java-plexus-classworlds)
4399 ("xbean" ,java-geronimo-xbean-reflect)
4400 ("xz" ,java-xz)
4401 ("guava" ,java-guava)))
4402 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4403 (synopsis "Archiver component of the Plexus project")
4404 (description "Plexus-archiver contains a component to deal with project
4405archives (jar).")
4406 (license license:asl2.0)))
4407
4408(define-public java-plexus-container-default
4409 (package
4410 (inherit java-plexus-container-default-bootstrap)
4411 (name "java-plexus-container-default")
4412 (arguments
4413 `(#:jar-name "container-default.jar"
4414 #:source-dir "plexus-container-default/src/main/java"
4415 #:test-dir "plexus-container-default/src/test"
4416 #:test-exclude (list ;"**/*Test.java"
4417 "**/Abstract*.java"
4418 ;; Requires plexus-hierarchy
4419 "**/PlexusHierarchyTest.java"
4420 ;; Failures
4421 "**/ComponentRealmCompositionTest.java"
4422 "**/PlexusContainerTest.java")
4423 #:phases
4424 (modify-phases %standard-phases
4425 (add-before 'build 'fix-google-collections
4426 (lambda _
4427 ;; Google collections are now replaced with guava
4428 (substitute* "plexus-container-default/pom.xml"
4429 (("google-collections") "guava")
4430 (("com.google.collections") "com.google.guava"))
4431 #t))
4432 (add-before 'build 'copy-resources
4433 (lambda _
4434 (copy-recursively
4435 "plexus-container-default/src/main/resources/"
4436 "build/classes")
4437 #t))
4438 (add-before 'check 'fix-paths
4439 (lambda _
4440 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4441 (substitute*
4442 (string-append
4443 dir "/plexus/component/composition/"
4444 "ComponentRealmCompositionTest.java")
4445 (("src/test") "plexus-container-default/src/test"))
4446 #t)))
4447 (replace 'install
4448 (install-from-pom "plexus-container-default/pom.xml")))))
4449 (inputs
4450 `(("worldclass" ,java-plexus-classworlds)
4451 ("xbean" ,java-geronimo-xbean-reflect)
4452 ("utils" ,java-plexus-utils)
4453 ("junit" ,java-junit)
4454 ("guava" ,java-guava)))
4455 (native-inputs
4456 `(("archiver" ,java-plexus-archiver)
4457 ("hamcrest" ,java-hamcrest-core)))
4458 (properties
4459 (alist-delete
4460 'hidden?
4461 (package-properties java-plexus-container-default-bootstrap)))))
4462
4463(define-public java-plexus-component-annotations
4464 (package
4465 (inherit java-plexus-container-default)
4466 (name "java-plexus-component-annotations")
4467 (arguments
4468 `(#:jar-name "plexus-component-annotations.jar"
4469 #:source-dir "plexus-component-annotations/src/main/java"
4470 #:tests? #f; no tests
4471 #:phases
4472 (modify-phases %standard-phases
4473 (replace 'install
4474 (install-from-pom "plexus-component-annotations/pom.xml")))))
4475 (propagated-inputs
4476 (list java-plexus-containers-parent-pom))
4477 (inputs '())
4478 (native-inputs '())
4479 (synopsis "Plexus descriptors generator")
4480 (description "This package is a Maven plugin to generate Plexus descriptors
4481from source tags and class annotations.")))
4482
4483(define-public java-plexus-component-metadata
4484 (package
4485 (inherit java-plexus-container-default)
4486 (name "java-plexus-component-metadata")
4487 (arguments
4488 `(#:jar-name "plexus-component-metadata.jar"
4489 #:source-dir "src/main/java"
4490 #:test-dir "src/test"
4491 #:jdk ,icedtea-8
4492 #:phases
4493 (modify-phases %standard-phases
4494 (add-before 'configure 'chdir
4495 (lambda _
4496 (chdir "plexus-component-metadata")
4497 #t))
4498 (add-before 'build 'copy-resources
4499 (lambda _
4500 (copy-recursively "src/main/resources"
4501 "build/classes/")
4502 #t))
4503 (add-before 'build 'fix-jdom
4504 (lambda _
4505 ;; The newer version of jdom now sets multiple features by default
4506 ;; that are not supported.
4507 ;; Skip these features
4508 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4509 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4510 "// skip"))))
4511 (add-before 'build 'reinstate-cli
4512 ;; The CLI was removed in 2.1.0, but we still need it to build some
4513 ;; maven dependencies, and some parts of maven itself. We can't use
4514 ;; the maven plugin for that yet.
4515 (lambda _
4516 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4517 (lambda _
4518 ;; Copied from a previous version of this package.
4519 (display "package org.codehaus.plexus.metadata;
4520
4521import java.io.File;
4522import java.util.Arrays;
4523import java.util.Collections;
4524
4525import org.apache.commons.cli.CommandLine;
4526import org.apache.commons.cli.OptionBuilder;
4527import org.apache.commons.cli.Options;
4528import org.codehaus.plexus.PlexusContainer;
4529import org.codehaus.plexus.tools.cli.AbstractCli;
4530
4531public class PlexusMetadataGeneratorCli
4532 extends AbstractCli
4533{
4534 public static final char SOURCE_DIRECTORY = 's';
4535 public static final char SOURCE_ENCODING = 'e';
4536 public static final char CLASSES_DIRECTORY = 'c';
4537 public static final char OUTPUT_FILE = 'o';
4538 public static final char DESCRIPTORS_DIRECTORY = 'm';
4539
4540 public static void main( String[] args )
4541 throws Exception
4542 {
4543 new PlexusMetadataGeneratorCli().execute( args );
4544 }
4545
4546 @Override
4547 public String getPomPropertiesPath()
4548 {
4549 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4550 }
4551
4552 @Override
4553 @SuppressWarnings(\"static-access\")
4554 public Options buildCliOptions( Options options )
4555 {
4556 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4557 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4558 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4559 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4560 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4561 return options;
4562 }
4563
4564 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4565 throws Exception
4566 {
4567 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4568
4569 MetadataGenerationRequest request = new MetadataGenerationRequest();
4570 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4571 request.classpath = Collections.emptyList();
4572 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4573 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4574 request.useContextClassLoader = true;
4575 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4576 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4577
4578 metadataGenerator.generateDescriptor( request );
4579 }
4580}")))))
4581 (add-before 'check 'fix-test-location
4582 (lambda _
4583 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4584 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4585 (("target") "build")))))))
4586 (propagated-inputs
4587 `(("java-plexus-container-default" ,java-plexus-container-default)
4588 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4589 ("java-plexus-utils" ,java-plexus-utils)
4590 ("java-plexus-cli" ,java-plexus-cli)
4591 ("java-plexus-classworlds" ,java-plexus-classworlds)
4592 ("maven-plugin-api" ,maven-plugin-api)
4593 ("maven-plugin-annotations" ,maven-plugin-annotations)
4594 ("maven-core-bootstrap" ,maven-core-bootstrap)
4595 ("maven-model" ,maven-model)
4596 ("java-commons-cli" ,java-commons-cli)
4597 ("java-qdox" ,java-qdox)
4598 ("java-jdom2" ,java-jdom2)
4599 ("java-asm-8" ,java-asm-8)))
4600 (native-inputs
4601 (list java-junit java-guava java-geronimo-xbean-reflect))
4602 (synopsis "Inversion-of-control container for Maven")
4603 (description "The Plexus project provides a full software stack for creating
4604and executing software projects. Based on the Plexus container, the
4605applications can utilise component-oriented programming to build modular,
4606reusable components that can easily be assembled and reused. This package
4607provides the Maven plugin generating the component metadata.")))
4608
4609(define-public java-plexus-container-default-1.7
4610 (package
4611 (inherit java-plexus-container-default)
4612 (version "1.7.1")
4613 (source (origin
4614 (method git-fetch)
4615 (uri (git-reference
4616 (url "https://github.com/codehaus-plexus/plexus-containers")
4617 (commit (string-append "plexus-containers-" version))))
4618 (file-name (git-file-name "java-plexus-container-default" version))
4619 (sha256
4620 (base32
4621 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4622
4623(define java-plexus-containers-parent-pom-1.7
4624 (package
4625 (inherit java-plexus-container-default-1.7)
4626 (name "java-plexus-containers-parent-pom")
4627 (arguments
4628 `(#:tests? #f
4629 #:phases
4630 (modify-phases %standard-phases
4631 (delete 'configure)
4632 (delete 'build)
4633 (replace 'install
4634 (install-pom-file "pom.xml")))))
4635 (propagated-inputs
4636 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4637
4638(define-public java-plexus-component-annotations-1.7
4639 (package
4640 (inherit java-plexus-container-default-1.7)
4641 (name "java-plexus-component-annotations")
4642 (arguments
4643 `(#:jar-name "plexus-component-annotations.jar"
4644 #:source-dir "plexus-component-annotations/src/main/java"
4645 #:tests? #f; no tests
4646 #:phases
4647 (modify-phases %standard-phases
4648 (replace 'install
4649 (install-from-pom "plexus-component-annotations/pom.xml")))))
4650 (propagated-inputs
4651 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4652 (inputs '())
4653 (native-inputs '())
4654 (synopsis "Plexus descriptors generator")
4655 (description "This package is a Maven plugin to generate Plexus descriptors
4656from source tags and class annotations.")))
4657
4658(define-public java-plexus-component-metadata-1.7
4659 (package
4660 (inherit java-plexus-container-default-1.7)
4661 (name "java-plexus-component-metadata")
4662 (arguments
4663 `(#:jar-name "plexus-component-metadata.jar"
4664 #:source-dir "src/main/java"
4665 #:test-dir "src/test"
4666 #:phases
4667 (modify-phases %standard-phases
4668 (add-before 'configure 'chdir
4669 (lambda _
4670 (chdir "plexus-component-metadata")
4671 #t))
4672 (add-before 'build 'copy-resources
4673 (lambda _
4674 (copy-recursively "src/main/resources"
4675 "build/classes/")
4676 #t))
4677 (add-before 'build 'fix-jdom
4678 (lambda _
4679 ;; The newer version of jdom now sets multiple features by default
4680 ;; that are not supported.
4681 ;; Skip these features
4682 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4683 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4684 "// skip"))))
4685 (add-before 'check 'fix-test-location
4686 (lambda _
4687 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4688 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4689 (("target") "build")))))))
4690 (propagated-inputs
4691 (list java-plexus-container-default-1.7
4692 java-plexus-component-annotations-1.7
4693 java-plexus-utils
4694 java-plexus-cli
4695 java-plexus-cli
4696 java-plexus-classworlds
4697 maven-plugin-api
4698 maven-plugin-annotations
4699 maven-core-bootstrap
4700 maven-model
4701 java-commons-cli
4702 java-qdox
4703 java-jdom2
4704 java-asm-8))
4705 (native-inputs
4706 (list java-junit java-guava java-geronimo-xbean-reflect))
4707 (synopsis "Inversion-of-control container for Maven")
4708 (description "The Plexus project provides a full software stack for creating
4709and executing software projects. Based on the Plexus container, the
4710applications can utilise component-oriented programming to build modular,
4711reusable components that can easily be assembled and reused. This package
4712provides the Maven plugin generating the component metadata.")))
4713
4714(define-public java-plexus-cipher
4715 (package
4716 (name "java-plexus-cipher")
4717 (version "2.0")
4718 (source (origin
4719 (method git-fetch)
4720 (uri (git-reference
4721 (url "https://github.com/codehaus-plexus/plexus-cipher")
4722 (commit (string-append "plexus-cipher-" version))))
4723 (file-name (git-file-name name version))
4724 (sha256
4725 (base32
4726 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4727 (build-system ant-build-system)
4728 (arguments
4729 `(#:jar-name "plexus-cipher.jar"
4730 #:source-dir "src/main/java"
4731 #:phases
4732 (modify-phases %standard-phases
4733 (add-before 'build 'generate-javax.inject.Named
4734 (lambda _
4735 (mkdir-p "build/classes/META-INF/sisu")
4736 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4737 (lambda _
4738 (display
4739 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4740 #t))
4741 (replace 'install (install-from-pom "pom.xml")))))
4742 (inputs
4743 `(("java-cdi-api" ,java-cdi-api)
4744 ("java-javax-inject" ,java-javax-inject)))
4745 (propagated-inputs
4746 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4747 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4748 (native-inputs
4749 `(("java-junit" ,java-junit)))
4750 (home-page "https://github.com/sonatype/plexus-cipher")
4751 (synopsis "Encryption/decryption Component")
4752 (description "Plexus-cipher contains a component to deal with encryption
4753and decryption.")
4754 (license license:asl2.0)))
4755
4756(define-public java-plexus-cipher-1.7
4757 (package
4758 (inherit java-plexus-cipher)
4759 (version "1.7")
4760 (source (origin
4761 (method git-fetch)
4762 (uri (git-reference
4763 (url "https://github.com/codehaus-plexus/plexus-cipher")
4764 (commit (string-append "plexus-cipher-" version))))
4765 (file-name (git-file-name "java-plexus-cipher" version))
4766 (sha256
4767 (base32
4768 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4769 (arguments
4770 `(#:jar-name "plexus-cipher.jar"
4771 #:source-dir "src/main/java"
4772 #:tests? #f; FIXME: requires sisu-inject-bean
4773 #:phases
4774 (modify-phases %standard-phases
4775 (add-before 'build 'copy-resources
4776 (lambda _
4777 (copy-recursively "src/main/resources" "build/classes")
4778 (mkdir-p "build/classes/META-INF/sisu")
4779 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4780 (lambda _
4781 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4782 #t))
4783 (add-before 'install 'fix-test-dependency
4784 (lambda _
4785 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4786 (substitute* "pom.xml"
4787 (("provided") "test"))
4788 #t))
4789 (replace 'install (install-from-pom "pom.xml")))))
4790 (propagated-inputs
4791 (list java-sonatype-spice-parent-pom-15))))
4792
4793(define-public java-plexus-java
4794 (package
4795 (name "java-plexus-java")
4796 (version "0.9.10")
4797 (source (origin
4798 (method git-fetch)
4799 (uri (git-reference
4800 (url "https://github.com/codehaus-plexus/plexus-languages")
4801 (commit (string-append "plexus-languages-" version))))
4802 (file-name (git-file-name name version))
4803 (sha256
4804 (base32
4805 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4806 (modules '((guix build utils)))
4807 (snippet
4808 `(begin
4809 (for-each delete-file (find-files "." ".*.jar$"))
4810 #t))))
4811 (build-system ant-build-system)
4812 (arguments
4813 `(#:jar-name "plexus-java.java"
4814 #:source-dir "plexus-java/src/main/java"
4815 #:test-dir "plexus-java/src/test"
4816 #:tests? #f; require mockito 2
4817 #:phases
4818 (modify-phases %standard-phases
4819 (add-after 'build 'generate-metadata
4820 (lambda _
4821 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4822 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4823 "--source" "plexus-java/src/main/java"
4824 "--output" "build/classes/META-INF/plexus/components.xml"
4825 "--classes" "build/classes"
4826 "--descriptors" "build/classes/META-INF")
4827 (invoke "ant" "jar")
4828 #t))
4829 (add-before 'install 'install-parent
4830 (install-pom-file "pom.xml"))
4831 (replace 'install
4832 (install-from-pom "plexus-java/pom.xml")))))
4833 (propagated-inputs
4834 (list java-asm java-qdox-2-M9 java-javax-inject
4835 plexus-parent-pom-4.0))
4836 (inputs
4837 (list java-plexus-component-annotations-1.7))
4838 (native-inputs
4839 (list java-plexus-component-metadata-1.7 java-junit))
4840 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4841 (synopsis "Shared language features for Java")
4842 (description "This package contains shared language features of the Java
4843language, for the plexus project.")
4844 (license license:asl2.0)))
4845
4846(define-public java-plexus-compiler-api
4847 (package
4848 (name "java-plexus-compiler-api")
4849 (version "2.8.4")
4850 (source (origin
4851 (method git-fetch)
4852 (uri (git-reference
4853 (url "https://github.com/codehaus-plexus/plexus-compiler")
4854 (commit (string-append "plexus-compiler-" version))))
4855 (file-name (git-file-name name version))
4856 (sha256
4857 (base32
4858 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4859 (build-system ant-build-system)
4860 (arguments
4861 `(#:jar-name "plexus-compiler-api.jar"
4862 #:source-dir "plexus-compiler-api/src/main/java"
4863 #:test-dir "plexus-compiler-api/src/test"
4864 #:phases
4865 (modify-phases %standard-phases
4866 (replace 'install
4867 (install-from-pom "plexus-compiler-api/pom.xml")))))
4868 (propagated-inputs
4869 `(("java-plexus-container-default" ,java-plexus-container-default)
4870 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4871 ("java-plexus-util" ,java-plexus-utils)))
4872 (native-inputs
4873 (list java-junit))
4874 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4875 (synopsis "Plexus Compilers component's API to manipulate compilers")
4876 (description "This package contains the API used by components to manipulate
4877compilers.")
4878 (license (list license:asl2.0
4879 license:expat))))
4880
4881(define java-plexus-compiler-pom
4882 (package
4883 (inherit java-plexus-compiler-api)
4884 (name "java-plexus-compiler-pom")
4885 (arguments
4886 `(#:tests? #f
4887 #:phases
4888 (modify-phases %standard-phases
4889 (delete 'configure)
4890 (delete 'build)
4891 (replace 'install
4892 (install-pom-file "pom.xml"))
4893 (add-after 'install 'install-compilers
4894 (install-pom-file "plexus-compilers/pom.xml")))))
4895 (propagated-inputs
4896 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4897
4898(define plexus-components-parent-pom-4.0
4899 (package
4900 (name "plexus-components-parent-pom")
4901 (version "4.0")
4902 (source (origin
4903 (method git-fetch)
4904 (uri (git-reference
4905 (url "https://github.com/codehaus-plexus/plexus-components")
4906 (commit (string-append "plexus-components-" version))))
4907 (file-name (git-file-name name version))
4908 (sha256
4909 (base32
4910 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4911 (build-system ant-build-system)
4912 (arguments
4913 `(#:tests? #f
4914 #:phases
4915 (modify-phases %standard-phases
4916 (delete 'configure)
4917 (delete 'build)
4918 (replace 'install
4919 (install-pom-file "pom.xml")))))
4920 (propagated-inputs
4921 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4922 (home-page "https://codehaus-plexus.github.io/plexus-components")
4923 (synopsis "Plexus parent pom")
4924 (description "This package contains the Plexus components parent POM.")
4925 (license license:asl2.0)))
4926
4927(define-public java-plexus-compiler-manager
4928 (package
4929 (inherit java-plexus-compiler-api)
4930 (name "java-plexus-compiler-manager")
4931 (arguments
4932 `(#:jar-name "compiler-compiler-manager.java"
4933 #:source-dir "plexus-compiler-manager/src/main/java"
4934 #:test-dir "plexus-compiler-manager/src/test"
4935 #:tests? #f
4936 #:phases
4937 (modify-phases %standard-phases
4938 (add-after 'build 'generate-metadata
4939 (lambda _
4940 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4941 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4942 "--source" "plexus-compiler-manager/src/main/java"
4943 "--output" "build/classes/META-INF/plexus/components.xml"
4944 "--classes" "build/classes"
4945 "--descriptors" "build/classes/META-INF")
4946 (invoke "ant" "jar")
4947 #t))
4948 (add-after 'generate-metadata 'rebuild
4949 (lambda _
4950 (invoke "ant" "jar")
4951 #t))
4952 (replace 'install
4953 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4954 (propagated-inputs
4955 (list java-plexus-compiler-api java-plexus-compiler-pom
4956 java-plexus-container-default-1.7))
4957 (native-inputs
4958 (list unzip java-plexus-component-metadata-1.7))
4959 (synopsis "Compiler management for Plexus Compiler component")
4960 (description "Plexus Compiler is a Plexus component to use different
4961compilers through a uniform API. This component chooses the compiler
4962implementation to use in a project.")))
4963
4964(define-public java-plexus-compiler-javac
4965 (package
4966 (inherit java-plexus-compiler-api)
4967 (name "java-plexus-compiler-javac")
4968 (arguments
4969 `(#:jar-name "plexus-compiler-javac.jar"
4970 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4971 #:jdk ,icedtea-8
4972 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4973 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4974 #:modules ((guix build ant-build-system)
4975 (guix build utils)
4976 (guix build java-utils)
4977 (sxml simple))
4978 #:phases
4979 (modify-phases %standard-phases
4980 ;; We cannot use java-plexus-component-metadata to generate the metadata
4981 ;; because it ultimately depends on this package.
4982 ;; Create it manually instead
4983 (add-before 'build 'create-metadata
4984 (lambda _
4985 (let* ((dir "build/classes/META-INF/plexus")
4986 (file (string-append dir "/components.xml")))
4987 (mkdir-p dir)
4988 (with-output-to-file file
4989 (lambda _
4990 (sxml->xml
4991 `(component-set
4992 (components
4993 (component
4994 (role "org.codehaus.plexus.compiler.Compiler")
4995 (role-hint "javac")
4996 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4997 (isolated-realm "false"))))))))
4998 #t))
4999 (replace 'install
5000 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
5001 (propagated-inputs
5002 (list java-plexus-compiler-api java-plexus-utils
5003 java-plexus-container-default))
5004 (synopsis "Javac Compiler support for Plexus Compiler component")
5005 (description "This package contains the Javac Compiler support for Plexus
5006Compiler component.")))
5007
5008(define plexus-components-pom-1.1.20
5009 (package
5010 (name "plexus-components-pom-1.1.20")
5011 (version "1.1.20")
5012 (source (origin
5013 (method git-fetch)
5014 (uri (git-reference
5015 (url "https://github.com/codehaus-plexus/plexus-components")
5016 (commit (string-append "plexus-components-" version))))
5017 (file-name (git-file-name name version))
5018 (sha256
5019 (base32
5020 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
5021 (build-system ant-build-system)
5022 (arguments
5023 `(#:tests? #f
5024 #:phases
5025 (modify-phases %standard-phases
5026 (delete 'configure)
5027 (delete 'build)
5028 (replace 'install
5029 (install-pom-file "pom.xml")))))
5030 (propagated-inputs
5031 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
5032 (home-page "https://github.com/codehaus-plexus/plexus-components")
5033 (synopsis "Maven parent pom for plexus packages")
5034 (description "This package contains the parent pom for plexus component
5035packages.")
5036 (license license:asl2.0)))
5037
5038(define-public java-plexus-digest
5039 (package
5040 (name "java-plexus-digest")
5041 (version "1.2")
5042 (source (origin
5043 (method git-fetch)
5044 (uri (git-reference
5045 (url "https://github.com/codehaus-plexus/plexus-digest")
5046 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
5047 (file-name (git-file-name name version))
5048 (sha256
5049 (base32
5050 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
5051 (build-system ant-build-system)
5052 (arguments
5053 `(#:jar-name "plexus-digest.jar"
5054 #:source-dir "src/main/java"
5055 #:tests? #f
5056 #:phases
5057 (modify-phases %standard-phases
5058 (replace 'install
5059 (install-from-pom "pom.xml")))))
5060 (propagated-inputs
5061 (list java-plexus-utils plexus-components-pom-1.1.20))
5062 (native-inputs
5063 (list java-junit))
5064 (home-page "https://github.com/codehaus-plexus/plexus-digest")
5065 (synopsis "Hash function utilities for Java")
5066 (description "This package is a plexus component that contains hash
5067function utilities.")
5068 (license license:asl2.0)))
5069
5070(define-public java-plexus-sec-dispatcher
5071 (package
5072 (name "java-plexus-sec-dispatcher")
5073 (version "2.0")
5074 (source (origin
5075 (method git-fetch)
5076 (uri (git-reference
5077 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
5078 (commit (string-append "plexus-sec-dispatcher-" version))))
5079 (sha256
5080 (base32
5081 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
5082 (file-name (git-file-name name version))))
5083 (arguments
5084 `(#:jar-name "plexus-sec-dispatcher.jar"
5085 #:source-dir "src/main/java"
5086 #:phases
5087 (modify-phases %standard-phases
5088 (add-before 'build 'generate-models
5089 (lambda* (#:key inputs #:allow-other-keys)
5090 (define (modello-single-mode file version mode)
5091 (invoke "java"
5092 "org.codehaus.modello.ModelloCli"
5093 file mode "src/main/java" version
5094 "false" "true"))
5095 (let ((file "src/main/mdo/settings-security.mdo"))
5096 (modello-single-mode file "1.0.0" "java")
5097 (modello-single-mode file "1.0.0" "xpp3-reader")
5098 (modello-single-mode file "1.0.0" "xpp3-writer"))
5099 #t))
5100 (add-before 'build 'generate-javax.inject.Named
5101 (lambda _
5102 (mkdir-p "build/classes/META-INF/sisu")
5103 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
5104 (lambda _
5105 (display
5106 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
5107 #t))
5108 (add-before 'check 'fix-paths
5109 (lambda _
5110 (copy-recursively "src/test/resources" "target")
5111 #t))
5112 (replace 'install (install-from-pom "pom.xml")))))
5113 (propagated-inputs
5114 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
5115 (native-inputs
5116 (list java-javax-inject
5117 java-modello-core
5118 ;; for modello
5119 java-plexus-container-default
5120 java-plexus-classworlds
5121 java-plexus-utils
5122 java-guava
5123 java-geronimo-xbean-reflect
5124 ;; modello plugins
5125 java-modello-plugins-java
5126 java-modello-plugins-xml
5127 java-modello-plugins-xpp3
5128 ;; for tests
5129 java-junit))
5130 (build-system ant-build-system)
5131 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
5132 (synopsis "Plexus Security Dispatcher Component")
5133 (description "This package is the Plexus Security Dispatcher Component.
5134This component decrypts a string passed to it.")
5135 (license license:asl2.0)))
5136
5137(define-public java-plexus-sec-dispatcher-1.4
5138 (package
5139 (inherit java-plexus-sec-dispatcher)
5140 (version "1.4")
5141 (source (origin
5142 (method git-fetch)
5143 (uri (git-reference
5144 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
5145 (commit (string-append "sec-dispatcher-" version))))
5146 (sha256
5147 (base32
5148 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
5149 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
5150 (arguments
5151 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
5152 ((#:phases phases)
5153 `(modify-phases ,phases
5154 (delete 'generate-javax.inject.Named)
5155 (add-before 'build 'generate-components.xml
5156 (lambda _
5157 (mkdir-p "build/classes/META-INF/plexus")
5158 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5159 (lambda _
5160 (display
5161 "<component-set>\n
5162 <components>\n
5163 <component>\n
5164 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
5165 <role-hint>default</role-hint>\n
5166 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
5167 <description></description>\n
5168 <requirements>\n
5169 <requirement>\n
5170 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
5171 <field-name>_cipher</field-name>\n
5172 </requirement>\n
5173 <requirement>\n
5174 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
5175 <field-name>_decryptors</field-name>\n
5176 </requirement>\n
5177 </requirements>\n
5178 <configuration>\n
5179 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
5180 </configuration>\n
5181 </component>\n
5182 </components>\n
5183</component-set>\n")))))))))
5184 (propagated-inputs
5185 (list java-plexus-utils java-plexus-cipher-1.7
5186 java-sonatype-spice-parent-pom-12))))
5187
5188(define-public java-plexus-cli
5189 (package
5190 (name "java-plexus-cli")
5191 (version "1.7")
5192 (source (origin
5193 (method git-fetch)
5194 (uri (git-reference
5195 (url "https://github.com/sonatype/plexus-cli")
5196 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
5197 (file-name (string-append name "-" version))
5198 (sha256
5199 (base32
5200 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
5201 (build-system ant-build-system)
5202 (arguments
5203 `(#:jar-name "plexus-cli.jar"
5204 #:source-dir "src/main/java"
5205 #:jdk ,icedtea-8
5206 #:test-dir "src/test"))
5207 (inputs
5208 (list java-commons-cli java-plexus-container-default
5209 java-plexus-classworlds))
5210 (native-inputs
5211 (list java-plexus-utils java-junit java-guava))
5212 (home-page "https://codehaus-plexus.github.io/plexus-cli")
5213 (synopsis "CLI building library for plexus")
5214 (description "This package is a library to help creating CLI around
5215Plexus components.")
5216 (license license:asl2.0)))
5217
5218(define-public java-plexus-build-api
5219 (package
5220 (name "java-plexus-build-api")
5221 (version "0.0.7")
5222 (source (origin
5223 (method git-fetch)
5224 (uri (git-reference
5225 (url "https://github.com/codehaus-plexus/plexus-build-api")
5226 (commit (string-append "plexus-build-api-" version))))
5227 (file-name (git-file-name name version))
5228 (sha256
5229 (base32
5230 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
5231 (build-system ant-build-system)
5232 (arguments
5233 `(#:jar-name "plexus-build-api.jar"
5234 #:source-dir "src/main/java"
5235 #:jdk ,icedtea-8
5236 #:tests? #f; FIXME: how to run the tests?
5237 #:phases
5238 (modify-phases %standard-phases
5239 (add-before 'build 'copy-resources
5240 (lambda _
5241 (copy-recursively "src/main/resources" "build/classes")
5242 (substitute* (find-files "build/classes")
5243 (("\\$\\{project.version\\}") ,version))
5244 #t))
5245 (add-before 'build 'generate-plexus-compontent
5246 (lambda _
5247 (mkdir-p "build/classes/META-INF/plexus")
5248 ;; This file is required for plexus to inject this package.
5249 ;; FIXME: how is it generated?
5250 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5251 (lambda _
5252 (display
5253 "<component-set>\n
5254 <components>\n
5255 <component>\n
5256 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5257 <role-hint>default</role-hint>\n
5258 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5259 <description>Filesystem based non-incremental build context implementation\n
5260which behaves as if all files were just created.</description>\n
5261 </component>\n
5262 </components>\n
5263</component-set>\n")))
5264 #t))
5265 (replace 'install
5266 (install-from-pom "pom.xml")))))
5267 (inputs
5268 (list java-plexus-utils-3.2.1 java-plexus-container-default))
5269 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
5270 (synopsis "Base build API for maven")
5271 (description "This package contains the base build API for maven and
5272a default implementation of it. This API is about scanning files in a
5273project and determining what files need to be rebuilt.")
5274 (license license:asl2.0)))
5275
5276(define-public java-modello-core
5277 (package
5278 (name "java-modello-core")
5279 (version "1.11")
5280 (source (origin
5281 (method git-fetch)
5282 (uri (git-reference
5283 (url "https://github.com/codehaus-plexus/modello")
5284 (commit (string-append "modello-" version))))
5285 (file-name (git-file-name name version))
5286 (sha256
5287 (base32
5288 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
5289 (build-system ant-build-system)
5290 (arguments
5291 `(#:jar-name "modello-core.jar"
5292 #:source-dir "modello-core/src/main/java"
5293 #:test-dir "modello-core/src/test"
5294 #:main-class "org.codehaus.modello.ModelloCli"
5295 #:jdk ,icedtea-8
5296 #:phases
5297 (modify-phases %standard-phases
5298 (add-before 'build 'copy-resources
5299 (lambda _
5300 (mkdir-p "build/classes/META-INF/plexus")
5301 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5302 "build/classes/META-INF/plexus/components.xml")
5303 #t))
5304 (add-before 'check 'fix-tests
5305 (lambda _
5306 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5307 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5308 "modello/core/io/ModelReaderTest.java")
5309 (("src/test") "modello-core/src/test")))
5310 #t)))))
5311 (propagated-inputs
5312 (list java-plexus-utils java-plexus-container-default
5313 java-plexus-build-api))
5314 (native-inputs
5315 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
5316 java-guava))
5317 (home-page "https://codehaus-plexus.github.io/modello/")
5318 (synopsis "Framework for code generation from a simple model")
5319 (description "Modello is a framework for code generation from a simple model.
5320
5321Modello generates code from a simple model format: based on a plugin
5322architecture, various types of code and descriptors can be generated from the
5323single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5324XSD and documentation.")
5325 (license (list
5326 license:expat
5327 ;; Although this package uses only files licensed under expat,
5328 ;; other parts of the source are licensed under different
5329 ;; licenses. We include them to be inherited by other packages.
5330 license:asl2.0
5331 ;; Some files in modello-plugin-java are licensed under a
5332 ;; 5-clause BSD license.
5333 (license:non-copyleft
5334 (string-append "file:///modello-plugins/modello-plugin-java/"
5335 "src/main/java/org/codehaus/modello/plugin/"
5336 "java/javasource/JNaming.java"))))))
5337
5338(define-public java-modello-plugins-java
5339 (package
5340 (inherit java-modello-core)
5341 (name "java-modello-plugins-java")
5342 (arguments
5343 `(#:jar-name "modello-plugins-java.jar"
5344 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5345 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5346 #:jdk ,icedtea-8
5347 #:tests? #f; requires maven-model, which depends on this package
5348 #:phases
5349 (modify-phases %standard-phases
5350 (add-before 'build 'copy-resources
5351 (lambda _
5352 (mkdir-p "build/classes")
5353 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5354 "build/classes")
5355 #t)))))
5356 (inputs
5357 (list java-modello-core))
5358 (synopsis "Modello Java Plugin")
5359 (description "Modello Java Plugin generates Java objects for the model.")))
5360
5361(define-public java-modello-plugins-xml
5362 (package
5363 (inherit java-modello-core)
5364 (name "java-modello-plugins-xml")
5365 (arguments
5366 `(#:jar-name "modello-plugins-xml.jar"
5367 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5368 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5369 #:jdk ,icedtea-8
5370 #:phases
5371 (modify-phases %standard-phases
5372 (add-before 'build 'copy-resources
5373 (lambda _
5374 (mkdir-p "build/classes")
5375 (copy-recursively
5376 "modello-plugins/modello-plugin-xml/src/main/resources"
5377 "build/classes")
5378 #t))
5379 (add-before 'check 'fix-paths
5380 (lambda _
5381 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5382 (substitute*
5383 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5384 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5385 #t)))))
5386 (propagated-inputs
5387 (list java-modello-core java-modello-plugins-java))
5388 (synopsis "Modello XML Plugin")
5389 (description "Modello XML Plugin contains shared code for every plugins
5390working on XML representation of the model.")))
5391
5392(define-public java-modello-test
5393 (package
5394 (inherit java-modello-core)
5395 (name "java-modello-test")
5396 (arguments
5397 `(#:jar-name "modello-test.jar"
5398 #:source-dir "modello-test/src/main/java"
5399 #:tests? #f; no tests
5400 #:jdk ,icedtea-8))
5401 (inputs
5402 (list java-plexus-utils java-plexus-compiler-api
5403 java-plexus-compiler-javac java-plexus-container-default))
5404 (synopsis "Modello test package")
5405 (description "The modello test package contains the basis to create
5406Modello generator unit-tests, including sample models and xml files to test
5407every feature for every plugin.")))
5408
5409(define-public java-modello-plugins-xpp3
5410 (package
5411 (inherit java-modello-core)
5412 (name "java-modello-plugins-xpp3")
5413 (arguments
5414 `(#:jar-name "modello-plugins-xpp3.jar"
5415 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5416 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5417 ;; One of the test dependencies is maven-model which depends on this package.
5418 #:tests? #f
5419 #:jdk ,icedtea-8
5420 #:phases
5421 (modify-phases %standard-phases
5422 (add-before 'build 'copy-resources
5423 (lambda _
5424 (mkdir-p "build/classes")
5425 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5426 "build/classes")
5427 #t)))))
5428 (propagated-inputs
5429 (list java-modello-core java-modello-plugins-java
5430 java-modello-plugins-xml))
5431 (native-inputs
5432 (modify-inputs native-inputs
5433 (prepend java-xmlunit java-modello-test)))
5434 (synopsis "Modello XPP3 Plugin")
5435 (description "The modello XPP3 plugin generates XML readers and writers based
5436on the XPP3 API (XML Pull Parser).")))
5437
5438(define-public java-ow-util-ant-tasks
5439 (package
5440 (name "java-ow-util-ant-tasks")
5441 (version "1.3.2")
5442 (source (origin
5443 (method url-fetch)
5444 (uri (string-append
5445 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5446 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5447 (sha256
5448 (base32
5449 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5450 (build-system ant-build-system)
5451 (arguments
5452 `(#:jar-name "ow-util-ant-tasks.jar"
5453 #:tests? #f; no tests
5454 #:phases
5455 (modify-phases %standard-phases
5456 (add-before 'build 'delete-cyclic-dependency
5457 (lambda _
5458 ;; This file depends on asm-3, which depends on this package
5459 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5460 ;; This file depends on xalan
5461 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5462 (add-before 'build 'fix-new-ant
5463 (lambda _
5464 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5465 ((", destFile.getAbsolutePath\\(\\)")
5466 ", new String[] { destFile.getAbsolutePath() }")))))))
5467 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5468 (synopsis "Replacement for base ant tasks")
5469 (description "This library is used in the legacy build process of several
5470key frameworks developed by ObjectWeb, among them legacy versions of the
5471ObjectWeb ASM bytecode manipulation framework.")
5472 (license license:lgpl2.0+)))
5473
5474(define-public java-asm
5475 (package
5476 (name "java-asm")
5477 (version "6.0")
5478 (source (origin
5479 (method url-fetch)
5480 (uri (string-append "https://download.forge.ow2.org/asm/"
5481 "asm-" version ".tar.gz"))
5482 (sha256
5483 (base32
5484 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5485 (build-system ant-build-system)
5486 (arguments
5487 `(#:build-target "compile"
5488 ;; The tests require an old version of Janino, which no longer compiles
5489 ;; with the JDK7.
5490 #:tests? #f
5491 #:make-flags
5492 (list
5493 ;; We don't need these extra ant tasks, but the build system asks us to
5494 ;; provide a path anyway.
5495 "-Dobjectweb.ant.tasks.path=dummy-path"
5496 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5497 ;; used during the build automatically by ant-build-system, but
5498 ;; java-asm's build.xml fails unless we provide something here.
5499 "-Dbiz.aQute.bnd.path=dummy-path")
5500 #:phases
5501 (modify-phases %standard-phases
5502 (add-before 'build 'remove-bnd-dependency
5503 (lambda _
5504 ;; This file is the only one to require bnd, and is not needed
5505 ;; because we don't build a bundle.
5506 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5507 #t))
5508 (add-before 'install 'build-jars
5509 (lambda* (#:key make-flags #:allow-other-keys)
5510 ;; We cannot use the "jar" target because it depends on a couple
5511 ;; of unpackaged, complicated tools.
5512 (mkdir "dist")
5513 (invoke "jar"
5514 "-cf" (string-append "dist/asm-" ,version ".jar")
5515 "-C" "output/build/tmp" ".")))
5516 (add-before 'install 'fix-pom
5517 (lambda _
5518 (substitute* (find-files "archive" "\\.pom$")
5519 (("@product.artifact@") ,version))
5520 #t))
5521 (add-before 'install 'install-parent
5522 (install-pom-file "archive/asm-parent.pom"))
5523 (replace 'install
5524 (install-from-pom "archive/asm.pom")))))
5525 (native-inputs
5526 (list java-junit))
5527 (propagated-inputs
5528 (list java-org-ow2-parent-pom-1.3))
5529 (home-page "https://asm.ow2.io/")
5530 (synopsis "Very small and fast Java bytecode manipulation framework")
5531 (description "ASM is an all purpose Java bytecode manipulation and
5532analysis framework. It can be used to modify existing classes or dynamically
5533generate classes, directly in binary form. The provided common
5534transformations and analysis algorithms allow easily assembling custom
5535complex transformations and code analysis tools.")
5536 (license license:bsd-3)))
5537
5538(define-public java-org-ow2-parent-pom-1.3
5539 (package
5540 (name "java-org-ow2-parent-pom")
5541 (version "1.3")
5542 (source (origin
5543 (method url-fetch)
5544 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5545 (sha256
5546 (base32
5547 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5548 (build-system ant-build-system)
5549 (arguments
5550 `(#:tests? #f
5551 #:phases
5552 (modify-phases %standard-phases
5553 (delete 'unpack)
5554 (delete 'build)
5555 (delete 'configure)
5556 (replace 'install
5557 ,#~(install-pom-file #$source)))))
5558 (home-page "https://ow2.org")
5559 (synopsis "Ow2.org parent pom")
5560 (description "This package contains the parent pom for projects from ow2.org,
5561including java-asm.")
5562 (properties '((hidden? . #t)))
5563 (license license:lgpl2.1+)))
5564
5565(define-public java-asm-bootstrap
5566 (package
5567 (inherit java-asm)
5568 (name "java-asm-bootstrap")
5569 (properties '((hidden? . #t)))
5570 (arguments
5571 (substitute-keyword-arguments (package-arguments java-asm)
5572 ((#:tests? _) #f)))
5573 (native-inputs `())))
5574
5575(define-public java-asm-3
5576 (package
5577 (inherit java-asm)
5578 (version "3.1")
5579 (source (origin
5580 (method git-fetch)
5581 (uri (git-reference
5582 (url "https://gitlab.ow2.org/asm/asm")
5583 (commit "ASM_3_1")))
5584 (file-name (git-file-name "java-asm" version))
5585 (sha256
5586 (base32
5587 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5588 (modules '((guix build utils)))
5589 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5590 (arguments
5591 `(#:build-target "jar"
5592 #:test-target "test"
5593 #:tests? #f; require legacy test software
5594 #:phases
5595 (modify-phases %standard-phases
5596 (replace 'install (install-jars "output/dist"))
5597 (delete 'generate-jar-indices))))
5598 (native-inputs (list java-ow-util-ant-tasks))))
5599
5600(define-public java-asm-8
5601 (package
5602 (inherit java-asm)
5603 (version "8.0.1")
5604 (source (origin
5605 (method git-fetch)
5606 (uri (git-reference
5607 (url "https://gitlab.ow2.org/asm/asm")
5608 (commit (string-append
5609 "ASM_" (string-join (string-split version #\.)
5610 "_")))))
5611 (file-name (git-file-name "java-asm" version))
5612 (sha256
5613 (base32
5614 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5615 (arguments
5616 `(#:jar-name "asm8.jar"
5617 #:source-dir "asm/src/main/java"
5618 #:test-dir "asm/src/test"
5619 ;; tests depend on junit5
5620 #:tests? #f))
5621 (propagated-inputs '())
5622 (native-inputs '())))
5623
5624(define-public java-asm-tree-8
5625 (package
5626 (inherit java-asm-8)
5627 (name "java-asm-tree")
5628 (arguments
5629 `(#:jar-name "asm-tree.jar"
5630 #:source-dir "asm-tree/src/main/java"
5631 #:test-dir "asm-tree/src/test"
5632 ;; tests depend on junit5
5633 #:tests? #f))
5634 (inputs
5635 (list java-asm-8))))
5636
5637(define-public java-asm-analysis-8
5638 (package
5639 (inherit java-asm-8)
5640 (name "java-asm-analysis")
5641 (arguments
5642 `(#:jar-name "asm-analysis.jar"
5643 #:source-dir "asm-analysis/src/main/java"
5644 #:test-dir "asm-analysis/src/test"
5645 ;; tests depend on junit5
5646 #:tests? #f))
5647 (inputs
5648 (list java-asm-8 java-asm-tree-8))))
5649
5650(define-public java-asm-util-8
5651 (package
5652 (inherit java-asm-8)
5653 (name "java-asm-util")
5654 (arguments
5655 `(#:jar-name "asm-util8.jar"
5656 #:source-dir "asm-util/src/main/java"
5657 #:test-dir "asm-util/src/test"
5658 ;; tests depend on junit5
5659 #:tests? #f))
5660 (inputs
5661 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5662
5663(define-public java-asm-commons-8
5664 (package
5665 (inherit java-asm-8)
5666 (name "java-asm-commons")
5667 (arguments
5668 (list #:jar-name "asm-commons8.jar"
5669 #:source-dir "asm-commons/src/main/java"
5670 #:test-dir "asm-commons/src/test"
5671 ;; tests depend on junit5
5672 #:tests? #f))
5673 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5674
5675(define (generate-asm-pom package)
5676 "Return a build phase generating the pom.xml of org.ow2.asm:asm at the
5677version of PACKAGE."
5678 #~(generate-pom.xml "pom.xml" "org.ow2.asm" "asm"
5679 #$(package-version package)))
5680
5681(define-public java-asm-9
5682 (package
5683 (inherit java-asm)
5684 (version "9.4")
5685 (source (origin
5686 (method git-fetch)
5687 (uri (git-reference
5688 (url "https://gitlab.ow2.org/asm/asm")
5689 (commit "ASM_9_4")))
5690 (file-name (git-file-name "java-asm" version))
5691 (sha256
5692 (base32
5693 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5694 (arguments
5695 (list #:jar-name "asm9.jar"
5696 #:source-dir "asm/src/main/java"
5697 #:test-dir "asm/src/test"
5698 ;; tests depend on junit5
5699 #:tests? #f
5700 #:phases
5701 #~(modify-phases %standard-phases
5702 (add-before 'install 'generate-pom.xml
5703 #$(generate-asm-pom this-package))
5704 (replace 'install
5705 (install-from-pom "pom.xml")))))
5706 (propagated-inputs '())
5707 (native-inputs '())))
5708
5709(define-public java-asm-tree-9
5710 (package
5711 (inherit java-asm-9)
5712 (name "java-asm-tree")
5713 (arguments
5714 `(#:jar-name "asm-tree.jar"
5715 #:source-dir "asm-tree/src/main/java"
5716 #:test-dir "asm-tree/src/test"
5717 ;; tests depend on junit5
5718 #:tests? #f))
5719 (inputs
5720 (list java-asm-9))))
5721
5722(define-public java-asm-analysis-9
5723 (package
5724 (inherit java-asm-9)
5725 (name "java-asm-analysis")
5726 (arguments
5727 `(#:jar-name "asm-analysis.jar"
5728 #:source-dir "asm-analysis/src/main/java"
5729 #:test-dir "asm-analysis/src/test"
5730 ;; tests depend on junit5
5731 #:tests? #f))
5732 (inputs
5733 (list java-asm-9 java-asm-tree-9))))
5734
5735(define-public java-asm-util-9
5736 (package
5737 (inherit java-asm-9)
5738 (name "java-asm-util")
5739 (arguments
5740 `(#:jar-name "asm-util8.jar"
5741 #:source-dir "asm-util/src/main/java"
5742 #:test-dir "asm-util/src/test"
5743 ;; tests depend on junit5
5744 #:tests? #f))
5745 (inputs
5746 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5747
5748(define-public java-asm-commons-9
5749 (package
5750 (inherit java-asm-9)
5751 (name "java-asm-commons")
5752 (arguments
5753 (list #:jar-name "asm-commons8.jar"
5754 #:source-dir "asm-commons/src/main/java"
5755 #:test-dir "asm-commons/src/test"
5756 ;; tests depend on junit5
5757 #:tests? #f))
5758 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5759
5760(define-public java-asm-9.7.1
5761 (package
5762 (inherit java-asm-9)
5763 (name "java-asm")
5764 (version "9.7.1")
5765 (source
5766 (origin
5767 (method git-fetch)
5768 (uri (git-reference
5769 (url "https://gitlab.ow2.org/asm/asm.git")
5770 (commit "ASM_9_7_1")))
5771 (file-name (git-file-name "java-asm" version))
5772 (sha256
5773 (base32 "0q1i01al9mpggf3256iwmhx9yj9pg52v4vi1gdni2x9jcikq65lf"))))))
5774
5775(define-public java-asm-tree-9.7.1
5776 (package
5777 (inherit java-asm-tree-9)
5778 (name "java-asm-tree")
5779 (version (package-version java-asm-9.7.1))
5780 (source (package-source java-asm-9.7.1))
5781 (inputs
5782 (list java-asm-9.7.1))))
5783
5784(define-public java-asm-analysis-9.7.1
5785 (package
5786 (inherit java-asm-analysis-9)
5787 (name "java-asm-analysis")
5788 (version (package-version java-asm-9.7.1))
5789 (source (package-source java-asm-9.7.1))
5790 (inputs
5791 (list java-asm-9.7.1
5792 java-asm-tree-9.7.1))))
5793
5794(define-public java-asm-commons-9.7.1
5795 (package
5796 (inherit java-asm-commons-9)
5797 (name "java-asm-commons")
5798 (version (package-version java-asm-9.7.1))
5799 (source (package-source java-asm-9.7.1))
5800 (inputs
5801 (list java-asm-9.7.1
5802 java-asm-analysis-9.7.1
5803 java-asm-tree-9.7.1))))
5804
5805(define-public java-asm-9.10
5806 (package
5807 (inherit java-asm-9)
5808 (name "java-asm")
5809 (version "9.10.1")
5810 (source
5811 (origin
5812 (method git-fetch)
5813 (uri (git-reference
5814 (url "https://gitlab.ow2.org/asm/asm.git")
5815 (commit "ASM_9_10_1")))
5816 (file-name (git-file-name "java-asm" version))
5817 (sha256
5818 (base32 "0rshbybb6piw2s9lp8qmsnz3qvd69ks83fn2ci5kams8cmyyma4a"))))
5819 (arguments
5820 (substitute-keyword-arguments (package-arguments java-asm-9)
5821 ((#:phases phases)
5822 #~(modify-phases #$phases
5823 (replace 'generate-pom.xml
5824 #$(generate-asm-pom this-package))))
5825 ((#:jdk _ #f) openjdk11)
5826 ((#:make-flags _ #f)
5827 ;; Compile with openjdk11 (for the 'Deprecated.forRemoval' API) but
5828 ;; emit Java 8 byte code so the jars stay usable by icedtea-8 builds.
5829 #~(list "-Dant.build.javac.source=8"
5830 "-Dant.build.javac.target=8"))))))
5831
5832(define-public java-asm-tree-9.10
5833 (package
5834 (inherit java-asm-tree-9)
5835 (name "java-asm-tree")
5836 (version (package-version java-asm-9.10))
5837 (source (package-source java-asm-9.10))
5838 (arguments
5839 (list #:jar-name "asm-tree.jar"
5840 #:source-dir "asm-tree/src/main/java"
5841 #:test-dir "asm-tree/src/test"
5842 #:tests? #f
5843 #:jdk openjdk11
5844 #:make-flags #~(list "-Dant.build.javac.source=8"
5845 "-Dant.build.javac.target=8")))
5846 (inputs
5847 (list java-asm-9.10))))
5848
5849(define-public java-asm-analysis-9.10
5850 (package
5851 (inherit java-asm-analysis-9)
5852 (name "java-asm-analysis")
5853 (version (package-version java-asm-9.10))
5854 (source (package-source java-asm-9.10))
5855 (arguments
5856 (list #:jar-name "asm-analysis.jar"
5857 #:source-dir "asm-analysis/src/main/java"
5858 #:test-dir "asm-analysis/src/test"
5859 #:tests? #f
5860 #:jdk openjdk11
5861 #:make-flags #~(list "-Dant.build.javac.source=8"
5862 "-Dant.build.javac.target=8")))
5863 (inputs
5864 (list java-asm-9.10
5865 java-asm-tree-9.10))))
5866
5867(define-public java-asm-commons-9.10
5868 (package
5869 (inherit java-asm-commons-9)
5870 (name "java-asm-commons")
5871 (version (package-version java-asm-9.10))
5872 (source (package-source java-asm-9.10))
5873 (arguments
5874 (substitute-keyword-arguments (package-arguments java-asm-commons-9)
5875 ((#:jdk _ #f) openjdk11)
5876 ((#:make-flags _ #f)
5877 #~(list "-Dant.build.javac.source=8"
5878 "-Dant.build.javac.target=8"))))
5879 (inputs
5880 (list java-asm-9.10
5881 java-asm-analysis-9.10
5882 java-asm-tree-9.10))))
5883
5884(define-public java-cglib
5885 (package
5886 (name "java-cglib")
5887 (version "3.3.0")
5888 (source
5889 (origin
5890 (method git-fetch)
5891 (uri (git-reference
5892 (url "https://github.com/cglib/cglib")
5893 (commit (string-append
5894 "RELEASE_"
5895 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5896 version)))))
5897 (file-name (git-file-name name version))
5898 (sha256
5899 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5900 (build-system ant-build-system)
5901 (arguments
5902 `(;; FIXME: tests fail because junit runs
5903 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5904 ;; to describe a test at all.
5905 #:tests? #f
5906 #:jar-name "cglib.jar"
5907 #:phases
5908 (modify-phases %standard-phases
5909 (add-after 'unpack 'chdir
5910 (lambda _ (chdir "cglib") #t)))))
5911 (native-inputs (list java-junit))
5912 (propagated-inputs (list java-asm-8))
5913 (home-page "https://github.com/cglib/cglib/")
5914 (synopsis "Java byte code generation library")
5915 (description "The byte code generation library CGLIB is a high level API
5916to generate and transform Java byte code.")
5917 (license license:asl2.0)))
5918
5919(define-public java-objenesis
5920 (package
5921 (name "java-objenesis")
5922 (version "3.3")
5923 (source (origin
5924 (method git-fetch)
5925 (uri (git-reference
5926 (url "https://github.com/easymock/objenesis")
5927 (commit version)))
5928 (file-name (git-file-name name version))
5929 (sha256
5930 (base32
5931 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5932 (build-system ant-build-system)
5933 (arguments
5934 `(#:tests? #f; require junit-5
5935 #:jar-name "objenesis.jar"
5936 #:source-dir "main/src/main/java"
5937 #:test-dir "main/src/test/"))
5938 (native-inputs
5939 (list java-junit java-hamcrest-core))
5940 (home-page "http://objenesis.org/")
5941 (synopsis "Bypass the constructor when creating an object")
5942 (description "Objenesis is a small Java library that serves one purpose:
5943to instantiate a new object of a particular class. It is common to see
5944restrictions in libraries stating that classes must require a default
5945constructor. Objenesis aims to overcome these restrictions by bypassing the
5946constructor on object instantiation.")
5947 (license license:asl2.0)))
5948
5949(define-public java-easymock
5950 (package
5951 (name "java-easymock")
5952 (version "3.4")
5953 (source (origin
5954 (method git-fetch)
5955 (uri (git-reference
5956 (url "https://github.com/easymock/easymock/")
5957 (commit (string-append "easymock-" version))))
5958 (file-name (git-file-name name version))
5959 (sha256
5960 (base32
5961 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5962 (build-system ant-build-system)
5963 (arguments
5964 `(#:jar-name "easymock.jar"
5965 #:source-dir "core/src/main"
5966 #:test-dir "core/src/test"
5967 #:phases
5968 (modify-phases %standard-phases
5969 ;; FIXME: Android support requires the following packages to be
5970 ;; available: com.google.dexmaker.stock.ProxyBuilder
5971 (add-after 'unpack 'delete-android-support
5972 (lambda _
5973 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5974 (substitute* "MocksControl.java"
5975 (("AndroidSupport.isAndroid\\(\\)") "false")
5976 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5977 (delete-file "AndroidClassProxyFactory.java"))
5978 #t))
5979 (add-after 'unpack 'delete-broken-tests
5980 (lambda _
5981 (with-directory-excursion "core/src/test/java/org/easymock"
5982 ;; This test depends on dexmaker.
5983 (delete-file "tests2/ClassExtensionHelperTest.java")
5984
5985 ;; This is not a test.
5986 (delete-file "tests/BaseEasyMockRunnerTest.java")
5987
5988 ;; This test should be executed with a different runner...
5989 (delete-file "tests2/EasyMockAnnotationsTest.java")
5990 ;; ...but deleting it means that we also have to delete these
5991 ;; dependent files.
5992 (delete-file "tests2/EasyMockRunnerTest.java")
5993 (delete-file "tests2/EasyMockRuleTest.java")
5994
5995 ;; This test fails because the file "easymock.properties" does
5996 ;; not exist.
5997 (delete-file "tests2/EasyMockPropertiesTest.java"))
5998 #t)))))
5999 (inputs
6000 (list java-cglib java-objenesis))
6001 (native-inputs
6002 (list java-junit java-hamcrest-core))
6003 (home-page "https://easymock.org/")
6004 (synopsis "Java library providing mock objects for unit tests")
6005 (description "EasyMock is a Java library that provides an easy way to use
6006mock objects in unit testing.")
6007 (license license:asl2.0)))
6008
6009(define-public java-easymock-3.2
6010 (package
6011 (inherit java-easymock)
6012 (name "java-easymock")
6013 (version "3.2")
6014 (source (origin
6015 (method git-fetch)
6016 (uri (git-reference
6017 (url "https://github.com/easymock/easymock/")
6018 (commit (string-append "easymock-" version))))
6019 (file-name (git-file-name name version))
6020 (sha256
6021 (base32
6022 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
6023 (arguments
6024 (list #:jar-name "easymock.jar"
6025 #:source-dir "easymock/src/main"
6026 #:test-dir "easymock/src/test"
6027 #:phases
6028 #~(modify-phases %standard-phases
6029 (add-after 'unpack 'delete-android-support
6030 (lambda _
6031 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
6032 (substitute* "MocksControl.java"
6033 (("AndroidSupport.isAndroid\\(\\)") "false")
6034 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
6035 (delete-file "AndroidClassProxyFactory.java"))))
6036 (add-after 'unpack 'delete-broken-tests
6037 (lambda _
6038 (with-directory-excursion "easymock/src/test/java/org/easymock"
6039 ;; This test depends on dexmaker.
6040 (delete-file "tests2/ClassExtensionHelperTest.java")
6041 ;; This is not a test.
6042 (delete-file "tests/BaseEasyMockRunnerTest.java")
6043 ;; ...but deleting it means that we also have to delete these
6044 ;; dependent files.
6045 (delete-file "tests2/EasyMockRunnerTest.java")
6046 ;; This test fails because the file "easymock.properties" does
6047 ;; not exist.
6048 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
6049
6050(define-public java-easymock-class-extension
6051 (package
6052 (inherit java-easymock-3.2)
6053 (name "java-easymock-class-extension")
6054 (build-system ant-build-system)
6055 (arguments
6056 (list #:jar-name "easymock-class-extensions.jar"
6057 #:source-dir "easymock-classextension/src/main/java"
6058 #:test-dir "easymock-classextension/src/test"))
6059 (inputs (list java-asm-8
6060 java-easymock-3.2
6061 java-cglib
6062 java-objenesis))
6063 (native-inputs
6064 (list java-junit java-hamcrest-core))
6065 (home-page "https://easymock.org/")
6066 (synopsis "Easymock extension to mock classes")
6067 (description "This package provides an extension to earlier versions of
6068easymock that allows mocking classes.")
6069 (license license:asl2.0)))
6070
6071(define-public java-jmock-1
6072 (package
6073 (name "java-jmock")
6074 (version "1.2.0")
6075 (source (origin
6076 (method git-fetch)
6077 (uri (git-reference
6078 (url "https://github.com/jmock-developers/jmock-library")
6079 (commit version)))
6080 (file-name (git-file-name name version))
6081 (sha256
6082 (base32
6083 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
6084 (build-system ant-build-system)
6085 (arguments
6086 `(#:build-target "jars"
6087 #:test-target "run.tests"
6088 #:phases
6089 (modify-phases %standard-phases
6090 (replace 'install (install-jars "build")))))
6091 (home-page "http://jmock.org/")
6092 (synopsis "Mock object library for test-driven development")
6093 (description "JMock is a library that supports test-driven development of
6094Java code with mock objects. Mock objects help you design and test the
6095interactions between the objects in your programs.
6096
6097The jMock library
6098
6099@itemize
6100@item makes it quick and easy to define mock objects
6101@item lets you precisely specify the interactions between
6102 your objects, reducing the brittleness of your tests
6103@item plugs into your favourite test framework
6104@item is easy to extend.
6105@end itemize\n")
6106 (license license:bsd-3)))
6107
6108(define-public java-jmock
6109 (package
6110 (inherit java-jmock-1)
6111 (name "java-jmock")
6112 (version "2.8.2")
6113 (source (origin
6114 (method git-fetch)
6115 (uri (git-reference
6116 (url "https://github.com/jmock-developers/jmock-library")
6117 (commit version)))
6118 (file-name (git-file-name name version))
6119 (sha256
6120 (base32
6121 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
6122 (inputs
6123 (list java-hamcrest-all java-bsh java-junit))
6124 (native-inputs
6125 `(("cglib" ,java-cglib)))
6126 (arguments
6127 `(#:jar-name "java-jmock.jar"
6128 #:source-dir "jmock/src/main/java"
6129 #:test-dir "jmock/src/test"))))
6130
6131(define-public java-jmock-junit4
6132 (package
6133 (inherit java-jmock)
6134 (name "java-jmock-junit4")
6135 (arguments
6136 `(#:jar-name "java-jmock-junit4.jar"
6137 #:source-dir "jmock-junit4/src/main/java"
6138 #:test-dir "jmock-junit4/src/test"))
6139 (inputs
6140 `(("java-hamcrest-all" ,java-hamcrest-all)
6141 ("java-bsh" ,java-bsh)
6142 ("java-jmock" ,java-jmock)
6143 ("java-jumit" ,java-junit)))))
6144
6145(define-public java-jmock-legacy
6146 (package
6147 (inherit java-jmock)
6148 (name "java-jmock-legacy")
6149 (arguments
6150 `(#:jar-name "java-jmock-legacy.jar"
6151 #:source-dir "jmock-legacy/src/main/java"
6152 #:test-dir "jmock-legacy/src/test"
6153 #:phases
6154 (modify-phases %standard-phases
6155 (add-before 'check 'copy-tests
6156 (lambda _
6157 ;; This file is a dependancy of some tests
6158 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
6159 (copy-file (string-append "jmock/src/test/java/" file)
6160 (string-append "jmock-legacy/src/test/java/" file))
6161 #t))))))
6162 (inputs
6163 (list java-hamcrest-all
6164 java-objenesis
6165 java-cglib
6166 java-jmock
6167 java-bsh
6168 java-junit))
6169 (native-inputs
6170 (list java-jmock-junit4))))
6171
6172(define-public java-hamcrest-all
6173 (package (inherit java-hamcrest-core)
6174 (name "java-hamcrest-all")
6175 (properties `((superseded . ,java-hamcrest)))
6176 (arguments
6177 `(#:jdk ,icedtea-8
6178 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
6179 ((#:build-target _) "bigjar")
6180 ((#:phases phases)
6181 `(modify-phases ,phases
6182 ;; Some build targets override the classpath, so we need to patch
6183 ;; the build.xml to ensure that required dependencies are on the
6184 ;; classpath.
6185 (add-after 'unpack 'patch-classpath-for-integration
6186 (lambda* (#:key inputs #:allow-other-keys)
6187 (substitute* "build.xml"
6188 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
6189 (string-join
6190 (cons line
6191 (append
6192 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
6193 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
6194 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
6195 ";"))
6196 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
6197 (car (find-files (assoc-ref inputs "java-hamcrest-core")
6198 "jar$"))))
6199 #t))
6200 (replace 'install
6201 (lambda* (#:key outputs #:allow-other-keys)
6202 (let* ((target (string-append (assoc-ref outputs "out")
6203 "/share/java/"))
6204 (version-suffix
6205 ,(string-append
6206 "-" (package-version java-hamcrest-core) ".jar"))
6207 (install-without-version-suffix
6208 (lambda (jar)
6209 (copy-file jar
6210 (string-append target
6211 (basename jar version-suffix)
6212 ".jar")))))
6213 (mkdir-p target)
6214 (for-each
6215 install-without-version-suffix
6216 (find-files "build"
6217 (lambda (name _)
6218 (and (string-suffix? ".jar" name)
6219 (not (string-suffix? "-sources.jar" name)))))))
6220 #t)))))))
6221 (inputs
6222 (modify-inputs inputs
6223 (prepend java-junit
6224 java-jmock-1
6225 ;; This is necessary because of what seems to be a race condition.
6226 ;; This package would sometimes fail to build because hamcrest-core.jar
6227 ;; could not be found, even though it is built as part of this package.
6228 ;; Adding java-hamcrest-core appears to fix this problem. See
6229 ;; https://debbugs.gnu.org/31390 for more information.
6230 java-hamcrest-core
6231 java-easymock)))))
6232
6233(define-public java-jopt-simple
6234 (package
6235 (name "java-jopt-simple")
6236 (version "5.0.3")
6237 (source (origin
6238 (method url-fetch)
6239 (uri (string-append "https://repo1.maven.org/maven2/"
6240 "net/sf/jopt-simple/jopt-simple/"
6241 version "/jopt-simple-"
6242 version "-sources.jar"))
6243 (sha256
6244 (base32
6245 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
6246 (build-system ant-build-system)
6247 (arguments
6248 `(#:tests? #f ; there are no tests
6249 #:jar-name "jopt-simple.jar"
6250 #:phases
6251 (modify-phases %standard-phases
6252 (add-before 'build 'copy-resources
6253 ;; The message bundles (ExceptionMessages.properties,
6254 ;; HelpFormatterMessages.properties) live next to the sources and
6255 ;; are loaded at run time.
6256 (lambda _
6257 (let ((classes-dir (string-append (getcwd) "/build/classes")))
6258 (with-directory-excursion "src"
6259 (for-each
6260 (lambda (resource)
6261 (install-file resource
6262 (string-append classes-dir "/"
6263 (dirname resource))))
6264 (find-files "." "\\.properties$"))))))
6265 (add-before 'install 'create-pom
6266 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
6267 (replace 'install
6268 (install-from-pom "pom.xml")))))
6269 (home-page "https://jopt-simple.github.io/jopt-simple/")
6270 (synopsis "Java library for parsing command line options")
6271 (description "JOpt Simple is a Java library for parsing command line
6272options, such as those you might pass to an invocation of @code{javac}. In
6273the interest of striving for simplicity, as closely as possible JOpt Simple
6274attempts to honor the command line option syntaxes of POSIX @code{getopt} and
6275GNU @code{getopt_long}. It also aims to make option parser configuration and
6276retrieval of options and their arguments simple and expressive, without being
6277overly clever.")
6278 (license license:expat)))
6279
6280;; Required by jmh
6281(define-public java-jopt-simple-4
6282 (package
6283 (inherit java-jopt-simple)
6284 (version "4.6")
6285 (source (origin
6286 (method url-fetch)
6287 (uri (string-append "https://repo1.maven.org/maven2/"
6288 "net/sf/jopt-simple/jopt-simple/"
6289 version "/jopt-simple-"
6290 version "-sources.jar"))
6291 (sha256
6292 (base32
6293 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
6294 (arguments
6295 (substitute-keyword-arguments (package-arguments java-jopt-simple)
6296 ((#:phases phases)
6297 `(modify-phases ,phases
6298 (replace 'create-pom
6299 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
6300 ,version))))))))
6301
6302(define-public java-commons-math3
6303 (package
6304 (name "java-commons-math3")
6305 (version "3.6.1")
6306 (source (origin
6307 (method url-fetch)
6308 (uri (string-append "mirror://apache/commons/math/source/"
6309 "commons-math3-" version "-src.tar.gz"))
6310 (sha256
6311 (base32
6312 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
6313 (build-system ant-build-system)
6314 (arguments
6315 `(#:build-target "jar"
6316 #:test-target "test"
6317 #:make-flags
6318 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
6319 (junit #$(this-package-native-input "java-junit")))
6320 (list (string-append "-Djunit.jar="
6321 (car (find-files junit "jar$")))
6322 (string-append "-Dhamcrest.jar="
6323 (car (find-files hamcrest ".*.jar$")))))
6324 #:phases
6325 (modify-phases %standard-phases
6326 ;; We want to build the jar in the build phase and run the tests
6327 ;; later in a separate phase.
6328 (add-after 'unpack 'untangle-targets
6329 (lambda _
6330 (substitute* "build.xml"
6331 (("name=\"jar\" depends=\"test\"")
6332 "name=\"jar\" depends=\"compile\""))))
6333 ;; There is no install target.
6334 (replace 'install
6335 (install-from-pom "pom.xml")))))
6336 (native-inputs
6337 (list java-junit java-hamcrest-core))
6338 (home-page "https://commons.apache.org/math/")
6339 (synopsis "Apache Commons mathematics library")
6340 (description "Commons Math is a library of lightweight, self-contained
6341mathematics and statistics components addressing the most common problems not
6342available in the Java programming language or Commons Lang.")
6343 (license license:asl2.0)))
6344
6345(define-public java-jmh
6346 (package
6347 (name "java-jmh")
6348 (version "1.37")
6349 (source (origin
6350 (method git-fetch)
6351 (uri (git-reference
6352 (url "https://github.com/openjdk/jmh")
6353 (commit version)))
6354 (file-name (git-file-name name version))
6355 (sha256
6356 (base32
6357 "06hfgnzqh1qg736s8ibznn6wljyjqg6yw1y14g8b0vrr5ivdm0ws"))))
6358 (build-system maven-build-system)
6359 (arguments
6360 `(#:exclude
6361 (("org.apache.maven.plugins" .
6362 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
6363 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"
6364 ;; Only checks the Maven version, which is fixed by the build
6365 ;; system.
6366 "maven-enforcer-plugin"))
6367 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
6368 ("org.apache.maven.wagon" . ("wagon-ssh")))
6369 #:phases
6370 (modify-phases %standard-phases
6371 (add-after 'unpack 'remove-unnecessary
6372 (lambda _
6373 ;; requires org.apache.maven.archetype:archetype-packaging.
6374 ;; Its subprojects also require groovy, kotlin and scala,
6375 ;; respectively.
6376 (delete-file-recursively "jmh-archetypes")
6377 ;; jmh-core-benchmarks depends on net.java.dev.jna:jna, whereas
6378 ;; java-native-access is installed as net.java.dev.jna:jna-jpms.
6379 ;; It is only JMH's own self-benchmark module and is not needed
6380 ;; to build or use the library.
6381 (delete-file-recursively "jmh-core-benchmarks"))))))
6382 (propagated-inputs
6383 (list java-jopt-simple
6384 java-commons-math3))
6385 (native-inputs
6386 (list java-junit
6387 java-hamcrest-core))
6388 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
6389 (synopsis "Benchmark harness for the JVM")
6390 (description "JMH is a Java harness for building, running, and analysing
6391nano/micro/milli/macro benchmarks written in Java and other languages
6392targeting the JVM.")
6393 ;; GPLv2 only
6394 (license license:gpl2)))
6395
6396(define-public java-commons-collections4
6397 (package
6398 (name "java-commons-collections4")
6399 (version "4.1")
6400 (source (origin
6401 (method url-fetch)
6402 (uri (string-append "mirror://apache/commons/collections/source/"
6403 "commons-collections4-" version "-src.tar.gz"))
6404 (sha256
6405 (base32
6406 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
6407 (build-system ant-build-system)
6408 (arguments
6409 `(#:test-target "test"
6410 #:make-flags
6411 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
6412 (junit #$(this-package-native-input "java-junit"))
6413 (easymock #$(this-package-native-input "java-easymock")))
6414 (list (string-append "-Djunit.jar="
6415 (car (find-files junit "jar$")))
6416 (string-append "-Dhamcrest.jar="
6417 (car (find-files hamcrest "jar$")))
6418 (string-append "-Deasymock.jar=" easymock
6419 "/share/java/easymock.jar")))
6420 #:phases
6421 (modify-phases %standard-phases
6422 (replace 'install
6423 (install-jars "target")))))
6424 (native-inputs
6425 (list java-junit java-hamcrest-core java-easymock))
6426 (home-page "https://commons.apache.org/collections/")
6427 (synopsis "Collections framework")
6428 (description "The Java Collections Framework is the recognised standard
6429for collection handling in Java. Commons-Collections seek to build upon the
6430JDK classes by providing new interfaces, implementations and utilities. There
6431are many features, including:
6432
6433@itemize
6434@item @code{Bag} interface for collections that have a number of copies of
6435 each object
6436@item @code{BidiMap} interface for maps that can be looked up from value to
6437 key as well and key to value
6438@item @code{MapIterator} interface to provide simple and quick iteration over
6439 maps
6440@item Transforming decorators that alter each object as it is added to the
6441 collection
6442@item Composite collections that make multiple collections look like one
6443@item Ordered maps and sets that retain the order elements are added in,
6444 including an LRU based map
6445@item Reference map that allows keys and/or values to be garbage collected
6446 under close control
6447@item Many comparator implementations
6448@item Many iterator implementations
6449@item Adapter classes from array and enumerations to collections
6450@item Utilities to test or create typical set-theory properties of collections
6451 such as union, intersection, and closure.
6452@end itemize\n")
6453 (license license:asl2.0)))
6454
6455(define-public java-commons-collections
6456 (package
6457 (inherit java-commons-collections4)
6458 (name "java-commons-collections")
6459 (version "3.2.2")
6460 (source (origin
6461 (method url-fetch)
6462 (uri (string-append "mirror://apache/commons/collections/source/"
6463 "commons-collections-" version "-src.tar.gz"))
6464 (sha256
6465 (base32
6466 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
6467 (patches
6468 (search-patches "java-commons-collections-fix-java8.patch"))))
6469 (arguments
6470 (substitute-keyword-arguments (package-arguments java-commons-collections4)
6471 ((#:phases phases)
6472 `(modify-phases ,phases
6473 ;; The manifest is required by the build procedure
6474 (add-before 'build 'add-manifest
6475 (lambda _
6476 (mkdir-p "build/conf")
6477 (call-with-output-file "build/conf/MANIFEST.MF"
6478 (lambda (file)
6479 (format file "Manifest-Version: 1.0\n")))
6480 #t))
6481 (replace 'install
6482 (install-jars "build"))))))))
6483
6484(define java-commons-collections-test-classes
6485 (package
6486 (inherit java-commons-collections)
6487 (arguments
6488 `(#:jar-name "commons-collections-test-classes.jar"
6489 #:source-dir "src/test"
6490 #:tests? #f))
6491 (inputs
6492 `(("collection" ,java-commons-collections)))))
6493
6494(define-public java-commons-beanutils
6495 (package
6496 (name "java-commons-beanutils")
6497 (version "1.9.3")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "mirror://apache/commons/beanutils/source/"
6501 "commons-beanutils-" version "-src.tar.gz"))
6502 (sha256
6503 (base32
6504 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
6505 (build-system ant-build-system)
6506 (arguments
6507 `(#:test-target "test"
6508 #:tests? #f
6509 #:phases
6510 (modify-phases %standard-phases
6511 (replace 'install
6512 (lambda* (#:key outputs #:allow-other-keys)
6513 (rename-file (string-append "dist/commons-beanutils-" ,version
6514 "-SNAPSHOT.jar")
6515 "commons-beanutils.jar")
6516 (install-file "commons-beanutils.jar"
6517 (string-append (assoc-ref outputs "out") "/share/java/"))
6518 #t)))))
6519 (inputs
6520 `(("logging" ,java-commons-logging-minimal)
6521 ("collections" ,java-commons-collections)))
6522 (native-inputs
6523 `(("junit" ,java-junit)
6524 ("collections-test" ,java-commons-collections-test-classes)))
6525 (home-page "https://commons.apache.org/beanutils/")
6526 (synopsis "Dynamically set or get properties in Java")
6527 (description "BeanUtils provides a simplified interface to reflection and
6528introspection to set or get dynamically determined properties through their
6529setter and getter method.")
6530 (license license:asl2.0)))
6531
6532(define-public java-commons-io
6533 (package
6534 (name "java-commons-io")
6535 (version "2.5")
6536 (source
6537 (origin
6538 (method url-fetch)
6539 (uri (string-append "mirror://apache/commons/io/source/"
6540 "commons-io-" version "-src.tar.gz"))
6541 (sha256
6542 (base32
6543 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6544 (build-system ant-build-system)
6545 (outputs '("out" "doc"))
6546 (arguments
6547 `(#:test-target "test"
6548 #:make-flags
6549 ,#~(list (string-append "-Djunit.jar="
6550 (car (find-files #$(this-package-native-input "java-junit")
6551 "jar$"))))
6552 #:phases
6553 (modify-phases %standard-phases
6554 (add-after 'build 'build-javadoc ant-build-javadoc)
6555 (replace 'install (install-from-pom "pom.xml"))
6556 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6557 (native-inputs
6558 (list java-junit java-hamcrest-core))
6559 (propagated-inputs
6560 (list apache-commons-parent-pom-39))
6561 (home-page "https://commons.apache.org/io/")
6562 (synopsis "Common useful IO related classes")
6563 (description "Commons-IO contains utility classes, stream implementations,
6564file filters and endian classes.")
6565 (license license:asl2.0)))
6566
6567(define-public java-commons-io-latest
6568 (package
6569 (inherit java-commons-io)
6570 (version "2.21.0")
6571 (source
6572 (origin
6573 (method url-fetch)
6574 (uri (string-append "mirror://apache/commons/io/source/"
6575 "commons-io-" version "-src.tar.gz"))
6576 (sha256
6577 (base32
6578 "0rr6hb8mm7fd6nrr8f81mvdpfalq01k03l3mzrlxx7g7lda40mb3"))))
6579 (outputs '("out"))
6580 (arguments
6581 `(#:tests? #f ;; tests require too many not yet packaged packages
6582 #:source-dir "src/main/java"
6583 #:jar-name "commons-io.jar"
6584 #:phases
6585 (modify-phases %standard-phases
6586 (replace 'install (install-from-pom "pom.xml")))))
6587 (native-inputs
6588 (list))
6589 (propagated-inputs
6590 (list apache-commons-parent-pom-78))))
6591
6592(define-public java-commons-exec-1.1
6593 (package
6594 (name "java-commons-exec")
6595 (version "1.1")
6596 (source
6597 (origin
6598 (method url-fetch)
6599 (uri (string-append "mirror://apache/commons/exec/source/"
6600 "commons-exec-" version "-src.tar.gz"))
6601 (sha256
6602 (base32
6603 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6604 (build-system ant-build-system)
6605 (arguments
6606 `(#:test-target "test"
6607 #:make-flags
6608 ,#~(list (string-append "-Dmaven.junit.jar="
6609 (car (find-files #$(this-package-native-input "java-junit")
6610 "jar$"))))
6611 #:phases
6612 (modify-phases %standard-phases
6613 (add-before 'build 'delete-network-tests
6614 (lambda _
6615 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6616 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6617 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6618 #t))
6619 ;; The "build" phase automatically tests.
6620 (delete 'check)
6621 (replace 'install (install-jars "target")))))
6622 (native-inputs
6623 (list java-junit))
6624 (home-page "https://commons.apache.org/proper/commons-exec/")
6625 (synopsis "Common program execution related classes")
6626 (description "Commons-Exec simplifies executing external processes.")
6627 (license license:asl2.0)))
6628
6629(define-public java-commons-exec
6630 (package
6631 (inherit java-commons-exec-1.1)
6632 (version "1.3")
6633 (source
6634 (origin
6635 (method url-fetch)
6636 (uri (string-append "mirror://apache/commons/exec/source/"
6637 "commons-exec-" version "-src.tar.gz"))
6638 (sha256
6639 (base32
6640 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6641 (arguments
6642 `(#:test-target "test"
6643 #:make-flags
6644 ,#~(list (string-append "-Dmaven.junit.jar="
6645 (car (find-files #$(this-package-native-input "java-junit")
6646 "jar$")))
6647 "-Dmaven.compiler.source=1.7"
6648 "-Dmaven.compiler.target=1.7")
6649 #:phases
6650 (modify-phases %standard-phases
6651 (add-before 'build 'delete-network-tests
6652 (lambda* (#:key inputs #:allow-other-keys)
6653 ;; This test hangs indefinitely.
6654 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6655 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6656 (("ping -c 10 127.0.0.1") "sleep 10"))
6657 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6658 (("/bin/ls") "ls"))
6659 (call-with-output-file "src/test/scripts/ping.sh"
6660 (lambda (port)
6661 (format port "#!~a/bin/sh\nsleep $1\n"
6662 (assoc-ref inputs "bash"))))
6663 #t))
6664 ;; The "build" phase automatically tests.
6665 (delete 'check)
6666 (replace 'install (install-jars "target")))))
6667 (native-inputs
6668 (list java-junit java-hamcrest-core))))
6669
6670(define-public java-commons-lang
6671 (package
6672 (name "java-commons-lang")
6673 (version "2.6")
6674 (source
6675 (origin
6676 (method url-fetch)
6677 (uri (string-append "mirror://apache/commons/lang/source/"
6678 "commons-lang-" version "-src.tar.gz"))
6679 (sha256
6680 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6681 (build-system ant-build-system)
6682 (outputs '("out" "doc"))
6683 (arguments
6684 `(#:test-target "test"
6685 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6686 #:phases
6687 (modify-phases %standard-phases
6688 (add-after 'build 'build-javadoc ant-build-javadoc)
6689 (add-before 'check 'disable-failing-test
6690 (lambda _
6691 ;; Disable a failing test
6692 (substitute* "src/test/java/org/apache/commons/lang/\
6693time/FastDateFormatTest.java"
6694 (("public void testFormat\\(\\)")
6695 "public void disabled_testFormat()"))
6696 #t))
6697 (replace 'install (install-jars "target"))
6698 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6699 (native-inputs
6700 (list java-junit))
6701 (home-page "https://commons.apache.org/lang/")
6702 (synopsis "Extension of the java.lang package")
6703 (description "The Commons Lang components contains a set of Java classes
6704that provide helper methods for standard Java classes, especially those found
6705in the @code{java.lang} package in the Sun JDK. The following classes are
6706included:
6707
6708@itemize
6709@item StringUtils - Helper for @code{java.lang.String}.
6710@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6711 of characters such as @code{[a-z]} and @code{[abcdez]}.
6712@item RandomStringUtils - Helper for creating randomised strings.
6713@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6714@item NumberRange - A range of numbers with an upper and lower bound.
6715@item ObjectUtils - Helper for @code{java.lang.Object}.
6716@item SerializationUtils - Helper for serializing objects.
6717@item SystemUtils - Utility class defining the Java system properties.
6718@item NestedException package - A sub-package for the creation of nested
6719 exceptions.
6720@item Enum package - A sub-package for the creation of enumerated types.
6721@item Builder package - A sub-package for the creation of @code{equals},
6722 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6723@end itemize\n")
6724 (license license:asl2.0)))
6725
6726(define-public java-commons-lang3
6727 (package
6728 (name "java-commons-lang3")
6729 (version "3.20.0")
6730 (source
6731 (origin
6732 (method url-fetch)
6733 (uri (string-append "mirror://apache/commons/lang/source/"
6734 "commons-lang3-" version "-src.tar.gz"))
6735 (sha256
6736 (base32 "05b2zfmw1y6bnzf7v32zkhix0c0sab82lmr3ilxciza0l5w6nwya"))))
6737 (build-system ant-build-system)
6738 (arguments
6739 `(#:jar-name "commons-lang3.jar"
6740 #:source-dir "src/main/java"
6741 #:tests? #f; require junit5
6742 #:phases
6743 (modify-phases %standard-phases
6744 (replace 'install (install-from-pom "pom.xml")))))
6745 (propagated-inputs
6746 (list apache-commons-parent-pom-92))
6747 (home-page "https://commons.apache.org/lang/")
6748 (synopsis "Extension of the java.lang package")
6749 (description "The Commons Lang components contains a set of Java classes
6750that provide helper methods for standard Java classes, especially those found
6751in the @code{java.lang} package. The following classes are included:
6752
6753@itemize
6754@item StringUtils - Helper for @code{java.lang.String}.
6755@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6756 characters such as @code{[a-z]} and @code{[abcdez]}.
6757@item RandomStringUtils - Helper for creating randomised strings.
6758@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6759@item NumberRange - A range of numbers with an upper and lower bound.
6760@item ObjectUtils - Helper for @code{java.lang.Object}.
6761@item SerializationUtils - Helper for serializing objects.
6762@item SystemUtils - Utility class defining the Java system properties.
6763@item NestedException package - A sub-package for the creation of nested
6764 exceptions.
6765@item Enum package - A sub-package for the creation of enumerated types.
6766@item Builder package - A sub-package for the creation of @code{equals},
6767 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6768@end itemize\n")
6769 (license license:asl2.0)))
6770
6771(define-public java-commons-bsf
6772 (package
6773 (name "java-commons-bsf")
6774 (version "2.4.0")
6775 (source (origin
6776 (method url-fetch)
6777 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6778 version ".tar.gz"))
6779 (sha256
6780 (base32
6781 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6782 (modules '((guix build utils)))
6783 (snippet
6784 '(begin
6785 (for-each delete-file
6786 (find-files "." "\\.jar$"))
6787 #t))))
6788 (build-system ant-build-system)
6789 (arguments
6790 `(#:build-target "jar"
6791 #:tests? #f; No test file
6792 #:modules ((guix build ant-build-system)
6793 (guix build utils)
6794 (guix build java-utils)
6795 (sxml simple))
6796 #:phases
6797 (modify-phases %standard-phases
6798 (add-before 'build 'create-properties
6799 (lambda _
6800 ;; This file is missing from the distribution
6801 (call-with-output-file "build-properties.xml"
6802 (lambda (port)
6803 (sxml->xml
6804 `(project (@ (basedir ".") (name "build-properties") (default ""))
6805 (property (@ (name "project.name") (value "bsf")))
6806 (property (@ (name "source.level") (value "1.5")))
6807 (property (@ (name "build.lib") (value "build/jar")))
6808 (property (@ (name "src.dir") (value "src")))
6809 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6810 (property (@ (name "build.tests") (value "build/test-classes")))
6811 (property (@ (name "build.dest") (value "build/classes"))))
6812 port)))
6813 #t))
6814 (replace 'install (install-jars "build")))))
6815 (native-inputs
6816 (list java-junit))
6817 (inputs
6818 (list java-commons-logging-minimal))
6819 (home-page "https://commons.apache.org/proper/commons-bsf")
6820 (synopsis "Bean Scripting Framework")
6821 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6822which provides scripting language support within Java applications, and access
6823to Java objects and methods from scripting languages. BSF allows one to write
6824JSPs in languages other than Java while providing access to the Java class
6825library. In addition, BSF permits any Java application to be implemented in
6826part (or dynamically extended) by a language that is embedded within it. This
6827is achieved by providing an API that permits calling scripting language engines
6828from within Java, as well as an object registry that exposes Java objects to
6829these scripting language engines.")
6830 (properties '((upstream-name . "bsf")))
6831 (license license:asl2.0)))
6832
6833(define-public java-commons-jxpath
6834 (package
6835 (name "java-commons-jxpath")
6836 (version "1.3")
6837 (source (origin
6838 (method url-fetch)
6839 (uri (string-append "mirror://apache/commons/jxpath/source/"
6840 "commons-jxpath-" version "-src.tar.gz"))
6841 (sha256
6842 (base32
6843 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6844 (build-system ant-build-system)
6845 (arguments
6846 `(#:jar-name "commons-jxpath.jar"
6847 ;; tests require more dependencies, including mockrunner which depends on old software
6848 #:tests? #f
6849 #:source-dir "src/java"))
6850 (inputs
6851 `(("servlet" ,java-classpathx-servletapi)
6852 ("java-jdom" ,java-jdom)
6853 ("java-commons-beanutils" ,java-commons-beanutils)))
6854 (native-inputs
6855 (list java-junit))
6856 (home-page "https://commons.apache.org/jxpath/")
6857 (synopsis "Simple interpreter of an expression language called XPath")
6858 (description "The org.apache.commons.jxpath package defines a simple
6859interpreter of an expression language called XPath. JXPath applies XPath
6860expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6861contexts, DOM etc, including mixtures thereof.")
6862 (license license:asl2.0)))
6863
6864(define-public java-commons-pool
6865 (package
6866 (name "java-commons-pool")
6867 (version "2.6.2")
6868 (source (origin
6869 (method url-fetch)
6870 (uri (string-append "mirror://apache/commons/pool/source/"
6871 "commons-pool2-" version "-src.tar.gz"))
6872 (sha256
6873 (base32
6874 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6875 (arguments
6876 `(#:jar-name "common-pool.jar"
6877 #:source-dir "src/main/java"
6878 #:test-exclude
6879 (list "**/PerformanceTest.java")))
6880 (build-system ant-build-system)
6881 (inputs
6882 (list java-cglib))
6883 (native-inputs
6884 (list java-junit java-hamcrest-core java-asm java-objenesis))
6885 (home-page "https://commons.apache.org/proper/commons-pool/")
6886 (synopsis "Object-pooling API in Java")
6887 (description "The commons-pool package provides an object-pooling API
6888and a number of object pool implementations. This package defines a
6889handful of pooling interfaces and some base classes that may be useful when
6890creating new pool implementations.")
6891 (properties '((upstream-name . "commons-pool2")))
6892 (license license:asl2.0)))
6893
6894(define-public java-commons-dbcp
6895 (package
6896 (name "java-commons-dbcp")
6897 (version "2.6.0")
6898 (source (origin
6899 (method url-fetch)
6900 (uri (string-append "mirror://apache/commons/dbcp/source/"
6901 "commons-dbcp2-" version "-src.tar.gz"))
6902 (sha256
6903 (base32
6904 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6905 (arguments
6906 `(#:source-dir "src/main/java"
6907 #:jar-name "java-commons-dbcp.jar"
6908 #:tests? #f)); requires apache-geronimo
6909 (inputs
6910 `(("java-commons-pool" ,java-commons-pool)
6911 ("java-commons-logging" ,java-commons-logging-minimal)
6912 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6913 (native-inputs
6914 (list java-junit))
6915 (build-system ant-build-system)
6916 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6917 (synopsis "Database Connection Pool for Java")
6918 (description "Commons-dbcp allows you to share a pool of database
6919connections between users. Creating a new connection for each user can be
6920time consuming and even unfeasible when the number of simultaneous users is
6921very large. This package provides a way to share a poole of connections to
6922reduce that load.")
6923 (properties '((upstream-name . "commons-dbcp2")))
6924 (license license:asl2.0)))
6925
6926(define-public java-commons-jcs
6927 (package
6928 (name "java-commons-jcs")
6929 (version "3.1")
6930 (source (origin
6931 (method url-fetch)
6932 (uri (string-append "mirror://apache/commons/jcs/source/"
6933 "commons-jcs3-dist-" version "-src.tar.gz"))
6934 (sha256
6935 (base32
6936 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6937 (build-system ant-build-system)
6938 (arguments
6939 `(#:jar-name "commons-jcs.jar"
6940 #:source-dir "commons-jcs-core/src/main/java"
6941 #:test-dir "commons-jcs-core/src/test"
6942 #:tests? #f; requires hsqldb
6943 #:phases
6944 (modify-phases %standard-phases
6945 (add-before 'build 'copy-resources
6946 (lambda _
6947 (copy-recursively "commons-jcs-core/src/main/resources"
6948 "build/classes"))))))
6949 (propagated-inputs
6950 (list java-classpathx-servletapi
6951 java-commons-dbcp
6952 java-httpcomponents-httpclient
6953 java-httpcomponents-httpcore
6954 java-log4j-api))
6955 (native-inputs
6956 (list java-junit))
6957 (home-page "https://commons.apache.org/proper/commons-jcs/")
6958 (synopsis "Distributed caching system in Java")
6959 (description "JCS is a distributed caching system written in Java. It
6960is intended to speed up applications by providing a means to manage cached
6961data of various dynamic natures. Like any caching system, JCS is most useful
6962for high read, low put applications. Latency times drop sharply and
6963bottlenecks move away from the database in an effectively cached system.")
6964 (properties '((upstream-name . "commons-jcs3-dist")))
6965 (license license:asl2.0)))
6966
6967(define-public java-jsr250
6968 (package
6969 (name "java-jsr250")
6970 (version "1.3")
6971 (source (origin
6972 (method git-fetch)
6973 (uri (git-reference
6974 (url "https://github.com/javaee/javax.annotation")
6975 (commit version)))
6976 (file-name (git-file-name name version))
6977 (sha256
6978 (base32
6979 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6980 (build-system ant-build-system)
6981 (arguments
6982 `(#:tests? #f ; no tests included
6983 #:jdk ,icedtea-8
6984 #:jar-name "jsr250.jar"
6985 #:phases
6986 (modify-phases %standard-phases
6987 (replace 'install
6988 (install-from-pom "pom.xml")))))
6989 (propagated-inputs (list java-jvnet-parent-pom-3))
6990 (home-page "https://jcp.org/en/jsr/detail?id=250")
6991 (synopsis "Security-related annotations")
6992 (description "This package provides annotations for security. It provides
6993packages in the @code{javax.annotation} and @code{javax.annotation.security}
6994namespaces.")
6995 ;; either cddl or gpl2 only, with classpath exception
6996 (license (list license:cddl1.0
6997 license:gpl2))))
6998
6999(define-public java-jsr305
7000 (package
7001 (name "java-jsr305")
7002 (version "3.0.1")
7003 (source (origin
7004 (method url-fetch)
7005 (uri (string-append "https://repo1.maven.org/maven2/"
7006 "com/google/code/findbugs/"
7007 "jsr305/" version "/jsr305-"
7008 version "-sources.jar"))
7009 (sha256
7010 (base32
7011 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
7012 (build-system ant-build-system)
7013 (arguments
7014 `(#:tests? #f ; no tests included
7015 #:jar-name "jsr305.jar"
7016 #:phases
7017 (modify-phases %standard-phases
7018 (add-before 'install 'create-pom
7019 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
7020 (replace 'install
7021 (install-from-pom "pom.xml")))))
7022 (home-page "https://findbugs.sourceforge.net/")
7023 (synopsis "Annotations for the static analyzer called findbugs")
7024 (description "This package provides annotations for the findbugs package.
7025It provides packages in the @code{javax.annotations} namespace.")
7026 (license license:asl2.0)))
7027
7028(define-public java-findbugs-annotations
7029 (package
7030 (name "java-findbugs-annotations")
7031 (version "3.0.1")
7032 (source (origin
7033 (method git-fetch)
7034 (uri (git-reference
7035 (url "https://github.com/findbugsproject/findbugs")
7036 (commit version)))
7037 (file-name (git-file-name name version))
7038 (sha256
7039 (base32
7040 "0zdf5hqj2g1ivxia8kw4g6gk98x6dsn4hfx8rl478150905kbq4y"))
7041 (modules '((guix build utils)))
7042 ;; Delete bundled jars.
7043 (snippet
7044 '(for-each delete-file (find-files "." "\\.jar$")))))
7045 (build-system ant-build-system)
7046 (arguments
7047 (list
7048 #:tests? #f ; no tests for the annotations
7049 #:jar-name "findbugs-annotations.jar"
7050 #:source-dir "annotations-src"
7051 #:phases
7052 #~(modify-phases %standard-phases
7053 ;; Pick only the namespace for the annotation classes.
7054 (add-after 'unpack 'select-annotation-sources
7055 (lambda _
7056 (let ((dir "annotations-src/edu/umd/cs/findbugs"))
7057 (mkdir-p dir)
7058 (copy-recursively
7059 "findbugs/src/java/edu/umd/cs/findbugs/annotations"
7060 (string-append dir "/annotations"))
7061 ;; The Confidence and Priority enums refer to this class,
7062 ;; which only defines constants.
7063 (install-file
7064 "findbugs/src/java/edu/umd/cs/findbugs/Priorities.java" dir)
7065 ;; Remove dependency to the BugRanker class.
7066 (substitute* (find-files dir "\\.java$")
7067 (("import edu.umd.cs.findbugs.BugRanker;") "")
7068 (("BugRanker.VISIBLE_RANK_MAX") "20"))
7069 #t)))
7070 (add-before 'install 'create-pom
7071 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "annotations"
7072 #$version))
7073 (replace 'install
7074 (install-from-pom "pom.xml")))))
7075 (propagated-inputs (list java-jsr305))
7076 (home-page "https://findbugs.sourceforge.net/")
7077 (synopsis "Annotations for the FindBugs static analysis tool")
7078 (description "FindBugs is a static analysis tool that looks for bugs in
7079Java programs. This package provides the annotations from the
7080@code{edu.umd.cs.findbugs.annotations} namespace, most notably
7081@code{@@SuppressFBWarnings}, which suppresses individual FindBugs warnings on a
7082class or method, as well as annotations such as @code{@@CheckForNull} and
7083@code{@@Nullable}. Only the annotation classes are built, not the FindBugs
7084analysis engine itself.")
7085 (license license:lgpl2.1+)))
7086
7087(define-public java-error-prone-annotations
7088 (package
7089 (name "java-error-prone-annotations")
7090 (version "2.50.0")
7091 (source (origin
7092 (method git-fetch)
7093 (uri (git-reference
7094 (url "https://github.com/google/error-prone")
7095 (commit (string-append "v" version))))
7096 (file-name (git-file-name "java-error-prone" version))
7097 (sha256
7098 (base32
7099 "0bsk701n5qbnx5dcjxvq9fvs1nakw27nxxwcvkbgdjyhchjmb6fi"))))
7100 (build-system ant-build-system)
7101 (arguments
7102 `(#:tests? #f; no tests
7103 #:jdk ,openjdk11
7104 #:jar-name (string-append ,name "-" ,version ".jar")
7105 #:source-dir "annotations/src/main/java"
7106 #:test-dir "annotations/src/altest"
7107 #:make-flags (list "-Dant.build.javac.source=1.8"
7108 "-Dant.build.javac.target=1.8")
7109 #:phases
7110 (modify-phases %standard-phases
7111 ;; Compile the module descriptor while keeping compatibility with
7112 ;; java 1.8.
7113 (add-before 'build 'module-info
7114 (lambda _
7115 (let ((classes-dir (string-append (getcwd) "/build/classes"))
7116 (source-dir "annotations/src/main/java"))
7117 (mkdir-p classes-dir)
7118 (invoke "javac" "--release" "9" "-implicit:none"
7119 "-sourcepath" source-dir "-d" classes-dir
7120 (string-append source-dir "/module-info.java"))
7121 (delete-file (string-append source-dir "/module-info.java")))))
7122 (replace 'install (install-from-pom "annotations/pom.xml")))))
7123 (propagated-inputs (list java-error-prone-parent-pom))
7124 (home-page "https://errorprone.info")
7125 (synopsis "Java static analyzer at compile-time")
7126 (description "Error Prone is a static analysis tool for Java that catches
7127common programming mistakes at compile-time. This package contains annotations
7128used by programmers to guide the static analysis.")
7129 (license license:asl2.0)))
7130
7131(define java-error-prone-parent-pom
7132 (package
7133 (inherit java-error-prone-annotations)
7134 (name "java-error-prone-parent-pom")
7135 (arguments
7136 `(#:tests? #f
7137 #:phases
7138 (modify-phases %standard-phases
7139 (delete 'configure)
7140 (delete 'build)
7141 (replace 'install
7142 (install-pom-file "pom.xml")))))
7143 (propagated-inputs '())))
7144
7145(define-public java-guava
7146 (package
7147 (name "java-guava")
7148 (version "31.1")
7149 (source (origin
7150 (method git-fetch)
7151 (uri (git-reference
7152 (url "https://github.com/google/guava/")
7153 (commit (string-append "v" version))))
7154 (file-name (git-file-name name version))
7155 (sha256
7156 (base32
7157 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
7158 (patches
7159 (search-patches "java-guava-remove-annotation-deps.patch"))))
7160 (build-system ant-build-system)
7161 (arguments
7162 `(#:tests? #f ; no tests included
7163 #:jar-name "guava.jar"
7164 #:source-dir "guava/src"
7165 #:phases
7166 (modify-phases %standard-phases
7167 (add-after 'unpack 'trim-sources
7168 (lambda _
7169 (with-directory-excursion "guava/src/com/google/common"
7170 ;; Remove annotations to avoid extra dependencies:
7171 ;; * "j2objc" annotations are used when converting Java to
7172 ;; Objective C;
7173 ;; * "IgnoreJRERequirement" is used for Android.
7174 ;; * "Nullable" is used to catch NPE at build time.
7175 (substitute* (find-files "." "\\.java$")
7176 (("import com.google.j2objc.*") "")
7177 (("import org.checkerframework.checker.*") "")
7178 (("@ReflectionSupport.*") "")
7179 (("@WeakOuter") "")
7180 (("@RetainedWith") "")
7181 (("@Weak") "")
7182 (("@J2ObjCIncompatible") "")
7183 (("@IgnoreJRERequirement") "")
7184 (("@Nullable") "")))))
7185 ;; This is required by guava, but this is just an empty stub
7186 (add-before 'install 'install-listenablefuture-stub
7187 (install-pom-file "futures/listenablefuture9999/pom.xml"))
7188 (replace 'install (install-from-pom "guava/pom.xml")))))
7189 (inputs
7190 (list java-error-prone-annotations java-jsr305))
7191 (propagated-inputs
7192 (list java-guava-futures-failureaccess java-guava-parent-pom))
7193 (home-page "https://github.com/google/guava")
7194 (synopsis "Google core libraries for Java")
7195 (description "Guava is a set of core libraries that includes new
7196collection types (such as multimap and multiset), immutable collections, a
7197graph library, functional types, an in-memory cache, and APIs/utilities for
7198concurrency, I/O, hashing, primitives, reflection, string processing, and much
7199more!")
7200 (license license:asl2.0)))
7201
7202(define-public java-guava-futures-failureaccess
7203 (package
7204 (inherit java-guava)
7205 (name "java-guava-futures-failureaccess")
7206 (arguments
7207 `(#:tests? #f; no tests
7208 #:jar-name "guava-futures-failureaccess.jar"
7209 #:source-dir "futures/failureaccess/src"
7210 #:phases
7211 (modify-phases %standard-phases
7212 (replace 'install
7213 (install-from-pom "futures/failureaccess/pom.xml")))))
7214 (propagated-inputs
7215 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
7216
7217(define java-guava-parent-pom
7218 (package
7219 (inherit java-guava)
7220 (name "java-guava-parent-pom")
7221 (arguments
7222 `(#:tests? #f
7223 #:phases
7224 (modify-phases %standard-phases
7225 (delete 'configure)
7226 (delete 'build)
7227 (replace 'install
7228 (install-pom-file "pom.xml")))))
7229 (propagated-inputs
7230 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
7231
7232;; The java-commons-logging package provides adapters to many different
7233;; logging frameworks. To avoid an excessive dependency graph we try to build
7234;; it with only a minimal set of adapters.
7235(define-public java-commons-logging-minimal
7236 (package
7237 (name "java-commons-logging-minimal")
7238 (version "1.2")
7239 (source (origin
7240 (method url-fetch)
7241 (uri (string-append "mirror://apache/commons/logging/source/"
7242 "commons-logging-" version "-src.tar.gz"))
7243 (sha256
7244 (base32
7245 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
7246 (build-system ant-build-system)
7247 (arguments
7248 `(#:tests? #f ; avoid dependency on logging frameworks
7249 #:jar-name "commons-logging-minimal.jar"
7250 #:phases
7251 (modify-phases %standard-phases
7252 (add-after 'unpack 'delete-adapters-and-tests
7253 (lambda _
7254 ;; Delete all adapters except for NoOpLog, SimpleLog, and
7255 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
7256 ;; is used by applications; SimpleLog is the only actually usable
7257 ;; implementation that does not depend on another logging
7258 ;; framework.
7259 (for-each
7260 (lambda (file)
7261 (delete-file (string-append
7262 "src/main/java/org/apache/commons/logging/impl/" file)))
7263 (list "Jdk13LumberjackLogger.java"
7264 "WeakHashtable.java"
7265 "Log4JLogger.java"
7266 "ServletContextCleaner.java"
7267 "Jdk14Logger.java"
7268 "AvalonLogger.java"
7269 "LogKitLogger.java"))
7270 (delete-file-recursively "src/test")
7271 #t))
7272
7273 (replace 'install
7274 (install-from-pom "pom.xml")))))
7275 (home-page "https://commons.apache.org/logging/")
7276 (synopsis "Common API for logging implementations")
7277 (description "The Logging package is a thin bridge between different
7278logging implementations. A library that uses the commons-logging API can be
7279used with any logging implementation at runtime.")
7280 (properties '((upstream-name . "commons-logging")))
7281 (license license:asl2.0)))
7282
7283;; This is the last release of the 1.x series.
7284(define-public java-mockito-1
7285 (package
7286 (name "java-mockito")
7287 (version "1.10.19")
7288 (source (origin
7289 (method url-fetch)
7290 (uri (string-append "https://repo1.maven.org/maven2/"
7291 "org/mockito/mockito-core/" version
7292 "/mockito-core-" version "-sources.jar"))
7293 (sha256
7294 (base32
7295 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
7296 (build-system ant-build-system)
7297 (arguments
7298 `(#:jar-name "mockito.jar"
7299 #:tests? #f ; no tests included
7300 ;; FIXME: patch-and-repack does not support jars, so we have to apply
7301 ;; patches in build phases.
7302 #:phases
7303 (modify-phases %standard-phases
7304 ;; Mockito was developed against a different version of hamcrest,
7305 ;; which does not require matcher implementations to provide an
7306 ;; implementation of the "describeMismatch" method. We add this
7307 ;; simple definition to pass the build with our version of hamcrest.
7308 (add-after 'unpack 'fix-hamcrest-build-error
7309 (lambda _
7310 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
7311 (("public Matcher getActualMatcher\\(\\) .*" line)
7312 (string-append "
7313 public void describeMismatch(Object item, Description description) {
7314 actualMatcher.describeMismatch(item, description);
7315 }"
7316 line)))
7317 #t))
7318 ;; Mockito bundles cglib. We have a cglib package, so let's use
7319 ;; that instead.
7320 (add-after 'unpack 'use-system-libraries
7321 (lambda _
7322 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
7323 (substitute* '("CGLIBHacker.java"
7324 "CglibMockMaker.java"
7325 "ClassImposterizer.java"
7326 "DelegatingMockitoMethodProxy.java"
7327 "MethodInterceptorFilter.java"
7328 "MockitoNamingPolicy.java"
7329 "SerializableMockitoMethodProxy.java"
7330 "SerializableNoOp.java")
7331 (("import org.mockito.cglib") "import net.sf.cglib")))
7332 #t)))))
7333 (inputs
7334 (list java-junit java-objenesis java-cglib java-hamcrest-core))
7335 (home-page "http://mockito.org")
7336 (synopsis "Mockito is a mock library for Java")
7337 (description "Mockito is a mocking library for Java which lets you write
7338tests with a clean and simple API. It generates mocks using reflection, and
7339it records all mock invocations, including methods arguments.")
7340 (license license:asl2.0)))
7341
7342(define-public java-opentest4j
7343 (package
7344 (name "java-opentest4j")
7345 (version "1.3.0")
7346 (source (origin
7347 (method git-fetch)
7348 (uri (git-reference
7349 (url "https://github.com/ota4j-team/opentest4j")
7350 (commit (string-append "r" version))))
7351 (file-name (git-file-name name version))
7352 (sha256
7353 (base32
7354 "1z7krrl8j7l2v3c1qadbl7bydigbh4gqv9gqm7xcizq2iq2hgav5"))))
7355 (build-system ant-build-system)
7356 (arguments
7357 (list
7358 #:jar-name "opentest4j.jar"
7359 #:source-dir "src/main/java"
7360 #:test-include (list "**/*Tests.java")
7361 ;; Tests use local variable type inference ('var'), which requires
7362 ;; Java 10 or later.
7363 #:jdk openjdk11
7364 #:phases
7365 #~(modify-phases %standard-phases
7366 (add-before 'build 'set-release
7367 (lambda _
7368 ;; Only the tests require JDK 10+. Target Java 8 for the
7369 ;; main classes so that the jar stays usable by packages built
7370 ;; with the default JDK.
7371 (substitute* "build.xml"
7372 (("(<javac )([^>]+srcdir=\"src/main/java\"[^>]+/?>)"
7373 _ prefix suffix)
7374 (string-append prefix "release=\"8\" " suffix))))))))
7375 (home-page "https://github.com/ota4j-team/opentest4j")
7376 (native-inputs
7377 (list java-junit-4.13.2))
7378 (synopsis "Java assertion library")
7379 (description "This package provides a common set of exceptions that
7380testing libraries and frameworks for the JVM can use to report test failures.")
7381 (license license:asl2.0)))
7382
7383(define-public java-mockito-4
7384 (package
7385 (inherit java-mockito-1)
7386 (version "4.11.0")
7387 (source (origin
7388 (method url-fetch)
7389 (uri (string-append "https://repo1.maven.org/maven2/"
7390 "org/mockito/mockito-core/" version
7391 "/mockito-core-" version "-sources.jar"))
7392 (sha256
7393 (base32
7394 "1gvqghx4xlgk1snl01csdj3wlrwl2zg9acasiwsqgcff5jgisx1l"))))
7395 (arguments
7396 (list #:tests? #f ; no tests included
7397 #:jar-name "mockito.jar"
7398 #:phases
7399 #~(modify-phases %standard-phases
7400 (add-after 'unpack 'reference-unshaded-asm
7401 (lambda _
7402 (substitute* (find-files "src" "\\.java$")
7403 (("net\\.bytebuddy\\.jar\\.asm") "org.objectweb.asm")))))))
7404 (inputs '())
7405 (propagated-inputs
7406 (list java-byte-buddy-agent
7407 java-byte-buddy-dep
7408 java-objenesis
7409 java-junit
7410 java-opentest4j))))
7411
7412(define-public java-httpcomponents-httpcore
7413 (package
7414 (name "java-httpcomponents-httpcore")
7415 (version "4.4.6")
7416 (source (origin
7417 (method url-fetch)
7418 (uri (string-append "mirror://apache/httpcomponents/httpcore/"
7419 "source/httpcomponents-core-"
7420 version "-src.tar.gz"))
7421 (sha256
7422 (base32
7423 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
7424 (build-system ant-build-system)
7425 (arguments
7426 `(#:jar-name "httpcomponents-httpcore.jar"
7427 #:phases
7428 (modify-phases %standard-phases
7429 (add-after 'unpack 'chdir
7430 (lambda _ (chdir "httpcore") #t))
7431 (replace 'install
7432 (install-from-pom "pom.xml")))))
7433 (inputs
7434 (list java-commons-logging-minimal java-commons-lang3))
7435 (native-inputs
7436 (list java-junit java-mockito-1))
7437 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
7438 (synopsis "Low level HTTP transport components")
7439 (description "HttpCore is a set of low level HTTP transport components
7440that can be used to build custom client and server side HTTP services with a
7441minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7442on the classic Java I/O and non-blocking, event driven I/O model based on Java
7443NIO.
7444
7445This package provides the blocking I/O model library.")
7446 (license license:asl2.0)))
7447
7448(define-public java-httpcomponents-httpcore-nio
7449 (package (inherit java-httpcomponents-httpcore)
7450 (name "java-httpcomponents-httpcore-nio")
7451 (arguments
7452 `(#:jar-name "httpcomponents-httpcore-nio.jar"
7453 #:phases
7454 (modify-phases %standard-phases
7455 (add-after 'unpack 'chdir
7456 (lambda _ (chdir "httpcore-nio") #t)))))
7457 (inputs
7458 (modify-inputs inputs
7459 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
7460 (description "HttpCore is a set of low level HTTP transport components
7461that can be used to build custom client and server side HTTP services with a
7462minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7463on the classic Java I/O and non-blocking, event driven I/O model based on Java
7464NIO.
7465
7466This package provides the non-blocking I/O model library based on Java
7467NIO.")))
7468
7469(define-public java-httpcomponents-httpcore-ab
7470 (package (inherit java-httpcomponents-httpcore)
7471 (name "java-httpcomponents-httpcore-ab")
7472 (arguments
7473 `(#:jar-name "httpcomponents-httpcore-ab.jar"
7474 #:phases
7475 (modify-phases %standard-phases
7476 (add-after 'unpack 'chdir
7477 (lambda _ (chdir "httpcore-ab") #t)))))
7478 (inputs
7479 (modify-inputs inputs
7480 (prepend java-httpcomponents-httpcore java-commons-cli
7481 java-hamcrest-core)))
7482 (synopsis "Apache HttpCore benchmarking tool")
7483 (description "This package provides the HttpCore benchmarking tool. It is
7484an Apache AB clone based on HttpCore.")))
7485
7486(define-public java-httpcomponents-httpcore-osgi
7487 (package (inherit java-httpcomponents-httpcore)
7488 (name "java-httpcomponents-httpcore-osgi")
7489 (arguments
7490 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
7491 #:phases
7492 (modify-phases %standard-phases
7493 (add-after 'unpack 'chdir
7494 (lambda _ (chdir "httpcore-osgi"))))))
7495 (inputs
7496 (modify-inputs inputs
7497 (prepend java-httpcomponents-httpcore
7498 java-httpcomponents-httpcore-nio
7499 java-hamcrest-core)))
7500 (native-inputs (list java-ops4j-pax-exam-core
7501 java-ops4j-pax-exam-core-junit
7502 java-ops4j-pax-exam-core-spi
7503 java-junit))
7504 (description "HttpCore is a set of low level HTTP transport components
7505that can be used to build custom client and server side HTTP services with a
7506minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7507on the classic Java I/O and non-blocking, event driven I/O model based on Java
7508NIO.
7509
7510This package provides... some tests.")))
7511
7512(define-public java-httpcomponents-httpclient
7513 (package
7514 (name "java-httpcomponents-httpclient")
7515 (version "4.5.12")
7516 (source (origin
7517 (method url-fetch)
7518 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
7519 "source/httpcomponents-client-"
7520 version "-src.tar.gz"))
7521 (sha256
7522 (base32
7523 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
7524 (build-system ant-build-system)
7525 (arguments
7526 `(#:jar-name "httpcomponents-httpclient.jar"
7527 #:phases
7528 (modify-phases %standard-phases
7529 (add-after 'unpack 'chdir
7530 (lambda _ (chdir "httpclient") #t))
7531
7532 (replace 'install
7533 (install-from-pom "pom.xml")))))
7534 (inputs
7535 (list java-commons-logging-minimal
7536 java-commons-codec
7537 java-hamcrest-core
7538 java-httpcomponents-httpcore
7539 java-mockito-1
7540 java-junit))
7541 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
7542 (synopsis "HTTP client library for Java")
7543 (description "Although the @code{java.net} package provides basic
7544functionality for accessing resources via HTTP, it doesn't provide the full
7545flexibility or functionality needed by many applications. @code{HttpClient}
7546seeks to fill this void by providing an efficient, up-to-date, and
7547feature-rich package implementing the client side of the most recent HTTP
7548standards and recommendations.")
7549 (properties '((upstream-name . "httpcomponents-client")))
7550 (license license:asl2.0)))
7551
7552(define-public java-httpcomponents-httpclient-cache
7553 (package (inherit java-httpcomponents-httpclient)
7554 (name "java-httpcomponents-httpclient-cache")
7555 (arguments
7556 `(#:jar-name "httpcomponents-httpclient-cache.jar"
7557 #:source-dir "src/main/java"
7558 #:test-dir "src/test"
7559 #:tests? #f; tests are broken with current cglib.
7560 #:phases
7561 (modify-phases %standard-phases
7562 (add-after 'unpack 'delete-unused-impls
7563 (lambda _
7564 (for-each
7565 delete-file-recursively
7566 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
7567 "src/main/java/org/apache/http/impl/client/cache/memcached/"
7568 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
7569 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
7570 (add-after 'unpack 'chdir
7571 (lambda _ (chdir "httpclient-cache"))))))
7572 (inputs
7573 (modify-inputs inputs
7574 (prepend java-httpcomponents-httpclient
7575 java-httpcomponents-httpmime
7576 java-hamcrest-core)))
7577 (description "This package provides an API for caching accessed HTTP
7578resources.")))
7579
7580(define-public java-httpcomponents-httpclient-osgi
7581 (package (inherit java-httpcomponents-httpclient)
7582 (name "java-httpcomponents-httpclient-osgi")
7583 (arguments
7584 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
7585 #:tests? #f; tests are broken with current cglib.
7586 #:phases
7587 (modify-phases %standard-phases
7588 (add-after 'unpack 'chdir
7589 (lambda _ (chdir "httpclient-osgi") #t)))))
7590 (inputs
7591 (modify-inputs inputs
7592 (prepend java-httpcomponents-httpclient
7593 java-httpcomponents-httpclient-cache
7594 java-osgi-framework
7595 java-osgi-service-cm
7596 java-hamcrest-core)))))
7597
7598(define-public java-httpcomponents-httpmime
7599 (package (inherit java-httpcomponents-httpclient)
7600 (name "java-httpcomponents-httpmime")
7601 (arguments
7602 `(#:jar-name "httpcomponents-httpmime.jar"
7603 #:phases
7604 (modify-phases %standard-phases
7605 (add-after 'unpack 'chdir
7606 (lambda _ (chdir "httpmime") #t))
7607 (replace 'install
7608 (install-from-pom "pom.xml")))))
7609 (inputs
7610 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
7611 java-junit java-hamcrest-core))))
7612
7613(define-public java-commons-net
7614 (package
7615 (name "java-commons-net")
7616 (version "3.6")
7617 (source (origin
7618 (method url-fetch)
7619 (uri (string-append "mirror://apache/commons/net/source/"
7620 "commons-net-" version "-src.tar.gz"))
7621 (sha256
7622 (base32
7623 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
7624 (build-system ant-build-system)
7625 (arguments
7626 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
7627 ;; should be "resources/examples/examples.properties"), but gets "null"
7628 ;; instead.
7629 #:tests? #f
7630 #:jar-name "commons-net.jar"))
7631 (native-inputs
7632 (list java-junit java-hamcrest-core))
7633 (home-page "https://commons.apache.org/net/")
7634 (synopsis "Client library for many basic Internet protocols")
7635 (description "The Apache Commons Net library implements the client side of
7636many basic Internet protocols. The purpose of the library is to provide
7637fundamental protocol access, not higher-level abstractions.")
7638 (license license:asl2.0)))
7639
7640(define-public java-jsch
7641 (package
7642 (name "java-jsch")
7643 (version "0.1.55")
7644 (source (origin
7645 (method url-fetch)
7646 (uri (string-append "mirror://sourceforge/jsch/jsch/"
7647 version "/jsch-" version ".zip"))
7648 (sha256
7649 (base32
7650 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
7651 (build-system ant-build-system)
7652 (arguments
7653 `(#:build-target "dist"
7654 #:tests? #f ; no tests included
7655 #:phases
7656 (modify-phases %standard-phases
7657 (replace 'install (install-jars "dist")))))
7658 (native-inputs
7659 (list unzip))
7660 (home-page "http://www.jcraft.com/jsch/")
7661 (synopsis "Pure Java implementation of SSH2")
7662 (description "JSch is a pure Java implementation of SSH2. JSch allows you
7663to connect to an SSH server and use port forwarding, X11 forwarding, file
7664transfer, etc., and you can integrate its functionality into your own Java
7665programs.")
7666 (license license:bsd-3)))
7667
7668(define-public java-jsch-0.1.72
7669 (package
7670 (name "java-jsch")
7671 (version "0.1.72")
7672 (source
7673 (origin
7674 (method git-fetch)
7675 (uri (git-reference
7676 (url "https://github.com/mwiede/jsch.git")
7677 (commit (string-append "jsch-" version))))
7678 (file-name (git-file-name name version))
7679 (sha256
7680 (base32 "1xx50fw9wxnkm9yg8v8scr2c7781506flv0ivalpw7bg27w8sm59"))))
7681 (build-system ant-build-system)
7682 (arguments
7683 (list
7684 #:jdk openjdk17
7685 #:tests? #f
7686 #:modules
7687 '((guix build utils)
7688 (guix build ant-build-system)
7689 (guix build java-utils))
7690 #:phases
7691 #~(modify-phases %standard-phases
7692 (replace 'build
7693 (lambda* (#:key inputs #:allow-other-keys)
7694 (define classes-dir (string-append (getcwd) "/build/classes"))
7695 (define generated-dir (string-append (getcwd) "/build/generated"))
7696 (define manifest-file (string-append (getcwd) "/build/manifest.mf"))
7697 (define jar-file (string-append (getcwd) "/build/jsch-" #$version ".jar"))
7698 (define jna
7699 (car (find-files (assoc-ref inputs "java-native-access")
7700 "jna-jpms.*\\.jar$")))
7701 (define jna-platform
7702 (car (find-files (assoc-ref inputs "java-native-access-platform")
7703 "jna-platform-jpms.*\\.jar$")))
7704 (define bcprov
7705 (car (find-files (assoc-ref inputs "java-bouncycastle")
7706 "bcprov.*\\.jar$")))
7707 (define junixsocket
7708 (car (find-files (assoc-ref inputs "java-junixsocket-common")
7709 "\\.jar$")))
7710 (define classpath
7711 (string-append jna ":" jna-platform ":" bcprov
7712 ":" junixsocket))
7713 (define (java-sources source-root)
7714 (filter (lambda (file)
7715 (and (string-suffix? ".java" file)
7716 (not (string-suffix? "module-info.java" file))))
7717 (find-files source-root "\\.java$")))
7718 (define (compile-release source-root release)
7719 (let ((sources (java-sources source-root))
7720 (target (string-append classes-dir "/META-INF/versions/"
7721 release)))
7722 (when (pair? sources)
7723 (mkdir-p target)
7724 (apply invoke "javac"
7725 (append
7726 (list "--release" release
7727 "-cp" (string-append classes-dir ":" classpath)
7728 "-d" target)
7729 sources)))))
7730 (mkdir-p classes-dir)
7731 (mkdir-p (string-append generated-dir "/com/jcraft/jsch"))
7732 (copy-file "src/main/java-templates/com/jcraft/jsch/Version.java"
7733 (string-append generated-dir
7734 "/com/jcraft/jsch/Version.java"))
7735 (substitute* (string-append generated-dir
7736 "/com/jcraft/jsch/Version.java")
7737 (("\\$\\{project.version\\}") #$version))
7738 (apply invoke "javac"
7739 (append
7740 (list "--release" "8"
7741 "-cp" classpath
7742 "-d" classes-dir)
7743 (java-sources "src/main/java")
7744 (list (string-append generated-dir
7745 "/com/jcraft/jsch/Version.java"))))
7746 (for-each
7747 (lambda (release)
7748 (compile-release (string-append "src/main/java" release)
7749 release))
7750 '("9" "11" "15" "16"))
7751 (call-with-output-file manifest-file
7752 (lambda (port)
7753 (display "Multi-Release: true\n" port)))
7754 (invoke "jar" "--create"
7755 "--file" jar-file
7756 "--manifest" manifest-file
7757 "-C" classes-dir ".")))
7758 (add-before 'install 'create-pom
7759 (generate-pom.xml "pom.xml" "com.jcraft"
7760 "jsch" #$version))
7761 (replace 'install
7762 (install-from-pom "pom.xml")))))
7763 (inputs
7764 (list java-bouncycastle-1.77
7765 java-junixsocket-common-2
7766 java-native-access-5.14.0
7767 java-native-access-platform-5.14.0))
7768 (native-inputs
7769 (list java-kohlschutter-compiler-annotations-1
7770 unzip))
7771 (home-page "https://github.com/mwiede/jsch")
7772 (synopsis "Pure Java implementation of SSH2")
7773 (description
7774 "JSch is a pure Java implementation of SSH2. This package builds the
77750.1.72 release from source with bouncycastle and junixsocket support.")
7776 (license license:bsd-3)))
7777
7778(define-public java-jzlib-1.1.3
7779 (package
7780 (name "java-jzlib")
7781 (version "1.1.3")
7782 (source (origin
7783 (method git-fetch)
7784 (uri (git-reference
7785 (url "https://github.com/ymnk/jzlib")
7786 (commit version)))
7787 (file-name (git-file-name name version))
7788 (sha256
7789 (base32
7790 "1wma04qlx65ybyf49dngqb5db1xc7sya0g98frj5chhr4qc7fjs8"))))
7791 (build-system ant-build-system)
7792 (arguments
7793 `(#:jar-name "jzlib.jar"
7794 #:source-dir "src/main/java"
7795 #:tests? #f ; no tests
7796 #:phases
7797 (modify-phases %standard-phases
7798 (replace 'install
7799 (install-from-pom "pom.xml")))))
7800 (home-page "http://www.jcraft.com/jzlib/")
7801 (synopsis "Pure Java implementation of zlib")
7802 (description "JZlib is a re-implementation of zlib in pure Java. It
7803provides @code{Deflater}, @code{Inflater}, and streaming classes for
7804compression and decompression compatible with the zlib format.")
7805 (license license:bsd-3)))
7806
7807(define-public java-commons-compress
7808 (package
7809 (name "java-commons-compress")
7810 (version "1.28.0")
7811 (source (origin
7812 (method url-fetch)
7813 (uri (string-append "mirror://apache/commons/compress/source/"
7814 "commons-compress-" version "-src.tar.gz"))
7815 (sha256
7816 (base32
7817 "0qkn70dfb1f9xihc34mbpbr5ag8qm4qq18hh3p4286r2ajj0z1sw"))))
7818 (build-system ant-build-system)
7819 (arguments
7820 `(#:jar-name "commons-compress.jar"
7821 #:source-dir "src/main/java"
7822 #:tests? #f; requires java-mockito-3
7823 #:phases
7824 (modify-phases %standard-phases
7825 (replace 'install (install-from-pom "pom.xml")))))
7826 (propagated-inputs
7827 (list java-commons-lang3
7828 java-commons-io-latest
7829 java-commons-codec
7830 java-asm-9
7831 java-brotli
7832 java-xz
7833 java-zstd
7834 apache-commons-parent-pom-85))
7835 (home-page "https://commons.apache.org/proper/commons-compress/")
7836 (synopsis "Java library for working with compressed files")
7837 (description "The Apache Commons Compress library defines an API for
7838working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
7839Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
7840 (license license:asl2.0)))
7841
7842(define-public java-commons-compress-1.21
7843 (package
7844 (inherit java-commons-compress)
7845 (version "1.21")
7846 (source (origin
7847 (method url-fetch)
7848 (uri (string-append "mirror://apache/commons/compress/source/"
7849 "commons-compress-" version "-src.tar.gz"))
7850 (sha256
7851 (base32
7852 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
7853 (propagated-inputs
7854 (list java-asm-3
7855 java-brotli
7856 java-osgi-core
7857 java-xz
7858 java-zstd
7859 apache-commons-parent-pom-52))))
7860
7861(define-public java-commons-csv
7862 (package
7863 (name "java-commons-csv")
7864 (version "1.4")
7865 (source (origin
7866 (method url-fetch)
7867 (uri (string-append "mirror://apache/commons/csv/source/"
7868 "commons-csv-" version "-src.tar.gz"))
7869 (sha256
7870 (base32
7871 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
7872 (build-system ant-build-system)
7873 (arguments
7874 `(#:jar-name "commons-csv.jar"
7875 #:source-dir "src/main/java"
7876 #:tests? #f)); FIXME: requires java-h2
7877 (inputs
7878 `(("java-hamcrest-core" ,java-hamcrest-core)
7879 ("java-commons-io" ,java-commons-io)
7880 ("java-commons-lang3" ,java-commons-lang3)
7881 ("junit" ,java-junit)))
7882 (home-page "https://commons.apache.org/proper/commons-csv/")
7883 (synopsis "Read and write CSV documents")
7884 (description "Commons CSV reads and writes files in variations of the Comma
7885Separated Value (CSV) format. The most common CSV formats are predefined in the
7886CSVFormat class:
7887
7888@itemize
7889@item Microsoft Excel
7890@item Informix UNLOAD
7891@item Informix UNLOAD CSV
7892@item MySQL
7893@item RFC 4180
7894@item TDF
7895@end itemize
7896
7897Custom formats can be created using a fluent style API.")
7898 (license license:asl2.0)))
7899
7900(define-public java-jaxrs-api-2
7901 (package
7902 (name "java-jaxrs-api")
7903 (version "2.1.1")
7904 (source (origin
7905 (method git-fetch)
7906 (uri (git-reference
7907 (url "https://github.com/jakartaee/rest")
7908 (commit version)))
7909 (file-name (git-file-name name version))
7910 (sha256
7911 (base32
7912 "1sa490sag5r23hx84haddkbbyn4dlhav4m445k53y53jzs64cs4c"))))
7913 (build-system ant-build-system)
7914 (arguments
7915 (list
7916 #:tests? #f
7917 #:jdk openjdk9
7918 #:jar-name "javax.ws.rs-api.jar"
7919 #:source-dir "jaxrs-api/src/main/java"
7920 #:phases
7921 #~(modify-phases %standard-phases
7922 (add-before 'install 'create-pom
7923 (generate-pom.xml "pom.xml" "javax.ws.rs" "javax.ws.rs-api"
7924 #$version))
7925 (replace 'install (install-from-pom "pom.xml")))))
7926 (home-page "https://github.com/jax-rs")
7927 (synopsis "Java API for RESTful Web Services")
7928 (description "JAX-RS provides a standardized API for building RESTful
7929web services in Java.")
7930 (license license:cddl1.1)))
7931
7932(define-public java-osgi-annotation
7933 (package
7934 (name "java-osgi-annotation")
7935 (version "6.0.0")
7936 (source (origin
7937 (method url-fetch)
7938 (uri (string-append "https://repo1.maven.org/maven2/"
7939 "org/osgi/org.osgi.annotation/" version "/"
7940 "org.osgi.annotation-" version "-sources.jar"))
7941 (sha256
7942 (base32
7943 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
7944 (build-system ant-build-system)
7945 (arguments
7946 `(#:tests? #f ; no tests
7947 #:jar-name "osgi-annotation.jar"
7948 #:phases
7949 (modify-phases %standard-phases
7950 (add-before 'install 'create-pom
7951 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
7952 (replace 'install (install-from-pom "pom.xml")))))
7953 (home-page "https://www.osgi.org")
7954 (synopsis "Annotation module of OSGi framework")
7955 (description
7956 "OSGi, for Open Services Gateway initiative framework, is a module system
7957and service platform for the Java programming language. This package contains
7958the OSGi annotation module, providing additional services to help dynamic
7959components.")
7960 (license license:asl2.0)))
7961
7962(define-public java-osgi-annotation-8.1.0
7963 ;; Upstream tags the monorepo as 8.0.0.1, but osgi.annotation/bnd.bnd sets
7964 ;; the annotation artifact's release/minor version to 8.1, yielding 8.1.0.
7965 (let ((tag "8.0.0.1"))
7966 (package
7967 (name "java-osgi-annotation")
7968 (version "8.1.0")
7969 (source (origin
7970 (method git-fetch)
7971 (uri (git-reference
7972 (url "https://github.com/osgi/osgi")
7973 (commit tag)))
7974 (modules '((guix build utils)))
7975 (snippet
7976 '(begin
7977 (for-each delete-file
7978 (find-files "." "\\.jar$"))
7979 #t))
7980 (file-name (git-file-name name version))
7981 (sha256
7982 (base32
7983 "0s0ig6prnkvjp9159087mf16ihbqc91qlwdi1l0n5afhh2z5cnn5"))))
7984 (build-system ant-build-system)
7985 (arguments
7986 (list
7987 #:tests? #f
7988 #:jar-name "osgi-annotation.jar"
7989 #:phases
7990 #~(modify-phases %standard-phases
7991 (add-after 'unpack 'prepare-source-layout
7992 (lambda _
7993 (mkdir-p "src")
7994 (for-each
7995 (lambda (directory)
7996 (invoke "cp" "-r" (string-append directory "/.") "src/"))
7997 '("org.osgi.annotation.bundle/src"
7998 "org.osgi.annotation.versioning/src"))))
7999 (add-before 'install 'create-pom
8000 (generate-pom.xml "pom.xml" "org.osgi" "osgi.annotation"
8001 #$version))
8002 (replace 'install (install-from-pom "pom.xml")))))
8003 (home-page "https://www.osgi.org")
8004 (synopsis "Annotations for use in compiling OSGi bundles")
8005 (description "OSGi, for Open Services Gateway initiative framework, is a
8006module system and service platform for the Java programming language. This
8007package contains the annotation classes used at compile time.")
8008 (license license:asl2.0))))
8009
8010(define-public java-osgi-core
8011 (package
8012 (name "java-osgi-core")
8013 (version "6.0.0")
8014 (source (origin
8015 (method url-fetch)
8016 (uri (string-append "https://repo1.maven.org/maven2/"
8017 "org/osgi/org.osgi.core/" version "/"
8018 "org.osgi.core-" version "-sources.jar"))
8019 (sha256
8020 (base32
8021 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
8022 (build-system ant-build-system)
8023 (arguments
8024 `(#:tests? #f ; no tests
8025 #:jar-name "osgi-core.jar"
8026 #:phases
8027 (modify-phases %standard-phases
8028 (add-before 'install 'create-pom
8029 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
8030 (replace 'install (install-from-pom "pom.xml")))))
8031 (inputs
8032 (list java-osgi-annotation))
8033 (home-page "https://www.osgi.org")
8034 (synopsis "Core module of OSGi framework")
8035 (description
8036 "OSGi, for Open Services Gateway initiative framework, is a module system
8037and service platform for the Java programming language. This package contains
8038the OSGi Core module.")
8039 (license license:asl2.0)))
8040
8041(define-public java-osgi-core-8.0.0
8042 ;; Upstream uses release-train tags for the monorepo; osgi.core/bnd.bnd
8043 ;; emits artifact version 8.0.0 from the r8-core-final checkout.
8044 (let ((tag "r8-core-final"))
8045 (package
8046 (name "java-osgi-core")
8047 (version "8.0.0")
8048 (source (origin
8049 (method git-fetch)
8050 (uri (git-reference
8051 (url "https://github.com/osgi/osgi")
8052 (commit tag)))
8053 (modules '((guix build utils)))
8054 (snippet
8055 '(begin
8056 (for-each delete-file
8057 (find-files "." "\\.jar$"))
8058 #t))
8059 (file-name (git-file-name name version))
8060 (sha256
8061 (base32
8062 "01z4c3jakzjdh4m0j71shppa1nfgaqgxwajnhyv56s1l1a9hxb6x"))))
8063 (build-system ant-build-system)
8064 (arguments
8065 (list
8066 #:tests? #f
8067 #:jar-name "osgi-core.jar"
8068 #:phases
8069 #~(modify-phases %standard-phases
8070 (add-after 'unpack 'prepare-source-layout
8071 (lambda _
8072 (mkdir-p "src")
8073 (for-each
8074 (lambda (directory)
8075 (invoke "cp" "-r" (string-append directory "/.") "src/"))
8076 '("org.osgi.dto/src"
8077 "org.osgi.framework/src"
8078 "org.osgi.resource/src"
8079 "org.osgi.service.condition/src"
8080 "org.osgi.service.condpermadmin/src"
8081 "org.osgi.service.log/src"
8082 "org.osgi.service.packageadmin/src"
8083 "org.osgi.service.permissionadmin/src"
8084 "org.osgi.service.resolver/src"
8085 "org.osgi.service.startlevel/src"
8086 "org.osgi.service.url/src"
8087 "org.osgi.util.tracker/src"))))
8088 (add-before 'install 'create-pom
8089 (generate-pom.xml "pom.xml" "org.osgi" "osgi.core" #$version))
8090 (replace 'install (install-from-pom "pom.xml")))))
8091 (inputs (list java-osgi-annotation-8.1.0))
8092 (home-page "https://www.osgi.org")
8093 (synopsis "Core module of OSGi framework")
8094 (description "OSGi, for Open Services Gateway initiative framework, is a
8095module system and service platform for the Java programming language. This
8096package contains the OSGi Core module.")
8097 (license license:asl2.0))))
8098
8099(define-public java-osgi-service-event
8100 (package
8101 (name "java-osgi-service-event")
8102 (version "1.3.1")
8103 (source (origin
8104 (method url-fetch)
8105 (uri (string-append "https://repo1.maven.org/maven2/"
8106 "org/osgi/org.osgi.service.event/"
8107 version "/org.osgi.service.event-"
8108 version "-sources.jar"))
8109 (sha256
8110 (base32
8111 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
8112 (build-system ant-build-system)
8113 (arguments
8114 `(#:tests? #f ; no tests
8115 #:jar-name "osgi-service-event.jar"))
8116 (inputs
8117 (list java-osgi-annotation java-osgi-core))
8118 (home-page "https://www.osgi.org")
8119 (synopsis "OSGi service event module")
8120 (description
8121 "OSGi, for Open Services Gateway initiative framework, is a module system
8122and service platform for the Java programming language. This package contains
8123the OSGi @code{org.osgi.service.event} module.")
8124 (license license:asl2.0)))
8125
8126(define-public java-eclipse-osgi
8127 (package
8128 (name "java-eclipse-osgi")
8129 (version "3.11.3")
8130 (source (origin
8131 (method url-fetch)
8132 (uri (string-append "https://repo1.maven.org/maven2/"
8133 "org/eclipse/platform/org.eclipse.osgi/"
8134 version "/org.eclipse.osgi-"
8135 version "-sources.jar"))
8136 (sha256
8137 (base32
8138 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
8139 (build-system ant-build-system)
8140 (arguments
8141 `(#:tests? #f ; no tests included
8142 #:jar-name "eclipse-equinox-osgi.jar"))
8143 (inputs
8144 (list java-osgi-annotation))
8145 (home-page "https://www.eclipse.org/equinox/")
8146 (synopsis "Eclipse Equinox OSGi framework")
8147 (description "This package provides an implementation of the OSGi Core
8148specification.")
8149 (license license:epl1.0)))
8150
8151(define-public java-eclipse-equinox-common
8152 (package
8153 (name "java-eclipse-equinox-common")
8154 (version "3.10.200")
8155 (source (origin
8156 (method url-fetch)
8157 (uri (string-append "https://repo1.maven.org/maven2/"
8158 "org/eclipse/platform/org.eclipse.equinox.common/"
8159 version "/org.eclipse.equinox.common-"
8160 version "-sources.jar"))
8161 (sha256
8162 (base32
8163 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
8164 (build-system ant-build-system)
8165 (arguments
8166 `(#:tests? #f ; no tests included
8167 #:jar-name "eclipse-equinox-common.jar"))
8168 (inputs
8169 (list java-eclipse-osgi))
8170 (home-page "https://www.eclipse.org/equinox/")
8171 (synopsis "Common Eclipse runtime")
8172 (description "This package provides the common Eclipse runtime.")
8173 (license license:epl1.0)))
8174
8175(define-public java-eclipse-core-jobs
8176 (package
8177 (name "java-eclipse-core-jobs")
8178 (version "3.8.0")
8179 (source (origin
8180 (method url-fetch)
8181 (uri (string-append "https://repo1.maven.org/maven2/"
8182 "org/eclipse/platform/org.eclipse.core.jobs/"
8183 version "/org.eclipse.core.jobs-"
8184 version "-sources.jar"))
8185 (sha256
8186 (base32
8187 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
8188 (build-system ant-build-system)
8189 (arguments
8190 `(#:tests? #f ; no tests included
8191 #:jar-name "eclipse-core-jobs.jar"))
8192 (inputs
8193 (list java-eclipse-equinox-common java-eclipse-osgi))
8194 (home-page "https://www.eclipse.org/equinox/")
8195 (synopsis "Eclipse jobs mechanism")
8196 (description "This package provides the Eclipse jobs mechanism.")
8197 (license license:epl1.0)))
8198
8199(define-public java-eclipse-equinox-registry
8200 (package
8201 (name "java-eclipse-equinox-registry")
8202 (version "3.6.100")
8203 (source (origin
8204 (method url-fetch)
8205 (uri (string-append "https://repo1.maven.org/maven2/"
8206 "org/eclipse/platform/org.eclipse.equinox.registry/"
8207 version "/org.eclipse.equinox.registry-"
8208 version "-sources.jar"))
8209 (sha256
8210 (base32
8211 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
8212 (build-system ant-build-system)
8213 (arguments
8214 `(#:tests? #f ; no tests included
8215 #:jar-name "eclipse-equinox-registry.jar"))
8216 (inputs
8217 (list java-eclipse-core-jobs java-eclipse-equinox-common
8218 java-eclipse-osgi))
8219 (home-page "https://www.eclipse.org/equinox/")
8220 (synopsis "Eclipse extension registry support")
8221 (description "This package provides support for the Eclipse extension
8222registry.")
8223 (license license:epl1.0)))
8224
8225(define-public java-eclipse-equinox-app
8226 (package
8227 (name "java-eclipse-equinox-app")
8228 (version "1.3.400")
8229 (source (origin
8230 (method url-fetch)
8231 (uri (string-append "https://repo1.maven.org/maven2/"
8232 "org/eclipse/platform/org.eclipse.equinox.app/"
8233 version "/org.eclipse.equinox.app-"
8234 version "-sources.jar"))
8235 (sha256
8236 (base32
8237 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
8238 (build-system ant-build-system)
8239 (arguments
8240 `(#:tests? #f ; no tests included
8241 #:jar-name "eclipse-equinox-app.jar"))
8242 (inputs
8243 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8244 java-eclipse-osgi java-osgi-service-event))
8245 (home-page "https://www.eclipse.org/equinox/")
8246 (synopsis "Equinox application container")
8247 (description "This package provides the Equinox application container for
8248Eclipse.")
8249 (license license:epl1.0)))
8250
8251(define-public java-eclipse-equinox-preferences
8252 (package
8253 (name "java-eclipse-equinox-preferences")
8254 (version "3.6.1")
8255 (source (origin
8256 (method url-fetch)
8257 (uri (string-append "https://repo1.maven.org/maven2/"
8258 "org/eclipse/platform/org.eclipse.equinox.preferences/"
8259 version "/org.eclipse.equinox.preferences-"
8260 version "-sources.jar"))
8261 (sha256
8262 (base32
8263 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
8264 (build-system ant-build-system)
8265 (arguments
8266 `(#:tests? #f ; no tests included
8267 #:jar-name "eclipse-equinox-preferences.jar"))
8268 (inputs
8269 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8270 java-eclipse-osgi))
8271 (home-page "https://www.eclipse.org/equinox/")
8272 (synopsis "Eclipse preferences mechanism")
8273 (description "This package provides the Eclipse preferences mechanism with
8274the module @code{org.eclipse.equinox.preferences}.")
8275 (license license:epl1.0)))
8276
8277(define-public java-eclipse-core-contenttype
8278 (package
8279 (name "java-eclipse-core-contenttype")
8280 (version "3.5.100")
8281 (source (origin
8282 (method url-fetch)
8283 (uri (string-append "https://repo1.maven.org/maven2/"
8284 "org/eclipse/platform/org.eclipse.core.contenttype/"
8285 version "/org.eclipse.core.contenttype-"
8286 version "-sources.jar"))
8287 (sha256
8288 (base32
8289 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
8290 (build-system ant-build-system)
8291 (arguments
8292 `(#:tests? #f ; no tests included
8293 #:jar-name "eclipse-core-contenttype.jar"))
8294 (inputs
8295 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
8296 java-eclipse-equinox-registry java-eclipse-osgi))
8297 (home-page "https://www.eclipse.org/")
8298 (synopsis "Eclipse content mechanism")
8299 (description "This package provides the Eclipse content mechanism in the
8300@code{org.eclipse.core.contenttype} module.")
8301 (license license:epl1.0)))
8302
8303(define-public java-eclipse-core-runtime
8304 (package
8305 (name "java-eclipse-core-runtime")
8306 (version "3.15.100")
8307 (source (origin
8308 (method url-fetch)
8309 (uri (string-append "https://repo1.maven.org/maven2/"
8310 "org/eclipse/platform/org.eclipse.core.runtime/"
8311 version "/org.eclipse.core.runtime-"
8312 version "-sources.jar"))
8313 (sha256
8314 (base32
8315 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
8316 (build-system ant-build-system)
8317 (arguments
8318 `(#:tests? #f ; no tests included
8319 #:jar-name "eclipse-core-runtime.jar"))
8320 (inputs
8321 (list java-eclipse-core-contenttype
8322 java-eclipse-core-jobs
8323 java-eclipse-equinox-app
8324 java-eclipse-equinox-common
8325 java-eclipse-equinox-registry
8326 java-eclipse-equinox-preferences
8327 java-eclipse-osgi))
8328 (home-page "https://www.eclipse.org/")
8329 (synopsis "Eclipse core runtime")
8330 (description "This package provides the Eclipse core runtime with the
8331module @code{org.eclipse.core.runtime}.")
8332 (license license:epl1.0)))
8333
8334(define-public java-eclipse-core-filesystem
8335 (package
8336 (name "java-eclipse-core-filesystem")
8337 (version "1.6.1")
8338 (source (origin
8339 (method url-fetch)
8340 (uri (string-append "https://repo1.maven.org/maven2/"
8341 "org/eclipse/platform/org.eclipse.core.filesystem/"
8342 version "/org.eclipse.core.filesystem-"
8343 version "-sources.jar"))
8344 (sha256
8345 (base32
8346 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
8347 (build-system ant-build-system)
8348 (arguments
8349 `(#:tests? #f ; no tests included
8350 #:jar-name "eclipse-core-filesystem.jar"))
8351 (inputs
8352 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8353 java-eclipse-osgi))
8354 (home-page "https://www.eclipse.org/")
8355 (synopsis "Eclipse core file system")
8356 (description "This package provides the Eclipse core file system with the
8357module @code{org.eclipse.core.filesystem}.")
8358 (license license:epl1.0)))
8359
8360(define-public java-eclipse-core-expressions
8361 (package
8362 (name "java-eclipse-core-expressions")
8363 (version "3.5.100")
8364 (source (origin
8365 (method url-fetch)
8366 (uri (string-append "https://repo1.maven.org/maven2/"
8367 "org/eclipse/platform/org.eclipse.core.expressions/"
8368 version "/org.eclipse.core.expressions-"
8369 version "-sources.jar"))
8370 (sha256
8371 (base32
8372 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
8373 (build-system ant-build-system)
8374 (arguments
8375 `(#:tests? #f ; no tests included
8376 #:jar-name "eclipse-core-expressions.jar"))
8377 (inputs
8378 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8379 java-eclipse-equinox-preferences java-eclipse-core-runtime
8380 java-eclipse-osgi))
8381 (home-page "https://www.eclipse.org/")
8382 (synopsis "Eclipse core expression language")
8383 (description "This package provides the Eclipse core expression language
8384with the @code{org.eclipse.core.expressions} module.")
8385 (license license:epl1.0)))
8386
8387(define-public java-eclipse-core-variables
8388 (package
8389 (name "java-eclipse-core-variables")
8390 (version "3.3.0")
8391 (source (origin
8392 (method url-fetch)
8393 (uri (string-append "https://repo1.maven.org/maven2/"
8394 "org/eclipse/platform/org.eclipse.core.variables/"
8395 version "/org.eclipse.core.variables-"
8396 version "-sources.jar"))
8397 (sha256
8398 (base32
8399 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
8400 (build-system ant-build-system)
8401 (arguments
8402 `(#:tests? #f ; no tests included
8403 #:jar-name "eclipse-core-variables.jar"))
8404 (inputs
8405 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8406 java-eclipse-equinox-preferences java-eclipse-core-runtime
8407 java-eclipse-osgi))
8408 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8409 (synopsis "Eclipse core variables")
8410 (description "This package provides the Eclipse core variables module
8411@code{org.eclipse.core.variables}.")
8412 (license license:epl1.0)))
8413
8414(define-public java-eclipse-ant-core
8415 (package
8416 (name "java-eclipse-ant-core")
8417 (version "3.4.100")
8418 (source (origin
8419 (method url-fetch)
8420 (uri (string-append "https://repo1.maven.org/maven2/"
8421 "org/eclipse/platform/org.eclipse.ant.core/"
8422 version "/org.eclipse.ant.core-"
8423 version "-sources.jar"))
8424 (sha256
8425 (base32
8426 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
8427 (build-system ant-build-system)
8428 (arguments
8429 `(#:tests? #f ; no tests included
8430 #:jar-name "eclipse-ant-core.jar"))
8431 (inputs
8432 (list java-eclipse-equinox-app
8433 java-eclipse-equinox-common
8434 java-eclipse-equinox-registry
8435 java-eclipse-equinox-preferences
8436 java-eclipse-core-contenttype
8437 java-eclipse-core-runtime
8438 java-eclipse-core-variables
8439 java-eclipse-osgi))
8440 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8441 (synopsis "Ant build tool core libraries")
8442 (description "This package provides the ant build tool core libraries with
8443the module @code{org.eclipse.ant.core}.")
8444 (license license:epl1.0)))
8445
8446(define-public java-eclipse-core-resources
8447 (package
8448 (name "java-eclipse-core-resources")
8449 (version "3.13.200")
8450 (source (origin
8451 (method url-fetch)
8452 (uri (string-append "https://repo1.maven.org/maven2/"
8453 "org/eclipse/platform/org.eclipse.core.resources/"
8454 version "/org.eclipse.core.resources-"
8455 version "-sources.jar"))
8456 (sha256
8457 (base32
8458 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
8459 (build-system ant-build-system)
8460 (arguments
8461 `(#:tests? #f ; no tests included
8462 #:jar-name "eclipse-core-resources.jar"))
8463 (inputs
8464 (list java-eclipse-equinox-common
8465 java-eclipse-equinox-preferences
8466 java-eclipse-equinox-registry
8467 java-eclipse-core-contenttype
8468 java-eclipse-core-expressions
8469 java-eclipse-core-filesystem
8470 java-eclipse-core-jobs
8471 java-eclipse-core-runtime
8472 java-eclipse-ant-core
8473 java-eclipse-osgi))
8474 (home-page "https://www.eclipse.org/")
8475 (synopsis "Eclipse core resource management")
8476 (description "This package provides the Eclipse core resource management
8477module @code{org.eclipse.core.resources}.")
8478 (license license:epl1.0)))
8479
8480(define-public java-eclipse-compare-core
8481 (package
8482 (name "java-eclipse-compare-core")
8483 (version "3.6.0")
8484 (source (origin
8485 (method url-fetch)
8486 (uri (string-append "https://repo1.maven.org/maven2/"
8487 "org/eclipse/platform/org.eclipse.compare.core/"
8488 version "/org.eclipse.compare.core-"
8489 version "-sources.jar"))
8490 (sha256
8491 (base32
8492 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
8493 (build-system ant-build-system)
8494 (arguments
8495 `(#:tests? #f ; no tests included
8496 #:jar-name "eclipse-compare-core.jar"))
8497 (inputs
8498 (list java-eclipse-core-runtime java-eclipse-equinox-common
8499 java-eclipse-osgi java-icu4j))
8500 (home-page "https://www.eclipse.org/")
8501 (synopsis "Eclipse core compare support")
8502 (description "This package provides the Eclipse core compare support
8503module @code{org.eclipse.compare.core}.")
8504 (license license:epl1.0)))
8505
8506(define-public java-eclipse-team-core
8507 (package
8508 (name "java-eclipse-team-core")
8509 (version "3.8.0")
8510 (source (origin
8511 (method url-fetch)
8512 (uri (string-append "https://repo1.maven.org/maven2/"
8513 "org/eclipse/platform/org.eclipse.team.core/"
8514 version "/org.eclipse.team.core-"
8515 version "-sources.jar"))
8516 (sha256
8517 (base32
8518 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
8519 (build-system ant-build-system)
8520 (arguments
8521 `(#:tests? #f ; no tests included
8522 #:jar-name "eclipse-team-core.jar"))
8523 (inputs
8524 (list java-eclipse-compare-core
8525 java-eclipse-core-contenttype
8526 java-eclipse-core-filesystem
8527 java-eclipse-core-jobs
8528 java-eclipse-core-resources
8529 java-eclipse-core-runtime
8530 java-eclipse-equinox-common
8531 java-eclipse-equinox-registry
8532 java-eclipse-equinox-preferences
8533 java-eclipse-osgi))
8534 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8535 (synopsis "Eclipse team support core")
8536 (description "This package provides the Eclipse team support core module
8537@code{org.eclipse.team.core}.")
8538 (license license:epl1.0)))
8539
8540(define-public java-eclipse-core-commands
8541 (package
8542 (name "java-eclipse-core-commands")
8543 (version "3.8.1")
8544 (source (origin
8545 (method url-fetch)
8546 (uri (string-append "https://repo1.maven.org/maven2/"
8547 "org/eclipse/platform/org.eclipse.core.commands/"
8548 version "/org.eclipse.core.commands-"
8549 version "-sources.jar"))
8550 (sha256
8551 (base32
8552 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
8553 (build-system ant-build-system)
8554 (arguments
8555 `(#:tests? #f ; no tests included
8556 #:jar-name "eclipse-core-commands.jar"))
8557 (inputs
8558 (list java-eclipse-equinox-common))
8559 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8560 (synopsis "Eclipse core commands")
8561 (description "This package provides Eclipse core commands in the module
8562@code{org.eclipse.core.commands}.")
8563 (license license:epl1.0)))
8564
8565(define-public java-eclipse-text
8566 (package
8567 (name "java-eclipse-text")
8568 (version "3.6.0")
8569 (source (origin
8570 (method url-fetch)
8571 (uri (string-append "https://repo1.maven.org/maven2/"
8572 "org/eclipse/platform/org.eclipse.text/"
8573 version "/org.eclipse.text-"
8574 version "-sources.jar"))
8575 (sha256
8576 (base32
8577 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
8578 (build-system ant-build-system)
8579 (arguments
8580 `(#:tests? #f ; no tests included
8581 #:jar-name "eclipse-text.jar"
8582 #:phases
8583 (modify-phases %standard-phases
8584 ;; When creating a new category we must make sure that the new list
8585 ;; matches List<Position>. By default it seems to be too generic
8586 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
8587 ;; Without this we get this error:
8588 ;;
8589 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
8590 ;; error: method put in interface Map<K,V> cannot be applied to given types;
8591 ;; [javac] fPositions.put(category, new ArrayList<>());
8592 ;; [javac] ^
8593 ;; [javac] required: String,List<Position>
8594 ;; [javac] found: String,ArrayList<Object>
8595 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
8596 ;; to List<Position> by method invocation conversion
8597 ;; [javac] where K,V are type-variables:
8598 ;; [javac] K extends Object declared in interface Map
8599 ;; [javac] V extends Object declared in interface Map
8600 ;;
8601 ;; I don't know if this is a good fix. I suspect it is not, but it
8602 ;; seems to work.
8603 (add-after 'unpack 'fix-compilation-error
8604 (lambda _
8605 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
8606 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
8607 "Positions.put(category, new ArrayList<Position>());"))
8608 #t)))))
8609 (inputs
8610 (list java-eclipse-equinox-common java-eclipse-core-commands
8611 java-icu4j))
8612 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8613 (synopsis "Eclipse text library")
8614 (description "Platform Text is part of the Platform UI project and
8615provides the basic building blocks for text and text editors within Eclipse
8616and contributes the Eclipse default text editor.")
8617 (license license:epl1.0)))
8618
8619(define-public java-eclipse-jdt-core
8620 (package
8621 (name "java-eclipse-jdt-core")
8622 (version "3.16.0")
8623 (source (origin
8624 (method url-fetch)
8625 (uri (string-append "https://repo1.maven.org/maven2/"
8626 "org/eclipse/jdt/org.eclipse.jdt.core/"
8627 version "/org.eclipse.jdt.core-"
8628 version "-sources.jar"))
8629 (sha256
8630 (base32
8631 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
8632 (build-system ant-build-system)
8633 (arguments
8634 `(#:tests? #f ; no tests included
8635 #:jar-name "eclipse-jdt-core.jar"
8636 #:phases
8637 (modify-phases %standard-phases
8638 (add-after 'unpack 'move-sources
8639 (lambda _
8640 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
8641 (for-each (lambda (file)
8642 (install-file file (string-append "../" (dirname file))))
8643 (find-files "." ".*")))
8644 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
8645 #t))
8646 (add-before 'build 'copy-resources
8647 (lambda _
8648 (with-directory-excursion "src"
8649 (for-each (lambda (file)
8650 (install-file file (string-append "../build/classes/" (dirname file))))
8651 (find-files "." ".*.(props|properties|rsc)")))
8652 #t)))))
8653 (inputs
8654 (list java-eclipse-core-contenttype
8655 java-eclipse-core-filesystem
8656 java-eclipse-core-jobs
8657 java-eclipse-core-resources
8658 java-eclipse-core-runtime
8659 java-eclipse-equinox-app
8660 java-eclipse-equinox-common
8661 java-eclipse-equinox-preferences
8662 java-eclipse-equinox-registry
8663 java-eclipse-osgi
8664 java-eclipse-text))
8665 (home-page "https://www.eclipse.org/jdt")
8666 (synopsis "Java development tools core libraries")
8667 (description "This package provides the core libraries of the Eclipse Java
8668development tools.")
8669 (license license:epl1.0)))
8670
8671(define-public java-eclipse-jdt-compiler-apt
8672 (package
8673 (name "java-eclipse-jdt-compiler-apt")
8674 (version "1.3.400")
8675 (source (origin
8676 (method url-fetch)
8677 (uri (string-append "https://repo1.maven.org/maven2/"
8678 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
8679 version "/org.eclipse.jdt.compiler.apt-"
8680 version "-sources.jar"))
8681 (sha256
8682 (base32
8683 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
8684 (build-system ant-build-system)
8685 (arguments
8686 `(#:tests? #f ; no tests included
8687 #:jar-name "eclipse-jdt-compiler-apt.jar"
8688 #:jdk ,openjdk11))
8689 (inputs
8690 (list java-eclipse-jdt-core))
8691 (home-page "https://www.eclipse.org/jdt/apt/")
8692 (synopsis "Annotation processing tool")
8693 (description "APT stands for Annotation Processing Tool. APT provides a
8694means for generating files and compiling new Java classes based on annotations
8695found in your source code.")
8696 (license license:epl2.0)))
8697
8698(define-public java-eclipse-lsp4j-common
8699 (package
8700 (name "java-eclipse-lsp4j-common")
8701 (version "0.10.0")
8702 (source (origin
8703 (method git-fetch)
8704 (uri (git-reference
8705 (url "https://github.com/eclipse/lsp4j")
8706 (commit (string-append "v" version))))
8707 (file-name (git-file-name name version))
8708 (sha256
8709 (base32
8710 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
8711 (build-system ant-build-system)
8712 (home-page "https://eclipse.org/lsp4j/")
8713 (synopsis "LSP4J common package")
8714 (description "Eclipse LSP4J provides Java bindings for the Language
8715Server Protocol and the Debug Adapter Protocol. This package is a common
8716definition intended to be inherited by other packages.")
8717 (license license:epl2.0)))
8718
8719(define-public java-eclipse-lsp4j-debug
8720 (package
8721 (inherit java-eclipse-lsp4j-common)
8722 (name "java-eclipse-lsp4j-debug")
8723 (arguments
8724 `(#:jar-name "eclipse-lsp4j-debug.jar"
8725 #:jdk ,openjdk11
8726 #:tests? #f; tests fail with reflection errors
8727 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
8728 #:test-dir "org.eclipse.lsp4j.debug/src/test"
8729 #:phases
8730 (modify-phases %standard-phases
8731 (add-before 'build 'copy-xtend
8732 (lambda _
8733 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
8734 "org.eclipse.lsp4j.debug/src/main/java"))))))
8735 (native-inputs
8736 (list java-junit))
8737 (inputs
8738 `(("java-gson" ,java-gson-latest)
8739 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
8740 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
8741 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
8742 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
8743 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
8744 (description "Eclipse LSP4J provides Java bindings for the Language
8745Server Protocol and the Debug Adapter Protocol. This package contains its
8746LSP4J Java bindings for the Debug Server Protocol.")))
8747
8748(define-public java-eclipse-lsp4j-generator
8749 (package
8750 (inherit java-eclipse-lsp4j-common)
8751 (name "java-eclipse-lsp4j-generator")
8752 (arguments
8753 `(#:jar-name "eclipse-lsp4j-generator.jar"
8754 #:jdk ,openjdk11
8755 #:tests? #f; no tests
8756 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
8757 (inputs
8758 (list java-eclipse-lsp4j-jsonrpc))
8759 (synopsis "Eclipse LSP4J Generator")
8760 (description "Eclipse LSP4J provides Java bindings for the Language
8761Server Protocol and the Debug Adapter Protocol. This package contains its
8762LSP4J code generator for Language Server Protocol classes.")))
8763
8764(define-public java-eclipse-lsp4j-jsonrpc
8765 (package
8766 (inherit java-eclipse-lsp4j-common)
8767 (name "java-eclipse-lsp4j-jsonrpc")
8768 (arguments
8769 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
8770 #:jdk ,openjdk11
8771 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
8772 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"
8773 #:phases
8774 (modify-phases %standard-phases
8775 (add-after 'unpack 'delete-failing-tests
8776 ;; The testMalformedJson* tests expect the exact error messages
8777 ;; of an older gson. Removing IntegrationTest.java also drops
8778 ;; the other tests it contains.
8779 (lambda _
8780 (delete-file
8781 (string-append
8782 "org.eclipse.lsp4j.jsonrpc/src/test/java/org/"
8783 "eclipse/lsp4j/jsonrpc/test/IntegrationTest.java")))))))
8784 (native-inputs
8785 (list java-junit))
8786 (inputs
8787 (list java-gson-latest))
8788 (synopsis "Java JSON-RPC implementation")
8789 (description "Eclipse LSP4J provides Java bindings for the Language
8790Server Protocol and the Debug Adapter Protocol. This package contains its
8791JSON-RPC implementation.")))
8792
8793(define-public java-eclipse-lsp4j-jsonrpc-debug
8794 (package
8795 (inherit java-eclipse-lsp4j-common)
8796 (name "java-eclipse-lsp4j-jsonrpc-debug")
8797 (arguments
8798 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
8799 #:jdk ,openjdk11
8800 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
8801 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
8802 (native-inputs
8803 (list java-junit))
8804 (inputs
8805 (list java-eclipse-lsp4j-jsonrpc java-gson-latest))
8806 (synopsis "Java JSON-RPC implementation (debug protocol)")
8807 (description "Eclipse LSP4J provides Java bindings for the Language
8808Server Protocol and the Debug Adapter Protocol. This package contains its
8809JSON-RPC implementation's debug protocol.")))
8810
8811(define-public java-eclipse-xtext-xbase-lib
8812 (package
8813 (name "java-eclipse-xtext-xbase-lib")
8814 (version "2.25.0")
8815 (source (origin
8816 (method git-fetch)
8817 (uri (git-reference
8818 (url "https://github.com/eclipse/xtext-lib")
8819 (commit (string-append "v" version))))
8820 (file-name (git-file-name name version))
8821 (sha256
8822 (base32
8823 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
8824 (build-system ant-build-system)
8825 (arguments
8826 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
8827 #:jdk ,openjdk11
8828 #:tests? #f; TODO (maybe needs newer guava version?)
8829 #:source-dir "org.eclipse.xtext.xbase.lib/src"
8830 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
8831 (native-inputs
8832 (list java-junit))
8833 (inputs
8834 (list java-guava))
8835 (home-page "https://www.eclipse.org/Xtext/")
8836 (synopsis "Eclipse Xbase Runtime Library")
8837 (description "This package contains runtime libraries for Xbase languages
8838such as Xtend.")
8839 (license license:epl2.0)))
8840
8841(define-public java-javax-mail
8842 (package
8843 (name "java-javax-mail")
8844 (version "1.6.2")
8845 (source (origin
8846 (method url-fetch)
8847 (uri (string-append "https://repo1.maven.org/maven2/"
8848 "com/sun/mail/javax.mail/"
8849 version "/javax.mail-"
8850 version "-sources.jar"))
8851 (sha256
8852 (base32
8853 "15cryjf398x7sy42j5gzlj5cmc2nx05b175b4gclwxj6qg5ly0li"))))
8854 (build-system ant-build-system)
8855 (arguments
8856 `(#:tests? #f ; no tests
8857 #:jar-name "javax-mail.jar"))
8858 (home-page "https://javamail.java.net")
8859 (synopsis "Reference implementation of the JavaMail API")
8860 (description
8861 "This package provides versions of the JavaMail API implementation, IMAP,
8862SMTP, and POP3 service providers, some examples, and documentation for the
8863JavaMail API.")
8864 ;; GPLv2 only with "classpath exception".
8865 (license license:gpl2)))
8866
8867(define-public java-log4j-api
8868 (package
8869 (name "java-log4j-api")
8870 (version "2.17.1")
8871 (source (origin
8872 (method url-fetch)
8873 (uri (string-append "mirror://apache/logging/log4j/" version
8874 "/apache-log4j-" version "-src.tar.gz"))
8875 (sha256
8876 (base32
8877 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
8878 (build-system ant-build-system)
8879 (arguments
8880 `(#:tests? #f ; tests require unpackaged software
8881 #:jar-name "log4j-api.jar"
8882 #:make-flags
8883 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
8884 #:phases
8885 (modify-phases %standard-phases
8886 (add-after 'unpack 'enter-dir
8887 (lambda _ (chdir "log4j-api") #t))
8888 ;; FIXME: The tests require additional software that has not been
8889 ;; packaged yet, such as
8890 ;; * org.apache.maven
8891 ;; * org.apache.felix
8892 (add-after 'enter-dir 'delete-tests
8893 (lambda _ (delete-file-recursively "src/test") #t)))))
8894 (inputs
8895 (list java-osgi-core java-hamcrest-core java-junit))
8896 (properties '((cpe-name . "log4j")))
8897 (home-page "https://logging.apache.org/log4j/2.x/")
8898 (synopsis "API module of the Log4j logging framework for Java")
8899 (description
8900 "This package provides the API module of the Log4j logging framework for
8901Java.")
8902 (license license:asl2.0)))
8903
8904(define-public java-log4j-core
8905 (package
8906 (inherit java-log4j-api)
8907 (name "java-log4j-core")
8908 (inputs
8909 `(("java-osgi-core" ,java-osgi-core)
8910 ("java-hamcrest-core" ,java-hamcrest-core)
8911 ("java-log4j-api" ,java-log4j-api)
8912 ("java-mail" ,java-mail)
8913 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
8914 ("java-conversant-disruptor" ,java-conversant-disruptor)
8915 ("java-lmax-disruptor" ,java-lmax-disruptor)
8916 ("java-jctools-core" ,java-jctools-core-1)
8917 ("java-stax2-api" ,java-stax2-api)
8918 ("java-jansi" ,java-jansi)
8919 ("java-kafka" ,java-kafka-clients)
8920 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8921 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8922 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8923 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8924 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
8925 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
8926 ("java-commons-compress" ,java-commons-compress)
8927 ("java-commons-csv" ,java-commons-csv)
8928 ("java-jeromq" ,java-jeromq)
8929 ("java-junit" ,java-junit)))
8930 (native-inputs
8931 `(("hamcrest" ,java-hamcrest-all)
8932 ("java-commons-io" ,java-commons-io)
8933 ("java-commons-lang3" ,java-commons-lang3)
8934 ("slf4j" ,java-slf4j-api)))
8935 (arguments
8936 `(#:tests? #f ; tests require more dependencies
8937 #:test-dir "src/test"
8938 #:source-dir "src/main/java"
8939 #:jar-name "log4j-core.jar"
8940 #:jdk ,icedtea-8
8941 #:make-flags
8942 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
8943 #:phases
8944 (modify-phases %standard-phases
8945 (add-after 'unpack 'enter-dir
8946 (lambda _ (chdir "log4j-core") #t)))))
8947 (synopsis "Core component of the Log4j framework")
8948 (description "This package provides the core component of the Log4j
8949logging framework for Java.")))
8950
8951(define-public java-log4j-1.2-api
8952 (package
8953 (inherit java-log4j-api)
8954 (name "java-log4j-1.2-api")
8955 (arguments
8956 `(#:jar-name "java-log4j-1.2-api.jar"
8957 #:source-dir "log4j-1.2-api/src/main/java"
8958 #:jdk ,icedtea-8
8959 ;; Tests require maven-model (and other maven subprojects), which is a
8960 ;; cyclic dependency.
8961 #:tests? #f))
8962 (inputs
8963 `(("log4j-api" ,java-log4j-api)
8964 ("log4j-core" ,java-log4j-core)
8965 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
8966 ("osgi-core" ,java-osgi-core)
8967 ("eclipse-osgi" ,java-eclipse-osgi)
8968 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
8969
8970(define-public java-commons-cli
8971 (package
8972 (name "java-commons-cli")
8973 (version "1.4")
8974 (source (origin
8975 (method url-fetch)
8976 (uri (string-append "mirror://apache/commons/cli/source/"
8977 "commons-cli-" version "-src.tar.gz"))
8978 (sha256
8979 (base32
8980 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
8981 (build-system ant-build-system)
8982 ;; TODO: javadoc
8983 (arguments
8984 `(#:jar-name "commons-cli.jar"
8985 #:phases
8986 (modify-phases %standard-phases
8987 (replace 'install
8988 (install-from-pom "pom.xml")))))
8989 (native-inputs
8990 (list java-junit java-hamcrest-core))
8991 (home-page "https://commons.apache.org/cli/")
8992 (synopsis "Command line arguments and options parsing library")
8993 (description "The Apache Commons CLI library provides an API for parsing
8994command line options passed to programs. It is also able to print help
8995messages detailing the options available for a command line tool.
8996
8997Commons CLI supports different types of options:
8998
8999@itemize
9000@item POSIX like options (ie. tar -zxvf foo.tar.gz)
9001@item GNU like long options (ie. du --human-readable --max-depth=1)
9002@item Java like properties (ie. java -Djava.awt.headless=true Foo)
9003@item Short options with value attached (ie. gcc -O2 foo.c)
9004@item long options with single hyphen (ie. ant -projecthelp)
9005@end itemize
9006
9007This is a part of the Apache Commons Project.")
9008 (license license:asl2.0)))
9009
9010(define-public java-commons-text
9011 (package
9012 (name "java-commons-text")
9013 (version "1.15.0")
9014 (source (origin
9015 (method url-fetch)
9016 (uri (string-append "mirror://apache/commons/text/source/"
9017 "commons-text-" version "-src.tar.gz"))
9018 (sha256
9019 (base32
9020 "0k0y3pkgrzm84a0z1ifi4b9ydaglzm9pgvaw9phxdcwmcqxjbkc8"))))
9021 (build-system ant-build-system)
9022 (arguments
9023 (list #:jar-name "java-commons-text.jar"
9024 #:source-dir "src/main/java"
9025 #:test-dir "src/test"
9026 #:tests? #f ; Tests require JUnit5.
9027 #:phases
9028 #~(modify-phases %standard-phases
9029 (replace 'install
9030 (install-from-pom "pom.xml")))))
9031 (inputs
9032 (list java-commons-io))
9033 (propagated-inputs
9034 (list java-commons-lang3
9035 apache-commons-parent-pom-51))
9036 (home-page "https://commons.apache.org/text/")
9037 (synopsis "Library focused on algorithms working on strings")
9038 (description "Apache Commons Text is a library focused on algorithms
9039working on strings.
9040
9041This is a part of the Apache Commons Project.")
9042 (license license:asl2.0)))
9043
9044(define-public java-commons-codec
9045 (package
9046 (name "java-commons-codec")
9047 (version "1.15")
9048 (source (origin
9049 (method url-fetch)
9050 (uri (string-append "mirror://apache/commons/codec/source/"
9051 "commons-codec-" version "-src.tar.gz"))
9052 (sha256
9053 (base32
9054 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
9055 (build-system ant-build-system)
9056 (arguments
9057 `(#:jar-name "java-commons-codec.jar"
9058 #:source-dir "src/main/java"
9059 #:test-dir "src/test"
9060 #:test-exclude (list "**/*AbstractTest.java")
9061 #:phases
9062 (modify-phases %standard-phases
9063 (add-before 'build 'copy-resources
9064 (lambda _
9065 (copy-recursively "src/main/resources"
9066 "build/classes")))
9067 (add-before 'check 'copy-test-resources
9068 (lambda _
9069 (copy-recursively "src/test/resources"
9070 "build/test-classes")))
9071 (add-before 'check 'skip-ravenous-test
9072 (lambda _
9073 ;; This test admits to being "memory hungry", but reliably fails
9074 ;; even on a machine that should have plenty (12 GiB). Skip it.
9075 (substitute*
9076 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
9077 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
9078 "return;"))))
9079 (replace 'install (install-from-pom "pom.xml")))))
9080 (native-inputs
9081 (list java-commons-lang3 java-junit))
9082 (propagated-inputs
9083 (list apache-commons-parent-pom-52))
9084 (home-page "https://commons.apache.org/codec/")
9085 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
9086 (description "The codec package contains simple encoder and decoders for
9087various formats such as Base64 and Hexadecimal. In addition to these widely
9088used encoders and decoders, the codec package also maintains a collection of
9089phonetic encoding utilities.
9090
9091This is a part of the Apache Commons Project.")
9092 (license license:asl2.0)))
9093
9094(define-public java-commons-codec-1.17.1
9095 (package
9096 (inherit java-commons-codec)
9097 (version "1.17.1")
9098 (source (origin
9099 (method url-fetch)
9100 (uri (string-append "mirror://apache/commons/codec/source/"
9101 "commons-codec-" version "-src.tar.gz"))
9102 (sha256
9103 (base32
9104 "0f9f80azc13phkwa2fdkmpj5fkh85hf081fz5mmm6rqflmk83wp9"))))
9105 (arguments
9106 (substitute-keyword-arguments (package-arguments java-commons-codec)
9107 ;; Tests require JUnit 5 (org.junit.jupiter) which is not
9108 ;; yet available in Guix.
9109 ((#:tests? _ #t) #f)))))
9110
9111(define-public java-commons-daemon
9112 (package
9113 (name "java-commons-daemon")
9114 (version "1.1.0")
9115 (source (origin
9116 (method url-fetch)
9117 (uri (string-append "mirror://apache/commons/daemon/source/"
9118 "commons-daemon-" version "-src.tar.gz"))
9119 (sha256
9120 (base32
9121 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
9122 (build-system ant-build-system)
9123 (arguments
9124 `(#:test-target "test"
9125 #:phases
9126 (modify-phases %standard-phases
9127 (add-after 'build 'build-javadoc ant-build-javadoc)
9128 (replace 'install (install-jars "dist"))
9129 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
9130 (native-inputs
9131 (list java-junit))
9132 (home-page "https://commons.apache.org/daemon/")
9133 (synopsis "Library to launch Java applications as daemons")
9134 (description "The Daemon package from Apache Commons can be used to
9135implement Java applications which can be launched as daemons. For example the
9136program will be notified about a shutdown so that it can perform cleanup tasks
9137before its process of execution is destroyed by the operation system.
9138
9139This package contains the Java library. You will also need the actual binary
9140for your architecture which is provided by the jsvc package.
9141
9142This is a part of the Apache Commons Project.")
9143 (license license:asl2.0)))
9144
9145(define-public java-javaewah
9146 (package
9147 (name "java-javaewah")
9148 (version "1.1.6")
9149 (source (origin
9150 (method git-fetch)
9151 (uri (git-reference
9152 (url "https://github.com/lemire/javaewah/")
9153 (commit (string-append "JavaEWAH-" version))))
9154 (file-name (git-file-name name version))
9155 (sha256
9156 (base32
9157 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
9158 (build-system ant-build-system)
9159 (arguments `(#:jar-name "javaewah.jar"))
9160 (inputs
9161 (list java-junit java-hamcrest-core))
9162 (home-page "https://github.com/lemire/javaewah")
9163 (synopsis "Compressed alternative to the Java @code{BitSet} class")
9164 (description "This is a word-aligned compressed variant of the Java
9165@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
9166compression scheme. It can be used to implement bitmap indexes.
9167
9168The goal of word-aligned compression is not to achieve the best compression,
9169but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
9170cycles, maybe at the expense of storage. However, the EWAH scheme is always
9171more efficient storage-wise than an uncompressed bitmap (as implemented in the
9172@code{BitSet} class by Sun).")
9173 ;; GPL2.0 derivates are explicitly allowed.
9174 (license license:asl2.0)))
9175
9176(define-public java-javaewah-1.2.3
9177 (package
9178 (inherit java-javaewah)
9179 (version "1.2.3")
9180 (source (origin
9181 (method git-fetch)
9182 (uri (git-reference
9183 (url "https://github.com/lemire/javaewah/")
9184 (commit (string-append "JavaEWAH-" version))))
9185 (file-name (git-file-name "java-javaewah" version))
9186 (sha256
9187 (base32
9188 "0bl1702pkzr8c8ygprmdc47lrb3m4yn4097jf6liiin54d4km8j5"))))
9189 (arguments
9190 `(#:jar-name "javaewah.jar"
9191 #:phases
9192 (modify-phases %standard-phases
9193 (add-before 'check 'enable-assertions
9194 (lambda _
9195 ;; FuzzEWAHTest requires assertions enabled in the JVM.
9196 (substitute* "build.xml"
9197 (("haltonfailure=\"yes\">")
9198 "haltonfailure=\"yes\"><jvmarg value=\"-ea\" />"))))
9199 (add-after 'build 'add-osgi-manifest
9200 (lambda _
9201 ;; The Maven Central jar has OSGi manifest attributes set by
9202 ;; Maven Bundle Plugin. The NetBeans build uses
9203 ;; Bundle-SymbolicName as a fallback for OpenIDE-Module when
9204 ;; wrapping external libraries as modules.
9205 (call-with-output-file "osgi-manifest.mf"
9206 (lambda (port)
9207 (display (string-append
9208 "Bundle-ManifestVersion: 2\n"
9209 "Bundle-SymbolicName: com.googlecode.javaewah.JavaEWAH\n"
9210 "Bundle-Version: " ,version "\n"
9211 "Export-Package: com.googlecode.javaewah,"
9212 "com.googlecode.javaewah.datastructure,"
9213 "com.googlecode.javaewah.symmetric\n"
9214 "Import-Package: com.googlecode.javaewah,"
9215 "com.googlecode.javaewah.datastructure\n"
9216 "Multi-Release: true\n")
9217 port)))
9218 (invoke "jar" "ufm" "build/jar/javaewah.jar"
9219 "osgi-manifest.mf")))
9220 (replace 'install (install-from-pom "pom.xml")))))))
9221
9222(define-public java-slf4j-api
9223 (package
9224 (name "java-slf4j-api")
9225 (version "1.7.25")
9226 (source (origin
9227 (method git-fetch)
9228 (uri (git-reference
9229 (url "https://github.com/qos-ch/slf4j")
9230 (commit (string-append "v_" version))))
9231 (file-name (git-file-name name version))
9232 (sha256
9233 (base32
9234 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
9235 (modules '((guix build utils)))
9236 ;; Delete bundled jars.
9237 (snippet
9238 '(begin
9239 (for-each delete-file (find-files "." "\\.jar$"))
9240 #t))))
9241 (build-system ant-build-system)
9242 (arguments
9243 `(#:jar-name "slf4j-api.jar"
9244 #:source-dir "slf4j-api/src/main"
9245 #:test-dir "slf4j-api/src/test"
9246 #:phases
9247 (modify-phases %standard-phases
9248 (add-after 'build 'regenerate-jar
9249 (lambda _
9250 ;; pom.xml ignores these files in the jar creation process. If we don't,
9251 ;; we get the error "This code should have never made it into slf4j-api.jar"
9252 (delete-file-recursively "build/classes/org/slf4j/impl")
9253 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
9254 "build/classes" ".")
9255 ;; The NetBeans wrapper module has an empty jar target and
9256 ;; relies on Bundle-SymbolicName from the Maven Central jar.
9257 (call-with-output-file "osgi-manifest.mf"
9258 (lambda (port)
9259 (display (string-append
9260 "Bundle-ManifestVersion: 2\n"
9261 "Bundle-SymbolicName: slf4j.api\n"
9262 "Bundle-Version: " ,version "\n"
9263 "Export-Package: org.slf4j,org.slf4j.spi,"
9264 "org.slf4j.helpers,org.slf4j.event\n"
9265 "Import-Package: org.slf4j.impl\n")
9266 port)))
9267 (invoke "jar" "ufm" "build/jar/slf4j-api.jar"
9268 "osgi-manifest.mf")))
9269 (add-before 'check 'dont-test-abstract-classes
9270 (lambda _
9271 ;; abstract classes are not meant to be run with junit
9272 (substitute* "build.xml"
9273 (("<include name=\"\\*\\*/\\*Test.java\" />")
9274 (string-append "<include name=\"**/*Test.java\" />"
9275 "<exclude name=\"**/MultithreadedInitializationTest"
9276 ".java\" />")))
9277 #t))
9278 (replace 'install
9279 (install-from-pom "slf4j-api/pom.xml")))))
9280 (propagated-inputs
9281 (list java-slf4j-parent))
9282 (native-inputs
9283 (list java-junit java-hamcrest-core))
9284 (home-page "https://www.slf4j.org/")
9285 (synopsis "Simple logging facade for Java")
9286 (description "The Simple Logging Facade for Java (SLF4J) serves as a
9287simple facade or abstraction for various logging
9288frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
9289allowing the end user to plug in the desired logging framework at deployment
9290time.")
9291 (license license:expat)))
9292
9293(define java-slf4j-parent
9294 (package
9295 (inherit java-slf4j-api)
9296 (name "java-slf4j-parent")
9297 (native-inputs `())
9298 (propagated-inputs '())
9299 (arguments
9300 `(#:tests? #f
9301 #:phases
9302 (modify-phases %standard-phases
9303 (delete 'build)
9304 (delete 'configure)
9305 (replace 'install
9306 (install-pom-file "pom.xml")))))))
9307
9308(define-public java-slf4j-simple
9309 (package
9310 (name "java-slf4j-simple")
9311 (version "1.7.25")
9312 (source (package-source java-slf4j-api))
9313 (build-system ant-build-system)
9314 (arguments
9315 `(#:jar-name "slf4j-simple.jar"
9316 #:source-dir "slf4j-simple/src/main"
9317 #:test-dir "slf4j-simple/src/test"
9318 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
9319 #:phases
9320 (modify-phases %standard-phases
9321 ;; The tests need some test classes from slf4j-api
9322 (add-before 'check 'build-slf4j-api-test-helpers
9323 (lambda _
9324 ;; Add current dir to CLASSPATH ...
9325 (setenv "CLASSPATH"
9326 (string-append (getcwd) ":" (getenv "CLASSPATH")))
9327 ;; ... and build test helper classes here:
9328 (apply invoke
9329 `("javac" "-d" "."
9330 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9331 (replace 'install
9332 (install-from-pom "slf4j-simple/pom.xml")))))
9333 (propagated-inputs
9334 (list java-slf4j-api))
9335 (native-inputs
9336 (list java-junit java-hamcrest-core))
9337 (home-page "https://www.slf4j.org/")
9338 (synopsis "Simple implementation of simple logging facade for Java")
9339 (description "SLF4J binding for the Simple implementation, which outputs
9340all events to System.err. Only messages of level INFO and higher are
9341printed.")
9342 (license license:expat)))
9343
9344(define-public java-slf4j-nop
9345 (package
9346 (name "java-slf4j-nop")
9347 (version "1.7.25")
9348 (source (package-source java-slf4j-api))
9349 (build-system ant-build-system)
9350 (arguments
9351 `(#:jar-name "slf4j-nop.jar"
9352 #:source-dir "slf4j-nop/src/main"
9353 #:test-dir "slf4j-nop/src/test"
9354 #:phases (modify-phases %standard-phases
9355 ;; The tests need some test classes from slf4j-api
9356 (add-before 'check 'build-slf4j-api-test-helpers
9357 (lambda _
9358 ;; Add current dir to CLASSPATH ...
9359 (setenv "CLASSPATH"
9360 (string-append (getcwd) ":"
9361 (getenv "CLASSPATH")))
9362 ;; ... and build test helper classes here:
9363 (apply invoke
9364 `("javac" "-d" "."
9365 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9366 (replace 'install
9367 (install-from-pom "slf4j-nop/pom.xml")))))
9368 (propagated-inputs (list java-slf4j-api))
9369 (native-inputs (list java-junit java-hamcrest-core))
9370 (home-page "https://www.slf4j.org/")
9371 (synopsis "SLF4J binding that silently discards all logging messages")
9372 (description "Binding/provider for NOP, an implementation that silently
9373discards all logging messages.")
9374 (license license:expat)))
9375
9376(define-public java-slf4j-jdk14
9377 (package
9378 (name "java-slf4j-jdk14")
9379 (version "1.7.25")
9380 (source (package-source java-slf4j-api))
9381 (build-system ant-build-system)
9382 (arguments
9383 `(#:jar-name "slf4j-jdk14.jar"
9384 #:source-dir "slf4j-jdk14/src/main"
9385 #:test-dir "slf4j-jdk14/src/test"
9386 #:test-exclude (list "**/*MultithreadedInitializationTest.java")
9387 #:phases
9388 (modify-phases %standard-phases
9389 (add-after 'build 'add-osgi-manifest
9390 (lambda _
9391 ;; The NetBeans wrapper module has an empty jar target and
9392 ;; relies on Bundle-SymbolicName from the Maven Central jar.
9393 (call-with-output-file "osgi-manifest.mf"
9394 (lambda (port)
9395 (display (string-append
9396 "Bundle-ManifestVersion: 2\n"
9397 "Bundle-SymbolicName: slf4j.jdk14\n"
9398 "Bundle-Version: " ,version "\n"
9399 "Export-Package: org.slf4j.impl\n"
9400 "Import-Package: org.slf4j,org.slf4j.spi,"
9401 "org.slf4j.helpers,org.slf4j.event\n")
9402 port)))
9403 (invoke "jar" "ufm" "build/jar/slf4j-jdk14.jar"
9404 "osgi-manifest.mf")))
9405 (add-before 'check 'build-slf4j-api-test-helpers
9406 (lambda _
9407 (setenv "CLASSPATH"
9408 (string-append (getcwd) ":" (getenv "CLASSPATH")))
9409 (apply invoke
9410 `("javac" "-d" "."
9411 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9412 (replace 'install
9413 (install-from-pom "slf4j-jdk14/pom.xml")))))
9414 (propagated-inputs (list java-slf4j-api))
9415 (native-inputs (list java-junit java-hamcrest-core))
9416 (home-page "https://www.slf4j.org/")
9417 (synopsis "SLF4J binding for @code{java.util.logging}")
9418 (description "SLF4J binding for the JDK14 @code{java.util.logging}
9419framework.")
9420 (license license:expat)))
9421
9422(define-public java-jcl-over-slf4j
9423 (package
9424 (name "java-jcl-over-slf4j")
9425 (version "1.7.36")
9426 (source (origin
9427 (method git-fetch)
9428 (uri (git-reference
9429 (url "https://github.com/qos-ch/slf4j")
9430 (commit (string-append "v_" version))))
9431 (file-name (git-file-name name version))
9432 (sha256
9433 (base32
9434 "05kdsrvacvgdsqj812jhar813asgl2i2xlvh4i4p4i5cxg17bkq3"))
9435 (modules '((guix build utils)))
9436 ;; Delete bundled jars.
9437 (snippet
9438 '(for-each delete-file (find-files "." "\\.jar$")))))
9439 (build-system ant-build-system)
9440 (arguments
9441 `(#:jar-name "jcl-over-slf4j.jar"
9442 #:source-dir "jcl-over-slf4j/src/main/java"
9443 #:test-dir "jcl-over-slf4j/src/test"
9444 #:phases
9445 (modify-phases %standard-phases
9446 (add-before 'build 'add-resources
9447 (lambda _
9448 ;; The default ant build does not include resources in the jar,
9449 ;; but the JCL LogFactory service provider is required for
9450 ;; commons-logging to discover the SLF4J implementation. Stage
9451 ;; the resources into the classes directory before the build
9452 ;; phase so that "build/jar/jcl-over-slf4j.jar" includes them.
9453 (copy-recursively
9454 "jcl-over-slf4j/src/main/resources/META-INF/services"
9455 "build/classes/META-INF/services")))
9456 (replace 'install
9457 (install-from-pom "jcl-over-slf4j/pom.xml")))))
9458 (propagated-inputs (list java-slf4j-api))
9459 (native-inputs (list java-junit java-hamcrest-core java-slf4j-jdk14))
9460 (home-page "https://www.slf4j.org/")
9461 (synopsis "Apache Commons Logging implemented over SLF4J")
9462 (description "This package provides a drop-in replacement for Apache
9463Commons Logging (JCL) version 1.2. It redirects all calls made to the
9464@code{commons-logging} API to SLF4J, allowing the user to plug in the desired
9465SLF4J binding at deployment time.")
9466 (license license:asl2.0)))
9467
9468(define-public antlr2
9469 (package
9470 (name "antlr2")
9471 (version "2.7.7")
9472 (source (origin
9473 (method url-fetch)
9474 (uri (string-append "https://www.antlr2.org/download/antlr-"
9475 version ".tar.gz"))
9476 (sha256
9477 (base32
9478 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
9479 (modules '((guix build utils)))
9480 (snippet
9481 '(begin
9482 (delete-file "antlr.jar")
9483 (substitute* "lib/cpp/antlr/CharScanner.hpp"
9484 (("#include <map>")
9485 (string-append
9486 "#include <map>\n"
9487 "#define EOF (-1)\n"
9488 "#include <strings.h>")))
9489 (substitute* "configure"
9490 (("/bin/sh") "sh"))
9491 #t))))
9492 (build-system gnu-build-system)
9493 (arguments
9494 `(#:tests? #f ; no test target
9495 #:imported-modules ((guix build ant-build-system)
9496 ,@%default-gnu-imported-modules)
9497 #:modules (((guix build ant-build-system) #:prefix ant:)
9498 (guix build gnu-build-system)
9499 (guix build utils))
9500 #:phases
9501 (modify-phases %standard-phases
9502 (add-after 'install 'strip-jar-timestamps
9503 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
9504 (add-before 'configure 'fix-timestamp
9505 (lambda _
9506 (substitute* "configure"
9507 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
9508 #t))
9509 (add-after 'configure 'fix-bin-ls
9510 (lambda _
9511 (substitute* (find-files "." "Makefile")
9512 (("/bin/ls") "ls"))
9513 #t)))))
9514 (native-inputs
9515 `(("which" ,which)
9516 ("zip" ,zip)
9517 ("java" ,icedtea "jdk")))
9518 (inputs
9519 `(("java" ,icedtea)))
9520 (home-page "https://www.antlr2.org")
9521 (synopsis "Framework for constructing recognizers, compilers, and translators")
9522 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
9523is a language tool that provides a framework for constructing recognizers,
9524compilers, and translators from grammatical descriptions containing Java, C#,
9525C++, or Python actions. ANTLR provides excellent support for tree construction,
9526tree walking, and translation.")
9527 (license license:public-domain)))
9528
9529(define-public java-stringtemplate-3
9530 (package
9531 (name "java-stringtemplate")
9532 (version "3.2.1")
9533 (source (origin
9534 (method url-fetch)
9535 (uri (string-append "https://github.com/antlr/website-st4/raw/"
9536 "gh-pages/download/stringtemplate-"
9537 version ".tar.gz"))
9538 (sha256
9539 (base32
9540 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
9541 (build-system ant-build-system)
9542 (arguments
9543 `(#:jar-name (string-append ,name "-" ,version ".jar")
9544 #:test-dir "test"
9545 #:modules ((guix build ant-build-system)
9546 (guix build utils)
9547 (srfi srfi-1))
9548 #:phases
9549 (modify-phases %standard-phases
9550 (add-before 'check 'fix-tests
9551 (lambda _
9552 (substitute* "build.xml"
9553 (("\\$\\{test.home\\}/java")
9554 "${test.home}/org"))
9555 #t))
9556 (add-before 'build 'generate-grammar
9557 (lambda _
9558 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
9559 (for-each (lambda (file)
9560 (format #t "~a\n" file)
9561 (invoke "antlr" file))
9562 '("template.g" "angle.bracket.template.g" "action.g"
9563 "eval.g" "group.g" "interface.g")))
9564 #t)))))
9565 (native-inputs
9566 `(("antlr" ,antlr2)
9567 ("java-junit" ,java-junit)))
9568 (home-page "https://www.stringtemplate.org")
9569 (synopsis "Template engine to generate formatted text output")
9570 (description "StringTemplate is a java template engine (with ports for C#,
9571Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
9572or any other formatted text output. StringTemplate is particularly good at
9573code generators, multiple site skins, and internationalization / localization.
9574StringTemplate also powers ANTLR.")
9575 (license license:bsd-3)))
9576
9577;; antlr3 is partially written using antlr3 grammar files. It also depends on
9578;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
9579;; files and uses antlr3 at runtime. The latest version requires a recent version
9580;; of antlr3 at runtime.
9581;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
9582;; This version of ST4 is sufficient for the latest antlr3.
9583;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
9584;; the latest ST4 with it. Then we build our final antlr3 that will be linked
9585;; against the latest ST4.
9586;; antlr3.3 still depends on antlr3 to generate some files, so we use an
9587;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
9588;; only grammar files with the antlr2 syntax.
9589;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
9590
9591(define-public java-stringtemplate
9592 (package (inherit java-stringtemplate-3)
9593 (name "java-stringtemplate")
9594 (version "4.0.8")
9595 (source (origin
9596 (method url-fetch)
9597 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
9598 version ".tar.gz"))
9599 (file-name (string-append name "-" version ".tar.gz"))
9600 (sha256
9601 (base32
9602 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
9603 (build-system ant-build-system)
9604 (arguments
9605 `(#:jar-name (string-append ,name "-" ,version ".jar")
9606 #:tests? #f ; FIXME: tests fail for unknown reasons
9607 #:test-dir "test"
9608 #:modules ((guix build ant-build-system)
9609 (guix build utils)
9610 (srfi srfi-1))
9611 #:phases
9612 (modify-phases %standard-phases
9613 (add-before 'check 'fix-test-target
9614 (lambda _
9615 (substitute* "build.xml"
9616 (("\\$\\{test.home\\}/java") "${test.home}/")
9617 (("\\*Test.java") "Test*.java"))
9618 #t))
9619 (add-before 'build 'generate-grammar
9620 (lambda _
9621 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
9622 (for-each (lambda (file)
9623 (format #t "~a\n" file)
9624 (invoke "antlr3" file))
9625 '("STParser.g" "Group.g" "CodeGenerator.g")))
9626 #t)))))
9627 (inputs
9628 `(("antlr3" ,antlr3-bootstrap)
9629 ("antlr2" ,antlr2)
9630 ("java-stringtemplate" ,java-stringtemplate-3)
9631 ("java-junit" ,java-junit)))))
9632
9633(define-public java-stringtemplate-4.0.6
9634 (package (inherit java-stringtemplate)
9635 (name "java-stringtemplate")
9636 (version "4.0.6")
9637 (source (origin
9638 (method url-fetch)
9639 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
9640 version ".tar.gz"))
9641 (file-name (string-append name "-" version ".tar.gz"))
9642 (sha256
9643 (base32
9644 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
9645 (inputs
9646 `(("antlr3" ,antlr3-3.3)
9647 ("antlr2" ,antlr2)
9648 ("java-stringtemplate" ,java-stringtemplate-3)))))
9649
9650(define-public antlr3
9651 (package
9652 (name "antlr3")
9653 (version "3.5.2")
9654 (source (origin
9655 (method git-fetch)
9656 (uri (git-reference
9657 (url "https://github.com/antlr/antlr3")
9658 (commit version)))
9659 (file-name (git-file-name name version))
9660 (sha256
9661 (base32
9662 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
9663 (build-system ant-build-system)
9664 (arguments
9665 `(#:jar-name (string-append ,name "-" ,version ".jar")
9666 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
9667 #:tests? #f
9668 #:phases
9669 (modify-phases %standard-phases
9670 (add-after 'install 'bin-install
9671 (lambda* (#:key inputs outputs #:allow-other-keys)
9672 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
9673 (bin (string-append (assoc-ref outputs "out") "/bin")))
9674 (mkdir-p bin)
9675 (with-output-to-file (string-append bin "/antlr3")
9676 (lambda _
9677 (display
9678 (string-append "#!" (which "sh") "\n"
9679 "java -cp " jar "/" ,name "-" ,version ".jar:"
9680 (string-concatenate
9681 (find-files (assoc-ref inputs "stringtemplate")
9682 ".*\\.jar"))
9683 ":"
9684 (string-concatenate
9685 (find-files (assoc-ref inputs "stringtemplate4")
9686 ".*\\.jar"))
9687 ":"
9688 (string-concatenate
9689 (find-files (string-append
9690 (assoc-ref inputs "antlr")
9691 "/lib")
9692 ".*\\.jar"))
9693 " org.antlr.Tool $*"))))
9694 (chmod (string-append bin "/antlr3") #o755))
9695 #t))
9696 (add-before 'build 'generate-grammar
9697 (lambda _
9698 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
9699 (for-each (lambda (file)
9700 (display file)
9701 (newline)
9702 (invoke "antlr3" file))
9703 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
9704 "AssignTokenTypesWalker.g"
9705 "ActionTranslator.g" "TreeToNFAConverter.g"
9706 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
9707 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
9708 (substitute* "ANTLRParser.java"
9709 (("public Object getTree") "public GrammarAST getTree"))
9710 (substitute* "ANTLRv3Parser.java"
9711 (("public Object getTree") "public CommonTree getTree"))
9712 (chdir "../../../../../java")
9713 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
9714 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
9715import org.antlr.grammar.v3.ANTLRTreePrinter;"))
9716 (substitute* "org/antlr/tool/ErrorManager.java"
9717 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
9718 (chdir "../../../..")
9719 #t))
9720 (add-before 'build 'fix-build-xml
9721 (lambda _
9722 (substitute* "build.xml"
9723 (("target name=\"compile\">")
9724 "target name=\"compile\">
9725<copy todir=\"${classes.dir}\">
9726<fileset dir=\"tool/src/main/resources\">
9727<include name=\"**/*.stg\"/>
9728<include name=\"**/*.st\"/>
9729<include name=\"**/*.sti\"/>
9730<include name=\"**/STLexer.tokens\"/>
9731</fileset>
9732</copy>"))
9733 #t)))))
9734 (native-inputs
9735 `(("antlr" ,antlr2)
9736 ("antlr3" ,antlr3-bootstrap)))
9737 (inputs
9738 `(("junit" ,java-junit)
9739 ("stringtemplate" ,java-stringtemplate-3)
9740 ("stringtemplate4" ,java-stringtemplate)))
9741 (propagated-inputs
9742 `(("stringtemplate" ,java-stringtemplate-3)
9743 ("antlr" ,antlr2)
9744 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
9745 (home-page "https://www.antlr3.org")
9746 (synopsis "Framework for constructing recognizers, compilers, and translators")
9747 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
9748is a language tool that provides a framework for constructing recognizers,
9749compilers, and translators from grammatical descriptions containing Java, C#,
9750C++, or Python actions. ANTLR provides excellent support for tree construction,
9751tree walking, and translation.")
9752 (license license:bsd-3)))
9753
9754(define-public antlr3-bootstrap
9755 (package
9756 (inherit antlr3)
9757 (name "antlr3-bootstrap")
9758 (native-inputs
9759 `(("antlr" ,antlr2)
9760 ("antlr3" ,antlr3-3.3)))
9761 (inputs
9762 `(("junit" ,java-junit)))
9763 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9764
9765(define-public antlr3-3.3
9766 (package
9767 (inherit antlr3)
9768 (name "antlr3")
9769 (version "3.3")
9770 (source (origin
9771 (method url-fetch)
9772 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
9773 "gh-pages/download/antlr-"
9774 version ".tar.gz"))
9775 (sha256
9776 (base32
9777 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
9778 (patches
9779 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
9780 (arguments
9781 `(#:jar-name (string-append ,name "-" ,version ".jar")
9782 #:source-dir (string-join '("tool/src/main/java"
9783 "runtime/Java/src/main/java"
9784 "tool/src/main/antlr2"
9785 "tool/src/main/antlr3")
9786 ":")
9787 #:tests? #f ; FIXME: tests seem to require maven plugin
9788 #:modules ((guix build ant-build-system)
9789 (guix build utils)
9790 (srfi srfi-1))
9791 #:phases
9792 (modify-phases %standard-phases
9793 (add-after 'install 'bin-install
9794 (lambda* (#:key inputs outputs #:allow-other-keys)
9795 (let* ((out (assoc-ref outputs "out"))
9796 (jar (string-append out "/share/java"))
9797 (bin (string-append out "/bin")))
9798 (mkdir-p bin)
9799 (with-output-to-file (string-append bin "/antlr3")
9800 (lambda _
9801 (display
9802 (string-append
9803 "#!" (which "sh") "\n"
9804 "java -cp " jar "/antlr3-3.3.jar:"
9805 (string-join
9806 (append (find-files (assoc-ref inputs "java-stringtemplate")
9807 ".*\\.jar$")
9808 (find-files (string-append (assoc-ref inputs "antlr")
9809 "/lib")
9810 ".*\\.jar$"))
9811 ":")
9812 " org.antlr.Tool $*"))))
9813 (chmod (string-append bin "/antlr3") #o755)
9814 #t)))
9815 (add-before 'build 'generate-grammar
9816 (lambda _
9817 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
9818 (("import org.antlr.grammar.v2.\\*;")
9819 "import org.antlr.grammar.v2.*;\n
9820import org.antlr.grammar.v2.TreeToNFAConverter;\n
9821import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
9822import org.antlr.grammar.v2.ANTLRTreePrinter;"))
9823 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
9824 (for-each (lambda (file)
9825 (format #t "~a\n" file)
9826 (invoke "antlr" file))
9827 '("antlr.g" "antlr.print.g" "assign.types.g"
9828 "buildnfa.g" "codegen.g" "define.g")))
9829 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
9830 (for-each (lambda (file)
9831 (format #t "~a\n" file)
9832 (invoke "antlr3" file))
9833 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
9834 "ANTLRv3Tree.g")))
9835 #t))
9836 (add-before 'build 'fix-build-xml
9837 (lambda _
9838 (substitute* "build.xml"
9839 (("target name=\"compile\">")
9840 "target name=\"compile\">
9841<copy todir=\"${classes.dir}\">
9842<fileset dir=\"tool/src/main/resources\">
9843<include name=\"**/*.stg\"/>
9844<include name=\"**/*.st\"/>
9845<include name=\"**/*.sti\"/>
9846<include name=\"**/STLexer.tokens\"/>
9847</fileset>
9848</copy>"))
9849 #t)))))
9850 (native-inputs
9851 `(("antlr" ,antlr2)
9852 ("antlr3" ,antlr3-3.1)))
9853 (inputs
9854 `(("junit" ,java-junit)))
9855 (propagated-inputs
9856 `(("java-stringtemplate" ,java-stringtemplate-3)
9857 ("antlr" ,antlr2)))
9858 (properties (alist-delete 'hidden? (package-properties antlr3)))))
9859
9860(define-public antlr3-3.1
9861 (package
9862 (inherit antlr3)
9863 (version "3.1")
9864 (source (origin
9865 (method url-fetch)
9866 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
9867 "gh-pages/download/antlr-"
9868 version ".tar.gz"))
9869 (sha256
9870 (base32
9871 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
9872 (patches
9873 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
9874 (arguments
9875 `(#:jar-name (string-append "antlr3-" ,version ".jar")
9876 #:source-dir "src:runtime/Java/src"
9877 #:tests? #f
9878 #:phases
9879 (modify-phases %standard-phases
9880 (add-after 'install 'bin-install
9881 (lambda* (#:key inputs outputs #:allow-other-keys)
9882 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
9883 (bin (string-append (assoc-ref outputs "out") "/bin")))
9884 (mkdir-p bin)
9885 (with-output-to-file (string-append bin "/antlr3")
9886 (lambda _
9887 (display
9888 (string-append "#!" (which "sh") "\n"
9889 "java -cp " jar "/antlr3-3.1.jar:"
9890 (string-concatenate
9891 (find-files (assoc-ref inputs "stringtemplate")
9892 ".*\\.jar"))
9893 ":"
9894 (string-concatenate
9895 (find-files (string-append
9896 (assoc-ref inputs "antlr")
9897 "/lib")
9898 ".*\\.jar"))
9899 " org.antlr.Tool $*"))))
9900 (chmod (string-append bin "/antlr3") #o755))
9901 #t))
9902 (add-before 'build 'generate-grammar
9903 (lambda _
9904 (let ((dir "src/org/antlr/tool/"))
9905 (for-each (lambda (file)
9906 (display file)
9907 (newline)
9908 (invoke "antlr" "-o" dir (string-append dir file)))
9909 '("antlr.g" "antlr.print.g" "assign.types.g"
9910 "buildnfa.g" "define.g")))
9911 (format #t "codegen.g\n")
9912 (invoke "antlr" "-o" "src/org/antlr/codegen"
9913 "src/org/antlr/codegen/codegen.g")
9914 #t))
9915 (add-before 'build 'fix-build-xml
9916 (lambda _
9917 (substitute* "build.xml"
9918 (("target name=\"compile\">")
9919 "target name=\"compile\">
9920<copy todir=\"${classes.dir}\">
9921<fileset dir=\"src\">
9922<include name=\"**/*.stg\"/>
9923<include name=\"**/*.st\"/>
9924<include name=\"**/*.sti\"/>
9925<include name=\"**/STLexer.tokens\"/>
9926</fileset>
9927</copy>"))
9928 #t)))))
9929 (native-inputs
9930 `(("antlr" ,antlr2)))
9931 (inputs
9932 `(("junit" ,java-junit)))
9933 (propagated-inputs
9934 `(("stringtemplate" ,java-stringtemplate-3)))))
9935
9936(define-public java-treelayout
9937 (package
9938 (name "java-treelayout")
9939 (version "1.0.3")
9940 (source (origin
9941 (method git-fetch)
9942 (uri (git-reference
9943 (url "https://github.com/abego/treelayout")
9944 (commit (string-append "v" version))))
9945 (file-name (git-file-name name version))
9946 (sha256
9947 (base32
9948 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
9949 (build-system ant-build-system)
9950 (arguments
9951 `(#:jar-name (string-append ,name "-" ,version ".jar")
9952 #:source-dir "org.abego.treelayout/src/main/java"
9953 #:test-dir "org.abego.treelayout/src/test"))
9954 (inputs
9955 (list java-junit))
9956 (native-inputs
9957 (list java-hamcrest-core))
9958 (home-page "https://treelayout.sourceforge.net")
9959 (synopsis "Tree Layout Algorithm in Java")
9960 (description "TreeLayout creates tree layouts for arbitrary trees. It is
9961not restricted to a specific output or format, but can be used for any kind of
9962two dimensional diagram. Examples are Swing based components, SVG files, etc.
9963This is possible because TreeLayout separates the layout of a tree from the
9964actual rendering.")
9965 (license license:bsd-3)))
9966
9967(define-public java-antlr4-runtime
9968 (package
9969 (name "java-antlr4-runtime")
9970 (version "4.10.1")
9971 (source (origin
9972 (method git-fetch)
9973 (uri (git-reference
9974 (url "https://github.com/antlr/antlr4")
9975 (commit version)))
9976 (file-name (git-file-name name version))
9977 (sha256
9978 (base32
9979 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
9980 (patches
9981 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
9982 (build-system ant-build-system)
9983 (arguments
9984 `(#:jar-name "java-antlr4-runtime.jar"
9985 #:source-dir "runtime/Java/src/org"
9986 #:tests? #f; tests depend on java-antlr4 itself
9987 #:phases
9988 (modify-phases %standard-phases
9989 (add-before 'build 'copy-resources
9990 (lambda _
9991 (copy-recursively "runtime/Java/src/main/dot"
9992 "build/classes")
9993 #t)))))
9994 (home-page "https://www.antlr.org")
9995 (synopsis "ANTLR runtime library")
9996 (description "This package contains the runtime library used with generated
9997sources by ANTLR.")
9998 (license license:bsd-3)))
9999
10000(define-public cpp-antlr4-runtime
10001 (package
10002 (inherit java-antlr4-runtime)
10003 (name "cpp-antlr4-runtime")
10004 (properties '((upstream-name . "antlr4-cpp-runtime")))
10005 (outputs '("out" "static"))
10006 (build-system cmake-build-system)
10007 (arguments
10008 (list
10009 ;; TODO: try to run the tests under
10010 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
10011 #:phases
10012 #~(modify-phases %standard-phases
10013 (add-after 'unpack 'chdir
10014 (lambda _
10015 (chdir "runtime/Cpp")))
10016 (add-after 'chdir 'unbundle-googletest
10017 (lambda _
10018 (substitute* "runtime/CMakeLists.txt"
10019 (("^ FetchContent_MakeAvailable.*")
10020 "")
10021 (("gtest_main" all)
10022 (string-append "gtest " all)))))
10023 (add-after 'install 'move-static-library
10024 (lambda* (#:key outputs #:allow-other-keys)
10025 (let ((static (assoc-ref outputs "static"))
10026 (libantlr4-runtime.a (search-input-file
10027 outputs "lib/libantlr4-runtime.a")))
10028 (mkdir-p (string-append static "/lib"))
10029 (rename-file
10030 libantlr4-runtime.a
10031 (string-append static "/lib/"
10032 (basename libantlr4-runtime.a)))))))))
10033 (native-inputs (list googletest pkg-config))
10034 (inputs (list `(,util-linux "lib"))) ;libuuid
10035 (synopsis "ANTLR C++ runtime library")
10036 (description "This package contains the C++ runtime library used with C++
10037generated sources by ANTLR.")))
10038
10039(define-deprecated-package java-antlr4-runtime-cpp
10040 cpp-antlr4-runtime)
10041
10042(define-public python-antlr4-runtime
10043 (package
10044 (inherit java-antlr4-runtime)
10045 (name "python-antlr4-runtime")
10046 (properties '((upstream-name . "antlr4-python3-runtime")))
10047 (build-system pyproject-build-system)
10048 (arguments
10049 (list
10050 #:test-backend #~'custom
10051 #:test-flags #~'("tests/run.py" "--verbose")
10052 #:phases
10053 #~(modify-phases %standard-phases
10054 (add-after 'unpack 'chdir
10055 (lambda _
10056 (chdir "runtime/Python3")))
10057 ;; TODO: Remove when updating ANTLR4:
10058 ;; https://github.com/antlr/antlr4/pull/4593
10059 (add-after 'chdir 'fix-python-3.12-compatibility
10060 (lambda _
10061 (substitute* "tests/TestIntervalSet.py"
10062 (("assertEquals") "assertEqual"))))
10063 (add-after 'chdir 'regenerate-parsers
10064 (lambda _
10065 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
10066 "src/antlr4/xpath/XPathLexer.g4")
10067 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
10068 "tests/expr/Expr.g4"))))))
10069 (native-inputs (list antlr4 python-setuptools))
10070 (synopsis "ANTLR Python runtime library")
10071 (description "This package contains the Python runtime library used with
10072Python generated sources by ANTLR.")))
10073
10074(define-deprecated-package java-antlr4-runtime-python
10075 python-antlr4-runtime)
10076
10077(define-public antlr4
10078 (package
10079 (inherit java-antlr4-runtime)
10080 (name "antlr4")
10081 (arguments
10082 `(#:jar-name "antlr4.jar"
10083 #:source-dir "tool/src"
10084 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
10085 #:test-include (list "**/Test*.java")
10086 #:test-exclude (list
10087 ;; These have no runnable methods and fail because
10088 ;; test-include above is too broad.
10089 "**/TestContext.java"
10090 "**/TestOutputReading.java"
10091 ;; no @Test methods
10092 "**/TestParserErrors.java"
10093 "**/TestSemPredEvalParser.java"
10094 "**/TestSets.java"
10095 "**/TestListeners.java"
10096 "**/TestParseTrees.java"
10097 "**/TestParserExec.java"
10098 "**/TestLexerErrors.java"
10099 "**/TestPerformance.java"
10100 "**/TestCompositeParsers.java"
10101 "**/TestLexerExec.java"
10102 "**/TestSemPredEvalLexer.java"
10103 "**/TestLeftRecursion.java"
10104 "**/TestFullContextParsing.java"
10105 "**/TestCompositeLexers.java"
10106 ;; Null pointer exception
10107 "**/TestCompositeGrammars.java")
10108 #:phases
10109 (modify-phases %standard-phases
10110 (add-before 'build 'fix-build.xml
10111 (lambda _
10112 ;; tests are not in a java subdirectory
10113 (substitute* "build.xml"
10114 (("\\$\\{test.home\\}/java") "${test.home}"))
10115 #t))
10116 ;; tests require to have a working antlr4 binary
10117 (delete 'check)
10118 (add-after 'install 'check
10119 (lambda _
10120 (invoke "ant" "compile-tests")
10121 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
10122 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
10123 #t))
10124 (add-before 'check 'remove-unrelated-languages
10125 (lambda _
10126 ;; There are tests for other languages that ANTLR can generate, but
10127 ;; we don't have the infrastructure for that yet. Let's test Java
10128 ;; generation only.
10129 (for-each
10130 (lambda (language)
10131 (delete-file-recursively
10132 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
10133 language)))
10134 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
10135 "python3" "swift"))
10136 #t))
10137 (add-before 'check 'generate-test-parsers
10138 (lambda* (#:key outputs #:allow-other-keys)
10139 (define (run-antlr dir filename package)
10140 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
10141 "-package" package (string-append dir "/" filename)
10142 "-Xlog"))
10143 (setenv "PATH" (string-append (getenv "PATH") ":"
10144 (assoc-ref outputs "out") "/bin"))
10145 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10146 "Java.g4" "org.antlr.v4.test.runtime.java.api")
10147 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10148 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
10149 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10150 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
10151 #t))
10152 (add-before 'check 'remove-graphemes
10153 (lambda _
10154 ;; When running antlr on grahemes.g4, we get a runtime exception:
10155 ;; set is empty. So delete the file that depends on it.
10156 (delete-file
10157 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
10158 #t))
10159 (add-after 'install 'bin-install
10160 (lambda* (#:key inputs outputs #:allow-other-keys)
10161 (let* ((output (assoc-ref outputs "out"))
10162 (bin (string-append output "/bin"))
10163 (bin/antlr4 (string-append bin "/antlr4")))
10164 (mkdir-p bin)
10165 (with-output-to-file bin/antlr4
10166 (lambda _
10167 (display
10168 (string-append
10169 "#!"
10170 (search-input-file inputs "bin/sh")
10171 "\n"
10172 (string-append (assoc-ref inputs "openjdk")
10173 "/bin/java")
10174 " -cp "
10175 (string-append output "/share/java/antlr4.jar")
10176 ":"
10177 (string-join
10178 (apply append
10179 (map (lambda (input)
10180 (find-files (assoc-ref inputs input)
10181 "\\.jar$"))
10182 '("antlr3" "java-stringtemplate"
10183 "java-antlr4-runtime" "java-treelayout"
10184 "java-jsonp-api" "java-icu4j")))
10185 ":")
10186 " org.antlr.v4.Tool $*\n"))))
10187 (chmod bin/antlr4 #o755))))
10188 (add-before 'build 'copy-resources
10189 (lambda _
10190 (copy-recursively "tool/resources/" "build/classes")
10191 #t))
10192 (add-before 'build 'generate-unicode
10193 (lambda _
10194 ;; First: build the generator
10195 (invoke "javac" "-cp" (getenv "CLASSPATH")
10196 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
10197 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
10198 ;; Then use it
10199 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10200 ":tool/src:runtime/Java")
10201 "org.antlr.v4.unicode.UnicodeRenderer"
10202 "tool/resources/org/antlr/v4/tool/templates"
10203 "unicodedata"
10204 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
10205 ;; It seems there is a bug with our ST4
10206 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
10207 (("\\\\>") ">"))
10208 ;; Remove the additional file
10209 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
10210 #t))
10211 (add-before 'build 'generate-grammar
10212 (lambda* (#:key inputs #:allow-other-keys)
10213 (with-directory-excursion "tool/src/org/antlr/v4/parse"
10214 (for-each (lambda (file)
10215 (display file)
10216 (newline)
10217 (invoke "antlr3" file))
10218 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
10219 "GrammarTreeVisitor.g" "ATNBuilder.g"
10220 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
10221 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
10222 (install-file "../parse/ANTLRParser.tokens" ".")
10223 (display "SourceGenTriggers.g\n")
10224 (invoke "antlr3" "SourceGenTriggers.g"))
10225 #t)))))
10226 (inputs
10227 (list antlr3
10228 java-antlr4-runtime
10229 java-icu4j
10230 java-jsonp-api
10231 java-stringtemplate
10232 java-treelayout
10233 openjdk))
10234 (native-inputs
10235 (list java-junit))
10236 (synopsis "Parser and lexer generator in Java")
10237 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
10238parser generator for reading, processing, executing, or translating structured
10239text or binary files. It's widely used to build languages, tools, and
10240frameworks. From a grammar, ANTLR generates a parser that can build and walk
10241parse trees.")))
10242
10243(define-public java-antlr4-runtime-4.1
10244 (package
10245 (inherit java-antlr4-runtime)
10246 (version "4.1")
10247 (source (origin
10248 (method git-fetch)
10249 (uri (git-reference
10250 (url "https://github.com/antlr/antlr4")
10251 (commit version)))
10252 (file-name (git-file-name "antlr4" version))
10253 (sha256
10254 (base32
10255 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
10256 (arguments
10257 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
10258 ((#:phases phases)
10259 `(modify-phases ,phases
10260 (add-before 'configure 'chmod
10261 (lambda _
10262 (chmod "build.xml" #o644)
10263 #t))))))
10264 (inputs
10265 (list java-treelayout))))
10266
10267(define-public antlr4-4.1
10268 (package
10269 (inherit antlr4)
10270 (version (package-version java-antlr4-runtime-4.1))
10271 (source (package-source java-antlr4-runtime-4.1))
10272 (arguments
10273 (substitute-keyword-arguments (package-arguments antlr4)
10274 ((#:test-dir _)
10275 "tool/test")
10276 ((#:test-exclude excludes)
10277 `(list "**/TestParseErrors.java"
10278 "**/TestTopologicalSort.java"
10279 ,@excludes))
10280 ((#:phases phases)
10281 `(modify-phases ,phases
10282 (delete 'generate-unicode)
10283 (replace 'check
10284 (lambda _
10285 (invoke "ant" "check")
10286 #t))
10287 (add-before 'configure 'chmod
10288 (lambda _
10289 (chmod "build.xml" #o644)
10290 #t))
10291 (delete 'remove-graphemes)
10292 (delete 'remove-unrelated-languages)
10293 (delete 'generate-test-parsers)))))
10294 (inputs
10295 (alist-replace
10296 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
10297 (package-inputs antlr4)))))
10298
10299(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
10300 (package
10301 (inherit java-antlr4-runtime)
10302 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
10303 (version "4.7.4")
10304 (source (origin
10305 (method git-fetch)
10306 (uri (git-reference
10307 (url "https://github.com/tunnelvisionlabs/antlr4")
10308 (commit (string-append version "-opt"))))
10309 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
10310 (sha256
10311 (base32
10312 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
10313 (patches
10314 (search-patches "java-antlr4-Add-standalone-generator.patch"
10315 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
10316 (arguments
10317 `(#:jar-name "java-antlr4-runtime-annotations.jar"
10318 #:source-dir "runtime/JavaAnnotations/src"
10319 #:tests? #f; no tests
10320 #:phases
10321 (modify-phases %standard-phases
10322 (add-after 'build 'copy-resources
10323 (lambda _
10324 (copy-recursively "runtime/JavaAnnotations/resources"
10325 "build/classes")
10326 #t))
10327 (add-after 'copy-resources 'rebuild-jar
10328 (lambda _
10329 (invoke "ant" "jar")
10330 #t)))))
10331 (inputs '())
10332 (native-inputs '())
10333 (synopsis "Annotations for ANTLR's runtime library")
10334 (description "This package contains annotations used during the build of
10335the runtime library of ANTLR.")))
10336
10337;; the runtime of this library requires a lexer that is generated by antlr4.
10338;; However, antlr4 itself requires this library at build and run-time. We
10339;; use [email protected], the closest version of antlr that doesn't need this
10340;; bootstrap process, to generate the lexer. The generated lexer is built
10341;; for the 4.1 runtime, which is slightly different from this runtime.
10342;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
10343;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
10344;; the proper, working, runtime to build antlr4 again.
10345(define-public java-tunnelvisionlabs-antlr4-runtime-bootstrap
10346 (package
10347 (inherit java-antlr4-runtime)
10348 (name "java-tunnelvisionlabs-antlr4-runtime")
10349 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
10350 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
10351 (arguments
10352 `(#:jar-name "java-antlr4-runtime.jar"
10353 #:source-dir "runtime/Java/src"
10354 #:tests? #f; tests require antlr4, but antlr4 depends on this package
10355 #:phases
10356 (modify-phases %standard-phases
10357 (add-before 'build 'generate-xpath-lexer
10358 (lambda _
10359 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
10360 "-visitor" "-no-listener"
10361 "-package" "org.antlr.v4.runtime.tree.xpath"
10362 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
10363 ;; Generated code is for an incompatible version of the runtime
10364 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
10365 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
10366 "LexerATNSimulator(this,_ATN)"))
10367 #t))
10368 (add-before 'build 'copy-resources
10369 (lambda _
10370 (copy-recursively "runtime/Java/src/main/dot"
10371 "build/classes")
10372 #t)))))
10373 (native-inputs
10374 `(("antlr4" ,antlr4-4.1)
10375 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
10376 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))
10377 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
10378
10379(define-public java-tunnelvisionlabs-antlr4-bootstrap
10380 (package
10381 (inherit antlr4)
10382 (name "java-tunnelvisionlabs-antlr4")
10383 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
10384 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
10385 (arguments
10386 (substitute-keyword-arguments (package-arguments antlr4)
10387 ((#:test-dir _)
10388 "tool/test:runtime-testsuite/src")
10389 ((#:phases phases)
10390 `(modify-phases ,phases
10391 (delete 'remove-unrelated-languages)
10392 (delete 'remove-graphemes)
10393 (delete 'generate-test-parsers)
10394 (delete 'check)))))
10395 (native-inputs '())
10396 (inputs
10397 `(("antlr3" ,antlr3)
10398 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
10399 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
10400 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
10401 ("java-icu4j" ,java-icu4j)
10402 ("java-jsonp-api" ,java-jsonp-api)
10403 ("java-stringtemplate" ,java-stringtemplate)
10404 ("java-treelayout" ,java-treelayout)
10405 ("openjdk" ,openjdk)))
10406 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
10407
10408(define-public java-tunnelvisionlabs-antlr4-runtime
10409 (package
10410 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
10411 (native-inputs
10412 (alist-replace
10413 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
10414 (package-native-inputs
10415 java-tunnelvisionlabs-antlr4-runtime-bootstrap)))
10416 (properties
10417 (alist-delete
10418 'hidden?
10419 (package-properties java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
10420
10421(define-public java-tunnelvisionlabs-antlr4
10422 (package
10423 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
10424 (inputs
10425 (alist-replace
10426 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
10427 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))
10428 (properties
10429 (alist-delete
10430 'hidden?
10431 (package-properties java-tunnelvisionlabs-antlr4-bootstrap)))))
10432
10433(define-public java-commons-cli-1.2
10434 ;; This is a bootstrap dependency for Maven2.
10435 (package
10436 (inherit java-commons-cli)
10437 (version "1.2")
10438 (source (origin
10439 (method url-fetch)
10440 (uri (string-append "mirror://apache/commons/cli/source/"
10441 "commons-cli-" version "-src.tar.gz"))
10442 (sha256
10443 (base32
10444 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
10445 (arguments
10446 `(#:jar-name "commons-cli.jar"
10447 #:phases
10448 (modify-phases %standard-phases
10449 (add-before 'check 'fix-build-xml
10450 (lambda* (#:key inputs #:allow-other-keys)
10451 (substitute* "build.xml"
10452 (("dir=\"\\$\\{test.home\\}/java\"")
10453 "dir=\"${test.home}\""))
10454 #t)))))
10455 (native-inputs
10456 (list java-junit))))
10457
10458(define-public java-microemulator-cldc
10459 (package
10460 (name "java-microemulator-cldc")
10461 (version "2.0.4")
10462 (source (origin
10463 (method url-fetch)
10464 (uri (string-append "https://github.com/barteo/microemu/archive/"
10465 "microemulator_"
10466 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
10467 version)
10468 ".tar.gz"))
10469 (file-name (string-append name "-" version ".tar.gz"))
10470 (sha256
10471 (base32
10472 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
10473 (build-system ant-build-system)
10474 (arguments
10475 `(#:jar-name "microemulator-cldc.jar"
10476 #:source-dir "microemu-cldc/src/main/java"
10477 #:tests? #f)); Requires even older software
10478 (home-page "https://github.com/barteo/microemu")
10479 (synopsis "J2ME CLDC emulator")
10480 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
10481Emulator. It demonstrates MIDlet based applications in web browser
10482applet and can be run as a standalone java application.")
10483 (license (list license:asl2.0
10484 ;; or altenatively:
10485 license:lgpl2.1+))))
10486
10487(define-public java-datanucleus-javax-persistence
10488 (package
10489 (name "java-datanucleus-javax-persistence")
10490 (version "2.2.0")
10491 (source (origin
10492 (method url-fetch)
10493 (uri (string-append "https://github.com/datanucleus/"
10494 "javax.persistence/archive/javax.persistence-"
10495 version "-release.tar.gz"))
10496 (sha256
10497 (base32
10498 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
10499 (build-system ant-build-system)
10500 (arguments
10501 `(#:jar-name "java-datanucleus-javax-persistence.jar"
10502 #:jdk ,icedtea-8
10503 #:source-dir "src/main/java"
10504 #:tests? #f)); no tests
10505 (home-page "https://github.com/datanucleus/javax.persistence")
10506 (synopsis "JPA API")
10507 (description "This package contains a clean definition of JPA API intended
10508for use with DataNucleus JPA since the JCP haven't provided an official JPA API
10509jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
10510used to generate this API.")
10511 (license (list license:edl1.0 license:epl1.0))))
10512
10513(define-public java-osgi-cmpn
10514 (package
10515 (name "java-osgi-cmpn")
10516 (version "6.0.0")
10517 (source (origin
10518 (method url-fetch)
10519 (uri (string-append "https://repo1.maven.org/maven2/"
10520 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
10521 version "-sources.jar"))
10522 (sha256
10523 (base32
10524 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
10525 (build-system ant-build-system)
10526 (arguments
10527 `(#:jar-name "osgi-cmpn.jar"
10528 #:tests? #f)); no tests
10529 (inputs
10530 `(("annotation" ,java-osgi-annotation)
10531 ("core" ,java-osgi-core)
10532 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
10533 ("microemulator" ,java-microemulator-cldc)
10534 ("servlet" ,java-classpathx-servletapi)))
10535 (home-page "https://www.osgi.org")
10536 (synopsis "Compendium specification module of OSGi framework")
10537 (description
10538 "OSGi, for Open Services Gateway initiative framework, is a module system
10539and service platform for the Java programming language. This package contains
10540the compendium specification module, providing interfaces and classes for use
10541in compiling bundles.")
10542 (license license:asl2.0)))
10543
10544(define-public java-osgi-cmpn-7.0.0
10545 ;; Upstream uses release-train tags for the monorepo; osgi.cmpn/bnd.bnd
10546 ;; emits artifact version 7.0.0 from the r7-cmpn-spec-final checkout.
10547 (let ((tag "r7-cmpn-spec-final"))
10548 (package
10549 (name "java-osgi-cmpn")
10550 (version "7.0.0")
10551 (source (origin
10552 (method git-fetch)
10553 (uri (git-reference
10554 (url "https://github.com/osgi/osgi")
10555 (commit tag)))
10556 (modules '((guix build utils)))
10557 (snippet
10558 '(begin
10559 (for-each delete-file
10560 (find-files "." "\\.jar$"))
10561 #t))
10562 (file-name (git-file-name name version))
10563 (sha256
10564 (base32
10565 "08i8d2y7awr09809qwnv7l5hzqi5di3sv21bvgrmhibm07hr4ml9"))))
10566 (build-system ant-build-system)
10567 (arguments
10568 (list
10569 #:tests? #f
10570 #:jdk openjdk9
10571 #:jar-name "osgi-cmpn.jar"
10572 #:phases
10573 #~(modify-phases %standard-phases
10574 (add-after 'unpack 'prepare-source-layout
10575 (lambda _
10576 (mkdir-p "src")
10577 (for-each
10578 (lambda (directory)
10579 (invoke "cp" "-r" (string-append directory "/.") "src/"))
10580 '("org.osgi.application/src"
10581 "org.osgi.namespace.contract/src"
10582 "org.osgi.namespace.extender/src"
10583 "org.osgi.namespace.implementation/src"
10584 "org.osgi.namespace.service/src"
10585 "org.osgi.namespace.unresolvable/src"
10586 "org.osgi.service.async/src"
10587 "org.osgi.service.application/src"
10588 "org.osgi.service.blueprint/src"
10589 "org.osgi.service.cm/src"
10590 "org.osgi.service.component/src"
10591 "org.osgi.service.component.annotations/src"
10592 "org.osgi.service.configurator/src"
10593 "org.osgi.service.coordinator/src"
10594 "org.osgi.service.deploymentadmin/src"
10595 "org.osgi.service.device/src"
10596 "org.osgi.service.dmt/src"
10597 "org.osgi.service.event/src"
10598 "org.osgi.service.http/src"
10599 "org.osgi.service.http.whiteboard/src"
10600 "org.osgi.service.io/src"
10601 "org.osgi.service.jaxrs/src"
10602 "org.osgi.service.jdbc/src"
10603 "org.osgi.service.jndi/src"
10604 "org.osgi.service.jpa/src"
10605 "org.osgi.service.log/src"
10606 "org.osgi.service.metatype/src"
10607 "org.osgi.service.metatype.annotations/src"
10608 "org.osgi.service.monitor/src"
10609 "org.osgi.service.prefs/src"
10610 "org.osgi.service.provisioning/src"
10611 "org.osgi.service.remoteserviceadmin/src"
10612 "org.osgi.service.repository/src"
10613 "org.osgi.service.rest/src"
10614 "org.osgi.service.serviceloader/src"
10615 "org.osgi.service.subsystem/src"
10616 "org.osgi.service.transaction.control/src"
10617 "org.osgi.service.upnp/src"
10618 "org.osgi.service.useradmin/src"
10619 "org.osgi.service.wireadmin/src"
10620 "org.osgi.util.converter/src"
10621 "org.osgi.util.function/src"
10622 "org.osgi.util.measurement/src"
10623 "org.osgi.util.position/src"
10624 "org.osgi.util.promise/src"
10625 "org.osgi.util.pushstream/src"
10626 "org.osgi.util.xml/src"))))
10627 (add-before 'install 'create-pom
10628 (generate-pom.xml "pom.xml" "org.osgi" "osgi.cmpn" #$version))
10629 (replace 'install (install-from-pom "pom.xml")))))
10630 (inputs
10631 (list java-osgi-annotation-8.1.0
10632 java-osgi-core-8.0.0
10633 java-classpathx-servletapi
10634 java-microemulator-cldc
10635 java-datanucleus-javax-persistence
10636 java-jaxrs-api-2))
10637 (home-page "https://www.osgi.org")
10638 (synopsis "Compendium specification module of OSGi framework")
10639 (description "OSGi, for Open Services Gateway initiative framework, is a
10640module system and service platform for the Java programming language. This
10641package contains the compendium specification module, providing interfaces
10642and classes for use in compiling bundles.")
10643 (license license:asl2.0))))
10644
10645(define-public java-felix-resolver-2
10646 (package
10647 (name "java-felix-resolver")
10648 (version "2.0.4")
10649 (source (origin
10650 (method git-fetch)
10651 (uri (git-reference
10652 (url "https://github.com/apache/felix-dev")
10653 (commit (string-append "org.apache.felix.resolver-"
10654 version))))
10655 (modules '((guix build utils)))
10656 (snippet
10657 '(begin
10658 (for-each delete-file
10659 (find-files "." "\\.jar$"))
10660 #t))
10661 (file-name (git-file-name name version))
10662 (sha256
10663 (base32
10664 "1lkwh6q58vm0inll8zaqizwfvw8d7kzaff0x6lwa17j9k91yllyf"))))
10665 (build-system ant-build-system)
10666 (arguments
10667 (list
10668 #:tests? #f
10669 #:jar-name "org.apache.felix.resolver.jar"
10670 #:source-dir "resolver/src/main/java"
10671 #:phases
10672 #~(modify-phases %standard-phases
10673 (add-before 'install 'create-pom
10674 (generate-pom.xml "pom.xml" "org.apache.felix"
10675 "org.apache.felix.resolver" #$version))
10676 (replace 'install (install-from-pom "pom.xml")))))
10677 (inputs (list java-osgi-annotation java-osgi-core))
10678 (home-page "https://felix.apache.org/")
10679 (synopsis "Apache Felix OSGi resolver")
10680 (description "Apache Felix Resolver implements the OSGi resolver
10681specification, providing dependency resolution for OSGi bundles.")
10682 (license license:asl2.0)))
10683
10684(define-public java-felix-framework-7
10685 (package
10686 (name "java-felix-framework")
10687 (version "7.0.5")
10688 (source (origin
10689 (method git-fetch)
10690 (uri (git-reference
10691 (url "https://github.com/apache/felix-dev")
10692 (commit (string-append "org.apache.felix.framework-"
10693 version))))
10694 (modules '((guix build utils)))
10695 (snippet
10696 '(begin
10697 (for-each delete-file
10698 (find-files "." "\\.jar$"))
10699 #t))
10700 (file-name (git-file-name name version))
10701 (sha256
10702 (base32
10703 "1w4kdy0m4md2j0nf3shn76v9vxvjqa9sxl4j06bk08yn9icnj72k"))))
10704 (build-system ant-build-system)
10705 (arguments
10706 (list
10707 #:tests? #f
10708 #:jar-name "org.apache.felix.framework.jar"
10709 #:source-dir "framework/src/main/java"
10710 #:phases
10711 #~(modify-phases %standard-phases
10712 (add-after 'unpack 'create-animal-sniffer-stub
10713 (lambda _
10714 ;; Felix uses this compile-time Maven annotation to suppress
10715 ;; JRE compatibility warnings. It has no runtime effect.
10716 (mkdir-p "framework/src/main/java/org/codehaus/mojo/animal_sniffer")
10717 (call-with-output-file
10718 "framework/src/main/java/org/codehaus/mojo/animal_sniffer/IgnoreJRERequirement.java"
10719 (lambda (port)
10720 (display (string-append
10721 "package org.codehaus.mojo.animal_sniffer;\n"
10722 "import java.lang.annotation.*;\n"
10723 "@Retention(RetentionPolicy.CLASS)\n"
10724 "@Target({ElementType.METHOD,"
10725 " ElementType.CONSTRUCTOR,"
10726 " ElementType.TYPE})\n"
10727 "public @interface IgnoreJRERequirement {}\n")
10728 port)))))
10729 (add-after 'build 'add-service-descriptor-and-resources
10730 (lambda _
10731 ;; Include the upstream service descriptors and resources that
10732 ;; Felix expects in the framework jar.
10733 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10734 "-C" "framework/src/main/resources" "META-INF/services")
10735 ;; Felix reads default.properties at startup to determine
10736 ;; system packages. The source file uses Maven's ${dollar}
10737 ;; placeholder, so replace it here.
10738 (substitute* "framework/src/main/resources/default.properties"
10739 (("\\$\\{dollar\\}") "$"))
10740 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10741 "-C" "framework/src/main/resources" "default.properties")
10742 ;; Compile accessor.src (a java.net.Accessor class used by
10743 ;; SecureAction to bypass access controls) and include the
10744 ;; compiled bytecode as accessor.bytes.
10745 (mkdir-p "build/accessor-src/java/net")
10746 (copy-file
10747 "framework/src/main/resources/org/apache/felix/framework/util/accessor.src"
10748 "build/accessor-src/java/net/Accessor.java")
10749 (mkdir-p "build/accessor-out")
10750 (invoke "javac"
10751 "-d" "build/accessor-out"
10752 "build/accessor-src/java/net/Accessor.java")
10753 (copy-file "build/accessor-out/java/net/Accessor.class"
10754 "build/accessor.bytes")
10755 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10756 "-C" "build"
10757 "accessor.bytes")))
10758 (add-after 'add-service-descriptor-and-resources
10759 'fix-accessor-path
10760 (lambda _
10761 ;; accessor.bytes must be at
10762 ;; org/apache/felix/framework/util/accessor.bytes
10763 (let ((jar "build/jar/org.apache.felix.framework.jar"))
10764 (mkdir-p "build/accessor-pkg/org/apache/felix/framework/util")
10765 (copy-file "build/accessor.bytes"
10766 "build/accessor-pkg/org/apache/felix/framework/util/accessor.bytes")
10767 (invoke "jar" "uf" jar
10768 "-C" "build/accessor-pkg"
10769 "org/apache/felix/framework/util/accessor.bytes"))))
10770 (add-before 'install 'create-pom
10771 (generate-pom.xml "pom.xml" "org.apache.felix"
10772 "org.apache.felix.framework" #$version))
10773 (replace 'install (install-from-pom "pom.xml")))))
10774 (inputs (list java-osgi-annotation-8.1.0
10775 java-osgi-core-8.0.0
10776 java-felix-resolver-2))
10777 (home-page "https://felix.apache.org/")
10778 (synopsis "Apache Felix OSGi framework")
10779 (description "Apache Felix is a community effort to implement the OSGi
10780Framework and Service platform.")
10781 (license license:asl2.0)))
10782
10783(define-public java-felix-main-7.0.5
10784 (package
10785 (name "java-felix-main")
10786 (version "7.0.5")
10787 (source (origin
10788 (method git-fetch)
10789 (uri (git-reference
10790 (url "https://github.com/apache/felix-dev")
10791 (commit (string-append "org.apache.felix.main-"
10792 version))))
10793 (modules '((guix build utils)))
10794 (snippet
10795 '(begin
10796 (for-each delete-file
10797 (find-files "." "\\.jar$"))
10798 #t))
10799 (file-name (git-file-name name version))
10800 (sha256
10801 (base32
10802 "04miqvr8lqng4a0n6zry8rary8hrcbrq41652adyz85znmcp1z59"))))
10803 (build-system ant-build-system)
10804 (arguments
10805 (list
10806 #:tests? #f
10807 #:jar-name "org.apache.felix.main.jar"
10808 #:source-dir "main/src/main/java"
10809 #:phases
10810 #~(modify-phases %standard-phases
10811 (add-after 'build 'create-uber-jar
10812 (lambda* (#:key inputs #:allow-other-keys)
10813 ;; org.apache.felix.main is an uber jar combining framework,
10814 ;; resolver, and osgi-core classes with Main and AutoProcessor.
10815 (let ((jar (canonicalize-path
10816 "build/jar/org.apache.felix.main.jar"))
10817 (work-dir (mkdtemp "/tmp/felix-merge-XXXXXX")))
10818 (with-directory-excursion work-dir
10819 (for-each
10820 (lambda (input-name)
10821 (for-each
10822 (lambda (dep-jar)
10823 (invoke "jar" "xf" dep-jar))
10824 (find-files (assoc-ref inputs input-name)
10825 "\\.jar$")))
10826 '("java-felix-framework"
10827 "java-felix-resolver"
10828 "java-osgi-core"))
10829 ;; Remove metadata that would conflict with the
10830 ;; main jar's own manifest.
10831 (when (file-exists? "META-INF/MANIFEST.MF")
10832 (delete-file "META-INF/MANIFEST.MF"))
10833 (when (file-exists? "META-INF/maven")
10834 (delete-file-recursively "META-INF/maven"))
10835 (invoke "jar" "uf" jar "-C" work-dir ".")))))
10836 (add-after 'create-uber-jar 'add-service-descriptor
10837 (lambda _
10838 (let ((jar "build/jar/org.apache.felix.main.jar"))
10839 (mkdir-p "META-INF/services")
10840 (call-with-output-file
10841 "META-INF/services/org.osgi.framework.launch.FrameworkFactory"
10842 (lambda (port)
10843 (display
10844 "org.apache.felix.framework.FrameworkFactory\n" port)))
10845 (invoke "jar" "uf" jar "-C" "." "META-INF/services"))))
10846 (add-before 'install 'create-pom
10847 (generate-pom.xml "pom.xml" "org.apache.felix"
10848 "org.apache.felix.main" #$version))
10849 (replace 'install (install-from-pom "pom.xml")))))
10850 (inputs (list java-felix-framework-7
10851 java-felix-resolver-2
10852 java-osgi-core-8.0.0))
10853 (home-page "https://felix.apache.org/")
10854 (synopsis "Apache Felix Main distribution jar")
10855 (description "Apache Felix Main is the standard distribution jar for
10856the Apache Felix OSGi framework. It bundles the framework, resolver, and
10857OSGi core classes into a single jar with a standalone launcher.")
10858 (license license:asl2.0)))
10859
10860(define-public java-osgi-service-component-annotations
10861 (package
10862 (name "java-osgi-service-component-annotations")
10863 (version "1.3.0")
10864 (source (origin
10865 (method url-fetch)
10866 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10867 "org.osgi.service.component.annotations/"
10868 version "/org.osgi.service.component.annotations-"
10869 version "-sources.jar"))
10870 (sha256
10871 (base32
10872 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
10873 (build-system ant-build-system)
10874 (arguments
10875 `(#:jar-name "osgi-service-component-annotations.jar"
10876 #:tests? #f)); no tests
10877 (inputs
10878 `(("annotation" ,java-osgi-annotation)))
10879 (home-page "https://www.osgi.org")
10880 (synopsis "Support annotations for osgi-service-component")
10881 (description
10882 "OSGi, for Open Services Gateway initiative framework, is a module system
10883and service platform for the Java programming language. This package contains
10884the support annotations for osgi-service-component.")
10885 (license license:asl2.0)))
10886
10887(define-public java-osgi-dto
10888 (package
10889 (name "java-osgi-dto")
10890 (version "1.0.0")
10891 (source (origin
10892 (method url-fetch)
10893 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10894 "org.osgi.dto/" version "/org.osgi.dto-"
10895 version "-sources.jar"))
10896 (sha256
10897 (base32
10898 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
10899 (build-system ant-build-system)
10900 (arguments
10901 `(#:jar-name "osgi-dto.jar"
10902 #:tests? #f)); no tests
10903 (inputs
10904 `(("annotation" ,java-osgi-annotation)))
10905 (home-page "https://www.osgi.org")
10906 (synopsis "Data Transfer Objects")
10907 (description
10908 "OSGi, for Open Services Gateway initiative framework, is a module system
10909and service platform for the Java programming language. This package contains
10910the Data Transfer Objects. It is easily serializable having only public fields
10911of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
10912Map and array aggregates may also be used. The aggregates must only hold
10913objects of the listed types or aggregates.")
10914 (license license:asl2.0)))
10915
10916(define-public java-osgi-resource
10917 (package
10918 (name "java-osgi-resource")
10919 (version "1.0.0")
10920 (source (origin
10921 (method url-fetch)
10922 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10923 "org.osgi.resource/"
10924 version "/org.osgi.resource-"
10925 version "-sources.jar"))
10926 (sha256
10927 (base32
10928 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
10929 (build-system ant-build-system)
10930 (arguments
10931 `(#:jar-name "osgi-resource.jar"
10932 #:tests? #f)); no tests
10933 (inputs
10934 `(("annotation" ,java-osgi-annotation)
10935 ("dto" ,java-osgi-dto)))
10936 (home-page "https://www.osgi.org")
10937 (synopsis "OSGI Resource")
10938 (description
10939 "OSGi, for Open Services Gateway initiative framework, is a module system
10940and service platform for the Java programming language. This package contains
10941the definition of common types in osgi packages.")
10942 (license license:asl2.0)))
10943
10944(define-public java-osgi-namespace-contract
10945 (package
10946 (name "java-osgi-namespace-contract")
10947 (version "1.0.0")
10948 (source (origin
10949 (method url-fetch)
10950 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10951 "org.osgi.namespace.contract/"
10952 version "/org.osgi.namespace.contract-"
10953 version "-sources.jar"))
10954 (sha256
10955 (base32
10956 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
10957 (build-system ant-build-system)
10958 (inputs
10959 `(("resource" ,java-osgi-resource)
10960 ("annotation" ,java-osgi-annotation)))
10961 (arguments
10962 `(#:jar-name "osgi-namespace-contract.jar"
10963 #:tests? #f)); no tests
10964 (home-page "https://www.osgi.org")
10965 (synopsis "Contract Capability and Requirement Namespace")
10966 (description
10967 "OSGi, for Open Services Gateway initiative framework, is a module system
10968and service platform for the Java programming language. This package contains
10969the names for the attributes and directives for a namespace with contracts.")
10970 (license license:asl2.0)))
10971
10972(define-public java-osgi-namespace-extender
10973 (package
10974 (name "java-osgi-namespace-extender")
10975 (version "1.0.1")
10976 (source (origin
10977 (method url-fetch)
10978 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10979 "org.osgi.namespace.extender/"
10980 version "/org.osgi.namespace.extender-"
10981 version "-sources.jar"))
10982 (sha256
10983 (base32
10984 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
10985 (build-system ant-build-system)
10986 (inputs
10987 `(("resource" ,java-osgi-resource)
10988 ("annotation" ,java-osgi-annotation)))
10989 (arguments
10990 `(#:jar-name "osgi-namespace-extendent.jar"
10991 #:tests? #f)); no tests
10992 (home-page "https://www.osgi.org")
10993 (synopsis "Extender Capability and Requirement Namespace")
10994 (description
10995 "OSGi, for Open Services Gateway initiative framework, is a module system
10996and service platform for the Java programming language. This package contains
10997the names for the attributes and directives for an extender namespace.")
10998 (license license:asl2.0)))
10999
11000(define-public java-osgi-namespace-service
11001 (package
11002 (name "java-osgi-namespace-service")
11003 (version "1.0.0")
11004 (source (origin
11005 (method url-fetch)
11006 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11007 "org.osgi.namespace.service/"
11008 version "/org.osgi.namespace.service-"
11009 version "-sources.jar"))
11010 (sha256
11011 (base32
11012 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
11013 (build-system ant-build-system)
11014 (inputs
11015 `(("resource" ,java-osgi-resource)
11016 ("annotation" ,java-osgi-annotation)))
11017 (arguments
11018 `(#:jar-name "osgi-namespace-service.jar"
11019 #:tests? #f)); no tests
11020 (home-page "https://www.osgi.org")
11021 (synopsis "Service Capability and Requirement Namespace")
11022 (description
11023 "OSGi, for Open Services Gateway initiative framework, is a module system
11024and service platform for the Java programming language. This package contains
11025the names for the attributes and directives for a service namespace.")
11026 (license license:asl2.0)))
11027
11028(define-public java-osgi-util-function
11029 (package
11030 (name "java-osgi-util-function")
11031 (version "1.0.0")
11032 (source (origin
11033 (method url-fetch)
11034 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11035 "org.osgi.util.function/"
11036 version "/org.osgi.util.function-"
11037 version "-sources.jar"))
11038 (sha256
11039 (base32
11040 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
11041 (build-system ant-build-system)
11042 (arguments
11043 `(#:jar-name "osgi-util-function.jar"
11044 #:tests? #f)); no tests
11045 (inputs
11046 `(("annotation" ,java-osgi-annotation)))
11047 (home-page "https://www.osgi.org")
11048 (synopsis "OSGI Util Function")
11049 (description
11050 "OSGi, for Open Services Gateway initiative framework, is a module system
11051and service platform for the Java programming language. This package contains
11052an interface for a function that accepts a single argument and produces a result.")
11053 (license license:asl2.0)))
11054
11055(define-public java-osgi-util-promise
11056 (package
11057 (name "java-osgi-util-promise")
11058 (version "1.0.0")
11059 (source (origin
11060 (method url-fetch)
11061 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11062 "org.osgi.util.promise/"
11063 version "/org.osgi.util.promise-"
11064 version "-sources.jar"))
11065 (sha256
11066 (base32
11067 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
11068 (build-system ant-build-system)
11069 (arguments
11070 `(#:jar-name "osgi-util-promise.jar"
11071 #:tests? #f)); no tests
11072 (inputs
11073 `(("annotation" ,java-osgi-annotation)
11074 ("function" ,java-osgi-util-function)))
11075 (home-page "https://www.osgi.org")
11076 (synopsis "Promise of a value")
11077 (description
11078 "OSGi, for Open Services Gateway initiative framework, is a module system
11079and service platform for the Java programming language. This package contains
11080an interface and utilitary classes for promises. A Promise represents a future
11081value. It handles the interactions for asynchronous processing.")
11082 (license license:asl2.0)))
11083
11084(define-public java-osgi-service-metatype-annotations
11085 (package
11086 (name "java-osgi-service-metatype-annotations")
11087 (version "1.3.0")
11088 (source (origin
11089 (method url-fetch)
11090 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11091 "org.osgi.service.metatype.annotations/"
11092 version "/org.osgi.service.metatype.annotations-"
11093 version "-sources.jar"))
11094 (sha256
11095 (base32
11096 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
11097 (build-system ant-build-system)
11098 (arguments
11099 `(#:jar-name "osgi-service-metatype-annotations.jar"
11100 #:tests? #f)); no tests
11101 (inputs
11102 `(("annotation" ,java-osgi-annotation)))
11103 (home-page "https://www.osgi.org")
11104 (synopsis "Support annotations for metatype")
11105 (description
11106 "OSGi, for Open Services Gateway initiative framework, is a module system
11107and service platform for the Java programming language. This package contains
11108the support annotations for metatype.")
11109 (license license:asl2.0)))
11110
11111(define-public java-osgi-service-repository
11112 (package
11113 (name "java-osgi-service-repository")
11114 (version "1.1.0")
11115 (source (origin
11116 (method url-fetch)
11117 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11118 "org.osgi.service.repository/"
11119 version "/org.osgi.service.repository-"
11120 version "-sources.jar"))
11121 (sha256
11122 (base32
11123 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
11124 (build-system ant-build-system)
11125 (arguments
11126 `(#:jar-name "osgi-service-repository.jar"
11127 #:tests? #f)); no tests
11128 (inputs
11129 `(("annotation" ,java-osgi-annotation)
11130 ("promise" ,java-osgi-util-promise)
11131 ("resource" ,java-osgi-resource)))
11132 (home-page "https://www.osgi.org")
11133 (synopsis "OSGI service repository")
11134 (description
11135 "OSGi, for Open Services Gateway initiative framework, is a module system
11136and service platform for the Java programming language. This package contains
11137a repository service that contains resources.")
11138 (license license:asl2.0)))
11139
11140(define-public java-osgi-framework
11141 (package
11142 (name "java-osgi-framework")
11143 (version "1.8.0")
11144 (source (origin
11145 (method url-fetch)
11146 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11147 "org.osgi.framework/" version "/org.osgi.framework-"
11148 version "-sources.jar"))
11149 (sha256
11150 (base32
11151 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
11152 (build-system ant-build-system)
11153 (arguments
11154 `(#:jar-name "osgi-framework.jar"
11155 #:tests? #f)); no tests
11156 (inputs
11157 `(("annotation" ,java-osgi-annotation)
11158 ("resource" ,java-osgi-resource)
11159 ("dto" ,java-osgi-dto)))
11160 (home-page "https://www.osgi.org")
11161 (synopsis "OSGi framework")
11162 (description
11163 "OSGi, for Open Services Gateway initiative framework, is a module system
11164and service platform for the Java programming language.")
11165 (license license:asl2.0)))
11166
11167(define-public java-osgi-service-log
11168 (package
11169 (name "java-osgi-service-log")
11170 (version "1.3.0")
11171 (source (origin
11172 (method url-fetch)
11173 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11174 "org.osgi.service.log/"
11175 version "/org.osgi.service.log-"
11176 version "-sources.jar"))
11177 (sha256
11178 (base32
11179 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
11180 (build-system ant-build-system)
11181 (arguments
11182 `(#:jar-name "osgi-service-log.jar"
11183 #:tests? #f)); no tests
11184 (inputs
11185 (list java-osgi-framework))
11186 (home-page "https://www.osgi.org")
11187 (synopsis "Provides methods for bundles to write messages to the log")
11188 (description
11189 "OSGi, for Open Services Gateway initiative framework, is a module system
11190and service platform for the Java programming language. This package contains
11191the log service.")
11192 (license license:asl2.0)))
11193
11194(define-public java-osgi-service-jdbc
11195 (package
11196 (name "java-osgi-service-jdbc")
11197 (version "1.0.0")
11198 (source (origin
11199 (method url-fetch)
11200 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11201 "org.osgi.service.jdbc/"
11202 version "/org.osgi.service.jdbc-"
11203 version "-sources.jar"))
11204 (sha256
11205 (base32
11206 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
11207 (build-system ant-build-system)
11208 (arguments
11209 `(#:jar-name "osgi-service-jdbc.jar"
11210 #:tests? #f)); no tests
11211 (home-page "https://www.osgi.org")
11212 (synopsis "Factory for JDBC connection factories")
11213 (description
11214 "OSGi, for Open Services Gateway initiative framework, is a module system
11215and service platform for the Java programming language. This package contains
11216a factory for JDBC connection factories. There are 3 preferred connection
11217factories for getting JDBC connections:
11218
11219@itemize
11220@item @code{javax.sql.DataSource};
11221@item @code{javax.sql.ConnectionPoolDataSource};
11222@item @code{javax.sql.XADataSource}.
11223@end itemize")
11224 (license license:asl2.0)))
11225
11226(define-public java-osgi-service-resolver
11227 (package
11228 (name "java-osgi-service-resolver")
11229 (version "1.0.1")
11230 (source (origin
11231 (method url-fetch)
11232 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11233 "org.osgi.service.resolver/"
11234 version "/org.osgi.service.resolver-"
11235 version "-sources.jar"))
11236 (sha256
11237 (base32
11238 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
11239 (build-system ant-build-system)
11240 (arguments
11241 `(#:jar-name "osgi-service-resolver.jar"
11242 #:tests? #f)); no tests
11243 (inputs
11244 `(("annotation" ,java-osgi-annotation)
11245 ("resource" ,java-osgi-resource)))
11246 (home-page "https://www.osgi.org")
11247 (synopsis "OSGI Resolver service")
11248 (description
11249 "OSGi, for Open Services Gateway initiative framework, is a module system
11250and service platform for the Java programming language. This package contains
11251a resolver service that resolves the specified resources in the context supplied
11252by the caller.")
11253 (license license:asl2.0)))
11254
11255(define-public java-osgi-util-tracker
11256 (package
11257 (name "java-osgi-util-tracker")
11258 (version "1.5.1")
11259 (source (origin
11260 (method url-fetch)
11261 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11262 "org.osgi.util.tracker/"
11263 version "/org.osgi.util.tracker-"
11264 version "-sources.jar"))
11265 (sha256
11266 (base32
11267 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
11268 (build-system ant-build-system)
11269 (arguments
11270 `(#:jar-name "osgi-util-tracker.jar"
11271 #:tests? #f)); no tests
11272 (inputs
11273 `(("framework" ,java-osgi-framework)
11274 ("annotation" ,java-osgi-annotation)))
11275 (home-page "https://www.osgi.org")
11276 (synopsis "Bundle tracking")
11277 (description
11278 "OSGi, for Open Services Gateway initiative framework, is a module system
11279and service platform for the Java programming language. This package contains
11280bundle tracking utility classes.")
11281 (license license:asl2.0)))
11282
11283(define-public java-osgi-service-cm
11284 (package
11285 (name "java-osgi-service-cm")
11286 (version "1.5.0")
11287 (source (origin
11288 (method url-fetch)
11289 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11290 "org.osgi.service.cm/"
11291 version "/org.osgi.service.cm-"
11292 version "-sources.jar"))
11293 (sha256
11294 (base32
11295 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
11296 (build-system ant-build-system)
11297 (arguments
11298 `(#:jar-name "osgi-service-cm.jar"
11299 #:tests? #f)); no tests
11300 (inputs
11301 `(("framework" ,java-osgi-framework)
11302 ("annotation" ,java-osgi-annotation)))
11303 (home-page "https://www.osgi.org")
11304 (synopsis "OSGI Configuration Management")
11305 (description
11306 "OSGi, for Open Services Gateway initiative framework, is a module system
11307and service platform for the Java programming language. This package contains
11308utility classes for the configuration of services.")
11309 (license license:asl2.0)))
11310
11311(define-public java-osgi-service-packageadmin
11312 (package
11313 (name "java-osgi-service-packageadmin")
11314 (version "1.2.0")
11315 (source (origin
11316 (method url-fetch)
11317 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11318 "org.osgi.service.packageadmin/"
11319 version "/org.osgi.service.packageadmin-"
11320 version "-sources.jar"))
11321 (sha256
11322 (base32
11323 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
11324 (build-system ant-build-system)
11325 (arguments
11326 `(#:jar-name "osgi-service-packageadmin.jar"
11327 #:tests? #f)); no tests
11328 (inputs
11329 `(("framework" ,java-osgi-framework)))
11330 (home-page "https://www.osgi.org")
11331 (synopsis "OSGI Package Administration")
11332 (description
11333 "OSGi, for Open Services Gateway initiative framework, is a module system
11334and service platform for the Java programming language. This package contains
11335the packageadmin service.")
11336 (license license:asl2.0)))
11337
11338(define-public java-ops4j-base-lang
11339 (package
11340 (name "java-ops4j-base-lang")
11341 (version "1.5.0")
11342 (source (origin
11343 (method url-fetch)
11344 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
11345 "archive/base-" version ".tar.gz"))
11346 (sha256
11347 (base32
11348 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
11349 (build-system ant-build-system)
11350 (arguments
11351 `(#:jar-name "java-ops4j-base-lang.jar"
11352 #:source-dir "ops4j-base-lang/src/main/java"
11353 #:tests? #f; no tests
11354 #:phases
11355 (modify-phases %standard-phases
11356 (add-before 'build 'add-test-file
11357 (lambda _
11358 ;; That file is required by a test in ops4j-pax-exam-core-spi
11359 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
11360 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
11361 (lambda _
11362 (display
11363 (string-append
11364 "version=" ,version "\n"
11365 "groupId=org.ops4j.base"
11366 "artifactId=ops4j-base-lang\n"))))
11367 #t)))))
11368 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
11369 (synopsis "Utility classes and extensions to be used in OPS4J projects")
11370 (description "OPS4J stands for Open Participation Software for Java. This
11371package contains utilities and extensions related to @code{java.lang}.")
11372 (license license:asl2.0)))
11373
11374(define-public java-ops4j-base-monitors
11375 (package
11376 (inherit java-ops4j-base-lang)
11377 (name "java-ops4j-base-monitors")
11378 (arguments
11379 `(#:jar-name "java-ops4j-base-monitors.jar"
11380 #:source-dir "ops4j-base-monitors/src/main/java"
11381 #:tests? #f)); no tests
11382 (inputs
11383 `(("lang" ,java-ops4j-base-lang)))
11384 (description "OPS4J stands for Open Participation Software for Java. This
11385package contains utilities and extensions related to monitoring.")))
11386
11387(define-public java-ops4j-base-io
11388 (package
11389 (inherit java-ops4j-base-lang)
11390 (name "java-ops4j-base-io")
11391 (arguments
11392 `(#:jar-name "java-ops4j-base-io.jar"
11393 #:source-dir "ops4j-base-io/src/main/java"
11394 #:test-dir "ops4j-base-io/src/test"
11395 #:test-exclude
11396 (list "**/ListerTest.java")))
11397 (inputs
11398 `(("lang" ,java-ops4j-base-monitors)
11399 ("lang" ,java-ops4j-base-lang)))
11400 (native-inputs
11401 `(("junit" ,java-junit)
11402 ("hamcrest" ,java-hamcrest-core)))
11403 (description "OPS4J stands for Open Participation Software for Java. This
11404package contains utilities and extensions related to handling streams and files.")))
11405
11406(define-public java-ops4j-base-util
11407 (package
11408 (inherit java-ops4j-base-lang)
11409 (name "java-ops4j-base-util")
11410 (arguments
11411 `(#:jar-name "java-ops4j-base-util.jar"
11412 #:source-dir "ops4j-base-util/src/main/java"
11413 #:test-dir "ops4j-base-util/src/test"))
11414 (inputs
11415 `(("lang" ,java-ops4j-base-lang)))
11416 (native-inputs
11417 `(("junit" ,java-junit)))
11418 (description "OPS4J stands for Open Participation Software for Java. This
11419package contains utilities and extensions related to environment, i18n and
11420mime types.")))
11421
11422(define-public java-ops4j-base-util-property
11423 (package
11424 (inherit java-ops4j-base-lang)
11425 (name "java-ops4j-base-util-property")
11426 (arguments
11427 `(#:jar-name "java-ops4j-base-util-property.jar"
11428 #:source-dir "ops4j-base-util-property/src/main/java"
11429 #:tests? #f)); no tests
11430 (inputs
11431 `(("lang" ,java-ops4j-base-lang)
11432 ("util" ,java-ops4j-base-util)))
11433 (description "OPS4J stands for Open Participation Software for Java. This
11434package contains utilities and extensions related to resolving properties from
11435different sources.")))
11436
11437(define-public java-ops4j-base-store
11438 (package
11439 (inherit java-ops4j-base-lang)
11440 (name "java-ops4j-base-store")
11441 (arguments
11442 `(#:jar-name "java-ops4j-base-store.jar"
11443 #:source-dir "ops4j-base-store/src/main/java"
11444 #:tests? #f)); no tests
11445 (inputs
11446 `(("lang" ,java-ops4j-base-lang)
11447 ("slf4j" ,java-slf4j-api)
11448 ("io" ,java-ops4j-base-io)))
11449 (description "OPS4J stands for Open Participation Software for Java. This
11450package contains utilities for storing and retrieving data from an
11451@code{InputStream}.")))
11452
11453(define-public java-ops4j-base-spi
11454 (package
11455 (inherit java-ops4j-base-lang)
11456 (name "java-ops4j-base-spi")
11457 (arguments
11458 `(#:jar-name "java-ops4j-base-spi.jar"
11459 #:source-dir "ops4j-base-spi/src/main/java"
11460 #:test-dir "ops4j-base-spi/src/test"))
11461 (native-inputs
11462 `(("junit" ,java-junit)
11463 ("hamcrest" ,java-hamcrest-core)))
11464 (description "OPS4J stands for Open Participation Software for Java. This
11465package contains utilities for obtaining services via the Java SE 6
11466@code{ServiceLoader}.")))
11467
11468(define-public java-aqute-bnd-annotation
11469 (package
11470 (name "java-aqute-bnd-annotation")
11471 (version "3.5.0")
11472 (source (origin
11473 (method url-fetch)
11474 (uri (string-append "https://github.com/bndtools/bnd/archive/"
11475 version ".REL.tar.gz"))
11476 (file-name (string-append name "-" version ".tar.gz"))
11477 (sha256
11478 (base32
11479 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
11480 (build-system ant-build-system)
11481 (arguments
11482 `(#:jar-name "java-aqute-bnd-annotation.jar"
11483 #:source-dir "biz.aQute.bnd.annotation/src"
11484 #:tests? #f)); empty test dir
11485 (home-page "https://bnd.bndtools.org/")
11486 (synopsis "Tools for OSGi")
11487 (description "Bnd is a swiss army knife for OSGi, it creates manifest
11488headers based on analyzing the class code, it verifies the project settings,
11489it manages project dependencies, gives diffs jars, and much more.")
11490 (license license:asl2.0)))
11491
11492(define-public java-aqute-libg
11493 (package
11494 (inherit java-aqute-bnd-annotation)
11495 (name "java-aqute-libg")
11496 (arguments
11497 `(#:jar-name "java-aqute-libg.jar"
11498 ;; The build fails when source/target more recent than 1.7. This
11499 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
11500 ;;
11501 ;; It is closed as won't fix. There is no way to change the source
11502 ;; so that it works on 1.8, and still works on 1.6, the upstream
11503 ;; target. It work fine on 1.7, so we use 1.7.
11504 #:make-flags (list "-Dant.build.javac.source=1.7"
11505 "-Dant.build.javac.target=1.7")
11506 #:phases
11507 (modify-phases %standard-phases
11508 (add-before 'configure 'chdir
11509 ;; Change to aQute.libg directory, so that the relative
11510 ;; paths in the tests aren't broken.
11511 (lambda _
11512 (chdir "aQute.libg")
11513 #t))
11514 (add-before 'check 'create-test-directory
11515 ;; Copy the test directory to test/java, since that's where
11516 ;; ant-build-system's default project in build.xml expects to find
11517 ;; the test classes. Leave a copy in the original place to not
11518 ;; break paths in tests.
11519 (lambda _
11520 (mkdir "src/test")
11521 (copy-recursively "test" "src/test/java")
11522 #t)))))
11523 (inputs
11524 `(("slf4j" ,java-slf4j-api)
11525 ("osgi-annot" ,java-osgi-annotation)
11526 ("java-osgi-cmpn" ,java-osgi-cmpn)
11527 ("osgi" ,java-osgi-core)))
11528 (native-inputs
11529 `(("hamcrest" ,java-hamcrest-core)
11530 ("java-junit" ,java-junit)))))
11531
11532(define-public java-aqute-bndlib
11533 (package
11534 (inherit java-aqute-bnd-annotation)
11535 (name "java-aqute-bndlib")
11536 (arguments
11537 `(#:jar-name "java-bndlib.jar"
11538 #:source-dir "biz.aQute.bndlib/src"
11539 #:tests? #f)); no tests
11540 (inputs
11541 `(("slf4j" ,java-slf4j-api)
11542 ("osgi-annot" ,java-osgi-annotation)
11543 ("java-aqute-libg" ,java-aqute-libg)
11544 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
11545 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
11546 ("java-osgi-service-repository" ,java-osgi-service-repository)
11547 ("java-osgi-service-log" ,java-osgi-service-log)
11548 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
11549 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
11550 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
11551 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
11552 ("promise" ,java-osgi-util-promise)
11553 ("osgi" ,java-osgi-core)))))
11554
11555(define-public java-ops4j-pax-tinybundles
11556 (package
11557 (name "java-ops4j-pax-tinybundles")
11558 (version "2.1.1")
11559 (source (origin
11560 (method url-fetch)
11561 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
11562 "archive/tinybundles-" version ".tar.gz"))
11563 (sha256
11564 (base32
11565 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
11566 (arguments
11567 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
11568 #:source-dir "src/main/java"
11569 #:test-exclude
11570 ;; Abstract base classes for other tests
11571 (list "**/BndTest.java" "**/CoreTest.java")
11572 #:phases
11573 (modify-phases %standard-phases
11574 (add-before 'check 'fix-version
11575 (lambda _
11576 ;; This test has a reference to an old version of bndlib we are not
11577 ;; packaging. It uses the version referenced in pom.xml. We replace
11578 ;; it with our own version.
11579 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
11580 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
11581 ,(package-version java-aqute-bndlib)))
11582 #t)))))
11583 (inputs
11584 `(("lang" ,java-ops4j-base-lang)
11585 ("io" ,java-ops4j-base-io)
11586 ("store" ,java-ops4j-base-store)
11587 ("slf4j" ,java-slf4j-api)
11588 ("libg" ,java-aqute-libg)
11589 ("bndlib" ,java-aqute-bndlib)))
11590 (native-inputs
11591 `(("junit" ,java-junit)
11592 ("hamcrest" ,java-hamcrest-core)
11593 ("log4j" ,java-log4j-api)
11594 ("bndannotation" ,java-aqute-bnd-annotation)
11595 ("framework" ,java-osgi-framework)))
11596 (build-system ant-build-system)
11597 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
11598 (synopsis "Java APIs to create OSGi related artifacts")
11599 (description "Tinybundles is all about creating OSGi related artifacts like
11600Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
11601to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
11602other hand, this library can be a foundation of real end user tools that need
11603to create those artifacts.")
11604 (license license:asl2.0)))
11605
11606(define-public java-ops4j-pax-exam-core
11607 (package
11608 (name "java-ops4j-pax-exam-core")
11609 (version "4.11.0")
11610 (source (origin
11611 (method url-fetch)
11612 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
11613 "archive/exam-reactor-" version ".tar.gz"))
11614 (sha256
11615 (base32
11616 "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26"))))
11617 (arguments
11618 (list #:jar-name "java-ops4j-pax-exam-core.jar"
11619 #:source-dir "core/pax-exam/src/main/java"
11620 #:test-dir "core/pax-exam/src/test"))
11621 (inputs
11622 (list java-slf4j-api
11623 java-ops4j-base-lang
11624 java-ops4j-base-io
11625 java-ops4j-base-util-property
11626 java-ops4j-base-store
11627 java-osgi-core))
11628 (native-inputs
11629 (list java-junit
11630 java-hamcrest-core))
11631 (build-system ant-build-system)
11632 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
11633 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
11634 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
11635the user take control of the OSGi framework, the test framework (e.g. JUnit) and
11636the system under test at the same time.")
11637 (license license:asl2.0)))
11638
11639(define-public java-ops4j-pax-exam-core-spi
11640 (package
11641 (inherit java-ops4j-pax-exam-core)
11642 (name "java-ops4j-pax-exam-core-spi")
11643 (arguments
11644 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
11645 #:source-dir "src/main/java"
11646 #:test-exclude
11647 (list
11648 ;; Abstract base class, not a test
11649 "**/BaseStagedReactorTest.java"
11650 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
11651 "**/WarBuilderTest.java")
11652 #:phases
11653 (modify-phases %standard-phases
11654 (add-before 'configure 'chdir
11655 (lambda _
11656 ;; Tests assume we are in this directory
11657 (chdir "core/pax-exam-spi")
11658 #t))
11659 (add-before 'check 'fix-tests
11660 (lambda _
11661 ;; One test checks that this file is present.
11662 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
11663 (with-output-to-file
11664 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
11665 (lambda _
11666 (display
11667 (string-append "artifactId = pax-exam-spi\n"
11668 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
11669 ;; Maven puts compilation results in the target directory, while we
11670 ;; put them in the build directory.
11671 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
11672 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
11673 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
11674 (("target") "build"))
11675 ;; One test is expected to fail, but it doesn't throw the expected exception
11676 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
11677 (("AssertionError") "IllegalArgumentException"))
11678 #t)))))
11679 (inputs
11680 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
11681 ("lang" ,java-ops4j-base-lang)
11682 ("monitors" ,java-ops4j-base-monitors)
11683 ("store" ,java-ops4j-base-store)
11684 ("io" ,java-ops4j-base-io)
11685 ("spi" ,java-ops4j-base-spi)
11686 ("osgi" ,java-osgi-core)
11687 ("slf4j" ,java-slf4j-api)
11688 ("tinybundles" ,java-ops4j-pax-tinybundles)))
11689 (native-inputs
11690 `(("mockito" ,java-mockito-1)
11691 ("junit" ,java-junit)
11692 ("hamcrest" ,java-hamcrest-core)
11693 ("cglib" ,java-cglib)
11694 ("objenesis" ,java-objenesis)))))
11695
11696(define-public java-ops4j-pax-exam-core-junit
11697 (package
11698 (inherit java-ops4j-pax-exam-core)
11699 (name "java-ops4j-pax-exam-core-junit")
11700 (arguments
11701 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
11702 #:source-dir "drivers/pax-exam-junit4/src/main/java"
11703 #:tests? #f)); no tests
11704 (inputs
11705 `(("junit" ,java-junit)
11706 ("slf4j" ,java-slf4j-api)
11707 ("core" ,java-ops4j-pax-exam-core)
11708 ("spi" ,java-ops4j-pax-exam-core-spi)))
11709 (native-inputs '())))
11710
11711(define-public java-fasterxml-jackson-annotations
11712 (package
11713 (name "java-fasterxml-jackson-annotations")
11714 (version "2.9.4")
11715 (source (origin
11716 (method url-fetch)
11717 (uri (string-append "https://github.com/FasterXML/"
11718 "jackson-annotations/archive/"
11719 "jackson-annotations-" version ".tar.gz"))
11720 (sha256
11721 (base32
11722 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
11723 (build-system ant-build-system)
11724 (arguments
11725 `(#:jar-name "jackson-annotations.jar"
11726 #:source-dir "src/main/java"
11727 #:test-dir "src/test"))
11728 (native-inputs
11729 `(("junit" ,java-junit)))
11730 (home-page "https://github.com/FasterXML/jackson-annotations")
11731 (synopsis "General purpose annotations for the Jackson Data Processor")
11732 (description "This package contains general purpose annotations for the
11733Jackson Data Processor, used on value and handler types. The only annotations
11734not included are ones that require dependency to the Databind package.")
11735 (license license:asl2.0)))
11736
11737(define-public java-fasterxml-jackson-core
11738 (package
11739 (name "java-fasterxml-jackson-core")
11740 (version "2.9.4")
11741 (source (origin
11742 (method url-fetch)
11743 (uri (string-append "https://github.com/FasterXML/"
11744 "jackson-core/archive/"
11745 "jackson-core-" version ".tar.gz"))
11746 (sha256
11747 (base32
11748 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
11749 (build-system ant-build-system)
11750 (arguments
11751 `(#:jar-name "jackson-core.jar"
11752 #:source-dir "src/main/java"
11753 #:test-dir "src/test"
11754 #:test-exclude
11755 (list
11756 ;; Expected failure. pom.xml excludes these
11757 "**/failing/**"
11758 ;; Base classes that have no constructor for junit
11759 "**/BaseTest.java"
11760 "**/ConcurrencyReadTest.java"
11761 "**/ManualCharAccessTest.java"
11762 "**/ManualCharAccessTest.java"
11763 "**/TrailingCommasTest.java"
11764 "**/AsyncMissingValuesInObjectTest.java"
11765 "**/AsyncMissingValuesInArrayTest.java")
11766 #:phases
11767 (modify-phases %standard-phases
11768 (add-before 'configure 'generate-PackageVersion.java
11769 (lambda _
11770 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
11771 (in (string-append out ".in")))
11772 (copy-file in out)
11773 (substitute* out
11774 (("@package@") "com.fasterxml.jackson.core.json")
11775 (("@projectversion@") ,version)
11776 (("@projectgroupid@") "com.fasterxml.jackson.core")
11777 (("@projectartifactid@") "jackson-core")))
11778 #t))
11779 (add-before 'build 'copy-resources
11780 (lambda _
11781 (copy-recursively "src/main/resources"
11782 "build/classes")
11783 #t))
11784 (add-before 'check 'copy-test-resources
11785 (lambda _
11786 (copy-recursively "src/test/resources"
11787 "build/test-classes")
11788 #t)))))
11789 (native-inputs
11790 `(("junit" ,java-junit)
11791 ("hamcrest" ,java-hamcrest-core)))
11792 (home-page "https://github.com/FasterXML/jackson-core")
11793 (synopsis "Low-level streaming parser and generator abstractions")
11794 (description "This package contains core low-level incremental
11795(streaming) parser and generator abstractions used by the Jackson Data
11796Processor. It also includes the default implementation of handler types
11797(parser, generator) that handle JSON format.")
11798 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11799
11800(define-public java-fasterxml-jackson-databind
11801 (package
11802 (name "java-fasterxml-jackson-databind")
11803 (version "2.9.4")
11804 (source (origin
11805 (method url-fetch)
11806 (uri (string-append "https://github.com/FasterXML/"
11807 "jackson-databind/archive/"
11808 "jackson-databind-" version ".tar.gz"))
11809 (sha256
11810 (base32
11811 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
11812 (build-system ant-build-system)
11813 (arguments
11814 `(#:jar-name "jackson-databind.jar"
11815 #:source-dir "src/main/java"
11816 #:tests? #f; requires javax.measures for which I can't find a free implementation
11817 #:phases
11818 (modify-phases %standard-phases
11819 (add-before 'configure 'generate-PackageVersion.java
11820 (lambda _
11821 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
11822 (in (string-append out ".in")))
11823 (copy-file in out)
11824 (substitute* out
11825 (("@package@") "com.fasterxml.jackson.databind.cfg")
11826 (("@projectversion@") ,version)
11827 (("@projectgroupid@") "com.fasterxml.jackson.databind")
11828 (("@projectartifactid@") "jackson-databind")))
11829 #t))
11830 (add-before 'build 'copy-resources
11831 (lambda _
11832 (copy-recursively "src/main/resources" "build/classes")
11833 #t)))))
11834 (inputs
11835 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
11836 (home-page "https://github.com/FasterXML/jackson-databind")
11837 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
11838 (description "This package contains the general-purpose data-binding
11839functionality and tree-model for Jackson Data Processor. It builds on core
11840streaming parser/generator package, and uses Jackson Annotations for
11841configuration.")
11842 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11843
11844(define-public java-fasterxml-jackson-modules-base-jaxb
11845 (package
11846 (name "java-fasterxml-jackson-modules-base-jaxb")
11847 (version "2.9.4")
11848 (source (origin
11849 (method url-fetch)
11850 (uri (string-append "https://github.com/FasterXML/"
11851 "jackson-modules-base/archive/"
11852 "jackson-modules-base-" version ".tar.gz"))
11853 (sha256
11854 (base32
11855 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
11856 (build-system ant-build-system)
11857 (arguments
11858 `(#:jar-name "jackson-modules-base-jaxb.jar"
11859 #:source-dir "jaxb/src/main/java"
11860 #:test-dir "jaxb/src/test"
11861 #:test-exclude
11862 ;; Base class for tests
11863 (list "**/BaseJaxbTest.java")
11864 #:phases
11865 (modify-phases %standard-phases
11866 (add-before 'configure 'generate-PackageVersion.java
11867 (lambda _
11868 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
11869 "jackson/module/jaxb/PackageVersion.java"))
11870 (in (string-append out ".in")))
11871 (copy-file in out)
11872 (substitute* out
11873 (("@package@") "com.fasterxml.jackson.module.jaxb")
11874 (("@projectversion@") ,version)
11875 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
11876 (("@projectartifactid@") "jackson-module-jaxb")))
11877 #t))
11878 (add-before 'build 'copy-resources
11879 (lambda _
11880 (copy-recursively "jaxb/src/main/resources" "build/classes")
11881 #t)))))
11882 (inputs
11883 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
11884 java-fasterxml-jackson-databind))
11885 (native-inputs
11886 (list java-junit))
11887 (home-page "https://github.com/FasterXML/jackson-modules-base")
11888 (synopsis "Jaxb annotations jackson module")
11889 (description "This package is the jaxb annotations module for jackson.")
11890 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11891
11892(define-public java-fasterxml-jackson-modules-base-mrbean
11893 (package
11894 (name "java-fasterxml-jackson-modules-base-mrbean")
11895 (version "2.9.4")
11896 (source (origin
11897 (method url-fetch)
11898 (uri (string-append "https://github.com/FasterXML/"
11899 "jackson-modules-base/archive/"
11900 "jackson-modules-base-" version ".tar.gz"))
11901 (sha256
11902 (base32
11903 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
11904 (build-system ant-build-system)
11905 (arguments
11906 `(#:jar-name "jackson-modules-base-mrbean.jar"
11907 #:source-dir "mrbean/src/main/java"
11908 #:test-dir "mrbean/src/test"
11909 #:test-exclude
11910 ;; Base class for tests
11911 (list "**/BaseTest.java")
11912 #:phases
11913 (modify-phases %standard-phases
11914 (add-before 'configure 'generate-PackageVersion.java
11915 (lambda _
11916 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
11917 "jackson/module/mrbean/PackageVersion.java"))
11918 (in (string-append out ".in")))
11919 (copy-file in out)
11920 (substitute* out
11921 (("@package@") "com.fasterxml.jackson.module.mrbean")
11922 (("@projectversion@") ,version)
11923 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
11924 (("@projectartifactid@") "jackson-module-mrbean")))
11925 #t)))))
11926 (inputs
11927 (list java-asm java-fasterxml-jackson-annotations
11928 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
11929 (native-inputs
11930 (list java-junit))
11931 (home-page "https://github.com/FasterXML/jackson-modules-base")
11932 (synopsis "POJO type materialization for Java")
11933 (description "This package implements POJO type materialization.
11934Databinders can construct implementation classes for Java interfaces as part
11935of deserialization.")
11936 (license license:asl2.0)))
11937
11938(define-public java-snakeyaml
11939 (package
11940 (name "java-snakeyaml")
11941 (version "1.18")
11942 (source (origin
11943 (method url-fetch)
11944 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
11945 version ".tar.gz"))
11946 (file-name (string-append name "-" version ".tar.gz"))
11947 (sha256
11948 (base32
11949 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
11950 (build-system ant-build-system)
11951 (arguments
11952 `(#:jar-name "java-snakeyaml.jar"
11953 #:source-dir "src/main/java"
11954 ;; Tests require velocity, a cyclic dependency, and
11955 ;; java-spring-framework-context which is not packaged.
11956 #:tests? #f))
11957 (home-page "https://bitbucket.org/asomov/snakeyaml")
11958 (synopsis "YAML processor")
11959 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
11960 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11961
11962(define-public java-fasterxml-jackson-dataformat-yaml
11963 (package
11964 (name "java-fasterxml-jackson-dataformat-yaml")
11965 (version "2.9.4")
11966 (source (origin
11967 (method url-fetch)
11968 (uri (string-append "https://github.com/FasterXML/"
11969 "jackson-dataformats-text/archive/"
11970 "jackson-dataformats-text-" version ".tar.gz"))
11971 (sha256
11972 (base32
11973 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
11974 (build-system ant-build-system)
11975 (arguments
11976 `(#:jar-name "jackson-dataformat-yaml.jar"
11977 #:source-dir "yaml/src/main/java"
11978 #:test-dir "yaml/src/test"
11979 #:test-exclude (list "**/failing/**.java")
11980 #:phases
11981 (modify-phases %standard-phases
11982 (add-before 'configure 'generate-PackageVersion.java
11983 (lambda _
11984 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
11985 (in (string-append out ".in")))
11986 (copy-file in out)
11987 (substitute* out
11988 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
11989 (("@projectversion@") ,version)
11990 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
11991 (("@projectartifactid@") "jackson-dataformat-yaml")))
11992 #t)))))
11993 (inputs
11994 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
11995 java-fasterxml-jackson-databind java-snakeyaml))
11996 (native-inputs
11997 `(("junit" ,java-junit)
11998 ("hamcrest" ,java-hamcrest-core)
11999 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
12000 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
12001 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
12002 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
12003 (synopsis "Yaml backend for Jackson")
12004 (description "Dataformat backends are used to support format alternatives
12005to JSON, supported by default. This is done by sub-classing Jackson core
12006abstractions.")
12007 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
12008
12009(define-public java-stax2-api
12010 (package
12011 (name "java-stax2-api")
12012 (version "4.0.0")
12013 (source (origin
12014 (method url-fetch)
12015 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
12016 "stax2-api-" version ".tar.gz"))
12017 (sha256
12018 (base32
12019 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
12020 (build-system ant-build-system)
12021 (arguments
12022 `(#:jar-name "java-stax2-api.jar"
12023 #:source-dir "src/main/java"
12024 #:tests? #f)); no tests
12025 (home-page "https://github.com/FasterXML/stax2-api")
12026 (synopsis "Stax2 API")
12027 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
12028significant new functionalities, such as full-featured bi-direction validation
12029interface and high-performance Typed Access API.")
12030 (license license:bsd-2)))
12031
12032(define-public java-woodstox-core
12033 (package
12034 (name "java-woodstox-core")
12035 (version "5.0.3")
12036 (source (origin
12037 (method git-fetch)
12038 (uri (git-reference
12039 (url "https://github.com/FasterXML/woodstox")
12040 (commit (string-append "woodstox-core-" version))))
12041 (file-name (git-file-name name version))
12042 (sha256
12043 (base32
12044 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
12045 (build-system ant-build-system)
12046 (arguments
12047 `(#:jar-name "woodstox.jar"
12048 #:test-exclude
12049 (list "**/Base*.java" "failing/**")
12050 #:phases
12051 (modify-phases %standard-phases
12052 (add-before 'build 'remove-msv-dep
12053 (lambda _
12054 ;; we don't need osgi, and it depends on msv
12055 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
12056 ;; msv's latest release is from 2011 and we don't need it
12057 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
12058 (delete-file-recursively "src/test/java/wstxtest/osgi")
12059 (delete-file-recursively "src/test/java/wstxtest/msv")
12060 #t))
12061 (add-before 'build 'copy-resources
12062 (lambda _
12063 (copy-recursively "src/main/resources" "build/classes")
12064 #t)))))
12065 (inputs
12066 `(("stax2" ,java-stax2-api)))
12067 (native-inputs
12068 `(("junit" ,java-junit)))
12069 (home-page "https://github.com/FasterXML/woodstox")
12070 (synopsis "Stax XML API implementation")
12071 (description "Woodstox is a stax XML API implementation.")
12072 (license license:asl2.0)))
12073
12074(define-public java-fasterxml-jackson-dataformat-xml
12075 (package
12076 (name "java-fasterxml-jackson-dataformat-xml")
12077 (version "2.9.4")
12078 (source (origin
12079 (method git-fetch)
12080 (uri (git-reference
12081 (url "https://github.com/FasterXML/jackson-dataformat-xml")
12082 (commit (string-append "jackson-dataformat-xml-" version))))
12083 (file-name (git-file-name name version))
12084 (sha256
12085 (base32
12086 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
12087 (build-system ant-build-system)
12088 (arguments
12089 `(#:jar-name "jackson-dataformat-xml.jar"
12090 #:source-dir "src/main/java"
12091 #:test-exclude
12092 (list "**/failing/**")
12093 #:phases
12094 (modify-phases %standard-phases
12095 (add-before 'configure 'generate-PackageVersion.java
12096 (lambda _
12097 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
12098 (in (string-append out ".in")))
12099 (copy-file in out)
12100 (newline)
12101 (substitute* out
12102 (("@package@") "com.fasterxml.jackson.dataformat.xml")
12103 (("@projectversion@") ,version)
12104 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
12105 (("@projectartifactid@") "jackson-dataformat-xml")))
12106 #t))
12107 (add-before 'build 'copy-resources
12108 (lambda _
12109 (copy-recursively "src/main/resources" "build/classes")
12110 #t)))))
12111 (inputs
12112 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
12113 ("jackson-core" ,java-fasterxml-jackson-core)
12114 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
12115 ("jackson-databind" ,java-fasterxml-jackson-databind)
12116 ("stax2-api" ,java-stax2-api)
12117 ("woodstox" ,java-woodstox-core)))
12118 (native-inputs
12119 `(("junit" ,java-junit)
12120 ("hamcrest" ,java-hamcrest-core)))
12121 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
12122 (synopsis "Read and write XML")
12123 (description "This package contains Jackson extension component for reading
12124and writing XML encoded data.
12125
12126Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
12127approach (that is, no support is added for \"Schema-first\" approach). Support
12128for JAXB annotations is provided by JAXB annotation module; this module
12129provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
12130@code{JsonFactory}) as well as small number of higher level overrides needed to
12131make data-binding work.")
12132 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
12133
12134(define-public java-hdrhistogram
12135 (package
12136 (name "java-hdrhistogram")
12137 (version "2.1.9")
12138 (source (origin
12139 (method git-fetch)
12140 (uri (git-reference
12141 (url "https://github.com/HdrHistogram/HdrHistogram")
12142 (commit (string-append "HdrHistogram-" version))))
12143 (file-name (git-file-name name version))
12144 (sha256
12145 (base32
12146 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
12147 (build-system ant-build-system)
12148 (arguments
12149 `(#:jar-name "java-hdrhistogram.jar"
12150 #:source-dir "src/main/java"
12151 #:phases
12152 (modify-phases %standard-phases
12153 (add-after 'unpack 'make-files-writable
12154 (lambda _
12155 (for-each make-file-writable (find-files "."))
12156 #t))
12157 (add-before 'configure 'set-version
12158 (lambda _
12159 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
12160 (template (string-append version-java ".template")))
12161 (copy-file template version-java)
12162 (substitute* version-java
12163 (("\\$VERSION\\$") ,version)
12164 (("\\$BUILD_TIME\\$") "0"))
12165 #t))))))
12166 (native-inputs
12167 `(("junit" ,java-junit)
12168 ("hamcrest" ,java-hamcrest-core)))
12169 (home-page "https://hdrhistogram.github.io/HdrHistogram")
12170 (synopsis "High dynamic range histogram")
12171 (description "Hdrhistogram creates histograms that support
12172recording and analyzing sampled data value counts across a configurable integer
12173value range with configurable value precision within the range. Value precision
12174is expressed as the number of significant digits in the value recording, and
12175provides control over value quantization behavior across the value range and
12176the subsequent value resolution at any given level.")
12177 (license license:public-domain)))
12178
12179(define-public java-cofoja
12180 (package
12181 (name "java-cofoja")
12182 (version "1.3")
12183 (source (origin
12184 (method git-fetch)
12185 (uri (git-reference
12186 (url "https://github.com/nhatminhle/cofoja")
12187 (commit (string-append "v" version))))
12188 (file-name (string-append "java-cofoja-" version "-checkout"))
12189 (sha256
12190 (base32
12191 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
12192 (build-system ant-build-system)
12193 (arguments
12194 `(#:build-target "dist"
12195 #:test-target "test"
12196 #:jdk ,icedtea-8
12197 #:make-flags
12198 (list "-Ddist.dir=dist")
12199 #:modules ((guix build ant-build-system)
12200 (guix build java-utils)
12201 (guix build utils)
12202 (srfi srfi-1)
12203 (ice-9 match))
12204 #:phases
12205 (modify-phases %standard-phases
12206 ;; The bulid system ignores the class path the ant-build-system sets
12207 ;; up and instead expects to find all dependencies in the "lib"
12208 ;; directory.
12209 (add-after 'unpack 'create-libdir
12210 (lambda* (#:key inputs #:allow-other-keys)
12211 (mkdir-p "lib")
12212 (for-each
12213 (lambda (file)
12214 (let ((target (string-append "lib/" (basename file))))
12215 (unless (file-exists? target)
12216 (symlink file target))))
12217 (append-map (match-lambda
12218 ((label . dir)
12219 (find-files dir "\\.jar$")))
12220 inputs))
12221 #t))
12222 (replace 'install (install-jars "dist")))))
12223 (inputs
12224 (list java-asm))
12225 (native-inputs
12226 (list java-junit))
12227 (home-page "https://github.com/nhatminhle/cofoja")
12228 (synopsis "Contracts for Java")
12229 (description "Contracts for Java, or Cofoja for short, is a contract
12230programming framework and test tool for Java, which uses annotation processing
12231and bytecode instrumentation to provide run-time checking. (In particular,
12232this is not a static analysis tool.)")
12233 (license license:lgpl3+)))
12234
12235(define-public java-aopalliance
12236 (package
12237 (name "java-aopalliance")
12238 (version "1.0")
12239 (source (origin
12240 (method git-fetch)
12241 ;; Note: this git repository is not official, but contains the
12242 ;; source code that is in the CVS repository. Downloading the
12243 ;; tarball from sourceforge is undeterministic, and the cvs download
12244 ;; fails.
12245 (uri (git-reference
12246 (url "https://github.com/hoverruan/aopalliance")
12247 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
12248 (file-name (string-append name "-" version))
12249 (sha256
12250 (base32
12251 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
12252 (build-system ant-build-system)
12253 (arguments
12254 `(#:jar-name "java-aopalliance.jar"
12255 #:jdk ,icedtea-8
12256 #:tests? #f; no tests
12257 #:source-dir "aopalliance/src/main"
12258 #:phases
12259 (modify-phases %standard-phases
12260 (add-before 'install 'create-pom
12261 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
12262 (replace 'install
12263 (install-from-pom "pom.xml")))))
12264 (home-page "https://aopalliance.sourceforge.net")
12265 (synopsis "Aspect-Oriented Programming")
12266 (description "The AOP Alliance project is a joint project between several
12267software engineering people who are interested in Aspect-Oriented Programming
12268(AOP) and Java.")
12269 (license license:public-domain)))
12270
12271(define-public java-javax-inject
12272 (package
12273 (name "java-javax-inject")
12274 (version "1")
12275 (source (origin
12276 (method git-fetch)
12277 (uri (git-reference
12278 (url "https://github.com/javax-inject/javax-inject")
12279 (commit version)))
12280 (file-name (git-file-name name version))
12281 (sha256
12282 (base32
12283 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
12284 (build-system ant-build-system)
12285 (arguments
12286 `(#:jar-name "java-javax-inject.jar"
12287 #:tests? #f; no tests
12288 #:phases
12289 (modify-phases %standard-phases
12290 (replace 'install
12291 (install-from-pom "pom.xml")))))
12292 (home-page "https://github.com/javax-inject/javax-inject")
12293 (synopsis "JSR-330: Dependency Injection for Java")
12294 (description "This package specifies a means for obtaining objects in such
12295a way as to maximize reusability, testability and maintainability compared to
12296traditional approaches such as constructors, factories, and service locators
12297(e.g., JNDI). This process, known as dependency injection, is beneficial to
12298most nontrivial applications.
12299
12300Many types depend on other types. For example, a @var{Stopwatch} might depend
12301on a @var{TimeSource}. The types on which a type depends are known as its
12302dependencies. The process of finding an instance of a dependency to use at run
12303time is known as resolving the dependency. If no such instance can be found,
12304the dependency is said to be unsatisfied, and the application is broken.")
12305 (license license:asl2.0)))
12306
12307(define-public java-guice
12308 (package
12309 (name "java-guice")
12310 (version "4.1")
12311 (source (origin
12312 (method git-fetch)
12313 (uri (git-reference
12314 (url "https://github.com/google/guice")
12315 (commit version)))
12316 (file-name (git-file-name name version))
12317 (modules '((guix build utils)))
12318 (snippet
12319 `(begin
12320 (for-each delete-file (find-files "." ".*.jar")) #t))
12321 (sha256
12322 (base32
12323 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
12324 (build-system ant-build-system)
12325 (arguments
12326 `(#:jar-name "java-guice.jar"
12327 #:jdk ,icedtea-8
12328 #:tests? #f; FIXME: tests are not in a java sub directory
12329 #:source-dir "core/src"
12330 #:phases
12331 (modify-phases %standard-phases
12332 (add-after 'unpack 'make-files-writable
12333 (lambda _
12334 (for-each make-file-writable (find-files "."))
12335 #t))
12336 (replace 'install
12337 (install-from-pom "core/pom.xml")))))
12338 (propagated-inputs
12339 (list java-aopalliance
12340 java-cglib
12341 java-guava
12342 java-javax-inject
12343 java-guice-parent-pom))
12344 (home-page "https://github.com/google/guice")
12345 (synopsis "Lightweight dependency injection framework")
12346 (description "Guice is a lightweight dependency injection framework for
12347Java 6 and above.")
12348 (license license:asl2.0)))
12349
12350(define-public java-guice-servlet
12351 (package
12352 (inherit java-guice)
12353 (name "java-guice-servlet")
12354 (arguments
12355 `(#:jar-name "guice-servlet.jar"
12356 #:source-dir "extensions/servlet/src/"
12357 #:jdk ,icedtea-8
12358 #:tests? #f ; FIXME: not in a java subdir
12359 #:phases
12360 (modify-phases %standard-phases
12361 (add-after 'unpack 'make-files-writable
12362 (lambda _
12363 (for-each make-file-writable (find-files "."))
12364 #t)))))
12365 (inputs
12366 `(("guice" ,java-guice)
12367 ("servlet" ,java-classpathx-servletapi)
12368 ,@(package-inputs java-guice)))))
12369
12370(define java-guice-parent-pom
12371 (package
12372 (inherit java-guice)
12373 (name "java-guice-parent-pom")
12374 (arguments
12375 `(#:tests? #f
12376 #:phases
12377 (modify-phases %standard-phases
12378 (delete 'configure)
12379 (delete 'build)
12380 (add-after 'install 'install-extensions
12381 (install-pom-file "extensions/pom.xml"))
12382 (replace 'install
12383 (install-pom-file "pom.xml")))))
12384 (propagated-inputs
12385 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
12386
12387(define java-google-parent-pom-5
12388 (package
12389 (name "java-google-parent-pom")
12390 (version "5")
12391 (source (origin
12392 (method git-fetch)
12393 (uri (git-reference
12394 (url "https://github.com/google/google-maven-parents")
12395 (commit (string-append "google-" version))))
12396 (file-name (git-file-name name version))
12397 (sha256
12398 (base32
12399 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
12400 (build-system ant-build-system)
12401 (arguments
12402 `(#:tests? #f
12403 #:phases
12404 (modify-phases %standard-phases
12405 (delete 'configure)
12406 (delete 'build)
12407 (replace 'install
12408 (install-pom-file "pom.xml")))))
12409 (home-page "https://github.com/google/google-maven-parents")
12410 (synopsis "Google parent pom")
12411 (description "This package contains the Maven parent POM for other Google
12412Java projects.")
12413 (license license:asl2.0)))
12414
12415(define java-guice-parent-pom-5
12416 (package
12417 (inherit java-guice)
12418 (name "java-guice-parent-pom")
12419 (version "5.1.0")
12420 (source (origin
12421 (method git-fetch)
12422 (uri (git-reference
12423 (url "https://github.com/google/guice")
12424 (commit version)))
12425 (file-name (git-file-name name version))
12426 (sha256
12427 (base32
12428 "05w8g9lmj8623b6f6c2xyriyhf44vwvqg0i1dszhrsnhk5f1jv71"))))
12429 (arguments
12430 `(#:tests? #f
12431 #:phases
12432 (modify-phases %standard-phases
12433 (delete 'configure)
12434 (delete 'build)
12435 (add-after 'install 'install-extensions
12436 (install-pom-file "extensions/pom.xml"))
12437 (replace 'install
12438 (install-pom-file "pom.xml")))))
12439 (propagated-inputs
12440 (list java-google-parent-pom-5))))
12441
12442(define-public java-guice-5
12443 (package
12444 (inherit java-guice-parent-pom-5)
12445 (name "java-guice")
12446 (arguments
12447 `(#:jar-name "java-guice.jar"
12448 #:tests? #f ; FIXME: tests are not in a java sub directory
12449 #:source-dir "core/src"
12450 #:phases
12451 (modify-phases %standard-phases
12452 (replace 'install
12453 (install-from-pom "core/pom.xml")))))
12454 (inputs
12455 (list java-jsr305
12456 java-error-prone-annotations))
12457 (propagated-inputs
12458 (list java-aopalliance
12459 java-asm-9
12460 java-guava
12461 java-javax-inject
12462 java-guice-parent-pom-5))))
12463
12464(define-public java-assertj
12465 (package
12466 (name "java-assertj")
12467 (version "3.8.0")
12468 (source (origin
12469 (method git-fetch)
12470 (uri (git-reference
12471 (url "https://github.com/joel-costigliola/assertj-core")
12472 (commit (string-append "assertj-core-" version))))
12473 (file-name (git-file-name name version))
12474 (sha256
12475 (base32
12476 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
12477 (build-system ant-build-system)
12478 (arguments
12479 `(#:jar-name "java-assertj.jar"
12480 #:jdk ,icedtea-8
12481 #:source-dir "src/main/java"
12482 #:tests? #f)); depends on tng-junit which depends on assertj
12483 (inputs
12484 `(("cglib" ,java-cglib)
12485 ("junit" ,java-junit)
12486 ("hamcrest" ,java-hamcrest-core)))
12487 (native-inputs
12488 `(("mockito" ,java-mockito-1)))
12489 (home-page "https://joel-costigliola.github.io/assertj/index.html")
12490 (synopsis "Fluent assertions for java")
12491 (description "AssertJ core is a Java library that provides a fluent
12492interface for writing assertions. Its main goal is to improve test code
12493readability and make maintenance of tests easier.")
12494 (license license:asl2.0)))
12495
12496(define-public java-jboss-javassist
12497 (package
12498 (name "java-jboss-javassist")
12499 (version "3.21.0")
12500 (source (origin
12501 (method git-fetch)
12502 (uri (git-reference
12503 (url "https://github.com/jboss-javassist/javassist")
12504 (commit
12505 (string-append "rel_"
12506 (string-map
12507 (lambda (x) (if (eq? x #\.) #\_ x)) version)
12508 "_ga"))))
12509 (file-name (git-file-name name version))
12510 (sha256
12511 (base32
12512 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
12513 (modules '((guix build utils)))
12514 (snippet
12515 '(begin
12516 (delete-file "javassist.jar")))))
12517 (build-system ant-build-system)
12518 (arguments
12519 `(#:jar-name "java-jboss-javassist.jar"
12520 #:jdk ,icedtea-8
12521 #:source-dir "src/main"
12522 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
12523 #:phases
12524 (modify-phases %standard-phases
12525 (add-after 'unpack 'make-files-writable
12526 (lambda _
12527 (for-each make-file-writable (find-files "."))
12528 #t)))))
12529 (native-inputs
12530 `(("junit" ,java-junit)))
12531 (home-page "https://github.com/jboss-javassist/javassist")
12532 (synopsis "Java bytecode engineering toolkit")
12533 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
12534manipulation simple. It is a class library for editing bytecodes in Java; it
12535enables Java programs to define a new class at runtime and to modify a class
12536file when the JVM loads it.")
12537 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
12538
12539(define-public java-jcommander
12540 (package
12541 (name "java-jcommander")
12542 (version "1.71")
12543 (source (origin
12544 (method git-fetch)
12545 (uri (git-reference
12546 (url "https://github.com/cbeust/jcommander")
12547 (commit version)))
12548 (file-name (git-file-name name version))
12549 (sha256
12550 (base32
12551 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
12552 (build-system ant-build-system)
12553 (arguments
12554 `(#:jar-name "java-jcommander.jar"
12555 #:jdk ,icedtea-8
12556 #:tests? #f; requires testng which depends on jcommander
12557 #:source-dir "src/main/java"))
12558 (home-page "https://jcommander.org")
12559 (synopsis "Command line parameters parser")
12560 (description "JCommander is a very small Java framework that makes it
12561trivial to parse command line parameters. Parameters are declared with
12562annotations.")
12563 (license license:asl2.0)))
12564
12565(define-public java-bsh
12566 (package
12567 (name "java-bsh")
12568 (version "2.1.1")
12569 (source (origin
12570 (method git-fetch)
12571 (uri (git-reference
12572 (url "https://github.com/beanshell/beanshell")
12573 (commit version)))
12574 (file-name (git-file-name name version))
12575 (sha256
12576 (base32
12577 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
12578 (modules '((guix build utils)))
12579 (snippet
12580 '(begin
12581 ;; Delete bundled third-party jar archives.
12582 (for-each delete-file (find-files "." ".*.jar$"))
12583 (for-each (lambda (file) (chmod file #o644))
12584 (find-files "." "."))
12585 #t))))
12586 (build-system ant-build-system)
12587 (arguments
12588 `(#:build-target "jarall"
12589 #:test-target "junit-tests-all"
12590 #:make-flags (list "-DDATE" "(no date for reproducibility)")
12591 #:phases
12592 (modify-phases %standard-phases
12593 (add-before 'check 'fix-test
12594 (lambda _
12595 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
12596 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
12597 (replace 'install
12598 (install-from-pom "pom.xml")))))
12599 (inputs
12600 (list java-classpathx-servletapi java-commons-bsf))
12601 (native-inputs
12602 (list java-junit javacc-3))
12603 (home-page "http://beanshell.org/")
12604 (synopsis "Lightweight Scripting for Java")
12605 (description "BeanShell is a small, free, embeddable Java source
12606interpreter with object scripting language features, written in Java.
12607BeanShell dynamically executes standard Java syntax and extends it with common
12608scripting conveniences such as loose types, commands, and method closures like
12609those in Perl and JavaScript.")
12610 (license license:asl2.0)))
12611
12612(define-public java-fest-util
12613 (package
12614 (name "java-fest-util")
12615 (version "1.2.5")
12616 (source (origin
12617 (method git-fetch)
12618 (uri (git-reference
12619 (url "https://github.com/alexruiz/fest-util/")
12620 (commit (string-append "fest-util-" version))))
12621 (file-name (git-file-name name version))
12622 (sha256
12623 (base32
12624 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
12625 (build-system ant-build-system)
12626 (arguments
12627 `(#:jar-name "java-fest-util.jar"
12628 #:source-dir "src/main/java"))
12629 (native-inputs
12630 `(("junit" ,java-junit)
12631 ("hamcrest" ,java-hamcrest-core)))
12632 (home-page "https://github.com/alexruiz/fest-util")
12633 (synopsis "FEST common utilities")
12634 (description "Common utilities used in all FEST module.")
12635 (license license:asl2.0)))
12636
12637(define-public java-fest-test
12638 (package
12639 (name "java-fest-test")
12640 (version "2.1.0")
12641 (source (origin
12642 (method git-fetch)
12643 (uri (git-reference
12644 (url "https://github.com/alexruiz/fest-test/")
12645 (commit (string-append "fest-test-" version))))
12646 (file-name (git-file-name name version))
12647 (sha256
12648 (base32
12649 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
12650 (build-system ant-build-system)
12651 (arguments
12652 `(#:jar-name "java-fest-test.jar"
12653 #:source-dir "src/main/java"
12654 #:tests? #f)); no tests
12655 (inputs
12656 `(("junit" ,java-junit)))
12657 (home-page "https://github.com/alexruiz/fest-test")
12658 (synopsis "Common FEST testing infrastructure")
12659 (description "Fest-test contains the common FEST testing infrastructure.")
12660 (license license:asl2.0)))
12661
12662(define-public java-fest-assert
12663 (package
12664 (name "java-fest-assert")
12665 (version "2.0M10")
12666 (source (origin
12667 (method git-fetch)
12668 (uri (git-reference
12669 (url "https://github.com/alexruiz/fest-assert-2.x/")
12670 (commit (string-append "fest-assert-core-" version))))
12671 (file-name (git-file-name name version))
12672 (sha256
12673 (base32
12674 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
12675 (build-system ant-build-system)
12676 (arguments
12677 `(#:jar-name "java-fest-assert.jar"
12678 #:source-dir "src/main/java"
12679 #:test-exclude
12680 (list
12681 "**/Abstract*.java"
12682 "**/*BaseTest.java"
12683 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
12684 "**/MessageFormatter_format_Test.java"
12685 "**/internal/*/*_assert*_Test.java")))
12686 (inputs
12687 (list java-fest-util))
12688 (native-inputs
12689 (list java-junit
12690 java-fest-test
12691 java-hamcrest-core
12692 java-mockito-1
12693 java-cglib
12694 java-objenesis))
12695 (home-page "https://github.com/alexruiz/fest-assert-2.x")
12696 (synopsis "FEST fluent assertions")
12697 (description "FEST-Assert provides a fluent interface for assertions.")
12698 (license license:asl2.0)))
12699
12700(define-public java-testng
12701 (package
12702 (name "java-testng")
12703 (version "6.14.3")
12704 (source (origin
12705 (method git-fetch)
12706 (uri (git-reference
12707 (url "https://github.com/cbeust/testng")
12708 (commit version)))
12709 (file-name (string-append name "-" version "-checkout"))
12710 (sha256
12711 (base32
12712 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
12713 (build-system ant-build-system)
12714 (arguments
12715 (list
12716 #:jdk icedtea-8; java.util.function
12717 #:jar-name "java-testng.jar"
12718 #:source-dir "src/main/java"
12719 #:phases
12720 '(modify-phases %standard-phases
12721 (add-after 'unpack 'delete-failing-tests
12722 (lambda _
12723 ;; FIXME: I don't know why these tests fail
12724 (substitute* "src/test/resources/testng.xml"
12725 ;; expected:<[0]> but was:<[3]>
12726 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
12727 ;; expected [3] but found [2]
12728 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
12729 ;; This is a parallel test and we've observed that it fails
12730 ;; sometimes.
12731 (("<class name=\"test.dataprovider.DataProviderTest\"/>") "")
12732 ;; Another flaky parallel test: testParallelMode() fails
12733 ;; intermittently on assertions about which before/after
12734 ;; groups methods were run. This also drops
12735 ;; testInSequentialMode().
12736 (("<class name=\"test.beforegroups.BeforeGroupsTest\"/>") ""))))
12737 ;; We don't have groovy
12738 (add-after 'unpack 'delete-groovy-tests
12739 (lambda _
12740 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
12741 (substitute* "src/test/resources/testng.xml"
12742 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
12743 (add-before 'build 'copy-resources
12744 (lambda _
12745 (copy-recursively "src/main/resources" "build/classes")))
12746 (add-before 'check 'copy-test-resources
12747 (lambda _
12748 (copy-recursively "src/test/resources" "build/test-classes")))
12749 (replace 'check
12750 (lambda _
12751 (invoke "ant" "compile-tests")
12752 ;; we don't have groovy
12753 (substitute* "src/test/resources/testng.xml"
12754 (("<class name=\"test.groovy.GroovyTest\" />") ""))
12755 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12756 ":build/classes"
12757 ":build/test-classes")
12758 "-Dtest.resources.dir=src/test/resources"
12759 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
12760 (propagated-inputs
12761 (list java-junit
12762 java-jsr305
12763 java-bsh
12764 java-jcommander
12765 java-guice
12766 java-snakeyaml))
12767 (native-inputs
12768 (list java-guava
12769 java-javax-inject
12770 java-hamcrest-all
12771 java-assertj
12772 java-mockito-1
12773 java-cglib
12774 java-aopalliance))
12775 (home-page "https://testng.org")
12776 (synopsis "Testing framework")
12777 (description "TestNG is a testing framework inspired from JUnit and NUnit
12778but introducing some new functionalities that make it more powerful and easier
12779to use.")
12780 (license license:asl2.0)))
12781
12782(define-public java-jnacl
12783 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
12784 (revision "2"))
12785 (package
12786 (name "java-jnacl")
12787 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
12788 (source (origin
12789 (method git-fetch)
12790 (uri (git-reference
12791 (url "https://github.com/neilalexander/jnacl")
12792 (commit commit)))
12793 (file-name (git-file-name name version))
12794 (sha256
12795 (base32
12796 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
12797 (build-system ant-build-system)
12798 (arguments
12799 `(#:jar-name "jnacl.jar"
12800 #:source-dir "src/main/java"
12801 #:jdk ,icedtea-8
12802 #:phases
12803 (modify-phases %standard-phases
12804 (add-before 'build 'fix-tests
12805 (lambda _
12806 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
12807 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
12808 (("assertions.Assertions") "assertions.api.Assertions"))
12809 #t))
12810 (replace 'check
12811 (lambda _
12812 (invoke "ant" "compile-tests")
12813 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12814 ":build/classes"
12815 ":build/test-classes")
12816 "org.testng.TestNG" "-testclass"
12817 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
12818 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12819 ":build/classes"
12820 ":build/test-classes")
12821 "org.testng.TestNG" "-testclass"
12822 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
12823 (native-inputs
12824 (list java-testng java-fest-util java-fest-assert))
12825 (home-page "https://github.com/neilalexander/jnacl")
12826 (synopsis "Java implementation of NaCl")
12827 (description "Pure Java implementation of the NaCl: Networking and
12828Cryptography library.")
12829 (license license:bsd-2))))
12830
12831(define-public java-mvel2
12832 (package
12833 (name "java-mvel2")
12834 (version "2.3.1")
12835 (source (origin
12836 (method url-fetch)
12837 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
12838 version ".Final.tar.gz"))
12839 (sha256
12840 (base32
12841 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
12842 (build-system ant-build-system)
12843 (arguments
12844 `(#:jar-name "mvel2.jar"
12845 #:source-dir "src/main/java"
12846 #:test-exclude
12847 (list "**/Abstract*.java"
12848 ;; Base class with no tests
12849 "**/MVELThreadTest.java")
12850 #:phases
12851 (modify-phases %standard-phases
12852 (add-after 'install 'install-bin
12853 (lambda* (#:key outputs #:allow-other-keys)
12854 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
12855 (mkdir-p bin)
12856 (with-output-to-file (string-append bin "/mvel2")
12857 (lambda _
12858 (display
12859 (string-append
12860 "#!" (which "bash") "\n"
12861 "if [ \"$#\" -ne \"2\" ]; then\n"
12862 "echo 'Usage: mvel2 <script> <out.dir>'\n"
12863 "exit\n"
12864 "fi\n"
12865 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
12866 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
12867 " org.mvel2.sh.Main $1"))))
12868 (chmod (string-append bin "/mvel2") #o755))
12869 #t)))))
12870 (native-inputs
12871 `(("junit" ,java-junit)
12872 ("hamcrest" ,java-hamcrest-core)))
12873 (home-page "https://github.com/mvel/mvel")
12874 (synopsis "MVFLEX Expression Language")
12875 (description "MVEL has largely been inspired by Java syntax, but has some
12876fundamental differences aimed at making it more efficient as an expression
12877language, such as operators that directly support collection, array and string
12878matching, as well as regular expressions. MVEL is used to evaluate expressions
12879written using Java syntax.
12880
12881In addition to the expression language, MVEL serves as a templating language for
12882configuration and string construction.")
12883 (license license:asl2.0)))
12884
12885(define-public java-commons-jexl-2
12886 (package
12887 (name "java-commons-jexl")
12888 (version "2.1.1")
12889 (source (origin
12890 (method url-fetch)
12891 (uri (string-append "mirror://apache/commons/jexl/source/"
12892 "commons-jexl-" version "-src.tar.gz"))
12893 (sha256
12894 (base32
12895 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
12896 (build-system ant-build-system)
12897 (arguments
12898 `(#:jar-name "commons-jexl-2.jar"
12899 #:jdk ,icedtea-8
12900 #:source-dir "src/main/java"
12901 #:phases
12902 (modify-phases %standard-phases
12903 (add-before 'check 'disable-broken-tests
12904 (lambda* (#:key inputs #:allow-other-keys)
12905 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
12906 (substitute* "ArithmeticTest.java"
12907 (("asserter.assertExpression\\(\"3 / 0\"") "//")
12908 (("asserter.assertExpression\\(\"imanull") "//"))
12909 ;; This test fails with "ambiguous method invocation"
12910 (delete-file "CacheTest.java")
12911 ;; This test doesn't have access to the temp directory
12912 (substitute* "ClassCreatorTest.java"
12913 (("java.io.tmpdir") "user.dir"))
12914 ;; This test fails in trying to detect whether it can run.
12915 (substitute* "ClassCreator.java"
12916 (("boolean canRun =.*") "boolean canRun = false;\n"))
12917 ;; ...and these tests depend on it.
12918 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
12919 (delete-file "scripting/JexlScriptEngineTest.java"))
12920 #t))
12921 (add-before 'build 'run-javacc
12922 (lambda _
12923 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
12924 (invoke "java" "jjtree" "Parser.jjt")
12925 (invoke "java" "javacc" "Parser.jj"))
12926 #t)))))
12927 (inputs
12928 (list java-commons-logging-minimal))
12929 (native-inputs
12930 (list java-junit java-hamcrest-core javacc-4))
12931 (home-page "https://commons.apache.org/proper/commons-jexl/")
12932 (synopsis "Java Expression Language")
12933 (description "JEXL is a library intended to facilitate the implementation
12934of dynamic and scripting features in applications and frameworks written in
12935Java. JEXL implements an Expression Language based on some extensions to the
12936JSTL Expression Language supporting most of the constructs seen in
12937shell-script or ECMAScript. Its goal is to expose scripting features usable
12938by technical operatives or consultants working with enterprise platforms.")
12939 (license license:asl2.0)))
12940
12941(define-public java-lz4
12942 (package
12943 (name "java-lz4")
12944 (version "1.4.0")
12945 (source (origin
12946 (method git-fetch)
12947 (uri (git-reference
12948 (url "https://github.com/lz4/lz4-java")
12949 (commit version)))
12950 (file-name (git-file-name name version))
12951 (sha256
12952 (base32
12953 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
12954 (build-system ant-build-system)
12955 (arguments
12956 `(#:jar-name "lz4.jar"
12957 #:jdk ,icedtea-8
12958 #:source-dir "src/java:src/java-unsafe"
12959 #:tests? #f; FIXME: requires more dependencies
12960 #:phases
12961 (modify-phases %standard-phases
12962 (add-after 'unpack 'make-files-writable
12963 (lambda _
12964 (for-each make-file-writable (find-files "."))
12965 #t))
12966 (add-before 'configure 'generate-source
12967 (lambda _
12968 (with-directory-excursion "src/build/source_templates"
12969 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
12970 #t)))))
12971 (native-inputs
12972 `(("mvel" ,java-mvel2)))
12973 (home-page "https://jpountz.github.io/lz4-java")
12974 (synopsis "Compression algorithm")
12975 (description "LZ4 - Java is a Java port of the popular lz4 compression
12976algorithms and xxHash hashing algorithm.")
12977 (license license:asl2.0)))
12978
12979(define-public java-bouncycastle
12980 (package
12981 (name "java-bouncycastle")
12982 (version "1.67")
12983 (source (origin
12984 (method git-fetch)
12985 (uri (git-reference
12986 (url "http://git.bouncycastle.org/repositories/bc-java")
12987 ;(url "https://github.com/bcgit/bc-java")
12988 (commit (string-append "r1rv" (substring version 2 4)))))
12989 (file-name (git-file-name name version))
12990 (sha256
12991 (base32
12992 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
12993 (modules '((guix build utils)))
12994 (snippet
12995 '(begin
12996 (for-each delete-file
12997 (find-files "." "\\.jar$"))
12998 #t))))
12999 (build-system ant-build-system)
13000 (arguments
13001 `(#:jdk ,icedtea-8
13002 #:tests? #f
13003 #:phases
13004 (modify-phases %standard-phases
13005 (replace 'build
13006 (lambda _
13007 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
13008 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
13009 ;; FIXME: the tests freeze.
13010 ;; (replace 'check
13011 ;; (lambda _
13012 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
13013 (replace 'install
13014 (install-jars "build/artifacts/jdk1.5/jars")))))
13015 (inputs
13016 (list java-javax-mail))
13017 (native-inputs
13018 `(("unzip" ,unzip)
13019 ("junit" ,java-junit)
13020 ("java-native-access" ,java-native-access)
13021 ("java-native-access-platform" ,java-native-access-platform)))
13022 (home-page "https://www.bouncycastle.org")
13023 (synopsis "Cryptographic library")
13024 (description "Bouncy Castle is a cryptographic library for the Java
13025programming language.")
13026 (license license:expat)))
13027
13028(define-public java-jakarta-activation-1.2
13029 (package
13030 (name "java-jakarta-activation")
13031 (version "1.2.2")
13032 (source (origin
13033 (method git-fetch)
13034 (uri (git-reference
13035 (url "https://github.com/jakartaee/jaf-api")
13036 (commit version)))
13037 (file-name (git-file-name name version))
13038 (sha256
13039 (base32
13040 "13kkr0kj9wp45vpfackcbyycilzs5r3sj33px5pny1k4hq09cyar"))))
13041 (build-system ant-build-system)
13042 (arguments
13043 `(#:tests? #f
13044 #:jar-name "jakarta.activation.jar"
13045 #:jdk ,openjdk9
13046 #:source-dir "activation/src/main/java"
13047 #:phases
13048 (modify-phases %standard-phases
13049 ;; Install under javax.activation:activation coordinates
13050 ;; so consumers like javax.mail can find it. The source
13051 ;; pom uses com.sun.activation:jakarta.activation but that's
13052 ;; the new coordinate; most existing poms reference the
13053 ;; old javax.activation:activation.
13054 (add-before 'install 'create-pom
13055 (generate-pom.xml "pom.xml" "javax.activation"
13056 "activation" ,version))
13057 (replace 'install
13058 (install-from-pom "pom.xml")))))
13059 (home-page "https://jakarta.ee/specifications/activation/")
13060 (synopsis "Jakarta Activation API (javax.activation)")
13061 (description "Jakarta Activation provides the @code{javax.activation}
13062package, which was removed from the JDK in Java 11. This is the 1.2.x
13063transitional release that still uses the @code{javax.activation} namespace.")
13064 (license license:edl1.0)))
13065
13066(define-public java-bouncycastle-1.77
13067 (package
13068 (inherit java-bouncycastle)
13069 (version "1.77")
13070 (source (origin
13071 (method git-fetch)
13072 (uri (git-reference
13073 (url "https://github.com/bcgit/bc-java")
13074 (commit (string-append "r1rv" (substring version 2 4)))))
13075 (file-name (git-file-name "java-bouncycastle" version))
13076 (sha256
13077 (base32
13078 "1adxic0pgb7gv2yflw72np7zilj6rrhgjcj3xvnmidwp2pc887k1"))
13079 (modules '((guix build utils)))
13080 (snippet
13081 '(begin
13082 (for-each delete-file
13083 (find-files "." "\\.jar$"))
13084 #t))))
13085 (arguments
13086 `(#:jdk ,openjdk17
13087 #:tests? #f
13088 #:phases
13089 (modify-phases %standard-phases
13090 (replace 'build
13091 (lambda _
13092 (let ((suffix (string-append
13093 "-Drelease.suffix="
13094 ,(string-join (string-split version #\.) ""))))
13095 (mkdir-p "ant/docs")
13096 ;; Build individual targets. Can't use the 'build'
13097 ;; target because it includes 'build-test' which needs
13098 ;; the UnboundID LDAP SDK.
13099 (invoke "ant" "-f" "ant/jdk18+.xml" suffix
13100 "build-provider")
13101 ;; The remaining targets are only in bc+-build.xml.
13102 ;; Call it via ant's -f but pass properties that
13103 ;; jdk18+.xml normally sets.
13104 (let ((props (list suffix
13105 "-Dtarget.prefix=jdk18on"
13106 "-Djdk.name=jdk1.8"
13107 "-Dbc.javac.source=1.8"
13108 "-Dbc.javac.target=1.8"
13109 "-Dbuild.dir=build"
13110 "-Djavadoc.args=-breakiterator"
13111 (string-append "-Dsrc.dir="
13112 (getcwd) "/build/jdk1.8")
13113 (string-append "-Dartifacts.dir="
13114 (getcwd) "/build/artifacts/jdk1.8"))))
13115 (for-each
13116 (lambda (target)
13117 (apply invoke "ant" "-f" "ant/bc+-build.xml"
13118 (append props (list target))))
13119 '("build-util" "build-pkix" "build-pg" "build-mail"))))))
13120 (add-after 'build 'add-osgi-manifests
13121 (lambda _
13122 ;; The Maven Central jars have OSGi manifest attributes
13123 ;; from maven-bundle-plugin. Add them since we build
13124 ;; with ant.
13125 (for-each
13126 (lambda (name)
13127 (let ((jar (car (find-files "build/artifacts"
13128 (string-append name "-jdk18on.*\\.jar$")))))
13129 (call-with-output-file "osgi-manifest.mf"
13130 (lambda (port)
13131 (display (string-append
13132 "Bundle-ManifestVersion: 2\n"
13133 "Bundle-SymbolicName: " name "\n"
13134 "Bundle-Version: " ,version "\n")
13135 port)))
13136 (invoke "jar" "ufm" jar "osgi-manifest.mf")))
13137 '("bcprov" "bcutil" "bcpkix" "bcpg"))))
13138 (add-after 'add-osgi-manifests 'rename-jars
13139 (lambda _
13140 ;; Ant produces e.g. bcprov-jdk18on-177.jar but
13141 ;; install-from-pom expects bcprov-jdk18on-1.77.jar.
13142 (for-each
13143 (lambda (name)
13144 (let ((src (car (find-files "build/artifacts"
13145 (string-append name "-jdk18on-.*\\.jar$"))))
13146 (dest (string-append "build/artifacts/jdk1.8/jars/"
13147 name "-jdk18on-" ,version ".jar")))
13148 (unless (string=? src dest)
13149 (rename-file src dest))))
13150 '("bcprov" "bcutil" "bcpkix" "bcpg"))))
13151 (replace 'install
13152 (lambda* (#:key inputs outputs jar-name #:allow-other-keys)
13153 (for-each
13154 (lambda (name)
13155 (let ((pom-file (string-append name "-pom.xml"))
13156 (artifact (string-append name "-jdk18on")))
13157 ((generate-pom.xml pom-file "org.bouncycastle"
13158 artifact ,version))
13159 ((install-from-pom pom-file)
13160 #:inputs inputs #:outputs outputs
13161 #:jar-name (string-append artifact "-" ,version "\\.jar$"))))
13162 '("bcprov" "bcutil" "bcpkix" "bcpg")))))))
13163 (inputs
13164 (list java-jakarta-activation-1.2
13165 java-javax-mail))
13166 (description "Bouncy Castle is a cryptographic library for the Java
13167programming language. This is version 1.77 which has breaking API changes
13168compared to 1.67 (removed classes in ASN1, CMC, and other packages).")))
13169
13170(define-public java-eclipse-jdt-annotation-2
13171 (package
13172 (name "java-eclipse-jdt-annotation")
13173 (version "2.2.600")
13174 (source (origin
13175 (method url-fetch)
13176 (uri (string-append "https://repo1.maven.org/maven2/"
13177 "org/eclipse/jdt/org.eclipse.jdt.annotation/"
13178 version "/org.eclipse.jdt.annotation-"
13179 version "-sources.jar"))
13180 (sha256
13181 (base32
13182 "1jlq14ivhj32i7glfdmk068ya1spm4wfa9h8h2p326y0fkkzwyp9"))))
13183 (build-system ant-build-system)
13184 (arguments
13185 `(#:tests? #f
13186 #:jar-name "org.eclipse.jdt.annotation.jar"
13187 #:source-dir "."
13188 #:phases
13189 (modify-phases %standard-phases
13190 (add-before 'install 'create-pom
13191 (generate-pom.xml "pom.xml" "org.eclipse.jdt"
13192 "org.eclipse.jdt.annotation" ,version))
13193 (replace 'install (install-from-pom "pom.xml")))))
13194 (native-inputs (list unzip))
13195 (home-page "https://www.eclipse.org/jdt/")
13196 (synopsis "Eclipse JDT null analysis annotations")
13197 (description "This package provides the @code{@@NonNull}, @code{@@Nullable},
13198and @code{@@NonNullByDefault} annotations used by Eclipse JDT for null
13199analysis.")
13200 (license license:epl2.0)))
13201
13202(define-public java-kohlschutter-compiler-annotations-1
13203 (package
13204 (name "java-kohlschutter-compiler-annotations")
13205 (version "1.4.2")
13206 (source (origin
13207 (method url-fetch)
13208 (uri (string-append "https://repo1.maven.org/maven2/"
13209 "com/kohlschutter/compiler-annotations/"
13210 version "/compiler-annotations-"
13211 version "-sources.jar"))
13212 (sha256
13213 (base32
13214 "0fzmhr9binv1ah410955m95w6lwwidy9sw06yy5cjcrcjx7v0455"))))
13215 (build-system ant-build-system)
13216 (arguments
13217 `(#:tests? #f
13218 #:jar-name "compiler-annotations.jar"
13219 #:jdk ,openjdk9
13220 #:source-dir "."
13221 #:phases
13222 (modify-phases %standard-phases
13223 (add-before 'install 'create-pom
13224 (generate-pom.xml "pom.xml" "com.kohlschutter"
13225 "compiler-annotations" ,version))
13226 (replace 'install (install-from-pom "pom.xml")))))
13227 (inputs (list java-eclipse-jdt-annotation-2))
13228 (native-inputs (list unzip))
13229 (home-page "https://github.com/kohlschutter/compiler-annotations")
13230 (synopsis "Compile-time annotations for Java")
13231 (description "This package provides compile-time annotations such as
13232@code{@@SuppressFBWarnings} and @code{@@ExcludeFromCodeCoverageGeneratedReport}.")
13233 (license license:asl2.0)))
13234
13235(define junixsocket-source
13236 (origin
13237 (method git-fetch)
13238 (uri (git-reference
13239 (url "https://github.com/kohlschutter/junixsocket")
13240 (commit "junixsocket-parent-2.5.1")))
13241 (file-name (git-file-name "java-junixsocket" "2.5.1"))
13242 (sha256
13243 (base32
13244 "1zc84qbl2zsi9ch6b12crbiqlrkbrlw1z09kqlj04zrmck4k4pzn"))))
13245
13246(define-public java-junixsocket-common-2
13247 (package
13248 (name "java-junixsocket-common")
13249 (version "2.5.1")
13250 (source junixsocket-source)
13251 (build-system ant-build-system)
13252 (arguments
13253 `(#:jar-name "junixsocket-common.jar"
13254 #:source-dir "junixsocket-common/src/main/java"
13255 #:jdk ,openjdk9
13256 #:tests? #f
13257 #:phases
13258 (modify-phases %standard-phases
13259 (add-after 'unpack 'delete-module-info
13260 (lambda _
13261 ;; module-info.java requires modules not available in
13262 ;; our build (com.kohlschutter.annotations.compiletime,
13263 ;; org.eclipse.jdt.annotation). The classes compile
13264 ;; and work without JPMS metadata.
13265 (delete-file
13266 "junixsocket-common/src/main/java/module-info.java")))
13267 (replace 'install
13268 (install-from-pom "junixsocket-common/pom.xml")))))
13269 (inputs (list java-eclipse-jdt-annotation-2
13270 java-kohlschutter-compiler-annotations-1))
13271 (home-page "https://github.com/kohlschutter/junixsocket")
13272 (synopsis "Java library for Unix domain sockets")
13273 (description "junixsocket is a Java library for Unix domain sockets
13274(AF_UNIX) and other address/protocol families, providing a Java Socket API
13275compatible interface.")
13276 (license license:asl2.0)))
13277
13278(define-public java-junixsocket-native-common-2.5.1
13279 (package
13280 (name "java-junixsocket-native-common")
13281 (version "2.5.1")
13282 (source junixsocket-source)
13283 (build-system ant-build-system)
13284 (arguments
13285 (list
13286 #:tests? #f
13287 #:jdk openjdk9
13288 #:jar-name "junixsocket-native-common.jar"
13289 #:source-dir "junixsocket-native-common/src/main/java"
13290 #:phases
13291 #~(modify-phases %standard-phases
13292 (add-before 'build 'set-module-path
13293 (lambda* (#:key inputs #:allow-other-keys)
13294 ;; javac needs compiler-annotations on the module path
13295 ;; (not classpath) for JPMS 'requires static' resolution.
13296 (let ((mod-dir (assoc-ref inputs
13297 "java-kohlschutter-compiler-annotations")))
13298 (setenv "JDK_JAVAC_OPTIONS"
13299 (string-append "--module-path="
13300 (car (find-files mod-dir "\\.jar$")))))))
13301 (add-before 'build 'build-native
13302 (lambda* (#:key inputs #:allow-other-keys)
13303 (let ((jdk (assoc-ref inputs "jdk"))
13304 (c-dir "junixsocket-native/src/main/c"))
13305 ;; Fix GCC incompatibility: _Pragma inside expressions
13306 ;; is a Clang extension, not supported by GCC.
13307 (substitute* (string-append c-dir "/ckmacros.h")
13308 (("# define CK_IGNORE_CAST_BEGIN \\\\")
13309 "# define CK_IGNORE_CAST_BEGIN")
13310 (("# define CK_IGNORE_CAST_END \\\\")
13311 "# define CK_IGNORE_CAST_END")
13312 (("_Pragma\\(\"GCC diagnostic.*cast.*\"\\)") "")
13313 (("_Pragma\\(\"GCC diagnostic push\"\\)") "")
13314 (("_Pragma\\(\"GCC diagnostic pop\"\\)") ""))
13315 (let ((so-file (string-append
13316 "junixsocket-native-common/src/main/"
13317 "resources/lib/amd64-Linux-clang/jni/"
13318 "libjunixsocket-native-" #$version ".so")))
13319 (mkdir-p (dirname so-file))
13320 (apply invoke "gcc" "-shared" "-fPIC" "-O2"
13321 "-Wno-int-to-pointer-cast"
13322 "-Wno-pointer-to-int-cast"
13323 "-Wno-bad-function-cast"
13324 "-Wno-cast-function-type"
13325 "-Wno-stringop-overflow"
13326 (string-append "-I" c-dir)
13327 (string-append "-I" c-dir "/jni")
13328 (string-append "-I" jdk "/include")
13329 (string-append "-I" jdk "/include/linux")
13330 "-o" so-file
13331 (find-files c-dir "\\.c$"))))))
13332 (add-after 'build 'add-native-to-jar
13333 (lambda _
13334 (invoke "jar" "uf"
13335 "build/jar/junixsocket-native-common.jar"
13336 "-C" "junixsocket-native-common/src/main/resources"
13337 "lib")))
13338 ;; The source pom.xml lists pre-built native library
13339 ;; NARs for every platform. We build the native code
13340 ;; from source, so none of those dependencies apply.
13341 (add-before 'install 'create-pom
13342 (generate-pom.xml "pom.xml"
13343 "com.kohlschutter.junixsocket"
13344 "junixsocket-native-common" #$version))
13345 (replace 'install
13346 (install-from-pom "pom.xml")))))
13347 (native-inputs (list java-kohlschutter-compiler-annotations-1))
13348 (home-page "https://github.com/kohlschutter/junixsocket")
13349 (synopsis "Native JNI library for junixsocket")
13350 (description "This package provides the native JNI library for
13351junixsocket, built from source for Linux.")
13352 (license license:asl2.0)))
13353
13354(define-public java-lmax-disruptor
13355 (package
13356 (name "java-lmax-disruptor")
13357 (version "3.4.4")
13358 (source (origin
13359 (method git-fetch)
13360 (uri (git-reference
13361 (url "https://github.com/LMAX-Exchange/disruptor")
13362 (commit version)))
13363 (file-name (git-file-name name version))
13364 (sha256
13365 (base32
13366 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
13367 (build-system ant-build-system)
13368 (arguments
13369 `(#:jar-name "java-lmax-disruptor.jar"
13370 #:jdk ,icedtea-8
13371 #:tests? #f)); tests hang
13372 (inputs
13373 `(("junit" ,java-junit)
13374 ("java-hdrhistogram" ,java-hdrhistogram)
13375 ("java-jmock" ,java-jmock)
13376 ("java-jmock-legacy" ,java-jmock-legacy)
13377 ("java-jmock-junit4" ,java-jmock-junit4)
13378 ("java-hamcrest-all" ,java-hamcrest-all)))
13379 (native-inputs
13380 `(("cglib" ,java-cglib)
13381 ("objenesis" ,java-objenesis)))
13382 (home-page "https://www.lmax.com/disruptor")
13383 (synopsis "High performance inter-thread communication")
13384 (description "LMAX Disruptor is a software pattern and software component
13385for high performance inter-thread communication that avoids the need for
13386message queues or resource locking.")
13387 (license license:asl2.0)))
13388
13389(define-public java-conversant-disruptor
13390 (package
13391 (name "java-conversant-disruptor")
13392 (version "1.2.19")
13393 (source (origin
13394 (method git-fetch)
13395 (uri (git-reference
13396 (url "https://github.com/conversant/disruptor")
13397 (commit version)))
13398 (file-name (git-file-name name version))
13399 (sha256
13400 (base32
13401 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
13402 (build-system ant-build-system)
13403 (arguments
13404 `(#:jar-name "java-conversant-disruptor.jar"
13405 #:source-dir "src/main/java"
13406 #:phases
13407 (modify-phases %standard-phases
13408 (add-before 'build 'copy-resources
13409 (lambda _
13410 (copy-recursively "src/main/resources" "build/classes")))
13411 (add-before 'build 'remove-module
13412 (lambda _
13413 (delete-file "src/main/java/module-info.java"))))))
13414 (native-inputs
13415 (list java-junit))
13416 (home-page "https://github.com/conversant/disruptor")
13417 (synopsis "High performance intra-thread communication")
13418 (description "Conversant Disruptor is the highest performing intra-thread
13419transfer mechanism available in Java. Conversant Disruptor is an implementation
13420of this type of ring buffer that has almost no overhead and that exploits a
13421particularly simple design.")
13422 (license license:asl2.0)))
13423
13424(define-public java-jctools-core-1
13425 (package
13426 (name "java-jctools-core")
13427 (version "1.2.1")
13428 (source (origin
13429 (method git-fetch)
13430 (uri (git-reference
13431 (url "https://github.com/JCTools/JCTools")
13432 (commit (string-append "v" version))))
13433 (file-name (git-file-name name version))
13434 (sha256
13435 (base32
13436 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
13437 (build-system ant-build-system)
13438 (arguments
13439 `(#:jar-name "java-jctools-core.jar"
13440 #:source-dir "jctools-core/src/main/java"
13441 #:test-dir "jctools-core/src/test"
13442 ;; The tests timeout on some architectures.
13443 #:tests? ,(not (or (target-aarch64?)
13444 (%current-target-system)))))
13445 (native-inputs
13446 (list java-junit java-hamcrest-all))
13447 (home-page "https://github.com/JCTools/JCTools")
13448 (synopsis "Concurrency tools for Java")
13449 (description "This library implements concurrent data structures that are
13450not natively available in Java.")
13451 (license license:asl2.0)))
13452
13453(define-public java-commons-bcel
13454 (package
13455 (name "java-commons-bcel")
13456 (version "6.1")
13457 (source (origin
13458 (method url-fetch)
13459 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
13460 version "-src.tar.gz"))
13461 (sha256
13462 (base32
13463 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
13464 (build-system ant-build-system)
13465 (arguments
13466 `(#:jar-name "bcel.jar"
13467 #:jdk ,icedtea-8
13468 #:source-dir "src/main/java"
13469 #:test-dir "src/test/java"
13470 ;; FIXME: Tests require the unpackaged jna.
13471 #:tests? #f))
13472 (home-page "https://commons.apache.org/proper/commons-bcel/")
13473 (synopsis "Byte code engineering library")
13474 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
13475intended to give users a convenient way to analyze, create, and
13476manipulate (binary) Java class files. Classes are represented by objects
13477which contain all the symbolic information of the given class: methods, fields
13478and byte code instructions, in particular.
13479
13480Such objects can be read from an existing file, be transformed by a
13481program (e.g. a class loader at run-time) and written to a file again. An
13482even more interesting application is the creation of classes from scratch at
13483run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
13484if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
13485of Java @code{.class} files.")
13486 (properties '((upstream-name . "bcel")))
13487 (license license:asl2.0)))
13488
13489(define-public java-xerial-core
13490 (package
13491 (name "java-xerial-core")
13492 (version "2.1")
13493 (source (origin
13494 (method url-fetch)
13495 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
13496 version ".tar.gz"))
13497 (file-name (string-append name "-" version ".tar.gz"))
13498 (sha256
13499 (base32
13500 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
13501 (build-system ant-build-system)
13502 (arguments
13503 `(#:jar-name "xerial-core.jar"
13504 #:source-dir "xerial-core/src/main/java"
13505 #:test-dir "xerial-core/src/test"
13506 #:phases
13507 (modify-phases %standard-phases
13508 (add-before 'build 'copy-resources
13509 (lambda _
13510 (copy-recursively "xerial-core/src/main/resources"
13511 "build/classes")
13512 #t)))))
13513 (native-inputs
13514 `(("junit" ,java-junit)
13515 ("hamcrest" ,java-hamcrest-core)))
13516 (home-page "https://github.com/xerial/xerial-java")
13517 (synopsis "Data management libraries for Java")
13518 (description "Xerial is a set of data management libraries for the Java
13519programming language. The ultimate goal of the Xerial project is to manage
13520everything as database, including class objects, text format data, data
13521streams, etc.")
13522 (license license:asl2.0)))
13523
13524(define-public java-asm-jdk-bridge
13525 (package
13526 (name "java-asm-jdk-bridge")
13527 (version "0.0.13")
13528 (source (origin
13529 (method git-fetch)
13530 (uri (git-reference
13531 (url "https://github.com/raphw/asm-jdk-bridge")
13532 (commit (string-append "asm-jdk-bridge-parent-" version))))
13533 (file-name (git-file-name name version))
13534 (sha256
13535 (base32
13536 "1f9x94drnjdr1k6wr49g9vn0prx5s5a4qfx91rx19w136cmx92yc"))))
13537 (build-system ant-build-system)
13538 (arguments
13539 (list #:jar-name "asm-jdk-bridge.jar"
13540 #:tests? #f ; tests require JUnit 5
13541 #:source-dir "asm-jdk-bridge/src/main/java"))
13542 (inputs (list java-asm-9.10))
13543 (home-page "https://github.com/raphw/asm-jdk-bridge")
13544 (synopsis "Bridge between the ASM API and the OpenJDK Class File API")
13545 (description
13546 "This package implements adapters to translate between ASM visitors and
13547the OpenJDK Class File API. It allows plugging the OpenJDK reader and writer
13548into existing ASM-based code with little change: an instance of ASM's
13549@code{ClassReader} or @code{ClassWriter} can be replaced with
13550@code{JdkClassReader} or @code{JdkClassWriter}, which use the Class File API
13551internally while exposing APIs equal to ASM.")
13552 (license license:asl2.0)))
13553
13554(define-public java-byte-buddy-dep
13555 (package
13556 (name "java-byte-buddy-dep")
13557 (version "1.18.14")
13558 (source (origin
13559 (method git-fetch)
13560 (uri (git-reference
13561 (url "https://github.com/raphw/byte-buddy")
13562 (commit (string-append "byte-buddy-" version))))
13563 (file-name (git-file-name name version))
13564 (sha256
13565 (base32
13566 "0s4dj0vdpz9dzm4kk89bkzbywy2c7dkf5bapk4f39yc0c31qcqrr"))))
13567 (build-system ant-build-system)
13568 (arguments
13569 (list #:jar-name "byte-buddy-dep.jar"
13570 #:tests? #f ; tests are incompatible with current jdk
13571 #:source-dir "byte-buddy-dep/src/main/java"
13572 #:test-dir "byte-buddy-dep/src/test"))
13573 (propagated-inputs
13574 (list java-asm-9.10
13575 java-asm-commons-9.10
13576 java-asm-jdk-bridge
13577 java-native-access))
13578 (native-inputs
13579 (list java-findbugs-annotations))
13580 (home-page "http://bytebuddy.net/")
13581 (synopsis "Runtime code generation for the Java virtual machine")
13582 (description "Byte Buddy is a code generation and manipulation library for
13583creating and modifying Java classes during the runtime of a Java application
13584and without the help of a compiler.")
13585 (license license:asl2.0)))
13586
13587(define-public java-byte-buddy-agent
13588 (package
13589 (inherit java-byte-buddy-dep)
13590 (name "java-byte-buddy-agent")
13591 (arguments
13592 (list #:jar-name "byte-buddy-agent.jar"
13593 #:tests? #f; tests require attaching to a running JVM
13594 #:source-dir "byte-buddy-agent/src/main/java"
13595 #:test-dir "byte-buddy-agent/src/test"))
13596 (propagated-inputs
13597 (list java-native-access
13598 java-native-access-platform))
13599 (native-inputs
13600 (list java-findbugs-annotations))
13601 (synopsis "Attach Byte Buddy agents to a running Java virtual machine")
13602 (description "The Byte Buddy agent allows the attachment of a Java agent to
13603the current or to a remote Java virtual machine. It enables Byte Buddy to
13604redefine and retransform classes that are already loaded, making it possible to
13605manipulate the bytecode of a running application.")))
13606
13607(define-public java-powermock-reflect
13608 (package
13609 (name "java-powermock-reflect")
13610 (version "2.0.9")
13611 (source (origin
13612 (method git-fetch)
13613 (uri (git-reference
13614 (url "https://github.com/powermock/powermock")
13615 (commit (string-append "powermock-" version))))
13616 (file-name (git-file-name name version))
13617 (sha256
13618 (base32
13619 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
13620 (patches
13621 (search-patches "java-powermock-fix-java-files.patch"))))
13622 (build-system ant-build-system)
13623 (arguments
13624 `(#:jar-name "java-powermock-reflect.jar"
13625 #:source-dir "powermock-reflect/src/main/java"
13626 #:test-dir "powermock-reflect/src/test"))
13627 (inputs
13628 (list java-asm-9 java-objenesis))
13629 (native-inputs
13630 (list java-assertj java-cglib java-hamcrest-core java-junit))
13631 (home-page "https://github.com/powermock/powermock")
13632 (synopsis "Mock library extension framework")
13633 (description "PowerMock is a framework that extends other mock libraries
13634such as EasyMock with more powerful capabilities. PowerMock uses a custom
13635classloader and bytecode manipulation to enable mocking of static methods,
13636constructors, final classes and methods, private methods, removal of static
13637initializers and more. By using a custom classloader no changes need to be
13638done to the IDE or continuous integration servers which simplifies adoption.")
13639 (license license:asl2.0)))
13640
13641(define-public java-powermock-core
13642 (package
13643 (inherit java-powermock-reflect)
13644 (name "java-powermock-core")
13645 (arguments
13646 `(#:jar-name "java-powermock-core.jar"
13647 #:source-dir "powermock-core/src/main/java"
13648 #:test-dir "powermock-core/src/test"
13649 #:tests? #f; requires powermock-api
13650 #:jdk ,icedtea-8
13651 #:phases
13652 (modify-phases %standard-phases
13653 (add-before 'build 'copy-resources
13654 (lambda _
13655 (copy-recursively "powermock-core/src/main/resources"
13656 "build/classes")
13657 #t)))))
13658 (inputs
13659 (list java-asm-9
13660 java-byte-buddy-dep
13661 java-jboss-javassist
13662 java-powermock-reflect))
13663 (native-inputs
13664 (list java-assertj java-mockito-1 java-junit))))
13665
13666(define-public java-powermock-api-support
13667 (package
13668 (inherit java-powermock-reflect)
13669 (name "java-powermock-api-support")
13670 (build-system ant-build-system)
13671 (arguments
13672 `(#:jar-name "java-powermock-api-support.jar"
13673 #:jdk ,icedtea-8
13674 #:source-dir "powermock-api/powermock-api-support/src/main/java"
13675 #:tests? #f)); no tests
13676 (inputs
13677 (list java-powermock-core java-powermock-reflect))))
13678
13679(define-public java-powermock-modules-junit4-common
13680 (package
13681 (inherit java-powermock-reflect)
13682 (name "java-powermock-modules-junit4-common")
13683 (build-system ant-build-system)
13684 (arguments
13685 `(#:jar-name "java-powermock-modules-junit4-common.jar"
13686 #:jdk ,icedtea-8
13687 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
13688 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
13689 (inputs
13690 (list java-cglib
13691 java-easymock
13692 java-hamcrest-core
13693 java-powermock-core
13694 java-powermock-reflect))))
13695
13696(define-public java-powermock-modules-junit4
13697 (package
13698 (inherit java-powermock-reflect)
13699 (name "java-powermock-modules-junit4")
13700 (build-system ant-build-system)
13701 (arguments
13702 `(#:jar-name "java-powermock-modules-junit4.jar"
13703 #:tests? #f; require easymock 4, which introduces a loop with testng
13704 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
13705 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
13706 #:phases
13707 (modify-phases %standard-phases
13708 (add-before 'build 'fix-junit-detection
13709 (lambda _
13710 ;; Our junit version is 4.12-SNAPSHOT
13711 (substitute* (find-files "powermock-modules/powermock-module-junit4"
13712 "PowerMockJUnit4MethodValidator.java")
13713 (("4.12") "4.12-SNAPSHOT"))
13714 #t)))))
13715 (inputs
13716 (list java-cglib
13717 java-powermock-core
13718 java-powermock-reflect
13719 java-powermock-modules-junit4-common))
13720 (native-inputs
13721 (list java-easymock
13722 java-hamcrest-core
13723 java-junit
13724 java-objenesis))))
13725
13726(define-public java-powermock-api-easymock
13727 (package
13728 (inherit java-powermock-reflect)
13729 (name "java-powermock-api-easymock")
13730 (build-system ant-build-system)
13731 (arguments
13732 `(#:jar-name "java-powermock-api-easymock.jar"
13733 #:jdk ,icedtea-8
13734 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
13735 #:tests? #f; no tests
13736 #:phases
13737 (modify-phases %standard-phases
13738 (add-before 'build 'fix-file
13739 (lambda _
13740 ;; FIXME: This looks wrong, but it fixes a build error.
13741 (with-directory-excursion "powermock-api/powermock-api-easymock"
13742 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
13743 (("classLoader instanceof MockClassLoader") "false")
13744 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
13745 #t)))))
13746 (inputs
13747 (list java-cglib
13748 java-easymock
13749 java-powermock-api-support
13750 java-powermock-core
13751 java-powermock-reflect))))
13752
13753(define-public java-jboss-jms-api-spec
13754 (package
13755 (name "java-jboss-jms-api-spec")
13756 (version "2.0")
13757 (source (origin
13758 (method url-fetch)
13759 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
13760 "archive/jboss-jms-api_" version
13761 "_spec-1.0.1.Final.tar.gz"))
13762 (sha256
13763 (base32
13764 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
13765 (build-system ant-build-system)
13766 (arguments
13767 `(#:jar-name "java-jboss-jms-api_spec.jar"
13768 #:jdk ,icedtea-8
13769 #:source-dir "."
13770 #:tests? #f)); no tests
13771 (home-page "https://github.com/jboss/jboss-jms-api_spec")
13772 (synopsis "Java Message Service API specification")
13773 (description "Java Message Service (JMS) API is used to send messages
13774messages between two or more clients. It is a messaging standard that allows
13775application components to create, send, receive, and read messages.")
13776 ; either gpl2 only with GPL Classpath Exception, or cddl.
13777 (license (list license:gpl2 license:cddl1.0))))
13778
13779(define-public java-mail
13780 (package
13781 (name "java-mail")
13782 (version "1.6.0")
13783 (source (origin
13784 (method url-fetch)
13785 (uri (string-append "https://github.com/javaee/javamail/archive/"
13786 "JAVAMAIL-1_6_0.tar.gz"))
13787 (sha256
13788 (base32
13789 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
13790 (build-system ant-build-system)
13791 (arguments
13792 `(#:jar-name "java-mail.jar"
13793 #:jdk ,icedtea-8
13794 #:source-dir "mail/src/main/java"
13795 #:test-dir "mail/src/test"
13796 #:test-exclude
13797 (list "**/CollectorFormatterTest.java"
13798 "**/CompactFormatterTest.java"
13799 "**/DurationFilterTest.java"
13800 "**/MailHandlerTest.java"
13801 "**/GetLocalAddressTest.java"
13802 ;; SSLHandshakeException: No appropriate protocol
13803 "**/WriteTimeoutSocketTest.java"
13804 ;; FIXME: both end with:
13805 ;; java.lang.ClassNotFoundException:
13806 ;; javax.mail.internet.MimeMultipartParseTest
13807 "**/MimeMultipartParseTest.java"
13808 "**/SearchTermSerializationTest.java")
13809 #:phases
13810 (modify-phases %standard-phases
13811 (add-before 'configure 'move-version.java
13812 (lambda _
13813 (copy-file "mail/src/main/resources/javax/mail/Version.java"
13814 "mail/src/main/java/javax/mail/Version.java")))
13815 (add-before 'build 'copy-resources
13816 (lambda _
13817 (copy-recursively "mail/src/main/resources/META-INF"
13818 "build/classes/META-INF"))))))
13819 (native-inputs
13820 (list java-junit java-hamcrest-core))
13821 (home-page "https://javaee.github.io/javamail/")
13822 (synopsis "Mail-related functionality in Java")
13823 (description "The JavaMail API provides a platform-independent and
13824protocol-independent framework to build mail and messaging applications.")
13825 ;; General Public License Version 2 only ("GPL") or the Common Development
13826 ;; and Distribution License("CDDL")
13827 (license (list license:cddl1.1
13828 license:gpl2)))); with classpath exception
13829
13830(define-public java-mapdb
13831 (package
13832 (name "java-mapdb")
13833 (version "1.0.9")
13834 (source (origin
13835 (method git-fetch)
13836 (uri (git-reference
13837 (url "https://github.com/jankotek/mapdb")
13838 (commit (string-append "mapdb-" version))))
13839 (file-name (git-file-name name version))
13840 (sha256
13841 (base32
13842 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
13843 (build-system ant-build-system)
13844 (arguments
13845 (list #:jar-name "mapdb.jar"
13846 #:source-dir "src/main/java"
13847 #:test-dir "src/test"
13848 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
13849 "**/ConcurrentMapInterfaceTest.java"
13850 "**/EngineTest.java"
13851 "**/Issue664Test.java"
13852 "**/MapInterfaceTest.java")
13853 #:phases #~(modify-phases %standard-phases
13854 (replace 'install (install-from-pom "pom.xml")))))
13855 (native-inputs (list java-junit))
13856 (home-page "https://mapdb.org/")
13857 (synopsis "Concurrent data structures")
13858 (description "MapDB provides concurrent maps, sets and queues backed by
13859disk storage or off-heap memory.")
13860 (license license:bsd-3)))
13861
13862(define-public java-mime4j-core
13863 (package
13864 (name "java-mime4j-core")
13865 (version "0.8.13")
13866 (source (origin
13867 (method url-fetch)
13868 (uri (string-append "mirror://apache/james/mime4j/" version
13869 "/james-mime4j-sources-" version ".zip"))
13870 (sha256
13871 (base32
13872 "0f1r0ywa1qdw2b227c93v3fksqp9bgll00bqw1md1894v3szm9ca"))))
13873 (build-system ant-build-system)
13874 (arguments
13875 `(#:tests? #f ;; has no tests
13876 #:source-dir "core/src/main/java"
13877 #:jar-name "apache-mime4j-core.jar"))
13878 (native-inputs
13879 (list java-commons-io-latest ;; requries >= 2.7
13880 java-junit
13881 unzip))
13882 (home-page "https://james.apache.org/mime4j/apache-mime4j-core/")
13883 (synopsis "Java stream based MIME message parser")
13884 (description "Apache James Mime4J provides a parser, MimeStreamParser, for
13885e-mail message streams in plain rfc822 and MIME format. The parser uses a
13886callback mechanism to report parsing events such as the start of an entity
13887header, the start of a body, etc. If you are familiar with the SAX XML parser
13888interface you should have no problem getting started with mime4j.")
13889 (license license:asl2.0)))
13890
13891(define-public java-jeromq
13892 (package
13893 (name "java-jeromq")
13894 (version "0.4.3")
13895 (source (origin
13896 (method git-fetch)
13897 (uri (git-reference
13898 (url "https://github.com/zeromq/jeromq")
13899 (commit (string-append "v" version))))
13900 (file-name (string-append name "-" version "-checkout"))
13901 (sha256
13902 (base32
13903 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
13904 (patches (search-patches "java-jeromq-fix-tests.patch"))))
13905 (build-system ant-build-system)
13906 (arguments
13907 `(#:jar-name "java-jeromq.jar"
13908 #:source-dir "src/main/java"
13909 #:jdk ,icedtea-8
13910 #:test-exclude
13911 (list
13912 "**/Abstract*.java"
13913 ;; Requires network
13914 "**/ZBeaconTest.java"
13915 ;; Failures
13916 "**/DealerSpecTest.java"
13917 "**/CustomDecoderTest.java"
13918 "**/CustomEncoderTest.java"
13919 "**/ConnectRidTest.java"
13920 "**/ReqSpecTest.java"
13921 "**/PushPullSpecTest.java"
13922 "**/PubSubHwmTest.java"
13923 "**/RouterSpecTest.java"
13924 "**/ProxyTest.java")))
13925 (inputs
13926 (list java-jnacl))
13927 (native-inputs
13928 `(("java-hamcrest-core" ,java-hamcrest-core)
13929 ("junit" ,java-junit)))
13930 (home-page "https://zeromq.org/bindings:java")
13931 (synopsis "Java binding for 0MQ")
13932 (description "Jeromq provides the java bindings for 0MQ.")
13933 (license license:mpl2.0)))
13934
13935(define-public java-kafka-clients
13936 (package
13937 (name "java-kafka-clients")
13938 (version "1.1.1")
13939 (source (origin
13940 (method url-fetch)
13941 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
13942 version "-src.tgz"))
13943 (sha256
13944 (base32
13945 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
13946 (build-system ant-build-system)
13947 (arguments
13948 `(#:jar-name "java-kafka-clients.jar"
13949 #:jdk ,icedtea-8
13950 #:source-dir "clients/src/main/java"
13951 #:test-dir "clients/src/test"
13952 #:test-exclude
13953 (list
13954 ;; This file does not contain a class
13955 "**/IntegrationTest.java"
13956 ;; Requires network
13957 "**/ClientUtilsTest.java"
13958 ;; This test fails on i686
13959 "**/SerializationTest.java"
13960 ;; "protocol is disabled or cipher suites are inappropriate"
13961 "**/SslTransportLayerTest.java"
13962 ;; End with errors that seem related to our powermock
13963 "**/KafkaProducerTest.java"
13964 "**/BufferPoolTest.java"
13965 ;; Undeterministic failure, seems to affect mostly ci
13966 "**/GarbageCollectedMemoryPoolTest.java")))
13967 (inputs
13968 (list java-slf4j-api java-lz4))
13969 (native-inputs
13970 (list java-bouncycastle
13971 java-cglib
13972 java-easymock
13973 java-hamcrest-all
13974 java-jboss-javassist
13975 java-junit
13976 java-objenesis
13977 java-powermock-api-easymock
13978 java-powermock-api-support
13979 java-powermock-core
13980 java-powermock-modules-junit4
13981 java-powermock-modules-junit4-common
13982 java-snappy))
13983 (home-page "https://kafka.apache.org")
13984 (synopsis "Distributed streaming platform")
13985 (description "Kafka is a distributed streaming platform, which means:
13986@itemize
13987@item it can publish and subscribe to streams of records;
13988@item it can store streams of records in a fault-tolerant way;
13989@item it can process streams of records as they occur.
13990@end itemize")
13991 ;; Either cddl or gpl2 only.
13992 (license (list license:cddl1.1; actually cddl1.1
13993 license:gpl2)))); with classpath exception
13994
13995(define-public java-jdom
13996 (package
13997 (name "java-jdom")
13998 (version "1.1.3")
13999 (source (origin
14000 (method url-fetch)
14001 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
14002 version ".tar.gz"))
14003 (sha256
14004 (base32
14005 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
14006 (build-system ant-build-system)
14007 (arguments
14008 `(#:build-target "package"
14009 #:tests? #f; tests are run as part of the build process
14010 #:phases
14011 (modify-phases %standard-phases
14012 (replace 'install
14013 (install-jars "build")))))
14014 (home-page "http://jdom.org/")
14015 (synopsis "Access, manipulate, and output XML data")
14016 (description "Java-based solution for accessing, manipulating, and
14017outputting XML data from Java code.")
14018 (license license:bsd-4)))
14019
14020(define-public java-geronimo-xbean-reflect
14021 (package
14022 (name "java-geronimo-xbean-reflect")
14023 (version "4.5")
14024 (source (origin
14025 (method svn-fetch)
14026 (uri (svn-reference
14027 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
14028 (revision 1807396)))
14029 (file-name (string-append name "-" version))
14030 (sha256
14031 (base32
14032 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
14033 (build-system ant-build-system)
14034 (arguments
14035 `(#:jar-name "geronimo-xbean-reflect.jar"
14036 #:source-dir "xbean-reflect/src/main/java"
14037 #:test-dir "xbean-reflect/src/test"
14038 #:jdk ,icedtea-8
14039 #:test-exclude
14040 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
14041 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
14042 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
14043 #:phases
14044 (modify-phases %standard-phases
14045 (add-before 'build 'fix-source
14046 (lambda _
14047 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
14048 ;; org.apache.xbean.asm6 is actually repackaged java-asm
14049 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
14050 (("org.apache.xbean.asm5") "org.objectweb.asm"))
14051 #t)))
14052 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
14053 (inputs
14054 `(("asm" ,java-asm)
14055 ("log4j" ,java-log4j-api)
14056 ("log4j-1.2" ,java-log4j-1.2-api)
14057 ("log4j-core" ,java-log4j-core)
14058 ("logging" ,java-commons-logging-minimal)))
14059 (propagated-inputs
14060 (list java-geronimo-parent-pom))
14061 (native-inputs
14062 `(("junit" ,java-junit)))
14063 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
14064 (synopsis "Dependency injection helper")
14065 (description "Xbean-reflect provides very flexible ways to create objects
14066and graphs of objects for dependency injection frameworks")
14067 (license license:asl2.0)))
14068
14069(define-public java-geronimo-genesis-2.1
14070 (package
14071 (name "java-geronimo-genesis")
14072 (version "2.1")
14073 (source (origin
14074 (method svn-fetch)
14075 (uri (svn-reference
14076 (url (string-append "https://svn.apache.org/repos/asf/"
14077 "geronimo/genesis/tags/genesis-"
14078 version))
14079 (revision 1807396)))
14080 (file-name (string-append name "-" version "-source"))
14081 (sha256
14082 (base32
14083 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
14084 (build-system ant-build-system)
14085 (arguments
14086 `(#:tests? #f
14087 #:phases
14088 (modify-phases %standard-phases
14089 (delete 'configure)
14090 (delete 'build)
14091 (replace 'install
14092 (install-pom-file "pom.xml"))
14093 (add-after 'install 'install-enforcer-rules
14094 (install-pom-file "genesis-enforcer-rules/pom.xml"))
14095 (add-after 'install 'install-flava
14096 (install-pom-file "genesis-default-flava/pom.xml"))
14097 (add-after 'install 'install-packaging
14098 (install-pom-file "genesis-packaging/pom.xml"))
14099 (add-after 'install-flava 'install-flava-java4
14100 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
14101 (add-after 'install-flava 'install-flava-java5
14102 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
14103 (add-after 'install-flava 'install-flava-java6
14104 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
14105 (propagated-inputs
14106 `(("apache-parent-pom" ,apache-parent-pom-13)))
14107 (home-page "https://geronimo.apache.org")
14108 (synopsis "Collection of maven POM files for the Geronimo project")
14109 (description "Apache Geronimo is a server runtime. This package contains
14110only pom files used by other components in the Geronimo project.")
14111 (license license:asl2.0)))
14112
14113(define java-geronimo-parent-pom
14114 (package
14115 (inherit java-geronimo-xbean-reflect)
14116 (name "java-geronimo-parent-pom")
14117 (arguments
14118 `(#:tests? #f
14119 #:phases
14120 (modify-phases %standard-phases
14121 (delete 'configure)
14122 (delete 'build)
14123 (replace 'install
14124 (install-pom-file "pom.xml")))))
14125 (propagated-inputs
14126 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
14127
14128(define-public java-geronimo-xbean-bundleutils
14129 (package
14130 (inherit java-geronimo-xbean-reflect)
14131 (name "java-geronimo-xbean-bundleutils")
14132 (arguments
14133 `(#:jar-name "geronimo-xbean-bundleutils.jar"
14134 #:source-dir "xbean-bundleutils/src/main/java"
14135 #:test-dir "xbean-bundleutils/src/test"
14136 #:phases
14137 (modify-phases %standard-phases
14138 (add-before 'build 'fix-java
14139 (lambda _
14140 ;; We use a more recent version of osgi, so this file requires
14141 ;; more interface method implementations.
14142 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
14143 (("import org.osgi.framework.ServiceRegistration;")
14144 "import org.osgi.framework.ServiceRegistration;
14145import org.osgi.framework.ServiceFactory;
14146import java.util.Collection;
14147import org.osgi.framework.ServiceObjects;")
14148 (("public Bundle getBundle\\(\\)")
14149 "@Override
14150public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
14151 throw new UnsupportedOperationException();
14152}
14153@Override
14154public <S> ServiceRegistration<S> registerService(Class<S> clazz,
14155 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
14156 throw new UnsupportedOperationException();
14157}
14158public Bundle getBundle()"))
14159 #t)))))
14160 (inputs
14161 `(("java-slf4j" ,java-slf4j-api)
14162 ("java-asm" ,java-asm)
14163 ("java-osgi-framework" ,java-osgi-framework)
14164 ("java-eclipse-osgi" ,java-eclipse-osgi)
14165 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
14166
14167(define-public java-geronimo-xbean-asm-util
14168 (package
14169 (inherit java-geronimo-xbean-reflect)
14170 (name "java-geronimo-xbean-asm-util")
14171 (arguments
14172 `(#:jar-name "geronimo-xbean-asm-util.jar"
14173 #:source-dir "xbean-asm-util/src/main/java"
14174 #:tests? #f)); no tests
14175 (inputs
14176 (list java-asm))
14177 (native-inputs '())))
14178
14179(define-public java-geronimo-xbean-finder
14180 (package
14181 (inherit java-geronimo-xbean-reflect)
14182 (name "java-geronimo-xbean-finder")
14183 (arguments
14184 `(#:jar-name "geronimo-xbean-finder.jar"
14185 #:source-dir "xbean-finder/src/main/java"
14186 #:test-dir "xbean-finder/src/test"))
14187 (inputs
14188 (list java-slf4j-api
14189 java-asm
14190 java-geronimo-xbean-bundleutils
14191 java-geronimo-xbean-asm-util
14192 java-osgi-service-packageadmin
14193 java-osgi-framework))
14194 (native-inputs
14195 (list java-junit java-hamcrest-core))))
14196
14197(define-public java-simplevalidation-1.14.1
14198 (package
14199 (name "java-simplevalidation")
14200 (version "1.14.1")
14201 (source
14202 (origin
14203 (method git-fetch)
14204 (uri (git-reference
14205 (url "https://github.com/timboudreau/simplevalidation.git")
14206 (commit "7a9d6adbac685b34746aaa72b20a1e639b89c733")))
14207 (file-name (git-file-name "java-simplevalidation" version))
14208 (sha256
14209 (base32 "1l0h2a6brzh4qrkjjxpiijjspapd1s7wr9pqzzwgh6qisjgb176w"))
14210 (patches
14211 (search-patches "java-simplevalidation-1.14.1.patch"))
14212 (modules '((guix build utils)))
14213 (snippet
14214 '(begin
14215 (for-each delete-file (find-files "." "\\.jar$"))
14216 #t))))
14217 (build-system ant-build-system)
14218 (arguments
14219 (list
14220 #:jdk openjdk17
14221 #:tests? #f
14222 #:modules
14223 '((guix build utils)
14224 (guix build ant-build-system)
14225 (guix build java-utils)
14226 (srfi srfi-13))
14227 #:phases
14228 #~(modify-phases %standard-phases
14229 (replace 'build
14230 (lambda _
14231 (define build-root (getcwd))
14232 (define (normalize-path file)
14233 (if (string-prefix? "./" file)
14234 (substring file 2)
14235 file))
14236 (define (copy-resources source-root class-root)
14237 (with-directory-excursion source-root
14238 (for-each
14239 (lambda (file)
14240 (unless (string-suffix? ".java" file)
14241 (let* ((relative (normalize-path file))
14242 (destination
14243 (string-append class-root "/" relative)))
14244 (mkdir-p (dirname destination))
14245 (copy-file file destination))))
14246 (find-files "." ".*"))))
14247 (define (compile-tree source-root class-root classpath)
14248 (mkdir-p class-root)
14249 (copy-resources source-root class-root)
14250 (with-directory-excursion source-root
14251 (let ((sources (find-files "." "\\.java$")))
14252 (apply invoke "javac"
14253 (append
14254 (list "-d" class-root)
14255 (if classpath
14256 (list "-cp" classpath)
14257 '())
14258 sources)))))
14259 (let* ((nbstubs-classes (string-append build-root "/build/nbstubs"))
14260 (core-classes (string-append build-root "/build/core"))
14261 (swing-classes (string-append build-root "/build/swing"))
14262 (nbstubs-jar (string-append build-root
14263 "/build/nbstubs-1.14.1.jar"))
14264 (core-jar (string-append build-root
14265 "/build/simplevalidation-1.14.1.jar"))
14266 (swing-jar
14267 (string-append build-root
14268 "/build/simplevalidation-swing-1.14.1.jar"))
14269 (converter-services
14270 (string-append
14271 swing-classes
14272 "/META-INF/services/org.netbeans.validation.api.conversion.Converter")))
14273 (compile-tree "nbstubs/src" nbstubs-classes #f)
14274 (invoke "jar" "-cf" nbstubs-jar "-C" nbstubs-classes ".")
14275 (compile-tree "ValidationAPI/src" core-classes #f)
14276 (invoke "jar" "-cf" core-jar "-C" core-classes ".")
14277 (compile-tree "simplevalidation-swing/src/main/java"
14278 swing-classes
14279 (string-append core-classes ":" nbstubs-classes))
14280 (mkdir-p (dirname converter-services))
14281 (call-with-output-file converter-services
14282 (lambda (port)
14283 (for-each
14284 (lambda (line)
14285 (display line port)
14286 (newline port))
14287 '("org.netbeans.validation.api.conversion.swing.SelectedIndicesToButtonModelArrayConverter"
14288 "org.netbeans.validation.api.conversion.swing.SelectedIndicesToListSelectionModelConverter"
14289 "org.netbeans.validation.api.conversion.swing.StringToComboBoxModelConverter"
14290 "org.netbeans.validation.api.conversion.swing.StringToDocumentConverter"))))
14291 (invoke "jar" "-cf" swing-jar "-C" swing-classes ".")
14292 #t)))
14293 (replace 'install
14294 (lambda* (#:key inputs outputs #:allow-other-keys)
14295 ((install-pom-file "pom.xml")
14296 #:inputs inputs
14297 #:outputs outputs)
14298 ((install-from-pom "nbstubs/pom.xml")
14299 #:inputs inputs
14300 #:outputs outputs)
14301 ((install-from-pom "ValidationAPI/pom.xml")
14302 #:inputs inputs
14303 #:outputs outputs)
14304 ((install-from-pom "simplevalidation-swing/pom.xml")
14305 #:inputs inputs
14306 #:outputs outputs)
14307 #t)))))
14308 (home-page "https://github.com/timboudreau/simplevalidation/")
14309 (synopsis "Simple Validation libraries for Swing forms")
14310 (description
14311 "This package builds the Simple Validation core and Swing adapter
14312libraries from source.")
14313 (license license:asl2.0)))
14314
14315(define-public java-lucene-core-3.6.2
14316 (package
14317 (name "java-lucene-core")
14318 (version "3.6.2")
14319 (source
14320 (origin
14321 (method url-fetch)
14322 (uri (string-append "https://archive.apache.org/dist/lucene/solr/"
14323 version "/apache-solr-" version "-src.tgz"))
14324 (sha256
14325 (base32 "032dfpk7likiwb9pnlr518wwlyxn57i5wyp18mi32320vsprd4r0"))))
14326 (build-system ant-build-system)
14327 (arguments
14328 (list
14329 #:tests? #f
14330 #:phases
14331 #~(modify-phases %standard-phases
14332 (replace 'build
14333 (lambda _
14334 (let ((jar-file (string-append (getcwd) "/build/lucene-core-"
14335 #$version ".jar")))
14336 (mkdir-p "build")
14337 (with-directory-excursion "lucene/core"
14338 (mkdir-p "build/classes")
14339 (apply invoke "javac" "-d" "build/classes"
14340 (find-files "src/java" "\\.java$"))
14341 (invoke "jar" "-cf" jar-file "-C" "build/classes" "."))
14342 #t)))
14343 (replace 'install
14344 (install-jars "build")))))
14345 (home-page "https://lucene.apache.org/core/")
14346 (synopsis "Apache Lucene core library")
14347 (description
14348 "This package provides the Apache Lucene 3.6.2 core library, built
14349entirely from source.")
14350 (license license:asl2.0)))
14351
14352(define-public java-json-simple-1.1.1
14353 (package
14354 (name "java-json-simple")
14355 (version "1.1.1")
14356 (source
14357 (origin
14358 (method git-fetch)
14359 (uri (git-reference
14360 (url "https://github.com/fangyidong/json-simple.git")
14361 (commit "tag_release_1_1_1")))
14362 (file-name (git-file-name name version))
14363 (sha256
14364 (base32 "1c598dvms70fs6w3l1dc0z7lqq3hndd5250ciwqm8xk3zbx465kf"))))
14365 (build-system ant-build-system)
14366 (arguments
14367 (list
14368 #:tests? #f
14369 #:build-target "jar"
14370 #:phases
14371 #~(modify-phases %standard-phases
14372 (replace 'install
14373 (install-from-pom "pom.xml")))))
14374 (home-page "https://github.com/fangyidong/json-simple")
14375 (synopsis "Simple JSON toolkit for Java")
14376 (description
14377 "JSON.simple is a small JSON parser and encoder for Java.")
14378 (license license:asl2.0)))
14379
14380(define-public java-gson
14381 (package
14382 (name "java-gson")
14383 (version "2.8.2")
14384 (source (origin
14385 (method url-fetch)
14386 (uri (string-append "https://github.com/google/gson/archive/"
14387 "gson-parent-" version ".tar.gz"))
14388 (sha256
14389 (base32
14390 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
14391 (build-system ant-build-system)
14392 (arguments
14393 `(#:jar-name "gson.jar"
14394 #:source-dir "gson/src/main/java"
14395 #:test-dir "gson/src/test"
14396 #:phases
14397 (modify-phases %standard-phases
14398 (replace 'install
14399 (install-from-pom "gson/pom.xml")))))
14400 (native-inputs
14401 (list java-junit java-hamcrest-core))
14402 (home-page "https://github.com/google/gson")
14403 (synopsis "Java serialization/deserialization library from/to JSON")
14404 (description "Gson is a Java library that can be used to convert Java
14405Objects into their JSON representation. It can also be used to convert a JSON
14406string to an equivalent Java object. Gson can work with arbitrary Java objects
14407including pre-existing objects that you do not have source-code of.")
14408 (license license:asl2.0)))
14409
14410;; Unlike java-gson above, this requires openjdk11.
14411(define-public java-gson-latest
14412 (package
14413 (inherit java-gson)
14414 (name "java-gson")
14415 (version "2.14.0")
14416 (source (origin
14417 (method git-fetch)
14418 (uri (git-reference
14419 (url "https://github.com/google/gson")
14420 (commit (string-append "gson-parent-" version))))
14421 (file-name (git-file-name name version))
14422 (sha256
14423 (base32
14424 "19xbgfh3i6j3vbjnrap057gnrgnc5gf41vgmwqg920cq95cvimab"))))
14425 (arguments
14426 `(#:jar-name "gson.jar"
14427 #:jdk ,openjdk11
14428 #:use-java-modules? #t
14429 #:source-dir "gson/src/main/java"
14430 #:tests? #f ;need Junit 5
14431 #:phases
14432 (modify-phases %standard-phases
14433 ;; avoid Maven dependency
14434 (add-before 'build 'fill-template
14435 (lambda _
14436 (with-directory-excursion "gson/src/main"
14437 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
14438 "java/com/google/gson/internal/GsonBuildConfig.java")
14439 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
14440 (("\\$\\{project.version\\}") ,version)))))
14441 (replace 'install
14442 (install-from-pom "gson/pom.xml")))))
14443 (propagated-inputs
14444 (list java-error-prone-annotations))))
14445
14446(define-public java-hawtjni
14447 (package
14448 (name "java-hawtjni")
14449 (version "1.15")
14450 (source (origin
14451 (method url-fetch)
14452 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
14453 "hawtjni-project-" version ".tar.gz"))
14454 (sha256
14455 (base32
14456 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
14457 (build-system ant-build-system)
14458 (arguments
14459 `(#:jar-name "hawtjni.jar"
14460 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
14461 #:tests? #f; no tests
14462 #:phases
14463 (modify-phases %standard-phases
14464 (add-before 'build 'build-native
14465 (lambda* (#:key inputs #:allow-other-keys)
14466 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
14467 (with-directory-excursion "hawtjni-generator/src/main/resources/"
14468 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
14469 "-fPIC" "-O2" include)
14470 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
14471 "-fPIC" "-O2" include)
14472 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
14473 "hawtjni.o" "hawtjni-callback.o")))
14474 #t))
14475 (add-after 'install 'install-native
14476 (lambda* (#:key outputs #:allow-other-keys)
14477 (let* ((out (assoc-ref outputs "out"))
14478 (lib (string-append out "/lib"))
14479 (inc (string-append out "/include")))
14480 (with-directory-excursion "hawtjni-generator/src/main/resources/"
14481 (install-file "libhawtjni.so" lib)
14482 (install-file "hawtjni.h" inc)))
14483 #t))
14484 (add-before 'install 'install-parent
14485 (install-pom-file "pom.xml"))
14486 (replace 'install
14487 (install-from-pom "hawtjni-runtime/pom.xml")))))
14488 (inputs
14489 (list java-commons-cli java-asm java-geronimo-xbean-finder))
14490 (home-page "https://fusesource.github.io/hawtjni/")
14491 (synopsis "JNI code generator")
14492 (description "HawtJNI is a code generator that produces the JNI code needed
14493to implement Java native methods. It is based on the jnigen code generator
14494that is part of the SWT Tools project.")
14495 (license license:asl2.0)))
14496
14497(define-public java-jansi-native
14498 (package
14499 (name "java-jansi-native")
14500 (version "1.7")
14501 (source (origin
14502 (method url-fetch)
14503 (uri (string-append "https://github.com/fusesource/jansi-native/"
14504 "archive/jansi-native-" version ".tar.gz"))
14505 (sha256
14506 (base32
14507 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
14508 (build-system ant-build-system)
14509 (arguments
14510 `(#:jar-name "jansi-native.jar"
14511 #:source-dir "src/main/java"
14512 #:tests? #f; no tests
14513 #:phases
14514 (modify-phases %standard-phases
14515 (add-before 'build 'build-native
14516 (lambda* (#:key inputs #:allow-other-keys)
14517 ;; there are more required files for windows in windows/
14518 (with-directory-excursion "src/main/native-package/src"
14519 (substitute* "jansi_ttyname.c"
14520 (("#include \"jansi_.*") ""))
14521 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
14522 (string-append "-I" (assoc-ref inputs "java-hawtjni")
14523 "/include")
14524 (string-append "-I" (assoc-ref inputs "jdk")
14525 "/include/linux")
14526 "-fPIC" "-O2")
14527 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
14528 (add-before 'build 'install-native
14529 (lambda _
14530 (let ((dir (string-append "build/classes/META-INF/native/"
14531 ,(match (%current-system)
14532 ((or "i686-linux" "armhf-linux")
14533 "linux32")
14534 ((or "x86_64-linux" "aarch64-linux"
14535 "mips64el-linux")
14536 "linux64")
14537 (_ "unknown-kernel")))))
14538 (install-file "src/main/native-package/src/libjansi.so" dir))
14539 #t))
14540 (add-after 'install 'install-native
14541 (lambda* (#:key outputs #:allow-other-keys)
14542 (install-file "src/main/native-package/src/jansi.h"
14543 (string-append (assoc-ref outputs "out") "/include"))
14544 #t))
14545 (add-before 'install 'fix-pom
14546 (lambda _
14547 ;; pom contains variables to complete name, but we don't support that
14548 (substitute* "pom.xml"
14549 (("\\$\\{platform\\}") "native"))
14550 #t))
14551 (replace 'install
14552 (install-from-pom "pom.xml")))))
14553 (propagated-inputs
14554 (list java-hawtjni))
14555 (home-page "https://fusesource.github.io/jansi/")
14556 (synopsis "Native library for jansi")
14557 (description "This package provides the native library for jansi, a small
14558Java library that allows you to use ANSI escape sequences to format your
14559console output.")
14560 (license license:asl2.0)))
14561
14562(define-public java-jansi
14563 (package
14564 (name "java-jansi")
14565 (version "2.4.0")
14566 (source (origin
14567 (method git-fetch)
14568 (uri (git-reference
14569 (url "https://github.com/fusesource/jansi")
14570 (commit (string-append "jansi-" version))))
14571 (file-name (git-file-name name version))
14572 (sha256
14573 (base32
14574 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
14575 (modules '((guix build utils)))
14576 (snippet
14577 ;; contains pre-compiled libraries
14578 '(delete-file-recursively
14579 "src/main/resources/org/fusesource/jansi/internal"))))
14580 (build-system ant-build-system)
14581 (arguments
14582 `(#:jar-name "jansi.jar"
14583 #:source-dir "src/main/java"
14584 #:test-dir "src/test"
14585 #:tests? #f; require junit 3
14586 #:phases
14587 (modify-phases %standard-phases
14588 (add-before 'build 'build-native
14589 (lambda* (#:key inputs #:allow-other-keys)
14590 (with-directory-excursion "src/main/native"
14591 (for-each
14592 (lambda (cfile)
14593 (let ((cfile (basename cfile))
14594 (ofile (string-append (basename cfile ".c") ".o")))
14595 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
14596 (string-append "-I" (assoc-ref inputs "jdk")
14597 "/include/linux")
14598 "-fPIC" "-O2")))
14599 (find-files "." "\\.c$"))
14600 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
14601 (find-files "." "\\.o$")))))
14602 (add-before 'build 'install-native
14603 (lambda _
14604 (let ((dir (string-append "build/classes/org/fusesource/"
14605 "jansi/internal/native/"
14606 ,(match (or (%current-target-system) (%current-system))
14607 ("i686-linux" "Linux/x86")
14608 ("x86_64-linux" "Linux/x86_64")
14609 ("armhf-linux" "Linux/armv7")
14610 ("aarch64-linux" "Linux/arm64")
14611 ("mips64el-linux" "Linux/mips64")
14612 (_ "unknown-kernel")))))
14613 (install-file "src/main/native/libjansi.so" dir))))
14614 (add-before 'build 'copy-resources
14615 (lambda _
14616 (copy-recursively "src/main/resources" "build/classes")))
14617 (replace 'install
14618 (install-from-pom "pom.xml")))))
14619 (home-page "https://fusesource.github.io/jansi/")
14620 (synopsis "Portable ANSI escape sequences")
14621 (description "Jansi is a Java library that allows you to use ANSI escape
14622sequences to format your console output which works on every platform.")
14623 (license license:asl2.0)))
14624
14625(define-public java-jansi-1
14626 (package
14627 (inherit java-jansi)
14628 (version "1.16")
14629 (source (origin
14630 (method git-fetch)
14631 (uri (git-reference
14632 (url "https://github.com/fusesource/jansi")
14633 (commit (string-append "jansi-project-" version))))
14634 (file-name (git-file-name "jansi" version))
14635 (sha256
14636 (base32
14637 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
14638 (arguments
14639 `(#:jar-name "jansi.jar"
14640 #:source-dir "jansi/src/main/java"
14641 #:test-dir "jansi/src/test"
14642 #:phases
14643 (modify-phases %standard-phases
14644 (add-after 'check 'clear-term
14645 (lambda _
14646 (invoke "echo" "-e" "\\e[0m")))
14647 (add-before 'install 'install-parent
14648 (install-pom-file "pom.xml"))
14649 (add-before 'install 'fix-pom
14650 (lambda _
14651 ;; pom adds jansi native versions for different platforms, but we
14652 ;; only need one, so use native instead
14653 (substitute* "jansi/pom.xml"
14654 (("windows32") "native")
14655 (("windows64") "native")
14656 (("osx") "native")
14657 (("linux32") "native")
14658 (("linux64") "native")
14659 (("freebsd32") "native")
14660 (("freebsd64") "native"))
14661 #t))
14662 (replace 'install
14663 (install-from-pom "jansi/pom.xml")))))
14664 (propagated-inputs
14665 (list java-jansi-native))
14666 (native-inputs
14667 (list java-junit java-hamcrest-core))))
14668
14669(define-public java-jboss-el-api-spec
14670 (package
14671 (name "java-jboss-el-api-spec")
14672 (version "3.0")
14673 (source (origin
14674 (method url-fetch)
14675 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
14676 "archive/jboss-el-api_" version
14677 "_spec-1.0.7.Final.tar.gz"))
14678 (sha256
14679 (base32
14680 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
14681 (build-system ant-build-system)
14682 (arguments
14683 `(#:jar-name "java-jboss-el-api_spec.jar"
14684 #:phases
14685 (modify-phases %standard-phases
14686 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
14687 ;; instead, which implements the same thing. We override the pom file
14688 ;; to "rename" the package so it can be found by maven.
14689 (add-before 'install 'override-pom
14690 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
14691 #:name "el-api"))
14692 (replace 'install
14693 (install-from-pom "pom.xml")))))
14694 (inputs
14695 (list java-junit))
14696 (home-page "https://github.com/jboss/jboss-el-api_spec")
14697 (synopsis "JSR-341 expression language 3.0 API")
14698 (description "This package contains an implementation of the JSR-341
14699specification for the expression language 3.0. It implements an expression
14700language inspired by ECMAScript and XPath. This language is used with
14701JavaServer Pages (JSP).")
14702 ;; Either GPL2 only or CDDL.
14703 (license (list license:gpl2 license:cddl1.1))))
14704
14705(define-public java-jboss-interceptors-api-spec
14706 (package
14707 (name "java-jboss-interceptors-api-spec")
14708 (version "1.2")
14709 (source (origin
14710 (method url-fetch)
14711 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
14712 "archive/jboss-interceptors-api_" version
14713 "_spec-1.0.0.Final.tar.gz"))
14714 (sha256
14715 (base32
14716 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
14717 (build-system ant-build-system)
14718 (arguments
14719 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
14720 #:jdk ,icedtea-8
14721 #:source-dir "."
14722 #:tests? #f; no tests
14723 #:phases
14724 (modify-phases %standard-phases
14725 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
14726 ;; so we use this package instead, which implements the same thing.
14727 ;; We override the pom file to "rename" the package so it can be found
14728 ;; by maven.
14729 (add-before 'install 'override-pom
14730 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
14731 "3.0" #:name "interceptor-api"))
14732 (replace 'install
14733 (install-from-pom "pom.xml")))))
14734 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
14735 (synopsis "Interceptors 1.2 API classes from JSR 318")
14736 (description "Java-jboss-interceptors-api-spec implements the Interceptors
14737API. Interceptors are used to interpose on business method invocations and
14738specific events.")
14739 ;; Either GPL2 only or CDDL.
14740 (license (list license:gpl2 license:cddl1.1))))
14741
14742(define-public java-cdi-api
14743 (package
14744 (name "java-cdi-api")
14745 (version "2.0")
14746 (source (origin
14747 (method url-fetch)
14748 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
14749 version ".tar.gz"))
14750 (file-name (string-append name "-" version ".tar.gz"))
14751 (sha256
14752 (base32
14753 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
14754 (build-system ant-build-system)
14755 (arguments
14756 `(#:source-dir "api/src/main/java"
14757 #:jar-name "java-cdi-api.jar"
14758 #:test-dir "api/src/test"
14759 #:jdk ,icedtea-8
14760 #:tests? #f; Tests fail because we don't have a CDI provider yet
14761 #:phases
14762 (modify-phases %standard-phases
14763 (replace 'install
14764 (install-from-pom "api/pom.xml")))))
14765 (propagated-inputs
14766 (list java-javax-inject java-jboss-el-api-spec
14767 java-jboss-interceptors-api-spec java-weld-parent-pom))
14768 (native-inputs
14769 (list java-testng java-hamcrest-core))
14770 (home-page "https://cdi-spec.org/")
14771 (synopsis "Contexts and Dependency Injection APIs")
14772 (description "Java-cdi-api contains the required APIs for Contexts and
14773Dependency Injection (CDI).")
14774 (license license:asl2.0)))
14775
14776(define-public java-joda-convert
14777 (package
14778 (name "java-joda-convert")
14779 (version "1.9.2")
14780 (source (origin
14781 (method url-fetch)
14782 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
14783 version ".tar.gz"))
14784 (file-name (string-append name "-" version ".tar.gz"))
14785 (sha256
14786 (base32
14787 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
14788 (build-system ant-build-system)
14789 (arguments
14790 `(#:jar-name (string-append ,name "-" ,version ".jar")
14791 #:source-dir "src/main/java"
14792 #:test-include (list "**/Test*.java")
14793 ;; Contains only interfaces and base classes (no test)
14794 #:test-exclude (list "**/test*/**.java")))
14795 (inputs
14796 (list java-guava))
14797 (native-inputs
14798 (list java-junit java-hamcrest-core))
14799 (home-page "https://www.joda.org/joda-convert/")
14800 (synopsis "Conversion between Objects and Strings")
14801 (description "Joda-Convert provides a small set of classes to aid
14802conversion between Objects and Strings. It is not intended to tackle the
14803wider problem of Object to Object transformation.")
14804 (license license:asl2.0)))
14805
14806(define-public java-joda-time
14807 (package
14808 (name "java-joda-time")
14809 (version "2.9.9")
14810 (source (origin
14811 (method url-fetch)
14812 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
14813 version ".tar.gz"))
14814 (file-name (string-append name "-" version ".tar.gz"))
14815 (sha256
14816 (base32
14817 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
14818 (build-system ant-build-system)
14819 (arguments
14820 `(#:jar-name "java-joda-time.jar"
14821 #:source-dir "src/main/java"
14822 #:test-include (list "**/Test*.java")
14823 ;; There is no runnable test in these files
14824 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
14825 #:phases
14826 (modify-phases %standard-phases
14827 (add-after 'build 'build-resources
14828 (lambda _
14829 (mkdir-p "build/classes/org/joda/time/tz/data")
14830 (mkdir-p "build/classes/org/joda/time/format")
14831 ;; This will produce the following exception:
14832 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
14833 ;; which is normal, because it doesn't exist yet. It still generates
14834 ;; the same file as in the binary one can find on maven.
14835 (invoke "java" "-cp"
14836 (string-append "build/classes:" (getenv "CLASSPATH"))
14837 "org.joda.time.tz.ZoneInfoCompiler"
14838 "-src" "src/main/java/org/joda/time/tz/src"
14839 "-dst" "build/classes/org/joda/time/tz/data"
14840 "africa" "antarctica" "asia" "australasia"
14841 "europe" "northamerica" "southamerica"
14842 "pacificnew" "etcetera" "backward" "systemv")
14843 (for-each (lambda (f)
14844 (copy-file f (string-append
14845 "build/classes/org/joda/time/format/"
14846 (basename f))))
14847 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
14848 #t))
14849 (add-before 'install 'regenerate-jar
14850 (lambda _
14851 ;; We need to regenerate the jar file to add generated data.
14852 (delete-file "build/jar/java-joda-time.jar")
14853 (invoke "ant" "jar")))
14854 (add-before 'check 'copy-test-resources
14855 (lambda _
14856 (mkdir-p "build/test-classes/org/joda/time/tz/data")
14857 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
14858 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
14859 (copy-recursively "src/test/resources" "build/test-classes")
14860 #t)))))
14861 (inputs
14862 (list java-joda-convert))
14863 (native-inputs
14864 (list java-junit java-hamcrest-core tzdata))
14865 (home-page "https://www.joda.org/joda-time/")
14866 (synopsis "Replacement for the Java date and time classes")
14867 (description "Joda-Time is a replacement for the Java date and time
14868classes prior to Java SE 8.")
14869 (license license:asl2.0)))
14870
14871(define-public java-xerces
14872 (package
14873 (name "java-xerces")
14874 (version "2.12.2")
14875 (source
14876 (origin
14877 (method url-fetch)
14878 (uri (string-append "mirror://apache/xerces/j/source/"
14879 "Xerces-J-src." version ".tar.gz"))
14880 (sha256
14881 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
14882 (patches (search-patches
14883 "java-xerces-xjavac_taskdef.patch"
14884 "java-xerces-build_dont_unzip.patch"
14885 "java-xerces-bootclasspath.patch"))))
14886 (build-system ant-build-system)
14887 (arguments
14888 `(#:tests? #f;; Test files are not present
14889 #:test-target "test"
14890 #:jdk ,icedtea-8
14891 #:phases
14892 (modify-phases %standard-phases
14893 (add-after 'unpack 'create-build.properties
14894 (lambda* (#:key inputs #:allow-other-keys)
14895 (let ((jaxp (assoc-ref inputs "java-jaxp"))
14896 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
14897 (with-output-to-file "build.properties"
14898 (lambda _
14899 (format #t
14900 "jar.jaxp = ~a/share/java/jaxp.jar~@
14901 jar.apis-ext = ~a/share/java/jaxp.jar~@
14902 jar.resolver = ~a/share/java/xml-resolver.jar~%"
14903 jaxp jaxp resolver)))
14904 ;; Make xerces use our version of jaxp in tests
14905 (substitute* "build.xml"
14906 (("xml-apis.jar")
14907 (string-append jaxp "/share/java/jaxp.jar"))
14908 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
14909 "${jar.apis}")))
14910 #t))
14911 (replace 'install (install-jars "build")))))
14912 (inputs
14913 (list java-apache-xml-commons-resolver java-jaxp))
14914 (home-page "https://xerces.apache.org/xerces2-j/")
14915 (synopsis "Validating XML parser for Java with DOM level 3 support")
14916 (description "The Xerces2 Java parser is the reference implementation of
14917XNI, the Xerces Native Interface, and also a fully conforming XML Schema
14918processor.
14919
14920Xerces2-J supports the following standards and APIs:
14921
14922@itemize
14923@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
14924@item Namespaces in XML Recommendation
14925@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
14926 Range Recommendations
14927@item Simple API for XML (SAX) 2.0.1 Core and Extension
14928@item Java APIs for XML Processing (JAXP) 1.2.01
14929@item XML Schema 1.0 Structures and Datatypes Recommendations
14930@item Experimental implementation of the Document Object Model (DOM) Level 3
14931 Core and Load/Save Working Drafts
14932@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
14933 Candidate Recommendation
14934@end itemize
14935
14936Xerces is now able to parse documents written according to the XML 1.1
14937Candidate Recommendation, except that it does not yet provide an option to
14938enable normalization checking as described in section 2.13 of this
14939specification. It also handles namespaces according to the XML Namespaces 1.1
14940Candidate Recommendation, and will correctly serialize XML 1.1 documents if
14941the DOM level 3 load/save API's are in use.")
14942 (license license:asl2.0)))
14943
14944(define-public java-jakarta-regexp
14945 (package
14946 (name "java-jakarta-regexp")
14947 (version "1.5")
14948 (source
14949 (origin
14950 (method url-fetch)
14951 (uri (string-append
14952 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
14953 version ".tar.gz"))
14954 (sha256
14955 (base32
14956 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
14957 (build-system ant-build-system)
14958 (arguments
14959 `(#:test-target "test"
14960 #:phases
14961 (modify-phases %standard-phases
14962 (replace 'install
14963 (lambda* (#:key outputs #:allow-other-keys)
14964 (let* ((out (assoc-ref outputs "out"))
14965 (out-share (string-append out "/share/java")))
14966 (mkdir-p out-share)
14967 (for-each (lambda (name)
14968 (install-file name out-share))
14969 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
14970 #t))))))
14971 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
14972 (synopsis "Regular expression parser generator for Java")
14973 (description "@code{jakarta-regexp} is an old regular expression parser
14974generator for Java.")
14975 (license license:asl2.0)))
14976
14977(define-public java-jline
14978 (package
14979 (name "java-jline")
14980 (version "1.0")
14981 (source (origin
14982 (method url-fetch)
14983 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
14984 version ".tar.gz"))
14985 (sha256
14986 (base32
14987 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
14988 (build-system ant-build-system)
14989 (arguments
14990 `(#:jar-name "jline.jar"
14991 #:source-dir "src/main/java"
14992 #:test-dir "src/test"
14993 #:phases
14994 (modify-phases %standard-phases
14995 (add-before 'build 'copy-resources
14996 (lambda _
14997 (copy-recursively "src/main/resources" "build/classes")
14998 #t)))))
14999 (native-inputs
15000 (list java-junit))
15001 (home-page "https://jline.github.io")
15002 (synopsis "Console input handling library")
15003 (description "JLine is a Java library for handling console input. It is
15004similar in functionality to BSD editline and GNU readline but with additional
15005features that bring it on par with the Z shell line editor.")
15006 (license license:bsd-3)))
15007
15008(define-public java-jline-2
15009 (package
15010 (inherit java-jline)
15011 (version "2.14.5")
15012 (source (origin
15013 (method url-fetch)
15014 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
15015 version ".tar.gz"))
15016 (sha256
15017 (base32
15018 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
15019 (arguments
15020 `(#:jdk ,icedtea-8
15021 ,@(package-arguments java-jline)))
15022 (inputs
15023 (list java-jansi-1 java-jansi-native))
15024 (native-inputs
15025 (list java-powermock-modules-junit4
15026 java-powermock-modules-junit4-common
15027 java-powermock-api-easymock
15028 java-powermock-api-support
15029 java-powermock-core
15030 java-powermock-reflect
15031 java-easymock
15032 java-jboss-javassist
15033 java-objenesis
15034 java-hamcrest-core
15035 java-cglib
15036 java-junit
15037 java-hawtjni))))
15038
15039(define-public java-jline-terminal
15040 (package
15041 (name "java-jline-terminal")
15042 (version "3.14.1")
15043 (source (origin
15044 (method git-fetch)
15045 (uri (git-reference
15046 (url "https://github.com/jline/jline3")
15047 (commit (string-append "jline-parent-" version))))
15048 (file-name (git-file-name name version))
15049 (sha256
15050 (base32
15051 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
15052 (build-system ant-build-system)
15053 (arguments
15054 `(#:jar-name "jline-terminal.jar"
15055 #:jdk ,openjdk11
15056 #:tests? #f; TODO: tests fail on *.caps resource lookups
15057 #:source-dir "terminal/src/main/java"
15058 #:test-dir "terminal/src/test"
15059 #:phases
15060 (modify-phases %standard-phases
15061 (add-after 'unpack 'remove-build-file
15062 (lambda _
15063 ;; Conflicts with build directory generated by ant-build-system.
15064 (delete-file "build")))
15065 (add-after 'unpack 'patch-paths
15066 (lambda* (#:key inputs #:allow-other-keys)
15067 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
15068 (("= \"infocmp\"")
15069 (string-append "= \"" (assoc-ref inputs "ncurses")
15070 "/bin/infocmp\""))
15071 (("= \"(s?tty)\"" _ cmd)
15072 (string-append "= \"" (assoc-ref inputs "coreutils")
15073 "/bin/" cmd "\"")))))
15074 ;; Resources are not added to the JAR by ant-build-system.
15075 (add-after 'build 'add-resources
15076 (lambda* (#:key jar-name source-dir #:allow-other-keys)
15077 (let ((build (string-append (getcwd) "/build")))
15078 (with-directory-excursion
15079 (string-append source-dir "/../resources")
15080 (apply invoke "jar" "-uvf"
15081 (string-append build "/jar/" jar-name)
15082 (find-files ".")))))))))
15083 (inputs
15084 (list ncurses)); infocmp
15085 (home-page "https://github.com/jline/jline3")
15086 (synopsis "Java JLine Terminal API and implementations")
15087 (description "JLine is a Java library for handling console input. It is
15088similar in functionality to BSD editline and GNU readline but with additional
15089features that bring it in par with ZSH line editor. People familiar with the
15090readline/editline capabilities for modern shells (such as bash and tcsh) will
15091find most of the command editing features of JLine to be familiar.
15092
15093This package includes the @var{Terminal} API and implementations.")
15094 (license license:bsd-3)))
15095
15096(define-public java-jline-reader
15097 (package
15098 (name "java-jline-reader")
15099 (version "3.14.1")
15100 (source (origin
15101 (method git-fetch)
15102 (uri (git-reference
15103 (url "https://github.com/jline/jline3")
15104 (commit (string-append "jline-parent-" version))))
15105 (file-name (git-file-name name version))
15106 (sha256
15107 (base32
15108 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
15109 (build-system ant-build-system)
15110 (arguments
15111 `(#:jar-name "jline-reader.jar"
15112 #:jdk ,openjdk11
15113 #:source-dir "reader/src/main/java"
15114 #:test-dir "reader/src/test"
15115 #:phases
15116 (modify-phases %standard-phases
15117 (add-before 'build 'remove-build-file
15118 (lambda _
15119 ;; conflicts with build directory generated by ant-build-system
15120 (delete-file "build"))))))
15121 (native-inputs
15122 (list java-junit java-easymock))
15123 (inputs
15124 (list java-jline-terminal))
15125 (home-page "https://github.com/jline/jline3")
15126 (synopsis "Java JLine line reader")
15127 (description "JLine is a Java library for handling console input. It is
15128similar in functionality to BSD editline and GNU readline but with additional
15129features that bring it in par with ZSH line editor. People familiar with the
15130readline/editline capabilities for modern shells (such as bash and tcsh) will
15131find most of the command editing features of JLine to be familiar.
15132
15133This package includes the line reader.")
15134 (license license:bsd-3)))
15135
15136(define-public java-xmlunit
15137 (package
15138 (name "java-xmlunit")
15139 (version "2.5.1")
15140 (source (origin
15141 (method url-fetch)
15142 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
15143 version ".tar.gz"))
15144 (file-name (string-append name "-" version ".tar.gz"))
15145 (sha256
15146 (base32
15147 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
15148 (build-system ant-build-system)
15149 (arguments
15150 `(#:jar-name "java-xmlunit.jar"
15151 #:source-dir "xmlunit-core/src/main/java"
15152 #:test-dir "xmlunit-core/src/test"
15153 #:phases
15154 (modify-phases %standard-phases
15155 (add-before 'check 'copy-test-resources
15156 (lambda* (#:key inputs #:allow-other-keys)
15157 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
15158 #t)))))
15159 (native-inputs
15160 `(("java-junit" ,java-junit)
15161 ("java-mockito-1" ,java-mockito-1)
15162 ("java-hamcrest-all" ,java-hamcrest-all)
15163 ("java-objenesis" ,java-objenesis)
15164 ("java-cglib" ,java-cglib)
15165 ("resources"
15166 ,(origin
15167 (method git-fetch)
15168 (uri (git-reference
15169 (url "https://github.com/xmlunit/test-resources")
15170 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
15171 (file-name "java-xmlunit-test-resources")
15172 (sha256
15173 (base32
15174 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
15175 (home-page "https://www.xmlunit.org/")
15176 (synopsis "XML output testing")
15177 (description "XMLUnit provides you with the tools to verify the XML you
15178emit is the one you want to create. It provides helpers to validate against
15179an XML Schema, assert the values of XPath queries or compare XML documents
15180against expected outcomes.")
15181 (license license:asl2.0)))
15182
15183(define-public java-xmlunit-legacy
15184 (package
15185 (inherit java-xmlunit)
15186 (name "java-xmlunit-legacy")
15187 (arguments
15188 `(#:jar-name "java-xmlunit-legacy.jar"
15189 #:source-dir "xmlunit-legacy/src/main/java"
15190 #:test-dir "xmlunit-legacy/src/test"))
15191 (inputs
15192 (list java-xmlunit java-junit))
15193 (native-inputs
15194 `(("java-mockito-1" ,java-mockito-1)))))
15195
15196(define-public java-xmlunit-matchers
15197 (package
15198 (inherit java-xmlunit)
15199 (name "java-xmlunit-matchers")
15200 (arguments
15201 `(#:jar-name "java-xmlunit-matchers.jar"
15202 #:source-dir "xmlunit-matchers/src/main/java"
15203 #:test-dir "xmlunit-matchers/src/test"
15204 #:test-exclude
15205 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
15206 (list "**/ValidationMatcherTest.java")
15207 #:phases
15208 (modify-phases %standard-phases
15209 (add-before 'build 'copy-test-class
15210 (lambda _
15211 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
15212 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
15213 #t))
15214 (add-before 'build 'fix-test-resources-path
15215 (lambda _
15216 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
15217 (("../test-resources") "test-resources"))
15218 #t))
15219 (add-before 'check 'copy-test-resources
15220 (lambda* (#:key inputs #:allow-other-keys)
15221 (copy-recursively (assoc-ref inputs "resources") "test-resources")
15222 #t)))))
15223 (inputs
15224 (list java-xmlunit java-junit))))
15225
15226(define-public java-openchart2
15227 (package
15228 (name "java-openchart2")
15229 (version "1.4.3")
15230 (source (origin
15231 (method url-fetch)
15232 (uri (string-append "http://download.approximatrix.com/openchart2/"
15233 "openchart2-" version ".source.zip"))
15234 (sha256
15235 (base32
15236 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
15237 (build-system ant-build-system)
15238 (arguments
15239 `(#:test-target "test"
15240 #:phases
15241 (modify-phases %standard-phases
15242 (add-after 'unpack 'fix-junit-errors
15243 (lambda _
15244 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
15245 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
15246 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
15247 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
15248 "model/DefaultChartDataModelConstraintsTest.java"
15249 "model/MultiScatterDataModelConstraintsTest.java"
15250 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
15251 (("(assertEquals[^;]+);" before _)
15252 (string-append (string-drop-right before 2) ", 1E-6);"))))
15253 #t))
15254 (replace 'install (install-jars ".")))))
15255 (native-inputs
15256 (list unzip java-junit java-hamcrest-core))
15257 (home-page "https://approximatrix.com/products/openchart2/")
15258 (synopsis "Simple plotting for Java")
15259 (description "Openchart2 provides a simple, yet powerful, interface for
15260Java programmers to create two-dimensional charts and plots. The library
15261features an assortment of graph styles, including advanced scatter plots, bar
15262graphs, and pie charts.")
15263 (license license:lgpl2.1+)))
15264
15265(define-public java-commons-httpclient
15266 (package
15267 (name "java-commons-httpclient")
15268 (version "3.1")
15269 (source (origin
15270 (method url-fetch)
15271 (uri (string-append "mirror://apache/httpcomponents/"
15272 "commons-httpclient/source/commons-httpclient-"
15273 version "-src.tar.gz"))
15274 (sha256
15275 (base32
15276 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
15277 (build-system ant-build-system)
15278 (arguments
15279 `(#:build-target "compile"
15280 #:test-target "test"
15281 #:tests? #f; requires junit-textui (junit 3)
15282 #:phases
15283 (modify-phases %standard-phases
15284 (add-before 'build 'fix-accent
15285 (lambda _
15286 (for-each (lambda (file)
15287 (with-fluids ((%default-port-encoding "ISO-8859-1"))
15288 (substitute* file
15289 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
15290 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
15291 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
15292 "src/test/org/apache/commons/httpclient/TestHttps.java"
15293 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
15294 #t))
15295 (replace 'install
15296 (lambda* (#:key outputs #:allow-other-keys)
15297 (invoke "ant" "dist"
15298 (string-append "-Ddist.home=" (assoc-ref outputs "out")
15299 "/share/java"))
15300 #t)))))
15301 (propagated-inputs
15302 `(("java-commons-logging" ,java-commons-logging-minimal)
15303 ("java-commons-codec" ,java-commons-codec)))
15304 (home-page "https://hc.apache.org")
15305 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
15306 (description "This package contains an HTTP/1.1 compliant HTTP agent
15307implementation. It also provides reusable components for client-side
15308authentication, HTTP state management, and HTTP connection management.")
15309 (license license:asl2.0)))
15310
15311(define-public java-commons-vfs
15312 (package
15313 (name "java-commons-vfs")
15314 (version "2.2")
15315 (source (origin
15316 (method url-fetch)
15317 (uri (string-append "mirror://apache/commons/vfs/source/"
15318 "commons-vfs2-distribution-" version "-src.tar.gz"))
15319 (file-name (string-append name "-" version ".tar.gz"))
15320 (sha256
15321 (base32
15322 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
15323 (modules '((guix build utils)))
15324 (snippet
15325 '(begin
15326 (for-each delete-file
15327 (find-files "." "\\.jar$"))
15328 #t))))
15329 (build-system ant-build-system)
15330 (arguments
15331 `(#:jar-name "commons-vfs.jar"
15332 #:source-dir "commons-vfs2/src/main/java"
15333 #:test-dir "commons-vfs2/src/test"
15334 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
15335 #:tests? #f
15336 #:phases
15337 (modify-phases %standard-phases
15338 (add-before 'build 'remove-hadoop-and-webdav
15339 ; Remove these files as they are not required and depend on difficult
15340 ; packages.
15341 (lambda _
15342 (for-each delete-file-recursively
15343 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
15344 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
15345 #t)))))
15346 (inputs
15347 (list java-commons-collections4
15348 java-commons-compress
15349 java-commons-httpclient
15350 java-commons-logging-minimal
15351 java-commons-net
15352 java-jsch))
15353 (home-page "https://commons.apache.org/proper/commons-vfs/")
15354 (synopsis "Java file system library")
15355 (description "Commons VFS provides a single API for accessing various
15356different file systems. It presents a uniform view of the files from various
15357different sources, such as the files on local disk, on an HTTP server, or
15358inside a Zip archive.")
15359 (license license:asl2.0)))
15360
15361(define-public java-jakarta-oro
15362 (package
15363 (name "java-jakarta-oro")
15364 (version "2.0.8")
15365 (source (origin
15366 (method url-fetch)
15367 (uri (string-append "mirror://apache/jakarta/oro/"
15368 "jakarta-oro-" version ".tar.gz"))
15369 (sha256
15370 (base32
15371 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
15372 (modules '((guix build utils)))
15373 (snippet
15374 `(begin
15375 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
15376 #t))))
15377 (build-system ant-build-system)
15378 (arguments
15379 `(#:build-target "package"
15380 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
15381 #:tests? #f; tests are run as part of the build process
15382 #:phases
15383 (modify-phases %standard-phases
15384 (replace 'install
15385 (install-jars ,(string-append "jakarta-oro-" version))))))
15386 (home-page "https://jakarta.apache.org/oro/")
15387 (synopsis "Text-processing for Java")
15388 (description "The Jakarta-ORO Java classes are a set of text-processing
15389Java classes that provide Perl5 compatible regular expressions, AWK-like
15390regular expressions, glob expressions, and utility classes for performing
15391substitutions, splits, filtering filenames, etc. This library is the successor
15392of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
15393from ORO, Inc.")
15394 (license license:asl1.1)))
15395
15396(define-public java-native-access
15397 (package
15398 (name "java-native-access")
15399 (version "4.5.1")
15400 (source (origin
15401 (method url-fetch)
15402 (uri (string-append "https://github.com/java-native-access/jna/"
15403 "archive/" version ".tar.gz"))
15404 (file-name (string-append name "-" version ".tar.gz"))
15405 (sha256
15406 (base32
15407 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
15408 (modules '((guix build utils)))
15409 (snippet
15410 `(begin
15411 (for-each delete-file (find-files "." ".*.jar"))
15412 (delete-file-recursively "native/libffi")
15413 (delete-file-recursively "dist")
15414 #t))))
15415 (build-system ant-build-system)
15416 (arguments
15417 `(#:tests? #f; FIXME: tests require reflections.jar
15418 #:test-target "test"
15419 #:make-flags (list "-Ddynlink.native=true")
15420 #:phases
15421 (modify-phases %standard-phases
15422 (add-before 'build 'fix-build.xml
15423 (lambda* (#:key inputs #:allow-other-keys)
15424 (substitute* "build.xml"
15425 ;; Since we removed the bundled ant.jar, give the correct path
15426 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
15427 ;; We removed generated native libraries. We can only rebuild one
15428 ;; so don't fail if we can't find a native library for another architecture.
15429 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
15430 ;; Copy test dependencies
15431 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
15432 "lib/junit.jar")
15433 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
15434 "jar$"))
15435 "lib/hamcrest-core.jar")
15436 ;; FIXME: once reflections.jar is built, copy it to lib/test.
15437 #t))
15438 (add-before 'build 'build-native
15439 (lambda _
15440 (invoke "ant" "-Ddynlink.native=true" "native")
15441 #t))
15442 (replace 'install
15443 (install-jars "build")))))
15444 (inputs
15445 (list libffi libx11 libxt))
15446 (native-inputs
15447 (list gcc-7 java-junit java-hamcrest-core))
15448 (home-page "https://github.com/java-native-access/jna")
15449 (synopsis "Access to native shared libraries from Java")
15450 (description "JNA provides Java programs easy access to native shared
15451libraries without writing anything but Java code - no JNI or native code is
15452required. JNA allows you to call directly into native functions using natural
15453Java method invocation.")
15454 ;; Java Native Access project (JNA) is dual-licensed under 2
15455 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
15456 (license (list
15457 license:asl2.0
15458 license:lgpl2.1+))))
15459
15460(define-public java-native-access-5.14.0
15461 (package
15462 (inherit java-native-access)
15463 (name "java-native-access")
15464 (version "5.14.0")
15465 (source
15466 (origin
15467 (method git-fetch)
15468 (uri (git-reference
15469 (url "https://github.com/java-native-access/jna.git")
15470 (commit version)))
15471 (file-name (git-file-name name version))
15472 (sha256
15473 (base32 "0blf6ka69c3zywa74fjh8gykhzn3vgbvlxzy3v9znncb2a97v6bb"))
15474 (modules '((guix build utils)))
15475 (snippet
15476 `(begin
15477 (for-each delete-file (find-files "." ".*.jar"))
15478 (delete-file-recursively "native/libffi")
15479 (delete-file-recursively "dist")))))
15480 (arguments
15481 `(#:tests? #f
15482 #:test-target "test"
15483 #:make-flags (list "-Ddynlink.native=true")
15484 #:phases
15485 (modify-phases %standard-phases
15486 (add-before 'build 'fix-build.xml
15487 (lambda* (#:key inputs #:allow-other-keys)
15488 (let ((ant-jar (search-input-file inputs "/lib/ant.jar"))
15489 (asm-jar (car (find-files (assoc-ref inputs "java-asm")
15490 "asm.*\\.jar$"))))
15491 (substitute* "build.xml"
15492 (("lib/ant\\.jar") ant-jar)
15493 (("\\$lib/asm-8\\.0\\.1\\.jar") asm-jar)
15494 (("lib/asm-8\\.0\\.1\\.jar") asm-jar)
15495 (("<zipfileset") "<zipfileset erroronmissingarchive=\"false\""))
15496 (substitute* "build-ant-tools.xml"
15497 (("lib/ant\\.jar") ant-jar)
15498 (("lib/asm-8\\.0\\.1\\.jar") asm-jar)))
15499 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
15500 "lib/junit.jar")
15501 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
15502 "jar$"))
15503 "lib/hamcrest-core.jar")))
15504 (add-before 'build 'build-native
15505 (lambda _
15506 (invoke "ant" "-Ddynlink.native=true" "native")))
15507 (add-before 'install 'create-pom
15508 (generate-pom.xml "pom.xml" "net.java.dev.jna"
15509 "jna-jpms" ,version))
15510 (add-before 'install 'keep-only-jna-jpms
15511 (lambda _
15512 ;; The build produces multiple jars. install-from-pom
15513 ;; expects exactly one. Remove all except jna-jpms.jar.
15514 (for-each delete-file
15515 (filter (lambda (f)
15516 (not (string-contains f "jna-jpms")))
15517 (find-files "build" "\\.jar$")))
15518 (for-each delete-file
15519 (find-files "lib" "\\.jar$"))))
15520 (replace 'install
15521 (install-from-pom "pom.xml")))))
15522 (native-inputs
15523 (modify-inputs (package-native-inputs java-native-access)
15524 (prepend java-asm-9)))))
15525
15526(define-public java-native-access-platform
15527 (package
15528 (inherit java-native-access)
15529 (name "java-native-access-platform")
15530 (arguments
15531 `(#:test-target "test"
15532 #:tests? #f; require jna-test.jar
15533 #:phases
15534 (modify-phases %standard-phases
15535 (add-before 'build 'chdir
15536 (lambda _
15537 (chdir "contrib/platform")
15538 #t))
15539 (add-after 'chdir 'fix-ant
15540 (lambda* (#:key inputs #:allow-other-keys)
15541 (substitute* "nbproject/project.properties"
15542 (("../../build/jna.jar")
15543 (search-input-file inputs "/share/java/jna.jar"))
15544 (("../../lib/hamcrest-core-.*.jar")
15545 (car (find-files (assoc-ref inputs "java-hamcrest-core")
15546 "jar$")))
15547 (("../../lib/junit.jar")
15548 (car (find-files (assoc-ref inputs "java-junit")
15549 "jar$"))))
15550 #t))
15551 (replace 'install
15552 (install-jars "dist")))))
15553 (inputs
15554 (list java-native-access))
15555 (synopsis "Cross-platform mappings for jna")
15556 (description "java-native-access-platform has cross-platform mappings
15557and mappings for a number of commonly used platform functions, including a
15558large number of Win32 mappings as well as a set of utility classes that
15559simplify native access.")))
15560
15561(define-public java-native-access-platform-5.14.0
15562 (package
15563 (inherit java-native-access-platform)
15564 (name "java-native-access-platform")
15565 (version (package-version java-native-access-5.14.0))
15566 (source (package-source java-native-access-5.14.0))
15567 (arguments
15568 `(#:build-target "jar"
15569 #:tests? #f
15570 #:modules ((guix build ant-build-system)
15571 (guix build utils)
15572 (guix build java-utils)
15573 (sxml simple))
15574 #:phases
15575 (modify-phases %standard-phases
15576 (add-before 'build 'chdir
15577 (lambda _
15578 (chdir "contrib/platform")
15579 #t))
15580 (add-after 'chdir 'fix-ant
15581 (lambda* (#:key inputs #:allow-other-keys)
15582 (let ((jna-jar (car (find-files (assoc-ref inputs "java-native-access")
15583 "jna-jpms.*\\.jar$")))
15584 (asm-jar (car (find-files (assoc-ref inputs "java-asm")
15585 "asm.*\\.jar$")))
15586 (ant-jar (search-input-file inputs "/lib/ant.jar")))
15587 (mkdir-p "../../build")
15588 (mkdir-p "../../lib")
15589 (copy-file jna-jar "../../build/jna.jar")
15590 (copy-file asm-jar "../../lib/asm-8.0.1.jar")
15591 (copy-file ant-jar "../../lib/ant.jar")
15592 (substitute* "build.xml"
15593 (("../../build/jna\\.jar") jna-jar)
15594 (("../../lib/asm-8\\.0\\.1\\.jar") asm-jar))
15595 (substitute* "../../build-ant-tools.xml"
15596 (("lib/ant\\.jar") ant-jar)
15597 (("lib/asm-8\\.0\\.1\\.jar") asm-jar))
15598 #t)))
15599 (add-before 'install 'create-pom
15600 (lambda _
15601 (call-with-output-file "pom.xml"
15602 (lambda (port)
15603 (sxml->xml
15604 `(*TOP*
15605 (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
15606 (project
15607 (modelVersion "4.0.0")
15608 (groupId "net.java.dev.jna")
15609 (artifactId "jna-platform-jpms")
15610 (version ,,version)
15611 (dependencies
15612 (dependency
15613 (groupId "net.java.dev.jna")
15614 (artifactId "jna-jpms")
15615 (version ,,version)))))
15616 port)))))
15617 (add-before 'install 'keep-only-jna-platform-jpms
15618 (lambda _
15619 (for-each delete-file
15620 (filter (lambda (f)
15621 (not (string-contains f "jna-platform-jpms")))
15622 (append (find-files "build" "\\.jar$")
15623 (find-files "dist" "\\.jar$"))))))
15624 (replace 'install
15625 (install-from-pom "pom.xml")))))
15626 (native-inputs
15627 (modify-inputs (package-native-inputs java-native-access-platform)
15628 (prepend java-asm-9)))
15629 (inputs
15630 (list java-native-access-5.14.0))))
15631
15632(define-public java-jsch-agentproxy-core
15633 (package
15634 (name "java-jsch-agentproxy-core")
15635 (version "0.0.8")
15636 (source (origin
15637 (method url-fetch)
15638 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
15639 version ".tar.gz"))
15640 (file-name (string-append name "-" version ".tar.gz"))
15641 (sha256
15642 (base32
15643 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
15644 (build-system ant-build-system)
15645 (arguments
15646 `(#:jar-name "jsch-agentproxy-core.jar"
15647 #:source-dir "jsch-agent-proxy-core/src/main/java"
15648 #:tests? #f)); no tests
15649 (home-page "https://github.com/ymnk/jsch-agent-proxy")
15650 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
15651 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15652and Pageant included Putty. It will be easily integrated into JSch, and users
15653will be allowed to use these programs for authentication.")
15654 (license license:bsd-3)))
15655
15656(define-public java-jsch-agentproxy-sshagent
15657 (package
15658 (inherit java-jsch-agentproxy-core)
15659 (name "java-jsch-agentproxy-sshagent")
15660 (arguments
15661 `(#:jar-name "jsch-agentproxy-sshagent.jar"
15662 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
15663 #:tests? #f)); no tests
15664 (inputs
15665 (list java-jsch-agentproxy-core))
15666 (synopsis "Proxy to ssh-agent")
15667 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15668and Pageant included in Putty. This component contains the code for a proxy to
15669ssh-agent.")))
15670
15671(define-public java-jsch-agentproxy-usocket-jna
15672 (package
15673 (inherit java-jsch-agentproxy-core)
15674 (name "java-jsch-agentproxy-usocket-jna")
15675 (arguments
15676 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
15677 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
15678 #:tests? #f)); no tests
15679 (inputs
15680 (list java-jsch-agentproxy-core java-native-access))
15681 (synopsis "USocketFactory implementation using JNA")
15682 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15683and Pageant included in Putty. This component contains an implementation of
15684USocketFactory using @dfn{JNA} (Java Native Access).")))
15685
15686(define-public java-jsch-agentproxy-pageant
15687 (package
15688 (inherit java-jsch-agentproxy-core)
15689 (name "java-jsch-agentproxy-pageant")
15690 (arguments
15691 `(#:jar-name "jsch-agentproxy-pageant.jar"
15692 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
15693 #:tests? #f)); no tests
15694 (inputs
15695 (list java-jsch-agentproxy-core java-native-access
15696 java-native-access-platform))
15697 (synopsis "Proxy to pageant")
15698 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15699and Pageant included in Putty. This component contains the code for a proxy to
15700pageant.")))
15701
15702(define-public java-jsch-agentproxy-usocket-nc
15703 (package
15704 (inherit java-jsch-agentproxy-core)
15705 (name "java-jsch-agentproxy-usocket-nc")
15706 (arguments
15707 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
15708 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
15709 #:tests? #f)); no tests
15710 (inputs
15711 (list java-jsch-agentproxy-core))
15712 (synopsis "USocketFactory implementation using netcat")
15713 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15714and Pageant included in Putty. This component contains an implementation of
15715USocketFactory using netcat.")))
15716
15717(define-public java-jsch-agentproxy-connector-factory
15718 (package
15719 (inherit java-jsch-agentproxy-core)
15720 (name "java-jsch-agentproxy-connector-factory")
15721 (arguments
15722 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
15723 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
15724 #:tests? #f)); no tests
15725 (inputs
15726 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
15727 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
15728 java-jsch-agentproxy-usocket-nc))
15729 (synopsis "Connector factory for jsch agent proxy")
15730 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15731and Pageant included in Putty. This component contains a connector factory.")))
15732
15733(define-public java-jsch-agentproxy-jsch
15734 (package
15735 (inherit java-jsch-agentproxy-core)
15736 (name "java-jsch-agentproxy-jsch")
15737 (arguments
15738 `(#:jar-name "jsch-agentproxy-jsch.jar"
15739 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
15740 #:tests? #f)); no tests
15741 (inputs
15742 (list java-jsch java-jsch-agentproxy-core))
15743 (synopsis "JSch integration library for agentproxy")
15744 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15745and Pageant included in Putty. This component contains a library to use
15746jsch-agent-proxy with JSch.")))
15747
15748(define-public java-apache-ivy
15749 (package
15750 (name "java-apache-ivy")
15751 (version "2.4.0")
15752 (source (origin
15753 (method url-fetch)
15754 (uri (string-append "mirror://apache/ant/ivy/" version
15755 "/apache-ivy-" version "-src.tar.gz"))
15756 (sha256
15757 (base32
15758 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
15759 (patches
15760 (search-patches
15761 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
15762 (build-system ant-build-system)
15763 (arguments
15764 `(#:jar-name "ivy.jar"
15765 #:tests? #f
15766 #:phases
15767 (modify-phases %standard-phases
15768 (add-before 'build 'remove-example
15769 (lambda _
15770 (delete-file-recursively "src/example")
15771 #t))
15772 (add-before 'build 'copy-resources
15773 (lambda _
15774 (with-directory-excursion "src/java"
15775 (for-each (lambda (file)
15776 (install-file file (string-append "../../build/classes/" (dirname file))))
15777 (append
15778 (find-files "." ".*.css")
15779 (find-files "." ".*.ent")
15780 (find-files "." ".*.html")
15781 (find-files "." ".*.properties")
15782 (find-files "." ".*.xsd")
15783 (find-files "." ".*.xsl")
15784 (find-files "." ".*.xml"))))
15785 #t))
15786 (add-before 'build 'fix-vfs
15787 (lambda _
15788 (substitute*
15789 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
15790 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
15791 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
15792 #t))
15793 (add-before 'install 'copy-manifest
15794 (lambda _
15795 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
15796 #t))
15797 (add-before 'install 'repack
15798 (lambda _
15799 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
15800 "-C" "build/classes" ".")))
15801 (add-after 'install 'install-bin
15802 (lambda* (#:key outputs #:allow-other-keys)
15803 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
15804 (ivy (string-append bin "/ivy"))
15805 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
15806 (mkdir-p bin)
15807 (with-output-to-file ivy
15808 (lambda _
15809 (display (string-append
15810 "#!" (which "sh") "\n"
15811 "if [[ -z $CLASSPATH ]]; then\n"
15812 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
15813 "else\n"
15814 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
15815 "fi\n"
15816 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
15817 (chmod ivy #o755)
15818 #t))))))
15819 (inputs
15820 (list java-bouncycastle
15821 java-commons-cli
15822 java-commons-collections
15823 java-commons-httpclient
15824 java-commons-lang
15825 java-commons-vfs
15826 java-jakarta-oro
15827 java-jsch
15828 java-jsch-agentproxy-core
15829 java-jsch-agentproxy-connector-factory
15830 java-jsch-agentproxy-jsch
15831 java-junit))
15832 (home-page "https://ant.apache.org/ivy")
15833 (synopsis "Dependency manager for the Java programming language")
15834 (description "Ivy is a tool for managing (recording, tracking, resolving
15835and reporting) project dependencies. It is characterized by the following:
15836
15837@itemize
15838@item flexibility and configurability - Ivy is essentially process agnostic
15839 and is not tied to any methodology or structure. Instead it provides the
15840 necessary flexibility and configurability to be adapted to a broad range
15841 of dependency management and build processes.
15842@item tight integration with Apache Ant - while available as a standalone tool,
15843 Ivy works particularly well with Apache Ant providing a number of
15844 powerful Ant tasks ranging from dependency resolution to dependency
15845 reporting and publication.
15846@end itemize")
15847 (license license:asl2.0)))
15848
15849(define-public java-eclipse-sisu-inject
15850 (package
15851 (name "java-eclipse-sisu-inject")
15852 (version "0.3.5")
15853 (source (origin
15854 (method git-fetch)
15855 (uri (git-reference
15856 (url "https://github.com/eclipse/sisu.inject/")
15857 (commit (string-append "releases/" version))))
15858 (file-name (git-file-name name version))
15859 (sha256
15860 (base32
15861 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
15862 (build-system ant-build-system)
15863 (arguments
15864 `(#:jar-name "eclipse-sisu-inject.jar"
15865 #:source-dir "org.eclipse.sisu.inject/src"
15866 #:tests? #f; no tests
15867 #:phases
15868 (modify-phases %standard-phases
15869 (replace 'install
15870 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
15871 (propagated-inputs
15872 (list java-guice java-sisu-inject-parent-pom))
15873 (inputs
15874 (list java-guice-servlet
15875 java-javax-inject
15876 java-javaee-servletapi
15877 java-junit
15878 java-slf4j-api
15879 java-jsr305
15880 java-jsr250
15881 java-cdi-api
15882 java-osgi-framework
15883 java-osgi-util-tracker
15884 java-testng))
15885 (home-page "https://www.eclipse.org/sisu/")
15886 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
15887 (description "Sisu is a modular JSR330-based container that supports
15888classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
15889Google-Guice to perform dependency injection and provide the core JSR330
15890support, but removes the need to write explicit bindings in Guice modules.
15891Integration with other containers via the Eclipse Extension Registry and the
15892OSGi Service Registry is a goal of this project.")
15893 (license license:epl1.0)))
15894
15895(define java-sisu-inject-parent-pom
15896 (package
15897 (inherit java-eclipse-sisu-inject)
15898 (name "java-sisu-inject-parent-pom")
15899 (arguments
15900 `(#:tests? #f
15901 #:phases
15902 (modify-phases %standard-phases
15903 (delete 'configure)
15904 (delete 'build)
15905 (replace 'install
15906 (install-pom-file "pom.xml")))))
15907 (propagated-inputs '())))
15908
15909(define-public java-eclipse-sisu-plexus
15910 (package
15911 (name "java-eclipse-sisu-plexus")
15912 (version "0.3.5")
15913 (source (origin
15914 (method git-fetch)
15915 (uri (git-reference
15916 (url "https://github.com/eclipse/sisu.plexus")
15917 (commit (string-append "releases/" version))))
15918 (file-name (git-file-name name version))
15919 (sha256
15920 (base32
15921 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
15922 (modules '((guix build utils)))
15923 (snippet
15924 '(begin
15925 (for-each delete-file (find-files "." ".*.jar"))
15926 (rename-file "org.eclipse.sisu.plexus.tests/src"
15927 "org.eclipse.sisu.plexus.tests/java")
15928 #t))))
15929 (build-system ant-build-system)
15930 (arguments
15931 `(#:jar-name "eclipse-sisu-plexus.jar"
15932 #:source-dir "org.eclipse.sisu.plexus/src"
15933 #:test-dir "org.eclipse.sisu.plexus.tests"
15934 #:test-exclude
15935 (list
15936 ;; This test fails probably because we can't generate the necessary
15937 ;; meta-inf files.
15938 "**/PlexusLoggingTest.*"
15939 ;; FIXME: This test fails because of some injection error
15940 "**/PlexusRequirementTest.*")
15941 #:jdk ,icedtea-8
15942 #:phases
15943 (modify-phases %standard-phases
15944 (add-before 'build 'copy-resources
15945 (lambda _
15946 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
15947 "build/classes/META-INF/plexus")
15948 #t))
15949 (add-before 'check 'build-test-jar
15950 (lambda _
15951 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
15952 (mkdir "build")
15953 (with-directory-excursion "java"
15954 (apply invoke "javac" "-cp"
15955 (string-append (getenv "CLASSPATH")
15956 ":../../../../../build/classes")
15957 (find-files "." ".*.java"))
15958 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
15959 (find-files "." ".*.jar")))
15960 (mkdir-p "build/META-INF/plexus")
15961 (copy-file "resources/META-INF/plexus/components.xml"
15962 "build/META-INF/plexus/components.xml")
15963 (with-directory-excursion "build"
15964 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
15965 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
15966 (copy-recursively "META-INF" "../build/test-classes/META-INF")
15967 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
15968 (("resources/component-jar")
15969 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
15970 #t))
15971 (replace 'install
15972 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
15973 (propagated-inputs
15974 (list java-jsr250
15975 java-plexus-classworlds
15976 java-plexus-utils
15977 java-plexus-component-annotations
15978 java-cdi-api
15979 java-eclipse-sisu-inject
15980 java-sisu-plexus-parent-pom))
15981 (inputs
15982 (list java-osgi-framework
15983 java-slf4j-api
15984 java-javax-inject
15985 java-guice
15986 java-guava
15987 java-aopalliance
15988 java-cglib))
15989 (native-inputs
15990 (list java-junit))
15991 (home-page "https://www.eclipse.org/sisu/")
15992 (synopsis "Plexus support for the sisu container")
15993 (description "Sisu is a modular JSR330-based container that supports
15994classpath scanning, auto-binding, and dynamic auto-wiring. This package
15995adds Plexus support to the Sisu-Inject container.")
15996 (license license:epl1.0)))
15997
15998(define java-sisu-plexus-parent-pom
15999 (package
16000 (inherit java-eclipse-sisu-plexus)
16001 (name "java-sisu-plexus-parent-pom")
16002 (arguments
16003 `(#:tests? #f
16004 #:phases
16005 (modify-phases %standard-phases
16006 (delete 'configure)
16007 (delete 'build)
16008 (replace 'install
16009 (install-pom-file "pom.xml")))))
16010 (propagated-inputs
16011 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
16012
16013(define-public java-commons-compiler
16014 (package
16015 (name "java-commons-compiler")
16016 (version "3.0.8")
16017 (source (origin
16018 (method git-fetch)
16019 (uri (git-reference
16020 (url "https://github.com/janino-compiler/janino")
16021 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
16022 (file-name (string-append name "-" version))
16023 (sha256
16024 (base32
16025 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
16026 (modules '((guix build utils)))
16027 (snippet
16028 '(begin
16029 (for-each delete-file
16030 (find-files "." "\\.jar$"))
16031 #t))))
16032 (build-system ant-build-system)
16033 (arguments
16034 `(#:jar-name "commons-compiler.jar"
16035 #:source-dir "commons-compiler/src/main"
16036 #:tests? #f)); no tests
16037 (home-page "https://github.com/janino-compiler/janino")
16038 (synopsis "Java compiler")
16039 (description "Commons-compiler contains an API for janino, including the
16040@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
16041and @code{ISimpleCompiler} interfaces.")
16042 (license license:bsd-3)))
16043
16044(define-public java-janino
16045 (package
16046 (inherit java-commons-compiler)
16047 (name "java-janino")
16048 (arguments
16049 `(#:jar-name "janino.jar"
16050 #:source-dir "src/main/java"
16051 #:phases
16052 (modify-phases %standard-phases
16053 (add-before 'configure 'chdir
16054 (lambda _
16055 (chdir "janino")
16056 #t)))))
16057 (inputs
16058 (list java-commons-compiler))
16059 (native-inputs
16060 (list java-junit java-hamcrest-core))
16061 (description "Janino is a Java compiler. Janino can compile a set of
16062source files to a set of class files like @code{javac}, but also compile a
16063Java expression, block, class body or source file in memory, load the bytecode
16064and execute it directly in the same JVM. @code{janino} can also be used for
16065static code analysis or code manipulation.")))
16066
16067(define-public java-logback-core
16068 (package
16069 (name "java-logback-core")
16070 (version "1.2.3")
16071 (source (origin
16072 (method git-fetch)
16073 (uri (git-reference
16074 (url "https://github.com/qos-ch/logback/")
16075 (commit (string-append "v_" version))))
16076 (file-name (git-file-name name version))
16077 (sha256
16078 (base32
16079 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
16080 (modules '((guix build utils)))
16081 (snippet
16082 '(delete-file-recursively "logback-access/lib"))))
16083 (build-system ant-build-system)
16084 (arguments
16085 `(#:jar-name "logback.jar"
16086 #:source-dir "src/main/java"
16087 #:test-dir "src/test"
16088 #:test-exclude
16089 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
16090 ;; which creates FastClasses
16091 (list "**/AllCoreTest.*"
16092 "**/AutoFlushingObjectWriterTest.*"
16093 "**/PackageTest.*"
16094 "**/ResilientOutputStreamTest.*"
16095 ;; And we still don't want to run abstract classes
16096 "**/Abstract*.*")
16097 #:phases
16098 (modify-phases %standard-phases
16099 (add-before 'configure 'chdir
16100 (lambda _ (chdir "logback-core"))))))
16101 (inputs
16102 (list java-javax-mail
16103 java-javaee-servletapi
16104 java-commons-compiler
16105 java-janino))
16106 (native-inputs
16107 (list java-junit
16108 java-hamcrest-core
16109 java-mockito-1
16110 java-cglib
16111 java-objenesis
16112 java-joda-time))
16113 (home-page "https://logback.qos.ch")
16114 (synopsis "Logging for java")
16115 (description "Logback is intended as a successor to the popular log4j project.
16116This module lays the groundwork for the other two modules.")
16117 ;; Either epl1.0 or lgpl2.1
16118 (license (list license:epl1.0
16119 license:lgpl2.1))))
16120
16121(define-public java-logback-classic
16122 (package
16123 (inherit java-logback-core)
16124 (name "java-logback-classic")
16125 (arguments
16126 `(#:jar-name "logback-classic.jar"
16127 #:source-dir "src/main/java"
16128 #:test-dir "src/test"
16129 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
16130 #:jdk ,icedtea-8
16131 #:phases
16132 (modify-phases %standard-phases
16133 (add-before 'configure 'chdir
16134 (lambda _
16135 (chdir "logback-classic")
16136 #t))
16137 (replace 'build
16138 (lambda* (#:key inputs #:allow-other-keys)
16139 (mkdir-p "build/classes")
16140 (setenv "CLASSPATH"
16141 (string-join
16142 (apply append (map (lambda (input)
16143 (find-files (assoc-ref inputs input)
16144 ".*.jar"))
16145 '("java-logback-core" "java-slf4j-api"
16146 "java-commons-compiler" "java-javaee-servletapi"
16147 "groovy")))
16148 ":"))
16149 (apply invoke "groovyc" "-d" "build/classes" "-j"
16150 (find-files "src/main/" ".*\\.(groovy|java)$"))
16151 (invoke "ant" "jar")
16152 #t)))))
16153 (inputs
16154 (modify-inputs inputs
16155 (prepend java-logback-core java-slf4j-api)))
16156 (native-inputs
16157 (list groovy))
16158 (description "Logback is intended as a successor to the popular log4j project.
16159This module can be assimilated to a significantly improved version of log4j.
16160Moreover, @code{logback-classic} natively implements the slf4j API so that you
16161can readily switch back and forth between logback and other logging frameworks
16162such as log4j or @code{java.util.logging} (JUL).")))
16163
16164(define-public java-jgit
16165 (package
16166 (name "java-jgit")
16167 (version "4.7.0.201704051617-r")
16168 (source (origin
16169 (method url-fetch)
16170 (uri (string-append "https://repo1.maven.org/maven2/"
16171 "org/eclipse/jgit/org.eclipse.jgit/"
16172 version "/org.eclipse.jgit-"
16173 version "-sources.jar"))
16174 (sha256
16175 (base32
16176 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
16177 (build-system ant-build-system)
16178 (arguments
16179 `(#:tests? #f ; There are no tests to run.
16180 #:jar-name "jgit.jar"
16181 ;; JGit must be built with a JDK supporting Java 8.
16182 #:jdk ,icedtea-8
16183 ;; Target our older default JDK.
16184 #:make-flags (list "-Dtarget=1.7")
16185 #:phases
16186 (modify-phases %standard-phases
16187 ;; The jar file generated by the default build.xml does not include
16188 ;; the text properties files, so we need to add them.
16189 (add-after 'build 'add-properties
16190 (lambda* (#:key jar-name #:allow-other-keys)
16191 (with-directory-excursion "src"
16192 (apply invoke "jar" "-uf"
16193 (string-append "../build/jar/" jar-name)
16194 (find-files "." "\\.properties$")))
16195 #t)))))
16196 (inputs
16197 (list java-classpathx-servletapi java-javaewah java-jsch
16198 java-slf4j-api))
16199 (home-page "https://eclipse.org/jgit/")
16200 (synopsis "Java library implementing the Git version control system")
16201 (description "JGit is a lightweight, pure Java library implementing the
16202Git version control system, providing repository access routines, support for
16203network protocols, and core version control algorithms.")
16204 (license license:edl1.0)))
16205
16206;; For axoloti.
16207(define-public java-jgit-4.2
16208 (package (inherit java-jgit)
16209 (version "4.2.0.201601211800-r")
16210 (source (origin
16211 (method url-fetch)
16212 (uri (string-append "https://repo1.maven.org/maven2/"
16213 "org/eclipse/jgit/org.eclipse.jgit/"
16214 version "/org.eclipse.jgit-"
16215 version "-sources.jar"))
16216 (sha256
16217 (base32
16218 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
16219 (build-system ant-build-system)
16220 (arguments
16221 (substitute-keyword-arguments (package-arguments java-jgit)
16222 ((#:phases phases)
16223 `(modify-phases ,phases
16224 (add-after 'unpack 'use-latest-javaewah-API
16225 (lambda _
16226 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
16227 (("wordinbits") "WORD_IN_BITS"))))))))
16228 (inputs
16229 (list java-javaewah java-jsch java-slf4j-api))))
16230
16231(define-public java-jgit-7
16232 (package
16233 (name "java-jgit")
16234 (version "7.0.0.202409031743-r")
16235 (source (origin
16236 (method url-fetch)
16237 (uri (string-append "https://repo1.maven.org/maven2/"
16238 "org/eclipse/jgit/org.eclipse.jgit/"
16239 version "/org.eclipse.jgit-"
16240 version "-sources.jar"))
16241 (sha256
16242 (base32
16243 "0hdl11cbb6zy39zw4jpg0ip00nikilw7dajrqky6d3l18khjby5k"))))
16244 (build-system ant-build-system)
16245 (arguments
16246 `(#:tests? #f ; sources jar has no tests
16247 #:jar-name "jgit.jar"
16248 #:jdk ,openjdk17
16249 #:modules ((guix build ant-build-system)
16250 (guix build utils)
16251 (guix build java-utils)
16252 (srfi srfi-1))
16253 #:phases
16254 (modify-phases %standard-phases
16255 (add-after 'build 'add-properties
16256 (lambda* (#:key jar-name #:allow-other-keys)
16257 (with-directory-excursion "src"
16258 (apply invoke "jar" "-uf"
16259 (string-append "../build/jar/" jar-name)
16260 (find-files "." "\\.properties$")))
16261 (let* ((pkgs (delete-duplicates
16262 (filter-map
16263 (lambda (f)
16264 (let* ((d (dirname f))
16265 (d (if (string-prefix? "./" d)
16266 (substring d 2)
16267 d)))
16268 (and (not (string-null? d))
16269 (not (string=? d "."))
16270 (string-map
16271 (lambda (c)
16272 (if (char=? c #\/) #\. c))
16273 d))))
16274 (with-directory-excursion "build/classes"
16275 (find-files "." "\\.class$")))))
16276 (export-pkg (string-join (sort pkgs string<?) ",")))
16277 ;; Write manifest with continuation lines for long values.
16278 ;; Manifest spec: max 72 bytes per line, continuation
16279 ;; lines start with a single space.
16280 (call-with-output-file "osgi-manifest.mf"
16281 (lambda (port)
16282 (for-each
16283 (lambda (line)
16284 (let loop ((s line))
16285 (if (<= (string-length s) 70)
16286 (begin (display s port) (newline port))
16287 (begin (display (substring s 0 70) port)
16288 (newline port)
16289 (loop (string-append
16290 " " (substring s 70)))))))
16291 (list
16292 "Bundle-ManifestVersion: 2"
16293 "Bundle-SymbolicName: org.eclipse.jgit"
16294 (string-append "Bundle-Version: " ,version)
16295 (string-append "Export-Package: " export-pkg)
16296 (string-append
16297 "Import-Package: com.googlecode.javaewah,"
16298 "javax.crypto,javax.management,javax.net.ssl,"
16299 "org.apache.commons.codec.digest,"
16300 "org.slf4j,org.xml.sax,org.xml.sax.helpers")))
16301 (newline port))))
16302 (invoke "jar" "ufm" (string-append "build/jar/" jar-name)
16303 "osgi-manifest.mf")))
16304 (replace 'install
16305 (install-from-pom
16306 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit/pom.xml")))))
16307 (inputs
16308 (list java-commons-codec java-javaewah-1.2.3 java-slf4j-api))
16309 (home-page "https://eclipse.org/jgit/")
16310 (synopsis "Java library implementing the Git version control system")
16311 (description "JGit is a lightweight, pure Java library implementing the
16312Git version control system, providing repository access routines, support for
16313network protocols, and core version control algorithms.")
16314 (license license:edl1.0)))
16315
16316(define-public java-jgit-ssh-jsch-7
16317 (package
16318 (name "java-jgit-ssh-jsch")
16319 (version "7.0.0.202409031743-r")
16320 (source (origin
16321 (method url-fetch)
16322 (uri (string-append "https://repo1.maven.org/maven2/"
16323 "org/eclipse/jgit/org.eclipse.jgit.ssh.jsch/"
16324 version "/org.eclipse.jgit.ssh.jsch-"
16325 version "-sources.jar"))
16326 (sha256
16327 (base32
16328 "1vb3zkd2iz6bpz2nq8xxi5d5jdb8hy8jq7gka2ck22azm9bb6p94"))))
16329 (build-system ant-build-system)
16330 (arguments
16331 `(#:tests? #f ; sources jar has no tests
16332 #:jar-name "jgit-ssh-jsch.jar"
16333 #:jdk ,openjdk17
16334 #:phases
16335 (modify-phases %standard-phases
16336 (add-after 'build 'add-osgi-manifest
16337 (lambda _
16338 ;; The NetBeans wrapper module has an empty jar target and
16339 ;; relies on Bundle-SymbolicName from the Maven Central jar.
16340 (call-with-output-file "osgi-manifest.mf"
16341 (lambda (port)
16342 (display (string-append
16343 "Bundle-ManifestVersion: 2\n"
16344 "Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch\n"
16345 "Bundle-Version: " ,version "\n"
16346 "Export-Package: org.eclipse.jgit.transport.ssh"
16347 ".jsch\n"
16348 "Import-Package: com.jcraft.jsch,"
16349 "org.eclipse.jgit.errors,"
16350 "org.eclipse.jgit.internal,"
16351 "org.eclipse.jgit.internal.transport.ssh,"
16352 "org.eclipse.jgit.nls,"
16353 "org.eclipse.jgit.transport,"
16354 "org.eclipse.jgit.util,"
16355 "org.eclipse.jgit.util.io,"
16356 "org.slf4j\n")
16357 port)))
16358 (invoke "jar" "ufm" "build/jar/jgit-ssh-jsch.jar"
16359 "osgi-manifest.mf")))
16360 (replace 'install
16361 (install-from-pom
16362 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/pom.xml")))))
16363 (inputs
16364 (list java-jgit-7 java-jsch-0.1.72 java-jzlib-1.1.3 java-slf4j-api))
16365 (home-page "https://eclipse.org/jgit/")
16366 (synopsis "SSH support for JGit using JSch")
16367 (description "This package provides SSH transport support for JGit
16368using the JSch library.")
16369 (license license:edl1.0)))
16370
16371(define-public java-jgit-gpg-bc-7
16372 (package
16373 (name "java-jgit-gpg-bc")
16374 (version "7.0.0.202409031743-r")
16375 (source (origin
16376 (method url-fetch)
16377 (uri (string-append "https://repo1.maven.org/maven2/"
16378 "org/eclipse/jgit/org.eclipse.jgit.gpg.bc/"
16379 version "/org.eclipse.jgit.gpg.bc-"
16380 version "-sources.jar"))
16381 (sha256
16382 (base32
16383 "1123x1i19h3a674mc44csdx7spn5qh6qk3klkfih4am9ak81w27n"))))
16384 (build-system ant-build-system)
16385 (arguments
16386 `(#:tests? #f
16387 #:jar-name "jgit-gpg-bc.jar"
16388 #:jdk ,openjdk17
16389 #:phases
16390 (modify-phases %standard-phases
16391 (add-after 'build 'add-osgi-manifest
16392 (lambda _
16393 (call-with-output-file "osgi-manifest.mf"
16394 (lambda (port)
16395 (display (string-append
16396 "Bundle-ManifestVersion: 2\n"
16397 "Bundle-SymbolicName: org.eclipse.jgit.gpg.bc\n"
16398 "Bundle-Version: " ,version "\n"
16399 "Export-Package: org.eclipse.jgit.gpg.bc.internal\n"
16400 "Import-Package: org.bouncycastle.asn1,"
16401 "org.bouncycastle.bcpg,"
16402 "org.bouncycastle.gpg,"
16403 "org.bouncycastle.gpg.keybox,"
16404 "org.bouncycastle.openpgp,"
16405 "org.bouncycastle.openpgp.operator,"
16406 "org.bouncycastle.openpgp.operator.jcajce,"
16407 "org.bouncycastle.util.encoders,"
16408 "org.eclipse.jgit.api.errors,"
16409 "org.eclipse.jgit.lib,"
16410 "org.eclipse.jgit.nls,"
16411 "org.eclipse.jgit.transport,"
16412 "org.eclipse.jgit.util,"
16413 "org.slf4j\n")
16414 port)))
16415 (invoke "jar" "ufm" "build/jar/jgit-gpg-bc.jar"
16416 "osgi-manifest.mf")))
16417 (replace 'install
16418 (install-from-pom
16419 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/pom.xml")))))
16420 (inputs
16421 (list java-bouncycastle-1.77 java-jgit-7 java-slf4j-api))
16422 (native-inputs (list unzip))
16423 (home-page "https://eclipse.org/jgit/")
16424 (synopsis "GPG support for JGit using Bouncy Castle")
16425 (description "This package provides GPG commit signing support for
16426JGit using the Bouncy Castle cryptographic library.")
16427 (license license:edl1.0)))
16428
16429(define-public java-jsonp-api
16430 (package
16431 (name "java-jsonp-api")
16432 (version "1.1.6")
16433 (source (origin
16434 (method git-fetch)
16435 (uri (git-reference
16436 (url "https://github.com/eclipse-ee4j/jsonp")
16437 (commit (string-append "1.1-" version "-RELEASE"))))
16438 (file-name (git-file-name name version))
16439 (sha256
16440 (base32
16441 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
16442 (build-system ant-build-system)
16443 (arguments
16444 `(#:jar-name "jsonp-api.jar"
16445 #:tests? #f
16446 #:source-dir "api/src/main/java"
16447 #:test-dir "api/src/test"))
16448 (home-page "https://eclipse-ee4j.github.io/jsonp/")
16449 (synopsis "JSON Processing in Java")
16450 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
16451parse, generate, transform and query) JSON messages. It produces and
16452consumes JSON text in a streaming fashion (similar to StAX API for XML)
16453and allows building a Java object model for JSON text using API classes
16454(similar to DOM API for XML).")
16455 ;; either gpl2 only with classpath exception, or epl2.0.
16456 (license (list license:gpl2
16457 license:epl2.0))))
16458
16459(define-public java-jsonp-impl
16460 (package
16461 (inherit java-jsonp-api)
16462 (name "java-jsonp-impl")
16463 (arguments
16464 `(#:jar-name "jsonp-impl.jar"
16465 #:tests? #f
16466 #:source-dir "impl/src/main/java"
16467 #:test-dir "impl/src/test"
16468 #:phases
16469 (modify-phases %standard-phases
16470 (add-before 'build 'copy-resources
16471 (lambda _
16472 (copy-recursively
16473 "impl/src/main/resources/"
16474 "build/classes")
16475 #t)))))
16476 (propagated-inputs
16477 (list java-jsonp-api))
16478 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
16479parse, generate, transform and query) JSON messages. This package contains
16480a reference implementation of that API.")))
16481
16482(define-public java-jakarta-json
16483 (package
16484 (name "java-jakarta-json")
16485 (version "2.1.3")
16486 (source (origin
16487 (method git-fetch)
16488 (uri (git-reference
16489 (url "https://github.com/jakartaee/jsonp-api")
16490 (commit (string-append version "-RELEASE"))))
16491 (file-name (git-file-name name version))
16492 (sha256
16493 (base32
16494 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
16495 (build-system ant-build-system)
16496 (arguments
16497 `(#:jar-name "jakarta-json.jar"
16498 #:source-dir "api/src/main/java"
16499 #:tests? #f; no tests
16500 #:jdk ,openjdk11))
16501 (home-page "https://github.com/jakartaee/jsonp-api")
16502 (synopsis "Portable API for JSON handling in Java")
16503 (description "This project contains API and Compatible Implementation of
16504Jakarta JSON Processing specification. Jakarta JSON Processing provides
16505portable APIs to parse, generate, transform, and query JSON documents.")
16506 ;; with classpath exception
16507 (license license:epl2.0)))
16508
16509(define-public java-parsson
16510 (package
16511 (name "java-parsson")
16512 (version "1.1.5")
16513 (source (origin
16514 (method git-fetch)
16515 (uri (git-reference
16516 (url "https://github.com/eclipse-ee4j/parsson")
16517 (commit version)))
16518 (file-name (git-file-name name version))
16519 (sha256
16520 (base32
16521 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
16522 (build-system ant-build-system)
16523 (arguments
16524 `(#:jar-name "parsson.jar"
16525 #:source-dir "impl/src/main/java"
16526 #:test-dir "impl/src/test"
16527 #:use-java-modules? #t
16528 #:jdk ,openjdk11
16529 #:phases
16530 (modify-phases %standard-phases
16531 (add-after 'unpack 'copy-resources
16532 (lambda _
16533 (copy-recursively "impl/src/main/resources"
16534 "build/classes"))))))
16535 (inputs
16536 (list java-jakarta-json))
16537 (native-inputs
16538 (list java-junit))
16539 (home-page "https://github.com/eclipse-ee4j/parsson")
16540 (synopsis "Implementation of Jakarta JSON API")
16541 (description "Eclipse Parsson is an implementation of the Jakarta JSON
16542Processing specification.")
16543 ;; with classpath exception
16544 (license license:epl2.0)))
16545
16546(define-public java-jakarta-activation-api
16547 (package
16548 (name "java-jakarta-activation-api")
16549 (version "2.1.4")
16550 (source (origin
16551 (method git-fetch)
16552 (uri (git-reference
16553 (url "https://github.com/jakartaee/jaf-api")
16554 (commit version)))
16555 (file-name (git-file-name name version))
16556 (sha256
16557 (base32
16558 "125bf475cb0mdyhn1lj3c8gbwngbd28x10vnknq86zrc1vq4m6gx"))))
16559 (build-system ant-build-system)
16560 (arguments
16561 `(#:jar-name "jakarta-activation-api.jar"
16562 #:source-dir "api/src/main/java"
16563 #:tests? #f ;; has no tests
16564 #:jdk ,openjdk11))
16565 (home-page "https://github.com/jakartaee/jaf-api")
16566 (synopsis "Collection of Java activation")
16567 (description "Jakarta Activation lets you take advantage of standard
16568services to: determine the type of arbitrary piece of data; encapsulate access
16569to it; discover the operations available on it; and instantiate the
16570appropriate bean to perform the operation(s).")
16571 (license license:bsd-3)))
16572
16573(define-public java-jakarta-annotations-api
16574 (package
16575 (name "java-jakarta-annotations-api")
16576 (version "2.1.1")
16577 (source (origin
16578 (method git-fetch)
16579 (uri (git-reference
16580 (url "https://github.com/jakartaee/common-annotations-api")
16581 (commit version)))
16582 (file-name (git-file-name name version))
16583 (sha256
16584 (base32
16585 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
16586 (build-system ant-build-system)
16587 (arguments
16588 `(#:jar-name "jakarta-annotations-api.jar"
16589 #:source-dir "api/src/main/java"
16590 #:tests? #f; no tests
16591 #:jdk ,openjdk11))
16592 (home-page "https://github.com/jakartaee/common-annotations-api")
16593 (synopsis "Collection of Java annotations")
16594 (description "Jakarta Annotations defines a collection of annotations
16595representing common semantic concepts that enable a declarative style of
16596programming that applies across a variety of Java technologies.")
16597 ;; with classpath exception
16598 (license (list license:epl2.0
16599 license:gpl2))))
16600
16601(define-public java-xmp
16602 (package
16603 (name "java-xmp")
16604 (version "5.1.3")
16605 (source (origin
16606 (method url-fetch)
16607 (uri (string-append "http://download.macromedia.com/pub/developer"
16608 "/xmp/sdk/XMPCoreJava-" version ".zip"))
16609 (sha256
16610 (base32
16611 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
16612 (build-system ant-build-system)
16613 (arguments
16614 `(#:build-target "build"
16615 #:tests? #f; no tests
16616 #:phases
16617 (modify-phases %standard-phases
16618 (add-after 'unpack 'chdir
16619 (lambda _
16620 (chdir "XMPCore")
16621 #t))
16622 (add-before 'build 'fix-timestamp
16623 (lambda _
16624 (substitute* "build.xml"
16625 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
16626 #t))
16627 (replace 'install
16628 (install-jars "."))
16629 (add-after 'install 'install-doc
16630 (lambda* (#:key outputs #:allow-other-keys)
16631 (copy-recursively
16632 "docs"
16633 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
16634 #t)))))
16635 (native-inputs
16636 (list unzip))
16637 (home-page "https://www.adobe.com/devnet/xmp.html")
16638 (synopsis "Extensible Metadat Platform (XMP) support in Java")
16639 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
16640technology that allows you to embed data about a file, known as metadata,
16641into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
16642library and the API is similar.")
16643 (license license:bsd-3)))
16644
16645(define-public java-args4j
16646 (package
16647 (name "java-args4j")
16648 (version "2.33")
16649 (source (origin
16650 (method git-fetch)
16651 (uri (git-reference
16652 (url "https://github.com/kohsuke/args4j")
16653 (commit (string-append "args4j-site-" version))))
16654 (file-name (git-file-name name version))
16655 (sha256
16656 (base32
16657 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
16658 (build-system ant-build-system)
16659 (arguments
16660 `(#:jar-name "args4j.jar"
16661 #:source-dir "args4j/src"
16662 #:test-dir "args4j/test"
16663 #:test-exclude
16664 (list "**/ExampleTest.*"
16665 "**/ExternalConfiguredTest.*" ; fails to find a file
16666 ;; We still don't want to run abstract classes
16667 "**/Abstract*.*")
16668 #:phases
16669 (modify-phases %standard-phases
16670 (add-before 'check 'fix-test-dir
16671 (lambda _
16672 (substitute* "build.xml"
16673 (("/java\">") "\">"))
16674 #t))
16675 (add-before 'build 'copy-resources
16676 (lambda _
16677 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
16678 (to-prefix "build/classes/org/kohsuke/args4j/"))
16679 (for-each (lambda (f)
16680 (install-file
16681 (string-append from-prefix f)
16682 (string-append to-prefix (dirname f))))
16683 (list "Messages.properties"
16684 "Messages_de.properties"
16685 "Messages_en.properties"
16686 "Messages_ru.properties"
16687 "spi/Messages.properties"
16688 "spi/Messages_de.properties"
16689 "spi/Messages_en.properties"
16690 "spi/Messages_ru.properties")))
16691 #t)))))
16692 (native-inputs
16693 (list java-junit))
16694 (home-page "https://args4j.kohsuke.org/")
16695 (synopsis "Command line parser library")
16696 (description "Args4j is a small Java class library that makes it easy to
16697parse command line options/arguments in your CUI application.")
16698 (license license:expat)))
16699
16700(define-public java-argparse4j
16701 (package
16702 (name "java-argparse4j")
16703 (version "0.9.0")
16704 (source (origin
16705 (method git-fetch)
16706 (uri (git-reference
16707 (url "https://github.com/argparse4j/argparse4j")
16708 (commit (string-append "argparse4j-" version))))
16709 (file-name (git-file-name name version))
16710 (sha256
16711 (base32
16712 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
16713 (build-system ant-build-system)
16714 (arguments
16715 (list #:jar-name "java-argparse4j.jar"
16716 #:source-dir "main/src/main/"
16717 #:test-dir "main/src/test/"
16718 #:jdk openjdk11
16719 #:phases #~(modify-phases %standard-phases
16720 (add-after 'unpack 'copy-resources
16721 (lambda _
16722 (copy-recursively "main/src/test/resources"
16723 "target/test-classes")
16724 (copy-recursively "main/src/main/resources"
16725 "build/classes")))
16726 (replace 'install
16727 (install-from-pom "pom.xml")))))
16728 (inputs (list java-junit))
16729 (home-page "https://argparse4j.github.io/")
16730 (synopsis "Java command-line argument parser library")
16731 (description "Argparse4j is a command line argument parser library for
16732Java based on Python's @code{argparse} module.")
16733 (license license:expat)))
16734
16735(define-public java-metadata-extractor
16736 (package
16737 (name "java-metadata-extractor")
16738 (version "2.19.0")
16739 (source (origin
16740 (method git-fetch)
16741 (uri (git-reference
16742 (url "https://github.com/drewnoakes/metadata-extractor")
16743 (commit version)))
16744 (file-name (git-file-name name version))
16745 (sha256
16746 (base32
16747 "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna"))))
16748 (build-system ant-build-system)
16749 (arguments
16750 `(#:jar-name "metadata-extractor.jar"
16751 #:source-dir "Source"
16752 #:test-dir "Tests"
16753 #:phases
16754 (modify-phases %standard-phases
16755 (add-before 'build 'fix-xmp-path
16756 (lambda _
16757 ;; This version of metadata-extractor depends on java-xmp 6, which
16758 ;; is non-free. These changes allow using java-xmp 5, which is
16759 ;; the last free-software version of java-xmp.
16760 (substitute* (find-files "." ".*.java")
16761 (("com.adobe.internal.xmp") "com.adobe.xmp"))
16762 (substitute* "Source/com/drew/metadata/xmp/XmpReader.java"
16763 (("\\.setXMPNodesToLimit.*") ";"))
16764 ;; Test failure, most likely because we use a different java-xmp
16765 ;; version.
16766 (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java")))
16767 (add-before 'check 'fix-test-dir
16768 (lambda _
16769 (substitute* "build.xml"
16770 (("/java\">") "\">"))
16771 #t)))))
16772 (propagated-inputs
16773 (list java-xmp))
16774 (native-inputs
16775 (list java-hamcrest-core java-junit))
16776 (home-page "https://github.com/drewnoakes/metadata-extractor")
16777 (synopsis "Extract metadata from image and video files")
16778 (description "Metadata-extractor is a straightforward Java library for
16779reading metadata from image files. It is able to read metadata in Exif,
16780IPTC, XMP, ICC and more formats.")
16781 (license license:asl2.0)))
16782
16783(define-public java-svg-salamander
16784 (package
16785 (name "java-svg-salamander")
16786 (version "1.1.2")
16787 (source (origin
16788 (method git-fetch)
16789 (uri (git-reference
16790 (url "https://github.com/blackears/svgSalamander")
16791 (commit (string-append "v" version))))
16792 (file-name (git-file-name name version))
16793 (sha256
16794 (base32
16795 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
16796 (modules '((guix build utils)))
16797 (snippet
16798 '(begin
16799 (for-each delete-file (find-files "." ".*.jar"))
16800 #t))
16801 (patches
16802 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
16803 (build-system ant-build-system)
16804 (arguments
16805 `(#:tests? #f; no tests
16806 #:phases
16807 (modify-phases %standard-phases
16808 (add-after 'unpack 'chdir
16809 (lambda _
16810 (chdir "svg-core")
16811 #t))
16812 (add-before 'build 'copy-jars
16813 (lambda* (#:key inputs #:allow-other-keys)
16814 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
16815 "../libraries/javacc.jar")
16816 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
16817 "../libraries/ant.jar")
16818 #t))
16819 (replace 'install
16820 (install-jars "dist")))))
16821 (native-inputs
16822 (list javacc))
16823 (home-page "https://github.com/blackears/svgSalamander")
16824 (synopsis "SVG engine for Java")
16825 (description "SVG Salamander is an SVG engine for Java that's designed
16826to be small, fast, and allow programmers to use it with a minimum of fuss.
16827It's in particular targeted for making it easy to integrate SVG into Java
16828games and making it much easier for artists to design 2D game content - from
16829rich interactive menus to charts and graphcs to complex animations.")
16830 (license license:bsd-2)))
16831
16832(define-public java-jboss-transaction-api-spec
16833 (package
16834 (name "java-jboss-transaction-api-spec")
16835 (version "1.2+1.1.1")
16836 (source (origin
16837 (method git-fetch)
16838 (uri (git-reference
16839 (url "https://github.com/jboss/jboss-transaction-api_spec")
16840 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
16841 (file-name (git-file-name name version))
16842 (sha256
16843 (base32
16844 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
16845 (build-system ant-build-system)
16846 (arguments
16847 `(#:jar-name "java-jboss-transaction-api_spec.jar"
16848 #:source-dir "src/main/java"
16849 #:tests? #f)); no tests
16850 (inputs
16851 (list java-cdi-api java-jboss-interceptors-api-spec))
16852 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
16853 (synopsis "Generic transaction management API in Java")
16854 (description "Java-jboss-transaction-api-spec implements the Transactions
16855API. A transaction is a unit of work containing one or more operations
16856involving one or more shared resources having ACID (Atomicity, Consistency,
16857Isolation and Durability) properties.")
16858 ;; either gpl2 only with classpath exception or cddl.
16859 (license (list license:gpl2 license:cddl1.0))))
16860
16861(define-public java-picocli
16862 (package
16863 (name "java-picocli")
16864 (version "4.3.2")
16865 (source (origin
16866 (method git-fetch)
16867 (uri (git-reference
16868 (url "https://github.com/remkop/picocli")
16869 (commit (string-append "v" version))))
16870 (file-name (git-file-name name version))
16871 (sha256
16872 (base32
16873 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
16874 (build-system ant-build-system)
16875 (arguments
16876 `(#:jar-name "picocli.jar"
16877 #:source-dir "src/main/java"
16878 ;; Tests require missing dependencies (junitparams, system-rules)
16879 #:tests? #f))
16880 (home-page "https://picocli.info")
16881 (synopsis "REPL for the JVM")
16882 (description "Picocli is a framework for building command line applications
16883for the JVM. It supports colors, autocompletion, subcommands, and more. Written
16884in Java, usable from Groovy, Kotlin, Scala, etc.")
16885 (license license:asl2.0)))
16886
16887(define-public java-pj
16888 (package
16889 (name "java-pj")
16890 (version "20150107")
16891 (source (origin
16892 (method url-fetch)
16893 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
16894 version ".jar"))
16895 (sha256
16896 (base32
16897 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
16898 (modules '((guix build utils)))
16899 (snippet
16900 '(for-each delete-file
16901 (find-files "." "\\.class$")))))
16902 (build-system ant-build-system)
16903 (arguments
16904 (list
16905 #:tests? #false ;there are none
16906 #:phases
16907 #~(modify-phases %standard-phases
16908 (add-after 'unpack 'chdir
16909 (lambda _ (chdir "src/pj")))
16910 (add-after 'chdir 'patch-source-directory
16911 (lambda _
16912 (substitute* "compile"
16913 (("SRCDIR1=/home/ark/public_html/pj/lib")
16914 (string-append "SRCDIR1=" (getcwd) "/lib")))))
16915 (replace 'build
16916 (lambda _
16917 (invoke "bash" "./compile" "linux")
16918 (with-directory-excursion "lib"
16919 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
16920 (find-files "." "\\.class$")))))
16921 (replace 'install (install-jars ".")))))
16922 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
16923 (synopsis "Parallel programming in Java")
16924 (description "Parallel Java (PJ) is an API and middleware for parallel
16925programming in 100% Java on shared memory multiprocessor (SMP) parallel
16926computers, cluster parallel computers, and hybrid SMP cluster parallel
16927computers.")
16928 (license license:gpl3+)))
16929
16930(define-public java-jetbrains-annotations
16931 (package
16932 (name "java-jetbrains-annotations")
16933 (version "19.0.0")
16934 (source (origin
16935 (method git-fetch)
16936 (uri (git-reference
16937 (url "https://github.com/JetBrains/java-annotations")
16938 (commit version)))
16939 (file-name (git-file-name name version))
16940 (sha256
16941 (base32
16942 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
16943 (build-system ant-build-system)
16944 (arguments
16945 `(#:jar-name "jetbrains-annotations.jar"
16946 #:source-dir "common/src/main/java:java8/src/main/java"
16947 #:tests? #f)); no tests
16948 (home-page "https://github.com/JetBrains/java-annotations")
16949 (synopsis "Annotations for Java and other JVM languages")
16950 (description "This package contains a set of Java annotations which can be
16951used in JVM-based languages. They serve as an additional documentation and
16952can be interpreted by IDEs and static analysis tools to improve code analysis.")
16953 (license license:expat)))
16954
16955(define-public java-javaparser
16956 (package
16957 (name "java-javaparser")
16958 (version "3.16.1")
16959 (source (origin
16960 (method git-fetch)
16961 (uri (git-reference
16962 (url "https://github.com/javaparser/javaparser")
16963 (commit (string-append "javaparser-parent-" version))))
16964 (file-name (git-file-name name version))
16965 (sha256
16966 (base32
16967 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
16968 (modules '((guix build utils)))
16969 (snippet
16970 '(begin
16971 (for-each delete-file
16972 (find-files "." "\\.jar$"))
16973 #t))))
16974 (build-system ant-build-system)
16975 (arguments
16976 `(#:tests? #f; tests require jbehave and junit5
16977 #:phases
16978 (modify-phases %standard-phases
16979 (add-before 'build 'fill-template
16980 (lambda _
16981 (with-directory-excursion "javaparser-core/src/main"
16982 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
16983 "java/com/github/javaparser/JavaParserBuild.java")
16984 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
16985 (("\\$\\{project.version\\}") ,version)
16986 (("\\$\\{project.name\\}") "javaparser")
16987 (("\\$\\{project.build.finalName\\}") "javaparser")
16988 (("\\$\\{maven.version\\}") "fake")
16989 (("\\$\\{maven.build.version\\}") "fake")
16990 (("\\$\\{build.timestamp\\}") "0")
16991 (("\\$\\{java.vendor\\}") "Guix")
16992 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
16993 (("\\$\\{java.version\\}") "1.8")
16994 (("\\$\\{os.arch\\}") "any")
16995 (("\\$\\{os.name\\}") "Guix")
16996 (("\\$\\{os.version\\}") "not available")))
16997 #t))
16998 (add-before 'build 'generate-javacc
16999 (lambda _
17000 (with-directory-excursion "javaparser-core/src/main/java"
17001 (invoke "java" "javacc" "../javacc/java.jj"))
17002 #t))
17003 (add-before 'build 'copy-javacc-support
17004 (lambda _
17005 (with-directory-excursion "javaparser-core/src/main"
17006 (copy-recursively "javacc-support" "java"))
17007 #t))
17008 (replace 'build
17009 (lambda _
17010 (define (build name)
17011 (format #t "Building ~a~%" name)
17012 (delete-file-recursively "build/classes")
17013 (mkdir-p "build/classes")
17014 (apply invoke "javac"
17015 "-cp" (string-append (getenv "CLASSPATH") ":"
17016 (string-join (find-files "build/jar" ".")
17017 ":"))
17018 "-d" "build/classes"
17019 (find-files (string-append name "/src/main/java")
17020 ".*.java"))
17021 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
17022 "-C" "build/classes" "."))
17023 (mkdir-p "build/classes")
17024 (mkdir-p "build/test-classes")
17025 (mkdir-p "build/jar")
17026 (build "javaparser-core")
17027 (build "javaparser-core-serialization")
17028 (build "javaparser-core-generators")
17029 (build "javaparser-core-metamodel-generator")
17030 (build "javaparser-symbol-solver-core")
17031 #t))
17032 (replace 'install
17033 (install-jars "build/jar")))))
17034 (inputs
17035 (list java-guava java-jboss-javassist java-jsonp-api))
17036 (native-inputs
17037 (list javacc))
17038 (home-page "https://javaparser.org/")
17039 (synopsis "Parser for Java")
17040 (description
17041 "This project contains a set of libraries implementing a Java 1.0 - Java
1704211 Parser with advanced analysis functionalities.")
17043 (license (list
17044 ;; either lgpl or asl
17045 license:lgpl3+
17046 license:asl2.0))))
17047
17048(define-public tla2tools
17049 ;; This package was originally based on the "v1.8.0" tag, but that merely
17050 ;; points to the moving master branch. That might be because the ‘latest
17051 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
17052 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
17053 (let* ((release "1.7.1")
17054 (revision "0")
17055 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
17056 (package
17057 (name "tla2tools")
17058 (version (git-version release revision commit))
17059 (source (origin
17060 (method git-fetch)
17061 (uri (git-reference
17062 (url "https://github.com/tlaplus/tlaplus")
17063 (commit commit)))
17064 (file-name (git-file-name name version))
17065 (sha256
17066 (base32
17067 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
17068 (patches
17069 (search-patches "tla2tools-build-xml.patch"))
17070 (modules '((guix build utils)))
17071 (snippet
17072 '(begin
17073 ;; Remove packaged libraries (see 'replace-libs below)
17074 (for-each delete-file (find-files "." ".*.jar$"))))))
17075 (build-system ant-build-system)
17076 (arguments
17077 (let* ((tlatools "tlatools/org.lamport.tlatools/")
17078 (build-xml (string-append tlatools "customBuild.xml")))
17079 `(#:jdk ,openjdk11
17080 #:modules ((guix build ant-build-system)
17081 (guix build utils)
17082 (ice-9 match)
17083 (srfi srfi-26))
17084 #:make-flags '("-f" ,build-xml)
17085 #:phases
17086 (modify-phases %standard-phases
17087 ;; Replace packed libs with references to jars in store
17088 (add-after 'unpack 'replace-libs
17089 (lambda* (#:key inputs #:allow-other-keys)
17090 (define (input-jar input)
17091 (car (find-files (assoc-ref inputs input) "\\.jar$")))
17092 (for-each
17093 (match-lambda
17094 ((file . input)
17095 (symlink (input-jar input)
17096 (string-append ,tlatools "/lib/" file))))
17097 '(("gson/gson-2.8.6.jar" . "java-gson")
17098 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
17099 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
17100 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
17101 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
17102 "java-eclipse-lsp4j-debug")
17103 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
17104 "java-eclipse-lsp4j-jsonrpc")
17105 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
17106 "java-eclipse-lsp4j-jsonrpc-debug")
17107 ("junit-4.12.jar" . "java-junit")
17108 ("easymock-3.3.1.jar" . "java-easymock")))
17109 ;; Retain a tiny subset of the original X-Git-*
17110 ;; manifest values just to aid in debugging.
17111 (substitute* ,build-xml
17112 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
17113 (add-before 'check 'prepare-tests
17114 (lambda _
17115 ;; The pcal tests write to .cfg files.
17116 (for-each (cut chmod <> #o644)
17117 (find-files (string-append ,tlatools
17118 "/test-model/pcal")
17119 "\\.cfg$"))))
17120 (replace 'install
17121 (lambda* (#:key inputs outputs #:allow-other-keys)
17122 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
17123 (jar-name "tla2tools.jar"); set in project.properties
17124 (jar (string-append ,tlatools
17125 "/dist/" jar-name))
17126 (java-cp (string-append share "/" jar-name))
17127 (bin (string-append (assoc-ref outputs "out") "/bin"))
17128 (java (search-input-file inputs "/bin/java")))
17129 (install-file jar share)
17130 (mkdir-p bin)
17131 ;; Generate wrapper scripts for bin/, which invoke common
17132 ;; commands within tla2tools.jar. Users can still invoke
17133 ;; tla2tools.jar for the rest.
17134 (for-each
17135 (match-lambda
17136 ((wrapper . class)
17137 (let ((file (string-append bin "/" wrapper)))
17138 (begin
17139 (with-output-to-file file
17140 (lambda _
17141 (display
17142 (string-append
17143 "#!/bin/sh\n"
17144 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
17145 (chmod file #o755)))))
17146 ;; bin/wrapper . java-class
17147 '(("pcal" . "pcal.trans")
17148 ("tlatex" . "tla2tex.TLA")
17149 ("tla2sany" . "tla2sany.SANY")
17150 ("tlc2" . "tlc2.TLC")
17151 ("tlc2-repl" . "tlc2.REPL"))))))))))
17152 (native-inputs
17153 (list java-junit java-easymock))
17154 (inputs
17155 (list java-javax-mail
17156 java-gson-latest
17157 java-jline-terminal
17158 java-jline-reader
17159 java-eclipse-lsp4j-jsonrpc
17160 java-eclipse-lsp4j-jsonrpc-debug
17161 java-eclipse-lsp4j-debug))
17162 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
17163 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
17164 (description "TLA+ is a high-level language for modeling programs and
17165systems---especially concurrent and distributed ones. It's based on the idea
17166that the best way to describe things precisely is with simple
17167mathematics. TLA+ and its tools are useful for eliminating fundamental design
17168errors, which are hard to find and expensive to correct in code.
17169
17170The following TLA+ tools are available in this distribution:
17171
17172@itemize
17173@item The Syntactic Analyzer: A parser and syntax checker for
17174 TLA+ specifications;
17175@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
17176 specifications;
17177@item TLATeX: A program for typesetting TLA+ specifications;
17178@item Beta test versions of 1-3 for the TLA+2 language; and
17179@item The PlusCal translator.
17180@end itemize")
17181 (license license:expat))))
17182
17183;; Deprecated at 2026-06-01
17184(define-deprecated/public-alias abcl
17185 (@ (gnu packages lisp) abcl))
17186
17187;;;
17188;;; Avoid adding new packages to the end of this file. To reduce the chances
17189;;; of a merge conflict, place them above by existing packages with similar
17190;;; functionality or similar names.
17191;;;