projects/guix·blob gnome-team · refs

17198 lines · 717.3 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;;; Note: The build of openjdk11 fails half of the time with a
1310;;; ConcurrentModificationException error, whether building in parallel or not
1311;;; (see: <https://codeberg.org/guix/guix/issues/10850>).
1312(define-public openjdk11
1313 (package
1314 (name "openjdk")
1315 (version "11.0.22")
1316 (source (origin
1317 (method url-fetch)
1318 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1319 version "-ga.tar.xz"))
1320 (file-name (string-append name "-" version ".tar.xz"))
1321 (sha256
1322 (base32
1323 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1324 (modules '((guix build utils)))
1325 (snippet
1326 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1327 (patches
1328 (search-patches "openjdk-10-module3-reproducibility.patch"
1329 "openjdk-10-module4-reproducibility.patch"
1330 "openjdk-10-char-reproducibility.patch"
1331 "openjdk-11-classlist-reproducibility.patch"
1332 "openjdk-10-jar-reproducibility.patch"
1333 "openjdk-10-jtask-reproducibility.patch"
1334 "openjdk-currency-time-bomb2.patch"))))
1335 (build-system gnu-build-system)
1336 (outputs '("out" "jdk" "doc"))
1337 (arguments
1338 (list
1339 #:modules `((guix build gnu-build-system)
1340 (guix build utils)
1341 (ice-9 match)
1342 (ice-9 popen)
1343 (srfi srfi-1)
1344 (srfi srfi-26))
1345
1346 #:disallowed-references
1347 (list (this-package-native-input "openjdk")
1348 (gexp-input (this-package-native-input "openjdk")
1349 "jdk"))
1350
1351 #:tests? #f ; requires jtreg
1352 ;; TODO package jtreg
1353 #:configure-flags
1354 #~(list
1355 "--disable-hotspot-gtest" ;not currently running tests
1356 ;; Add flags for compilation with gcc >= 10.
1357 #$(string-append "--with-extra-cflags=-fcommon"
1358 " -fno-delete-null-pointer-checks"
1359 " -fno-lifetime-dse"
1360 ;; flags for compilation with gcc >= 14.
1361 " -Wno-error=int-conversion")
1362 ;; Otherwise, the '--enable-fast-install' causes an error.
1363 "--disable-option-checking"
1364 "--disable-warnings-as-errors"
1365 ;; Make validate-runpath pass (see:
1366 ;; http://issues.guix.info/issue/32894).
1367 "--with-native-debug-symbols=zipped"
1368 ;; Do not use the bundled libraries.
1369 "--with-giflib=system"
1370 "--with-lcms=system"
1371 "--with-libjpeg=system"
1372 "--with-libpng=system"
1373 "--with-version-pre="
1374 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1375 ;; set; do it manually.
1376 "--with-hotspot-build-time=1970-01-01T00:00:01"
1377 "--enable-reproducible-build" ; to be sure
1378 ;; Allow the build system to locate the system freetype.
1379 (string-append "--with-freetype-include="
1380 #$(this-package-input "freetype") "/include")
1381 (string-append "--with-freetype-lib="
1382 #$(this-package-input "freetype") "/lib"))
1383 #:phases
1384 #~(modify-phases %standard-phases
1385 (add-after 'patch-source-shebangs 'fix-java-shebangs
1386 (lambda _
1387 ;; This file was "fixed" by patch-source-shebangs, but it requires
1388 ;; this exact first line.
1389 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1390 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1391 (add-after 'unpack 'remove-timestamping
1392 (lambda _
1393 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1394 (("__DATE__") "")
1395 (("__TIME__") ""))))
1396 (add-after 'unpack 'patch-jni-libs
1397 ;; Hardcode dynamically loaded libraries.
1398 (lambda _
1399 (define (icedtea-or-openjdk? path)
1400 (or (string-contains path "openjdk")
1401 (string-contains path "icedtea")))
1402
1403 (let* ((library-path (remove icedtea-or-openjdk?
1404 (search-path-as-string->list
1405 (getenv "LIBRARY_PATH"))))
1406 (find-library (lambda (name)
1407 (or (search-path
1408 library-path
1409 (string-append "lib" name ".so"))
1410 (string-append "lib" name ".so")))))
1411 (for-each
1412 (lambda (file)
1413 (catch 'decoding-error
1414 (lambda ()
1415 (substitute* file
1416 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1417 _ name version)
1418 (string-append "\"" (find-library name) "\""))
1419 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1420 (string-append "\"" (find-library name) "\""))))
1421 (lambda _
1422 ;; Those are safe to skip.
1423 (format (current-error-port)
1424 "warning: failed to substitute: ~a~%"
1425 file))))
1426 (find-files "." "\\.c$|\\.h$")))))
1427 (add-before 'build 'set-affinity
1428 (lambda* (#:key parallel-build? #:allow-other-keys)
1429 ;; The java process itself normally uses as many cores as
1430 ;; available.
1431 (let ((cores (if parallel-build?
1432 (parallel-job-count)
1433 1)))
1434 (setaffinity (getpid) (make-bitvector cores #t)))))
1435 (add-before 'build 'write-source-revision-file
1436 (lambda _
1437 (with-output-to-file ".src-rev"
1438 (lambda _
1439 (display #$(package-version this-package))))))
1440 (replace 'build
1441 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1442 (apply invoke "make" "all"
1443 (format #f "JOBS=~a" (if parallel-build?
1444 (parallel-job-count)
1445 1))
1446 make-flags)))
1447 ;; jdk 11 does not build jre by default any more; so explicitly build
1448 ;; it (see:
1449 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1450 (add-after 'build 'build-jre
1451 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1452 (apply invoke "make" "legacy-jre-image"
1453 (format #f "JOBS=~a" (if parallel-build?
1454 (parallel-job-count)
1455 1))
1456 make-flags)))
1457 (replace 'install
1458 (lambda _
1459 (let ((images (car (find-files "build" "-server-release"
1460 #:directories? #t))))
1461 (copy-recursively (string-append images "/images/jdk")
1462 #$output:jdk)
1463 (copy-recursively (string-append images "/images/jre")
1464 #$output)
1465 (copy-recursively (string-append images "/images/docs")
1466 #$output:doc))))
1467 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1468 ;; But that shared object is located in the server/ folder, so it
1469 ;; cannot be found. This phase creates a symbolic link in the
1470 ;; lib/ folder so that the other libraries can find it.
1471 ;;
1472 ;; See:
1473 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1474 ;;
1475 ;; FIXME: Find the bug in the build system, so that this symlink is
1476 ;; not needed.
1477 (add-after 'install 'install-libjvm
1478 (lambda _
1479 (let ((lib-out (string-append #$output "/lib"))
1480 (lib-jdk (string-append #$output:jdk "/lib")))
1481 (symlink (string-append lib-jdk "/server/libjvm.so")
1482 (string-append lib-jdk "/libjvm.so"))
1483 (symlink (string-append lib-out "/server/libjvm.so")
1484 (string-append lib-out "/libjvm.so")))))
1485 (add-after 'install 'remove-extraneous-files
1486 (lambda* (#:key outputs #:allow-other-keys)
1487 ;; Remove the *.diz and src.zip files for space considerations.
1488 ;; The former are compressed debuginfo files not typically
1489 ;; shipped with Java distributions, while the later corresponds
1490 ;; to Java core API source files.
1491 (for-each delete-file
1492 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1493 (map (match-lambda
1494 ((name . dir)
1495 dir))
1496 outputs)))))
1497 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1498 (lambda _
1499 (use-modules (ice-9 binary-ports)
1500 (rnrs bytevectors))
1501 (letrec ((repack-archive
1502 (lambda (archive)
1503 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1504 (with-directory-excursion dir
1505 (invoke "unzip" archive))
1506 (delete-file archive)
1507 (for-each (compose repack-archive canonicalize-path)
1508 (find-files dir "(ct\\.sym|\\.jar)$"))
1509 (let ((reset-file-timestamp
1510 (lambda (file)
1511 (let ((s (lstat file)))
1512 (unless (eq? (stat:type s) 'symlink)
1513 (format #t "reset ~a~%" file)
1514 (utime file 0 0 0 0))))))
1515 (for-each reset-file-timestamp
1516 (find-files dir #:directories? #t)))
1517 (with-directory-excursion dir
1518 (let ((files (find-files ".")))
1519 (apply invoke "zip" "-0" "-X" archive files)))))))
1520 (for-each repack-archive
1521 (find-files #$output:doc "\\.zip$"))
1522 (for-each repack-archive
1523 (find-files #$output:jdk "\\.(zip|jar)$"))
1524 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1525 (let ((repack-jmod
1526 (lambda (file-name)
1527 (call-with-input-file file-name
1528 (lambda (file)
1529 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1530 (if (equal? (get-bytevector-n
1531 file (bytevector-length header))
1532 header)
1533 (let* ((header-length (bytevector-length header))
1534 (temp-file (mkstemp!
1535 (string-copy
1536 "temp-file.XXXXXX")))
1537 (temp-filename (port-filename temp-file))
1538 (content-length
1539 (- (stat:size (stat file))
1540 header-length)))
1541 (sendfile temp-file file content-length header-length)
1542 (delete-file file-name)
1543 (close-port temp-file)
1544 (repack-archive (canonicalize-path temp-filename))
1545 (call-with-output-file file-name
1546 (lambda (file)
1547 (put-bytevector file header)
1548 (call-with-input-file temp-filename
1549 (lambda (temp-file)
1550 (sendfile
1551 file temp-file
1552 (stat:size (stat temp-file)) 0)))))))))))))
1553 (for-each repack-jmod
1554 (find-files #$output:jdk "\\.jmod$"))))))
1555 (add-after 'install 'remove-timestamp-from-api-summary
1556 (lambda _
1557 (substitute* (string-append #$output:doc
1558 "/api/overview-summary.html")
1559 (("Generated by javadoc \\(11-internal\\).*$")
1560 "Generated by javadoc (11-internal) -->\n")))))))
1561 (inputs
1562 (list alsa-lib
1563 cups
1564 fontconfig
1565 freetype
1566 giflib
1567 gtk+
1568 lcms
1569 libjpeg-turbo
1570 libpng
1571 libx11
1572 libxext
1573 libxrandr
1574 libxrender
1575 libxt
1576 libxtst))
1577 (native-inputs
1578 (list autoconf
1579 bash ; not bash-minimal, needs ulimit
1580 openjdk10
1581 `(,openjdk10 "jdk")
1582 gnu-make-4.2
1583 nss-certs
1584 pkg-config
1585 unzip
1586 which
1587 zip))
1588 (home-page "https://openjdk.org/projects/jdk/11/")
1589 (synopsis "Java development kit")
1590 (description
1591 "This package provides the Java development kit OpenJDK.")
1592 (license license:gpl2+)
1593 (properties
1594 ;; At least on a Blackbird powerpc64le machine, the build takes more than
1595 ;; the default 3600s of silent timeout.
1596 `((max-silent-time . ,(* 3600 2))))))
1597
1598(define-syntax make-openjdk
1599 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1600 ;; the bootstrap package. One or more FIELD can be provided to further
1601 ;; refine the package definition; for convenience, the BASE, NAME and
1602 ;; VERSION are defined in their scope.
1603 (lambda (x)
1604 (syntax-case x ()
1605 ((_ bootstrap version* hash field ...)
1606 (with-syntax ((base (datum->syntax x 'base))
1607 (name (datum->syntax x 'name))
1608 (version (datum->syntax x 'version)))
1609 #'(let ((base (package
1610 (inherit bootstrap)
1611 (name "openjdk")
1612 (version version*)
1613 (source
1614 (origin
1615 (inherit (package-source bootstrap))
1616 (method git-fetch)
1617 (uri (git-reference
1618 (url (format
1619 #f "https://github.com/openjdk/jdk~au"
1620 (version-major version*)))
1621 (commit (string-append "jdk-" version*
1622 "-ga"))))
1623 (file-name (git-file-name name version))
1624 (sha256 (base32 hash))))
1625 (properties
1626 '((release-tag-prefix . "jdk-")
1627 (release-tag-suffix . "-ga")
1628 (release-tag-version-delimiter . ".")))
1629 (native-inputs
1630 (modify-inputs native-inputs
1631 (replace "openjdk" bootstrap)))
1632 (home-page (string-append
1633 "https://openjdk.java.net/projects/jdk/"
1634 (version-major version)))))
1635 (name "openjdk")
1636 (version version*))
1637 (package
1638 (inherit base)
1639 field
1640 ...)))))))
1641
1642(define-public openjdk12
1643 (make-openjdk
1644 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1645 (source
1646 (origin
1647 (method url-fetch)
1648 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1649 (file-name (string-append name "-" version ".tar.bz2"))
1650 (sha256
1651 (base32
1652 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1653 (modules '((guix build utils)))
1654 (snippet
1655 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1656 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1657 (arguments
1658 (substitute-keyword-arguments (package-arguments openjdk11)
1659 ((#:phases phases)
1660 #~(modify-phases #$phases
1661 #$@(if (target-aarch64?)
1662 #~((add-after 'unpack 'patch-for-aarch64
1663 (lambda _
1664 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1665 ;; This line is duplicated, so remove both occurrences,
1666 ;; then add back one occurrence by substituting a
1667 ;; comment that occurs once.
1668 (("using MacroAssembler::call_VM_leaf_base;") "")
1669 (("Interpreter specific version of call_VM_base")
1670 (string-append "Interpreter specific version of call_VM_base\n"
1671 " using MacroAssembler::call_VM_leaf_base;"))))))
1672 #~())
1673 (replace 'remove-timestamping
1674 (lambda _
1675 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1676 (("__DATE__") "")
1677 (("__TIME__") ""))))
1678 (replace 'fix-java-shebangs
1679 (lambda _
1680 ;; 'blocked' was renamed to 'blacklisted' in this version for
1681 ;; some reason.
1682 (substitute* "make/data/blacklistedcertsconverter/\
1683blacklisted.certs.pem"
1684 (("^#!.*")
1685 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1686
1687(define-public openjdk13
1688 (make-openjdk openjdk12 "13.0.14"
1689 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1690 (source (origin
1691 (inherit (package-source base))
1692 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1693 "openjdk-10-jtask-reproducibility.patch"))))
1694 (arguments
1695 (substitute-keyword-arguments (package-arguments openjdk12)
1696 ((#:phases phases)
1697 #~(modify-phases #$phases
1698 (replace 'remove-timestamping
1699 (lambda _
1700 (substitute*
1701 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1702 (("__DATE__") "")
1703 (("__TIME__") ""))))))))))
1704
1705(define-public openjdk14
1706 (make-openjdk
1707 openjdk13 "14.0.2"
1708 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1709 (source (origin
1710 (inherit (package-source base))
1711 (snippet ;override snippet
1712 '(begin
1713 ;; The m4 macro uses 'help' to search for builtins, which is
1714 ;; not available in bash-minimal
1715 (substitute* "make/autoconf/basics.m4"
1716 (("if help") "if command -v"))
1717 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1718 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1719 "openjdk-10-jtask-reproducibility.patch"
1720 "openjdk-13-classlist-reproducibility.patch"))))))
1721
1722(define-public openjdk15
1723 (make-openjdk
1724 openjdk14 "15.0.10"
1725 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1726 (source (origin
1727 (inherit (package-source base))
1728 (modules '())
1729 (snippet #f)
1730 (patches
1731 (search-patches "openjdk-15-jtask-reproducibility.patch"
1732 "openjdk-15-xcursor-no-dynamic.patch"))))
1733 (inputs
1734 (modify-inputs inputs
1735 (append libxcursor))) ;for our patch to work
1736 (arguments
1737 (substitute-keyword-arguments (package-arguments base)
1738 ((#:implicit-inputs? _ #t)
1739 ;; This is necessary to avoid include ordering errors when adding a
1740 ;; lower GCC to native-inputs to avoid errors like "error: 'fesetround'
1741 ;; was not declared in this scope; did you mean 'setreuid'?"
1742 #f)
1743 ((#:configure-flags flags '%standard-phases)
1744 #~(cons "--without-gtest" ;this replaces...
1745 (delete "--disable-hotspot-gtest" #$flags))))) ;... this
1746 (native-inputs
1747 (append (modify-inputs native-inputs
1748 (delete "make" ;remove old gnu-make-4.2
1749 "openjdk") ;to remove non-jdk output
1750 (append `(,openjdk14 "jdk")))
1751 ;; On powerpc64le at least, GCC 14 cannot be used otherwise JDK 15
1752 ;; fails to bootstrap JDK 16, with incomprehensible errors like:
1753 ;; src/java.base/share/classes/java/lang/reflect/Proxy.java:1311:
1754 ;; error: integer number too large.
1755 (modify-inputs (%final-inputs)
1756 (replace "gcc" gcc-11))))))
1757
1758(define-public openjdk16
1759 (make-openjdk
1760 openjdk15 "16.0.2"
1761 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1762 (source (origin
1763 (inherit (package-source base))
1764 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1765 "openjdk-10-setsignalhandler.patch"))))))
1766
1767(define-public openjdk17
1768 (make-openjdk
1769 openjdk16 "17.0.10"
1770 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1771 (source (origin
1772 (inherit (package-source base))
1773 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1774 (arguments
1775 (substitute-keyword-arguments (package-arguments base)
1776 ((#:implicit-inputs? _ #t) #t) ;restore default
1777 ((#:phases phases)
1778 #~(modify-phases #$phases
1779 (replace 'fix-java-shebangs
1780 (lambda _
1781 ;; 'blacklisted' was renamed back to 'blocked'.
1782 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1783 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))
1784 (native-inputs
1785 ;; Resume using the implicit inputs, including the current GCC.
1786 (fold alist-delete (package-native-inputs base)
1787 (map first (%final-inputs))))))
1788
1789(define-public openjdk18
1790 (make-openjdk openjdk17 "18.0.2.1"
1791 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1792
1793(define-public openjdk19
1794 (make-openjdk openjdk18 "19.0.2"
1795 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1796 (arguments
1797 (substitute-keyword-arguments (package-arguments openjdk18)
1798 ((#:phases phases)
1799 #~(modify-phases #$phases
1800 (replace 'fix-java-shebangs
1801 (lambda _
1802 ;; Update file path.
1803 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1804 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1805 (add-before 'configure 'define-java-environment-variables
1806 (lambda* (#:key inputs #:allow-other-keys)
1807 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1808 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1809
1810(define-public openjdk20
1811 (make-openjdk openjdk19 "20.0.2"
1812 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1813
1814(define-public openjdk21
1815 (make-openjdk openjdk20 "21.0.2"
1816 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1817 (source (origin
1818 (inherit (package-source base))
1819 (patches (search-patches "openjdk-21-fix-rpath.patch"
1820 "openjdk-15-xcursor-no-dynamic.patch"))))
1821 (arguments
1822 (substitute-keyword-arguments (package-arguments base)
1823 ((#:phases phases)
1824 #~(modify-phases #$phases
1825 (replace 'fix-java-shebangs
1826 (lambda _
1827 ;; 'blacklisted' was renamed back to 'blocked'.
1828 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1829 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1830
1831(define-public openjdk22
1832 (make-openjdk
1833 openjdk21 "22.0.2"
1834 "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6"
1835 (arguments
1836 (substitute-keyword-arguments (package-arguments base)
1837 ((#:phases phases)
1838 #~(modify-phases #$phases
1839 (add-after 'unpack 'do-not-disable-new-dtags
1840 (lambda _
1841 ;; Our validate-runpath phases checks for RUNPATH, not RPATH.
1842 (substitute* "make/autoconf/flags-cflags.m4"
1843 ((" -Wl,--disable-new-dtags") ""))))))))))
1844
1845(define-public openjdk23
1846 (make-openjdk
1847 openjdk22 "23.0.2"
1848 "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf"
1849 (source (origin
1850 (inherit (package-source base))
1851 ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it
1852 ;; appears not needed anymore. The
1853 ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore;
1854 ;; the fix should be pursued in libx11 (see:
1855 ;; https://issues.guix.gnu.org/54654)
1856 (patches '())))))
1857
1858(define-public openjdk24
1859 (make-openjdk
1860 openjdk23 "24.0.1"
1861 "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx"
1862 (arguments
1863 (substitute-keyword-arguments (package-arguments base)
1864 ((#:configure-flags flags #~(list))
1865 (if (target-x86-32?)
1866 #~(cons* "--enable-deprecated-ports=yes" #$flags)
1867 flags))))))
1868
1869(define-public openjdk25
1870 (make-openjdk
1871 openjdk24 "25.0.2"
1872 "03aa34lscr3qbdl6qz3gqyp0nzkqfj02362mzmpkiq3y2g5xdnrj"
1873 (arguments
1874 (substitute-keyword-arguments (package-arguments base)
1875 ((#:configure-flags flags #~(list))
1876 (if (target-x86-32?)
1877 ;; Full builds on 32-bit x86 architectures are not supported as of
1878 ;; this version. Best we can do is to build with the "zero" variant.
1879 #~(cons* "--with-jvm-variants=zero"
1880 "--disable-precompiled-headers"
1881 #$flags)
1882 flags))
1883 ((#:phases phases #~%standard-phases)
1884 (if (target-x86-32?)
1885 #~(modify-phases #$phases
1886 (replace 'install
1887 (lambda _
1888 (let ((images (car (find-files "build" "-zero-release"
1889 #:directories? #t))))
1890 (copy-recursively (string-append images "/images/jdk")
1891 #$output:jdk)
1892 (copy-recursively (string-append images "/images/jre")
1893 #$output)
1894 (copy-recursively (string-append images "/images/docs")
1895 #$output:doc))))
1896 (replace 'install-libjvm
1897 (lambda _
1898 (let ((lib-out (string-append #$output "/lib"))
1899 (lib-jdk (string-append #$output:jdk "/lib")))
1900 (symlink (string-append lib-jdk "/zero/libjvm.so")
1901 (string-append lib-jdk "/libjvm.so"))
1902 (symlink (string-append lib-out "/zero/libjvm.so")
1903 (string-append lib-out "/libjvm.so"))))))
1904 phases))))))
1905
1906;;; Convenience alias to point to the latest version of OpenJDK.
1907(define-public openjdk openjdk25)
1908
1909
1910;; This version of JBR is here in order to be able to build custom
1911;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1912;; tests.
1913(define-public jbr11
1914 (package
1915 (inherit openjdk11)
1916 (name "jbr")
1917 (version "11_0_16-b2248")
1918 (source (origin
1919 (method git-fetch)
1920 (uri (git-reference
1921 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1922 (commit (string-append "jb" version))))
1923 (file-name (string-append name "-" version "-checkout"))
1924 (sha256
1925 (base32
1926 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1927 (arguments
1928 (substitute-keyword-arguments (package-arguments openjdk11)
1929 ((#:configure-flags configure-flags)
1930 #~(append #$configure-flags
1931 (list "--with-jvm-features=shenandoahgc"
1932 "--enable-cds=yes"
1933 "--with-vendor-name=JetBrains s.r.o"
1934 "--with-vendor-url=https://www.jetbrains.com/"
1935 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1936 (synopsis "JetBrains Java Runtime")
1937 (description "This package provides a Java runtime environment for
1938and Java development kit. It supports enhanced class redefinition (DCEVM),
1939includes a number of improvements in font rendering, keyboards support,
1940windowing/focus subsystems, HiDPI, accessibility, and performance,
1941provides better desktop integration and bugfixes not yet present in
1942OpenJDK.")
1943 (home-page "https://www.jetbrains.com/")
1944 (license license:gpl2+)))
1945
1946(define-public jbr17
1947 (package
1948 (inherit openjdk17)
1949 (name "jbr")
1950 (version "17.0.11b1207.30")
1951 (source (origin
1952 (method git-fetch)
1953 (uri (git-reference
1954 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1955 (commit (string-append "jbr-release-" version))))
1956 (file-name (string-append name "-" version "-checkout"))
1957 (sha256
1958 (base32
1959 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1960 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1961 (arguments
1962 (substitute-keyword-arguments (package-arguments openjdk17)
1963 ((#:configure-flags configure-flags)
1964 #~(append #$configure-flags
1965 (list "--with-jvm-features=shenandoahgc"
1966 "--enable-cds=yes"
1967 "--with-vendor-name=JetBrains s.r.o"
1968 "--with-vendor-url=https://www.jetbrains.com/"
1969 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1970 (synopsis "JetBrains Java Runtime")
1971 (description "This package provides a Java runtime environment for
1972and Java development kit. It supports enhanced class redefinition (DCEVM),
1973includes a number of improvements in font rendering, keyboards support,
1974windowing/focus subsystems, HiDPI, accessibility, and performance,
1975provides better desktop integration and bugfixes not yet present in
1976OpenJDK.")
1977 (home-page "https://www.jetbrains.com/")
1978 (license license:gpl2+)))
1979
1980(define-public jbr21
1981 (package
1982 (inherit openjdk21)
1983 (name "jbr")
1984 (version "21.0.3b509.11")
1985 (source (origin
1986 (method git-fetch)
1987 (uri (git-reference
1988 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1989 (commit (string-append "jbr-release-" version))))
1990 (file-name (string-append name "-" version "-checkout"))
1991 (sha256
1992 (base32
1993 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1994 (patches (search-patches "openjdk-21-fix-rpath.patch"
1995 "jbr-17-xcursor-no-dynamic.patch"))))
1996 (inputs
1997 `(("wayland" ,wayland)
1998 ("libxkbcommon" ,libxkbcommon) ; for wayland
1999 ,@(package-inputs openjdk21)))
2000 (arguments
2001 (substitute-keyword-arguments (package-arguments openjdk21)
2002 ((#:configure-flags configure-flags)
2003 #~(append #$configure-flags
2004 (list "--with-jvm-features=shenandoahgc"
2005 "--enable-cds=yes"
2006 "--with-vendor-name=JetBrains s.r.o"
2007 "--with-vendor-url=https://www.jetbrains.com/"
2008 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
2009 (synopsis "JetBrains Java Runtime")
2010 (description "This package provides a Java runtime environment for
2011and Java development kit. It supports enhanced class redefinition (DCEVM),
2012includes a number of improvements in font rendering, keyboards support,
2013windowing/focus subsystems, HiDPI, accessibility, and performance,
2014provides better desktop integration and bugfixes not yet present in
2015OpenJDK.")
2016 (home-page "https://www.jetbrains.com/")
2017 (license license:gpl2+)))
2018
2019(define-public jbr25
2020 (package
2021 (inherit openjdk25)
2022 (name "jbr")
2023 (version "25.0.2b329.72")
2024 (source (origin
2025 (method git-fetch)
2026 (uri (git-reference
2027 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
2028 (commit (string-append "jbr-release-" version))))
2029 (file-name (string-append name "-" version "-checkout"))
2030 (sha256
2031 (base32
2032 "1m7pbz2ypx4h7n6iqss8bgymg9hqn14lnis4a2w87mgy51p370ib"))
2033 (patches
2034 (search-patches "jbr-25-wayland-drag-icon.patch"
2035 "jbr-25-wayland-intra-jvm-dnd.patch"))))
2036 (inputs
2037 `(("wayland" ,wayland)
2038 ("libxkbcommon" ,libxkbcommon) ; for wayland
2039 ,@(package-inputs openjdk25)))
2040 (native-inputs
2041 (modify-inputs (package-native-inputs openjdk25)
2042 (append wayland-protocols)))
2043 (arguments
2044 (substitute-keyword-arguments (package-arguments openjdk25)
2045 ((#:configure-flags configure-flags)
2046 #~(append #$configure-flags
2047 (list "--disable-warnings-as-errors"
2048 "--disable-java-warnings-as-errors"
2049 "--with-jvm-features=shenandoahgc"
2050 "--enable-cds=yes"
2051 (string-append "--with-wayland-protocols="
2052 (assoc-ref %build-inputs "wayland-protocols")
2053 "/share/wayland-protocols")
2054 "--with-vendor-name=JetBrains s.r.o"
2055 "--with-vendor-url=https://www.jetbrains.com/"
2056 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))
2057 ((#:phases phases)
2058 #~(modify-phases #$phases
2059 ;; JBR adds a 'static-jdk-image' target to 'make all' that
2060 ;; statically links both the Wayland and X11 AWT backends,
2061 ;; causing duplicate symbol errors. Build only what we need.
2062 ;; See also their workaround BROKEN_STATIC_LIBS make variable.
2063 (replace 'build
2064 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
2065 (apply invoke "make" "product-images" "all-docs-images"
2066 (format #f "JOBS=~a" (if parallel-build?
2067 (parallel-job-count)
2068 1))
2069 make-flags)))))))
2070 (synopsis "JetBrains Java Runtime")
2071 (description "This package provides a Java runtime environment for
2072and Java development kit. It supports enhanced class redefinition (DCEVM),
2073includes a number of improvements in font rendering, keyboards support,
2074windowing/focus subsystems, Wayland, HiDPI, accessibility, and performance,
2075provides better desktop integration and bugfixes not yet present in
2076OpenJDK.")
2077 (home-page "https://www.jetbrains.com/")
2078 (license license:gpl2+)))
2079
2080
2081(define-public ant/java8
2082 (package
2083 (name "ant")
2084 (version "1.10.17")
2085 (source (origin
2086 (method url-fetch)
2087 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2088 version "-src.tar.gz"))
2089 (sha256
2090 (base32
2091 "0p34pqknp2rbk5wk6zw8m6jfn7rkk7fyv3yvk9zhfxhhxrf0lfgh"))
2092 (modules '((guix build utils)))
2093 (snippet
2094 '(begin
2095 (for-each delete-file
2096 (find-files "lib/optional" "\\.jar$"))
2097 #t))))
2098 (build-system gnu-build-system)
2099 (arguments
2100 (list
2101 #:modules '((srfi srfi-1)
2102 (guix build gnu-build-system)
2103 (guix build utils))
2104 #:tests? #f ;no "check" target
2105 #:phases
2106 #~(modify-phases %standard-phases
2107 (add-after 'unpack 'remove-scripts
2108 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2109 ;; wrappers.
2110 (lambda _
2111 (for-each delete-file
2112 (find-files "src/script"
2113 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
2114 (delete 'bootstrap)
2115 (delete 'configure)
2116 (replace 'build
2117 (lambda* (#:key inputs #:allow-other-keys)
2118 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2119
2120 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2121 ;; Ant to build. This is necessary in addition to disabling the
2122 ;; "check" phase, because the dependency on "test-jar" would always
2123 ;; result in the tests to be run.
2124 (substitute* "build.xml"
2125 (("depends=\"jars,test-jar") "depends=\"jars"))
2126 (invoke "bash" "bootstrap.sh"
2127 (string-append "-Ddist.dir=" #$output))))
2128 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2129 (lambda _
2130 (define (repack-archive jar)
2131 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2132 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2133 (with-directory-excursion dir
2134 (invoke "unzip" jar))
2135 (delete-file jar)
2136 ;; XXX: copied from (gnu build install)
2137 (for-each (lambda (file)
2138 (let ((s (lstat file)))
2139 (unless (eq? (stat:type s) 'symlink)
2140 (utime file 0 0 0 0))))
2141 (find-files dir #:directories? #t))
2142 ;; It is important that the manifest appears first.
2143 (with-directory-excursion dir
2144 (let* ((files (find-files "." ".*" #:directories? #t))
2145 ;; To ensure that the reference scanner can
2146 ;; detect all store references in the jars
2147 ;; we disable compression with the "-0" option.
2148 (command (if (file-exists? manifest)
2149 `("zip" "-0" "-X" ,jar ,manifest
2150 ,@files)
2151 `("zip" "-0" "-X" ,jar ,@files))))
2152 (apply invoke command)))))
2153 (for-each repack-archive
2154 (find-files
2155 (string-append #$output "/lib")
2156 "\\.jar$"))))
2157 (delete 'install))))
2158 (native-inputs
2159 `(("jdk" ,icedtea-8 "jdk")
2160 ("zip" ,zip)
2161 ("unzip" ,unzip)))
2162 (home-page "https://ant.apache.org")
2163 (synopsis "Build tool for Java")
2164 (description
2165 "Ant is a platform-independent build tool for Java. It is similar to
2166make but is implemented using the Java language, requires the Java platform,
2167and is best suited to building Java projects. Ant uses XML to describe the
2168build process and its dependencies, whereas Make uses Makefile format.")
2169 (license license:asl2.0)))
2170
2171(define-public ant/java8-empty-etc
2172 (package
2173 (inherit ant/java8)
2174 (arguments
2175 (substitute-keyword-arguments (package-arguments ant/java8)
2176 ((#:phases phases)
2177 #~(modify-phases #$phases
2178 (add-after 'build 'add-empty-etc-directory
2179 (lambda* (#:key outputs #:allow-other-keys)
2180 (mkdir-p (string-append (assoc-ref outputs "out") "/etc"))))))))))
2181
2182(define-public ant-1.10.14
2183 (package
2184 (inherit ant/java8)
2185 (name "ant")
2186 (version "1.10.14")
2187 (source
2188 (origin
2189 (method url-fetch)
2190 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2191 version "-src.tar.gz"))
2192 (sha256
2193 (base32 "0m0vcazy1634nra8mcs3hvvf49avnbxf8f5y1icn5syi8hgy6pws"))
2194 (modules '((guix build utils)))
2195 (snippet
2196 '(begin
2197 (for-each delete-file
2198 (find-files "lib/optional" "\\.jar$"))
2199 #t))))
2200 (arguments
2201 (substitute-keyword-arguments (package-arguments ant/java8)
2202 ((#:phases phases)
2203 #~(modify-phases #$phases
2204 (replace 'remove-scripts
2205 (lambda _
2206 (for-each delete-file
2207 (find-files "src/script" ".*\\.(bat|cmd)$"))))
2208 (add-after 'build 'install-distribution-files
2209 (lambda* (#:key outputs #:allow-other-keys)
2210 (let* ((out (assoc-ref outputs "out"))
2211 (bin-dir (string-append out "/bin"))
2212 (etc-dir (string-append out "/etc"))
2213 (checkstyle-dir (string-append etc-dir "/checkstyle")))
2214 (for-each
2215 (lambda (file)
2216 (copy-file (string-append "src/script/" file)
2217 (string-append bin-dir "/" file))
2218 (chmod (string-append bin-dir "/" file) #o755))
2219 '("antRun" "antRun.pl" "runant.pl" "runant.py"))
2220 (mkdir-p checkstyle-dir)
2221 (for-each
2222 (lambda (file)
2223 (copy-file (string-append "src/etc/" file)
2224 (string-append etc-dir "/" file)))
2225 '("junit-frames.xsl"
2226 "junit-noframes.xsl"
2227 "junit-frames-xalan1.xsl"
2228 "coverage-frames.xsl"
2229 "maudit-frames.xsl"
2230 "mmetrics-frames.xsl"
2231 "changelog.xsl"
2232 "jdepend.xsl"
2233 "jdepend-frames.xsl"
2234 "log.xsl"
2235 "tagdiff.xsl"))
2236 (for-each
2237 (lambda (file)
2238 (copy-file (string-append "src/etc/checkstyle/" file)
2239 (string-append checkstyle-dir "/" file)))
2240 '("checkstyle-frames-sortby-check.xsl"
2241 "checkstyle-frames.xsl"
2242 "checkstyle-text.xsl"
2243 "checkstyle-xdoc.xsl"))
2244 (copy-file "build/lib/ant-bootstrap.jar"
2245 (string-append etc-dir "/ant-bootstrap.jar")))))))))))
2246
2247;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2248;; requires Java 8.
2249(define-public ant
2250 (package (inherit ant/java8)
2251 (version "1.9.15")
2252 (source (origin
2253 (method url-fetch)
2254 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2255 version "-src.tar.gz"))
2256 (sha256
2257 (base32
2258 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2259 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2260 ;; later.
2261 (arguments
2262 (substitute-keyword-arguments
2263 `(#:modules ((srfi srfi-1)
2264 (guix build gnu-build-system)
2265 (guix build utils))
2266 #:tests? #f ; no "check" target
2267 #:phases
2268 (modify-phases %standard-phases
2269 (delete 'bootstrap)
2270 (delete 'configure)
2271 (add-before 'build 'define-java-environment-variables
2272 (lambda* (#:key inputs #:allow-other-keys)
2273 ;; First, set environment variables (eases debugging on -K).
2274 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2275 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2276 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2277 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2278 (replace 'build
2279 (lambda* (#:key inputs outputs #:allow-other-keys)
2280 ;; Ant complains if this file doesn't exist.
2281 (setenv "HOME" "/tmp")
2282 (with-output-to-file "/tmp/.ant.properties"
2283 (lambda _ (display "")))
2284
2285 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2286 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2287
2288 ;; jikes produces lots of warnings, but they are not very
2289 ;; interesting, so we silence them.
2290 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2291
2292 ;; Without these JamVM options the build may freeze.
2293 (substitute* "bootstrap.sh"
2294 (("^\"\\$\\{JAVACMD\\}\" " m)
2295 ,@(if (string-prefix? "armhf" (or (%current-system)
2296 (%current-target-system)))
2297 `((string-append m "-Xnocompact "))
2298 `((string-append m "-Xnocompact -Xnoinlining ")))))
2299
2300 ;; Disable tests because we are bootstrapping and thus don't have
2301 ;; any of the dependencies required to build and run the tests.
2302 (substitute* "build.xml"
2303 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2304 (invoke "bash" "bootstrap.sh"
2305 (string-append "-Ddist.dir="
2306 (assoc-ref outputs "out")))))
2307 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2308 (lambda* (#:key outputs #:allow-other-keys)
2309 (define (repack-archive jar)
2310 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2311 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2312 (with-directory-excursion dir
2313 (invoke "unzip" jar))
2314 (delete-file jar)
2315 ;; XXX: copied from (gnu build install)
2316 (for-each (lambda (file)
2317 (let ((s (lstat file)))
2318 (unless (eq? (stat:type s) 'symlink)
2319 (utime file 0 0 0 0))))
2320 (find-files dir #:directories? #t))
2321 ;; It is important that the manifest appears first.
2322 (with-directory-excursion dir
2323 (let* ((files (find-files "." ".*" #:directories? #t))
2324 ;; To ensure that the reference scanner can
2325 ;; detect all store references in the jars
2326 ;; we disable compression with the "-0" option.
2327 (command (if (file-exists? manifest)
2328 `("zip" "-0" "-X" ,jar ,manifest
2329 ,@files)
2330 `("zip" "-0" "-X" ,jar ,@files))))
2331 (apply invoke command)))))
2332 (for-each repack-archive
2333 (find-files
2334 (string-append (assoc-ref %outputs "out") "/lib")
2335 "\\.jar$"))))
2336 (delete 'install)))
2337 ((#:phases phases)
2338 `(modify-phases ,phases
2339 (delete 'define-java-environment-variables)
2340 (add-after 'unpack 'remove-scripts
2341 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2342 ;; wrappers.
2343 (lambda _
2344 (for-each delete-file
2345 (find-files "src/script"
2346 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2347 #t))
2348 (replace 'build
2349 (lambda* (#:key inputs outputs #:allow-other-keys)
2350 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2351
2352 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2353 ;; Ant to build. This is necessary in addition to disabling the
2354 ;; "check" phase, because the dependency on "test-jar" would always
2355 ;; result in the tests to be run.
2356 (substitute* "build.xml"
2357 (("depends=\"jars,test-jar") "depends=\"jars"))
2358 (invoke "bash" "bootstrap.sh"
2359 (string-append "-Ddist.dir="
2360 (assoc-ref outputs "out")))))))))
2361 (native-inputs
2362 `(("jdk" ,icedtea-7 "jdk")
2363 ("zip" ,zip)
2364 ("unzip" ,unzip)))))
2365
2366(define-public ant-apache-bcel
2367 (package
2368 (inherit ant/java8)
2369 (name "ant-apache-bcel")
2370 (arguments
2371 (substitute-keyword-arguments (package-arguments ant/java8)
2372 ((#:phases phases)
2373 #~(modify-phases #$phases
2374 (add-after 'unpack 'link-bcel
2375 (lambda* (#:key inputs #:allow-other-keys)
2376 (for-each (lambda (file)
2377 (symlink file
2378 (string-append "lib/optional/"
2379 (basename file))))
2380 (find-files (assoc-ref inputs "java-commons-bcel")
2381 "\\.jar$"))))
2382 (add-after 'build 'install
2383 (lambda _
2384 (let ((share (string-append #$output "/share/java"))
2385 (bin (string-append #$output "/bin"))
2386 (lib (string-append #$output "/lib")))
2387 (mkdir-p share)
2388 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2389 (delete-file-recursively bin)
2390 (delete-file-recursively lib))))))))
2391 (inputs
2392 (modify-inputs (package-inputs ant/java8)
2393 (prepend java-commons-bcel)))))
2394
2395(define-public ant-junit
2396 (package
2397 (inherit ant/java8)
2398 (name "ant-junit")
2399 (arguments
2400 (substitute-keyword-arguments (package-arguments ant/java8)
2401 ((#:phases phases)
2402 #~(modify-phases #$phases
2403 (add-after 'unpack 'link-junit
2404 (lambda* (#:key inputs #:allow-other-keys)
2405 (for-each (lambda (file)
2406 (symlink file
2407 (string-append "lib/optional/"
2408 (basename file))))
2409 (find-files (assoc-ref inputs "java-junit")
2410 "\\.jar$"))))
2411 (add-after 'build 'install
2412 (lambda _
2413 (let ((share (string-append #$output "/share/java"))
2414 (bin (string-append #$output "/bin"))
2415 (lib (string-append #$output "/lib")))
2416 (mkdir-p share)
2417 (install-file (string-append lib "/ant-junit.jar") share)
2418 (delete-file-recursively bin)
2419 (delete-file-recursively lib))))))))
2420 (inputs
2421 (modify-inputs (package-inputs ant/java8)
2422 (prepend java-junit)))))
2423
2424(define-public libantlr3c
2425 (package
2426 (name "libantlr3c")
2427 (version "3.4")
2428 (source
2429 (origin
2430 (method url-fetch)
2431 (uri
2432 (string-append "https://www.antlr3.org/download/C/"
2433 name "-" version ".tar.gz"))
2434 (sha256
2435 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2436 (build-system gnu-build-system)
2437 (arguments
2438 (list #:configure-flags
2439 #~(list "--enable-debuginfo"
2440 "--disable-static"
2441 #$@(if (target-64bit?)
2442 #~("--enable-64bit")
2443 #~())
2444 #$@(if (target-riscv64?)
2445 #~("--disable-abiflags")
2446 #~()))))
2447 (synopsis "ANTLR C Library")
2448 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2449Tool for Language Recognition v3).")
2450 (home-page "https://www.antlr3.org/")
2451 (license license:bsd-3)))
2452
2453(define-public drip
2454 ;; Last release is from 2014, with a few important commits afterwards.
2455 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2456 (package
2457 (name "drip")
2458 (version (git-version "0.2.4" "1" commit))
2459 (source (origin
2460 (method git-fetch)
2461 (uri (git-reference
2462 (url "https://github.com/ninjudd/drip")
2463 (commit commit)))
2464 (file-name (git-file-name name version))
2465 (sha256
2466 (base32
2467 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2468 (build-system gnu-build-system)
2469 (native-inputs
2470 `(("jdk" ,icedtea "jdk")))
2471 (arguments
2472 (list #:tests? #f ; No tests.
2473 #:phases
2474 #~(modify-phases %standard-phases
2475 (delete 'configure)
2476 (add-before 'build 'relax-gcc-14-strictness
2477 (lambda _
2478 (substitute* "Makefile"
2479 ((" gcc(.*)$" all options)
2480 (string-append
2481 " gcc"
2482 " -Wno-error=incompatible-pointer-types"
2483 " -Wno-error=implicit-function-declaration"
2484 options)))))
2485 (add-before 'install 'fix-wrapper
2486 (lambda* (#:key inputs #:allow-other-keys)
2487 (let ((jps (search-input-file inputs "/bin/jps")))
2488 (substitute* "bin/drip"
2489 (("jps") jps)
2490 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2491 ;; No need to make:
2492 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2493 ;; No need to include source:
2494 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2495 "true")))))
2496 (replace 'install
2497 (lambda* (#:key outputs #:allow-other-keys)
2498 (let* ((bin (string-append #$output "/bin"))
2499 (share (string-append #$output "/share/drip")))
2500 (mkdir-p bin)
2501 (for-each
2502 (lambda (file)
2503 (install-file (string-append "bin/" file) bin))
2504 '("drip" "drip_daemon" "drip_proxy"))
2505 (install-file "drip.jar" share)
2506 (substitute* (string-append bin "/drip")
2507 (("drip_dir=\\$bin_dir/..")
2508 (string-append "drip_dir=" share)))))))))
2509 (home-page "https://github.com/ninjudd/drip")
2510 (synopsis "Faster Java Virtual Machine launching")
2511 (description "Drip is a launcher for the Java Virtual Machine that
2512provides much faster startup times than the @command{java} command. The @command{drip}
2513script is intended to be a drop-in replacement for the @command{java} command,
2514only faster.")
2515 (license license:epl1.0))))
2516
2517(define-public java-openjfx-build
2518 (package
2519 (name "java-openjfx-build")
2520 ;; This is a java-8 version
2521 (version "8.202")
2522 (source (origin
2523 (method hg-fetch)
2524 (uri (hg-reference
2525 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2526 (changeset (string-append
2527 (string-join (string-split version #\.) "u")
2528 "-ga"))))
2529 (file-name (string-append name "-" version "-checkout"))
2530 (modules '((guix build utils)))
2531 (snippet
2532 '(begin
2533 ;; Delete included gradle jar
2534 (delete-file-recursively "gradle/wrapper")
2535 #t))
2536 (sha256
2537 (base32
2538 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2539 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2540 (build-system ant-build-system)
2541 (arguments
2542 `(#:jar-name "java-openjfx.jar"
2543 #:source-dir "buildSrc/src/main/java"
2544 #:test-dir "buildSrc/src/test"
2545 #:phases
2546 (modify-phases %standard-phases
2547 (add-before 'configure 'generate-jsl-parser
2548 (lambda _
2549 (invoke "antlr3" "-o"
2550 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2551 "buildSrc/src/main/antlr/JSL.g"))))))
2552 (inputs
2553 (list antlr3 java-stringtemplate))
2554 (native-inputs
2555 (list java-junit java-hamcrest-core))
2556 (home-page "https://openjfx.io")
2557 (synopsis "Graphical application toolkit in Java")
2558 (description "OpenJFX is a client application platform for desktop,
2559mobile and embedded systems built on Java. Its goal is to produce a
2560modern, efficient, and fully featured toolkit for developing rich client
2561applications. This package contains base classes for the OpenJFX
2562distribution and helper classes for building other parts of the
2563distribution.")
2564 (license license:gpl2))) ;gpl2 only, with classpath exception
2565
2566(define-public java-openjfx-base
2567 (package (inherit java-openjfx-build)
2568 (name "java-openjfx-base")
2569 (arguments
2570 `(#:jar-name "java-openjfx-base.jar"
2571 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2572 #:test-dir "modules/base/src/test"
2573 #:phases
2574 (modify-phases %standard-phases
2575 (add-before 'check 'remove-empty-file
2576 (lambda _
2577 (with-directory-excursion "modules/base/src/test/java"
2578 ;; These files are completely commented, but junit expects them to
2579 ;; contain a class, so tests fail.
2580 (delete-file
2581 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2582 (delete-file
2583 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2584 (delete-file "javafx/beans/property/PropertiesTest.java")
2585 (delete-file
2586 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2587 ;; This one fails
2588 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2589 #t)))))
2590 (propagated-inputs
2591 (list java-openjfx-build))
2592 (description "OpenJFX is a client application platform for desktop,
2593mobile and embedded systems built on Java. Its goal is to produce a
2594modern, efficient, and fully featured toolkit for developing rich client
2595applications. This package contains base classes for the OpenJFX
2596distribution.")))
2597
2598(define-public java-openjfx-graphics
2599 (package (inherit java-openjfx-build)
2600 (name "java-openjfx-graphics")
2601 (arguments
2602 `(#:jar-name "java-openjfx-graphics.jar"
2603 #:source-dir "modules/graphics/src/main/java"
2604 #:tests? #f; require X
2605 #:test-dir "modules/graphics/src/test"
2606 #:phases
2607 (modify-phases %standard-phases
2608 (add-after 'unpack 'copy-missing-file
2609 (lambda* (#:key inputs #:allow-other-keys)
2610 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2611 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2612 ;; XXX: looks like the missing file we found isn't *quite*
2613 ;; compatible...
2614 (substitute* target
2615 (("case TYPE_INT_ARGB:") "")))))
2616 (add-after 'build 'build-native
2617 (lambda* (#:key inputs outputs #:allow-other-keys)
2618 (let ((jdk (assoc-ref inputs "jdk"))
2619 (class-file->class-name
2620 (lambda (class-file)
2621 (string-map (lambda (c)
2622 (if (char=? c #\/) #\. c))
2623 (string-drop-right class-file
2624 (string-length ".class"))))))
2625 (setenv "CPPFLAGS"
2626 (string-append "-DINLINE=inline "
2627 "-DLINUX "
2628 "-I" jdk "/include "
2629 "-I" jdk "/include/linux "
2630 "-I " (getcwd) "/build/classes/include "
2631 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2632
2633 ;; Instructions have been adapted from buildSrc/linux.gradle
2634 (with-directory-excursion "build/classes"
2635 ;; Build prism
2636 (mkdir-p "include")
2637
2638 ;; Generate headers for prism
2639 (apply invoke "javah" "-d" "include" "-cp" "."
2640 (map class-file->class-name
2641 (append (find-files "com/sun/prism/impl" "\\.class$")
2642 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2643
2644 ;; ...then for prism_sw
2645 (apply invoke "javah" "-d" "include" "-cp" "."
2646 (map class-file->class-name
2647 (find-files "com/sun/pisces" "\\.class$")))
2648
2649 ;; ...and for prism_es2
2650 (apply invoke "javah" "-d" "include" "-cp" "."
2651 (map class-file->class-name
2652 (find-files "com/sun/prism/es2" "\\.class$")))))
2653
2654 (with-directory-excursion "netbeans/native-prism"
2655 (invoke "make" "CONF=Release"))
2656 (with-directory-excursion "netbeans/native-prism-sw"
2657 (invoke "make" "CONF=Release"))
2658 ;; TODO: This fails due to unknown EGL procedure names
2659 #;
2660 (with-directory-excursion "netbeans/native-prism-es2"
2661 (invoke "make" "CONF=Release"))
2662
2663 (let* ((out (assoc-ref outputs "out"))
2664 (dir ,(match (%current-system)
2665 ("i686-linux"
2666 "i386")
2667 ((or "armhf-linux" "aarch64-linux")
2668 "arm")
2669 ((or "x86_64-linux")
2670 "amd64")
2671 (_ "unknown")))
2672 (target (string-append out "/share/" dir "/")))
2673 (mkdir-p target)
2674 (for-each (lambda (file)
2675 (let ((new-name
2676 (string-append "lib"
2677 (string-map
2678 (lambda (c)
2679 (if (char=? c #\-) #\_ c))
2680 (string-drop (basename file)
2681 (string-length "libnative-"))))))
2682 (copy-file file
2683 (string-append target new-name))))
2684 (find-files "netbeans" "\\.so$"))))))))
2685 (propagated-inputs
2686 (list java-openjfx-base))
2687 (inputs
2688 (list java-swt))
2689 ;; XXX: for unknown reasons
2690 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2691 ;; in this revision.
2692 (native-inputs
2693 `(("JNativeSurface.c"
2694 ,(origin
2695 (method url-fetch)
2696 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2697/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2698 (sha256
2699 (base32
2700 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2701 (description "OpenJFX is a client application platform for desktop,
2702mobile and embedded systems built on Java. Its goal is to produce a
2703modern, efficient, and fully featured toolkit for developing rich client
2704applications. This package contains graphics-related classes for the
2705OpenJFX distribution.")))
2706
2707(define-public java-openjfx-media
2708 (package (inherit java-openjfx-build)
2709 (name "java-openjfx-media")
2710 (propagated-inputs
2711 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2712 (arguments
2713 `(#:jar-name "java-openjfx-media.jar"
2714 #:source-dir "modules/media/src/main/java"
2715 #:tests? #f)); no tests
2716 (description "OpenJFX is a client application platform for desktop,
2717mobile and embedded systems built on Java. Its goal is to produce a
2718modern, efficient, and fully featured toolkit for developing rich client
2719applications. This package contains media-related classes for the
2720OpenJFX distribution.")))
2721
2722(define-public java-openjfx-controls
2723 (package (inherit java-openjfx-build)
2724 (name "java-openjfx-controls")
2725 (propagated-inputs
2726 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2727 (arguments
2728 `(#:jar-name "java-openjfx-controls.jar"
2729 #:source-dir "modules/controls/src/main/java"
2730 #:test-dir "modules/controls/src/test"
2731 ;; TODO: tests require com.sun.javafx.pgstub,
2732 ;; javafx.collections.MockSetObserver, and
2733 ;; com.sun.javafx.binding.ExpressionHelperUtility
2734 #:tests? #false
2735 #:phases
2736 (modify-phases %standard-phases
2737 (add-after 'unpack 'copy-resources
2738 (lambda _
2739 (copy-recursively "modules/controls/src/test/resources"
2740 "build/test-classes")
2741 (copy-recursively "modules/controls/src/main/resources"
2742 "build/classes"))))))
2743 (description "OpenJFX is a client application platform for desktop,
2744mobile and embedded systems built on Java. Its goal is to produce a
2745modern, efficient, and fully featured toolkit for developing rich client
2746applications. This package contains UI control classes for the
2747OpenJFX distribution.")))
2748
2749(define-public javacc-4
2750 (package
2751 (name "javacc")
2752 (version "4.1")
2753 (source (origin
2754 (method git-fetch)
2755 (uri (git-reference
2756 (url "https://github.com/javacc/javacc")
2757 (commit "release_41")))
2758 (file-name (string-append "javacc-" version "-checkout"))
2759 (sha256
2760 (base32
2761 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2762 (modules '((guix build utils)))
2763 ;; delete bundled jars
2764 (snippet '(begin (delete-file-recursively "lib") #t))))
2765 (build-system ant-build-system)
2766 ;; Tests fail with
2767 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2768 ;; JAVACODE failed
2769 (arguments
2770 `(#:tests? #f
2771 #:phases
2772 (modify-phases %standard-phases
2773 ;; Delete tests to avoid build failure (we don't run them anyway).
2774 (add-after 'unpack 'delete-tests
2775 (lambda _
2776 (for-each delete-file
2777 '("src/org/javacc/JavaCCTestCase.java"
2778 "src/org/javacc/parser/ExpansionTest.java"
2779 "src/org/javacc/parser/OptionsTest.java"
2780 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2781 (for-each delete-file-recursively
2782 '("src/org/javacc/parser/test"
2783 "src/org/javacc/jjdoc/test"))
2784 #t))
2785 (replace 'install (install-jars "bin/lib")))))
2786 (home-page "https://javacc.org/")
2787 (synopsis "Java parser generator")
2788 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2789generator for use with Java applications. A parser generator is a tool that
2790reads a grammar specification and converts it to a Java program that can
2791recognize matches to the grammar. In addition to the parser generator itself,
2792JavaCC provides other standard capabilities related to parser generation such
2793as tree building (via a tool called JJTree included with JavaCC), actions,
2794debugging, etc.")
2795 (license license:bsd-3)))
2796
2797;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2798;; in the bootstrap/ directory.
2799(define-public javacc-3
2800 (package
2801 (inherit javacc-4)
2802 (version "3.2")
2803 (source (origin
2804 (method git-fetch)
2805 (uri (git-reference
2806 (url "https://github.com/javacc/javacc")
2807 (commit "release_32")))
2808 (file-name (string-append "javacc-" version "-checkout"))
2809 (sha256
2810 (base32
2811 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2812 (arguments
2813 `(#:tests? #f
2814 #:phases
2815 (modify-phases %standard-phases
2816 (add-before 'build 'set-java-version
2817 (lambda _
2818 (for-each
2819 (lambda (file)
2820 (substitute* file
2821 (("debug=") "source=\"1.4\" debug=")))
2822 (find-files "." "build.xml"))
2823 #t))
2824 (replace 'install (install-jars "bin/lib")))))))
2825
2826(define-public javacc
2827 (package
2828 (inherit javacc-4)
2829 (version "7.0.4")
2830 (source
2831 (origin
2832 (method git-fetch)
2833 (uri (git-reference
2834 (url "https://github.com/javacc/javacc")
2835 (commit version)))
2836 (file-name (git-file-name "javacc" version))
2837 (sha256
2838 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2839 (modules '((guix build utils)))
2840 ;; Delete bundled jars.
2841 (snippet '(begin (for-each delete-file-recursively
2842 '("bootstrap" "lib"))))))
2843 (arguments
2844 `(#:make-flags ; bootstrap from javacc-4
2845 ,#~(list (string-append "-Dbootstrap-jar="
2846 #$(this-package-native-input "javacc")
2847 "/share/java/javacc.jar"))
2848 #:test-target "test"
2849 #:phases
2850 (modify-phases %standard-phases
2851 (replace 'install (install-jars "target"))
2852 (add-after 'install 'install-bin
2853 (lambda* (#:key outputs inputs #:allow-other-keys)
2854 (let* ((out (assoc-ref outputs "out"))
2855 (dir (string-append out "/share/java"))
2856 (bin (string-append out "/bin"))
2857 (javacc (string-append bin "/javacc")))
2858 (mkdir-p bin)
2859 (with-output-to-file javacc
2860 (lambda _
2861 (display
2862 (string-append "#!/bin/sh\n"
2863 (assoc-ref inputs "icedtea") "/bin/java"
2864 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2865 (chmod javacc #o755)
2866 ;; symlink to different names to affect the first argument and
2867 ;; change the behavior of the jar file.
2868 (symlink javacc (string-append bin "/jjdoc"))
2869 (symlink javacc (string-append bin "/jjtree"))))))))
2870 (native-inputs
2871 (list javacc-4))
2872 (inputs (list icedtea-8))))
2873
2874(define-public java-ecj
2875 (package
2876 (name "java-ecj")
2877 (version "4.6.3")
2878 (source
2879 (origin
2880 (method url-fetch)
2881 (uri (string-append "http://archive.eclipse.org/eclipse/"
2882 "downloads/drops4/R-" version "-201703010400/"
2883 "ecjsrc-" version ".jar"))
2884 (sha256
2885 (base32
2886 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2887 (build-system ant-build-system)
2888 (arguments
2889 `(#:tests? #f ; none included
2890 #:build-target "build"
2891 #:phases
2892 (modify-phases %standard-phases
2893 (add-after 'unpack 'fix-build.xml
2894 (lambda _
2895 (substitute* "src/build.xml"
2896 (("^.*MANIFEST.*$")
2897 "")
2898 (("^.*properties.*$")
2899 "<include name=\"**/*.properties\"/>
2900 <include name=\"**/*.props\"/>"))))
2901 (add-before 'build 'chdir
2902 (lambda _ (chdir "src")))
2903 (replace 'install (install-jars ".")))))
2904 (home-page "https://eclipse.org")
2905 (synopsis "Eclipse Java development tools core batch compiler")
2906 (description "This package provides the Eclipse Java core batch compiler.")
2907 (license license:epl1.0)))
2908
2909(define-public java-cisd-base
2910 (let ((revision 38938)
2911 (base-version "14.12.0"))
2912 (package
2913 (name "java-cisd-base")
2914 (version (string-append base-version "-" (number->string revision)))
2915 (source (origin
2916 (method svn-fetch)
2917 (uri (svn-reference
2918 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2919 "base/tags/release/"
2920 (version-major+minor base-version)
2921 ".x/" base-version "/base/"))
2922 (revision revision)))
2923 (file-name (string-append "java-cisd-base-" version "-checkout"))
2924 (sha256
2925 (base32
2926 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2927 (modules '((guix build utils)))
2928 (snippet
2929 '(begin
2930 ;; Delete included gradle jar
2931 (delete-file-recursively "gradle/wrapper")
2932 ;; Delete pre-built native libraries
2933 (delete-file-recursively "libs")
2934 #t))))
2935 (build-system ant-build-system)
2936 (arguments
2937 `(#:make-flags '("-file" "build/build.xml")
2938 #:test-target "jar-test"
2939 #:jdk ,icedtea-8
2940 #:phases
2941 (modify-phases %standard-phases
2942 (add-after 'unpack 'unpack-build-resources
2943 (lambda* (#:key inputs #:allow-other-keys)
2944 (copy-recursively (assoc-ref inputs "build-resources")
2945 "../build_resources")
2946 #t))
2947 (add-after 'unpack-build-resources 'fix-dependencies
2948 (lambda* (#:key inputs #:allow-other-keys)
2949 (substitute* "build/build.xml"
2950 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2951 (search-input-file inputs
2952 "/share/java/java-testng.jar"))
2953 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2954 (search-input-file inputs
2955 (string-append
2956 "/share/java/commons-lang-"
2957 ,(package-version java-commons-lang)
2958 ".jar")))
2959 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2960 (search-input-file inputs
2961 (string-append
2962 "/lib/m2/commons-io/commons-io/"
2963 ,(package-version java-commons-io)
2964 "/commons-io-"
2965 ,(package-version java-commons-io)
2966 ".jar")))
2967 ;; Remove dependency on svn
2968 (("<build-info.*") "")
2969 (("\\$\\{revision.number\\}")
2970 ,(number->string revision))
2971 (("\\$\\{version.number\\}") ,base-version))
2972 ;; Remove dependency on classycle
2973 (substitute* "../build_resources/ant/build-common.xml"
2974 (("<taskdef name=\"dependency-checker.*") "")
2975 (("classname=\"classycle.*") "")
2976 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2977 #t))
2978 ;; A few tests fail because of the lack of a proper /etc/groups and
2979 ;; /etc/passwd file in the build container.
2980 (add-after 'unpack 'disable-broken-tests
2981 (lambda _
2982 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2983 (("Unix.isOperational\\(\\)") "false"))
2984 #t))
2985 ;; These decorators are almost useless and pull in an unpackaged
2986 ;; dependency.
2987 (add-after 'unpack 'remove-useless-decorators
2988 (lambda _
2989 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2990 (("@Private") "")
2991 (("import ch.rinn.restrictions.Private;") ""))
2992 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2993 (("@Friend.*") "")
2994 (("import ch.rinn.restrictions.Friend;") ""))
2995 #t))
2996 (add-before 'configure 'build-native-code
2997 (lambda* (#:key inputs #:allow-other-keys)
2998 (let ((jdk (assoc-ref inputs "jdk"))
2999 (dir ,(match (%current-system)
3000 ("i686-linux"
3001 "i386-Linux")
3002 ((or "armhf-linux" "aarch64-linux")
3003 "arm-Linux")
3004 ((or "x86_64-linux")
3005 "amd64-Linux")
3006 (_ "unknown-Linux"))))
3007 (with-directory-excursion "source/c"
3008 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
3009 (string-append "-I" jdk "/include")
3010 (string-append "-I" jdk "/include/linux")
3011 "-o" "libunix.so")
3012 (invoke "gcc" "-shared" "-O3" "-fPIC"
3013 "-DMACHINE_BYTE_ORDER=1"
3014 "copyCommon.c"
3015 "copyByteChar.c"
3016 "copyByteDouble.c"
3017 "copyByteFloat.c"
3018 "copyByteInt.c"
3019 "copyByteLong.c"
3020 "copyByteShort.c"
3021 (string-append "-I" jdk "/include")
3022 (string-append "-I" jdk "/include/linux")
3023 "-o" "libnativedata.so"))
3024 (install-file "source/c/libunix.so"
3025 (string-append "libs/native/unix/" dir))
3026 (install-file "source/c/libnativedata.so"
3027 (string-append "libs/native/nativedata/" dir))
3028 #t)))
3029 ;; In the "check" phase we only build the test executable.
3030 (add-after 'check 'run-tests
3031 (lambda _
3032 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
3033 (delete-file "targets/dist/sis-base-test.jar")
3034 #t))
3035 (replace 'install (install-jars "targets/dist")))))
3036 (native-inputs
3037 `(("jdk" ,icedtea-8)
3038 ("java-commons-lang" ,java-commons-lang)
3039 ("java-commons-io" ,java-commons-io)
3040 ("java-testng" ,java-testng)
3041 ("build-resources"
3042 ,(origin
3043 (method svn-fetch)
3044 (uri (svn-reference
3045 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3046 "base/tags/release/"
3047 (version-major+minor base-version)
3048 ".x/" base-version
3049 "/build_resources/"))
3050 (revision revision)))
3051 (sha256
3052 (base32
3053 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3054 (home-page "https://svnsis.ethz.ch")
3055 (synopsis "Utility classes for libraries from ETH Zurich")
3056 (description "This library supplies some utility classes needed for
3057libraries from the SIS division at ETH Zurich like jHDF5.")
3058 ;; The C sources are under a non-copyleft license, which looks like a
3059 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3060 (license (list license:asl2.0
3061 (license:non-copyleft "file://source/c/COPYING"))))))
3062
3063(define-public java-cisd-args4j
3064 (let ((revision 39162)
3065 (base-version "9.11.2"))
3066 (package
3067 (name "java-cisd-args4j")
3068 (version (string-append base-version "-" (number->string revision)))
3069 (source (origin
3070 (method svn-fetch)
3071 (uri (svn-reference
3072 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3073 "args4j/tags/release/"
3074 (version-major+minor base-version)
3075 ".x/" base-version "/args4j/"))
3076 (revision revision)))
3077 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
3078 (sha256
3079 (base32
3080 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
3081 (build-system ant-build-system)
3082 (arguments
3083 `(#:make-flags '("-file" "build/build.xml")
3084 #:tests? #f ; there are no tests
3085 #:modules ((guix build ant-build-system)
3086 (guix build utils)
3087 (guix build java-utils)
3088 (sxml simple)
3089 (sxml transform)
3090 (sxml xpath))
3091 #:phases
3092 (modify-phases %standard-phases
3093 (add-after 'unpack 'unpack-build-resources
3094 (lambda* (#:key inputs #:allow-other-keys)
3095 (mkdir-p "../build_resources")
3096 (copy-recursively (assoc-ref inputs "build-resources")
3097 "../build_resources")
3098 (mkdir-p "../build_resources/lib")))
3099 (add-after 'unpack-build-resources 'fix-dependencies
3100 (lambda* (#:key inputs #:allow-other-keys)
3101 ;; FIXME: There should be a more convenient abstraction for
3102 ;; editing XML files.
3103 (with-directory-excursion "../build_resources/ant/"
3104 (chmod "build-common.xml" #o664)
3105 (call-with-output-file "build-common.xml.new"
3106 (lambda (port)
3107 (sxml->xml
3108 (pre-post-order
3109 (with-input-from-file "build-common.xml"
3110 (lambda _ (xml->sxml #:trim-whitespace? #t)))
3111 `(;; Remove dependency on classycle and custom ant tasks
3112 (taskdef . ,(lambda (tag . kids)
3113 (let ((name ((sxpath '(name *text*)) kids)))
3114 (if (or (member "build-info" name)
3115 (member "dependency-checker" name)
3116 (member "build-java-subprojects" name)
3117 (member "project-classpath" name))
3118 '() ; skip
3119 `(,tag ,@kids)))))
3120 (typedef . ,(lambda (tag . kids)
3121 (let ((name ((sxpath '(name *text*)) kids)))
3122 (if (member "recursive-jar" name)
3123 '() ; skip
3124 `(,tag ,@kids)))))
3125 (build-java-subprojects . ,(lambda _ '()))
3126 ;; Ignore everything else
3127 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
3128 (*text* . ,(lambda (_ txt) txt))))
3129 port)))
3130 (rename-file "build-common.xml.new" "build-common.xml"))
3131 (substitute* "build/build.xml"
3132 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
3133 (search-input-file inputs "/share/java/sis-base.jar"))
3134 ;; Remove dependency on svn
3135 (("<build-info.*") "")
3136 (("\\$\\{revision.number\\}")
3137 ,(number->string revision))
3138 (("\\$\\{version.number\\}") ,base-version)
3139 ;; Don't use custom ant tasks.
3140 (("recursive-jar") "jar")
3141 (("<project-classpath.*") ""))))
3142 (replace 'install (install-jars "targets/dist")))))
3143 (inputs
3144 (list java-cisd-base))
3145 (native-inputs
3146 `(("ecj" ,java-ecj)
3147 ("build-resources"
3148 ,(origin
3149 (method svn-fetch)
3150 (uri (svn-reference
3151 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3152 "args4j/tags/release/"
3153 (version-major+minor base-version)
3154 ".x/" base-version
3155 "/build_resources/"))
3156 (revision revision)))
3157 (sha256
3158 (base32
3159 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
3160 (modules '((guix build utils)))
3161 ;; Delete bundled pre-built jars.
3162 (snippet
3163 '(begin (delete-file-recursively "lib/") #t))))))
3164 (home-page "https://svnsis.ethz.ch")
3165 (synopsis "Command line parser library")
3166 (description "This package provides a parser for command line arguments.")
3167 (license license:asl2.0))))
3168
3169(define-public java-cisd-jhdf5
3170 (let ((revision 39162)
3171 (base-version "14.12.6"))
3172 (package
3173 (name "java-cisd-jhdf5")
3174 (version (string-append base-version "-" (number->string revision)))
3175 (source (origin
3176 (method svn-fetch)
3177 (uri (svn-reference
3178 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3179 "jhdf5/tags/release/"
3180 (version-major+minor base-version)
3181 ".x/" base-version "/jhdf5/"))
3182 (revision revision)))
3183 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3184 (sha256
3185 (base32
3186 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3187 (modules '((guix build utils)))
3188 (snippet
3189 '(begin
3190 ;; Delete included gradle jar
3191 (delete-file-recursively "gradle/wrapper")
3192 ;; Delete pre-built native libraries
3193 (delete-file-recursively "libs")))))
3194 (build-system ant-build-system)
3195 (arguments
3196 `(#:make-flags '("-file" "build/build.xml")
3197 #:build-target "jar-all"
3198 #:test-target "jar-test"
3199 #:phases
3200 (modify-phases %standard-phases
3201 ;; FIXME: this build phase fails.
3202 (delete 'generate-jar-indices)
3203 ;; Don't erase results from the build phase when building tests.
3204 (add-after 'unpack 'separate-test-target-from-clean
3205 (lambda _
3206 (substitute* "build/build.xml"
3207 (("\"jar-test\" depends=\"clean, ")
3208 "\"jar-test\" depends=\""))))
3209 (add-after 'unpack 'unpack-build-resources
3210 (lambda* (#:key inputs #:allow-other-keys)
3211 (copy-recursively (assoc-ref inputs "build-resources")
3212 "../build_resources")
3213 (delete-file-recursively "../build_resources/lib/")
3214 (mkdir-p "../build_resources/lib")
3215 ;; Remove dependency on classycle
3216 (substitute* "../build_resources/ant/build-common.xml"
3217 (("<taskdef name=\"dependency-checker.*") "")
3218 (("classname=\"classycle.*") "")
3219 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3220 ;; Remove dependency on svn
3221 (substitute* "build/build.xml"
3222 (("<build-info.*") "")
3223 (("\\$\\{revision.number\\}")
3224 ,(number->string revision))
3225 (("\\$\\{version.number\\}") ,base-version))))
3226 (add-after 'unpack-build-resources 'fix-dependencies
3227 (lambda* (#:key inputs #:allow-other-keys)
3228 (substitute* "../build_resources/ant/build-common.xml"
3229 (("../libraries/testng/testng-jdk15.jar")
3230 (search-input-file inputs
3231 "/share/java/java-testng.jar")))
3232 (substitute* "build/build.xml"
3233 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3234 (search-input-file inputs
3235 "/share/java/sis-base.jar"))
3236 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3237 (search-input-file inputs
3238 "/share/java/cisd-args4j.jar"))
3239 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3240 (search-input-file inputs
3241 (string-append
3242 "/share/java/commons-lang-"
3243 ,(package-version java-commons-lang)
3244 ".jar")))
3245 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3246 (search-input-file inputs
3247 (string-append
3248 "/lib/m2/commons-io/commons-io/"
3249 ,(package-version java-commons-io)
3250 "/commons-io-"
3251 ,(package-version java-commons-io)
3252 ".jar")))
3253 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3254 (search-input-file inputs
3255 "/share/java/java-testng.jar"))
3256 (("\\$\\{lib\\}/junit4/junit.jar")
3257 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3258 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3259 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3260 "jar$"))))
3261 ;; Remove dependency on ch.rinn.restrictions
3262 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3263 (substitute* '("BitSetConversionUtils.java"
3264 "HDF5Utils.java")
3265 (("import ch.rinn.restrictions.Private;") "")
3266 (("@Private") "")))
3267 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3268 (substitute* '("BitSetConversionTest.java"
3269 "h5ar/HDF5ArchiverTest.java")
3270 (("import ch.rinn.restrictions.Friend;") "")
3271 (("@Friend.*") ""))
3272 ;; Remove leftovers from removing @Friend
3273 (substitute* "h5ar/HDF5ArchiverTest.java"
3274 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3275 "")))))
3276 (add-before 'configure 'build-native-library
3277 (lambda* (#:key inputs #:allow-other-keys)
3278 (let ((jdk (assoc-ref inputs "jdk"))
3279 (hdf5 (assoc-ref inputs "hdf5"))
3280 (dir ,(match (%current-system)
3281 ("i686-linux"
3282 "i386-Linux")
3283 ((or "armhf-linux" "aarch64-linux")
3284 "arm-Linux")
3285 ((or "x86_64-linux")
3286 "amd64-Linux")
3287 (_ "unknown-Linux"))))
3288 (with-directory-excursion "source/c"
3289 (apply invoke `("gcc" "-shared" "-O3"
3290 "-fPIC"
3291 "-Wl,--exclude-libs,ALL"
3292 "-Wno-error=implicit-function-declaration"
3293 ,@(find-files "jhdf5" "\\.c$")
3294 ,@(find-files "hdf-java" "\\.c$")
3295 ,(string-append "-I" hdf5 "/include")
3296 ,(string-append "-I" jdk "/include")
3297 ,(string-append "-I" jdk "/include/linux")
3298 ,(string-append hdf5 "/lib/libhdf5.a")
3299 "-o" "libjhdf5.so" "-lz")))
3300 (install-file "source/c/libjhdf5.so"
3301 (string-append "libs/native/jhdf5/" dir)))))
3302 ;; In the "check" phase we only build the test executable.
3303 (add-after 'check 'run-tests
3304 (lambda _
3305 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3306 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3307 (replace 'install
3308 (install-jars "targets/dist")))))
3309 (inputs
3310 (list java-cisd-base
3311 java-cisd-args4j
3312 java-commons-lang
3313 java-commons-io
3314 hdf5-1.8
3315 zlib))
3316 (native-inputs
3317 `(("jdk" ,icedtea-8)
3318 ("java-testng" ,java-testng)
3319 ("java-junit" ,java-junit)
3320 ("java-jmock" ,java-jmock)
3321 ("java-hamcrest-core" ,java-hamcrest-core)
3322 ("build-resources"
3323 ,(origin
3324 (method svn-fetch)
3325 (uri (svn-reference
3326 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3327 "jhdf5/tags/release/"
3328 (version-major+minor base-version)
3329 ".x/" base-version
3330 "/build_resources/"))
3331 (revision revision)))
3332 (sha256
3333 (base32
3334 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3335 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3336 (synopsis "Java binding for HDF5")
3337 (description "JHDF5 is a high-level API in Java for reading and writing
3338HDF5 files, building on the libraries provided by the HDF Group.")
3339 ;; The C sources are under a non-copyleft license, which looks like a
3340 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3341 (license (list license:asl2.0
3342 (license:non-copyleft "file://source/c/COPYING"))))))
3343
3344(define-public java-classpathx-servletapi
3345 (package
3346 (name "java-classpathx-servletapi")
3347 (version "3.0.1")
3348 (source (origin
3349 (method url-fetch)
3350 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3351 "servletapi-" version ".tar.gz"))
3352 (sha256
3353 (base32
3354 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3355 (build-system ant-build-system)
3356 (arguments
3357 `(#:tests? #f ; there is no test target
3358 #:build-target "compile"
3359 #:make-flags
3360 ,#~(list "-Dbuild.compiler=javac1.8"
3361 (string-append "-Ddist=" #$output))
3362 #:phases
3363 (modify-phases %standard-phases
3364 (replace 'install
3365 (lambda* (#:key make-flags #:allow-other-keys)
3366 (apply invoke `("ant" "dist" ,@make-flags)))))))
3367 (home-page "https://www.gnu.org/software/classpathx/")
3368 (synopsis "Java servlet API implementation")
3369 (description "This is the GNU servlet API distribution, part of the
3370ClasspathX project. It provides implementations of version 3.0 of the servlet
3371API and version 2.1 of the Java ServerPages API.")
3372 (license license:gpl3+)))
3373
3374(define-public java-javaee-servletapi
3375 (package
3376 (name "java-javaee-servletapi")
3377 (version "3.1.0")
3378 (source (origin
3379 (method git-fetch)
3380 (uri (git-reference
3381 (url "https://github.com/javaee/servlet-spec")
3382 (commit version)))
3383 (file-name (git-file-name name version))
3384 (sha256
3385 (base32
3386 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3387 (build-system ant-build-system)
3388 (arguments
3389 `(#:jar-name "javax-servletapi.jar"
3390 ;; no tests
3391 #:tests? #f
3392 #:source-dir "src/main/java"
3393 #:phases
3394 (modify-phases %standard-phases
3395 (add-before 'build 'copy-resources
3396 (lambda _
3397 (mkdir-p "build/classes/javax/servlet/http")
3398 (let ((from-prefix "src/main/java/javax/servlet/")
3399 (to-prefix "build/classes/javax/servlet/"))
3400 (for-each (lambda (f)
3401 (copy-file (string-append from-prefix f)
3402 (string-append to-prefix f)))
3403 (list "LocalStrings_ja.properties"
3404 "LocalStrings.properties"
3405 "LocalStrings_fr.properties"
3406 "http/LocalStrings_es.properties"
3407 "http/LocalStrings_ja.properties"
3408 "http/LocalStrings.properties"
3409 "http/LocalStrings_fr.properties")))
3410 #t)))))
3411 (native-inputs
3412 (list unzip))
3413 (home-page "https://javaee.github.io/servlet-spec/")
3414 (synopsis "Java servlet API")
3415 (description "Java Servlet is the foundation web specification in the
3416Java Enterprise Platform. Developers can build web applications using the
3417Servlet API to interact with the request/response workflow. This project
3418provides information on the continued development of the Java Servlet
3419specification.")
3420 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3421 ;; Some files are licensed under ASL 2.0.
3422 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3423
3424(define-public java-jsvg-1.6.1
3425 (package
3426 (name "java-jsvg")
3427 (version "1.6.1")
3428 (source
3429 (origin
3430 (method git-fetch)
3431 (uri (git-reference
3432 (url "https://github.com/weisJ/jsvg")
3433 (commit "v1.6.1-rc1")))
3434 (file-name (git-file-name name version))
3435 (sha256
3436 (base32 "0rcphd1596ps87q31qmksnh1nc4m1x1rrkn9amk3ggwy9l2pavsy"))
3437 (modules '((guix build utils)))
3438 (snippet
3439 ;; Remove @MustBeInvokedByOverriders annotations; not present
3440 ;; in java-jetbrains-annotations 19.0.0.
3441 ;; TODO: Update java-jetbrains-annotations to >= 20.0.0.
3442 '(begin
3443 (substitute* (find-files "." "\\.java$")
3444 (("import org\\.jetbrains\\.annotations\\.MustBeInvokedByOverriders;")
3445 "")
3446 (("@MustBeInvokedByOverriders") ""))
3447 #t))))
3448 (build-system ant-build-system)
3449 (arguments
3450 (list
3451 #:jdk openjdk17
3452 #:tests? #f
3453 ;; ant-build-system does not export a default-modules constant.
3454 #:modules '((guix build ant-build-system)
3455 (guix build java-utils)
3456 (guix build utils)
3457 (sxml simple))
3458 #:phases
3459 #~(modify-phases %standard-phases
3460 (replace 'build
3461 (lambda* (#:key inputs #:allow-other-keys)
3462 (let* ((src-dir "jsvg/src/main/java")
3463 (classes-dir "build/classes")
3464 (jar-file
3465 (string-append "build/jsvg-" #$version ".jar"))
3466 (annotations-cp
3467 (string-join
3468 (append
3469 (find-files (assoc-ref inputs
3470 "java-jetbrains-annotations")
3471 "\\.jar$")
3472 (find-files (assoc-ref inputs
3473 "java-error-prone-annotations")
3474 "\\.jar$"))
3475 ":")))
3476 (mkdir-p classes-dir)
3477 (apply invoke "javac"
3478 "--release" "11"
3479 "-cp" annotations-cp
3480 "-d" classes-dir
3481 (find-files src-dir "\\.java$"))
3482 (invoke "jar" "-cf" jar-file
3483 "-C" classes-dir "."))))
3484 (add-before 'build 'generate-pom
3485 (lambda _
3486 (call-with-output-file "pom.xml"
3487 (lambda (port)
3488 (sxml->xml
3489 `(*TOP*
3490 (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
3491 (project
3492 (modelVersion "4.0.0")
3493 (groupId "com.github.weisj")
3494 (artifactId "jsvg")
3495 (version ,#$version)))
3496 port)))))
3497 (replace 'install
3498 (install-from-pom "pom.xml")))))
3499 (native-inputs
3500 (list java-jetbrains-annotations
3501 java-error-prone-annotations))
3502 (home-page "https://github.com/weisJ/jsvg")
3503 (synopsis "Java SVG rendering library")
3504 (description
3505 "JSVG is a Java library for rendering SVG images. It provides a
3506lightweight SVG parser and renderer using the Java2D API.")
3507 (license license:expat)))
3508
3509(define-public java-jtidy
3510 (package
3511 (name "java-jtidy")
3512 (version "8.0")
3513 (source
3514 (origin
3515 (method git-fetch)
3516 (uri (git-reference
3517 (url "https://github.com/jtidy/jtidy")
3518 (commit "r938")))
3519 (file-name (git-file-name name version))
3520 (sha256
3521 (base32 "1zksmvmrr10nzk5ya6sz0l8093yf3b08lkg76cn4fdv2jqm3cssp"))
3522 ;; Remove xerces:dom3-xml-apis dependency -- DOM Level 3 has been
3523 ;; part of the JDK since Java 5. install-from-pom calls
3524 ;; fix-pom-dependencies which throws no-such-input for
3525 ;; dependencies not in inputs and not test-scoped or optional.
3526 ;; A patch is used because programmatic removal does not work:
3527 ;;
3528 ;; - pre-post-order to filter the dependency from the parsed
3529 ;; SXML, then sxml->xml to write it back: xml->sxml expands
3530 ;; the default xmlns into long tag names like
3531 ;; http://maven.apache.org/POM/4.0.0:dependency, and
3532 ;; sxml->xml's check-name rejects symbols with more than
3533 ;; one colon ("Invalid QName").
3534 ;;
3535 ;; - fix-maven-xml from (guix build maven pom) strips those
3536 ;; namespace prefixes before sxml->xml, but it is not
3537 ;; exported.
3538 ;;
3539 ;; - fix-pom-dependencies #:excludes: the excludes parameter
3540 ;; only affects plugins (fix-plugins) and extensions
3541 ;; (fix-extensions), not dependencies -- fix-deps and
3542 ;; fix-dep do not check excludes.
3543 (patches
3544 (search-patches "java-jtidy-remove-xerces-dependency.patch"))))
3545 (build-system ant-build-system)
3546 (arguments
3547 (list
3548 #:jar-name "jtidy.jar"
3549 #:source-dir "src/main/java"
3550 #:test-dir "src/test"
3551 ;; Tests are disabled: upstream's pom.xml sets testFailureIgnore=true
3552 ;; because 140 of 216 .msg reference files have wrong expected message
3553 ;; counts -- the code changed but the test data was never updated.
3554 #:tests? #f
3555 #:phases
3556 #~(modify-phases %standard-phases
3557 (add-before 'build 'copy-resources
3558 (lambda _
3559 (copy-recursively "src/main/resources" "build/classes")))
3560 (replace 'install
3561 (install-from-pom "pom.xml")))))
3562 (inputs
3563 (list java-slf4j-api))
3564 (home-page "https://github.com/jtidy/jtidy")
3565 (synopsis "Java port of HTML Tidy, an HTML syntax checker and pretty printer")
3566 (description
3567 "JTidy is a Java port of HTML Tidy, a HTML syntax checker and pretty
3568printer. Like its non-Java cousin, JTidy can be used as a tool for cleaning
3569up malformed and faulty HTML. In addition, JTidy provides a DOM interface to
3570the document that is being processed, which effectively makes it a Java HTML
3571parser.")
3572 (license license:w3c)))
3573
3574(define-public java-swt
3575 (package
3576 (name "java-swt")
3577 (version "4.7.1a")
3578 (source
3579 ;; The types of many variables and procedures differ in the sources
3580 ;; dependent on whether the target architecture is a 32-bit system or a
3581 ;; 64-bit system. Instead of patching the sources on demand in a build
3582 ;; phase we download either the 32-bit archive (which mostly uses "int"
3583 ;; types) or the 64-bit archive (which mostly uses "long" types).
3584 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3585 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3586 (file32 "x86")
3587 (file64 "x86_64"))
3588 (let-values (((hash file)
3589 (match (or (%current-target-system) (%current-system))
3590 ("x86_64-linux" (values hash64 file64))
3591 (_ (values hash32 file32)))))
3592 (origin
3593 (method url-fetch)
3594 (uri (string-append
3595 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3596 "R-" version "-201710090410/swt-" version
3597 "-gtk-linux-" file ".zip"))
3598 (sha256 (base32 hash))))))
3599 (build-system ant-build-system)
3600 (arguments
3601 `(#:jar-name "swt.jar"
3602 #:jdk ,icedtea-8
3603 #:tests? #f ; no "check" target
3604 #:phases
3605 (modify-phases %standard-phases
3606 (replace 'unpack
3607 (lambda* (#:key source #:allow-other-keys)
3608 (mkdir "swt")
3609 (invoke "unzip" source "-d" "swt")
3610 (chdir "swt")
3611 (mkdir "src")
3612 (invoke "unzip" "src.zip" "-d" "src")))
3613 ;; The classpath contains invalid icecat jars. Since we don't need
3614 ;; anything other than the JDK on the classpath, we can simply unset
3615 ;; it.
3616 (add-after 'configure 'unset-classpath
3617 (lambda _ (unsetenv "CLASSPATH") #t))
3618 (add-before 'build 'build-native
3619 (lambda* (#:key inputs outputs #:allow-other-keys)
3620 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3621 ;; Build shared libraries. Users of SWT have to set the system
3622 ;; property swt.library.path to the "lib" directory of this
3623 ;; package output.
3624 (mkdir-p lib)
3625 (setenv "OUTPUT_DIR" lib)
3626 (setenv "CC" ,(cc-for-target))
3627 (with-directory-excursion "src"
3628 (invoke "bash" "build.sh")))))
3629 (add-after 'install 'install-native
3630 (lambda* (#:key outputs #:allow-other-keys)
3631 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3632 (for-each (lambda (file)
3633 (install-file file lib))
3634 (find-files "." "\\.so$"))
3635 #t))))))
3636 (inputs
3637 `(("gtk" ,gtk+-2)
3638 ("libxtst" ,libxtst)
3639 ("libxt" ,libxt)
3640 ("mesa" ,mesa)
3641 ("glu" ,glu)))
3642 (native-inputs
3643 (list pkg-config unzip))
3644 (home-page "https://www.eclipse.org/swt/")
3645 (synopsis "Widget toolkit for Java")
3646 (description
3647 "SWT is a widget toolkit for Java designed to provide efficient, portable
3648access to the user-interface facilities of the operating systems on which it
3649is implemented.")
3650 ;; SWT code is licensed under EPL1.0
3651 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3652 ;; Cairo bindings contain code under MPL1.1
3653 ;; XULRunner 1.9 bindings contain code under MPL2.0
3654 (license (list
3655 license:epl1.0
3656 license:mpl1.1
3657 license:mpl2.0
3658 license:lgpl2.1+))))
3659
3660;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3661;; of the latest release.
3662(define-public java-qdox-1.12
3663 (package
3664 (name "java-qdox")
3665 (version "1.12.1")
3666 (source (origin
3667 (method url-fetch)
3668 (uri (string-append "https://repo1.maven.org/maven2/"
3669 "com/thoughtworks/qdox/qdox/" version
3670 "/qdox-" version "-sources.jar"))
3671 (sha256
3672 (base32
3673 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3674 (build-system ant-build-system)
3675 (arguments
3676 `(;; Tests require junit
3677 #:tests? #f
3678 #:jar-name "qdox.jar"
3679 #:phases
3680 (modify-phases %standard-phases
3681 (replace 'unpack
3682 (lambda* (#:key source #:allow-other-keys)
3683 (mkdir "src")
3684 (with-directory-excursion "src"
3685 (invoke "jar" "-xf" source))))
3686 ;; At this point we don't have junit, so we must remove the API
3687 ;; tests.
3688 (add-after 'unpack 'delete-tests
3689 (lambda _
3690 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3691 #t)))))
3692 (home-page "https://github.com/codehaus/qdox")
3693 (synopsis "Parse definitions from Java source files")
3694 (description
3695 "QDox is a high speed, small footprint parser for extracting
3696class/interface/method definitions from source files complete with JavaDoc
3697@code{@@tags}. It is designed to be used by active code generators or
3698documentation tools.")
3699 (license license:asl2.0)))
3700
3701(define-public java-qdox
3702 (package
3703 (name "java-qdox")
3704 ; Newer version exists, but this version is required by java-plexus-component-metadata
3705 (version "2.0-M2")
3706 (source (origin
3707 (method url-fetch)
3708 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3709 ;; Older releases at https://github.com/codehaus/qdox/
3710 ;; Note: The release at maven is pre-generated. The release at
3711 ;; github requires jflex.
3712 (uri (string-append "https://repo1.maven.org/maven2/"
3713 "com/thoughtworks/qdox/qdox/" version
3714 "/qdox-" version "-sources.jar"))
3715 (sha256
3716 (base32
3717 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3718 (build-system ant-build-system)
3719 (arguments
3720 `(#:jar-name "qdox.jar"
3721 #:tests? #f; no tests
3722 #:phases
3723 (modify-phases %standard-phases
3724 (add-before 'install 'create-pom
3725 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3726 #:name "QDox"))
3727 (replace 'install
3728 (install-from-pom "pom.xml")))))
3729 (home-page "https://github.com/codehaus/qdox")
3730 (synopsis "Parse definitions from Java source files")
3731 (description "QDox is a high speed, small footprint parser for extracting
3732class/interface/method definitions from source files complete with JavaDoc
3733@code{@@tags}. It is designed to be used by active code generators or
3734documentation tools.")
3735 (license license:asl2.0)))
3736
3737(define-public java-qdox-2-M9
3738 (package
3739 (inherit java-qdox)
3740 (version "2.0-M9"); required by plexus-java
3741 (source (origin
3742 (method url-fetch)
3743 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3744 ;; Older releases at https://github.com/codehaus/qdox/
3745 ;; Note: The release at maven is pre-generated. The release at
3746 ;; github requires jflex.
3747 (uri (string-append "https://repo1.maven.org/maven2/"
3748 "com/thoughtworks/qdox/qdox/" version
3749 "/qdox-" version "-sources.jar"))
3750 (sha256
3751 (base32
3752 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3753 (arguments
3754 (substitute-keyword-arguments (package-arguments java-qdox)
3755 ((#:phases phases)
3756 `(modify-phases ,phases
3757 (replace 'create-pom
3758 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3759 #:name "QDox"))))))))
3760
3761(define-public java-jarjar
3762 (package
3763 (name "java-jarjar")
3764 (version "1.4")
3765 (source (origin
3766 (method url-fetch)
3767 (uri (string-append
3768 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3769 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3770 (sha256
3771 (base32
3772 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3773 (modules '((guix build utils)))
3774 (snippet
3775 '(begin
3776 ;; Delete bundled thirds-party jar archives.
3777 (delete-file-recursively "lib")
3778 (delete-file "src/test/enumtest.jar")
3779 ;; the CLASSPATH needs this directory, create an empty one
3780 (mkdir-p "lib")
3781 #t))))
3782 (build-system ant-build-system)
3783 (arguments
3784 `(;; Tests require junit, which ultimately depends on this package.
3785 #:tests? #f
3786 #:build-target "jar"
3787 #:phases
3788 (modify-phases %standard-phases
3789 (add-before 'build 'do-not-use-bundled-asm
3790 (lambda* (#:key inputs #:allow-other-keys)
3791 (substitute* "build.xml"
3792 (("<path id=\"path.build\">")
3793 (string-append "<path id=\"path.build\"><fileset dir=\""
3794 (assoc-ref inputs "java-asm-bootstrap")
3795 "/lib/m2\" includes=\"**/*.jar\"/>"))
3796 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3797 (("lib/asm-commons-4.0.jar")
3798 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3799 "asm-6.0.jar")))
3800 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3801 (string-append "<include name=\"org/objectweb/asm/"
3802 "commons/Remap*.class\"/>"
3803 "<include name=\"org/objectweb/asm/*.class\"/>"
3804 "<include name=\"org/objectweb/asm/"
3805 "signature/*.class\"/>"
3806 "<include name=\"org/objectweb/asm/"
3807 "commons/SignatureRemapper.class\"/>")))
3808 #t))
3809 (add-before 'build 'remove-maven-dependency
3810 (lambda _
3811 ;; We do not need to build jarjar as a maven plugin just yet, so
3812 ;; remove this file. Maven requires jarjar (but not that plugin),
3813 ;; so removing it improves the bootstrap.
3814 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3815 #t))
3816 (replace 'install
3817 (lambda* (#:key outputs #:allow-other-keys)
3818 (let ((target (string-append (assoc-ref outputs "out")
3819 "/share/java")))
3820 (install-file (string-append "dist/jarjar-" ,version ".jar")
3821 target))
3822 #t)))))
3823 (inputs
3824 (list java-asm-bootstrap))
3825 (native-inputs
3826 (list unzip))
3827 (home-page "https://code.google.com/archive/p/jarjar/")
3828 (synopsis "Repackage Java libraries")
3829 (description
3830 "Jar Jar Links is a utility that makes it easy to repackage Java
3831libraries and embed them into your own distribution. Jar Jar Links includes
3832an Ant task that extends the built-in @code{jar} task.")
3833 (license license:asl2.0)))
3834
3835(define-public java-hamcrest
3836 (package
3837 (name "java-hamcrest")
3838 (version "3.0")
3839 (source (origin
3840 (method git-fetch)
3841 (uri (git-reference
3842 (url "https://github.com/hamcrest/JavaHamcrest/")
3843 (commit (string-append "v" version))))
3844 (file-name (git-file-name name version))
3845 (sha256
3846 (base32
3847 "07cagv2ncs4y02fmwbll3r4rqpjf3zxs163ync24q3x9fplrxmly"))))
3848 (build-system ant-build-system)
3849 (arguments
3850 `(#:tests? #f ; Tests require junit
3851 #:source-dir "hamcrest/src/main"
3852 #:jar-name "hamcrest.jar"))
3853 (home-page "https://hamcrest.org/")
3854 (synopsis "Library of matchers for building test expressions")
3855 (description
3856 "This package provides a library of matcher objects (also known as
3857constraints or predicates) allowing @code{match} rules to be defined
3858declaratively, to be used in other frameworks. Typical scenarios include
3859testing frameworks, mocking libraries and UI validation rules.")
3860 (license license:bsd-3)))
3861
3862(define-public java-hamcrest-core
3863 (package
3864 (name "java-hamcrest-core")
3865 (version "1.3")
3866 (properties `((superseded . ,java-hamcrest)))
3867 (source (origin
3868 (method git-fetch)
3869 (uri (git-reference
3870 (url "https://github.com/hamcrest/JavaHamcrest/")
3871 (commit (string-append "hamcrest-java-" version))))
3872 (file-name (git-file-name name version))
3873 (sha256
3874 (base32
3875 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3876 (modules '((guix build utils)))
3877 (snippet
3878 '(begin
3879 ;; Delete bundled thirds-party jar archives.
3880 (delete-file-recursively "lib")
3881 #t))))
3882 (build-system ant-build-system)
3883 (arguments
3884 `(#:tests? #f ; Tests require junit
3885 #:modules ((guix build ant-build-system)
3886 (guix build java-utils)
3887 (guix build utils)
3888 (srfi srfi-1))
3889 #:make-flags (list (string-append "-Dversion=" ,version))
3890 #:test-target "unit-test"
3891 #:build-target "core"
3892 #:phases
3893 (modify-phases %standard-phases
3894 ;; Disable unit tests, because they require junit, which requires
3895 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3896 ;; attribute from the manifest for reproducibility.
3897 (add-before 'configure 'patch-build.xml
3898 (lambda _
3899 (substitute* "build.xml"
3900 (("unit-test, ") "")
3901 (("\\$\\{build.timestamp\\}") "guix"))
3902 #t))
3903 ;; Java's "getMethods()" returns methods in an unpredictable order.
3904 ;; To make the output of the generated code deterministic we must
3905 ;; sort the array of methods.
3906 (add-after 'unpack 'make-method-order-deterministic
3907 (lambda _
3908 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3909 (("import java\\.util\\.Iterator;" line)
3910 (string-append line "\n"
3911 "import java.util.Arrays; import java.util.Comparator;"))
3912 (("allMethods = cls\\.getMethods\\(\\);" line)
3913 (string-append "_" line
3914 "
3915private Method[] getSortedMethods() {
3916 Arrays.sort(_allMethods, new Comparator<Method>() {
3917 @Override
3918 public int compare(Method a, Method b) {
3919 return a.toString().compareTo(b.toString());
3920 }
3921 });
3922 return _allMethods;
3923}
3924
3925private Method[] allMethods = getSortedMethods();")))
3926 #t))
3927 (add-before 'build 'do-not-use-bundled-qdox
3928 (lambda* (#:key inputs #:allow-other-keys)
3929 (substitute* "build.xml"
3930 (("lib/generator/qdox-1.12.jar")
3931 (string-append (assoc-ref inputs "java-qdox-1.12")
3932 "/share/java/qdox.jar")))
3933 #t))
3934 ;; build.xml searches for .jar files in this directoy, which
3935 ;; we remove from the source archive.
3936 (add-before 'build 'create-dummy-directories
3937 (lambda _
3938 (mkdir-p "lib/integration")
3939 #t))
3940 (add-before 'build 'create-pom
3941 (lambda _
3942 (substitute* "pom/hamcrest-core.pom"
3943 (("@VERSION@") ,version))
3944 #t))
3945 (replace 'install
3946 (install-from-pom "pom/hamcrest-core.pom")))))
3947 (native-inputs
3948 `(("java-qdox-1.12" ,java-qdox-1.12)
3949 ("java-jarjar" ,java-jarjar)))
3950 (propagated-inputs
3951 (list java-hamcrest-parent-pom))
3952 (home-page "https://hamcrest.org/")
3953 (synopsis "Library of matchers for building test expressions")
3954 (description
3955 "This package provides a library of matcher objects (also known as
3956constraints or predicates) allowing @code{match} rules to be defined
3957declaratively, to be used in other frameworks. Typical scenarios include
3958testing frameworks, mocking libraries and UI validation rules.")
3959 (license license:bsd-2)))
3960
3961(define-public java-hamcrest-parent-pom
3962 (package
3963 (inherit java-hamcrest-core)
3964 (properties '((hidden? . #t)))
3965 (name "java-hamcrest-parent-pom")
3966 (propagated-inputs '())
3967 (native-inputs '())
3968 (arguments
3969 `(#:tests? #f
3970 #:phases
3971 (modify-phases %standard-phases
3972 (delete 'configure)
3973 (replace 'build
3974 (lambda _
3975 (substitute* "pom/hamcrest-parent.pom"
3976 (("@VERSION@") ,(package-version java-hamcrest-core)))
3977 #t))
3978 (replace 'install
3979 (install-pom-file "pom/hamcrest-parent.pom")))))))
3980
3981(define-public java-hamcrest-library
3982 (package
3983 (inherit java-hamcrest-core)
3984 (name "java-hamcrest-library")
3985 (properties `((superseded . ,java-hamcrest)))
3986 (arguments
3987 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3988 ((#:build-target _) "library")
3989 ((#:phases phases)
3990 `(modify-phases ,phases
3991 (add-after 'unpack 'patch-classpath-for-integration
3992 (lambda* (#:key inputs #:allow-other-keys)
3993 (substitute* "build.xml"
3994 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3995 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3996 "jar$"))))
3997 #t))
3998 (replace 'create-pom
3999 (lambda _
4000 (substitute* "pom/hamcrest-library.pom"
4001 (("@VERSION@") ,(package-version java-hamcrest-core)))
4002 #t))
4003 (replace 'install
4004 (install-from-pom "pom/hamcrest-library.pom"))))))
4005 (propagated-inputs
4006 (list java-hamcrest-core java-hamcrest-parent-pom))))
4007
4008(define-public java-junit
4009 (package
4010 (name "java-junit")
4011 (version "4.12")
4012 (source (origin
4013 (method git-fetch)
4014 (uri (git-reference
4015 (url "https://github.com/junit-team/junit/")
4016 (commit (string-append "r" version))))
4017 (file-name (git-file-name name version))
4018 (sha256
4019 (base32
4020 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
4021 (modules '((guix build utils)))
4022 (snippet
4023 '(begin
4024 ;; Delete bundled jar archives.
4025 (delete-file-recursively "lib")
4026 #t))))
4027 (build-system ant-build-system)
4028 (arguments
4029 `(#:jar-name "junit.jar"
4030 #:source-dir "src/main/java"
4031 #:test-dir "src/test"
4032 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
4033 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
4034 #:phases
4035 (modify-phases %standard-phases
4036 (add-before 'check 'copy-test-resources
4037 (lambda _
4038 (copy-recursively "src/test/resources" "build/test-classes")
4039 #t))
4040 (replace 'install
4041 (install-from-pom "pom.xml")))))
4042 (propagated-inputs
4043 (list java-hamcrest-core))
4044 (native-inputs
4045 (list java-hamcrest-library))
4046 (home-page "https://junit.org/junit4/")
4047 (synopsis "Test framework for Java")
4048 (description
4049 "JUnit is a simple framework to write repeatable tests for Java projects.
4050JUnit provides assertions for testing expected results, test fixtures for
4051sharing common test data, and test runners for running tests.")
4052 (license license:epl1.0)))
4053
4054(define-public java-junit-4.13.2
4055 (package
4056 (inherit java-junit)
4057 (name "java-junit")
4058 (version "4.13.2")
4059 (source
4060 (origin
4061 (method git-fetch)
4062 (uri (git-reference
4063 (url "https://github.com/junit-team/junit/")
4064 (commit (string-append "r" version))))
4065 (file-name (git-file-name "java-junit" version))
4066 (sha256
4067 (base32 "1r7k4zzscc8019np3is3bzfigw8fxd6s3259cbhzzh02q6d5p9h3"))))
4068 (propagated-inputs
4069 (list java-hamcrest))))
4070
4071(define-public java-junitparams
4072 (package
4073 (name "java-junitparams")
4074 (version "1.1.1")
4075 (source (origin
4076 (method git-fetch)
4077 (uri (git-reference
4078 (url "https://github.com/Pragmatists/JUnitParams")
4079 (commit (string-append "JUnitParams-" version))))
4080 (file-name (git-file-name name version))
4081 (sha256
4082 (base32
4083 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
4084 (build-system ant-build-system)
4085 (arguments
4086 `(#:jar-name "junitparams.jar"
4087 #:source-dir "src/main/java"
4088 #:test-dir "src/test"
4089 #:test-exclude (list "**/SuperclassTest.java")))
4090 (inputs
4091 (list java-junit))
4092 (native-inputs
4093 (list java-junit java-hamcrest-core java-assertj))
4094 (home-page "https://github.com/Pragmatists/JUnitParams")
4095 (synopsis "Parameterised test support for JUnit")
4096 (description "The JUnitParams project adds a new runner to JUnit and
4097provides much easier and readable parametrised tests for JUnit.")
4098 (license license:asl2.0)))
4099
4100(define-public java-plexus-utils
4101 (package
4102 (name "java-plexus-utils")
4103 (version "3.3.0")
4104 (source (origin
4105 (method git-fetch)
4106 (uri (git-reference
4107 (url "https://github.com/codehaus-plexus/plexus-utils")
4108 (commit (string-append "plexus-utils-" version))))
4109 (file-name (git-file-name name version))
4110 (sha256
4111 (base32
4112 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
4113 (build-system ant-build-system)
4114 ;; FIXME: The default build.xml does not include a target to install
4115 ;; javadoc files.
4116 (arguments
4117 `(#:jar-name "plexus-utils.jar"
4118 #:source-dir "src/main"
4119 #:phases
4120 (modify-phases %standard-phases
4121 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
4122 (lambda _
4123 (substitute* "src/main/java/org/codehaus/plexus/util/\
4124cli/shell/BourneShell.java"
4125 (("/bin/sh") (which "sh"))
4126 (("/usr/") (getcwd)))
4127 #t))
4128 (add-after 'unpack 'fix-or-disable-broken-tests
4129 (lambda _
4130 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
4131 (substitute* '("cli/CommandlineTest.java"
4132 "cli/shell/BourneShellTest.java")
4133 (("/bin/sh") (which "sh"))
4134 (("/bin/echo") (which "echo")))
4135
4136 ;; This test depends on MavenProjectStub, but we don't have
4137 ;; a package for Maven.
4138 (delete-file "introspection/ReflectionValueExtractorTest.java")
4139
4140 ;; FIXME: The command line tests fail, maybe because they use
4141 ;; absolute paths.
4142 (delete-file "cli/CommandlineTest.java")
4143
4144 ;; These tests require openjdk jmh, which is not packaged yet
4145 (for-each delete-file (find-files "." "PerfTest.java$")))
4146 #t))
4147 (add-before 'build 'copy-resources
4148 (lambda _
4149 (copy-recursively "src/main/resources" "build/classes")
4150 #t))
4151 (replace 'install (install-from-pom "pom.xml")))))
4152 (native-inputs
4153 (list java-hamcrest-core java-junit))
4154 (propagated-inputs
4155 (list plexus-parent-pom-5.1))
4156 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
4157 (synopsis "Common utilities for the Plexus framework")
4158 (description "This package provides various Java utility classes for the
4159Plexus framework to ease working with strings, files, command lines, XML and
4160more.")
4161 (license license:asl2.0)))
4162
4163(define-public java-plexus-utils-3.2.1
4164 (package
4165 (inherit java-plexus-utils)
4166 ;; plexus-build-api needs this version, later versions don't work
4167 (version "3.2.1")
4168 (source (origin
4169 (method git-fetch)
4170 (uri (git-reference
4171 (url "https://github.com/codehaus-plexus/plexus-utils")
4172 (commit (string-append "plexus-utils-" version))))
4173 (file-name (git-file-name "java-plexus-utils" version))
4174 (sha256
4175 (base32
4176 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
4177
4178(define-public java-plexus-interpolation
4179 (package
4180 (name "java-plexus-interpolation")
4181 (version "1.26")
4182 (source (origin
4183 (method git-fetch)
4184 (uri (git-reference
4185 (url "https://github.com/codehaus-plexus/plexus-interpolation")
4186 (commit (string-append "plexus-interpolation-" version))))
4187 (file-name (git-file-name name version))
4188 (sha256
4189 (base32
4190 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
4191 (build-system ant-build-system)
4192 (arguments
4193 `(#:jar-name "plexus-interpolation.jar"
4194 #:source-dir "src/main"
4195 #:phases
4196 (modify-phases %standard-phases
4197 (replace 'install (install-from-pom "pom.xml")))))
4198 (propagated-inputs
4199 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4200 (native-inputs
4201 (list java-junit java-hamcrest-core))
4202 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
4203 (synopsis "Java components for interpolating ${} strings and the like")
4204 (description "Plexus interpolator is a modular, flexible interpolation
4205framework for the expression language style commonly seen in Maven, Plexus,
4206and other related projects.
4207
4208It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
4209package within @code{plexus-utils}, but has been separated in order to allow
4210these two libraries to vary independently of one another.")
4211 (license license:asl2.0)))
4212
4213(define-public java-plexus-classworlds
4214 (package
4215 (name "java-plexus-classworlds")
4216 (version "2.6.0")
4217 (source (origin
4218 (method git-fetch)
4219 (uri (git-reference
4220 (url "https://github.com/codehaus-plexus/plexus-classworlds")
4221 (commit (string-append "plexus-classworlds-" version))))
4222 (file-name (git-file-name name version))
4223 (sha256
4224 (base32
4225 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
4226 (build-system ant-build-system)
4227 (arguments
4228 `(#:jar-name "plexus-classworlds.jar"
4229 #:source-dir "src/main"
4230 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
4231 #:phases
4232 (modify-phases %standard-phases
4233 (replace 'install (install-from-pom "pom.xml")))))
4234 (propagated-inputs
4235 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
4236 (native-inputs
4237 (list java-junit))
4238 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
4239 (synopsis "Java class loader framework")
4240 (description "Plexus classworlds replaces the native @code{ClassLoader}
4241mechanism of Java. It is especially useful for dynamic loading of application
4242components.")
4243 (license license:asl2.0)))
4244
4245(define-public java-plexus-container-default-bootstrap
4246 (package
4247 (name "java-plexus-container-default-bootstrap")
4248 (version "2.1.0")
4249 (source (origin
4250 (method git-fetch)
4251 (uri (git-reference
4252 (url "https://github.com/codehaus-plexus/plexus-containers")
4253 (commit (string-append "plexus-containers-" version))))
4254 (file-name (git-file-name name version))
4255 (sha256
4256 (base32
4257 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
4258 (build-system ant-build-system)
4259 (arguments
4260 `(#:jar-name "container-default.jar"
4261 #:source-dir "plexus-container-default/src/main/java"
4262 #:test-dir "plexus-container-default/src/test"
4263 #:tests? #f; requires plexus-archiver, which depends on this package
4264 #:phases
4265 (modify-phases %standard-phases
4266 (add-before 'build 'fix-google-collections
4267 (lambda _
4268 ;; Google collections are now replaced with guava
4269 (substitute* "plexus-container-default/pom.xml"
4270 (("google-collections") "guava")
4271 (("com.google.collections") "com.google.guava"))
4272 #t))
4273 (add-before 'build 'copy-resources
4274 (lambda _
4275 (copy-recursively
4276 "plexus-container-default/src/main/resources/"
4277 "build/classes")
4278 #t))
4279 (replace 'install
4280 (install-from-pom "plexus-container-default/pom.xml")))))
4281 (propagated-inputs
4282 `(("java-plexus-worldclass" ,java-plexus-classworlds)
4283 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
4284 ("java-plexus-utils" ,java-plexus-utils)
4285 ("java-junit" ,java-junit)
4286 ("java-guava" ,java-guava)
4287 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
4288 (home-page "https://github.com/codehaus-plexus/plexus-containers")
4289 (synopsis "Inversion-of-control container")
4290 (description "Plexus-default-container is Plexus' inversion-of-control
4291(@dfn{IoC}) container. It is composed of its public API and its default
4292implementation.")
4293 (properties '((hidden? . #t))) ;for bootstrapping purposes only
4294 (license license:asl2.0)))
4295
4296(define java-plexus-containers-parent-pom
4297 (package
4298 (inherit java-plexus-container-default-bootstrap)
4299 (name "java-plexus-containers-parent-pom")
4300 (arguments
4301 `(#:tests? #f
4302 #:phases
4303 (modify-phases %standard-phases
4304 (delete 'configure)
4305 (delete 'build)
4306 (replace 'install
4307 (install-pom-file "pom.xml")))))
4308 (propagated-inputs
4309 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4310
4311(define-public java-plexus-io
4312 (package
4313 (name "java-plexus-io")
4314 (version "3.2.0")
4315 (source (origin
4316 (method git-fetch)
4317 (uri (git-reference
4318 (url "https://github.com/codehaus-plexus/plexus-io")
4319 (commit (string-append "plexus-io-" version))))
4320 (file-name (git-file-name name version))
4321 (sha256
4322 (base32
4323 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
4324 (build-system ant-build-system)
4325 (arguments
4326 `(#:jar-name "plexus-io.jar"
4327 #:source-dir "src/main/java"
4328 #:test-dir "src/test"
4329 #:phases
4330 (modify-phases %standard-phases
4331 (add-before 'build 'copy-resources
4332 (lambda _
4333 (mkdir-p "build/classes")
4334 (copy-recursively "src/main/resources" "build/classes")
4335 (mkdir-p "build/test-classes")
4336 (copy-recursively "src/test/resources" "build/test-classes")
4337 #t))
4338 (replace 'install (install-from-pom "pom.xml")))))
4339 (propagated-inputs
4340 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
4341 (inputs
4342 (list java-jsr305))
4343 (native-inputs
4344 `(("junit" ,java-junit)
4345 ("hamcrest" ,java-hamcrest-core)
4346 ("guava" ,java-guava)
4347 ("classworlds" ,java-plexus-classworlds)
4348 ("xbean" ,java-geronimo-xbean-reflect)
4349 ("container-default" ,java-plexus-container-default-bootstrap)))
4350 (home-page "https://github.com/codehaus-plexus/plexus-io")
4351 (synopsis "I/O plexus components")
4352 (description "Plexus IO is a set of plexus components, which are designed
4353for use in I/O operations. This implementation using plexus components allows
4354reusing it in maven.")
4355 (license license:asl2.0)))
4356
4357(define-public java-plexus-archiver
4358 (package
4359 (name "java-plexus-archiver")
4360 (version "4.2.2")
4361 (source (origin
4362 (method url-fetch)
4363 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4364 "/archive/plexus-archiver-" version ".tar.gz"))
4365 (sha256
4366 (base32
4367 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4368 (build-system ant-build-system)
4369 (arguments
4370 `(#:jar-name "plexus-archiver.jar"
4371 #:source-dir "src/main/java"
4372 #:test-dir "src/test"
4373 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4374 #:phases
4375 (modify-phases %standard-phases
4376 (add-before 'check 'remove-failing
4377 (lambda _
4378 ;; Requires an older version of plexus container
4379 (delete-file
4380 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4381 #t))
4382 (add-before 'check 'fix-test-building
4383 (lambda _
4384 (substitute* "build.xml"
4385 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4386 #t))
4387 (add-before 'build 'copy-resources
4388 (lambda _
4389 (mkdir-p "build/classes")
4390 (copy-recursively "src/main/resources" "build/classes")
4391 (mkdir-p "build/test-classes")
4392 (copy-recursively "src/test/resources" "build/test-classes")
4393 #t))
4394 (replace 'install (install-from-pom "pom.xml")))))
4395 (propagated-inputs
4396 (list java-plexus-utils java-plexus-io java-iq80-snappy
4397 java-commons-compress-1.21 plexus-parent-pom-6.1))
4398 (inputs
4399 `(("java-jsr305" ,java-jsr305)
4400 ("java-plexus-container-default"
4401 ,java-plexus-container-default-bootstrap)))
4402 (native-inputs
4403 `(("java-hamcrest-core" ,java-hamcrest-core)
4404 ("junit" ,java-junit)
4405 ("classworld" ,java-plexus-classworlds)
4406 ("xbean" ,java-geronimo-xbean-reflect)
4407 ("xz" ,java-xz)
4408 ("guava" ,java-guava)))
4409 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4410 (synopsis "Archiver component of the Plexus project")
4411 (description "Plexus-archiver contains a component to deal with project
4412archives (jar).")
4413 (license license:asl2.0)))
4414
4415(define-public java-plexus-container-default
4416 (package
4417 (inherit java-plexus-container-default-bootstrap)
4418 (name "java-plexus-container-default")
4419 (arguments
4420 `(#:jar-name "container-default.jar"
4421 #:source-dir "plexus-container-default/src/main/java"
4422 #:test-dir "plexus-container-default/src/test"
4423 #:test-exclude (list ;"**/*Test.java"
4424 "**/Abstract*.java"
4425 ;; Requires plexus-hierarchy
4426 "**/PlexusHierarchyTest.java"
4427 ;; Failures
4428 "**/ComponentRealmCompositionTest.java"
4429 "**/PlexusContainerTest.java")
4430 #:phases
4431 (modify-phases %standard-phases
4432 (add-before 'build 'fix-google-collections
4433 (lambda _
4434 ;; Google collections are now replaced with guava
4435 (substitute* "plexus-container-default/pom.xml"
4436 (("google-collections") "guava")
4437 (("com.google.collections") "com.google.guava"))
4438 #t))
4439 (add-before 'build 'copy-resources
4440 (lambda _
4441 (copy-recursively
4442 "plexus-container-default/src/main/resources/"
4443 "build/classes")
4444 #t))
4445 (add-before 'check 'fix-paths
4446 (lambda _
4447 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4448 (substitute*
4449 (string-append
4450 dir "/plexus/component/composition/"
4451 "ComponentRealmCompositionTest.java")
4452 (("src/test") "plexus-container-default/src/test"))
4453 #t)))
4454 (replace 'install
4455 (install-from-pom "plexus-container-default/pom.xml")))))
4456 (inputs
4457 `(("worldclass" ,java-plexus-classworlds)
4458 ("xbean" ,java-geronimo-xbean-reflect)
4459 ("utils" ,java-plexus-utils)
4460 ("junit" ,java-junit)
4461 ("guava" ,java-guava)))
4462 (native-inputs
4463 `(("archiver" ,java-plexus-archiver)
4464 ("hamcrest" ,java-hamcrest-core)))
4465 (properties
4466 (alist-delete
4467 'hidden?
4468 (package-properties java-plexus-container-default-bootstrap)))))
4469
4470(define-public java-plexus-component-annotations
4471 (package
4472 (inherit java-plexus-container-default)
4473 (name "java-plexus-component-annotations")
4474 (arguments
4475 `(#:jar-name "plexus-component-annotations.jar"
4476 #:source-dir "plexus-component-annotations/src/main/java"
4477 #:tests? #f; no tests
4478 #:phases
4479 (modify-phases %standard-phases
4480 (replace 'install
4481 (install-from-pom "plexus-component-annotations/pom.xml")))))
4482 (propagated-inputs
4483 (list java-plexus-containers-parent-pom))
4484 (inputs '())
4485 (native-inputs '())
4486 (synopsis "Plexus descriptors generator")
4487 (description "This package is a Maven plugin to generate Plexus descriptors
4488from source tags and class annotations.")))
4489
4490(define-public java-plexus-component-metadata
4491 (package
4492 (inherit java-plexus-container-default)
4493 (name "java-plexus-component-metadata")
4494 (arguments
4495 `(#:jar-name "plexus-component-metadata.jar"
4496 #:source-dir "src/main/java"
4497 #:test-dir "src/test"
4498 #:jdk ,icedtea-8
4499 #:phases
4500 (modify-phases %standard-phases
4501 (add-before 'configure 'chdir
4502 (lambda _
4503 (chdir "plexus-component-metadata")
4504 #t))
4505 (add-before 'build 'copy-resources
4506 (lambda _
4507 (copy-recursively "src/main/resources"
4508 "build/classes/")
4509 #t))
4510 (add-before 'build 'fix-jdom
4511 (lambda _
4512 ;; The newer version of jdom now sets multiple features by default
4513 ;; that are not supported.
4514 ;; Skip these features
4515 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4516 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4517 "// skip"))))
4518 (add-before 'build 'reinstate-cli
4519 ;; The CLI was removed in 2.1.0, but we still need it to build some
4520 ;; maven dependencies, and some parts of maven itself. We can't use
4521 ;; the maven plugin for that yet.
4522 (lambda _
4523 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4524 (lambda _
4525 ;; Copied from a previous version of this package.
4526 (display "package org.codehaus.plexus.metadata;
4527
4528import java.io.File;
4529import java.util.Arrays;
4530import java.util.Collections;
4531
4532import org.apache.commons.cli.CommandLine;
4533import org.apache.commons.cli.OptionBuilder;
4534import org.apache.commons.cli.Options;
4535import org.codehaus.plexus.PlexusContainer;
4536import org.codehaus.plexus.tools.cli.AbstractCli;
4537
4538public class PlexusMetadataGeneratorCli
4539 extends AbstractCli
4540{
4541 public static final char SOURCE_DIRECTORY = 's';
4542 public static final char SOURCE_ENCODING = 'e';
4543 public static final char CLASSES_DIRECTORY = 'c';
4544 public static final char OUTPUT_FILE = 'o';
4545 public static final char DESCRIPTORS_DIRECTORY = 'm';
4546
4547 public static void main( String[] args )
4548 throws Exception
4549 {
4550 new PlexusMetadataGeneratorCli().execute( args );
4551 }
4552
4553 @Override
4554 public String getPomPropertiesPath()
4555 {
4556 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4557 }
4558
4559 @Override
4560 @SuppressWarnings(\"static-access\")
4561 public Options buildCliOptions( Options options )
4562 {
4563 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4564 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4565 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4566 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4567 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4568 return options;
4569 }
4570
4571 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4572 throws Exception
4573 {
4574 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4575
4576 MetadataGenerationRequest request = new MetadataGenerationRequest();
4577 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4578 request.classpath = Collections.emptyList();
4579 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4580 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4581 request.useContextClassLoader = true;
4582 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4583 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4584
4585 metadataGenerator.generateDescriptor( request );
4586 }
4587}")))))
4588 (add-before 'check 'fix-test-location
4589 (lambda _
4590 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4591 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4592 (("target") "build")))))))
4593 (propagated-inputs
4594 `(("java-plexus-container-default" ,java-plexus-container-default)
4595 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4596 ("java-plexus-utils" ,java-plexus-utils)
4597 ("java-plexus-cli" ,java-plexus-cli)
4598 ("java-plexus-classworlds" ,java-plexus-classworlds)
4599 ("maven-plugin-api" ,maven-plugin-api)
4600 ("maven-plugin-annotations" ,maven-plugin-annotations)
4601 ("maven-core-bootstrap" ,maven-core-bootstrap)
4602 ("maven-model" ,maven-model)
4603 ("java-commons-cli" ,java-commons-cli)
4604 ("java-qdox" ,java-qdox)
4605 ("java-jdom2" ,java-jdom2)
4606 ("java-asm-8" ,java-asm-8)))
4607 (native-inputs
4608 (list java-junit java-guava java-geronimo-xbean-reflect))
4609 (synopsis "Inversion-of-control container for Maven")
4610 (description "The Plexus project provides a full software stack for creating
4611and executing software projects. Based on the Plexus container, the
4612applications can utilise component-oriented programming to build modular,
4613reusable components that can easily be assembled and reused. This package
4614provides the Maven plugin generating the component metadata.")))
4615
4616(define-public java-plexus-container-default-1.7
4617 (package
4618 (inherit java-plexus-container-default)
4619 (version "1.7.1")
4620 (source (origin
4621 (method git-fetch)
4622 (uri (git-reference
4623 (url "https://github.com/codehaus-plexus/plexus-containers")
4624 (commit (string-append "plexus-containers-" version))))
4625 (file-name (git-file-name "java-plexus-container-default" version))
4626 (sha256
4627 (base32
4628 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4629
4630(define java-plexus-containers-parent-pom-1.7
4631 (package
4632 (inherit java-plexus-container-default-1.7)
4633 (name "java-plexus-containers-parent-pom")
4634 (arguments
4635 `(#:tests? #f
4636 #:phases
4637 (modify-phases %standard-phases
4638 (delete 'configure)
4639 (delete 'build)
4640 (replace 'install
4641 (install-pom-file "pom.xml")))))
4642 (propagated-inputs
4643 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4644
4645(define-public java-plexus-component-annotations-1.7
4646 (package
4647 (inherit java-plexus-container-default-1.7)
4648 (name "java-plexus-component-annotations")
4649 (arguments
4650 `(#:jar-name "plexus-component-annotations.jar"
4651 #:source-dir "plexus-component-annotations/src/main/java"
4652 #:tests? #f; no tests
4653 #:phases
4654 (modify-phases %standard-phases
4655 (replace 'install
4656 (install-from-pom "plexus-component-annotations/pom.xml")))))
4657 (propagated-inputs
4658 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4659 (inputs '())
4660 (native-inputs '())
4661 (synopsis "Plexus descriptors generator")
4662 (description "This package is a Maven plugin to generate Plexus descriptors
4663from source tags and class annotations.")))
4664
4665(define-public java-plexus-component-metadata-1.7
4666 (package
4667 (inherit java-plexus-container-default-1.7)
4668 (name "java-plexus-component-metadata")
4669 (arguments
4670 `(#:jar-name "plexus-component-metadata.jar"
4671 #:source-dir "src/main/java"
4672 #:test-dir "src/test"
4673 #:phases
4674 (modify-phases %standard-phases
4675 (add-before 'configure 'chdir
4676 (lambda _
4677 (chdir "plexus-component-metadata")
4678 #t))
4679 (add-before 'build 'copy-resources
4680 (lambda _
4681 (copy-recursively "src/main/resources"
4682 "build/classes/")
4683 #t))
4684 (add-before 'build 'fix-jdom
4685 (lambda _
4686 ;; The newer version of jdom now sets multiple features by default
4687 ;; that are not supported.
4688 ;; Skip these features
4689 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4690 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4691 "// skip"))))
4692 (add-before 'check 'fix-test-location
4693 (lambda _
4694 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4695 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4696 (("target") "build")))))))
4697 (propagated-inputs
4698 (list java-plexus-container-default-1.7
4699 java-plexus-component-annotations-1.7
4700 java-plexus-utils
4701 java-plexus-cli
4702 java-plexus-cli
4703 java-plexus-classworlds
4704 maven-plugin-api
4705 maven-plugin-annotations
4706 maven-core-bootstrap
4707 maven-model
4708 java-commons-cli
4709 java-qdox
4710 java-jdom2
4711 java-asm-8))
4712 (native-inputs
4713 (list java-junit java-guava java-geronimo-xbean-reflect))
4714 (synopsis "Inversion-of-control container for Maven")
4715 (description "The Plexus project provides a full software stack for creating
4716and executing software projects. Based on the Plexus container, the
4717applications can utilise component-oriented programming to build modular,
4718reusable components that can easily be assembled and reused. This package
4719provides the Maven plugin generating the component metadata.")))
4720
4721(define-public java-plexus-cipher
4722 (package
4723 (name "java-plexus-cipher")
4724 (version "2.0")
4725 (source (origin
4726 (method git-fetch)
4727 (uri (git-reference
4728 (url "https://github.com/codehaus-plexus/plexus-cipher")
4729 (commit (string-append "plexus-cipher-" version))))
4730 (file-name (git-file-name name version))
4731 (sha256
4732 (base32
4733 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4734 (build-system ant-build-system)
4735 (arguments
4736 `(#:jar-name "plexus-cipher.jar"
4737 #:source-dir "src/main/java"
4738 #:phases
4739 (modify-phases %standard-phases
4740 (add-before 'build 'generate-javax.inject.Named
4741 (lambda _
4742 (mkdir-p "build/classes/META-INF/sisu")
4743 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4744 (lambda _
4745 (display
4746 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4747 #t))
4748 (replace 'install (install-from-pom "pom.xml")))))
4749 (inputs
4750 `(("java-cdi-api" ,java-cdi-api)
4751 ("java-javax-inject" ,java-javax-inject)))
4752 (propagated-inputs
4753 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4754 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4755 (native-inputs
4756 `(("java-junit" ,java-junit)))
4757 (home-page "https://github.com/sonatype/plexus-cipher")
4758 (synopsis "Encryption/decryption Component")
4759 (description "Plexus-cipher contains a component to deal with encryption
4760and decryption.")
4761 (license license:asl2.0)))
4762
4763(define-public java-plexus-cipher-1.7
4764 (package
4765 (inherit java-plexus-cipher)
4766 (version "1.7")
4767 (source (origin
4768 (method git-fetch)
4769 (uri (git-reference
4770 (url "https://github.com/codehaus-plexus/plexus-cipher")
4771 (commit (string-append "plexus-cipher-" version))))
4772 (file-name (git-file-name "java-plexus-cipher" version))
4773 (sha256
4774 (base32
4775 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4776 (arguments
4777 `(#:jar-name "plexus-cipher.jar"
4778 #:source-dir "src/main/java"
4779 #:tests? #f; FIXME: requires sisu-inject-bean
4780 #:phases
4781 (modify-phases %standard-phases
4782 (add-before 'build 'copy-resources
4783 (lambda _
4784 (copy-recursively "src/main/resources" "build/classes")
4785 (mkdir-p "build/classes/META-INF/sisu")
4786 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4787 (lambda _
4788 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4789 #t))
4790 (add-before 'install 'fix-test-dependency
4791 (lambda _
4792 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4793 (substitute* "pom.xml"
4794 (("provided") "test"))
4795 #t))
4796 (replace 'install (install-from-pom "pom.xml")))))
4797 (propagated-inputs
4798 (list java-sonatype-spice-parent-pom-15))))
4799
4800(define-public java-plexus-java
4801 (package
4802 (name "java-plexus-java")
4803 (version "0.9.10")
4804 (source (origin
4805 (method git-fetch)
4806 (uri (git-reference
4807 (url "https://github.com/codehaus-plexus/plexus-languages")
4808 (commit (string-append "plexus-languages-" version))))
4809 (file-name (git-file-name name version))
4810 (sha256
4811 (base32
4812 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4813 (modules '((guix build utils)))
4814 (snippet
4815 `(begin
4816 (for-each delete-file (find-files "." ".*.jar$"))
4817 #t))))
4818 (build-system ant-build-system)
4819 (arguments
4820 `(#:jar-name "plexus-java.java"
4821 #:source-dir "plexus-java/src/main/java"
4822 #:test-dir "plexus-java/src/test"
4823 #:tests? #f; require mockito 2
4824 #:phases
4825 (modify-phases %standard-phases
4826 (add-after 'build 'generate-metadata
4827 (lambda _
4828 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4829 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4830 "--source" "plexus-java/src/main/java"
4831 "--output" "build/classes/META-INF/plexus/components.xml"
4832 "--classes" "build/classes"
4833 "--descriptors" "build/classes/META-INF")
4834 (invoke "ant" "jar")
4835 #t))
4836 (add-before 'install 'install-parent
4837 (install-pom-file "pom.xml"))
4838 (replace 'install
4839 (install-from-pom "plexus-java/pom.xml")))))
4840 (propagated-inputs
4841 (list java-asm java-qdox-2-M9 java-javax-inject
4842 plexus-parent-pom-4.0))
4843 (inputs
4844 (list java-plexus-component-annotations-1.7))
4845 (native-inputs
4846 (list java-plexus-component-metadata-1.7 java-junit))
4847 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4848 (synopsis "Shared language features for Java")
4849 (description "This package contains shared language features of the Java
4850language, for the plexus project.")
4851 (license license:asl2.0)))
4852
4853(define-public java-plexus-compiler-api
4854 (package
4855 (name "java-plexus-compiler-api")
4856 (version "2.8.4")
4857 (source (origin
4858 (method git-fetch)
4859 (uri (git-reference
4860 (url "https://github.com/codehaus-plexus/plexus-compiler")
4861 (commit (string-append "plexus-compiler-" version))))
4862 (file-name (git-file-name name version))
4863 (sha256
4864 (base32
4865 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4866 (build-system ant-build-system)
4867 (arguments
4868 `(#:jar-name "plexus-compiler-api.jar"
4869 #:source-dir "plexus-compiler-api/src/main/java"
4870 #:test-dir "plexus-compiler-api/src/test"
4871 #:phases
4872 (modify-phases %standard-phases
4873 (replace 'install
4874 (install-from-pom "plexus-compiler-api/pom.xml")))))
4875 (propagated-inputs
4876 `(("java-plexus-container-default" ,java-plexus-container-default)
4877 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4878 ("java-plexus-util" ,java-plexus-utils)))
4879 (native-inputs
4880 (list java-junit))
4881 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4882 (synopsis "Plexus Compilers component's API to manipulate compilers")
4883 (description "This package contains the API used by components to manipulate
4884compilers.")
4885 (license (list license:asl2.0
4886 license:expat))))
4887
4888(define java-plexus-compiler-pom
4889 (package
4890 (inherit java-plexus-compiler-api)
4891 (name "java-plexus-compiler-pom")
4892 (arguments
4893 `(#:tests? #f
4894 #:phases
4895 (modify-phases %standard-phases
4896 (delete 'configure)
4897 (delete 'build)
4898 (replace 'install
4899 (install-pom-file "pom.xml"))
4900 (add-after 'install 'install-compilers
4901 (install-pom-file "plexus-compilers/pom.xml")))))
4902 (propagated-inputs
4903 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4904
4905(define plexus-components-parent-pom-4.0
4906 (package
4907 (name "plexus-components-parent-pom")
4908 (version "4.0")
4909 (source (origin
4910 (method git-fetch)
4911 (uri (git-reference
4912 (url "https://github.com/codehaus-plexus/plexus-components")
4913 (commit (string-append "plexus-components-" version))))
4914 (file-name (git-file-name name version))
4915 (sha256
4916 (base32
4917 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4918 (build-system ant-build-system)
4919 (arguments
4920 `(#:tests? #f
4921 #:phases
4922 (modify-phases %standard-phases
4923 (delete 'configure)
4924 (delete 'build)
4925 (replace 'install
4926 (install-pom-file "pom.xml")))))
4927 (propagated-inputs
4928 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4929 (home-page "https://codehaus-plexus.github.io/plexus-components")
4930 (synopsis "Plexus parent pom")
4931 (description "This package contains the Plexus components parent POM.")
4932 (license license:asl2.0)))
4933
4934(define-public java-plexus-compiler-manager
4935 (package
4936 (inherit java-plexus-compiler-api)
4937 (name "java-plexus-compiler-manager")
4938 (arguments
4939 `(#:jar-name "compiler-compiler-manager.java"
4940 #:source-dir "plexus-compiler-manager/src/main/java"
4941 #:test-dir "plexus-compiler-manager/src/test"
4942 #:tests? #f
4943 #:phases
4944 (modify-phases %standard-phases
4945 (add-after 'build 'generate-metadata
4946 (lambda _
4947 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4948 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4949 "--source" "plexus-compiler-manager/src/main/java"
4950 "--output" "build/classes/META-INF/plexus/components.xml"
4951 "--classes" "build/classes"
4952 "--descriptors" "build/classes/META-INF")
4953 (invoke "ant" "jar")
4954 #t))
4955 (add-after 'generate-metadata 'rebuild
4956 (lambda _
4957 (invoke "ant" "jar")
4958 #t))
4959 (replace 'install
4960 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4961 (propagated-inputs
4962 (list java-plexus-compiler-api java-plexus-compiler-pom
4963 java-plexus-container-default-1.7))
4964 (native-inputs
4965 (list unzip java-plexus-component-metadata-1.7))
4966 (synopsis "Compiler management for Plexus Compiler component")
4967 (description "Plexus Compiler is a Plexus component to use different
4968compilers through a uniform API. This component chooses the compiler
4969implementation to use in a project.")))
4970
4971(define-public java-plexus-compiler-javac
4972 (package
4973 (inherit java-plexus-compiler-api)
4974 (name "java-plexus-compiler-javac")
4975 (arguments
4976 `(#:jar-name "plexus-compiler-javac.jar"
4977 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4978 #:jdk ,icedtea-8
4979 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4980 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4981 #:modules ((guix build ant-build-system)
4982 (guix build utils)
4983 (guix build java-utils)
4984 (sxml simple))
4985 #:phases
4986 (modify-phases %standard-phases
4987 ;; We cannot use java-plexus-component-metadata to generate the metadata
4988 ;; because it ultimately depends on this package.
4989 ;; Create it manually instead
4990 (add-before 'build 'create-metadata
4991 (lambda _
4992 (let* ((dir "build/classes/META-INF/plexus")
4993 (file (string-append dir "/components.xml")))
4994 (mkdir-p dir)
4995 (with-output-to-file file
4996 (lambda _
4997 (sxml->xml
4998 `(component-set
4999 (components
5000 (component
5001 (role "org.codehaus.plexus.compiler.Compiler")
5002 (role-hint "javac")
5003 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
5004 (isolated-realm "false"))))))))
5005 #t))
5006 (replace 'install
5007 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
5008 (propagated-inputs
5009 (list java-plexus-compiler-api java-plexus-utils
5010 java-plexus-container-default))
5011 (synopsis "Javac Compiler support for Plexus Compiler component")
5012 (description "This package contains the Javac Compiler support for Plexus
5013Compiler component.")))
5014
5015(define plexus-components-pom-1.1.20
5016 (package
5017 (name "plexus-components-pom-1.1.20")
5018 (version "1.1.20")
5019 (source (origin
5020 (method git-fetch)
5021 (uri (git-reference
5022 (url "https://github.com/codehaus-plexus/plexus-components")
5023 (commit (string-append "plexus-components-" version))))
5024 (file-name (git-file-name name version))
5025 (sha256
5026 (base32
5027 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
5028 (build-system ant-build-system)
5029 (arguments
5030 `(#:tests? #f
5031 #:phases
5032 (modify-phases %standard-phases
5033 (delete 'configure)
5034 (delete 'build)
5035 (replace 'install
5036 (install-pom-file "pom.xml")))))
5037 (propagated-inputs
5038 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
5039 (home-page "https://github.com/codehaus-plexus/plexus-components")
5040 (synopsis "Maven parent pom for plexus packages")
5041 (description "This package contains the parent pom for plexus component
5042packages.")
5043 (license license:asl2.0)))
5044
5045(define-public java-plexus-digest
5046 (package
5047 (name "java-plexus-digest")
5048 (version "1.2")
5049 (source (origin
5050 (method git-fetch)
5051 (uri (git-reference
5052 (url "https://github.com/codehaus-plexus/plexus-digest")
5053 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
5054 (file-name (git-file-name name version))
5055 (sha256
5056 (base32
5057 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
5058 (build-system ant-build-system)
5059 (arguments
5060 `(#:jar-name "plexus-digest.jar"
5061 #:source-dir "src/main/java"
5062 #:tests? #f
5063 #:phases
5064 (modify-phases %standard-phases
5065 (replace 'install
5066 (install-from-pom "pom.xml")))))
5067 (propagated-inputs
5068 (list java-plexus-utils plexus-components-pom-1.1.20))
5069 (native-inputs
5070 (list java-junit))
5071 (home-page "https://github.com/codehaus-plexus/plexus-digest")
5072 (synopsis "Hash function utilities for Java")
5073 (description "This package is a plexus component that contains hash
5074function utilities.")
5075 (license license:asl2.0)))
5076
5077(define-public java-plexus-sec-dispatcher
5078 (package
5079 (name "java-plexus-sec-dispatcher")
5080 (version "2.0")
5081 (source (origin
5082 (method git-fetch)
5083 (uri (git-reference
5084 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
5085 (commit (string-append "plexus-sec-dispatcher-" version))))
5086 (sha256
5087 (base32
5088 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
5089 (file-name (git-file-name name version))))
5090 (arguments
5091 `(#:jar-name "plexus-sec-dispatcher.jar"
5092 #:source-dir "src/main/java"
5093 #:phases
5094 (modify-phases %standard-phases
5095 (add-before 'build 'generate-models
5096 (lambda* (#:key inputs #:allow-other-keys)
5097 (define (modello-single-mode file version mode)
5098 (invoke "java"
5099 "org.codehaus.modello.ModelloCli"
5100 file mode "src/main/java" version
5101 "false" "true"))
5102 (let ((file "src/main/mdo/settings-security.mdo"))
5103 (modello-single-mode file "1.0.0" "java")
5104 (modello-single-mode file "1.0.0" "xpp3-reader")
5105 (modello-single-mode file "1.0.0" "xpp3-writer"))
5106 #t))
5107 (add-before 'build 'generate-javax.inject.Named
5108 (lambda _
5109 (mkdir-p "build/classes/META-INF/sisu")
5110 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
5111 (lambda _
5112 (display
5113 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
5114 #t))
5115 (add-before 'check 'fix-paths
5116 (lambda _
5117 (copy-recursively "src/test/resources" "target")
5118 #t))
5119 (replace 'install (install-from-pom "pom.xml")))))
5120 (propagated-inputs
5121 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
5122 (native-inputs
5123 (list java-javax-inject
5124 java-modello-core
5125 ;; for modello
5126 java-plexus-container-default
5127 java-plexus-classworlds
5128 java-plexus-utils
5129 java-guava
5130 java-geronimo-xbean-reflect
5131 ;; modello plugins
5132 java-modello-plugins-java
5133 java-modello-plugins-xml
5134 java-modello-plugins-xpp3
5135 ;; for tests
5136 java-junit))
5137 (build-system ant-build-system)
5138 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
5139 (synopsis "Plexus Security Dispatcher Component")
5140 (description "This package is the Plexus Security Dispatcher Component.
5141This component decrypts a string passed to it.")
5142 (license license:asl2.0)))
5143
5144(define-public java-plexus-sec-dispatcher-1.4
5145 (package
5146 (inherit java-plexus-sec-dispatcher)
5147 (version "1.4")
5148 (source (origin
5149 (method git-fetch)
5150 (uri (git-reference
5151 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
5152 (commit (string-append "sec-dispatcher-" version))))
5153 (sha256
5154 (base32
5155 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
5156 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
5157 (arguments
5158 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
5159 ((#:phases phases)
5160 `(modify-phases ,phases
5161 (delete 'generate-javax.inject.Named)
5162 (add-before 'build 'generate-components.xml
5163 (lambda _
5164 (mkdir-p "build/classes/META-INF/plexus")
5165 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5166 (lambda _
5167 (display
5168 "<component-set>\n
5169 <components>\n
5170 <component>\n
5171 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
5172 <role-hint>default</role-hint>\n
5173 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
5174 <description></description>\n
5175 <requirements>\n
5176 <requirement>\n
5177 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
5178 <field-name>_cipher</field-name>\n
5179 </requirement>\n
5180 <requirement>\n
5181 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
5182 <field-name>_decryptors</field-name>\n
5183 </requirement>\n
5184 </requirements>\n
5185 <configuration>\n
5186 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
5187 </configuration>\n
5188 </component>\n
5189 </components>\n
5190</component-set>\n")))))))))
5191 (propagated-inputs
5192 (list java-plexus-utils java-plexus-cipher-1.7
5193 java-sonatype-spice-parent-pom-12))))
5194
5195(define-public java-plexus-cli
5196 (package
5197 (name "java-plexus-cli")
5198 (version "1.7")
5199 (source (origin
5200 (method git-fetch)
5201 (uri (git-reference
5202 (url "https://github.com/sonatype/plexus-cli")
5203 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
5204 (file-name (string-append name "-" version))
5205 (sha256
5206 (base32
5207 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
5208 (build-system ant-build-system)
5209 (arguments
5210 `(#:jar-name "plexus-cli.jar"
5211 #:source-dir "src/main/java"
5212 #:jdk ,icedtea-8
5213 #:test-dir "src/test"))
5214 (inputs
5215 (list java-commons-cli java-plexus-container-default
5216 java-plexus-classworlds))
5217 (native-inputs
5218 (list java-plexus-utils java-junit java-guava))
5219 (home-page "https://codehaus-plexus.github.io/plexus-cli")
5220 (synopsis "CLI building library for plexus")
5221 (description "This package is a library to help creating CLI around
5222Plexus components.")
5223 (license license:asl2.0)))
5224
5225(define-public java-plexus-build-api
5226 (package
5227 (name "java-plexus-build-api")
5228 (version "0.0.7")
5229 (source (origin
5230 (method git-fetch)
5231 (uri (git-reference
5232 (url "https://github.com/codehaus-plexus/plexus-build-api")
5233 (commit (string-append "plexus-build-api-" version))))
5234 (file-name (git-file-name name version))
5235 (sha256
5236 (base32
5237 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
5238 (build-system ant-build-system)
5239 (arguments
5240 `(#:jar-name "plexus-build-api.jar"
5241 #:source-dir "src/main/java"
5242 #:jdk ,icedtea-8
5243 #:tests? #f; FIXME: how to run the tests?
5244 #:phases
5245 (modify-phases %standard-phases
5246 (add-before 'build 'copy-resources
5247 (lambda _
5248 (copy-recursively "src/main/resources" "build/classes")
5249 (substitute* (find-files "build/classes")
5250 (("\\$\\{project.version\\}") ,version))
5251 #t))
5252 (add-before 'build 'generate-plexus-compontent
5253 (lambda _
5254 (mkdir-p "build/classes/META-INF/plexus")
5255 ;; This file is required for plexus to inject this package.
5256 ;; FIXME: how is it generated?
5257 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
5258 (lambda _
5259 (display
5260 "<component-set>\n
5261 <components>\n
5262 <component>\n
5263 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
5264 <role-hint>default</role-hint>\n
5265 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
5266 <description>Filesystem based non-incremental build context implementation\n
5267which behaves as if all files were just created.</description>\n
5268 </component>\n
5269 </components>\n
5270</component-set>\n")))
5271 #t))
5272 (replace 'install
5273 (install-from-pom "pom.xml")))))
5274 (inputs
5275 (list java-plexus-utils-3.2.1 java-plexus-container-default))
5276 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
5277 (synopsis "Base build API for maven")
5278 (description "This package contains the base build API for maven and
5279a default implementation of it. This API is about scanning files in a
5280project and determining what files need to be rebuilt.")
5281 (license license:asl2.0)))
5282
5283(define-public java-modello-core
5284 (package
5285 (name "java-modello-core")
5286 (version "1.11")
5287 (source (origin
5288 (method git-fetch)
5289 (uri (git-reference
5290 (url "https://github.com/codehaus-plexus/modello")
5291 (commit (string-append "modello-" version))))
5292 (file-name (git-file-name name version))
5293 (sha256
5294 (base32
5295 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
5296 (build-system ant-build-system)
5297 (arguments
5298 `(#:jar-name "modello-core.jar"
5299 #:source-dir "modello-core/src/main/java"
5300 #:test-dir "modello-core/src/test"
5301 #:main-class "org.codehaus.modello.ModelloCli"
5302 #:jdk ,icedtea-8
5303 #:phases
5304 (modify-phases %standard-phases
5305 (add-before 'build 'copy-resources
5306 (lambda _
5307 (mkdir-p "build/classes/META-INF/plexus")
5308 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
5309 "build/classes/META-INF/plexus/components.xml")
5310 #t))
5311 (add-before 'check 'fix-tests
5312 (lambda _
5313 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
5314 (substitute* '("modello/core/DefaultModelloCoreTest.java"
5315 "modello/core/io/ModelReaderTest.java")
5316 (("src/test") "modello-core/src/test")))
5317 #t)))))
5318 (propagated-inputs
5319 (list java-plexus-utils java-plexus-container-default
5320 java-plexus-build-api))
5321 (native-inputs
5322 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
5323 java-guava))
5324 (home-page "https://codehaus-plexus.github.io/modello/")
5325 (synopsis "Framework for code generation from a simple model")
5326 (description "Modello is a framework for code generation from a simple model.
5327
5328Modello generates code from a simple model format: based on a plugin
5329architecture, various types of code and descriptors can be generated from the
5330single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
5331XSD and documentation.")
5332 (license (list
5333 license:expat
5334 ;; Although this package uses only files licensed under expat,
5335 ;; other parts of the source are licensed under different
5336 ;; licenses. We include them to be inherited by other packages.
5337 license:asl2.0
5338 ;; Some files in modello-plugin-java are licensed under a
5339 ;; 5-clause BSD license.
5340 (license:non-copyleft
5341 (string-append "file:///modello-plugins/modello-plugin-java/"
5342 "src/main/java/org/codehaus/modello/plugin/"
5343 "java/javasource/JNaming.java"))))))
5344
5345(define-public java-modello-plugins-java
5346 (package
5347 (inherit java-modello-core)
5348 (name "java-modello-plugins-java")
5349 (arguments
5350 `(#:jar-name "modello-plugins-java.jar"
5351 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
5352 #:test-dir "modello-plugins/modello-plugin-java/src/test"
5353 #:jdk ,icedtea-8
5354 #:tests? #f; requires maven-model, which depends on this package
5355 #:phases
5356 (modify-phases %standard-phases
5357 (add-before 'build 'copy-resources
5358 (lambda _
5359 (mkdir-p "build/classes")
5360 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5361 "build/classes")
5362 #t)))))
5363 (inputs
5364 (list java-modello-core))
5365 (synopsis "Modello Java Plugin")
5366 (description "Modello Java Plugin generates Java objects for the model.")))
5367
5368(define-public java-modello-plugins-xml
5369 (package
5370 (inherit java-modello-core)
5371 (name "java-modello-plugins-xml")
5372 (arguments
5373 `(#:jar-name "modello-plugins-xml.jar"
5374 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5375 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5376 #:jdk ,icedtea-8
5377 #:phases
5378 (modify-phases %standard-phases
5379 (add-before 'build 'copy-resources
5380 (lambda _
5381 (mkdir-p "build/classes")
5382 (copy-recursively
5383 "modello-plugins/modello-plugin-xml/src/main/resources"
5384 "build/classes")
5385 #t))
5386 (add-before 'check 'fix-paths
5387 (lambda _
5388 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5389 (substitute*
5390 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5391 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5392 #t)))))
5393 (propagated-inputs
5394 (list java-modello-core java-modello-plugins-java))
5395 (synopsis "Modello XML Plugin")
5396 (description "Modello XML Plugin contains shared code for every plugins
5397working on XML representation of the model.")))
5398
5399(define-public java-modello-test
5400 (package
5401 (inherit java-modello-core)
5402 (name "java-modello-test")
5403 (arguments
5404 `(#:jar-name "modello-test.jar"
5405 #:source-dir "modello-test/src/main/java"
5406 #:tests? #f; no tests
5407 #:jdk ,icedtea-8))
5408 (inputs
5409 (list java-plexus-utils java-plexus-compiler-api
5410 java-plexus-compiler-javac java-plexus-container-default))
5411 (synopsis "Modello test package")
5412 (description "The modello test package contains the basis to create
5413Modello generator unit-tests, including sample models and xml files to test
5414every feature for every plugin.")))
5415
5416(define-public java-modello-plugins-xpp3
5417 (package
5418 (inherit java-modello-core)
5419 (name "java-modello-plugins-xpp3")
5420 (arguments
5421 `(#:jar-name "modello-plugins-xpp3.jar"
5422 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5423 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5424 ;; One of the test dependencies is maven-model which depends on this package.
5425 #:tests? #f
5426 #:jdk ,icedtea-8
5427 #:phases
5428 (modify-phases %standard-phases
5429 (add-before 'build 'copy-resources
5430 (lambda _
5431 (mkdir-p "build/classes")
5432 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5433 "build/classes")
5434 #t)))))
5435 (propagated-inputs
5436 (list java-modello-core java-modello-plugins-java
5437 java-modello-plugins-xml))
5438 (native-inputs
5439 (modify-inputs native-inputs
5440 (prepend java-xmlunit java-modello-test)))
5441 (synopsis "Modello XPP3 Plugin")
5442 (description "The modello XPP3 plugin generates XML readers and writers based
5443on the XPP3 API (XML Pull Parser).")))
5444
5445(define-public java-ow-util-ant-tasks
5446 (package
5447 (name "java-ow-util-ant-tasks")
5448 (version "1.3.2")
5449 (source (origin
5450 (method url-fetch)
5451 (uri (string-append
5452 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5453 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5454 (sha256
5455 (base32
5456 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5457 (build-system ant-build-system)
5458 (arguments
5459 `(#:jar-name "ow-util-ant-tasks.jar"
5460 #:tests? #f; no tests
5461 #:phases
5462 (modify-phases %standard-phases
5463 (add-before 'build 'delete-cyclic-dependency
5464 (lambda _
5465 ;; This file depends on asm-3, which depends on this package
5466 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5467 ;; This file depends on xalan
5468 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5469 (add-before 'build 'fix-new-ant
5470 (lambda _
5471 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5472 ((", destFile.getAbsolutePath\\(\\)")
5473 ", new String[] { destFile.getAbsolutePath() }")))))))
5474 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5475 (synopsis "Replacement for base ant tasks")
5476 (description "This library is used in the legacy build process of several
5477key frameworks developed by ObjectWeb, among them legacy versions of the
5478ObjectWeb ASM bytecode manipulation framework.")
5479 (license license:lgpl2.0+)))
5480
5481(define-public java-asm
5482 (package
5483 (name "java-asm")
5484 (version "6.0")
5485 (source (origin
5486 (method url-fetch)
5487 (uri (string-append "https://download.forge.ow2.org/asm/"
5488 "asm-" version ".tar.gz"))
5489 (sha256
5490 (base32
5491 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5492 (build-system ant-build-system)
5493 (arguments
5494 `(#:build-target "compile"
5495 ;; The tests require an old version of Janino, which no longer compiles
5496 ;; with the JDK7.
5497 #:tests? #f
5498 #:make-flags
5499 (list
5500 ;; We don't need these extra ant tasks, but the build system asks us to
5501 ;; provide a path anyway.
5502 "-Dobjectweb.ant.tasks.path=dummy-path"
5503 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5504 ;; used during the build automatically by ant-build-system, but
5505 ;; java-asm's build.xml fails unless we provide something here.
5506 "-Dbiz.aQute.bnd.path=dummy-path")
5507 #:phases
5508 (modify-phases %standard-phases
5509 (add-before 'build 'remove-bnd-dependency
5510 (lambda _
5511 ;; This file is the only one to require bnd, and is not needed
5512 ;; because we don't build a bundle.
5513 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5514 #t))
5515 (add-before 'install 'build-jars
5516 (lambda* (#:key make-flags #:allow-other-keys)
5517 ;; We cannot use the "jar" target because it depends on a couple
5518 ;; of unpackaged, complicated tools.
5519 (mkdir "dist")
5520 (invoke "jar"
5521 "-cf" (string-append "dist/asm-" ,version ".jar")
5522 "-C" "output/build/tmp" ".")))
5523 (add-before 'install 'fix-pom
5524 (lambda _
5525 (substitute* (find-files "archive" "\\.pom$")
5526 (("@product.artifact@") ,version))
5527 #t))
5528 (add-before 'install 'install-parent
5529 (install-pom-file "archive/asm-parent.pom"))
5530 (replace 'install
5531 (install-from-pom "archive/asm.pom")))))
5532 (native-inputs
5533 (list java-junit))
5534 (propagated-inputs
5535 (list java-org-ow2-parent-pom-1.3))
5536 (home-page "https://asm.ow2.io/")
5537 (synopsis "Very small and fast Java bytecode manipulation framework")
5538 (description "ASM is an all purpose Java bytecode manipulation and
5539analysis framework. It can be used to modify existing classes or dynamically
5540generate classes, directly in binary form. The provided common
5541transformations and analysis algorithms allow easily assembling custom
5542complex transformations and code analysis tools.")
5543 (license license:bsd-3)))
5544
5545(define-public java-org-ow2-parent-pom-1.3
5546 (package
5547 (name "java-org-ow2-parent-pom")
5548 (version "1.3")
5549 (source (origin
5550 (method url-fetch)
5551 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5552 (sha256
5553 (base32
5554 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5555 (build-system ant-build-system)
5556 (arguments
5557 `(#:tests? #f
5558 #:phases
5559 (modify-phases %standard-phases
5560 (delete 'unpack)
5561 (delete 'build)
5562 (delete 'configure)
5563 (replace 'install
5564 ,#~(install-pom-file #$source)))))
5565 (home-page "https://ow2.org")
5566 (synopsis "Ow2.org parent pom")
5567 (description "This package contains the parent pom for projects from ow2.org,
5568including java-asm.")
5569 (properties '((hidden? . #t)))
5570 (license license:lgpl2.1+)))
5571
5572(define-public java-asm-bootstrap
5573 (package
5574 (inherit java-asm)
5575 (name "java-asm-bootstrap")
5576 (properties '((hidden? . #t)))
5577 (arguments
5578 (substitute-keyword-arguments (package-arguments java-asm)
5579 ((#:tests? _) #f)))
5580 (native-inputs `())))
5581
5582(define-public java-asm-3
5583 (package
5584 (inherit java-asm)
5585 (version "3.1")
5586 (source (origin
5587 (method git-fetch)
5588 (uri (git-reference
5589 (url "https://gitlab.ow2.org/asm/asm")
5590 (commit "ASM_3_1")))
5591 (file-name (git-file-name "java-asm" version))
5592 (sha256
5593 (base32
5594 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5595 (modules '((guix build utils)))
5596 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5597 (arguments
5598 `(#:build-target "jar"
5599 #:test-target "test"
5600 #:tests? #f; require legacy test software
5601 #:phases
5602 (modify-phases %standard-phases
5603 (replace 'install (install-jars "output/dist"))
5604 (delete 'generate-jar-indices))))
5605 (native-inputs (list java-ow-util-ant-tasks))))
5606
5607(define-public java-asm-8
5608 (package
5609 (inherit java-asm)
5610 (version "8.0.1")
5611 (source (origin
5612 (method git-fetch)
5613 (uri (git-reference
5614 (url "https://gitlab.ow2.org/asm/asm")
5615 (commit (string-append
5616 "ASM_" (string-join (string-split version #\.)
5617 "_")))))
5618 (file-name (git-file-name "java-asm" version))
5619 (sha256
5620 (base32
5621 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5622 (arguments
5623 `(#:jar-name "asm8.jar"
5624 #:source-dir "asm/src/main/java"
5625 #:test-dir "asm/src/test"
5626 ;; tests depend on junit5
5627 #:tests? #f))
5628 (propagated-inputs '())
5629 (native-inputs '())))
5630
5631(define-public java-asm-tree-8
5632 (package
5633 (inherit java-asm-8)
5634 (name "java-asm-tree")
5635 (arguments
5636 `(#:jar-name "asm-tree.jar"
5637 #:source-dir "asm-tree/src/main/java"
5638 #:test-dir "asm-tree/src/test"
5639 ;; tests depend on junit5
5640 #:tests? #f))
5641 (inputs
5642 (list java-asm-8))))
5643
5644(define-public java-asm-analysis-8
5645 (package
5646 (inherit java-asm-8)
5647 (name "java-asm-analysis")
5648 (arguments
5649 `(#:jar-name "asm-analysis.jar"
5650 #:source-dir "asm-analysis/src/main/java"
5651 #:test-dir "asm-analysis/src/test"
5652 ;; tests depend on junit5
5653 #:tests? #f))
5654 (inputs
5655 (list java-asm-8 java-asm-tree-8))))
5656
5657(define-public java-asm-util-8
5658 (package
5659 (inherit java-asm-8)
5660 (name "java-asm-util")
5661 (arguments
5662 `(#:jar-name "asm-util8.jar"
5663 #:source-dir "asm-util/src/main/java"
5664 #:test-dir "asm-util/src/test"
5665 ;; tests depend on junit5
5666 #:tests? #f))
5667 (inputs
5668 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5669
5670(define-public java-asm-commons-8
5671 (package
5672 (inherit java-asm-8)
5673 (name "java-asm-commons")
5674 (arguments
5675 (list #:jar-name "asm-commons8.jar"
5676 #:source-dir "asm-commons/src/main/java"
5677 #:test-dir "asm-commons/src/test"
5678 ;; tests depend on junit5
5679 #:tests? #f))
5680 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5681
5682(define (generate-asm-pom package)
5683 "Return a build phase generating the pom.xml of org.ow2.asm:asm at the
5684version of PACKAGE."
5685 #~(generate-pom.xml "pom.xml" "org.ow2.asm" "asm"
5686 #$(package-version package)))
5687
5688(define-public java-asm-9
5689 (package
5690 (inherit java-asm)
5691 (version "9.4")
5692 (source (origin
5693 (method git-fetch)
5694 (uri (git-reference
5695 (url "https://gitlab.ow2.org/asm/asm")
5696 (commit "ASM_9_4")))
5697 (file-name (git-file-name "java-asm" version))
5698 (sha256
5699 (base32
5700 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5701 (arguments
5702 (list #:jar-name "asm9.jar"
5703 #:source-dir "asm/src/main/java"
5704 #:test-dir "asm/src/test"
5705 ;; tests depend on junit5
5706 #:tests? #f
5707 #:phases
5708 #~(modify-phases %standard-phases
5709 (add-before 'install 'generate-pom.xml
5710 #$(generate-asm-pom this-package))
5711 (replace 'install
5712 (install-from-pom "pom.xml")))))
5713 (propagated-inputs '())
5714 (native-inputs '())))
5715
5716(define-public java-asm-tree-9
5717 (package
5718 (inherit java-asm-9)
5719 (name "java-asm-tree")
5720 (arguments
5721 `(#:jar-name "asm-tree.jar"
5722 #:source-dir "asm-tree/src/main/java"
5723 #:test-dir "asm-tree/src/test"
5724 ;; tests depend on junit5
5725 #:tests? #f))
5726 (inputs
5727 (list java-asm-9))))
5728
5729(define-public java-asm-analysis-9
5730 (package
5731 (inherit java-asm-9)
5732 (name "java-asm-analysis")
5733 (arguments
5734 `(#:jar-name "asm-analysis.jar"
5735 #:source-dir "asm-analysis/src/main/java"
5736 #:test-dir "asm-analysis/src/test"
5737 ;; tests depend on junit5
5738 #:tests? #f))
5739 (inputs
5740 (list java-asm-9 java-asm-tree-9))))
5741
5742(define-public java-asm-util-9
5743 (package
5744 (inherit java-asm-9)
5745 (name "java-asm-util")
5746 (arguments
5747 `(#:jar-name "asm-util8.jar"
5748 #:source-dir "asm-util/src/main/java"
5749 #:test-dir "asm-util/src/test"
5750 ;; tests depend on junit5
5751 #:tests? #f))
5752 (inputs
5753 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5754
5755(define-public java-asm-commons-9
5756 (package
5757 (inherit java-asm-9)
5758 (name "java-asm-commons")
5759 (arguments
5760 (list #:jar-name "asm-commons8.jar"
5761 #:source-dir "asm-commons/src/main/java"
5762 #:test-dir "asm-commons/src/test"
5763 ;; tests depend on junit5
5764 #:tests? #f))
5765 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5766
5767(define-public java-asm-9.7.1
5768 (package
5769 (inherit java-asm-9)
5770 (name "java-asm")
5771 (version "9.7.1")
5772 (source
5773 (origin
5774 (method git-fetch)
5775 (uri (git-reference
5776 (url "https://gitlab.ow2.org/asm/asm.git")
5777 (commit "ASM_9_7_1")))
5778 (file-name (git-file-name "java-asm" version))
5779 (sha256
5780 (base32 "0q1i01al9mpggf3256iwmhx9yj9pg52v4vi1gdni2x9jcikq65lf"))))))
5781
5782(define-public java-asm-tree-9.7.1
5783 (package
5784 (inherit java-asm-tree-9)
5785 (name "java-asm-tree")
5786 (version (package-version java-asm-9.7.1))
5787 (source (package-source java-asm-9.7.1))
5788 (inputs
5789 (list java-asm-9.7.1))))
5790
5791(define-public java-asm-analysis-9.7.1
5792 (package
5793 (inherit java-asm-analysis-9)
5794 (name "java-asm-analysis")
5795 (version (package-version java-asm-9.7.1))
5796 (source (package-source java-asm-9.7.1))
5797 (inputs
5798 (list java-asm-9.7.1
5799 java-asm-tree-9.7.1))))
5800
5801(define-public java-asm-commons-9.7.1
5802 (package
5803 (inherit java-asm-commons-9)
5804 (name "java-asm-commons")
5805 (version (package-version java-asm-9.7.1))
5806 (source (package-source java-asm-9.7.1))
5807 (inputs
5808 (list java-asm-9.7.1
5809 java-asm-analysis-9.7.1
5810 java-asm-tree-9.7.1))))
5811
5812(define-public java-asm-9.10
5813 (package
5814 (inherit java-asm-9)
5815 (name "java-asm")
5816 (version "9.10.1")
5817 (source
5818 (origin
5819 (method git-fetch)
5820 (uri (git-reference
5821 (url "https://gitlab.ow2.org/asm/asm.git")
5822 (commit "ASM_9_10_1")))
5823 (file-name (git-file-name "java-asm" version))
5824 (sha256
5825 (base32 "0rshbybb6piw2s9lp8qmsnz3qvd69ks83fn2ci5kams8cmyyma4a"))))
5826 (arguments
5827 (substitute-keyword-arguments (package-arguments java-asm-9)
5828 ((#:phases phases)
5829 #~(modify-phases #$phases
5830 (replace 'generate-pom.xml
5831 #$(generate-asm-pom this-package))))
5832 ((#:jdk _ #f) openjdk11)
5833 ((#:make-flags _ #f)
5834 ;; Compile with openjdk11 (for the 'Deprecated.forRemoval' API) but
5835 ;; emit Java 8 byte code so the jars stay usable by icedtea-8 builds.
5836 #~(list "-Dant.build.javac.source=8"
5837 "-Dant.build.javac.target=8"))))))
5838
5839(define-public java-asm-tree-9.10
5840 (package
5841 (inherit java-asm-tree-9)
5842 (name "java-asm-tree")
5843 (version (package-version java-asm-9.10))
5844 (source (package-source java-asm-9.10))
5845 (arguments
5846 (list #:jar-name "asm-tree.jar"
5847 #:source-dir "asm-tree/src/main/java"
5848 #:test-dir "asm-tree/src/test"
5849 #:tests? #f
5850 #:jdk openjdk11
5851 #:make-flags #~(list "-Dant.build.javac.source=8"
5852 "-Dant.build.javac.target=8")))
5853 (inputs
5854 (list java-asm-9.10))))
5855
5856(define-public java-asm-analysis-9.10
5857 (package
5858 (inherit java-asm-analysis-9)
5859 (name "java-asm-analysis")
5860 (version (package-version java-asm-9.10))
5861 (source (package-source java-asm-9.10))
5862 (arguments
5863 (list #:jar-name "asm-analysis.jar"
5864 #:source-dir "asm-analysis/src/main/java"
5865 #:test-dir "asm-analysis/src/test"
5866 #:tests? #f
5867 #:jdk openjdk11
5868 #:make-flags #~(list "-Dant.build.javac.source=8"
5869 "-Dant.build.javac.target=8")))
5870 (inputs
5871 (list java-asm-9.10
5872 java-asm-tree-9.10))))
5873
5874(define-public java-asm-commons-9.10
5875 (package
5876 (inherit java-asm-commons-9)
5877 (name "java-asm-commons")
5878 (version (package-version java-asm-9.10))
5879 (source (package-source java-asm-9.10))
5880 (arguments
5881 (substitute-keyword-arguments (package-arguments java-asm-commons-9)
5882 ((#:jdk _ #f) openjdk11)
5883 ((#:make-flags _ #f)
5884 #~(list "-Dant.build.javac.source=8"
5885 "-Dant.build.javac.target=8"))))
5886 (inputs
5887 (list java-asm-9.10
5888 java-asm-analysis-9.10
5889 java-asm-tree-9.10))))
5890
5891(define-public java-cglib
5892 (package
5893 (name "java-cglib")
5894 (version "3.3.0")
5895 (source
5896 (origin
5897 (method git-fetch)
5898 (uri (git-reference
5899 (url "https://github.com/cglib/cglib")
5900 (commit (string-append
5901 "RELEASE_"
5902 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5903 version)))))
5904 (file-name (git-file-name name version))
5905 (sha256
5906 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5907 (build-system ant-build-system)
5908 (arguments
5909 `(;; FIXME: tests fail because junit runs
5910 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5911 ;; to describe a test at all.
5912 #:tests? #f
5913 #:jar-name "cglib.jar"
5914 #:phases
5915 (modify-phases %standard-phases
5916 (add-after 'unpack 'chdir
5917 (lambda _ (chdir "cglib") #t)))))
5918 (native-inputs (list java-junit))
5919 (propagated-inputs (list java-asm-8))
5920 (home-page "https://github.com/cglib/cglib/")
5921 (synopsis "Java byte code generation library")
5922 (description "The byte code generation library CGLIB is a high level API
5923to generate and transform Java byte code.")
5924 (license license:asl2.0)))
5925
5926(define-public java-objenesis
5927 (package
5928 (name "java-objenesis")
5929 (version "3.3")
5930 (source (origin
5931 (method git-fetch)
5932 (uri (git-reference
5933 (url "https://github.com/easymock/objenesis")
5934 (commit version)))
5935 (file-name (git-file-name name version))
5936 (sha256
5937 (base32
5938 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5939 (build-system ant-build-system)
5940 (arguments
5941 `(#:tests? #f; require junit-5
5942 #:jar-name "objenesis.jar"
5943 #:source-dir "main/src/main/java"
5944 #:test-dir "main/src/test/"))
5945 (native-inputs
5946 (list java-junit java-hamcrest-core))
5947 (home-page "http://objenesis.org/")
5948 (synopsis "Bypass the constructor when creating an object")
5949 (description "Objenesis is a small Java library that serves one purpose:
5950to instantiate a new object of a particular class. It is common to see
5951restrictions in libraries stating that classes must require a default
5952constructor. Objenesis aims to overcome these restrictions by bypassing the
5953constructor on object instantiation.")
5954 (license license:asl2.0)))
5955
5956(define-public java-easymock
5957 (package
5958 (name "java-easymock")
5959 (version "3.4")
5960 (source (origin
5961 (method git-fetch)
5962 (uri (git-reference
5963 (url "https://github.com/easymock/easymock/")
5964 (commit (string-append "easymock-" version))))
5965 (file-name (git-file-name name version))
5966 (sha256
5967 (base32
5968 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5969 (build-system ant-build-system)
5970 (arguments
5971 `(#:jar-name "easymock.jar"
5972 #:source-dir "core/src/main"
5973 #:test-dir "core/src/test"
5974 #:phases
5975 (modify-phases %standard-phases
5976 ;; FIXME: Android support requires the following packages to be
5977 ;; available: com.google.dexmaker.stock.ProxyBuilder
5978 (add-after 'unpack 'delete-android-support
5979 (lambda _
5980 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5981 (substitute* "MocksControl.java"
5982 (("AndroidSupport.isAndroid\\(\\)") "false")
5983 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5984 (delete-file "AndroidClassProxyFactory.java"))
5985 #t))
5986 (add-after 'unpack 'delete-broken-tests
5987 (lambda _
5988 (with-directory-excursion "core/src/test/java/org/easymock"
5989 ;; This test depends on dexmaker.
5990 (delete-file "tests2/ClassExtensionHelperTest.java")
5991
5992 ;; This is not a test.
5993 (delete-file "tests/BaseEasyMockRunnerTest.java")
5994
5995 ;; This test should be executed with a different runner...
5996 (delete-file "tests2/EasyMockAnnotationsTest.java")
5997 ;; ...but deleting it means that we also have to delete these
5998 ;; dependent files.
5999 (delete-file "tests2/EasyMockRunnerTest.java")
6000 (delete-file "tests2/EasyMockRuleTest.java")
6001
6002 ;; This test fails because the file "easymock.properties" does
6003 ;; not exist.
6004 (delete-file "tests2/EasyMockPropertiesTest.java"))
6005 #t)))))
6006 (inputs
6007 (list java-cglib java-objenesis))
6008 (native-inputs
6009 (list java-junit java-hamcrest-core))
6010 (home-page "https://easymock.org/")
6011 (synopsis "Java library providing mock objects for unit tests")
6012 (description "EasyMock is a Java library that provides an easy way to use
6013mock objects in unit testing.")
6014 (license license:asl2.0)))
6015
6016(define-public java-easymock-3.2
6017 (package
6018 (inherit java-easymock)
6019 (name "java-easymock")
6020 (version "3.2")
6021 (source (origin
6022 (method git-fetch)
6023 (uri (git-reference
6024 (url "https://github.com/easymock/easymock/")
6025 (commit (string-append "easymock-" version))))
6026 (file-name (git-file-name name version))
6027 (sha256
6028 (base32
6029 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
6030 (arguments
6031 (list #:jar-name "easymock.jar"
6032 #:source-dir "easymock/src/main"
6033 #:test-dir "easymock/src/test"
6034 #:phases
6035 #~(modify-phases %standard-phases
6036 (add-after 'unpack 'delete-android-support
6037 (lambda _
6038 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
6039 (substitute* "MocksControl.java"
6040 (("AndroidSupport.isAndroid\\(\\)") "false")
6041 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
6042 (delete-file "AndroidClassProxyFactory.java"))))
6043 (add-after 'unpack 'delete-broken-tests
6044 (lambda _
6045 (with-directory-excursion "easymock/src/test/java/org/easymock"
6046 ;; This test depends on dexmaker.
6047 (delete-file "tests2/ClassExtensionHelperTest.java")
6048 ;; This is not a test.
6049 (delete-file "tests/BaseEasyMockRunnerTest.java")
6050 ;; ...but deleting it means that we also have to delete these
6051 ;; dependent files.
6052 (delete-file "tests2/EasyMockRunnerTest.java")
6053 ;; This test fails because the file "easymock.properties" does
6054 ;; not exist.
6055 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
6056
6057(define-public java-easymock-class-extension
6058 (package
6059 (inherit java-easymock-3.2)
6060 (name "java-easymock-class-extension")
6061 (build-system ant-build-system)
6062 (arguments
6063 (list #:jar-name "easymock-class-extensions.jar"
6064 #:source-dir "easymock-classextension/src/main/java"
6065 #:test-dir "easymock-classextension/src/test"))
6066 (inputs (list java-asm-8
6067 java-easymock-3.2
6068 java-cglib
6069 java-objenesis))
6070 (native-inputs
6071 (list java-junit java-hamcrest-core))
6072 (home-page "https://easymock.org/")
6073 (synopsis "Easymock extension to mock classes")
6074 (description "This package provides an extension to earlier versions of
6075easymock that allows mocking classes.")
6076 (license license:asl2.0)))
6077
6078(define-public java-jmock-1
6079 (package
6080 (name "java-jmock")
6081 (version "1.2.0")
6082 (source (origin
6083 (method git-fetch)
6084 (uri (git-reference
6085 (url "https://github.com/jmock-developers/jmock-library")
6086 (commit version)))
6087 (file-name (git-file-name name version))
6088 (sha256
6089 (base32
6090 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
6091 (build-system ant-build-system)
6092 (arguments
6093 `(#:build-target "jars"
6094 #:test-target "run.tests"
6095 #:phases
6096 (modify-phases %standard-phases
6097 (replace 'install (install-jars "build")))))
6098 (home-page "http://jmock.org/")
6099 (synopsis "Mock object library for test-driven development")
6100 (description "JMock is a library that supports test-driven development of
6101Java code with mock objects. Mock objects help you design and test the
6102interactions between the objects in your programs.
6103
6104The jMock library
6105
6106@itemize
6107@item makes it quick and easy to define mock objects
6108@item lets you precisely specify the interactions between
6109 your objects, reducing the brittleness of your tests
6110@item plugs into your favourite test framework
6111@item is easy to extend.
6112@end itemize\n")
6113 (license license:bsd-3)))
6114
6115(define-public java-jmock
6116 (package
6117 (inherit java-jmock-1)
6118 (name "java-jmock")
6119 (version "2.8.2")
6120 (source (origin
6121 (method git-fetch)
6122 (uri (git-reference
6123 (url "https://github.com/jmock-developers/jmock-library")
6124 (commit version)))
6125 (file-name (git-file-name name version))
6126 (sha256
6127 (base32
6128 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
6129 (inputs
6130 (list java-hamcrest-all java-bsh java-junit))
6131 (native-inputs
6132 `(("cglib" ,java-cglib)))
6133 (arguments
6134 `(#:jar-name "java-jmock.jar"
6135 #:source-dir "jmock/src/main/java"
6136 #:test-dir "jmock/src/test"))))
6137
6138(define-public java-jmock-junit4
6139 (package
6140 (inherit java-jmock)
6141 (name "java-jmock-junit4")
6142 (arguments
6143 `(#:jar-name "java-jmock-junit4.jar"
6144 #:source-dir "jmock-junit4/src/main/java"
6145 #:test-dir "jmock-junit4/src/test"))
6146 (inputs
6147 `(("java-hamcrest-all" ,java-hamcrest-all)
6148 ("java-bsh" ,java-bsh)
6149 ("java-jmock" ,java-jmock)
6150 ("java-jumit" ,java-junit)))))
6151
6152(define-public java-jmock-legacy
6153 (package
6154 (inherit java-jmock)
6155 (name "java-jmock-legacy")
6156 (arguments
6157 `(#:jar-name "java-jmock-legacy.jar"
6158 #:source-dir "jmock-legacy/src/main/java"
6159 #:test-dir "jmock-legacy/src/test"
6160 #:phases
6161 (modify-phases %standard-phases
6162 (add-before 'check 'copy-tests
6163 (lambda _
6164 ;; This file is a dependancy of some tests
6165 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
6166 (copy-file (string-append "jmock/src/test/java/" file)
6167 (string-append "jmock-legacy/src/test/java/" file))
6168 #t))))))
6169 (inputs
6170 (list java-hamcrest-all
6171 java-objenesis
6172 java-cglib
6173 java-jmock
6174 java-bsh
6175 java-junit))
6176 (native-inputs
6177 (list java-jmock-junit4))))
6178
6179(define-public java-hamcrest-all
6180 (package (inherit java-hamcrest-core)
6181 (name "java-hamcrest-all")
6182 (properties `((superseded . ,java-hamcrest)))
6183 (arguments
6184 `(#:jdk ,icedtea-8
6185 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
6186 ((#:build-target _) "bigjar")
6187 ((#:phases phases)
6188 `(modify-phases ,phases
6189 ;; Some build targets override the classpath, so we need to patch
6190 ;; the build.xml to ensure that required dependencies are on the
6191 ;; classpath.
6192 (add-after 'unpack 'patch-classpath-for-integration
6193 (lambda* (#:key inputs #:allow-other-keys)
6194 (substitute* "build.xml"
6195 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
6196 (string-join
6197 (cons line
6198 (append
6199 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
6200 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
6201 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
6202 ";"))
6203 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
6204 (car (find-files (assoc-ref inputs "java-hamcrest-core")
6205 "jar$"))))
6206 #t))
6207 (replace 'install
6208 (lambda* (#:key outputs #:allow-other-keys)
6209 (let* ((target (string-append (assoc-ref outputs "out")
6210 "/share/java/"))
6211 (version-suffix
6212 ,(string-append
6213 "-" (package-version java-hamcrest-core) ".jar"))
6214 (install-without-version-suffix
6215 (lambda (jar)
6216 (copy-file jar
6217 (string-append target
6218 (basename jar version-suffix)
6219 ".jar")))))
6220 (mkdir-p target)
6221 (for-each
6222 install-without-version-suffix
6223 (find-files "build"
6224 (lambda (name _)
6225 (and (string-suffix? ".jar" name)
6226 (not (string-suffix? "-sources.jar" name)))))))
6227 #t)))))))
6228 (inputs
6229 (modify-inputs inputs
6230 (prepend java-junit
6231 java-jmock-1
6232 ;; This is necessary because of what seems to be a race condition.
6233 ;; This package would sometimes fail to build because hamcrest-core.jar
6234 ;; could not be found, even though it is built as part of this package.
6235 ;; Adding java-hamcrest-core appears to fix this problem. See
6236 ;; https://debbugs.gnu.org/31390 for more information.
6237 java-hamcrest-core
6238 java-easymock)))))
6239
6240(define-public java-jopt-simple
6241 (package
6242 (name "java-jopt-simple")
6243 (version "5.0.3")
6244 (source (origin
6245 (method url-fetch)
6246 (uri (string-append "https://repo1.maven.org/maven2/"
6247 "net/sf/jopt-simple/jopt-simple/"
6248 version "/jopt-simple-"
6249 version "-sources.jar"))
6250 (sha256
6251 (base32
6252 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
6253 (build-system ant-build-system)
6254 (arguments
6255 `(#:tests? #f ; there are no tests
6256 #:jar-name "jopt-simple.jar"
6257 #:phases
6258 (modify-phases %standard-phases
6259 (add-before 'build 'copy-resources
6260 ;; The message bundles (ExceptionMessages.properties,
6261 ;; HelpFormatterMessages.properties) live next to the sources and
6262 ;; are loaded at run time.
6263 (lambda _
6264 (let ((classes-dir (string-append (getcwd) "/build/classes")))
6265 (with-directory-excursion "src"
6266 (for-each
6267 (lambda (resource)
6268 (install-file resource
6269 (string-append classes-dir "/"
6270 (dirname resource))))
6271 (find-files "." "\\.properties$"))))))
6272 (add-before 'install 'create-pom
6273 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
6274 (replace 'install
6275 (install-from-pom "pom.xml")))))
6276 (home-page "https://jopt-simple.github.io/jopt-simple/")
6277 (synopsis "Java library for parsing command line options")
6278 (description "JOpt Simple is a Java library for parsing command line
6279options, such as those you might pass to an invocation of @code{javac}. In
6280the interest of striving for simplicity, as closely as possible JOpt Simple
6281attempts to honor the command line option syntaxes of POSIX @code{getopt} and
6282GNU @code{getopt_long}. It also aims to make option parser configuration and
6283retrieval of options and their arguments simple and expressive, without being
6284overly clever.")
6285 (license license:expat)))
6286
6287;; Required by jmh
6288(define-public java-jopt-simple-4
6289 (package
6290 (inherit java-jopt-simple)
6291 (version "4.6")
6292 (source (origin
6293 (method url-fetch)
6294 (uri (string-append "https://repo1.maven.org/maven2/"
6295 "net/sf/jopt-simple/jopt-simple/"
6296 version "/jopt-simple-"
6297 version "-sources.jar"))
6298 (sha256
6299 (base32
6300 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
6301 (arguments
6302 (substitute-keyword-arguments (package-arguments java-jopt-simple)
6303 ((#:phases phases)
6304 `(modify-phases ,phases
6305 (replace 'create-pom
6306 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
6307 ,version))))))))
6308
6309(define-public java-commons-math3
6310 (package
6311 (name "java-commons-math3")
6312 (version "3.6.1")
6313 (source (origin
6314 (method url-fetch)
6315 (uri (string-append "mirror://apache/commons/math/source/"
6316 "commons-math3-" version "-src.tar.gz"))
6317 (sha256
6318 (base32
6319 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
6320 (build-system ant-build-system)
6321 (arguments
6322 `(#:build-target "jar"
6323 #:test-target "test"
6324 #:make-flags
6325 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
6326 (junit #$(this-package-native-input "java-junit")))
6327 (list (string-append "-Djunit.jar="
6328 (car (find-files junit "jar$")))
6329 (string-append "-Dhamcrest.jar="
6330 (car (find-files hamcrest ".*.jar$")))))
6331 #:phases
6332 (modify-phases %standard-phases
6333 ;; We want to build the jar in the build phase and run the tests
6334 ;; later in a separate phase.
6335 (add-after 'unpack 'untangle-targets
6336 (lambda _
6337 (substitute* "build.xml"
6338 (("name=\"jar\" depends=\"test\"")
6339 "name=\"jar\" depends=\"compile\""))))
6340 ;; There is no install target.
6341 (replace 'install
6342 (install-from-pom "pom.xml")))))
6343 (native-inputs
6344 (list java-junit java-hamcrest-core))
6345 (home-page "https://commons.apache.org/math/")
6346 (synopsis "Apache Commons mathematics library")
6347 (description "Commons Math is a library of lightweight, self-contained
6348mathematics and statistics components addressing the most common problems not
6349available in the Java programming language or Commons Lang.")
6350 (license license:asl2.0)))
6351
6352(define-public java-jmh
6353 (package
6354 (name "java-jmh")
6355 (version "1.37")
6356 (source (origin
6357 (method git-fetch)
6358 (uri (git-reference
6359 (url "https://github.com/openjdk/jmh")
6360 (commit version)))
6361 (file-name (git-file-name name version))
6362 (sha256
6363 (base32
6364 "06hfgnzqh1qg736s8ibznn6wljyjqg6yw1y14g8b0vrr5ivdm0ws"))))
6365 (build-system maven-build-system)
6366 (arguments
6367 `(#:exclude
6368 (("org.apache.maven.plugins" .
6369 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
6370 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"
6371 ;; Only checks the Maven version, which is fixed by the build
6372 ;; system.
6373 "maven-enforcer-plugin"))
6374 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
6375 ("org.apache.maven.wagon" . ("wagon-ssh")))
6376 #:phases
6377 (modify-phases %standard-phases
6378 (add-after 'unpack 'remove-unnecessary
6379 (lambda _
6380 ;; requires org.apache.maven.archetype:archetype-packaging.
6381 ;; Its subprojects also require groovy, kotlin and scala,
6382 ;; respectively.
6383 (delete-file-recursively "jmh-archetypes")
6384 ;; jmh-core-benchmarks depends on net.java.dev.jna:jna, whereas
6385 ;; java-native-access is installed as net.java.dev.jna:jna-jpms.
6386 ;; It is only JMH's own self-benchmark module and is not needed
6387 ;; to build or use the library.
6388 (delete-file-recursively "jmh-core-benchmarks"))))))
6389 (propagated-inputs
6390 (list java-jopt-simple
6391 java-commons-math3))
6392 (native-inputs
6393 (list java-junit
6394 java-hamcrest-core))
6395 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
6396 (synopsis "Benchmark harness for the JVM")
6397 (description "JMH is a Java harness for building, running, and analysing
6398nano/micro/milli/macro benchmarks written in Java and other languages
6399targeting the JVM.")
6400 ;; GPLv2 only
6401 (license license:gpl2)))
6402
6403(define-public java-commons-collections4
6404 (package
6405 (name "java-commons-collections4")
6406 (version "4.1")
6407 (source (origin
6408 (method url-fetch)
6409 (uri (string-append "mirror://apache/commons/collections/source/"
6410 "commons-collections4-" version "-src.tar.gz"))
6411 (sha256
6412 (base32
6413 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
6414 (build-system ant-build-system)
6415 (arguments
6416 `(#:test-target "test"
6417 #:make-flags
6418 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
6419 (junit #$(this-package-native-input "java-junit"))
6420 (easymock #$(this-package-native-input "java-easymock")))
6421 (list (string-append "-Djunit.jar="
6422 (car (find-files junit "jar$")))
6423 (string-append "-Dhamcrest.jar="
6424 (car (find-files hamcrest "jar$")))
6425 (string-append "-Deasymock.jar=" easymock
6426 "/share/java/easymock.jar")))
6427 #:phases
6428 (modify-phases %standard-phases
6429 (replace 'install
6430 (install-jars "target")))))
6431 (native-inputs
6432 (list java-junit java-hamcrest-core java-easymock))
6433 (home-page "https://commons.apache.org/collections/")
6434 (synopsis "Collections framework")
6435 (description "The Java Collections Framework is the recognised standard
6436for collection handling in Java. Commons-Collections seek to build upon the
6437JDK classes by providing new interfaces, implementations and utilities. There
6438are many features, including:
6439
6440@itemize
6441@item @code{Bag} interface for collections that have a number of copies of
6442 each object
6443@item @code{BidiMap} interface for maps that can be looked up from value to
6444 key as well and key to value
6445@item @code{MapIterator} interface to provide simple and quick iteration over
6446 maps
6447@item Transforming decorators that alter each object as it is added to the
6448 collection
6449@item Composite collections that make multiple collections look like one
6450@item Ordered maps and sets that retain the order elements are added in,
6451 including an LRU based map
6452@item Reference map that allows keys and/or values to be garbage collected
6453 under close control
6454@item Many comparator implementations
6455@item Many iterator implementations
6456@item Adapter classes from array and enumerations to collections
6457@item Utilities to test or create typical set-theory properties of collections
6458 such as union, intersection, and closure.
6459@end itemize\n")
6460 (license license:asl2.0)))
6461
6462(define-public java-commons-collections
6463 (package
6464 (inherit java-commons-collections4)
6465 (name "java-commons-collections")
6466 (version "3.2.2")
6467 (source (origin
6468 (method url-fetch)
6469 (uri (string-append "mirror://apache/commons/collections/source/"
6470 "commons-collections-" version "-src.tar.gz"))
6471 (sha256
6472 (base32
6473 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
6474 (patches
6475 (search-patches "java-commons-collections-fix-java8.patch"))))
6476 (arguments
6477 (substitute-keyword-arguments (package-arguments java-commons-collections4)
6478 ((#:phases phases)
6479 `(modify-phases ,phases
6480 ;; The manifest is required by the build procedure
6481 (add-before 'build 'add-manifest
6482 (lambda _
6483 (mkdir-p "build/conf")
6484 (call-with-output-file "build/conf/MANIFEST.MF"
6485 (lambda (file)
6486 (format file "Manifest-Version: 1.0\n")))
6487 #t))
6488 (replace 'install
6489 (install-jars "build"))))))))
6490
6491(define java-commons-collections-test-classes
6492 (package
6493 (inherit java-commons-collections)
6494 (arguments
6495 `(#:jar-name "commons-collections-test-classes.jar"
6496 #:source-dir "src/test"
6497 #:tests? #f))
6498 (inputs
6499 `(("collection" ,java-commons-collections)))))
6500
6501(define-public java-commons-beanutils
6502 (package
6503 (name "java-commons-beanutils")
6504 (version "1.9.3")
6505 (source (origin
6506 (method url-fetch)
6507 (uri (string-append "mirror://apache/commons/beanutils/source/"
6508 "commons-beanutils-" version "-src.tar.gz"))
6509 (sha256
6510 (base32
6511 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
6512 (build-system ant-build-system)
6513 (arguments
6514 `(#:test-target "test"
6515 #:tests? #f
6516 #:phases
6517 (modify-phases %standard-phases
6518 (replace 'install
6519 (lambda* (#:key outputs #:allow-other-keys)
6520 (rename-file (string-append "dist/commons-beanutils-" ,version
6521 "-SNAPSHOT.jar")
6522 "commons-beanutils.jar")
6523 (install-file "commons-beanutils.jar"
6524 (string-append (assoc-ref outputs "out") "/share/java/"))
6525 #t)))))
6526 (inputs
6527 `(("logging" ,java-commons-logging-minimal)
6528 ("collections" ,java-commons-collections)))
6529 (native-inputs
6530 `(("junit" ,java-junit)
6531 ("collections-test" ,java-commons-collections-test-classes)))
6532 (home-page "https://commons.apache.org/beanutils/")
6533 (synopsis "Dynamically set or get properties in Java")
6534 (description "BeanUtils provides a simplified interface to reflection and
6535introspection to set or get dynamically determined properties through their
6536setter and getter method.")
6537 (license license:asl2.0)))
6538
6539(define-public java-commons-io
6540 (package
6541 (name "java-commons-io")
6542 (version "2.5")
6543 (source
6544 (origin
6545 (method url-fetch)
6546 (uri (string-append "mirror://apache/commons/io/source/"
6547 "commons-io-" version "-src.tar.gz"))
6548 (sha256
6549 (base32
6550 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6551 (build-system ant-build-system)
6552 (outputs '("out" "doc"))
6553 (arguments
6554 `(#:test-target "test"
6555 #:make-flags
6556 ,#~(list (string-append "-Djunit.jar="
6557 (car (find-files #$(this-package-native-input "java-junit")
6558 "jar$"))))
6559 #:phases
6560 (modify-phases %standard-phases
6561 (add-after 'build 'build-javadoc ant-build-javadoc)
6562 (replace 'install (install-from-pom "pom.xml"))
6563 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6564 (native-inputs
6565 (list java-junit java-hamcrest-core))
6566 (propagated-inputs
6567 (list apache-commons-parent-pom-39))
6568 (home-page "https://commons.apache.org/io/")
6569 (synopsis "Common useful IO related classes")
6570 (description "Commons-IO contains utility classes, stream implementations,
6571file filters and endian classes.")
6572 (license license:asl2.0)))
6573
6574(define-public java-commons-io-latest
6575 (package
6576 (inherit java-commons-io)
6577 (version "2.21.0")
6578 (source
6579 (origin
6580 (method url-fetch)
6581 (uri (string-append "mirror://apache/commons/io/source/"
6582 "commons-io-" version "-src.tar.gz"))
6583 (sha256
6584 (base32
6585 "0rr6hb8mm7fd6nrr8f81mvdpfalq01k03l3mzrlxx7g7lda40mb3"))))
6586 (outputs '("out"))
6587 (arguments
6588 `(#:tests? #f ;; tests require too many not yet packaged packages
6589 #:source-dir "src/main/java"
6590 #:jar-name "commons-io.jar"
6591 #:phases
6592 (modify-phases %standard-phases
6593 (replace 'install (install-from-pom "pom.xml")))))
6594 (native-inputs
6595 (list))
6596 (propagated-inputs
6597 (list apache-commons-parent-pom-78))))
6598
6599(define-public java-commons-exec-1.1
6600 (package
6601 (name "java-commons-exec")
6602 (version "1.1")
6603 (source
6604 (origin
6605 (method url-fetch)
6606 (uri (string-append "mirror://apache/commons/exec/source/"
6607 "commons-exec-" version "-src.tar.gz"))
6608 (sha256
6609 (base32
6610 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6611 (build-system ant-build-system)
6612 (arguments
6613 `(#:test-target "test"
6614 #:make-flags
6615 ,#~(list (string-append "-Dmaven.junit.jar="
6616 (car (find-files #$(this-package-native-input "java-junit")
6617 "jar$"))))
6618 #:phases
6619 (modify-phases %standard-phases
6620 (add-before 'build 'delete-network-tests
6621 (lambda _
6622 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6623 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6624 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6625 #t))
6626 ;; The "build" phase automatically tests.
6627 (delete 'check)
6628 (replace 'install (install-jars "target")))))
6629 (native-inputs
6630 (list java-junit))
6631 (home-page "https://commons.apache.org/proper/commons-exec/")
6632 (synopsis "Common program execution related classes")
6633 (description "Commons-Exec simplifies executing external processes.")
6634 (license license:asl2.0)))
6635
6636(define-public java-commons-exec
6637 (package
6638 (inherit java-commons-exec-1.1)
6639 (version "1.3")
6640 (source
6641 (origin
6642 (method url-fetch)
6643 (uri (string-append "mirror://apache/commons/exec/source/"
6644 "commons-exec-" version "-src.tar.gz"))
6645 (sha256
6646 (base32
6647 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6648 (arguments
6649 `(#:test-target "test"
6650 #:make-flags
6651 ,#~(list (string-append "-Dmaven.junit.jar="
6652 (car (find-files #$(this-package-native-input "java-junit")
6653 "jar$")))
6654 "-Dmaven.compiler.source=1.7"
6655 "-Dmaven.compiler.target=1.7")
6656 #:phases
6657 (modify-phases %standard-phases
6658 (add-before 'build 'delete-network-tests
6659 (lambda* (#:key inputs #:allow-other-keys)
6660 ;; This test hangs indefinitely.
6661 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6662 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6663 (("ping -c 10 127.0.0.1") "sleep 10"))
6664 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6665 (("/bin/ls") "ls"))
6666 (call-with-output-file "src/test/scripts/ping.sh"
6667 (lambda (port)
6668 (format port "#!~a/bin/sh\nsleep $1\n"
6669 (assoc-ref inputs "bash"))))
6670 #t))
6671 ;; The "build" phase automatically tests.
6672 (delete 'check)
6673 (replace 'install (install-jars "target")))))
6674 (native-inputs
6675 (list java-junit java-hamcrest-core))))
6676
6677(define-public java-commons-lang
6678 (package
6679 (name "java-commons-lang")
6680 (version "2.6")
6681 (source
6682 (origin
6683 (method url-fetch)
6684 (uri (string-append "mirror://apache/commons/lang/source/"
6685 "commons-lang-" version "-src.tar.gz"))
6686 (sha256
6687 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6688 (build-system ant-build-system)
6689 (outputs '("out" "doc"))
6690 (arguments
6691 `(#:test-target "test"
6692 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6693 #:phases
6694 (modify-phases %standard-phases
6695 (add-after 'build 'build-javadoc ant-build-javadoc)
6696 (add-before 'check 'disable-failing-test
6697 (lambda _
6698 ;; Disable a failing test
6699 (substitute* "src/test/java/org/apache/commons/lang/\
6700time/FastDateFormatTest.java"
6701 (("public void testFormat\\(\\)")
6702 "public void disabled_testFormat()"))
6703 #t))
6704 (replace 'install (install-jars "target"))
6705 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6706 (native-inputs
6707 (list java-junit))
6708 (home-page "https://commons.apache.org/lang/")
6709 (synopsis "Extension of the java.lang package")
6710 (description "The Commons Lang components contains a set of Java classes
6711that provide helper methods for standard Java classes, especially those found
6712in the @code{java.lang} package in the Sun JDK. The following classes are
6713included:
6714
6715@itemize
6716@item StringUtils - Helper for @code{java.lang.String}.
6717@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6718 of characters such as @code{[a-z]} and @code{[abcdez]}.
6719@item RandomStringUtils - Helper for creating randomised strings.
6720@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6721@item NumberRange - A range of numbers with an upper and lower bound.
6722@item ObjectUtils - Helper for @code{java.lang.Object}.
6723@item SerializationUtils - Helper for serializing objects.
6724@item SystemUtils - Utility class defining the Java system properties.
6725@item NestedException package - A sub-package for the creation of nested
6726 exceptions.
6727@item Enum package - A sub-package for the creation of enumerated types.
6728@item Builder package - A sub-package for the creation of @code{equals},
6729 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6730@end itemize\n")
6731 (license license:asl2.0)))
6732
6733(define-public java-commons-lang3
6734 (package
6735 (name "java-commons-lang3")
6736 (version "3.20.0")
6737 (source
6738 (origin
6739 (method url-fetch)
6740 (uri (string-append "mirror://apache/commons/lang/source/"
6741 "commons-lang3-" version "-src.tar.gz"))
6742 (sha256
6743 (base32 "05b2zfmw1y6bnzf7v32zkhix0c0sab82lmr3ilxciza0l5w6nwya"))))
6744 (build-system ant-build-system)
6745 (arguments
6746 `(#:jar-name "commons-lang3.jar"
6747 #:source-dir "src/main/java"
6748 #:tests? #f; require junit5
6749 #:phases
6750 (modify-phases %standard-phases
6751 (replace 'install (install-from-pom "pom.xml")))))
6752 (propagated-inputs
6753 (list apache-commons-parent-pom-92))
6754 (home-page "https://commons.apache.org/lang/")
6755 (synopsis "Extension of the java.lang package")
6756 (description "The Commons Lang components contains a set of Java classes
6757that provide helper methods for standard Java classes, especially those found
6758in the @code{java.lang} package. The following classes are included:
6759
6760@itemize
6761@item StringUtils - Helper for @code{java.lang.String}.
6762@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6763 characters such as @code{[a-z]} and @code{[abcdez]}.
6764@item RandomStringUtils - Helper for creating randomised strings.
6765@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6766@item NumberRange - A range of numbers with an upper and lower bound.
6767@item ObjectUtils - Helper for @code{java.lang.Object}.
6768@item SerializationUtils - Helper for serializing objects.
6769@item SystemUtils - Utility class defining the Java system properties.
6770@item NestedException package - A sub-package for the creation of nested
6771 exceptions.
6772@item Enum package - A sub-package for the creation of enumerated types.
6773@item Builder package - A sub-package for the creation of @code{equals},
6774 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6775@end itemize\n")
6776 (license license:asl2.0)))
6777
6778(define-public java-commons-bsf
6779 (package
6780 (name "java-commons-bsf")
6781 (version "2.4.0")
6782 (source (origin
6783 (method url-fetch)
6784 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6785 version ".tar.gz"))
6786 (sha256
6787 (base32
6788 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6789 (modules '((guix build utils)))
6790 (snippet
6791 '(begin
6792 (for-each delete-file
6793 (find-files "." "\\.jar$"))
6794 #t))))
6795 (build-system ant-build-system)
6796 (arguments
6797 `(#:build-target "jar"
6798 #:tests? #f; No test file
6799 #:modules ((guix build ant-build-system)
6800 (guix build utils)
6801 (guix build java-utils)
6802 (sxml simple))
6803 #:phases
6804 (modify-phases %standard-phases
6805 (add-before 'build 'create-properties
6806 (lambda _
6807 ;; This file is missing from the distribution
6808 (call-with-output-file "build-properties.xml"
6809 (lambda (port)
6810 (sxml->xml
6811 `(project (@ (basedir ".") (name "build-properties") (default ""))
6812 (property (@ (name "project.name") (value "bsf")))
6813 (property (@ (name "source.level") (value "1.5")))
6814 (property (@ (name "build.lib") (value "build/jar")))
6815 (property (@ (name "src.dir") (value "src")))
6816 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6817 (property (@ (name "build.tests") (value "build/test-classes")))
6818 (property (@ (name "build.dest") (value "build/classes"))))
6819 port)))
6820 #t))
6821 (replace 'install (install-jars "build")))))
6822 (native-inputs
6823 (list java-junit))
6824 (inputs
6825 (list java-commons-logging-minimal))
6826 (home-page "https://commons.apache.org/proper/commons-bsf")
6827 (synopsis "Bean Scripting Framework")
6828 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6829which provides scripting language support within Java applications, and access
6830to Java objects and methods from scripting languages. BSF allows one to write
6831JSPs in languages other than Java while providing access to the Java class
6832library. In addition, BSF permits any Java application to be implemented in
6833part (or dynamically extended) by a language that is embedded within it. This
6834is achieved by providing an API that permits calling scripting language engines
6835from within Java, as well as an object registry that exposes Java objects to
6836these scripting language engines.")
6837 (properties '((upstream-name . "bsf")))
6838 (license license:asl2.0)))
6839
6840(define-public java-commons-jxpath
6841 (package
6842 (name "java-commons-jxpath")
6843 (version "1.3")
6844 (source (origin
6845 (method url-fetch)
6846 (uri (string-append "mirror://apache/commons/jxpath/source/"
6847 "commons-jxpath-" version "-src.tar.gz"))
6848 (sha256
6849 (base32
6850 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6851 (build-system ant-build-system)
6852 (arguments
6853 `(#:jar-name "commons-jxpath.jar"
6854 ;; tests require more dependencies, including mockrunner which depends on old software
6855 #:tests? #f
6856 #:source-dir "src/java"))
6857 (inputs
6858 `(("servlet" ,java-classpathx-servletapi)
6859 ("java-jdom" ,java-jdom)
6860 ("java-commons-beanutils" ,java-commons-beanutils)))
6861 (native-inputs
6862 (list java-junit))
6863 (home-page "https://commons.apache.org/jxpath/")
6864 (synopsis "Simple interpreter of an expression language called XPath")
6865 (description "The org.apache.commons.jxpath package defines a simple
6866interpreter of an expression language called XPath. JXPath applies XPath
6867expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6868contexts, DOM etc, including mixtures thereof.")
6869 (license license:asl2.0)))
6870
6871(define-public java-commons-pool
6872 (package
6873 (name "java-commons-pool")
6874 (version "2.6.2")
6875 (source (origin
6876 (method url-fetch)
6877 (uri (string-append "mirror://apache/commons/pool/source/"
6878 "commons-pool2-" version "-src.tar.gz"))
6879 (sha256
6880 (base32
6881 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6882 (arguments
6883 `(#:jar-name "common-pool.jar"
6884 #:source-dir "src/main/java"
6885 #:test-exclude
6886 (list "**/PerformanceTest.java")))
6887 (build-system ant-build-system)
6888 (inputs
6889 (list java-cglib))
6890 (native-inputs
6891 (list java-junit java-hamcrest-core java-asm java-objenesis))
6892 (home-page "https://commons.apache.org/proper/commons-pool/")
6893 (synopsis "Object-pooling API in Java")
6894 (description "The commons-pool package provides an object-pooling API
6895and a number of object pool implementations. This package defines a
6896handful of pooling interfaces and some base classes that may be useful when
6897creating new pool implementations.")
6898 (properties '((upstream-name . "commons-pool2")))
6899 (license license:asl2.0)))
6900
6901(define-public java-commons-dbcp
6902 (package
6903 (name "java-commons-dbcp")
6904 (version "2.6.0")
6905 (source (origin
6906 (method url-fetch)
6907 (uri (string-append "mirror://apache/commons/dbcp/source/"
6908 "commons-dbcp2-" version "-src.tar.gz"))
6909 (sha256
6910 (base32
6911 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6912 (arguments
6913 `(#:source-dir "src/main/java"
6914 #:jar-name "java-commons-dbcp.jar"
6915 #:tests? #f)); requires apache-geronimo
6916 (inputs
6917 `(("java-commons-pool" ,java-commons-pool)
6918 ("java-commons-logging" ,java-commons-logging-minimal)
6919 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6920 (native-inputs
6921 (list java-junit))
6922 (build-system ant-build-system)
6923 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6924 (synopsis "Database Connection Pool for Java")
6925 (description "Commons-dbcp allows you to share a pool of database
6926connections between users. Creating a new connection for each user can be
6927time consuming and even unfeasible when the number of simultaneous users is
6928very large. This package provides a way to share a poole of connections to
6929reduce that load.")
6930 (properties '((upstream-name . "commons-dbcp2")))
6931 (license license:asl2.0)))
6932
6933(define-public java-commons-jcs
6934 (package
6935 (name "java-commons-jcs")
6936 (version "3.1")
6937 (source (origin
6938 (method url-fetch)
6939 (uri (string-append "mirror://apache/commons/jcs/source/"
6940 "commons-jcs3-dist-" version "-src.tar.gz"))
6941 (sha256
6942 (base32
6943 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6944 (build-system ant-build-system)
6945 (arguments
6946 `(#:jar-name "commons-jcs.jar"
6947 #:source-dir "commons-jcs-core/src/main/java"
6948 #:test-dir "commons-jcs-core/src/test"
6949 #:tests? #f; requires hsqldb
6950 #:phases
6951 (modify-phases %standard-phases
6952 (add-before 'build 'copy-resources
6953 (lambda _
6954 (copy-recursively "commons-jcs-core/src/main/resources"
6955 "build/classes"))))))
6956 (propagated-inputs
6957 (list java-classpathx-servletapi
6958 java-commons-dbcp
6959 java-httpcomponents-httpclient
6960 java-httpcomponents-httpcore
6961 java-log4j-api))
6962 (native-inputs
6963 (list java-junit))
6964 (home-page "https://commons.apache.org/proper/commons-jcs/")
6965 (synopsis "Distributed caching system in Java")
6966 (description "JCS is a distributed caching system written in Java. It
6967is intended to speed up applications by providing a means to manage cached
6968data of various dynamic natures. Like any caching system, JCS is most useful
6969for high read, low put applications. Latency times drop sharply and
6970bottlenecks move away from the database in an effectively cached system.")
6971 (properties '((upstream-name . "commons-jcs3-dist")))
6972 (license license:asl2.0)))
6973
6974(define-public java-jsr250
6975 (package
6976 (name "java-jsr250")
6977 (version "1.3")
6978 (source (origin
6979 (method git-fetch)
6980 (uri (git-reference
6981 (url "https://github.com/javaee/javax.annotation")
6982 (commit version)))
6983 (file-name (git-file-name name version))
6984 (sha256
6985 (base32
6986 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6987 (build-system ant-build-system)
6988 (arguments
6989 `(#:tests? #f ; no tests included
6990 #:jdk ,icedtea-8
6991 #:jar-name "jsr250.jar"
6992 #:phases
6993 (modify-phases %standard-phases
6994 (replace 'install
6995 (install-from-pom "pom.xml")))))
6996 (propagated-inputs (list java-jvnet-parent-pom-3))
6997 (home-page "https://jcp.org/en/jsr/detail?id=250")
6998 (synopsis "Security-related annotations")
6999 (description "This package provides annotations for security. It provides
7000packages in the @code{javax.annotation} and @code{javax.annotation.security}
7001namespaces.")
7002 ;; either cddl or gpl2 only, with classpath exception
7003 (license (list license:cddl1.0
7004 license:gpl2))))
7005
7006(define-public java-jsr305
7007 (package
7008 (name "java-jsr305")
7009 (version "3.0.1")
7010 (source (origin
7011 (method url-fetch)
7012 (uri (string-append "https://repo1.maven.org/maven2/"
7013 "com/google/code/findbugs/"
7014 "jsr305/" version "/jsr305-"
7015 version "-sources.jar"))
7016 (sha256
7017 (base32
7018 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
7019 (build-system ant-build-system)
7020 (arguments
7021 `(#:tests? #f ; no tests included
7022 #:jar-name "jsr305.jar"
7023 #:phases
7024 (modify-phases %standard-phases
7025 (add-before 'install 'create-pom
7026 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
7027 (replace 'install
7028 (install-from-pom "pom.xml")))))
7029 (home-page "https://findbugs.sourceforge.net/")
7030 (synopsis "Annotations for the static analyzer called findbugs")
7031 (description "This package provides annotations for the findbugs package.
7032It provides packages in the @code{javax.annotations} namespace.")
7033 (license license:asl2.0)))
7034
7035(define-public java-findbugs-annotations
7036 (package
7037 (name "java-findbugs-annotations")
7038 (version "3.0.1")
7039 (source (origin
7040 (method git-fetch)
7041 (uri (git-reference
7042 (url "https://github.com/findbugsproject/findbugs")
7043 (commit version)))
7044 (file-name (git-file-name name version))
7045 (sha256
7046 (base32
7047 "0zdf5hqj2g1ivxia8kw4g6gk98x6dsn4hfx8rl478150905kbq4y"))
7048 (modules '((guix build utils)))
7049 ;; Delete bundled jars.
7050 (snippet
7051 '(for-each delete-file (find-files "." "\\.jar$")))))
7052 (build-system ant-build-system)
7053 (arguments
7054 (list
7055 #:tests? #f ; no tests for the annotations
7056 #:jar-name "findbugs-annotations.jar"
7057 #:source-dir "annotations-src"
7058 #:phases
7059 #~(modify-phases %standard-phases
7060 ;; Pick only the namespace for the annotation classes.
7061 (add-after 'unpack 'select-annotation-sources
7062 (lambda _
7063 (let ((dir "annotations-src/edu/umd/cs/findbugs"))
7064 (mkdir-p dir)
7065 (copy-recursively
7066 "findbugs/src/java/edu/umd/cs/findbugs/annotations"
7067 (string-append dir "/annotations"))
7068 ;; The Confidence and Priority enums refer to this class,
7069 ;; which only defines constants.
7070 (install-file
7071 "findbugs/src/java/edu/umd/cs/findbugs/Priorities.java" dir)
7072 ;; Remove dependency to the BugRanker class.
7073 (substitute* (find-files dir "\\.java$")
7074 (("import edu.umd.cs.findbugs.BugRanker;") "")
7075 (("BugRanker.VISIBLE_RANK_MAX") "20"))
7076 #t)))
7077 (add-before 'install 'create-pom
7078 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "annotations"
7079 #$version))
7080 (replace 'install
7081 (install-from-pom "pom.xml")))))
7082 (propagated-inputs (list java-jsr305))
7083 (home-page "https://findbugs.sourceforge.net/")
7084 (synopsis "Annotations for the FindBugs static analysis tool")
7085 (description "FindBugs is a static analysis tool that looks for bugs in
7086Java programs. This package provides the annotations from the
7087@code{edu.umd.cs.findbugs.annotations} namespace, most notably
7088@code{@@SuppressFBWarnings}, which suppresses individual FindBugs warnings on a
7089class or method, as well as annotations such as @code{@@CheckForNull} and
7090@code{@@Nullable}. Only the annotation classes are built, not the FindBugs
7091analysis engine itself.")
7092 (license license:lgpl2.1+)))
7093
7094(define-public java-error-prone-annotations
7095 (package
7096 (name "java-error-prone-annotations")
7097 (version "2.50.0")
7098 (source (origin
7099 (method git-fetch)
7100 (uri (git-reference
7101 (url "https://github.com/google/error-prone")
7102 (commit (string-append "v" version))))
7103 (file-name (git-file-name "java-error-prone" version))
7104 (sha256
7105 (base32
7106 "0bsk701n5qbnx5dcjxvq9fvs1nakw27nxxwcvkbgdjyhchjmb6fi"))))
7107 (build-system ant-build-system)
7108 (arguments
7109 `(#:tests? #f; no tests
7110 #:jdk ,openjdk11
7111 #:jar-name (string-append ,name "-" ,version ".jar")
7112 #:source-dir "annotations/src/main/java"
7113 #:test-dir "annotations/src/altest"
7114 #:make-flags (list "-Dant.build.javac.source=1.8"
7115 "-Dant.build.javac.target=1.8")
7116 #:phases
7117 (modify-phases %standard-phases
7118 ;; Compile the module descriptor while keeping compatibility with
7119 ;; java 1.8.
7120 (add-before 'build 'module-info
7121 (lambda _
7122 (let ((classes-dir (string-append (getcwd) "/build/classes"))
7123 (source-dir "annotations/src/main/java"))
7124 (mkdir-p classes-dir)
7125 (invoke "javac" "--release" "9" "-implicit:none"
7126 "-sourcepath" source-dir "-d" classes-dir
7127 (string-append source-dir "/module-info.java"))
7128 (delete-file (string-append source-dir "/module-info.java")))))
7129 (replace 'install (install-from-pom "annotations/pom.xml")))))
7130 (propagated-inputs (list java-error-prone-parent-pom))
7131 (home-page "https://errorprone.info")
7132 (synopsis "Java static analyzer at compile-time")
7133 (description "Error Prone is a static analysis tool for Java that catches
7134common programming mistakes at compile-time. This package contains annotations
7135used by programmers to guide the static analysis.")
7136 (license license:asl2.0)))
7137
7138(define java-error-prone-parent-pom
7139 (package
7140 (inherit java-error-prone-annotations)
7141 (name "java-error-prone-parent-pom")
7142 (arguments
7143 `(#:tests? #f
7144 #:phases
7145 (modify-phases %standard-phases
7146 (delete 'configure)
7147 (delete 'build)
7148 (replace 'install
7149 (install-pom-file "pom.xml")))))
7150 (propagated-inputs '())))
7151
7152(define-public java-guava
7153 (package
7154 (name "java-guava")
7155 (version "31.1")
7156 (source (origin
7157 (method git-fetch)
7158 (uri (git-reference
7159 (url "https://github.com/google/guava/")
7160 (commit (string-append "v" version))))
7161 (file-name (git-file-name name version))
7162 (sha256
7163 (base32
7164 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
7165 (patches
7166 (search-patches "java-guava-remove-annotation-deps.patch"))))
7167 (build-system ant-build-system)
7168 (arguments
7169 `(#:tests? #f ; no tests included
7170 #:jar-name "guava.jar"
7171 #:source-dir "guava/src"
7172 #:phases
7173 (modify-phases %standard-phases
7174 (add-after 'unpack 'trim-sources
7175 (lambda _
7176 (with-directory-excursion "guava/src/com/google/common"
7177 ;; Remove annotations to avoid extra dependencies:
7178 ;; * "j2objc" annotations are used when converting Java to
7179 ;; Objective C;
7180 ;; * "IgnoreJRERequirement" is used for Android.
7181 ;; * "Nullable" is used to catch NPE at build time.
7182 (substitute* (find-files "." "\\.java$")
7183 (("import com.google.j2objc.*") "")
7184 (("import org.checkerframework.checker.*") "")
7185 (("@ReflectionSupport.*") "")
7186 (("@WeakOuter") "")
7187 (("@RetainedWith") "")
7188 (("@Weak") "")
7189 (("@J2ObjCIncompatible") "")
7190 (("@IgnoreJRERequirement") "")
7191 (("@Nullable") "")))))
7192 ;; This is required by guava, but this is just an empty stub
7193 (add-before 'install 'install-listenablefuture-stub
7194 (install-pom-file "futures/listenablefuture9999/pom.xml"))
7195 (replace 'install (install-from-pom "guava/pom.xml")))))
7196 (inputs
7197 (list java-error-prone-annotations java-jsr305))
7198 (propagated-inputs
7199 (list java-guava-futures-failureaccess java-guava-parent-pom))
7200 (home-page "https://github.com/google/guava")
7201 (synopsis "Google core libraries for Java")
7202 (description "Guava is a set of core libraries that includes new
7203collection types (such as multimap and multiset), immutable collections, a
7204graph library, functional types, an in-memory cache, and APIs/utilities for
7205concurrency, I/O, hashing, primitives, reflection, string processing, and much
7206more!")
7207 (license license:asl2.0)))
7208
7209(define-public java-guava-futures-failureaccess
7210 (package
7211 (inherit java-guava)
7212 (name "java-guava-futures-failureaccess")
7213 (arguments
7214 `(#:tests? #f; no tests
7215 #:jar-name "guava-futures-failureaccess.jar"
7216 #:source-dir "futures/failureaccess/src"
7217 #:phases
7218 (modify-phases %standard-phases
7219 (replace 'install
7220 (install-from-pom "futures/failureaccess/pom.xml")))))
7221 (propagated-inputs
7222 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
7223
7224(define java-guava-parent-pom
7225 (package
7226 (inherit java-guava)
7227 (name "java-guava-parent-pom")
7228 (arguments
7229 `(#:tests? #f
7230 #:phases
7231 (modify-phases %standard-phases
7232 (delete 'configure)
7233 (delete 'build)
7234 (replace 'install
7235 (install-pom-file "pom.xml")))))
7236 (propagated-inputs
7237 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
7238
7239;; The java-commons-logging package provides adapters to many different
7240;; logging frameworks. To avoid an excessive dependency graph we try to build
7241;; it with only a minimal set of adapters.
7242(define-public java-commons-logging-minimal
7243 (package
7244 (name "java-commons-logging-minimal")
7245 (version "1.2")
7246 (source (origin
7247 (method url-fetch)
7248 (uri (string-append "mirror://apache/commons/logging/source/"
7249 "commons-logging-" version "-src.tar.gz"))
7250 (sha256
7251 (base32
7252 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
7253 (build-system ant-build-system)
7254 (arguments
7255 `(#:tests? #f ; avoid dependency on logging frameworks
7256 #:jar-name "commons-logging-minimal.jar"
7257 #:phases
7258 (modify-phases %standard-phases
7259 (add-after 'unpack 'delete-adapters-and-tests
7260 (lambda _
7261 ;; Delete all adapters except for NoOpLog, SimpleLog, and
7262 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
7263 ;; is used by applications; SimpleLog is the only actually usable
7264 ;; implementation that does not depend on another logging
7265 ;; framework.
7266 (for-each
7267 (lambda (file)
7268 (delete-file (string-append
7269 "src/main/java/org/apache/commons/logging/impl/" file)))
7270 (list "Jdk13LumberjackLogger.java"
7271 "WeakHashtable.java"
7272 "Log4JLogger.java"
7273 "ServletContextCleaner.java"
7274 "Jdk14Logger.java"
7275 "AvalonLogger.java"
7276 "LogKitLogger.java"))
7277 (delete-file-recursively "src/test")
7278 #t))
7279
7280 (replace 'install
7281 (install-from-pom "pom.xml")))))
7282 (home-page "https://commons.apache.org/logging/")
7283 (synopsis "Common API for logging implementations")
7284 (description "The Logging package is a thin bridge between different
7285logging implementations. A library that uses the commons-logging API can be
7286used with any logging implementation at runtime.")
7287 (properties '((upstream-name . "commons-logging")))
7288 (license license:asl2.0)))
7289
7290;; This is the last release of the 1.x series.
7291(define-public java-mockito-1
7292 (package
7293 (name "java-mockito")
7294 (version "1.10.19")
7295 (source (origin
7296 (method url-fetch)
7297 (uri (string-append "https://repo1.maven.org/maven2/"
7298 "org/mockito/mockito-core/" version
7299 "/mockito-core-" version "-sources.jar"))
7300 (sha256
7301 (base32
7302 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
7303 (build-system ant-build-system)
7304 (arguments
7305 `(#:jar-name "mockito.jar"
7306 #:tests? #f ; no tests included
7307 ;; FIXME: patch-and-repack does not support jars, so we have to apply
7308 ;; patches in build phases.
7309 #:phases
7310 (modify-phases %standard-phases
7311 ;; Mockito was developed against a different version of hamcrest,
7312 ;; which does not require matcher implementations to provide an
7313 ;; implementation of the "describeMismatch" method. We add this
7314 ;; simple definition to pass the build with our version of hamcrest.
7315 (add-after 'unpack 'fix-hamcrest-build-error
7316 (lambda _
7317 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
7318 (("public Matcher getActualMatcher\\(\\) .*" line)
7319 (string-append "
7320 public void describeMismatch(Object item, Description description) {
7321 actualMatcher.describeMismatch(item, description);
7322 }"
7323 line)))
7324 #t))
7325 ;; Mockito bundles cglib. We have a cglib package, so let's use
7326 ;; that instead.
7327 (add-after 'unpack 'use-system-libraries
7328 (lambda _
7329 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
7330 (substitute* '("CGLIBHacker.java"
7331 "CglibMockMaker.java"
7332 "ClassImposterizer.java"
7333 "DelegatingMockitoMethodProxy.java"
7334 "MethodInterceptorFilter.java"
7335 "MockitoNamingPolicy.java"
7336 "SerializableMockitoMethodProxy.java"
7337 "SerializableNoOp.java")
7338 (("import org.mockito.cglib") "import net.sf.cglib")))
7339 #t)))))
7340 (inputs
7341 (list java-junit java-objenesis java-cglib java-hamcrest-core))
7342 (home-page "http://mockito.org")
7343 (synopsis "Mockito is a mock library for Java")
7344 (description "Mockito is a mocking library for Java which lets you write
7345tests with a clean and simple API. It generates mocks using reflection, and
7346it records all mock invocations, including methods arguments.")
7347 (license license:asl2.0)))
7348
7349(define-public java-opentest4j
7350 (package
7351 (name "java-opentest4j")
7352 (version "1.3.0")
7353 (source (origin
7354 (method git-fetch)
7355 (uri (git-reference
7356 (url "https://github.com/ota4j-team/opentest4j")
7357 (commit (string-append "r" version))))
7358 (file-name (git-file-name name version))
7359 (sha256
7360 (base32
7361 "1z7krrl8j7l2v3c1qadbl7bydigbh4gqv9gqm7xcizq2iq2hgav5"))))
7362 (build-system ant-build-system)
7363 (arguments
7364 (list
7365 #:jar-name "opentest4j.jar"
7366 #:source-dir "src/main/java"
7367 #:test-include (list "**/*Tests.java")
7368 ;; Tests use local variable type inference ('var'), which requires
7369 ;; Java 10 or later.
7370 #:jdk openjdk11
7371 #:phases
7372 #~(modify-phases %standard-phases
7373 (add-before 'build 'set-release
7374 (lambda _
7375 ;; Only the tests require JDK 10+. Target Java 8 for the
7376 ;; main classes so that the jar stays usable by packages built
7377 ;; with the default JDK.
7378 (substitute* "build.xml"
7379 (("(<javac )([^>]+srcdir=\"src/main/java\"[^>]+/?>)"
7380 _ prefix suffix)
7381 (string-append prefix "release=\"8\" " suffix))))))))
7382 (home-page "https://github.com/ota4j-team/opentest4j")
7383 (native-inputs
7384 (list java-junit-4.13.2))
7385 (synopsis "Java assertion library")
7386 (description "This package provides a common set of exceptions that
7387testing libraries and frameworks for the JVM can use to report test failures.")
7388 (license license:asl2.0)))
7389
7390(define-public java-mockito-4
7391 (package
7392 (inherit java-mockito-1)
7393 (version "4.11.0")
7394 (source (origin
7395 (method url-fetch)
7396 (uri (string-append "https://repo1.maven.org/maven2/"
7397 "org/mockito/mockito-core/" version
7398 "/mockito-core-" version "-sources.jar"))
7399 (sha256
7400 (base32
7401 "1gvqghx4xlgk1snl01csdj3wlrwl2zg9acasiwsqgcff5jgisx1l"))))
7402 (arguments
7403 (list #:tests? #f ; no tests included
7404 #:jar-name "mockito.jar"
7405 #:phases
7406 #~(modify-phases %standard-phases
7407 (add-after 'unpack 'reference-unshaded-asm
7408 (lambda _
7409 (substitute* (find-files "src" "\\.java$")
7410 (("net\\.bytebuddy\\.jar\\.asm") "org.objectweb.asm")))))))
7411 (inputs '())
7412 (propagated-inputs
7413 (list java-byte-buddy-agent
7414 java-byte-buddy-dep
7415 java-objenesis
7416 java-junit
7417 java-opentest4j))))
7418
7419(define-public java-httpcomponents-httpcore
7420 (package
7421 (name "java-httpcomponents-httpcore")
7422 (version "4.4.6")
7423 (source (origin
7424 (method url-fetch)
7425 (uri (string-append "mirror://apache/httpcomponents/httpcore/"
7426 "source/httpcomponents-core-"
7427 version "-src.tar.gz"))
7428 (sha256
7429 (base32
7430 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
7431 (build-system ant-build-system)
7432 (arguments
7433 `(#:jar-name "httpcomponents-httpcore.jar"
7434 #:phases
7435 (modify-phases %standard-phases
7436 (add-after 'unpack 'chdir
7437 (lambda _ (chdir "httpcore") #t))
7438 (replace 'install
7439 (install-from-pom "pom.xml")))))
7440 (inputs
7441 (list java-commons-logging-minimal java-commons-lang3))
7442 (native-inputs
7443 (list java-junit java-mockito-1))
7444 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
7445 (synopsis "Low level HTTP transport components")
7446 (description "HttpCore is a set of low level HTTP transport components
7447that can be used to build custom client and server side HTTP services with a
7448minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7449on the classic Java I/O and non-blocking, event driven I/O model based on Java
7450NIO.
7451
7452This package provides the blocking I/O model library.")
7453 (license license:asl2.0)))
7454
7455(define-public java-httpcomponents-httpcore-nio
7456 (package (inherit java-httpcomponents-httpcore)
7457 (name "java-httpcomponents-httpcore-nio")
7458 (arguments
7459 `(#:jar-name "httpcomponents-httpcore-nio.jar"
7460 #:phases
7461 (modify-phases %standard-phases
7462 (add-after 'unpack 'chdir
7463 (lambda _ (chdir "httpcore-nio") #t)))))
7464 (inputs
7465 (modify-inputs inputs
7466 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
7467 (description "HttpCore is a set of low level HTTP transport components
7468that can be used to build custom client and server side HTTP services with a
7469minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7470on the classic Java I/O and non-blocking, event driven I/O model based on Java
7471NIO.
7472
7473This package provides the non-blocking I/O model library based on Java
7474NIO.")))
7475
7476(define-public java-httpcomponents-httpcore-ab
7477 (package (inherit java-httpcomponents-httpcore)
7478 (name "java-httpcomponents-httpcore-ab")
7479 (arguments
7480 `(#:jar-name "httpcomponents-httpcore-ab.jar"
7481 #:phases
7482 (modify-phases %standard-phases
7483 (add-after 'unpack 'chdir
7484 (lambda _ (chdir "httpcore-ab") #t)))))
7485 (inputs
7486 (modify-inputs inputs
7487 (prepend java-httpcomponents-httpcore java-commons-cli
7488 java-hamcrest-core)))
7489 (synopsis "Apache HttpCore benchmarking tool")
7490 (description "This package provides the HttpCore benchmarking tool. It is
7491an Apache AB clone based on HttpCore.")))
7492
7493(define-public java-httpcomponents-httpcore-osgi
7494 (package (inherit java-httpcomponents-httpcore)
7495 (name "java-httpcomponents-httpcore-osgi")
7496 (arguments
7497 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
7498 #:phases
7499 (modify-phases %standard-phases
7500 (add-after 'unpack 'chdir
7501 (lambda _ (chdir "httpcore-osgi"))))))
7502 (inputs
7503 (modify-inputs inputs
7504 (prepend java-httpcomponents-httpcore
7505 java-httpcomponents-httpcore-nio
7506 java-hamcrest-core)))
7507 (native-inputs (list java-ops4j-pax-exam-core
7508 java-ops4j-pax-exam-core-junit
7509 java-ops4j-pax-exam-core-spi
7510 java-junit))
7511 (description "HttpCore is a set of low level HTTP transport components
7512that can be used to build custom client and server side HTTP services with a
7513minimal footprint. HttpCore supports two I/O models: blocking I/O model based
7514on the classic Java I/O and non-blocking, event driven I/O model based on Java
7515NIO.
7516
7517This package provides... some tests.")))
7518
7519(define-public java-httpcomponents-httpclient
7520 (package
7521 (name "java-httpcomponents-httpclient")
7522 (version "4.5.12")
7523 (source (origin
7524 (method url-fetch)
7525 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
7526 "source/httpcomponents-client-"
7527 version "-src.tar.gz"))
7528 (sha256
7529 (base32
7530 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
7531 (build-system ant-build-system)
7532 (arguments
7533 `(#:jar-name "httpcomponents-httpclient.jar"
7534 #:phases
7535 (modify-phases %standard-phases
7536 (add-after 'unpack 'chdir
7537 (lambda _ (chdir "httpclient") #t))
7538
7539 (replace 'install
7540 (install-from-pom "pom.xml")))))
7541 (inputs
7542 (list java-commons-logging-minimal
7543 java-commons-codec
7544 java-hamcrest-core
7545 java-httpcomponents-httpcore
7546 java-mockito-1
7547 java-junit))
7548 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
7549 (synopsis "HTTP client library for Java")
7550 (description "Although the @code{java.net} package provides basic
7551functionality for accessing resources via HTTP, it doesn't provide the full
7552flexibility or functionality needed by many applications. @code{HttpClient}
7553seeks to fill this void by providing an efficient, up-to-date, and
7554feature-rich package implementing the client side of the most recent HTTP
7555standards and recommendations.")
7556 (properties '((upstream-name . "httpcomponents-client")))
7557 (license license:asl2.0)))
7558
7559(define-public java-httpcomponents-httpclient-cache
7560 (package (inherit java-httpcomponents-httpclient)
7561 (name "java-httpcomponents-httpclient-cache")
7562 (arguments
7563 `(#:jar-name "httpcomponents-httpclient-cache.jar"
7564 #:source-dir "src/main/java"
7565 #:test-dir "src/test"
7566 #:tests? #f; tests are broken with current cglib.
7567 #:phases
7568 (modify-phases %standard-phases
7569 (add-after 'unpack 'delete-unused-impls
7570 (lambda _
7571 (for-each
7572 delete-file-recursively
7573 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
7574 "src/main/java/org/apache/http/impl/client/cache/memcached/"
7575 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
7576 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
7577 (add-after 'unpack 'chdir
7578 (lambda _ (chdir "httpclient-cache"))))))
7579 (inputs
7580 (modify-inputs inputs
7581 (prepend java-httpcomponents-httpclient
7582 java-httpcomponents-httpmime
7583 java-hamcrest-core)))
7584 (description "This package provides an API for caching accessed HTTP
7585resources.")))
7586
7587(define-public java-httpcomponents-httpclient-osgi
7588 (package (inherit java-httpcomponents-httpclient)
7589 (name "java-httpcomponents-httpclient-osgi")
7590 (arguments
7591 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
7592 #:tests? #f; tests are broken with current cglib.
7593 #:phases
7594 (modify-phases %standard-phases
7595 (add-after 'unpack 'chdir
7596 (lambda _ (chdir "httpclient-osgi") #t)))))
7597 (inputs
7598 (modify-inputs inputs
7599 (prepend java-httpcomponents-httpclient
7600 java-httpcomponents-httpclient-cache
7601 java-osgi-framework
7602 java-osgi-service-cm
7603 java-hamcrest-core)))))
7604
7605(define-public java-httpcomponents-httpmime
7606 (package (inherit java-httpcomponents-httpclient)
7607 (name "java-httpcomponents-httpmime")
7608 (arguments
7609 `(#:jar-name "httpcomponents-httpmime.jar"
7610 #:phases
7611 (modify-phases %standard-phases
7612 (add-after 'unpack 'chdir
7613 (lambda _ (chdir "httpmime") #t))
7614 (replace 'install
7615 (install-from-pom "pom.xml")))))
7616 (inputs
7617 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
7618 java-junit java-hamcrest-core))))
7619
7620(define-public java-commons-net
7621 (package
7622 (name "java-commons-net")
7623 (version "3.6")
7624 (source (origin
7625 (method url-fetch)
7626 (uri (string-append "mirror://apache/commons/net/source/"
7627 "commons-net-" version "-src.tar.gz"))
7628 (sha256
7629 (base32
7630 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
7631 (build-system ant-build-system)
7632 (arguments
7633 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
7634 ;; should be "resources/examples/examples.properties"), but gets "null"
7635 ;; instead.
7636 #:tests? #f
7637 #:jar-name "commons-net.jar"))
7638 (native-inputs
7639 (list java-junit java-hamcrest-core))
7640 (home-page "https://commons.apache.org/net/")
7641 (synopsis "Client library for many basic Internet protocols")
7642 (description "The Apache Commons Net library implements the client side of
7643many basic Internet protocols. The purpose of the library is to provide
7644fundamental protocol access, not higher-level abstractions.")
7645 (license license:asl2.0)))
7646
7647(define-public java-jsch
7648 (package
7649 (name "java-jsch")
7650 (version "0.1.55")
7651 (source (origin
7652 (method url-fetch)
7653 (uri (string-append "mirror://sourceforge/jsch/jsch/"
7654 version "/jsch-" version ".zip"))
7655 (sha256
7656 (base32
7657 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
7658 (build-system ant-build-system)
7659 (arguments
7660 `(#:build-target "dist"
7661 #:tests? #f ; no tests included
7662 #:phases
7663 (modify-phases %standard-phases
7664 (replace 'install (install-jars "dist")))))
7665 (native-inputs
7666 (list unzip))
7667 (home-page "http://www.jcraft.com/jsch/")
7668 (synopsis "Pure Java implementation of SSH2")
7669 (description "JSch is a pure Java implementation of SSH2. JSch allows you
7670to connect to an SSH server and use port forwarding, X11 forwarding, file
7671transfer, etc., and you can integrate its functionality into your own Java
7672programs.")
7673 (license license:bsd-3)))
7674
7675(define-public java-jsch-0.1.72
7676 (package
7677 (name "java-jsch")
7678 (version "0.1.72")
7679 (source
7680 (origin
7681 (method git-fetch)
7682 (uri (git-reference
7683 (url "https://github.com/mwiede/jsch.git")
7684 (commit (string-append "jsch-" version))))
7685 (file-name (git-file-name name version))
7686 (sha256
7687 (base32 "1xx50fw9wxnkm9yg8v8scr2c7781506flv0ivalpw7bg27w8sm59"))))
7688 (build-system ant-build-system)
7689 (arguments
7690 (list
7691 #:jdk openjdk17
7692 #:tests? #f
7693 #:modules
7694 '((guix build utils)
7695 (guix build ant-build-system)
7696 (guix build java-utils))
7697 #:phases
7698 #~(modify-phases %standard-phases
7699 (replace 'build
7700 (lambda* (#:key inputs #:allow-other-keys)
7701 (define classes-dir (string-append (getcwd) "/build/classes"))
7702 (define generated-dir (string-append (getcwd) "/build/generated"))
7703 (define manifest-file (string-append (getcwd) "/build/manifest.mf"))
7704 (define jar-file (string-append (getcwd) "/build/jsch-" #$version ".jar"))
7705 (define jna
7706 (car (find-files (assoc-ref inputs "java-native-access")
7707 "jna-jpms.*\\.jar$")))
7708 (define jna-platform
7709 (car (find-files (assoc-ref inputs "java-native-access-platform")
7710 "jna-platform-jpms.*\\.jar$")))
7711 (define bcprov
7712 (car (find-files (assoc-ref inputs "java-bouncycastle")
7713 "bcprov.*\\.jar$")))
7714 (define junixsocket
7715 (car (find-files (assoc-ref inputs "java-junixsocket-common")
7716 "\\.jar$")))
7717 (define classpath
7718 (string-append jna ":" jna-platform ":" bcprov
7719 ":" junixsocket))
7720 (define (java-sources source-root)
7721 (filter (lambda (file)
7722 (and (string-suffix? ".java" file)
7723 (not (string-suffix? "module-info.java" file))))
7724 (find-files source-root "\\.java$")))
7725 (define (compile-release source-root release)
7726 (let ((sources (java-sources source-root))
7727 (target (string-append classes-dir "/META-INF/versions/"
7728 release)))
7729 (when (pair? sources)
7730 (mkdir-p target)
7731 (apply invoke "javac"
7732 (append
7733 (list "--release" release
7734 "-cp" (string-append classes-dir ":" classpath)
7735 "-d" target)
7736 sources)))))
7737 (mkdir-p classes-dir)
7738 (mkdir-p (string-append generated-dir "/com/jcraft/jsch"))
7739 (copy-file "src/main/java-templates/com/jcraft/jsch/Version.java"
7740 (string-append generated-dir
7741 "/com/jcraft/jsch/Version.java"))
7742 (substitute* (string-append generated-dir
7743 "/com/jcraft/jsch/Version.java")
7744 (("\\$\\{project.version\\}") #$version))
7745 (apply invoke "javac"
7746 (append
7747 (list "--release" "8"
7748 "-cp" classpath
7749 "-d" classes-dir)
7750 (java-sources "src/main/java")
7751 (list (string-append generated-dir
7752 "/com/jcraft/jsch/Version.java"))))
7753 (for-each
7754 (lambda (release)
7755 (compile-release (string-append "src/main/java" release)
7756 release))
7757 '("9" "11" "15" "16"))
7758 (call-with-output-file manifest-file
7759 (lambda (port)
7760 (display "Multi-Release: true\n" port)))
7761 (invoke "jar" "--create"
7762 "--file" jar-file
7763 "--manifest" manifest-file
7764 "-C" classes-dir ".")))
7765 (add-before 'install 'create-pom
7766 (generate-pom.xml "pom.xml" "com.jcraft"
7767 "jsch" #$version))
7768 (replace 'install
7769 (install-from-pom "pom.xml")))))
7770 (inputs
7771 (list java-bouncycastle-1.77
7772 java-junixsocket-common-2
7773 java-native-access-5.14.0
7774 java-native-access-platform-5.14.0))
7775 (native-inputs
7776 (list java-kohlschutter-compiler-annotations-1
7777 unzip))
7778 (home-page "https://github.com/mwiede/jsch")
7779 (synopsis "Pure Java implementation of SSH2")
7780 (description
7781 "JSch is a pure Java implementation of SSH2. This package builds the
77820.1.72 release from source with bouncycastle and junixsocket support.")
7783 (license license:bsd-3)))
7784
7785(define-public java-jzlib-1.1.3
7786 (package
7787 (name "java-jzlib")
7788 (version "1.1.3")
7789 (source (origin
7790 (method git-fetch)
7791 (uri (git-reference
7792 (url "https://github.com/ymnk/jzlib")
7793 (commit version)))
7794 (file-name (git-file-name name version))
7795 (sha256
7796 (base32
7797 "1wma04qlx65ybyf49dngqb5db1xc7sya0g98frj5chhr4qc7fjs8"))))
7798 (build-system ant-build-system)
7799 (arguments
7800 `(#:jar-name "jzlib.jar"
7801 #:source-dir "src/main/java"
7802 #:tests? #f ; no tests
7803 #:phases
7804 (modify-phases %standard-phases
7805 (replace 'install
7806 (install-from-pom "pom.xml")))))
7807 (home-page "http://www.jcraft.com/jzlib/")
7808 (synopsis "Pure Java implementation of zlib")
7809 (description "JZlib is a re-implementation of zlib in pure Java. It
7810provides @code{Deflater}, @code{Inflater}, and streaming classes for
7811compression and decompression compatible with the zlib format.")
7812 (license license:bsd-3)))
7813
7814(define-public java-commons-compress
7815 (package
7816 (name "java-commons-compress")
7817 (version "1.28.0")
7818 (source (origin
7819 (method url-fetch)
7820 (uri (string-append "mirror://apache/commons/compress/source/"
7821 "commons-compress-" version "-src.tar.gz"))
7822 (sha256
7823 (base32
7824 "0qkn70dfb1f9xihc34mbpbr5ag8qm4qq18hh3p4286r2ajj0z1sw"))))
7825 (build-system ant-build-system)
7826 (arguments
7827 `(#:jar-name "commons-compress.jar"
7828 #:source-dir "src/main/java"
7829 #:tests? #f; requires java-mockito-3
7830 #:phases
7831 (modify-phases %standard-phases
7832 (replace 'install (install-from-pom "pom.xml")))))
7833 (propagated-inputs
7834 (list java-commons-lang3
7835 java-commons-io-latest
7836 java-commons-codec
7837 java-asm-9
7838 java-brotli
7839 java-xz
7840 java-zstd
7841 apache-commons-parent-pom-85))
7842 (home-page "https://commons.apache.org/proper/commons-compress/")
7843 (synopsis "Java library for working with compressed files")
7844 (description "The Apache Commons Compress library defines an API for
7845working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
7846Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
7847 (license license:asl2.0)))
7848
7849(define-public java-commons-compress-1.21
7850 (package
7851 (inherit java-commons-compress)
7852 (version "1.21")
7853 (source (origin
7854 (method url-fetch)
7855 (uri (string-append "mirror://apache/commons/compress/source/"
7856 "commons-compress-" version "-src.tar.gz"))
7857 (sha256
7858 (base32
7859 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
7860 (propagated-inputs
7861 (list java-asm-3
7862 java-brotli
7863 java-osgi-core
7864 java-xz
7865 java-zstd
7866 apache-commons-parent-pom-52))))
7867
7868(define-public java-commons-csv
7869 (package
7870 (name "java-commons-csv")
7871 (version "1.4")
7872 (source (origin
7873 (method url-fetch)
7874 (uri (string-append "mirror://apache/commons/csv/source/"
7875 "commons-csv-" version "-src.tar.gz"))
7876 (sha256
7877 (base32
7878 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
7879 (build-system ant-build-system)
7880 (arguments
7881 `(#:jar-name "commons-csv.jar"
7882 #:source-dir "src/main/java"
7883 #:tests? #f)); FIXME: requires java-h2
7884 (inputs
7885 `(("java-hamcrest-core" ,java-hamcrest-core)
7886 ("java-commons-io" ,java-commons-io)
7887 ("java-commons-lang3" ,java-commons-lang3)
7888 ("junit" ,java-junit)))
7889 (home-page "https://commons.apache.org/proper/commons-csv/")
7890 (synopsis "Read and write CSV documents")
7891 (description "Commons CSV reads and writes files in variations of the Comma
7892Separated Value (CSV) format. The most common CSV formats are predefined in the
7893CSVFormat class:
7894
7895@itemize
7896@item Microsoft Excel
7897@item Informix UNLOAD
7898@item Informix UNLOAD CSV
7899@item MySQL
7900@item RFC 4180
7901@item TDF
7902@end itemize
7903
7904Custom formats can be created using a fluent style API.")
7905 (license license:asl2.0)))
7906
7907(define-public java-jaxrs-api-2
7908 (package
7909 (name "java-jaxrs-api")
7910 (version "2.1.1")
7911 (source (origin
7912 (method git-fetch)
7913 (uri (git-reference
7914 (url "https://github.com/jakartaee/rest")
7915 (commit version)))
7916 (file-name (git-file-name name version))
7917 (sha256
7918 (base32
7919 "1sa490sag5r23hx84haddkbbyn4dlhav4m445k53y53jzs64cs4c"))))
7920 (build-system ant-build-system)
7921 (arguments
7922 (list
7923 #:tests? #f
7924 #:jdk openjdk9
7925 #:jar-name "javax.ws.rs-api.jar"
7926 #:source-dir "jaxrs-api/src/main/java"
7927 #:phases
7928 #~(modify-phases %standard-phases
7929 (add-before 'install 'create-pom
7930 (generate-pom.xml "pom.xml" "javax.ws.rs" "javax.ws.rs-api"
7931 #$version))
7932 (replace 'install (install-from-pom "pom.xml")))))
7933 (home-page "https://github.com/jax-rs")
7934 (synopsis "Java API for RESTful Web Services")
7935 (description "JAX-RS provides a standardized API for building RESTful
7936web services in Java.")
7937 (license license:cddl1.1)))
7938
7939(define-public java-osgi-annotation
7940 (package
7941 (name "java-osgi-annotation")
7942 (version "6.0.0")
7943 (source (origin
7944 (method url-fetch)
7945 (uri (string-append "https://repo1.maven.org/maven2/"
7946 "org/osgi/org.osgi.annotation/" version "/"
7947 "org.osgi.annotation-" version "-sources.jar"))
7948 (sha256
7949 (base32
7950 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
7951 (build-system ant-build-system)
7952 (arguments
7953 `(#:tests? #f ; no tests
7954 #:jar-name "osgi-annotation.jar"
7955 #:phases
7956 (modify-phases %standard-phases
7957 (add-before 'install 'create-pom
7958 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
7959 (replace 'install (install-from-pom "pom.xml")))))
7960 (home-page "https://www.osgi.org")
7961 (synopsis "Annotation module of OSGi framework")
7962 (description
7963 "OSGi, for Open Services Gateway initiative framework, is a module system
7964and service platform for the Java programming language. This package contains
7965the OSGi annotation module, providing additional services to help dynamic
7966components.")
7967 (license license:asl2.0)))
7968
7969(define-public java-osgi-annotation-8.1.0
7970 ;; Upstream tags the monorepo as 8.0.0.1, but osgi.annotation/bnd.bnd sets
7971 ;; the annotation artifact's release/minor version to 8.1, yielding 8.1.0.
7972 (let ((tag "8.0.0.1"))
7973 (package
7974 (name "java-osgi-annotation")
7975 (version "8.1.0")
7976 (source (origin
7977 (method git-fetch)
7978 (uri (git-reference
7979 (url "https://github.com/osgi/osgi")
7980 (commit tag)))
7981 (modules '((guix build utils)))
7982 (snippet
7983 '(begin
7984 (for-each delete-file
7985 (find-files "." "\\.jar$"))
7986 #t))
7987 (file-name (git-file-name name version))
7988 (sha256
7989 (base32
7990 "0s0ig6prnkvjp9159087mf16ihbqc91qlwdi1l0n5afhh2z5cnn5"))))
7991 (build-system ant-build-system)
7992 (arguments
7993 (list
7994 #:tests? #f
7995 #:jar-name "osgi-annotation.jar"
7996 #:phases
7997 #~(modify-phases %standard-phases
7998 (add-after 'unpack 'prepare-source-layout
7999 (lambda _
8000 (mkdir-p "src")
8001 (for-each
8002 (lambda (directory)
8003 (invoke "cp" "-r" (string-append directory "/.") "src/"))
8004 '("org.osgi.annotation.bundle/src"
8005 "org.osgi.annotation.versioning/src"))))
8006 (add-before 'install 'create-pom
8007 (generate-pom.xml "pom.xml" "org.osgi" "osgi.annotation"
8008 #$version))
8009 (replace 'install (install-from-pom "pom.xml")))))
8010 (home-page "https://www.osgi.org")
8011 (synopsis "Annotations for use in compiling OSGi bundles")
8012 (description "OSGi, for Open Services Gateway initiative framework, is a
8013module system and service platform for the Java programming language. This
8014package contains the annotation classes used at compile time.")
8015 (license license:asl2.0))))
8016
8017(define-public java-osgi-core
8018 (package
8019 (name "java-osgi-core")
8020 (version "6.0.0")
8021 (source (origin
8022 (method url-fetch)
8023 (uri (string-append "https://repo1.maven.org/maven2/"
8024 "org/osgi/org.osgi.core/" version "/"
8025 "org.osgi.core-" version "-sources.jar"))
8026 (sha256
8027 (base32
8028 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
8029 (build-system ant-build-system)
8030 (arguments
8031 `(#:tests? #f ; no tests
8032 #:jar-name "osgi-core.jar"
8033 #:phases
8034 (modify-phases %standard-phases
8035 (add-before 'install 'create-pom
8036 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
8037 (replace 'install (install-from-pom "pom.xml")))))
8038 (inputs
8039 (list java-osgi-annotation))
8040 (home-page "https://www.osgi.org")
8041 (synopsis "Core module of OSGi framework")
8042 (description
8043 "OSGi, for Open Services Gateway initiative framework, is a module system
8044and service platform for the Java programming language. This package contains
8045the OSGi Core module.")
8046 (license license:asl2.0)))
8047
8048(define-public java-osgi-core-8.0.0
8049 ;; Upstream uses release-train tags for the monorepo; osgi.core/bnd.bnd
8050 ;; emits artifact version 8.0.0 from the r8-core-final checkout.
8051 (let ((tag "r8-core-final"))
8052 (package
8053 (name "java-osgi-core")
8054 (version "8.0.0")
8055 (source (origin
8056 (method git-fetch)
8057 (uri (git-reference
8058 (url "https://github.com/osgi/osgi")
8059 (commit tag)))
8060 (modules '((guix build utils)))
8061 (snippet
8062 '(begin
8063 (for-each delete-file
8064 (find-files "." "\\.jar$"))
8065 #t))
8066 (file-name (git-file-name name version))
8067 (sha256
8068 (base32
8069 "01z4c3jakzjdh4m0j71shppa1nfgaqgxwajnhyv56s1l1a9hxb6x"))))
8070 (build-system ant-build-system)
8071 (arguments
8072 (list
8073 #:tests? #f
8074 #:jar-name "osgi-core.jar"
8075 #:phases
8076 #~(modify-phases %standard-phases
8077 (add-after 'unpack 'prepare-source-layout
8078 (lambda _
8079 (mkdir-p "src")
8080 (for-each
8081 (lambda (directory)
8082 (invoke "cp" "-r" (string-append directory "/.") "src/"))
8083 '("org.osgi.dto/src"
8084 "org.osgi.framework/src"
8085 "org.osgi.resource/src"
8086 "org.osgi.service.condition/src"
8087 "org.osgi.service.condpermadmin/src"
8088 "org.osgi.service.log/src"
8089 "org.osgi.service.packageadmin/src"
8090 "org.osgi.service.permissionadmin/src"
8091 "org.osgi.service.resolver/src"
8092 "org.osgi.service.startlevel/src"
8093 "org.osgi.service.url/src"
8094 "org.osgi.util.tracker/src"))))
8095 (add-before 'install 'create-pom
8096 (generate-pom.xml "pom.xml" "org.osgi" "osgi.core" #$version))
8097 (replace 'install (install-from-pom "pom.xml")))))
8098 (inputs (list java-osgi-annotation-8.1.0))
8099 (home-page "https://www.osgi.org")
8100 (synopsis "Core module of OSGi framework")
8101 (description "OSGi, for Open Services Gateway initiative framework, is a
8102module system and service platform for the Java programming language. This
8103package contains the OSGi Core module.")
8104 (license license:asl2.0))))
8105
8106(define-public java-osgi-service-event
8107 (package
8108 (name "java-osgi-service-event")
8109 (version "1.3.1")
8110 (source (origin
8111 (method url-fetch)
8112 (uri (string-append "https://repo1.maven.org/maven2/"
8113 "org/osgi/org.osgi.service.event/"
8114 version "/org.osgi.service.event-"
8115 version "-sources.jar"))
8116 (sha256
8117 (base32
8118 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
8119 (build-system ant-build-system)
8120 (arguments
8121 `(#:tests? #f ; no tests
8122 #:jar-name "osgi-service-event.jar"))
8123 (inputs
8124 (list java-osgi-annotation java-osgi-core))
8125 (home-page "https://www.osgi.org")
8126 (synopsis "OSGi service event module")
8127 (description
8128 "OSGi, for Open Services Gateway initiative framework, is a module system
8129and service platform for the Java programming language. This package contains
8130the OSGi @code{org.osgi.service.event} module.")
8131 (license license:asl2.0)))
8132
8133(define-public java-eclipse-osgi
8134 (package
8135 (name "java-eclipse-osgi")
8136 (version "3.11.3")
8137 (source (origin
8138 (method url-fetch)
8139 (uri (string-append "https://repo1.maven.org/maven2/"
8140 "org/eclipse/platform/org.eclipse.osgi/"
8141 version "/org.eclipse.osgi-"
8142 version "-sources.jar"))
8143 (sha256
8144 (base32
8145 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
8146 (build-system ant-build-system)
8147 (arguments
8148 `(#:tests? #f ; no tests included
8149 #:jar-name "eclipse-equinox-osgi.jar"))
8150 (inputs
8151 (list java-osgi-annotation))
8152 (home-page "https://www.eclipse.org/equinox/")
8153 (synopsis "Eclipse Equinox OSGi framework")
8154 (description "This package provides an implementation of the OSGi Core
8155specification.")
8156 (license license:epl1.0)))
8157
8158(define-public java-eclipse-equinox-common
8159 (package
8160 (name "java-eclipse-equinox-common")
8161 (version "3.10.200")
8162 (source (origin
8163 (method url-fetch)
8164 (uri (string-append "https://repo1.maven.org/maven2/"
8165 "org/eclipse/platform/org.eclipse.equinox.common/"
8166 version "/org.eclipse.equinox.common-"
8167 version "-sources.jar"))
8168 (sha256
8169 (base32
8170 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
8171 (build-system ant-build-system)
8172 (arguments
8173 `(#:tests? #f ; no tests included
8174 #:jar-name "eclipse-equinox-common.jar"))
8175 (inputs
8176 (list java-eclipse-osgi))
8177 (home-page "https://www.eclipse.org/equinox/")
8178 (synopsis "Common Eclipse runtime")
8179 (description "This package provides the common Eclipse runtime.")
8180 (license license:epl1.0)))
8181
8182(define-public java-eclipse-core-jobs
8183 (package
8184 (name "java-eclipse-core-jobs")
8185 (version "3.8.0")
8186 (source (origin
8187 (method url-fetch)
8188 (uri (string-append "https://repo1.maven.org/maven2/"
8189 "org/eclipse/platform/org.eclipse.core.jobs/"
8190 version "/org.eclipse.core.jobs-"
8191 version "-sources.jar"))
8192 (sha256
8193 (base32
8194 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
8195 (build-system ant-build-system)
8196 (arguments
8197 `(#:tests? #f ; no tests included
8198 #:jar-name "eclipse-core-jobs.jar"))
8199 (inputs
8200 (list java-eclipse-equinox-common java-eclipse-osgi))
8201 (home-page "https://www.eclipse.org/equinox/")
8202 (synopsis "Eclipse jobs mechanism")
8203 (description "This package provides the Eclipse jobs mechanism.")
8204 (license license:epl1.0)))
8205
8206(define-public java-eclipse-equinox-registry
8207 (package
8208 (name "java-eclipse-equinox-registry")
8209 (version "3.6.100")
8210 (source (origin
8211 (method url-fetch)
8212 (uri (string-append "https://repo1.maven.org/maven2/"
8213 "org/eclipse/platform/org.eclipse.equinox.registry/"
8214 version "/org.eclipse.equinox.registry-"
8215 version "-sources.jar"))
8216 (sha256
8217 (base32
8218 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
8219 (build-system ant-build-system)
8220 (arguments
8221 `(#:tests? #f ; no tests included
8222 #:jar-name "eclipse-equinox-registry.jar"))
8223 (inputs
8224 (list java-eclipse-core-jobs java-eclipse-equinox-common
8225 java-eclipse-osgi))
8226 (home-page "https://www.eclipse.org/equinox/")
8227 (synopsis "Eclipse extension registry support")
8228 (description "This package provides support for the Eclipse extension
8229registry.")
8230 (license license:epl1.0)))
8231
8232(define-public java-eclipse-equinox-app
8233 (package
8234 (name "java-eclipse-equinox-app")
8235 (version "1.3.400")
8236 (source (origin
8237 (method url-fetch)
8238 (uri (string-append "https://repo1.maven.org/maven2/"
8239 "org/eclipse/platform/org.eclipse.equinox.app/"
8240 version "/org.eclipse.equinox.app-"
8241 version "-sources.jar"))
8242 (sha256
8243 (base32
8244 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
8245 (build-system ant-build-system)
8246 (arguments
8247 `(#:tests? #f ; no tests included
8248 #:jar-name "eclipse-equinox-app.jar"))
8249 (inputs
8250 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8251 java-eclipse-osgi java-osgi-service-event))
8252 (home-page "https://www.eclipse.org/equinox/")
8253 (synopsis "Equinox application container")
8254 (description "This package provides the Equinox application container for
8255Eclipse.")
8256 (license license:epl1.0)))
8257
8258(define-public java-eclipse-equinox-preferences
8259 (package
8260 (name "java-eclipse-equinox-preferences")
8261 (version "3.6.1")
8262 (source (origin
8263 (method url-fetch)
8264 (uri (string-append "https://repo1.maven.org/maven2/"
8265 "org/eclipse/platform/org.eclipse.equinox.preferences/"
8266 version "/org.eclipse.equinox.preferences-"
8267 version "-sources.jar"))
8268 (sha256
8269 (base32
8270 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
8271 (build-system ant-build-system)
8272 (arguments
8273 `(#:tests? #f ; no tests included
8274 #:jar-name "eclipse-equinox-preferences.jar"))
8275 (inputs
8276 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8277 java-eclipse-osgi))
8278 (home-page "https://www.eclipse.org/equinox/")
8279 (synopsis "Eclipse preferences mechanism")
8280 (description "This package provides the Eclipse preferences mechanism with
8281the module @code{org.eclipse.equinox.preferences}.")
8282 (license license:epl1.0)))
8283
8284(define-public java-eclipse-core-contenttype
8285 (package
8286 (name "java-eclipse-core-contenttype")
8287 (version "3.5.100")
8288 (source (origin
8289 (method url-fetch)
8290 (uri (string-append "https://repo1.maven.org/maven2/"
8291 "org/eclipse/platform/org.eclipse.core.contenttype/"
8292 version "/org.eclipse.core.contenttype-"
8293 version "-sources.jar"))
8294 (sha256
8295 (base32
8296 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
8297 (build-system ant-build-system)
8298 (arguments
8299 `(#:tests? #f ; no tests included
8300 #:jar-name "eclipse-core-contenttype.jar"))
8301 (inputs
8302 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
8303 java-eclipse-equinox-registry java-eclipse-osgi))
8304 (home-page "https://www.eclipse.org/")
8305 (synopsis "Eclipse content mechanism")
8306 (description "This package provides the Eclipse content mechanism in the
8307@code{org.eclipse.core.contenttype} module.")
8308 (license license:epl1.0)))
8309
8310(define-public java-eclipse-core-runtime
8311 (package
8312 (name "java-eclipse-core-runtime")
8313 (version "3.15.100")
8314 (source (origin
8315 (method url-fetch)
8316 (uri (string-append "https://repo1.maven.org/maven2/"
8317 "org/eclipse/platform/org.eclipse.core.runtime/"
8318 version "/org.eclipse.core.runtime-"
8319 version "-sources.jar"))
8320 (sha256
8321 (base32
8322 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
8323 (build-system ant-build-system)
8324 (arguments
8325 `(#:tests? #f ; no tests included
8326 #:jar-name "eclipse-core-runtime.jar"))
8327 (inputs
8328 (list java-eclipse-core-contenttype
8329 java-eclipse-core-jobs
8330 java-eclipse-equinox-app
8331 java-eclipse-equinox-common
8332 java-eclipse-equinox-registry
8333 java-eclipse-equinox-preferences
8334 java-eclipse-osgi))
8335 (home-page "https://www.eclipse.org/")
8336 (synopsis "Eclipse core runtime")
8337 (description "This package provides the Eclipse core runtime with the
8338module @code{org.eclipse.core.runtime}.")
8339 (license license:epl1.0)))
8340
8341(define-public java-eclipse-core-filesystem
8342 (package
8343 (name "java-eclipse-core-filesystem")
8344 (version "1.6.1")
8345 (source (origin
8346 (method url-fetch)
8347 (uri (string-append "https://repo1.maven.org/maven2/"
8348 "org/eclipse/platform/org.eclipse.core.filesystem/"
8349 version "/org.eclipse.core.filesystem-"
8350 version "-sources.jar"))
8351 (sha256
8352 (base32
8353 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
8354 (build-system ant-build-system)
8355 (arguments
8356 `(#:tests? #f ; no tests included
8357 #:jar-name "eclipse-core-filesystem.jar"))
8358 (inputs
8359 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8360 java-eclipse-osgi))
8361 (home-page "https://www.eclipse.org/")
8362 (synopsis "Eclipse core file system")
8363 (description "This package provides the Eclipse core file system with the
8364module @code{org.eclipse.core.filesystem}.")
8365 (license license:epl1.0)))
8366
8367(define-public java-eclipse-core-expressions
8368 (package
8369 (name "java-eclipse-core-expressions")
8370 (version "3.5.100")
8371 (source (origin
8372 (method url-fetch)
8373 (uri (string-append "https://repo1.maven.org/maven2/"
8374 "org/eclipse/platform/org.eclipse.core.expressions/"
8375 version "/org.eclipse.core.expressions-"
8376 version "-sources.jar"))
8377 (sha256
8378 (base32
8379 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
8380 (build-system ant-build-system)
8381 (arguments
8382 `(#:tests? #f ; no tests included
8383 #:jar-name "eclipse-core-expressions.jar"))
8384 (inputs
8385 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8386 java-eclipse-equinox-preferences java-eclipse-core-runtime
8387 java-eclipse-osgi))
8388 (home-page "https://www.eclipse.org/")
8389 (synopsis "Eclipse core expression language")
8390 (description "This package provides the Eclipse core expression language
8391with the @code{org.eclipse.core.expressions} module.")
8392 (license license:epl1.0)))
8393
8394(define-public java-eclipse-core-variables
8395 (package
8396 (name "java-eclipse-core-variables")
8397 (version "3.3.0")
8398 (source (origin
8399 (method url-fetch)
8400 (uri (string-append "https://repo1.maven.org/maven2/"
8401 "org/eclipse/platform/org.eclipse.core.variables/"
8402 version "/org.eclipse.core.variables-"
8403 version "-sources.jar"))
8404 (sha256
8405 (base32
8406 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
8407 (build-system ant-build-system)
8408 (arguments
8409 `(#:tests? #f ; no tests included
8410 #:jar-name "eclipse-core-variables.jar"))
8411 (inputs
8412 (list java-eclipse-equinox-common java-eclipse-equinox-registry
8413 java-eclipse-equinox-preferences java-eclipse-core-runtime
8414 java-eclipse-osgi))
8415 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8416 (synopsis "Eclipse core variables")
8417 (description "This package provides the Eclipse core variables module
8418@code{org.eclipse.core.variables}.")
8419 (license license:epl1.0)))
8420
8421(define-public java-eclipse-ant-core
8422 (package
8423 (name "java-eclipse-ant-core")
8424 (version "3.4.100")
8425 (source (origin
8426 (method url-fetch)
8427 (uri (string-append "https://repo1.maven.org/maven2/"
8428 "org/eclipse/platform/org.eclipse.ant.core/"
8429 version "/org.eclipse.ant.core-"
8430 version "-sources.jar"))
8431 (sha256
8432 (base32
8433 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
8434 (build-system ant-build-system)
8435 (arguments
8436 `(#:tests? #f ; no tests included
8437 #:jar-name "eclipse-ant-core.jar"))
8438 (inputs
8439 (list java-eclipse-equinox-app
8440 java-eclipse-equinox-common
8441 java-eclipse-equinox-registry
8442 java-eclipse-equinox-preferences
8443 java-eclipse-core-contenttype
8444 java-eclipse-core-runtime
8445 java-eclipse-core-variables
8446 java-eclipse-osgi))
8447 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8448 (synopsis "Ant build tool core libraries")
8449 (description "This package provides the ant build tool core libraries with
8450the module @code{org.eclipse.ant.core}.")
8451 (license license:epl1.0)))
8452
8453(define-public java-eclipse-core-resources
8454 (package
8455 (name "java-eclipse-core-resources")
8456 (version "3.13.200")
8457 (source (origin
8458 (method url-fetch)
8459 (uri (string-append "https://repo1.maven.org/maven2/"
8460 "org/eclipse/platform/org.eclipse.core.resources/"
8461 version "/org.eclipse.core.resources-"
8462 version "-sources.jar"))
8463 (sha256
8464 (base32
8465 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
8466 (build-system ant-build-system)
8467 (arguments
8468 `(#:tests? #f ; no tests included
8469 #:jar-name "eclipse-core-resources.jar"))
8470 (inputs
8471 (list java-eclipse-equinox-common
8472 java-eclipse-equinox-preferences
8473 java-eclipse-equinox-registry
8474 java-eclipse-core-contenttype
8475 java-eclipse-core-expressions
8476 java-eclipse-core-filesystem
8477 java-eclipse-core-jobs
8478 java-eclipse-core-runtime
8479 java-eclipse-ant-core
8480 java-eclipse-osgi))
8481 (home-page "https://www.eclipse.org/")
8482 (synopsis "Eclipse core resource management")
8483 (description "This package provides the Eclipse core resource management
8484module @code{org.eclipse.core.resources}.")
8485 (license license:epl1.0)))
8486
8487(define-public java-eclipse-compare-core
8488 (package
8489 (name "java-eclipse-compare-core")
8490 (version "3.6.0")
8491 (source (origin
8492 (method url-fetch)
8493 (uri (string-append "https://repo1.maven.org/maven2/"
8494 "org/eclipse/platform/org.eclipse.compare.core/"
8495 version "/org.eclipse.compare.core-"
8496 version "-sources.jar"))
8497 (sha256
8498 (base32
8499 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
8500 (build-system ant-build-system)
8501 (arguments
8502 `(#:tests? #f ; no tests included
8503 #:jar-name "eclipse-compare-core.jar"))
8504 (inputs
8505 (list java-eclipse-core-runtime java-eclipse-equinox-common
8506 java-eclipse-osgi java-icu4j))
8507 (home-page "https://www.eclipse.org/")
8508 (synopsis "Eclipse core compare support")
8509 (description "This package provides the Eclipse core compare support
8510module @code{org.eclipse.compare.core}.")
8511 (license license:epl1.0)))
8512
8513(define-public java-eclipse-team-core
8514 (package
8515 (name "java-eclipse-team-core")
8516 (version "3.8.0")
8517 (source (origin
8518 (method url-fetch)
8519 (uri (string-append "https://repo1.maven.org/maven2/"
8520 "org/eclipse/platform/org.eclipse.team.core/"
8521 version "/org.eclipse.team.core-"
8522 version "-sources.jar"))
8523 (sha256
8524 (base32
8525 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
8526 (build-system ant-build-system)
8527 (arguments
8528 `(#:tests? #f ; no tests included
8529 #:jar-name "eclipse-team-core.jar"))
8530 (inputs
8531 (list java-eclipse-compare-core
8532 java-eclipse-core-contenttype
8533 java-eclipse-core-filesystem
8534 java-eclipse-core-jobs
8535 java-eclipse-core-resources
8536 java-eclipse-core-runtime
8537 java-eclipse-equinox-common
8538 java-eclipse-equinox-registry
8539 java-eclipse-equinox-preferences
8540 java-eclipse-osgi))
8541 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8542 (synopsis "Eclipse team support core")
8543 (description "This package provides the Eclipse team support core module
8544@code{org.eclipse.team.core}.")
8545 (license license:epl1.0)))
8546
8547(define-public java-eclipse-core-commands
8548 (package
8549 (name "java-eclipse-core-commands")
8550 (version "3.8.1")
8551 (source (origin
8552 (method url-fetch)
8553 (uri (string-append "https://repo1.maven.org/maven2/"
8554 "org/eclipse/platform/org.eclipse.core.commands/"
8555 version "/org.eclipse.core.commands-"
8556 version "-sources.jar"))
8557 (sha256
8558 (base32
8559 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
8560 (build-system ant-build-system)
8561 (arguments
8562 `(#:tests? #f ; no tests included
8563 #:jar-name "eclipse-core-commands.jar"))
8564 (inputs
8565 (list java-eclipse-equinox-common))
8566 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8567 (synopsis "Eclipse core commands")
8568 (description "This package provides Eclipse core commands in the module
8569@code{org.eclipse.core.commands}.")
8570 (license license:epl1.0)))
8571
8572(define-public java-eclipse-text
8573 (package
8574 (name "java-eclipse-text")
8575 (version "3.6.0")
8576 (source (origin
8577 (method url-fetch)
8578 (uri (string-append "https://repo1.maven.org/maven2/"
8579 "org/eclipse/platform/org.eclipse.text/"
8580 version "/org.eclipse.text-"
8581 version "-sources.jar"))
8582 (sha256
8583 (base32
8584 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
8585 (build-system ant-build-system)
8586 (arguments
8587 `(#:tests? #f ; no tests included
8588 #:jar-name "eclipse-text.jar"
8589 #:phases
8590 (modify-phases %standard-phases
8591 ;; When creating a new category we must make sure that the new list
8592 ;; matches List<Position>. By default it seems to be too generic
8593 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
8594 ;; Without this we get this error:
8595 ;;
8596 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
8597 ;; error: method put in interface Map<K,V> cannot be applied to given types;
8598 ;; [javac] fPositions.put(category, new ArrayList<>());
8599 ;; [javac] ^
8600 ;; [javac] required: String,List<Position>
8601 ;; [javac] found: String,ArrayList<Object>
8602 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
8603 ;; to List<Position> by method invocation conversion
8604 ;; [javac] where K,V are type-variables:
8605 ;; [javac] K extends Object declared in interface Map
8606 ;; [javac] V extends Object declared in interface Map
8607 ;;
8608 ;; I don't know if this is a good fix. I suspect it is not, but it
8609 ;; seems to work.
8610 (add-after 'unpack 'fix-compilation-error
8611 (lambda _
8612 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
8613 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
8614 "Positions.put(category, new ArrayList<Position>());"))
8615 #t)))))
8616 (inputs
8617 (list java-eclipse-equinox-common java-eclipse-core-commands
8618 java-icu4j))
8619 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
8620 (synopsis "Eclipse text library")
8621 (description "Platform Text is part of the Platform UI project and
8622provides the basic building blocks for text and text editors within Eclipse
8623and contributes the Eclipse default text editor.")
8624 (license license:epl1.0)))
8625
8626(define-public java-eclipse-jdt-core
8627 (package
8628 (name "java-eclipse-jdt-core")
8629 (version "3.16.0")
8630 (source (origin
8631 (method url-fetch)
8632 (uri (string-append "https://repo1.maven.org/maven2/"
8633 "org/eclipse/jdt/org.eclipse.jdt.core/"
8634 version "/org.eclipse.jdt.core-"
8635 version "-sources.jar"))
8636 (sha256
8637 (base32
8638 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
8639 (build-system ant-build-system)
8640 (arguments
8641 `(#:tests? #f ; no tests included
8642 #:jar-name "eclipse-jdt-core.jar"
8643 #:phases
8644 (modify-phases %standard-phases
8645 (add-after 'unpack 'move-sources
8646 (lambda _
8647 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
8648 (for-each (lambda (file)
8649 (install-file file (string-append "../" (dirname file))))
8650 (find-files "." ".*")))
8651 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
8652 #t))
8653 (add-before 'build 'copy-resources
8654 (lambda _
8655 (with-directory-excursion "src"
8656 (for-each (lambda (file)
8657 (install-file file (string-append "../build/classes/" (dirname file))))
8658 (find-files "." ".*.(props|properties|rsc)")))
8659 #t)))))
8660 (inputs
8661 (list java-eclipse-core-contenttype
8662 java-eclipse-core-filesystem
8663 java-eclipse-core-jobs
8664 java-eclipse-core-resources
8665 java-eclipse-core-runtime
8666 java-eclipse-equinox-app
8667 java-eclipse-equinox-common
8668 java-eclipse-equinox-preferences
8669 java-eclipse-equinox-registry
8670 java-eclipse-osgi
8671 java-eclipse-text))
8672 (home-page "https://www.eclipse.org/jdt")
8673 (synopsis "Java development tools core libraries")
8674 (description "This package provides the core libraries of the Eclipse Java
8675development tools.")
8676 (license license:epl1.0)))
8677
8678(define-public java-eclipse-jdt-compiler-apt
8679 (package
8680 (name "java-eclipse-jdt-compiler-apt")
8681 (version "1.3.400")
8682 (source (origin
8683 (method url-fetch)
8684 (uri (string-append "https://repo1.maven.org/maven2/"
8685 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
8686 version "/org.eclipse.jdt.compiler.apt-"
8687 version "-sources.jar"))
8688 (sha256
8689 (base32
8690 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
8691 (build-system ant-build-system)
8692 (arguments
8693 `(#:tests? #f ; no tests included
8694 #:jar-name "eclipse-jdt-compiler-apt.jar"
8695 #:jdk ,openjdk11))
8696 (inputs
8697 (list java-eclipse-jdt-core))
8698 (home-page "https://www.eclipse.org/jdt/apt/")
8699 (synopsis "Annotation processing tool")
8700 (description "APT stands for Annotation Processing Tool. APT provides a
8701means for generating files and compiling new Java classes based on annotations
8702found in your source code.")
8703 (license license:epl2.0)))
8704
8705(define-public java-eclipse-lsp4j-common
8706 (package
8707 (name "java-eclipse-lsp4j-common")
8708 (version "0.10.0")
8709 (source (origin
8710 (method git-fetch)
8711 (uri (git-reference
8712 (url "https://github.com/eclipse/lsp4j")
8713 (commit (string-append "v" version))))
8714 (file-name (git-file-name name version))
8715 (sha256
8716 (base32
8717 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
8718 (build-system ant-build-system)
8719 (home-page "https://eclipse.org/lsp4j/")
8720 (synopsis "LSP4J common package")
8721 (description "Eclipse LSP4J provides Java bindings for the Language
8722Server Protocol and the Debug Adapter Protocol. This package is a common
8723definition intended to be inherited by other packages.")
8724 (license license:epl2.0)))
8725
8726(define-public java-eclipse-lsp4j-debug
8727 (package
8728 (inherit java-eclipse-lsp4j-common)
8729 (name "java-eclipse-lsp4j-debug")
8730 (arguments
8731 `(#:jar-name "eclipse-lsp4j-debug.jar"
8732 #:jdk ,openjdk11
8733 #:tests? #f; tests fail with reflection errors
8734 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
8735 #:test-dir "org.eclipse.lsp4j.debug/src/test"
8736 #:phases
8737 (modify-phases %standard-phases
8738 (add-before 'build 'copy-xtend
8739 (lambda _
8740 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
8741 "org.eclipse.lsp4j.debug/src/main/java"))))))
8742 (native-inputs
8743 (list java-junit))
8744 (inputs
8745 `(("java-gson" ,java-gson-latest)
8746 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
8747 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
8748 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
8749 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
8750 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
8751 (description "Eclipse LSP4J provides Java bindings for the Language
8752Server Protocol and the Debug Adapter Protocol. This package contains its
8753LSP4J Java bindings for the Debug Server Protocol.")))
8754
8755(define-public java-eclipse-lsp4j-generator
8756 (package
8757 (inherit java-eclipse-lsp4j-common)
8758 (name "java-eclipse-lsp4j-generator")
8759 (arguments
8760 `(#:jar-name "eclipse-lsp4j-generator.jar"
8761 #:jdk ,openjdk11
8762 #:tests? #f; no tests
8763 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
8764 (inputs
8765 (list java-eclipse-lsp4j-jsonrpc))
8766 (synopsis "Eclipse LSP4J Generator")
8767 (description "Eclipse LSP4J provides Java bindings for the Language
8768Server Protocol and the Debug Adapter Protocol. This package contains its
8769LSP4J code generator for Language Server Protocol classes.")))
8770
8771(define-public java-eclipse-lsp4j-jsonrpc
8772 (package
8773 (inherit java-eclipse-lsp4j-common)
8774 (name "java-eclipse-lsp4j-jsonrpc")
8775 (arguments
8776 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
8777 #:jdk ,openjdk11
8778 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
8779 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"
8780 #:phases
8781 (modify-phases %standard-phases
8782 (add-after 'unpack 'delete-failing-tests
8783 ;; The testMalformedJson* tests expect the exact error messages
8784 ;; of an older gson. Removing IntegrationTest.java also drops
8785 ;; the other tests it contains.
8786 (lambda _
8787 (delete-file
8788 (string-append
8789 "org.eclipse.lsp4j.jsonrpc/src/test/java/org/"
8790 "eclipse/lsp4j/jsonrpc/test/IntegrationTest.java")))))))
8791 (native-inputs
8792 (list java-junit))
8793 (inputs
8794 (list java-gson-latest))
8795 (synopsis "Java JSON-RPC implementation")
8796 (description "Eclipse LSP4J provides Java bindings for the Language
8797Server Protocol and the Debug Adapter Protocol. This package contains its
8798JSON-RPC implementation.")))
8799
8800(define-public java-eclipse-lsp4j-jsonrpc-debug
8801 (package
8802 (inherit java-eclipse-lsp4j-common)
8803 (name "java-eclipse-lsp4j-jsonrpc-debug")
8804 (arguments
8805 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
8806 #:jdk ,openjdk11
8807 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
8808 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
8809 (native-inputs
8810 (list java-junit))
8811 (inputs
8812 (list java-eclipse-lsp4j-jsonrpc java-gson-latest))
8813 (synopsis "Java JSON-RPC implementation (debug protocol)")
8814 (description "Eclipse LSP4J provides Java bindings for the Language
8815Server Protocol and the Debug Adapter Protocol. This package contains its
8816JSON-RPC implementation's debug protocol.")))
8817
8818(define-public java-eclipse-xtext-xbase-lib
8819 (package
8820 (name "java-eclipse-xtext-xbase-lib")
8821 (version "2.25.0")
8822 (source (origin
8823 (method git-fetch)
8824 (uri (git-reference
8825 (url "https://github.com/eclipse/xtext-lib")
8826 (commit (string-append "v" version))))
8827 (file-name (git-file-name name version))
8828 (sha256
8829 (base32
8830 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
8831 (build-system ant-build-system)
8832 (arguments
8833 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
8834 #:jdk ,openjdk11
8835 #:tests? #f; TODO (maybe needs newer guava version?)
8836 #:source-dir "org.eclipse.xtext.xbase.lib/src"
8837 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
8838 (native-inputs
8839 (list java-junit))
8840 (inputs
8841 (list java-guava))
8842 (home-page "https://www.eclipse.org/Xtext/")
8843 (synopsis "Eclipse Xbase Runtime Library")
8844 (description "This package contains runtime libraries for Xbase languages
8845such as Xtend.")
8846 (license license:epl2.0)))
8847
8848(define-public java-javax-mail
8849 (package
8850 (name "java-javax-mail")
8851 (version "1.6.2")
8852 (source (origin
8853 (method url-fetch)
8854 (uri (string-append "https://repo1.maven.org/maven2/"
8855 "com/sun/mail/javax.mail/"
8856 version "/javax.mail-"
8857 version "-sources.jar"))
8858 (sha256
8859 (base32
8860 "15cryjf398x7sy42j5gzlj5cmc2nx05b175b4gclwxj6qg5ly0li"))))
8861 (build-system ant-build-system)
8862 (arguments
8863 `(#:tests? #f ; no tests
8864 #:jar-name "javax-mail.jar"))
8865 (home-page "https://javamail.java.net")
8866 (synopsis "Reference implementation of the JavaMail API")
8867 (description
8868 "This package provides versions of the JavaMail API implementation, IMAP,
8869SMTP, and POP3 service providers, some examples, and documentation for the
8870JavaMail API.")
8871 ;; GPLv2 only with "classpath exception".
8872 (license license:gpl2)))
8873
8874(define-public java-log4j-api
8875 (package
8876 (name "java-log4j-api")
8877 (version "2.17.1")
8878 (source (origin
8879 (method url-fetch)
8880 (uri (string-append "mirror://apache/logging/log4j/" version
8881 "/apache-log4j-" version "-src.tar.gz"))
8882 (sha256
8883 (base32
8884 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
8885 (build-system ant-build-system)
8886 (arguments
8887 `(#:tests? #f ; tests require unpackaged software
8888 #:jar-name "log4j-api.jar"
8889 #:make-flags
8890 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
8891 #:phases
8892 (modify-phases %standard-phases
8893 (add-after 'unpack 'enter-dir
8894 (lambda _ (chdir "log4j-api") #t))
8895 ;; FIXME: The tests require additional software that has not been
8896 ;; packaged yet, such as
8897 ;; * org.apache.maven
8898 ;; * org.apache.felix
8899 (add-after 'enter-dir 'delete-tests
8900 (lambda _ (delete-file-recursively "src/test") #t)))))
8901 (inputs
8902 (list java-osgi-core java-hamcrest-core java-junit))
8903 (properties '((cpe-name . "log4j")))
8904 (home-page "https://logging.apache.org/log4j/2.x/")
8905 (synopsis "API module of the Log4j logging framework for Java")
8906 (description
8907 "This package provides the API module of the Log4j logging framework for
8908Java.")
8909 (license license:asl2.0)))
8910
8911(define-public java-log4j-core
8912 (package
8913 (inherit java-log4j-api)
8914 (name "java-log4j-core")
8915 (inputs
8916 `(("java-osgi-core" ,java-osgi-core)
8917 ("java-hamcrest-core" ,java-hamcrest-core)
8918 ("java-log4j-api" ,java-log4j-api)
8919 ("java-mail" ,java-mail)
8920 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
8921 ("java-conversant-disruptor" ,java-conversant-disruptor)
8922 ("java-lmax-disruptor" ,java-lmax-disruptor)
8923 ("java-jctools-core" ,java-jctools-core-1)
8924 ("java-stax2-api" ,java-stax2-api)
8925 ("java-jansi" ,java-jansi)
8926 ("java-kafka" ,java-kafka-clients)
8927 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
8928 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
8929 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
8930 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
8931 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
8932 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
8933 ("java-commons-compress" ,java-commons-compress)
8934 ("java-commons-csv" ,java-commons-csv)
8935 ("java-jeromq" ,java-jeromq)
8936 ("java-junit" ,java-junit)))
8937 (native-inputs
8938 `(("hamcrest" ,java-hamcrest-all)
8939 ("java-commons-io" ,java-commons-io)
8940 ("java-commons-lang3" ,java-commons-lang3)
8941 ("slf4j" ,java-slf4j-api)))
8942 (arguments
8943 `(#:tests? #f ; tests require more dependencies
8944 #:test-dir "src/test"
8945 #:source-dir "src/main/java"
8946 #:jar-name "log4j-core.jar"
8947 #:jdk ,icedtea-8
8948 #:make-flags
8949 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
8950 #:phases
8951 (modify-phases %standard-phases
8952 (add-after 'unpack 'enter-dir
8953 (lambda _ (chdir "log4j-core") #t)))))
8954 (synopsis "Core component of the Log4j framework")
8955 (description "This package provides the core component of the Log4j
8956logging framework for Java.")))
8957
8958(define-public java-log4j-1.2-api
8959 (package
8960 (inherit java-log4j-api)
8961 (name "java-log4j-1.2-api")
8962 (arguments
8963 `(#:jar-name "java-log4j-1.2-api.jar"
8964 #:source-dir "log4j-1.2-api/src/main/java"
8965 #:jdk ,icedtea-8
8966 ;; Tests require maven-model (and other maven subprojects), which is a
8967 ;; cyclic dependency.
8968 #:tests? #f))
8969 (inputs
8970 `(("log4j-api" ,java-log4j-api)
8971 ("log4j-core" ,java-log4j-core)
8972 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
8973 ("osgi-core" ,java-osgi-core)
8974 ("eclipse-osgi" ,java-eclipse-osgi)
8975 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
8976
8977(define-public java-commons-cli
8978 (package
8979 (name "java-commons-cli")
8980 (version "1.4")
8981 (source (origin
8982 (method url-fetch)
8983 (uri (string-append "mirror://apache/commons/cli/source/"
8984 "commons-cli-" version "-src.tar.gz"))
8985 (sha256
8986 (base32
8987 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
8988 (build-system ant-build-system)
8989 ;; TODO: javadoc
8990 (arguments
8991 `(#:jar-name "commons-cli.jar"
8992 #:phases
8993 (modify-phases %standard-phases
8994 (replace 'install
8995 (install-from-pom "pom.xml")))))
8996 (native-inputs
8997 (list java-junit java-hamcrest-core))
8998 (home-page "https://commons.apache.org/cli/")
8999 (synopsis "Command line arguments and options parsing library")
9000 (description "The Apache Commons CLI library provides an API for parsing
9001command line options passed to programs. It is also able to print help
9002messages detailing the options available for a command line tool.
9003
9004Commons CLI supports different types of options:
9005
9006@itemize
9007@item POSIX like options (ie. tar -zxvf foo.tar.gz)
9008@item GNU like long options (ie. du --human-readable --max-depth=1)
9009@item Java like properties (ie. java -Djava.awt.headless=true Foo)
9010@item Short options with value attached (ie. gcc -O2 foo.c)
9011@item long options with single hyphen (ie. ant -projecthelp)
9012@end itemize
9013
9014This is a part of the Apache Commons Project.")
9015 (license license:asl2.0)))
9016
9017(define-public java-commons-text
9018 (package
9019 (name "java-commons-text")
9020 (version "1.15.0")
9021 (source (origin
9022 (method url-fetch)
9023 (uri (string-append "mirror://apache/commons/text/source/"
9024 "commons-text-" version "-src.tar.gz"))
9025 (sha256
9026 (base32
9027 "0k0y3pkgrzm84a0z1ifi4b9ydaglzm9pgvaw9phxdcwmcqxjbkc8"))))
9028 (build-system ant-build-system)
9029 (arguments
9030 (list #:jar-name "java-commons-text.jar"
9031 #:source-dir "src/main/java"
9032 #:test-dir "src/test"
9033 #:tests? #f ; Tests require JUnit5.
9034 #:phases
9035 #~(modify-phases %standard-phases
9036 (replace 'install
9037 (install-from-pom "pom.xml")))))
9038 (inputs
9039 (list java-commons-io))
9040 (propagated-inputs
9041 (list java-commons-lang3
9042 apache-commons-parent-pom-51))
9043 (home-page "https://commons.apache.org/text/")
9044 (synopsis "Library focused on algorithms working on strings")
9045 (description "Apache Commons Text is a library focused on algorithms
9046working on strings.
9047
9048This is a part of the Apache Commons Project.")
9049 (license license:asl2.0)))
9050
9051(define-public java-commons-codec
9052 (package
9053 (name "java-commons-codec")
9054 (version "1.15")
9055 (source (origin
9056 (method url-fetch)
9057 (uri (string-append "mirror://apache/commons/codec/source/"
9058 "commons-codec-" version "-src.tar.gz"))
9059 (sha256
9060 (base32
9061 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
9062 (build-system ant-build-system)
9063 (arguments
9064 `(#:jar-name "java-commons-codec.jar"
9065 #:source-dir "src/main/java"
9066 #:test-dir "src/test"
9067 #:test-exclude (list "**/*AbstractTest.java")
9068 #:phases
9069 (modify-phases %standard-phases
9070 (add-before 'build 'copy-resources
9071 (lambda _
9072 (copy-recursively "src/main/resources"
9073 "build/classes")))
9074 (add-before 'check 'copy-test-resources
9075 (lambda _
9076 (copy-recursively "src/test/resources"
9077 "build/test-classes")))
9078 (add-before 'check 'skip-ravenous-test
9079 (lambda _
9080 ;; This test admits to being "memory hungry", but reliably fails
9081 ;; even on a machine that should have plenty (12 GiB). Skip it.
9082 (substitute*
9083 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
9084 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
9085 "return;"))))
9086 (replace 'install (install-from-pom "pom.xml")))))
9087 (native-inputs
9088 (list java-commons-lang3 java-junit))
9089 (propagated-inputs
9090 (list apache-commons-parent-pom-52))
9091 (home-page "https://commons.apache.org/codec/")
9092 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
9093 (description "The codec package contains simple encoder and decoders for
9094various formats such as Base64 and Hexadecimal. In addition to these widely
9095used encoders and decoders, the codec package also maintains a collection of
9096phonetic encoding utilities.
9097
9098This is a part of the Apache Commons Project.")
9099 (license license:asl2.0)))
9100
9101(define-public java-commons-codec-1.17.1
9102 (package
9103 (inherit java-commons-codec)
9104 (version "1.17.1")
9105 (source (origin
9106 (method url-fetch)
9107 (uri (string-append "mirror://apache/commons/codec/source/"
9108 "commons-codec-" version "-src.tar.gz"))
9109 (sha256
9110 (base32
9111 "0f9f80azc13phkwa2fdkmpj5fkh85hf081fz5mmm6rqflmk83wp9"))))
9112 (arguments
9113 (substitute-keyword-arguments (package-arguments java-commons-codec)
9114 ;; Tests require JUnit 5 (org.junit.jupiter) which is not
9115 ;; yet available in Guix.
9116 ((#:tests? _ #t) #f)))))
9117
9118(define-public java-commons-daemon
9119 (package
9120 (name "java-commons-daemon")
9121 (version "1.1.0")
9122 (source (origin
9123 (method url-fetch)
9124 (uri (string-append "mirror://apache/commons/daemon/source/"
9125 "commons-daemon-" version "-src.tar.gz"))
9126 (sha256
9127 (base32
9128 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
9129 (build-system ant-build-system)
9130 (arguments
9131 `(#:test-target "test"
9132 #:phases
9133 (modify-phases %standard-phases
9134 (add-after 'build 'build-javadoc ant-build-javadoc)
9135 (replace 'install (install-jars "dist"))
9136 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
9137 (native-inputs
9138 (list java-junit))
9139 (home-page "https://commons.apache.org/daemon/")
9140 (synopsis "Library to launch Java applications as daemons")
9141 (description "The Daemon package from Apache Commons can be used to
9142implement Java applications which can be launched as daemons. For example the
9143program will be notified about a shutdown so that it can perform cleanup tasks
9144before its process of execution is destroyed by the operation system.
9145
9146This package contains the Java library. You will also need the actual binary
9147for your architecture which is provided by the jsvc package.
9148
9149This is a part of the Apache Commons Project.")
9150 (license license:asl2.0)))
9151
9152(define-public java-javaewah
9153 (package
9154 (name "java-javaewah")
9155 (version "1.1.6")
9156 (source (origin
9157 (method git-fetch)
9158 (uri (git-reference
9159 (url "https://github.com/lemire/javaewah/")
9160 (commit (string-append "JavaEWAH-" version))))
9161 (file-name (git-file-name name version))
9162 (sha256
9163 (base32
9164 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
9165 (build-system ant-build-system)
9166 (arguments `(#:jar-name "javaewah.jar"))
9167 (inputs
9168 (list java-junit java-hamcrest-core))
9169 (home-page "https://github.com/lemire/javaewah")
9170 (synopsis "Compressed alternative to the Java @code{BitSet} class")
9171 (description "This is a word-aligned compressed variant of the Java
9172@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
9173compression scheme. It can be used to implement bitmap indexes.
9174
9175The goal of word-aligned compression is not to achieve the best compression,
9176but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
9177cycles, maybe at the expense of storage. However, the EWAH scheme is always
9178more efficient storage-wise than an uncompressed bitmap (as implemented in the
9179@code{BitSet} class by Sun).")
9180 ;; GPL2.0 derivates are explicitly allowed.
9181 (license license:asl2.0)))
9182
9183(define-public java-javaewah-1.2.3
9184 (package
9185 (inherit java-javaewah)
9186 (version "1.2.3")
9187 (source (origin
9188 (method git-fetch)
9189 (uri (git-reference
9190 (url "https://github.com/lemire/javaewah/")
9191 (commit (string-append "JavaEWAH-" version))))
9192 (file-name (git-file-name "java-javaewah" version))
9193 (sha256
9194 (base32
9195 "0bl1702pkzr8c8ygprmdc47lrb3m4yn4097jf6liiin54d4km8j5"))))
9196 (arguments
9197 `(#:jar-name "javaewah.jar"
9198 #:phases
9199 (modify-phases %standard-phases
9200 (add-before 'check 'enable-assertions
9201 (lambda _
9202 ;; FuzzEWAHTest requires assertions enabled in the JVM.
9203 (substitute* "build.xml"
9204 (("haltonfailure=\"yes\">")
9205 "haltonfailure=\"yes\"><jvmarg value=\"-ea\" />"))))
9206 (add-after 'build 'add-osgi-manifest
9207 (lambda _
9208 ;; The Maven Central jar has OSGi manifest attributes set by
9209 ;; Maven Bundle Plugin. The NetBeans build uses
9210 ;; Bundle-SymbolicName as a fallback for OpenIDE-Module when
9211 ;; wrapping external libraries as modules.
9212 (call-with-output-file "osgi-manifest.mf"
9213 (lambda (port)
9214 (display (string-append
9215 "Bundle-ManifestVersion: 2\n"
9216 "Bundle-SymbolicName: com.googlecode.javaewah.JavaEWAH\n"
9217 "Bundle-Version: " ,version "\n"
9218 "Export-Package: com.googlecode.javaewah,"
9219 "com.googlecode.javaewah.datastructure,"
9220 "com.googlecode.javaewah.symmetric\n"
9221 "Import-Package: com.googlecode.javaewah,"
9222 "com.googlecode.javaewah.datastructure\n"
9223 "Multi-Release: true\n")
9224 port)))
9225 (invoke "jar" "ufm" "build/jar/javaewah.jar"
9226 "osgi-manifest.mf")))
9227 (replace 'install (install-from-pom "pom.xml")))))))
9228
9229(define-public java-slf4j-api
9230 (package
9231 (name "java-slf4j-api")
9232 (version "1.7.25")
9233 (source (origin
9234 (method git-fetch)
9235 (uri (git-reference
9236 (url "https://github.com/qos-ch/slf4j")
9237 (commit (string-append "v_" version))))
9238 (file-name (git-file-name name version))
9239 (sha256
9240 (base32
9241 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
9242 (modules '((guix build utils)))
9243 ;; Delete bundled jars.
9244 (snippet
9245 '(begin
9246 (for-each delete-file (find-files "." "\\.jar$"))
9247 #t))))
9248 (build-system ant-build-system)
9249 (arguments
9250 `(#:jar-name "slf4j-api.jar"
9251 #:source-dir "slf4j-api/src/main"
9252 #:test-dir "slf4j-api/src/test"
9253 #:phases
9254 (modify-phases %standard-phases
9255 (add-after 'build 'regenerate-jar
9256 (lambda _
9257 ;; pom.xml ignores these files in the jar creation process. If we don't,
9258 ;; we get the error "This code should have never made it into slf4j-api.jar"
9259 (delete-file-recursively "build/classes/org/slf4j/impl")
9260 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
9261 "build/classes" ".")
9262 ;; The NetBeans wrapper module has an empty jar target and
9263 ;; relies on Bundle-SymbolicName from the Maven Central jar.
9264 (call-with-output-file "osgi-manifest.mf"
9265 (lambda (port)
9266 (display (string-append
9267 "Bundle-ManifestVersion: 2\n"
9268 "Bundle-SymbolicName: slf4j.api\n"
9269 "Bundle-Version: " ,version "\n"
9270 "Export-Package: org.slf4j,org.slf4j.spi,"
9271 "org.slf4j.helpers,org.slf4j.event\n"
9272 "Import-Package: org.slf4j.impl\n")
9273 port)))
9274 (invoke "jar" "ufm" "build/jar/slf4j-api.jar"
9275 "osgi-manifest.mf")))
9276 (add-before 'check 'dont-test-abstract-classes
9277 (lambda _
9278 ;; abstract classes are not meant to be run with junit
9279 (substitute* "build.xml"
9280 (("<include name=\"\\*\\*/\\*Test.java\" />")
9281 (string-append "<include name=\"**/*Test.java\" />"
9282 "<exclude name=\"**/MultithreadedInitializationTest"
9283 ".java\" />")))
9284 #t))
9285 (replace 'install
9286 (install-from-pom "slf4j-api/pom.xml")))))
9287 (propagated-inputs
9288 (list java-slf4j-parent))
9289 (native-inputs
9290 (list java-junit java-hamcrest-core))
9291 (home-page "https://www.slf4j.org/")
9292 (synopsis "Simple logging facade for Java")
9293 (description "The Simple Logging Facade for Java (SLF4J) serves as a
9294simple facade or abstraction for various logging
9295frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
9296allowing the end user to plug in the desired logging framework at deployment
9297time.")
9298 (license license:expat)))
9299
9300(define java-slf4j-parent
9301 (package
9302 (inherit java-slf4j-api)
9303 (name "java-slf4j-parent")
9304 (native-inputs `())
9305 (propagated-inputs '())
9306 (arguments
9307 `(#:tests? #f
9308 #:phases
9309 (modify-phases %standard-phases
9310 (delete 'build)
9311 (delete 'configure)
9312 (replace 'install
9313 (install-pom-file "pom.xml")))))))
9314
9315(define-public java-slf4j-simple
9316 (package
9317 (name "java-slf4j-simple")
9318 (version "1.7.25")
9319 (source (package-source java-slf4j-api))
9320 (build-system ant-build-system)
9321 (arguments
9322 `(#:jar-name "slf4j-simple.jar"
9323 #:source-dir "slf4j-simple/src/main"
9324 #:test-dir "slf4j-simple/src/test"
9325 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
9326 #:phases
9327 (modify-phases %standard-phases
9328 ;; The tests need some test classes from slf4j-api
9329 (add-before 'check 'build-slf4j-api-test-helpers
9330 (lambda _
9331 ;; Add current dir to CLASSPATH ...
9332 (setenv "CLASSPATH"
9333 (string-append (getcwd) ":" (getenv "CLASSPATH")))
9334 ;; ... and build test helper classes here:
9335 (apply invoke
9336 `("javac" "-d" "."
9337 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9338 (replace 'install
9339 (install-from-pom "slf4j-simple/pom.xml")))))
9340 (propagated-inputs
9341 (list java-slf4j-api))
9342 (native-inputs
9343 (list java-junit java-hamcrest-core))
9344 (home-page "https://www.slf4j.org/")
9345 (synopsis "Simple implementation of simple logging facade for Java")
9346 (description "SLF4J binding for the Simple implementation, which outputs
9347all events to System.err. Only messages of level INFO and higher are
9348printed.")
9349 (license license:expat)))
9350
9351(define-public java-slf4j-nop
9352 (package
9353 (name "java-slf4j-nop")
9354 (version "1.7.25")
9355 (source (package-source java-slf4j-api))
9356 (build-system ant-build-system)
9357 (arguments
9358 `(#:jar-name "slf4j-nop.jar"
9359 #:source-dir "slf4j-nop/src/main"
9360 #:test-dir "slf4j-nop/src/test"
9361 #:phases (modify-phases %standard-phases
9362 ;; The tests need some test classes from slf4j-api
9363 (add-before 'check 'build-slf4j-api-test-helpers
9364 (lambda _
9365 ;; Add current dir to CLASSPATH ...
9366 (setenv "CLASSPATH"
9367 (string-append (getcwd) ":"
9368 (getenv "CLASSPATH")))
9369 ;; ... and build test helper classes here:
9370 (apply invoke
9371 `("javac" "-d" "."
9372 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9373 (replace 'install
9374 (install-from-pom "slf4j-nop/pom.xml")))))
9375 (propagated-inputs (list java-slf4j-api))
9376 (native-inputs (list java-junit java-hamcrest-core))
9377 (home-page "https://www.slf4j.org/")
9378 (synopsis "SLF4J binding that silently discards all logging messages")
9379 (description "Binding/provider for NOP, an implementation that silently
9380discards all logging messages.")
9381 (license license:expat)))
9382
9383(define-public java-slf4j-jdk14
9384 (package
9385 (name "java-slf4j-jdk14")
9386 (version "1.7.25")
9387 (source (package-source java-slf4j-api))
9388 (build-system ant-build-system)
9389 (arguments
9390 `(#:jar-name "slf4j-jdk14.jar"
9391 #:source-dir "slf4j-jdk14/src/main"
9392 #:test-dir "slf4j-jdk14/src/test"
9393 #:test-exclude (list "**/*MultithreadedInitializationTest.java")
9394 #:phases
9395 (modify-phases %standard-phases
9396 (add-after 'build 'add-osgi-manifest
9397 (lambda _
9398 ;; The NetBeans wrapper module has an empty jar target and
9399 ;; relies on Bundle-SymbolicName from the Maven Central jar.
9400 (call-with-output-file "osgi-manifest.mf"
9401 (lambda (port)
9402 (display (string-append
9403 "Bundle-ManifestVersion: 2\n"
9404 "Bundle-SymbolicName: slf4j.jdk14\n"
9405 "Bundle-Version: " ,version "\n"
9406 "Export-Package: org.slf4j.impl\n"
9407 "Import-Package: org.slf4j,org.slf4j.spi,"
9408 "org.slf4j.helpers,org.slf4j.event\n")
9409 port)))
9410 (invoke "jar" "ufm" "build/jar/slf4j-jdk14.jar"
9411 "osgi-manifest.mf")))
9412 (add-before 'check 'build-slf4j-api-test-helpers
9413 (lambda _
9414 (setenv "CLASSPATH"
9415 (string-append (getcwd) ":" (getenv "CLASSPATH")))
9416 (apply invoke
9417 `("javac" "-d" "."
9418 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
9419 (replace 'install
9420 (install-from-pom "slf4j-jdk14/pom.xml")))))
9421 (propagated-inputs (list java-slf4j-api))
9422 (native-inputs (list java-junit java-hamcrest-core))
9423 (home-page "https://www.slf4j.org/")
9424 (synopsis "SLF4J binding for @code{java.util.logging}")
9425 (description "SLF4J binding for the JDK14 @code{java.util.logging}
9426framework.")
9427 (license license:expat)))
9428
9429(define-public java-jcl-over-slf4j
9430 (package
9431 (name "java-jcl-over-slf4j")
9432 (version "1.7.36")
9433 (source (origin
9434 (method git-fetch)
9435 (uri (git-reference
9436 (url "https://github.com/qos-ch/slf4j")
9437 (commit (string-append "v_" version))))
9438 (file-name (git-file-name name version))
9439 (sha256
9440 (base32
9441 "05kdsrvacvgdsqj812jhar813asgl2i2xlvh4i4p4i5cxg17bkq3"))
9442 (modules '((guix build utils)))
9443 ;; Delete bundled jars.
9444 (snippet
9445 '(for-each delete-file (find-files "." "\\.jar$")))))
9446 (build-system ant-build-system)
9447 (arguments
9448 `(#:jar-name "jcl-over-slf4j.jar"
9449 #:source-dir "jcl-over-slf4j/src/main/java"
9450 #:test-dir "jcl-over-slf4j/src/test"
9451 #:phases
9452 (modify-phases %standard-phases
9453 (add-before 'build 'add-resources
9454 (lambda _
9455 ;; The default ant build does not include resources in the jar,
9456 ;; but the JCL LogFactory service provider is required for
9457 ;; commons-logging to discover the SLF4J implementation. Stage
9458 ;; the resources into the classes directory before the build
9459 ;; phase so that "build/jar/jcl-over-slf4j.jar" includes them.
9460 (copy-recursively
9461 "jcl-over-slf4j/src/main/resources/META-INF/services"
9462 "build/classes/META-INF/services")))
9463 (replace 'install
9464 (install-from-pom "jcl-over-slf4j/pom.xml")))))
9465 (propagated-inputs (list java-slf4j-api))
9466 (native-inputs (list java-junit java-hamcrest-core java-slf4j-jdk14))
9467 (home-page "https://www.slf4j.org/")
9468 (synopsis "Apache Commons Logging implemented over SLF4J")
9469 (description "This package provides a drop-in replacement for Apache
9470Commons Logging (JCL) version 1.2. It redirects all calls made to the
9471@code{commons-logging} API to SLF4J, allowing the user to plug in the desired
9472SLF4J binding at deployment time.")
9473 (license license:asl2.0)))
9474
9475(define-public antlr2
9476 (package
9477 (name "antlr2")
9478 (version "2.7.7")
9479 (source (origin
9480 (method url-fetch)
9481 (uri (string-append "https://www.antlr2.org/download/antlr-"
9482 version ".tar.gz"))
9483 (sha256
9484 (base32
9485 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
9486 (modules '((guix build utils)))
9487 (snippet
9488 '(begin
9489 (delete-file "antlr.jar")
9490 (substitute* "lib/cpp/antlr/CharScanner.hpp"
9491 (("#include <map>")
9492 (string-append
9493 "#include <map>\n"
9494 "#define EOF (-1)\n"
9495 "#include <strings.h>")))
9496 (substitute* "configure"
9497 (("/bin/sh") "sh"))
9498 #t))))
9499 (build-system gnu-build-system)
9500 (arguments
9501 `(#:tests? #f ; no test target
9502 #:imported-modules ((guix build ant-build-system)
9503 ,@%default-gnu-imported-modules)
9504 #:modules (((guix build ant-build-system) #:prefix ant:)
9505 (guix build gnu-build-system)
9506 (guix build utils))
9507 #:phases
9508 (modify-phases %standard-phases
9509 (add-after 'install 'strip-jar-timestamps
9510 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
9511 (add-before 'configure 'fix-timestamp
9512 (lambda _
9513 (substitute* "configure"
9514 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
9515 #t))
9516 (add-after 'configure 'fix-bin-ls
9517 (lambda _
9518 (substitute* (find-files "." "Makefile")
9519 (("/bin/ls") "ls"))
9520 #t)))))
9521 (native-inputs
9522 `(("which" ,which)
9523 ("zip" ,zip)
9524 ("java" ,icedtea "jdk")))
9525 (inputs
9526 `(("java" ,icedtea)))
9527 (home-page "https://www.antlr2.org")
9528 (synopsis "Framework for constructing recognizers, compilers, and translators")
9529 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
9530is a language tool that provides a framework for constructing recognizers,
9531compilers, and translators from grammatical descriptions containing Java, C#,
9532C++, or Python actions. ANTLR provides excellent support for tree construction,
9533tree walking, and translation.")
9534 (license license:public-domain)))
9535
9536(define-public java-stringtemplate-3
9537 (package
9538 (name "java-stringtemplate")
9539 (version "3.2.1")
9540 (source (origin
9541 (method url-fetch)
9542 (uri (string-append "https://github.com/antlr/website-st4/raw/"
9543 "gh-pages/download/stringtemplate-"
9544 version ".tar.gz"))
9545 (sha256
9546 (base32
9547 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
9548 (build-system ant-build-system)
9549 (arguments
9550 `(#:jar-name (string-append ,name "-" ,version ".jar")
9551 #:test-dir "test"
9552 #:modules ((guix build ant-build-system)
9553 (guix build utils)
9554 (srfi srfi-1))
9555 #:phases
9556 (modify-phases %standard-phases
9557 (add-before 'check 'fix-tests
9558 (lambda _
9559 (substitute* "build.xml"
9560 (("\\$\\{test.home\\}/java")
9561 "${test.home}/org"))
9562 #t))
9563 (add-before 'build 'generate-grammar
9564 (lambda _
9565 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
9566 (for-each (lambda (file)
9567 (format #t "~a\n" file)
9568 (invoke "antlr" file))
9569 '("template.g" "angle.bracket.template.g" "action.g"
9570 "eval.g" "group.g" "interface.g")))
9571 #t)))))
9572 (native-inputs
9573 `(("antlr" ,antlr2)
9574 ("java-junit" ,java-junit)))
9575 (home-page "https://www.stringtemplate.org")
9576 (synopsis "Template engine to generate formatted text output")
9577 (description "StringTemplate is a java template engine (with ports for C#,
9578Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
9579or any other formatted text output. StringTemplate is particularly good at
9580code generators, multiple site skins, and internationalization / localization.
9581StringTemplate also powers ANTLR.")
9582 (license license:bsd-3)))
9583
9584;; antlr3 is partially written using antlr3 grammar files. It also depends on
9585;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
9586;; files and uses antlr3 at runtime. The latest version requires a recent version
9587;; of antlr3 at runtime.
9588;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
9589;; This version of ST4 is sufficient for the latest antlr3.
9590;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
9591;; the latest ST4 with it. Then we build our final antlr3 that will be linked
9592;; against the latest ST4.
9593;; antlr3.3 still depends on antlr3 to generate some files, so we use an
9594;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
9595;; only grammar files with the antlr2 syntax.
9596;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
9597
9598(define-public java-stringtemplate
9599 (package (inherit java-stringtemplate-3)
9600 (name "java-stringtemplate")
9601 (version "4.0.8")
9602 (source (origin
9603 (method url-fetch)
9604 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
9605 version ".tar.gz"))
9606 (file-name (string-append name "-" version ".tar.gz"))
9607 (sha256
9608 (base32
9609 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
9610 (build-system ant-build-system)
9611 (arguments
9612 `(#:jar-name (string-append ,name "-" ,version ".jar")
9613 #:tests? #f ; FIXME: tests fail for unknown reasons
9614 #:test-dir "test"
9615 #:modules ((guix build ant-build-system)
9616 (guix build utils)
9617 (srfi srfi-1))
9618 #:phases
9619 (modify-phases %standard-phases
9620 (add-before 'check 'fix-test-target
9621 (lambda _
9622 (substitute* "build.xml"
9623 (("\\$\\{test.home\\}/java") "${test.home}/")
9624 (("\\*Test.java") "Test*.java"))
9625 #t))
9626 (add-before 'build 'generate-grammar
9627 (lambda _
9628 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
9629 (for-each (lambda (file)
9630 (format #t "~a\n" file)
9631 (invoke "antlr3" file))
9632 '("STParser.g" "Group.g" "CodeGenerator.g")))
9633 #t)))))
9634 (inputs
9635 `(("antlr3" ,antlr3-bootstrap)
9636 ("antlr2" ,antlr2)
9637 ("java-stringtemplate" ,java-stringtemplate-3)
9638 ("java-junit" ,java-junit)))))
9639
9640(define-public java-stringtemplate-4.0.6
9641 (package (inherit java-stringtemplate)
9642 (name "java-stringtemplate")
9643 (version "4.0.6")
9644 (source (origin
9645 (method url-fetch)
9646 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
9647 version ".tar.gz"))
9648 (file-name (string-append name "-" version ".tar.gz"))
9649 (sha256
9650 (base32
9651 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
9652 (inputs
9653 `(("antlr3" ,antlr3-3.3)
9654 ("antlr2" ,antlr2)
9655 ("java-stringtemplate" ,java-stringtemplate-3)))))
9656
9657(define-public antlr3
9658 (package
9659 (name "antlr3")
9660 (version "3.5.2")
9661 (source (origin
9662 (method git-fetch)
9663 (uri (git-reference
9664 (url "https://github.com/antlr/antlr3")
9665 (commit version)))
9666 (file-name (git-file-name name version))
9667 (sha256
9668 (base32
9669 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
9670 (build-system ant-build-system)
9671 (arguments
9672 `(#:jar-name (string-append ,name "-" ,version ".jar")
9673 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
9674 #:tests? #f
9675 #:phases
9676 (modify-phases %standard-phases
9677 (add-after 'install 'bin-install
9678 (lambda* (#:key inputs outputs #:allow-other-keys)
9679 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
9680 (bin (string-append (assoc-ref outputs "out") "/bin")))
9681 (mkdir-p bin)
9682 (with-output-to-file (string-append bin "/antlr3")
9683 (lambda _
9684 (display
9685 (string-append "#!" (which "sh") "\n"
9686 "java -cp " jar "/" ,name "-" ,version ".jar:"
9687 (string-concatenate
9688 (find-files (assoc-ref inputs "stringtemplate")
9689 ".*\\.jar"))
9690 ":"
9691 (string-concatenate
9692 (find-files (assoc-ref inputs "stringtemplate4")
9693 ".*\\.jar"))
9694 ":"
9695 (string-concatenate
9696 (find-files (string-append
9697 (assoc-ref inputs "antlr")
9698 "/lib")
9699 ".*\\.jar"))
9700 " org.antlr.Tool $*"))))
9701 (chmod (string-append bin "/antlr3") #o755))
9702 #t))
9703 (add-before 'build 'generate-grammar
9704 (lambda _
9705 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
9706 (for-each (lambda (file)
9707 (display file)
9708 (newline)
9709 (invoke "antlr3" file))
9710 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
9711 "AssignTokenTypesWalker.g"
9712 "ActionTranslator.g" "TreeToNFAConverter.g"
9713 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
9714 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
9715 (substitute* "ANTLRParser.java"
9716 (("public Object getTree") "public GrammarAST getTree"))
9717 (substitute* "ANTLRv3Parser.java"
9718 (("public Object getTree") "public CommonTree getTree"))
9719 (chdir "../../../../../java")
9720 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
9721 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
9722import org.antlr.grammar.v3.ANTLRTreePrinter;"))
9723 (substitute* "org/antlr/tool/ErrorManager.java"
9724 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
9725 (chdir "../../../..")
9726 #t))
9727 (add-before 'build 'fix-build-xml
9728 (lambda _
9729 (substitute* "build.xml"
9730 (("target name=\"compile\">")
9731 "target name=\"compile\">
9732<copy todir=\"${classes.dir}\">
9733<fileset dir=\"tool/src/main/resources\">
9734<include name=\"**/*.stg\"/>
9735<include name=\"**/*.st\"/>
9736<include name=\"**/*.sti\"/>
9737<include name=\"**/STLexer.tokens\"/>
9738</fileset>
9739</copy>"))
9740 #t)))))
9741 (native-inputs
9742 `(("antlr" ,antlr2)
9743 ("antlr3" ,antlr3-bootstrap)))
9744 (inputs
9745 `(("junit" ,java-junit)
9746 ("stringtemplate" ,java-stringtemplate-3)
9747 ("stringtemplate4" ,java-stringtemplate)))
9748 (propagated-inputs
9749 `(("stringtemplate" ,java-stringtemplate-3)
9750 ("antlr" ,antlr2)
9751 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
9752 (home-page "https://www.antlr3.org")
9753 (synopsis "Framework for constructing recognizers, compilers, and translators")
9754 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
9755is a language tool that provides a framework for constructing recognizers,
9756compilers, and translators from grammatical descriptions containing Java, C#,
9757C++, or Python actions. ANTLR provides excellent support for tree construction,
9758tree walking, and translation.")
9759 (license license:bsd-3)))
9760
9761(define-public antlr3-bootstrap
9762 (package
9763 (inherit antlr3)
9764 (name "antlr3-bootstrap")
9765 (native-inputs
9766 `(("antlr" ,antlr2)
9767 ("antlr3" ,antlr3-3.3)))
9768 (inputs
9769 `(("junit" ,java-junit)))
9770 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9771
9772(define-public antlr3-3.3
9773 (package
9774 (inherit antlr3)
9775 (name "antlr3")
9776 (version "3.3")
9777 (source (origin
9778 (method url-fetch)
9779 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
9780 "gh-pages/download/antlr-"
9781 version ".tar.gz"))
9782 (sha256
9783 (base32
9784 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
9785 (patches
9786 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
9787 (arguments
9788 `(#:jar-name (string-append ,name "-" ,version ".jar")
9789 #:source-dir (string-join '("tool/src/main/java"
9790 "runtime/Java/src/main/java"
9791 "tool/src/main/antlr2"
9792 "tool/src/main/antlr3")
9793 ":")
9794 #:tests? #f ; FIXME: tests seem to require maven plugin
9795 #:modules ((guix build ant-build-system)
9796 (guix build utils)
9797 (srfi srfi-1))
9798 #:phases
9799 (modify-phases %standard-phases
9800 (add-after 'install 'bin-install
9801 (lambda* (#:key inputs outputs #:allow-other-keys)
9802 (let* ((out (assoc-ref outputs "out"))
9803 (jar (string-append out "/share/java"))
9804 (bin (string-append out "/bin")))
9805 (mkdir-p bin)
9806 (with-output-to-file (string-append bin "/antlr3")
9807 (lambda _
9808 (display
9809 (string-append
9810 "#!" (which "sh") "\n"
9811 "java -cp " jar "/antlr3-3.3.jar:"
9812 (string-join
9813 (append (find-files (assoc-ref inputs "java-stringtemplate")
9814 ".*\\.jar$")
9815 (find-files (string-append (assoc-ref inputs "antlr")
9816 "/lib")
9817 ".*\\.jar$"))
9818 ":")
9819 " org.antlr.Tool $*"))))
9820 (chmod (string-append bin "/antlr3") #o755)
9821 #t)))
9822 (add-before 'build 'generate-grammar
9823 (lambda _
9824 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
9825 (("import org.antlr.grammar.v2.\\*;")
9826 "import org.antlr.grammar.v2.*;\n
9827import org.antlr.grammar.v2.TreeToNFAConverter;\n
9828import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
9829import org.antlr.grammar.v2.ANTLRTreePrinter;"))
9830 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
9831 (for-each (lambda (file)
9832 (format #t "~a\n" file)
9833 (invoke "antlr" file))
9834 '("antlr.g" "antlr.print.g" "assign.types.g"
9835 "buildnfa.g" "codegen.g" "define.g")))
9836 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
9837 (for-each (lambda (file)
9838 (format #t "~a\n" file)
9839 (invoke "antlr3" file))
9840 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
9841 "ANTLRv3Tree.g")))
9842 #t))
9843 (add-before 'build 'fix-build-xml
9844 (lambda _
9845 (substitute* "build.xml"
9846 (("target name=\"compile\">")
9847 "target name=\"compile\">
9848<copy todir=\"${classes.dir}\">
9849<fileset dir=\"tool/src/main/resources\">
9850<include name=\"**/*.stg\"/>
9851<include name=\"**/*.st\"/>
9852<include name=\"**/*.sti\"/>
9853<include name=\"**/STLexer.tokens\"/>
9854</fileset>
9855</copy>"))
9856 #t)))))
9857 (native-inputs
9858 `(("antlr" ,antlr2)
9859 ("antlr3" ,antlr3-3.1)))
9860 (inputs
9861 `(("junit" ,java-junit)))
9862 (propagated-inputs
9863 `(("java-stringtemplate" ,java-stringtemplate-3)
9864 ("antlr" ,antlr2)))
9865 (properties (alist-delete 'hidden? (package-properties antlr3)))))
9866
9867(define-public antlr3-3.1
9868 (package
9869 (inherit antlr3)
9870 (version "3.1")
9871 (source (origin
9872 (method url-fetch)
9873 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
9874 "gh-pages/download/antlr-"
9875 version ".tar.gz"))
9876 (sha256
9877 (base32
9878 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
9879 (patches
9880 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
9881 (arguments
9882 `(#:jar-name (string-append "antlr3-" ,version ".jar")
9883 #:source-dir "src:runtime/Java/src"
9884 #:tests? #f
9885 #:phases
9886 (modify-phases %standard-phases
9887 (add-after 'install 'bin-install
9888 (lambda* (#:key inputs outputs #:allow-other-keys)
9889 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
9890 (bin (string-append (assoc-ref outputs "out") "/bin")))
9891 (mkdir-p bin)
9892 (with-output-to-file (string-append bin "/antlr3")
9893 (lambda _
9894 (display
9895 (string-append "#!" (which "sh") "\n"
9896 "java -cp " jar "/antlr3-3.1.jar:"
9897 (string-concatenate
9898 (find-files (assoc-ref inputs "stringtemplate")
9899 ".*\\.jar"))
9900 ":"
9901 (string-concatenate
9902 (find-files (string-append
9903 (assoc-ref inputs "antlr")
9904 "/lib")
9905 ".*\\.jar"))
9906 " org.antlr.Tool $*"))))
9907 (chmod (string-append bin "/antlr3") #o755))
9908 #t))
9909 (add-before 'build 'generate-grammar
9910 (lambda _
9911 (let ((dir "src/org/antlr/tool/"))
9912 (for-each (lambda (file)
9913 (display file)
9914 (newline)
9915 (invoke "antlr" "-o" dir (string-append dir file)))
9916 '("antlr.g" "antlr.print.g" "assign.types.g"
9917 "buildnfa.g" "define.g")))
9918 (format #t "codegen.g\n")
9919 (invoke "antlr" "-o" "src/org/antlr/codegen"
9920 "src/org/antlr/codegen/codegen.g")
9921 #t))
9922 (add-before 'build 'fix-build-xml
9923 (lambda _
9924 (substitute* "build.xml"
9925 (("target name=\"compile\">")
9926 "target name=\"compile\">
9927<copy todir=\"${classes.dir}\">
9928<fileset dir=\"src\">
9929<include name=\"**/*.stg\"/>
9930<include name=\"**/*.st\"/>
9931<include name=\"**/*.sti\"/>
9932<include name=\"**/STLexer.tokens\"/>
9933</fileset>
9934</copy>"))
9935 #t)))))
9936 (native-inputs
9937 `(("antlr" ,antlr2)))
9938 (inputs
9939 `(("junit" ,java-junit)))
9940 (propagated-inputs
9941 `(("stringtemplate" ,java-stringtemplate-3)))))
9942
9943(define-public java-treelayout
9944 (package
9945 (name "java-treelayout")
9946 (version "1.0.3")
9947 (source (origin
9948 (method git-fetch)
9949 (uri (git-reference
9950 (url "https://github.com/abego/treelayout")
9951 (commit (string-append "v" version))))
9952 (file-name (git-file-name name version))
9953 (sha256
9954 (base32
9955 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
9956 (build-system ant-build-system)
9957 (arguments
9958 `(#:jar-name (string-append ,name "-" ,version ".jar")
9959 #:source-dir "org.abego.treelayout/src/main/java"
9960 #:test-dir "org.abego.treelayout/src/test"))
9961 (inputs
9962 (list java-junit))
9963 (native-inputs
9964 (list java-hamcrest-core))
9965 (home-page "https://treelayout.sourceforge.net")
9966 (synopsis "Tree Layout Algorithm in Java")
9967 (description "TreeLayout creates tree layouts for arbitrary trees. It is
9968not restricted to a specific output or format, but can be used for any kind of
9969two dimensional diagram. Examples are Swing based components, SVG files, etc.
9970This is possible because TreeLayout separates the layout of a tree from the
9971actual rendering.")
9972 (license license:bsd-3)))
9973
9974(define-public java-antlr4-runtime
9975 (package
9976 (name "java-antlr4-runtime")
9977 (version "4.10.1")
9978 (source (origin
9979 (method git-fetch)
9980 (uri (git-reference
9981 (url "https://github.com/antlr/antlr4")
9982 (commit version)))
9983 (file-name (git-file-name name version))
9984 (sha256
9985 (base32
9986 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
9987 (patches
9988 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
9989 (build-system ant-build-system)
9990 (arguments
9991 `(#:jar-name "java-antlr4-runtime.jar"
9992 #:source-dir "runtime/Java/src/org"
9993 #:tests? #f; tests depend on java-antlr4 itself
9994 #:phases
9995 (modify-phases %standard-phases
9996 (add-before 'build 'copy-resources
9997 (lambda _
9998 (copy-recursively "runtime/Java/src/main/dot"
9999 "build/classes")
10000 #t)))))
10001 (home-page "https://www.antlr.org")
10002 (synopsis "ANTLR runtime library")
10003 (description "This package contains the runtime library used with generated
10004sources by ANTLR.")
10005 (license license:bsd-3)))
10006
10007(define-public cpp-antlr4-runtime
10008 (package
10009 (inherit java-antlr4-runtime)
10010 (name "cpp-antlr4-runtime")
10011 (properties '((upstream-name . "antlr4-cpp-runtime")))
10012 (outputs '("out" "static"))
10013 (build-system cmake-build-system)
10014 (arguments
10015 (list
10016 ;; TODO: try to run the tests under
10017 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
10018 #:phases
10019 #~(modify-phases %standard-phases
10020 (add-after 'unpack 'chdir
10021 (lambda _
10022 (chdir "runtime/Cpp")))
10023 (add-after 'chdir 'unbundle-googletest
10024 (lambda _
10025 (substitute* "runtime/CMakeLists.txt"
10026 (("^ FetchContent_MakeAvailable.*")
10027 "")
10028 (("gtest_main" all)
10029 (string-append "gtest " all)))))
10030 (add-after 'install 'move-static-library
10031 (lambda* (#:key outputs #:allow-other-keys)
10032 (let ((static (assoc-ref outputs "static"))
10033 (libantlr4-runtime.a (search-input-file
10034 outputs "lib/libantlr4-runtime.a")))
10035 (mkdir-p (string-append static "/lib"))
10036 (rename-file
10037 libantlr4-runtime.a
10038 (string-append static "/lib/"
10039 (basename libantlr4-runtime.a)))))))))
10040 (native-inputs (list googletest pkg-config))
10041 (inputs (list `(,util-linux "lib"))) ;libuuid
10042 (synopsis "ANTLR C++ runtime library")
10043 (description "This package contains the C++ runtime library used with C++
10044generated sources by ANTLR.")))
10045
10046(define-deprecated-package java-antlr4-runtime-cpp
10047 cpp-antlr4-runtime)
10048
10049(define-public python-antlr4-runtime
10050 (package
10051 (inherit java-antlr4-runtime)
10052 (name "python-antlr4-runtime")
10053 (properties '((upstream-name . "antlr4-python3-runtime")))
10054 (build-system pyproject-build-system)
10055 (arguments
10056 (list
10057 #:test-backend #~'custom
10058 #:test-flags #~'("tests/run.py" "--verbose")
10059 #:phases
10060 #~(modify-phases %standard-phases
10061 (add-after 'unpack 'chdir
10062 (lambda _
10063 (chdir "runtime/Python3")))
10064 ;; TODO: Remove when updating ANTLR4:
10065 ;; https://github.com/antlr/antlr4/pull/4593
10066 (add-after 'chdir 'fix-python-3.12-compatibility
10067 (lambda _
10068 (substitute* "tests/TestIntervalSet.py"
10069 (("assertEquals") "assertEqual"))))
10070 (add-after 'chdir 'regenerate-parsers
10071 (lambda _
10072 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
10073 "src/antlr4/xpath/XPathLexer.g4")
10074 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
10075 "tests/expr/Expr.g4"))))))
10076 (native-inputs (list antlr4 python-setuptools))
10077 (synopsis "ANTLR Python runtime library")
10078 (description "This package contains the Python runtime library used with
10079Python generated sources by ANTLR.")))
10080
10081(define-deprecated-package java-antlr4-runtime-python
10082 python-antlr4-runtime)
10083
10084(define-public antlr4
10085 (package
10086 (inherit java-antlr4-runtime)
10087 (name "antlr4")
10088 (arguments
10089 `(#:jar-name "antlr4.jar"
10090 #:source-dir "tool/src"
10091 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
10092 #:test-include (list "**/Test*.java")
10093 #:test-exclude (list
10094 ;; These have no runnable methods and fail because
10095 ;; test-include above is too broad.
10096 "**/TestContext.java"
10097 "**/TestOutputReading.java"
10098 ;; no @Test methods
10099 "**/TestParserErrors.java"
10100 "**/TestSemPredEvalParser.java"
10101 "**/TestSets.java"
10102 "**/TestListeners.java"
10103 "**/TestParseTrees.java"
10104 "**/TestParserExec.java"
10105 "**/TestLexerErrors.java"
10106 "**/TestPerformance.java"
10107 "**/TestCompositeParsers.java"
10108 "**/TestLexerExec.java"
10109 "**/TestSemPredEvalLexer.java"
10110 "**/TestLeftRecursion.java"
10111 "**/TestFullContextParsing.java"
10112 "**/TestCompositeLexers.java"
10113 ;; Null pointer exception
10114 "**/TestCompositeGrammars.java")
10115 #:phases
10116 (modify-phases %standard-phases
10117 (add-before 'build 'fix-build.xml
10118 (lambda _
10119 ;; tests are not in a java subdirectory
10120 (substitute* "build.xml"
10121 (("\\$\\{test.home\\}/java") "${test.home}"))
10122 #t))
10123 ;; tests require to have a working antlr4 binary
10124 (delete 'check)
10125 (add-after 'install 'check
10126 (lambda _
10127 (invoke "ant" "compile-tests")
10128 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
10129 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
10130 #t))
10131 (add-before 'check 'remove-unrelated-languages
10132 (lambda _
10133 ;; There are tests for other languages that ANTLR can generate, but
10134 ;; we don't have the infrastructure for that yet. Let's test Java
10135 ;; generation only.
10136 (for-each
10137 (lambda (language)
10138 (delete-file-recursively
10139 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
10140 language)))
10141 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
10142 "python3" "swift"))
10143 #t))
10144 (add-before 'check 'generate-test-parsers
10145 (lambda* (#:key outputs #:allow-other-keys)
10146 (define (run-antlr dir filename package)
10147 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
10148 "-package" package (string-append dir "/" filename)
10149 "-Xlog"))
10150 (setenv "PATH" (string-append (getenv "PATH") ":"
10151 (assoc-ref outputs "out") "/bin"))
10152 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10153 "Java.g4" "org.antlr.v4.test.runtime.java.api")
10154 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10155 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
10156 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
10157 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
10158 #t))
10159 (add-before 'check 'remove-graphemes
10160 (lambda _
10161 ;; When running antlr on grahemes.g4, we get a runtime exception:
10162 ;; set is empty. So delete the file that depends on it.
10163 (delete-file
10164 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
10165 #t))
10166 (add-after 'install 'bin-install
10167 (lambda* (#:key inputs outputs #:allow-other-keys)
10168 (let* ((output (assoc-ref outputs "out"))
10169 (bin (string-append output "/bin"))
10170 (bin/antlr4 (string-append bin "/antlr4")))
10171 (mkdir-p bin)
10172 (with-output-to-file bin/antlr4
10173 (lambda _
10174 (display
10175 (string-append
10176 "#!"
10177 (search-input-file inputs "bin/sh")
10178 "\n"
10179 (string-append (assoc-ref inputs "openjdk")
10180 "/bin/java")
10181 " -cp "
10182 (string-append output "/share/java/antlr4.jar")
10183 ":"
10184 (string-join
10185 (apply append
10186 (map (lambda (input)
10187 (find-files (assoc-ref inputs input)
10188 "\\.jar$"))
10189 '("antlr3" "java-stringtemplate"
10190 "java-antlr4-runtime" "java-treelayout"
10191 "java-jsonp-api" "java-icu4j")))
10192 ":")
10193 " org.antlr.v4.Tool $*\n"))))
10194 (chmod bin/antlr4 #o755))))
10195 (add-before 'build 'copy-resources
10196 (lambda _
10197 (copy-recursively "tool/resources/" "build/classes")
10198 #t))
10199 (add-before 'build 'generate-unicode
10200 (lambda _
10201 ;; First: build the generator
10202 (invoke "javac" "-cp" (getenv "CLASSPATH")
10203 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
10204 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
10205 ;; Then use it
10206 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
10207 ":tool/src:runtime/Java")
10208 "org.antlr.v4.unicode.UnicodeRenderer"
10209 "tool/resources/org/antlr/v4/tool/templates"
10210 "unicodedata"
10211 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
10212 ;; It seems there is a bug with our ST4
10213 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
10214 (("\\\\>") ">"))
10215 ;; Remove the additional file
10216 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
10217 #t))
10218 (add-before 'build 'generate-grammar
10219 (lambda* (#:key inputs #:allow-other-keys)
10220 (with-directory-excursion "tool/src/org/antlr/v4/parse"
10221 (for-each (lambda (file)
10222 (display file)
10223 (newline)
10224 (invoke "antlr3" file))
10225 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
10226 "GrammarTreeVisitor.g" "ATNBuilder.g"
10227 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
10228 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
10229 (install-file "../parse/ANTLRParser.tokens" ".")
10230 (display "SourceGenTriggers.g\n")
10231 (invoke "antlr3" "SourceGenTriggers.g"))
10232 #t)))))
10233 (inputs
10234 (list antlr3
10235 java-antlr4-runtime
10236 java-icu4j
10237 java-jsonp-api
10238 java-stringtemplate
10239 java-treelayout
10240 openjdk))
10241 (native-inputs
10242 (list java-junit))
10243 (synopsis "Parser and lexer generator in Java")
10244 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
10245parser generator for reading, processing, executing, or translating structured
10246text or binary files. It's widely used to build languages, tools, and
10247frameworks. From a grammar, ANTLR generates a parser that can build and walk
10248parse trees.")))
10249
10250(define-public java-antlr4-runtime-4.1
10251 (package
10252 (inherit java-antlr4-runtime)
10253 (version "4.1")
10254 (source (origin
10255 (method git-fetch)
10256 (uri (git-reference
10257 (url "https://github.com/antlr/antlr4")
10258 (commit version)))
10259 (file-name (git-file-name "antlr4" version))
10260 (sha256
10261 (base32
10262 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
10263 (arguments
10264 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
10265 ((#:phases phases)
10266 `(modify-phases ,phases
10267 (add-before 'configure 'chmod
10268 (lambda _
10269 (chmod "build.xml" #o644)
10270 #t))))))
10271 (inputs
10272 (list java-treelayout))))
10273
10274(define-public antlr4-4.1
10275 (package
10276 (inherit antlr4)
10277 (version (package-version java-antlr4-runtime-4.1))
10278 (source (package-source java-antlr4-runtime-4.1))
10279 (arguments
10280 (substitute-keyword-arguments (package-arguments antlr4)
10281 ((#:test-dir _)
10282 "tool/test")
10283 ((#:test-exclude excludes)
10284 `(list "**/TestParseErrors.java"
10285 "**/TestTopologicalSort.java"
10286 ,@excludes))
10287 ((#:phases phases)
10288 `(modify-phases ,phases
10289 (delete 'generate-unicode)
10290 (replace 'check
10291 (lambda _
10292 (invoke "ant" "check")
10293 #t))
10294 (add-before 'configure 'chmod
10295 (lambda _
10296 (chmod "build.xml" #o644)
10297 #t))
10298 (delete 'remove-graphemes)
10299 (delete 'remove-unrelated-languages)
10300 (delete 'generate-test-parsers)))))
10301 (inputs
10302 (alist-replace
10303 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
10304 (package-inputs antlr4)))))
10305
10306(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
10307 (package
10308 (inherit java-antlr4-runtime)
10309 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
10310 (version "4.7.4")
10311 (source (origin
10312 (method git-fetch)
10313 (uri (git-reference
10314 (url "https://github.com/tunnelvisionlabs/antlr4")
10315 (commit (string-append version "-opt"))))
10316 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
10317 (sha256
10318 (base32
10319 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
10320 (patches
10321 (search-patches "java-antlr4-Add-standalone-generator.patch"
10322 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
10323 (arguments
10324 `(#:jar-name "java-antlr4-runtime-annotations.jar"
10325 #:source-dir "runtime/JavaAnnotations/src"
10326 #:tests? #f; no tests
10327 #:phases
10328 (modify-phases %standard-phases
10329 (add-after 'build 'copy-resources
10330 (lambda _
10331 (copy-recursively "runtime/JavaAnnotations/resources"
10332 "build/classes")
10333 #t))
10334 (add-after 'copy-resources 'rebuild-jar
10335 (lambda _
10336 (invoke "ant" "jar")
10337 #t)))))
10338 (inputs '())
10339 (native-inputs '())
10340 (synopsis "Annotations for ANTLR's runtime library")
10341 (description "This package contains annotations used during the build of
10342the runtime library of ANTLR.")))
10343
10344;; the runtime of this library requires a lexer that is generated by antlr4.
10345;; However, antlr4 itself requires this library at build and run-time. We
10346;; use [email protected], the closest version of antlr that doesn't need this
10347;; bootstrap process, to generate the lexer. The generated lexer is built
10348;; for the 4.1 runtime, which is slightly different from this runtime.
10349;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
10350;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
10351;; the proper, working, runtime to build antlr4 again.
10352(define-public java-tunnelvisionlabs-antlr4-runtime-bootstrap
10353 (package
10354 (inherit java-antlr4-runtime)
10355 (name "java-tunnelvisionlabs-antlr4-runtime")
10356 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
10357 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
10358 (arguments
10359 `(#:jar-name "java-antlr4-runtime.jar"
10360 #:source-dir "runtime/Java/src"
10361 #:tests? #f; tests require antlr4, but antlr4 depends on this package
10362 #:phases
10363 (modify-phases %standard-phases
10364 (add-before 'build 'generate-xpath-lexer
10365 (lambda _
10366 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
10367 "-visitor" "-no-listener"
10368 "-package" "org.antlr.v4.runtime.tree.xpath"
10369 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
10370 ;; Generated code is for an incompatible version of the runtime
10371 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
10372 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
10373 "LexerATNSimulator(this,_ATN)"))
10374 #t))
10375 (add-before 'build 'copy-resources
10376 (lambda _
10377 (copy-recursively "runtime/Java/src/main/dot"
10378 "build/classes")
10379 #t)))))
10380 (native-inputs
10381 `(("antlr4" ,antlr4-4.1)
10382 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
10383 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))
10384 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
10385
10386(define-public java-tunnelvisionlabs-antlr4-bootstrap
10387 (package
10388 (inherit antlr4)
10389 (name "java-tunnelvisionlabs-antlr4")
10390 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
10391 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
10392 (arguments
10393 (substitute-keyword-arguments (package-arguments antlr4)
10394 ((#:test-dir _)
10395 "tool/test:runtime-testsuite/src")
10396 ((#:phases phases)
10397 `(modify-phases ,phases
10398 (delete 'remove-unrelated-languages)
10399 (delete 'remove-graphemes)
10400 (delete 'generate-test-parsers)
10401 (delete 'check)))))
10402 (native-inputs '())
10403 (inputs
10404 `(("antlr3" ,antlr3)
10405 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
10406 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
10407 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
10408 ("java-icu4j" ,java-icu4j)
10409 ("java-jsonp-api" ,java-jsonp-api)
10410 ("java-stringtemplate" ,java-stringtemplate)
10411 ("java-treelayout" ,java-treelayout)
10412 ("openjdk" ,openjdk)))
10413 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
10414
10415(define-public java-tunnelvisionlabs-antlr4-runtime
10416 (package
10417 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
10418 (native-inputs
10419 (alist-replace
10420 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
10421 (package-native-inputs
10422 java-tunnelvisionlabs-antlr4-runtime-bootstrap)))
10423 (properties
10424 (alist-delete
10425 'hidden?
10426 (package-properties java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
10427
10428(define-public java-tunnelvisionlabs-antlr4
10429 (package
10430 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
10431 (inputs
10432 (alist-replace
10433 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
10434 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))
10435 (properties
10436 (alist-delete
10437 'hidden?
10438 (package-properties java-tunnelvisionlabs-antlr4-bootstrap)))))
10439
10440(define-public java-commons-cli-1.2
10441 ;; This is a bootstrap dependency for Maven2.
10442 (package
10443 (inherit java-commons-cli)
10444 (version "1.2")
10445 (source (origin
10446 (method url-fetch)
10447 (uri (string-append "mirror://apache/commons/cli/source/"
10448 "commons-cli-" version "-src.tar.gz"))
10449 (sha256
10450 (base32
10451 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
10452 (arguments
10453 `(#:jar-name "commons-cli.jar"
10454 #:phases
10455 (modify-phases %standard-phases
10456 (add-before 'check 'fix-build-xml
10457 (lambda* (#:key inputs #:allow-other-keys)
10458 (substitute* "build.xml"
10459 (("dir=\"\\$\\{test.home\\}/java\"")
10460 "dir=\"${test.home}\""))
10461 #t)))))
10462 (native-inputs
10463 (list java-junit))))
10464
10465(define-public java-microemulator-cldc
10466 (package
10467 (name "java-microemulator-cldc")
10468 (version "2.0.4")
10469 (source (origin
10470 (method url-fetch)
10471 (uri (string-append "https://github.com/barteo/microemu/archive/"
10472 "microemulator_"
10473 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
10474 version)
10475 ".tar.gz"))
10476 (file-name (string-append name "-" version ".tar.gz"))
10477 (sha256
10478 (base32
10479 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
10480 (build-system ant-build-system)
10481 (arguments
10482 `(#:jar-name "microemulator-cldc.jar"
10483 #:source-dir "microemu-cldc/src/main/java"
10484 #:tests? #f)); Requires even older software
10485 (home-page "https://github.com/barteo/microemu")
10486 (synopsis "J2ME CLDC emulator")
10487 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
10488Emulator. It demonstrates MIDlet based applications in web browser
10489applet and can be run as a standalone java application.")
10490 (license (list license:asl2.0
10491 ;; or altenatively:
10492 license:lgpl2.1+))))
10493
10494(define-public java-datanucleus-javax-persistence
10495 (package
10496 (name "java-datanucleus-javax-persistence")
10497 (version "2.2.0")
10498 (source (origin
10499 (method url-fetch)
10500 (uri (string-append "https://github.com/datanucleus/"
10501 "javax.persistence/archive/javax.persistence-"
10502 version "-release.tar.gz"))
10503 (sha256
10504 (base32
10505 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
10506 (build-system ant-build-system)
10507 (arguments
10508 `(#:jar-name "java-datanucleus-javax-persistence.jar"
10509 #:jdk ,icedtea-8
10510 #:source-dir "src/main/java"
10511 #:tests? #f)); no tests
10512 (home-page "https://github.com/datanucleus/javax.persistence")
10513 (synopsis "JPA API")
10514 (description "This package contains a clean definition of JPA API intended
10515for use with DataNucleus JPA since the JCP haven't provided an official JPA API
10516jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
10517used to generate this API.")
10518 (license (list license:edl1.0 license:epl1.0))))
10519
10520(define-public java-osgi-cmpn
10521 (package
10522 (name "java-osgi-cmpn")
10523 (version "6.0.0")
10524 (source (origin
10525 (method url-fetch)
10526 (uri (string-append "https://repo1.maven.org/maven2/"
10527 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
10528 version "-sources.jar"))
10529 (sha256
10530 (base32
10531 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
10532 (build-system ant-build-system)
10533 (arguments
10534 `(#:jar-name "osgi-cmpn.jar"
10535 #:tests? #f)); no tests
10536 (inputs
10537 `(("annotation" ,java-osgi-annotation)
10538 ("core" ,java-osgi-core)
10539 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
10540 ("microemulator" ,java-microemulator-cldc)
10541 ("servlet" ,java-classpathx-servletapi)))
10542 (home-page "https://www.osgi.org")
10543 (synopsis "Compendium specification module of OSGi framework")
10544 (description
10545 "OSGi, for Open Services Gateway initiative framework, is a module system
10546and service platform for the Java programming language. This package contains
10547the compendium specification module, providing interfaces and classes for use
10548in compiling bundles.")
10549 (license license:asl2.0)))
10550
10551(define-public java-osgi-cmpn-7.0.0
10552 ;; Upstream uses release-train tags for the monorepo; osgi.cmpn/bnd.bnd
10553 ;; emits artifact version 7.0.0 from the r7-cmpn-spec-final checkout.
10554 (let ((tag "r7-cmpn-spec-final"))
10555 (package
10556 (name "java-osgi-cmpn")
10557 (version "7.0.0")
10558 (source (origin
10559 (method git-fetch)
10560 (uri (git-reference
10561 (url "https://github.com/osgi/osgi")
10562 (commit tag)))
10563 (modules '((guix build utils)))
10564 (snippet
10565 '(begin
10566 (for-each delete-file
10567 (find-files "." "\\.jar$"))
10568 #t))
10569 (file-name (git-file-name name version))
10570 (sha256
10571 (base32
10572 "08i8d2y7awr09809qwnv7l5hzqi5di3sv21bvgrmhibm07hr4ml9"))))
10573 (build-system ant-build-system)
10574 (arguments
10575 (list
10576 #:tests? #f
10577 #:jdk openjdk9
10578 #:jar-name "osgi-cmpn.jar"
10579 #:phases
10580 #~(modify-phases %standard-phases
10581 (add-after 'unpack 'prepare-source-layout
10582 (lambda _
10583 (mkdir-p "src")
10584 (for-each
10585 (lambda (directory)
10586 (invoke "cp" "-r" (string-append directory "/.") "src/"))
10587 '("org.osgi.application/src"
10588 "org.osgi.namespace.contract/src"
10589 "org.osgi.namespace.extender/src"
10590 "org.osgi.namespace.implementation/src"
10591 "org.osgi.namespace.service/src"
10592 "org.osgi.namespace.unresolvable/src"
10593 "org.osgi.service.async/src"
10594 "org.osgi.service.application/src"
10595 "org.osgi.service.blueprint/src"
10596 "org.osgi.service.cm/src"
10597 "org.osgi.service.component/src"
10598 "org.osgi.service.component.annotations/src"
10599 "org.osgi.service.configurator/src"
10600 "org.osgi.service.coordinator/src"
10601 "org.osgi.service.deploymentadmin/src"
10602 "org.osgi.service.device/src"
10603 "org.osgi.service.dmt/src"
10604 "org.osgi.service.event/src"
10605 "org.osgi.service.http/src"
10606 "org.osgi.service.http.whiteboard/src"
10607 "org.osgi.service.io/src"
10608 "org.osgi.service.jaxrs/src"
10609 "org.osgi.service.jdbc/src"
10610 "org.osgi.service.jndi/src"
10611 "org.osgi.service.jpa/src"
10612 "org.osgi.service.log/src"
10613 "org.osgi.service.metatype/src"
10614 "org.osgi.service.metatype.annotations/src"
10615 "org.osgi.service.monitor/src"
10616 "org.osgi.service.prefs/src"
10617 "org.osgi.service.provisioning/src"
10618 "org.osgi.service.remoteserviceadmin/src"
10619 "org.osgi.service.repository/src"
10620 "org.osgi.service.rest/src"
10621 "org.osgi.service.serviceloader/src"
10622 "org.osgi.service.subsystem/src"
10623 "org.osgi.service.transaction.control/src"
10624 "org.osgi.service.upnp/src"
10625 "org.osgi.service.useradmin/src"
10626 "org.osgi.service.wireadmin/src"
10627 "org.osgi.util.converter/src"
10628 "org.osgi.util.function/src"
10629 "org.osgi.util.measurement/src"
10630 "org.osgi.util.position/src"
10631 "org.osgi.util.promise/src"
10632 "org.osgi.util.pushstream/src"
10633 "org.osgi.util.xml/src"))))
10634 (add-before 'install 'create-pom
10635 (generate-pom.xml "pom.xml" "org.osgi" "osgi.cmpn" #$version))
10636 (replace 'install (install-from-pom "pom.xml")))))
10637 (inputs
10638 (list java-osgi-annotation-8.1.0
10639 java-osgi-core-8.0.0
10640 java-classpathx-servletapi
10641 java-microemulator-cldc
10642 java-datanucleus-javax-persistence
10643 java-jaxrs-api-2))
10644 (home-page "https://www.osgi.org")
10645 (synopsis "Compendium specification module of OSGi framework")
10646 (description "OSGi, for Open Services Gateway initiative framework, is a
10647module system and service platform for the Java programming language. This
10648package contains the compendium specification module, providing interfaces
10649and classes for use in compiling bundles.")
10650 (license license:asl2.0))))
10651
10652(define-public java-felix-resolver-2
10653 (package
10654 (name "java-felix-resolver")
10655 (version "2.0.4")
10656 (source (origin
10657 (method git-fetch)
10658 (uri (git-reference
10659 (url "https://github.com/apache/felix-dev")
10660 (commit (string-append "org.apache.felix.resolver-"
10661 version))))
10662 (modules '((guix build utils)))
10663 (snippet
10664 '(begin
10665 (for-each delete-file
10666 (find-files "." "\\.jar$"))
10667 #t))
10668 (file-name (git-file-name name version))
10669 (sha256
10670 (base32
10671 "1lkwh6q58vm0inll8zaqizwfvw8d7kzaff0x6lwa17j9k91yllyf"))))
10672 (build-system ant-build-system)
10673 (arguments
10674 (list
10675 #:tests? #f
10676 #:jar-name "org.apache.felix.resolver.jar"
10677 #:source-dir "resolver/src/main/java"
10678 #:phases
10679 #~(modify-phases %standard-phases
10680 (add-before 'install 'create-pom
10681 (generate-pom.xml "pom.xml" "org.apache.felix"
10682 "org.apache.felix.resolver" #$version))
10683 (replace 'install (install-from-pom "pom.xml")))))
10684 (inputs (list java-osgi-annotation java-osgi-core))
10685 (home-page "https://felix.apache.org/")
10686 (synopsis "Apache Felix OSGi resolver")
10687 (description "Apache Felix Resolver implements the OSGi resolver
10688specification, providing dependency resolution for OSGi bundles.")
10689 (license license:asl2.0)))
10690
10691(define-public java-felix-framework-7
10692 (package
10693 (name "java-felix-framework")
10694 (version "7.0.5")
10695 (source (origin
10696 (method git-fetch)
10697 (uri (git-reference
10698 (url "https://github.com/apache/felix-dev")
10699 (commit (string-append "org.apache.felix.framework-"
10700 version))))
10701 (modules '((guix build utils)))
10702 (snippet
10703 '(begin
10704 (for-each delete-file
10705 (find-files "." "\\.jar$"))
10706 #t))
10707 (file-name (git-file-name name version))
10708 (sha256
10709 (base32
10710 "1w4kdy0m4md2j0nf3shn76v9vxvjqa9sxl4j06bk08yn9icnj72k"))))
10711 (build-system ant-build-system)
10712 (arguments
10713 (list
10714 #:tests? #f
10715 #:jar-name "org.apache.felix.framework.jar"
10716 #:source-dir "framework/src/main/java"
10717 #:phases
10718 #~(modify-phases %standard-phases
10719 (add-after 'unpack 'create-animal-sniffer-stub
10720 (lambda _
10721 ;; Felix uses this compile-time Maven annotation to suppress
10722 ;; JRE compatibility warnings. It has no runtime effect.
10723 (mkdir-p "framework/src/main/java/org/codehaus/mojo/animal_sniffer")
10724 (call-with-output-file
10725 "framework/src/main/java/org/codehaus/mojo/animal_sniffer/IgnoreJRERequirement.java"
10726 (lambda (port)
10727 (display (string-append
10728 "package org.codehaus.mojo.animal_sniffer;\n"
10729 "import java.lang.annotation.*;\n"
10730 "@Retention(RetentionPolicy.CLASS)\n"
10731 "@Target({ElementType.METHOD,"
10732 " ElementType.CONSTRUCTOR,"
10733 " ElementType.TYPE})\n"
10734 "public @interface IgnoreJRERequirement {}\n")
10735 port)))))
10736 (add-after 'build 'add-service-descriptor-and-resources
10737 (lambda _
10738 ;; Include the upstream service descriptors and resources that
10739 ;; Felix expects in the framework jar.
10740 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10741 "-C" "framework/src/main/resources" "META-INF/services")
10742 ;; Felix reads default.properties at startup to determine
10743 ;; system packages. The source file uses Maven's ${dollar}
10744 ;; placeholder, so replace it here.
10745 (substitute* "framework/src/main/resources/default.properties"
10746 (("\\$\\{dollar\\}") "$"))
10747 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10748 "-C" "framework/src/main/resources" "default.properties")
10749 ;; Compile accessor.src (a java.net.Accessor class used by
10750 ;; SecureAction to bypass access controls) and include the
10751 ;; compiled bytecode as accessor.bytes.
10752 (mkdir-p "build/accessor-src/java/net")
10753 (copy-file
10754 "framework/src/main/resources/org/apache/felix/framework/util/accessor.src"
10755 "build/accessor-src/java/net/Accessor.java")
10756 (mkdir-p "build/accessor-out")
10757 (invoke "javac"
10758 "-d" "build/accessor-out"
10759 "build/accessor-src/java/net/Accessor.java")
10760 (copy-file "build/accessor-out/java/net/Accessor.class"
10761 "build/accessor.bytes")
10762 (invoke "jar" "uf" "build/jar/org.apache.felix.framework.jar"
10763 "-C" "build"
10764 "accessor.bytes")))
10765 (add-after 'add-service-descriptor-and-resources
10766 'fix-accessor-path
10767 (lambda _
10768 ;; accessor.bytes must be at
10769 ;; org/apache/felix/framework/util/accessor.bytes
10770 (let ((jar "build/jar/org.apache.felix.framework.jar"))
10771 (mkdir-p "build/accessor-pkg/org/apache/felix/framework/util")
10772 (copy-file "build/accessor.bytes"
10773 "build/accessor-pkg/org/apache/felix/framework/util/accessor.bytes")
10774 (invoke "jar" "uf" jar
10775 "-C" "build/accessor-pkg"
10776 "org/apache/felix/framework/util/accessor.bytes"))))
10777 (add-before 'install 'create-pom
10778 (generate-pom.xml "pom.xml" "org.apache.felix"
10779 "org.apache.felix.framework" #$version))
10780 (replace 'install (install-from-pom "pom.xml")))))
10781 (inputs (list java-osgi-annotation-8.1.0
10782 java-osgi-core-8.0.0
10783 java-felix-resolver-2))
10784 (home-page "https://felix.apache.org/")
10785 (synopsis "Apache Felix OSGi framework")
10786 (description "Apache Felix is a community effort to implement the OSGi
10787Framework and Service platform.")
10788 (license license:asl2.0)))
10789
10790(define-public java-felix-main-7.0.5
10791 (package
10792 (name "java-felix-main")
10793 (version "7.0.5")
10794 (source (origin
10795 (method git-fetch)
10796 (uri (git-reference
10797 (url "https://github.com/apache/felix-dev")
10798 (commit (string-append "org.apache.felix.main-"
10799 version))))
10800 (modules '((guix build utils)))
10801 (snippet
10802 '(begin
10803 (for-each delete-file
10804 (find-files "." "\\.jar$"))
10805 #t))
10806 (file-name (git-file-name name version))
10807 (sha256
10808 (base32
10809 "04miqvr8lqng4a0n6zry8rary8hrcbrq41652adyz85znmcp1z59"))))
10810 (build-system ant-build-system)
10811 (arguments
10812 (list
10813 #:tests? #f
10814 #:jar-name "org.apache.felix.main.jar"
10815 #:source-dir "main/src/main/java"
10816 #:phases
10817 #~(modify-phases %standard-phases
10818 (add-after 'build 'create-uber-jar
10819 (lambda* (#:key inputs #:allow-other-keys)
10820 ;; org.apache.felix.main is an uber jar combining framework,
10821 ;; resolver, and osgi-core classes with Main and AutoProcessor.
10822 (let ((jar (canonicalize-path
10823 "build/jar/org.apache.felix.main.jar"))
10824 (work-dir (mkdtemp "/tmp/felix-merge-XXXXXX")))
10825 (with-directory-excursion work-dir
10826 (for-each
10827 (lambda (input-name)
10828 (for-each
10829 (lambda (dep-jar)
10830 (invoke "jar" "xf" dep-jar))
10831 (find-files (assoc-ref inputs input-name)
10832 "\\.jar$")))
10833 '("java-felix-framework"
10834 "java-felix-resolver"
10835 "java-osgi-core"))
10836 ;; Remove metadata that would conflict with the
10837 ;; main jar's own manifest.
10838 (when (file-exists? "META-INF/MANIFEST.MF")
10839 (delete-file "META-INF/MANIFEST.MF"))
10840 (when (file-exists? "META-INF/maven")
10841 (delete-file-recursively "META-INF/maven"))
10842 (invoke "jar" "uf" jar "-C" work-dir ".")))))
10843 (add-after 'create-uber-jar 'add-service-descriptor
10844 (lambda _
10845 (let ((jar "build/jar/org.apache.felix.main.jar"))
10846 (mkdir-p "META-INF/services")
10847 (call-with-output-file
10848 "META-INF/services/org.osgi.framework.launch.FrameworkFactory"
10849 (lambda (port)
10850 (display
10851 "org.apache.felix.framework.FrameworkFactory\n" port)))
10852 (invoke "jar" "uf" jar "-C" "." "META-INF/services"))))
10853 (add-before 'install 'create-pom
10854 (generate-pom.xml "pom.xml" "org.apache.felix"
10855 "org.apache.felix.main" #$version))
10856 (replace 'install (install-from-pom "pom.xml")))))
10857 (inputs (list java-felix-framework-7
10858 java-felix-resolver-2
10859 java-osgi-core-8.0.0))
10860 (home-page "https://felix.apache.org/")
10861 (synopsis "Apache Felix Main distribution jar")
10862 (description "Apache Felix Main is the standard distribution jar for
10863the Apache Felix OSGi framework. It bundles the framework, resolver, and
10864OSGi core classes into a single jar with a standalone launcher.")
10865 (license license:asl2.0)))
10866
10867(define-public java-osgi-service-component-annotations
10868 (package
10869 (name "java-osgi-service-component-annotations")
10870 (version "1.3.0")
10871 (source (origin
10872 (method url-fetch)
10873 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10874 "org.osgi.service.component.annotations/"
10875 version "/org.osgi.service.component.annotations-"
10876 version "-sources.jar"))
10877 (sha256
10878 (base32
10879 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
10880 (build-system ant-build-system)
10881 (arguments
10882 `(#:jar-name "osgi-service-component-annotations.jar"
10883 #:tests? #f)); no tests
10884 (inputs
10885 `(("annotation" ,java-osgi-annotation)))
10886 (home-page "https://www.osgi.org")
10887 (synopsis "Support annotations for osgi-service-component")
10888 (description
10889 "OSGi, for Open Services Gateway initiative framework, is a module system
10890and service platform for the Java programming language. This package contains
10891the support annotations for osgi-service-component.")
10892 (license license:asl2.0)))
10893
10894(define-public java-osgi-dto
10895 (package
10896 (name "java-osgi-dto")
10897 (version "1.0.0")
10898 (source (origin
10899 (method url-fetch)
10900 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10901 "org.osgi.dto/" version "/org.osgi.dto-"
10902 version "-sources.jar"))
10903 (sha256
10904 (base32
10905 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
10906 (build-system ant-build-system)
10907 (arguments
10908 `(#:jar-name "osgi-dto.jar"
10909 #:tests? #f)); no tests
10910 (inputs
10911 `(("annotation" ,java-osgi-annotation)))
10912 (home-page "https://www.osgi.org")
10913 (synopsis "Data Transfer Objects")
10914 (description
10915 "OSGi, for Open Services Gateway initiative framework, is a module system
10916and service platform for the Java programming language. This package contains
10917the Data Transfer Objects. It is easily serializable having only public fields
10918of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
10919Map and array aggregates may also be used. The aggregates must only hold
10920objects of the listed types or aggregates.")
10921 (license license:asl2.0)))
10922
10923(define-public java-osgi-resource
10924 (package
10925 (name "java-osgi-resource")
10926 (version "1.0.0")
10927 (source (origin
10928 (method url-fetch)
10929 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10930 "org.osgi.resource/"
10931 version "/org.osgi.resource-"
10932 version "-sources.jar"))
10933 (sha256
10934 (base32
10935 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
10936 (build-system ant-build-system)
10937 (arguments
10938 `(#:jar-name "osgi-resource.jar"
10939 #:tests? #f)); no tests
10940 (inputs
10941 `(("annotation" ,java-osgi-annotation)
10942 ("dto" ,java-osgi-dto)))
10943 (home-page "https://www.osgi.org")
10944 (synopsis "OSGI Resource")
10945 (description
10946 "OSGi, for Open Services Gateway initiative framework, is a module system
10947and service platform for the Java programming language. This package contains
10948the definition of common types in osgi packages.")
10949 (license license:asl2.0)))
10950
10951(define-public java-osgi-namespace-contract
10952 (package
10953 (name "java-osgi-namespace-contract")
10954 (version "1.0.0")
10955 (source (origin
10956 (method url-fetch)
10957 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10958 "org.osgi.namespace.contract/"
10959 version "/org.osgi.namespace.contract-"
10960 version "-sources.jar"))
10961 (sha256
10962 (base32
10963 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
10964 (build-system ant-build-system)
10965 (inputs
10966 `(("resource" ,java-osgi-resource)
10967 ("annotation" ,java-osgi-annotation)))
10968 (arguments
10969 `(#:jar-name "osgi-namespace-contract.jar"
10970 #:tests? #f)); no tests
10971 (home-page "https://www.osgi.org")
10972 (synopsis "Contract Capability and Requirement Namespace")
10973 (description
10974 "OSGi, for Open Services Gateway initiative framework, is a module system
10975and service platform for the Java programming language. This package contains
10976the names for the attributes and directives for a namespace with contracts.")
10977 (license license:asl2.0)))
10978
10979(define-public java-osgi-namespace-extender
10980 (package
10981 (name "java-osgi-namespace-extender")
10982 (version "1.0.1")
10983 (source (origin
10984 (method url-fetch)
10985 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
10986 "org.osgi.namespace.extender/"
10987 version "/org.osgi.namespace.extender-"
10988 version "-sources.jar"))
10989 (sha256
10990 (base32
10991 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
10992 (build-system ant-build-system)
10993 (inputs
10994 `(("resource" ,java-osgi-resource)
10995 ("annotation" ,java-osgi-annotation)))
10996 (arguments
10997 `(#:jar-name "osgi-namespace-extendent.jar"
10998 #:tests? #f)); no tests
10999 (home-page "https://www.osgi.org")
11000 (synopsis "Extender Capability and Requirement Namespace")
11001 (description
11002 "OSGi, for Open Services Gateway initiative framework, is a module system
11003and service platform for the Java programming language. This package contains
11004the names for the attributes and directives for an extender namespace.")
11005 (license license:asl2.0)))
11006
11007(define-public java-osgi-namespace-service
11008 (package
11009 (name "java-osgi-namespace-service")
11010 (version "1.0.0")
11011 (source (origin
11012 (method url-fetch)
11013 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11014 "org.osgi.namespace.service/"
11015 version "/org.osgi.namespace.service-"
11016 version "-sources.jar"))
11017 (sha256
11018 (base32
11019 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
11020 (build-system ant-build-system)
11021 (inputs
11022 `(("resource" ,java-osgi-resource)
11023 ("annotation" ,java-osgi-annotation)))
11024 (arguments
11025 `(#:jar-name "osgi-namespace-service.jar"
11026 #:tests? #f)); no tests
11027 (home-page "https://www.osgi.org")
11028 (synopsis "Service Capability and Requirement Namespace")
11029 (description
11030 "OSGi, for Open Services Gateway initiative framework, is a module system
11031and service platform for the Java programming language. This package contains
11032the names for the attributes and directives for a service namespace.")
11033 (license license:asl2.0)))
11034
11035(define-public java-osgi-util-function
11036 (package
11037 (name "java-osgi-util-function")
11038 (version "1.0.0")
11039 (source (origin
11040 (method url-fetch)
11041 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11042 "org.osgi.util.function/"
11043 version "/org.osgi.util.function-"
11044 version "-sources.jar"))
11045 (sha256
11046 (base32
11047 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
11048 (build-system ant-build-system)
11049 (arguments
11050 `(#:jar-name "osgi-util-function.jar"
11051 #:tests? #f)); no tests
11052 (inputs
11053 `(("annotation" ,java-osgi-annotation)))
11054 (home-page "https://www.osgi.org")
11055 (synopsis "OSGI Util Function")
11056 (description
11057 "OSGi, for Open Services Gateway initiative framework, is a module system
11058and service platform for the Java programming language. This package contains
11059an interface for a function that accepts a single argument and produces a result.")
11060 (license license:asl2.0)))
11061
11062(define-public java-osgi-util-promise
11063 (package
11064 (name "java-osgi-util-promise")
11065 (version "1.0.0")
11066 (source (origin
11067 (method url-fetch)
11068 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11069 "org.osgi.util.promise/"
11070 version "/org.osgi.util.promise-"
11071 version "-sources.jar"))
11072 (sha256
11073 (base32
11074 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
11075 (build-system ant-build-system)
11076 (arguments
11077 `(#:jar-name "osgi-util-promise.jar"
11078 #:tests? #f)); no tests
11079 (inputs
11080 `(("annotation" ,java-osgi-annotation)
11081 ("function" ,java-osgi-util-function)))
11082 (home-page "https://www.osgi.org")
11083 (synopsis "Promise of a value")
11084 (description
11085 "OSGi, for Open Services Gateway initiative framework, is a module system
11086and service platform for the Java programming language. This package contains
11087an interface and utilitary classes for promises. A Promise represents a future
11088value. It handles the interactions for asynchronous processing.")
11089 (license license:asl2.0)))
11090
11091(define-public java-osgi-service-metatype-annotations
11092 (package
11093 (name "java-osgi-service-metatype-annotations")
11094 (version "1.3.0")
11095 (source (origin
11096 (method url-fetch)
11097 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11098 "org.osgi.service.metatype.annotations/"
11099 version "/org.osgi.service.metatype.annotations-"
11100 version "-sources.jar"))
11101 (sha256
11102 (base32
11103 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
11104 (build-system ant-build-system)
11105 (arguments
11106 `(#:jar-name "osgi-service-metatype-annotations.jar"
11107 #:tests? #f)); no tests
11108 (inputs
11109 `(("annotation" ,java-osgi-annotation)))
11110 (home-page "https://www.osgi.org")
11111 (synopsis "Support annotations for metatype")
11112 (description
11113 "OSGi, for Open Services Gateway initiative framework, is a module system
11114and service platform for the Java programming language. This package contains
11115the support annotations for metatype.")
11116 (license license:asl2.0)))
11117
11118(define-public java-osgi-service-repository
11119 (package
11120 (name "java-osgi-service-repository")
11121 (version "1.1.0")
11122 (source (origin
11123 (method url-fetch)
11124 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11125 "org.osgi.service.repository/"
11126 version "/org.osgi.service.repository-"
11127 version "-sources.jar"))
11128 (sha256
11129 (base32
11130 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
11131 (build-system ant-build-system)
11132 (arguments
11133 `(#:jar-name "osgi-service-repository.jar"
11134 #:tests? #f)); no tests
11135 (inputs
11136 `(("annotation" ,java-osgi-annotation)
11137 ("promise" ,java-osgi-util-promise)
11138 ("resource" ,java-osgi-resource)))
11139 (home-page "https://www.osgi.org")
11140 (synopsis "OSGI service repository")
11141 (description
11142 "OSGi, for Open Services Gateway initiative framework, is a module system
11143and service platform for the Java programming language. This package contains
11144a repository service that contains resources.")
11145 (license license:asl2.0)))
11146
11147(define-public java-osgi-framework
11148 (package
11149 (name "java-osgi-framework")
11150 (version "1.8.0")
11151 (source (origin
11152 (method url-fetch)
11153 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11154 "org.osgi.framework/" version "/org.osgi.framework-"
11155 version "-sources.jar"))
11156 (sha256
11157 (base32
11158 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
11159 (build-system ant-build-system)
11160 (arguments
11161 `(#:jar-name "osgi-framework.jar"
11162 #:tests? #f)); no tests
11163 (inputs
11164 `(("annotation" ,java-osgi-annotation)
11165 ("resource" ,java-osgi-resource)
11166 ("dto" ,java-osgi-dto)))
11167 (home-page "https://www.osgi.org")
11168 (synopsis "OSGi framework")
11169 (description
11170 "OSGi, for Open Services Gateway initiative framework, is a module system
11171and service platform for the Java programming language.")
11172 (license license:asl2.0)))
11173
11174(define-public java-osgi-service-log
11175 (package
11176 (name "java-osgi-service-log")
11177 (version "1.3.0")
11178 (source (origin
11179 (method url-fetch)
11180 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11181 "org.osgi.service.log/"
11182 version "/org.osgi.service.log-"
11183 version "-sources.jar"))
11184 (sha256
11185 (base32
11186 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
11187 (build-system ant-build-system)
11188 (arguments
11189 `(#:jar-name "osgi-service-log.jar"
11190 #:tests? #f)); no tests
11191 (inputs
11192 (list java-osgi-framework))
11193 (home-page "https://www.osgi.org")
11194 (synopsis "Provides methods for bundles to write messages to the log")
11195 (description
11196 "OSGi, for Open Services Gateway initiative framework, is a module system
11197and service platform for the Java programming language. This package contains
11198the log service.")
11199 (license license:asl2.0)))
11200
11201(define-public java-osgi-service-jdbc
11202 (package
11203 (name "java-osgi-service-jdbc")
11204 (version "1.0.0")
11205 (source (origin
11206 (method url-fetch)
11207 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11208 "org.osgi.service.jdbc/"
11209 version "/org.osgi.service.jdbc-"
11210 version "-sources.jar"))
11211 (sha256
11212 (base32
11213 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
11214 (build-system ant-build-system)
11215 (arguments
11216 `(#:jar-name "osgi-service-jdbc.jar"
11217 #:tests? #f)); no tests
11218 (home-page "https://www.osgi.org")
11219 (synopsis "Factory for JDBC connection factories")
11220 (description
11221 "OSGi, for Open Services Gateway initiative framework, is a module system
11222and service platform for the Java programming language. This package contains
11223a factory for JDBC connection factories. There are 3 preferred connection
11224factories for getting JDBC connections:
11225
11226@itemize
11227@item @code{javax.sql.DataSource};
11228@item @code{javax.sql.ConnectionPoolDataSource};
11229@item @code{javax.sql.XADataSource}.
11230@end itemize")
11231 (license license:asl2.0)))
11232
11233(define-public java-osgi-service-resolver
11234 (package
11235 (name "java-osgi-service-resolver")
11236 (version "1.0.1")
11237 (source (origin
11238 (method url-fetch)
11239 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11240 "org.osgi.service.resolver/"
11241 version "/org.osgi.service.resolver-"
11242 version "-sources.jar"))
11243 (sha256
11244 (base32
11245 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
11246 (build-system ant-build-system)
11247 (arguments
11248 `(#:jar-name "osgi-service-resolver.jar"
11249 #:tests? #f)); no tests
11250 (inputs
11251 `(("annotation" ,java-osgi-annotation)
11252 ("resource" ,java-osgi-resource)))
11253 (home-page "https://www.osgi.org")
11254 (synopsis "OSGI Resolver service")
11255 (description
11256 "OSGi, for Open Services Gateway initiative framework, is a module system
11257and service platform for the Java programming language. This package contains
11258a resolver service that resolves the specified resources in the context supplied
11259by the caller.")
11260 (license license:asl2.0)))
11261
11262(define-public java-osgi-util-tracker
11263 (package
11264 (name "java-osgi-util-tracker")
11265 (version "1.5.1")
11266 (source (origin
11267 (method url-fetch)
11268 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11269 "org.osgi.util.tracker/"
11270 version "/org.osgi.util.tracker-"
11271 version "-sources.jar"))
11272 (sha256
11273 (base32
11274 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
11275 (build-system ant-build-system)
11276 (arguments
11277 `(#:jar-name "osgi-util-tracker.jar"
11278 #:tests? #f)); no tests
11279 (inputs
11280 `(("framework" ,java-osgi-framework)
11281 ("annotation" ,java-osgi-annotation)))
11282 (home-page "https://www.osgi.org")
11283 (synopsis "Bundle tracking")
11284 (description
11285 "OSGi, for Open Services Gateway initiative framework, is a module system
11286and service platform for the Java programming language. This package contains
11287bundle tracking utility classes.")
11288 (license license:asl2.0)))
11289
11290(define-public java-osgi-service-cm
11291 (package
11292 (name "java-osgi-service-cm")
11293 (version "1.5.0")
11294 (source (origin
11295 (method url-fetch)
11296 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11297 "org.osgi.service.cm/"
11298 version "/org.osgi.service.cm-"
11299 version "-sources.jar"))
11300 (sha256
11301 (base32
11302 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
11303 (build-system ant-build-system)
11304 (arguments
11305 `(#:jar-name "osgi-service-cm.jar"
11306 #:tests? #f)); no tests
11307 (inputs
11308 `(("framework" ,java-osgi-framework)
11309 ("annotation" ,java-osgi-annotation)))
11310 (home-page "https://www.osgi.org")
11311 (synopsis "OSGI Configuration Management")
11312 (description
11313 "OSGi, for Open Services Gateway initiative framework, is a module system
11314and service platform for the Java programming language. This package contains
11315utility classes for the configuration of services.")
11316 (license license:asl2.0)))
11317
11318(define-public java-osgi-service-packageadmin
11319 (package
11320 (name "java-osgi-service-packageadmin")
11321 (version "1.2.0")
11322 (source (origin
11323 (method url-fetch)
11324 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
11325 "org.osgi.service.packageadmin/"
11326 version "/org.osgi.service.packageadmin-"
11327 version "-sources.jar"))
11328 (sha256
11329 (base32
11330 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
11331 (build-system ant-build-system)
11332 (arguments
11333 `(#:jar-name "osgi-service-packageadmin.jar"
11334 #:tests? #f)); no tests
11335 (inputs
11336 `(("framework" ,java-osgi-framework)))
11337 (home-page "https://www.osgi.org")
11338 (synopsis "OSGI Package Administration")
11339 (description
11340 "OSGi, for Open Services Gateway initiative framework, is a module system
11341and service platform for the Java programming language. This package contains
11342the packageadmin service.")
11343 (license license:asl2.0)))
11344
11345(define-public java-ops4j-base-lang
11346 (package
11347 (name "java-ops4j-base-lang")
11348 (version "1.5.0")
11349 (source (origin
11350 (method url-fetch)
11351 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
11352 "archive/base-" version ".tar.gz"))
11353 (sha256
11354 (base32
11355 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
11356 (build-system ant-build-system)
11357 (arguments
11358 `(#:jar-name "java-ops4j-base-lang.jar"
11359 #:source-dir "ops4j-base-lang/src/main/java"
11360 #:tests? #f; no tests
11361 #:phases
11362 (modify-phases %standard-phases
11363 (add-before 'build 'add-test-file
11364 (lambda _
11365 ;; That file is required by a test in ops4j-pax-exam-core-spi
11366 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
11367 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
11368 (lambda _
11369 (display
11370 (string-append
11371 "version=" ,version "\n"
11372 "groupId=org.ops4j.base"
11373 "artifactId=ops4j-base-lang\n"))))
11374 #t)))))
11375 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
11376 (synopsis "Utility classes and extensions to be used in OPS4J projects")
11377 (description "OPS4J stands for Open Participation Software for Java. This
11378package contains utilities and extensions related to @code{java.lang}.")
11379 (license license:asl2.0)))
11380
11381(define-public java-ops4j-base-monitors
11382 (package
11383 (inherit java-ops4j-base-lang)
11384 (name "java-ops4j-base-monitors")
11385 (arguments
11386 `(#:jar-name "java-ops4j-base-monitors.jar"
11387 #:source-dir "ops4j-base-monitors/src/main/java"
11388 #:tests? #f)); no tests
11389 (inputs
11390 `(("lang" ,java-ops4j-base-lang)))
11391 (description "OPS4J stands for Open Participation Software for Java. This
11392package contains utilities and extensions related to monitoring.")))
11393
11394(define-public java-ops4j-base-io
11395 (package
11396 (inherit java-ops4j-base-lang)
11397 (name "java-ops4j-base-io")
11398 (arguments
11399 `(#:jar-name "java-ops4j-base-io.jar"
11400 #:source-dir "ops4j-base-io/src/main/java"
11401 #:test-dir "ops4j-base-io/src/test"
11402 #:test-exclude
11403 (list "**/ListerTest.java")))
11404 (inputs
11405 `(("lang" ,java-ops4j-base-monitors)
11406 ("lang" ,java-ops4j-base-lang)))
11407 (native-inputs
11408 `(("junit" ,java-junit)
11409 ("hamcrest" ,java-hamcrest-core)))
11410 (description "OPS4J stands for Open Participation Software for Java. This
11411package contains utilities and extensions related to handling streams and files.")))
11412
11413(define-public java-ops4j-base-util
11414 (package
11415 (inherit java-ops4j-base-lang)
11416 (name "java-ops4j-base-util")
11417 (arguments
11418 `(#:jar-name "java-ops4j-base-util.jar"
11419 #:source-dir "ops4j-base-util/src/main/java"
11420 #:test-dir "ops4j-base-util/src/test"))
11421 (inputs
11422 `(("lang" ,java-ops4j-base-lang)))
11423 (native-inputs
11424 `(("junit" ,java-junit)))
11425 (description "OPS4J stands for Open Participation Software for Java. This
11426package contains utilities and extensions related to environment, i18n and
11427mime types.")))
11428
11429(define-public java-ops4j-base-util-property
11430 (package
11431 (inherit java-ops4j-base-lang)
11432 (name "java-ops4j-base-util-property")
11433 (arguments
11434 `(#:jar-name "java-ops4j-base-util-property.jar"
11435 #:source-dir "ops4j-base-util-property/src/main/java"
11436 #:tests? #f)); no tests
11437 (inputs
11438 `(("lang" ,java-ops4j-base-lang)
11439 ("util" ,java-ops4j-base-util)))
11440 (description "OPS4J stands for Open Participation Software for Java. This
11441package contains utilities and extensions related to resolving properties from
11442different sources.")))
11443
11444(define-public java-ops4j-base-store
11445 (package
11446 (inherit java-ops4j-base-lang)
11447 (name "java-ops4j-base-store")
11448 (arguments
11449 `(#:jar-name "java-ops4j-base-store.jar"
11450 #:source-dir "ops4j-base-store/src/main/java"
11451 #:tests? #f)); no tests
11452 (inputs
11453 `(("lang" ,java-ops4j-base-lang)
11454 ("slf4j" ,java-slf4j-api)
11455 ("io" ,java-ops4j-base-io)))
11456 (description "OPS4J stands for Open Participation Software for Java. This
11457package contains utilities for storing and retrieving data from an
11458@code{InputStream}.")))
11459
11460(define-public java-ops4j-base-spi
11461 (package
11462 (inherit java-ops4j-base-lang)
11463 (name "java-ops4j-base-spi")
11464 (arguments
11465 `(#:jar-name "java-ops4j-base-spi.jar"
11466 #:source-dir "ops4j-base-spi/src/main/java"
11467 #:test-dir "ops4j-base-spi/src/test"))
11468 (native-inputs
11469 `(("junit" ,java-junit)
11470 ("hamcrest" ,java-hamcrest-core)))
11471 (description "OPS4J stands for Open Participation Software for Java. This
11472package contains utilities for obtaining services via the Java SE 6
11473@code{ServiceLoader}.")))
11474
11475(define-public java-aqute-bnd-annotation
11476 (package
11477 (name "java-aqute-bnd-annotation")
11478 (version "3.5.0")
11479 (source (origin
11480 (method url-fetch)
11481 (uri (string-append "https://github.com/bndtools/bnd/archive/"
11482 version ".REL.tar.gz"))
11483 (file-name (string-append name "-" version ".tar.gz"))
11484 (sha256
11485 (base32
11486 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
11487 (build-system ant-build-system)
11488 (arguments
11489 `(#:jar-name "java-aqute-bnd-annotation.jar"
11490 #:source-dir "biz.aQute.bnd.annotation/src"
11491 #:tests? #f)); empty test dir
11492 (home-page "https://bnd.bndtools.org/")
11493 (synopsis "Tools for OSGi")
11494 (description "Bnd is a swiss army knife for OSGi, it creates manifest
11495headers based on analyzing the class code, it verifies the project settings,
11496it manages project dependencies, gives diffs jars, and much more.")
11497 (license license:asl2.0)))
11498
11499(define-public java-aqute-libg
11500 (package
11501 (inherit java-aqute-bnd-annotation)
11502 (name "java-aqute-libg")
11503 (arguments
11504 `(#:jar-name "java-aqute-libg.jar"
11505 ;; The build fails when source/target more recent than 1.7. This
11506 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
11507 ;;
11508 ;; It is closed as won't fix. There is no way to change the source
11509 ;; so that it works on 1.8, and still works on 1.6, the upstream
11510 ;; target. It work fine on 1.7, so we use 1.7.
11511 #:make-flags (list "-Dant.build.javac.source=1.7"
11512 "-Dant.build.javac.target=1.7")
11513 #:phases
11514 (modify-phases %standard-phases
11515 (add-before 'configure 'chdir
11516 ;; Change to aQute.libg directory, so that the relative
11517 ;; paths in the tests aren't broken.
11518 (lambda _
11519 (chdir "aQute.libg")
11520 #t))
11521 (add-before 'check 'create-test-directory
11522 ;; Copy the test directory to test/java, since that's where
11523 ;; ant-build-system's default project in build.xml expects to find
11524 ;; the test classes. Leave a copy in the original place to not
11525 ;; break paths in tests.
11526 (lambda _
11527 (mkdir "src/test")
11528 (copy-recursively "test" "src/test/java")
11529 #t)))))
11530 (inputs
11531 `(("slf4j" ,java-slf4j-api)
11532 ("osgi-annot" ,java-osgi-annotation)
11533 ("java-osgi-cmpn" ,java-osgi-cmpn)
11534 ("osgi" ,java-osgi-core)))
11535 (native-inputs
11536 `(("hamcrest" ,java-hamcrest-core)
11537 ("java-junit" ,java-junit)))))
11538
11539(define-public java-aqute-bndlib
11540 (package
11541 (inherit java-aqute-bnd-annotation)
11542 (name "java-aqute-bndlib")
11543 (arguments
11544 `(#:jar-name "java-bndlib.jar"
11545 #:source-dir "biz.aQute.bndlib/src"
11546 #:tests? #f)); no tests
11547 (inputs
11548 `(("slf4j" ,java-slf4j-api)
11549 ("osgi-annot" ,java-osgi-annotation)
11550 ("java-aqute-libg" ,java-aqute-libg)
11551 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
11552 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
11553 ("java-osgi-service-repository" ,java-osgi-service-repository)
11554 ("java-osgi-service-log" ,java-osgi-service-log)
11555 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
11556 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
11557 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
11558 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
11559 ("promise" ,java-osgi-util-promise)
11560 ("osgi" ,java-osgi-core)))))
11561
11562(define-public java-ops4j-pax-tinybundles
11563 (package
11564 (name "java-ops4j-pax-tinybundles")
11565 (version "2.1.1")
11566 (source (origin
11567 (method url-fetch)
11568 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
11569 "archive/tinybundles-" version ".tar.gz"))
11570 (sha256
11571 (base32
11572 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
11573 (arguments
11574 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
11575 #:source-dir "src/main/java"
11576 #:test-exclude
11577 ;; Abstract base classes for other tests
11578 (list "**/BndTest.java" "**/CoreTest.java")
11579 #:phases
11580 (modify-phases %standard-phases
11581 (add-before 'check 'fix-version
11582 (lambda _
11583 ;; This test has a reference to an old version of bndlib we are not
11584 ;; packaging. It uses the version referenced in pom.xml. We replace
11585 ;; it with our own version.
11586 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
11587 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
11588 ,(package-version java-aqute-bndlib)))
11589 #t)))))
11590 (inputs
11591 `(("lang" ,java-ops4j-base-lang)
11592 ("io" ,java-ops4j-base-io)
11593 ("store" ,java-ops4j-base-store)
11594 ("slf4j" ,java-slf4j-api)
11595 ("libg" ,java-aqute-libg)
11596 ("bndlib" ,java-aqute-bndlib)))
11597 (native-inputs
11598 `(("junit" ,java-junit)
11599 ("hamcrest" ,java-hamcrest-core)
11600 ("log4j" ,java-log4j-api)
11601 ("bndannotation" ,java-aqute-bnd-annotation)
11602 ("framework" ,java-osgi-framework)))
11603 (build-system ant-build-system)
11604 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
11605 (synopsis "Java APIs to create OSGi related artifacts")
11606 (description "Tinybundles is all about creating OSGi related artifacts like
11607Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
11608to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
11609other hand, this library can be a foundation of real end user tools that need
11610to create those artifacts.")
11611 (license license:asl2.0)))
11612
11613(define-public java-ops4j-pax-exam-core
11614 (package
11615 (name "java-ops4j-pax-exam-core")
11616 (version "4.11.0")
11617 (source (origin
11618 (method url-fetch)
11619 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
11620 "archive/exam-reactor-" version ".tar.gz"))
11621 (sha256
11622 (base32
11623 "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26"))))
11624 (arguments
11625 (list #:jar-name "java-ops4j-pax-exam-core.jar"
11626 #:source-dir "core/pax-exam/src/main/java"
11627 #:test-dir "core/pax-exam/src/test"))
11628 (inputs
11629 (list java-slf4j-api
11630 java-ops4j-base-lang
11631 java-ops4j-base-io
11632 java-ops4j-base-util-property
11633 java-ops4j-base-store
11634 java-osgi-core))
11635 (native-inputs
11636 (list java-junit
11637 java-hamcrest-core))
11638 (build-system ant-build-system)
11639 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
11640 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
11641 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
11642the user take control of the OSGi framework, the test framework (e.g. JUnit) and
11643the system under test at the same time.")
11644 (license license:asl2.0)))
11645
11646(define-public java-ops4j-pax-exam-core-spi
11647 (package
11648 (inherit java-ops4j-pax-exam-core)
11649 (name "java-ops4j-pax-exam-core-spi")
11650 (arguments
11651 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
11652 #:source-dir "src/main/java"
11653 #:test-exclude
11654 (list
11655 ;; Abstract base class, not a test
11656 "**/BaseStagedReactorTest.java"
11657 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
11658 "**/WarBuilderTest.java")
11659 #:phases
11660 (modify-phases %standard-phases
11661 (add-before 'configure 'chdir
11662 (lambda _
11663 ;; Tests assume we are in this directory
11664 (chdir "core/pax-exam-spi")
11665 #t))
11666 (add-before 'check 'fix-tests
11667 (lambda _
11668 ;; One test checks that this file is present.
11669 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
11670 (with-output-to-file
11671 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
11672 (lambda _
11673 (display
11674 (string-append "artifactId = pax-exam-spi\n"
11675 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
11676 ;; Maven puts compilation results in the target directory, while we
11677 ;; put them in the build directory.
11678 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
11679 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
11680 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
11681 (("target") "build"))
11682 ;; One test is expected to fail, but it doesn't throw the expected exception
11683 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
11684 (("AssertionError") "IllegalArgumentException"))
11685 #t)))))
11686 (inputs
11687 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
11688 ("lang" ,java-ops4j-base-lang)
11689 ("monitors" ,java-ops4j-base-monitors)
11690 ("store" ,java-ops4j-base-store)
11691 ("io" ,java-ops4j-base-io)
11692 ("spi" ,java-ops4j-base-spi)
11693 ("osgi" ,java-osgi-core)
11694 ("slf4j" ,java-slf4j-api)
11695 ("tinybundles" ,java-ops4j-pax-tinybundles)))
11696 (native-inputs
11697 `(("mockito" ,java-mockito-1)
11698 ("junit" ,java-junit)
11699 ("hamcrest" ,java-hamcrest-core)
11700 ("cglib" ,java-cglib)
11701 ("objenesis" ,java-objenesis)))))
11702
11703(define-public java-ops4j-pax-exam-core-junit
11704 (package
11705 (inherit java-ops4j-pax-exam-core)
11706 (name "java-ops4j-pax-exam-core-junit")
11707 (arguments
11708 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
11709 #:source-dir "drivers/pax-exam-junit4/src/main/java"
11710 #:tests? #f)); no tests
11711 (inputs
11712 `(("junit" ,java-junit)
11713 ("slf4j" ,java-slf4j-api)
11714 ("core" ,java-ops4j-pax-exam-core)
11715 ("spi" ,java-ops4j-pax-exam-core-spi)))
11716 (native-inputs '())))
11717
11718(define-public java-fasterxml-jackson-annotations
11719 (package
11720 (name "java-fasterxml-jackson-annotations")
11721 (version "2.9.4")
11722 (source (origin
11723 (method url-fetch)
11724 (uri (string-append "https://github.com/FasterXML/"
11725 "jackson-annotations/archive/"
11726 "jackson-annotations-" version ".tar.gz"))
11727 (sha256
11728 (base32
11729 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
11730 (build-system ant-build-system)
11731 (arguments
11732 `(#:jar-name "jackson-annotations.jar"
11733 #:source-dir "src/main/java"
11734 #:test-dir "src/test"))
11735 (native-inputs
11736 `(("junit" ,java-junit)))
11737 (home-page "https://github.com/FasterXML/jackson-annotations")
11738 (synopsis "General purpose annotations for the Jackson Data Processor")
11739 (description "This package contains general purpose annotations for the
11740Jackson Data Processor, used on value and handler types. The only annotations
11741not included are ones that require dependency to the Databind package.")
11742 (license license:asl2.0)))
11743
11744(define-public java-fasterxml-jackson-core
11745 (package
11746 (name "java-fasterxml-jackson-core")
11747 (version "2.9.4")
11748 (source (origin
11749 (method url-fetch)
11750 (uri (string-append "https://github.com/FasterXML/"
11751 "jackson-core/archive/"
11752 "jackson-core-" version ".tar.gz"))
11753 (sha256
11754 (base32
11755 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
11756 (build-system ant-build-system)
11757 (arguments
11758 `(#:jar-name "jackson-core.jar"
11759 #:source-dir "src/main/java"
11760 #:test-dir "src/test"
11761 #:test-exclude
11762 (list
11763 ;; Expected failure. pom.xml excludes these
11764 "**/failing/**"
11765 ;; Base classes that have no constructor for junit
11766 "**/BaseTest.java"
11767 "**/ConcurrencyReadTest.java"
11768 "**/ManualCharAccessTest.java"
11769 "**/ManualCharAccessTest.java"
11770 "**/TrailingCommasTest.java"
11771 "**/AsyncMissingValuesInObjectTest.java"
11772 "**/AsyncMissingValuesInArrayTest.java")
11773 #:phases
11774 (modify-phases %standard-phases
11775 (add-before 'configure 'generate-PackageVersion.java
11776 (lambda _
11777 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
11778 (in (string-append out ".in")))
11779 (copy-file in out)
11780 (substitute* out
11781 (("@package@") "com.fasterxml.jackson.core.json")
11782 (("@projectversion@") ,version)
11783 (("@projectgroupid@") "com.fasterxml.jackson.core")
11784 (("@projectartifactid@") "jackson-core")))
11785 #t))
11786 (add-before 'build 'copy-resources
11787 (lambda _
11788 (copy-recursively "src/main/resources"
11789 "build/classes")
11790 #t))
11791 (add-before 'check 'copy-test-resources
11792 (lambda _
11793 (copy-recursively "src/test/resources"
11794 "build/test-classes")
11795 #t)))))
11796 (native-inputs
11797 `(("junit" ,java-junit)
11798 ("hamcrest" ,java-hamcrest-core)))
11799 (home-page "https://github.com/FasterXML/jackson-core")
11800 (synopsis "Low-level streaming parser and generator abstractions")
11801 (description "This package contains core low-level incremental
11802(streaming) parser and generator abstractions used by the Jackson Data
11803Processor. It also includes the default implementation of handler types
11804(parser, generator) that handle JSON format.")
11805 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11806
11807(define-public java-fasterxml-jackson-databind
11808 (package
11809 (name "java-fasterxml-jackson-databind")
11810 (version "2.9.4")
11811 (source (origin
11812 (method url-fetch)
11813 (uri (string-append "https://github.com/FasterXML/"
11814 "jackson-databind/archive/"
11815 "jackson-databind-" version ".tar.gz"))
11816 (sha256
11817 (base32
11818 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
11819 (build-system ant-build-system)
11820 (arguments
11821 `(#:jar-name "jackson-databind.jar"
11822 #:source-dir "src/main/java"
11823 #:tests? #f; requires javax.measures for which I can't find a free implementation
11824 #:phases
11825 (modify-phases %standard-phases
11826 (add-before 'configure 'generate-PackageVersion.java
11827 (lambda _
11828 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
11829 (in (string-append out ".in")))
11830 (copy-file in out)
11831 (substitute* out
11832 (("@package@") "com.fasterxml.jackson.databind.cfg")
11833 (("@projectversion@") ,version)
11834 (("@projectgroupid@") "com.fasterxml.jackson.databind")
11835 (("@projectartifactid@") "jackson-databind")))
11836 #t))
11837 (add-before 'build 'copy-resources
11838 (lambda _
11839 (copy-recursively "src/main/resources" "build/classes")
11840 #t)))))
11841 (inputs
11842 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
11843 (home-page "https://github.com/FasterXML/jackson-databind")
11844 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
11845 (description "This package contains the general-purpose data-binding
11846functionality and tree-model for Jackson Data Processor. It builds on core
11847streaming parser/generator package, and uses Jackson Annotations for
11848configuration.")
11849 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11850
11851(define-public java-fasterxml-jackson-modules-base-jaxb
11852 (package
11853 (name "java-fasterxml-jackson-modules-base-jaxb")
11854 (version "2.9.4")
11855 (source (origin
11856 (method url-fetch)
11857 (uri (string-append "https://github.com/FasterXML/"
11858 "jackson-modules-base/archive/"
11859 "jackson-modules-base-" version ".tar.gz"))
11860 (sha256
11861 (base32
11862 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
11863 (build-system ant-build-system)
11864 (arguments
11865 `(#:jar-name "jackson-modules-base-jaxb.jar"
11866 #:source-dir "jaxb/src/main/java"
11867 #:test-dir "jaxb/src/test"
11868 #:test-exclude
11869 ;; Base class for tests
11870 (list "**/BaseJaxbTest.java")
11871 #:phases
11872 (modify-phases %standard-phases
11873 (add-before 'configure 'generate-PackageVersion.java
11874 (lambda _
11875 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
11876 "jackson/module/jaxb/PackageVersion.java"))
11877 (in (string-append out ".in")))
11878 (copy-file in out)
11879 (substitute* out
11880 (("@package@") "com.fasterxml.jackson.module.jaxb")
11881 (("@projectversion@") ,version)
11882 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
11883 (("@projectartifactid@") "jackson-module-jaxb")))
11884 #t))
11885 (add-before 'build 'copy-resources
11886 (lambda _
11887 (copy-recursively "jaxb/src/main/resources" "build/classes")
11888 #t)))))
11889 (inputs
11890 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
11891 java-fasterxml-jackson-databind))
11892 (native-inputs
11893 (list java-junit))
11894 (home-page "https://github.com/FasterXML/jackson-modules-base")
11895 (synopsis "Jaxb annotations jackson module")
11896 (description "This package is the jaxb annotations module for jackson.")
11897 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11898
11899(define-public java-fasterxml-jackson-modules-base-mrbean
11900 (package
11901 (name "java-fasterxml-jackson-modules-base-mrbean")
11902 (version "2.9.4")
11903 (source (origin
11904 (method url-fetch)
11905 (uri (string-append "https://github.com/FasterXML/"
11906 "jackson-modules-base/archive/"
11907 "jackson-modules-base-" version ".tar.gz"))
11908 (sha256
11909 (base32
11910 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
11911 (build-system ant-build-system)
11912 (arguments
11913 `(#:jar-name "jackson-modules-base-mrbean.jar"
11914 #:source-dir "mrbean/src/main/java"
11915 #:test-dir "mrbean/src/test"
11916 #:test-exclude
11917 ;; Base class for tests
11918 (list "**/BaseTest.java")
11919 #:phases
11920 (modify-phases %standard-phases
11921 (add-before 'configure 'generate-PackageVersion.java
11922 (lambda _
11923 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
11924 "jackson/module/mrbean/PackageVersion.java"))
11925 (in (string-append out ".in")))
11926 (copy-file in out)
11927 (substitute* out
11928 (("@package@") "com.fasterxml.jackson.module.mrbean")
11929 (("@projectversion@") ,version)
11930 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
11931 (("@projectartifactid@") "jackson-module-mrbean")))
11932 #t)))))
11933 (inputs
11934 (list java-asm java-fasterxml-jackson-annotations
11935 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
11936 (native-inputs
11937 (list java-junit))
11938 (home-page "https://github.com/FasterXML/jackson-modules-base")
11939 (synopsis "POJO type materialization for Java")
11940 (description "This package implements POJO type materialization.
11941Databinders can construct implementation classes for Java interfaces as part
11942of deserialization.")
11943 (license license:asl2.0)))
11944
11945(define-public java-snakeyaml
11946 (package
11947 (name "java-snakeyaml")
11948 (version "1.18")
11949 (source (origin
11950 (method url-fetch)
11951 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
11952 version ".tar.gz"))
11953 (file-name (string-append name "-" version ".tar.gz"))
11954 (sha256
11955 (base32
11956 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
11957 (build-system ant-build-system)
11958 (arguments
11959 `(#:jar-name "java-snakeyaml.jar"
11960 #:source-dir "src/main/java"
11961 ;; Tests require velocity, a cyclic dependency, and
11962 ;; java-spring-framework-context which is not packaged.
11963 #:tests? #f))
11964 (home-page "https://bitbucket.org/asomov/snakeyaml")
11965 (synopsis "YAML processor")
11966 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
11967 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
11968
11969(define-public java-fasterxml-jackson-dataformat-yaml
11970 (package
11971 (name "java-fasterxml-jackson-dataformat-yaml")
11972 (version "2.9.4")
11973 (source (origin
11974 (method url-fetch)
11975 (uri (string-append "https://github.com/FasterXML/"
11976 "jackson-dataformats-text/archive/"
11977 "jackson-dataformats-text-" version ".tar.gz"))
11978 (sha256
11979 (base32
11980 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
11981 (build-system ant-build-system)
11982 (arguments
11983 `(#:jar-name "jackson-dataformat-yaml.jar"
11984 #:source-dir "yaml/src/main/java"
11985 #:test-dir "yaml/src/test"
11986 #:test-exclude (list "**/failing/**.java")
11987 #:phases
11988 (modify-phases %standard-phases
11989 (add-before 'configure 'generate-PackageVersion.java
11990 (lambda _
11991 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
11992 (in (string-append out ".in")))
11993 (copy-file in out)
11994 (substitute* out
11995 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
11996 (("@projectversion@") ,version)
11997 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
11998 (("@projectartifactid@") "jackson-dataformat-yaml")))
11999 #t)))))
12000 (inputs
12001 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
12002 java-fasterxml-jackson-databind java-snakeyaml))
12003 (native-inputs
12004 `(("junit" ,java-junit)
12005 ("hamcrest" ,java-hamcrest-core)
12006 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
12007 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
12008 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
12009 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
12010 (synopsis "Yaml backend for Jackson")
12011 (description "Dataformat backends are used to support format alternatives
12012to JSON, supported by default. This is done by sub-classing Jackson core
12013abstractions.")
12014 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
12015
12016(define-public java-stax2-api
12017 (package
12018 (name "java-stax2-api")
12019 (version "4.0.0")
12020 (source (origin
12021 (method url-fetch)
12022 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
12023 "stax2-api-" version ".tar.gz"))
12024 (sha256
12025 (base32
12026 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
12027 (build-system ant-build-system)
12028 (arguments
12029 `(#:jar-name "java-stax2-api.jar"
12030 #:source-dir "src/main/java"
12031 #:tests? #f)); no tests
12032 (home-page "https://github.com/FasterXML/stax2-api")
12033 (synopsis "Stax2 API")
12034 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
12035significant new functionalities, such as full-featured bi-direction validation
12036interface and high-performance Typed Access API.")
12037 (license license:bsd-2)))
12038
12039(define-public java-woodstox-core
12040 (package
12041 (name "java-woodstox-core")
12042 (version "5.0.3")
12043 (source (origin
12044 (method git-fetch)
12045 (uri (git-reference
12046 (url "https://github.com/FasterXML/woodstox")
12047 (commit (string-append "woodstox-core-" version))))
12048 (file-name (git-file-name name version))
12049 (sha256
12050 (base32
12051 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
12052 (build-system ant-build-system)
12053 (arguments
12054 `(#:jar-name "woodstox.jar"
12055 #:test-exclude
12056 (list "**/Base*.java" "failing/**")
12057 #:phases
12058 (modify-phases %standard-phases
12059 (add-before 'build 'remove-msv-dep
12060 (lambda _
12061 ;; we don't need osgi, and it depends on msv
12062 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
12063 ;; msv's latest release is from 2011 and we don't need it
12064 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
12065 (delete-file-recursively "src/test/java/wstxtest/osgi")
12066 (delete-file-recursively "src/test/java/wstxtest/msv")
12067 #t))
12068 (add-before 'build 'copy-resources
12069 (lambda _
12070 (copy-recursively "src/main/resources" "build/classes")
12071 #t)))))
12072 (inputs
12073 `(("stax2" ,java-stax2-api)))
12074 (native-inputs
12075 `(("junit" ,java-junit)))
12076 (home-page "https://github.com/FasterXML/woodstox")
12077 (synopsis "Stax XML API implementation")
12078 (description "Woodstox is a stax XML API implementation.")
12079 (license license:asl2.0)))
12080
12081(define-public java-fasterxml-jackson-dataformat-xml
12082 (package
12083 (name "java-fasterxml-jackson-dataformat-xml")
12084 (version "2.9.4")
12085 (source (origin
12086 (method git-fetch)
12087 (uri (git-reference
12088 (url "https://github.com/FasterXML/jackson-dataformat-xml")
12089 (commit (string-append "jackson-dataformat-xml-" version))))
12090 (file-name (git-file-name name version))
12091 (sha256
12092 (base32
12093 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
12094 (build-system ant-build-system)
12095 (arguments
12096 `(#:jar-name "jackson-dataformat-xml.jar"
12097 #:source-dir "src/main/java"
12098 #:test-exclude
12099 (list "**/failing/**")
12100 #:phases
12101 (modify-phases %standard-phases
12102 (add-before 'configure 'generate-PackageVersion.java
12103 (lambda _
12104 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
12105 (in (string-append out ".in")))
12106 (copy-file in out)
12107 (newline)
12108 (substitute* out
12109 (("@package@") "com.fasterxml.jackson.dataformat.xml")
12110 (("@projectversion@") ,version)
12111 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
12112 (("@projectartifactid@") "jackson-dataformat-xml")))
12113 #t))
12114 (add-before 'build 'copy-resources
12115 (lambda _
12116 (copy-recursively "src/main/resources" "build/classes")
12117 #t)))))
12118 (inputs
12119 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
12120 ("jackson-core" ,java-fasterxml-jackson-core)
12121 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
12122 ("jackson-databind" ,java-fasterxml-jackson-databind)
12123 ("stax2-api" ,java-stax2-api)
12124 ("woodstox" ,java-woodstox-core)))
12125 (native-inputs
12126 `(("junit" ,java-junit)
12127 ("hamcrest" ,java-hamcrest-core)))
12128 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
12129 (synopsis "Read and write XML")
12130 (description "This package contains Jackson extension component for reading
12131and writing XML encoded data.
12132
12133Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
12134approach (that is, no support is added for \"Schema-first\" approach). Support
12135for JAXB annotations is provided by JAXB annotation module; this module
12136provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
12137@code{JsonFactory}) as well as small number of higher level overrides needed to
12138make data-binding work.")
12139 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
12140
12141(define-public java-hdrhistogram
12142 (package
12143 (name "java-hdrhistogram")
12144 (version "2.1.9")
12145 (source (origin
12146 (method git-fetch)
12147 (uri (git-reference
12148 (url "https://github.com/HdrHistogram/HdrHistogram")
12149 (commit (string-append "HdrHistogram-" version))))
12150 (file-name (git-file-name name version))
12151 (sha256
12152 (base32
12153 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
12154 (build-system ant-build-system)
12155 (arguments
12156 `(#:jar-name "java-hdrhistogram.jar"
12157 #:source-dir "src/main/java"
12158 #:phases
12159 (modify-phases %standard-phases
12160 (add-after 'unpack 'make-files-writable
12161 (lambda _
12162 (for-each make-file-writable (find-files "."))
12163 #t))
12164 (add-before 'configure 'set-version
12165 (lambda _
12166 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
12167 (template (string-append version-java ".template")))
12168 (copy-file template version-java)
12169 (substitute* version-java
12170 (("\\$VERSION\\$") ,version)
12171 (("\\$BUILD_TIME\\$") "0"))
12172 #t))))))
12173 (native-inputs
12174 `(("junit" ,java-junit)
12175 ("hamcrest" ,java-hamcrest-core)))
12176 (home-page "https://hdrhistogram.github.io/HdrHistogram")
12177 (synopsis "High dynamic range histogram")
12178 (description "Hdrhistogram creates histograms that support
12179recording and analyzing sampled data value counts across a configurable integer
12180value range with configurable value precision within the range. Value precision
12181is expressed as the number of significant digits in the value recording, and
12182provides control over value quantization behavior across the value range and
12183the subsequent value resolution at any given level.")
12184 (license license:public-domain)))
12185
12186(define-public java-cofoja
12187 (package
12188 (name "java-cofoja")
12189 (version "1.3")
12190 (source (origin
12191 (method git-fetch)
12192 (uri (git-reference
12193 (url "https://github.com/nhatminhle/cofoja")
12194 (commit (string-append "v" version))))
12195 (file-name (string-append "java-cofoja-" version "-checkout"))
12196 (sha256
12197 (base32
12198 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
12199 (build-system ant-build-system)
12200 (arguments
12201 `(#:build-target "dist"
12202 #:test-target "test"
12203 #:jdk ,icedtea-8
12204 #:make-flags
12205 (list "-Ddist.dir=dist")
12206 #:modules ((guix build ant-build-system)
12207 (guix build java-utils)
12208 (guix build utils)
12209 (srfi srfi-1)
12210 (ice-9 match))
12211 #:phases
12212 (modify-phases %standard-phases
12213 ;; The bulid system ignores the class path the ant-build-system sets
12214 ;; up and instead expects to find all dependencies in the "lib"
12215 ;; directory.
12216 (add-after 'unpack 'create-libdir
12217 (lambda* (#:key inputs #:allow-other-keys)
12218 (mkdir-p "lib")
12219 (for-each
12220 (lambda (file)
12221 (let ((target (string-append "lib/" (basename file))))
12222 (unless (file-exists? target)
12223 (symlink file target))))
12224 (append-map (match-lambda
12225 ((label . dir)
12226 (find-files dir "\\.jar$")))
12227 inputs))
12228 #t))
12229 (replace 'install (install-jars "dist")))))
12230 (inputs
12231 (list java-asm))
12232 (native-inputs
12233 (list java-junit))
12234 (home-page "https://github.com/nhatminhle/cofoja")
12235 (synopsis "Contracts for Java")
12236 (description "Contracts for Java, or Cofoja for short, is a contract
12237programming framework and test tool for Java, which uses annotation processing
12238and bytecode instrumentation to provide run-time checking. (In particular,
12239this is not a static analysis tool.)")
12240 (license license:lgpl3+)))
12241
12242(define-public java-aopalliance
12243 (package
12244 (name "java-aopalliance")
12245 (version "1.0")
12246 (source (origin
12247 (method git-fetch)
12248 ;; Note: this git repository is not official, but contains the
12249 ;; source code that is in the CVS repository. Downloading the
12250 ;; tarball from sourceforge is undeterministic, and the cvs download
12251 ;; fails.
12252 (uri (git-reference
12253 (url "https://github.com/hoverruan/aopalliance")
12254 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
12255 (file-name (string-append name "-" version))
12256 (sha256
12257 (base32
12258 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
12259 (build-system ant-build-system)
12260 (arguments
12261 `(#:jar-name "java-aopalliance.jar"
12262 #:jdk ,icedtea-8
12263 #:tests? #f; no tests
12264 #:source-dir "aopalliance/src/main"
12265 #:phases
12266 (modify-phases %standard-phases
12267 (add-before 'install 'create-pom
12268 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
12269 (replace 'install
12270 (install-from-pom "pom.xml")))))
12271 (home-page "https://aopalliance.sourceforge.net")
12272 (synopsis "Aspect-Oriented Programming")
12273 (description "The AOP Alliance project is a joint project between several
12274software engineering people who are interested in Aspect-Oriented Programming
12275(AOP) and Java.")
12276 (license license:public-domain)))
12277
12278(define-public java-javax-inject
12279 (package
12280 (name "java-javax-inject")
12281 (version "1")
12282 (source (origin
12283 (method git-fetch)
12284 (uri (git-reference
12285 (url "https://github.com/javax-inject/javax-inject")
12286 (commit version)))
12287 (file-name (git-file-name name version))
12288 (sha256
12289 (base32
12290 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
12291 (build-system ant-build-system)
12292 (arguments
12293 `(#:jar-name "java-javax-inject.jar"
12294 #:tests? #f; no tests
12295 #:phases
12296 (modify-phases %standard-phases
12297 (replace 'install
12298 (install-from-pom "pom.xml")))))
12299 (home-page "https://github.com/javax-inject/javax-inject")
12300 (synopsis "JSR-330: Dependency Injection for Java")
12301 (description "This package specifies a means for obtaining objects in such
12302a way as to maximize reusability, testability and maintainability compared to
12303traditional approaches such as constructors, factories, and service locators
12304(e.g., JNDI). This process, known as dependency injection, is beneficial to
12305most nontrivial applications.
12306
12307Many types depend on other types. For example, a @var{Stopwatch} might depend
12308on a @var{TimeSource}. The types on which a type depends are known as its
12309dependencies. The process of finding an instance of a dependency to use at run
12310time is known as resolving the dependency. If no such instance can be found,
12311the dependency is said to be unsatisfied, and the application is broken.")
12312 (license license:asl2.0)))
12313
12314(define-public java-guice
12315 (package
12316 (name "java-guice")
12317 (version "4.1")
12318 (source (origin
12319 (method git-fetch)
12320 (uri (git-reference
12321 (url "https://github.com/google/guice")
12322 (commit version)))
12323 (file-name (git-file-name name version))
12324 (modules '((guix build utils)))
12325 (snippet
12326 `(begin
12327 (for-each delete-file (find-files "." ".*.jar")) #t))
12328 (sha256
12329 (base32
12330 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
12331 (build-system ant-build-system)
12332 (arguments
12333 `(#:jar-name "java-guice.jar"
12334 #:jdk ,icedtea-8
12335 #:tests? #f; FIXME: tests are not in a java sub directory
12336 #:source-dir "core/src"
12337 #:phases
12338 (modify-phases %standard-phases
12339 (add-after 'unpack 'make-files-writable
12340 (lambda _
12341 (for-each make-file-writable (find-files "."))
12342 #t))
12343 (replace 'install
12344 (install-from-pom "core/pom.xml")))))
12345 (propagated-inputs
12346 (list java-aopalliance
12347 java-cglib
12348 java-guava
12349 java-javax-inject
12350 java-guice-parent-pom))
12351 (home-page "https://github.com/google/guice")
12352 (synopsis "Lightweight dependency injection framework")
12353 (description "Guice is a lightweight dependency injection framework for
12354Java 6 and above.")
12355 (license license:asl2.0)))
12356
12357(define-public java-guice-servlet
12358 (package
12359 (inherit java-guice)
12360 (name "java-guice-servlet")
12361 (arguments
12362 `(#:jar-name "guice-servlet.jar"
12363 #:source-dir "extensions/servlet/src/"
12364 #:jdk ,icedtea-8
12365 #:tests? #f ; FIXME: not in a java subdir
12366 #:phases
12367 (modify-phases %standard-phases
12368 (add-after 'unpack 'make-files-writable
12369 (lambda _
12370 (for-each make-file-writable (find-files "."))
12371 #t)))))
12372 (inputs
12373 `(("guice" ,java-guice)
12374 ("servlet" ,java-classpathx-servletapi)
12375 ,@(package-inputs java-guice)))))
12376
12377(define java-guice-parent-pom
12378 (package
12379 (inherit java-guice)
12380 (name "java-guice-parent-pom")
12381 (arguments
12382 `(#:tests? #f
12383 #:phases
12384 (modify-phases %standard-phases
12385 (delete 'configure)
12386 (delete 'build)
12387 (add-after 'install 'install-extensions
12388 (install-pom-file "extensions/pom.xml"))
12389 (replace 'install
12390 (install-pom-file "pom.xml")))))
12391 (propagated-inputs
12392 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
12393
12394(define java-google-parent-pom-5
12395 (package
12396 (name "java-google-parent-pom")
12397 (version "5")
12398 (source (origin
12399 (method git-fetch)
12400 (uri (git-reference
12401 (url "https://github.com/google/google-maven-parents")
12402 (commit (string-append "google-" version))))
12403 (file-name (git-file-name name version))
12404 (sha256
12405 (base32
12406 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
12407 (build-system ant-build-system)
12408 (arguments
12409 `(#:tests? #f
12410 #:phases
12411 (modify-phases %standard-phases
12412 (delete 'configure)
12413 (delete 'build)
12414 (replace 'install
12415 (install-pom-file "pom.xml")))))
12416 (home-page "https://github.com/google/google-maven-parents")
12417 (synopsis "Google parent pom")
12418 (description "This package contains the Maven parent POM for other Google
12419Java projects.")
12420 (license license:asl2.0)))
12421
12422(define java-guice-parent-pom-5
12423 (package
12424 (inherit java-guice)
12425 (name "java-guice-parent-pom")
12426 (version "5.1.0")
12427 (source (origin
12428 (method git-fetch)
12429 (uri (git-reference
12430 (url "https://github.com/google/guice")
12431 (commit version)))
12432 (file-name (git-file-name name version))
12433 (sha256
12434 (base32
12435 "05w8g9lmj8623b6f6c2xyriyhf44vwvqg0i1dszhrsnhk5f1jv71"))))
12436 (arguments
12437 `(#:tests? #f
12438 #:phases
12439 (modify-phases %standard-phases
12440 (delete 'configure)
12441 (delete 'build)
12442 (add-after 'install 'install-extensions
12443 (install-pom-file "extensions/pom.xml"))
12444 (replace 'install
12445 (install-pom-file "pom.xml")))))
12446 (propagated-inputs
12447 (list java-google-parent-pom-5))))
12448
12449(define-public java-guice-5
12450 (package
12451 (inherit java-guice-parent-pom-5)
12452 (name "java-guice")
12453 (arguments
12454 `(#:jar-name "java-guice.jar"
12455 #:tests? #f ; FIXME: tests are not in a java sub directory
12456 #:source-dir "core/src"
12457 #:phases
12458 (modify-phases %standard-phases
12459 (replace 'install
12460 (install-from-pom "core/pom.xml")))))
12461 (inputs
12462 (list java-jsr305
12463 java-error-prone-annotations))
12464 (propagated-inputs
12465 (list java-aopalliance
12466 java-asm-9
12467 java-guava
12468 java-javax-inject
12469 java-guice-parent-pom-5))))
12470
12471(define-public java-assertj
12472 (package
12473 (name "java-assertj")
12474 (version "3.8.0")
12475 (source (origin
12476 (method git-fetch)
12477 (uri (git-reference
12478 (url "https://github.com/joel-costigliola/assertj-core")
12479 (commit (string-append "assertj-core-" version))))
12480 (file-name (git-file-name name version))
12481 (sha256
12482 (base32
12483 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
12484 (build-system ant-build-system)
12485 (arguments
12486 `(#:jar-name "java-assertj.jar"
12487 #:jdk ,icedtea-8
12488 #:source-dir "src/main/java"
12489 #:tests? #f)); depends on tng-junit which depends on assertj
12490 (inputs
12491 `(("cglib" ,java-cglib)
12492 ("junit" ,java-junit)
12493 ("hamcrest" ,java-hamcrest-core)))
12494 (native-inputs
12495 `(("mockito" ,java-mockito-1)))
12496 (home-page "https://joel-costigliola.github.io/assertj/index.html")
12497 (synopsis "Fluent assertions for java")
12498 (description "AssertJ core is a Java library that provides a fluent
12499interface for writing assertions. Its main goal is to improve test code
12500readability and make maintenance of tests easier.")
12501 (license license:asl2.0)))
12502
12503(define-public java-jboss-javassist
12504 (package
12505 (name "java-jboss-javassist")
12506 (version "3.21.0")
12507 (source (origin
12508 (method git-fetch)
12509 (uri (git-reference
12510 (url "https://github.com/jboss-javassist/javassist")
12511 (commit
12512 (string-append "rel_"
12513 (string-map
12514 (lambda (x) (if (eq? x #\.) #\_ x)) version)
12515 "_ga"))))
12516 (file-name (git-file-name name version))
12517 (sha256
12518 (base32
12519 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
12520 (modules '((guix build utils)))
12521 (snippet
12522 '(begin
12523 (delete-file "javassist.jar")))))
12524 (build-system ant-build-system)
12525 (arguments
12526 `(#:jar-name "java-jboss-javassist.jar"
12527 #:jdk ,icedtea-8
12528 #:source-dir "src/main"
12529 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
12530 #:phases
12531 (modify-phases %standard-phases
12532 (add-after 'unpack 'make-files-writable
12533 (lambda _
12534 (for-each make-file-writable (find-files "."))
12535 #t)))))
12536 (native-inputs
12537 `(("junit" ,java-junit)))
12538 (home-page "https://github.com/jboss-javassist/javassist")
12539 (synopsis "Java bytecode engineering toolkit")
12540 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
12541manipulation simple. It is a class library for editing bytecodes in Java; it
12542enables Java programs to define a new class at runtime and to modify a class
12543file when the JVM loads it.")
12544 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
12545
12546(define-public java-jcommander
12547 (package
12548 (name "java-jcommander")
12549 (version "1.71")
12550 (source (origin
12551 (method git-fetch)
12552 (uri (git-reference
12553 (url "https://github.com/cbeust/jcommander")
12554 (commit version)))
12555 (file-name (git-file-name name version))
12556 (sha256
12557 (base32
12558 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
12559 (build-system ant-build-system)
12560 (arguments
12561 `(#:jar-name "java-jcommander.jar"
12562 #:jdk ,icedtea-8
12563 #:tests? #f; requires testng which depends on jcommander
12564 #:source-dir "src/main/java"))
12565 (home-page "https://jcommander.org")
12566 (synopsis "Command line parameters parser")
12567 (description "JCommander is a very small Java framework that makes it
12568trivial to parse command line parameters. Parameters are declared with
12569annotations.")
12570 (license license:asl2.0)))
12571
12572(define-public java-bsh
12573 (package
12574 (name "java-bsh")
12575 (version "2.1.1")
12576 (source (origin
12577 (method git-fetch)
12578 (uri (git-reference
12579 (url "https://github.com/beanshell/beanshell")
12580 (commit version)))
12581 (file-name (git-file-name name version))
12582 (sha256
12583 (base32
12584 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
12585 (modules '((guix build utils)))
12586 (snippet
12587 '(begin
12588 ;; Delete bundled third-party jar archives.
12589 (for-each delete-file (find-files "." ".*.jar$"))
12590 (for-each (lambda (file) (chmod file #o644))
12591 (find-files "." "."))
12592 #t))))
12593 (build-system ant-build-system)
12594 (arguments
12595 `(#:build-target "jarall"
12596 #:test-target "junit-tests-all"
12597 #:make-flags (list "-DDATE" "(no date for reproducibility)")
12598 #:phases
12599 (modify-phases %standard-phases
12600 (add-before 'check 'fix-test
12601 (lambda _
12602 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
12603 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
12604 (replace 'install
12605 (install-from-pom "pom.xml")))))
12606 (inputs
12607 (list java-classpathx-servletapi java-commons-bsf))
12608 (native-inputs
12609 (list java-junit javacc-3))
12610 (home-page "http://beanshell.org/")
12611 (synopsis "Lightweight Scripting for Java")
12612 (description "BeanShell is a small, free, embeddable Java source
12613interpreter with object scripting language features, written in Java.
12614BeanShell dynamically executes standard Java syntax and extends it with common
12615scripting conveniences such as loose types, commands, and method closures like
12616those in Perl and JavaScript.")
12617 (license license:asl2.0)))
12618
12619(define-public java-fest-util
12620 (package
12621 (name "java-fest-util")
12622 (version "1.2.5")
12623 (source (origin
12624 (method git-fetch)
12625 (uri (git-reference
12626 (url "https://github.com/alexruiz/fest-util/")
12627 (commit (string-append "fest-util-" version))))
12628 (file-name (git-file-name name version))
12629 (sha256
12630 (base32
12631 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
12632 (build-system ant-build-system)
12633 (arguments
12634 `(#:jar-name "java-fest-util.jar"
12635 #:source-dir "src/main/java"))
12636 (native-inputs
12637 `(("junit" ,java-junit)
12638 ("hamcrest" ,java-hamcrest-core)))
12639 (home-page "https://github.com/alexruiz/fest-util")
12640 (synopsis "FEST common utilities")
12641 (description "Common utilities used in all FEST module.")
12642 (license license:asl2.0)))
12643
12644(define-public java-fest-test
12645 (package
12646 (name "java-fest-test")
12647 (version "2.1.0")
12648 (source (origin
12649 (method git-fetch)
12650 (uri (git-reference
12651 (url "https://github.com/alexruiz/fest-test/")
12652 (commit (string-append "fest-test-" version))))
12653 (file-name (git-file-name name version))
12654 (sha256
12655 (base32
12656 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
12657 (build-system ant-build-system)
12658 (arguments
12659 `(#:jar-name "java-fest-test.jar"
12660 #:source-dir "src/main/java"
12661 #:tests? #f)); no tests
12662 (inputs
12663 `(("junit" ,java-junit)))
12664 (home-page "https://github.com/alexruiz/fest-test")
12665 (synopsis "Common FEST testing infrastructure")
12666 (description "Fest-test contains the common FEST testing infrastructure.")
12667 (license license:asl2.0)))
12668
12669(define-public java-fest-assert
12670 (package
12671 (name "java-fest-assert")
12672 (version "2.0M10")
12673 (source (origin
12674 (method git-fetch)
12675 (uri (git-reference
12676 (url "https://github.com/alexruiz/fest-assert-2.x/")
12677 (commit (string-append "fest-assert-core-" version))))
12678 (file-name (git-file-name name version))
12679 (sha256
12680 (base32
12681 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
12682 (build-system ant-build-system)
12683 (arguments
12684 `(#:jar-name "java-fest-assert.jar"
12685 #:source-dir "src/main/java"
12686 #:test-exclude
12687 (list
12688 "**/Abstract*.java"
12689 "**/*BaseTest.java"
12690 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
12691 "**/MessageFormatter_format_Test.java"
12692 "**/internal/*/*_assert*_Test.java")))
12693 (inputs
12694 (list java-fest-util))
12695 (native-inputs
12696 (list java-junit
12697 java-fest-test
12698 java-hamcrest-core
12699 java-mockito-1
12700 java-cglib
12701 java-objenesis))
12702 (home-page "https://github.com/alexruiz/fest-assert-2.x")
12703 (synopsis "FEST fluent assertions")
12704 (description "FEST-Assert provides a fluent interface for assertions.")
12705 (license license:asl2.0)))
12706
12707(define-public java-testng
12708 (package
12709 (name "java-testng")
12710 (version "6.14.3")
12711 (source (origin
12712 (method git-fetch)
12713 (uri (git-reference
12714 (url "https://github.com/cbeust/testng")
12715 (commit version)))
12716 (file-name (string-append name "-" version "-checkout"))
12717 (sha256
12718 (base32
12719 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
12720 (build-system ant-build-system)
12721 (arguments
12722 (list
12723 #:jdk icedtea-8; java.util.function
12724 #:jar-name "java-testng.jar"
12725 #:source-dir "src/main/java"
12726 #:phases
12727 '(modify-phases %standard-phases
12728 (add-after 'unpack 'delete-failing-tests
12729 (lambda _
12730 ;; FIXME: I don't know why these tests fail
12731 (substitute* "src/test/resources/testng.xml"
12732 ;; expected:<[0]> but was:<[3]>
12733 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
12734 ;; expected [3] but found [2]
12735 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
12736 ;; This is a parallel test and we've observed that it fails
12737 ;; sometimes.
12738 (("<class name=\"test.dataprovider.DataProviderTest\"/>") "")
12739 ;; Another flaky parallel test: testParallelMode() fails
12740 ;; intermittently on assertions about which before/after
12741 ;; groups methods were run. This also drops
12742 ;; testInSequentialMode().
12743 (("<class name=\"test.beforegroups.BeforeGroupsTest\"/>") ""))))
12744 ;; We don't have groovy
12745 (add-after 'unpack 'delete-groovy-tests
12746 (lambda _
12747 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
12748 (substitute* "src/test/resources/testng.xml"
12749 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
12750 (add-before 'build 'copy-resources
12751 (lambda _
12752 (copy-recursively "src/main/resources" "build/classes")))
12753 (add-before 'check 'copy-test-resources
12754 (lambda _
12755 (copy-recursively "src/test/resources" "build/test-classes")))
12756 (replace 'check
12757 (lambda _
12758 (invoke "ant" "compile-tests")
12759 ;; we don't have groovy
12760 (substitute* "src/test/resources/testng.xml"
12761 (("<class name=\"test.groovy.GroovyTest\" />") ""))
12762 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12763 ":build/classes"
12764 ":build/test-classes")
12765 "-Dtest.resources.dir=src/test/resources"
12766 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
12767 (propagated-inputs
12768 (list java-junit
12769 java-jsr305
12770 java-bsh
12771 java-jcommander
12772 java-guice
12773 java-snakeyaml))
12774 (native-inputs
12775 (list java-guava
12776 java-javax-inject
12777 java-hamcrest-all
12778 java-assertj
12779 java-mockito-1
12780 java-cglib
12781 java-aopalliance))
12782 (home-page "https://testng.org")
12783 (synopsis "Testing framework")
12784 (description "TestNG is a testing framework inspired from JUnit and NUnit
12785but introducing some new functionalities that make it more powerful and easier
12786to use.")
12787 (license license:asl2.0)))
12788
12789(define-public java-jnacl
12790 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
12791 (revision "2"))
12792 (package
12793 (name "java-jnacl")
12794 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
12795 (source (origin
12796 (method git-fetch)
12797 (uri (git-reference
12798 (url "https://github.com/neilalexander/jnacl")
12799 (commit commit)))
12800 (file-name (git-file-name name version))
12801 (sha256
12802 (base32
12803 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
12804 (build-system ant-build-system)
12805 (arguments
12806 `(#:jar-name "jnacl.jar"
12807 #:source-dir "src/main/java"
12808 #:jdk ,icedtea-8
12809 #:phases
12810 (modify-phases %standard-phases
12811 (add-before 'build 'fix-tests
12812 (lambda _
12813 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
12814 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
12815 (("assertions.Assertions") "assertions.api.Assertions"))
12816 #t))
12817 (replace 'check
12818 (lambda _
12819 (invoke "ant" "compile-tests")
12820 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12821 ":build/classes"
12822 ":build/test-classes")
12823 "org.testng.TestNG" "-testclass"
12824 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
12825 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
12826 ":build/classes"
12827 ":build/test-classes")
12828 "org.testng.TestNG" "-testclass"
12829 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
12830 (native-inputs
12831 (list java-testng java-fest-util java-fest-assert))
12832 (home-page "https://github.com/neilalexander/jnacl")
12833 (synopsis "Java implementation of NaCl")
12834 (description "Pure Java implementation of the NaCl: Networking and
12835Cryptography library.")
12836 (license license:bsd-2))))
12837
12838(define-public java-mvel2
12839 (package
12840 (name "java-mvel2")
12841 (version "2.3.1")
12842 (source (origin
12843 (method url-fetch)
12844 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
12845 version ".Final.tar.gz"))
12846 (sha256
12847 (base32
12848 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
12849 (build-system ant-build-system)
12850 (arguments
12851 `(#:jar-name "mvel2.jar"
12852 #:source-dir "src/main/java"
12853 #:test-exclude
12854 (list "**/Abstract*.java"
12855 ;; Base class with no tests
12856 "**/MVELThreadTest.java")
12857 #:phases
12858 (modify-phases %standard-phases
12859 (add-after 'install 'install-bin
12860 (lambda* (#:key outputs #:allow-other-keys)
12861 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
12862 (mkdir-p bin)
12863 (with-output-to-file (string-append bin "/mvel2")
12864 (lambda _
12865 (display
12866 (string-append
12867 "#!" (which "bash") "\n"
12868 "if [ \"$#\" -ne \"2\" ]; then\n"
12869 "echo 'Usage: mvel2 <script> <out.dir>'\n"
12870 "exit\n"
12871 "fi\n"
12872 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
12873 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
12874 " org.mvel2.sh.Main $1"))))
12875 (chmod (string-append bin "/mvel2") #o755))
12876 #t)))))
12877 (native-inputs
12878 `(("junit" ,java-junit)
12879 ("hamcrest" ,java-hamcrest-core)))
12880 (home-page "https://github.com/mvel/mvel")
12881 (synopsis "MVFLEX Expression Language")
12882 (description "MVEL has largely been inspired by Java syntax, but has some
12883fundamental differences aimed at making it more efficient as an expression
12884language, such as operators that directly support collection, array and string
12885matching, as well as regular expressions. MVEL is used to evaluate expressions
12886written using Java syntax.
12887
12888In addition to the expression language, MVEL serves as a templating language for
12889configuration and string construction.")
12890 (license license:asl2.0)))
12891
12892(define-public java-commons-jexl-2
12893 (package
12894 (name "java-commons-jexl")
12895 (version "2.1.1")
12896 (source (origin
12897 (method url-fetch)
12898 (uri (string-append "mirror://apache/commons/jexl/source/"
12899 "commons-jexl-" version "-src.tar.gz"))
12900 (sha256
12901 (base32
12902 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
12903 (build-system ant-build-system)
12904 (arguments
12905 `(#:jar-name "commons-jexl-2.jar"
12906 #:jdk ,icedtea-8
12907 #:source-dir "src/main/java"
12908 #:phases
12909 (modify-phases %standard-phases
12910 (add-before 'check 'disable-broken-tests
12911 (lambda* (#:key inputs #:allow-other-keys)
12912 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
12913 (substitute* "ArithmeticTest.java"
12914 (("asserter.assertExpression\\(\"3 / 0\"") "//")
12915 (("asserter.assertExpression\\(\"imanull") "//"))
12916 ;; This test fails with "ambiguous method invocation"
12917 (delete-file "CacheTest.java")
12918 ;; This test doesn't have access to the temp directory
12919 (substitute* "ClassCreatorTest.java"
12920 (("java.io.tmpdir") "user.dir"))
12921 ;; This test fails in trying to detect whether it can run.
12922 (substitute* "ClassCreator.java"
12923 (("boolean canRun =.*") "boolean canRun = false;\n"))
12924 ;; ...and these tests depend on it.
12925 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
12926 (delete-file "scripting/JexlScriptEngineTest.java"))
12927 #t))
12928 (add-before 'build 'run-javacc
12929 (lambda _
12930 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
12931 (invoke "java" "jjtree" "Parser.jjt")
12932 (invoke "java" "javacc" "Parser.jj"))
12933 #t)))))
12934 (inputs
12935 (list java-commons-logging-minimal))
12936 (native-inputs
12937 (list java-junit java-hamcrest-core javacc-4))
12938 (home-page "https://commons.apache.org/proper/commons-jexl/")
12939 (synopsis "Java Expression Language")
12940 (description "JEXL is a library intended to facilitate the implementation
12941of dynamic and scripting features in applications and frameworks written in
12942Java. JEXL implements an Expression Language based on some extensions to the
12943JSTL Expression Language supporting most of the constructs seen in
12944shell-script or ECMAScript. Its goal is to expose scripting features usable
12945by technical operatives or consultants working with enterprise platforms.")
12946 (license license:asl2.0)))
12947
12948(define-public java-lz4
12949 (package
12950 (name "java-lz4")
12951 (version "1.4.0")
12952 (source (origin
12953 (method git-fetch)
12954 (uri (git-reference
12955 (url "https://github.com/lz4/lz4-java")
12956 (commit version)))
12957 (file-name (git-file-name name version))
12958 (sha256
12959 (base32
12960 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
12961 (build-system ant-build-system)
12962 (arguments
12963 `(#:jar-name "lz4.jar"
12964 #:jdk ,icedtea-8
12965 #:source-dir "src/java:src/java-unsafe"
12966 #:tests? #f; FIXME: requires more dependencies
12967 #:phases
12968 (modify-phases %standard-phases
12969 (add-after 'unpack 'make-files-writable
12970 (lambda _
12971 (for-each make-file-writable (find-files "."))
12972 #t))
12973 (add-before 'configure 'generate-source
12974 (lambda _
12975 (with-directory-excursion "src/build/source_templates"
12976 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
12977 #t)))))
12978 (native-inputs
12979 `(("mvel" ,java-mvel2)))
12980 (home-page "https://jpountz.github.io/lz4-java")
12981 (synopsis "Compression algorithm")
12982 (description "LZ4 - Java is a Java port of the popular lz4 compression
12983algorithms and xxHash hashing algorithm.")
12984 (license license:asl2.0)))
12985
12986(define-public java-bouncycastle
12987 (package
12988 (name "java-bouncycastle")
12989 (version "1.67")
12990 (source (origin
12991 (method git-fetch)
12992 (uri (git-reference
12993 (url "http://git.bouncycastle.org/repositories/bc-java")
12994 ;(url "https://github.com/bcgit/bc-java")
12995 (commit (string-append "r1rv" (substring version 2 4)))))
12996 (file-name (git-file-name name version))
12997 (sha256
12998 (base32
12999 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
13000 (modules '((guix build utils)))
13001 (snippet
13002 '(begin
13003 (for-each delete-file
13004 (find-files "." "\\.jar$"))
13005 #t))))
13006 (build-system ant-build-system)
13007 (arguments
13008 `(#:jdk ,icedtea-8
13009 #:tests? #f
13010 #:phases
13011 (modify-phases %standard-phases
13012 (replace 'build
13013 (lambda _
13014 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
13015 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
13016 ;; FIXME: the tests freeze.
13017 ;; (replace 'check
13018 ;; (lambda _
13019 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
13020 (replace 'install
13021 (install-jars "build/artifacts/jdk1.5/jars")))))
13022 (inputs
13023 (list java-javax-mail))
13024 (native-inputs
13025 `(("unzip" ,unzip)
13026 ("junit" ,java-junit)
13027 ("java-native-access" ,java-native-access)
13028 ("java-native-access-platform" ,java-native-access-platform)))
13029 (home-page "https://www.bouncycastle.org")
13030 (synopsis "Cryptographic library")
13031 (description "Bouncy Castle is a cryptographic library for the Java
13032programming language.")
13033 (license license:expat)))
13034
13035(define-public java-jakarta-activation-1.2
13036 (package
13037 (name "java-jakarta-activation")
13038 (version "1.2.2")
13039 (source (origin
13040 (method git-fetch)
13041 (uri (git-reference
13042 (url "https://github.com/jakartaee/jaf-api")
13043 (commit version)))
13044 (file-name (git-file-name name version))
13045 (sha256
13046 (base32
13047 "13kkr0kj9wp45vpfackcbyycilzs5r3sj33px5pny1k4hq09cyar"))))
13048 (build-system ant-build-system)
13049 (arguments
13050 `(#:tests? #f
13051 #:jar-name "jakarta.activation.jar"
13052 #:jdk ,openjdk9
13053 #:source-dir "activation/src/main/java"
13054 #:phases
13055 (modify-phases %standard-phases
13056 ;; Install under javax.activation:activation coordinates
13057 ;; so consumers like javax.mail can find it. The source
13058 ;; pom uses com.sun.activation:jakarta.activation but that's
13059 ;; the new coordinate; most existing poms reference the
13060 ;; old javax.activation:activation.
13061 (add-before 'install 'create-pom
13062 (generate-pom.xml "pom.xml" "javax.activation"
13063 "activation" ,version))
13064 (replace 'install
13065 (install-from-pom "pom.xml")))))
13066 (home-page "https://jakarta.ee/specifications/activation/")
13067 (synopsis "Jakarta Activation API (javax.activation)")
13068 (description "Jakarta Activation provides the @code{javax.activation}
13069package, which was removed from the JDK in Java 11. This is the 1.2.x
13070transitional release that still uses the @code{javax.activation} namespace.")
13071 (license license:edl1.0)))
13072
13073(define-public java-bouncycastle-1.77
13074 (package
13075 (inherit java-bouncycastle)
13076 (version "1.77")
13077 (source (origin
13078 (method git-fetch)
13079 (uri (git-reference
13080 (url "https://github.com/bcgit/bc-java")
13081 (commit (string-append "r1rv" (substring version 2 4)))))
13082 (file-name (git-file-name "java-bouncycastle" version))
13083 (sha256
13084 (base32
13085 "1adxic0pgb7gv2yflw72np7zilj6rrhgjcj3xvnmidwp2pc887k1"))
13086 (modules '((guix build utils)))
13087 (snippet
13088 '(begin
13089 (for-each delete-file
13090 (find-files "." "\\.jar$"))
13091 #t))))
13092 (arguments
13093 `(#:jdk ,openjdk17
13094 #:tests? #f
13095 #:phases
13096 (modify-phases %standard-phases
13097 (replace 'build
13098 (lambda _
13099 (let ((suffix (string-append
13100 "-Drelease.suffix="
13101 ,(string-join (string-split version #\.) ""))))
13102 (mkdir-p "ant/docs")
13103 ;; Build individual targets. Can't use the 'build'
13104 ;; target because it includes 'build-test' which needs
13105 ;; the UnboundID LDAP SDK.
13106 (invoke "ant" "-f" "ant/jdk18+.xml" suffix
13107 "build-provider")
13108 ;; The remaining targets are only in bc+-build.xml.
13109 ;; Call it via ant's -f but pass properties that
13110 ;; jdk18+.xml normally sets.
13111 (let ((props (list suffix
13112 "-Dtarget.prefix=jdk18on"
13113 "-Djdk.name=jdk1.8"
13114 "-Dbc.javac.source=1.8"
13115 "-Dbc.javac.target=1.8"
13116 "-Dbuild.dir=build"
13117 "-Djavadoc.args=-breakiterator"
13118 (string-append "-Dsrc.dir="
13119 (getcwd) "/build/jdk1.8")
13120 (string-append "-Dartifacts.dir="
13121 (getcwd) "/build/artifacts/jdk1.8"))))
13122 (for-each
13123 (lambda (target)
13124 (apply invoke "ant" "-f" "ant/bc+-build.xml"
13125 (append props (list target))))
13126 '("build-util" "build-pkix" "build-pg" "build-mail"))))))
13127 (add-after 'build 'add-osgi-manifests
13128 (lambda _
13129 ;; The Maven Central jars have OSGi manifest attributes
13130 ;; from maven-bundle-plugin. Add them since we build
13131 ;; with ant.
13132 (for-each
13133 (lambda (name)
13134 (let ((jar (car (find-files "build/artifacts"
13135 (string-append name "-jdk18on.*\\.jar$")))))
13136 (call-with-output-file "osgi-manifest.mf"
13137 (lambda (port)
13138 (display (string-append
13139 "Bundle-ManifestVersion: 2\n"
13140 "Bundle-SymbolicName: " name "\n"
13141 "Bundle-Version: " ,version "\n")
13142 port)))
13143 (invoke "jar" "ufm" jar "osgi-manifest.mf")))
13144 '("bcprov" "bcutil" "bcpkix" "bcpg"))))
13145 (add-after 'add-osgi-manifests 'rename-jars
13146 (lambda _
13147 ;; Ant produces e.g. bcprov-jdk18on-177.jar but
13148 ;; install-from-pom expects bcprov-jdk18on-1.77.jar.
13149 (for-each
13150 (lambda (name)
13151 (let ((src (car (find-files "build/artifacts"
13152 (string-append name "-jdk18on-.*\\.jar$"))))
13153 (dest (string-append "build/artifacts/jdk1.8/jars/"
13154 name "-jdk18on-" ,version ".jar")))
13155 (unless (string=? src dest)
13156 (rename-file src dest))))
13157 '("bcprov" "bcutil" "bcpkix" "bcpg"))))
13158 (replace 'install
13159 (lambda* (#:key inputs outputs jar-name #:allow-other-keys)
13160 (for-each
13161 (lambda (name)
13162 (let ((pom-file (string-append name "-pom.xml"))
13163 (artifact (string-append name "-jdk18on")))
13164 ((generate-pom.xml pom-file "org.bouncycastle"
13165 artifact ,version))
13166 ((install-from-pom pom-file)
13167 #:inputs inputs #:outputs outputs
13168 #:jar-name (string-append artifact "-" ,version "\\.jar$"))))
13169 '("bcprov" "bcutil" "bcpkix" "bcpg")))))))
13170 (inputs
13171 (list java-jakarta-activation-1.2
13172 java-javax-mail))
13173 (description "Bouncy Castle is a cryptographic library for the Java
13174programming language. This is version 1.77 which has breaking API changes
13175compared to 1.67 (removed classes in ASN1, CMC, and other packages).")))
13176
13177(define-public java-eclipse-jdt-annotation-2
13178 (package
13179 (name "java-eclipse-jdt-annotation")
13180 (version "2.2.600")
13181 (source (origin
13182 (method url-fetch)
13183 (uri (string-append "https://repo1.maven.org/maven2/"
13184 "org/eclipse/jdt/org.eclipse.jdt.annotation/"
13185 version "/org.eclipse.jdt.annotation-"
13186 version "-sources.jar"))
13187 (sha256
13188 (base32
13189 "1jlq14ivhj32i7glfdmk068ya1spm4wfa9h8h2p326y0fkkzwyp9"))))
13190 (build-system ant-build-system)
13191 (arguments
13192 `(#:tests? #f
13193 #:jar-name "org.eclipse.jdt.annotation.jar"
13194 #:source-dir "."
13195 #:phases
13196 (modify-phases %standard-phases
13197 (add-before 'install 'create-pom
13198 (generate-pom.xml "pom.xml" "org.eclipse.jdt"
13199 "org.eclipse.jdt.annotation" ,version))
13200 (replace 'install (install-from-pom "pom.xml")))))
13201 (native-inputs (list unzip))
13202 (home-page "https://www.eclipse.org/jdt/")
13203 (synopsis "Eclipse JDT null analysis annotations")
13204 (description "This package provides the @code{@@NonNull}, @code{@@Nullable},
13205and @code{@@NonNullByDefault} annotations used by Eclipse JDT for null
13206analysis.")
13207 (license license:epl2.0)))
13208
13209(define-public java-kohlschutter-compiler-annotations-1
13210 (package
13211 (name "java-kohlschutter-compiler-annotations")
13212 (version "1.4.2")
13213 (source (origin
13214 (method url-fetch)
13215 (uri (string-append "https://repo1.maven.org/maven2/"
13216 "com/kohlschutter/compiler-annotations/"
13217 version "/compiler-annotations-"
13218 version "-sources.jar"))
13219 (sha256
13220 (base32
13221 "0fzmhr9binv1ah410955m95w6lwwidy9sw06yy5cjcrcjx7v0455"))))
13222 (build-system ant-build-system)
13223 (arguments
13224 `(#:tests? #f
13225 #:jar-name "compiler-annotations.jar"
13226 #:jdk ,openjdk9
13227 #:source-dir "."
13228 #:phases
13229 (modify-phases %standard-phases
13230 (add-before 'install 'create-pom
13231 (generate-pom.xml "pom.xml" "com.kohlschutter"
13232 "compiler-annotations" ,version))
13233 (replace 'install (install-from-pom "pom.xml")))))
13234 (inputs (list java-eclipse-jdt-annotation-2))
13235 (native-inputs (list unzip))
13236 (home-page "https://github.com/kohlschutter/compiler-annotations")
13237 (synopsis "Compile-time annotations for Java")
13238 (description "This package provides compile-time annotations such as
13239@code{@@SuppressFBWarnings} and @code{@@ExcludeFromCodeCoverageGeneratedReport}.")
13240 (license license:asl2.0)))
13241
13242(define junixsocket-source
13243 (origin
13244 (method git-fetch)
13245 (uri (git-reference
13246 (url "https://github.com/kohlschutter/junixsocket")
13247 (commit "junixsocket-parent-2.5.1")))
13248 (file-name (git-file-name "java-junixsocket" "2.5.1"))
13249 (sha256
13250 (base32
13251 "1zc84qbl2zsi9ch6b12crbiqlrkbrlw1z09kqlj04zrmck4k4pzn"))))
13252
13253(define-public java-junixsocket-common-2
13254 (package
13255 (name "java-junixsocket-common")
13256 (version "2.5.1")
13257 (source junixsocket-source)
13258 (build-system ant-build-system)
13259 (arguments
13260 `(#:jar-name "junixsocket-common.jar"
13261 #:source-dir "junixsocket-common/src/main/java"
13262 #:jdk ,openjdk9
13263 #:tests? #f
13264 #:phases
13265 (modify-phases %standard-phases
13266 (add-after 'unpack 'delete-module-info
13267 (lambda _
13268 ;; module-info.java requires modules not available in
13269 ;; our build (com.kohlschutter.annotations.compiletime,
13270 ;; org.eclipse.jdt.annotation). The classes compile
13271 ;; and work without JPMS metadata.
13272 (delete-file
13273 "junixsocket-common/src/main/java/module-info.java")))
13274 (replace 'install
13275 (install-from-pom "junixsocket-common/pom.xml")))))
13276 (inputs (list java-eclipse-jdt-annotation-2
13277 java-kohlschutter-compiler-annotations-1))
13278 (home-page "https://github.com/kohlschutter/junixsocket")
13279 (synopsis "Java library for Unix domain sockets")
13280 (description "junixsocket is a Java library for Unix domain sockets
13281(AF_UNIX) and other address/protocol families, providing a Java Socket API
13282compatible interface.")
13283 (license license:asl2.0)))
13284
13285(define-public java-junixsocket-native-common-2.5.1
13286 (package
13287 (name "java-junixsocket-native-common")
13288 (version "2.5.1")
13289 (source junixsocket-source)
13290 (build-system ant-build-system)
13291 (arguments
13292 (list
13293 #:tests? #f
13294 #:jdk openjdk9
13295 #:jar-name "junixsocket-native-common.jar"
13296 #:source-dir "junixsocket-native-common/src/main/java"
13297 #:phases
13298 #~(modify-phases %standard-phases
13299 (add-before 'build 'set-module-path
13300 (lambda* (#:key inputs #:allow-other-keys)
13301 ;; javac needs compiler-annotations on the module path
13302 ;; (not classpath) for JPMS 'requires static' resolution.
13303 (let ((mod-dir (assoc-ref inputs
13304 "java-kohlschutter-compiler-annotations")))
13305 (setenv "JDK_JAVAC_OPTIONS"
13306 (string-append "--module-path="
13307 (car (find-files mod-dir "\\.jar$")))))))
13308 (add-before 'build 'build-native
13309 (lambda* (#:key inputs #:allow-other-keys)
13310 (let ((jdk (assoc-ref inputs "jdk"))
13311 (c-dir "junixsocket-native/src/main/c"))
13312 ;; Fix GCC incompatibility: _Pragma inside expressions
13313 ;; is a Clang extension, not supported by GCC.
13314 (substitute* (string-append c-dir "/ckmacros.h")
13315 (("# define CK_IGNORE_CAST_BEGIN \\\\")
13316 "# define CK_IGNORE_CAST_BEGIN")
13317 (("# define CK_IGNORE_CAST_END \\\\")
13318 "# define CK_IGNORE_CAST_END")
13319 (("_Pragma\\(\"GCC diagnostic.*cast.*\"\\)") "")
13320 (("_Pragma\\(\"GCC diagnostic push\"\\)") "")
13321 (("_Pragma\\(\"GCC diagnostic pop\"\\)") ""))
13322 (let ((so-file (string-append
13323 "junixsocket-native-common/src/main/"
13324 "resources/lib/amd64-Linux-clang/jni/"
13325 "libjunixsocket-native-" #$version ".so")))
13326 (mkdir-p (dirname so-file))
13327 (apply invoke "gcc" "-shared" "-fPIC" "-O2"
13328 "-Wno-int-to-pointer-cast"
13329 "-Wno-pointer-to-int-cast"
13330 "-Wno-bad-function-cast"
13331 "-Wno-cast-function-type"
13332 "-Wno-stringop-overflow"
13333 (string-append "-I" c-dir)
13334 (string-append "-I" c-dir "/jni")
13335 (string-append "-I" jdk "/include")
13336 (string-append "-I" jdk "/include/linux")
13337 "-o" so-file
13338 (find-files c-dir "\\.c$"))))))
13339 (add-after 'build 'add-native-to-jar
13340 (lambda _
13341 (invoke "jar" "uf"
13342 "build/jar/junixsocket-native-common.jar"
13343 "-C" "junixsocket-native-common/src/main/resources"
13344 "lib")))
13345 ;; The source pom.xml lists pre-built native library
13346 ;; NARs for every platform. We build the native code
13347 ;; from source, so none of those dependencies apply.
13348 (add-before 'install 'create-pom
13349 (generate-pom.xml "pom.xml"
13350 "com.kohlschutter.junixsocket"
13351 "junixsocket-native-common" #$version))
13352 (replace 'install
13353 (install-from-pom "pom.xml")))))
13354 (native-inputs (list java-kohlschutter-compiler-annotations-1))
13355 (home-page "https://github.com/kohlschutter/junixsocket")
13356 (synopsis "Native JNI library for junixsocket")
13357 (description "This package provides the native JNI library for
13358junixsocket, built from source for Linux.")
13359 (license license:asl2.0)))
13360
13361(define-public java-lmax-disruptor
13362 (package
13363 (name "java-lmax-disruptor")
13364 (version "3.4.4")
13365 (source (origin
13366 (method git-fetch)
13367 (uri (git-reference
13368 (url "https://github.com/LMAX-Exchange/disruptor")
13369 (commit version)))
13370 (file-name (git-file-name name version))
13371 (sha256
13372 (base32
13373 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
13374 (build-system ant-build-system)
13375 (arguments
13376 `(#:jar-name "java-lmax-disruptor.jar"
13377 #:jdk ,icedtea-8
13378 #:tests? #f)); tests hang
13379 (inputs
13380 `(("junit" ,java-junit)
13381 ("java-hdrhistogram" ,java-hdrhistogram)
13382 ("java-jmock" ,java-jmock)
13383 ("java-jmock-legacy" ,java-jmock-legacy)
13384 ("java-jmock-junit4" ,java-jmock-junit4)
13385 ("java-hamcrest-all" ,java-hamcrest-all)))
13386 (native-inputs
13387 `(("cglib" ,java-cglib)
13388 ("objenesis" ,java-objenesis)))
13389 (home-page "https://www.lmax.com/disruptor")
13390 (synopsis "High performance inter-thread communication")
13391 (description "LMAX Disruptor is a software pattern and software component
13392for high performance inter-thread communication that avoids the need for
13393message queues or resource locking.")
13394 (license license:asl2.0)))
13395
13396(define-public java-conversant-disruptor
13397 (package
13398 (name "java-conversant-disruptor")
13399 (version "1.2.19")
13400 (source (origin
13401 (method git-fetch)
13402 (uri (git-reference
13403 (url "https://github.com/conversant/disruptor")
13404 (commit version)))
13405 (file-name (git-file-name name version))
13406 (sha256
13407 (base32
13408 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
13409 (build-system ant-build-system)
13410 (arguments
13411 `(#:jar-name "java-conversant-disruptor.jar"
13412 #:source-dir "src/main/java"
13413 #:phases
13414 (modify-phases %standard-phases
13415 (add-before 'build 'copy-resources
13416 (lambda _
13417 (copy-recursively "src/main/resources" "build/classes")))
13418 (add-before 'build 'remove-module
13419 (lambda _
13420 (delete-file "src/main/java/module-info.java"))))))
13421 (native-inputs
13422 (list java-junit))
13423 (home-page "https://github.com/conversant/disruptor")
13424 (synopsis "High performance intra-thread communication")
13425 (description "Conversant Disruptor is the highest performing intra-thread
13426transfer mechanism available in Java. Conversant Disruptor is an implementation
13427of this type of ring buffer that has almost no overhead and that exploits a
13428particularly simple design.")
13429 (license license:asl2.0)))
13430
13431(define-public java-jctools-core-1
13432 (package
13433 (name "java-jctools-core")
13434 (version "1.2.1")
13435 (source (origin
13436 (method git-fetch)
13437 (uri (git-reference
13438 (url "https://github.com/JCTools/JCTools")
13439 (commit (string-append "v" version))))
13440 (file-name (git-file-name name version))
13441 (sha256
13442 (base32
13443 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
13444 (build-system ant-build-system)
13445 (arguments
13446 `(#:jar-name "java-jctools-core.jar"
13447 #:source-dir "jctools-core/src/main/java"
13448 #:test-dir "jctools-core/src/test"
13449 ;; The tests timeout on some architectures.
13450 #:tests? ,(not (or (target-aarch64?)
13451 (%current-target-system)))))
13452 (native-inputs
13453 (list java-junit java-hamcrest-all))
13454 (home-page "https://github.com/JCTools/JCTools")
13455 (synopsis "Concurrency tools for Java")
13456 (description "This library implements concurrent data structures that are
13457not natively available in Java.")
13458 (license license:asl2.0)))
13459
13460(define-public java-commons-bcel
13461 (package
13462 (name "java-commons-bcel")
13463 (version "6.1")
13464 (source (origin
13465 (method url-fetch)
13466 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
13467 version "-src.tar.gz"))
13468 (sha256
13469 (base32
13470 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
13471 (build-system ant-build-system)
13472 (arguments
13473 `(#:jar-name "bcel.jar"
13474 #:jdk ,icedtea-8
13475 #:source-dir "src/main/java"
13476 #:test-dir "src/test/java"
13477 ;; FIXME: Tests require the unpackaged jna.
13478 #:tests? #f))
13479 (home-page "https://commons.apache.org/proper/commons-bcel/")
13480 (synopsis "Byte code engineering library")
13481 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
13482intended to give users a convenient way to analyze, create, and
13483manipulate (binary) Java class files. Classes are represented by objects
13484which contain all the symbolic information of the given class: methods, fields
13485and byte code instructions, in particular.
13486
13487Such objects can be read from an existing file, be transformed by a
13488program (e.g. a class loader at run-time) and written to a file again. An
13489even more interesting application is the creation of classes from scratch at
13490run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
13491if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
13492of Java @code{.class} files.")
13493 (properties '((upstream-name . "bcel")))
13494 (license license:asl2.0)))
13495
13496(define-public java-xerial-core
13497 (package
13498 (name "java-xerial-core")
13499 (version "2.1")
13500 (source (origin
13501 (method url-fetch)
13502 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
13503 version ".tar.gz"))
13504 (file-name (string-append name "-" version ".tar.gz"))
13505 (sha256
13506 (base32
13507 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
13508 (build-system ant-build-system)
13509 (arguments
13510 `(#:jar-name "xerial-core.jar"
13511 #:source-dir "xerial-core/src/main/java"
13512 #:test-dir "xerial-core/src/test"
13513 #:phases
13514 (modify-phases %standard-phases
13515 (add-before 'build 'copy-resources
13516 (lambda _
13517 (copy-recursively "xerial-core/src/main/resources"
13518 "build/classes")
13519 #t)))))
13520 (native-inputs
13521 `(("junit" ,java-junit)
13522 ("hamcrest" ,java-hamcrest-core)))
13523 (home-page "https://github.com/xerial/xerial-java")
13524 (synopsis "Data management libraries for Java")
13525 (description "Xerial is a set of data management libraries for the Java
13526programming language. The ultimate goal of the Xerial project is to manage
13527everything as database, including class objects, text format data, data
13528streams, etc.")
13529 (license license:asl2.0)))
13530
13531(define-public java-asm-jdk-bridge
13532 (package
13533 (name "java-asm-jdk-bridge")
13534 (version "0.0.13")
13535 (source (origin
13536 (method git-fetch)
13537 (uri (git-reference
13538 (url "https://github.com/raphw/asm-jdk-bridge")
13539 (commit (string-append "asm-jdk-bridge-parent-" version))))
13540 (file-name (git-file-name name version))
13541 (sha256
13542 (base32
13543 "1f9x94drnjdr1k6wr49g9vn0prx5s5a4qfx91rx19w136cmx92yc"))))
13544 (build-system ant-build-system)
13545 (arguments
13546 (list #:jar-name "asm-jdk-bridge.jar"
13547 #:tests? #f ; tests require JUnit 5
13548 #:source-dir "asm-jdk-bridge/src/main/java"))
13549 (inputs (list java-asm-9.10))
13550 (home-page "https://github.com/raphw/asm-jdk-bridge")
13551 (synopsis "Bridge between the ASM API and the OpenJDK Class File API")
13552 (description
13553 "This package implements adapters to translate between ASM visitors and
13554the OpenJDK Class File API. It allows plugging the OpenJDK reader and writer
13555into existing ASM-based code with little change: an instance of ASM's
13556@code{ClassReader} or @code{ClassWriter} can be replaced with
13557@code{JdkClassReader} or @code{JdkClassWriter}, which use the Class File API
13558internally while exposing APIs equal to ASM.")
13559 (license license:asl2.0)))
13560
13561(define-public java-byte-buddy-dep
13562 (package
13563 (name "java-byte-buddy-dep")
13564 (version "1.18.14")
13565 (source (origin
13566 (method git-fetch)
13567 (uri (git-reference
13568 (url "https://github.com/raphw/byte-buddy")
13569 (commit (string-append "byte-buddy-" version))))
13570 (file-name (git-file-name name version))
13571 (sha256
13572 (base32
13573 "0s4dj0vdpz9dzm4kk89bkzbywy2c7dkf5bapk4f39yc0c31qcqrr"))))
13574 (build-system ant-build-system)
13575 (arguments
13576 (list #:jar-name "byte-buddy-dep.jar"
13577 #:tests? #f ; tests are incompatible with current jdk
13578 #:source-dir "byte-buddy-dep/src/main/java"
13579 #:test-dir "byte-buddy-dep/src/test"))
13580 (propagated-inputs
13581 (list java-asm-9.10
13582 java-asm-commons-9.10
13583 java-asm-jdk-bridge
13584 java-native-access))
13585 (native-inputs
13586 (list java-findbugs-annotations))
13587 (home-page "http://bytebuddy.net/")
13588 (synopsis "Runtime code generation for the Java virtual machine")
13589 (description "Byte Buddy is a code generation and manipulation library for
13590creating and modifying Java classes during the runtime of a Java application
13591and without the help of a compiler.")
13592 (license license:asl2.0)))
13593
13594(define-public java-byte-buddy-agent
13595 (package
13596 (inherit java-byte-buddy-dep)
13597 (name "java-byte-buddy-agent")
13598 (arguments
13599 (list #:jar-name "byte-buddy-agent.jar"
13600 #:tests? #f; tests require attaching to a running JVM
13601 #:source-dir "byte-buddy-agent/src/main/java"
13602 #:test-dir "byte-buddy-agent/src/test"))
13603 (propagated-inputs
13604 (list java-native-access
13605 java-native-access-platform))
13606 (native-inputs
13607 (list java-findbugs-annotations))
13608 (synopsis "Attach Byte Buddy agents to a running Java virtual machine")
13609 (description "The Byte Buddy agent allows the attachment of a Java agent to
13610the current or to a remote Java virtual machine. It enables Byte Buddy to
13611redefine and retransform classes that are already loaded, making it possible to
13612manipulate the bytecode of a running application.")))
13613
13614(define-public java-powermock-reflect
13615 (package
13616 (name "java-powermock-reflect")
13617 (version "2.0.9")
13618 (source (origin
13619 (method git-fetch)
13620 (uri (git-reference
13621 (url "https://github.com/powermock/powermock")
13622 (commit (string-append "powermock-" version))))
13623 (file-name (git-file-name name version))
13624 (sha256
13625 (base32
13626 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
13627 (patches
13628 (search-patches "java-powermock-fix-java-files.patch"))))
13629 (build-system ant-build-system)
13630 (arguments
13631 `(#:jar-name "java-powermock-reflect.jar"
13632 #:source-dir "powermock-reflect/src/main/java"
13633 #:test-dir "powermock-reflect/src/test"))
13634 (inputs
13635 (list java-asm-9 java-objenesis))
13636 (native-inputs
13637 (list java-assertj java-cglib java-hamcrest-core java-junit))
13638 (home-page "https://github.com/powermock/powermock")
13639 (synopsis "Mock library extension framework")
13640 (description "PowerMock is a framework that extends other mock libraries
13641such as EasyMock with more powerful capabilities. PowerMock uses a custom
13642classloader and bytecode manipulation to enable mocking of static methods,
13643constructors, final classes and methods, private methods, removal of static
13644initializers and more. By using a custom classloader no changes need to be
13645done to the IDE or continuous integration servers which simplifies adoption.")
13646 (license license:asl2.0)))
13647
13648(define-public java-powermock-core
13649 (package
13650 (inherit java-powermock-reflect)
13651 (name "java-powermock-core")
13652 (arguments
13653 `(#:jar-name "java-powermock-core.jar"
13654 #:source-dir "powermock-core/src/main/java"
13655 #:test-dir "powermock-core/src/test"
13656 #:tests? #f; requires powermock-api
13657 #:jdk ,icedtea-8
13658 #:phases
13659 (modify-phases %standard-phases
13660 (add-before 'build 'copy-resources
13661 (lambda _
13662 (copy-recursively "powermock-core/src/main/resources"
13663 "build/classes")
13664 #t)))))
13665 (inputs
13666 (list java-asm-9
13667 java-byte-buddy-dep
13668 java-jboss-javassist
13669 java-powermock-reflect))
13670 (native-inputs
13671 (list java-assertj java-mockito-1 java-junit))))
13672
13673(define-public java-powermock-api-support
13674 (package
13675 (inherit java-powermock-reflect)
13676 (name "java-powermock-api-support")
13677 (build-system ant-build-system)
13678 (arguments
13679 `(#:jar-name "java-powermock-api-support.jar"
13680 #:jdk ,icedtea-8
13681 #:source-dir "powermock-api/powermock-api-support/src/main/java"
13682 #:tests? #f)); no tests
13683 (inputs
13684 (list java-powermock-core java-powermock-reflect))))
13685
13686(define-public java-powermock-modules-junit4-common
13687 (package
13688 (inherit java-powermock-reflect)
13689 (name "java-powermock-modules-junit4-common")
13690 (build-system ant-build-system)
13691 (arguments
13692 `(#:jar-name "java-powermock-modules-junit4-common.jar"
13693 #:jdk ,icedtea-8
13694 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
13695 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
13696 (inputs
13697 (list java-cglib
13698 java-easymock
13699 java-hamcrest-core
13700 java-powermock-core
13701 java-powermock-reflect))))
13702
13703(define-public java-powermock-modules-junit4
13704 (package
13705 (inherit java-powermock-reflect)
13706 (name "java-powermock-modules-junit4")
13707 (build-system ant-build-system)
13708 (arguments
13709 `(#:jar-name "java-powermock-modules-junit4.jar"
13710 #:tests? #f; require easymock 4, which introduces a loop with testng
13711 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
13712 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
13713 #:phases
13714 (modify-phases %standard-phases
13715 (add-before 'build 'fix-junit-detection
13716 (lambda _
13717 ;; Our junit version is 4.12-SNAPSHOT
13718 (substitute* (find-files "powermock-modules/powermock-module-junit4"
13719 "PowerMockJUnit4MethodValidator.java")
13720 (("4.12") "4.12-SNAPSHOT"))
13721 #t)))))
13722 (inputs
13723 (list java-cglib
13724 java-powermock-core
13725 java-powermock-reflect
13726 java-powermock-modules-junit4-common))
13727 (native-inputs
13728 (list java-easymock
13729 java-hamcrest-core
13730 java-junit
13731 java-objenesis))))
13732
13733(define-public java-powermock-api-easymock
13734 (package
13735 (inherit java-powermock-reflect)
13736 (name "java-powermock-api-easymock")
13737 (build-system ant-build-system)
13738 (arguments
13739 `(#:jar-name "java-powermock-api-easymock.jar"
13740 #:jdk ,icedtea-8
13741 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
13742 #:tests? #f; no tests
13743 #:phases
13744 (modify-phases %standard-phases
13745 (add-before 'build 'fix-file
13746 (lambda _
13747 ;; FIXME: This looks wrong, but it fixes a build error.
13748 (with-directory-excursion "powermock-api/powermock-api-easymock"
13749 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
13750 (("classLoader instanceof MockClassLoader") "false")
13751 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
13752 #t)))))
13753 (inputs
13754 (list java-cglib
13755 java-easymock
13756 java-powermock-api-support
13757 java-powermock-core
13758 java-powermock-reflect))))
13759
13760(define-public java-jboss-jms-api-spec
13761 (package
13762 (name "java-jboss-jms-api-spec")
13763 (version "2.0")
13764 (source (origin
13765 (method url-fetch)
13766 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
13767 "archive/jboss-jms-api_" version
13768 "_spec-1.0.1.Final.tar.gz"))
13769 (sha256
13770 (base32
13771 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
13772 (build-system ant-build-system)
13773 (arguments
13774 `(#:jar-name "java-jboss-jms-api_spec.jar"
13775 #:jdk ,icedtea-8
13776 #:source-dir "."
13777 #:tests? #f)); no tests
13778 (home-page "https://github.com/jboss/jboss-jms-api_spec")
13779 (synopsis "Java Message Service API specification")
13780 (description "Java Message Service (JMS) API is used to send messages
13781messages between two or more clients. It is a messaging standard that allows
13782application components to create, send, receive, and read messages.")
13783 ; either gpl2 only with GPL Classpath Exception, or cddl.
13784 (license (list license:gpl2 license:cddl1.0))))
13785
13786(define-public java-mail
13787 (package
13788 (name "java-mail")
13789 (version "1.6.0")
13790 (source (origin
13791 (method url-fetch)
13792 (uri (string-append "https://github.com/javaee/javamail/archive/"
13793 "JAVAMAIL-1_6_0.tar.gz"))
13794 (sha256
13795 (base32
13796 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
13797 (build-system ant-build-system)
13798 (arguments
13799 `(#:jar-name "java-mail.jar"
13800 #:jdk ,icedtea-8
13801 #:source-dir "mail/src/main/java"
13802 #:test-dir "mail/src/test"
13803 #:test-exclude
13804 (list "**/CollectorFormatterTest.java"
13805 "**/CompactFormatterTest.java"
13806 "**/DurationFilterTest.java"
13807 "**/MailHandlerTest.java"
13808 "**/GetLocalAddressTest.java"
13809 ;; SSLHandshakeException: No appropriate protocol
13810 "**/WriteTimeoutSocketTest.java"
13811 ;; FIXME: both end with:
13812 ;; java.lang.ClassNotFoundException:
13813 ;; javax.mail.internet.MimeMultipartParseTest
13814 "**/MimeMultipartParseTest.java"
13815 "**/SearchTermSerializationTest.java")
13816 #:phases
13817 (modify-phases %standard-phases
13818 (add-before 'configure 'move-version.java
13819 (lambda _
13820 (copy-file "mail/src/main/resources/javax/mail/Version.java"
13821 "mail/src/main/java/javax/mail/Version.java")))
13822 (add-before 'build 'copy-resources
13823 (lambda _
13824 (copy-recursively "mail/src/main/resources/META-INF"
13825 "build/classes/META-INF"))))))
13826 (native-inputs
13827 (list java-junit java-hamcrest-core))
13828 (home-page "https://javaee.github.io/javamail/")
13829 (synopsis "Mail-related functionality in Java")
13830 (description "The JavaMail API provides a platform-independent and
13831protocol-independent framework to build mail and messaging applications.")
13832 ;; General Public License Version 2 only ("GPL") or the Common Development
13833 ;; and Distribution License("CDDL")
13834 (license (list license:cddl1.1
13835 license:gpl2)))); with classpath exception
13836
13837(define-public java-mapdb
13838 (package
13839 (name "java-mapdb")
13840 (version "1.0.9")
13841 (source (origin
13842 (method git-fetch)
13843 (uri (git-reference
13844 (url "https://github.com/jankotek/mapdb")
13845 (commit (string-append "mapdb-" version))))
13846 (file-name (git-file-name name version))
13847 (sha256
13848 (base32
13849 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
13850 (build-system ant-build-system)
13851 (arguments
13852 (list #:jar-name "mapdb.jar"
13853 #:source-dir "src/main/java"
13854 #:test-dir "src/test"
13855 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
13856 "**/ConcurrentMapInterfaceTest.java"
13857 "**/EngineTest.java"
13858 "**/Issue664Test.java"
13859 "**/MapInterfaceTest.java")
13860 #:phases #~(modify-phases %standard-phases
13861 (replace 'install (install-from-pom "pom.xml")))))
13862 (native-inputs (list java-junit))
13863 (home-page "https://mapdb.org/")
13864 (synopsis "Concurrent data structures")
13865 (description "MapDB provides concurrent maps, sets and queues backed by
13866disk storage or off-heap memory.")
13867 (license license:bsd-3)))
13868
13869(define-public java-mime4j-core
13870 (package
13871 (name "java-mime4j-core")
13872 (version "0.8.13")
13873 (source (origin
13874 (method url-fetch)
13875 (uri (string-append "mirror://apache/james/mime4j/" version
13876 "/james-mime4j-sources-" version ".zip"))
13877 (sha256
13878 (base32
13879 "0f1r0ywa1qdw2b227c93v3fksqp9bgll00bqw1md1894v3szm9ca"))))
13880 (build-system ant-build-system)
13881 (arguments
13882 `(#:tests? #f ;; has no tests
13883 #:source-dir "core/src/main/java"
13884 #:jar-name "apache-mime4j-core.jar"))
13885 (native-inputs
13886 (list java-commons-io-latest ;; requries >= 2.7
13887 java-junit
13888 unzip))
13889 (home-page "https://james.apache.org/mime4j/apache-mime4j-core/")
13890 (synopsis "Java stream based MIME message parser")
13891 (description "Apache James Mime4J provides a parser, MimeStreamParser, for
13892e-mail message streams in plain rfc822 and MIME format. The parser uses a
13893callback mechanism to report parsing events such as the start of an entity
13894header, the start of a body, etc. If you are familiar with the SAX XML parser
13895interface you should have no problem getting started with mime4j.")
13896 (license license:asl2.0)))
13897
13898(define-public java-jeromq
13899 (package
13900 (name "java-jeromq")
13901 (version "0.4.3")
13902 (source (origin
13903 (method git-fetch)
13904 (uri (git-reference
13905 (url "https://github.com/zeromq/jeromq")
13906 (commit (string-append "v" version))))
13907 (file-name (string-append name "-" version "-checkout"))
13908 (sha256
13909 (base32
13910 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
13911 (patches (search-patches "java-jeromq-fix-tests.patch"))))
13912 (build-system ant-build-system)
13913 (arguments
13914 `(#:jar-name "java-jeromq.jar"
13915 #:source-dir "src/main/java"
13916 #:jdk ,icedtea-8
13917 #:test-exclude
13918 (list
13919 "**/Abstract*.java"
13920 ;; Requires network
13921 "**/ZBeaconTest.java"
13922 ;; Failures
13923 "**/DealerSpecTest.java"
13924 "**/CustomDecoderTest.java"
13925 "**/CustomEncoderTest.java"
13926 "**/ConnectRidTest.java"
13927 "**/ReqSpecTest.java"
13928 "**/PushPullSpecTest.java"
13929 "**/PubSubHwmTest.java"
13930 "**/RouterSpecTest.java"
13931 "**/ProxyTest.java")))
13932 (inputs
13933 (list java-jnacl))
13934 (native-inputs
13935 `(("java-hamcrest-core" ,java-hamcrest-core)
13936 ("junit" ,java-junit)))
13937 (home-page "https://zeromq.org/bindings:java")
13938 (synopsis "Java binding for 0MQ")
13939 (description "Jeromq provides the java bindings for 0MQ.")
13940 (license license:mpl2.0)))
13941
13942(define-public java-kafka-clients
13943 (package
13944 (name "java-kafka-clients")
13945 (version "1.1.1")
13946 (source (origin
13947 (method url-fetch)
13948 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
13949 version "-src.tgz"))
13950 (sha256
13951 (base32
13952 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
13953 (build-system ant-build-system)
13954 (arguments
13955 `(#:jar-name "java-kafka-clients.jar"
13956 #:jdk ,icedtea-8
13957 #:source-dir "clients/src/main/java"
13958 #:test-dir "clients/src/test"
13959 #:test-exclude
13960 (list
13961 ;; This file does not contain a class
13962 "**/IntegrationTest.java"
13963 ;; Requires network
13964 "**/ClientUtilsTest.java"
13965 ;; This test fails on i686
13966 "**/SerializationTest.java"
13967 ;; "protocol is disabled or cipher suites are inappropriate"
13968 "**/SslTransportLayerTest.java"
13969 ;; End with errors that seem related to our powermock
13970 "**/KafkaProducerTest.java"
13971 "**/BufferPoolTest.java"
13972 ;; Undeterministic failure, seems to affect mostly ci
13973 "**/GarbageCollectedMemoryPoolTest.java")))
13974 (inputs
13975 (list java-slf4j-api java-lz4))
13976 (native-inputs
13977 (list java-bouncycastle
13978 java-cglib
13979 java-easymock
13980 java-hamcrest-all
13981 java-jboss-javassist
13982 java-junit
13983 java-objenesis
13984 java-powermock-api-easymock
13985 java-powermock-api-support
13986 java-powermock-core
13987 java-powermock-modules-junit4
13988 java-powermock-modules-junit4-common
13989 java-snappy))
13990 (home-page "https://kafka.apache.org")
13991 (synopsis "Distributed streaming platform")
13992 (description "Kafka is a distributed streaming platform, which means:
13993@itemize
13994@item it can publish and subscribe to streams of records;
13995@item it can store streams of records in a fault-tolerant way;
13996@item it can process streams of records as they occur.
13997@end itemize")
13998 ;; Either cddl or gpl2 only.
13999 (license (list license:cddl1.1; actually cddl1.1
14000 license:gpl2)))); with classpath exception
14001
14002(define-public java-jdom
14003 (package
14004 (name "java-jdom")
14005 (version "1.1.3")
14006 (source (origin
14007 (method url-fetch)
14008 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
14009 version ".tar.gz"))
14010 (sha256
14011 (base32
14012 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
14013 (build-system ant-build-system)
14014 (arguments
14015 `(#:build-target "package"
14016 #:tests? #f; tests are run as part of the build process
14017 #:phases
14018 (modify-phases %standard-phases
14019 (replace 'install
14020 (install-jars "build")))))
14021 (home-page "http://jdom.org/")
14022 (synopsis "Access, manipulate, and output XML data")
14023 (description "Java-based solution for accessing, manipulating, and
14024outputting XML data from Java code.")
14025 (license license:bsd-4)))
14026
14027(define-public java-geronimo-xbean-reflect
14028 (package
14029 (name "java-geronimo-xbean-reflect")
14030 (version "4.5")
14031 (source (origin
14032 (method svn-fetch)
14033 (uri (svn-reference
14034 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
14035 (revision 1807396)))
14036 (file-name (string-append name "-" version))
14037 (sha256
14038 (base32
14039 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
14040 (build-system ant-build-system)
14041 (arguments
14042 `(#:jar-name "geronimo-xbean-reflect.jar"
14043 #:source-dir "xbean-reflect/src/main/java"
14044 #:test-dir "xbean-reflect/src/test"
14045 #:jdk ,icedtea-8
14046 #:test-exclude
14047 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
14048 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
14049 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
14050 #:phases
14051 (modify-phases %standard-phases
14052 (add-before 'build 'fix-source
14053 (lambda _
14054 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
14055 ;; org.apache.xbean.asm6 is actually repackaged java-asm
14056 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
14057 (("org.apache.xbean.asm5") "org.objectweb.asm"))
14058 #t)))
14059 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
14060 (inputs
14061 `(("asm" ,java-asm)
14062 ("log4j" ,java-log4j-api)
14063 ("log4j-1.2" ,java-log4j-1.2-api)
14064 ("log4j-core" ,java-log4j-core)
14065 ("logging" ,java-commons-logging-minimal)))
14066 (propagated-inputs
14067 (list java-geronimo-parent-pom))
14068 (native-inputs
14069 `(("junit" ,java-junit)))
14070 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
14071 (synopsis "Dependency injection helper")
14072 (description "Xbean-reflect provides very flexible ways to create objects
14073and graphs of objects for dependency injection frameworks")
14074 (license license:asl2.0)))
14075
14076(define-public java-geronimo-genesis-2.1
14077 (package
14078 (name "java-geronimo-genesis")
14079 (version "2.1")
14080 (source (origin
14081 (method svn-fetch)
14082 (uri (svn-reference
14083 (url (string-append "https://svn.apache.org/repos/asf/"
14084 "geronimo/genesis/tags/genesis-"
14085 version))
14086 (revision 1807396)))
14087 (file-name (string-append name "-" version "-source"))
14088 (sha256
14089 (base32
14090 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
14091 (build-system ant-build-system)
14092 (arguments
14093 `(#:tests? #f
14094 #:phases
14095 (modify-phases %standard-phases
14096 (delete 'configure)
14097 (delete 'build)
14098 (replace 'install
14099 (install-pom-file "pom.xml"))
14100 (add-after 'install 'install-enforcer-rules
14101 (install-pom-file "genesis-enforcer-rules/pom.xml"))
14102 (add-after 'install 'install-flava
14103 (install-pom-file "genesis-default-flava/pom.xml"))
14104 (add-after 'install 'install-packaging
14105 (install-pom-file "genesis-packaging/pom.xml"))
14106 (add-after 'install-flava 'install-flava-java4
14107 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
14108 (add-after 'install-flava 'install-flava-java5
14109 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
14110 (add-after 'install-flava 'install-flava-java6
14111 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
14112 (propagated-inputs
14113 `(("apache-parent-pom" ,apache-parent-pom-13)))
14114 (home-page "https://geronimo.apache.org")
14115 (synopsis "Collection of maven POM files for the Geronimo project")
14116 (description "Apache Geronimo is a server runtime. This package contains
14117only pom files used by other components in the Geronimo project.")
14118 (license license:asl2.0)))
14119
14120(define java-geronimo-parent-pom
14121 (package
14122 (inherit java-geronimo-xbean-reflect)
14123 (name "java-geronimo-parent-pom")
14124 (arguments
14125 `(#:tests? #f
14126 #:phases
14127 (modify-phases %standard-phases
14128 (delete 'configure)
14129 (delete 'build)
14130 (replace 'install
14131 (install-pom-file "pom.xml")))))
14132 (propagated-inputs
14133 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
14134
14135(define-public java-geronimo-xbean-bundleutils
14136 (package
14137 (inherit java-geronimo-xbean-reflect)
14138 (name "java-geronimo-xbean-bundleutils")
14139 (arguments
14140 `(#:jar-name "geronimo-xbean-bundleutils.jar"
14141 #:source-dir "xbean-bundleutils/src/main/java"
14142 #:test-dir "xbean-bundleutils/src/test"
14143 #:phases
14144 (modify-phases %standard-phases
14145 (add-before 'build 'fix-java
14146 (lambda _
14147 ;; We use a more recent version of osgi, so this file requires
14148 ;; more interface method implementations.
14149 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
14150 (("import org.osgi.framework.ServiceRegistration;")
14151 "import org.osgi.framework.ServiceRegistration;
14152import org.osgi.framework.ServiceFactory;
14153import java.util.Collection;
14154import org.osgi.framework.ServiceObjects;")
14155 (("public Bundle getBundle\\(\\)")
14156 "@Override
14157public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
14158 throw new UnsupportedOperationException();
14159}
14160@Override
14161public <S> ServiceRegistration<S> registerService(Class<S> clazz,
14162 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
14163 throw new UnsupportedOperationException();
14164}
14165public Bundle getBundle()"))
14166 #t)))))
14167 (inputs
14168 `(("java-slf4j" ,java-slf4j-api)
14169 ("java-asm" ,java-asm)
14170 ("java-osgi-framework" ,java-osgi-framework)
14171 ("java-eclipse-osgi" ,java-eclipse-osgi)
14172 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
14173
14174(define-public java-geronimo-xbean-asm-util
14175 (package
14176 (inherit java-geronimo-xbean-reflect)
14177 (name "java-geronimo-xbean-asm-util")
14178 (arguments
14179 `(#:jar-name "geronimo-xbean-asm-util.jar"
14180 #:source-dir "xbean-asm-util/src/main/java"
14181 #:tests? #f)); no tests
14182 (inputs
14183 (list java-asm))
14184 (native-inputs '())))
14185
14186(define-public java-geronimo-xbean-finder
14187 (package
14188 (inherit java-geronimo-xbean-reflect)
14189 (name "java-geronimo-xbean-finder")
14190 (arguments
14191 `(#:jar-name "geronimo-xbean-finder.jar"
14192 #:source-dir "xbean-finder/src/main/java"
14193 #:test-dir "xbean-finder/src/test"))
14194 (inputs
14195 (list java-slf4j-api
14196 java-asm
14197 java-geronimo-xbean-bundleutils
14198 java-geronimo-xbean-asm-util
14199 java-osgi-service-packageadmin
14200 java-osgi-framework))
14201 (native-inputs
14202 (list java-junit java-hamcrest-core))))
14203
14204(define-public java-simplevalidation-1.14.1
14205 (package
14206 (name "java-simplevalidation")
14207 (version "1.14.1")
14208 (source
14209 (origin
14210 (method git-fetch)
14211 (uri (git-reference
14212 (url "https://github.com/timboudreau/simplevalidation.git")
14213 (commit "7a9d6adbac685b34746aaa72b20a1e639b89c733")))
14214 (file-name (git-file-name "java-simplevalidation" version))
14215 (sha256
14216 (base32 "1l0h2a6brzh4qrkjjxpiijjspapd1s7wr9pqzzwgh6qisjgb176w"))
14217 (patches
14218 (search-patches "java-simplevalidation-1.14.1.patch"))
14219 (modules '((guix build utils)))
14220 (snippet
14221 '(begin
14222 (for-each delete-file (find-files "." "\\.jar$"))
14223 #t))))
14224 (build-system ant-build-system)
14225 (arguments
14226 (list
14227 #:jdk openjdk17
14228 #:tests? #f
14229 #:modules
14230 '((guix build utils)
14231 (guix build ant-build-system)
14232 (guix build java-utils)
14233 (srfi srfi-13))
14234 #:phases
14235 #~(modify-phases %standard-phases
14236 (replace 'build
14237 (lambda _
14238 (define build-root (getcwd))
14239 (define (normalize-path file)
14240 (if (string-prefix? "./" file)
14241 (substring file 2)
14242 file))
14243 (define (copy-resources source-root class-root)
14244 (with-directory-excursion source-root
14245 (for-each
14246 (lambda (file)
14247 (unless (string-suffix? ".java" file)
14248 (let* ((relative (normalize-path file))
14249 (destination
14250 (string-append class-root "/" relative)))
14251 (mkdir-p (dirname destination))
14252 (copy-file file destination))))
14253 (find-files "." ".*"))))
14254 (define (compile-tree source-root class-root classpath)
14255 (mkdir-p class-root)
14256 (copy-resources source-root class-root)
14257 (with-directory-excursion source-root
14258 (let ((sources (find-files "." "\\.java$")))
14259 (apply invoke "javac"
14260 (append
14261 (list "-d" class-root)
14262 (if classpath
14263 (list "-cp" classpath)
14264 '())
14265 sources)))))
14266 (let* ((nbstubs-classes (string-append build-root "/build/nbstubs"))
14267 (core-classes (string-append build-root "/build/core"))
14268 (swing-classes (string-append build-root "/build/swing"))
14269 (nbstubs-jar (string-append build-root
14270 "/build/nbstubs-1.14.1.jar"))
14271 (core-jar (string-append build-root
14272 "/build/simplevalidation-1.14.1.jar"))
14273 (swing-jar
14274 (string-append build-root
14275 "/build/simplevalidation-swing-1.14.1.jar"))
14276 (converter-services
14277 (string-append
14278 swing-classes
14279 "/META-INF/services/org.netbeans.validation.api.conversion.Converter")))
14280 (compile-tree "nbstubs/src" nbstubs-classes #f)
14281 (invoke "jar" "-cf" nbstubs-jar "-C" nbstubs-classes ".")
14282 (compile-tree "ValidationAPI/src" core-classes #f)
14283 (invoke "jar" "-cf" core-jar "-C" core-classes ".")
14284 (compile-tree "simplevalidation-swing/src/main/java"
14285 swing-classes
14286 (string-append core-classes ":" nbstubs-classes))
14287 (mkdir-p (dirname converter-services))
14288 (call-with-output-file converter-services
14289 (lambda (port)
14290 (for-each
14291 (lambda (line)
14292 (display line port)
14293 (newline port))
14294 '("org.netbeans.validation.api.conversion.swing.SelectedIndicesToButtonModelArrayConverter"
14295 "org.netbeans.validation.api.conversion.swing.SelectedIndicesToListSelectionModelConverter"
14296 "org.netbeans.validation.api.conversion.swing.StringToComboBoxModelConverter"
14297 "org.netbeans.validation.api.conversion.swing.StringToDocumentConverter"))))
14298 (invoke "jar" "-cf" swing-jar "-C" swing-classes ".")
14299 #t)))
14300 (replace 'install
14301 (lambda* (#:key inputs outputs #:allow-other-keys)
14302 ((install-pom-file "pom.xml")
14303 #:inputs inputs
14304 #:outputs outputs)
14305 ((install-from-pom "nbstubs/pom.xml")
14306 #:inputs inputs
14307 #:outputs outputs)
14308 ((install-from-pom "ValidationAPI/pom.xml")
14309 #:inputs inputs
14310 #:outputs outputs)
14311 ((install-from-pom "simplevalidation-swing/pom.xml")
14312 #:inputs inputs
14313 #:outputs outputs)
14314 #t)))))
14315 (home-page "https://github.com/timboudreau/simplevalidation/")
14316 (synopsis "Simple Validation libraries for Swing forms")
14317 (description
14318 "This package builds the Simple Validation core and Swing adapter
14319libraries from source.")
14320 (license license:asl2.0)))
14321
14322(define-public java-lucene-core-3.6.2
14323 (package
14324 (name "java-lucene-core")
14325 (version "3.6.2")
14326 (source
14327 (origin
14328 (method url-fetch)
14329 (uri (string-append "https://archive.apache.org/dist/lucene/solr/"
14330 version "/apache-solr-" version "-src.tgz"))
14331 (sha256
14332 (base32 "032dfpk7likiwb9pnlr518wwlyxn57i5wyp18mi32320vsprd4r0"))))
14333 (build-system ant-build-system)
14334 (arguments
14335 (list
14336 #:tests? #f
14337 #:phases
14338 #~(modify-phases %standard-phases
14339 (replace 'build
14340 (lambda _
14341 (let ((jar-file (string-append (getcwd) "/build/lucene-core-"
14342 #$version ".jar")))
14343 (mkdir-p "build")
14344 (with-directory-excursion "lucene/core"
14345 (mkdir-p "build/classes")
14346 (apply invoke "javac" "-d" "build/classes"
14347 (find-files "src/java" "\\.java$"))
14348 (invoke "jar" "-cf" jar-file "-C" "build/classes" "."))
14349 #t)))
14350 (replace 'install
14351 (install-jars "build")))))
14352 (home-page "https://lucene.apache.org/core/")
14353 (synopsis "Apache Lucene core library")
14354 (description
14355 "This package provides the Apache Lucene 3.6.2 core library, built
14356entirely from source.")
14357 (license license:asl2.0)))
14358
14359(define-public java-json-simple-1.1.1
14360 (package
14361 (name "java-json-simple")
14362 (version "1.1.1")
14363 (source
14364 (origin
14365 (method git-fetch)
14366 (uri (git-reference
14367 (url "https://github.com/fangyidong/json-simple.git")
14368 (commit "tag_release_1_1_1")))
14369 (file-name (git-file-name name version))
14370 (sha256
14371 (base32 "1c598dvms70fs6w3l1dc0z7lqq3hndd5250ciwqm8xk3zbx465kf"))))
14372 (build-system ant-build-system)
14373 (arguments
14374 (list
14375 #:tests? #f
14376 #:build-target "jar"
14377 #:phases
14378 #~(modify-phases %standard-phases
14379 (replace 'install
14380 (install-from-pom "pom.xml")))))
14381 (home-page "https://github.com/fangyidong/json-simple")
14382 (synopsis "Simple JSON toolkit for Java")
14383 (description
14384 "JSON.simple is a small JSON parser and encoder for Java.")
14385 (license license:asl2.0)))
14386
14387(define-public java-gson
14388 (package
14389 (name "java-gson")
14390 (version "2.8.2")
14391 (source (origin
14392 (method url-fetch)
14393 (uri (string-append "https://github.com/google/gson/archive/"
14394 "gson-parent-" version ".tar.gz"))
14395 (sha256
14396 (base32
14397 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
14398 (build-system ant-build-system)
14399 (arguments
14400 `(#:jar-name "gson.jar"
14401 #:source-dir "gson/src/main/java"
14402 #:test-dir "gson/src/test"
14403 #:phases
14404 (modify-phases %standard-phases
14405 (replace 'install
14406 (install-from-pom "gson/pom.xml")))))
14407 (native-inputs
14408 (list java-junit java-hamcrest-core))
14409 (home-page "https://github.com/google/gson")
14410 (synopsis "Java serialization/deserialization library from/to JSON")
14411 (description "Gson is a Java library that can be used to convert Java
14412Objects into their JSON representation. It can also be used to convert a JSON
14413string to an equivalent Java object. Gson can work with arbitrary Java objects
14414including pre-existing objects that you do not have source-code of.")
14415 (license license:asl2.0)))
14416
14417;; Unlike java-gson above, this requires openjdk11.
14418(define-public java-gson-latest
14419 (package
14420 (inherit java-gson)
14421 (name "java-gson")
14422 (version "2.14.0")
14423 (source (origin
14424 (method git-fetch)
14425 (uri (git-reference
14426 (url "https://github.com/google/gson")
14427 (commit (string-append "gson-parent-" version))))
14428 (file-name (git-file-name name version))
14429 (sha256
14430 (base32
14431 "19xbgfh3i6j3vbjnrap057gnrgnc5gf41vgmwqg920cq95cvimab"))))
14432 (arguments
14433 `(#:jar-name "gson.jar"
14434 #:jdk ,openjdk11
14435 #:use-java-modules? #t
14436 #:source-dir "gson/src/main/java"
14437 #:tests? #f ;need Junit 5
14438 #:phases
14439 (modify-phases %standard-phases
14440 ;; avoid Maven dependency
14441 (add-before 'build 'fill-template
14442 (lambda _
14443 (with-directory-excursion "gson/src/main"
14444 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
14445 "java/com/google/gson/internal/GsonBuildConfig.java")
14446 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
14447 (("\\$\\{project.version\\}") ,version)))))
14448 (replace 'install
14449 (install-from-pom "gson/pom.xml")))))
14450 (propagated-inputs
14451 (list java-error-prone-annotations))))
14452
14453(define-public java-hawtjni
14454 (package
14455 (name "java-hawtjni")
14456 (version "1.15")
14457 (source (origin
14458 (method url-fetch)
14459 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
14460 "hawtjni-project-" version ".tar.gz"))
14461 (sha256
14462 (base32
14463 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
14464 (build-system ant-build-system)
14465 (arguments
14466 `(#:jar-name "hawtjni.jar"
14467 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
14468 #:tests? #f; no tests
14469 #:phases
14470 (modify-phases %standard-phases
14471 (add-before 'build 'build-native
14472 (lambda* (#:key inputs #:allow-other-keys)
14473 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
14474 (with-directory-excursion "hawtjni-generator/src/main/resources/"
14475 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
14476 "-fPIC" "-O2" include)
14477 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
14478 "-fPIC" "-O2" include)
14479 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
14480 "hawtjni.o" "hawtjni-callback.o")))
14481 #t))
14482 (add-after 'install 'install-native
14483 (lambda* (#:key outputs #:allow-other-keys)
14484 (let* ((out (assoc-ref outputs "out"))
14485 (lib (string-append out "/lib"))
14486 (inc (string-append out "/include")))
14487 (with-directory-excursion "hawtjni-generator/src/main/resources/"
14488 (install-file "libhawtjni.so" lib)
14489 (install-file "hawtjni.h" inc)))
14490 #t))
14491 (add-before 'install 'install-parent
14492 (install-pom-file "pom.xml"))
14493 (replace 'install
14494 (install-from-pom "hawtjni-runtime/pom.xml")))))
14495 (inputs
14496 (list java-commons-cli java-asm java-geronimo-xbean-finder))
14497 (home-page "https://fusesource.github.io/hawtjni/")
14498 (synopsis "JNI code generator")
14499 (description "HawtJNI is a code generator that produces the JNI code needed
14500to implement Java native methods. It is based on the jnigen code generator
14501that is part of the SWT Tools project.")
14502 (license license:asl2.0)))
14503
14504(define-public java-jansi-native
14505 (package
14506 (name "java-jansi-native")
14507 (version "1.7")
14508 (source (origin
14509 (method url-fetch)
14510 (uri (string-append "https://github.com/fusesource/jansi-native/"
14511 "archive/jansi-native-" version ".tar.gz"))
14512 (sha256
14513 (base32
14514 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
14515 (build-system ant-build-system)
14516 (arguments
14517 `(#:jar-name "jansi-native.jar"
14518 #:source-dir "src/main/java"
14519 #:tests? #f; no tests
14520 #:phases
14521 (modify-phases %standard-phases
14522 (add-before 'build 'build-native
14523 (lambda* (#:key inputs #:allow-other-keys)
14524 ;; there are more required files for windows in windows/
14525 (with-directory-excursion "src/main/native-package/src"
14526 (substitute* "jansi_ttyname.c"
14527 (("#include \"jansi_.*") ""))
14528 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
14529 (string-append "-I" (assoc-ref inputs "java-hawtjni")
14530 "/include")
14531 (string-append "-I" (assoc-ref inputs "jdk")
14532 "/include/linux")
14533 "-fPIC" "-O2")
14534 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
14535 (add-before 'build 'install-native
14536 (lambda _
14537 (let ((dir (string-append "build/classes/META-INF/native/"
14538 ,(match (%current-system)
14539 ((or "i686-linux" "armhf-linux")
14540 "linux32")
14541 ((or "x86_64-linux" "aarch64-linux"
14542 "mips64el-linux")
14543 "linux64")
14544 (_ "unknown-kernel")))))
14545 (install-file "src/main/native-package/src/libjansi.so" dir))
14546 #t))
14547 (add-after 'install 'install-native
14548 (lambda* (#:key outputs #:allow-other-keys)
14549 (install-file "src/main/native-package/src/jansi.h"
14550 (string-append (assoc-ref outputs "out") "/include"))
14551 #t))
14552 (add-before 'install 'fix-pom
14553 (lambda _
14554 ;; pom contains variables to complete name, but we don't support that
14555 (substitute* "pom.xml"
14556 (("\\$\\{platform\\}") "native"))
14557 #t))
14558 (replace 'install
14559 (install-from-pom "pom.xml")))))
14560 (propagated-inputs
14561 (list java-hawtjni))
14562 (home-page "https://fusesource.github.io/jansi/")
14563 (synopsis "Native library for jansi")
14564 (description "This package provides the native library for jansi, a small
14565Java library that allows you to use ANSI escape sequences to format your
14566console output.")
14567 (license license:asl2.0)))
14568
14569(define-public java-jansi
14570 (package
14571 (name "java-jansi")
14572 (version "2.4.0")
14573 (source (origin
14574 (method git-fetch)
14575 (uri (git-reference
14576 (url "https://github.com/fusesource/jansi")
14577 (commit (string-append "jansi-" version))))
14578 (file-name (git-file-name name version))
14579 (sha256
14580 (base32
14581 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
14582 (modules '((guix build utils)))
14583 (snippet
14584 ;; contains pre-compiled libraries
14585 '(delete-file-recursively
14586 "src/main/resources/org/fusesource/jansi/internal"))))
14587 (build-system ant-build-system)
14588 (arguments
14589 `(#:jar-name "jansi.jar"
14590 #:source-dir "src/main/java"
14591 #:test-dir "src/test"
14592 #:tests? #f; require junit 3
14593 #:phases
14594 (modify-phases %standard-phases
14595 (add-before 'build 'build-native
14596 (lambda* (#:key inputs #:allow-other-keys)
14597 (with-directory-excursion "src/main/native"
14598 (for-each
14599 (lambda (cfile)
14600 (let ((cfile (basename cfile))
14601 (ofile (string-append (basename cfile ".c") ".o")))
14602 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
14603 (string-append "-I" (assoc-ref inputs "jdk")
14604 "/include/linux")
14605 "-fPIC" "-O2")))
14606 (find-files "." "\\.c$"))
14607 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
14608 (find-files "." "\\.o$")))))
14609 (add-before 'build 'install-native
14610 (lambda _
14611 (let ((dir (string-append "build/classes/org/fusesource/"
14612 "jansi/internal/native/"
14613 ,(match (or (%current-target-system) (%current-system))
14614 ("i686-linux" "Linux/x86")
14615 ("x86_64-linux" "Linux/x86_64")
14616 ("armhf-linux" "Linux/armv7")
14617 ("aarch64-linux" "Linux/arm64")
14618 ("mips64el-linux" "Linux/mips64")
14619 (_ "unknown-kernel")))))
14620 (install-file "src/main/native/libjansi.so" dir))))
14621 (add-before 'build 'copy-resources
14622 (lambda _
14623 (copy-recursively "src/main/resources" "build/classes")))
14624 (replace 'install
14625 (install-from-pom "pom.xml")))))
14626 (home-page "https://fusesource.github.io/jansi/")
14627 (synopsis "Portable ANSI escape sequences")
14628 (description "Jansi is a Java library that allows you to use ANSI escape
14629sequences to format your console output which works on every platform.")
14630 (license license:asl2.0)))
14631
14632(define-public java-jansi-1
14633 (package
14634 (inherit java-jansi)
14635 (version "1.16")
14636 (source (origin
14637 (method git-fetch)
14638 (uri (git-reference
14639 (url "https://github.com/fusesource/jansi")
14640 (commit (string-append "jansi-project-" version))))
14641 (file-name (git-file-name "jansi" version))
14642 (sha256
14643 (base32
14644 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
14645 (arguments
14646 `(#:jar-name "jansi.jar"
14647 #:source-dir "jansi/src/main/java"
14648 #:test-dir "jansi/src/test"
14649 #:phases
14650 (modify-phases %standard-phases
14651 (add-after 'check 'clear-term
14652 (lambda _
14653 (invoke "echo" "-e" "\\e[0m")))
14654 (add-before 'install 'install-parent
14655 (install-pom-file "pom.xml"))
14656 (add-before 'install 'fix-pom
14657 (lambda _
14658 ;; pom adds jansi native versions for different platforms, but we
14659 ;; only need one, so use native instead
14660 (substitute* "jansi/pom.xml"
14661 (("windows32") "native")
14662 (("windows64") "native")
14663 (("osx") "native")
14664 (("linux32") "native")
14665 (("linux64") "native")
14666 (("freebsd32") "native")
14667 (("freebsd64") "native"))
14668 #t))
14669 (replace 'install
14670 (install-from-pom "jansi/pom.xml")))))
14671 (propagated-inputs
14672 (list java-jansi-native))
14673 (native-inputs
14674 (list java-junit java-hamcrest-core))))
14675
14676(define-public java-jboss-el-api-spec
14677 (package
14678 (name "java-jboss-el-api-spec")
14679 (version "3.0")
14680 (source (origin
14681 (method url-fetch)
14682 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
14683 "archive/jboss-el-api_" version
14684 "_spec-1.0.7.Final.tar.gz"))
14685 (sha256
14686 (base32
14687 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
14688 (build-system ant-build-system)
14689 (arguments
14690 `(#:jar-name "java-jboss-el-api_spec.jar"
14691 #:phases
14692 (modify-phases %standard-phases
14693 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
14694 ;; instead, which implements the same thing. We override the pom file
14695 ;; to "rename" the package so it can be found by maven.
14696 (add-before 'install 'override-pom
14697 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
14698 #:name "el-api"))
14699 (replace 'install
14700 (install-from-pom "pom.xml")))))
14701 (inputs
14702 (list java-junit))
14703 (home-page "https://github.com/jboss/jboss-el-api_spec")
14704 (synopsis "JSR-341 expression language 3.0 API")
14705 (description "This package contains an implementation of the JSR-341
14706specification for the expression language 3.0. It implements an expression
14707language inspired by ECMAScript and XPath. This language is used with
14708JavaServer Pages (JSP).")
14709 ;; Either GPL2 only or CDDL.
14710 (license (list license:gpl2 license:cddl1.1))))
14711
14712(define-public java-jboss-interceptors-api-spec
14713 (package
14714 (name "java-jboss-interceptors-api-spec")
14715 (version "1.2")
14716 (source (origin
14717 (method url-fetch)
14718 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
14719 "archive/jboss-interceptors-api_" version
14720 "_spec-1.0.0.Final.tar.gz"))
14721 (sha256
14722 (base32
14723 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
14724 (build-system ant-build-system)
14725 (arguments
14726 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
14727 #:jdk ,icedtea-8
14728 #:source-dir "."
14729 #:tests? #f; no tests
14730 #:phases
14731 (modify-phases %standard-phases
14732 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
14733 ;; so we use this package instead, which implements the same thing.
14734 ;; We override the pom file to "rename" the package so it can be found
14735 ;; by maven.
14736 (add-before 'install 'override-pom
14737 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
14738 "3.0" #:name "interceptor-api"))
14739 (replace 'install
14740 (install-from-pom "pom.xml")))))
14741 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
14742 (synopsis "Interceptors 1.2 API classes from JSR 318")
14743 (description "Java-jboss-interceptors-api-spec implements the Interceptors
14744API. Interceptors are used to interpose on business method invocations and
14745specific events.")
14746 ;; Either GPL2 only or CDDL.
14747 (license (list license:gpl2 license:cddl1.1))))
14748
14749(define-public java-cdi-api
14750 (package
14751 (name "java-cdi-api")
14752 (version "2.0")
14753 (source (origin
14754 (method url-fetch)
14755 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
14756 version ".tar.gz"))
14757 (file-name (string-append name "-" version ".tar.gz"))
14758 (sha256
14759 (base32
14760 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
14761 (build-system ant-build-system)
14762 (arguments
14763 `(#:source-dir "api/src/main/java"
14764 #:jar-name "java-cdi-api.jar"
14765 #:test-dir "api/src/test"
14766 #:jdk ,icedtea-8
14767 #:tests? #f; Tests fail because we don't have a CDI provider yet
14768 #:phases
14769 (modify-phases %standard-phases
14770 (replace 'install
14771 (install-from-pom "api/pom.xml")))))
14772 (propagated-inputs
14773 (list java-javax-inject java-jboss-el-api-spec
14774 java-jboss-interceptors-api-spec java-weld-parent-pom))
14775 (native-inputs
14776 (list java-testng java-hamcrest-core))
14777 (home-page "https://cdi-spec.org/")
14778 (synopsis "Contexts and Dependency Injection APIs")
14779 (description "Java-cdi-api contains the required APIs for Contexts and
14780Dependency Injection (CDI).")
14781 (license license:asl2.0)))
14782
14783(define-public java-joda-convert
14784 (package
14785 (name "java-joda-convert")
14786 (version "1.9.2")
14787 (source (origin
14788 (method url-fetch)
14789 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
14790 version ".tar.gz"))
14791 (file-name (string-append name "-" version ".tar.gz"))
14792 (sha256
14793 (base32
14794 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
14795 (build-system ant-build-system)
14796 (arguments
14797 `(#:jar-name (string-append ,name "-" ,version ".jar")
14798 #:source-dir "src/main/java"
14799 #:test-include (list "**/Test*.java")
14800 ;; Contains only interfaces and base classes (no test)
14801 #:test-exclude (list "**/test*/**.java")))
14802 (inputs
14803 (list java-guava))
14804 (native-inputs
14805 (list java-junit java-hamcrest-core))
14806 (home-page "https://www.joda.org/joda-convert/")
14807 (synopsis "Conversion between Objects and Strings")
14808 (description "Joda-Convert provides a small set of classes to aid
14809conversion between Objects and Strings. It is not intended to tackle the
14810wider problem of Object to Object transformation.")
14811 (license license:asl2.0)))
14812
14813(define-public java-joda-time
14814 (package
14815 (name "java-joda-time")
14816 (version "2.9.9")
14817 (source (origin
14818 (method url-fetch)
14819 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
14820 version ".tar.gz"))
14821 (file-name (string-append name "-" version ".tar.gz"))
14822 (sha256
14823 (base32
14824 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
14825 (build-system ant-build-system)
14826 (arguments
14827 `(#:jar-name "java-joda-time.jar"
14828 #:source-dir "src/main/java"
14829 #:test-include (list "**/Test*.java")
14830 ;; There is no runnable test in these files
14831 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
14832 #:phases
14833 (modify-phases %standard-phases
14834 (add-after 'build 'build-resources
14835 (lambda _
14836 (mkdir-p "build/classes/org/joda/time/tz/data")
14837 (mkdir-p "build/classes/org/joda/time/format")
14838 ;; This will produce the following exception:
14839 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
14840 ;; which is normal, because it doesn't exist yet. It still generates
14841 ;; the same file as in the binary one can find on maven.
14842 (invoke "java" "-cp"
14843 (string-append "build/classes:" (getenv "CLASSPATH"))
14844 "org.joda.time.tz.ZoneInfoCompiler"
14845 "-src" "src/main/java/org/joda/time/tz/src"
14846 "-dst" "build/classes/org/joda/time/tz/data"
14847 "africa" "antarctica" "asia" "australasia"
14848 "europe" "northamerica" "southamerica"
14849 "pacificnew" "etcetera" "backward" "systemv")
14850 (for-each (lambda (f)
14851 (copy-file f (string-append
14852 "build/classes/org/joda/time/format/"
14853 (basename f))))
14854 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
14855 #t))
14856 (add-before 'install 'regenerate-jar
14857 (lambda _
14858 ;; We need to regenerate the jar file to add generated data.
14859 (delete-file "build/jar/java-joda-time.jar")
14860 (invoke "ant" "jar")))
14861 (add-before 'check 'copy-test-resources
14862 (lambda _
14863 (mkdir-p "build/test-classes/org/joda/time/tz/data")
14864 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
14865 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
14866 (copy-recursively "src/test/resources" "build/test-classes")
14867 #t)))))
14868 (inputs
14869 (list java-joda-convert))
14870 (native-inputs
14871 (list java-junit java-hamcrest-core tzdata))
14872 (home-page "https://www.joda.org/joda-time/")
14873 (synopsis "Replacement for the Java date and time classes")
14874 (description "Joda-Time is a replacement for the Java date and time
14875classes prior to Java SE 8.")
14876 (license license:asl2.0)))
14877
14878(define-public java-xerces
14879 (package
14880 (name "java-xerces")
14881 (version "2.12.2")
14882 (source
14883 (origin
14884 (method url-fetch)
14885 (uri (string-append "mirror://apache/xerces/j/source/"
14886 "Xerces-J-src." version ".tar.gz"))
14887 (sha256
14888 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
14889 (patches (search-patches
14890 "java-xerces-xjavac_taskdef.patch"
14891 "java-xerces-build_dont_unzip.patch"
14892 "java-xerces-bootclasspath.patch"))))
14893 (build-system ant-build-system)
14894 (arguments
14895 `(#:tests? #f;; Test files are not present
14896 #:test-target "test"
14897 #:jdk ,icedtea-8
14898 #:phases
14899 (modify-phases %standard-phases
14900 (add-after 'unpack 'create-build.properties
14901 (lambda* (#:key inputs #:allow-other-keys)
14902 (let ((jaxp (assoc-ref inputs "java-jaxp"))
14903 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
14904 (with-output-to-file "build.properties"
14905 (lambda _
14906 (format #t
14907 "jar.jaxp = ~a/share/java/jaxp.jar~@
14908 jar.apis-ext = ~a/share/java/jaxp.jar~@
14909 jar.resolver = ~a/share/java/xml-resolver.jar~%"
14910 jaxp jaxp resolver)))
14911 ;; Make xerces use our version of jaxp in tests
14912 (substitute* "build.xml"
14913 (("xml-apis.jar")
14914 (string-append jaxp "/share/java/jaxp.jar"))
14915 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
14916 "${jar.apis}")))
14917 #t))
14918 (replace 'install (install-jars "build")))))
14919 (inputs
14920 (list java-apache-xml-commons-resolver java-jaxp))
14921 (home-page "https://xerces.apache.org/xerces2-j/")
14922 (synopsis "Validating XML parser for Java with DOM level 3 support")
14923 (description "The Xerces2 Java parser is the reference implementation of
14924XNI, the Xerces Native Interface, and also a fully conforming XML Schema
14925processor.
14926
14927Xerces2-J supports the following standards and APIs:
14928
14929@itemize
14930@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
14931@item Namespaces in XML Recommendation
14932@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
14933 Range Recommendations
14934@item Simple API for XML (SAX) 2.0.1 Core and Extension
14935@item Java APIs for XML Processing (JAXP) 1.2.01
14936@item XML Schema 1.0 Structures and Datatypes Recommendations
14937@item Experimental implementation of the Document Object Model (DOM) Level 3
14938 Core and Load/Save Working Drafts
14939@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
14940 Candidate Recommendation
14941@end itemize
14942
14943Xerces is now able to parse documents written according to the XML 1.1
14944Candidate Recommendation, except that it does not yet provide an option to
14945enable normalization checking as described in section 2.13 of this
14946specification. It also handles namespaces according to the XML Namespaces 1.1
14947Candidate Recommendation, and will correctly serialize XML 1.1 documents if
14948the DOM level 3 load/save API's are in use.")
14949 (license license:asl2.0)))
14950
14951(define-public java-jakarta-regexp
14952 (package
14953 (name "java-jakarta-regexp")
14954 (version "1.5")
14955 (source
14956 (origin
14957 (method url-fetch)
14958 (uri (string-append
14959 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
14960 version ".tar.gz"))
14961 (sha256
14962 (base32
14963 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
14964 (build-system ant-build-system)
14965 (arguments
14966 `(#:test-target "test"
14967 #:phases
14968 (modify-phases %standard-phases
14969 (replace 'install
14970 (lambda* (#:key outputs #:allow-other-keys)
14971 (let* ((out (assoc-ref outputs "out"))
14972 (out-share (string-append out "/share/java")))
14973 (mkdir-p out-share)
14974 (for-each (lambda (name)
14975 (install-file name out-share))
14976 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
14977 #t))))))
14978 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
14979 (synopsis "Regular expression parser generator for Java")
14980 (description "@code{jakarta-regexp} is an old regular expression parser
14981generator for Java.")
14982 (license license:asl2.0)))
14983
14984(define-public java-jline
14985 (package
14986 (name "java-jline")
14987 (version "1.0")
14988 (source (origin
14989 (method url-fetch)
14990 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
14991 version ".tar.gz"))
14992 (sha256
14993 (base32
14994 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
14995 (build-system ant-build-system)
14996 (arguments
14997 `(#:jar-name "jline.jar"
14998 #:source-dir "src/main/java"
14999 #:test-dir "src/test"
15000 #:phases
15001 (modify-phases %standard-phases
15002 (add-before 'build 'copy-resources
15003 (lambda _
15004 (copy-recursively "src/main/resources" "build/classes")
15005 #t)))))
15006 (native-inputs
15007 (list java-junit))
15008 (home-page "https://jline.github.io")
15009 (synopsis "Console input handling library")
15010 (description "JLine is a Java library for handling console input. It is
15011similar in functionality to BSD editline and GNU readline but with additional
15012features that bring it on par with the Z shell line editor.")
15013 (license license:bsd-3)))
15014
15015(define-public java-jline-2
15016 (package
15017 (inherit java-jline)
15018 (version "2.14.5")
15019 (source (origin
15020 (method url-fetch)
15021 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
15022 version ".tar.gz"))
15023 (sha256
15024 (base32
15025 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
15026 (arguments
15027 `(#:jdk ,icedtea-8
15028 ,@(package-arguments java-jline)))
15029 (inputs
15030 (list java-jansi-1 java-jansi-native))
15031 (native-inputs
15032 (list java-powermock-modules-junit4
15033 java-powermock-modules-junit4-common
15034 java-powermock-api-easymock
15035 java-powermock-api-support
15036 java-powermock-core
15037 java-powermock-reflect
15038 java-easymock
15039 java-jboss-javassist
15040 java-objenesis
15041 java-hamcrest-core
15042 java-cglib
15043 java-junit
15044 java-hawtjni))))
15045
15046(define-public java-jline-terminal
15047 (package
15048 (name "java-jline-terminal")
15049 (version "3.14.1")
15050 (source (origin
15051 (method git-fetch)
15052 (uri (git-reference
15053 (url "https://github.com/jline/jline3")
15054 (commit (string-append "jline-parent-" version))))
15055 (file-name (git-file-name name version))
15056 (sha256
15057 (base32
15058 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
15059 (build-system ant-build-system)
15060 (arguments
15061 `(#:jar-name "jline-terminal.jar"
15062 #:jdk ,openjdk11
15063 #:tests? #f; TODO: tests fail on *.caps resource lookups
15064 #:source-dir "terminal/src/main/java"
15065 #:test-dir "terminal/src/test"
15066 #:phases
15067 (modify-phases %standard-phases
15068 (add-after 'unpack 'remove-build-file
15069 (lambda _
15070 ;; Conflicts with build directory generated by ant-build-system.
15071 (delete-file "build")))
15072 (add-after 'unpack 'patch-paths
15073 (lambda* (#:key inputs #:allow-other-keys)
15074 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
15075 (("= \"infocmp\"")
15076 (string-append "= \"" (assoc-ref inputs "ncurses")
15077 "/bin/infocmp\""))
15078 (("= \"(s?tty)\"" _ cmd)
15079 (string-append "= \"" (assoc-ref inputs "coreutils")
15080 "/bin/" cmd "\"")))))
15081 ;; Resources are not added to the JAR by ant-build-system.
15082 (add-after 'build 'add-resources
15083 (lambda* (#:key jar-name source-dir #:allow-other-keys)
15084 (let ((build (string-append (getcwd) "/build")))
15085 (with-directory-excursion
15086 (string-append source-dir "/../resources")
15087 (apply invoke "jar" "-uvf"
15088 (string-append build "/jar/" jar-name)
15089 (find-files ".")))))))))
15090 (inputs
15091 (list ncurses)); infocmp
15092 (home-page "https://github.com/jline/jline3")
15093 (synopsis "Java JLine Terminal API and implementations")
15094 (description "JLine is a Java library for handling console input. It is
15095similar in functionality to BSD editline and GNU readline but with additional
15096features that bring it in par with ZSH line editor. People familiar with the
15097readline/editline capabilities for modern shells (such as bash and tcsh) will
15098find most of the command editing features of JLine to be familiar.
15099
15100This package includes the @var{Terminal} API and implementations.")
15101 (license license:bsd-3)))
15102
15103(define-public java-jline-reader
15104 (package
15105 (name "java-jline-reader")
15106 (version "3.14.1")
15107 (source (origin
15108 (method git-fetch)
15109 (uri (git-reference
15110 (url "https://github.com/jline/jline3")
15111 (commit (string-append "jline-parent-" version))))
15112 (file-name (git-file-name name version))
15113 (sha256
15114 (base32
15115 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
15116 (build-system ant-build-system)
15117 (arguments
15118 `(#:jar-name "jline-reader.jar"
15119 #:jdk ,openjdk11
15120 #:source-dir "reader/src/main/java"
15121 #:test-dir "reader/src/test"
15122 #:phases
15123 (modify-phases %standard-phases
15124 (add-before 'build 'remove-build-file
15125 (lambda _
15126 ;; conflicts with build directory generated by ant-build-system
15127 (delete-file "build"))))))
15128 (native-inputs
15129 (list java-junit java-easymock))
15130 (inputs
15131 (list java-jline-terminal))
15132 (home-page "https://github.com/jline/jline3")
15133 (synopsis "Java JLine line reader")
15134 (description "JLine is a Java library for handling console input. It is
15135similar in functionality to BSD editline and GNU readline but with additional
15136features that bring it in par with ZSH line editor. People familiar with the
15137readline/editline capabilities for modern shells (such as bash and tcsh) will
15138find most of the command editing features of JLine to be familiar.
15139
15140This package includes the line reader.")
15141 (license license:bsd-3)))
15142
15143(define-public java-xmlunit
15144 (package
15145 (name "java-xmlunit")
15146 (version "2.5.1")
15147 (source (origin
15148 (method url-fetch)
15149 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
15150 version ".tar.gz"))
15151 (file-name (string-append name "-" version ".tar.gz"))
15152 (sha256
15153 (base32
15154 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
15155 (build-system ant-build-system)
15156 (arguments
15157 `(#:jar-name "java-xmlunit.jar"
15158 #:source-dir "xmlunit-core/src/main/java"
15159 #:test-dir "xmlunit-core/src/test"
15160 #:phases
15161 (modify-phases %standard-phases
15162 (add-before 'check 'copy-test-resources
15163 (lambda* (#:key inputs #:allow-other-keys)
15164 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
15165 #t)))))
15166 (native-inputs
15167 `(("java-junit" ,java-junit)
15168 ("java-mockito-1" ,java-mockito-1)
15169 ("java-hamcrest-all" ,java-hamcrest-all)
15170 ("java-objenesis" ,java-objenesis)
15171 ("java-cglib" ,java-cglib)
15172 ("resources"
15173 ,(origin
15174 (method git-fetch)
15175 (uri (git-reference
15176 (url "https://github.com/xmlunit/test-resources")
15177 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
15178 (file-name "java-xmlunit-test-resources")
15179 (sha256
15180 (base32
15181 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
15182 (home-page "https://www.xmlunit.org/")
15183 (synopsis "XML output testing")
15184 (description "XMLUnit provides you with the tools to verify the XML you
15185emit is the one you want to create. It provides helpers to validate against
15186an XML Schema, assert the values of XPath queries or compare XML documents
15187against expected outcomes.")
15188 (license license:asl2.0)))
15189
15190(define-public java-xmlunit-legacy
15191 (package
15192 (inherit java-xmlunit)
15193 (name "java-xmlunit-legacy")
15194 (arguments
15195 `(#:jar-name "java-xmlunit-legacy.jar"
15196 #:source-dir "xmlunit-legacy/src/main/java"
15197 #:test-dir "xmlunit-legacy/src/test"))
15198 (inputs
15199 (list java-xmlunit java-junit))
15200 (native-inputs
15201 `(("java-mockito-1" ,java-mockito-1)))))
15202
15203(define-public java-xmlunit-matchers
15204 (package
15205 (inherit java-xmlunit)
15206 (name "java-xmlunit-matchers")
15207 (arguments
15208 `(#:jar-name "java-xmlunit-matchers.jar"
15209 #:source-dir "xmlunit-matchers/src/main/java"
15210 #:test-dir "xmlunit-matchers/src/test"
15211 #:test-exclude
15212 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
15213 (list "**/ValidationMatcherTest.java")
15214 #:phases
15215 (modify-phases %standard-phases
15216 (add-before 'build 'copy-test-class
15217 (lambda _
15218 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
15219 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
15220 #t))
15221 (add-before 'build 'fix-test-resources-path
15222 (lambda _
15223 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
15224 (("../test-resources") "test-resources"))
15225 #t))
15226 (add-before 'check 'copy-test-resources
15227 (lambda* (#:key inputs #:allow-other-keys)
15228 (copy-recursively (assoc-ref inputs "resources") "test-resources")
15229 #t)))))
15230 (inputs
15231 (list java-xmlunit java-junit))))
15232
15233(define-public java-openchart2
15234 (package
15235 (name "java-openchart2")
15236 (version "1.4.3")
15237 (source (origin
15238 (method url-fetch)
15239 (uri (string-append "http://download.approximatrix.com/openchart2/"
15240 "openchart2-" version ".source.zip"))
15241 (sha256
15242 (base32
15243 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
15244 (build-system ant-build-system)
15245 (arguments
15246 `(#:test-target "test"
15247 #:phases
15248 (modify-phases %standard-phases
15249 (add-after 'unpack 'fix-junit-errors
15250 (lambda _
15251 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
15252 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
15253 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
15254 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
15255 "model/DefaultChartDataModelConstraintsTest.java"
15256 "model/MultiScatterDataModelConstraintsTest.java"
15257 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
15258 (("(assertEquals[^;]+);" before _)
15259 (string-append (string-drop-right before 2) ", 1E-6);"))))
15260 #t))
15261 (replace 'install (install-jars ".")))))
15262 (native-inputs
15263 (list unzip java-junit java-hamcrest-core))
15264 (home-page "https://approximatrix.com/products/openchart2/")
15265 (synopsis "Simple plotting for Java")
15266 (description "Openchart2 provides a simple, yet powerful, interface for
15267Java programmers to create two-dimensional charts and plots. The library
15268features an assortment of graph styles, including advanced scatter plots, bar
15269graphs, and pie charts.")
15270 (license license:lgpl2.1+)))
15271
15272(define-public java-commons-httpclient
15273 (package
15274 (name "java-commons-httpclient")
15275 (version "3.1")
15276 (source (origin
15277 (method url-fetch)
15278 (uri (string-append "mirror://apache/httpcomponents/"
15279 "commons-httpclient/source/commons-httpclient-"
15280 version "-src.tar.gz"))
15281 (sha256
15282 (base32
15283 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
15284 (build-system ant-build-system)
15285 (arguments
15286 `(#:build-target "compile"
15287 #:test-target "test"
15288 #:tests? #f; requires junit-textui (junit 3)
15289 #:phases
15290 (modify-phases %standard-phases
15291 (add-before 'build 'fix-accent
15292 (lambda _
15293 (for-each (lambda (file)
15294 (with-fluids ((%default-port-encoding "ISO-8859-1"))
15295 (substitute* file
15296 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
15297 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
15298 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
15299 "src/test/org/apache/commons/httpclient/TestHttps.java"
15300 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
15301 #t))
15302 (replace 'install
15303 (lambda* (#:key outputs #:allow-other-keys)
15304 (invoke "ant" "dist"
15305 (string-append "-Ddist.home=" (assoc-ref outputs "out")
15306 "/share/java"))
15307 #t)))))
15308 (propagated-inputs
15309 `(("java-commons-logging" ,java-commons-logging-minimal)
15310 ("java-commons-codec" ,java-commons-codec)))
15311 (home-page "https://hc.apache.org")
15312 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
15313 (description "This package contains an HTTP/1.1 compliant HTTP agent
15314implementation. It also provides reusable components for client-side
15315authentication, HTTP state management, and HTTP connection management.")
15316 (license license:asl2.0)))
15317
15318(define-public java-commons-vfs
15319 (package
15320 (name "java-commons-vfs")
15321 (version "2.2")
15322 (source (origin
15323 (method url-fetch)
15324 (uri (string-append "mirror://apache/commons/vfs/source/"
15325 "commons-vfs2-distribution-" version "-src.tar.gz"))
15326 (file-name (string-append name "-" version ".tar.gz"))
15327 (sha256
15328 (base32
15329 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
15330 (modules '((guix build utils)))
15331 (snippet
15332 '(begin
15333 (for-each delete-file
15334 (find-files "." "\\.jar$"))
15335 #t))))
15336 (build-system ant-build-system)
15337 (arguments
15338 `(#:jar-name "commons-vfs.jar"
15339 #:source-dir "commons-vfs2/src/main/java"
15340 #:test-dir "commons-vfs2/src/test"
15341 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
15342 #:tests? #f
15343 #:phases
15344 (modify-phases %standard-phases
15345 (add-before 'build 'remove-hadoop-and-webdav
15346 ; Remove these files as they are not required and depend on difficult
15347 ; packages.
15348 (lambda _
15349 (for-each delete-file-recursively
15350 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
15351 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
15352 #t)))))
15353 (inputs
15354 (list java-commons-collections4
15355 java-commons-compress
15356 java-commons-httpclient
15357 java-commons-logging-minimal
15358 java-commons-net
15359 java-jsch))
15360 (home-page "https://commons.apache.org/proper/commons-vfs/")
15361 (synopsis "Java file system library")
15362 (description "Commons VFS provides a single API for accessing various
15363different file systems. It presents a uniform view of the files from various
15364different sources, such as the files on local disk, on an HTTP server, or
15365inside a Zip archive.")
15366 (license license:asl2.0)))
15367
15368(define-public java-jakarta-oro
15369 (package
15370 (name "java-jakarta-oro")
15371 (version "2.0.8")
15372 (source (origin
15373 (method url-fetch)
15374 (uri (string-append "mirror://apache/jakarta/oro/"
15375 "jakarta-oro-" version ".tar.gz"))
15376 (sha256
15377 (base32
15378 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
15379 (modules '((guix build utils)))
15380 (snippet
15381 `(begin
15382 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
15383 #t))))
15384 (build-system ant-build-system)
15385 (arguments
15386 `(#:build-target "package"
15387 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
15388 #:tests? #f; tests are run as part of the build process
15389 #:phases
15390 (modify-phases %standard-phases
15391 (replace 'install
15392 (install-jars ,(string-append "jakarta-oro-" version))))))
15393 (home-page "https://jakarta.apache.org/oro/")
15394 (synopsis "Text-processing for Java")
15395 (description "The Jakarta-ORO Java classes are a set of text-processing
15396Java classes that provide Perl5 compatible regular expressions, AWK-like
15397regular expressions, glob expressions, and utility classes for performing
15398substitutions, splits, filtering filenames, etc. This library is the successor
15399of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
15400from ORO, Inc.")
15401 (license license:asl1.1)))
15402
15403(define-public java-native-access
15404 (package
15405 (name "java-native-access")
15406 (version "4.5.1")
15407 (source (origin
15408 (method url-fetch)
15409 (uri (string-append "https://github.com/java-native-access/jna/"
15410 "archive/" version ".tar.gz"))
15411 (file-name (string-append name "-" version ".tar.gz"))
15412 (sha256
15413 (base32
15414 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
15415 (modules '((guix build utils)))
15416 (snippet
15417 `(begin
15418 (for-each delete-file (find-files "." ".*.jar"))
15419 (delete-file-recursively "native/libffi")
15420 (delete-file-recursively "dist")
15421 #t))))
15422 (build-system ant-build-system)
15423 (arguments
15424 `(#:tests? #f; FIXME: tests require reflections.jar
15425 #:test-target "test"
15426 #:make-flags (list "-Ddynlink.native=true")
15427 #:phases
15428 (modify-phases %standard-phases
15429 (add-before 'build 'fix-build.xml
15430 (lambda* (#:key inputs #:allow-other-keys)
15431 (substitute* "build.xml"
15432 ;; Since we removed the bundled ant.jar, give the correct path
15433 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
15434 ;; We removed generated native libraries. We can only rebuild one
15435 ;; so don't fail if we can't find a native library for another architecture.
15436 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
15437 ;; Copy test dependencies
15438 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
15439 "lib/junit.jar")
15440 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
15441 "jar$"))
15442 "lib/hamcrest-core.jar")
15443 ;; FIXME: once reflections.jar is built, copy it to lib/test.
15444 #t))
15445 (add-before 'build 'build-native
15446 (lambda _
15447 (invoke "ant" "-Ddynlink.native=true" "native")
15448 #t))
15449 (replace 'install
15450 (install-jars "build")))))
15451 (inputs
15452 (list libffi libx11 libxt))
15453 (native-inputs
15454 (list gcc-7 java-junit java-hamcrest-core))
15455 (home-page "https://github.com/java-native-access/jna")
15456 (synopsis "Access to native shared libraries from Java")
15457 (description "JNA provides Java programs easy access to native shared
15458libraries without writing anything but Java code - no JNI or native code is
15459required. JNA allows you to call directly into native functions using natural
15460Java method invocation.")
15461 ;; Java Native Access project (JNA) is dual-licensed under 2
15462 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
15463 (license (list
15464 license:asl2.0
15465 license:lgpl2.1+))))
15466
15467(define-public java-native-access-5.14.0
15468 (package
15469 (inherit java-native-access)
15470 (name "java-native-access")
15471 (version "5.14.0")
15472 (source
15473 (origin
15474 (method git-fetch)
15475 (uri (git-reference
15476 (url "https://github.com/java-native-access/jna.git")
15477 (commit version)))
15478 (file-name (git-file-name name version))
15479 (sha256
15480 (base32 "0blf6ka69c3zywa74fjh8gykhzn3vgbvlxzy3v9znncb2a97v6bb"))
15481 (modules '((guix build utils)))
15482 (snippet
15483 `(begin
15484 (for-each delete-file (find-files "." ".*.jar"))
15485 (delete-file-recursively "native/libffi")
15486 (delete-file-recursively "dist")))))
15487 (arguments
15488 `(#:tests? #f
15489 #:test-target "test"
15490 #:make-flags (list "-Ddynlink.native=true")
15491 #:phases
15492 (modify-phases %standard-phases
15493 (add-before 'build 'fix-build.xml
15494 (lambda* (#:key inputs #:allow-other-keys)
15495 (let ((ant-jar (search-input-file inputs "/lib/ant.jar"))
15496 (asm-jar (car (find-files (assoc-ref inputs "java-asm")
15497 "asm.*\\.jar$"))))
15498 (substitute* "build.xml"
15499 (("lib/ant\\.jar") ant-jar)
15500 (("\\$lib/asm-8\\.0\\.1\\.jar") asm-jar)
15501 (("lib/asm-8\\.0\\.1\\.jar") asm-jar)
15502 (("<zipfileset") "<zipfileset erroronmissingarchive=\"false\""))
15503 (substitute* "build-ant-tools.xml"
15504 (("lib/ant\\.jar") ant-jar)
15505 (("lib/asm-8\\.0\\.1\\.jar") asm-jar)))
15506 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
15507 "lib/junit.jar")
15508 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
15509 "jar$"))
15510 "lib/hamcrest-core.jar")))
15511 (add-before 'build 'build-native
15512 (lambda _
15513 (invoke "ant" "-Ddynlink.native=true" "native")))
15514 (add-before 'install 'create-pom
15515 (generate-pom.xml "pom.xml" "net.java.dev.jna"
15516 "jna-jpms" ,version))
15517 (add-before 'install 'keep-only-jna-jpms
15518 (lambda _
15519 ;; The build produces multiple jars. install-from-pom
15520 ;; expects exactly one. Remove all except jna-jpms.jar.
15521 (for-each delete-file
15522 (filter (lambda (f)
15523 (not (string-contains f "jna-jpms")))
15524 (find-files "build" "\\.jar$")))
15525 (for-each delete-file
15526 (find-files "lib" "\\.jar$"))))
15527 (replace 'install
15528 (install-from-pom "pom.xml")))))
15529 (native-inputs
15530 (modify-inputs (package-native-inputs java-native-access)
15531 (prepend java-asm-9)))))
15532
15533(define-public java-native-access-platform
15534 (package
15535 (inherit java-native-access)
15536 (name "java-native-access-platform")
15537 (arguments
15538 `(#:test-target "test"
15539 #:tests? #f; require jna-test.jar
15540 #:phases
15541 (modify-phases %standard-phases
15542 (add-before 'build 'chdir
15543 (lambda _
15544 (chdir "contrib/platform")
15545 #t))
15546 (add-after 'chdir 'fix-ant
15547 (lambda* (#:key inputs #:allow-other-keys)
15548 (substitute* "nbproject/project.properties"
15549 (("../../build/jna.jar")
15550 (search-input-file inputs "/share/java/jna.jar"))
15551 (("../../lib/hamcrest-core-.*.jar")
15552 (car (find-files (assoc-ref inputs "java-hamcrest-core")
15553 "jar$")))
15554 (("../../lib/junit.jar")
15555 (car (find-files (assoc-ref inputs "java-junit")
15556 "jar$"))))
15557 #t))
15558 (replace 'install
15559 (install-jars "dist")))))
15560 (inputs
15561 (list java-native-access))
15562 (synopsis "Cross-platform mappings for jna")
15563 (description "java-native-access-platform has cross-platform mappings
15564and mappings for a number of commonly used platform functions, including a
15565large number of Win32 mappings as well as a set of utility classes that
15566simplify native access.")))
15567
15568(define-public java-native-access-platform-5.14.0
15569 (package
15570 (inherit java-native-access-platform)
15571 (name "java-native-access-platform")
15572 (version (package-version java-native-access-5.14.0))
15573 (source (package-source java-native-access-5.14.0))
15574 (arguments
15575 `(#:build-target "jar"
15576 #:tests? #f
15577 #:modules ((guix build ant-build-system)
15578 (guix build utils)
15579 (guix build java-utils)
15580 (sxml simple))
15581 #:phases
15582 (modify-phases %standard-phases
15583 (add-before 'build 'chdir
15584 (lambda _
15585 (chdir "contrib/platform")
15586 #t))
15587 (add-after 'chdir 'fix-ant
15588 (lambda* (#:key inputs #:allow-other-keys)
15589 (let ((jna-jar (car (find-files (assoc-ref inputs "java-native-access")
15590 "jna-jpms.*\\.jar$")))
15591 (asm-jar (car (find-files (assoc-ref inputs "java-asm")
15592 "asm.*\\.jar$")))
15593 (ant-jar (search-input-file inputs "/lib/ant.jar")))
15594 (mkdir-p "../../build")
15595 (mkdir-p "../../lib")
15596 (copy-file jna-jar "../../build/jna.jar")
15597 (copy-file asm-jar "../../lib/asm-8.0.1.jar")
15598 (copy-file ant-jar "../../lib/ant.jar")
15599 (substitute* "build.xml"
15600 (("../../build/jna\\.jar") jna-jar)
15601 (("../../lib/asm-8\\.0\\.1\\.jar") asm-jar))
15602 (substitute* "../../build-ant-tools.xml"
15603 (("lib/ant\\.jar") ant-jar)
15604 (("lib/asm-8\\.0\\.1\\.jar") asm-jar))
15605 #t)))
15606 (add-before 'install 'create-pom
15607 (lambda _
15608 (call-with-output-file "pom.xml"
15609 (lambda (port)
15610 (sxml->xml
15611 `(*TOP*
15612 (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
15613 (project
15614 (modelVersion "4.0.0")
15615 (groupId "net.java.dev.jna")
15616 (artifactId "jna-platform-jpms")
15617 (version ,,version)
15618 (dependencies
15619 (dependency
15620 (groupId "net.java.dev.jna")
15621 (artifactId "jna-jpms")
15622 (version ,,version)))))
15623 port)))))
15624 (add-before 'install 'keep-only-jna-platform-jpms
15625 (lambda _
15626 (for-each delete-file
15627 (filter (lambda (f)
15628 (not (string-contains f "jna-platform-jpms")))
15629 (append (find-files "build" "\\.jar$")
15630 (find-files "dist" "\\.jar$"))))))
15631 (replace 'install
15632 (install-from-pom "pom.xml")))))
15633 (native-inputs
15634 (modify-inputs (package-native-inputs java-native-access-platform)
15635 (prepend java-asm-9)))
15636 (inputs
15637 (list java-native-access-5.14.0))))
15638
15639(define-public java-jsch-agentproxy-core
15640 (package
15641 (name "java-jsch-agentproxy-core")
15642 (version "0.0.8")
15643 (source (origin
15644 (method url-fetch)
15645 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
15646 version ".tar.gz"))
15647 (file-name (string-append name "-" version ".tar.gz"))
15648 (sha256
15649 (base32
15650 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
15651 (build-system ant-build-system)
15652 (arguments
15653 `(#:jar-name "jsch-agentproxy-core.jar"
15654 #:source-dir "jsch-agent-proxy-core/src/main/java"
15655 #:tests? #f)); no tests
15656 (home-page "https://github.com/ymnk/jsch-agent-proxy")
15657 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
15658 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15659and Pageant included Putty. It will be easily integrated into JSch, and users
15660will be allowed to use these programs for authentication.")
15661 (license license:bsd-3)))
15662
15663(define-public java-jsch-agentproxy-sshagent
15664 (package
15665 (inherit java-jsch-agentproxy-core)
15666 (name "java-jsch-agentproxy-sshagent")
15667 (arguments
15668 `(#:jar-name "jsch-agentproxy-sshagent.jar"
15669 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
15670 #:tests? #f)); no tests
15671 (inputs
15672 (list java-jsch-agentproxy-core))
15673 (synopsis "Proxy to ssh-agent")
15674 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15675and Pageant included in Putty. This component contains the code for a proxy to
15676ssh-agent.")))
15677
15678(define-public java-jsch-agentproxy-usocket-jna
15679 (package
15680 (inherit java-jsch-agentproxy-core)
15681 (name "java-jsch-agentproxy-usocket-jna")
15682 (arguments
15683 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
15684 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
15685 #:tests? #f)); no tests
15686 (inputs
15687 (list java-jsch-agentproxy-core java-native-access))
15688 (synopsis "USocketFactory implementation using JNA")
15689 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15690and Pageant included in Putty. This component contains an implementation of
15691USocketFactory using @dfn{JNA} (Java Native Access).")))
15692
15693(define-public java-jsch-agentproxy-pageant
15694 (package
15695 (inherit java-jsch-agentproxy-core)
15696 (name "java-jsch-agentproxy-pageant")
15697 (arguments
15698 `(#:jar-name "jsch-agentproxy-pageant.jar"
15699 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
15700 #:tests? #f)); no tests
15701 (inputs
15702 (list java-jsch-agentproxy-core java-native-access
15703 java-native-access-platform))
15704 (synopsis "Proxy to pageant")
15705 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15706and Pageant included in Putty. This component contains the code for a proxy to
15707pageant.")))
15708
15709(define-public java-jsch-agentproxy-usocket-nc
15710 (package
15711 (inherit java-jsch-agentproxy-core)
15712 (name "java-jsch-agentproxy-usocket-nc")
15713 (arguments
15714 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
15715 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
15716 #:tests? #f)); no tests
15717 (inputs
15718 (list java-jsch-agentproxy-core))
15719 (synopsis "USocketFactory implementation using netcat")
15720 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15721and Pageant included in Putty. This component contains an implementation of
15722USocketFactory using netcat.")))
15723
15724(define-public java-jsch-agentproxy-connector-factory
15725 (package
15726 (inherit java-jsch-agentproxy-core)
15727 (name "java-jsch-agentproxy-connector-factory")
15728 (arguments
15729 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
15730 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
15731 #:tests? #f)); no tests
15732 (inputs
15733 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
15734 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
15735 java-jsch-agentproxy-usocket-nc))
15736 (synopsis "Connector factory for jsch agent proxy")
15737 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15738and Pageant included in Putty. This component contains a connector factory.")))
15739
15740(define-public java-jsch-agentproxy-jsch
15741 (package
15742 (inherit java-jsch-agentproxy-core)
15743 (name "java-jsch-agentproxy-jsch")
15744 (arguments
15745 `(#:jar-name "jsch-agentproxy-jsch.jar"
15746 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
15747 #:tests? #f)); no tests
15748 (inputs
15749 (list java-jsch java-jsch-agentproxy-core))
15750 (synopsis "JSch integration library for agentproxy")
15751 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
15752and Pageant included in Putty. This component contains a library to use
15753jsch-agent-proxy with JSch.")))
15754
15755(define-public java-apache-ivy
15756 (package
15757 (name "java-apache-ivy")
15758 (version "2.4.0")
15759 (source (origin
15760 (method url-fetch)
15761 (uri (string-append "mirror://apache/ant/ivy/" version
15762 "/apache-ivy-" version "-src.tar.gz"))
15763 (sha256
15764 (base32
15765 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
15766 (patches
15767 (search-patches
15768 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
15769 (build-system ant-build-system)
15770 (arguments
15771 `(#:jar-name "ivy.jar"
15772 #:tests? #f
15773 #:phases
15774 (modify-phases %standard-phases
15775 (add-before 'build 'remove-example
15776 (lambda _
15777 (delete-file-recursively "src/example")
15778 #t))
15779 (add-before 'build 'copy-resources
15780 (lambda _
15781 (with-directory-excursion "src/java"
15782 (for-each (lambda (file)
15783 (install-file file (string-append "../../build/classes/" (dirname file))))
15784 (append
15785 (find-files "." ".*.css")
15786 (find-files "." ".*.ent")
15787 (find-files "." ".*.html")
15788 (find-files "." ".*.properties")
15789 (find-files "." ".*.xsd")
15790 (find-files "." ".*.xsl")
15791 (find-files "." ".*.xml"))))
15792 #t))
15793 (add-before 'build 'fix-vfs
15794 (lambda _
15795 (substitute*
15796 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
15797 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
15798 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
15799 #t))
15800 (add-before 'install 'copy-manifest
15801 (lambda _
15802 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
15803 #t))
15804 (add-before 'install 'repack
15805 (lambda _
15806 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
15807 "-C" "build/classes" ".")))
15808 (add-after 'install 'install-bin
15809 (lambda* (#:key outputs #:allow-other-keys)
15810 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
15811 (ivy (string-append bin "/ivy"))
15812 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
15813 (mkdir-p bin)
15814 (with-output-to-file ivy
15815 (lambda _
15816 (display (string-append
15817 "#!" (which "sh") "\n"
15818 "if [[ -z $CLASSPATH ]]; then\n"
15819 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
15820 "else\n"
15821 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
15822 "fi\n"
15823 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
15824 (chmod ivy #o755)
15825 #t))))))
15826 (inputs
15827 (list java-bouncycastle
15828 java-commons-cli
15829 java-commons-collections
15830 java-commons-httpclient
15831 java-commons-lang
15832 java-commons-vfs
15833 java-jakarta-oro
15834 java-jsch
15835 java-jsch-agentproxy-core
15836 java-jsch-agentproxy-connector-factory
15837 java-jsch-agentproxy-jsch
15838 java-junit))
15839 (home-page "https://ant.apache.org/ivy")
15840 (synopsis "Dependency manager for the Java programming language")
15841 (description "Ivy is a tool for managing (recording, tracking, resolving
15842and reporting) project dependencies. It is characterized by the following:
15843
15844@itemize
15845@item flexibility and configurability - Ivy is essentially process agnostic
15846 and is not tied to any methodology or structure. Instead it provides the
15847 necessary flexibility and configurability to be adapted to a broad range
15848 of dependency management and build processes.
15849@item tight integration with Apache Ant - while available as a standalone tool,
15850 Ivy works particularly well with Apache Ant providing a number of
15851 powerful Ant tasks ranging from dependency resolution to dependency
15852 reporting and publication.
15853@end itemize")
15854 (license license:asl2.0)))
15855
15856(define-public java-eclipse-sisu-inject
15857 (package
15858 (name "java-eclipse-sisu-inject")
15859 (version "0.3.5")
15860 (source (origin
15861 (method git-fetch)
15862 (uri (git-reference
15863 (url "https://github.com/eclipse/sisu.inject/")
15864 (commit (string-append "releases/" version))))
15865 (file-name (git-file-name name version))
15866 (sha256
15867 (base32
15868 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
15869 (build-system ant-build-system)
15870 (arguments
15871 `(#:jar-name "eclipse-sisu-inject.jar"
15872 #:source-dir "org.eclipse.sisu.inject/src"
15873 #:tests? #f; no tests
15874 #:phases
15875 (modify-phases %standard-phases
15876 (replace 'install
15877 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
15878 (propagated-inputs
15879 (list java-guice java-sisu-inject-parent-pom))
15880 (inputs
15881 (list java-guice-servlet
15882 java-javax-inject
15883 java-javaee-servletapi
15884 java-junit
15885 java-slf4j-api
15886 java-jsr305
15887 java-jsr250
15888 java-cdi-api
15889 java-osgi-framework
15890 java-osgi-util-tracker
15891 java-testng))
15892 (home-page "https://www.eclipse.org/sisu/")
15893 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
15894 (description "Sisu is a modular JSR330-based container that supports
15895classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
15896Google-Guice to perform dependency injection and provide the core JSR330
15897support, but removes the need to write explicit bindings in Guice modules.
15898Integration with other containers via the Eclipse Extension Registry and the
15899OSGi Service Registry is a goal of this project.")
15900 (license license:epl1.0)))
15901
15902(define java-sisu-inject-parent-pom
15903 (package
15904 (inherit java-eclipse-sisu-inject)
15905 (name "java-sisu-inject-parent-pom")
15906 (arguments
15907 `(#:tests? #f
15908 #:phases
15909 (modify-phases %standard-phases
15910 (delete 'configure)
15911 (delete 'build)
15912 (replace 'install
15913 (install-pom-file "pom.xml")))))
15914 (propagated-inputs '())))
15915
15916(define-public java-eclipse-sisu-plexus
15917 (package
15918 (name "java-eclipse-sisu-plexus")
15919 (version "0.3.5")
15920 (source (origin
15921 (method git-fetch)
15922 (uri (git-reference
15923 (url "https://github.com/eclipse/sisu.plexus")
15924 (commit (string-append "releases/" version))))
15925 (file-name (git-file-name name version))
15926 (sha256
15927 (base32
15928 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
15929 (modules '((guix build utils)))
15930 (snippet
15931 '(begin
15932 (for-each delete-file (find-files "." ".*.jar"))
15933 (rename-file "org.eclipse.sisu.plexus.tests/src"
15934 "org.eclipse.sisu.plexus.tests/java")
15935 #t))))
15936 (build-system ant-build-system)
15937 (arguments
15938 `(#:jar-name "eclipse-sisu-plexus.jar"
15939 #:source-dir "org.eclipse.sisu.plexus/src"
15940 #:test-dir "org.eclipse.sisu.plexus.tests"
15941 #:test-exclude
15942 (list
15943 ;; This test fails probably because we can't generate the necessary
15944 ;; meta-inf files.
15945 "**/PlexusLoggingTest.*"
15946 ;; FIXME: This test fails because of some injection error
15947 "**/PlexusRequirementTest.*")
15948 #:jdk ,icedtea-8
15949 #:phases
15950 (modify-phases %standard-phases
15951 (add-before 'build 'copy-resources
15952 (lambda _
15953 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
15954 "build/classes/META-INF/plexus")
15955 #t))
15956 (add-before 'check 'build-test-jar
15957 (lambda _
15958 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
15959 (mkdir "build")
15960 (with-directory-excursion "java"
15961 (apply invoke "javac" "-cp"
15962 (string-append (getenv "CLASSPATH")
15963 ":../../../../../build/classes")
15964 (find-files "." ".*.java"))
15965 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
15966 (find-files "." ".*.jar")))
15967 (mkdir-p "build/META-INF/plexus")
15968 (copy-file "resources/META-INF/plexus/components.xml"
15969 "build/META-INF/plexus/components.xml")
15970 (with-directory-excursion "build"
15971 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
15972 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
15973 (copy-recursively "META-INF" "../build/test-classes/META-INF")
15974 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
15975 (("resources/component-jar")
15976 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
15977 #t))
15978 (replace 'install
15979 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
15980 (propagated-inputs
15981 (list java-jsr250
15982 java-plexus-classworlds
15983 java-plexus-utils
15984 java-plexus-component-annotations
15985 java-cdi-api
15986 java-eclipse-sisu-inject
15987 java-sisu-plexus-parent-pom))
15988 (inputs
15989 (list java-osgi-framework
15990 java-slf4j-api
15991 java-javax-inject
15992 java-guice
15993 java-guava
15994 java-aopalliance
15995 java-cglib))
15996 (native-inputs
15997 (list java-junit))
15998 (home-page "https://www.eclipse.org/sisu/")
15999 (synopsis "Plexus support for the sisu container")
16000 (description "Sisu is a modular JSR330-based container that supports
16001classpath scanning, auto-binding, and dynamic auto-wiring. This package
16002adds Plexus support to the Sisu-Inject container.")
16003 (license license:epl1.0)))
16004
16005(define java-sisu-plexus-parent-pom
16006 (package
16007 (inherit java-eclipse-sisu-plexus)
16008 (name "java-sisu-plexus-parent-pom")
16009 (arguments
16010 `(#:tests? #f
16011 #:phases
16012 (modify-phases %standard-phases
16013 (delete 'configure)
16014 (delete 'build)
16015 (replace 'install
16016 (install-pom-file "pom.xml")))))
16017 (propagated-inputs
16018 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
16019
16020(define-public java-commons-compiler
16021 (package
16022 (name "java-commons-compiler")
16023 (version "3.0.8")
16024 (source (origin
16025 (method git-fetch)
16026 (uri (git-reference
16027 (url "https://github.com/janino-compiler/janino")
16028 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
16029 (file-name (string-append name "-" version))
16030 (sha256
16031 (base32
16032 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
16033 (modules '((guix build utils)))
16034 (snippet
16035 '(begin
16036 (for-each delete-file
16037 (find-files "." "\\.jar$"))
16038 #t))))
16039 (build-system ant-build-system)
16040 (arguments
16041 `(#:jar-name "commons-compiler.jar"
16042 #:source-dir "commons-compiler/src/main"
16043 #:tests? #f)); no tests
16044 (home-page "https://github.com/janino-compiler/janino")
16045 (synopsis "Java compiler")
16046 (description "Commons-compiler contains an API for janino, including the
16047@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
16048and @code{ISimpleCompiler} interfaces.")
16049 (license license:bsd-3)))
16050
16051(define-public java-janino
16052 (package
16053 (inherit java-commons-compiler)
16054 (name "java-janino")
16055 (arguments
16056 `(#:jar-name "janino.jar"
16057 #:source-dir "src/main/java"
16058 #:phases
16059 (modify-phases %standard-phases
16060 (add-before 'configure 'chdir
16061 (lambda _
16062 (chdir "janino")
16063 #t)))))
16064 (inputs
16065 (list java-commons-compiler))
16066 (native-inputs
16067 (list java-junit java-hamcrest-core))
16068 (description "Janino is a Java compiler. Janino can compile a set of
16069source files to a set of class files like @code{javac}, but also compile a
16070Java expression, block, class body or source file in memory, load the bytecode
16071and execute it directly in the same JVM. @code{janino} can also be used for
16072static code analysis or code manipulation.")))
16073
16074(define-public java-logback-core
16075 (package
16076 (name "java-logback-core")
16077 (version "1.2.3")
16078 (source (origin
16079 (method git-fetch)
16080 (uri (git-reference
16081 (url "https://github.com/qos-ch/logback/")
16082 (commit (string-append "v_" version))))
16083 (file-name (git-file-name name version))
16084 (sha256
16085 (base32
16086 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
16087 (modules '((guix build utils)))
16088 (snippet
16089 '(delete-file-recursively "logback-access/lib"))))
16090 (build-system ant-build-system)
16091 (arguments
16092 `(#:jar-name "logback.jar"
16093 #:source-dir "src/main/java"
16094 #:test-dir "src/test"
16095 #:test-exclude
16096 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
16097 ;; which creates FastClasses
16098 (list "**/AllCoreTest.*"
16099 "**/AutoFlushingObjectWriterTest.*"
16100 "**/PackageTest.*"
16101 "**/ResilientOutputStreamTest.*"
16102 ;; And we still don't want to run abstract classes
16103 "**/Abstract*.*")
16104 #:phases
16105 (modify-phases %standard-phases
16106 (add-before 'configure 'chdir
16107 (lambda _ (chdir "logback-core"))))))
16108 (inputs
16109 (list java-javax-mail
16110 java-javaee-servletapi
16111 java-commons-compiler
16112 java-janino))
16113 (native-inputs
16114 (list java-junit
16115 java-hamcrest-core
16116 java-mockito-1
16117 java-cglib
16118 java-objenesis
16119 java-joda-time))
16120 (home-page "https://logback.qos.ch")
16121 (synopsis "Logging for java")
16122 (description "Logback is intended as a successor to the popular log4j project.
16123This module lays the groundwork for the other two modules.")
16124 ;; Either epl1.0 or lgpl2.1
16125 (license (list license:epl1.0
16126 license:lgpl2.1))))
16127
16128(define-public java-logback-classic
16129 (package
16130 (inherit java-logback-core)
16131 (name "java-logback-classic")
16132 (arguments
16133 `(#:jar-name "logback-classic.jar"
16134 #:source-dir "src/main/java"
16135 #:test-dir "src/test"
16136 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
16137 #:jdk ,icedtea-8
16138 #:phases
16139 (modify-phases %standard-phases
16140 (add-before 'configure 'chdir
16141 (lambda _
16142 (chdir "logback-classic")
16143 #t))
16144 (replace 'build
16145 (lambda* (#:key inputs #:allow-other-keys)
16146 (mkdir-p "build/classes")
16147 (setenv "CLASSPATH"
16148 (string-join
16149 (apply append (map (lambda (input)
16150 (find-files (assoc-ref inputs input)
16151 ".*.jar"))
16152 '("java-logback-core" "java-slf4j-api"
16153 "java-commons-compiler" "java-javaee-servletapi"
16154 "groovy")))
16155 ":"))
16156 (apply invoke "groovyc" "-d" "build/classes" "-j"
16157 (find-files "src/main/" ".*\\.(groovy|java)$"))
16158 (invoke "ant" "jar")
16159 #t)))))
16160 (inputs
16161 (modify-inputs inputs
16162 (prepend java-logback-core java-slf4j-api)))
16163 (native-inputs
16164 (list groovy))
16165 (description "Logback is intended as a successor to the popular log4j project.
16166This module can be assimilated to a significantly improved version of log4j.
16167Moreover, @code{logback-classic} natively implements the slf4j API so that you
16168can readily switch back and forth between logback and other logging frameworks
16169such as log4j or @code{java.util.logging} (JUL).")))
16170
16171(define-public java-jgit
16172 (package
16173 (name "java-jgit")
16174 (version "4.7.0.201704051617-r")
16175 (source (origin
16176 (method url-fetch)
16177 (uri (string-append "https://repo1.maven.org/maven2/"
16178 "org/eclipse/jgit/org.eclipse.jgit/"
16179 version "/org.eclipse.jgit-"
16180 version "-sources.jar"))
16181 (sha256
16182 (base32
16183 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
16184 (build-system ant-build-system)
16185 (arguments
16186 `(#:tests? #f ; There are no tests to run.
16187 #:jar-name "jgit.jar"
16188 ;; JGit must be built with a JDK supporting Java 8.
16189 #:jdk ,icedtea-8
16190 ;; Target our older default JDK.
16191 #:make-flags (list "-Dtarget=1.7")
16192 #:phases
16193 (modify-phases %standard-phases
16194 ;; The jar file generated by the default build.xml does not include
16195 ;; the text properties files, so we need to add them.
16196 (add-after 'build 'add-properties
16197 (lambda* (#:key jar-name #:allow-other-keys)
16198 (with-directory-excursion "src"
16199 (apply invoke "jar" "-uf"
16200 (string-append "../build/jar/" jar-name)
16201 (find-files "." "\\.properties$")))
16202 #t)))))
16203 (inputs
16204 (list java-classpathx-servletapi java-javaewah java-jsch
16205 java-slf4j-api))
16206 (home-page "https://eclipse.org/jgit/")
16207 (synopsis "Java library implementing the Git version control system")
16208 (description "JGit is a lightweight, pure Java library implementing the
16209Git version control system, providing repository access routines, support for
16210network protocols, and core version control algorithms.")
16211 (license license:edl1.0)))
16212
16213;; For axoloti.
16214(define-public java-jgit-4.2
16215 (package (inherit java-jgit)
16216 (version "4.2.0.201601211800-r")
16217 (source (origin
16218 (method url-fetch)
16219 (uri (string-append "https://repo1.maven.org/maven2/"
16220 "org/eclipse/jgit/org.eclipse.jgit/"
16221 version "/org.eclipse.jgit-"
16222 version "-sources.jar"))
16223 (sha256
16224 (base32
16225 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
16226 (build-system ant-build-system)
16227 (arguments
16228 (substitute-keyword-arguments (package-arguments java-jgit)
16229 ((#:phases phases)
16230 `(modify-phases ,phases
16231 (add-after 'unpack 'use-latest-javaewah-API
16232 (lambda _
16233 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
16234 (("wordinbits") "WORD_IN_BITS"))))))))
16235 (inputs
16236 (list java-javaewah java-jsch java-slf4j-api))))
16237
16238(define-public java-jgit-7
16239 (package
16240 (name "java-jgit")
16241 (version "7.0.0.202409031743-r")
16242 (source (origin
16243 (method url-fetch)
16244 (uri (string-append "https://repo1.maven.org/maven2/"
16245 "org/eclipse/jgit/org.eclipse.jgit/"
16246 version "/org.eclipse.jgit-"
16247 version "-sources.jar"))
16248 (sha256
16249 (base32
16250 "0hdl11cbb6zy39zw4jpg0ip00nikilw7dajrqky6d3l18khjby5k"))))
16251 (build-system ant-build-system)
16252 (arguments
16253 `(#:tests? #f ; sources jar has no tests
16254 #:jar-name "jgit.jar"
16255 #:jdk ,openjdk17
16256 #:modules ((guix build ant-build-system)
16257 (guix build utils)
16258 (guix build java-utils)
16259 (srfi srfi-1))
16260 #:phases
16261 (modify-phases %standard-phases
16262 (add-after 'build 'add-properties
16263 (lambda* (#:key jar-name #:allow-other-keys)
16264 (with-directory-excursion "src"
16265 (apply invoke "jar" "-uf"
16266 (string-append "../build/jar/" jar-name)
16267 (find-files "." "\\.properties$")))
16268 (let* ((pkgs (delete-duplicates
16269 (filter-map
16270 (lambda (f)
16271 (let* ((d (dirname f))
16272 (d (if (string-prefix? "./" d)
16273 (substring d 2)
16274 d)))
16275 (and (not (string-null? d))
16276 (not (string=? d "."))
16277 (string-map
16278 (lambda (c)
16279 (if (char=? c #\/) #\. c))
16280 d))))
16281 (with-directory-excursion "build/classes"
16282 (find-files "." "\\.class$")))))
16283 (export-pkg (string-join (sort pkgs string<?) ",")))
16284 ;; Write manifest with continuation lines for long values.
16285 ;; Manifest spec: max 72 bytes per line, continuation
16286 ;; lines start with a single space.
16287 (call-with-output-file "osgi-manifest.mf"
16288 (lambda (port)
16289 (for-each
16290 (lambda (line)
16291 (let loop ((s line))
16292 (if (<= (string-length s) 70)
16293 (begin (display s port) (newline port))
16294 (begin (display (substring s 0 70) port)
16295 (newline port)
16296 (loop (string-append
16297 " " (substring s 70)))))))
16298 (list
16299 "Bundle-ManifestVersion: 2"
16300 "Bundle-SymbolicName: org.eclipse.jgit"
16301 (string-append "Bundle-Version: " ,version)
16302 (string-append "Export-Package: " export-pkg)
16303 (string-append
16304 "Import-Package: com.googlecode.javaewah,"
16305 "javax.crypto,javax.management,javax.net.ssl,"
16306 "org.apache.commons.codec.digest,"
16307 "org.slf4j,org.xml.sax,org.xml.sax.helpers")))
16308 (newline port))))
16309 (invoke "jar" "ufm" (string-append "build/jar/" jar-name)
16310 "osgi-manifest.mf")))
16311 (replace 'install
16312 (install-from-pom
16313 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit/pom.xml")))))
16314 (inputs
16315 (list java-commons-codec java-javaewah-1.2.3 java-slf4j-api))
16316 (home-page "https://eclipse.org/jgit/")
16317 (synopsis "Java library implementing the Git version control system")
16318 (description "JGit is a lightweight, pure Java library implementing the
16319Git version control system, providing repository access routines, support for
16320network protocols, and core version control algorithms.")
16321 (license license:edl1.0)))
16322
16323(define-public java-jgit-ssh-jsch-7
16324 (package
16325 (name "java-jgit-ssh-jsch")
16326 (version "7.0.0.202409031743-r")
16327 (source (origin
16328 (method url-fetch)
16329 (uri (string-append "https://repo1.maven.org/maven2/"
16330 "org/eclipse/jgit/org.eclipse.jgit.ssh.jsch/"
16331 version "/org.eclipse.jgit.ssh.jsch-"
16332 version "-sources.jar"))
16333 (sha256
16334 (base32
16335 "1vb3zkd2iz6bpz2nq8xxi5d5jdb8hy8jq7gka2ck22azm9bb6p94"))))
16336 (build-system ant-build-system)
16337 (arguments
16338 `(#:tests? #f ; sources jar has no tests
16339 #:jar-name "jgit-ssh-jsch.jar"
16340 #:jdk ,openjdk17
16341 #:phases
16342 (modify-phases %standard-phases
16343 (add-after 'build 'add-osgi-manifest
16344 (lambda _
16345 ;; The NetBeans wrapper module has an empty jar target and
16346 ;; relies on Bundle-SymbolicName from the Maven Central jar.
16347 (call-with-output-file "osgi-manifest.mf"
16348 (lambda (port)
16349 (display (string-append
16350 "Bundle-ManifestVersion: 2\n"
16351 "Bundle-SymbolicName: org.eclipse.jgit.ssh.jsch\n"
16352 "Bundle-Version: " ,version "\n"
16353 "Export-Package: org.eclipse.jgit.transport.ssh"
16354 ".jsch\n"
16355 "Import-Package: com.jcraft.jsch,"
16356 "org.eclipse.jgit.errors,"
16357 "org.eclipse.jgit.internal,"
16358 "org.eclipse.jgit.internal.transport.ssh,"
16359 "org.eclipse.jgit.nls,"
16360 "org.eclipse.jgit.transport,"
16361 "org.eclipse.jgit.util,"
16362 "org.eclipse.jgit.util.io,"
16363 "org.slf4j\n")
16364 port)))
16365 (invoke "jar" "ufm" "build/jar/jgit-ssh-jsch.jar"
16366 "osgi-manifest.mf")))
16367 (replace 'install
16368 (install-from-pom
16369 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/pom.xml")))))
16370 (inputs
16371 (list java-jgit-7 java-jsch-0.1.72 java-jzlib-1.1.3 java-slf4j-api))
16372 (home-page "https://eclipse.org/jgit/")
16373 (synopsis "SSH support for JGit using JSch")
16374 (description "This package provides SSH transport support for JGit
16375using the JSch library.")
16376 (license license:edl1.0)))
16377
16378(define-public java-jgit-gpg-bc-7
16379 (package
16380 (name "java-jgit-gpg-bc")
16381 (version "7.0.0.202409031743-r")
16382 (source (origin
16383 (method url-fetch)
16384 (uri (string-append "https://repo1.maven.org/maven2/"
16385 "org/eclipse/jgit/org.eclipse.jgit.gpg.bc/"
16386 version "/org.eclipse.jgit.gpg.bc-"
16387 version "-sources.jar"))
16388 (sha256
16389 (base32
16390 "1123x1i19h3a674mc44csdx7spn5qh6qk3klkfih4am9ak81w27n"))))
16391 (build-system ant-build-system)
16392 (arguments
16393 `(#:tests? #f
16394 #:jar-name "jgit-gpg-bc.jar"
16395 #:jdk ,openjdk17
16396 #:phases
16397 (modify-phases %standard-phases
16398 (add-after 'build 'add-osgi-manifest
16399 (lambda _
16400 (call-with-output-file "osgi-manifest.mf"
16401 (lambda (port)
16402 (display (string-append
16403 "Bundle-ManifestVersion: 2\n"
16404 "Bundle-SymbolicName: org.eclipse.jgit.gpg.bc\n"
16405 "Bundle-Version: " ,version "\n"
16406 "Export-Package: org.eclipse.jgit.gpg.bc.internal\n"
16407 "Import-Package: org.bouncycastle.asn1,"
16408 "org.bouncycastle.bcpg,"
16409 "org.bouncycastle.gpg,"
16410 "org.bouncycastle.gpg.keybox,"
16411 "org.bouncycastle.openpgp,"
16412 "org.bouncycastle.openpgp.operator,"
16413 "org.bouncycastle.openpgp.operator.jcajce,"
16414 "org.bouncycastle.util.encoders,"
16415 "org.eclipse.jgit.api.errors,"
16416 "org.eclipse.jgit.lib,"
16417 "org.eclipse.jgit.nls,"
16418 "org.eclipse.jgit.transport,"
16419 "org.eclipse.jgit.util,"
16420 "org.slf4j\n")
16421 port)))
16422 (invoke "jar" "ufm" "build/jar/jgit-gpg-bc.jar"
16423 "osgi-manifest.mf")))
16424 (replace 'install
16425 (install-from-pom
16426 "src/META-INF/maven/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/pom.xml")))))
16427 (inputs
16428 (list java-bouncycastle-1.77 java-jgit-7 java-slf4j-api))
16429 (native-inputs (list unzip))
16430 (home-page "https://eclipse.org/jgit/")
16431 (synopsis "GPG support for JGit using Bouncy Castle")
16432 (description "This package provides GPG commit signing support for
16433JGit using the Bouncy Castle cryptographic library.")
16434 (license license:edl1.0)))
16435
16436(define-public java-jsonp-api
16437 (package
16438 (name "java-jsonp-api")
16439 (version "1.1.6")
16440 (source (origin
16441 (method git-fetch)
16442 (uri (git-reference
16443 (url "https://github.com/eclipse-ee4j/jsonp")
16444 (commit (string-append "1.1-" version "-RELEASE"))))
16445 (file-name (git-file-name name version))
16446 (sha256
16447 (base32
16448 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
16449 (build-system ant-build-system)
16450 (arguments
16451 `(#:jar-name "jsonp-api.jar"
16452 #:tests? #f
16453 #:source-dir "api/src/main/java"
16454 #:test-dir "api/src/test"))
16455 (home-page "https://eclipse-ee4j.github.io/jsonp/")
16456 (synopsis "JSON Processing in Java")
16457 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
16458parse, generate, transform and query) JSON messages. It produces and
16459consumes JSON text in a streaming fashion (similar to StAX API for XML)
16460and allows building a Java object model for JSON text using API classes
16461(similar to DOM API for XML).")
16462 ;; either gpl2 only with classpath exception, or epl2.0.
16463 (license (list license:gpl2
16464 license:epl2.0))))
16465
16466(define-public java-jsonp-impl
16467 (package
16468 (inherit java-jsonp-api)
16469 (name "java-jsonp-impl")
16470 (arguments
16471 `(#:jar-name "jsonp-impl.jar"
16472 #:tests? #f
16473 #:source-dir "impl/src/main/java"
16474 #:test-dir "impl/src/test"
16475 #:phases
16476 (modify-phases %standard-phases
16477 (add-before 'build 'copy-resources
16478 (lambda _
16479 (copy-recursively
16480 "impl/src/main/resources/"
16481 "build/classes")
16482 #t)))))
16483 (propagated-inputs
16484 (list java-jsonp-api))
16485 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
16486parse, generate, transform and query) JSON messages. This package contains
16487a reference implementation of that API.")))
16488
16489(define-public java-jakarta-json
16490 (package
16491 (name "java-jakarta-json")
16492 (version "2.1.3")
16493 (source (origin
16494 (method git-fetch)
16495 (uri (git-reference
16496 (url "https://github.com/jakartaee/jsonp-api")
16497 (commit (string-append version "-RELEASE"))))
16498 (file-name (git-file-name name version))
16499 (sha256
16500 (base32
16501 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
16502 (build-system ant-build-system)
16503 (arguments
16504 `(#:jar-name "jakarta-json.jar"
16505 #:source-dir "api/src/main/java"
16506 #:tests? #f; no tests
16507 #:jdk ,openjdk11))
16508 (home-page "https://github.com/jakartaee/jsonp-api")
16509 (synopsis "Portable API for JSON handling in Java")
16510 (description "This project contains API and Compatible Implementation of
16511Jakarta JSON Processing specification. Jakarta JSON Processing provides
16512portable APIs to parse, generate, transform, and query JSON documents.")
16513 ;; with classpath exception
16514 (license license:epl2.0)))
16515
16516(define-public java-parsson
16517 (package
16518 (name "java-parsson")
16519 (version "1.1.5")
16520 (source (origin
16521 (method git-fetch)
16522 (uri (git-reference
16523 (url "https://github.com/eclipse-ee4j/parsson")
16524 (commit version)))
16525 (file-name (git-file-name name version))
16526 (sha256
16527 (base32
16528 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
16529 (build-system ant-build-system)
16530 (arguments
16531 `(#:jar-name "parsson.jar"
16532 #:source-dir "impl/src/main/java"
16533 #:test-dir "impl/src/test"
16534 #:use-java-modules? #t
16535 #:jdk ,openjdk11
16536 #:phases
16537 (modify-phases %standard-phases
16538 (add-after 'unpack 'copy-resources
16539 (lambda _
16540 (copy-recursively "impl/src/main/resources"
16541 "build/classes"))))))
16542 (inputs
16543 (list java-jakarta-json))
16544 (native-inputs
16545 (list java-junit))
16546 (home-page "https://github.com/eclipse-ee4j/parsson")
16547 (synopsis "Implementation of Jakarta JSON API")
16548 (description "Eclipse Parsson is an implementation of the Jakarta JSON
16549Processing specification.")
16550 ;; with classpath exception
16551 (license license:epl2.0)))
16552
16553(define-public java-jakarta-activation-api
16554 (package
16555 (name "java-jakarta-activation-api")
16556 (version "2.1.4")
16557 (source (origin
16558 (method git-fetch)
16559 (uri (git-reference
16560 (url "https://github.com/jakartaee/jaf-api")
16561 (commit version)))
16562 (file-name (git-file-name name version))
16563 (sha256
16564 (base32
16565 "125bf475cb0mdyhn1lj3c8gbwngbd28x10vnknq86zrc1vq4m6gx"))))
16566 (build-system ant-build-system)
16567 (arguments
16568 `(#:jar-name "jakarta-activation-api.jar"
16569 #:source-dir "api/src/main/java"
16570 #:tests? #f ;; has no tests
16571 #:jdk ,openjdk11))
16572 (home-page "https://github.com/jakartaee/jaf-api")
16573 (synopsis "Collection of Java activation")
16574 (description "Jakarta Activation lets you take advantage of standard
16575services to: determine the type of arbitrary piece of data; encapsulate access
16576to it; discover the operations available on it; and instantiate the
16577appropriate bean to perform the operation(s).")
16578 (license license:bsd-3)))
16579
16580(define-public java-jakarta-annotations-api
16581 (package
16582 (name "java-jakarta-annotations-api")
16583 (version "2.1.1")
16584 (source (origin
16585 (method git-fetch)
16586 (uri (git-reference
16587 (url "https://github.com/jakartaee/common-annotations-api")
16588 (commit version)))
16589 (file-name (git-file-name name version))
16590 (sha256
16591 (base32
16592 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
16593 (build-system ant-build-system)
16594 (arguments
16595 `(#:jar-name "jakarta-annotations-api.jar"
16596 #:source-dir "api/src/main/java"
16597 #:tests? #f; no tests
16598 #:jdk ,openjdk11))
16599 (home-page "https://github.com/jakartaee/common-annotations-api")
16600 (synopsis "Collection of Java annotations")
16601 (description "Jakarta Annotations defines a collection of annotations
16602representing common semantic concepts that enable a declarative style of
16603programming that applies across a variety of Java technologies.")
16604 ;; with classpath exception
16605 (license (list license:epl2.0
16606 license:gpl2))))
16607
16608(define-public java-xmp
16609 (package
16610 (name "java-xmp")
16611 (version "5.1.3")
16612 (source (origin
16613 (method url-fetch)
16614 (uri (string-append "http://download.macromedia.com/pub/developer"
16615 "/xmp/sdk/XMPCoreJava-" version ".zip"))
16616 (sha256
16617 (base32
16618 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
16619 (build-system ant-build-system)
16620 (arguments
16621 `(#:build-target "build"
16622 #:tests? #f; no tests
16623 #:phases
16624 (modify-phases %standard-phases
16625 (add-after 'unpack 'chdir
16626 (lambda _
16627 (chdir "XMPCore")
16628 #t))
16629 (add-before 'build 'fix-timestamp
16630 (lambda _
16631 (substitute* "build.xml"
16632 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
16633 #t))
16634 (replace 'install
16635 (install-jars "."))
16636 (add-after 'install 'install-doc
16637 (lambda* (#:key outputs #:allow-other-keys)
16638 (copy-recursively
16639 "docs"
16640 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
16641 #t)))))
16642 (native-inputs
16643 (list unzip))
16644 (home-page "https://www.adobe.com/devnet/xmp.html")
16645 (synopsis "Extensible Metadat Platform (XMP) support in Java")
16646 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
16647technology that allows you to embed data about a file, known as metadata,
16648into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
16649library and the API is similar.")
16650 (license license:bsd-3)))
16651
16652(define-public java-args4j
16653 (package
16654 (name "java-args4j")
16655 (version "2.33")
16656 (source (origin
16657 (method git-fetch)
16658 (uri (git-reference
16659 (url "https://github.com/kohsuke/args4j")
16660 (commit (string-append "args4j-site-" version))))
16661 (file-name (git-file-name name version))
16662 (sha256
16663 (base32
16664 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
16665 (build-system ant-build-system)
16666 (arguments
16667 `(#:jar-name "args4j.jar"
16668 #:source-dir "args4j/src"
16669 #:test-dir "args4j/test"
16670 #:test-exclude
16671 (list "**/ExampleTest.*"
16672 "**/ExternalConfiguredTest.*" ; fails to find a file
16673 ;; We still don't want to run abstract classes
16674 "**/Abstract*.*")
16675 #:phases
16676 (modify-phases %standard-phases
16677 (add-before 'check 'fix-test-dir
16678 (lambda _
16679 (substitute* "build.xml"
16680 (("/java\">") "\">"))
16681 #t))
16682 (add-before 'build 'copy-resources
16683 (lambda _
16684 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
16685 (to-prefix "build/classes/org/kohsuke/args4j/"))
16686 (for-each (lambda (f)
16687 (install-file
16688 (string-append from-prefix f)
16689 (string-append to-prefix (dirname f))))
16690 (list "Messages.properties"
16691 "Messages_de.properties"
16692 "Messages_en.properties"
16693 "Messages_ru.properties"
16694 "spi/Messages.properties"
16695 "spi/Messages_de.properties"
16696 "spi/Messages_en.properties"
16697 "spi/Messages_ru.properties")))
16698 #t)))))
16699 (native-inputs
16700 (list java-junit))
16701 (home-page "https://args4j.kohsuke.org/")
16702 (synopsis "Command line parser library")
16703 (description "Args4j is a small Java class library that makes it easy to
16704parse command line options/arguments in your CUI application.")
16705 (license license:expat)))
16706
16707(define-public java-argparse4j
16708 (package
16709 (name "java-argparse4j")
16710 (version "0.9.0")
16711 (source (origin
16712 (method git-fetch)
16713 (uri (git-reference
16714 (url "https://github.com/argparse4j/argparse4j")
16715 (commit (string-append "argparse4j-" version))))
16716 (file-name (git-file-name name version))
16717 (sha256
16718 (base32
16719 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
16720 (build-system ant-build-system)
16721 (arguments
16722 (list #:jar-name "java-argparse4j.jar"
16723 #:source-dir "main/src/main/"
16724 #:test-dir "main/src/test/"
16725 #:jdk openjdk11
16726 #:phases #~(modify-phases %standard-phases
16727 (add-after 'unpack 'copy-resources
16728 (lambda _
16729 (copy-recursively "main/src/test/resources"
16730 "target/test-classes")
16731 (copy-recursively "main/src/main/resources"
16732 "build/classes")))
16733 (replace 'install
16734 (install-from-pom "pom.xml")))))
16735 (inputs (list java-junit))
16736 (home-page "https://argparse4j.github.io/")
16737 (synopsis "Java command-line argument parser library")
16738 (description "Argparse4j is a command line argument parser library for
16739Java based on Python's @code{argparse} module.")
16740 (license license:expat)))
16741
16742(define-public java-metadata-extractor
16743 (package
16744 (name "java-metadata-extractor")
16745 (version "2.19.0")
16746 (source (origin
16747 (method git-fetch)
16748 (uri (git-reference
16749 (url "https://github.com/drewnoakes/metadata-extractor")
16750 (commit version)))
16751 (file-name (git-file-name name version))
16752 (sha256
16753 (base32
16754 "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna"))))
16755 (build-system ant-build-system)
16756 (arguments
16757 `(#:jar-name "metadata-extractor.jar"
16758 #:source-dir "Source"
16759 #:test-dir "Tests"
16760 #:phases
16761 (modify-phases %standard-phases
16762 (add-before 'build 'fix-xmp-path
16763 (lambda _
16764 ;; This version of metadata-extractor depends on java-xmp 6, which
16765 ;; is non-free. These changes allow using java-xmp 5, which is
16766 ;; the last free-software version of java-xmp.
16767 (substitute* (find-files "." ".*.java")
16768 (("com.adobe.internal.xmp") "com.adobe.xmp"))
16769 (substitute* "Source/com/drew/metadata/xmp/XmpReader.java"
16770 (("\\.setXMPNodesToLimit.*") ";"))
16771 ;; Test failure, most likely because we use a different java-xmp
16772 ;; version.
16773 (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java")))
16774 (add-before 'check 'fix-test-dir
16775 (lambda _
16776 (substitute* "build.xml"
16777 (("/java\">") "\">"))
16778 #t)))))
16779 (propagated-inputs
16780 (list java-xmp))
16781 (native-inputs
16782 (list java-hamcrest-core java-junit))
16783 (home-page "https://github.com/drewnoakes/metadata-extractor")
16784 (synopsis "Extract metadata from image and video files")
16785 (description "Metadata-extractor is a straightforward Java library for
16786reading metadata from image files. It is able to read metadata in Exif,
16787IPTC, XMP, ICC and more formats.")
16788 (license license:asl2.0)))
16789
16790(define-public java-svg-salamander
16791 (package
16792 (name "java-svg-salamander")
16793 (version "1.1.2")
16794 (source (origin
16795 (method git-fetch)
16796 (uri (git-reference
16797 (url "https://github.com/blackears/svgSalamander")
16798 (commit (string-append "v" version))))
16799 (file-name (git-file-name name version))
16800 (sha256
16801 (base32
16802 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
16803 (modules '((guix build utils)))
16804 (snippet
16805 '(begin
16806 (for-each delete-file (find-files "." ".*.jar"))
16807 #t))
16808 (patches
16809 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
16810 (build-system ant-build-system)
16811 (arguments
16812 `(#:tests? #f; no tests
16813 #:phases
16814 (modify-phases %standard-phases
16815 (add-after 'unpack 'chdir
16816 (lambda _
16817 (chdir "svg-core")
16818 #t))
16819 (add-before 'build 'copy-jars
16820 (lambda* (#:key inputs #:allow-other-keys)
16821 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
16822 "../libraries/javacc.jar")
16823 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
16824 "../libraries/ant.jar")
16825 #t))
16826 (replace 'install
16827 (install-jars "dist")))))
16828 (native-inputs
16829 (list javacc))
16830 (home-page "https://github.com/blackears/svgSalamander")
16831 (synopsis "SVG engine for Java")
16832 (description "SVG Salamander is an SVG engine for Java that's designed
16833to be small, fast, and allow programmers to use it with a minimum of fuss.
16834It's in particular targeted for making it easy to integrate SVG into Java
16835games and making it much easier for artists to design 2D game content - from
16836rich interactive menus to charts and graphcs to complex animations.")
16837 (license license:bsd-2)))
16838
16839(define-public java-jboss-transaction-api-spec
16840 (package
16841 (name "java-jboss-transaction-api-spec")
16842 (version "1.2+1.1.1")
16843 (source (origin
16844 (method git-fetch)
16845 (uri (git-reference
16846 (url "https://github.com/jboss/jboss-transaction-api_spec")
16847 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
16848 (file-name (git-file-name name version))
16849 (sha256
16850 (base32
16851 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
16852 (build-system ant-build-system)
16853 (arguments
16854 `(#:jar-name "java-jboss-transaction-api_spec.jar"
16855 #:source-dir "src/main/java"
16856 #:tests? #f)); no tests
16857 (inputs
16858 (list java-cdi-api java-jboss-interceptors-api-spec))
16859 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
16860 (synopsis "Generic transaction management API in Java")
16861 (description "Java-jboss-transaction-api-spec implements the Transactions
16862API. A transaction is a unit of work containing one or more operations
16863involving one or more shared resources having ACID (Atomicity, Consistency,
16864Isolation and Durability) properties.")
16865 ;; either gpl2 only with classpath exception or cddl.
16866 (license (list license:gpl2 license:cddl1.0))))
16867
16868(define-public java-picocli
16869 (package
16870 (name "java-picocli")
16871 (version "4.3.2")
16872 (source (origin
16873 (method git-fetch)
16874 (uri (git-reference
16875 (url "https://github.com/remkop/picocli")
16876 (commit (string-append "v" version))))
16877 (file-name (git-file-name name version))
16878 (sha256
16879 (base32
16880 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
16881 (build-system ant-build-system)
16882 (arguments
16883 `(#:jar-name "picocli.jar"
16884 #:source-dir "src/main/java"
16885 ;; Tests require missing dependencies (junitparams, system-rules)
16886 #:tests? #f))
16887 (home-page "https://picocli.info")
16888 (synopsis "REPL for the JVM")
16889 (description "Picocli is a framework for building command line applications
16890for the JVM. It supports colors, autocompletion, subcommands, and more. Written
16891in Java, usable from Groovy, Kotlin, Scala, etc.")
16892 (license license:asl2.0)))
16893
16894(define-public java-pj
16895 (package
16896 (name "java-pj")
16897 (version "20150107")
16898 (source (origin
16899 (method url-fetch)
16900 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
16901 version ".jar"))
16902 (sha256
16903 (base32
16904 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
16905 (modules '((guix build utils)))
16906 (snippet
16907 '(for-each delete-file
16908 (find-files "." "\\.class$")))))
16909 (build-system ant-build-system)
16910 (arguments
16911 (list
16912 #:tests? #false ;there are none
16913 #:phases
16914 #~(modify-phases %standard-phases
16915 (add-after 'unpack 'chdir
16916 (lambda _ (chdir "src/pj")))
16917 (add-after 'chdir 'patch-source-directory
16918 (lambda _
16919 (substitute* "compile"
16920 (("SRCDIR1=/home/ark/public_html/pj/lib")
16921 (string-append "SRCDIR1=" (getcwd) "/lib")))))
16922 (replace 'build
16923 (lambda _
16924 (invoke "bash" "./compile" "linux")
16925 (with-directory-excursion "lib"
16926 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
16927 (find-files "." "\\.class$")))))
16928 (replace 'install (install-jars ".")))))
16929 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
16930 (synopsis "Parallel programming in Java")
16931 (description "Parallel Java (PJ) is an API and middleware for parallel
16932programming in 100% Java on shared memory multiprocessor (SMP) parallel
16933computers, cluster parallel computers, and hybrid SMP cluster parallel
16934computers.")
16935 (license license:gpl3+)))
16936
16937(define-public java-jetbrains-annotations
16938 (package
16939 (name "java-jetbrains-annotations")
16940 (version "19.0.0")
16941 (source (origin
16942 (method git-fetch)
16943 (uri (git-reference
16944 (url "https://github.com/JetBrains/java-annotations")
16945 (commit version)))
16946 (file-name (git-file-name name version))
16947 (sha256
16948 (base32
16949 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
16950 (build-system ant-build-system)
16951 (arguments
16952 `(#:jar-name "jetbrains-annotations.jar"
16953 #:source-dir "common/src/main/java:java8/src/main/java"
16954 #:tests? #f)); no tests
16955 (home-page "https://github.com/JetBrains/java-annotations")
16956 (synopsis "Annotations for Java and other JVM languages")
16957 (description "This package contains a set of Java annotations which can be
16958used in JVM-based languages. They serve as an additional documentation and
16959can be interpreted by IDEs and static analysis tools to improve code analysis.")
16960 (license license:expat)))
16961
16962(define-public java-javaparser
16963 (package
16964 (name "java-javaparser")
16965 (version "3.16.1")
16966 (source (origin
16967 (method git-fetch)
16968 (uri (git-reference
16969 (url "https://github.com/javaparser/javaparser")
16970 (commit (string-append "javaparser-parent-" version))))
16971 (file-name (git-file-name name version))
16972 (sha256
16973 (base32
16974 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
16975 (modules '((guix build utils)))
16976 (snippet
16977 '(begin
16978 (for-each delete-file
16979 (find-files "." "\\.jar$"))
16980 #t))))
16981 (build-system ant-build-system)
16982 (arguments
16983 `(#:tests? #f; tests require jbehave and junit5
16984 #:phases
16985 (modify-phases %standard-phases
16986 (add-before 'build 'fill-template
16987 (lambda _
16988 (with-directory-excursion "javaparser-core/src/main"
16989 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
16990 "java/com/github/javaparser/JavaParserBuild.java")
16991 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
16992 (("\\$\\{project.version\\}") ,version)
16993 (("\\$\\{project.name\\}") "javaparser")
16994 (("\\$\\{project.build.finalName\\}") "javaparser")
16995 (("\\$\\{maven.version\\}") "fake")
16996 (("\\$\\{maven.build.version\\}") "fake")
16997 (("\\$\\{build.timestamp\\}") "0")
16998 (("\\$\\{java.vendor\\}") "Guix")
16999 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
17000 (("\\$\\{java.version\\}") "1.8")
17001 (("\\$\\{os.arch\\}") "any")
17002 (("\\$\\{os.name\\}") "Guix")
17003 (("\\$\\{os.version\\}") "not available")))
17004 #t))
17005 (add-before 'build 'generate-javacc
17006 (lambda _
17007 (with-directory-excursion "javaparser-core/src/main/java"
17008 (invoke "java" "javacc" "../javacc/java.jj"))
17009 #t))
17010 (add-before 'build 'copy-javacc-support
17011 (lambda _
17012 (with-directory-excursion "javaparser-core/src/main"
17013 (copy-recursively "javacc-support" "java"))
17014 #t))
17015 (replace 'build
17016 (lambda _
17017 (define (build name)
17018 (format #t "Building ~a~%" name)
17019 (delete-file-recursively "build/classes")
17020 (mkdir-p "build/classes")
17021 (apply invoke "javac"
17022 "-cp" (string-append (getenv "CLASSPATH") ":"
17023 (string-join (find-files "build/jar" ".")
17024 ":"))
17025 "-d" "build/classes"
17026 (find-files (string-append name "/src/main/java")
17027 ".*.java"))
17028 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
17029 "-C" "build/classes" "."))
17030 (mkdir-p "build/classes")
17031 (mkdir-p "build/test-classes")
17032 (mkdir-p "build/jar")
17033 (build "javaparser-core")
17034 (build "javaparser-core-serialization")
17035 (build "javaparser-core-generators")
17036 (build "javaparser-core-metamodel-generator")
17037 (build "javaparser-symbol-solver-core")
17038 #t))
17039 (replace 'install
17040 (install-jars "build/jar")))))
17041 (inputs
17042 (list java-guava java-jboss-javassist java-jsonp-api))
17043 (native-inputs
17044 (list javacc))
17045 (home-page "https://javaparser.org/")
17046 (synopsis "Parser for Java")
17047 (description
17048 "This project contains a set of libraries implementing a Java 1.0 - Java
1704911 Parser with advanced analysis functionalities.")
17050 (license (list
17051 ;; either lgpl or asl
17052 license:lgpl3+
17053 license:asl2.0))))
17054
17055(define-public tla2tools
17056 ;; This package was originally based on the "v1.8.0" tag, but that merely
17057 ;; points to the moving master branch. That might be because the ‘latest
17058 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
17059 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
17060 (let* ((release "1.7.1")
17061 (revision "0")
17062 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
17063 (package
17064 (name "tla2tools")
17065 (version (git-version release revision commit))
17066 (source (origin
17067 (method git-fetch)
17068 (uri (git-reference
17069 (url "https://github.com/tlaplus/tlaplus")
17070 (commit commit)))
17071 (file-name (git-file-name name version))
17072 (sha256
17073 (base32
17074 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
17075 (patches
17076 (search-patches "tla2tools-build-xml.patch"))
17077 (modules '((guix build utils)))
17078 (snippet
17079 '(begin
17080 ;; Remove packaged libraries (see 'replace-libs below)
17081 (for-each delete-file (find-files "." ".*.jar$"))))))
17082 (build-system ant-build-system)
17083 (arguments
17084 (let* ((tlatools "tlatools/org.lamport.tlatools/")
17085 (build-xml (string-append tlatools "customBuild.xml")))
17086 `(#:jdk ,openjdk11
17087 #:modules ((guix build ant-build-system)
17088 (guix build utils)
17089 (ice-9 match)
17090 (srfi srfi-26))
17091 #:make-flags '("-f" ,build-xml)
17092 #:phases
17093 (modify-phases %standard-phases
17094 ;; Replace packed libs with references to jars in store
17095 (add-after 'unpack 'replace-libs
17096 (lambda* (#:key inputs #:allow-other-keys)
17097 (define (input-jar input)
17098 (car (find-files (assoc-ref inputs input) "\\.jar$")))
17099 (for-each
17100 (match-lambda
17101 ((file . input)
17102 (symlink (input-jar input)
17103 (string-append ,tlatools "/lib/" file))))
17104 '(("gson/gson-2.8.6.jar" . "java-gson")
17105 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
17106 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
17107 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
17108 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
17109 "java-eclipse-lsp4j-debug")
17110 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
17111 "java-eclipse-lsp4j-jsonrpc")
17112 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
17113 "java-eclipse-lsp4j-jsonrpc-debug")
17114 ("junit-4.12.jar" . "java-junit")
17115 ("easymock-3.3.1.jar" . "java-easymock")))
17116 ;; Retain a tiny subset of the original X-Git-*
17117 ;; manifest values just to aid in debugging.
17118 (substitute* ,build-xml
17119 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
17120 (add-before 'check 'prepare-tests
17121 (lambda _
17122 ;; The pcal tests write to .cfg files.
17123 (for-each (cut chmod <> #o644)
17124 (find-files (string-append ,tlatools
17125 "/test-model/pcal")
17126 "\\.cfg$"))))
17127 (replace 'install
17128 (lambda* (#:key inputs outputs #:allow-other-keys)
17129 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
17130 (jar-name "tla2tools.jar"); set in project.properties
17131 (jar (string-append ,tlatools
17132 "/dist/" jar-name))
17133 (java-cp (string-append share "/" jar-name))
17134 (bin (string-append (assoc-ref outputs "out") "/bin"))
17135 (java (search-input-file inputs "/bin/java")))
17136 (install-file jar share)
17137 (mkdir-p bin)
17138 ;; Generate wrapper scripts for bin/, which invoke common
17139 ;; commands within tla2tools.jar. Users can still invoke
17140 ;; tla2tools.jar for the rest.
17141 (for-each
17142 (match-lambda
17143 ((wrapper . class)
17144 (let ((file (string-append bin "/" wrapper)))
17145 (begin
17146 (with-output-to-file file
17147 (lambda _
17148 (display
17149 (string-append
17150 "#!/bin/sh\n"
17151 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
17152 (chmod file #o755)))))
17153 ;; bin/wrapper . java-class
17154 '(("pcal" . "pcal.trans")
17155 ("tlatex" . "tla2tex.TLA")
17156 ("tla2sany" . "tla2sany.SANY")
17157 ("tlc2" . "tlc2.TLC")
17158 ("tlc2-repl" . "tlc2.REPL"))))))))))
17159 (native-inputs
17160 (list java-junit java-easymock))
17161 (inputs
17162 (list java-javax-mail
17163 java-gson-latest
17164 java-jline-terminal
17165 java-jline-reader
17166 java-eclipse-lsp4j-jsonrpc
17167 java-eclipse-lsp4j-jsonrpc-debug
17168 java-eclipse-lsp4j-debug))
17169 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
17170 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
17171 (description "TLA+ is a high-level language for modeling programs and
17172systems---especially concurrent and distributed ones. It's based on the idea
17173that the best way to describe things precisely is with simple
17174mathematics. TLA+ and its tools are useful for eliminating fundamental design
17175errors, which are hard to find and expensive to correct in code.
17176
17177The following TLA+ tools are available in this distribution:
17178
17179@itemize
17180@item The Syntactic Analyzer: A parser and syntax checker for
17181 TLA+ specifications;
17182@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
17183 specifications;
17184@item TLATeX: A program for typesetting TLA+ specifications;
17185@item Beta test versions of 1-3 for the TLA+2 language; and
17186@item The PlusCal translator.
17187@end itemize")
17188 (license license:expat))))
17189
17190;; Deprecated at 2026-06-01
17191(define-deprecated/public-alias abcl
17192 (@ (gnu packages lisp) abcl))
17193
17194;;;
17195;;; Avoid adding new packages to the end of this file. To reduce the chances
17196;;; of a merge conflict, place them above by existing packages with similar
17197;;; functionality or similar names.
17198;;;