projects/guix·blob librewolf-updates · refs

14849 lines · 618.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 ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix download)
48 #:use-module (guix hg-download)
49 #:use-module (guix git-download)
50 #:use-module (guix svn-download)
51 #:use-module ((guix build utils) #:select (alist-replace))
52 #:use-module (guix utils)
53 #:use-module (guix gexp)
54 #:use-module (guix build-system ant)
55 #:use-module (guix build-system cmake)
56 #:use-module (guix build-system gnu)
57 #:use-module (guix build-system maven)
58 #:use-module (guix build-system pyproject)
59 #:use-module (gnu packages)
60 #:use-module (gnu packages attr)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages base)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages nss)
65 #:use-module (gnu packages check)
66 #:use-module (gnu packages cpio)
67 #:use-module (gnu packages cups)
68 #:use-module (gnu packages compression)
69 #:use-module (gnu packages elf)
70 #:use-module (gnu packages fontutils)
71 #:use-module (gnu packages freedesktop) ; wayland
72 #:use-module (gnu packages gawk)
73 #:use-module (gnu packages gcc)
74 #:use-module (gnu packages gettext)
75 #:use-module (gnu packages gl)
76 #:use-module (gnu packages ghostscript) ;lcms
77 #:use-module (gnu packages gnome)
78 #:use-module (gnu packages groovy)
79 #:use-module (gnu packages gtk)
80 #:use-module (gnu packages guile)
81 #:use-module (gnu packages icu4c)
82 #:use-module (gnu packages image)
83 #:use-module (gnu packages java-bootstrap)
84 #:use-module (gnu packages java-compression)
85 #:use-module (gnu packages java-xml)
86 #:use-module (gnu packages libffi)
87 #:use-module (gnu packages linux) ;alsa
88 #:use-module (gnu packages maths)
89 #:use-module (gnu packages maven)
90 #:use-module (gnu packages maven-parent-pom)
91 #:use-module (gnu packages ncurses)
92 #:use-module (gnu packages nss)
93 #:use-module (gnu packages onc-rpc)
94 #:use-module (gnu packages web)
95 #:use-module (gnu packages wget)
96 #:use-module (gnu packages pkg-config)
97 #:use-module (gnu packages perl)
98 #:use-module (gnu packages popt)
99 #:use-module (gnu packages python-build)
100 #:use-module (gnu packages kerberos)
101 #:use-module (gnu packages security-token)
102 #:use-module (gnu packages xml)
103 #:use-module (gnu packages xdisorg)
104 #:use-module (gnu packages xorg)
105 #:use-module (gnu packages texinfo)
106 #:use-module ((srfi srfi-1) #:select (first fold alist-delete))
107 #:use-module (srfi srfi-11)
108 #:use-module (ice-9 match))
109
110(define* (system->icedtea-arch #:optional (system (or (%current-target-system)
111 (%current-system))))
112 "Return the Icedtea architecture string, such as \"ppc64le\", of SYSTEM."
113 ;; See INSTALL_ARCH_DIR in the configure script of icedtea.
114 (match system
115 ("i686-linux" "i386")
116 ("x86_64-linux" "amd64")
117 ("armhf-linux" "arm")
118 ("powerpc-linux" "ppc")
119 ("powerpc64le-linux" "ppc64le")
120 (system
121 ;; Turn e.g. "aarch64-linux" into "aarch64".
122 (first (string-split system #\-)))))
123
124(define-public icedtea-7
125 (let* ((version "2.6.13")
126 (drop (lambda* (name hash #:optional (patches '()))
127 (origin
128 (method url-fetch)
129 (uri (string-append
130 "http://icedtea.classpath.org/download/drops"
131 "/icedtea7/" version "/" name ".tar.bz2"))
132 (sha256 (base32 hash))
133 (patches patches)))))
134 (package
135 (name "icedtea")
136 (version version)
137 (source (origin
138 (method url-fetch)
139 (uri (string-append
140 "http://icedtea.wildebeest.org/download/source/icedtea-"
141 version ".tar.xz"))
142 (sha256
143 (base32
144 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
145 (modules '((guix build utils)))
146 (snippet
147 '(substitute* "Makefile.in"
148 ;; do not leak information about the build host
149 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
150 "DISTRIBUTION_ID=\"\\\"guix\\\"\"")))))
151 (build-system gnu-build-system)
152 (outputs '("out" ; Java Runtime Environment
153 "jdk" ; Java Development Kit
154 "doc")) ; all documentation
155 (arguments
156 (list
157 ;; There are many test failures. Some are known to fail upstream,
158 ;; others relate to not having an X server running at test time, yet
159 ;; others are a complete mystery to me.
160
161 ;; hotspot: passed: 241; failed: 45; error: 2
162 ;; langtools: passed: 1,934; failed: 26
163 ;; jdk: unknown
164 #:tests? #f
165 ;; The validate-runpath phase fails on internal libraries depending on
166 ;; libraries found under e.g. 'lib/amd64' on x86_64, and the build
167 ;; system blissfully ignores LDFLAGS; disable it.
168 #:validate-runpath? #f
169 #:modules '((guix build utils)
170 (guix build gnu-build-system)
171 (ice-9 match)
172 (ice-9 popen)
173 (srfi srfi-19)
174 (srfi srfi-26))
175 #:configure-flags
176 ;; TODO: package sctp and add to inputs
177 #~(list "--disable-system-sctp"
178 "--enable-system-pcsc"
179 "--enable-system-lcms"
180 "--enable-bootstrap"
181 "--enable-nss"
182 "--without-rhino"
183 (string-append "--with-parallel-jobs="
184 (number->string (parallel-job-count)))
185 "--disable-downloading"
186 "--disable-tests" ;they are run in the check phase instead
187 "--with-openjdk-src-dir=./openjdk.src"
188 (string-append
189 "--with-ecj=" (search-input-file %build-inputs "bin/javac"))
190 (string-append "--with-jdk-home="
191 #$(this-package-native-input "classpath"))
192 (string-append "--with-java="
193 (search-input-file %build-inputs "bin/jamvm"))
194 (string-append "--with-jar="
195 (search-input-file %build-inputs "/bin/gjar")))
196 #:phases
197 #~(modify-phases %standard-phases
198 (replace 'unpack
199 (lambda* (#:key source inputs #:allow-other-keys)
200 (let ((target (string-append "icedtea-"
201 #$(package-version this-package)))
202 (unpack (lambda* (name #:optional dir)
203 (let ((dir (or dir
204 (string-drop-right name 5))))
205 (mkdir dir)
206 (invoke "tar" "xvf"
207 (assoc-ref inputs name)
208 "-C" dir
209 "--strip-components=1")))))
210 (mkdir target)
211 (invoke "tar" "xvf" source
212 "-C" target "--strip-components=1")
213 (chdir target)
214 (unpack "openjdk-src" "openjdk.src")
215 (with-directory-excursion "openjdk.src"
216 (for-each unpack
217 (filter (cut string-suffix? "-drop" <>)
218 (map (match-lambda
219 ((name . _) name))
220 inputs)))))))
221 (add-after 'unpack 'use-classpath
222 (lambda* (#:key inputs #:allow-other-keys)
223 (let ((tools (search-input-file inputs
224 "share/classpath/tools.zip"))
225 (rt.jar (search-input-file inputs "lib/rt.jar")))
226 ;; GNU Classpath does not provide rt.jar, but jamvm provides
227 ;; Classpath's glibj.zip as rt.jar, so we just use that.
228 (substitute* "Makefile.in"
229 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
230 ;; Make sure we can find all classes.
231 (setenv "CLASSPATH"
232 (string-append rt.jar ":" tools))
233 (setenv "JAVACFLAGS"
234 (string-append "-cp " rt.jar ":" tools)))))
235 (add-after 'unpack 'patch-bitrot
236 (lambda _
237 (substitute*
238 '("patches/boot/revert-6973616.patch"
239 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
240 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
241 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
242 ;; As of attr 2.4.48 this header is no longer
243 ;; included. It is provided by the libc instead.
244 (substitute* '("configure"
245 "openjdk.src/jdk/src/solaris/native/sun/\
246nio/fs/LinuxNativeDispatcher.c")
247 (("attr/xattr.h") "sys/xattr.h"))))
248 (add-after 'unpack 'fix-openjdk
249 (lambda _
250 (with-directory-excursion "openjdk.src"
251 (substitute* "jdk/make/common/Defs-linux.gmk"
252 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
253 (string-append all
254 " -fcommon"
255 " -Wno-error=implicit-function-declaration"
256 " -Wno-error=implicit-int"
257 " -Wno-error=incompatible-pointer-types"
258 " -Wno-error=int-conversion")))
259 (substitute*
260 '("jdk/src/solaris/native/java/net/PlainSocketImpl.c"
261 "jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
262 (("#include <sys/sysctl.h>")
263 "#include <linux/sysctl.h>"))
264
265 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
266 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
267 ;; It is only used as a verification step, so ignore it; try
268 ;; removing this substitution for newer versions of glibc.
269 (substitute* "jdk/make/common/shared/Defs-linux.gmk"
270 (("\\$\\(LDD\\) \\$1 &&")
271 ""))
272
273 ;; It looks like the "h = 31 * h + c" line of the jsum()
274 ;; function gets miscompiled. After a few iterations of the
275 ;; loop the result of "31 * h" is always 0x8000000000000000.
276 ;; Disable optimizations of dump.cpp as a workaround.
277 (substitute* "hotspot/make/linux/makefiles/gcc.make"
278 (("OPT_CFLAGS/NOOPT.*" all)
279 (string-append all "\n"
280 "OPT_CFLAGS/dump.o += -O0"))))))
281 (add-after 'unpack 'fix-x11-extension-include-path
282 (lambda* (#:key inputs #:allow-other-keys)
283 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
284 (((string-append "\\$\\(firstword \\$\\(wildcard "
285 "\\$\\(OPENWIN_HOME\\)"
286 "/include/X11/extensions\\).*$"))
287 (string-append #$(this-package-input "libxrender")
288 "/include/X11/extensions"
289 " -I" #$(this-package-input "libxtst")
290 "/include/X11/extensions"
291 " -I" #$(this-package-input "libxinerama")
292 "/include/X11/extensions"))
293 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
294 (add-after 'unpack 'patch-paths
295 (lambda* (#:key native-inputs inputs #:allow-other-keys)
296 ;; buildtree.make generates shell scripts, so we need to replace
297 ;; the generated shebang.
298 (with-directory-excursion "openjdk.src"
299 (substitute* "hotspot/make/linux/makefiles/buildtree.make"
300 (("/bin/sh") (which "bash")))
301
302 (let ((corebin (dirname (search-input-file
303 (or native-inputs inputs)
304 "bin/cp")))) ;coreutils
305 (substitute* '("jdk/make/common/shared/Defs-linux.gmk"
306 "corba/make/common/shared/Defs-linux.gmk")
307 (("UNIXCOMMAND_PATH = /bin")
308 (string-append "UNIXCOMMAND_PATH = " corebin))
309 (("USRBIN_PATH = /usr/bin")
310 (string-append "USRBIN_PATH = " corebin))
311 (("DEVTOOLS_PATH *= */usr/bin")
312 (string-append "DEVTOOLS_PATH = " corebin))
313 (("COMPILER_PATH *= */usr/bin")
314 (string-append "COMPILER_PATH = "
315 (dirname (search-input-file
316 (or native-inputs inputs)
317 "bin/gcc"))))
318 (("DEF_OBJCOPY *=.*objcopy")
319 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
320
321 ;; Fix path to alsa header.
322 (substitute* "jdk/make/common/shared/Sanity.gmk"
323 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
324 (string-append "ALSA_INCLUDE="
325 (search-input-file
326 inputs "include/alsa/version.h"))))
327
328 ;; Fix hard-coded utility paths.
329 (substitute* '("jdk/make/common/shared/Defs-utils.gmk"
330 "corba/make/common/shared/Defs-utils.gmk")
331 (("ECHO *=.*echo")
332 (string-append "ECHO = " (which "echo")))
333 (("^GREP *=.*grep")
334 (string-append "GREP = " (which "grep")))
335 (("EGREP *=.*egrep")
336 (string-append "EGREP = " (which "egrep")))
337 (("CPIO *=.*cpio")
338 (string-append "CPIO = " (which "cpio")))
339 (("READELF *=.*readelf")
340 (string-append "READELF = " (which "readelf")))
341 (("^ *AR *=.*ar")
342 (string-append "AR = " (which "ar")))
343 (("^ *TAR *=.*tar")
344 (string-append "TAR = " (which "tar")))
345 (("AS *=.*as")
346 (string-append "AS = " (which "as")))
347 (("LD *=.*ld")
348 (string-append "LD = " (which "ld")))
349 (("STRIP *=.*strip")
350 (string-append "STRIP = " (which "strip")))
351 (("NM *=.*nm")
352 (string-append "NM = " (which "nm")))
353 (("^SH *=.*sh")
354 (string-append "SH = " (which "bash")))
355 (("^FIND *=.*find")
356 (string-append "FIND = " (which "find")))
357 (("LDD *=.*ldd")
358 (string-append "LDD = " (which "ldd")))
359 (("NAWK *=.*(n|g)awk")
360 (string-append "NAWK = " (which "gawk")))
361 (("XARGS *=.*xargs")
362 (string-append "XARGS = " (which "xargs")))
363 (("UNZIP *=.*unzip")
364 (string-append "UNZIP = " (which "unzip")))
365 (("ZIPEXE *=.*zip")
366 (string-append "ZIPEXE = " (which "zip")))
367 (("SED *=.*sed")
368 (string-append "SED = " (which "sed"))))
369
370 ;; Some of these timestamps cause problems as they are more than
371 ;; 10 years ago, failing the build process.
372 (substitute* "jdk/src/share/classes/java/util/\
373CurrencyData.properties"
374 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
375 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
376 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
377 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY"))))))
378 (add-before 'configure 'set-additional-paths
379 (lambda* (#:key inputs #:allow-other-keys)
380 (setenv "CC" "gcc")
381 (setenv "CPATH"
382 (string-append #$(this-package-input "libxcomposite")
383 "/include/X11/extensions" ":"
384 #$(this-package-input "libxrender")
385 "/include/X11/extensions" ":"
386 #$(this-package-input "libxtst")
387 "/include/X11/extensions" ":"
388 #$(this-package-input "libxinerama")
389 "/include/X11/extensions" ":"
390 (or (getenv "CPATH") "")))
391 (setenv "ALT_OBJCOPY" (which "objcopy"))
392 (setenv "ALT_CUPS_HEADERS_PATH"
393 (string-append #$(this-package-input "cups")
394 "/include"))
395 (setenv "ALT_FREETYPE_HEADERS_PATH"
396 (string-append #$(this-package-input "freetype")
397 "/include"))
398 (setenv "ALT_FREETYPE_LIB_PATH"
399 (string-append #$(this-package-input "freetype")
400 "/lib"))))
401 (add-before 'build 'disable-os-version-check
402 ;; allow build on linux major version change
403 (lambda _
404 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
405 (add-before 'check 'fix-test-framework
406 (lambda _
407 ;; Fix PATH in test environment
408 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
409 (("PATH=/bin:/usr/bin")
410 (string-append "PATH=" (getenv "PATH"))))
411 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
412 (("/usr/bin/env") (which "env")))
413 (substitute* "openjdk.src/hotspot/test/test_env.sh"
414 (("/bin/rm") (which "rm"))
415 (("/bin/cp") (which "cp"))
416 (("/bin/mv") (which "mv")))))
417 (add-before 'check 'fix-hotspot-tests
418 (lambda _
419 (with-directory-excursion "openjdk.src/hotspot/test/"
420 (substitute* "jprt.config"
421 (("PATH=\"\\$\\{path4sdk\\}\"")
422 (string-append "PATH=" (getenv "PATH")))
423 (("make=/usr/bin/make")
424 (string-append "make=" (which "make"))))
425 (substitute* '("runtime/6626217/Test6626217.sh"
426 "runtime/7110720/Test7110720.sh")
427 (("/bin/rm") (which "rm"))
428 (("/bin/cp") (which "cp"))
429 (("/bin/mv") (which "mv"))))))
430 (add-before 'check 'fix-jdk-tests
431 (lambda _
432 (with-directory-excursion "openjdk.src/jdk/test/"
433 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
434 (("/bin/pwd") (which "pwd")))
435 (substitute* "com/sun/jdi/ShellScaffold.sh"
436 (("/bin/kill") (which "kill")))
437 (substitute* "start-Xvfb.sh"
438 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
439 (("/usr/bin/nohup") (which "nohup")))
440 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
441 (("/bin/rm") (which "rm")))
442 (substitute* "tools/launcher/MultipleJRE.sh"
443 (("echo \"#!/bin/sh\"")
444 (string-append "echo \"#!" (which "rm") "\""))
445 (("/usr/bin/zip") (which "zip")))
446 (substitute* "com/sun/jdi/OnThrowTest.java"
447 (("#!/bin/sh") (string-append "#!" (which "sh"))))
448 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
449 (("/usr/bin/uptime") (which "uptime")))
450 (substitute* "java/lang/ProcessBuilder/Basic.java"
451 (("/usr/bin/env") (which "env"))
452 (("/bin/false") (which "false"))
453 (("/bin/true") (which "true"))
454 (("/bin/cp") (which "cp"))
455 (("/bin/sh") (which "sh")))
456 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
457 (("/bin/sh") (which "sh")))
458 (substitute* "java/lang/ProcessBuilder/Zombies.java"
459 (("/usr/bin/perl") (which "perl"))
460 (("/bin/ps") (which "ps"))
461 (("/bin/true") (which "true")))
462 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
463 (("/usr/bin/tee") (which "tee")))
464 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
465 (("/bin/true") (which "true")))
466 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
467 (("/bin/cat") (which "cat")))
468 (substitute* "java/lang/Runtime/exec/ExitValue.java"
469 (("/bin/sh") (which "sh"))
470 (("/bin/true") (which "true"))
471 (("/bin/kill") (which "kill")))
472 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
473 (("/usr/bin/echo") (which "echo")))
474 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
475 (("/usr/bin/cat") (which "cat")))
476 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
477 (("/bin/cat") (which "cat"))
478 (("/bin/sleep") (which "sleep"))
479 (("/bin/sh") (which "sh")))
480 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
481 (("/bin/cat") (which "cat")))
482 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
483 (("/bin/chmod") (which "chmod")))
484 (substitute* "java/util/zip/ZipFile/Assortment.java"
485 (("/bin/sh") (which "sh"))))))
486 (replace 'check
487 (lambda* (#:key tests? #:allow-other-keys)
488 ;; The "make check-*" targets always return zero, so we need to
489 ;; check for errors in the associated log files to determine
490 ;; whether any tests have failed.
491 (when tests?
492 (use-modules (ice-9 rdelim))
493 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
494 (checker (lambda (port)
495 (let loop ()
496 (let ((line (read-line port)))
497 (cond
498 ((eof-object? line) #t)
499 ((regexp-exec error-pattern line)
500 (error "test failed"))
501 (else (loop)))))))
502 (run-test (lambda (test)
503 (invoke "make" test)
504 (call-with-input-file
505 (string-append "test/" test ".log")
506 checker))))
507 (run-test "check-hotspot")
508 (run-test "check-langtools")
509 (run-test "check-jdk")))))
510 (replace 'install
511 (lambda _
512 (copy-recursively "openjdk.build/docs"
513 (string-append #$output:doc
514 "/share/doc/icedtea"))
515 (copy-recursively "openjdk.build/j2re-image" #$output)
516 (copy-recursively "openjdk.build/j2sdk-image" #$output:jdk)))
517 (add-after 'install 'install-libjvm
518 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
519 ;; But that shared object is located in the server/ folder, so it
520 ;; cannot be found. This phase creates a symbolic link in the
521 ;; lib/amd64 folder so that the other libraries can find it.
522 ;;
523 ;; See:
524 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
525 ;;
526 ;; FIXME: Find the bug in the build system, so that this symlink is
527 ;; not needed.
528 (lambda _
529 (let ((lib-path (string-append #$output "/lib/"
530 #$(system->icedtea-arch))))
531 (symlink (string-append lib-path "/server/libjvm.so")
532 (string-append lib-path "/libjvm.so")))))
533 ;; By default IcedTea only generates an empty keystore. In order to
534 ;; be able to use certificates in Java programs we need to generate a
535 ;; keystore from a set of certificates. For convenience we use the
536 ;; certificates from the nss-certs package.
537 (add-after 'install 'install-keystore
538 (lambda* (#:key inputs #:allow-other-keys)
539 (use-modules (ice-9 rdelim))
540 (let* ((keystore "cacerts")
541 (certs-dir (search-input-directory inputs
542 "etc/ssl/certs"))
543 (keytool (string-append #$output:jdk "/bin/keytool")))
544 (define (extract-cert file target)
545 (call-with-input-file file
546 (lambda (in)
547 (call-with-output-file target
548 (lambda (out)
549 (let loop ((line (read-line in 'concat))
550 (copying? #f))
551 (cond
552 ((eof-object? line) #t)
553 ((string-prefix? "-----BEGIN" line)
554 (display line out)
555 (loop (read-line in 'concat) #t))
556 ((string-prefix? "-----END" line)
557 (display line out)
558 #t)
559 (else
560 (when copying? (display line out))
561 (loop (read-line in 'concat) copying?)))))))))
562 (define (import-cert cert)
563 (format #t "Importing certificate ~a\n" (basename cert))
564 (let ((temp "tmpcert"))
565 (extract-cert cert temp)
566 (let ((port (open-pipe* OPEN_WRITE keytool
567 "-import"
568 "-alias" (basename cert)
569 "-keystore" keystore
570 "-storepass" "changeit"
571 "-file" temp)))
572 (display "yes\n" port)
573 (when (not (zero? (status:exit-val (close-pipe port))))
574 (format #t "failed to import ~a\n" cert)))
575 (delete-file temp)))
576
577 ;; This is necessary because the certificate directory contains
578 ;; files with non-ASCII characters in their names.
579 (setlocale LC_ALL "C.UTF-8")
580 (setenv "LC_ALL" "C.UTF-8")
581
582 (for-each import-cert (find-files certs-dir "\\.pem$"))
583 (mkdir-p (string-append #$output "/lib/security"))
584 (mkdir-p (string-append #$output:jdk "/jre/lib/security"))
585
586 ;; The cacerts files we are going to overwrite are chmod'ed as
587 ;; read-only (444) in icedtea-8 (which derives from this
588 ;; package). We have to change this so we can overwrite them.
589 (chmod (string-append #$output "/lib/security/" keystore)
590 #o644)
591 (chmod (string-append #$output:jdk
592 "/jre/lib/security/" keystore) #o644)
593
594 (install-file keystore
595 (string-append #$output "/lib/security"))
596 (install-file keystore
597 (string-append #$output:jdk
598 "/jre/lib/security"))))))))
599 (native-inputs
600 ;; XXX: Compiling with gcc-14 will encounter the following error:
601 ;; BUILD FAILED:
602 ;; /tmp/guix-build-icedtea-2.6.13.drv-0/icedtea-2.6.13/openjdk/langtools/
603 ;; make/build.xml:452: The following error occurred while executing this
604 ;; line:
605 ;; java.lang.AbstractMethodError: java.lang.Throwable.toString()Ljava/lang/String;
606 `(("gcc" ,gcc-13)
607 ("openjdk-src"
608 ,(drop "openjdk"
609 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
610 ("corba-drop"
611 ,(drop "corba"
612 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
613 ("jaxp-drop"
614 ,(drop "jaxp"
615 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
616 ("jaxws-drop"
617 ,(drop "jaxws"
618 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
619 ("jdk-drop"
620 ,(drop "jdk"
621 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
622 (search-patches "jdk-currency-time-bomb.patch")))
623 ("langtools-drop"
624 ,(drop "langtools"
625 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
626 ("hotspot-drop"
627 ,(origin
628 (method url-fetch)
629 (uri (string-append
630 "http://icedtea.classpath.org/downloads/drops"
631 "/icedtea7/" version "/hotspot.tar.bz2"))
632 (sha256
633 (base32
634 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
635 (patches (search-patches
636 "icedtea-7-hotspot-aarch64-use-c++98.patch"
637 "icedtea-7-hotspot-pointer-comparison.patch"))))
638 ("ant" ,ant-bootstrap)
639 ("attr" ,attr)
640 ("classpath" ,classpath-devel)
641 ("coreutils" ,coreutils)
642 ("diffutils" ,diffutils) ;for tests
643 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
644 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
645 ("gawk" ,gawk)
646 ("grep" ,grep)
647 ("jamvm" ,jamvm-with-ecj4)
648 ("libtool" ,libtool)
649 ("pkg-config" ,pkg-config)
650 ("wget" ,wget)
651 ("which" ,which)
652 ("cpio" ,cpio)
653 ("zip" ,zip)
654 ("unzip" ,unzip)
655 ("libxslt" ,libxslt) ;for xsltproc
656 ("nss-certs" ,nss-certs)
657 ("perl" ,perl)
658 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
659 (inputs
660 (list alsa-lib
661 cups
662 fontconfig
663 freetype
664 giflib
665 gtk+-2
666 lcms
667 libjpeg-turbo
668 libpng
669 libx11
670 libxcomposite
671 libxi
672 libxinerama
673 libxrender
674 libxt
675 libxtst
676 mit-krb5
677 nss
678 pcsc-lite
679 zlib))
680 (home-page "https://icedtea.classpath.org")
681 (synopsis "Java development kit")
682 (description
683 "This package provides the Java development kit OpenJDK built with the
684IcedTea build harness.")
685
686 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
687 (supported-systems (delete "mips64el-linux" %supported-systems))
688
689 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
690 ;; same license as both GNU Classpath and OpenJDK.
691 (license license:gpl2+))))
692
693(define-public icedtea-8
694 (let* ((version "3.19.0")
695 (drop (lambda* (name hash #:optional (patches '()))
696 (origin
697 (method url-fetch)
698 (uri (string-append
699 "http://icedtea.classpath.org/download/drops"
700 "/icedtea8/" version "/" name ".tar.xz"))
701 (sha256 (base32 hash))
702 (patches patches)))))
703 (package
704 (inherit icedtea-7)
705 (version "3.19.0")
706 (source (origin
707 (method url-fetch)
708 (uri (string-append
709 "http://icedtea.wildebeest.org/download/source/icedtea-"
710 version ".tar.xz"))
711 (sha256
712 (base32
713 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
714 (modules '((guix build utils)))
715 (snippet
716 '(substitute* '("configure"
717 "acinclude.m4")
718 ;; Do not embed build time
719 (("(DIST_ID=\"Custom build).*$" _ prefix)
720 (string-append prefix "\"\n"))
721 ;; Do not leak information about the build host
722 (("DIST_NAME=\"\\$build_os\"")
723 "DIST_NAME=\"guix\"")))))
724 (arguments
725 (substitute-keyword-arguments (package-arguments icedtea-7)
726 ((#:imported-modules modules %default-gnu-imported-modules)
727 (cons '(guix build ant-build-system) modules))
728 ((#:disallowed-references refs '())
729 (cons (gexp-input
730 (this-package-native-input "jdk")
731 "jdk")
732 refs))
733 ((#:modules modules %default-gnu-modules)
734 (append '(((guix build ant-build-system) #:prefix ant:)
735 (ice-9 match)
736 (ice-9 popen)
737 (srfi srfi-1)
738 (srfi srfi-19)
739 (srfi srfi-26))
740 modules))
741 ((#:configure-flags _ '())
742 #~(let ((jdk (assoc-ref %build-inputs "jdk")))
743 (list (string-append "CFLAGS=-fcommon"
744 " -Wno-error=implicit-function-declaration"
745 " -Wno-error=implicit-int"
746 " -Wno-error=incompatible-pointer-types"
747 " -Wno-error=int-conversion")
748 "CXXFLAGS=-fcommon"
749 "--enable-bootstrap"
750 "--enable-nss"
751 (string-append "--with-parallel-jobs="
752 (number->string (parallel-job-count)))
753 ;; Java Flight Recorder isn't supported on some architectures.
754 #$@(if (target-ppc32?)
755 #~("--enable-jfr=no")
756 #~())
757 "--disable-docs" ; This phase can take hours on slow machines.
758 "--disable-downloading"
759 "--disable-system-pcsc"
760 "--disable-system-sctp"
761 "--disable-tests" ;they are run in the check phase instead
762 "--with-openjdk-src-dir=./openjdk.src"
763 (string-append "--with-jdk-home=" jdk))))
764 ((#:phases phases '%standard-phases)
765 #~(modify-phases #$phases
766 (delete 'fix-x11-extension-include-path)
767 (delete 'patch-paths)
768 (delete 'set-additional-paths)
769 (delete 'patch-patches)
770 (delete 'patch-bitrot)
771 (delete 'use-classpath)
772 (replace 'build
773 (lambda* (#:key (make-flags '()) #:allow-other-keys)
774 ;; Prevent passing -j (parallel-job-count) to make, which
775 ;; is rejected by the build Makefiles; this does *not*
776 ;; disable parallel builds.
777 (apply invoke "make" make-flags)))
778 ;; Prevent the keytool from recording the current time when
779 ;; adding certificates at build time.
780 (add-after 'unpack 'patch-keystore
781 (lambda _
782 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
783 (("date = new Date\\(\\);")
784 "\
785date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
786new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
787new Date();"))))
788 (add-after 'unpack 'patch-jni-libs
789 ;; Hardcode dynamically loaded libraries.
790 (lambda _
791 (define (icedtea-or-openjdk? path)
792 (or (string-contains path "openjdk")
793 (string-contains path "icedtea")))
794
795 (let* ((library-path (remove icedtea-or-openjdk?
796 (search-path-as-string->list
797 (getenv "LIBRARY_PATH"))))
798 (find-library (lambda (name)
799 (or (search-path
800 library-path
801 (string-append "lib" name ".so"))
802 (string-append "lib" name ".so")))))
803 (for-each
804 (lambda (file)
805 (catch 'decoding-error
806 (lambda ()
807 (substitute* file
808 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
809 _ name version)
810 (string-append "\"" (find-library name) "\""))
811 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
812 (string-append "\"" (find-library name) "\""))))
813 (lambda _
814 ;; Those are safe to skip.
815 (format (current-error-port)
816 "warning: failed to substitute: ~a~%"
817 file))))
818 (find-files "openjdk.src/jdk/src/solaris/native"
819 "\\.c|\\.h")))))
820 (replace 'fix-openjdk
821 (lambda _
822 (substitute*
823 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
824 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
825 (("#include <sys/sysctl.h>")
826 "#include <linux/sysctl.h>"))))
827 (replace 'install
828 (lambda _
829 (copy-recursively "openjdk.build/docs"
830 (string-append #$output:doc
831 "/share/doc/icedtea"))
832 (copy-recursively "openjdk.build/images/j2re-image" #$output)
833 (copy-recursively "openjdk.build/images/j2sdk-image" #$output:jdk)
834 ;; Install the nss.cfg file to JRE to enable SSL/TLS
835 ;; support via NSS.
836 (copy-file (string-append #$output:jdk
837 "/jre/lib/security/nss.cfg")
838 (string-append #$output "/lib/security/nss.cfg"))))
839 (add-after 'install 'strip-jar-timestamps
840 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))))
841 (native-inputs
842 `(("jdk" ,icedtea-7 "jdk")
843 ("openjdk-src"
844 ,(drop "openjdk"
845 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
846 ("aarch32-drop"
847 ,(drop "aarch32"
848 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
849 ("corba-drop"
850 ,(drop "corba"
851 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
852 ("jaxp-drop"
853 ,(drop "jaxp"
854 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
855 ("jaxws-drop"
856 ,(drop "jaxws"
857 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
858 ("jdk-drop"
859 ,(drop "jdk"
860 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
861 (search-patches "jdk-currency-time-bomb2.patch")))
862 ("langtools-drop"
863 ,(drop "langtools"
864 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
865 ("hotspot-drop"
866 ,(drop "hotspot"
867 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
868 ("nashorn-drop"
869 ,(drop "nashorn"
870 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
871 ("shenandoah-drop"
872 ,(drop "shenandoah"
873 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
874 ,@(fold alist-delete (package-native-inputs icedtea-7)
875 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
876 "jdk-drop" "langtools-drop" "hotspot-drop"
877 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
878
879(define-public icedtea icedtea-8)
880
881(define-public openjdk9
882 (package
883 (name "openjdk")
884 (version "9.181")
885 (source (origin
886 (method hg-fetch)
887 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
888 (changeset "jdk-9+181")))
889 (file-name (hg-file-name name version))
890 (modules '((guix build utils)))
891 (snippet '(for-each delete-file
892 (find-files "." ".*.(bin|exe|jar)$")))
893 (sha256
894 (base32
895 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
896 (patches
897 (search-patches "openjdk-9-pointer-comparison.patch"
898 "openjdk-9-classlist-reproducibility.patch"
899 "openjdk-currency-time-bomb.patch"
900 "openjdk-9-jar-reproducibility.patch"
901 "openjdk-9-module-reproducibility.patch"
902 "openjdk-9-module2-reproducibility.patch"
903 "openjdk-9-module3-reproducibility.patch"
904 "openjdk-9-idlj-reproducibility.patch"
905 "openjdk-9-setsignalhandler.patch"))))
906 (build-system gnu-build-system)
907 (outputs '("out" "jdk" "doc"))
908 (arguments
909 (list
910 #:imported-modules
911 (cons '(guix build ant-build-system)
912 %default-gnu-imported-modules)
913 #:modules
914 (append '((ice-9 match)
915 (ice-9 popen)
916 (srfi srfi-1)
917 (srfi srfi-26))
918 %default-gnu-modules)
919 #:tests? #f ; require jtreg
920 #:make-flags #~(list "all")
921 #:disallowed-references
922 (list (this-package-native-input "icedtea")
923 (gexp-input (this-package-native-input "icedtea") "jdk"))
924
925 #:phases
926 #~(modify-phases %standard-phases
927 #$@(if (target-aarch64?)
928 #~((add-after 'unpack 'patch-for-aarch64
929 (lambda _
930 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
931 ;; This line is duplicated, so remove both occurrences,
932 ;; then add back one occurrence by substituting a
933 ;; comment that occurs once.
934 (("using MacroAssembler::call_VM_leaf_base;") "")
935 (("Interpreter specific version of call_VM_base")
936 "Interpreter specific version of call_VM_base
937 using MacroAssembler::call_VM_leaf_base;")))))
938 #~())
939 (add-after 'patch-source-shebangs 'fix-java-shebangs
940 (lambda _
941 ;; This file was "fixed" by patch-source-shebangs, but it requires
942 ;; this exact first line.
943 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
944 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
945 (replace 'configure
946 (lambda* (#:key inputs #:allow-other-keys)
947 ;; TODO: unbundle libpng and lcms
948 (invoke "bash" "./configure"
949 ;; Add flags for compilation with gcc >= 10
950 (string-append "--with-extra-cflags=-fcommon"
951 " -fno-delete-null-pointer-checks"
952 " -fno-lifetime-dse"
953 ;; flags for compilation with gcc >= 14.
954 " -Wno-error=int-conversion")
955 (string-append "--with-freetype="
956 (assoc-ref inputs "freetype"))
957 "--disable-freetype-bundling"
958 "--disable-warnings-as-errors"
959 "--disable-hotspot-gtest"
960 "--with-giflib=system"
961 "--with-libjpeg=system"
962 (string-append "--prefix=" #$output))))
963 (add-before 'build 'write-source-revision-file
964 (lambda _
965 (with-output-to-file ".src-rev"
966 (lambda _
967 (display #$(package-version this-package))))))
968 (replace 'build
969 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
970 (apply invoke "make"
971 (format #f "JOBS=~a" (if parallel-build?
972 (parallel-job-count)
973 1))
974 make-flags)))
975 (add-after 'unpack 'patch-jni-libs
976 ;; Hardcode dynamically loaded libraries.
977 (lambda _
978 (define (icedtea-or-openjdk? path)
979 (or (string-contains path "openjdk")
980 (string-contains path "icedtea")))
981
982 (let* ((library-path (remove icedtea-or-openjdk?
983 (search-path-as-string->list
984 (getenv "LIBRARY_PATH"))))
985 (find-library (lambda (name)
986 (or (search-path
987 library-path
988 (string-append "lib" name ".so"))
989 (string-append "lib" name ".so")))))
990 (for-each
991 (lambda (file)
992 (catch 'decoding-error
993 (lambda ()
994 (substitute* file
995 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
996 _ name version)
997 (string-append "\"" (find-library name) "\""))
998 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
999 (string-append "\"" (find-library name) "\""))))
1000 (lambda _
1001 ;; Those are safe to skip.
1002 (format (current-error-port)
1003 "warning: failed to substitute: ~a~%"
1004 file))))
1005 (find-files "."
1006 "\\.c$|\\.h$")))))
1007 ;; By default OpenJDK only generates an empty keystore. In order to
1008 ;; be able to use certificates in Java programs we need to generate a
1009 ;; keystore from a set of certificates. For convenience we use the
1010 ;; certificates from the nss-certs package.
1011 (add-after 'install 'install-keystore
1012 (lambda* (#:key inputs #:allow-other-keys)
1013 (use-modules (ice-9 rdelim))
1014 (let* ((keystore "cacerts")
1015 (certs-dir (search-input-directory inputs
1016 "etc/ssl/certs"))
1017 (keytool (string-append #$output:jdk "/bin/keytool")))
1018 (define (extract-cert file target)
1019 (call-with-input-file file
1020 (lambda (in)
1021 (call-with-output-file target
1022 (lambda (out)
1023 (let loop ((line (read-line in 'concat))
1024 (copying? #f))
1025 (cond
1026 ((eof-object? line) #t)
1027 ((string-prefix? "-----BEGIN" line)
1028 (display line out)
1029 (loop (read-line in 'concat) #t))
1030 ((string-prefix? "-----END" line)
1031 (display line out)
1032 #t)
1033 (else
1034 (when copying? (display line out))
1035 (loop (read-line in 'concat) copying?)))))))))
1036 (define (import-cert cert)
1037 (format #t "Importing certificate ~a\n" (basename cert))
1038 (let ((temp "tmpcert"))
1039 (extract-cert cert temp)
1040 (let ((port (open-pipe* OPEN_WRITE keytool
1041 "-import"
1042 "-alias" (basename cert)
1043 "-keystore" keystore
1044 "-storepass" "changeit"
1045 "-file" temp)))
1046 (display "yes\n" port)
1047 (when (not (zero? (status:exit-val (close-pipe port))))
1048 (format #t "failed to import ~a\n" cert)))
1049 (delete-file temp)))
1050
1051 ;; This is necessary because the certificate directory contains
1052 ;; files with non-ASCII characters in their names.
1053 (setlocale LC_ALL "C.UTF-8")
1054 (setenv "LC_ALL" "C.UTF-8")
1055
1056 (copy-file (string-append #$output
1057 "/lib/security/cacerts")
1058 keystore)
1059 (chmod keystore #o644)
1060 (for-each import-cert (find-files certs-dir "\\.pem$"))
1061 (mkdir-p (string-append #$output "/lib/security"))
1062 (mkdir-p (string-append #$output:jdk "/lib/security"))
1063
1064 ;; The cacerts files we are going to overwrite are chmod'ed as
1065 ;; read-only (444) in icedtea-8 (which derives from this
1066 ;; package). We have to change this so we can overwrite them.
1067 (chmod (string-append #$output
1068 "/lib/security/" keystore) #o644)
1069 (chmod (string-append #$output:jdk
1070 "/lib/security/" keystore) #o644)
1071
1072 (install-file keystore
1073 (string-append #$output
1074 "/lib/security"))
1075 (install-file keystore
1076 (string-append #$output:jdk
1077 "/lib/security")))))
1078 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1079 ;; But that shared object is located in the server/ folder, so it
1080 ;; cannot be found. This phase creates a symbolic link in the
1081 ;; lib/ folder so that the other libraries can find it.
1082 ;;
1083 ;; See:
1084 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1085 ;;
1086 ;; FIXME: Find the bug in the build system, so that this symlink is
1087 ;; not needed.
1088 (add-after 'install 'install-libjvm
1089 (lambda* (#:key inputs #:allow-other-keys)
1090 (let* ((lib-out (string-append #$output "/lib"))
1091 (lib-jdk (string-append #$output:jdk "/lib")))
1092 (symlink (string-append lib-jdk "/server/libjvm.so")
1093 (string-append lib-jdk "/libjvm.so"))
1094 (symlink (string-append lib-out "/server/libjvm.so")
1095 (string-append lib-out "/libjvm.so")))))
1096 (replace 'install
1097 (lambda* (#:key outputs #:allow-other-keys)
1098 (let ((images (car (find-files "build" ".*-server-release"
1099 #:directories? #t))))
1100 (copy-recursively (string-append images "/images/jdk")
1101 #$output:jdk)
1102 (copy-recursively (string-append images "/images/jre") #$output)
1103 (copy-recursively (string-append images "/images/docs")
1104 #$output:doc))))
1105 (add-after 'install 'remove-extraneous-files
1106 (lambda* (#:key outputs #:allow-other-keys)
1107 ;; Remove the *.diz and src.zip files for space considerations.
1108 ;; The former are compressed debuginfo files not typically
1109 ;; shipped with Java distributions, while the later corresponds
1110 ;; to Java core API source files.
1111 (for-each delete-file
1112 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1113 (map (match-lambda
1114 ((name . dir)
1115 dir))
1116 outputs)))))
1117 (add-after 'remove-extraneous-files 'strip-zip-timestamps
1118 (lambda* (#:key outputs #:allow-other-keys)
1119 (for-each
1120 (lambda (zip)
1121 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1122 (with-directory-excursion dir
1123 ;; This is an exact copy of the implementation of invoke,
1124 ;; but this accepts exit code 1 as OK.
1125 (let ((code (system* "unzip" "--" zip)))
1126 ;; jmod files are zip files with an extra header in
1127 ;; front. unzip will warn about that -- but otherwise
1128 ;; work.
1129 (when (> (status:exit-val code) 1) ; 1 is just a warning
1130 (raise
1131 (condition
1132 (&invoke-error
1133 (program "unzip")
1134 (arguments (list "--" zip))
1135 (exit-status (status:exit-val code))
1136 (term-signal (status:term-sig code))
1137 (stop-signal (status:stop-sig code))))))))
1138 (delete-file zip)
1139 (for-each (lambda (file)
1140 (let ((s (lstat file)))
1141 (format #t "reset ~a~%" file)
1142 (utime file 1 1 0 0
1143 AT_SYMLINK_NOFOLLOW)))
1144 (find-files dir #:directories? #t))
1145 (with-directory-excursion dir
1146 (let ((files (cons "./META-INF/MANIFEST.MF"
1147 (append
1148 (find-files "./META-INF" ".*")
1149 ;; for jmod:
1150 (list "./classes/module-info.class")
1151 (find-files "." ".*")))))
1152 (apply invoke "zip" "--symlinks" "-0" "-X" zip files)
1153 (when (string-suffix? ".jmod" zip)
1154 (let ((new-zip (string-append zip "n"))
1155 (contents (call-with-input-file zip
1156 (@ (ice-9 binary-ports)
1157 get-bytevector-all))))
1158 (call-with-output-file new-zip
1159 (lambda (output-port)
1160 ((@ (ice-9 binary-ports) put-bytevector)
1161 output-port
1162 #vu8(#x4a #x4d #x01 #x00)) ; JM
1163 ((@ (ice-9 binary-ports) put-bytevector)
1164 output-port
1165 contents)))
1166 (rename-file new-zip zip)))))))
1167 (append (find-files (string-append #$output:doc "/api")
1168 "\\.zip$")
1169 (find-files #$output:jdk "\\.jmod$")
1170 (list (string-append #$output:jdk
1171 "/lib/jrt-fs.jar"))
1172 (find-files (string-append #$output:jdk "/demo")
1173 "\\.jar$"))))))))
1174 (inputs
1175 (list alsa-lib
1176 cups
1177 fontconfig
1178 freetype
1179 giflib
1180 lcms
1181 elfutils
1182 libjpeg-turbo
1183 libice
1184 libpng
1185 libx11
1186 libxcomposite
1187 libxi
1188 libxinerama
1189 libxrender
1190 libxt
1191 libxtst))
1192 (native-inputs
1193 (list icedtea-8
1194 `(,icedtea-8 "jdk")
1195 ;; XXX: The build system fails with newer versions of GNU Make.
1196 gnu-make-4.2
1197 nss-certs
1198 unzip
1199 which
1200 zip))
1201 (home-page "https://openjdk.org/projects/jdk9/")
1202 (synopsis "Java development kit")
1203 (description
1204 "This package provides the Java development kit OpenJDK.")
1205 (license license:gpl2+)))
1206
1207(define-public openjdk10
1208 (package
1209 (inherit openjdk9)
1210 (name "openjdk")
1211 (version "10.46")
1212 (source (origin
1213 (method hg-fetch)
1214 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1215 (changeset "jdk-10+46")))
1216 (file-name (hg-file-name name version))
1217 (modules '((guix build utils)))
1218 (snippet `(begin
1219 (for-each delete-file
1220 (find-files "." ".*.(bin|exe|jar)$"))))
1221 (sha256
1222 (base32
1223 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1224 (patches (search-patches
1225 "openjdk-10-char-reproducibility.patch"
1226 "openjdk-10-classlist-reproducibility.patch"
1227 "openjdk-10-corba-reproducibility.patch"
1228 "openjdk-10-idlj-reproducibility.patch"
1229 "openjdk-10-module-reproducibility.patch"
1230 "openjdk-10-module3-reproducibility.patch"
1231 "openjdk-10-module4-reproducibility.patch"
1232 "openjdk-10-jar-reproducibility.patch"
1233 "openjdk-10-jtask-reproducibility.patch"
1234 "openjdk-10-pointer-comparison.patch"
1235 "openjdk-10-setsignalhandler.patch"
1236 "openjdk-currency-time-bomb2.patch"))))
1237 (arguments
1238 (substitute-keyword-arguments (package-arguments openjdk9)
1239 ((#:phases phases '%standard-phases)
1240 #~(modify-phases #$phases
1241 #$@(if (target-aarch64?)
1242 #~((replace 'patch-for-aarch64
1243 (lambda _
1244 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1245 ;; This line is duplicated, so remove both occurrences,
1246 ;; then add back one occurrence by substituting a
1247 ;; comment that occurs once.
1248 (("using MacroAssembler::call_VM_leaf_base;") "")
1249 (("Interpreter specific version of call_VM_base")
1250 (string-append "Interpreter specific version of call_VM_base\n"
1251 " using MacroAssembler::call_VM_leaf_base;"))))))
1252 #~())
1253 (replace 'fix-java-shebangs
1254 (lambda _
1255 ;; This file was "fixed" by patch-source-shebangs, but it requires
1256 ;; this exact first line.
1257 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1258 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
1259 (add-after 'unpack 'remove-timestamping
1260 (lambda _
1261 (substitute* "./src/hotspot/share/runtime/vm_version.cpp"
1262 (("__DATE__") "")
1263 (("__TIME__") ""))))
1264 (replace 'configure
1265 (lambda* (#:key inputs #:allow-other-keys)
1266 (invoke "bash" "./configure"
1267 ;; Add flags for compilation with gcc >= 10
1268 (string-append "--with-extra-cflags=-fcommon"
1269 " -fno-delete-null-pointer-checks"
1270 " -fno-lifetime-dse"
1271 ;; flags for compilation with gcc >= 14.
1272 " -Wno-error=int-conversion")
1273 (string-append "--with-freetype="
1274 (assoc-ref inputs "freetype"))
1275 "--disable-freetype-bundling"
1276 "--disable-warnings-as-errors"
1277 "--disable-hotspot-gtest"
1278 "--with-giflib=system"
1279 "--with-libjpeg=system"
1280 "--with-native-debug-symbols=zipped"
1281 (string-append "--prefix=" #$output))))
1282 (add-after 'unpack 'disable-warnings-as-errors
1283 (lambda _
1284 ;; It looks like the "--disable-warnings-as-errors" option of
1285 ;; the 'configure' phase is not working.
1286 (substitute* "make/autoconf/generated-configure.sh"
1287 (("-Werror") ""))))))
1288 ((#:disallowed-references refs '())
1289 (cons* (this-package-native-input "openjdk")
1290 (gexp-input (this-package-native-input "openjdk") "jdk")
1291 refs))))
1292 (native-inputs
1293 (list gnu-make-4.2
1294 openjdk9
1295 `(,openjdk9 "jdk")
1296 nss-certs
1297 unzip
1298 which
1299 zip))))
1300
1301(define-public openjdk11
1302 (package
1303 (name "openjdk")
1304 (version "11.0.22")
1305 (source (origin
1306 (method url-fetch)
1307 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1308 version "-ga.tar.xz"))
1309 (file-name (string-append name "-" version ".tar.xz"))
1310 (sha256
1311 (base32
1312 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1313 (modules '((guix build utils)))
1314 (snippet
1315 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1316 (patches
1317 (search-patches "openjdk-10-module3-reproducibility.patch"
1318 "openjdk-10-module4-reproducibility.patch"
1319 "openjdk-10-char-reproducibility.patch"
1320 "openjdk-11-classlist-reproducibility.patch"
1321 "openjdk-10-jar-reproducibility.patch"
1322 "openjdk-10-jtask-reproducibility.patch"
1323 "openjdk-currency-time-bomb2.patch"))))
1324 (build-system gnu-build-system)
1325 (outputs '("out" "jdk" "doc"))
1326 (arguments
1327 (list
1328 ;; Prevent a java.util.ConcurrentModificationException.
1329 #:parallel-build? #f
1330 #:modules `((guix build gnu-build-system)
1331 (guix build utils)
1332 (ice-9 match)
1333 (ice-9 popen)
1334 (srfi srfi-1)
1335 (srfi srfi-26))
1336
1337 #:disallowed-references
1338 (list (this-package-native-input "openjdk")
1339 (gexp-input (this-package-native-input "openjdk")
1340 "jdk"))
1341
1342 #:tests? #f ; requires jtreg
1343 ;; TODO package jtreg
1344 #:configure-flags
1345 #~(list
1346 "--disable-hotspot-gtest" ;not currently running tests
1347 ;; Add flags for compilation with gcc >= 10.
1348 #$(string-append "--with-extra-cflags=-fcommon"
1349 " -fno-delete-null-pointer-checks"
1350 " -fno-lifetime-dse"
1351 ;; flags for compilation with gcc >= 14.
1352 " -Wno-error=int-conversion")
1353 ;; Otherwise, the '--enable-fast-install' causes an error.
1354 "--disable-option-checking"
1355 "--disable-warnings-as-errors"
1356 ;; Make validate-runpath pass (see:
1357 ;; http://issues.guix.info/issue/32894).
1358 "--with-native-debug-symbols=zipped"
1359 ;; Do not use the bundled libraries.
1360 "--with-giflib=system"
1361 "--with-lcms=system"
1362 "--with-libjpeg=system"
1363 "--with-libpng=system"
1364 "--with-version-pre="
1365 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1366 ;; set; do it manually.
1367 "--with-hotspot-build-time=1970-01-01T00:00:01"
1368 "--enable-reproducible-build" ; to be sure
1369 ;; Allow the build system to locate the system freetype.
1370 (string-append "--with-freetype-include="
1371 #$(this-package-input "freetype") "/include")
1372 (string-append "--with-freetype-lib="
1373 #$(this-package-input "freetype") "/lib"))
1374 #:phases
1375 #~(modify-phases %standard-phases
1376 (add-after 'patch-source-shebangs 'fix-java-shebangs
1377 (lambda _
1378 ;; This file was "fixed" by patch-source-shebangs, but it requires
1379 ;; this exact first line.
1380 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1381 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1382 (add-after 'unpack 'remove-timestamping
1383 (lambda _
1384 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1385 (("__DATE__") "")
1386 (("__TIME__") ""))))
1387 (add-after 'unpack 'patch-jni-libs
1388 ;; Hardcode dynamically loaded libraries.
1389 (lambda _
1390 (define (icedtea-or-openjdk? path)
1391 (or (string-contains path "openjdk")
1392 (string-contains path "icedtea")))
1393
1394 (let* ((library-path (remove icedtea-or-openjdk?
1395 (search-path-as-string->list
1396 (getenv "LIBRARY_PATH"))))
1397 (find-library (lambda (name)
1398 (or (search-path
1399 library-path
1400 (string-append "lib" name ".so"))
1401 (string-append "lib" name ".so")))))
1402 (for-each
1403 (lambda (file)
1404 (catch 'decoding-error
1405 (lambda ()
1406 (substitute* file
1407 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1408 _ name version)
1409 (string-append "\"" (find-library name) "\""))
1410 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1411 (string-append "\"" (find-library name) "\""))))
1412 (lambda _
1413 ;; Those are safe to skip.
1414 (format (current-error-port)
1415 "warning: failed to substitute: ~a~%"
1416 file))))
1417 (find-files "." "\\.c$|\\.h$")))))
1418 (add-before 'build 'write-source-revision-file
1419 (lambda _
1420 (with-output-to-file ".src-rev"
1421 (lambda _
1422 (display #$(package-version this-package))))))
1423 (replace 'build
1424 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
1425 (apply invoke "make" "all"
1426 (format #f "JOBS=~a" (if parallel-build?
1427 (parallel-job-count)
1428 1))
1429 make-flags)))
1430 ;; jdk 11 does not build jre by default any more; so explicitly build
1431 ;; it (see:
1432 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1433 (add-after 'build 'build-jre
1434 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1435 (apply invoke "make" "legacy-jre-image"
1436 (format #f "JOBS=~a" (if parallel-build?
1437 (parallel-job-count)
1438 1))
1439 make-flags)))
1440 (replace 'install
1441 (lambda _
1442 (let ((images (car (find-files "build" "-server-release"
1443 #:directories? #t))))
1444 (copy-recursively (string-append images "/images/jdk")
1445 #$output:jdk)
1446 (copy-recursively (string-append images "/images/jre")
1447 #$output)
1448 (copy-recursively (string-append images "/images/docs")
1449 #$output:doc))))
1450 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1451 ;; But that shared object is located in the server/ folder, so it
1452 ;; cannot be found. This phase creates a symbolic link in the
1453 ;; lib/ folder so that the other libraries can find it.
1454 ;;
1455 ;; See:
1456 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1457 ;;
1458 ;; FIXME: Find the bug in the build system, so that this symlink is
1459 ;; not needed.
1460 (add-after 'install 'install-libjvm
1461 (lambda _
1462 (let ((lib-out (string-append #$output "/lib"))
1463 (lib-jdk (string-append #$output:jdk "/lib")))
1464 (symlink (string-append lib-jdk "/server/libjvm.so")
1465 (string-append lib-jdk "/libjvm.so"))
1466 (symlink (string-append lib-out "/server/libjvm.so")
1467 (string-append lib-out "/libjvm.so")))))
1468 (add-after 'install 'remove-extraneous-files
1469 (lambda* (#:key outputs #:allow-other-keys)
1470 ;; Remove the *.diz and src.zip files for space considerations.
1471 ;; The former are compressed debuginfo files not typically
1472 ;; shipped with Java distributions, while the later corresponds
1473 ;; to Java core API source files.
1474 (for-each delete-file
1475 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1476 (map (match-lambda
1477 ((name . dir)
1478 dir))
1479 outputs)))))
1480 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1481 (lambda _
1482 (use-modules (ice-9 binary-ports)
1483 (rnrs bytevectors))
1484 (letrec ((repack-archive
1485 (lambda (archive)
1486 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1487 (with-directory-excursion dir
1488 (invoke "unzip" archive))
1489 (delete-file archive)
1490 (for-each (compose repack-archive canonicalize-path)
1491 (find-files dir "(ct\\.sym|\\.jar)$"))
1492 (let ((reset-file-timestamp
1493 (lambda (file)
1494 (let ((s (lstat file)))
1495 (unless (eq? (stat:type s) 'symlink)
1496 (format #t "reset ~a~%" file)
1497 (utime file 0 0 0 0))))))
1498 (for-each reset-file-timestamp
1499 (find-files dir #:directories? #t)))
1500 (with-directory-excursion dir
1501 (let ((files (find-files "." #:directories? #t)))
1502 (apply invoke "zip" "-0" "-X" archive files)))))))
1503 (for-each repack-archive
1504 (find-files #$output:doc "\\.zip$"))
1505 (for-each repack-archive
1506 (find-files #$output:jdk "\\.(zip|jar)$"))
1507 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1508 (let ((repack-jmod
1509 (lambda (file-name)
1510 (call-with-input-file file-name
1511 (lambda (file)
1512 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1513 (if (equal? (get-bytevector-n
1514 file (bytevector-length header))
1515 header)
1516 (let* ((header-length (bytevector-length header))
1517 (temp-file (mkstemp!
1518 (string-copy
1519 "temp-file.XXXXXX")))
1520 (temp-filename (port-filename temp-file))
1521 (content-length
1522 (- (stat:size (stat file))
1523 header-length)))
1524 (sendfile temp-file file content-length header-length)
1525 (delete-file file-name)
1526 (close-port temp-file)
1527 (repack-archive (canonicalize-path temp-filename))
1528 (call-with-output-file file-name
1529 (lambda (file)
1530 (put-bytevector file header)
1531 (call-with-input-file temp-filename
1532 (lambda (temp-file)
1533 (sendfile
1534 file temp-file
1535 (stat:size (stat temp-file)) 0)))))))))))))
1536 (for-each repack-jmod
1537 (find-files #$output:jdk "\\.jmod$"))))))
1538 (add-after 'install 'remove-timestamp-from-api-summary
1539 (lambda _
1540 (substitute* (string-append #$output:doc
1541 "/api/overview-summary.html")
1542 (("Generated by javadoc \\(11-internal\\).*$")
1543 "Generated by javadoc (11-internal) -->\n")))))))
1544 (inputs
1545 (list alsa-lib
1546 cups
1547 fontconfig
1548 freetype
1549 giflib
1550 lcms
1551 libjpeg-turbo
1552 libpng
1553 libx11
1554 libxext
1555 libxrandr
1556 libxrender
1557 libxt
1558 libxtst))
1559 (native-inputs
1560 (list autoconf
1561 bash ; not bash-minimal, needs ulimit
1562 openjdk10
1563 `(,openjdk10 "jdk")
1564 gnu-make-4.2
1565 nss-certs
1566 pkg-config
1567 unzip
1568 which
1569 zip))
1570 (home-page "https://openjdk.org/projects/jdk/11/")
1571 (synopsis "Java development kit")
1572 (description
1573 "This package provides the Java development kit OpenJDK.")
1574 (license license:gpl2+)
1575 (properties
1576 ;; At least on a Blackbird powerpc64le machine, the build takes more than
1577 ;; the default 3600s of silent timeout.
1578 `((max-silent-time . ,(* 3600 2))))))
1579
1580(define-syntax make-openjdk
1581 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1582 ;; the bootstrap package. One or more FIELD can be provided to further
1583 ;; refine the package definition; for convenience, the BASE, NAME and
1584 ;; VERSION are defined in their scope.
1585 (lambda (x)
1586 (syntax-case x ()
1587 ((_ bootstrap version* hash field ...)
1588 (with-syntax ((base (datum->syntax x 'base))
1589 (name (datum->syntax x 'name))
1590 (version (datum->syntax x 'version)))
1591 #'(let ((base (package
1592 (inherit bootstrap)
1593 (name "openjdk")
1594 (version version*)
1595 (source
1596 (origin
1597 (inherit (package-source bootstrap))
1598 (method git-fetch)
1599 (uri (git-reference
1600 (url (format
1601 #f "https://github.com/openjdk/jdk~au"
1602 (version-major version*)))
1603 (commit (string-append "jdk-" version*
1604 "-ga"))))
1605 (file-name (git-file-name name version))
1606 (sha256 (base32 hash))))
1607 (properties
1608 '((release-tag-prefix . "jdk-")
1609 (release-tag-suffix . "-ga")
1610 (release-tag-version-delimiter . ".")))
1611 (native-inputs
1612 (modify-inputs (package-native-inputs bootstrap)
1613 (replace "openjdk" bootstrap)))
1614 (home-page (string-append
1615 "https://openjdk.java.net/projects/jdk/"
1616 (version-major version)))))
1617 (name "openjdk")
1618 (version version*))
1619 (package
1620 (inherit base)
1621 field
1622 ...)))))))
1623
1624(define-public openjdk12
1625 (make-openjdk
1626 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1627 (source
1628 (origin
1629 (method url-fetch)
1630 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1631 (file-name (string-append name "-" version ".tar.bz2"))
1632 (sha256
1633 (base32
1634 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1635 (modules '((guix build utils)))
1636 (snippet
1637 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1638 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1639 (arguments
1640 (substitute-keyword-arguments (package-arguments openjdk11)
1641 ;; Re-enable parallel build.
1642 ((#:parallel-build? _ #t) #t)
1643 ((#:phases phases)
1644 #~(modify-phases #$phases
1645 #$@(if (target-aarch64?)
1646 #~((add-after 'unpack 'patch-for-aarch64
1647 (lambda _
1648 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1649 ;; This line is duplicated, so remove both occurrences,
1650 ;; then add back one occurrence by substituting a
1651 ;; comment that occurs once.
1652 (("using MacroAssembler::call_VM_leaf_base;") "")
1653 (("Interpreter specific version of call_VM_base")
1654 (string-append "Interpreter specific version of call_VM_base\n"
1655 " using MacroAssembler::call_VM_leaf_base;"))))))
1656 #~())
1657 (replace 'remove-timestamping
1658 (lambda _
1659 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1660 (("__DATE__") "")
1661 (("__TIME__") ""))))
1662 (replace 'fix-java-shebangs
1663 (lambda _
1664 ;; 'blocked' was renamed to 'blacklisted' in this version for
1665 ;; some reason.
1666 (substitute* "make/data/blacklistedcertsconverter/\
1667blacklisted.certs.pem"
1668 (("^#!.*")
1669 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1670
1671(define-public openjdk13
1672 (make-openjdk openjdk12 "13.0.14"
1673 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1674 (source (origin
1675 (inherit (package-source base))
1676 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1677 "openjdk-10-jtask-reproducibility.patch"))))
1678 (arguments
1679 (substitute-keyword-arguments (package-arguments openjdk12)
1680 ((#:phases phases)
1681 #~(modify-phases #$phases
1682 (replace 'remove-timestamping
1683 (lambda _
1684 (substitute*
1685 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1686 (("__DATE__") "")
1687 (("__TIME__") ""))))))))))
1688
1689(define-public openjdk14
1690 (make-openjdk
1691 openjdk13 "14.0.2"
1692 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1693 (source (origin
1694 (inherit (package-source base))
1695 (snippet ;override snippet
1696 '(begin
1697 ;; The m4 macro uses 'help' to search for builtins, which is
1698 ;; not available in bash-minimal
1699 (substitute* "make/autoconf/basics.m4"
1700 (("if help") "if command -v"))
1701 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1702 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1703 "openjdk-10-jtask-reproducibility.patch"
1704 "openjdk-13-classlist-reproducibility.patch"))))))
1705
1706(define-public openjdk15
1707 (make-openjdk
1708 openjdk14 "15.0.10"
1709 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1710 (source (origin
1711 (inherit (package-source base))
1712 (modules '())
1713 (snippet #f)
1714 (patches
1715 (search-patches "openjdk-15-jtask-reproducibility.patch"
1716 "openjdk-15-xcursor-no-dynamic.patch"))))
1717 (inputs
1718 (modify-inputs (package-inputs base)
1719 (append libxcursor))) ;for our patch to work
1720 (arguments
1721 (substitute-keyword-arguments (package-arguments base)
1722 ((#:implicit-inputs? _ #t)
1723 ;; This is necessary to avoid include ordering errors when adding a
1724 ;; lower GCC to native-inputs to avoid errors like "error: 'fesetround'
1725 ;; was not declared in this scope; did you mean 'setreuid'?"
1726 #f)
1727 ((#:configure-flags flags '%standard-phases)
1728 #~(cons "--without-gtest" ;this replaces...
1729 (delete "--disable-hotspot-gtest" #$flags))))) ;... this
1730 (native-inputs
1731 (append (modify-inputs (package-native-inputs base)
1732 (delete "make" ;remove old gnu-make-4.2
1733 "openjdk") ;to remove non-jdk output
1734 (append `(,openjdk14 "jdk")))
1735 ;; On powerpc64le at least, GCC 14 cannot be used otherwise JDK 15
1736 ;; fails to bootstrap JDK 16, with incomprehensible errors like:
1737 ;; src/java.base/share/classes/java/lang/reflect/Proxy.java:1311:
1738 ;; error: integer number too large.
1739 (modify-inputs (%final-inputs)
1740 (replace "gcc" gcc-11))))))
1741
1742(define-public openjdk16
1743 (make-openjdk
1744 openjdk15 "16.0.2"
1745 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1746 (source (origin
1747 (inherit (package-source base))
1748 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1749 "openjdk-10-setsignalhandler.patch"))))))
1750
1751(define-public openjdk17
1752 (make-openjdk
1753 openjdk16 "17.0.10"
1754 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1755 (source (origin
1756 (inherit (package-source base))
1757 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1758 (arguments
1759 (substitute-keyword-arguments (package-arguments base)
1760 ((#:implicit-inputs? _ #t) #t) ;restore default
1761 ((#:phases phases)
1762 #~(modify-phases #$phases
1763 (replace 'fix-java-shebangs
1764 (lambda _
1765 ;; 'blacklisted' was renamed back to 'blocked'.
1766 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1767 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))
1768 (native-inputs
1769 ;; Resume using the implicit inputs, including the current GCC.
1770 (fold alist-delete (package-native-inputs base)
1771 (map first (%final-inputs))))))
1772
1773(define-public openjdk18
1774 (make-openjdk openjdk17 "18.0.2.1"
1775 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1776
1777(define-public openjdk19
1778 (make-openjdk openjdk18 "19.0.2"
1779 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1780 (arguments
1781 (substitute-keyword-arguments (package-arguments openjdk18)
1782 ((#:phases phases)
1783 #~(modify-phases #$phases
1784 (replace 'fix-java-shebangs
1785 (lambda _
1786 ;; Update file path.
1787 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1788 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1789 (add-before 'configure 'define-java-environment-variables
1790 (lambda* (#:key inputs #:allow-other-keys)
1791 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1792 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1793
1794(define-public openjdk20
1795 (make-openjdk openjdk19 "20.0.2"
1796 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1797
1798(define-public openjdk21
1799 (make-openjdk openjdk20 "21.0.2"
1800 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1801 (source (origin
1802 (inherit (package-source base))
1803 (patches (search-patches "openjdk-21-fix-rpath.patch"
1804 "openjdk-15-xcursor-no-dynamic.patch"))))
1805 (arguments
1806 (substitute-keyword-arguments (package-arguments base)
1807 ((#:phases phases)
1808 #~(modify-phases #$phases
1809 (replace 'fix-java-shebangs
1810 (lambda _
1811 ;; 'blacklisted' was renamed back to 'blocked'.
1812 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1813 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1814
1815(define-public openjdk22
1816 (make-openjdk
1817 openjdk21 "22.0.2"
1818 "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6"
1819 (arguments
1820 (substitute-keyword-arguments (package-arguments base)
1821 ((#:phases phases)
1822 #~(modify-phases #$phases
1823 (add-after 'unpack 'do-not-disable-new-dtags
1824 (lambda _
1825 ;; Our validate-runpath phases checks for RUNPATH, not RPATH.
1826 (substitute* "make/autoconf/flags-cflags.m4"
1827 ((" -Wl,--disable-new-dtags") ""))))))))))
1828
1829(define-public openjdk23
1830 (make-openjdk
1831 openjdk22 "23.0.2"
1832 "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf"
1833 (source (origin
1834 (inherit (package-source base))
1835 ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it
1836 ;; appears not needed anymore. The
1837 ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore;
1838 ;; the fix should be pursued in libx11 (see:
1839 ;; https://issues.guix.gnu.org/54654)
1840 (patches '())))))
1841
1842(define-public openjdk24
1843 (make-openjdk
1844 openjdk23 "24.0.1"
1845 "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx"))
1846
1847(define-public openjdk25
1848 (make-openjdk
1849 openjdk24 "25.0.2"
1850 "03aa34lscr3qbdl6qz3gqyp0nzkqfj02362mzmpkiq3y2g5xdnrj"))
1851
1852;;; Convenience alias to point to the latest version of OpenJDK.
1853(define-public openjdk openjdk25)
1854
1855
1856;; This version of JBR is here in order to be able to build custom
1857;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1858;; tests.
1859(define-public jbr11
1860 (package
1861 (inherit openjdk11)
1862 (name "jbr")
1863 (version "11_0_16-b2248")
1864 (source (origin
1865 (method git-fetch)
1866 (uri (git-reference
1867 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1868 (commit (string-append "jb" version))))
1869 (file-name (string-append name "-" version "-checkout"))
1870 (sha256
1871 (base32
1872 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1873 (arguments
1874 (substitute-keyword-arguments (package-arguments openjdk11)
1875 ((#:configure-flags configure-flags)
1876 #~(append #$configure-flags
1877 (list "--with-jvm-features=shenandoahgc"
1878 "--enable-cds=yes"
1879 "--with-vendor-name=JetBrains s.r.o"
1880 "--with-vendor-url=https://www.jetbrains.com/"
1881 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1882 (synopsis "JetBrains Java Runtime")
1883 (description "This package provides a Java runtime environment for
1884and Java development kit. It supports enhanced class redefinition (DCEVM),
1885includes a number of improvements in font rendering, keyboards support,
1886windowing/focus subsystems, HiDPI, accessibility, and performance,
1887provides better desktop integration and bugfixes not yet present in
1888OpenJDK.")
1889 (home-page "https://www.jetbrains.com/")
1890 (license license:gpl2+)))
1891
1892(define-public jbr17
1893 (package
1894 (inherit openjdk17)
1895 (name "jbr")
1896 (version "17.0.11b1207.30")
1897 (source (origin
1898 (method git-fetch)
1899 (uri (git-reference
1900 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1901 (commit (string-append "jbr-release-" version))))
1902 (file-name (string-append name "-" version "-checkout"))
1903 (sha256
1904 (base32
1905 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1906 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1907 (arguments
1908 (substitute-keyword-arguments (package-arguments openjdk17)
1909 ((#:configure-flags configure-flags)
1910 #~(append #$configure-flags
1911 (list "--with-jvm-features=shenandoahgc"
1912 "--enable-cds=yes"
1913 "--with-vendor-name=JetBrains s.r.o"
1914 "--with-vendor-url=https://www.jetbrains.com/"
1915 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1916 (synopsis "JetBrains Java Runtime")
1917 (description "This package provides a Java runtime environment for
1918and Java development kit. It supports enhanced class redefinition (DCEVM),
1919includes a number of improvements in font rendering, keyboards support,
1920windowing/focus subsystems, HiDPI, accessibility, and performance,
1921provides better desktop integration and bugfixes not yet present in
1922OpenJDK.")
1923 (home-page "https://www.jetbrains.com/")
1924 (license license:gpl2+)))
1925
1926(define-public jbr21
1927 (package
1928 (inherit openjdk21)
1929 (name "jbr")
1930 (version "21.0.3b509.11")
1931 (source (origin
1932 (method git-fetch)
1933 (uri (git-reference
1934 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1935 (commit (string-append "jbr-release-" version))))
1936 (file-name (string-append name "-" version "-checkout"))
1937 (sha256
1938 (base32
1939 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1940 (patches (search-patches "openjdk-21-fix-rpath.patch"
1941 "jbr-17-xcursor-no-dynamic.patch"))))
1942 (inputs
1943 `(("wayland" ,wayland)
1944 ("libxkbcommon" ,libxkbcommon) ; for wayland
1945 ,@(package-inputs openjdk21)))
1946 (arguments
1947 (substitute-keyword-arguments (package-arguments openjdk21)
1948 ((#:configure-flags configure-flags)
1949 #~(append #$configure-flags
1950 (list "--with-jvm-features=shenandoahgc"
1951 "--enable-cds=yes"
1952 "--with-vendor-name=JetBrains s.r.o"
1953 "--with-vendor-url=https://www.jetbrains.com/"
1954 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1955 (synopsis "JetBrains Java Runtime")
1956 (description "This package provides a Java runtime environment for
1957and Java development kit. It supports enhanced class redefinition (DCEVM),
1958includes a number of improvements in font rendering, keyboards support,
1959windowing/focus subsystems, HiDPI, accessibility, and performance,
1960provides better desktop integration and bugfixes not yet present in
1961OpenJDK.")
1962 (home-page "https://www.jetbrains.com/")
1963 (license license:gpl2+)))
1964
1965
1966(define-public ant/java8
1967 (package
1968 (name "ant")
1969 (version "1.10.15")
1970 (source (origin
1971 (method url-fetch)
1972 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1973 version "-src.tar.gz"))
1974 (sha256
1975 (base32
1976 "1ccr852dxg5affdqafg04gi3l89q5c6l9lqrz50jhj05kidljax2"))
1977 (modules '((guix build utils)))
1978 (snippet
1979 '(begin
1980 (for-each delete-file
1981 (find-files "lib/optional" "\\.jar$"))
1982 #t))))
1983 (build-system gnu-build-system)
1984 (arguments
1985 (list
1986 #:modules '((srfi srfi-1)
1987 (guix build gnu-build-system)
1988 (guix build utils))
1989 #:tests? #f ;no "check" target
1990 #:phases
1991 #~(modify-phases %standard-phases
1992 (add-after 'unpack 'remove-scripts
1993 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
1994 ;; wrappers.
1995 (lambda _
1996 (for-each delete-file
1997 (find-files "src/script"
1998 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
1999 (delete 'bootstrap)
2000 (delete 'configure)
2001 (replace 'build
2002 (lambda* (#:key inputs #:allow-other-keys)
2003 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2004
2005 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2006 ;; Ant to build. This is necessary in addition to disabling the
2007 ;; "check" phase, because the dependency on "test-jar" would always
2008 ;; result in the tests to be run.
2009 (substitute* "build.xml"
2010 (("depends=\"jars,test-jar") "depends=\"jars"))
2011 (invoke "bash" "bootstrap.sh"
2012 (string-append "-Ddist.dir=" #$output))))
2013 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2014 (lambda _
2015 (define (repack-archive jar)
2016 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2017 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2018 (with-directory-excursion dir
2019 (invoke "unzip" jar))
2020 (delete-file jar)
2021 ;; XXX: copied from (gnu build install)
2022 (for-each (lambda (file)
2023 (let ((s (lstat file)))
2024 (unless (eq? (stat:type s) 'symlink)
2025 (utime file 0 0 0 0))))
2026 (find-files dir #:directories? #t))
2027 ;; It is important that the manifest appears first.
2028 (with-directory-excursion dir
2029 (let* ((files (find-files "." ".*" #:directories? #t))
2030 ;; To ensure that the reference scanner can
2031 ;; detect all store references in the jars
2032 ;; we disable compression with the "-0" option.
2033 (command (if (file-exists? manifest)
2034 `("zip" "-0" "-X" ,jar ,manifest
2035 ,@files)
2036 `("zip" "-0" "-X" ,jar ,@files))))
2037 (apply invoke command)))))
2038 (for-each repack-archive
2039 (find-files
2040 (string-append #$output "/lib")
2041 "\\.jar$"))))
2042 (delete 'install))))
2043 (native-inputs
2044 `(("jdk" ,icedtea-8 "jdk")
2045 ("zip" ,zip)
2046 ("unzip" ,unzip)))
2047 (home-page "https://ant.apache.org")
2048 (synopsis "Build tool for Java")
2049 (description
2050 "Ant is a platform-independent build tool for Java. It is similar to
2051make but is implemented using the Java language, requires the Java platform,
2052and is best suited to building Java projects. Ant uses XML to describe the
2053build process and its dependencies, whereas Make uses Makefile format.")
2054 (license license:asl2.0)))
2055
2056;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2057;; requires Java 8.
2058(define-public ant
2059 (package (inherit ant/java8)
2060 (version "1.9.15")
2061 (source (origin
2062 (method url-fetch)
2063 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2064 version "-src.tar.gz"))
2065 (sha256
2066 (base32
2067 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2068 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2069 ;; later.
2070 (arguments
2071 (substitute-keyword-arguments
2072 `(#:modules ((srfi srfi-1)
2073 (guix build gnu-build-system)
2074 (guix build utils))
2075 #:tests? #f ; no "check" target
2076 #:phases
2077 (modify-phases %standard-phases
2078 (delete 'bootstrap)
2079 (delete 'configure)
2080 (add-before 'build 'define-java-environment-variables
2081 (lambda* (#:key inputs #:allow-other-keys)
2082 ;; First, set environment variables (eases debugging on -K).
2083 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2084 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2085 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2086 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2087 (replace 'build
2088 (lambda* (#:key inputs outputs #:allow-other-keys)
2089 ;; Ant complains if this file doesn't exist.
2090 (setenv "HOME" "/tmp")
2091 (with-output-to-file "/tmp/.ant.properties"
2092 (lambda _ (display "")))
2093
2094 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2095 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2096
2097 ;; jikes produces lots of warnings, but they are not very
2098 ;; interesting, so we silence them.
2099 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2100
2101 ;; Without these JamVM options the build may freeze.
2102 (substitute* "bootstrap.sh"
2103 (("^\"\\$\\{JAVACMD\\}\" " m)
2104 ,@(if (string-prefix? "armhf" (or (%current-system)
2105 (%current-target-system)))
2106 `((string-append m "-Xnocompact "))
2107 `((string-append m "-Xnocompact -Xnoinlining ")))))
2108
2109 ;; Disable tests because we are bootstrapping and thus don't have
2110 ;; any of the dependencies required to build and run the tests.
2111 (substitute* "build.xml"
2112 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2113 (invoke "bash" "bootstrap.sh"
2114 (string-append "-Ddist.dir="
2115 (assoc-ref outputs "out")))))
2116 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2117 (lambda* (#:key outputs #:allow-other-keys)
2118 (define (repack-archive jar)
2119 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2120 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2121 (with-directory-excursion dir
2122 (invoke "unzip" jar))
2123 (delete-file jar)
2124 ;; XXX: copied from (gnu build install)
2125 (for-each (lambda (file)
2126 (let ((s (lstat file)))
2127 (unless (eq? (stat:type s) 'symlink)
2128 (utime file 0 0 0 0))))
2129 (find-files dir #:directories? #t))
2130 ;; It is important that the manifest appears first.
2131 (with-directory-excursion dir
2132 (let* ((files (find-files "." ".*" #:directories? #t))
2133 ;; To ensure that the reference scanner can
2134 ;; detect all store references in the jars
2135 ;; we disable compression with the "-0" option.
2136 (command (if (file-exists? manifest)
2137 `("zip" "-0" "-X" ,jar ,manifest
2138 ,@files)
2139 `("zip" "-0" "-X" ,jar ,@files))))
2140 (apply invoke command)))))
2141 (for-each repack-archive
2142 (find-files
2143 (string-append (assoc-ref %outputs "out") "/lib")
2144 "\\.jar$"))))
2145 (delete 'install)))
2146 ((#:phases phases)
2147 `(modify-phases ,phases
2148 (delete 'define-java-environment-variables)
2149 (add-after 'unpack 'remove-scripts
2150 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2151 ;; wrappers.
2152 (lambda _
2153 (for-each delete-file
2154 (find-files "src/script"
2155 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2156 #t))
2157 (replace 'build
2158 (lambda* (#:key inputs outputs #:allow-other-keys)
2159 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2160
2161 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2162 ;; Ant to build. This is necessary in addition to disabling the
2163 ;; "check" phase, because the dependency on "test-jar" would always
2164 ;; result in the tests to be run.
2165 (substitute* "build.xml"
2166 (("depends=\"jars,test-jar") "depends=\"jars"))
2167 (invoke "bash" "bootstrap.sh"
2168 (string-append "-Ddist.dir="
2169 (assoc-ref outputs "out")))))))))
2170 (native-inputs
2171 `(("jdk" ,icedtea-7 "jdk")
2172 ("zip" ,zip)
2173 ("unzip" ,unzip)))))
2174
2175(define-public ant-apache-bcel
2176 (package
2177 (inherit ant/java8)
2178 (name "ant-apache-bcel")
2179 (arguments
2180 (substitute-keyword-arguments (package-arguments ant/java8)
2181 ((#:phases phases)
2182 #~(modify-phases #$phases
2183 (add-after 'unpack 'link-bcel
2184 (lambda* (#:key inputs #:allow-other-keys)
2185 (for-each (lambda (file)
2186 (symlink file
2187 (string-append "lib/optional/"
2188 (basename file))))
2189 (find-files (assoc-ref inputs "java-commons-bcel")
2190 "\\.jar$"))))
2191 (add-after 'build 'install
2192 (lambda _
2193 (let ((share (string-append #$output "/share/java"))
2194 (bin (string-append #$output "/bin"))
2195 (lib (string-append #$output "/lib")))
2196 (mkdir-p share)
2197 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2198 (delete-file-recursively bin)
2199 (delete-file-recursively lib))))))))
2200 (inputs
2201 (modify-inputs (package-inputs ant/java8)
2202 (prepend java-commons-bcel)))))
2203
2204(define-public ant-junit
2205 (package
2206 (inherit ant/java8)
2207 (name "ant-junit")
2208 (arguments
2209 (substitute-keyword-arguments (package-arguments ant/java8)
2210 ((#:phases phases)
2211 #~(modify-phases #$phases
2212 (add-after 'unpack 'link-junit
2213 (lambda* (#:key inputs #:allow-other-keys)
2214 (for-each (lambda (file)
2215 (symlink file
2216 (string-append "lib/optional/"
2217 (basename file))))
2218 (find-files (assoc-ref inputs "java-junit")
2219 "\\.jar$"))))
2220 (add-after 'build 'install
2221 (lambda _
2222 (let ((share (string-append #$output "/share/java"))
2223 (bin (string-append #$output "/bin"))
2224 (lib (string-append #$output "/lib")))
2225 (mkdir-p share)
2226 (install-file (string-append lib "/ant-junit.jar") share)
2227 (delete-file-recursively bin)
2228 (delete-file-recursively lib))))))))
2229 (inputs
2230 (modify-inputs (package-inputs ant/java8)
2231 (prepend java-junit)))))
2232
2233(define-public libantlr3c
2234 (package
2235 (name "libantlr3c")
2236 (version "3.4")
2237 (source
2238 (origin
2239 (method url-fetch)
2240 (uri
2241 (string-append "https://www.antlr3.org/download/C/"
2242 name "-" version ".tar.gz"))
2243 (sha256
2244 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2245 (build-system gnu-build-system)
2246 (arguments
2247 (list #:configure-flags
2248 #~(list "--enable-debuginfo"
2249 "--disable-static"
2250 #$@(if (target-64bit?)
2251 #~("--enable-64bit")
2252 #~())
2253 #$@(if (target-riscv64?)
2254 #~("--disable-abiflags")
2255 #~()))))
2256 (synopsis "ANTLR C Library")
2257 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2258Tool for Language Recognition v3).")
2259 (home-page "https://www.antlr3.org/")
2260 (license license:bsd-3)))
2261
2262(define-public drip
2263 ;; Last release is from 2014, with a few important commits afterwards.
2264 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2265 (package
2266 (name "drip")
2267 (version (git-version "0.2.4" "1" commit))
2268 (source (origin
2269 (method git-fetch)
2270 (uri (git-reference
2271 (url "https://github.com/ninjudd/drip")
2272 (commit commit)))
2273 (file-name (git-file-name name version))
2274 (sha256
2275 (base32
2276 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2277 (build-system gnu-build-system)
2278 (native-inputs
2279 `(("jdk" ,icedtea "jdk")))
2280 (arguments
2281 (list #:tests? #f ; No tests.
2282 #:phases
2283 #~(modify-phases %standard-phases
2284 (delete 'configure)
2285 (add-before 'build 'relax-gcc-14-strictness
2286 (lambda _
2287 (substitute* "Makefile"
2288 ((" gcc(.*)$" all options)
2289 (string-append
2290 " gcc"
2291 " -Wno-error=incompatible-pointer-types"
2292 " -Wno-error=implicit-function-declaration"
2293 options)))))
2294 (add-before 'install 'fix-wrapper
2295 (lambda* (#:key inputs #:allow-other-keys)
2296 (let ((jps (search-input-file inputs "/bin/jps")))
2297 (substitute* "bin/drip"
2298 (("jps") jps)
2299 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2300 ;; No need to make:
2301 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2302 ;; No need to include source:
2303 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2304 "true")))))
2305 (replace 'install
2306 (lambda* (#:key outputs #:allow-other-keys)
2307 (let* ((bin (string-append #$output "/bin"))
2308 (share (string-append #$output "/share/drip")))
2309 (mkdir-p bin)
2310 (for-each
2311 (lambda (file)
2312 (install-file (string-append "bin/" file) bin))
2313 '("drip" "drip_daemon" "drip_proxy"))
2314 (install-file "drip.jar" share)
2315 (substitute* (string-append bin "/drip")
2316 (("drip_dir=\\$bin_dir/..")
2317 (string-append "drip_dir=" share)))))))))
2318 (home-page "https://github.com/ninjudd/drip")
2319 (synopsis "Faster Java Virtual Machine launching")
2320 (description "Drip is a launcher for the Java Virtual Machine that
2321provides much faster startup times than the @command{java} command. The @command{drip}
2322script is intended to be a drop-in replacement for the @command{java} command,
2323only faster.")
2324 (license license:epl1.0))))
2325
2326(define-public java-openjfx-build
2327 (package
2328 (name "java-openjfx-build")
2329 ;; This is a java-8 version
2330 (version "8.202")
2331 (source (origin
2332 (method hg-fetch)
2333 (uri (hg-reference
2334 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2335 (changeset (string-append
2336 (string-join (string-split version #\.) "u")
2337 "-ga"))))
2338 (file-name (string-append name "-" version "-checkout"))
2339 (modules '((guix build utils)))
2340 (snippet
2341 '(begin
2342 ;; Delete included gradle jar
2343 (delete-file-recursively "gradle/wrapper")
2344 #t))
2345 (sha256
2346 (base32
2347 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2348 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2349 (build-system ant-build-system)
2350 (arguments
2351 `(#:jar-name "java-openjfx.jar"
2352 #:source-dir "buildSrc/src/main/java"
2353 #:test-dir "buildSrc/src/test"
2354 #:phases
2355 (modify-phases %standard-phases
2356 (add-before 'configure 'generate-jsl-parser
2357 (lambda _
2358 (invoke "antlr3" "-o"
2359 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2360 "buildSrc/src/main/antlr/JSL.g"))))))
2361 (inputs
2362 (list antlr3 java-stringtemplate))
2363 (native-inputs
2364 (list java-junit java-hamcrest-core))
2365 (home-page "https://openjfx.io")
2366 (synopsis "Graphical application toolkit in Java")
2367 (description "OpenJFX is a client application platform for desktop,
2368mobile and embedded systems built on Java. Its goal is to produce a
2369modern, efficient, and fully featured toolkit for developing rich client
2370applications. This package contains base classes for the OpenJFX
2371distribution and helper classes for building other parts of the
2372distribution.")
2373 (license license:gpl2))) ;gpl2 only, with classpath exception
2374
2375(define-public java-openjfx-base
2376 (package (inherit java-openjfx-build)
2377 (name "java-openjfx-base")
2378 (arguments
2379 `(#:jar-name "java-openjfx-base.jar"
2380 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2381 #:test-dir "modules/base/src/test"
2382 #:phases
2383 (modify-phases %standard-phases
2384 (add-before 'check 'remove-empty-file
2385 (lambda _
2386 (with-directory-excursion "modules/base/src/test/java"
2387 ;; These files are completely commented, but junit expects them to
2388 ;; contain a class, so tests fail.
2389 (delete-file
2390 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2391 (delete-file
2392 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2393 (delete-file "javafx/beans/property/PropertiesTest.java")
2394 (delete-file
2395 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2396 ;; This one fails
2397 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2398 #t)))))
2399 (propagated-inputs
2400 (list java-openjfx-build))
2401 (description "OpenJFX is a client application platform for desktop,
2402mobile and embedded systems built on Java. Its goal is to produce a
2403modern, efficient, and fully featured toolkit for developing rich client
2404applications. This package contains base classes for the OpenJFX
2405distribution.")))
2406
2407(define-public java-openjfx-graphics
2408 (package (inherit java-openjfx-build)
2409 (name "java-openjfx-graphics")
2410 (arguments
2411 `(#:jar-name "java-openjfx-graphics.jar"
2412 #:source-dir "modules/graphics/src/main/java"
2413 #:tests? #f; require X
2414 #:test-dir "modules/graphics/src/test"
2415 #:phases
2416 (modify-phases %standard-phases
2417 (add-after 'unpack 'copy-missing-file
2418 (lambda* (#:key inputs #:allow-other-keys)
2419 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2420 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2421 ;; XXX: looks like the missing file we found isn't *quite*
2422 ;; compatible...
2423 (substitute* target
2424 (("case TYPE_INT_ARGB:") "")))))
2425 (add-after 'build 'build-native
2426 (lambda* (#:key inputs outputs #:allow-other-keys)
2427 (let ((jdk (assoc-ref inputs "jdk"))
2428 (class-file->class-name
2429 (lambda (class-file)
2430 (string-map (lambda (c)
2431 (if (char=? c #\/) #\. c))
2432 (string-drop-right class-file
2433 (string-length ".class"))))))
2434 (setenv "CPPFLAGS"
2435 (string-append "-DINLINE=inline "
2436 "-DLINUX "
2437 "-I" jdk "/include "
2438 "-I" jdk "/include/linux "
2439 "-I " (getcwd) "/build/classes/include "
2440 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2441
2442 ;; Instructions have been adapted from buildSrc/linux.gradle
2443 (with-directory-excursion "build/classes"
2444 ;; Build prism
2445 (mkdir-p "include")
2446
2447 ;; Generate headers for prism
2448 (apply invoke "javah" "-d" "include" "-cp" "."
2449 (map class-file->class-name
2450 (append (find-files "com/sun/prism/impl" "\\.class$")
2451 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2452
2453 ;; ...then for prism_sw
2454 (apply invoke "javah" "-d" "include" "-cp" "."
2455 (map class-file->class-name
2456 (find-files "com/sun/pisces" "\\.class$")))
2457
2458 ;; ...and for prism_es2
2459 (apply invoke "javah" "-d" "include" "-cp" "."
2460 (map class-file->class-name
2461 (find-files "com/sun/prism/es2" "\\.class$")))))
2462
2463 (with-directory-excursion "netbeans/native-prism"
2464 (invoke "make" "CONF=Release"))
2465 (with-directory-excursion "netbeans/native-prism-sw"
2466 (invoke "make" "CONF=Release"))
2467 ;; TODO: This fails due to unknown EGL procedure names
2468 #;
2469 (with-directory-excursion "netbeans/native-prism-es2"
2470 (invoke "make" "CONF=Release"))
2471
2472 (let* ((out (assoc-ref outputs "out"))
2473 (dir ,(match (%current-system)
2474 ("i686-linux"
2475 "i386")
2476 ((or "armhf-linux" "aarch64-linux")
2477 "arm")
2478 ((or "x86_64-linux")
2479 "amd64")
2480 (_ "unknown")))
2481 (target (string-append out "/share/" dir "/")))
2482 (mkdir-p target)
2483 (for-each (lambda (file)
2484 (let ((new-name
2485 (string-append "lib"
2486 (string-map
2487 (lambda (c)
2488 (if (char=? c #\-) #\_ c))
2489 (string-drop (basename file)
2490 (string-length "libnative-"))))))
2491 (copy-file file
2492 (string-append target new-name))))
2493 (find-files "netbeans" "\\.so$"))))))))
2494 (propagated-inputs
2495 (list java-openjfx-base))
2496 (inputs
2497 (list java-swt))
2498 ;; XXX: for unknown reasons
2499 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2500 ;; in this revision.
2501 (native-inputs
2502 `(("JNativeSurface.c"
2503 ,(origin
2504 (method url-fetch)
2505 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2506/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2507 (sha256
2508 (base32
2509 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2510 (description "OpenJFX is a client application platform for desktop,
2511mobile and embedded systems built on Java. Its goal is to produce a
2512modern, efficient, and fully featured toolkit for developing rich client
2513applications. This package contains graphics-related classes for the
2514OpenJFX distribution.")))
2515
2516(define-public java-openjfx-media
2517 (package (inherit java-openjfx-build)
2518 (name "java-openjfx-media")
2519 (propagated-inputs
2520 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2521 (arguments
2522 `(#:jar-name "java-openjfx-media.jar"
2523 #:source-dir "modules/media/src/main/java"
2524 #:tests? #f)); no tests
2525 (description "OpenJFX is a client application platform for desktop,
2526mobile and embedded systems built on Java. Its goal is to produce a
2527modern, efficient, and fully featured toolkit for developing rich client
2528applications. This package contains media-related classes for the
2529OpenJFX distribution.")))
2530
2531(define-public java-openjfx-controls
2532 (package (inherit java-openjfx-build)
2533 (name "java-openjfx-controls")
2534 (propagated-inputs
2535 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2536 (arguments
2537 `(#:jar-name "java-openjfx-controls.jar"
2538 #:source-dir "modules/controls/src/main/java"
2539 #:test-dir "modules/controls/src/test"
2540 ;; TODO: tests require com.sun.javafx.pgstub,
2541 ;; javafx.collections.MockSetObserver, and
2542 ;; com.sun.javafx.binding.ExpressionHelperUtility
2543 #:tests? #false
2544 #:phases
2545 (modify-phases %standard-phases
2546 (add-after 'unpack 'copy-resources
2547 (lambda _
2548 (copy-recursively "modules/controls/src/test/resources"
2549 "build/test-classes")
2550 (copy-recursively "modules/controls/src/main/resources"
2551 "build/classes"))))))
2552 (description "OpenJFX is a client application platform for desktop,
2553mobile and embedded systems built on Java. Its goal is to produce a
2554modern, efficient, and fully featured toolkit for developing rich client
2555applications. This package contains UI control classes for the
2556OpenJFX distribution.")))
2557
2558(define-public javacc-4
2559 (package
2560 (name "javacc")
2561 (version "4.1")
2562 (source (origin
2563 (method git-fetch)
2564 (uri (git-reference
2565 (url "https://github.com/javacc/javacc")
2566 (commit "release_41")))
2567 (file-name (string-append "javacc-" version "-checkout"))
2568 (sha256
2569 (base32
2570 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2571 (modules '((guix build utils)))
2572 ;; delete bundled jars
2573 (snippet '(begin (delete-file-recursively "lib") #t))))
2574 (build-system ant-build-system)
2575 ;; Tests fail with
2576 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2577 ;; JAVACODE failed
2578 (arguments
2579 `(#:tests? #f
2580 #:phases
2581 (modify-phases %standard-phases
2582 ;; Delete tests to avoid build failure (we don't run them anyway).
2583 (add-after 'unpack 'delete-tests
2584 (lambda _
2585 (for-each delete-file
2586 '("src/org/javacc/JavaCCTestCase.java"
2587 "src/org/javacc/parser/ExpansionTest.java"
2588 "src/org/javacc/parser/OptionsTest.java"
2589 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2590 (for-each delete-file-recursively
2591 '("src/org/javacc/parser/test"
2592 "src/org/javacc/jjdoc/test"))
2593 #t))
2594 (replace 'install (install-jars "bin/lib")))))
2595 (home-page "https://javacc.org/")
2596 (synopsis "Java parser generator")
2597 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2598generator for use with Java applications. A parser generator is a tool that
2599reads a grammar specification and converts it to a Java program that can
2600recognize matches to the grammar. In addition to the parser generator itself,
2601JavaCC provides other standard capabilities related to parser generation such
2602as tree building (via a tool called JJTree included with JavaCC), actions,
2603debugging, etc.")
2604 (license license:bsd-3)))
2605
2606;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2607;; in the bootstrap/ directory.
2608(define-public javacc-3
2609 (package
2610 (inherit javacc-4)
2611 (version "3.2")
2612 (source (origin
2613 (method git-fetch)
2614 (uri (git-reference
2615 (url "https://github.com/javacc/javacc")
2616 (commit "release_32")))
2617 (file-name (string-append "javacc-" version "-checkout"))
2618 (sha256
2619 (base32
2620 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2621 (arguments
2622 `(#:tests? #f
2623 #:phases
2624 (modify-phases %standard-phases
2625 (add-before 'build 'set-java-version
2626 (lambda _
2627 (for-each
2628 (lambda (file)
2629 (substitute* file
2630 (("debug=") "source=\"1.4\" debug=")))
2631 (find-files "." "build.xml"))
2632 #t))
2633 (replace 'install (install-jars "bin/lib")))))))
2634
2635(define-public javacc
2636 (package
2637 (inherit javacc-4)
2638 (version "7.0.4")
2639 (source
2640 (origin
2641 (method git-fetch)
2642 (uri (git-reference
2643 (url "https://github.com/javacc/javacc")
2644 (commit version)))
2645 (file-name (git-file-name "javacc" version))
2646 (sha256
2647 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2648 (modules '((guix build utils)))
2649 ;; Delete bundled jars.
2650 (snippet '(begin (for-each delete-file-recursively
2651 '("bootstrap" "lib"))))))
2652 (arguments
2653 `(#:make-flags ; bootstrap from javacc-4
2654 ,#~(list (string-append "-Dbootstrap-jar="
2655 #$(this-package-native-input "javacc")
2656 "/share/java/javacc.jar"))
2657 #:test-target "test"
2658 #:phases
2659 (modify-phases %standard-phases
2660 (replace 'install (install-jars "target"))
2661 (add-after 'install 'install-bin
2662 (lambda* (#:key outputs inputs #:allow-other-keys)
2663 (let* ((out (assoc-ref outputs "out"))
2664 (dir (string-append out "/share/java"))
2665 (bin (string-append out "/bin"))
2666 (javacc (string-append bin "/javacc")))
2667 (mkdir-p bin)
2668 (with-output-to-file javacc
2669 (lambda _
2670 (display
2671 (string-append "#!/bin/sh\n"
2672 (assoc-ref inputs "icedtea") "/bin/java"
2673 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2674 (chmod javacc #o755)
2675 ;; symlink to different names to affect the first argument and
2676 ;; change the behavior of the jar file.
2677 (symlink javacc (string-append bin "/jjdoc"))
2678 (symlink javacc (string-append bin "/jjtree"))))))))
2679 (native-inputs
2680 (list javacc-4))
2681 (inputs (list icedtea-8))))
2682
2683(define-public java-ecj
2684 (package
2685 (name "java-ecj")
2686 (version "4.6.3")
2687 (source
2688 (origin
2689 (method url-fetch)
2690 (uri (string-append "http://archive.eclipse.org/eclipse/"
2691 "downloads/drops4/R-" version "-201703010400/"
2692 "ecjsrc-" version ".jar"))
2693 (sha256
2694 (base32
2695 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2696 (build-system ant-build-system)
2697 (arguments
2698 `(#:tests? #f ; none included
2699 #:build-target "build"
2700 #:phases
2701 (modify-phases %standard-phases
2702 (add-after 'unpack 'fix-build.xml
2703 (lambda _
2704 (substitute* "src/build.xml"
2705 (("^.*MANIFEST.*$")
2706 "")
2707 (("^.*properties.*$")
2708 "<include name=\"**/*.properties\"/>
2709 <include name=\"**/*.props\"/>"))))
2710 (add-before 'build 'chdir
2711 (lambda _ (chdir "src")))
2712 (replace 'install (install-jars ".")))))
2713 (home-page "https://eclipse.org")
2714 (synopsis "Eclipse Java development tools core batch compiler")
2715 (description "This package provides the Eclipse Java core batch compiler.")
2716 (license license:epl1.0)))
2717
2718(define-public java-cisd-base
2719 (let ((revision 38938)
2720 (base-version "14.12.0"))
2721 (package
2722 (name "java-cisd-base")
2723 (version (string-append base-version "-" (number->string revision)))
2724 (source (origin
2725 (method svn-fetch)
2726 (uri (svn-reference
2727 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2728 "base/tags/release/"
2729 (version-major+minor base-version)
2730 ".x/" base-version "/base/"))
2731 (revision revision)))
2732 (file-name (string-append "java-cisd-base-" version "-checkout"))
2733 (sha256
2734 (base32
2735 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2736 (modules '((guix build utils)))
2737 (snippet
2738 '(begin
2739 ;; Delete included gradle jar
2740 (delete-file-recursively "gradle/wrapper")
2741 ;; Delete pre-built native libraries
2742 (delete-file-recursively "libs")
2743 #t))))
2744 (build-system ant-build-system)
2745 (arguments
2746 `(#:make-flags '("-file" "build/build.xml")
2747 #:test-target "jar-test"
2748 #:jdk ,icedtea-8
2749 #:phases
2750 (modify-phases %standard-phases
2751 (add-after 'unpack 'unpack-build-resources
2752 (lambda* (#:key inputs #:allow-other-keys)
2753 (copy-recursively (assoc-ref inputs "build-resources")
2754 "../build_resources")
2755 #t))
2756 (add-after 'unpack-build-resources 'fix-dependencies
2757 (lambda* (#:key inputs #:allow-other-keys)
2758 (substitute* "build/build.xml"
2759 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2760 (search-input-file inputs
2761 "/share/java/java-testng.jar"))
2762 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2763 (search-input-file inputs
2764 (string-append
2765 "/share/java/commons-lang-"
2766 ,(package-version java-commons-lang)
2767 ".jar")))
2768 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2769 (search-input-file inputs
2770 (string-append
2771 "/lib/m2/commons-io/commons-io/"
2772 ,(package-version java-commons-io)
2773 "/commons-io-"
2774 ,(package-version java-commons-io)
2775 ".jar")))
2776 ;; Remove dependency on svn
2777 (("<build-info.*") "")
2778 (("\\$\\{revision.number\\}")
2779 ,(number->string revision))
2780 (("\\$\\{version.number\\}") ,base-version))
2781 ;; Remove dependency on classycle
2782 (substitute* "../build_resources/ant/build-common.xml"
2783 (("<taskdef name=\"dependency-checker.*") "")
2784 (("classname=\"classycle.*") "")
2785 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2786 #t))
2787 ;; A few tests fail because of the lack of a proper /etc/groups and
2788 ;; /etc/passwd file in the build container.
2789 (add-after 'unpack 'disable-broken-tests
2790 (lambda _
2791 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2792 (("Unix.isOperational\\(\\)") "false"))
2793 #t))
2794 ;; These decorators are almost useless and pull in an unpackaged
2795 ;; dependency.
2796 (add-after 'unpack 'remove-useless-decorators
2797 (lambda _
2798 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2799 (("@Private") "")
2800 (("import ch.rinn.restrictions.Private;") ""))
2801 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2802 (("@Friend.*") "")
2803 (("import ch.rinn.restrictions.Friend;") ""))
2804 #t))
2805 (add-before 'configure 'build-native-code
2806 (lambda* (#:key inputs #:allow-other-keys)
2807 (let ((jdk (assoc-ref inputs "jdk"))
2808 (dir ,(match (%current-system)
2809 ("i686-linux"
2810 "i386-Linux")
2811 ((or "armhf-linux" "aarch64-linux")
2812 "arm-Linux")
2813 ((or "x86_64-linux")
2814 "amd64-Linux")
2815 (_ "unknown-Linux"))))
2816 (with-directory-excursion "source/c"
2817 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2818 (string-append "-I" jdk "/include")
2819 (string-append "-I" jdk "/include/linux")
2820 "-o" "libunix.so")
2821 (invoke "gcc" "-shared" "-O3" "-fPIC"
2822 "-DMACHINE_BYTE_ORDER=1"
2823 "copyCommon.c"
2824 "copyByteChar.c"
2825 "copyByteDouble.c"
2826 "copyByteFloat.c"
2827 "copyByteInt.c"
2828 "copyByteLong.c"
2829 "copyByteShort.c"
2830 (string-append "-I" jdk "/include")
2831 (string-append "-I" jdk "/include/linux")
2832 "-o" "libnativedata.so"))
2833 (install-file "source/c/libunix.so"
2834 (string-append "libs/native/unix/" dir))
2835 (install-file "source/c/libnativedata.so"
2836 (string-append "libs/native/nativedata/" dir))
2837 #t)))
2838 ;; In the "check" phase we only build the test executable.
2839 (add-after 'check 'run-tests
2840 (lambda _
2841 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2842 (delete-file "targets/dist/sis-base-test.jar")
2843 #t))
2844 (replace 'install (install-jars "targets/dist")))))
2845 (native-inputs
2846 `(("jdk" ,icedtea-8)
2847 ("java-commons-lang" ,java-commons-lang)
2848 ("java-commons-io" ,java-commons-io)
2849 ("java-testng" ,java-testng)
2850 ("build-resources"
2851 ,(origin
2852 (method svn-fetch)
2853 (uri (svn-reference
2854 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2855 "base/tags/release/"
2856 (version-major+minor base-version)
2857 ".x/" base-version
2858 "/build_resources/"))
2859 (revision revision)))
2860 (sha256
2861 (base32
2862 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2863 (home-page "https://svnsis.ethz.ch")
2864 (synopsis "Utility classes for libraries from ETH Zurich")
2865 (description "This library supplies some utility classes needed for
2866libraries from the SIS division at ETH Zurich like jHDF5.")
2867 ;; The C sources are under a non-copyleft license, which looks like a
2868 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2869 (license (list license:asl2.0
2870 (license:non-copyleft "file://source/c/COPYING"))))))
2871
2872(define-public java-cisd-args4j
2873 (let ((revision 39162)
2874 (base-version "9.11.2"))
2875 (package
2876 (name "java-cisd-args4j")
2877 (version (string-append base-version "-" (number->string revision)))
2878 (source (origin
2879 (method svn-fetch)
2880 (uri (svn-reference
2881 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2882 "args4j/tags/release/"
2883 (version-major+minor base-version)
2884 ".x/" base-version "/args4j/"))
2885 (revision revision)))
2886 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2887 (sha256
2888 (base32
2889 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2890 (build-system ant-build-system)
2891 (arguments
2892 `(#:make-flags '("-file" "build/build.xml")
2893 #:tests? #f ; there are no tests
2894 #:modules ((guix build ant-build-system)
2895 (guix build utils)
2896 (guix build java-utils)
2897 (sxml simple)
2898 (sxml transform)
2899 (sxml xpath))
2900 #:phases
2901 (modify-phases %standard-phases
2902 (add-after 'unpack 'unpack-build-resources
2903 (lambda* (#:key inputs #:allow-other-keys)
2904 (mkdir-p "../build_resources")
2905 (copy-recursively (assoc-ref inputs "build-resources")
2906 "../build_resources")
2907 (mkdir-p "../build_resources/lib")))
2908 (add-after 'unpack-build-resources 'fix-dependencies
2909 (lambda* (#:key inputs #:allow-other-keys)
2910 ;; FIXME: There should be a more convenient abstraction for
2911 ;; editing XML files.
2912 (with-directory-excursion "../build_resources/ant/"
2913 (chmod "build-common.xml" #o664)
2914 (call-with-output-file "build-common.xml.new"
2915 (lambda (port)
2916 (sxml->xml
2917 (pre-post-order
2918 (with-input-from-file "build-common.xml"
2919 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2920 `(;; Remove dependency on classycle and custom ant tasks
2921 (taskdef . ,(lambda (tag . kids)
2922 (let ((name ((sxpath '(name *text*)) kids)))
2923 (if (or (member "build-info" name)
2924 (member "dependency-checker" name)
2925 (member "build-java-subprojects" name)
2926 (member "project-classpath" name))
2927 '() ; skip
2928 `(,tag ,@kids)))))
2929 (typedef . ,(lambda (tag . kids)
2930 (let ((name ((sxpath '(name *text*)) kids)))
2931 (if (member "recursive-jar" name)
2932 '() ; skip
2933 `(,tag ,@kids)))))
2934 (build-java-subprojects . ,(lambda _ '()))
2935 ;; Ignore everything else
2936 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2937 (*text* . ,(lambda (_ txt) txt))))
2938 port)))
2939 (rename-file "build-common.xml.new" "build-common.xml"))
2940 (substitute* "build/build.xml"
2941 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2942 (search-input-file inputs "/share/java/sis-base.jar"))
2943 ;; Remove dependency on svn
2944 (("<build-info.*") "")
2945 (("\\$\\{revision.number\\}")
2946 ,(number->string revision))
2947 (("\\$\\{version.number\\}") ,base-version)
2948 ;; Don't use custom ant tasks.
2949 (("recursive-jar") "jar")
2950 (("<project-classpath.*") ""))))
2951 (replace 'install (install-jars "targets/dist")))))
2952 (inputs
2953 (list java-cisd-base))
2954 (native-inputs
2955 `(("ecj" ,java-ecj)
2956 ("build-resources"
2957 ,(origin
2958 (method svn-fetch)
2959 (uri (svn-reference
2960 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2961 "args4j/tags/release/"
2962 (version-major+minor base-version)
2963 ".x/" base-version
2964 "/build_resources/"))
2965 (revision revision)))
2966 (sha256
2967 (base32
2968 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2969 (modules '((guix build utils)))
2970 ;; Delete bundled pre-built jars.
2971 (snippet
2972 '(begin (delete-file-recursively "lib/") #t))))))
2973 (home-page "https://svnsis.ethz.ch")
2974 (synopsis "Command line parser library")
2975 (description "This package provides a parser for command line arguments.")
2976 (license license:asl2.0))))
2977
2978(define-public java-cisd-jhdf5
2979 (let ((revision 39162)
2980 (base-version "14.12.6"))
2981 (package
2982 (name "java-cisd-jhdf5")
2983 (version (string-append base-version "-" (number->string revision)))
2984 (source (origin
2985 (method svn-fetch)
2986 (uri (svn-reference
2987 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2988 "jhdf5/tags/release/"
2989 (version-major+minor base-version)
2990 ".x/" base-version "/jhdf5/"))
2991 (revision revision)))
2992 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
2993 (sha256
2994 (base32
2995 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
2996 (modules '((guix build utils)))
2997 (snippet
2998 '(begin
2999 ;; Delete included gradle jar
3000 (delete-file-recursively "gradle/wrapper")
3001 ;; Delete pre-built native libraries
3002 (delete-file-recursively "libs")))))
3003 (build-system ant-build-system)
3004 (arguments
3005 `(#:make-flags '("-file" "build/build.xml")
3006 #:build-target "jar-all"
3007 #:test-target "jar-test"
3008 #:phases
3009 (modify-phases %standard-phases
3010 ;; FIXME: this build phase fails.
3011 (delete 'generate-jar-indices)
3012 ;; Don't erase results from the build phase when building tests.
3013 (add-after 'unpack 'separate-test-target-from-clean
3014 (lambda _
3015 (substitute* "build/build.xml"
3016 (("\"jar-test\" depends=\"clean, ")
3017 "\"jar-test\" depends=\""))))
3018 (add-after 'unpack 'unpack-build-resources
3019 (lambda* (#:key inputs #:allow-other-keys)
3020 (copy-recursively (assoc-ref inputs "build-resources")
3021 "../build_resources")
3022 (delete-file-recursively "../build_resources/lib/")
3023 (mkdir-p "../build_resources/lib")
3024 ;; Remove dependency on classycle
3025 (substitute* "../build_resources/ant/build-common.xml"
3026 (("<taskdef name=\"dependency-checker.*") "")
3027 (("classname=\"classycle.*") "")
3028 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3029 ;; Remove dependency on svn
3030 (substitute* "build/build.xml"
3031 (("<build-info.*") "")
3032 (("\\$\\{revision.number\\}")
3033 ,(number->string revision))
3034 (("\\$\\{version.number\\}") ,base-version))))
3035 (add-after 'unpack-build-resources 'fix-dependencies
3036 (lambda* (#:key inputs #:allow-other-keys)
3037 (substitute* "../build_resources/ant/build-common.xml"
3038 (("../libraries/testng/testng-jdk15.jar")
3039 (search-input-file inputs
3040 "/share/java/java-testng.jar")))
3041 (substitute* "build/build.xml"
3042 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3043 (search-input-file inputs
3044 "/share/java/sis-base.jar"))
3045 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3046 (search-input-file inputs
3047 "/share/java/cisd-args4j.jar"))
3048 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3049 (search-input-file inputs
3050 (string-append
3051 "/share/java/commons-lang-"
3052 ,(package-version java-commons-lang)
3053 ".jar")))
3054 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3055 (search-input-file inputs
3056 (string-append
3057 "/lib/m2/commons-io/commons-io/"
3058 ,(package-version java-commons-io)
3059 "/commons-io-"
3060 ,(package-version java-commons-io)
3061 ".jar")))
3062 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3063 (search-input-file inputs
3064 "/share/java/java-testng.jar"))
3065 (("\\$\\{lib\\}/junit4/junit.jar")
3066 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3067 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3068 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3069 "jar$"))))
3070 ;; Remove dependency on ch.rinn.restrictions
3071 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3072 (substitute* '("BitSetConversionUtils.java"
3073 "HDF5Utils.java")
3074 (("import ch.rinn.restrictions.Private;") "")
3075 (("@Private") "")))
3076 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3077 (substitute* '("BitSetConversionTest.java"
3078 "h5ar/HDF5ArchiverTest.java")
3079 (("import ch.rinn.restrictions.Friend;") "")
3080 (("@Friend.*") ""))
3081 ;; Remove leftovers from removing @Friend
3082 (substitute* "h5ar/HDF5ArchiverTest.java"
3083 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3084 "")))))
3085 (add-before 'configure 'build-native-library
3086 (lambda* (#:key inputs #:allow-other-keys)
3087 (let ((jdk (assoc-ref inputs "jdk"))
3088 (hdf5 (assoc-ref inputs "hdf5"))
3089 (dir ,(match (%current-system)
3090 ("i686-linux"
3091 "i386-Linux")
3092 ((or "armhf-linux" "aarch64-linux")
3093 "arm-Linux")
3094 ((or "x86_64-linux")
3095 "amd64-Linux")
3096 (_ "unknown-Linux"))))
3097 (with-directory-excursion "source/c"
3098 (apply invoke `("gcc" "-shared" "-O3"
3099 "-fPIC"
3100 "-Wl,--exclude-libs,ALL"
3101 "-Wno-error=implicit-function-declaration"
3102 ,@(find-files "jhdf5" "\\.c$")
3103 ,@(find-files "hdf-java" "\\.c$")
3104 ,(string-append "-I" hdf5 "/include")
3105 ,(string-append "-I" jdk "/include")
3106 ,(string-append "-I" jdk "/include/linux")
3107 ,(string-append hdf5 "/lib/libhdf5.a")
3108 "-o" "libjhdf5.so" "-lz")))
3109 (install-file "source/c/libjhdf5.so"
3110 (string-append "libs/native/jhdf5/" dir)))))
3111 ;; In the "check" phase we only build the test executable.
3112 (add-after 'check 'run-tests
3113 (lambda _
3114 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3115 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3116 (replace 'install
3117 (install-jars "targets/dist")))))
3118 (inputs
3119 (list java-cisd-base
3120 java-cisd-args4j
3121 java-commons-lang
3122 java-commons-io
3123 hdf5-1.8
3124 zlib))
3125 (native-inputs
3126 `(("jdk" ,icedtea-8)
3127 ("java-testng" ,java-testng)
3128 ("java-junit" ,java-junit)
3129 ("java-jmock" ,java-jmock)
3130 ("java-hamcrest-core" ,java-hamcrest-core)
3131 ("build-resources"
3132 ,(origin
3133 (method svn-fetch)
3134 (uri (svn-reference
3135 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3136 "jhdf5/tags/release/"
3137 (version-major+minor base-version)
3138 ".x/" base-version
3139 "/build_resources/"))
3140 (revision revision)))
3141 (sha256
3142 (base32
3143 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3144 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3145 (synopsis "Java binding for HDF5")
3146 (description "JHDF5 is a high-level API in Java for reading and writing
3147HDF5 files, building on the libraries provided by the HDF Group.")
3148 ;; The C sources are under a non-copyleft license, which looks like a
3149 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3150 (license (list license:asl2.0
3151 (license:non-copyleft "file://source/c/COPYING"))))))
3152
3153(define-public java-classpathx-servletapi
3154 (package
3155 (name "java-classpathx-servletapi")
3156 (version "3.0.1")
3157 (source (origin
3158 (method url-fetch)
3159 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3160 "servletapi-" version ".tar.gz"))
3161 (sha256
3162 (base32
3163 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3164 (build-system ant-build-system)
3165 (arguments
3166 `(#:tests? #f ; there is no test target
3167 #:build-target "compile"
3168 #:make-flags
3169 ,#~(list "-Dbuild.compiler=javac1.8"
3170 (string-append "-Ddist=" #$output))
3171 #:phases
3172 (modify-phases %standard-phases
3173 (replace 'install
3174 (lambda* (#:key make-flags #:allow-other-keys)
3175 (apply invoke `("ant" "dist" ,@make-flags)))))))
3176 (home-page "https://www.gnu.org/software/classpathx/")
3177 (synopsis "Java servlet API implementation")
3178 (description "This is the GNU servlet API distribution, part of the
3179ClasspathX project. It provides implementations of version 3.0 of the servlet
3180API and version 2.1 of the Java ServerPages API.")
3181 (license license:gpl3+)))
3182
3183(define-public java-javaee-servletapi
3184 (package
3185 (name "java-javaee-servletapi")
3186 (version "3.1.0")
3187 (source (origin
3188 (method git-fetch)
3189 (uri (git-reference
3190 (url "https://github.com/javaee/servlet-spec")
3191 (commit version)))
3192 (file-name (git-file-name name version))
3193 (sha256
3194 (base32
3195 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3196 (build-system ant-build-system)
3197 (arguments
3198 `(#:jar-name "javax-servletapi.jar"
3199 ;; no tests
3200 #:tests? #f
3201 #:source-dir "src/main/java"
3202 #:phases
3203 (modify-phases %standard-phases
3204 (add-before 'build 'copy-resources
3205 (lambda _
3206 (mkdir-p "build/classes/javax/servlet/http")
3207 (let ((from-prefix "src/main/java/javax/servlet/")
3208 (to-prefix "build/classes/javax/servlet/"))
3209 (for-each (lambda (f)
3210 (copy-file (string-append from-prefix f)
3211 (string-append to-prefix f)))
3212 (list "LocalStrings_ja.properties"
3213 "LocalStrings.properties"
3214 "LocalStrings_fr.properties"
3215 "http/LocalStrings_es.properties"
3216 "http/LocalStrings_ja.properties"
3217 "http/LocalStrings.properties"
3218 "http/LocalStrings_fr.properties")))
3219 #t)))))
3220 (native-inputs
3221 (list unzip))
3222 (home-page "https://javaee.github.io/servlet-spec/")
3223 (synopsis "Java servlet API")
3224 (description "Java Servlet is the foundation web specification in the
3225Java Enterprise Platform. Developers can build web applications using the
3226Servlet API to interact with the request/response workflow. This project
3227provides information on the continued development of the Java Servlet
3228specification.")
3229 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3230 ;; Some files are licensed under ASL 2.0.
3231 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3232
3233(define-public java-swt
3234 (package
3235 (name "java-swt")
3236 (version "4.7.1a")
3237 (source
3238 ;; The types of many variables and procedures differ in the sources
3239 ;; dependent on whether the target architecture is a 32-bit system or a
3240 ;; 64-bit system. Instead of patching the sources on demand in a build
3241 ;; phase we download either the 32-bit archive (which mostly uses "int"
3242 ;; types) or the 64-bit archive (which mostly uses "long" types).
3243 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3244 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3245 (file32 "x86")
3246 (file64 "x86_64"))
3247 (let-values (((hash file)
3248 (match (or (%current-target-system) (%current-system))
3249 ("x86_64-linux" (values hash64 file64))
3250 (_ (values hash32 file32)))))
3251 (origin
3252 (method url-fetch)
3253 (uri (string-append
3254 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3255 "R-" version "-201710090410/swt-" version
3256 "-gtk-linux-" file ".zip"))
3257 (sha256 (base32 hash))))))
3258 (build-system ant-build-system)
3259 (arguments
3260 `(#:jar-name "swt.jar"
3261 #:jdk ,icedtea-8
3262 #:tests? #f ; no "check" target
3263 #:phases
3264 (modify-phases %standard-phases
3265 (replace 'unpack
3266 (lambda* (#:key source #:allow-other-keys)
3267 (mkdir "swt")
3268 (invoke "unzip" source "-d" "swt")
3269 (chdir "swt")
3270 (mkdir "src")
3271 (invoke "unzip" "src.zip" "-d" "src")))
3272 ;; The classpath contains invalid icecat jars. Since we don't need
3273 ;; anything other than the JDK on the classpath, we can simply unset
3274 ;; it.
3275 (add-after 'configure 'unset-classpath
3276 (lambda _ (unsetenv "CLASSPATH") #t))
3277 (add-before 'build 'build-native
3278 (lambda* (#:key inputs outputs #:allow-other-keys)
3279 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3280 ;; Build shared libraries. Users of SWT have to set the system
3281 ;; property swt.library.path to the "lib" directory of this
3282 ;; package output.
3283 (mkdir-p lib)
3284 (setenv "OUTPUT_DIR" lib)
3285 (setenv "CC" ,(cc-for-target))
3286 (with-directory-excursion "src"
3287 (invoke "bash" "build.sh")))))
3288 (add-after 'install 'install-native
3289 (lambda* (#:key outputs #:allow-other-keys)
3290 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3291 (for-each (lambda (file)
3292 (install-file file lib))
3293 (find-files "." "\\.so$"))
3294 #t))))))
3295 (inputs
3296 `(("gtk" ,gtk+-2)
3297 ("libxtst" ,libxtst)
3298 ("libxt" ,libxt)
3299 ("mesa" ,mesa)
3300 ("glu" ,glu)))
3301 (native-inputs
3302 (list pkg-config unzip))
3303 (home-page "https://www.eclipse.org/swt/")
3304 (synopsis "Widget toolkit for Java")
3305 (description
3306 "SWT is a widget toolkit for Java designed to provide efficient, portable
3307access to the user-interface facilities of the operating systems on which it
3308is implemented.")
3309 ;; SWT code is licensed under EPL1.0
3310 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3311 ;; Cairo bindings contain code under MPL1.1
3312 ;; XULRunner 1.9 bindings contain code under MPL2.0
3313 (license (list
3314 license:epl1.0
3315 license:mpl1.1
3316 license:mpl2.0
3317 license:lgpl2.1+))))
3318
3319;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3320;; of the latest release.
3321(define-public java-qdox-1.12
3322 (package
3323 (name "java-qdox")
3324 (version "1.12.1")
3325 (source (origin
3326 (method url-fetch)
3327 (uri (string-append "https://repo1.maven.org/maven2/"
3328 "com/thoughtworks/qdox/qdox/" version
3329 "/qdox-" version "-sources.jar"))
3330 (sha256
3331 (base32
3332 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3333 (build-system ant-build-system)
3334 (arguments
3335 `(;; Tests require junit
3336 #:tests? #f
3337 #:jar-name "qdox.jar"
3338 #:phases
3339 (modify-phases %standard-phases
3340 (replace 'unpack
3341 (lambda* (#:key source #:allow-other-keys)
3342 (mkdir "src")
3343 (with-directory-excursion "src"
3344 (invoke "jar" "-xf" source))))
3345 ;; At this point we don't have junit, so we must remove the API
3346 ;; tests.
3347 (add-after 'unpack 'delete-tests
3348 (lambda _
3349 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3350 #t)))))
3351 (home-page "https://github.com/codehaus/qdox")
3352 (synopsis "Parse definitions from Java source files")
3353 (description
3354 "QDox is a high speed, small footprint parser for extracting
3355class/interface/method definitions from source files complete with JavaDoc
3356@code{@@tags}. It is designed to be used by active code generators or
3357documentation tools.")
3358 (license license:asl2.0)))
3359
3360(define-public java-qdox
3361 (package
3362 (name "java-qdox")
3363 ; Newer version exists, but this version is required by java-plexus-component-metadata
3364 (version "2.0-M2")
3365 (source (origin
3366 (method url-fetch)
3367 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3368 ;; Older releases at https://github.com/codehaus/qdox/
3369 ;; Note: The release at maven is pre-generated. The release at
3370 ;; github requires jflex.
3371 (uri (string-append "https://repo1.maven.org/maven2/"
3372 "com/thoughtworks/qdox/qdox/" version
3373 "/qdox-" version "-sources.jar"))
3374 (sha256
3375 (base32
3376 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3377 (build-system ant-build-system)
3378 (arguments
3379 `(#:jar-name "qdox.jar"
3380 #:tests? #f; no tests
3381 #:phases
3382 (modify-phases %standard-phases
3383 (add-before 'install 'create-pom
3384 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3385 #:name "QDox"))
3386 (replace 'install
3387 (install-from-pom "pom.xml")))))
3388 (home-page "https://github.com/codehaus/qdox")
3389 (synopsis "Parse definitions from Java source files")
3390 (description "QDox is a high speed, small footprint parser for extracting
3391class/interface/method definitions from source files complete with JavaDoc
3392@code{@@tags}. It is designed to be used by active code generators or
3393documentation tools.")
3394 (license license:asl2.0)))
3395
3396(define-public java-qdox-2-M9
3397 (package
3398 (inherit java-qdox)
3399 (version "2.0-M9"); required by plexus-java
3400 (source (origin
3401 (method url-fetch)
3402 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3403 ;; Older releases at https://github.com/codehaus/qdox/
3404 ;; Note: The release at maven is pre-generated. The release at
3405 ;; github requires jflex.
3406 (uri (string-append "https://repo1.maven.org/maven2/"
3407 "com/thoughtworks/qdox/qdox/" version
3408 "/qdox-" version "-sources.jar"))
3409 (sha256
3410 (base32
3411 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3412 (arguments
3413 (substitute-keyword-arguments (package-arguments java-qdox)
3414 ((#:phases phases)
3415 `(modify-phases ,phases
3416 (replace 'create-pom
3417 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3418 #:name "QDox"))))))))
3419
3420(define-public java-jarjar
3421 (package
3422 (name "java-jarjar")
3423 (version "1.4")
3424 (source (origin
3425 (method url-fetch)
3426 (uri (string-append
3427 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3428 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3429 (sha256
3430 (base32
3431 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3432 (modules '((guix build utils)))
3433 (snippet
3434 '(begin
3435 ;; Delete bundled thirds-party jar archives.
3436 (delete-file-recursively "lib")
3437 (delete-file "src/test/enumtest.jar")
3438 ;; the CLASSPATH needs this directory, create an empty one
3439 (mkdir-p "lib")
3440 #t))))
3441 (build-system ant-build-system)
3442 (arguments
3443 `(;; Tests require junit, which ultimately depends on this package.
3444 #:tests? #f
3445 #:build-target "jar"
3446 #:phases
3447 (modify-phases %standard-phases
3448 (add-before 'build 'do-not-use-bundled-asm
3449 (lambda* (#:key inputs #:allow-other-keys)
3450 (substitute* "build.xml"
3451 (("<path id=\"path.build\">")
3452 (string-append "<path id=\"path.build\"><fileset dir=\""
3453 (assoc-ref inputs "java-asm-bootstrap")
3454 "/lib/m2\" includes=\"**/*.jar\"/>"))
3455 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3456 (("lib/asm-commons-4.0.jar")
3457 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3458 "asm-6.0.jar")))
3459 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3460 (string-append "<include name=\"org/objectweb/asm/"
3461 "commons/Remap*.class\"/>"
3462 "<include name=\"org/objectweb/asm/*.class\"/>"
3463 "<include name=\"org/objectweb/asm/"
3464 "signature/*.class\"/>"
3465 "<include name=\"org/objectweb/asm/"
3466 "commons/SignatureRemapper.class\"/>")))
3467 #t))
3468 (add-before 'build 'remove-maven-dependency
3469 (lambda _
3470 ;; We do not need to build jarjar as a maven plugin just yet, so
3471 ;; remove this file. Maven requires jarjar (but not that plugin),
3472 ;; so removing it improves the bootstrap.
3473 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3474 #t))
3475 (replace 'install
3476 (lambda* (#:key outputs #:allow-other-keys)
3477 (let ((target (string-append (assoc-ref outputs "out")
3478 "/share/java")))
3479 (install-file (string-append "dist/jarjar-" ,version ".jar")
3480 target))
3481 #t)))))
3482 (inputs
3483 (list java-asm-bootstrap))
3484 (native-inputs
3485 (list unzip))
3486 (home-page "https://code.google.com/archive/p/jarjar/")
3487 (synopsis "Repackage Java libraries")
3488 (description
3489 "Jar Jar Links is a utility that makes it easy to repackage Java
3490libraries and embed them into your own distribution. Jar Jar Links includes
3491an Ant task that extends the built-in @code{jar} task.")
3492 (license license:asl2.0)))
3493
3494(define-public java-hamcrest
3495 (package
3496 (name "java-hamcrest")
3497 (version "3.0")
3498 (source (origin
3499 (method git-fetch)
3500 (uri (git-reference
3501 (url "https://github.com/hamcrest/JavaHamcrest/")
3502 (commit (string-append "v" version))))
3503 (file-name (git-file-name name version))
3504 (sha256
3505 (base32
3506 "07cagv2ncs4y02fmwbll3r4rqpjf3zxs163ync24q3x9fplrxmly"))))
3507 (build-system ant-build-system)
3508 (arguments
3509 `(#:tests? #f ; Tests require junit
3510 #:source-dir "hamcrest/src/main"
3511 #:jar-name "hamcrest.jar"))
3512 (home-page "https://hamcrest.org/")
3513 (synopsis "Library of matchers for building test expressions")
3514 (description
3515 "This package provides a library of matcher objects (also known as
3516constraints or predicates) allowing @code{match} rules to be defined
3517declaratively, to be used in other frameworks. Typical scenarios include
3518testing frameworks, mocking libraries and UI validation rules.")
3519 (license license:bsd-3)))
3520
3521(define-public java-hamcrest-core
3522 (package
3523 (name "java-hamcrest-core")
3524 (version "1.3")
3525 (properties `((superseded . ,java-hamcrest)))
3526 (source (origin
3527 (method git-fetch)
3528 (uri (git-reference
3529 (url "https://github.com/hamcrest/JavaHamcrest/")
3530 (commit (string-append "hamcrest-java-" version))))
3531 (file-name (git-file-name name version))
3532 (sha256
3533 (base32
3534 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3535 (modules '((guix build utils)))
3536 (snippet
3537 '(begin
3538 ;; Delete bundled thirds-party jar archives.
3539 (delete-file-recursively "lib")
3540 #t))))
3541 (build-system ant-build-system)
3542 (arguments
3543 `(#:tests? #f ; Tests require junit
3544 #:modules ((guix build ant-build-system)
3545 (guix build java-utils)
3546 (guix build utils)
3547 (srfi srfi-1))
3548 #:make-flags (list (string-append "-Dversion=" ,version))
3549 #:test-target "unit-test"
3550 #:build-target "core"
3551 #:phases
3552 (modify-phases %standard-phases
3553 ;; Disable unit tests, because they require junit, which requires
3554 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3555 ;; attribute from the manifest for reproducibility.
3556 (add-before 'configure 'patch-build.xml
3557 (lambda _
3558 (substitute* "build.xml"
3559 (("unit-test, ") "")
3560 (("\\$\\{build.timestamp\\}") "guix"))
3561 #t))
3562 ;; Java's "getMethods()" returns methods in an unpredictable order.
3563 ;; To make the output of the generated code deterministic we must
3564 ;; sort the array of methods.
3565 (add-after 'unpack 'make-method-order-deterministic
3566 (lambda _
3567 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3568 (("import java\\.util\\.Iterator;" line)
3569 (string-append line "\n"
3570 "import java.util.Arrays; import java.util.Comparator;"))
3571 (("allMethods = cls\\.getMethods\\(\\);" line)
3572 (string-append "_" line
3573 "
3574private Method[] getSortedMethods() {
3575 Arrays.sort(_allMethods, new Comparator<Method>() {
3576 @Override
3577 public int compare(Method a, Method b) {
3578 return a.toString().compareTo(b.toString());
3579 }
3580 });
3581 return _allMethods;
3582}
3583
3584private Method[] allMethods = getSortedMethods();")))
3585 #t))
3586 (add-before 'build 'do-not-use-bundled-qdox
3587 (lambda* (#:key inputs #:allow-other-keys)
3588 (substitute* "build.xml"
3589 (("lib/generator/qdox-1.12.jar")
3590 (string-append (assoc-ref inputs "java-qdox-1.12")
3591 "/share/java/qdox.jar")))
3592 #t))
3593 ;; build.xml searches for .jar files in this directoy, which
3594 ;; we remove from the source archive.
3595 (add-before 'build 'create-dummy-directories
3596 (lambda _
3597 (mkdir-p "lib/integration")
3598 #t))
3599 (add-before 'build 'create-pom
3600 (lambda _
3601 (substitute* "pom/hamcrest-core.pom"
3602 (("@VERSION@") ,version))
3603 #t))
3604 (replace 'install
3605 (install-from-pom "pom/hamcrest-core.pom")))))
3606 (native-inputs
3607 `(("java-qdox-1.12" ,java-qdox-1.12)
3608 ("java-jarjar" ,java-jarjar)))
3609 (propagated-inputs
3610 (list java-hamcrest-parent-pom))
3611 (home-page "https://hamcrest.org/")
3612 (synopsis "Library of matchers for building test expressions")
3613 (description
3614 "This package provides a library of matcher objects (also known as
3615constraints or predicates) allowing @code{match} rules to be defined
3616declaratively, to be used in other frameworks. Typical scenarios include
3617testing frameworks, mocking libraries and UI validation rules.")
3618 (license license:bsd-2)))
3619
3620(define-public java-hamcrest-parent-pom
3621 (package
3622 (inherit java-hamcrest-core)
3623 (properties '((hidden? . #t)))
3624 (name "java-hamcrest-parent-pom")
3625 (propagated-inputs '())
3626 (native-inputs '())
3627 (arguments
3628 `(#:tests? #f
3629 #:phases
3630 (modify-phases %standard-phases
3631 (delete 'configure)
3632 (replace 'build
3633 (lambda _
3634 (substitute* "pom/hamcrest-parent.pom"
3635 (("@VERSION@") ,(package-version java-hamcrest-core)))
3636 #t))
3637 (replace 'install
3638 (install-pom-file "pom/hamcrest-parent.pom")))))))
3639
3640(define-public java-hamcrest-library
3641 (package
3642 (inherit java-hamcrest-core)
3643 (name "java-hamcrest-library")
3644 (properties `((superseded . ,java-hamcrest)))
3645 (arguments
3646 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3647 ((#:build-target _) "library")
3648 ((#:phases phases)
3649 `(modify-phases ,phases
3650 (add-after 'unpack 'patch-classpath-for-integration
3651 (lambda* (#:key inputs #:allow-other-keys)
3652 (substitute* "build.xml"
3653 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3654 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3655 "jar$"))))
3656 #t))
3657 (replace 'create-pom
3658 (lambda _
3659 (substitute* "pom/hamcrest-library.pom"
3660 (("@VERSION@") ,(package-version java-hamcrest-core)))
3661 #t))
3662 (replace 'install
3663 (install-from-pom "pom/hamcrest-library.pom"))))))
3664 (propagated-inputs
3665 (list java-hamcrest-core java-hamcrest-parent-pom))))
3666
3667(define-public java-junit
3668 (package
3669 (name "java-junit")
3670 (version "4.12")
3671 (source (origin
3672 (method git-fetch)
3673 (uri (git-reference
3674 (url "https://github.com/junit-team/junit/")
3675 (commit (string-append "r" version))))
3676 (file-name (git-file-name name version))
3677 (sha256
3678 (base32
3679 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3680 (modules '((guix build utils)))
3681 (snippet
3682 '(begin
3683 ;; Delete bundled jar archives.
3684 (delete-file-recursively "lib")
3685 #t))))
3686 (build-system ant-build-system)
3687 (arguments
3688 `(#:jar-name "junit.jar"
3689 #:source-dir "src/main/java"
3690 #:test-dir "src/test"
3691 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3692 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3693 #:phases
3694 (modify-phases %standard-phases
3695 (add-before 'check 'copy-test-resources
3696 (lambda _
3697 (copy-recursively "src/test/resources" "build/test-classes")
3698 #t))
3699 (replace 'install
3700 (install-from-pom "pom.xml")))))
3701 (propagated-inputs
3702 (list java-hamcrest-core))
3703 (native-inputs
3704 (list java-hamcrest-library))
3705 (home-page "https://junit.org/junit4/")
3706 (synopsis "Test framework for Java")
3707 (description
3708 "JUnit is a simple framework to write repeatable tests for Java projects.
3709JUnit provides assertions for testing expected results, test fixtures for
3710sharing common test data, and test runners for running tests.")
3711 (license license:epl1.0)))
3712
3713(define-public java-junitparams
3714 (package
3715 (name "java-junitparams")
3716 (version "1.1.1")
3717 (source (origin
3718 (method git-fetch)
3719 (uri (git-reference
3720 (url "https://github.com/Pragmatists/JUnitParams")
3721 (commit (string-append "JUnitParams-" version))))
3722 (file-name (git-file-name name version))
3723 (sha256
3724 (base32
3725 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3726 (build-system ant-build-system)
3727 (arguments
3728 `(#:jar-name "junitparams.jar"
3729 #:source-dir "src/main/java"
3730 #:test-dir "src/test"
3731 #:test-exclude (list "**/SuperclassTest.java")))
3732 (inputs
3733 (list java-junit))
3734 (native-inputs
3735 (list java-junit java-hamcrest-core java-assertj))
3736 (home-page "https://github.com/Pragmatists/JUnitParams")
3737 (synopsis "Parameterised test support for JUnit")
3738 (description "The JUnitParams project adds a new runner to JUnit and
3739provides much easier and readable parametrised tests for JUnit.")
3740 (license license:asl2.0)))
3741
3742(define-public java-plexus-utils
3743 (package
3744 (name "java-plexus-utils")
3745 (version "3.3.0")
3746 (source (origin
3747 (method git-fetch)
3748 (uri (git-reference
3749 (url "https://github.com/codehaus-plexus/plexus-utils")
3750 (commit (string-append "plexus-utils-" version))))
3751 (file-name (git-file-name name version))
3752 (sha256
3753 (base32
3754 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3755 (build-system ant-build-system)
3756 ;; FIXME: The default build.xml does not include a target to install
3757 ;; javadoc files.
3758 (arguments
3759 `(#:jar-name "plexus-utils.jar"
3760 #:source-dir "src/main"
3761 #:phases
3762 (modify-phases %standard-phases
3763 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3764 (lambda _
3765 (substitute* "src/main/java/org/codehaus/plexus/util/\
3766cli/shell/BourneShell.java"
3767 (("/bin/sh") (which "sh"))
3768 (("/usr/") (getcwd)))
3769 #t))
3770 (add-after 'unpack 'fix-or-disable-broken-tests
3771 (lambda _
3772 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3773 (substitute* '("cli/CommandlineTest.java"
3774 "cli/shell/BourneShellTest.java")
3775 (("/bin/sh") (which "sh"))
3776 (("/bin/echo") (which "echo")))
3777
3778 ;; This test depends on MavenProjectStub, but we don't have
3779 ;; a package for Maven.
3780 (delete-file "introspection/ReflectionValueExtractorTest.java")
3781
3782 ;; FIXME: The command line tests fail, maybe because they use
3783 ;; absolute paths.
3784 (delete-file "cli/CommandlineTest.java")
3785
3786 ;; These tests require openjdk jmh, which is not packaged yet
3787 (for-each delete-file (find-files "." "PerfTest.java$")))
3788 #t))
3789 (add-before 'build 'copy-resources
3790 (lambda _
3791 (copy-recursively "src/main/resources" "build/classes")
3792 #t))
3793 (replace 'install (install-from-pom "pom.xml")))))
3794 (native-inputs
3795 (list java-hamcrest-core java-junit))
3796 (propagated-inputs
3797 (list plexus-parent-pom-5.1))
3798 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3799 (synopsis "Common utilities for the Plexus framework")
3800 (description "This package provides various Java utility classes for the
3801Plexus framework to ease working with strings, files, command lines, XML and
3802more.")
3803 (license license:asl2.0)))
3804
3805(define-public java-plexus-utils-3.2.1
3806 (package
3807 (inherit java-plexus-utils)
3808 ;; plexus-build-api needs this version, later versions don't work
3809 (version "3.2.1")
3810 (source (origin
3811 (method git-fetch)
3812 (uri (git-reference
3813 (url "https://github.com/codehaus-plexus/plexus-utils")
3814 (commit (string-append "plexus-utils-" version))))
3815 (file-name (git-file-name "java-plexus-utils" version))
3816 (sha256
3817 (base32
3818 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3819
3820(define-public java-plexus-interpolation
3821 (package
3822 (name "java-plexus-interpolation")
3823 (version "1.26")
3824 (source (origin
3825 (method git-fetch)
3826 (uri (git-reference
3827 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3828 (commit (string-append "plexus-interpolation-" version))))
3829 (file-name (git-file-name name version))
3830 (sha256
3831 (base32
3832 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3833 (build-system ant-build-system)
3834 (arguments
3835 `(#:jar-name "plexus-interpolation.jar"
3836 #:source-dir "src/main"
3837 #:phases
3838 (modify-phases %standard-phases
3839 (replace 'install (install-from-pom "pom.xml")))))
3840 (propagated-inputs
3841 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3842 (native-inputs
3843 (list java-junit java-hamcrest-core))
3844 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3845 (synopsis "Java components for interpolating ${} strings and the like")
3846 (description "Plexus interpolator is a modular, flexible interpolation
3847framework for the expression language style commonly seen in Maven, Plexus,
3848and other related projects.
3849
3850It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3851package within @code{plexus-utils}, but has been separated in order to allow
3852these two libraries to vary independently of one another.")
3853 (license license:asl2.0)))
3854
3855(define-public java-plexus-classworlds
3856 (package
3857 (name "java-plexus-classworlds")
3858 (version "2.6.0")
3859 (source (origin
3860 (method git-fetch)
3861 (uri (git-reference
3862 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3863 (commit (string-append "plexus-classworlds-" version))))
3864 (file-name (git-file-name name version))
3865 (sha256
3866 (base32
3867 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3868 (build-system ant-build-system)
3869 (arguments
3870 `(#:jar-name "plexus-classworlds.jar"
3871 #:source-dir "src/main"
3872 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3873 #:phases
3874 (modify-phases %standard-phases
3875 (replace 'install (install-from-pom "pom.xml")))))
3876 (propagated-inputs
3877 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3878 (native-inputs
3879 (list java-junit))
3880 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3881 (synopsis "Java class loader framework")
3882 (description "Plexus classworlds replaces the native @code{ClassLoader}
3883mechanism of Java. It is especially useful for dynamic loading of application
3884components.")
3885 (license license:asl2.0)))
3886
3887(define-public java-plexus-container-default-bootstrap
3888 (package
3889 (name "java-plexus-container-default-bootstrap")
3890 (version "2.1.0")
3891 (source (origin
3892 (method git-fetch)
3893 (uri (git-reference
3894 (url "https://github.com/codehaus-plexus/plexus-containers")
3895 (commit (string-append "plexus-containers-" version))))
3896 (file-name (git-file-name name version))
3897 (sha256
3898 (base32
3899 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
3900 (build-system ant-build-system)
3901 (arguments
3902 `(#:jar-name "container-default.jar"
3903 #:source-dir "plexus-container-default/src/main/java"
3904 #:test-dir "plexus-container-default/src/test"
3905 #:tests? #f; requires plexus-archiver, which depends on this package
3906 #:phases
3907 (modify-phases %standard-phases
3908 (add-before 'build 'fix-google-collections
3909 (lambda _
3910 ;; Google collections are now replaced with guava
3911 (substitute* "plexus-container-default/pom.xml"
3912 (("google-collections") "guava")
3913 (("com.google.collections") "com.google.guava"))
3914 #t))
3915 (add-before 'build 'copy-resources
3916 (lambda _
3917 (copy-recursively
3918 "plexus-container-default/src/main/resources/"
3919 "build/classes")
3920 #t))
3921 (replace 'install
3922 (install-from-pom "plexus-container-default/pom.xml")))))
3923 (propagated-inputs
3924 `(("java-plexus-worldclass" ,java-plexus-classworlds)
3925 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3926 ("java-plexus-utils" ,java-plexus-utils)
3927 ("java-junit" ,java-junit)
3928 ("java-guava" ,java-guava)
3929 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3930 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3931 (synopsis "Inversion-of-control container")
3932 (description "Plexus-default-container is Plexus' inversion-of-control
3933(@dfn{IoC}) container. It is composed of its public API and its default
3934implementation.")
3935 (properties '((hidden? . #t))) ;for bootstrapping purposes only
3936 (license license:asl2.0)))
3937
3938(define java-plexus-containers-parent-pom
3939 (package
3940 (inherit java-plexus-container-default-bootstrap)
3941 (name "java-plexus-containers-parent-pom")
3942 (arguments
3943 `(#:tests? #f
3944 #:phases
3945 (modify-phases %standard-phases
3946 (delete 'configure)
3947 (delete 'build)
3948 (replace 'install
3949 (install-pom-file "pom.xml")))))
3950 (propagated-inputs
3951 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3952
3953(define-public java-plexus-io
3954 (package
3955 (name "java-plexus-io")
3956 (version "3.2.0")
3957 (source (origin
3958 (method git-fetch)
3959 (uri (git-reference
3960 (url "https://github.com/codehaus-plexus/plexus-io")
3961 (commit (string-append "plexus-io-" version))))
3962 (file-name (git-file-name name version))
3963 (sha256
3964 (base32
3965 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
3966 (build-system ant-build-system)
3967 (arguments
3968 `(#:jar-name "plexus-io.jar"
3969 #:source-dir "src/main/java"
3970 #:test-dir "src/test"
3971 #:phases
3972 (modify-phases %standard-phases
3973 (add-before 'build 'copy-resources
3974 (lambda _
3975 (mkdir-p "build/classes")
3976 (copy-recursively "src/main/resources" "build/classes")
3977 (mkdir-p "build/test-classes")
3978 (copy-recursively "src/test/resources" "build/test-classes")
3979 #t))
3980 (replace 'install (install-from-pom "pom.xml")))))
3981 (propagated-inputs
3982 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
3983 (inputs
3984 (list java-jsr305))
3985 (native-inputs
3986 `(("junit" ,java-junit)
3987 ("hamcrest" ,java-hamcrest-core)
3988 ("guava" ,java-guava)
3989 ("classworlds" ,java-plexus-classworlds)
3990 ("xbean" ,java-geronimo-xbean-reflect)
3991 ("container-default" ,java-plexus-container-default-bootstrap)))
3992 (home-page "https://github.com/codehaus-plexus/plexus-io")
3993 (synopsis "I/O plexus components")
3994 (description "Plexus IO is a set of plexus components, which are designed
3995for use in I/O operations. This implementation using plexus components allows
3996reusing it in maven.")
3997 (license license:asl2.0)))
3998
3999(define-public java-plexus-archiver
4000 (package
4001 (name "java-plexus-archiver")
4002 (version "4.2.2")
4003 (source (origin
4004 (method url-fetch)
4005 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
4006 "/archive/plexus-archiver-" version ".tar.gz"))
4007 (sha256
4008 (base32
4009 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
4010 (build-system ant-build-system)
4011 (arguments
4012 `(#:jar-name "plexus-archiver.jar"
4013 #:source-dir "src/main/java"
4014 #:test-dir "src/test"
4015 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4016 #:phases
4017 (modify-phases %standard-phases
4018 (add-before 'check 'remove-failing
4019 (lambda _
4020 ;; Requires an older version of plexus container
4021 (delete-file
4022 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4023 #t))
4024 (add-before 'check 'fix-test-building
4025 (lambda _
4026 (substitute* "build.xml"
4027 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4028 #t))
4029 (add-before 'build 'copy-resources
4030 (lambda _
4031 (mkdir-p "build/classes")
4032 (copy-recursively "src/main/resources" "build/classes")
4033 (mkdir-p "build/test-classes")
4034 (copy-recursively "src/test/resources" "build/test-classes")
4035 #t))
4036 (replace 'install (install-from-pom "pom.xml")))))
4037 (propagated-inputs
4038 (list java-plexus-utils java-plexus-io java-iq80-snappy
4039 java-commons-compress plexus-parent-pom-6.1))
4040 (inputs
4041 `(("java-jsr305" ,java-jsr305)
4042 ("java-plexus-container-default"
4043 ,java-plexus-container-default-bootstrap)))
4044 (native-inputs
4045 `(("java-hamcrest-core" ,java-hamcrest-core)
4046 ("junit" ,java-junit)
4047 ("classworld" ,java-plexus-classworlds)
4048 ("xbean" ,java-geronimo-xbean-reflect)
4049 ("xz" ,java-xz)
4050 ("guava" ,java-guava)))
4051 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4052 (synopsis "Archiver component of the Plexus project")
4053 (description "Plexus-archiver contains a component to deal with project
4054archives (jar).")
4055 (license license:asl2.0)))
4056
4057(define-public java-plexus-container-default
4058 (package
4059 (inherit java-plexus-container-default-bootstrap)
4060 (name "java-plexus-container-default")
4061 (arguments
4062 `(#:jar-name "container-default.jar"
4063 #:source-dir "plexus-container-default/src/main/java"
4064 #:test-dir "plexus-container-default/src/test"
4065 #:test-exclude (list ;"**/*Test.java"
4066 "**/Abstract*.java"
4067 ;; Requires plexus-hierarchy
4068 "**/PlexusHierarchyTest.java"
4069 ;; Failures
4070 "**/ComponentRealmCompositionTest.java"
4071 "**/PlexusContainerTest.java")
4072 #:phases
4073 (modify-phases %standard-phases
4074 (add-before 'build 'fix-google-collections
4075 (lambda _
4076 ;; Google collections are now replaced with guava
4077 (substitute* "plexus-container-default/pom.xml"
4078 (("google-collections") "guava")
4079 (("com.google.collections") "com.google.guava"))
4080 #t))
4081 (add-before 'build 'copy-resources
4082 (lambda _
4083 (copy-recursively
4084 "plexus-container-default/src/main/resources/"
4085 "build/classes")
4086 #t))
4087 (add-before 'check 'fix-paths
4088 (lambda _
4089 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4090 (substitute*
4091 (string-append
4092 dir "/plexus/component/composition/"
4093 "ComponentRealmCompositionTest.java")
4094 (("src/test") "plexus-container-default/src/test"))
4095 #t)))
4096 (replace 'install
4097 (install-from-pom "plexus-container-default/pom.xml")))))
4098 (inputs
4099 `(("worldclass" ,java-plexus-classworlds)
4100 ("xbean" ,java-geronimo-xbean-reflect)
4101 ("utils" ,java-plexus-utils)
4102 ("junit" ,java-junit)
4103 ("guava" ,java-guava)))
4104 (native-inputs
4105 `(("archiver" ,java-plexus-archiver)
4106 ("hamcrest" ,java-hamcrest-core)))
4107 (properties
4108 (alist-delete
4109 'hidden?
4110 (package-properties java-plexus-container-default-bootstrap)))))
4111
4112(define-public java-plexus-component-annotations
4113 (package
4114 (inherit java-plexus-container-default)
4115 (name "java-plexus-component-annotations")
4116 (arguments
4117 `(#:jar-name "plexus-component-annotations.jar"
4118 #:source-dir "plexus-component-annotations/src/main/java"
4119 #:tests? #f; no tests
4120 #:phases
4121 (modify-phases %standard-phases
4122 (replace 'install
4123 (install-from-pom "plexus-component-annotations/pom.xml")))))
4124 (propagated-inputs
4125 (list java-plexus-containers-parent-pom))
4126 (inputs '())
4127 (native-inputs '())
4128 (synopsis "Plexus descriptors generator")
4129 (description "This package is a Maven plugin to generate Plexus descriptors
4130from source tags and class annotations.")))
4131
4132(define-public java-plexus-component-metadata
4133 (package
4134 (inherit java-plexus-container-default)
4135 (name "java-plexus-component-metadata")
4136 (arguments
4137 `(#:jar-name "plexus-component-metadata.jar"
4138 #:source-dir "src/main/java"
4139 #:test-dir "src/test"
4140 #:jdk ,icedtea-8
4141 #:phases
4142 (modify-phases %standard-phases
4143 (add-before 'configure 'chdir
4144 (lambda _
4145 (chdir "plexus-component-metadata")
4146 #t))
4147 (add-before 'build 'copy-resources
4148 (lambda _
4149 (copy-recursively "src/main/resources"
4150 "build/classes/")
4151 #t))
4152 (add-before 'build 'fix-jdom
4153 (lambda _
4154 ;; The newer version of jdom now sets multiple features by default
4155 ;; that are not supported.
4156 ;; Skip these features
4157 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4158 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4159 "// skip"))))
4160 (add-before 'build 'reinstate-cli
4161 ;; The CLI was removed in 2.1.0, but we still need it to build some
4162 ;; maven dependencies, and some parts of maven itself. We can't use
4163 ;; the maven plugin for that yet.
4164 (lambda _
4165 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4166 (lambda _
4167 ;; Copied from a previous version of this package.
4168 (display "package org.codehaus.plexus.metadata;
4169
4170import java.io.File;
4171import java.util.Arrays;
4172import java.util.Collections;
4173
4174import org.apache.commons.cli.CommandLine;
4175import org.apache.commons.cli.OptionBuilder;
4176import org.apache.commons.cli.Options;
4177import org.codehaus.plexus.PlexusContainer;
4178import org.codehaus.plexus.tools.cli.AbstractCli;
4179
4180public class PlexusMetadataGeneratorCli
4181 extends AbstractCli
4182{
4183 public static final char SOURCE_DIRECTORY = 's';
4184 public static final char SOURCE_ENCODING = 'e';
4185 public static final char CLASSES_DIRECTORY = 'c';
4186 public static final char OUTPUT_FILE = 'o';
4187 public static final char DESCRIPTORS_DIRECTORY = 'm';
4188
4189 public static void main( String[] args )
4190 throws Exception
4191 {
4192 new PlexusMetadataGeneratorCli().execute( args );
4193 }
4194
4195 @Override
4196 public String getPomPropertiesPath()
4197 {
4198 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4199 }
4200
4201 @Override
4202 @SuppressWarnings(\"static-access\")
4203 public Options buildCliOptions( Options options )
4204 {
4205 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4206 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4207 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4208 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4209 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4210 return options;
4211 }
4212
4213 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4214 throws Exception
4215 {
4216 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4217
4218 MetadataGenerationRequest request = new MetadataGenerationRequest();
4219 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4220 request.classpath = Collections.emptyList();
4221 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4222 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4223 request.useContextClassLoader = true;
4224 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4225 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4226
4227 metadataGenerator.generateDescriptor( request );
4228 }
4229}")))))
4230 (add-before 'check 'fix-test-location
4231 (lambda _
4232 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4233 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4234 (("target") "build")))))))
4235 (propagated-inputs
4236 `(("java-plexus-container-default" ,java-plexus-container-default)
4237 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4238 ("java-plexus-utils" ,java-plexus-utils)
4239 ("java-plexus-cli" ,java-plexus-cli)
4240 ("java-plexus-classworlds" ,java-plexus-classworlds)
4241 ("maven-plugin-api" ,maven-plugin-api)
4242 ("maven-plugin-annotations" ,maven-plugin-annotations)
4243 ("maven-core-bootstrap" ,maven-core-bootstrap)
4244 ("maven-model" ,maven-model)
4245 ("java-commons-cli" ,java-commons-cli)
4246 ("java-qdox" ,java-qdox)
4247 ("java-jdom2" ,java-jdom2)
4248 ("java-asm-8" ,java-asm-8)))
4249 (native-inputs
4250 (list java-junit java-guava java-geronimo-xbean-reflect))
4251 (synopsis "Inversion-of-control container for Maven")
4252 (description "The Plexus project provides a full software stack for creating
4253and executing software projects. Based on the Plexus container, the
4254applications can utilise component-oriented programming to build modular,
4255reusable components that can easily be assembled and reused. This package
4256provides the Maven plugin generating the component metadata.")))
4257
4258(define-public java-plexus-container-default-1.7
4259 (package
4260 (inherit java-plexus-container-default)
4261 (version "1.7.1")
4262 (source (origin
4263 (method git-fetch)
4264 (uri (git-reference
4265 (url "https://github.com/codehaus-plexus/plexus-containers")
4266 (commit (string-append "plexus-containers-" version))))
4267 (file-name (git-file-name "java-plexus-container-default" version))
4268 (sha256
4269 (base32
4270 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4271
4272(define java-plexus-containers-parent-pom-1.7
4273 (package
4274 (inherit java-plexus-container-default-1.7)
4275 (name "java-plexus-containers-parent-pom")
4276 (arguments
4277 `(#:tests? #f
4278 #:phases
4279 (modify-phases %standard-phases
4280 (delete 'configure)
4281 (delete 'build)
4282 (replace 'install
4283 (install-pom-file "pom.xml")))))
4284 (propagated-inputs
4285 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4286
4287(define-public java-plexus-component-annotations-1.7
4288 (package
4289 (inherit java-plexus-container-default-1.7)
4290 (name "java-plexus-component-annotations")
4291 (arguments
4292 `(#:jar-name "plexus-component-annotations.jar"
4293 #:source-dir "plexus-component-annotations/src/main/java"
4294 #:tests? #f; no tests
4295 #:phases
4296 (modify-phases %standard-phases
4297 (replace 'install
4298 (install-from-pom "plexus-component-annotations/pom.xml")))))
4299 (propagated-inputs
4300 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4301 (inputs '())
4302 (native-inputs '())
4303 (synopsis "Plexus descriptors generator")
4304 (description "This package is a Maven plugin to generate Plexus descriptors
4305from source tags and class annotations.")))
4306
4307(define-public java-plexus-component-metadata-1.7
4308 (package
4309 (inherit java-plexus-container-default-1.7)
4310 (name "java-plexus-component-metadata")
4311 (arguments
4312 `(#:jar-name "plexus-component-metadata.jar"
4313 #:source-dir "src/main/java"
4314 #:test-dir "src/test"
4315 #:phases
4316 (modify-phases %standard-phases
4317 (add-before 'configure 'chdir
4318 (lambda _
4319 (chdir "plexus-component-metadata")
4320 #t))
4321 (add-before 'build 'copy-resources
4322 (lambda _
4323 (copy-recursively "src/main/resources"
4324 "build/classes/")
4325 #t))
4326 (add-before 'build 'fix-jdom
4327 (lambda _
4328 ;; The newer version of jdom now sets multiple features by default
4329 ;; that are not supported.
4330 ;; Skip these features
4331 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4332 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4333 "// skip"))))
4334 (add-before 'check 'fix-test-location
4335 (lambda _
4336 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4337 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4338 (("target") "build")))))))
4339 (propagated-inputs
4340 (list java-plexus-container-default-1.7
4341 java-plexus-component-annotations-1.7
4342 java-plexus-utils
4343 java-plexus-cli
4344 java-plexus-cli
4345 java-plexus-classworlds
4346 maven-plugin-api
4347 maven-plugin-annotations
4348 maven-core-bootstrap
4349 maven-model
4350 java-commons-cli
4351 java-qdox
4352 java-jdom2
4353 java-asm-8))
4354 (native-inputs
4355 (list java-junit java-guava java-geronimo-xbean-reflect))
4356 (synopsis "Inversion-of-control container for Maven")
4357 (description "The Plexus project provides a full software stack for creating
4358and executing software projects. Based on the Plexus container, the
4359applications can utilise component-oriented programming to build modular,
4360reusable components that can easily be assembled and reused. This package
4361provides the Maven plugin generating the component metadata.")))
4362
4363(define-public java-plexus-cipher
4364 (package
4365 (name "java-plexus-cipher")
4366 (version "2.0")
4367 (source (origin
4368 (method git-fetch)
4369 (uri (git-reference
4370 (url "https://github.com/codehaus-plexus/plexus-cipher")
4371 (commit (string-append "plexus-cipher-" version))))
4372 (file-name (git-file-name name version))
4373 (sha256
4374 (base32
4375 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4376 (build-system ant-build-system)
4377 (arguments
4378 `(#:jar-name "plexus-cipher.jar"
4379 #:source-dir "src/main/java"
4380 #:phases
4381 (modify-phases %standard-phases
4382 (add-before 'build 'generate-javax.inject.Named
4383 (lambda _
4384 (mkdir-p "build/classes/META-INF/sisu")
4385 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4386 (lambda _
4387 (display
4388 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4389 #t))
4390 (replace 'install (install-from-pom "pom.xml")))))
4391 (inputs
4392 `(("java-cdi-api" ,java-cdi-api)
4393 ("java-javax-inject" ,java-javax-inject)))
4394 (propagated-inputs
4395 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4396 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4397 (native-inputs
4398 `(("java-junit" ,java-junit)))
4399 (home-page "https://github.com/sonatype/plexus-cipher")
4400 (synopsis "Encryption/decryption Component")
4401 (description "Plexus-cipher contains a component to deal with encryption
4402and decryption.")
4403 (license license:asl2.0)))
4404
4405(define-public java-plexus-cipher-1.7
4406 (package
4407 (inherit java-plexus-cipher)
4408 (version "1.7")
4409 (source (origin
4410 (method git-fetch)
4411 (uri (git-reference
4412 (url "https://github.com/codehaus-plexus/plexus-cipher")
4413 (commit (string-append "plexus-cipher-" version))))
4414 (file-name (git-file-name "java-plexus-cipher" version))
4415 (sha256
4416 (base32
4417 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4418 (arguments
4419 `(#:jar-name "plexus-cipher.jar"
4420 #:source-dir "src/main/java"
4421 #:tests? #f; FIXME: requires sisu-inject-bean
4422 #:phases
4423 (modify-phases %standard-phases
4424 (add-before 'build 'copy-resources
4425 (lambda _
4426 (copy-recursively "src/main/resources" "build/classes")
4427 (mkdir-p "build/classes/META-INF/sisu")
4428 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4429 (lambda _
4430 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4431 #t))
4432 (add-before 'install 'fix-test-dependency
4433 (lambda _
4434 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4435 (substitute* "pom.xml"
4436 (("provided") "test"))
4437 #t))
4438 (replace 'install (install-from-pom "pom.xml")))))
4439 (propagated-inputs
4440 (list java-sonatype-spice-parent-pom-15))))
4441
4442(define-public java-plexus-java
4443 (package
4444 (name "java-plexus-java")
4445 (version "0.9.10")
4446 (source (origin
4447 (method git-fetch)
4448 (uri (git-reference
4449 (url "https://github.com/codehaus-plexus/plexus-languages")
4450 (commit (string-append "plexus-languages-" version))))
4451 (file-name (git-file-name name version))
4452 (sha256
4453 (base32
4454 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4455 (modules '((guix build utils)))
4456 (snippet
4457 `(begin
4458 (for-each delete-file (find-files "." ".*.jar$"))
4459 #t))))
4460 (build-system ant-build-system)
4461 (arguments
4462 `(#:jar-name "plexus-java.java"
4463 #:source-dir "plexus-java/src/main/java"
4464 #:test-dir "plexus-java/src/test"
4465 #:tests? #f; require mockito 2
4466 #:phases
4467 (modify-phases %standard-phases
4468 (add-after 'build 'generate-metadata
4469 (lambda _
4470 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4471 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4472 "--source" "plexus-java/src/main/java"
4473 "--output" "build/classes/META-INF/plexus/components.xml"
4474 "--classes" "build/classes"
4475 "--descriptors" "build/classes/META-INF")
4476 (invoke "ant" "jar")
4477 #t))
4478 (add-before 'install 'install-parent
4479 (install-pom-file "pom.xml"))
4480 (replace 'install
4481 (install-from-pom "plexus-java/pom.xml")))))
4482 (propagated-inputs
4483 (list java-asm java-qdox-2-M9 java-javax-inject
4484 plexus-parent-pom-4.0))
4485 (inputs
4486 (list java-plexus-component-annotations-1.7))
4487 (native-inputs
4488 (list java-plexus-component-metadata-1.7 java-junit))
4489 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4490 (synopsis "Shared language features for Java")
4491 (description "This package contains shared language features of the Java
4492language, for the plexus project.")
4493 (license license:asl2.0)))
4494
4495(define-public java-plexus-compiler-api
4496 (package
4497 (name "java-plexus-compiler-api")
4498 (version "2.8.4")
4499 (source (origin
4500 (method git-fetch)
4501 (uri (git-reference
4502 (url "https://github.com/codehaus-plexus/plexus-compiler")
4503 (commit (string-append "plexus-compiler-" version))))
4504 (file-name (git-file-name name version))
4505 (sha256
4506 (base32
4507 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4508 (build-system ant-build-system)
4509 (arguments
4510 `(#:jar-name "plexus-compiler-api.jar"
4511 #:source-dir "plexus-compiler-api/src/main/java"
4512 #:test-dir "plexus-compiler-api/src/test"
4513 #:phases
4514 (modify-phases %standard-phases
4515 (replace 'install
4516 (install-from-pom "plexus-compiler-api/pom.xml")))))
4517 (propagated-inputs
4518 `(("java-plexus-container-default" ,java-plexus-container-default)
4519 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4520 ("java-plexus-util" ,java-plexus-utils)))
4521 (native-inputs
4522 (list java-junit))
4523 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4524 (synopsis "Plexus Compilers component's API to manipulate compilers")
4525 (description "This package contains the API used by components to manipulate
4526compilers.")
4527 (license (list license:asl2.0
4528 license:expat))))
4529
4530(define java-plexus-compiler-pom
4531 (package
4532 (inherit java-plexus-compiler-api)
4533 (name "java-plexus-compiler-pom")
4534 (arguments
4535 `(#:tests? #f
4536 #:phases
4537 (modify-phases %standard-phases
4538 (delete 'configure)
4539 (delete 'build)
4540 (replace 'install
4541 (install-pom-file "pom.xml"))
4542 (add-after 'install 'install-compilers
4543 (install-pom-file "plexus-compilers/pom.xml")))))
4544 (propagated-inputs
4545 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4546
4547(define plexus-components-parent-pom-4.0
4548 (package
4549 (name "plexus-components-parent-pom")
4550 (version "4.0")
4551 (source (origin
4552 (method git-fetch)
4553 (uri (git-reference
4554 (url "https://github.com/codehaus-plexus/plexus-components")
4555 (commit (string-append "plexus-components-" version))))
4556 (file-name (git-file-name name version))
4557 (sha256
4558 (base32
4559 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4560 (build-system ant-build-system)
4561 (arguments
4562 `(#:tests? #f
4563 #:phases
4564 (modify-phases %standard-phases
4565 (delete 'configure)
4566 (delete 'build)
4567 (replace 'install
4568 (install-pom-file "pom.xml")))))
4569 (propagated-inputs
4570 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4571 (home-page "https://codehaus-plexus.github.io/plexus-components")
4572 (synopsis "Plexus parent pom")
4573 (description "This package contains the Plexus components parent POM.")
4574 (license license:asl2.0)))
4575
4576(define-public java-plexus-compiler-manager
4577 (package
4578 (inherit java-plexus-compiler-api)
4579 (name "java-plexus-compiler-manager")
4580 (arguments
4581 `(#:jar-name "compiler-compiler-manager.java"
4582 #:source-dir "plexus-compiler-manager/src/main/java"
4583 #:test-dir "plexus-compiler-manager/src/test"
4584 #:tests? #f
4585 #:phases
4586 (modify-phases %standard-phases
4587 (add-after 'build 'generate-metadata
4588 (lambda _
4589 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4590 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4591 "--source" "plexus-compiler-manager/src/main/java"
4592 "--output" "build/classes/META-INF/plexus/components.xml"
4593 "--classes" "build/classes"
4594 "--descriptors" "build/classes/META-INF")
4595 (invoke "ant" "jar")
4596 #t))
4597 (add-after 'generate-metadata 'rebuild
4598 (lambda _
4599 (invoke "ant" "jar")
4600 #t))
4601 (replace 'install
4602 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4603 (propagated-inputs
4604 (list java-plexus-compiler-api java-plexus-compiler-pom
4605 java-plexus-container-default-1.7))
4606 (native-inputs
4607 (list unzip java-plexus-component-metadata-1.7))
4608 (synopsis "Compiler management for Plexus Compiler component")
4609 (description "Plexus Compiler is a Plexus component to use different
4610compilers through a uniform API. This component chooses the compiler
4611implementation to use in a project.")))
4612
4613(define-public java-plexus-compiler-javac
4614 (package
4615 (inherit java-plexus-compiler-api)
4616 (name "java-plexus-compiler-javac")
4617 (arguments
4618 `(#:jar-name "plexus-compiler-javac.jar"
4619 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4620 #:jdk ,icedtea-8
4621 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4622 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4623 #:modules ((guix build ant-build-system)
4624 (guix build utils)
4625 (guix build java-utils)
4626 (sxml simple))
4627 #:phases
4628 (modify-phases %standard-phases
4629 ;; We cannot use java-plexus-component-metadata to generate the metadata
4630 ;; because it ultimately depends on this package.
4631 ;; Create it manually instead
4632 (add-before 'build 'create-metadata
4633 (lambda _
4634 (let* ((dir "build/classes/META-INF/plexus")
4635 (file (string-append dir "/components.xml")))
4636 (mkdir-p dir)
4637 (with-output-to-file file
4638 (lambda _
4639 (sxml->xml
4640 `(component-set
4641 (components
4642 (component
4643 (role "org.codehaus.plexus.compiler.Compiler")
4644 (role-hint "javac")
4645 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4646 (isolated-realm "false"))))))))
4647 #t))
4648 (replace 'install
4649 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4650 (propagated-inputs
4651 (list java-plexus-compiler-api java-plexus-utils
4652 java-plexus-container-default))
4653 (synopsis "Javac Compiler support for Plexus Compiler component")
4654 (description "This package contains the Javac Compiler support for Plexus
4655Compiler component.")))
4656
4657(define plexus-components-pom-1.1.20
4658 (package
4659 (name "plexus-components-pom-1.1.20")
4660 (version "1.1.20")
4661 (source (origin
4662 (method git-fetch)
4663 (uri (git-reference
4664 (url "https://github.com/codehaus-plexus/plexus-components")
4665 (commit (string-append "plexus-components-" version))))
4666 (file-name (git-file-name name version))
4667 (sha256
4668 (base32
4669 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4670 (build-system ant-build-system)
4671 (arguments
4672 `(#:tests? #f
4673 #:phases
4674 (modify-phases %standard-phases
4675 (delete 'configure)
4676 (delete 'build)
4677 (replace 'install
4678 (install-pom-file "pom.xml")))))
4679 (propagated-inputs
4680 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4681 (home-page "https://github.com/codehaus-plexus/plexus-components")
4682 (synopsis "Maven parent pom for plexus packages")
4683 (description "This package contains the parent pom for plexus component
4684packages.")
4685 (license license:asl2.0)))
4686
4687(define-public java-plexus-digest
4688 (package
4689 (name "java-plexus-digest")
4690 (version "1.2")
4691 (source (origin
4692 (method git-fetch)
4693 (uri (git-reference
4694 (url "https://github.com/codehaus-plexus/plexus-digest")
4695 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4696 (file-name (git-file-name name version))
4697 (sha256
4698 (base32
4699 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4700 (build-system ant-build-system)
4701 (arguments
4702 `(#:jar-name "plexus-digest.jar"
4703 #:source-dir "src/main/java"
4704 #:tests? #f
4705 #:phases
4706 (modify-phases %standard-phases
4707 (replace 'install
4708 (install-from-pom "pom.xml")))))
4709 (propagated-inputs
4710 (list java-plexus-utils plexus-components-pom-1.1.20))
4711 (native-inputs
4712 (list java-junit))
4713 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4714 (synopsis "Hash function utilities for Java")
4715 (description "This package is a plexus component that contains hash
4716function utilities.")
4717 (license license:asl2.0)))
4718
4719(define-public java-plexus-sec-dispatcher
4720 (package
4721 (name "java-plexus-sec-dispatcher")
4722 (version "2.0")
4723 (source (origin
4724 (method git-fetch)
4725 (uri (git-reference
4726 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4727 (commit (string-append "plexus-sec-dispatcher-" version))))
4728 (sha256
4729 (base32
4730 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4731 (file-name (git-file-name name version))))
4732 (arguments
4733 `(#:jar-name "plexus-sec-dispatcher.jar"
4734 #:source-dir "src/main/java"
4735 #:phases
4736 (modify-phases %standard-phases
4737 (add-before 'build 'generate-models
4738 (lambda* (#:key inputs #:allow-other-keys)
4739 (define (modello-single-mode file version mode)
4740 (invoke "java"
4741 "org.codehaus.modello.ModelloCli"
4742 file mode "src/main/java" version
4743 "false" "true"))
4744 (let ((file "src/main/mdo/settings-security.mdo"))
4745 (modello-single-mode file "1.0.0" "java")
4746 (modello-single-mode file "1.0.0" "xpp3-reader")
4747 (modello-single-mode file "1.0.0" "xpp3-writer"))
4748 #t))
4749 (add-before 'build 'generate-javax.inject.Named
4750 (lambda _
4751 (mkdir-p "build/classes/META-INF/sisu")
4752 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4753 (lambda _
4754 (display
4755 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4756 #t))
4757 (add-before 'check 'fix-paths
4758 (lambda _
4759 (copy-recursively "src/test/resources" "target")
4760 #t))
4761 (replace 'install (install-from-pom "pom.xml")))))
4762 (propagated-inputs
4763 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4764 (native-inputs
4765 (list java-javax-inject
4766 java-modello-core
4767 ;; for modello
4768 java-plexus-container-default
4769 java-plexus-classworlds
4770 java-plexus-utils
4771 java-guava
4772 java-geronimo-xbean-reflect
4773 ;; modello plugins
4774 java-modello-plugins-java
4775 java-modello-plugins-xml
4776 java-modello-plugins-xpp3
4777 ;; for tests
4778 java-junit))
4779 (build-system ant-build-system)
4780 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4781 (synopsis "Plexus Security Dispatcher Component")
4782 (description "This package is the Plexus Security Dispatcher Component.
4783This component decrypts a string passed to it.")
4784 (license license:asl2.0)))
4785
4786(define-public java-plexus-sec-dispatcher-1.4
4787 (package
4788 (inherit java-plexus-sec-dispatcher)
4789 (version "1.4")
4790 (source (origin
4791 (method git-fetch)
4792 (uri (git-reference
4793 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4794 (commit (string-append "sec-dispatcher-" version))))
4795 (sha256
4796 (base32
4797 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4798 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4799 (arguments
4800 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4801 ((#:phases phases)
4802 `(modify-phases ,phases
4803 (delete 'generate-javax.inject.Named)
4804 (add-before 'build 'generate-components.xml
4805 (lambda _
4806 (mkdir-p "build/classes/META-INF/plexus")
4807 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4808 (lambda _
4809 (display
4810 "<component-set>\n
4811 <components>\n
4812 <component>\n
4813 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4814 <role-hint>default</role-hint>\n
4815 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4816 <description></description>\n
4817 <requirements>\n
4818 <requirement>\n
4819 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4820 <field-name>_cipher</field-name>\n
4821 </requirement>\n
4822 <requirement>\n
4823 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4824 <field-name>_decryptors</field-name>\n
4825 </requirement>\n
4826 </requirements>\n
4827 <configuration>\n
4828 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4829 </configuration>\n
4830 </component>\n
4831 </components>\n
4832</component-set>\n")))))))))
4833 (propagated-inputs
4834 (list java-plexus-utils java-plexus-cipher-1.7
4835 java-sonatype-spice-parent-pom-12))))
4836
4837(define-public java-plexus-cli
4838 (package
4839 (name "java-plexus-cli")
4840 (version "1.7")
4841 (source (origin
4842 (method git-fetch)
4843 (uri (git-reference
4844 (url "https://github.com/sonatype/plexus-cli")
4845 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4846 (file-name (string-append name "-" version))
4847 (sha256
4848 (base32
4849 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4850 (build-system ant-build-system)
4851 (arguments
4852 `(#:jar-name "plexus-cli.jar"
4853 #:source-dir "src/main/java"
4854 #:jdk ,icedtea-8
4855 #:test-dir "src/test"))
4856 (inputs
4857 (list java-commons-cli java-plexus-container-default
4858 java-plexus-classworlds))
4859 (native-inputs
4860 (list java-plexus-utils java-junit java-guava))
4861 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4862 (synopsis "CLI building library for plexus")
4863 (description "This package is a library to help creating CLI around
4864Plexus components.")
4865 (license license:asl2.0)))
4866
4867(define-public java-plexus-build-api
4868 (package
4869 (name "java-plexus-build-api")
4870 (version "0.0.7")
4871 (source (origin
4872 (method git-fetch)
4873 (uri (git-reference
4874 (url "https://github.com/codehaus-plexus/plexus-build-api")
4875 (commit (string-append "plexus-build-api-" version))))
4876 (file-name (git-file-name name version))
4877 (sha256
4878 (base32
4879 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4880 (build-system ant-build-system)
4881 (arguments
4882 `(#:jar-name "plexus-build-api.jar"
4883 #:source-dir "src/main/java"
4884 #:jdk ,icedtea-8
4885 #:tests? #f; FIXME: how to run the tests?
4886 #:phases
4887 (modify-phases %standard-phases
4888 (add-before 'build 'copy-resources
4889 (lambda _
4890 (copy-recursively "src/main/resources" "build/classes")
4891 (substitute* (find-files "build/classes")
4892 (("\\$\\{project.version\\}") ,version))
4893 #t))
4894 (add-before 'build 'generate-plexus-compontent
4895 (lambda _
4896 (mkdir-p "build/classes/META-INF/plexus")
4897 ;; This file is required for plexus to inject this package.
4898 ;; FIXME: how is it generated?
4899 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4900 (lambda _
4901 (display
4902 "<component-set>\n
4903 <components>\n
4904 <component>\n
4905 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4906 <role-hint>default</role-hint>\n
4907 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4908 <description>Filesystem based non-incremental build context implementation\n
4909which behaves as if all files were just created.</description>\n
4910 </component>\n
4911 </components>\n
4912</component-set>\n")))
4913 #t))
4914 (replace 'install
4915 (install-from-pom "pom.xml")))))
4916 (inputs
4917 (list java-plexus-utils-3.2.1 java-plexus-container-default))
4918 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
4919 (synopsis "Base build API for maven")
4920 (description "This package contains the base build API for maven and
4921a default implementation of it. This API is about scanning files in a
4922project and determining what files need to be rebuilt.")
4923 (license license:asl2.0)))
4924
4925(define-public java-modello-core
4926 (package
4927 (name "java-modello-core")
4928 (version "1.11")
4929 (source (origin
4930 (method git-fetch)
4931 (uri (git-reference
4932 (url "https://github.com/codehaus-plexus/modello")
4933 (commit (string-append "modello-" version))))
4934 (file-name (git-file-name name version))
4935 (sha256
4936 (base32
4937 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
4938 (build-system ant-build-system)
4939 (arguments
4940 `(#:jar-name "modello-core.jar"
4941 #:source-dir "modello-core/src/main/java"
4942 #:test-dir "modello-core/src/test"
4943 #:main-class "org.codehaus.modello.ModelloCli"
4944 #:jdk ,icedtea-8
4945 #:phases
4946 (modify-phases %standard-phases
4947 (add-before 'build 'copy-resources
4948 (lambda _
4949 (mkdir-p "build/classes/META-INF/plexus")
4950 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4951 "build/classes/META-INF/plexus/components.xml")
4952 #t))
4953 (add-before 'check 'fix-tests
4954 (lambda _
4955 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4956 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4957 "modello/core/io/ModelReaderTest.java")
4958 (("src/test") "modello-core/src/test")))
4959 #t)))))
4960 (propagated-inputs
4961 (list java-plexus-utils java-plexus-container-default
4962 java-plexus-build-api))
4963 (native-inputs
4964 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
4965 java-guava))
4966 (home-page "https://codehaus-plexus.github.io/modello/")
4967 (synopsis "Framework for code generation from a simple model")
4968 (description "Modello is a framework for code generation from a simple model.
4969
4970Modello generates code from a simple model format: based on a plugin
4971architecture, various types of code and descriptors can be generated from the
4972single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4973XSD and documentation.")
4974 (license (list
4975 license:expat
4976 ;; Although this package uses only files licensed under expat,
4977 ;; other parts of the source are licensed under different
4978 ;; licenses. We include them to be inherited by other packages.
4979 license:asl2.0
4980 ;; Some files in modello-plugin-java are licensed under a
4981 ;; 5-clause BSD license.
4982 (license:non-copyleft
4983 (string-append "file:///modello-plugins/modello-plugin-java/"
4984 "src/main/java/org/codehaus/modello/plugin/"
4985 "java/javasource/JNaming.java"))))))
4986
4987(define-public java-modello-plugins-java
4988 (package
4989 (inherit java-modello-core)
4990 (name "java-modello-plugins-java")
4991 (arguments
4992 `(#:jar-name "modello-plugins-java.jar"
4993 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4994 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4995 #:jdk ,icedtea-8
4996 #:tests? #f; requires maven-model, which depends on this package
4997 #:phases
4998 (modify-phases %standard-phases
4999 (add-before 'build 'copy-resources
5000 (lambda _
5001 (mkdir-p "build/classes")
5002 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
5003 "build/classes")
5004 #t)))))
5005 (inputs
5006 (list java-modello-core))
5007 (synopsis "Modello Java Plugin")
5008 (description "Modello Java Plugin generates Java objects for the model.")))
5009
5010(define-public java-modello-plugins-xml
5011 (package
5012 (inherit java-modello-core)
5013 (name "java-modello-plugins-xml")
5014 (arguments
5015 `(#:jar-name "modello-plugins-xml.jar"
5016 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5017 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5018 #:jdk ,icedtea-8
5019 #:phases
5020 (modify-phases %standard-phases
5021 (add-before 'build 'copy-resources
5022 (lambda _
5023 (mkdir-p "build/classes")
5024 (copy-recursively
5025 "modello-plugins/modello-plugin-xml/src/main/resources"
5026 "build/classes")
5027 #t))
5028 (add-before 'check 'fix-paths
5029 (lambda _
5030 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5031 (substitute*
5032 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5033 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5034 #t)))))
5035 (propagated-inputs
5036 (list java-modello-core java-modello-plugins-java))
5037 (synopsis "Modello XML Plugin")
5038 (description "Modello XML Plugin contains shared code for every plugins
5039working on XML representation of the model.")))
5040
5041(define-public java-modello-test
5042 (package
5043 (inherit java-modello-core)
5044 (name "java-modello-test")
5045 (arguments
5046 `(#:jar-name "modello-test.jar"
5047 #:source-dir "modello-test/src/main/java"
5048 #:tests? #f; no tests
5049 #:jdk ,icedtea-8))
5050 (inputs
5051 (list java-plexus-utils java-plexus-compiler-api
5052 java-plexus-compiler-javac java-plexus-container-default))
5053 (synopsis "Modello test package")
5054 (description "The modello test package contains the basis to create
5055Modello generator unit-tests, including sample models and xml files to test
5056every feature for every plugin.")))
5057
5058(define-public java-modello-plugins-xpp3
5059 (package
5060 (inherit java-modello-core)
5061 (name "java-modello-plugins-xpp3")
5062 (arguments
5063 `(#:jar-name "modello-plugins-xpp3.jar"
5064 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5065 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5066 ;; One of the test dependencies is maven-model which depends on this package.
5067 #:tests? #f
5068 #:jdk ,icedtea-8
5069 #:phases
5070 (modify-phases %standard-phases
5071 (add-before 'build 'copy-resources
5072 (lambda _
5073 (mkdir-p "build/classes")
5074 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5075 "build/classes")
5076 #t)))))
5077 (propagated-inputs
5078 (list java-modello-core java-modello-plugins-java
5079 java-modello-plugins-xml))
5080 (native-inputs
5081 (modify-inputs (package-native-inputs java-modello-core)
5082 (prepend java-xmlunit java-modello-test)))
5083 (synopsis "Modello XPP3 Plugin")
5084 (description "The modello XPP3 plugin generates XML readers and writers based
5085on the XPP3 API (XML Pull Parser).")))
5086
5087(define-public java-ow-util-ant-tasks
5088 (package
5089 (name "java-ow-util-ant-tasks")
5090 (version "1.3.2")
5091 (source (origin
5092 (method url-fetch)
5093 (uri (string-append
5094 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5095 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5096 (sha256
5097 (base32
5098 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5099 (build-system ant-build-system)
5100 (arguments
5101 `(#:jar-name "ow-util-ant-tasks.jar"
5102 #:tests? #f; no tests
5103 #:phases
5104 (modify-phases %standard-phases
5105 (add-before 'build 'delete-cyclic-dependency
5106 (lambda _
5107 ;; This file depends on asm-3, which depends on this package
5108 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5109 ;; This file depends on xalan
5110 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5111 (add-before 'build 'fix-new-ant
5112 (lambda _
5113 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5114 ((", destFile.getAbsolutePath\\(\\)")
5115 ", new String[] { destFile.getAbsolutePath() }")))))))
5116 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5117 (synopsis "Replacement for base ant tasks")
5118 (description "This library is used in the legacy build process of several
5119key frameworks developed by ObjectWeb, among them legacy versions of the
5120ObjectWeb ASM bytecode manipulation framework.")
5121 (license license:lgpl2.0+)))
5122
5123(define-public java-asm
5124 (package
5125 (name "java-asm")
5126 (version "6.0")
5127 (source (origin
5128 (method url-fetch)
5129 (uri (string-append "https://download.forge.ow2.org/asm/"
5130 "asm-" version ".tar.gz"))
5131 (sha256
5132 (base32
5133 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5134 (build-system ant-build-system)
5135 (arguments
5136 `(#:build-target "compile"
5137 ;; The tests require an old version of Janino, which no longer compiles
5138 ;; with the JDK7.
5139 #:tests? #f
5140 #:make-flags
5141 (list
5142 ;; We don't need these extra ant tasks, but the build system asks us to
5143 ;; provide a path anyway.
5144 "-Dobjectweb.ant.tasks.path=dummy-path"
5145 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5146 ;; used during the build automatically by ant-build-system, but
5147 ;; java-asm's build.xml fails unless we provide something here.
5148 "-Dbiz.aQute.bnd.path=dummy-path")
5149 #:phases
5150 (modify-phases %standard-phases
5151 (add-before 'build 'remove-bnd-dependency
5152 (lambda _
5153 ;; This file is the only one to require bnd, and is not needed
5154 ;; because we don't build a bundle.
5155 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5156 #t))
5157 (add-before 'install 'build-jars
5158 (lambda* (#:key make-flags #:allow-other-keys)
5159 ;; We cannot use the "jar" target because it depends on a couple
5160 ;; of unpackaged, complicated tools.
5161 (mkdir "dist")
5162 (invoke "jar"
5163 "-cf" (string-append "dist/asm-" ,version ".jar")
5164 "-C" "output/build/tmp" ".")))
5165 (add-before 'install 'fix-pom
5166 (lambda _
5167 (substitute* (find-files "archive" "\\.pom$")
5168 (("@product.artifact@") ,version))
5169 #t))
5170 (add-before 'install 'install-parent
5171 (install-pom-file "archive/asm-parent.pom"))
5172 (replace 'install
5173 (install-from-pom "archive/asm.pom")))))
5174 (native-inputs
5175 (list java-junit))
5176 (propagated-inputs
5177 (list java-org-ow2-parent-pom-1.3))
5178 (home-page "https://asm.ow2.io/")
5179 (synopsis "Very small and fast Java bytecode manipulation framework")
5180 (description "ASM is an all purpose Java bytecode manipulation and
5181analysis framework. It can be used to modify existing classes or dynamically
5182generate classes, directly in binary form. The provided common
5183transformations and analysis algorithms allow easily assembling custom
5184complex transformations and code analysis tools.")
5185 (license license:bsd-3)))
5186
5187(define-public java-org-ow2-parent-pom-1.3
5188 (package
5189 (name "java-org-ow2-parent-pom")
5190 (version "1.3")
5191 (source (origin
5192 (method url-fetch)
5193 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5194 (sha256
5195 (base32
5196 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5197 (build-system ant-build-system)
5198 (arguments
5199 `(#:tests? #f
5200 #:phases
5201 (modify-phases %standard-phases
5202 (delete 'unpack)
5203 (delete 'build)
5204 (delete 'configure)
5205 (replace 'install
5206 ,#~(install-pom-file #$source)))))
5207 (home-page "https://ow2.org")
5208 (synopsis "Ow2.org parent pom")
5209 (description "This package contains the parent pom for projects from ow2.org,
5210including java-asm.")
5211 (properties '((hidden? . #t)))
5212 (license license:lgpl2.1+)))
5213
5214(define-public java-asm-bootstrap
5215 (package
5216 (inherit java-asm)
5217 (name "java-asm-bootstrap")
5218 (properties '((hidden? . #t)))
5219 (arguments
5220 (substitute-keyword-arguments (package-arguments java-asm)
5221 ((#:tests? _) #f)))
5222 (native-inputs `())))
5223
5224(define-public java-asm-3
5225 (package
5226 (inherit java-asm)
5227 (version "3.1")
5228 (source (origin
5229 (method git-fetch)
5230 (uri (git-reference
5231 (url "https://gitlab.ow2.org/asm/asm")
5232 (commit "ASM_3_1")))
5233 (file-name (git-file-name "java-asm" version))
5234 (sha256
5235 (base32
5236 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5237 (modules '((guix build utils)))
5238 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5239 (arguments
5240 `(#:build-target "jar"
5241 #:test-target "test"
5242 #:tests? #f; require legacy test software
5243 #:phases
5244 (modify-phases %standard-phases
5245 (replace 'install (install-jars "output/dist"))
5246 (delete 'generate-jar-indices))))
5247 (native-inputs (list java-ow-util-ant-tasks))))
5248
5249(define-public java-asm-8
5250 (package
5251 (inherit java-asm)
5252 (version "8.0.1")
5253 (source (origin
5254 (method git-fetch)
5255 (uri (git-reference
5256 (url "https://gitlab.ow2.org/asm/asm")
5257 (commit (string-append
5258 "ASM_" (string-join (string-split version #\.)
5259 "_")))))
5260 (file-name (git-file-name "java-asm" version))
5261 (sha256
5262 (base32
5263 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5264 (arguments
5265 `(#:jar-name "asm8.jar"
5266 #:source-dir "asm/src/main/java"
5267 #:test-dir "asm/src/test"
5268 ;; tests depend on junit5
5269 #:tests? #f))
5270 (propagated-inputs '())
5271 (native-inputs '())))
5272
5273(define-public java-asm-tree-8
5274 (package
5275 (inherit java-asm-8)
5276 (name "java-asm-tree")
5277 (arguments
5278 `(#:jar-name "asm-tree.jar"
5279 #:source-dir "asm-tree/src/main/java"
5280 #:test-dir "asm-tree/src/test"
5281 ;; tests depend on junit5
5282 #:tests? #f))
5283 (inputs
5284 (list java-asm-8))))
5285
5286(define-public java-asm-analysis-8
5287 (package
5288 (inherit java-asm-8)
5289 (name "java-asm-analysis")
5290 (arguments
5291 `(#:jar-name "asm-analysis.jar"
5292 #:source-dir "asm-analysis/src/main/java"
5293 #:test-dir "asm-analysis/src/test"
5294 ;; tests depend on junit5
5295 #:tests? #f))
5296 (inputs
5297 (list java-asm-8 java-asm-tree-8))))
5298
5299(define-public java-asm-util-8
5300 (package
5301 (inherit java-asm-8)
5302 (name "java-asm-util")
5303 (arguments
5304 `(#:jar-name "asm-util8.jar"
5305 #:source-dir "asm-util/src/main/java"
5306 #:test-dir "asm-util/src/test"
5307 ;; tests depend on junit5
5308 #:tests? #f))
5309 (inputs
5310 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5311
5312(define-public java-asm-commons-8
5313 (package
5314 (inherit java-asm-8)
5315 (name "java-asm-commons")
5316 (arguments
5317 (list #:jar-name "asm-commons8.jar"
5318 #:source-dir "asm-commons/src/main/java"
5319 #:test-dir "asm-commons/src/test"
5320 ;; tests depend on junit5
5321 #:tests? #f))
5322 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5323
5324(define-public java-asm-9
5325 (package
5326 (inherit java-asm)
5327 (version "9.4")
5328 (source (origin
5329 (method git-fetch)
5330 (uri (git-reference
5331 (url "https://gitlab.ow2.org/asm/asm")
5332 (commit (string-append
5333 "ASM_" (string-join (string-split version #\.)
5334 "_")))))
5335 (file-name (git-file-name "java-asm" version))
5336 (sha256
5337 (base32
5338 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5339 (arguments
5340 `(#:jar-name "asm9.jar"
5341 #:source-dir "asm/src/main/java"
5342 #:test-dir "asm/src/test"
5343 ;; tests depend on junit5
5344 #:tests? #f))
5345 (propagated-inputs '())
5346 (native-inputs '())))
5347
5348(define-public java-asm-tree-9
5349 (package
5350 (inherit java-asm-9)
5351 (name "java-asm-tree")
5352 (arguments
5353 `(#:jar-name "asm-tree.jar"
5354 #:source-dir "asm-tree/src/main/java"
5355 #:test-dir "asm-tree/src/test"
5356 ;; tests depend on junit5
5357 #:tests? #f))
5358 (inputs
5359 (list java-asm-9))))
5360
5361(define-public java-asm-analysis-9
5362 (package
5363 (inherit java-asm-9)
5364 (name "java-asm-analysis")
5365 (arguments
5366 `(#:jar-name "asm-analysis.jar"
5367 #:source-dir "asm-analysis/src/main/java"
5368 #:test-dir "asm-analysis/src/test"
5369 ;; tests depend on junit5
5370 #:tests? #f))
5371 (inputs
5372 (list java-asm-9 java-asm-tree-9))))
5373
5374(define-public java-asm-util-9
5375 (package
5376 (inherit java-asm-9)
5377 (name "java-asm-util")
5378 (arguments
5379 `(#:jar-name "asm-util8.jar"
5380 #:source-dir "asm-util/src/main/java"
5381 #:test-dir "asm-util/src/test"
5382 ;; tests depend on junit5
5383 #:tests? #f))
5384 (inputs
5385 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5386
5387(define-public java-asm-commons-9
5388 (package
5389 (inherit java-asm-9)
5390 (name "java-asm-commons")
5391 (arguments
5392 (list #:jar-name "asm-commons8.jar"
5393 #:source-dir "asm-commons/src/main/java"
5394 #:test-dir "asm-commons/src/test"
5395 ;; tests depend on junit5
5396 #:tests? #f))
5397 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5398
5399(define-public java-cglib
5400 (package
5401 (name "java-cglib")
5402 (version "3.3.0")
5403 (source
5404 (origin
5405 (method git-fetch)
5406 (uri (git-reference
5407 (url "https://github.com/cglib/cglib")
5408 (commit (string-append
5409 "RELEASE_"
5410 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5411 version)))))
5412 (file-name (git-file-name name version))
5413 (sha256
5414 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5415 (build-system ant-build-system)
5416 (arguments
5417 `(;; FIXME: tests fail because junit runs
5418 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5419 ;; to describe a test at all.
5420 #:tests? #f
5421 #:jar-name "cglib.jar"
5422 #:phases
5423 (modify-phases %standard-phases
5424 (add-after 'unpack 'chdir
5425 (lambda _ (chdir "cglib") #t)))))
5426 (native-inputs (list java-junit))
5427 (propagated-inputs (list java-asm-8))
5428 (home-page "https://github.com/cglib/cglib/")
5429 (synopsis "Java byte code generation library")
5430 (description "The byte code generation library CGLIB is a high level API
5431to generate and transform Java byte code.")
5432 (license license:asl2.0)))
5433
5434(define-public java-objenesis
5435 (package
5436 (name "java-objenesis")
5437 (version "3.3")
5438 (source (origin
5439 (method git-fetch)
5440 (uri (git-reference
5441 (url "https://github.com/easymock/objenesis")
5442 (commit version)))
5443 (file-name (git-file-name name version))
5444 (sha256
5445 (base32
5446 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5447 (build-system ant-build-system)
5448 (arguments
5449 `(#:tests? #f; require junit-5
5450 #:jar-name "objenesis.jar"
5451 #:source-dir "main/src/main/java"
5452 #:test-dir "main/src/test/"))
5453 (native-inputs
5454 (list java-junit java-hamcrest-core))
5455 (home-page "http://objenesis.org/")
5456 (synopsis "Bypass the constructor when creating an object")
5457 (description "Objenesis is a small Java library that serves one purpose:
5458to instantiate a new object of a particular class. It is common to see
5459restrictions in libraries stating that classes must require a default
5460constructor. Objenesis aims to overcome these restrictions by bypassing the
5461constructor on object instantiation.")
5462 (license license:asl2.0)))
5463
5464(define-public java-easymock
5465 (package
5466 (name "java-easymock")
5467 (version "3.4")
5468 (source (origin
5469 (method git-fetch)
5470 (uri (git-reference
5471 (url "https://github.com/easymock/easymock/")
5472 (commit (string-append "easymock-" version))))
5473 (file-name (git-file-name name version))
5474 (sha256
5475 (base32
5476 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5477 (build-system ant-build-system)
5478 (arguments
5479 `(#:jar-name "easymock.jar"
5480 #:source-dir "core/src/main"
5481 #:test-dir "core/src/test"
5482 #:phases
5483 (modify-phases %standard-phases
5484 ;; FIXME: Android support requires the following packages to be
5485 ;; available: com.google.dexmaker.stock.ProxyBuilder
5486 (add-after 'unpack 'delete-android-support
5487 (lambda _
5488 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5489 (substitute* "MocksControl.java"
5490 (("AndroidSupport.isAndroid\\(\\)") "false")
5491 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5492 (delete-file "AndroidClassProxyFactory.java"))
5493 #t))
5494 (add-after 'unpack 'delete-broken-tests
5495 (lambda _
5496 (with-directory-excursion "core/src/test/java/org/easymock"
5497 ;; This test depends on dexmaker.
5498 (delete-file "tests2/ClassExtensionHelperTest.java")
5499
5500 ;; This is not a test.
5501 (delete-file "tests/BaseEasyMockRunnerTest.java")
5502
5503 ;; This test should be executed with a different runner...
5504 (delete-file "tests2/EasyMockAnnotationsTest.java")
5505 ;; ...but deleting it means that we also have to delete these
5506 ;; dependent files.
5507 (delete-file "tests2/EasyMockRunnerTest.java")
5508 (delete-file "tests2/EasyMockRuleTest.java")
5509
5510 ;; This test fails because the file "easymock.properties" does
5511 ;; not exist.
5512 (delete-file "tests2/EasyMockPropertiesTest.java"))
5513 #t)))))
5514 (inputs
5515 (list java-cglib java-objenesis))
5516 (native-inputs
5517 (list java-junit java-hamcrest-core))
5518 (home-page "https://easymock.org/")
5519 (synopsis "Java library providing mock objects for unit tests")
5520 (description "EasyMock is a Java library that provides an easy way to use
5521mock objects in unit testing.")
5522 (license license:asl2.0)))
5523
5524(define-public java-easymock-3.2
5525 (package
5526 (inherit java-easymock)
5527 (name "java-easymock")
5528 (version "3.2")
5529 (source (origin
5530 (method git-fetch)
5531 (uri (git-reference
5532 (url "https://github.com/easymock/easymock/")
5533 (commit (string-append "easymock-" version))))
5534 (file-name (git-file-name name version))
5535 (sha256
5536 (base32
5537 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
5538 (arguments
5539 (list #:jar-name "easymock.jar"
5540 #:source-dir "easymock/src/main"
5541 #:test-dir "easymock/src/test"
5542 #:phases
5543 #~(modify-phases %standard-phases
5544 (add-after 'unpack 'delete-android-support
5545 (lambda _
5546 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
5547 (substitute* "MocksControl.java"
5548 (("AndroidSupport.isAndroid\\(\\)") "false")
5549 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5550 (delete-file "AndroidClassProxyFactory.java"))))
5551 (add-after 'unpack 'delete-broken-tests
5552 (lambda _
5553 (with-directory-excursion "easymock/src/test/java/org/easymock"
5554 ;; This test depends on dexmaker.
5555 (delete-file "tests2/ClassExtensionHelperTest.java")
5556 ;; This is not a test.
5557 (delete-file "tests/BaseEasyMockRunnerTest.java")
5558 ;; ...but deleting it means that we also have to delete these
5559 ;; dependent files.
5560 (delete-file "tests2/EasyMockRunnerTest.java")
5561 ;; This test fails because the file "easymock.properties" does
5562 ;; not exist.
5563 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
5564
5565(define-public java-easymock-class-extension
5566 (package
5567 (inherit java-easymock-3.2)
5568 (name "java-easymock-class-extension")
5569 (build-system ant-build-system)
5570 (arguments
5571 (list #:jar-name "easymock-class-extensions.jar"
5572 #:source-dir "easymock-classextension/src/main/java"
5573 #:test-dir "easymock-classextension/src/test"))
5574 (inputs (list java-asm-8
5575 java-easymock-3.2
5576 java-cglib
5577 java-objenesis))
5578 (native-inputs
5579 (list java-junit java-hamcrest-core))
5580 (home-page "https://easymock.org/")
5581 (synopsis "Easymock extension to mock classes")
5582 (description "This package provides an extension to earlier versions of
5583easymock that allows mocking classes.")
5584 (license license:asl2.0)))
5585
5586(define-public java-jmock-1
5587 (package
5588 (name "java-jmock")
5589 (version "1.2.0")
5590 (source (origin
5591 (method git-fetch)
5592 (uri (git-reference
5593 (url "https://github.com/jmock-developers/jmock-library")
5594 (commit version)))
5595 (file-name (git-file-name name version))
5596 (sha256
5597 (base32
5598 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5599 (build-system ant-build-system)
5600 (arguments
5601 `(#:build-target "jars"
5602 #:test-target "run.tests"
5603 #:phases
5604 (modify-phases %standard-phases
5605 (replace 'install (install-jars "build")))))
5606 (home-page "http://jmock.org/")
5607 (synopsis "Mock object library for test-driven development")
5608 (description "JMock is a library that supports test-driven development of
5609Java code with mock objects. Mock objects help you design and test the
5610interactions between the objects in your programs.
5611
5612The jMock library
5613
5614@itemize
5615@item makes it quick and easy to define mock objects
5616@item lets you precisely specify the interactions between
5617 your objects, reducing the brittleness of your tests
5618@item plugs into your favourite test framework
5619@item is easy to extend.
5620@end itemize\n")
5621 (license license:bsd-3)))
5622
5623(define-public java-jmock
5624 (package
5625 (inherit java-jmock-1)
5626 (name "java-jmock")
5627 (version "2.8.2")
5628 (source (origin
5629 (method git-fetch)
5630 (uri (git-reference
5631 (url "https://github.com/jmock-developers/jmock-library")
5632 (commit version)))
5633 (file-name (git-file-name name version))
5634 (sha256
5635 (base32
5636 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5637 (inputs
5638 (list java-hamcrest-all java-bsh java-junit))
5639 (native-inputs
5640 `(("cglib" ,java-cglib)))
5641 (arguments
5642 `(#:jar-name "java-jmock.jar"
5643 #:source-dir "jmock/src/main/java"
5644 #:test-dir "jmock/src/test"))))
5645
5646(define-public java-jmock-junit4
5647 (package
5648 (inherit java-jmock)
5649 (name "java-jmock-junit4")
5650 (arguments
5651 `(#:jar-name "java-jmock-junit4.jar"
5652 #:source-dir "jmock-junit4/src/main/java"
5653 #:test-dir "jmock-junit4/src/test"))
5654 (inputs
5655 `(("java-hamcrest-all" ,java-hamcrest-all)
5656 ("java-bsh" ,java-bsh)
5657 ("java-jmock" ,java-jmock)
5658 ("java-jumit" ,java-junit)))))
5659
5660(define-public java-jmock-legacy
5661 (package
5662 (inherit java-jmock)
5663 (name "java-jmock-legacy")
5664 (arguments
5665 `(#:jar-name "java-jmock-legacy.jar"
5666 #:source-dir "jmock-legacy/src/main/java"
5667 #:test-dir "jmock-legacy/src/test"
5668 #:phases
5669 (modify-phases %standard-phases
5670 (add-before 'check 'copy-tests
5671 (lambda _
5672 ;; This file is a dependancy of some tests
5673 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5674 (copy-file (string-append "jmock/src/test/java/" file)
5675 (string-append "jmock-legacy/src/test/java/" file))
5676 #t))))))
5677 (inputs
5678 (list java-hamcrest-all
5679 java-objenesis
5680 java-cglib
5681 java-jmock
5682 java-bsh
5683 java-junit))
5684 (native-inputs
5685 (list java-jmock-junit4))))
5686
5687(define-public java-hamcrest-all
5688 (package (inherit java-hamcrest-core)
5689 (name "java-hamcrest-all")
5690 (properties `((superseded . ,java-hamcrest)))
5691 (arguments
5692 `(#:jdk ,icedtea-8
5693 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5694 ((#:build-target _) "bigjar")
5695 ((#:phases phases)
5696 `(modify-phases ,phases
5697 ;; Some build targets override the classpath, so we need to patch
5698 ;; the build.xml to ensure that required dependencies are on the
5699 ;; classpath.
5700 (add-after 'unpack 'patch-classpath-for-integration
5701 (lambda* (#:key inputs #:allow-other-keys)
5702 (substitute* "build.xml"
5703 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5704 (string-join
5705 (cons line
5706 (append
5707 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5708 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5709 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5710 ";"))
5711 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5712 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5713 "jar$"))))
5714 #t))
5715 (replace 'install
5716 (lambda* (#:key outputs #:allow-other-keys)
5717 (let* ((target (string-append (assoc-ref outputs "out")
5718 "/share/java/"))
5719 (version-suffix
5720 ,(string-append
5721 "-" (package-version java-hamcrest-core) ".jar"))
5722 (install-without-version-suffix
5723 (lambda (jar)
5724 (copy-file jar
5725 (string-append target
5726 (basename jar version-suffix)
5727 ".jar")))))
5728 (mkdir-p target)
5729 (for-each
5730 install-without-version-suffix
5731 (find-files "build"
5732 (lambda (name _)
5733 (and (string-suffix? ".jar" name)
5734 (not (string-suffix? "-sources.jar" name)))))))
5735 #t)))))))
5736 (inputs
5737 (modify-inputs (package-inputs java-hamcrest-core)
5738 (prepend java-junit
5739 java-jmock-1
5740 ;; This is necessary because of what seems to be a race condition.
5741 ;; This package would sometimes fail to build because hamcrest-core.jar
5742 ;; could not be found, even though it is built as part of this package.
5743 ;; Adding java-hamcrest-core appears to fix this problem. See
5744 ;; https://debbugs.gnu.org/31390 for more information.
5745 java-hamcrest-core
5746 java-easymock)))))
5747
5748(define-public java-jopt-simple
5749 (package
5750 (name "java-jopt-simple")
5751 (version "5.0.3")
5752 (source (origin
5753 (method url-fetch)
5754 (uri (string-append "https://repo1.maven.org/maven2/"
5755 "net/sf/jopt-simple/jopt-simple/"
5756 version "/jopt-simple-"
5757 version "-sources.jar"))
5758 (sha256
5759 (base32
5760 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5761 (build-system ant-build-system)
5762 (arguments
5763 `(#:tests? #f ; there are no tests
5764 #:jar-name "jopt-simple.jar"
5765 #:phases
5766 (modify-phases %standard-phases
5767 (add-before 'install 'create-pom
5768 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5769 (replace 'install
5770 (install-from-pom "pom.xml")))))
5771 (home-page "https://jopt-simple.github.io/jopt-simple/")
5772 (synopsis "Java library for parsing command line options")
5773 (description "JOpt Simple is a Java library for parsing command line
5774options, such as those you might pass to an invocation of @code{javac}. In
5775the interest of striving for simplicity, as closely as possible JOpt Simple
5776attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5777GNU @code{getopt_long}. It also aims to make option parser configuration and
5778retrieval of options and their arguments simple and expressive, without being
5779overly clever.")
5780 (license license:expat)))
5781
5782;; Required by jmh
5783(define-public java-jopt-simple-4
5784 (package
5785 (inherit java-jopt-simple)
5786 (version "4.6")
5787 (source (origin
5788 (method url-fetch)
5789 (uri (string-append "https://repo1.maven.org/maven2/"
5790 "net/sf/jopt-simple/jopt-simple/"
5791 version "/jopt-simple-"
5792 version "-sources.jar"))
5793 (sha256
5794 (base32
5795 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5796 (arguments
5797 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5798 ((#:phases phases)
5799 `(modify-phases ,phases
5800 (replace 'create-pom
5801 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5802 ,version))))))))
5803
5804(define-public java-commons-math3
5805 (package
5806 (name "java-commons-math3")
5807 (version "3.6.1")
5808 (source (origin
5809 (method url-fetch)
5810 (uri (string-append "mirror://apache/commons/math/source/"
5811 "commons-math3-" version "-src.tar.gz"))
5812 (sha256
5813 (base32
5814 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5815 (build-system ant-build-system)
5816 (arguments
5817 `(#:build-target "jar"
5818 #:test-target "test"
5819 #:make-flags
5820 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5821 (junit #$(this-package-native-input "java-junit")))
5822 (list (string-append "-Djunit.jar="
5823 (car (find-files junit "jar$")))
5824 (string-append "-Dhamcrest.jar="
5825 (car (find-files hamcrest ".*.jar$")))))
5826 #:phases
5827 (modify-phases %standard-phases
5828 ;; We want to build the jar in the build phase and run the tests
5829 ;; later in a separate phase.
5830 (add-after 'unpack 'untangle-targets
5831 (lambda _
5832 (substitute* "build.xml"
5833 (("name=\"jar\" depends=\"test\"")
5834 "name=\"jar\" depends=\"compile\""))))
5835 ;; There is no install target.
5836 (replace 'install
5837 (install-from-pom "pom.xml")))))
5838 (native-inputs
5839 (list java-junit java-hamcrest-core))
5840 (home-page "https://commons.apache.org/math/")
5841 (synopsis "Apache Commons mathematics library")
5842 (description "Commons Math is a library of lightweight, self-contained
5843mathematics and statistics components addressing the most common problems not
5844available in the Java programming language or Commons Lang.")
5845 (license license:asl2.0)))
5846
5847(define-public java-jmh
5848 (package
5849 (name "java-jmh")
5850 (version "1.32")
5851 (source (origin
5852 (method git-fetch)
5853 (uri (git-reference
5854 (url "https://github.com/openjdk/jmh")
5855 (commit version)))
5856 (file-name (git-file-name name version))
5857 (sha256
5858 (base32
5859 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5860 (build-system maven-build-system)
5861 (arguments
5862 `(#:exclude
5863 (("org.apache.maven.plugins" .
5864 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5865 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5866 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5867 ("org.apache.maven.wagon" . ("wagon-ssh")))
5868 #:maven-plugins
5869 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5870 ,@(default-maven-plugins))
5871 #:phases
5872 (modify-phases %standard-phases
5873 (add-after 'unpack 'remove-unnecessary
5874 (lambda _
5875 ;; requires org.apache.maven.archetype:archetype-packaging.
5876 ;; Its subprojects also require groovy, kotlin and scala,
5877 ;; respectively.
5878 (delete-file-recursively "jmh-archetypes"))))))
5879 (propagated-inputs
5880 (list java-jopt-simple-4 java-commons-math3))
5881 (native-inputs
5882 (list java-junit java-hamcrest-core))
5883 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5884 (synopsis "Benchmark harness for the JVM")
5885 (description "JMH is a Java harness for building, running, and analysing
5886nano/micro/milli/macro benchmarks written in Java and other languages
5887targeting the JVM.")
5888 ;; GPLv2 only
5889 (license license:gpl2)))
5890
5891(define-public java-commons-collections4
5892 (package
5893 (name "java-commons-collections4")
5894 (version "4.1")
5895 (source (origin
5896 (method url-fetch)
5897 (uri (string-append "mirror://apache/commons/collections/source/"
5898 "commons-collections4-" version "-src.tar.gz"))
5899 (sha256
5900 (base32
5901 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5902 (build-system ant-build-system)
5903 (arguments
5904 `(#:test-target "test"
5905 #:make-flags
5906 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5907 (junit #$(this-package-native-input "java-junit"))
5908 (easymock #$(this-package-native-input "java-easymock")))
5909 (list (string-append "-Djunit.jar="
5910 (car (find-files junit "jar$")))
5911 (string-append "-Dhamcrest.jar="
5912 (car (find-files hamcrest "jar$")))
5913 (string-append "-Deasymock.jar=" easymock
5914 "/share/java/easymock.jar")))
5915 #:phases
5916 (modify-phases %standard-phases
5917 (replace 'install
5918 (install-jars "target")))))
5919 (native-inputs
5920 (list java-junit java-hamcrest-core java-easymock))
5921 (home-page "https://commons.apache.org/collections/")
5922 (synopsis "Collections framework")
5923 (description "The Java Collections Framework is the recognised standard
5924for collection handling in Java. Commons-Collections seek to build upon the
5925JDK classes by providing new interfaces, implementations and utilities. There
5926are many features, including:
5927
5928@itemize
5929@item @code{Bag} interface for collections that have a number of copies of
5930 each object
5931@item @code{BidiMap} interface for maps that can be looked up from value to
5932 key as well and key to value
5933@item @code{MapIterator} interface to provide simple and quick iteration over
5934 maps
5935@item Transforming decorators that alter each object as it is added to the
5936 collection
5937@item Composite collections that make multiple collections look like one
5938@item Ordered maps and sets that retain the order elements are added in,
5939 including an LRU based map
5940@item Reference map that allows keys and/or values to be garbage collected
5941 under close control
5942@item Many comparator implementations
5943@item Many iterator implementations
5944@item Adapter classes from array and enumerations to collections
5945@item Utilities to test or create typical set-theory properties of collections
5946 such as union, intersection, and closure.
5947@end itemize\n")
5948 (license license:asl2.0)))
5949
5950(define-public java-commons-collections
5951 (package
5952 (inherit java-commons-collections4)
5953 (name "java-commons-collections")
5954 (version "3.2.2")
5955 (source (origin
5956 (method url-fetch)
5957 (uri (string-append "mirror://apache/commons/collections/source/"
5958 "commons-collections-" version "-src.tar.gz"))
5959 (sha256
5960 (base32
5961 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5962 (patches
5963 (search-patches "java-commons-collections-fix-java8.patch"))))
5964 (arguments
5965 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5966 ((#:phases phases)
5967 `(modify-phases ,phases
5968 ;; The manifest is required by the build procedure
5969 (add-before 'build 'add-manifest
5970 (lambda _
5971 (mkdir-p "build/conf")
5972 (call-with-output-file "build/conf/MANIFEST.MF"
5973 (lambda (file)
5974 (format file "Manifest-Version: 1.0\n")))
5975 #t))
5976 (replace 'install
5977 (install-jars "build"))))))))
5978
5979(define java-commons-collections-test-classes
5980 (package
5981 (inherit java-commons-collections)
5982 (arguments
5983 `(#:jar-name "commons-collections-test-classes.jar"
5984 #:source-dir "src/test"
5985 #:tests? #f))
5986 (inputs
5987 `(("collection" ,java-commons-collections)))))
5988
5989(define-public java-commons-beanutils
5990 (package
5991 (name "java-commons-beanutils")
5992 (version "1.9.3")
5993 (source (origin
5994 (method url-fetch)
5995 (uri (string-append "mirror://apache/commons/beanutils/source/"
5996 "commons-beanutils-" version "-src.tar.gz"))
5997 (sha256
5998 (base32
5999 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
6000 (build-system ant-build-system)
6001 (arguments
6002 `(#:test-target "test"
6003 #:tests? #f
6004 #:phases
6005 (modify-phases %standard-phases
6006 (replace 'install
6007 (lambda* (#:key outputs #:allow-other-keys)
6008 (rename-file (string-append "dist/commons-beanutils-" ,version
6009 "-SNAPSHOT.jar")
6010 "commons-beanutils.jar")
6011 (install-file "commons-beanutils.jar"
6012 (string-append (assoc-ref outputs "out") "/share/java/"))
6013 #t)))))
6014 (inputs
6015 `(("logging" ,java-commons-logging-minimal)
6016 ("collections" ,java-commons-collections)))
6017 (native-inputs
6018 `(("junit" ,java-junit)
6019 ("collections-test" ,java-commons-collections-test-classes)))
6020 (home-page "https://commons.apache.org/beanutils/")
6021 (synopsis "Dynamically set or get properties in Java")
6022 (description "BeanUtils provides a simplified interface to reflection and
6023introspection to set or get dynamically determined properties through their
6024setter and getter method.")
6025 (license license:asl2.0)))
6026
6027(define-public java-commons-io
6028 (package
6029 (name "java-commons-io")
6030 (version "2.5")
6031 (source
6032 (origin
6033 (method url-fetch)
6034 (uri (string-append "mirror://apache/commons/io/source/"
6035 "commons-io-" version "-src.tar.gz"))
6036 (sha256
6037 (base32
6038 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6039 (build-system ant-build-system)
6040 (outputs '("out" "doc"))
6041 (arguments
6042 `(#:test-target "test"
6043 #:make-flags
6044 ,#~(list (string-append "-Djunit.jar="
6045 (car (find-files #$(this-package-native-input "java-junit")
6046 "jar$"))))
6047 #:phases
6048 (modify-phases %standard-phases
6049 (add-after 'build 'build-javadoc ant-build-javadoc)
6050 (replace 'install (install-from-pom "pom.xml"))
6051 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6052 (native-inputs
6053 (list java-junit java-hamcrest-core))
6054 (propagated-inputs
6055 (list apache-commons-parent-pom-39))
6056 (home-page "https://commons.apache.org/io/")
6057 (synopsis "Common useful IO related classes")
6058 (description "Commons-IO contains utility classes, stream implementations,
6059file filters and endian classes.")
6060 (license license:asl2.0)))
6061
6062(define-public java-commons-io-latest
6063 (package
6064 (inherit java-commons-io)
6065 (version "2.21.0")
6066 (source
6067 (origin
6068 (method url-fetch)
6069 (uri (string-append "mirror://apache/commons/io/source/"
6070 "commons-io-" version "-src.tar.gz"))
6071 (sha256
6072 (base32
6073 "0rr6hb8mm7fd6nrr8f81mvdpfalq01k03l3mzrlxx7g7lda40mb3"))))
6074 (outputs '("out"))
6075 (arguments
6076 `(#:tests? #f ;; tests require too many not yet packaged packages
6077 #:source-dir "src/main/java"
6078 #:jar-name "commons-io.jar"
6079 #:phases
6080 (modify-phases %standard-phases
6081 (replace 'install (install-from-pom "pom.xml")))))
6082 (native-inputs
6083 (list))
6084 (propagated-inputs
6085 (list apache-commons-parent-pom-78))))
6086
6087(define-public java-commons-exec-1.1
6088 (package
6089 (name "java-commons-exec")
6090 (version "1.1")
6091 (source
6092 (origin
6093 (method url-fetch)
6094 (uri (string-append "mirror://apache/commons/exec/source/"
6095 "commons-exec-" version "-src.tar.gz"))
6096 (sha256
6097 (base32
6098 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6099 (build-system ant-build-system)
6100 (arguments
6101 `(#:test-target "test"
6102 #:make-flags
6103 ,#~(list (string-append "-Dmaven.junit.jar="
6104 (car (find-files #$(this-package-native-input "java-junit")
6105 "jar$"))))
6106 #:phases
6107 (modify-phases %standard-phases
6108 (add-before 'build 'delete-network-tests
6109 (lambda _
6110 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6111 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6112 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6113 #t))
6114 ;; The "build" phase automatically tests.
6115 (delete 'check)
6116 (replace 'install (install-jars "target")))))
6117 (native-inputs
6118 (list java-junit))
6119 (home-page "https://commons.apache.org/proper/commons-exec/")
6120 (synopsis "Common program execution related classes")
6121 (description "Commons-Exec simplifies executing external processes.")
6122 (license license:asl2.0)))
6123
6124(define-public java-commons-exec
6125 (package
6126 (inherit java-commons-exec-1.1)
6127 (version "1.3")
6128 (source
6129 (origin
6130 (method url-fetch)
6131 (uri (string-append "mirror://apache/commons/exec/source/"
6132 "commons-exec-" version "-src.tar.gz"))
6133 (sha256
6134 (base32
6135 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6136 (arguments
6137 `(#:test-target "test"
6138 #:make-flags
6139 ,#~(list (string-append "-Dmaven.junit.jar="
6140 (car (find-files #$(this-package-native-input "java-junit")
6141 "jar$")))
6142 "-Dmaven.compiler.source=1.7"
6143 "-Dmaven.compiler.target=1.7")
6144 #:phases
6145 (modify-phases %standard-phases
6146 (add-before 'build 'delete-network-tests
6147 (lambda* (#:key inputs #:allow-other-keys)
6148 ;; This test hangs indefinitely.
6149 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6150 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6151 (("ping -c 10 127.0.0.1") "sleep 10"))
6152 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6153 (("/bin/ls") "ls"))
6154 (call-with-output-file "src/test/scripts/ping.sh"
6155 (lambda (port)
6156 (format port "#!~a/bin/sh\nsleep $1\n"
6157 (assoc-ref inputs "bash"))))
6158 #t))
6159 ;; The "build" phase automatically tests.
6160 (delete 'check)
6161 (replace 'install (install-jars "target")))))
6162 (native-inputs
6163 (list java-junit java-hamcrest-core))))
6164
6165(define-public java-commons-lang
6166 (package
6167 (name "java-commons-lang")
6168 (version "2.6")
6169 (source
6170 (origin
6171 (method url-fetch)
6172 (uri (string-append "mirror://apache/commons/lang/source/"
6173 "commons-lang-" version "-src.tar.gz"))
6174 (sha256
6175 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6176 (build-system ant-build-system)
6177 (outputs '("out" "doc"))
6178 (arguments
6179 `(#:test-target "test"
6180 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6181 #:phases
6182 (modify-phases %standard-phases
6183 (add-after 'build 'build-javadoc ant-build-javadoc)
6184 (add-before 'check 'disable-failing-test
6185 (lambda _
6186 ;; Disable a failing test
6187 (substitute* "src/test/java/org/apache/commons/lang/\
6188time/FastDateFormatTest.java"
6189 (("public void testFormat\\(\\)")
6190 "public void disabled_testFormat()"))
6191 #t))
6192 (replace 'install (install-jars "target"))
6193 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6194 (native-inputs
6195 (list java-junit))
6196 (home-page "https://commons.apache.org/lang/")
6197 (synopsis "Extension of the java.lang package")
6198 (description "The Commons Lang components contains a set of Java classes
6199that provide helper methods for standard Java classes, especially those found
6200in the @code{java.lang} package in the Sun JDK. The following classes are
6201included:
6202
6203@itemize
6204@item StringUtils - Helper for @code{java.lang.String}.
6205@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6206 of characters such as @code{[a-z]} and @code{[abcdez]}.
6207@item RandomStringUtils - Helper for creating randomised strings.
6208@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6209@item NumberRange - A range of numbers with an upper and lower bound.
6210@item ObjectUtils - Helper for @code{java.lang.Object}.
6211@item SerializationUtils - Helper for serializing objects.
6212@item SystemUtils - Utility class defining the Java system properties.
6213@item NestedException package - A sub-package for the creation of nested
6214 exceptions.
6215@item Enum package - A sub-package for the creation of enumerated types.
6216@item Builder package - A sub-package for the creation of @code{equals},
6217 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6218@end itemize\n")
6219 (license license:asl2.0)))
6220
6221(define-public java-commons-lang3
6222 (package
6223 (name "java-commons-lang3")
6224 (version "3.20.0")
6225 (source
6226 (origin
6227 (method url-fetch)
6228 (uri (string-append "mirror://apache/commons/lang/source/"
6229 "commons-lang3-" version "-src.tar.gz"))
6230 (sha256
6231 (base32 "05b2zfmw1y6bnzf7v32zkhix0c0sab82lmr3ilxciza0l5w6nwya"))))
6232 (build-system ant-build-system)
6233 (arguments
6234 `(#:jar-name "commons-lang3.jar"
6235 #:source-dir "src/main/java"
6236 #:tests? #f; require junit5
6237 #:phases
6238 (modify-phases %standard-phases
6239 (replace 'install (install-from-pom "pom.xml")))))
6240 (propagated-inputs
6241 (list apache-commons-parent-pom-48))
6242 (home-page "https://commons.apache.org/lang/")
6243 (synopsis "Extension of the java.lang package")
6244 (description "The Commons Lang components contains a set of Java classes
6245that provide helper methods for standard Java classes, especially those found
6246in the @code{java.lang} package. The following classes are included:
6247
6248@itemize
6249@item StringUtils - Helper for @code{java.lang.String}.
6250@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6251 characters such as @code{[a-z]} and @code{[abcdez]}.
6252@item RandomStringUtils - Helper for creating randomised strings.
6253@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6254@item NumberRange - A range of numbers with an upper and lower bound.
6255@item ObjectUtils - Helper for @code{java.lang.Object}.
6256@item SerializationUtils - Helper for serializing objects.
6257@item SystemUtils - Utility class defining the Java system properties.
6258@item NestedException package - A sub-package for the creation of nested
6259 exceptions.
6260@item Enum package - A sub-package for the creation of enumerated types.
6261@item Builder package - A sub-package for the creation of @code{equals},
6262 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6263@end itemize\n")
6264 (license license:asl2.0)))
6265
6266(define-public java-commons-bsf
6267 (package
6268 (name "java-commons-bsf")
6269 (version "2.4.0")
6270 (source (origin
6271 (method url-fetch)
6272 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6273 version ".tar.gz"))
6274 (sha256
6275 (base32
6276 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6277 (modules '((guix build utils)))
6278 (snippet
6279 '(begin
6280 (for-each delete-file
6281 (find-files "." "\\.jar$"))
6282 #t))))
6283 (build-system ant-build-system)
6284 (arguments
6285 `(#:build-target "jar"
6286 #:tests? #f; No test file
6287 #:modules ((guix build ant-build-system)
6288 (guix build utils)
6289 (guix build java-utils)
6290 (sxml simple))
6291 #:phases
6292 (modify-phases %standard-phases
6293 (add-before 'build 'create-properties
6294 (lambda _
6295 ;; This file is missing from the distribution
6296 (call-with-output-file "build-properties.xml"
6297 (lambda (port)
6298 (sxml->xml
6299 `(project (@ (basedir ".") (name "build-properties") (default ""))
6300 (property (@ (name "project.name") (value "bsf")))
6301 (property (@ (name "source.level") (value "1.5")))
6302 (property (@ (name "build.lib") (value "build/jar")))
6303 (property (@ (name "src.dir") (value "src")))
6304 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6305 (property (@ (name "build.tests") (value "build/test-classes")))
6306 (property (@ (name "build.dest") (value "build/classes"))))
6307 port)))
6308 #t))
6309 (replace 'install (install-jars "build")))))
6310 (native-inputs
6311 (list java-junit))
6312 (inputs
6313 (list java-commons-logging-minimal))
6314 (home-page "https://commons.apache.org/proper/commons-bsf")
6315 (synopsis "Bean Scripting Framework")
6316 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6317which provides scripting language support within Java applications, and access
6318to Java objects and methods from scripting languages. BSF allows one to write
6319JSPs in languages other than Java while providing access to the Java class
6320library. In addition, BSF permits any Java application to be implemented in
6321part (or dynamically extended) by a language that is embedded within it. This
6322is achieved by providing an API that permits calling scripting language engines
6323from within Java, as well as an object registry that exposes Java objects to
6324these scripting language engines.")
6325 (properties '((upstream-name . "bsf")))
6326 (license license:asl2.0)))
6327
6328(define-public java-commons-jxpath
6329 (package
6330 (name "java-commons-jxpath")
6331 (version "1.3")
6332 (source (origin
6333 (method url-fetch)
6334 (uri (string-append "mirror://apache/commons/jxpath/source/"
6335 "commons-jxpath-" version "-src.tar.gz"))
6336 (sha256
6337 (base32
6338 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6339 (build-system ant-build-system)
6340 (arguments
6341 `(#:jar-name "commons-jxpath.jar"
6342 ;; tests require more dependencies, including mockrunner which depends on old software
6343 #:tests? #f
6344 #:source-dir "src/java"))
6345 (inputs
6346 `(("servlet" ,java-classpathx-servletapi)
6347 ("java-jdom" ,java-jdom)
6348 ("java-commons-beanutils" ,java-commons-beanutils)))
6349 (native-inputs
6350 (list java-junit))
6351 (home-page "https://commons.apache.org/jxpath/")
6352 (synopsis "Simple interpreter of an expression language called XPath")
6353 (description "The org.apache.commons.jxpath package defines a simple
6354interpreter of an expression language called XPath. JXPath applies XPath
6355expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6356contexts, DOM etc, including mixtures thereof.")
6357 (license license:asl2.0)))
6358
6359(define-public java-commons-pool
6360 (package
6361 (name "java-commons-pool")
6362 (version "2.6.2")
6363 (source (origin
6364 (method url-fetch)
6365 (uri (string-append "mirror://apache/commons/pool/source/"
6366 "commons-pool2-" version "-src.tar.gz"))
6367 (sha256
6368 (base32
6369 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6370 (arguments
6371 `(#:jar-name "common-pool.jar"
6372 #:source-dir "src/main/java"
6373 #:test-exclude
6374 (list "**/PerformanceTest.java")))
6375 (build-system ant-build-system)
6376 (inputs
6377 (list java-cglib))
6378 (native-inputs
6379 (list java-junit java-hamcrest-core java-asm java-objenesis))
6380 (home-page "https://commons.apache.org/proper/commons-pool/")
6381 (synopsis "Object-pooling API in Java")
6382 (description "The commons-pool package provides an object-pooling API
6383and a number of object pool implementations. This package defines a
6384handful of pooling interfaces and some base classes that may be useful when
6385creating new pool implementations.")
6386 (properties '((upstream-name . "commons-pool2")))
6387 (license license:asl2.0)))
6388
6389(define-public java-commons-dbcp
6390 (package
6391 (name "java-commons-dbcp")
6392 (version "2.6.0")
6393 (source (origin
6394 (method url-fetch)
6395 (uri (string-append "mirror://apache/commons/dbcp/source/"
6396 "commons-dbcp2-" version "-src.tar.gz"))
6397 (sha256
6398 (base32
6399 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6400 (arguments
6401 `(#:source-dir "src/main/java"
6402 #:jar-name "java-commons-dbcp.jar"
6403 #:tests? #f)); requires apache-geronimo
6404 (inputs
6405 `(("java-commons-pool" ,java-commons-pool)
6406 ("java-commons-logging" ,java-commons-logging-minimal)
6407 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6408 (native-inputs
6409 (list java-junit))
6410 (build-system ant-build-system)
6411 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6412 (synopsis "Database Connection Pool for Java")
6413 (description "Commons-dbcp allows you to share a pool of database
6414connections between users. Creating a new connection for each user can be
6415time consuming and even unfeasible when the number of simultaneous users is
6416very large. This package provides a way to share a poole of connections to
6417reduce that load.")
6418 (properties '((upstream-name . "commons-dbcp2")))
6419 (license license:asl2.0)))
6420
6421(define-public java-commons-jcs
6422 (package
6423 (name "java-commons-jcs")
6424 (version "3.1")
6425 (source (origin
6426 (method url-fetch)
6427 (uri (string-append "mirror://apache/commons/jcs/source/"
6428 "commons-jcs3-dist-" version "-src.tar.gz"))
6429 (sha256
6430 (base32
6431 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6432 (build-system ant-build-system)
6433 (arguments
6434 `(#:jar-name "commons-jcs.jar"
6435 #:source-dir "commons-jcs-core/src/main/java"
6436 #:test-dir "commons-jcs-core/src/test"
6437 #:tests? #f; requires hsqldb
6438 #:phases
6439 (modify-phases %standard-phases
6440 (add-before 'build 'copy-resources
6441 (lambda _
6442 (copy-recursively "commons-jcs-core/src/main/resources"
6443 "build/classes"))))))
6444 (propagated-inputs
6445 (list java-classpathx-servletapi
6446 java-commons-dbcp
6447 java-httpcomponents-httpclient
6448 java-httpcomponents-httpcore
6449 java-log4j-api))
6450 (native-inputs
6451 (list java-junit))
6452 (home-page "https://commons.apache.org/proper/commons-jcs/")
6453 (synopsis "Distributed caching system in Java")
6454 (description "JCS is a distributed caching system written in Java. It
6455is intended to speed up applications by providing a means to manage cached
6456data of various dynamic natures. Like any caching system, JCS is most useful
6457for high read, low put applications. Latency times drop sharply and
6458bottlenecks move away from the database in an effectively cached system.")
6459 (properties '((upstream-name . "commons-jcs3-dist")))
6460 (license license:asl2.0)))
6461
6462(define-public java-jsr250
6463 (package
6464 (name "java-jsr250")
6465 (version "1.3")
6466 (source (origin
6467 (method git-fetch)
6468 (uri (git-reference
6469 (url "https://github.com/javaee/javax.annotation")
6470 (commit version)))
6471 (file-name (git-file-name name version))
6472 (sha256
6473 (base32
6474 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6475 (build-system ant-build-system)
6476 (arguments
6477 `(#:tests? #f ; no tests included
6478 #:jdk ,icedtea-8
6479 #:jar-name "jsr250.jar"
6480 #:phases
6481 (modify-phases %standard-phases
6482 (replace 'install
6483 (install-from-pom "pom.xml")))))
6484 (propagated-inputs (list java-jvnet-parent-pom-3))
6485 (home-page "https://jcp.org/en/jsr/detail?id=250")
6486 (synopsis "Security-related annotations")
6487 (description "This package provides annotations for security. It provides
6488packages in the @code{javax.annotation} and @code{javax.annotation.security}
6489namespaces.")
6490 ;; either cddl or gpl2 only, with classpath exception
6491 (license (list license:cddl1.0
6492 license:gpl2))))
6493
6494(define-public java-jsr305
6495 (package
6496 (name "java-jsr305")
6497 (version "3.0.1")
6498 (source (origin
6499 (method url-fetch)
6500 (uri (string-append "https://repo1.maven.org/maven2/"
6501 "com/google/code/findbugs/"
6502 "jsr305/" version "/jsr305-"
6503 version "-sources.jar"))
6504 (sha256
6505 (base32
6506 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6507 (build-system ant-build-system)
6508 (arguments
6509 `(#:tests? #f ; no tests included
6510 #:jar-name "jsr305.jar"
6511 #:phases
6512 (modify-phases %standard-phases
6513 (add-before 'install 'create-pom
6514 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6515 (replace 'install
6516 (install-from-pom "pom.xml")))))
6517 (home-page "https://findbugs.sourceforge.net/")
6518 (synopsis "Annotations for the static analyzer called findbugs")
6519 (description "This package provides annotations for the findbugs package.
6520It provides packages in the @code{javax.annotations} namespace.")
6521 (license license:asl2.0)))
6522
6523(define-public java-error-prone-annotations
6524 (package
6525 (name "java-error-prone-annotations")
6526 (version "2.18.0")
6527 (source (origin
6528 (method git-fetch)
6529 (uri (git-reference
6530 (url "https://github.com/google/error-prone")
6531 (commit (string-append "v" version))))
6532 (file-name (git-file-name "java-error-prone" version))
6533 (sha256
6534 (base32
6535 "19sqsz0b308rhadr3ff10azdbqjq37nvrn9c06224dwpxap0931f"))))
6536 (build-system ant-build-system)
6537 (arguments
6538 `(#:tests? #f; no tests
6539 #:jar-name (string-append ,name "-" ,version ".jar")
6540 #:source-dir "annotations/src/main/java"
6541 #:test-dir "annotations/src/altest"
6542 #:phases
6543 (modify-phases %standard-phases
6544 (replace 'install (install-from-pom "annotations/pom.xml")))))
6545 (propagated-inputs (list java-error-prone-parent-pom java-jsr305))
6546 (home-page "https://errorprone.info")
6547 (synopsis "Java static analyzer at compile-time")
6548 (description "Error Prone is a static analysis tool for Java that catches
6549common programming mistakes at compile-time. This package contains annotations
6550used by programmers to guide the static analysis.")
6551 (license license:asl2.0)))
6552
6553(define java-error-prone-parent-pom
6554 (package
6555 (inherit java-error-prone-annotations)
6556 (name "java-error-prone-parent-pom")
6557 (arguments
6558 `(#:tests? #f
6559 #:phases
6560 (modify-phases %standard-phases
6561 (delete 'configure)
6562 (delete 'build)
6563 (replace 'install
6564 (install-pom-file "pom.xml")))))
6565 (propagated-inputs '())))
6566
6567(define-public java-guava
6568 (package
6569 (name "java-guava")
6570 (version "31.1")
6571 (source (origin
6572 (method git-fetch)
6573 (uri (git-reference
6574 (url "https://github.com/google/guava/")
6575 (commit (string-append "v" version))))
6576 (file-name (git-file-name name version))
6577 (sha256
6578 (base32
6579 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
6580 (patches
6581 (search-patches "java-guava-remove-annotation-deps.patch"))))
6582 (build-system ant-build-system)
6583 (arguments
6584 `(#:tests? #f ; no tests included
6585 #:jar-name "guava.jar"
6586 #:source-dir "guava/src"
6587 #:phases
6588 (modify-phases %standard-phases
6589 (add-after 'unpack 'trim-sources
6590 (lambda _
6591 (with-directory-excursion "guava/src/com/google/common"
6592 ;; Remove annotations to avoid extra dependencies:
6593 ;; * "j2objc" annotations are used when converting Java to
6594 ;; Objective C;
6595 ;; * "IgnoreJRERequirement" is used for Android.
6596 ;; * "Nullable" is used to catch NPE at build time.
6597 (substitute* (find-files "." "\\.java$")
6598 (("import com.google.j2objc.*") "")
6599 (("import org.checkerframework.checker.*") "")
6600 (("@ReflectionSupport.*") "")
6601 (("@WeakOuter") "")
6602 (("@RetainedWith") "")
6603 (("@Weak") "")
6604 (("@J2ObjCIncompatible") "")
6605 (("@IgnoreJRERequirement") "")
6606 (("@Nullable") "")))))
6607 ;; This is required by guava, but this is just an empty stub
6608 (add-before 'install 'install-listenablefuture-stub
6609 (install-pom-file "futures/listenablefuture9999/pom.xml"))
6610 (replace 'install (install-from-pom "guava/pom.xml")))))
6611 (inputs
6612 (list java-error-prone-annotations java-jsr305))
6613 (propagated-inputs
6614 (list java-guava-futures-failureaccess java-guava-parent-pom))
6615 (home-page "https://github.com/google/guava")
6616 (synopsis "Google core libraries for Java")
6617 (description "Guava is a set of core libraries that includes new
6618collection types (such as multimap and multiset), immutable collections, a
6619graph library, functional types, an in-memory cache, and APIs/utilities for
6620concurrency, I/O, hashing, primitives, reflection, string processing, and much
6621more!")
6622 (license license:asl2.0)))
6623
6624(define-public java-guava-futures-failureaccess
6625 (package
6626 (inherit java-guava)
6627 (name "java-guava-futures-failureaccess")
6628 (arguments
6629 `(#:tests? #f; no tests
6630 #:jar-name "guava-futures-failureaccess.jar"
6631 #:source-dir "futures/failureaccess/src"
6632 #:phases
6633 (modify-phases %standard-phases
6634 (replace 'install
6635 (install-from-pom "futures/failureaccess/pom.xml")))))
6636 (propagated-inputs
6637 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6638
6639(define java-guava-parent-pom
6640 (package
6641 (inherit java-guava)
6642 (name "java-guava-parent-pom")
6643 (arguments
6644 `(#:tests? #f
6645 #:phases
6646 (modify-phases %standard-phases
6647 (delete 'configure)
6648 (delete 'build)
6649 (replace 'install
6650 (install-pom-file "pom.xml")))))
6651 (propagated-inputs
6652 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6653
6654;; The java-commons-logging package provides adapters to many different
6655;; logging frameworks. To avoid an excessive dependency graph we try to build
6656;; it with only a minimal set of adapters.
6657(define-public java-commons-logging-minimal
6658 (package
6659 (name "java-commons-logging-minimal")
6660 (version "1.2")
6661 (source (origin
6662 (method url-fetch)
6663 (uri (string-append "mirror://apache/commons/logging/source/"
6664 "commons-logging-" version "-src.tar.gz"))
6665 (sha256
6666 (base32
6667 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6668 (build-system ant-build-system)
6669 (arguments
6670 `(#:tests? #f ; avoid dependency on logging frameworks
6671 #:jar-name "commons-logging-minimal.jar"
6672 #:phases
6673 (modify-phases %standard-phases
6674 (add-after 'unpack 'delete-adapters-and-tests
6675 (lambda _
6676 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6677 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6678 ;; is used by applications; SimpleLog is the only actually usable
6679 ;; implementation that does not depend on another logging
6680 ;; framework.
6681 (for-each
6682 (lambda (file)
6683 (delete-file (string-append
6684 "src/main/java/org/apache/commons/logging/impl/" file)))
6685 (list "Jdk13LumberjackLogger.java"
6686 "WeakHashtable.java"
6687 "Log4JLogger.java"
6688 "ServletContextCleaner.java"
6689 "Jdk14Logger.java"
6690 "AvalonLogger.java"
6691 "LogKitLogger.java"))
6692 (delete-file-recursively "src/test")
6693 #t)))))
6694 (home-page "https://commons.apache.org/logging/")
6695 (synopsis "Common API for logging implementations")
6696 (description "The Logging package is a thin bridge between different
6697logging implementations. A library that uses the commons-logging API can be
6698used with any logging implementation at runtime.")
6699 (properties '((upstream-name . "commons-logging")))
6700 (license license:asl2.0)))
6701
6702;; This is the last release of the 1.x series.
6703(define-public java-mockito-1
6704 (package
6705 (name "java-mockito")
6706 (version "1.10.19")
6707 (source (origin
6708 (method url-fetch)
6709 (uri (string-append "https://repo1.maven.org/maven2/"
6710 "org/mockito/mockito-core/" version
6711 "/mockito-core-" version "-sources.jar"))
6712 (sha256
6713 (base32
6714 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6715 (build-system ant-build-system)
6716 (arguments
6717 `(#:jar-name "mockito.jar"
6718 #:tests? #f ; no tests included
6719 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6720 ;; patches in build phases.
6721 #:phases
6722 (modify-phases %standard-phases
6723 ;; Mockito was developed against a different version of hamcrest,
6724 ;; which does not require matcher implementations to provide an
6725 ;; implementation of the "describeMismatch" method. We add this
6726 ;; simple definition to pass the build with our version of hamcrest.
6727 (add-after 'unpack 'fix-hamcrest-build-error
6728 (lambda _
6729 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6730 (("public Matcher getActualMatcher\\(\\) .*" line)
6731 (string-append "
6732 public void describeMismatch(Object item, Description description) {
6733 actualMatcher.describeMismatch(item, description);
6734 }"
6735 line)))
6736 #t))
6737 ;; Mockito bundles cglib. We have a cglib package, so let's use
6738 ;; that instead.
6739 (add-after 'unpack 'use-system-libraries
6740 (lambda _
6741 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6742 (substitute* '("CGLIBHacker.java"
6743 "CglibMockMaker.java"
6744 "ClassImposterizer.java"
6745 "DelegatingMockitoMethodProxy.java"
6746 "MethodInterceptorFilter.java"
6747 "MockitoNamingPolicy.java"
6748 "SerializableMockitoMethodProxy.java"
6749 "SerializableNoOp.java")
6750 (("import org.mockito.cglib") "import net.sf.cglib")))
6751 #t)))))
6752 (inputs
6753 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6754 (home-page "http://mockito.org")
6755 (synopsis "Mockito is a mock library for Java")
6756 (description "Mockito is a mocking library for Java which lets you write
6757tests with a clean and simple API. It generates mocks using reflection, and
6758it records all mock invocations, including methods arguments.")
6759 (license license:asl2.0)))
6760
6761(define-public java-httpcomponents-httpcore
6762 (package
6763 (name "java-httpcomponents-httpcore")
6764 (version "4.4.6")
6765 (source (origin
6766 (method url-fetch)
6767 (uri (string-append "mirror://apache/httpcomponents/httpcore/"
6768 "source/httpcomponents-core-"
6769 version "-src.tar.gz"))
6770 (sha256
6771 (base32
6772 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6773 (build-system ant-build-system)
6774 (arguments
6775 `(#:jar-name "httpcomponents-httpcore.jar"
6776 #:phases
6777 (modify-phases %standard-phases
6778 (add-after 'unpack 'chdir
6779 (lambda _ (chdir "httpcore") #t)))))
6780 (inputs
6781 (list java-commons-logging-minimal java-commons-lang3))
6782 (native-inputs
6783 (list java-junit java-mockito-1))
6784 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6785 (synopsis "Low level HTTP transport components")
6786 (description "HttpCore is a set of low level HTTP transport components
6787that can be used to build custom client and server side HTTP services with a
6788minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6789on the classic Java I/O and non-blocking, event driven I/O model based on Java
6790NIO.
6791
6792This package provides the blocking I/O model library.")
6793 (license license:asl2.0)))
6794
6795(define-public java-httpcomponents-httpcore-nio
6796 (package (inherit java-httpcomponents-httpcore)
6797 (name "java-httpcomponents-httpcore-nio")
6798 (arguments
6799 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6800 #:phases
6801 (modify-phases %standard-phases
6802 (add-after 'unpack 'chdir
6803 (lambda _ (chdir "httpcore-nio") #t)))))
6804 (inputs
6805 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6806 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6807 (description "HttpCore is a set of low level HTTP transport components
6808that can be used to build custom client and server side HTTP services with a
6809minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6810on the classic Java I/O and non-blocking, event driven I/O model based on Java
6811NIO.
6812
6813This package provides the non-blocking I/O model library based on Java
6814NIO.")))
6815
6816(define-public java-httpcomponents-httpcore-ab
6817 (package (inherit java-httpcomponents-httpcore)
6818 (name "java-httpcomponents-httpcore-ab")
6819 (arguments
6820 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6821 #:phases
6822 (modify-phases %standard-phases
6823 (add-after 'unpack 'chdir
6824 (lambda _ (chdir "httpcore-ab") #t)))))
6825 (inputs
6826 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6827 (prepend java-httpcomponents-httpcore java-commons-cli
6828 java-hamcrest-core)))
6829 (synopsis "Apache HttpCore benchmarking tool")
6830 (description "This package provides the HttpCore benchmarking tool. It is
6831an Apache AB clone based on HttpCore.")))
6832
6833(define-public java-httpcomponents-httpcore-osgi
6834 (package (inherit java-httpcomponents-httpcore)
6835 (name "java-httpcomponents-httpcore-osgi")
6836 (arguments
6837 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
6838 #:phases
6839 (modify-phases %standard-phases
6840 (add-after 'unpack 'chdir
6841 (lambda _ (chdir "httpcore-osgi"))))))
6842 (inputs
6843 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6844 (prepend java-httpcomponents-httpcore
6845 java-httpcomponents-httpcore-nio
6846 java-hamcrest-core)))
6847 (native-inputs (list java-ops4j-pax-exam-core
6848 java-ops4j-pax-exam-core-junit
6849 java-ops4j-pax-exam-core-spi
6850 java-junit))
6851 (description "HttpCore is a set of low level HTTP transport components
6852that can be used to build custom client and server side HTTP services with a
6853minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6854on the classic Java I/O and non-blocking, event driven I/O model based on Java
6855NIO.
6856
6857This package provides... some tests.")))
6858
6859(define-public java-httpcomponents-httpclient
6860 (package
6861 (name "java-httpcomponents-httpclient")
6862 (version "4.5.12")
6863 (source (origin
6864 (method url-fetch)
6865 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6866 "source/httpcomponents-client-"
6867 version "-src.tar.gz"))
6868 (sha256
6869 (base32
6870 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6871 (build-system ant-build-system)
6872 (arguments
6873 `(#:jar-name "httpcomponents-httpclient.jar"
6874 #:phases
6875 (modify-phases %standard-phases
6876 (add-after 'unpack 'chdir
6877 (lambda _ (chdir "httpclient") #t)))))
6878 (inputs
6879 (list java-commons-logging-minimal
6880 java-commons-codec
6881 java-hamcrest-core
6882 java-httpcomponents-httpcore
6883 java-mockito-1
6884 java-junit))
6885 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6886 (synopsis "HTTP client library for Java")
6887 (description "Although the @code{java.net} package provides basic
6888functionality for accessing resources via HTTP, it doesn't provide the full
6889flexibility or functionality needed by many applications. @code{HttpClient}
6890seeks to fill this void by providing an efficient, up-to-date, and
6891feature-rich package implementing the client side of the most recent HTTP
6892standards and recommendations.")
6893 (properties '((upstream-name . "httpcomponents-client")))
6894 (license license:asl2.0)))
6895
6896(define-public java-httpcomponents-httpclient-cache
6897 (package (inherit java-httpcomponents-httpclient)
6898 (name "java-httpcomponents-httpclient-cache")
6899 (arguments
6900 `(#:jar-name "httpcomponents-httpclient-cache.jar"
6901 #:source-dir "src/main/java"
6902 #:test-dir "src/test"
6903 #:tests? #f; tests are broken with current cglib.
6904 #:phases
6905 (modify-phases %standard-phases
6906 (add-after 'unpack 'delete-unused-impls
6907 (lambda _
6908 (for-each
6909 delete-file-recursively
6910 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
6911 "src/main/java/org/apache/http/impl/client/cache/memcached/"
6912 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
6913 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
6914 (add-after 'unpack 'chdir
6915 (lambda _ (chdir "httpclient-cache"))))))
6916 (inputs
6917 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6918 (prepend java-httpcomponents-httpclient
6919 java-httpcomponents-httpmime
6920 java-hamcrest-core)))
6921 (description "This package provides an API for caching accessed HTTP
6922resources.")))
6923
6924(define-public java-httpcomponents-httpclient-osgi
6925 (package (inherit java-httpcomponents-httpclient)
6926 (name "java-httpcomponents-httpclient-osgi")
6927 (arguments
6928 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
6929 #:tests? #f; tests are broken with current cglib.
6930 #:phases
6931 (modify-phases %standard-phases
6932 (add-after 'unpack 'chdir
6933 (lambda _ (chdir "httpclient-osgi") #t)))))
6934 (inputs
6935 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6936 (prepend java-httpcomponents-httpclient
6937 java-httpcomponents-httpclient-cache
6938 java-osgi-framework
6939 java-osgi-service-cm
6940 java-hamcrest-core)))))
6941
6942(define-public java-httpcomponents-httpmime
6943 (package (inherit java-httpcomponents-httpclient)
6944 (name "java-httpcomponents-httpmime")
6945 (arguments
6946 `(#:jar-name "httpcomponents-httpmime.jar"
6947 #:phases
6948 (modify-phases %standard-phases
6949 (add-after 'unpack 'chdir
6950 (lambda _ (chdir "httpmime") #t)))))
6951 (inputs
6952 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6953 java-junit java-hamcrest-core))))
6954
6955(define-public java-commons-net
6956 (package
6957 (name "java-commons-net")
6958 (version "3.6")
6959 (source (origin
6960 (method url-fetch)
6961 (uri (string-append "mirror://apache/commons/net/source/"
6962 "commons-net-" version "-src.tar.gz"))
6963 (sha256
6964 (base32
6965 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6966 (build-system ant-build-system)
6967 (arguments
6968 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6969 ;; should be "resources/examples/examples.properties"), but gets "null"
6970 ;; instead.
6971 #:tests? #f
6972 #:jar-name "commons-net.jar"))
6973 (native-inputs
6974 (list java-junit java-hamcrest-core))
6975 (home-page "https://commons.apache.org/net/")
6976 (synopsis "Client library for many basic Internet protocols")
6977 (description "The Apache Commons Net library implements the client side of
6978many basic Internet protocols. The purpose of the library is to provide
6979fundamental protocol access, not higher-level abstractions.")
6980 (license license:asl2.0)))
6981
6982(define-public java-jsch
6983 (package
6984 (name "java-jsch")
6985 (version "0.1.55")
6986 (source (origin
6987 (method url-fetch)
6988 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6989 version "/jsch-" version ".zip"))
6990 (sha256
6991 (base32
6992 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6993 (build-system ant-build-system)
6994 (arguments
6995 `(#:build-target "dist"
6996 #:tests? #f ; no tests included
6997 #:phases
6998 (modify-phases %standard-phases
6999 (replace 'install (install-jars "dist")))))
7000 (native-inputs
7001 (list unzip))
7002 (home-page "http://www.jcraft.com/jsch/")
7003 (synopsis "Pure Java implementation of SSH2")
7004 (description "JSch is a pure Java implementation of SSH2. JSch allows you
7005to connect to an SSH server and use port forwarding, X11 forwarding, file
7006transfer, etc., and you can integrate its functionality into your own Java
7007programs.")
7008 (license license:bsd-3)))
7009
7010(define-public java-commons-compress
7011 (package
7012 (name "java-commons-compress")
7013 (version "1.21")
7014 (source (origin
7015 (method url-fetch)
7016 (uri (string-append "mirror://apache/commons/compress/source/"
7017 "commons-compress-" version "-src.tar.gz"))
7018 (sha256
7019 (base32
7020 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
7021 (build-system ant-build-system)
7022 (arguments
7023 `(#:jar-name "commons-compress.jar"
7024 #:source-dir "src/main/java"
7025 #:tests? #f; requires java-mockito-3
7026 #:phases
7027 (modify-phases %standard-phases
7028 (replace 'install (install-from-pom "pom.xml")))))
7029 (propagated-inputs
7030 (list java-asm-3
7031 java-brotli
7032 java-osgi-core
7033 java-xz
7034 java-zstd
7035 apache-commons-parent-pom-52))
7036 (home-page "https://commons.apache.org/proper/commons-compress/")
7037 (synopsis "Java library for working with compressed files")
7038 (description "The Apache Commons Compress library defines an API for
7039working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
7040Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
7041 (license license:asl2.0)))
7042
7043(define-public java-commons-csv
7044 (package
7045 (name "java-commons-csv")
7046 (version "1.4")
7047 (source (origin
7048 (method url-fetch)
7049 (uri (string-append "mirror://apache/commons/csv/source/"
7050 "commons-csv-" version "-src.tar.gz"))
7051 (sha256
7052 (base32
7053 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
7054 (build-system ant-build-system)
7055 (arguments
7056 `(#:jar-name "commons-csv.jar"
7057 #:source-dir "src/main/java"
7058 #:tests? #f)); FIXME: requires java-h2
7059 (inputs
7060 `(("java-hamcrest-core" ,java-hamcrest-core)
7061 ("java-commons-io" ,java-commons-io)
7062 ("java-commons-lang3" ,java-commons-lang3)
7063 ("junit" ,java-junit)))
7064 (home-page "https://commons.apache.org/proper/commons-csv/")
7065 (synopsis "Read and write CSV documents")
7066 (description "Commons CSV reads and writes files in variations of the Comma
7067Separated Value (CSV) format. The most common CSV formats are predefined in the
7068CSVFormat class:
7069
7070@itemize
7071@item Microsoft Excel
7072@item Informix UNLOAD
7073@item Informix UNLOAD CSV
7074@item MySQL
7075@item RFC 4180
7076@item TDF
7077@end itemize
7078
7079Custom formats can be created using a fluent style API.")
7080 (license license:asl2.0)))
7081
7082(define-public java-osgi-annotation
7083 (package
7084 (name "java-osgi-annotation")
7085 (version "6.0.0")
7086 (source (origin
7087 (method url-fetch)
7088 (uri (string-append "https://repo1.maven.org/maven2/"
7089 "org/osgi/org.osgi.annotation/" version "/"
7090 "org.osgi.annotation-" version "-sources.jar"))
7091 (sha256
7092 (base32
7093 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
7094 (build-system ant-build-system)
7095 (arguments
7096 `(#:tests? #f ; no tests
7097 #:jar-name "osgi-annotation.jar"
7098 #:phases
7099 (modify-phases %standard-phases
7100 (add-before 'install 'create-pom
7101 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
7102 (replace 'install (install-from-pom "pom.xml")))))
7103 (home-page "https://www.osgi.org")
7104 (synopsis "Annotation module of OSGi framework")
7105 (description
7106 "OSGi, for Open Services Gateway initiative framework, is a module system
7107and service platform for the Java programming language. This package contains
7108the OSGi annotation module, providing additional services to help dynamic
7109components.")
7110 (license license:asl2.0)))
7111
7112(define-public java-osgi-core
7113 (package
7114 (name "java-osgi-core")
7115 (version "6.0.0")
7116 (source (origin
7117 (method url-fetch)
7118 (uri (string-append "https://repo1.maven.org/maven2/"
7119 "org/osgi/org.osgi.core/" version "/"
7120 "org.osgi.core-" version "-sources.jar"))
7121 (sha256
7122 (base32
7123 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
7124 (build-system ant-build-system)
7125 (arguments
7126 `(#:tests? #f ; no tests
7127 #:jar-name "osgi-core.jar"
7128 #:phases
7129 (modify-phases %standard-phases
7130 (add-before 'install 'create-pom
7131 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
7132 (replace 'install (install-from-pom "pom.xml")))))
7133 (inputs
7134 (list java-osgi-annotation))
7135 (home-page "https://www.osgi.org")
7136 (synopsis "Core module of OSGi framework")
7137 (description
7138 "OSGi, for Open Services Gateway initiative framework, is a module system
7139and service platform for the Java programming language. This package contains
7140the OSGi Core module.")
7141 (license license:asl2.0)))
7142
7143(define-public java-osgi-service-event
7144 (package
7145 (name "java-osgi-service-event")
7146 (version "1.3.1")
7147 (source (origin
7148 (method url-fetch)
7149 (uri (string-append "https://repo1.maven.org/maven2/"
7150 "org/osgi/org.osgi.service.event/"
7151 version "/org.osgi.service.event-"
7152 version "-sources.jar"))
7153 (sha256
7154 (base32
7155 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
7156 (build-system ant-build-system)
7157 (arguments
7158 `(#:tests? #f ; no tests
7159 #:jar-name "osgi-service-event.jar"))
7160 (inputs
7161 (list java-osgi-annotation java-osgi-core))
7162 (home-page "https://www.osgi.org")
7163 (synopsis "OSGi service event module")
7164 (description
7165 "OSGi, for Open Services Gateway initiative framework, is a module system
7166and service platform for the Java programming language. This package contains
7167the OSGi @code{org.osgi.service.event} module.")
7168 (license license:asl2.0)))
7169
7170(define-public java-eclipse-osgi
7171 (package
7172 (name "java-eclipse-osgi")
7173 (version "3.11.3")
7174 (source (origin
7175 (method url-fetch)
7176 (uri (string-append "https://repo1.maven.org/maven2/"
7177 "org/eclipse/platform/org.eclipse.osgi/"
7178 version "/org.eclipse.osgi-"
7179 version "-sources.jar"))
7180 (sha256
7181 (base32
7182 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7183 (build-system ant-build-system)
7184 (arguments
7185 `(#:tests? #f ; no tests included
7186 #:jar-name "eclipse-equinox-osgi.jar"))
7187 (inputs
7188 (list java-osgi-annotation))
7189 (home-page "https://www.eclipse.org/equinox/")
7190 (synopsis "Eclipse Equinox OSGi framework")
7191 (description "This package provides an implementation of the OSGi Core
7192specification.")
7193 (license license:epl1.0)))
7194
7195(define-public java-eclipse-equinox-common
7196 (package
7197 (name "java-eclipse-equinox-common")
7198 (version "3.10.200")
7199 (source (origin
7200 (method url-fetch)
7201 (uri (string-append "https://repo1.maven.org/maven2/"
7202 "org/eclipse/platform/org.eclipse.equinox.common/"
7203 version "/org.eclipse.equinox.common-"
7204 version "-sources.jar"))
7205 (sha256
7206 (base32
7207 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7208 (build-system ant-build-system)
7209 (arguments
7210 `(#:tests? #f ; no tests included
7211 #:jar-name "eclipse-equinox-common.jar"))
7212 (inputs
7213 (list java-eclipse-osgi))
7214 (home-page "https://www.eclipse.org/equinox/")
7215 (synopsis "Common Eclipse runtime")
7216 (description "This package provides the common Eclipse runtime.")
7217 (license license:epl1.0)))
7218
7219(define-public java-eclipse-core-jobs
7220 (package
7221 (name "java-eclipse-core-jobs")
7222 (version "3.8.0")
7223 (source (origin
7224 (method url-fetch)
7225 (uri (string-append "https://repo1.maven.org/maven2/"
7226 "org/eclipse/platform/org.eclipse.core.jobs/"
7227 version "/org.eclipse.core.jobs-"
7228 version "-sources.jar"))
7229 (sha256
7230 (base32
7231 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7232 (build-system ant-build-system)
7233 (arguments
7234 `(#:tests? #f ; no tests included
7235 #:jar-name "eclipse-core-jobs.jar"))
7236 (inputs
7237 (list java-eclipse-equinox-common java-eclipse-osgi))
7238 (home-page "https://www.eclipse.org/equinox/")
7239 (synopsis "Eclipse jobs mechanism")
7240 (description "This package provides the Eclipse jobs mechanism.")
7241 (license license:epl1.0)))
7242
7243(define-public java-eclipse-equinox-registry
7244 (package
7245 (name "java-eclipse-equinox-registry")
7246 (version "3.6.100")
7247 (source (origin
7248 (method url-fetch)
7249 (uri (string-append "https://repo1.maven.org/maven2/"
7250 "org/eclipse/platform/org.eclipse.equinox.registry/"
7251 version "/org.eclipse.equinox.registry-"
7252 version "-sources.jar"))
7253 (sha256
7254 (base32
7255 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7256 (build-system ant-build-system)
7257 (arguments
7258 `(#:tests? #f ; no tests included
7259 #:jar-name "eclipse-equinox-registry.jar"))
7260 (inputs
7261 (list java-eclipse-core-jobs java-eclipse-equinox-common
7262 java-eclipse-osgi))
7263 (home-page "https://www.eclipse.org/equinox/")
7264 (synopsis "Eclipse extension registry support")
7265 (description "This package provides support for the Eclipse extension
7266registry.")
7267 (license license:epl1.0)))
7268
7269(define-public java-eclipse-equinox-app
7270 (package
7271 (name "java-eclipse-equinox-app")
7272 (version "1.3.400")
7273 (source (origin
7274 (method url-fetch)
7275 (uri (string-append "https://repo1.maven.org/maven2/"
7276 "org/eclipse/platform/org.eclipse.equinox.app/"
7277 version "/org.eclipse.equinox.app-"
7278 version "-sources.jar"))
7279 (sha256
7280 (base32
7281 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7282 (build-system ant-build-system)
7283 (arguments
7284 `(#:tests? #f ; no tests included
7285 #:jar-name "eclipse-equinox-app.jar"))
7286 (inputs
7287 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7288 java-eclipse-osgi java-osgi-service-event))
7289 (home-page "https://www.eclipse.org/equinox/")
7290 (synopsis "Equinox application container")
7291 (description "This package provides the Equinox application container for
7292Eclipse.")
7293 (license license:epl1.0)))
7294
7295(define-public java-eclipse-equinox-preferences
7296 (package
7297 (name "java-eclipse-equinox-preferences")
7298 (version "3.6.1")
7299 (source (origin
7300 (method url-fetch)
7301 (uri (string-append "https://repo1.maven.org/maven2/"
7302 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7303 version "/org.eclipse.equinox.preferences-"
7304 version "-sources.jar"))
7305 (sha256
7306 (base32
7307 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7308 (build-system ant-build-system)
7309 (arguments
7310 `(#:tests? #f ; no tests included
7311 #:jar-name "eclipse-equinox-preferences.jar"))
7312 (inputs
7313 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7314 java-eclipse-osgi))
7315 (home-page "https://www.eclipse.org/equinox/")
7316 (synopsis "Eclipse preferences mechanism")
7317 (description "This package provides the Eclipse preferences mechanism with
7318the module @code{org.eclipse.equinox.preferences}.")
7319 (license license:epl1.0)))
7320
7321(define-public java-eclipse-core-contenttype
7322 (package
7323 (name "java-eclipse-core-contenttype")
7324 (version "3.5.100")
7325 (source (origin
7326 (method url-fetch)
7327 (uri (string-append "https://repo1.maven.org/maven2/"
7328 "org/eclipse/platform/org.eclipse.core.contenttype/"
7329 version "/org.eclipse.core.contenttype-"
7330 version "-sources.jar"))
7331 (sha256
7332 (base32
7333 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7334 (build-system ant-build-system)
7335 (arguments
7336 `(#:tests? #f ; no tests included
7337 #:jar-name "eclipse-core-contenttype.jar"))
7338 (inputs
7339 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
7340 java-eclipse-equinox-registry java-eclipse-osgi))
7341 (home-page "https://www.eclipse.org/")
7342 (synopsis "Eclipse content mechanism")
7343 (description "This package provides the Eclipse content mechanism in the
7344@code{org.eclipse.core.contenttype} module.")
7345 (license license:epl1.0)))
7346
7347(define-public java-eclipse-core-runtime
7348 (package
7349 (name "java-eclipse-core-runtime")
7350 (version "3.15.100")
7351 (source (origin
7352 (method url-fetch)
7353 (uri (string-append "https://repo1.maven.org/maven2/"
7354 "org/eclipse/platform/org.eclipse.core.runtime/"
7355 version "/org.eclipse.core.runtime-"
7356 version "-sources.jar"))
7357 (sha256
7358 (base32
7359 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7360 (build-system ant-build-system)
7361 (arguments
7362 `(#:tests? #f ; no tests included
7363 #:jar-name "eclipse-core-runtime.jar"))
7364 (inputs
7365 (list java-eclipse-core-contenttype
7366 java-eclipse-core-jobs
7367 java-eclipse-equinox-app
7368 java-eclipse-equinox-common
7369 java-eclipse-equinox-registry
7370 java-eclipse-equinox-preferences
7371 java-eclipse-osgi))
7372 (home-page "https://www.eclipse.org/")
7373 (synopsis "Eclipse core runtime")
7374 (description "This package provides the Eclipse core runtime with the
7375module @code{org.eclipse.core.runtime}.")
7376 (license license:epl1.0)))
7377
7378(define-public java-eclipse-core-filesystem
7379 (package
7380 (name "java-eclipse-core-filesystem")
7381 (version "1.6.1")
7382 (source (origin
7383 (method url-fetch)
7384 (uri (string-append "https://repo1.maven.org/maven2/"
7385 "org/eclipse/platform/org.eclipse.core.filesystem/"
7386 version "/org.eclipse.core.filesystem-"
7387 version "-sources.jar"))
7388 (sha256
7389 (base32
7390 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7391 (build-system ant-build-system)
7392 (arguments
7393 `(#:tests? #f ; no tests included
7394 #:jar-name "eclipse-core-filesystem.jar"))
7395 (inputs
7396 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7397 java-eclipse-osgi))
7398 (home-page "https://www.eclipse.org/")
7399 (synopsis "Eclipse core file system")
7400 (description "This package provides the Eclipse core file system with the
7401module @code{org.eclipse.core.filesystem}.")
7402 (license license:epl1.0)))
7403
7404(define-public java-eclipse-core-expressions
7405 (package
7406 (name "java-eclipse-core-expressions")
7407 (version "3.5.100")
7408 (source (origin
7409 (method url-fetch)
7410 (uri (string-append "https://repo1.maven.org/maven2/"
7411 "org/eclipse/platform/org.eclipse.core.expressions/"
7412 version "/org.eclipse.core.expressions-"
7413 version "-sources.jar"))
7414 (sha256
7415 (base32
7416 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7417 (build-system ant-build-system)
7418 (arguments
7419 `(#:tests? #f ; no tests included
7420 #:jar-name "eclipse-core-expressions.jar"))
7421 (inputs
7422 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7423 java-eclipse-equinox-preferences java-eclipse-core-runtime
7424 java-eclipse-osgi))
7425 (home-page "https://www.eclipse.org/")
7426 (synopsis "Eclipse core expression language")
7427 (description "This package provides the Eclipse core expression language
7428with the @code{org.eclipse.core.expressions} module.")
7429 (license license:epl1.0)))
7430
7431(define-public java-eclipse-core-variables
7432 (package
7433 (name "java-eclipse-core-variables")
7434 (version "3.3.0")
7435 (source (origin
7436 (method url-fetch)
7437 (uri (string-append "https://repo1.maven.org/maven2/"
7438 "org/eclipse/platform/org.eclipse.core.variables/"
7439 version "/org.eclipse.core.variables-"
7440 version "-sources.jar"))
7441 (sha256
7442 (base32
7443 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7444 (build-system ant-build-system)
7445 (arguments
7446 `(#:tests? #f ; no tests included
7447 #:jar-name "eclipse-core-variables.jar"))
7448 (inputs
7449 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7450 java-eclipse-equinox-preferences java-eclipse-core-runtime
7451 java-eclipse-osgi))
7452 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7453 (synopsis "Eclipse core variables")
7454 (description "This package provides the Eclipse core variables module
7455@code{org.eclipse.core.variables}.")
7456 (license license:epl1.0)))
7457
7458(define-public java-eclipse-ant-core
7459 (package
7460 (name "java-eclipse-ant-core")
7461 (version "3.4.100")
7462 (source (origin
7463 (method url-fetch)
7464 (uri (string-append "https://repo1.maven.org/maven2/"
7465 "org/eclipse/platform/org.eclipse.ant.core/"
7466 version "/org.eclipse.ant.core-"
7467 version "-sources.jar"))
7468 (sha256
7469 (base32
7470 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7471 (build-system ant-build-system)
7472 (arguments
7473 `(#:tests? #f ; no tests included
7474 #:jar-name "eclipse-ant-core.jar"))
7475 (inputs
7476 (list java-eclipse-equinox-app
7477 java-eclipse-equinox-common
7478 java-eclipse-equinox-registry
7479 java-eclipse-equinox-preferences
7480 java-eclipse-core-contenttype
7481 java-eclipse-core-runtime
7482 java-eclipse-core-variables
7483 java-eclipse-osgi))
7484 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7485 (synopsis "Ant build tool core libraries")
7486 (description "This package provides the ant build tool core libraries with
7487the module @code{org.eclipse.ant.core}.")
7488 (license license:epl1.0)))
7489
7490(define-public java-eclipse-core-resources
7491 (package
7492 (name "java-eclipse-core-resources")
7493 (version "3.13.200")
7494 (source (origin
7495 (method url-fetch)
7496 (uri (string-append "https://repo1.maven.org/maven2/"
7497 "org/eclipse/platform/org.eclipse.core.resources/"
7498 version "/org.eclipse.core.resources-"
7499 version "-sources.jar"))
7500 (sha256
7501 (base32
7502 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7503 (build-system ant-build-system)
7504 (arguments
7505 `(#:tests? #f ; no tests included
7506 #:jar-name "eclipse-core-resources.jar"))
7507 (inputs
7508 (list java-eclipse-equinox-common
7509 java-eclipse-equinox-preferences
7510 java-eclipse-equinox-registry
7511 java-eclipse-core-contenttype
7512 java-eclipse-core-expressions
7513 java-eclipse-core-filesystem
7514 java-eclipse-core-jobs
7515 java-eclipse-core-runtime
7516 java-eclipse-ant-core
7517 java-eclipse-osgi))
7518 (home-page "https://www.eclipse.org/")
7519 (synopsis "Eclipse core resource management")
7520 (description "This package provides the Eclipse core resource management
7521module @code{org.eclipse.core.resources}.")
7522 (license license:epl1.0)))
7523
7524(define-public java-eclipse-compare-core
7525 (package
7526 (name "java-eclipse-compare-core")
7527 (version "3.6.0")
7528 (source (origin
7529 (method url-fetch)
7530 (uri (string-append "https://repo1.maven.org/maven2/"
7531 "org/eclipse/platform/org.eclipse.compare.core/"
7532 version "/org.eclipse.compare.core-"
7533 version "-sources.jar"))
7534 (sha256
7535 (base32
7536 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7537 (build-system ant-build-system)
7538 (arguments
7539 `(#:tests? #f ; no tests included
7540 #:jar-name "eclipse-compare-core.jar"))
7541 (inputs
7542 (list java-eclipse-core-runtime java-eclipse-equinox-common
7543 java-eclipse-osgi java-icu4j))
7544 (home-page "https://www.eclipse.org/")
7545 (synopsis "Eclipse core compare support")
7546 (description "This package provides the Eclipse core compare support
7547module @code{org.eclipse.compare.core}.")
7548 (license license:epl1.0)))
7549
7550(define-public java-eclipse-team-core
7551 (package
7552 (name "java-eclipse-team-core")
7553 (version "3.8.0")
7554 (source (origin
7555 (method url-fetch)
7556 (uri (string-append "https://repo1.maven.org/maven2/"
7557 "org/eclipse/platform/org.eclipse.team.core/"
7558 version "/org.eclipse.team.core-"
7559 version "-sources.jar"))
7560 (sha256
7561 (base32
7562 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7563 (build-system ant-build-system)
7564 (arguments
7565 `(#:tests? #f ; no tests included
7566 #:jar-name "eclipse-team-core.jar"))
7567 (inputs
7568 (list java-eclipse-compare-core
7569 java-eclipse-core-contenttype
7570 java-eclipse-core-filesystem
7571 java-eclipse-core-jobs
7572 java-eclipse-core-resources
7573 java-eclipse-core-runtime
7574 java-eclipse-equinox-common
7575 java-eclipse-equinox-registry
7576 java-eclipse-equinox-preferences
7577 java-eclipse-osgi))
7578 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7579 (synopsis "Eclipse team support core")
7580 (description "This package provides the Eclipse team support core module
7581@code{org.eclipse.team.core}.")
7582 (license license:epl1.0)))
7583
7584(define-public java-eclipse-core-commands
7585 (package
7586 (name "java-eclipse-core-commands")
7587 (version "3.8.1")
7588 (source (origin
7589 (method url-fetch)
7590 (uri (string-append "https://repo1.maven.org/maven2/"
7591 "org/eclipse/platform/org.eclipse.core.commands/"
7592 version "/org.eclipse.core.commands-"
7593 version "-sources.jar"))
7594 (sha256
7595 (base32
7596 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7597 (build-system ant-build-system)
7598 (arguments
7599 `(#:tests? #f ; no tests included
7600 #:jar-name "eclipse-core-commands.jar"))
7601 (inputs
7602 (list java-eclipse-equinox-common))
7603 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7604 (synopsis "Eclipse core commands")
7605 (description "This package provides Eclipse core commands in the module
7606@code{org.eclipse.core.commands}.")
7607 (license license:epl1.0)))
7608
7609(define-public java-eclipse-text
7610 (package
7611 (name "java-eclipse-text")
7612 (version "3.6.0")
7613 (source (origin
7614 (method url-fetch)
7615 (uri (string-append "https://repo1.maven.org/maven2/"
7616 "org/eclipse/platform/org.eclipse.text/"
7617 version "/org.eclipse.text-"
7618 version "-sources.jar"))
7619 (sha256
7620 (base32
7621 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7622 (build-system ant-build-system)
7623 (arguments
7624 `(#:tests? #f ; no tests included
7625 #:jar-name "eclipse-text.jar"
7626 #:phases
7627 (modify-phases %standard-phases
7628 ;; When creating a new category we must make sure that the new list
7629 ;; matches List<Position>. By default it seems to be too generic
7630 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7631 ;; Without this we get this error:
7632 ;;
7633 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7634 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7635 ;; [javac] fPositions.put(category, new ArrayList<>());
7636 ;; [javac] ^
7637 ;; [javac] required: String,List<Position>
7638 ;; [javac] found: String,ArrayList<Object>
7639 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7640 ;; to List<Position> by method invocation conversion
7641 ;; [javac] where K,V are type-variables:
7642 ;; [javac] K extends Object declared in interface Map
7643 ;; [javac] V extends Object declared in interface Map
7644 ;;
7645 ;; I don't know if this is a good fix. I suspect it is not, but it
7646 ;; seems to work.
7647 (add-after 'unpack 'fix-compilation-error
7648 (lambda _
7649 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7650 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7651 "Positions.put(category, new ArrayList<Position>());"))
7652 #t)))))
7653 (inputs
7654 (list java-eclipse-equinox-common java-eclipse-core-commands
7655 java-icu4j))
7656 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7657 (synopsis "Eclipse text library")
7658 (description "Platform Text is part of the Platform UI project and
7659provides the basic building blocks for text and text editors within Eclipse
7660and contributes the Eclipse default text editor.")
7661 (license license:epl1.0)))
7662
7663(define-public java-eclipse-jdt-core
7664 (package
7665 (name "java-eclipse-jdt-core")
7666 (version "3.16.0")
7667 (source (origin
7668 (method url-fetch)
7669 (uri (string-append "https://repo1.maven.org/maven2/"
7670 "org/eclipse/jdt/org.eclipse.jdt.core/"
7671 version "/org.eclipse.jdt.core-"
7672 version "-sources.jar"))
7673 (sha256
7674 (base32
7675 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7676 (build-system ant-build-system)
7677 (arguments
7678 `(#:tests? #f ; no tests included
7679 #:jar-name "eclipse-jdt-core.jar"
7680 #:phases
7681 (modify-phases %standard-phases
7682 (add-after 'unpack 'move-sources
7683 (lambda _
7684 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7685 (for-each (lambda (file)
7686 (install-file file (string-append "../" (dirname file))))
7687 (find-files "." ".*")))
7688 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7689 #t))
7690 (add-before 'build 'copy-resources
7691 (lambda _
7692 (with-directory-excursion "src"
7693 (for-each (lambda (file)
7694 (install-file file (string-append "../build/classes/" (dirname file))))
7695 (find-files "." ".*.(props|properties|rsc)")))
7696 #t)))))
7697 (inputs
7698 (list java-eclipse-core-contenttype
7699 java-eclipse-core-filesystem
7700 java-eclipse-core-jobs
7701 java-eclipse-core-resources
7702 java-eclipse-core-runtime
7703 java-eclipse-equinox-app
7704 java-eclipse-equinox-common
7705 java-eclipse-equinox-preferences
7706 java-eclipse-equinox-registry
7707 java-eclipse-osgi
7708 java-eclipse-text))
7709 (home-page "https://www.eclipse.org/jdt")
7710 (synopsis "Java development tools core libraries")
7711 (description "This package provides the core libraries of the Eclipse Java
7712development tools.")
7713 (license license:epl1.0)))
7714
7715(define-public java-eclipse-jdt-compiler-apt
7716 (package
7717 (name "java-eclipse-jdt-compiler-apt")
7718 (version "1.3.400")
7719 (source (origin
7720 (method url-fetch)
7721 (uri (string-append "https://repo1.maven.org/maven2/"
7722 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7723 version "/org.eclipse.jdt.compiler.apt-"
7724 version "-sources.jar"))
7725 (sha256
7726 (base32
7727 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7728 (build-system ant-build-system)
7729 (arguments
7730 `(#:tests? #f ; no tests included
7731 #:jar-name "eclipse-jdt-compiler-apt.jar"
7732 #:jdk ,openjdk11))
7733 (inputs
7734 (list java-eclipse-jdt-core))
7735 (home-page "https://www.eclipse.org/jdt/apt/")
7736 (synopsis "Annotation processing tool")
7737 (description "APT stands for Annotation Processing Tool. APT provides a
7738means for generating files and compiling new Java classes based on annotations
7739found in your source code.")
7740 (license license:epl2.0)))
7741
7742(define-public java-eclipse-lsp4j-common
7743 (package
7744 (name "java-eclipse-lsp4j-common")
7745 (version "0.10.0")
7746 (source (origin
7747 (method git-fetch)
7748 (uri (git-reference
7749 (url "https://github.com/eclipse/lsp4j")
7750 (commit (string-append "v" version))))
7751 (file-name (git-file-name name version))
7752 (sha256
7753 (base32
7754 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7755 (build-system ant-build-system)
7756 (home-page "https://eclipse.org/lsp4j/")
7757 (synopsis "LSP4J common package")
7758 (description "Eclipse LSP4J provides Java bindings for the Language
7759Server Protocol and the Debug Adapter Protocol. This package is a common
7760definition intended to be inherited by other packages.")
7761 (license license:epl2.0)))
7762
7763(define-public java-eclipse-lsp4j-debug
7764 (package
7765 (inherit java-eclipse-lsp4j-common)
7766 (name "java-eclipse-lsp4j-debug")
7767 (arguments
7768 `(#:jar-name "eclipse-lsp4j-debug.jar"
7769 #:jdk ,openjdk11
7770 #:tests? #f; tests fail with reflection errors
7771 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7772 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7773 #:phases
7774 (modify-phases %standard-phases
7775 (add-before 'build 'copy-xtend
7776 (lambda _
7777 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7778 "org.eclipse.lsp4j.debug/src/main/java"))))))
7779 (native-inputs
7780 (list java-junit))
7781 (inputs
7782 `(("java-gson" ,java-gson-2.8.6)
7783 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7784 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7785 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7786 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7787 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7788 (description "Eclipse LSP4J provides Java bindings for the Language
7789Server Protocol and the Debug Adapter Protocol. This package contains its
7790LSP4J Java bindings for the Debug Server Protocol.")))
7791
7792(define-public java-eclipse-lsp4j-generator
7793 (package
7794 (inherit java-eclipse-lsp4j-common)
7795 (name "java-eclipse-lsp4j-generator")
7796 (arguments
7797 `(#:jar-name "eclipse-lsp4j-generator.jar"
7798 #:jdk ,openjdk11
7799 #:tests? #f; no tests
7800 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7801 (inputs
7802 (list java-eclipse-lsp4j-jsonrpc))
7803 (synopsis "Eclipse LSP4J Generator")
7804 (description "Eclipse LSP4J provides Java bindings for the Language
7805Server Protocol and the Debug Adapter Protocol. This package contains its
7806LSP4J code generator for Language Server Protocol classes.")))
7807
7808(define-public java-eclipse-lsp4j-jsonrpc
7809 (package
7810 (inherit java-eclipse-lsp4j-common)
7811 (name "java-eclipse-lsp4j-jsonrpc")
7812 (arguments
7813 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7814 #:jdk ,openjdk11
7815 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7816 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7817 (native-inputs
7818 (list java-junit))
7819 (inputs
7820 (list java-gson-2.8.6))
7821 (synopsis "Java JSON-RPC implementation")
7822 (description "Eclipse LSP4J provides Java bindings for the Language
7823Server Protocol and the Debug Adapter Protocol. This package contains its
7824JSON-RPC implementation.")))
7825
7826(define-public java-eclipse-lsp4j-jsonrpc-debug
7827 (package
7828 (inherit java-eclipse-lsp4j-common)
7829 (name "java-eclipse-lsp4j-jsonrpc-debug")
7830 (arguments
7831 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7832 #:jdk ,openjdk11
7833 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7834 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7835 (native-inputs
7836 (list java-junit))
7837 (inputs
7838 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7839 (synopsis "Java JSON-RPC implementation (debug protocol)")
7840 (description "Eclipse LSP4J provides Java bindings for the Language
7841Server Protocol and the Debug Adapter Protocol. This package contains its
7842JSON-RPC implementation's debug protocol.")))
7843
7844(define-public java-eclipse-xtext-xbase-lib
7845 (package
7846 (name "java-eclipse-xtext-xbase-lib")
7847 (version "2.25.0")
7848 (source (origin
7849 (method git-fetch)
7850 (uri (git-reference
7851 (url "https://github.com/eclipse/xtext-lib")
7852 (commit (string-append "v" version))))
7853 (file-name (git-file-name name version))
7854 (sha256
7855 (base32
7856 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7857 (build-system ant-build-system)
7858 (arguments
7859 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7860 #:jdk ,openjdk11
7861 #:tests? #f; TODO (maybe needs newer guava version?)
7862 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7863 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7864 (native-inputs
7865 (list java-junit))
7866 (inputs
7867 (list java-guava))
7868 (home-page "https://www.eclipse.org/Xtext/")
7869 (synopsis "Eclipse Xbase Runtime Library")
7870 (description "This package contains runtime libraries for Xbase languages
7871such as Xtend.")
7872 (license license:epl2.0)))
7873
7874(define-public java-javax-mail
7875 (package
7876 (name "java-javax-mail")
7877 (version "1.5.6")
7878 (source (origin
7879 (method url-fetch)
7880 (uri (string-append "https://repo1.maven.org/maven2/"
7881 "com/sun/mail/javax.mail/"
7882 version "/javax.mail-"
7883 version "-sources.jar"))
7884 (sha256
7885 (base32
7886 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7887 (build-system ant-build-system)
7888 (arguments
7889 `(#:tests? #f ; no tests
7890 #:jar-name "javax-mail.jar"))
7891 (home-page "https://javamail.java.net")
7892 (synopsis "Reference implementation of the JavaMail API")
7893 (description
7894 "This package provides versions of the JavaMail API implementation, IMAP,
7895SMTP, and POP3 service providers, some examples, and documentation for the
7896JavaMail API.")
7897 ;; GPLv2 only with "classpath exception".
7898 (license license:gpl2)))
7899
7900(define-public java-log4j-api
7901 (package
7902 (name "java-log4j-api")
7903 (version "2.17.1")
7904 (source (origin
7905 (method url-fetch)
7906 (uri (string-append "mirror://apache/logging/log4j/" version
7907 "/apache-log4j-" version "-src.tar.gz"))
7908 (sha256
7909 (base32
7910 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7911 (build-system ant-build-system)
7912 (arguments
7913 `(#:tests? #f ; tests require unpackaged software
7914 #:jar-name "log4j-api.jar"
7915 #:make-flags
7916 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7917 #:phases
7918 (modify-phases %standard-phases
7919 (add-after 'unpack 'enter-dir
7920 (lambda _ (chdir "log4j-api") #t))
7921 ;; FIXME: The tests require additional software that has not been
7922 ;; packaged yet, such as
7923 ;; * org.apache.maven
7924 ;; * org.apache.felix
7925 (add-after 'enter-dir 'delete-tests
7926 (lambda _ (delete-file-recursively "src/test") #t)))))
7927 (inputs
7928 (list java-osgi-core java-hamcrest-core java-junit))
7929 (properties '((cpe-name . "log4j")))
7930 (home-page "https://logging.apache.org/log4j/2.x/")
7931 (synopsis "API module of the Log4j logging framework for Java")
7932 (description
7933 "This package provides the API module of the Log4j logging framework for
7934Java.")
7935 (license license:asl2.0)))
7936
7937(define-public java-log4j-core
7938 (package
7939 (inherit java-log4j-api)
7940 (name "java-log4j-core")
7941 (inputs
7942 `(("java-osgi-core" ,java-osgi-core)
7943 ("java-hamcrest-core" ,java-hamcrest-core)
7944 ("java-log4j-api" ,java-log4j-api)
7945 ("java-mail" ,java-mail)
7946 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7947 ("java-conversant-disruptor" ,java-conversant-disruptor)
7948 ("java-lmax-disruptor" ,java-lmax-disruptor)
7949 ("java-jctools-core" ,java-jctools-core-1)
7950 ("java-stax2-api" ,java-stax2-api)
7951 ("java-jansi" ,java-jansi)
7952 ("java-kafka" ,java-kafka-clients)
7953 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7954 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7955 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7956 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7957 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7958 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7959 ("java-commons-compress" ,java-commons-compress)
7960 ("java-commons-csv" ,java-commons-csv)
7961 ("java-jeromq" ,java-jeromq)
7962 ("java-junit" ,java-junit)))
7963 (native-inputs
7964 `(("hamcrest" ,java-hamcrest-all)
7965 ("java-commons-io" ,java-commons-io)
7966 ("java-commons-lang3" ,java-commons-lang3)
7967 ("slf4j" ,java-slf4j-api)))
7968 (arguments
7969 `(#:tests? #f ; tests require more dependencies
7970 #:test-dir "src/test"
7971 #:source-dir "src/main/java"
7972 #:jar-name "log4j-core.jar"
7973 #:jdk ,icedtea-8
7974 #:make-flags
7975 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7976 #:phases
7977 (modify-phases %standard-phases
7978 (add-after 'unpack 'enter-dir
7979 (lambda _ (chdir "log4j-core") #t)))))
7980 (synopsis "Core component of the Log4j framework")
7981 (description "This package provides the core component of the Log4j
7982logging framework for Java.")))
7983
7984(define-public java-log4j-1.2-api
7985 (package
7986 (inherit java-log4j-api)
7987 (name "java-log4j-1.2-api")
7988 (arguments
7989 `(#:jar-name "java-log4j-1.2-api.jar"
7990 #:source-dir "log4j-1.2-api/src/main/java"
7991 #:jdk ,icedtea-8
7992 ;; Tests require maven-model (and other maven subprojects), which is a
7993 ;; cyclic dependency.
7994 #:tests? #f))
7995 (inputs
7996 `(("log4j-api" ,java-log4j-api)
7997 ("log4j-core" ,java-log4j-core)
7998 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7999 ("osgi-core" ,java-osgi-core)
8000 ("eclipse-osgi" ,java-eclipse-osgi)
8001 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
8002
8003(define-public java-commons-cli
8004 (package
8005 (name "java-commons-cli")
8006 (version "1.4")
8007 (source (origin
8008 (method url-fetch)
8009 (uri (string-append "mirror://apache/commons/cli/source/"
8010 "commons-cli-" version "-src.tar.gz"))
8011 (sha256
8012 (base32
8013 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
8014 (build-system ant-build-system)
8015 ;; TODO: javadoc
8016 (arguments
8017 `(#:jar-name "commons-cli.jar"
8018 #:phases
8019 (modify-phases %standard-phases
8020 (replace 'install
8021 (install-from-pom "pom.xml")))))
8022 (native-inputs
8023 (list java-junit java-hamcrest-core))
8024 (home-page "https://commons.apache.org/cli/")
8025 (synopsis "Command line arguments and options parsing library")
8026 (description "The Apache Commons CLI library provides an API for parsing
8027command line options passed to programs. It is also able to print help
8028messages detailing the options available for a command line tool.
8029
8030Commons CLI supports different types of options:
8031
8032@itemize
8033@item POSIX like options (ie. tar -zxvf foo.tar.gz)
8034@item GNU like long options (ie. du --human-readable --max-depth=1)
8035@item Java like properties (ie. java -Djava.awt.headless=true Foo)
8036@item Short options with value attached (ie. gcc -O2 foo.c)
8037@item long options with single hyphen (ie. ant -projecthelp)
8038@end itemize
8039
8040This is a part of the Apache Commons Project.")
8041 (license license:asl2.0)))
8042
8043(define-public java-commons-text
8044 (package
8045 (name "java-commons-text")
8046 (version "1.15.0")
8047 (source (origin
8048 (method url-fetch)
8049 (uri (string-append "mirror://apache/commons/text/source/"
8050 "commons-text-" version "-src.tar.gz"))
8051 (sha256
8052 (base32
8053 "0k0y3pkgrzm84a0z1ifi4b9ydaglzm9pgvaw9phxdcwmcqxjbkc8"))))
8054 (build-system ant-build-system)
8055 (arguments
8056 (list #:jar-name "java-commons-text.jar"
8057 #:source-dir "src/main/java"
8058 #:test-dir "src/test"
8059 #:tests? #f ; Tests require JUnit5.
8060 #:phases
8061 #~(modify-phases %standard-phases
8062 (replace 'install
8063 (install-from-pom "pom.xml")))))
8064 (inputs
8065 (list java-commons-io))
8066 (propagated-inputs
8067 (list java-commons-lang3
8068 apache-commons-parent-pom-51))
8069 (home-page "https://commons.apache.org/text/")
8070 (synopsis "Library focused on algorithms working on strings")
8071 (description "Apache Commons Text is a library focused on algorithms
8072working on strings.
8073
8074This is a part of the Apache Commons Project.")
8075 (license license:asl2.0)))
8076
8077(define-public java-commons-codec
8078 (package
8079 (name "java-commons-codec")
8080 (version "1.15")
8081 (source (origin
8082 (method url-fetch)
8083 (uri (string-append "mirror://apache/commons/codec/source/"
8084 "commons-codec-" version "-src.tar.gz"))
8085 (sha256
8086 (base32
8087 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
8088 (build-system ant-build-system)
8089 (arguments
8090 `(#:jar-name "java-commons-codec.jar"
8091 #:source-dir "src/main/java"
8092 #:test-dir "src/test"
8093 #:test-exclude (list "**/*AbstractTest.java")
8094 #:phases
8095 (modify-phases %standard-phases
8096 (add-before 'build 'copy-resources
8097 (lambda _
8098 (copy-recursively "src/main/resources"
8099 "build/classes")))
8100 (add-before 'check 'copy-test-resources
8101 (lambda _
8102 (copy-recursively "src/test/resources"
8103 "build/test-classes")))
8104 (add-before 'check 'skip-ravenous-test
8105 (lambda _
8106 ;; This test admits to being "memory hungry", but reliably fails
8107 ;; even on a machine that should have plenty (12 GiB). Skip it.
8108 (substitute*
8109 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
8110 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
8111 "return;"))))
8112 (replace 'install (install-from-pom "pom.xml")))))
8113 (native-inputs
8114 (list java-commons-lang3 java-junit))
8115 (propagated-inputs
8116 (list apache-commons-parent-pom-52))
8117 (home-page "https://commons.apache.org/codec/")
8118 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
8119 (description "The codec package contains simple encoder and decoders for
8120various formats such as Base64 and Hexadecimal. In addition to these widely
8121used encoders and decoders, the codec package also maintains a collection of
8122phonetic encoding utilities.
8123
8124This is a part of the Apache Commons Project.")
8125 (license license:asl2.0)))
8126
8127(define-public java-commons-daemon
8128 (package
8129 (name "java-commons-daemon")
8130 (version "1.1.0")
8131 (source (origin
8132 (method url-fetch)
8133 (uri (string-append "mirror://apache/commons/daemon/source/"
8134 "commons-daemon-" version "-src.tar.gz"))
8135 (sha256
8136 (base32
8137 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
8138 (build-system ant-build-system)
8139 (arguments
8140 `(#:test-target "test"
8141 #:phases
8142 (modify-phases %standard-phases
8143 (add-after 'build 'build-javadoc ant-build-javadoc)
8144 (replace 'install (install-jars "dist"))
8145 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
8146 (native-inputs
8147 (list java-junit))
8148 (home-page "https://commons.apache.org/daemon/")
8149 (synopsis "Library to launch Java applications as daemons")
8150 (description "The Daemon package from Apache Commons can be used to
8151implement Java applications which can be launched as daemons. For example the
8152program will be notified about a shutdown so that it can perform cleanup tasks
8153before its process of execution is destroyed by the operation system.
8154
8155This package contains the Java library. You will also need the actual binary
8156for your architecture which is provided by the jsvc package.
8157
8158This is a part of the Apache Commons Project.")
8159 (license license:asl2.0)))
8160
8161(define-public java-javaewah
8162 (package
8163 (name "java-javaewah")
8164 (version "1.1.6")
8165 (source (origin
8166 (method git-fetch)
8167 (uri (git-reference
8168 (url "https://github.com/lemire/javaewah/")
8169 (commit (string-append "JavaEWAH-" version))))
8170 (file-name (git-file-name name version))
8171 (sha256
8172 (base32
8173 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
8174 (build-system ant-build-system)
8175 (arguments `(#:jar-name "javaewah.jar"))
8176 (inputs
8177 (list java-junit java-hamcrest-core))
8178 (home-page "https://github.com/lemire/javaewah")
8179 (synopsis "Compressed alternative to the Java @code{BitSet} class")
8180 (description "This is a word-aligned compressed variant of the Java
8181@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
8182compression scheme. It can be used to implement bitmap indexes.
8183
8184The goal of word-aligned compression is not to achieve the best compression,
8185but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
8186cycles, maybe at the expense of storage. However, the EWAH scheme is always
8187more efficient storage-wise than an uncompressed bitmap (as implemented in the
8188@code{BitSet} class by Sun).")
8189 ;; GPL2.0 derivates are explicitly allowed.
8190 (license license:asl2.0)))
8191
8192(define-public java-slf4j-api
8193 (package
8194 (name "java-slf4j-api")
8195 (version "1.7.25")
8196 (source (origin
8197 (method git-fetch)
8198 (uri (git-reference
8199 (url "https://github.com/qos-ch/slf4j")
8200 (commit (string-append "v_" version))))
8201 (file-name (git-file-name name version))
8202 (sha256
8203 (base32
8204 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
8205 (modules '((guix build utils)))
8206 ;; Delete bundled jars.
8207 (snippet
8208 '(begin
8209 (for-each delete-file (find-files "." "\\.jar$"))
8210 #t))))
8211 (build-system ant-build-system)
8212 (arguments
8213 `(#:jar-name "slf4j-api.jar"
8214 #:source-dir "slf4j-api/src/main"
8215 #:test-dir "slf4j-api/src/test"
8216 #:phases
8217 (modify-phases %standard-phases
8218 (add-after 'build 'regenerate-jar
8219 (lambda _
8220 ;; pom.xml ignores these files in the jar creation process. If we don't,
8221 ;; we get the error "This code should have never made it into slf4j-api.jar"
8222 (delete-file-recursively "build/classes/org/slf4j/impl")
8223 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
8224 "build/classes" ".")))
8225 (add-before 'check 'dont-test-abstract-classes
8226 (lambda _
8227 ;; abstract classes are not meant to be run with junit
8228 (substitute* "build.xml"
8229 (("<include name=\"\\*\\*/\\*Test.java\" />")
8230 (string-append "<include name=\"**/*Test.java\" />"
8231 "<exclude name=\"**/MultithreadedInitializationTest"
8232 ".java\" />")))
8233 #t))
8234 (replace 'install
8235 (install-from-pom "slf4j-api/pom.xml")))))
8236 (propagated-inputs
8237 (list java-slf4j-parent))
8238 (native-inputs
8239 (list java-junit java-hamcrest-core))
8240 (home-page "https://www.slf4j.org/")
8241 (synopsis "Simple logging facade for Java")
8242 (description "The Simple Logging Facade for Java (SLF4J) serves as a
8243simple facade or abstraction for various logging
8244frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
8245allowing the end user to plug in the desired logging framework at deployment
8246time.")
8247 (license license:expat)))
8248
8249(define java-slf4j-parent
8250 (package
8251 (inherit java-slf4j-api)
8252 (name "java-slf4j-parent")
8253 (native-inputs `())
8254 (propagated-inputs '())
8255 (arguments
8256 `(#:tests? #f
8257 #:phases
8258 (modify-phases %standard-phases
8259 (delete 'build)
8260 (delete 'configure)
8261 (replace 'install
8262 (install-pom-file "pom.xml")))))))
8263
8264(define-public java-slf4j-simple
8265 (package
8266 (name "java-slf4j-simple")
8267 (version "1.7.25")
8268 (source (package-source java-slf4j-api))
8269 (build-system ant-build-system)
8270 (arguments
8271 `(#:jar-name "slf4j-simple.jar"
8272 #:source-dir "slf4j-simple/src/main"
8273 #:test-dir "slf4j-simple/src/test"
8274 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
8275 #:phases
8276 (modify-phases %standard-phases
8277 ;; The tests need some test classes from slf4j-api
8278 (add-before 'check 'build-slf4j-api-test-helpers
8279 (lambda _
8280 ;; Add current dir to CLASSPATH ...
8281 (setenv "CLASSPATH"
8282 (string-append (getcwd) ":" (getenv "CLASSPATH")))
8283 ;; ... and build test helper classes here:
8284 (apply invoke
8285 `("javac" "-d" "."
8286 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8287 (replace 'install
8288 (install-from-pom "slf4j-simple/pom.xml")))))
8289 (propagated-inputs
8290 (list java-slf4j-api))
8291 (native-inputs
8292 (list java-junit java-hamcrest-core))
8293 (home-page "https://www.slf4j.org/")
8294 (synopsis "Simple implementation of simple logging facade for Java")
8295 (description "SLF4J binding for the Simple implementation, which outputs
8296all events to System.err. Only messages of level INFO and higher are
8297printed.")
8298 (license license:expat)))
8299
8300(define-public java-slf4j-nop
8301 (package
8302 (name "java-slf4j-nop")
8303 (version "1.7.25")
8304 (source (package-source java-slf4j-api))
8305 (build-system ant-build-system)
8306 (arguments
8307 `(#:jar-name "slf4j-nop.jar"
8308 #:source-dir "slf4j-nop/src/main"
8309 #:test-dir "slf4j-nop/src/test"
8310 #:phases (modify-phases %standard-phases
8311 ;; The tests need some test classes from slf4j-api
8312 (add-before 'check 'build-slf4j-api-test-helpers
8313 (lambda _
8314 ;; Add current dir to CLASSPATH ...
8315 (setenv "CLASSPATH"
8316 (string-append (getcwd) ":"
8317 (getenv "CLASSPATH")))
8318 ;; ... and build test helper classes here:
8319 (apply invoke
8320 `("javac" "-d" "."
8321 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8322 (replace 'install
8323 (install-from-pom "slf4j-nop/pom.xml")))))
8324 (propagated-inputs (list java-slf4j-api))
8325 (native-inputs (list java-junit java-hamcrest-core))
8326 (home-page "https://www.slf4j.org/")
8327 (synopsis "SLF4J binding that silently discards all logging messages")
8328 (description "Binding/provider for NOP, an implementation that silently
8329discards all logging messages.")
8330 (license license:expat)))
8331
8332(define-public antlr2
8333 (package
8334 (name "antlr2")
8335 (version "2.7.7")
8336 (source (origin
8337 (method url-fetch)
8338 (uri (string-append "https://www.antlr2.org/download/antlr-"
8339 version ".tar.gz"))
8340 (sha256
8341 (base32
8342 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
8343 (modules '((guix build utils)))
8344 (snippet
8345 '(begin
8346 (delete-file "antlr.jar")
8347 (substitute* "lib/cpp/antlr/CharScanner.hpp"
8348 (("#include <map>")
8349 (string-append
8350 "#include <map>\n"
8351 "#define EOF (-1)\n"
8352 "#include <strings.h>")))
8353 (substitute* "configure"
8354 (("/bin/sh") "sh"))
8355 #t))))
8356 (build-system gnu-build-system)
8357 (arguments
8358 `(#:tests? #f ; no test target
8359 #:imported-modules ((guix build ant-build-system)
8360 ,@%default-gnu-imported-modules)
8361 #:modules (((guix build ant-build-system) #:prefix ant:)
8362 (guix build gnu-build-system)
8363 (guix build utils))
8364 #:phases
8365 (modify-phases %standard-phases
8366 (add-after 'install 'strip-jar-timestamps
8367 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8368 (add-before 'configure 'fix-timestamp
8369 (lambda _
8370 (substitute* "configure"
8371 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8372 #t))
8373 (add-after 'configure 'fix-bin-ls
8374 (lambda _
8375 (substitute* (find-files "." "Makefile")
8376 (("/bin/ls") "ls"))
8377 #t)))))
8378 (native-inputs
8379 `(("which" ,which)
8380 ("zip" ,zip)
8381 ("java" ,icedtea "jdk")))
8382 (inputs
8383 `(("java" ,icedtea)))
8384 (home-page "https://www.antlr2.org")
8385 (synopsis "Framework for constructing recognizers, compilers, and translators")
8386 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8387is a language tool that provides a framework for constructing recognizers,
8388compilers, and translators from grammatical descriptions containing Java, C#,
8389C++, or Python actions. ANTLR provides excellent support for tree construction,
8390tree walking, and translation.")
8391 (license license:public-domain)))
8392
8393(define-public java-stringtemplate-3
8394 (package
8395 (name "java-stringtemplate")
8396 (version "3.2.1")
8397 (source (origin
8398 (method url-fetch)
8399 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8400 "gh-pages/download/stringtemplate-"
8401 version ".tar.gz"))
8402 (sha256
8403 (base32
8404 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8405 (build-system ant-build-system)
8406 (arguments
8407 `(#:jar-name (string-append ,name "-" ,version ".jar")
8408 #:test-dir "test"
8409 #:modules ((guix build ant-build-system)
8410 (guix build utils)
8411 (srfi srfi-1))
8412 #:phases
8413 (modify-phases %standard-phases
8414 (add-before 'check 'fix-tests
8415 (lambda _
8416 (substitute* "build.xml"
8417 (("\\$\\{test.home\\}/java")
8418 "${test.home}/org"))
8419 #t))
8420 (add-before 'build 'generate-grammar
8421 (lambda _
8422 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8423 (for-each (lambda (file)
8424 (format #t "~a\n" file)
8425 (invoke "antlr" file))
8426 '("template.g" "angle.bracket.template.g" "action.g"
8427 "eval.g" "group.g" "interface.g")))
8428 #t)))))
8429 (native-inputs
8430 `(("antlr" ,antlr2)
8431 ("java-junit" ,java-junit)))
8432 (home-page "https://www.stringtemplate.org")
8433 (synopsis "Template engine to generate formatted text output")
8434 (description "StringTemplate is a java template engine (with ports for C#,
8435Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8436or any other formatted text output. StringTemplate is particularly good at
8437code generators, multiple site skins, and internationalization / localization.
8438StringTemplate also powers ANTLR.")
8439 (license license:bsd-3)))
8440
8441;; antlr3 is partially written using antlr3 grammar files. It also depends on
8442;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8443;; files and uses antlr3 at runtime. The latest version requires a recent version
8444;; of antlr3 at runtime.
8445;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8446;; This version of ST4 is sufficient for the latest antlr3.
8447;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8448;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8449;; against the latest ST4.
8450;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8451;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8452;; only grammar files with the antlr2 syntax.
8453;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8454
8455(define-public java-stringtemplate
8456 (package (inherit java-stringtemplate-3)
8457 (name "java-stringtemplate")
8458 (version "4.0.8")
8459 (source (origin
8460 (method url-fetch)
8461 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8462 version ".tar.gz"))
8463 (file-name (string-append name "-" version ".tar.gz"))
8464 (sha256
8465 (base32
8466 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8467 (build-system ant-build-system)
8468 (arguments
8469 `(#:jar-name (string-append ,name "-" ,version ".jar")
8470 #:tests? #f ; FIXME: tests fail for unknown reasons
8471 #:test-dir "test"
8472 #:modules ((guix build ant-build-system)
8473 (guix build utils)
8474 (srfi srfi-1))
8475 #:phases
8476 (modify-phases %standard-phases
8477 (add-before 'check 'fix-test-target
8478 (lambda _
8479 (substitute* "build.xml"
8480 (("\\$\\{test.home\\}/java") "${test.home}/")
8481 (("\\*Test.java") "Test*.java"))
8482 #t))
8483 (add-before 'build 'generate-grammar
8484 (lambda _
8485 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8486 (for-each (lambda (file)
8487 (format #t "~a\n" file)
8488 (invoke "antlr3" file))
8489 '("STParser.g" "Group.g" "CodeGenerator.g")))
8490 #t)))))
8491 (inputs
8492 `(("antlr3" ,antlr3-bootstrap)
8493 ("antlr2" ,antlr2)
8494 ("java-stringtemplate" ,java-stringtemplate-3)
8495 ("java-junit" ,java-junit)))))
8496
8497(define-public java-stringtemplate-4.0.6
8498 (package (inherit java-stringtemplate)
8499 (name "java-stringtemplate")
8500 (version "4.0.6")
8501 (source (origin
8502 (method url-fetch)
8503 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8504 version ".tar.gz"))
8505 (file-name (string-append name "-" version ".tar.gz"))
8506 (sha256
8507 (base32
8508 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8509 (inputs
8510 `(("antlr3" ,antlr3-3.3)
8511 ("antlr2" ,antlr2)
8512 ("java-stringtemplate" ,java-stringtemplate-3)))))
8513
8514(define-public antlr3
8515 (package
8516 (name "antlr3")
8517 (version "3.5.2")
8518 (source (origin
8519 (method git-fetch)
8520 (uri (git-reference
8521 (url "https://github.com/antlr/antlr3")
8522 (commit version)))
8523 (file-name (git-file-name name version))
8524 (sha256
8525 (base32
8526 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8527 (build-system ant-build-system)
8528 (arguments
8529 `(#:jar-name (string-append ,name "-" ,version ".jar")
8530 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8531 #:tests? #f
8532 #:phases
8533 (modify-phases %standard-phases
8534 (add-after 'install 'bin-install
8535 (lambda* (#:key inputs outputs #:allow-other-keys)
8536 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8537 (bin (string-append (assoc-ref outputs "out") "/bin")))
8538 (mkdir-p bin)
8539 (with-output-to-file (string-append bin "/antlr3")
8540 (lambda _
8541 (display
8542 (string-append "#!" (which "sh") "\n"
8543 "java -cp " jar "/" ,name "-" ,version ".jar:"
8544 (string-concatenate
8545 (find-files (assoc-ref inputs "stringtemplate")
8546 ".*\\.jar"))
8547 ":"
8548 (string-concatenate
8549 (find-files (assoc-ref inputs "stringtemplate4")
8550 ".*\\.jar"))
8551 ":"
8552 (string-concatenate
8553 (find-files (string-append
8554 (assoc-ref inputs "antlr")
8555 "/lib")
8556 ".*\\.jar"))
8557 " org.antlr.Tool $*"))))
8558 (chmod (string-append bin "/antlr3") #o755))
8559 #t))
8560 (add-before 'build 'generate-grammar
8561 (lambda _
8562 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8563 (for-each (lambda (file)
8564 (display file)
8565 (newline)
8566 (invoke "antlr3" file))
8567 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8568 "AssignTokenTypesWalker.g"
8569 "ActionTranslator.g" "TreeToNFAConverter.g"
8570 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8571 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8572 (substitute* "ANTLRParser.java"
8573 (("public Object getTree") "public GrammarAST getTree"))
8574 (substitute* "ANTLRv3Parser.java"
8575 (("public Object getTree") "public CommonTree getTree"))
8576 (chdir "../../../../../java")
8577 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8578 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8579import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8580 (substitute* "org/antlr/tool/ErrorManager.java"
8581 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8582 (chdir "../../../..")
8583 #t))
8584 (add-before 'build 'fix-build-xml
8585 (lambda _
8586 (substitute* "build.xml"
8587 (("target name=\"compile\">")
8588 "target name=\"compile\">
8589<copy todir=\"${classes.dir}\">
8590<fileset dir=\"tool/src/main/resources\">
8591<include name=\"**/*.stg\"/>
8592<include name=\"**/*.st\"/>
8593<include name=\"**/*.sti\"/>
8594<include name=\"**/STLexer.tokens\"/>
8595</fileset>
8596</copy>"))
8597 #t)))))
8598 (native-inputs
8599 `(("antlr" ,antlr2)
8600 ("antlr3" ,antlr3-bootstrap)))
8601 (inputs
8602 `(("junit" ,java-junit)
8603 ("stringtemplate" ,java-stringtemplate-3)
8604 ("stringtemplate4" ,java-stringtemplate)))
8605 (propagated-inputs
8606 `(("stringtemplate" ,java-stringtemplate-3)
8607 ("antlr" ,antlr2)
8608 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8609 (home-page "https://www.antlr3.org")
8610 (synopsis "Framework for constructing recognizers, compilers, and translators")
8611 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8612is a language tool that provides a framework for constructing recognizers,
8613compilers, and translators from grammatical descriptions containing Java, C#,
8614C++, or Python actions. ANTLR provides excellent support for tree construction,
8615tree walking, and translation.")
8616 (license license:bsd-3)))
8617
8618(define-public antlr3-bootstrap
8619 (package
8620 (inherit antlr3)
8621 (name "antlr3-bootstrap")
8622 (native-inputs
8623 `(("antlr" ,antlr2)
8624 ("antlr3" ,antlr3-3.3)))
8625 (inputs
8626 `(("junit" ,java-junit)))
8627 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
8628
8629(define-public antlr3-3.3
8630 (package
8631 (inherit antlr3)
8632 (name "antlr3")
8633 (version "3.3")
8634 (source (origin
8635 (method url-fetch)
8636 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8637 "gh-pages/download/antlr-"
8638 version ".tar.gz"))
8639 (sha256
8640 (base32
8641 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8642 (patches
8643 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8644 (arguments
8645 `(#:jar-name (string-append ,name "-" ,version ".jar")
8646 #:source-dir (string-join '("tool/src/main/java"
8647 "runtime/Java/src/main/java"
8648 "tool/src/main/antlr2"
8649 "tool/src/main/antlr3")
8650 ":")
8651 #:tests? #f ; FIXME: tests seem to require maven plugin
8652 #:modules ((guix build ant-build-system)
8653 (guix build utils)
8654 (srfi srfi-1))
8655 #:phases
8656 (modify-phases %standard-phases
8657 (add-after 'install 'bin-install
8658 (lambda* (#:key inputs outputs #:allow-other-keys)
8659 (let* ((out (assoc-ref outputs "out"))
8660 (jar (string-append out "/share/java"))
8661 (bin (string-append out "/bin")))
8662 (mkdir-p bin)
8663 (with-output-to-file (string-append bin "/antlr3")
8664 (lambda _
8665 (display
8666 (string-append
8667 "#!" (which "sh") "\n"
8668 "java -cp " jar "/antlr3-3.3.jar:"
8669 (string-join
8670 (append (find-files (assoc-ref inputs "java-stringtemplate")
8671 ".*\\.jar$")
8672 (find-files (string-append (assoc-ref inputs "antlr")
8673 "/lib")
8674 ".*\\.jar$"))
8675 ":")
8676 " org.antlr.Tool $*"))))
8677 (chmod (string-append bin "/antlr3") #o755)
8678 #t)))
8679 (add-before 'build 'generate-grammar
8680 (lambda _
8681 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8682 (("import org.antlr.grammar.v2.\\*;")
8683 "import org.antlr.grammar.v2.*;\n
8684import org.antlr.grammar.v2.TreeToNFAConverter;\n
8685import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8686import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8687 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8688 (for-each (lambda (file)
8689 (format #t "~a\n" file)
8690 (invoke "antlr" file))
8691 '("antlr.g" "antlr.print.g" "assign.types.g"
8692 "buildnfa.g" "codegen.g" "define.g")))
8693 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8694 (for-each (lambda (file)
8695 (format #t "~a\n" file)
8696 (invoke "antlr3" file))
8697 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8698 "ANTLRv3Tree.g")))
8699 #t))
8700 (add-before 'build 'fix-build-xml
8701 (lambda _
8702 (substitute* "build.xml"
8703 (("target name=\"compile\">")
8704 "target name=\"compile\">
8705<copy todir=\"${classes.dir}\">
8706<fileset dir=\"tool/src/main/resources\">
8707<include name=\"**/*.stg\"/>
8708<include name=\"**/*.st\"/>
8709<include name=\"**/*.sti\"/>
8710<include name=\"**/STLexer.tokens\"/>
8711</fileset>
8712</copy>"))
8713 #t)))))
8714 (native-inputs
8715 `(("antlr" ,antlr2)
8716 ("antlr3" ,antlr3-3.1)))
8717 (inputs
8718 `(("junit" ,java-junit)))
8719 (propagated-inputs
8720 `(("java-stringtemplate" ,java-stringtemplate-3)
8721 ("antlr" ,antlr2)))
8722 (properties (alist-delete 'hidden? (package-properties antlr3)))))
8723
8724(define-public antlr3-3.1
8725 (package
8726 (inherit antlr3)
8727 (version "3.1")
8728 (source (origin
8729 (method url-fetch)
8730 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8731 "gh-pages/download/antlr-"
8732 version ".tar.gz"))
8733 (sha256
8734 (base32
8735 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8736 (patches
8737 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8738 (arguments
8739 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8740 #:source-dir "src:runtime/Java/src"
8741 #:tests? #f
8742 #:phases
8743 (modify-phases %standard-phases
8744 (add-after 'install 'bin-install
8745 (lambda* (#:key inputs outputs #:allow-other-keys)
8746 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8747 (bin (string-append (assoc-ref outputs "out") "/bin")))
8748 (mkdir-p bin)
8749 (with-output-to-file (string-append bin "/antlr3")
8750 (lambda _
8751 (display
8752 (string-append "#!" (which "sh") "\n"
8753 "java -cp " jar "/antlr3-3.1.jar:"
8754 (string-concatenate
8755 (find-files (assoc-ref inputs "stringtemplate")
8756 ".*\\.jar"))
8757 ":"
8758 (string-concatenate
8759 (find-files (string-append
8760 (assoc-ref inputs "antlr")
8761 "/lib")
8762 ".*\\.jar"))
8763 " org.antlr.Tool $*"))))
8764 (chmod (string-append bin "/antlr3") #o755))
8765 #t))
8766 (add-before 'build 'generate-grammar
8767 (lambda _
8768 (let ((dir "src/org/antlr/tool/"))
8769 (for-each (lambda (file)
8770 (display file)
8771 (newline)
8772 (invoke "antlr" "-o" dir (string-append dir file)))
8773 '("antlr.g" "antlr.print.g" "assign.types.g"
8774 "buildnfa.g" "define.g")))
8775 (format #t "codegen.g\n")
8776 (invoke "antlr" "-o" "src/org/antlr/codegen"
8777 "src/org/antlr/codegen/codegen.g")
8778 #t))
8779 (add-before 'build 'fix-build-xml
8780 (lambda _
8781 (substitute* "build.xml"
8782 (("target name=\"compile\">")
8783 "target name=\"compile\">
8784<copy todir=\"${classes.dir}\">
8785<fileset dir=\"src\">
8786<include name=\"**/*.stg\"/>
8787<include name=\"**/*.st\"/>
8788<include name=\"**/*.sti\"/>
8789<include name=\"**/STLexer.tokens\"/>
8790</fileset>
8791</copy>"))
8792 #t)))))
8793 (native-inputs
8794 `(("antlr" ,antlr2)))
8795 (inputs
8796 `(("junit" ,java-junit)))
8797 (propagated-inputs
8798 `(("stringtemplate" ,java-stringtemplate-3)))))
8799
8800(define-public java-treelayout
8801 (package
8802 (name "java-treelayout")
8803 (version "1.0.3")
8804 (source (origin
8805 (method git-fetch)
8806 (uri (git-reference
8807 (url "https://github.com/abego/treelayout")
8808 (commit (string-append "v" version))))
8809 (file-name (git-file-name name version))
8810 (sha256
8811 (base32
8812 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8813 (build-system ant-build-system)
8814 (arguments
8815 `(#:jar-name (string-append ,name "-" ,version ".jar")
8816 #:source-dir "org.abego.treelayout/src/main/java"
8817 #:test-dir "org.abego.treelayout/src/test"))
8818 (inputs
8819 (list java-junit))
8820 (native-inputs
8821 (list java-hamcrest-core))
8822 (home-page "https://treelayout.sourceforge.net")
8823 (synopsis "Tree Layout Algorithm in Java")
8824 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8825not restricted to a specific output or format, but can be used for any kind of
8826two dimensional diagram. Examples are Swing based components, SVG files, etc.
8827This is possible because TreeLayout separates the layout of a tree from the
8828actual rendering.")
8829 (license license:bsd-3)))
8830
8831(define-public java-antlr4-runtime
8832 (package
8833 (name "java-antlr4-runtime")
8834 (version "4.10.1")
8835 (source (origin
8836 (method git-fetch)
8837 (uri (git-reference
8838 (url "https://github.com/antlr/antlr4")
8839 (commit version)))
8840 (file-name (git-file-name name version))
8841 (sha256
8842 (base32
8843 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8844 (patches
8845 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8846 (build-system ant-build-system)
8847 (arguments
8848 `(#:jar-name "java-antlr4-runtime.jar"
8849 #:source-dir "runtime/Java/src/org"
8850 #:tests? #f; tests depend on java-antlr4 itself
8851 #:phases
8852 (modify-phases %standard-phases
8853 (add-before 'build 'copy-resources
8854 (lambda _
8855 (copy-recursively "runtime/Java/src/main/dot"
8856 "build/classes")
8857 #t)))))
8858 (home-page "https://www.antlr.org")
8859 (synopsis "ANTLR runtime library")
8860 (description "This package contains the runtime library used with generated
8861sources by ANTLR.")
8862 (license license:bsd-3)))
8863
8864(define-public cpp-antlr4-runtime
8865 (package
8866 (inherit java-antlr4-runtime)
8867 (name "cpp-antlr4-runtime")
8868 (properties '((upstream-name . "antlr4-cpp-runtime")))
8869 (outputs '("out" "static"))
8870 (build-system cmake-build-system)
8871 (arguments
8872 (list
8873 ;; TODO: try to run the tests under
8874 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8875 #:phases
8876 #~(modify-phases %standard-phases
8877 (add-after 'unpack 'chdir
8878 (lambda _
8879 (chdir "runtime/Cpp")))
8880 (add-after 'chdir 'unbundle-googletest
8881 (lambda _
8882 (substitute* "runtime/CMakeLists.txt"
8883 (("^ FetchContent_MakeAvailable.*")
8884 "")
8885 (("gtest_main" all)
8886 (string-append "gtest " all)))))
8887 (add-after 'install 'move-static-library
8888 (lambda* (#:key outputs #:allow-other-keys)
8889 (let ((static (assoc-ref outputs "static"))
8890 (libantlr4-runtime.a (search-input-file
8891 outputs "lib/libantlr4-runtime.a")))
8892 (mkdir-p (string-append static "/lib"))
8893 (rename-file
8894 libantlr4-runtime.a
8895 (string-append static "/lib/"
8896 (basename libantlr4-runtime.a)))))))))
8897 (native-inputs (list googletest pkg-config))
8898 (inputs (list `(,util-linux "lib"))) ;libuuid
8899 (synopsis "ANTLR C++ runtime library")
8900 (description "This package contains the C++ runtime library used with C++
8901generated sources by ANTLR.")))
8902
8903(define-deprecated-package java-antlr4-runtime-cpp
8904 cpp-antlr4-runtime)
8905
8906(define-public python-antlr4-runtime
8907 (package
8908 (inherit java-antlr4-runtime)
8909 (name "python-antlr4-runtime")
8910 (properties '((upstream-name . "antlr4-python3-runtime")))
8911 (build-system pyproject-build-system)
8912 (arguments
8913 (list
8914 #:test-backend #~'custom
8915 #:test-flags #~'("tests/run.py" "--verbose")
8916 #:phases
8917 #~(modify-phases %standard-phases
8918 (add-after 'unpack 'chdir
8919 (lambda _
8920 (chdir "runtime/Python3")))
8921 (add-after 'chdir 'regenerate-parsers
8922 (lambda _
8923 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
8924 "src/antlr4/xpath/XPathLexer.g4")
8925 (invoke "antlr4" "-no-listener" "-Dlanguage=Python3"
8926 "tests/expr/Expr.g4"))))))
8927 (native-inputs (list antlr4 python-setuptools))
8928 (synopsis "ANTLR Python runtime library")
8929 (description "This package contains the Python runtime library used with
8930Python generated sources by ANTLR.")))
8931
8932(define-deprecated-package java-antlr4-runtime-python
8933 python-antlr4-runtime)
8934
8935(define-public antlr4
8936 (package
8937 (inherit java-antlr4-runtime)
8938 (name "antlr4")
8939 (arguments
8940 `(#:jar-name "antlr4.jar"
8941 #:source-dir "tool/src"
8942 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8943 #:test-include (list "**/Test*.java")
8944 #:test-exclude (list
8945 ;; These have no runnable methods and fail because
8946 ;; test-include above is too broad.
8947 "**/TestContext.java"
8948 "**/TestOutputReading.java"
8949 ;; no @Test methods
8950 "**/TestParserErrors.java"
8951 "**/TestSemPredEvalParser.java"
8952 "**/TestSets.java"
8953 "**/TestListeners.java"
8954 "**/TestParseTrees.java"
8955 "**/TestParserExec.java"
8956 "**/TestLexerErrors.java"
8957 "**/TestPerformance.java"
8958 "**/TestCompositeParsers.java"
8959 "**/TestLexerExec.java"
8960 "**/TestSemPredEvalLexer.java"
8961 "**/TestLeftRecursion.java"
8962 "**/TestFullContextParsing.java"
8963 "**/TestCompositeLexers.java"
8964 ;; Null pointer exception
8965 "**/TestCompositeGrammars.java")
8966 #:phases
8967 (modify-phases %standard-phases
8968 (add-before 'build 'fix-build.xml
8969 (lambda _
8970 ;; tests are not in a java subdirectory
8971 (substitute* "build.xml"
8972 (("\\$\\{test.home\\}/java") "${test.home}"))
8973 #t))
8974 ;; tests require to have a working antlr4 binary
8975 (delete 'check)
8976 (add-after 'install 'check
8977 (lambda _
8978 (invoke "ant" "compile-tests")
8979 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8980 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8981 #t))
8982 (add-before 'check 'remove-unrelated-languages
8983 (lambda _
8984 ;; There are tests for other languages that ANTLR can generate, but
8985 ;; we don't have the infrastructure for that yet. Let's test Java
8986 ;; generation only.
8987 (for-each
8988 (lambda (language)
8989 (delete-file-recursively
8990 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8991 language)))
8992 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8993 "python3" "swift"))
8994 #t))
8995 (add-before 'check 'generate-test-parsers
8996 (lambda* (#:key outputs #:allow-other-keys)
8997 (define (run-antlr dir filename package)
8998 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8999 "-package" package (string-append dir "/" filename)
9000 "-Xlog"))
9001 (setenv "PATH" (string-append (getenv "PATH") ":"
9002 (assoc-ref outputs "out") "/bin"))
9003 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9004 "Java.g4" "org.antlr.v4.test.runtime.java.api")
9005 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9006 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
9007 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
9008 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
9009 #t))
9010 (add-before 'check 'remove-graphemes
9011 (lambda _
9012 ;; When running antlr on grahemes.g4, we get a runtime exception:
9013 ;; set is empty. So delete the file that depends on it.
9014 (delete-file
9015 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
9016 #t))
9017 (add-after 'install 'bin-install
9018 (lambda* (#:key inputs outputs #:allow-other-keys)
9019 (let* ((output (assoc-ref outputs "out"))
9020 (bin (string-append output "/bin"))
9021 (bin/antlr4 (string-append bin "/antlr4")))
9022 (mkdir-p bin)
9023 (with-output-to-file bin/antlr4
9024 (lambda _
9025 (display
9026 (string-append
9027 "#!"
9028 (search-input-file inputs "bin/sh")
9029 "\n"
9030 (string-append (assoc-ref inputs "openjdk")
9031 "/bin/java")
9032 " -cp "
9033 (string-append output "/share/java/antlr4.jar")
9034 ":"
9035 (string-join
9036 (apply append
9037 (map (lambda (input)
9038 (find-files (assoc-ref inputs input)
9039 "\\.jar$"))
9040 '("antlr3" "java-stringtemplate"
9041 "java-antlr4-runtime" "java-treelayout"
9042 "java-jsonp-api" "java-icu4j")))
9043 ":")
9044 " org.antlr.v4.Tool $*\n"))))
9045 (chmod bin/antlr4 #o755))))
9046 (add-before 'build 'copy-resources
9047 (lambda _
9048 (copy-recursively "tool/resources/" "build/classes")
9049 #t))
9050 (add-before 'build 'generate-unicode
9051 (lambda _
9052 ;; First: build the generator
9053 (invoke "javac" "-cp" (getenv "CLASSPATH")
9054 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
9055 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
9056 ;; Then use it
9057 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
9058 ":tool/src:runtime/Java")
9059 "org.antlr.v4.unicode.UnicodeRenderer"
9060 "tool/resources/org/antlr/v4/tool/templates"
9061 "unicodedata"
9062 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
9063 ;; It seems there is a bug with our ST4
9064 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
9065 (("\\\\>") ">"))
9066 ;; Remove the additional file
9067 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
9068 #t))
9069 (add-before 'build 'generate-grammar
9070 (lambda* (#:key inputs #:allow-other-keys)
9071 (with-directory-excursion "tool/src/org/antlr/v4/parse"
9072 (for-each (lambda (file)
9073 (display file)
9074 (newline)
9075 (invoke "antlr3" file))
9076 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
9077 "GrammarTreeVisitor.g" "ATNBuilder.g"
9078 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
9079 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
9080 (install-file "../parse/ANTLRParser.tokens" ".")
9081 (display "SourceGenTriggers.g\n")
9082 (invoke "antlr3" "SourceGenTriggers.g"))
9083 #t)))))
9084 (inputs
9085 (list antlr3
9086 java-antlr4-runtime
9087 java-icu4j
9088 java-jsonp-api
9089 java-stringtemplate
9090 java-treelayout
9091 openjdk))
9092 (native-inputs
9093 (list java-junit))
9094 (synopsis "Parser and lexer generator in Java")
9095 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
9096parser generator for reading, processing, executing, or translating structured
9097text or binary files. It's widely used to build languages, tools, and
9098frameworks. From a grammar, ANTLR generates a parser that can build and walk
9099parse trees.")))
9100
9101(define-public java-antlr4-runtime-4.1
9102 (package
9103 (inherit java-antlr4-runtime)
9104 (version "4.1")
9105 (source (origin
9106 (method git-fetch)
9107 (uri (git-reference
9108 (url "https://github.com/antlr/antlr4")
9109 (commit version)))
9110 (file-name (git-file-name "antlr4" version))
9111 (sha256
9112 (base32
9113 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
9114 (arguments
9115 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
9116 ((#:phases phases)
9117 `(modify-phases ,phases
9118 (add-before 'configure 'chmod
9119 (lambda _
9120 (chmod "build.xml" #o644)
9121 #t))))))
9122 (inputs
9123 (list java-treelayout))))
9124
9125(define-public antlr4-4.1
9126 (package
9127 (inherit antlr4)
9128 (version (package-version java-antlr4-runtime-4.1))
9129 (source (package-source java-antlr4-runtime-4.1))
9130 (arguments
9131 (substitute-keyword-arguments (package-arguments antlr4)
9132 ((#:test-dir _)
9133 "tool/test")
9134 ((#:test-exclude excludes)
9135 `(list "**/TestParseErrors.java"
9136 "**/TestTopologicalSort.java"
9137 ,@excludes))
9138 ((#:phases phases)
9139 `(modify-phases ,phases
9140 (delete 'generate-unicode)
9141 (replace 'check
9142 (lambda _
9143 (invoke "ant" "check")
9144 #t))
9145 (add-before 'configure 'chmod
9146 (lambda _
9147 (chmod "build.xml" #o644)
9148 #t))
9149 (delete 'remove-graphemes)
9150 (delete 'remove-unrelated-languages)
9151 (delete 'generate-test-parsers)))))
9152 (inputs
9153 (alist-replace
9154 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
9155 (package-inputs antlr4)))))
9156
9157(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
9158 (package
9159 (inherit java-antlr4-runtime)
9160 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
9161 (version "4.7.4")
9162 (source (origin
9163 (method git-fetch)
9164 (uri (git-reference
9165 (url "https://github.com/tunnelvisionlabs/antlr4")
9166 (commit (string-append version "-opt"))))
9167 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
9168 (sha256
9169 (base32
9170 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
9171 (patches
9172 (search-patches "java-antlr4-Add-standalone-generator.patch"
9173 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
9174 (arguments
9175 `(#:jar-name "java-antlr4-runtime-annotations.jar"
9176 #:source-dir "runtime/JavaAnnotations/src"
9177 #:tests? #f; no tests
9178 #:phases
9179 (modify-phases %standard-phases
9180 (add-after 'build 'copy-resources
9181 (lambda _
9182 (copy-recursively "runtime/JavaAnnotations/resources"
9183 "build/classes")
9184 #t))
9185 (add-after 'copy-resources 'rebuild-jar
9186 (lambda _
9187 (invoke "ant" "jar")
9188 #t)))))
9189 (inputs '())
9190 (native-inputs '())
9191 (synopsis "Annotations for ANTLR's runtime library")
9192 (description "This package contains annotations used during the build of
9193the runtime library of ANTLR.")))
9194
9195;; the runtime of this library requires a lexer that is generated by antlr4.
9196;; However, antlr4 itself requires this library at build and run-time. We
9197;; use [email protected], the closest version of antlr that doesn't need this
9198;; bootstrap process, to generate the lexer. The generated lexer is built
9199;; for the 4.1 runtime, which is slightly different from this runtime.
9200;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
9201;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
9202;; the proper, working, runtime to build antlr4 again.
9203(define-public java-tunnelvisionlabs-antlr4-runtime-bootstrap
9204 (package
9205 (inherit java-antlr4-runtime)
9206 (name "java-tunnelvisionlabs-antlr4-runtime")
9207 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9208 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9209 (arguments
9210 `(#:jar-name "java-antlr4-runtime.jar"
9211 #:source-dir "runtime/Java/src"
9212 #:tests? #f; tests require antlr4, but antlr4 depends on this package
9213 #:phases
9214 (modify-phases %standard-phases
9215 (add-before 'build 'generate-xpath-lexer
9216 (lambda _
9217 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
9218 "-visitor" "-no-listener"
9219 "-package" "org.antlr.v4.runtime.tree.xpath"
9220 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
9221 ;; Generated code is for an incompatible version of the runtime
9222 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
9223 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
9224 "LexerATNSimulator(this,_ATN)"))
9225 #t))
9226 (add-before 'build 'copy-resources
9227 (lambda _
9228 (copy-recursively "runtime/Java/src/main/dot"
9229 "build/classes")
9230 #t)))))
9231 (native-inputs
9232 `(("antlr4" ,antlr4-4.1)
9233 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9234 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))
9235 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9236
9237(define-public java-tunnelvisionlabs-antlr4-bootstrap
9238 (package
9239 (inherit antlr4)
9240 (name "java-tunnelvisionlabs-antlr4")
9241 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9242 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9243 (arguments
9244 (substitute-keyword-arguments (package-arguments antlr4)
9245 ((#:test-dir _)
9246 "tool/test:runtime-testsuite/src")
9247 ((#:phases phases)
9248 `(modify-phases ,phases
9249 (delete 'remove-unrelated-languages)
9250 (delete 'remove-graphemes)
9251 (delete 'generate-test-parsers)
9252 (delete 'check)))))
9253 (native-inputs '())
9254 (inputs
9255 `(("antlr3" ,antlr3)
9256 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9257 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9258 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
9259 ("java-icu4j" ,java-icu4j)
9260 ("java-jsonp-api" ,java-jsonp-api)
9261 ("java-stringtemplate" ,java-stringtemplate)
9262 ("java-treelayout" ,java-treelayout)
9263 ("openjdk" ,openjdk)))
9264 (properties '((hidden? . #t))))) ;for bootstrapping purposes only
9265
9266(define-public java-tunnelvisionlabs-antlr4-runtime
9267 (package
9268 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9269 (native-inputs
9270 (alist-replace
9271 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
9272 (package-native-inputs
9273 java-tunnelvisionlabs-antlr4-runtime-bootstrap)))
9274 (properties
9275 (alist-delete
9276 'hidden?
9277 (package-properties java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
9278
9279(define-public java-tunnelvisionlabs-antlr4
9280 (package
9281 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
9282 (inputs
9283 (alist-replace
9284 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
9285 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))
9286 (properties
9287 (alist-delete
9288 'hidden?
9289 (package-properties java-tunnelvisionlabs-antlr4-bootstrap)))))
9290
9291(define-public java-commons-cli-1.2
9292 ;; This is a bootstrap dependency for Maven2.
9293 (package
9294 (inherit java-commons-cli)
9295 (version "1.2")
9296 (source (origin
9297 (method url-fetch)
9298 (uri (string-append "mirror://apache/commons/cli/source/"
9299 "commons-cli-" version "-src.tar.gz"))
9300 (sha256
9301 (base32
9302 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
9303 (arguments
9304 `(#:jar-name "commons-cli.jar"
9305 #:phases
9306 (modify-phases %standard-phases
9307 (add-before 'check 'fix-build-xml
9308 (lambda* (#:key inputs #:allow-other-keys)
9309 (substitute* "build.xml"
9310 (("dir=\"\\$\\{test.home\\}/java\"")
9311 "dir=\"${test.home}\""))
9312 #t)))))
9313 (native-inputs
9314 (list java-junit))))
9315
9316(define-public java-microemulator-cldc
9317 (package
9318 (name "java-microemulator-cldc")
9319 (version "2.0.4")
9320 (source (origin
9321 (method url-fetch)
9322 (uri (string-append "https://github.com/barteo/microemu/archive/"
9323 "microemulator_"
9324 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
9325 version)
9326 ".tar.gz"))
9327 (file-name (string-append name "-" version ".tar.gz"))
9328 (sha256
9329 (base32
9330 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
9331 (build-system ant-build-system)
9332 (arguments
9333 `(#:jar-name "microemulator-cldc.jar"
9334 #:source-dir "microemu-cldc/src/main/java"
9335 #:tests? #f)); Requires even older software
9336 (home-page "https://github.com/barteo/microemu")
9337 (synopsis "J2ME CLDC emulator")
9338 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
9339Emulator. It demonstrates MIDlet based applications in web browser
9340applet and can be run as a standalone java application.")
9341 (license (list license:asl2.0
9342 ;; or altenatively:
9343 license:lgpl2.1+))))
9344
9345(define-public java-datanucleus-javax-persistence
9346 (package
9347 (name "java-datanucleus-javax-persistence")
9348 (version "2.2.0")
9349 (source (origin
9350 (method url-fetch)
9351 (uri (string-append "https://github.com/datanucleus/"
9352 "javax.persistence/archive/javax.persistence-"
9353 version "-release.tar.gz"))
9354 (sha256
9355 (base32
9356 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
9357 (build-system ant-build-system)
9358 (arguments
9359 `(#:jar-name "java-datanucleus-javax-persistence.jar"
9360 #:jdk ,icedtea-8
9361 #:source-dir "src/main/java"
9362 #:tests? #f)); no tests
9363 (home-page "https://github.com/datanucleus/javax.persistence")
9364 (synopsis "JPA API")
9365 (description "This package contains a clean definition of JPA API intended
9366for use with DataNucleus JPA since the JCP haven't provided an official JPA API
9367jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
9368used to generate this API.")
9369 (license (list license:edl1.0 license:epl1.0))))
9370
9371(define-public java-osgi-cmpn
9372 (package
9373 (name "java-osgi-cmpn")
9374 (version "6.0.0")
9375 (source (origin
9376 (method url-fetch)
9377 (uri (string-append "https://repo1.maven.org/maven2/"
9378 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
9379 version "-sources.jar"))
9380 (sha256
9381 (base32
9382 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
9383 (build-system ant-build-system)
9384 (arguments
9385 `(#:jar-name "osgi-cmpn.jar"
9386 #:tests? #f)); no tests
9387 (inputs
9388 `(("annotation" ,java-osgi-annotation)
9389 ("core" ,java-osgi-core)
9390 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
9391 ("microemulator" ,java-microemulator-cldc)
9392 ("servlet" ,java-classpathx-servletapi)))
9393 (home-page "https://www.osgi.org")
9394 (synopsis "Compendium specification module of OSGi framework")
9395 (description
9396 "OSGi, for Open Services Gateway initiative framework, is a module system
9397and service platform for the Java programming language. This package contains
9398the compendium specification module, providing interfaces and classes for use
9399in compiling bundles.")
9400 (license license:asl2.0)))
9401
9402(define-public java-osgi-service-component-annotations
9403 (package
9404 (name "java-osgi-service-component-annotations")
9405 (version "1.3.0")
9406 (source (origin
9407 (method url-fetch)
9408 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9409 "org.osgi.service.component.annotations/"
9410 version "/org.osgi.service.component.annotations-"
9411 version "-sources.jar"))
9412 (sha256
9413 (base32
9414 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
9415 (build-system ant-build-system)
9416 (arguments
9417 `(#:jar-name "osgi-service-component-annotations.jar"
9418 #:tests? #f)); no tests
9419 (inputs
9420 `(("annotation" ,java-osgi-annotation)))
9421 (home-page "https://www.osgi.org")
9422 (synopsis "Support annotations for osgi-service-component")
9423 (description
9424 "OSGi, for Open Services Gateway initiative framework, is a module system
9425and service platform for the Java programming language. This package contains
9426the support annotations for osgi-service-component.")
9427 (license license:asl2.0)))
9428
9429(define-public java-osgi-dto
9430 (package
9431 (name "java-osgi-dto")
9432 (version "1.0.0")
9433 (source (origin
9434 (method url-fetch)
9435 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9436 "org.osgi.dto/" version "/org.osgi.dto-"
9437 version "-sources.jar"))
9438 (sha256
9439 (base32
9440 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
9441 (build-system ant-build-system)
9442 (arguments
9443 `(#:jar-name "osgi-dto.jar"
9444 #:tests? #f)); no tests
9445 (inputs
9446 `(("annotation" ,java-osgi-annotation)))
9447 (home-page "https://www.osgi.org")
9448 (synopsis "Data Transfer Objects")
9449 (description
9450 "OSGi, for Open Services Gateway initiative framework, is a module system
9451and service platform for the Java programming language. This package contains
9452the Data Transfer Objects. It is easily serializable having only public fields
9453of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9454Map and array aggregates may also be used. The aggregates must only hold
9455objects of the listed types or aggregates.")
9456 (license license:asl2.0)))
9457
9458(define-public java-osgi-resource
9459 (package
9460 (name "java-osgi-resource")
9461 (version "1.0.0")
9462 (source (origin
9463 (method url-fetch)
9464 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9465 "org.osgi.resource/"
9466 version "/org.osgi.resource-"
9467 version "-sources.jar"))
9468 (sha256
9469 (base32
9470 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9471 (build-system ant-build-system)
9472 (arguments
9473 `(#:jar-name "osgi-resource.jar"
9474 #:tests? #f)); no tests
9475 (inputs
9476 `(("annotation" ,java-osgi-annotation)
9477 ("dto" ,java-osgi-dto)))
9478 (home-page "https://www.osgi.org")
9479 (synopsis "OSGI Resource")
9480 (description
9481 "OSGi, for Open Services Gateway initiative framework, is a module system
9482and service platform for the Java programming language. This package contains
9483the definition of common types in osgi packages.")
9484 (license license:asl2.0)))
9485
9486(define-public java-osgi-namespace-contract
9487 (package
9488 (name "java-osgi-namespace-contract")
9489 (version "1.0.0")
9490 (source (origin
9491 (method url-fetch)
9492 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9493 "org.osgi.namespace.contract/"
9494 version "/org.osgi.namespace.contract-"
9495 version "-sources.jar"))
9496 (sha256
9497 (base32
9498 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9499 (build-system ant-build-system)
9500 (inputs
9501 `(("resource" ,java-osgi-resource)
9502 ("annotation" ,java-osgi-annotation)))
9503 (arguments
9504 `(#:jar-name "osgi-namespace-contract.jar"
9505 #:tests? #f)); no tests
9506 (home-page "https://www.osgi.org")
9507 (synopsis "Contract Capability and Requirement Namespace")
9508 (description
9509 "OSGi, for Open Services Gateway initiative framework, is a module system
9510and service platform for the Java programming language. This package contains
9511the names for the attributes and directives for a namespace with contracts.")
9512 (license license:asl2.0)))
9513
9514(define-public java-osgi-namespace-extender
9515 (package
9516 (name "java-osgi-namespace-extender")
9517 (version "1.0.1")
9518 (source (origin
9519 (method url-fetch)
9520 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9521 "org.osgi.namespace.extender/"
9522 version "/org.osgi.namespace.extender-"
9523 version "-sources.jar"))
9524 (sha256
9525 (base32
9526 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9527 (build-system ant-build-system)
9528 (inputs
9529 `(("resource" ,java-osgi-resource)
9530 ("annotation" ,java-osgi-annotation)))
9531 (arguments
9532 `(#:jar-name "osgi-namespace-extendent.jar"
9533 #:tests? #f)); no tests
9534 (home-page "https://www.osgi.org")
9535 (synopsis "Extender Capability and Requirement Namespace")
9536 (description
9537 "OSGi, for Open Services Gateway initiative framework, is a module system
9538and service platform for the Java programming language. This package contains
9539the names for the attributes and directives for an extender namespace.")
9540 (license license:asl2.0)))
9541
9542(define-public java-osgi-namespace-service
9543 (package
9544 (name "java-osgi-namespace-service")
9545 (version "1.0.0")
9546 (source (origin
9547 (method url-fetch)
9548 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9549 "org.osgi.namespace.service/"
9550 version "/org.osgi.namespace.service-"
9551 version "-sources.jar"))
9552 (sha256
9553 (base32
9554 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9555 (build-system ant-build-system)
9556 (inputs
9557 `(("resource" ,java-osgi-resource)
9558 ("annotation" ,java-osgi-annotation)))
9559 (arguments
9560 `(#:jar-name "osgi-namespace-service.jar"
9561 #:tests? #f)); no tests
9562 (home-page "https://www.osgi.org")
9563 (synopsis "Service Capability and Requirement Namespace")
9564 (description
9565 "OSGi, for Open Services Gateway initiative framework, is a module system
9566and service platform for the Java programming language. This package contains
9567the names for the attributes and directives for a service namespace.")
9568 (license license:asl2.0)))
9569
9570(define-public java-osgi-util-function
9571 (package
9572 (name "java-osgi-util-function")
9573 (version "1.0.0")
9574 (source (origin
9575 (method url-fetch)
9576 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9577 "org.osgi.util.function/"
9578 version "/org.osgi.util.function-"
9579 version "-sources.jar"))
9580 (sha256
9581 (base32
9582 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9583 (build-system ant-build-system)
9584 (arguments
9585 `(#:jar-name "osgi-util-function.jar"
9586 #:tests? #f)); no tests
9587 (inputs
9588 `(("annotation" ,java-osgi-annotation)))
9589 (home-page "https://www.osgi.org")
9590 (synopsis "OSGI Util Function")
9591 (description
9592 "OSGi, for Open Services Gateway initiative framework, is a module system
9593and service platform for the Java programming language. This package contains
9594an interface for a function that accepts a single argument and produces a result.")
9595 (license license:asl2.0)))
9596
9597(define-public java-osgi-util-promise
9598 (package
9599 (name "java-osgi-util-promise")
9600 (version "1.0.0")
9601 (source (origin
9602 (method url-fetch)
9603 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9604 "org.osgi.util.promise/"
9605 version "/org.osgi.util.promise-"
9606 version "-sources.jar"))
9607 (sha256
9608 (base32
9609 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9610 (build-system ant-build-system)
9611 (arguments
9612 `(#:jar-name "osgi-util-promise.jar"
9613 #:tests? #f)); no tests
9614 (inputs
9615 `(("annotation" ,java-osgi-annotation)
9616 ("function" ,java-osgi-util-function)))
9617 (home-page "https://www.osgi.org")
9618 (synopsis "Promise of a value")
9619 (description
9620 "OSGi, for Open Services Gateway initiative framework, is a module system
9621and service platform for the Java programming language. This package contains
9622an interface and utilitary classes for promises. A Promise represents a future
9623value. It handles the interactions for asynchronous processing.")
9624 (license license:asl2.0)))
9625
9626(define-public java-osgi-service-metatype-annotations
9627 (package
9628 (name "java-osgi-service-metatype-annotations")
9629 (version "1.3.0")
9630 (source (origin
9631 (method url-fetch)
9632 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9633 "org.osgi.service.metatype.annotations/"
9634 version "/org.osgi.service.metatype.annotations-"
9635 version "-sources.jar"))
9636 (sha256
9637 (base32
9638 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9639 (build-system ant-build-system)
9640 (arguments
9641 `(#:jar-name "osgi-service-metatype-annotations.jar"
9642 #:tests? #f)); no tests
9643 (inputs
9644 `(("annotation" ,java-osgi-annotation)))
9645 (home-page "https://www.osgi.org")
9646 (synopsis "Support annotations for metatype")
9647 (description
9648 "OSGi, for Open Services Gateway initiative framework, is a module system
9649and service platform for the Java programming language. This package contains
9650the support annotations for metatype.")
9651 (license license:asl2.0)))
9652
9653(define-public java-osgi-service-repository
9654 (package
9655 (name "java-osgi-service-repository")
9656 (version "1.1.0")
9657 (source (origin
9658 (method url-fetch)
9659 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9660 "org.osgi.service.repository/"
9661 version "/org.osgi.service.repository-"
9662 version "-sources.jar"))
9663 (sha256
9664 (base32
9665 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9666 (build-system ant-build-system)
9667 (arguments
9668 `(#:jar-name "osgi-service-repository.jar"
9669 #:tests? #f)); no tests
9670 (inputs
9671 `(("annotation" ,java-osgi-annotation)
9672 ("promise" ,java-osgi-util-promise)
9673 ("resource" ,java-osgi-resource)))
9674 (home-page "https://www.osgi.org")
9675 (synopsis "OSGI service repository")
9676 (description
9677 "OSGi, for Open Services Gateway initiative framework, is a module system
9678and service platform for the Java programming language. This package contains
9679a repository service that contains resources.")
9680 (license license:asl2.0)))
9681
9682(define-public java-osgi-framework
9683 (package
9684 (name "java-osgi-framework")
9685 (version "1.8.0")
9686 (source (origin
9687 (method url-fetch)
9688 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9689 "org.osgi.framework/" version "/org.osgi.framework-"
9690 version "-sources.jar"))
9691 (sha256
9692 (base32
9693 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9694 (build-system ant-build-system)
9695 (arguments
9696 `(#:jar-name "osgi-framework.jar"
9697 #:tests? #f)); no tests
9698 (inputs
9699 `(("annotation" ,java-osgi-annotation)
9700 ("resource" ,java-osgi-resource)
9701 ("dto" ,java-osgi-dto)))
9702 (home-page "https://www.osgi.org")
9703 (synopsis "OSGi framework")
9704 (description
9705 "OSGi, for Open Services Gateway initiative framework, is a module system
9706and service platform for the Java programming language.")
9707 (license license:asl2.0)))
9708
9709(define-public java-osgi-service-log
9710 (package
9711 (name "java-osgi-service-log")
9712 (version "1.3.0")
9713 (source (origin
9714 (method url-fetch)
9715 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9716 "org.osgi.service.log/"
9717 version "/org.osgi.service.log-"
9718 version "-sources.jar"))
9719 (sha256
9720 (base32
9721 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9722 (build-system ant-build-system)
9723 (arguments
9724 `(#:jar-name "osgi-service-log.jar"
9725 #:tests? #f)); no tests
9726 (inputs
9727 (list java-osgi-framework))
9728 (home-page "https://www.osgi.org")
9729 (synopsis "Provides methods for bundles to write messages to the log")
9730 (description
9731 "OSGi, for Open Services Gateway initiative framework, is a module system
9732and service platform for the Java programming language. This package contains
9733the log service.")
9734 (license license:asl2.0)))
9735
9736(define-public java-osgi-service-jdbc
9737 (package
9738 (name "java-osgi-service-jdbc")
9739 (version "1.0.0")
9740 (source (origin
9741 (method url-fetch)
9742 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9743 "org.osgi.service.jdbc/"
9744 version "/org.osgi.service.jdbc-"
9745 version "-sources.jar"))
9746 (sha256
9747 (base32
9748 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9749 (build-system ant-build-system)
9750 (arguments
9751 `(#:jar-name "osgi-service-jdbc.jar"
9752 #:tests? #f)); no tests
9753 (home-page "https://www.osgi.org")
9754 (synopsis "Factory for JDBC connection factories")
9755 (description
9756 "OSGi, for Open Services Gateway initiative framework, is a module system
9757and service platform for the Java programming language. This package contains
9758a factory for JDBC connection factories. There are 3 preferred connection
9759factories for getting JDBC connections:
9760
9761@itemize
9762@item @code{javax.sql.DataSource};
9763@item @code{javax.sql.ConnectionPoolDataSource};
9764@item @code{javax.sql.XADataSource}.
9765@end itemize")
9766 (license license:asl2.0)))
9767
9768(define-public java-osgi-service-resolver
9769 (package
9770 (name "java-osgi-service-resolver")
9771 (version "1.0.1")
9772 (source (origin
9773 (method url-fetch)
9774 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9775 "org.osgi.service.resolver/"
9776 version "/org.osgi.service.resolver-"
9777 version "-sources.jar"))
9778 (sha256
9779 (base32
9780 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9781 (build-system ant-build-system)
9782 (arguments
9783 `(#:jar-name "osgi-service-resolver.jar"
9784 #:tests? #f)); no tests
9785 (inputs
9786 `(("annotation" ,java-osgi-annotation)
9787 ("resource" ,java-osgi-resource)))
9788 (home-page "https://www.osgi.org")
9789 (synopsis "OSGI Resolver service")
9790 (description
9791 "OSGi, for Open Services Gateway initiative framework, is a module system
9792and service platform for the Java programming language. This package contains
9793a resolver service that resolves the specified resources in the context supplied
9794by the caller.")
9795 (license license:asl2.0)))
9796
9797(define-public java-osgi-util-tracker
9798 (package
9799 (name "java-osgi-util-tracker")
9800 (version "1.5.1")
9801 (source (origin
9802 (method url-fetch)
9803 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9804 "org.osgi.util.tracker/"
9805 version "/org.osgi.util.tracker-"
9806 version "-sources.jar"))
9807 (sha256
9808 (base32
9809 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9810 (build-system ant-build-system)
9811 (arguments
9812 `(#:jar-name "osgi-util-tracker.jar"
9813 #:tests? #f)); no tests
9814 (inputs
9815 `(("framework" ,java-osgi-framework)
9816 ("annotation" ,java-osgi-annotation)))
9817 (home-page "https://www.osgi.org")
9818 (synopsis "Bundle tracking")
9819 (description
9820 "OSGi, for Open Services Gateway initiative framework, is a module system
9821and service platform for the Java programming language. This package contains
9822bundle tracking utility classes.")
9823 (license license:asl2.0)))
9824
9825(define-public java-osgi-service-cm
9826 (package
9827 (name "java-osgi-service-cm")
9828 (version "1.5.0")
9829 (source (origin
9830 (method url-fetch)
9831 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9832 "org.osgi.service.cm/"
9833 version "/org.osgi.service.cm-"
9834 version "-sources.jar"))
9835 (sha256
9836 (base32
9837 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9838 (build-system ant-build-system)
9839 (arguments
9840 `(#:jar-name "osgi-service-cm.jar"
9841 #:tests? #f)); no tests
9842 (inputs
9843 `(("framework" ,java-osgi-framework)
9844 ("annotation" ,java-osgi-annotation)))
9845 (home-page "https://www.osgi.org")
9846 (synopsis "OSGI Configuration Management")
9847 (description
9848 "OSGi, for Open Services Gateway initiative framework, is a module system
9849and service platform for the Java programming language. This package contains
9850utility classes for the configuration of services.")
9851 (license license:asl2.0)))
9852
9853(define-public java-osgi-service-packageadmin
9854 (package
9855 (name "java-osgi-service-packageadmin")
9856 (version "1.2.0")
9857 (source (origin
9858 (method url-fetch)
9859 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9860 "org.osgi.service.packageadmin/"
9861 version "/org.osgi.service.packageadmin-"
9862 version "-sources.jar"))
9863 (sha256
9864 (base32
9865 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9866 (build-system ant-build-system)
9867 (arguments
9868 `(#:jar-name "osgi-service-packageadmin.jar"
9869 #:tests? #f)); no tests
9870 (inputs
9871 `(("framework" ,java-osgi-framework)))
9872 (home-page "https://www.osgi.org")
9873 (synopsis "OSGI Package Administration")
9874 (description
9875 "OSGi, for Open Services Gateway initiative framework, is a module system
9876and service platform for the Java programming language. This package contains
9877the packageadmin service.")
9878 (license license:asl2.0)))
9879
9880(define-public java-ops4j-base-lang
9881 (package
9882 (name "java-ops4j-base-lang")
9883 (version "1.5.0")
9884 (source (origin
9885 (method url-fetch)
9886 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9887 "archive/base-" version ".tar.gz"))
9888 (sha256
9889 (base32
9890 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9891 (build-system ant-build-system)
9892 (arguments
9893 `(#:jar-name "java-ops4j-base-lang.jar"
9894 #:source-dir "ops4j-base-lang/src/main/java"
9895 #:tests? #f; no tests
9896 #:phases
9897 (modify-phases %standard-phases
9898 (add-before 'build 'add-test-file
9899 (lambda _
9900 ;; That file is required by a test in ops4j-pax-exam-core-spi
9901 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9902 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9903 (lambda _
9904 (display
9905 (string-append
9906 "version=" ,version "\n"
9907 "groupId=org.ops4j.base"
9908 "artifactId=ops4j-base-lang\n"))))
9909 #t)))))
9910 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9911 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9912 (description "OPS4J stands for Open Participation Software for Java. This
9913package contains utilities and extensions related to @code{java.lang}.")
9914 (license license:asl2.0)))
9915
9916(define-public java-ops4j-base-monitors
9917 (package
9918 (inherit java-ops4j-base-lang)
9919 (name "java-ops4j-base-monitors")
9920 (arguments
9921 `(#:jar-name "java-ops4j-base-monitors.jar"
9922 #:source-dir "ops4j-base-monitors/src/main/java"
9923 #:tests? #f)); no tests
9924 (inputs
9925 `(("lang" ,java-ops4j-base-lang)))
9926 (description "OPS4J stands for Open Participation Software for Java. This
9927package contains utilities and extensions related to monitoring.")))
9928
9929(define-public java-ops4j-base-io
9930 (package
9931 (inherit java-ops4j-base-lang)
9932 (name "java-ops4j-base-io")
9933 (arguments
9934 `(#:jar-name "java-ops4j-base-io.jar"
9935 #:source-dir "ops4j-base-io/src/main/java"
9936 #:test-dir "ops4j-base-io/src/test"
9937 #:test-exclude
9938 (list "**/ListerTest.java")))
9939 (inputs
9940 `(("lang" ,java-ops4j-base-monitors)
9941 ("lang" ,java-ops4j-base-lang)))
9942 (native-inputs
9943 `(("junit" ,java-junit)
9944 ("hamcrest" ,java-hamcrest-core)))
9945 (description "OPS4J stands for Open Participation Software for Java. This
9946package contains utilities and extensions related to handling streams and files.")))
9947
9948(define-public java-ops4j-base-util
9949 (package
9950 (inherit java-ops4j-base-lang)
9951 (name "java-ops4j-base-util")
9952 (arguments
9953 `(#:jar-name "java-ops4j-base-util.jar"
9954 #:source-dir "ops4j-base-util/src/main/java"
9955 #:test-dir "ops4j-base-util/src/test"))
9956 (inputs
9957 `(("lang" ,java-ops4j-base-lang)))
9958 (native-inputs
9959 `(("junit" ,java-junit)))
9960 (description "OPS4J stands for Open Participation Software for Java. This
9961package contains utilities and extensions related to environment, i18n and
9962mime types.")))
9963
9964(define-public java-ops4j-base-util-property
9965 (package
9966 (inherit java-ops4j-base-lang)
9967 (name "java-ops4j-base-util-property")
9968 (arguments
9969 `(#:jar-name "java-ops4j-base-util-property.jar"
9970 #:source-dir "ops4j-base-util-property/src/main/java"
9971 #:tests? #f)); no tests
9972 (inputs
9973 `(("lang" ,java-ops4j-base-lang)
9974 ("util" ,java-ops4j-base-util)))
9975 (description "OPS4J stands for Open Participation Software for Java. This
9976package contains utilities and extensions related to resolving properties from
9977different sources.")))
9978
9979(define-public java-ops4j-base-store
9980 (package
9981 (inherit java-ops4j-base-lang)
9982 (name "java-ops4j-base-store")
9983 (arguments
9984 `(#:jar-name "java-ops4j-base-store.jar"
9985 #:source-dir "ops4j-base-store/src/main/java"
9986 #:tests? #f)); no tests
9987 (inputs
9988 `(("lang" ,java-ops4j-base-lang)
9989 ("slf4j" ,java-slf4j-api)
9990 ("io" ,java-ops4j-base-io)))
9991 (description "OPS4J stands for Open Participation Software for Java. This
9992package contains utilities for storing and retrieving data from an
9993@code{InputStream}.")))
9994
9995(define-public java-ops4j-base-spi
9996 (package
9997 (inherit java-ops4j-base-lang)
9998 (name "java-ops4j-base-spi")
9999 (arguments
10000 `(#:jar-name "java-ops4j-base-spi.jar"
10001 #:source-dir "ops4j-base-spi/src/main/java"
10002 #:test-dir "ops4j-base-spi/src/test"))
10003 (native-inputs
10004 `(("junit" ,java-junit)
10005 ("hamcrest" ,java-hamcrest-core)))
10006 (description "OPS4J stands for Open Participation Software for Java. This
10007package contains utilities for obtaining services via the Java SE 6
10008@code{ServiceLoader}.")))
10009
10010(define-public java-aqute-bnd-annotation
10011 (package
10012 (name "java-aqute-bnd-annotation")
10013 (version "3.5.0")
10014 (source (origin
10015 (method url-fetch)
10016 (uri (string-append "https://github.com/bndtools/bnd/archive/"
10017 version ".REL.tar.gz"))
10018 (file-name (string-append name "-" version ".tar.gz"))
10019 (sha256
10020 (base32
10021 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
10022 (build-system ant-build-system)
10023 (arguments
10024 `(#:jar-name "java-aqute-bnd-annotation.jar"
10025 #:source-dir "biz.aQute.bnd.annotation/src"
10026 #:tests? #f)); empty test dir
10027 (home-page "https://bnd.bndtools.org/")
10028 (synopsis "Tools for OSGi")
10029 (description "Bnd is a swiss army knife for OSGi, it creates manifest
10030headers based on analyzing the class code, it verifies the project settings,
10031it manages project dependencies, gives diffs jars, and much more.")
10032 (license license:asl2.0)))
10033
10034(define-public java-aqute-libg
10035 (package
10036 (inherit java-aqute-bnd-annotation)
10037 (name "java-aqute-libg")
10038 (arguments
10039 `(#:jar-name "java-aqute-libg.jar"
10040 ;; The build fails when source/target more recent than 1.7. This
10041 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
10042 ;;
10043 ;; It is closed as won't fix. There is no way to change the source
10044 ;; so that it works on 1.8, and still works on 1.6, the upstream
10045 ;; target. It work fine on 1.7, so we use 1.7.
10046 #:make-flags (list "-Dant.build.javac.source=1.7"
10047 "-Dant.build.javac.target=1.7")
10048 #:phases
10049 (modify-phases %standard-phases
10050 (add-before 'configure 'chdir
10051 ;; Change to aQute.libg directory, so that the relative
10052 ;; paths in the tests aren't broken.
10053 (lambda _
10054 (chdir "aQute.libg")
10055 #t))
10056 (add-before 'check 'create-test-directory
10057 ;; Copy the test directory to test/java, since that's where
10058 ;; ant-build-system's default project in build.xml expects to find
10059 ;; the test classes. Leave a copy in the original place to not
10060 ;; break paths in tests.
10061 (lambda _
10062 (mkdir "src/test")
10063 (copy-recursively "test" "src/test/java")
10064 #t)))))
10065 (inputs
10066 `(("slf4j" ,java-slf4j-api)
10067 ("osgi-annot" ,java-osgi-annotation)
10068 ("java-osgi-cmpn" ,java-osgi-cmpn)
10069 ("osgi" ,java-osgi-core)))
10070 (native-inputs
10071 `(("hamcrest" ,java-hamcrest-core)
10072 ("java-junit" ,java-junit)))))
10073
10074(define-public java-aqute-bndlib
10075 (package
10076 (inherit java-aqute-bnd-annotation)
10077 (name "java-aqute-bndlib")
10078 (arguments
10079 `(#:jar-name "java-bndlib.jar"
10080 #:source-dir "biz.aQute.bndlib/src"
10081 #:tests? #f)); no tests
10082 (inputs
10083 `(("slf4j" ,java-slf4j-api)
10084 ("osgi-annot" ,java-osgi-annotation)
10085 ("java-aqute-libg" ,java-aqute-libg)
10086 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
10087 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
10088 ("java-osgi-service-repository" ,java-osgi-service-repository)
10089 ("java-osgi-service-log" ,java-osgi-service-log)
10090 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
10091 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
10092 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
10093 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
10094 ("promise" ,java-osgi-util-promise)
10095 ("osgi" ,java-osgi-core)))))
10096
10097(define-public java-ops4j-pax-tinybundles
10098 (package
10099 (name "java-ops4j-pax-tinybundles")
10100 (version "2.1.1")
10101 (source (origin
10102 (method url-fetch)
10103 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
10104 "archive/tinybundles-" version ".tar.gz"))
10105 (sha256
10106 (base32
10107 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
10108 (arguments
10109 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
10110 #:source-dir "src/main/java"
10111 #:test-exclude
10112 ;; Abstract base classes for other tests
10113 (list "**/BndTest.java" "**/CoreTest.java")
10114 #:phases
10115 (modify-phases %standard-phases
10116 (add-before 'check 'fix-version
10117 (lambda _
10118 ;; This test has a reference to an old version of bndlib we are not
10119 ;; packaging. It uses the version referenced in pom.xml. We replace
10120 ;; it with our own version.
10121 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
10122 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
10123 ,(package-version java-aqute-bndlib)))
10124 #t)))))
10125 (inputs
10126 `(("lang" ,java-ops4j-base-lang)
10127 ("io" ,java-ops4j-base-io)
10128 ("store" ,java-ops4j-base-store)
10129 ("slf4j" ,java-slf4j-api)
10130 ("libg" ,java-aqute-libg)
10131 ("bndlib" ,java-aqute-bndlib)))
10132 (native-inputs
10133 `(("junit" ,java-junit)
10134 ("hamcrest" ,java-hamcrest-core)
10135 ("log4j" ,java-log4j-api)
10136 ("bndannotation" ,java-aqute-bnd-annotation)
10137 ("framework" ,java-osgi-framework)))
10138 (build-system ant-build-system)
10139 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
10140 (synopsis "Java APIs to create OSGi related artifacts")
10141 (description "Tinybundles is all about creating OSGi related artifacts like
10142Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
10143to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
10144other hand, this library can be a foundation of real end user tools that need
10145to create those artifacts.")
10146 (license license:asl2.0)))
10147
10148(define-public java-ops4j-pax-exam-core
10149 (package
10150 (name "java-ops4j-pax-exam-core")
10151 (version "4.11.0")
10152 (source (origin
10153 (method url-fetch)
10154 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
10155 "archive/exam-reactor-" version ".tar.gz"))
10156 (sha256
10157 (base32
10158 "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26"))))
10159 (arguments
10160 (list #:jar-name "java-ops4j-pax-exam-core.jar"
10161 #:source-dir "core/pax-exam/src/main/java"
10162 #:test-dir "core/pax-exam/src/test"))
10163 (inputs
10164 (list java-slf4j-api
10165 java-ops4j-base-lang
10166 java-ops4j-base-io
10167 java-ops4j-base-util-property
10168 java-ops4j-base-store
10169 java-osgi-core))
10170 (native-inputs
10171 (list java-junit
10172 java-hamcrest-core))
10173 (build-system ant-build-system)
10174 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
10175 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
10176 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
10177the user take control of the OSGi framework, the test framework (e.g. JUnit) and
10178the system under test at the same time.")
10179 (license license:asl2.0)))
10180
10181(define-public java-ops4j-pax-exam-core-spi
10182 (package
10183 (inherit java-ops4j-pax-exam-core)
10184 (name "java-ops4j-pax-exam-core-spi")
10185 (arguments
10186 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
10187 #:source-dir "src/main/java"
10188 #:test-exclude
10189 (list
10190 ;; Abstract base class, not a test
10191 "**/BaseStagedReactorTest.java"
10192 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
10193 "**/WarBuilderTest.java")
10194 #:phases
10195 (modify-phases %standard-phases
10196 (add-before 'configure 'chdir
10197 (lambda _
10198 ;; Tests assume we are in this directory
10199 (chdir "core/pax-exam-spi")
10200 #t))
10201 (add-before 'check 'fix-tests
10202 (lambda _
10203 ;; One test checks that this file is present.
10204 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
10205 (with-output-to-file
10206 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
10207 (lambda _
10208 (display
10209 (string-append "artifactId = pax-exam-spi\n"
10210 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
10211 ;; Maven puts compilation results in the target directory, while we
10212 ;; put them in the build directory.
10213 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
10214 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
10215 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
10216 (("target") "build"))
10217 ;; One test is expected to fail, but it doesn't throw the expected exception
10218 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
10219 (("AssertionError") "IllegalArgumentException"))
10220 #t)))))
10221 (inputs
10222 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
10223 ("lang" ,java-ops4j-base-lang)
10224 ("monitors" ,java-ops4j-base-monitors)
10225 ("store" ,java-ops4j-base-store)
10226 ("io" ,java-ops4j-base-io)
10227 ("spi" ,java-ops4j-base-spi)
10228 ("osgi" ,java-osgi-core)
10229 ("slf4j" ,java-slf4j-api)
10230 ("tinybundles" ,java-ops4j-pax-tinybundles)))
10231 (native-inputs
10232 `(("mockito" ,java-mockito-1)
10233 ("junit" ,java-junit)
10234 ("hamcrest" ,java-hamcrest-core)
10235 ("cglib" ,java-cglib)
10236 ("objenesis" ,java-objenesis)))))
10237
10238(define-public java-ops4j-pax-exam-core-junit
10239 (package
10240 (inherit java-ops4j-pax-exam-core)
10241 (name "java-ops4j-pax-exam-core-junit")
10242 (arguments
10243 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
10244 #:source-dir "drivers/pax-exam-junit4/src/main/java"
10245 #:tests? #f)); no tests
10246 (inputs
10247 `(("junit" ,java-junit)
10248 ("slf4j" ,java-slf4j-api)
10249 ("core" ,java-ops4j-pax-exam-core)
10250 ("spi" ,java-ops4j-pax-exam-core-spi)))
10251 (native-inputs '())))
10252
10253(define-public java-fasterxml-jackson-annotations
10254 (package
10255 (name "java-fasterxml-jackson-annotations")
10256 (version "2.9.4")
10257 (source (origin
10258 (method url-fetch)
10259 (uri (string-append "https://github.com/FasterXML/"
10260 "jackson-annotations/archive/"
10261 "jackson-annotations-" version ".tar.gz"))
10262 (sha256
10263 (base32
10264 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
10265 (build-system ant-build-system)
10266 (arguments
10267 `(#:jar-name "jackson-annotations.jar"
10268 #:source-dir "src/main/java"
10269 #:test-dir "src/test"))
10270 (native-inputs
10271 `(("junit" ,java-junit)))
10272 (home-page "https://github.com/FasterXML/jackson-annotations")
10273 (synopsis "General purpose annotations for the Jackson Data Processor")
10274 (description "This package contains general purpose annotations for the
10275Jackson Data Processor, used on value and handler types. The only annotations
10276not included are ones that require dependency to the Databind package.")
10277 (license license:asl2.0)))
10278
10279(define-public java-fasterxml-jackson-core
10280 (package
10281 (name "java-fasterxml-jackson-core")
10282 (version "2.9.4")
10283 (source (origin
10284 (method url-fetch)
10285 (uri (string-append "https://github.com/FasterXML/"
10286 "jackson-core/archive/"
10287 "jackson-core-" version ".tar.gz"))
10288 (sha256
10289 (base32
10290 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
10291 (build-system ant-build-system)
10292 (arguments
10293 `(#:jar-name "jackson-core.jar"
10294 #:source-dir "src/main/java"
10295 #:test-dir "src/test"
10296 #:test-exclude
10297 (list
10298 ;; Expected failure. pom.xml excludes these
10299 "**/failing/**"
10300 ;; Base classes that have no constructor for junit
10301 "**/BaseTest.java"
10302 "**/ConcurrencyReadTest.java"
10303 "**/ManualCharAccessTest.java"
10304 "**/ManualCharAccessTest.java"
10305 "**/TrailingCommasTest.java"
10306 "**/AsyncMissingValuesInObjectTest.java"
10307 "**/AsyncMissingValuesInArrayTest.java")
10308 #:phases
10309 (modify-phases %standard-phases
10310 (add-before 'configure 'generate-PackageVersion.java
10311 (lambda _
10312 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
10313 (in (string-append out ".in")))
10314 (copy-file in out)
10315 (substitute* out
10316 (("@package@") "com.fasterxml.jackson.core.json")
10317 (("@projectversion@") ,version)
10318 (("@projectgroupid@") "com.fasterxml.jackson.core")
10319 (("@projectartifactid@") "jackson-core")))
10320 #t))
10321 (add-before 'build 'copy-resources
10322 (lambda _
10323 (copy-recursively "src/main/resources"
10324 "build/classes")
10325 #t))
10326 (add-before 'check 'copy-test-resources
10327 (lambda _
10328 (copy-recursively "src/test/resources"
10329 "build/test-classes")
10330 #t)))))
10331 (native-inputs
10332 `(("junit" ,java-junit)
10333 ("hamcrest" ,java-hamcrest-core)))
10334 (home-page "https://github.com/FasterXML/jackson-core")
10335 (synopsis "Low-level streaming parser and generator abstractions")
10336 (description "This package contains core low-level incremental
10337(streaming) parser and generator abstractions used by the Jackson Data
10338Processor. It also includes the default implementation of handler types
10339(parser, generator) that handle JSON format.")
10340 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10341
10342(define-public java-fasterxml-jackson-databind
10343 (package
10344 (name "java-fasterxml-jackson-databind")
10345 (version "2.9.4")
10346 (source (origin
10347 (method url-fetch)
10348 (uri (string-append "https://github.com/FasterXML/"
10349 "jackson-databind/archive/"
10350 "jackson-databind-" version ".tar.gz"))
10351 (sha256
10352 (base32
10353 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
10354 (build-system ant-build-system)
10355 (arguments
10356 `(#:jar-name "jackson-databind.jar"
10357 #:source-dir "src/main/java"
10358 #:tests? #f; requires javax.measures for which I can't find a free implementation
10359 #:phases
10360 (modify-phases %standard-phases
10361 (add-before 'configure 'generate-PackageVersion.java
10362 (lambda _
10363 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
10364 (in (string-append out ".in")))
10365 (copy-file in out)
10366 (substitute* out
10367 (("@package@") "com.fasterxml.jackson.databind.cfg")
10368 (("@projectversion@") ,version)
10369 (("@projectgroupid@") "com.fasterxml.jackson.databind")
10370 (("@projectartifactid@") "jackson-databind")))
10371 #t))
10372 (add-before 'build 'copy-resources
10373 (lambda _
10374 (copy-recursively "src/main/resources" "build/classes")
10375 #t)))))
10376 (inputs
10377 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
10378 (home-page "https://github.com/FasterXML/jackson-databind")
10379 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
10380 (description "This package contains the general-purpose data-binding
10381functionality and tree-model for Jackson Data Processor. It builds on core
10382streaming parser/generator package, and uses Jackson Annotations for
10383configuration.")
10384 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10385
10386(define-public java-fasterxml-jackson-modules-base-jaxb
10387 (package
10388 (name "java-fasterxml-jackson-modules-base-jaxb")
10389 (version "2.9.4")
10390 (source (origin
10391 (method url-fetch)
10392 (uri (string-append "https://github.com/FasterXML/"
10393 "jackson-modules-base/archive/"
10394 "jackson-modules-base-" version ".tar.gz"))
10395 (sha256
10396 (base32
10397 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10398 (build-system ant-build-system)
10399 (arguments
10400 `(#:jar-name "jackson-modules-base-jaxb.jar"
10401 #:source-dir "jaxb/src/main/java"
10402 #:test-dir "jaxb/src/test"
10403 #:test-exclude
10404 ;; Base class for tests
10405 (list "**/BaseJaxbTest.java")
10406 #:phases
10407 (modify-phases %standard-phases
10408 (add-before 'configure 'generate-PackageVersion.java
10409 (lambda _
10410 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
10411 "jackson/module/jaxb/PackageVersion.java"))
10412 (in (string-append out ".in")))
10413 (copy-file in out)
10414 (substitute* out
10415 (("@package@") "com.fasterxml.jackson.module.jaxb")
10416 (("@projectversion@") ,version)
10417 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
10418 (("@projectartifactid@") "jackson-module-jaxb")))
10419 #t))
10420 (add-before 'build 'copy-resources
10421 (lambda _
10422 (copy-recursively "jaxb/src/main/resources" "build/classes")
10423 #t)))))
10424 (inputs
10425 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10426 java-fasterxml-jackson-databind))
10427 (native-inputs
10428 (list java-junit))
10429 (home-page "https://github.com/FasterXML/jackson-modules-base")
10430 (synopsis "Jaxb annotations jackson module")
10431 (description "This package is the jaxb annotations module for jackson.")
10432 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10433
10434(define-public java-fasterxml-jackson-modules-base-mrbean
10435 (package
10436 (name "java-fasterxml-jackson-modules-base-mrbean")
10437 (version "2.9.4")
10438 (source (origin
10439 (method url-fetch)
10440 (uri (string-append "https://github.com/FasterXML/"
10441 "jackson-modules-base/archive/"
10442 "jackson-modules-base-" version ".tar.gz"))
10443 (sha256
10444 (base32
10445 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10446 (build-system ant-build-system)
10447 (arguments
10448 `(#:jar-name "jackson-modules-base-mrbean.jar"
10449 #:source-dir "mrbean/src/main/java"
10450 #:test-dir "mrbean/src/test"
10451 #:test-exclude
10452 ;; Base class for tests
10453 (list "**/BaseTest.java")
10454 #:phases
10455 (modify-phases %standard-phases
10456 (add-before 'configure 'generate-PackageVersion.java
10457 (lambda _
10458 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10459 "jackson/module/mrbean/PackageVersion.java"))
10460 (in (string-append out ".in")))
10461 (copy-file in out)
10462 (substitute* out
10463 (("@package@") "com.fasterxml.jackson.module.mrbean")
10464 (("@projectversion@") ,version)
10465 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10466 (("@projectartifactid@") "jackson-module-mrbean")))
10467 #t)))))
10468 (inputs
10469 (list java-asm java-fasterxml-jackson-annotations
10470 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
10471 (native-inputs
10472 (list java-junit))
10473 (home-page "https://github.com/FasterXML/jackson-modules-base")
10474 (synopsis "POJO type materialization for Java")
10475 (description "This package implements POJO type materialization.
10476Databinders can construct implementation classes for Java interfaces as part
10477of deserialization.")
10478 (license license:asl2.0)))
10479
10480(define-public java-snakeyaml
10481 (package
10482 (name "java-snakeyaml")
10483 (version "1.18")
10484 (source (origin
10485 (method url-fetch)
10486 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10487 version ".tar.gz"))
10488 (file-name (string-append name "-" version ".tar.gz"))
10489 (sha256
10490 (base32
10491 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10492 (build-system ant-build-system)
10493 (arguments
10494 `(#:jar-name "java-snakeyaml.jar"
10495 #:source-dir "src/main/java"
10496 ;; Tests require velocity, a cyclic dependency, and
10497 ;; java-spring-framework-context which is not packaged.
10498 #:tests? #f))
10499 (home-page "https://bitbucket.org/asomov/snakeyaml")
10500 (synopsis "YAML processor")
10501 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10502 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10503
10504(define-public java-fasterxml-jackson-dataformat-yaml
10505 (package
10506 (name "java-fasterxml-jackson-dataformat-yaml")
10507 (version "2.9.4")
10508 (source (origin
10509 (method url-fetch)
10510 (uri (string-append "https://github.com/FasterXML/"
10511 "jackson-dataformats-text/archive/"
10512 "jackson-dataformats-text-" version ".tar.gz"))
10513 (sha256
10514 (base32
10515 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10516 (build-system ant-build-system)
10517 (arguments
10518 `(#:jar-name "jackson-dataformat-yaml.jar"
10519 #:source-dir "yaml/src/main/java"
10520 #:test-dir "yaml/src/test"
10521 #:test-exclude (list "**/failing/**.java")
10522 #:phases
10523 (modify-phases %standard-phases
10524 (add-before 'configure 'generate-PackageVersion.java
10525 (lambda _
10526 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10527 (in (string-append out ".in")))
10528 (copy-file in out)
10529 (substitute* out
10530 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10531 (("@projectversion@") ,version)
10532 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10533 (("@projectartifactid@") "jackson-dataformat-yaml")))
10534 #t)))))
10535 (inputs
10536 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10537 java-fasterxml-jackson-databind java-snakeyaml))
10538 (native-inputs
10539 `(("junit" ,java-junit)
10540 ("hamcrest" ,java-hamcrest-core)
10541 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10542 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10543 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10544 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10545 (synopsis "Yaml backend for Jackson")
10546 (description "Dataformat backends are used to support format alternatives
10547to JSON, supported by default. This is done by sub-classing Jackson core
10548abstractions.")
10549 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10550
10551(define-public java-stax2-api
10552 (package
10553 (name "java-stax2-api")
10554 (version "4.0.0")
10555 (source (origin
10556 (method url-fetch)
10557 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10558 "stax2-api-" version ".tar.gz"))
10559 (sha256
10560 (base32
10561 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10562 (build-system ant-build-system)
10563 (arguments
10564 `(#:jar-name "java-stax2-api.jar"
10565 #:source-dir "src/main/java"
10566 #:tests? #f)); no tests
10567 (home-page "https://github.com/FasterXML/stax2-api")
10568 (synopsis "Stax2 API")
10569 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10570significant new functionalities, such as full-featured bi-direction validation
10571interface and high-performance Typed Access API.")
10572 (license license:bsd-2)))
10573
10574(define-public java-woodstox-core
10575 (package
10576 (name "java-woodstox-core")
10577 (version "5.0.3")
10578 (source (origin
10579 (method git-fetch)
10580 (uri (git-reference
10581 (url "https://github.com/FasterXML/woodstox")
10582 (commit (string-append "woodstox-core-" version))))
10583 (file-name (git-file-name name version))
10584 (sha256
10585 (base32
10586 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10587 (build-system ant-build-system)
10588 (arguments
10589 `(#:jar-name "woodstox.jar"
10590 #:test-exclude
10591 (list "**/Base*.java" "failing/**")
10592 #:phases
10593 (modify-phases %standard-phases
10594 (add-before 'build 'remove-msv-dep
10595 (lambda _
10596 ;; we don't need osgi, and it depends on msv
10597 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10598 ;; msv's latest release is from 2011 and we don't need it
10599 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10600 (delete-file-recursively "src/test/java/wstxtest/osgi")
10601 (delete-file-recursively "src/test/java/wstxtest/msv")
10602 #t))
10603 (add-before 'build 'copy-resources
10604 (lambda _
10605 (copy-recursively "src/main/resources" "build/classes")
10606 #t)))))
10607 (inputs
10608 `(("stax2" ,java-stax2-api)))
10609 (native-inputs
10610 `(("junit" ,java-junit)))
10611 (home-page "https://github.com/FasterXML/woodstox")
10612 (synopsis "Stax XML API implementation")
10613 (description "Woodstox is a stax XML API implementation.")
10614 (license license:asl2.0)))
10615
10616(define-public java-fasterxml-jackson-dataformat-xml
10617 (package
10618 (name "java-fasterxml-jackson-dataformat-xml")
10619 (version "2.9.4")
10620 (source (origin
10621 (method git-fetch)
10622 (uri (git-reference
10623 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10624 (commit (string-append "jackson-dataformat-xml-" version))))
10625 (file-name (git-file-name name version))
10626 (sha256
10627 (base32
10628 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10629 (build-system ant-build-system)
10630 (arguments
10631 `(#:jar-name "jackson-dataformat-xml.jar"
10632 #:source-dir "src/main/java"
10633 #:test-exclude
10634 (list "**/failing/**")
10635 #:phases
10636 (modify-phases %standard-phases
10637 (add-before 'configure 'generate-PackageVersion.java
10638 (lambda _
10639 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10640 (in (string-append out ".in")))
10641 (copy-file in out)
10642 (newline)
10643 (substitute* out
10644 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10645 (("@projectversion@") ,version)
10646 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10647 (("@projectartifactid@") "jackson-dataformat-xml")))
10648 #t))
10649 (add-before 'build 'copy-resources
10650 (lambda _
10651 (copy-recursively "src/main/resources" "build/classes")
10652 #t)))))
10653 (inputs
10654 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10655 ("jackson-core" ,java-fasterxml-jackson-core)
10656 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10657 ("jackson-databind" ,java-fasterxml-jackson-databind)
10658 ("stax2-api" ,java-stax2-api)
10659 ("woodstox" ,java-woodstox-core)))
10660 (native-inputs
10661 `(("junit" ,java-junit)
10662 ("hamcrest" ,java-hamcrest-core)))
10663 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10664 (synopsis "Read and write XML")
10665 (description "This package contains Jackson extension component for reading
10666and writing XML encoded data.
10667
10668Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10669approach (that is, no support is added for \"Schema-first\" approach). Support
10670for JAXB annotations is provided by JAXB annotation module; this module
10671provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10672@code{JsonFactory}) as well as small number of higher level overrides needed to
10673make data-binding work.")
10674 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10675
10676(define-public java-hdrhistogram
10677 (package
10678 (name "java-hdrhistogram")
10679 (version "2.1.9")
10680 (source (origin
10681 (method git-fetch)
10682 (uri (git-reference
10683 (url "https://github.com/HdrHistogram/HdrHistogram")
10684 (commit (string-append "HdrHistogram-" version))))
10685 (file-name (git-file-name name version))
10686 (sha256
10687 (base32
10688 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10689 (build-system ant-build-system)
10690 (arguments
10691 `(#:jar-name "java-hdrhistogram.jar"
10692 #:source-dir "src/main/java"
10693 #:phases
10694 (modify-phases %standard-phases
10695 (add-after 'unpack 'make-files-writable
10696 (lambda _
10697 (for-each make-file-writable (find-files "."))
10698 #t))
10699 (add-before 'configure 'set-version
10700 (lambda _
10701 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10702 (template (string-append version-java ".template")))
10703 (copy-file template version-java)
10704 (substitute* version-java
10705 (("\\$VERSION\\$") ,version)
10706 (("\\$BUILD_TIME\\$") "0"))
10707 #t))))))
10708 (native-inputs
10709 `(("junit" ,java-junit)
10710 ("hamcrest" ,java-hamcrest-core)))
10711 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10712 (synopsis "High dynamic range histogram")
10713 (description "Hdrhistogram creates histograms that support
10714recording and analyzing sampled data value counts across a configurable integer
10715value range with configurable value precision within the range. Value precision
10716is expressed as the number of significant digits in the value recording, and
10717provides control over value quantization behavior across the value range and
10718the subsequent value resolution at any given level.")
10719 (license license:public-domain)))
10720
10721(define-public java-cofoja
10722 (package
10723 (name "java-cofoja")
10724 (version "1.3")
10725 (source (origin
10726 (method git-fetch)
10727 (uri (git-reference
10728 (url "https://github.com/nhatminhle/cofoja")
10729 (commit (string-append "v" version))))
10730 (file-name (string-append "java-cofoja-" version "-checkout"))
10731 (sha256
10732 (base32
10733 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10734 (build-system ant-build-system)
10735 (arguments
10736 `(#:build-target "dist"
10737 #:test-target "test"
10738 #:jdk ,icedtea-8
10739 #:make-flags
10740 (list "-Ddist.dir=dist")
10741 #:modules ((guix build ant-build-system)
10742 (guix build java-utils)
10743 (guix build utils)
10744 (srfi srfi-1)
10745 (ice-9 match))
10746 #:phases
10747 (modify-phases %standard-phases
10748 ;; The bulid system ignores the class path the ant-build-system sets
10749 ;; up and instead expects to find all dependencies in the "lib"
10750 ;; directory.
10751 (add-after 'unpack 'create-libdir
10752 (lambda* (#:key inputs #:allow-other-keys)
10753 (mkdir-p "lib")
10754 (for-each
10755 (lambda (file)
10756 (let ((target (string-append "lib/" (basename file))))
10757 (unless (file-exists? target)
10758 (symlink file target))))
10759 (append-map (match-lambda
10760 ((label . dir)
10761 (find-files dir "\\.jar$")))
10762 inputs))
10763 #t))
10764 (replace 'install (install-jars "dist")))))
10765 (inputs
10766 (list java-asm))
10767 (native-inputs
10768 (list java-junit))
10769 (home-page "https://github.com/nhatminhle/cofoja")
10770 (synopsis "Contracts for Java")
10771 (description "Contracts for Java, or Cofoja for short, is a contract
10772programming framework and test tool for Java, which uses annotation processing
10773and bytecode instrumentation to provide run-time checking. (In particular,
10774this is not a static analysis tool.)")
10775 (license license:lgpl3+)))
10776
10777(define-public java-aopalliance
10778 (package
10779 (name "java-aopalliance")
10780 (version "1.0")
10781 (source (origin
10782 (method git-fetch)
10783 ;; Note: this git repository is not official, but contains the
10784 ;; source code that is in the CVS repository. Downloading the
10785 ;; tarball from sourceforge is undeterministic, and the cvs download
10786 ;; fails.
10787 (uri (git-reference
10788 (url "https://github.com/hoverruan/aopalliance")
10789 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10790 (file-name (string-append name "-" version))
10791 (sha256
10792 (base32
10793 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10794 (build-system ant-build-system)
10795 (arguments
10796 `(#:jar-name "java-aopalliance.jar"
10797 #:jdk ,icedtea-8
10798 #:tests? #f; no tests
10799 #:source-dir "aopalliance/src/main"
10800 #:phases
10801 (modify-phases %standard-phases
10802 (add-before 'install 'create-pom
10803 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10804 (replace 'install
10805 (install-from-pom "pom.xml")))))
10806 (home-page "https://aopalliance.sourceforge.net")
10807 (synopsis "Aspect-Oriented Programming")
10808 (description "The AOP Alliance project is a joint project between several
10809software engineering people who are interested in Aspect-Oriented Programming
10810(AOP) and Java.")
10811 (license license:public-domain)))
10812
10813(define-public java-javax-inject
10814 (package
10815 (name "java-javax-inject")
10816 (version "1")
10817 (source (origin
10818 (method git-fetch)
10819 (uri (git-reference
10820 (url "https://github.com/javax-inject/javax-inject")
10821 (commit version)))
10822 (file-name (git-file-name name version))
10823 (sha256
10824 (base32
10825 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10826 (build-system ant-build-system)
10827 (arguments
10828 `(#:jar-name "java-javax-inject.jar"
10829 #:tests? #f; no tests
10830 #:phases
10831 (modify-phases %standard-phases
10832 (replace 'install
10833 (install-from-pom "pom.xml")))))
10834 (home-page "https://github.com/javax-inject/javax-inject")
10835 (synopsis "JSR-330: Dependency Injection for Java")
10836 (description "This package specifies a means for obtaining objects in such
10837a way as to maximize reusability, testability and maintainability compared to
10838traditional approaches such as constructors, factories, and service locators
10839(e.g., JNDI). This process, known as dependency injection, is beneficial to
10840most nontrivial applications.
10841
10842Many types depend on other types. For example, a @var{Stopwatch} might depend
10843on a @var{TimeSource}. The types on which a type depends are known as its
10844dependencies. The process of finding an instance of a dependency to use at run
10845time is known as resolving the dependency. If no such instance can be found,
10846the dependency is said to be unsatisfied, and the application is broken.")
10847 (license license:asl2.0)))
10848
10849(define-public java-guice
10850 (package
10851 (name "java-guice")
10852 (version "4.1")
10853 (source (origin
10854 (method git-fetch)
10855 (uri (git-reference
10856 (url "https://github.com/google/guice")
10857 (commit version)))
10858 (file-name (git-file-name name version))
10859 (modules '((guix build utils)))
10860 (snippet
10861 `(begin
10862 (for-each delete-file (find-files "." ".*.jar")) #t))
10863 (sha256
10864 (base32
10865 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10866 (build-system ant-build-system)
10867 (arguments
10868 `(#:jar-name "java-guice.jar"
10869 #:jdk ,icedtea-8
10870 #:tests? #f; FIXME: tests are not in a java sub directory
10871 #:source-dir "core/src"
10872 #:phases
10873 (modify-phases %standard-phases
10874 (add-after 'unpack 'make-files-writable
10875 (lambda _
10876 (for-each make-file-writable (find-files "."))
10877 #t))
10878 (replace 'install
10879 (install-from-pom "core/pom.xml")))))
10880 (propagated-inputs
10881 (list java-aopalliance
10882 java-cglib
10883 java-guava
10884 java-javax-inject
10885 java-guice-parent-pom))
10886 (home-page "https://github.com/google/guice")
10887 (synopsis "Lightweight dependency injection framework")
10888 (description "Guice is a lightweight dependency injection framework for
10889Java 6 and above.")
10890 (license license:asl2.0)))
10891
10892(define-public java-guice-servlet
10893 (package
10894 (inherit java-guice)
10895 (name "java-guice-servlet")
10896 (arguments
10897 `(#:jar-name "guice-servlet.jar"
10898 #:source-dir "extensions/servlet/src/"
10899 #:jdk ,icedtea-8
10900 #:tests? #f ; FIXME: not in a java subdir
10901 #:phases
10902 (modify-phases %standard-phases
10903 (add-after 'unpack 'make-files-writable
10904 (lambda _
10905 (for-each make-file-writable (find-files "."))
10906 #t)))))
10907 (inputs
10908 `(("guice" ,java-guice)
10909 ("servlet" ,java-classpathx-servletapi)
10910 ,@(package-inputs java-guice)))))
10911
10912(define java-guice-parent-pom
10913 (package
10914 (inherit java-guice)
10915 (name "java-guice-parent-pom")
10916 (arguments
10917 `(#:tests? #f
10918 #:phases
10919 (modify-phases %standard-phases
10920 (delete 'configure)
10921 (delete 'build)
10922 (add-after 'install 'install-extensions
10923 (install-pom-file "extensions/pom.xml"))
10924 (replace 'install
10925 (install-pom-file "pom.xml")))))
10926 (propagated-inputs
10927 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10928
10929(define java-google-parent-pom-5
10930 (package
10931 (name "java-google-parent-pom")
10932 (version "5")
10933 (source (origin
10934 (method git-fetch)
10935 (uri (git-reference
10936 (url "https://github.com/google/google-maven-parents")
10937 (commit (string-append "google-" version))))
10938 (file-name (git-file-name name version))
10939 (sha256
10940 (base32
10941 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10942 (build-system ant-build-system)
10943 (arguments
10944 `(#:tests? #f
10945 #:phases
10946 (modify-phases %standard-phases
10947 (delete 'configure)
10948 (delete 'build)
10949 (replace 'install
10950 (install-pom-file "pom.xml")))))
10951 (home-page "https://github.com/google/google-maven-parents")
10952 (synopsis "Google parent pom")
10953 (description "This package contains the Maven parent POM for other Google
10954Java projects.")
10955 (license license:asl2.0)))
10956
10957(define-public java-assertj
10958 (package
10959 (name "java-assertj")
10960 (version "3.8.0")
10961 (source (origin
10962 (method git-fetch)
10963 (uri (git-reference
10964 (url "https://github.com/joel-costigliola/assertj-core")
10965 (commit (string-append "assertj-core-" version))))
10966 (file-name (git-file-name name version))
10967 (sha256
10968 (base32
10969 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10970 (build-system ant-build-system)
10971 (arguments
10972 `(#:jar-name "java-assertj.jar"
10973 #:jdk ,icedtea-8
10974 #:source-dir "src/main/java"
10975 #:tests? #f)); depends on tng-junit which depends on assertj
10976 (inputs
10977 `(("cglib" ,java-cglib)
10978 ("junit" ,java-junit)
10979 ("hamcrest" ,java-hamcrest-core)))
10980 (native-inputs
10981 `(("mockito" ,java-mockito-1)))
10982 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10983 (synopsis "Fluent assertions for java")
10984 (description "AssertJ core is a Java library that provides a fluent
10985interface for writing assertions. Its main goal is to improve test code
10986readability and make maintenance of tests easier.")
10987 (license license:asl2.0)))
10988
10989(define-public java-jboss-javassist
10990 (package
10991 (name "java-jboss-javassist")
10992 (version "3.21.0")
10993 (source (origin
10994 (method git-fetch)
10995 (uri (git-reference
10996 (url "https://github.com/jboss-javassist/javassist")
10997 (commit
10998 (string-append "rel_"
10999 (string-map
11000 (lambda (x) (if (eq? x #\.) #\_ x)) version)
11001 "_ga"))))
11002 (file-name (git-file-name name version))
11003 (sha256
11004 (base32
11005 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
11006 (modules '((guix build utils)))
11007 (snippet
11008 '(begin
11009 (delete-file "javassist.jar")))))
11010 (build-system ant-build-system)
11011 (arguments
11012 `(#:jar-name "java-jboss-javassist.jar"
11013 #:jdk ,icedtea-8
11014 #:source-dir "src/main"
11015 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
11016 #:phases
11017 (modify-phases %standard-phases
11018 (add-after 'unpack 'make-files-writable
11019 (lambda _
11020 (for-each make-file-writable (find-files "."))
11021 #t)))))
11022 (native-inputs
11023 `(("junit" ,java-junit)))
11024 (home-page "https://github.com/jboss-javassist/javassist")
11025 (synopsis "Java bytecode engineering toolkit")
11026 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
11027manipulation simple. It is a class library for editing bytecodes in Java; it
11028enables Java programs to define a new class at runtime and to modify a class
11029file when the JVM loads it.")
11030 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
11031
11032(define-public java-jcommander
11033 (package
11034 (name "java-jcommander")
11035 (version "1.71")
11036 (source (origin
11037 (method git-fetch)
11038 (uri (git-reference
11039 (url "https://github.com/cbeust/jcommander")
11040 (commit version)))
11041 (file-name (git-file-name name version))
11042 (sha256
11043 (base32
11044 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
11045 (build-system ant-build-system)
11046 (arguments
11047 `(#:jar-name "java-jcommander.jar"
11048 #:jdk ,icedtea-8
11049 #:tests? #f; requires testng which depends on jcommander
11050 #:source-dir "src/main/java"))
11051 (home-page "https://jcommander.org")
11052 (synopsis "Command line parameters parser")
11053 (description "JCommander is a very small Java framework that makes it
11054trivial to parse command line parameters. Parameters are declared with
11055annotations.")
11056 (license license:asl2.0)))
11057
11058(define-public java-bsh
11059 (package
11060 (name "java-bsh")
11061 (version "2.1.1")
11062 (source (origin
11063 (method git-fetch)
11064 (uri (git-reference
11065 (url "https://github.com/beanshell/beanshell")
11066 (commit version)))
11067 (file-name (git-file-name name version))
11068 (sha256
11069 (base32
11070 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
11071 (modules '((guix build utils)))
11072 (snippet
11073 '(begin
11074 ;; Delete bundled third-party jar archives.
11075 (for-each delete-file (find-files "." ".*.jar$"))
11076 (for-each (lambda (file) (chmod file #o644))
11077 (find-files "." "."))
11078 #t))))
11079 (build-system ant-build-system)
11080 (arguments
11081 `(#:build-target "jarall"
11082 #:test-target "junit-tests-all"
11083 #:make-flags (list "-DDATE" "(no date for reproducibility)")
11084 #:phases
11085 (modify-phases %standard-phases
11086 (add-before 'check 'fix-test
11087 (lambda _
11088 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
11089 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
11090 (replace 'install
11091 (install-from-pom "pom.xml")))))
11092 (inputs
11093 (list java-classpathx-servletapi java-commons-bsf))
11094 (native-inputs
11095 (list java-junit javacc-3))
11096 (home-page "http://beanshell.org/")
11097 (synopsis "Lightweight Scripting for Java")
11098 (description "BeanShell is a small, free, embeddable Java source
11099interpreter with object scripting language features, written in Java.
11100BeanShell dynamically executes standard Java syntax and extends it with common
11101scripting conveniences such as loose types, commands, and method closures like
11102those in Perl and JavaScript.")
11103 (license license:asl2.0)))
11104
11105(define-public java-fest-util
11106 (package
11107 (name "java-fest-util")
11108 (version "1.2.5")
11109 (source (origin
11110 (method git-fetch)
11111 (uri (git-reference
11112 (url "https://github.com/alexruiz/fest-util/")
11113 (commit (string-append "fest-util-" version))))
11114 (file-name (git-file-name name version))
11115 (sha256
11116 (base32
11117 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
11118 (build-system ant-build-system)
11119 (arguments
11120 `(#:jar-name "java-fest-util.jar"
11121 #:source-dir "src/main/java"))
11122 (native-inputs
11123 `(("junit" ,java-junit)
11124 ("hamcrest" ,java-hamcrest-core)))
11125 (home-page "https://github.com/alexruiz/fest-util")
11126 (synopsis "FEST common utilities")
11127 (description "Common utilities used in all FEST module.")
11128 (license license:asl2.0)))
11129
11130(define-public java-fest-test
11131 (package
11132 (name "java-fest-test")
11133 (version "2.1.0")
11134 (source (origin
11135 (method git-fetch)
11136 (uri (git-reference
11137 (url "https://github.com/alexruiz/fest-test/")
11138 (commit (string-append "fest-test-" version))))
11139 (file-name (git-file-name name version))
11140 (sha256
11141 (base32
11142 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
11143 (build-system ant-build-system)
11144 (arguments
11145 `(#:jar-name "java-fest-test.jar"
11146 #:source-dir "src/main/java"
11147 #:tests? #f)); no tests
11148 (inputs
11149 `(("junit" ,java-junit)))
11150 (home-page "https://github.com/alexruiz/fest-test")
11151 (synopsis "Common FEST testing infrastructure")
11152 (description "Fest-test contains the common FEST testing infrastructure.")
11153 (license license:asl2.0)))
11154
11155(define-public java-fest-assert
11156 (package
11157 (name "java-fest-assert")
11158 (version "2.0M10")
11159 (source (origin
11160 (method git-fetch)
11161 (uri (git-reference
11162 (url "https://github.com/alexruiz/fest-assert-2.x/")
11163 (commit (string-append "fest-assert-core-" version))))
11164 (file-name (git-file-name name version))
11165 (sha256
11166 (base32
11167 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
11168 (build-system ant-build-system)
11169 (arguments
11170 `(#:jar-name "java-fest-assert.jar"
11171 #:source-dir "src/main/java"
11172 #:test-exclude
11173 (list
11174 "**/Abstract*.java"
11175 "**/*BaseTest.java"
11176 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
11177 "**/MessageFormatter_format_Test.java"
11178 "**/internal/*/*_assert*_Test.java")))
11179 (inputs
11180 (list java-fest-util))
11181 (native-inputs
11182 (list java-junit
11183 java-fest-test
11184 java-hamcrest-core
11185 java-mockito-1
11186 java-cglib
11187 java-objenesis))
11188 (home-page "https://github.com/alexruiz/fest-assert-2.x")
11189 (synopsis "FEST fluent assertions")
11190 (description "FEST-Assert provides a fluent interface for assertions.")
11191 (license license:asl2.0)))
11192
11193(define-public java-testng
11194 (package
11195 (name "java-testng")
11196 (version "6.14.3")
11197 (source (origin
11198 (method git-fetch)
11199 (uri (git-reference
11200 (url "https://github.com/cbeust/testng")
11201 (commit version)))
11202 (file-name (string-append name "-" version "-checkout"))
11203 (sha256
11204 (base32
11205 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
11206 (build-system ant-build-system)
11207 (arguments
11208 (list
11209 #:jdk icedtea-8; java.util.function
11210 #:jar-name "java-testng.jar"
11211 #:source-dir "src/main/java"
11212 #:phases
11213 '(modify-phases %standard-phases
11214 (add-after 'unpack 'delete-failing-tests
11215 (lambda _
11216 ;; FIXME: I don't know why these tests fail
11217 (substitute* "src/test/resources/testng.xml"
11218 ;; expected:<[0]> but was:<[3]>
11219 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
11220 ;; expected [3] but found [2]
11221 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
11222 ;; This is a parallel test and we've observed that it fails
11223 ;; sometimes.
11224 (("<class name=\"test.dataprovider.DataProviderTest\"/>") ""))))
11225 ;; We don't have groovy
11226 (add-after 'unpack 'delete-groovy-tests
11227 (lambda _
11228 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
11229 (substitute* "src/test/resources/testng.xml"
11230 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
11231 (add-before 'build 'copy-resources
11232 (lambda _
11233 (copy-recursively "src/main/resources" "build/classes")))
11234 (add-before 'check 'copy-test-resources
11235 (lambda _
11236 (copy-recursively "src/test/resources" "build/test-classes")))
11237 (replace 'check
11238 (lambda _
11239 (invoke "ant" "compile-tests")
11240 ;; we don't have groovy
11241 (substitute* "src/test/resources/testng.xml"
11242 (("<class name=\"test.groovy.GroovyTest\" />") ""))
11243 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11244 ":build/classes"
11245 ":build/test-classes")
11246 "-Dtest.resources.dir=src/test/resources"
11247 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
11248 (propagated-inputs
11249 (list java-junit
11250 java-jsr305
11251 java-bsh
11252 java-jcommander
11253 java-guice
11254 java-snakeyaml))
11255 (native-inputs
11256 (list java-guava
11257 java-javax-inject
11258 java-hamcrest-all
11259 java-assertj
11260 java-mockito-1
11261 java-cglib
11262 java-aopalliance))
11263 (home-page "https://testng.org")
11264 (synopsis "Testing framework")
11265 (description "TestNG is a testing framework inspired from JUnit and NUnit
11266but introducing some new functionalities that make it more powerful and easier
11267to use.")
11268 (license license:asl2.0)))
11269
11270(define-public java-jnacl
11271 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
11272 (revision "2"))
11273 (package
11274 (name "java-jnacl")
11275 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
11276 (source (origin
11277 (method git-fetch)
11278 (uri (git-reference
11279 (url "https://github.com/neilalexander/jnacl")
11280 (commit commit)))
11281 (file-name (git-file-name name version))
11282 (sha256
11283 (base32
11284 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
11285 (build-system ant-build-system)
11286 (arguments
11287 `(#:jar-name "jnacl.jar"
11288 #:source-dir "src/main/java"
11289 #:jdk ,icedtea-8
11290 #:phases
11291 (modify-phases %standard-phases
11292 (add-before 'build 'fix-tests
11293 (lambda _
11294 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
11295 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
11296 (("assertions.Assertions") "assertions.api.Assertions"))
11297 #t))
11298 (replace 'check
11299 (lambda _
11300 (invoke "ant" "compile-tests")
11301 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11302 ":build/classes"
11303 ":build/test-classes")
11304 "org.testng.TestNG" "-testclass"
11305 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
11306 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11307 ":build/classes"
11308 ":build/test-classes")
11309 "org.testng.TestNG" "-testclass"
11310 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
11311 (native-inputs
11312 (list java-testng java-fest-util java-fest-assert))
11313 (home-page "https://github.com/neilalexander/jnacl")
11314 (synopsis "Java implementation of NaCl")
11315 (description "Pure Java implementation of the NaCl: Networking and
11316Cryptography library.")
11317 (license license:bsd-2))))
11318
11319(define-public java-mvel2
11320 (package
11321 (name "java-mvel2")
11322 (version "2.3.1")
11323 (source (origin
11324 (method url-fetch)
11325 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
11326 version ".Final.tar.gz"))
11327 (sha256
11328 (base32
11329 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
11330 (build-system ant-build-system)
11331 (arguments
11332 `(#:jar-name "mvel2.jar"
11333 #:source-dir "src/main/java"
11334 #:test-exclude
11335 (list "**/Abstract*.java"
11336 ;; Base class with no tests
11337 "**/MVELThreadTest.java")
11338 #:phases
11339 (modify-phases %standard-phases
11340 (add-after 'install 'install-bin
11341 (lambda* (#:key outputs #:allow-other-keys)
11342 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
11343 (mkdir-p bin)
11344 (with-output-to-file (string-append bin "/mvel2")
11345 (lambda _
11346 (display
11347 (string-append
11348 "#!" (which "bash") "\n"
11349 "if [ \"$#\" -ne \"2\" ]; then\n"
11350 "echo 'Usage: mvel2 <script> <out.dir>'\n"
11351 "exit\n"
11352 "fi\n"
11353 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
11354 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
11355 " org.mvel2.sh.Main $1"))))
11356 (chmod (string-append bin "/mvel2") #o755))
11357 #t)))))
11358 (native-inputs
11359 `(("junit" ,java-junit)
11360 ("hamcrest" ,java-hamcrest-core)))
11361 (home-page "https://github.com/mvel/mvel")
11362 (synopsis "MVFLEX Expression Language")
11363 (description "MVEL has largely been inspired by Java syntax, but has some
11364fundamental differences aimed at making it more efficient as an expression
11365language, such as operators that directly support collection, array and string
11366matching, as well as regular expressions. MVEL is used to evaluate expressions
11367written using Java syntax.
11368
11369In addition to the expression language, MVEL serves as a templating language for
11370configuration and string construction.")
11371 (license license:asl2.0)))
11372
11373(define-public java-commons-jexl-2
11374 (package
11375 (name "java-commons-jexl")
11376 (version "2.1.1")
11377 (source (origin
11378 (method url-fetch)
11379 (uri (string-append "mirror://apache/commons/jexl/source/"
11380 "commons-jexl-" version "-src.tar.gz"))
11381 (sha256
11382 (base32
11383 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
11384 (build-system ant-build-system)
11385 (arguments
11386 `(#:jar-name "commons-jexl-2.jar"
11387 #:jdk ,icedtea-8
11388 #:source-dir "src/main/java"
11389 #:phases
11390 (modify-phases %standard-phases
11391 (add-before 'check 'disable-broken-tests
11392 (lambda* (#:key inputs #:allow-other-keys)
11393 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
11394 (substitute* "ArithmeticTest.java"
11395 (("asserter.assertExpression\\(\"3 / 0\"") "//")
11396 (("asserter.assertExpression\\(\"imanull") "//"))
11397 ;; This test fails with "ambiguous method invocation"
11398 (delete-file "CacheTest.java")
11399 ;; This test doesn't have access to the temp directory
11400 (substitute* "ClassCreatorTest.java"
11401 (("java.io.tmpdir") "user.dir"))
11402 ;; This test fails in trying to detect whether it can run.
11403 (substitute* "ClassCreator.java"
11404 (("boolean canRun =.*") "boolean canRun = false;\n"))
11405 ;; ...and these tests depend on it.
11406 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
11407 (delete-file "scripting/JexlScriptEngineTest.java"))
11408 #t))
11409 (add-before 'build 'run-javacc
11410 (lambda _
11411 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
11412 (invoke "java" "jjtree" "Parser.jjt")
11413 (invoke "java" "javacc" "Parser.jj"))
11414 #t)))))
11415 (inputs
11416 (list java-commons-logging-minimal))
11417 (native-inputs
11418 (list java-junit java-hamcrest-core javacc-4))
11419 (home-page "https://commons.apache.org/proper/commons-jexl/")
11420 (synopsis "Java Expression Language")
11421 (description "JEXL is a library intended to facilitate the implementation
11422of dynamic and scripting features in applications and frameworks written in
11423Java. JEXL implements an Expression Language based on some extensions to the
11424JSTL Expression Language supporting most of the constructs seen in
11425shell-script or ECMAScript. Its goal is to expose scripting features usable
11426by technical operatives or consultants working with enterprise platforms.")
11427 (license license:asl2.0)))
11428
11429(define-public java-lz4
11430 (package
11431 (name "java-lz4")
11432 (version "1.4.0")
11433 (source (origin
11434 (method git-fetch)
11435 (uri (git-reference
11436 (url "https://github.com/lz4/lz4-java")
11437 (commit version)))
11438 (file-name (git-file-name name version))
11439 (sha256
11440 (base32
11441 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11442 (build-system ant-build-system)
11443 (arguments
11444 `(#:jar-name "lz4.jar"
11445 #:jdk ,icedtea-8
11446 #:source-dir "src/java:src/java-unsafe"
11447 #:tests? #f; FIXME: requires more dependencies
11448 #:phases
11449 (modify-phases %standard-phases
11450 (add-after 'unpack 'make-files-writable
11451 (lambda _
11452 (for-each make-file-writable (find-files "."))
11453 #t))
11454 (add-before 'configure 'generate-source
11455 (lambda _
11456 (with-directory-excursion "src/build/source_templates"
11457 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11458 #t)))))
11459 (native-inputs
11460 `(("mvel" ,java-mvel2)))
11461 (home-page "https://jpountz.github.io/lz4-java")
11462 (synopsis "Compression algorithm")
11463 (description "LZ4 - Java is a Java port of the popular lz4 compression
11464algorithms and xxHash hashing algorithm.")
11465 (license license:asl2.0)))
11466
11467(define-public java-bouncycastle
11468 (package
11469 (name "java-bouncycastle")
11470 (version "1.67")
11471 (source (origin
11472 (method git-fetch)
11473 (uri (git-reference
11474 (url "http://git.bouncycastle.org/repositories/bc-java")
11475 ;(url "https://github.com/bcgit/bc-java")
11476 (commit (string-append "r1rv" (substring version 2 4)))))
11477 (file-name (git-file-name name version))
11478 (sha256
11479 (base32
11480 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11481 (modules '((guix build utils)))
11482 (snippet
11483 '(begin
11484 (for-each delete-file
11485 (find-files "." "\\.jar$"))
11486 #t))))
11487 (build-system ant-build-system)
11488 (arguments
11489 `(#:jdk ,icedtea-8
11490 #:tests? #f
11491 #:phases
11492 (modify-phases %standard-phases
11493 (replace 'build
11494 (lambda _
11495 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11496 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11497 ;; FIXME: the tests freeze.
11498 ;; (replace 'check
11499 ;; (lambda _
11500 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11501 (replace 'install
11502 (install-jars "build/artifacts/jdk1.5/jars")))))
11503 (inputs
11504 (list java-javax-mail))
11505 (native-inputs
11506 `(("unzip" ,unzip)
11507 ("junit" ,java-junit)
11508 ("java-native-access" ,java-native-access)
11509 ("java-native-access-platform" ,java-native-access-platform)))
11510 (home-page "https://www.bouncycastle.org")
11511 (synopsis "Cryptographic library")
11512 (description "Bouncy Castle is a cryptographic library for the Java
11513programming language.")
11514 (license license:expat)))
11515
11516(define-public java-lmax-disruptor
11517 (package
11518 (name "java-lmax-disruptor")
11519 (version "3.4.4")
11520 (source (origin
11521 (method git-fetch)
11522 (uri (git-reference
11523 (url "https://github.com/LMAX-Exchange/disruptor")
11524 (commit version)))
11525 (file-name (git-file-name name version))
11526 (sha256
11527 (base32
11528 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
11529 (build-system ant-build-system)
11530 (arguments
11531 `(#:jar-name "java-lmax-disruptor.jar"
11532 #:jdk ,icedtea-8
11533 #:tests? #f)); tests hang
11534 (inputs
11535 `(("junit" ,java-junit)
11536 ("java-hdrhistogram" ,java-hdrhistogram)
11537 ("java-jmock" ,java-jmock)
11538 ("java-jmock-legacy" ,java-jmock-legacy)
11539 ("java-jmock-junit4" ,java-jmock-junit4)
11540 ("java-hamcrest-all" ,java-hamcrest-all)))
11541 (native-inputs
11542 `(("cglib" ,java-cglib)
11543 ("objenesis" ,java-objenesis)))
11544 (home-page "https://www.lmax.com/disruptor")
11545 (synopsis "High performance inter-thread communication")
11546 (description "LMAX Disruptor is a software pattern and software component
11547for high performance inter-thread communication that avoids the need for
11548message queues or resource locking.")
11549 (license license:asl2.0)))
11550
11551(define-public java-conversant-disruptor
11552 (package
11553 (name "java-conversant-disruptor")
11554 (version "1.2.19")
11555 (source (origin
11556 (method git-fetch)
11557 (uri (git-reference
11558 (url "https://github.com/conversant/disruptor")
11559 (commit version)))
11560 (file-name (git-file-name name version))
11561 (sha256
11562 (base32
11563 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
11564 (build-system ant-build-system)
11565 (arguments
11566 `(#:jar-name "java-conversant-disruptor.jar"
11567 #:source-dir "src/main/java"
11568 #:phases
11569 (modify-phases %standard-phases
11570 (add-before 'build 'copy-resources
11571 (lambda _
11572 (copy-recursively "src/main/resources" "build/classes")))
11573 (add-before 'build 'remove-module
11574 (lambda _
11575 (delete-file "src/main/java/module-info.java"))))))
11576 (native-inputs
11577 (list java-junit))
11578 (home-page "https://github.com/conversant/disruptor")
11579 (synopsis "High performance intra-thread communication")
11580 (description "Conversant Disruptor is the highest performing intra-thread
11581transfer mechanism available in Java. Conversant Disruptor is an implementation
11582of this type of ring buffer that has almost no overhead and that exploits a
11583particularly simple design.")
11584 (license license:asl2.0)))
11585
11586(define-public java-jctools-core-1
11587 (package
11588 (name "java-jctools-core")
11589 (version "1.2.1")
11590 (source (origin
11591 (method git-fetch)
11592 (uri (git-reference
11593 (url "https://github.com/JCTools/JCTools")
11594 (commit (string-append "v" version))))
11595 (file-name (git-file-name name version))
11596 (sha256
11597 (base32
11598 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11599 (build-system ant-build-system)
11600 (arguments
11601 `(#:jar-name "java-jctools-core.jar"
11602 #:source-dir "jctools-core/src/main/java"
11603 #:test-dir "jctools-core/src/test"
11604 ;; The tests timeout on some architectures.
11605 #:tests? ,(not (or (target-aarch64?)
11606 (%current-target-system)))))
11607 (native-inputs
11608 (list java-junit java-hamcrest-all))
11609 (home-page "https://github.com/JCTools/JCTools")
11610 (synopsis "Concurrency tools for Java")
11611 (description "This library implements concurrent data structures that are
11612not natively available in Java.")
11613 (license license:asl2.0)))
11614
11615(define-public java-commons-bcel
11616 (package
11617 (name "java-commons-bcel")
11618 (version "6.1")
11619 (source (origin
11620 (method url-fetch)
11621 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11622 version "-src.tar.gz"))
11623 (sha256
11624 (base32
11625 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11626 (build-system ant-build-system)
11627 (arguments
11628 `(#:jar-name "bcel.jar"
11629 #:jdk ,icedtea-8
11630 #:source-dir "src/main/java"
11631 #:test-dir "src/test/java"
11632 ;; FIXME: Tests require the unpackaged jna.
11633 #:tests? #f))
11634 (home-page "https://commons.apache.org/proper/commons-bcel/")
11635 (synopsis "Byte code engineering library")
11636 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11637intended to give users a convenient way to analyze, create, and
11638manipulate (binary) Java class files. Classes are represented by objects
11639which contain all the symbolic information of the given class: methods, fields
11640and byte code instructions, in particular.
11641
11642Such objects can be read from an existing file, be transformed by a
11643program (e.g. a class loader at run-time) and written to a file again. An
11644even more interesting application is the creation of classes from scratch at
11645run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11646if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11647of Java @code{.class} files.")
11648 (properties '((upstream-name . "bcel")))
11649 (license license:asl2.0)))
11650
11651(define-public java-xerial-core
11652 (package
11653 (name "java-xerial-core")
11654 (version "2.1")
11655 (source (origin
11656 (method url-fetch)
11657 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11658 version ".tar.gz"))
11659 (file-name (string-append name "-" version ".tar.gz"))
11660 (sha256
11661 (base32
11662 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11663 (build-system ant-build-system)
11664 (arguments
11665 `(#:jar-name "xerial-core.jar"
11666 #:source-dir "xerial-core/src/main/java"
11667 #:test-dir "xerial-core/src/test"
11668 #:phases
11669 (modify-phases %standard-phases
11670 (add-before 'build 'copy-resources
11671 (lambda _
11672 (copy-recursively "xerial-core/src/main/resources"
11673 "build/classes")
11674 #t)))))
11675 (native-inputs
11676 `(("junit" ,java-junit)
11677 ("hamcrest" ,java-hamcrest-core)))
11678 (home-page "https://github.com/xerial/xerial-java")
11679 (synopsis "Data management libraries for Java")
11680 (description "Xerial is a set of data management libraries for the Java
11681programming language. The ultimate goal of the Xerial project is to manage
11682everything as database, including class objects, text format data, data
11683streams, etc.")
11684 (license license:asl2.0)))
11685
11686(define-public java-byte-buddy-dep
11687 (package
11688 (name "java-byte-buddy-dep")
11689 (version "1.14.0")
11690 (source (origin
11691 (method git-fetch)
11692 (uri (git-reference
11693 (url "https://github.com/raphw/byte-buddy")
11694 (commit (string-append "byte-buddy-" version))))
11695 (file-name (git-file-name name version))
11696 (sha256
11697 (base32
11698 "03jmsnkjb9d3z9brqs8fc512hhs5b5iab3a5wbax9zi03dskgvh2"))))
11699 (build-system ant-build-system)
11700 (arguments
11701 `(#:jar-name "byte-buddy-dep.jar"
11702 #:source-dir "byte-buddy-dep/src/main/java"
11703 #:test-dir "byte-buddy-dep/src/test"
11704 #:tests? #f; would build java files that are incompatible with current jdk
11705 #:phases
11706 (modify-phases %standard-phases
11707 (add-before 'build 'remove-annotations
11708 (lambda _
11709 (with-directory-excursion "byte-buddy-dep/src/main/java/net/bytebuddy"
11710 (substitute* (find-files "." ".*.java")
11711 (("@EqualsAndHashCode.*") "")
11712 (("import lombok.EqualsAndHashCode;") "")
11713 (("@SuppressFBWarnings.*") "")
11714 (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") ""))
11715 (substitute* '("description/type/TypeDescription.java"
11716 "dynamic/loading/ClassInjector.java")
11717 (("^ *value = .*") "")
11718 (("^ *justification = .*") ""))))))))
11719 (inputs
11720 (list java-asm-9 java-asm-commons-9 java-jsr305 java-native-access))
11721 (home-page "http://bytebuddy.net/")
11722 (synopsis "Runtime code generation for the Java virtual machine")
11723 (description "Byte Buddy is a code generation and manipulation library for
11724creating and modifying Java classes during the runtime of a Java application
11725and without the help of a compiler.")
11726 (license license:asl2.0)))
11727
11728(define-public java-powermock-reflect
11729 (package
11730 (name "java-powermock-reflect")
11731 (version "2.0.9")
11732 (source (origin
11733 (method git-fetch)
11734 (uri (git-reference
11735 (url "https://github.com/powermock/powermock")
11736 (commit (string-append "powermock-" version))))
11737 (file-name (git-file-name name version))
11738 (sha256
11739 (base32
11740 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
11741 (patches
11742 (search-patches "java-powermock-fix-java-files.patch"))))
11743 (build-system ant-build-system)
11744 (arguments
11745 `(#:jar-name "java-powermock-reflect.jar"
11746 #:source-dir "powermock-reflect/src/main/java"
11747 #:test-dir "powermock-reflect/src/test"))
11748 (inputs
11749 (list java-asm-9 java-objenesis))
11750 (native-inputs
11751 (list java-assertj java-cglib java-hamcrest-core java-junit))
11752 (home-page "https://github.com/powermock/powermock")
11753 (synopsis "Mock library extension framework")
11754 (description "PowerMock is a framework that extends other mock libraries
11755such as EasyMock with more powerful capabilities. PowerMock uses a custom
11756classloader and bytecode manipulation to enable mocking of static methods,
11757constructors, final classes and methods, private methods, removal of static
11758initializers and more. By using a custom classloader no changes need to be
11759done to the IDE or continuous integration servers which simplifies adoption.")
11760 (license license:asl2.0)))
11761
11762(define-public java-powermock-core
11763 (package
11764 (inherit java-powermock-reflect)
11765 (name "java-powermock-core")
11766 (arguments
11767 `(#:jar-name "java-powermock-core.jar"
11768 #:source-dir "powermock-core/src/main/java"
11769 #:test-dir "powermock-core/src/test"
11770 #:tests? #f; requires powermock-api
11771 #:jdk ,icedtea-8
11772 #:phases
11773 (modify-phases %standard-phases
11774 (add-before 'build 'copy-resources
11775 (lambda _
11776 (copy-recursively "powermock-core/src/main/resources"
11777 "build/classes")
11778 #t)))))
11779 (inputs
11780 (list java-asm-9
11781 java-byte-buddy-dep
11782 java-jboss-javassist
11783 java-powermock-reflect))
11784 (native-inputs
11785 (list java-assertj java-mockito-1 java-junit))))
11786
11787(define-public java-powermock-api-support
11788 (package
11789 (inherit java-powermock-reflect)
11790 (name "java-powermock-api-support")
11791 (build-system ant-build-system)
11792 (arguments
11793 `(#:jar-name "java-powermock-api-support.jar"
11794 #:jdk ,icedtea-8
11795 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11796 #:tests? #f)); no tests
11797 (inputs
11798 (list java-powermock-core java-powermock-reflect))))
11799
11800(define-public java-powermock-modules-junit4-common
11801 (package
11802 (inherit java-powermock-reflect)
11803 (name "java-powermock-modules-junit4-common")
11804 (build-system ant-build-system)
11805 (arguments
11806 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11807 #:jdk ,icedtea-8
11808 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11809 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11810 (inputs
11811 (list java-cglib
11812 java-easymock
11813 java-hamcrest-core
11814 java-powermock-core
11815 java-powermock-reflect))))
11816
11817(define-public java-powermock-modules-junit4
11818 (package
11819 (inherit java-powermock-reflect)
11820 (name "java-powermock-modules-junit4")
11821 (build-system ant-build-system)
11822 (arguments
11823 `(#:jar-name "java-powermock-modules-junit4.jar"
11824 #:tests? #f; require easymock 4, which introduces a loop with testng
11825 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11826 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11827 #:phases
11828 (modify-phases %standard-phases
11829 (add-before 'build 'fix-junit-detection
11830 (lambda _
11831 ;; Our junit version is 4.12-SNAPSHOT
11832 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11833 "PowerMockJUnit4MethodValidator.java")
11834 (("4.12") "4.12-SNAPSHOT"))
11835 #t)))))
11836 (inputs
11837 (list java-cglib
11838 java-powermock-core
11839 java-powermock-reflect
11840 java-powermock-modules-junit4-common))
11841 (native-inputs
11842 (list java-easymock
11843 java-hamcrest-core
11844 java-junit
11845 java-objenesis))))
11846
11847(define-public java-powermock-api-easymock
11848 (package
11849 (inherit java-powermock-reflect)
11850 (name "java-powermock-api-easymock")
11851 (build-system ant-build-system)
11852 (arguments
11853 `(#:jar-name "java-powermock-api-easymock.jar"
11854 #:jdk ,icedtea-8
11855 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11856 #:tests? #f; no tests
11857 #:phases
11858 (modify-phases %standard-phases
11859 (add-before 'build 'fix-file
11860 (lambda _
11861 ;; FIXME: This looks wrong, but it fixes a build error.
11862 (with-directory-excursion "powermock-api/powermock-api-easymock"
11863 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11864 (("classLoader instanceof MockClassLoader") "false")
11865 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11866 #t)))))
11867 (inputs
11868 (list java-cglib
11869 java-easymock
11870 java-powermock-api-support
11871 java-powermock-core
11872 java-powermock-reflect))))
11873
11874(define-public java-jboss-jms-api-spec
11875 (package
11876 (name "java-jboss-jms-api-spec")
11877 (version "2.0")
11878 (source (origin
11879 (method url-fetch)
11880 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11881 "archive/jboss-jms-api_" version
11882 "_spec-1.0.1.Final.tar.gz"))
11883 (sha256
11884 (base32
11885 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11886 (build-system ant-build-system)
11887 (arguments
11888 `(#:jar-name "java-jboss-jms-api_spec.jar"
11889 #:jdk ,icedtea-8
11890 #:source-dir "."
11891 #:tests? #f)); no tests
11892 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11893 (synopsis "Java Message Service API specification")
11894 (description "Java Message Service (JMS) API is used to send messages
11895messages between two or more clients. It is a messaging standard that allows
11896application components to create, send, receive, and read messages.")
11897 ; either gpl2 only with GPL Classpath Exception, or cddl.
11898 (license (list license:gpl2 license:cddl1.0))))
11899
11900(define-public java-mail
11901 (package
11902 (name "java-mail")
11903 (version "1.6.0")
11904 (source (origin
11905 (method url-fetch)
11906 (uri (string-append "https://github.com/javaee/javamail/archive/"
11907 "JAVAMAIL-1_6_0.tar.gz"))
11908 (sha256
11909 (base32
11910 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11911 (build-system ant-build-system)
11912 (arguments
11913 `(#:jar-name "java-mail.jar"
11914 #:jdk ,icedtea-8
11915 #:source-dir "mail/src/main/java"
11916 #:test-dir "mail/src/test"
11917 #:test-exclude
11918 (list "**/CollectorFormatterTest.java"
11919 "**/CompactFormatterTest.java"
11920 "**/DurationFilterTest.java"
11921 "**/MailHandlerTest.java"
11922 "**/GetLocalAddressTest.java"
11923 ;; SSLHandshakeException: No appropriate protocol
11924 "**/WriteTimeoutSocketTest.java"
11925 ;; FIXME: both end with:
11926 ;; java.lang.ClassNotFoundException:
11927 ;; javax.mail.internet.MimeMultipartParseTest
11928 "**/MimeMultipartParseTest.java"
11929 "**/SearchTermSerializationTest.java")
11930 #:phases
11931 (modify-phases %standard-phases
11932 (add-before 'configure 'move-version.java
11933 (lambda _
11934 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11935 "mail/src/main/java/javax/mail/Version.java")))
11936 (add-before 'build 'copy-resources
11937 (lambda _
11938 (copy-recursively "mail/src/main/resources/META-INF"
11939 "build/classes/META-INF"))))))
11940 (native-inputs
11941 (list java-junit java-hamcrest-core))
11942 (home-page "https://javaee.github.io/javamail/")
11943 (synopsis "Mail-related functionality in Java")
11944 (description "The JavaMail API provides a platform-independent and
11945protocol-independent framework to build mail and messaging applications.")
11946 ;; General Public License Version 2 only ("GPL") or the Common Development
11947 ;; and Distribution License("CDDL")
11948 (license (list license:cddl1.1
11949 license:gpl2)))); with classpath exception
11950
11951(define-public java-mapdb
11952 (package
11953 (name "java-mapdb")
11954 (version "1.0.9")
11955 (source (origin
11956 (method git-fetch)
11957 (uri (git-reference
11958 (url "https://github.com/jankotek/mapdb")
11959 (commit (string-append "mapdb-" version))))
11960 (file-name (git-file-name name version))
11961 (sha256
11962 (base32
11963 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
11964 (build-system ant-build-system)
11965 (arguments
11966 (list #:jar-name "mapdb.jar"
11967 #:source-dir "src/main/java"
11968 #:test-dir "src/test"
11969 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
11970 "**/ConcurrentMapInterfaceTest.java"
11971 "**/EngineTest.java"
11972 "**/Issue664Test.java"
11973 "**/MapInterfaceTest.java")
11974 #:phases #~(modify-phases %standard-phases
11975 (replace 'install (install-from-pom "pom.xml")))))
11976 (native-inputs (list java-junit))
11977 (home-page "https://mapdb.org/")
11978 (synopsis "Concurrent data structures")
11979 (description "MapDB provides concurrent maps, sets and queues backed by
11980disk storage or off-heap memory.")
11981 (license license:bsd-3)))
11982
11983(define-public java-mime4j-core
11984 (package
11985 (name "java-mime4j-core")
11986 (version "0.8.13")
11987 (source (origin
11988 (method url-fetch)
11989 (uri (string-append "mirror://apache/james/mime4j/" version
11990 "/james-mime4j-sources-" version ".zip"))
11991 (sha256
11992 (base32
11993 "0f1r0ywa1qdw2b227c93v3fksqp9bgll00bqw1md1894v3szm9ca"))))
11994 (build-system ant-build-system)
11995 (arguments
11996 `(#:tests? #f ;; has no tests
11997 #:source-dir "core/src/main/java"
11998 #:jar-name "apache-mime4j-core.jar"))
11999 (native-inputs
12000 (list java-commons-io-latest ;; requries >= 2.7
12001 java-junit
12002 unzip))
12003 (home-page "https://james.apache.org/mime4j/apache-mime4j-core/")
12004 (synopsis "Java stream based MIME message parser")
12005 (description "Apache James Mime4J provides a parser, MimeStreamParser, for
12006e-mail message streams in plain rfc822 and MIME format. The parser uses a
12007callback mechanism to report parsing events such as the start of an entity
12008header, the start of a body, etc. If you are familiar with the SAX XML parser
12009interface you should have no problem getting started with mime4j.")
12010 (license license:asl2.0)))
12011
12012(define-public java-jeromq
12013 (package
12014 (name "java-jeromq")
12015 (version "0.4.3")
12016 (source (origin
12017 (method git-fetch)
12018 (uri (git-reference
12019 (url "https://github.com/zeromq/jeromq")
12020 (commit (string-append "v" version))))
12021 (file-name (string-append name "-" version "-checkout"))
12022 (sha256
12023 (base32
12024 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
12025 (patches (search-patches "java-jeromq-fix-tests.patch"))))
12026 (build-system ant-build-system)
12027 (arguments
12028 `(#:jar-name "java-jeromq.jar"
12029 #:source-dir "src/main/java"
12030 #:jdk ,icedtea-8
12031 #:test-exclude
12032 (list
12033 "**/Abstract*.java"
12034 ;; Requires network
12035 "**/ZBeaconTest.java"
12036 ;; Failures
12037 "**/DealerSpecTest.java"
12038 "**/CustomDecoderTest.java"
12039 "**/CustomEncoderTest.java"
12040 "**/ConnectRidTest.java"
12041 "**/ReqSpecTest.java"
12042 "**/PushPullSpecTest.java"
12043 "**/PubSubHwmTest.java"
12044 "**/RouterSpecTest.java"
12045 "**/ProxyTest.java")))
12046 (inputs
12047 (list java-jnacl))
12048 (native-inputs
12049 `(("java-hamcrest-core" ,java-hamcrest-core)
12050 ("junit" ,java-junit)))
12051 (home-page "https://zeromq.org/bindings:java")
12052 (synopsis "Java binding for 0MQ")
12053 (description "Jeromq provides the java bindings for 0MQ.")
12054 (license license:mpl2.0)))
12055
12056(define-public java-kafka-clients
12057 (package
12058 (name "java-kafka-clients")
12059 (version "1.1.1")
12060 (source (origin
12061 (method url-fetch)
12062 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
12063 version "-src.tgz"))
12064 (sha256
12065 (base32
12066 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
12067 (build-system ant-build-system)
12068 (arguments
12069 `(#:jar-name "java-kafka-clients.jar"
12070 #:jdk ,icedtea-8
12071 #:source-dir "clients/src/main/java"
12072 #:test-dir "clients/src/test"
12073 #:test-exclude
12074 (list
12075 ;; This file does not contain a class
12076 "**/IntegrationTest.java"
12077 ;; Requires network
12078 "**/ClientUtilsTest.java"
12079 ;; This test fails on i686
12080 "**/SerializationTest.java"
12081 ;; "protocol is disabled or cipher suites are inappropriate"
12082 "**/SslTransportLayerTest.java"
12083 ;; End with errors that seem related to our powermock
12084 "**/KafkaProducerTest.java"
12085 "**/BufferPoolTest.java"
12086 ;; Undeterministic failure, seems to affect mostly ci
12087 "**/GarbageCollectedMemoryPoolTest.java")))
12088 (inputs
12089 (list java-slf4j-api java-lz4))
12090 (native-inputs
12091 (list java-bouncycastle
12092 java-cglib
12093 java-easymock
12094 java-hamcrest-all
12095 java-jboss-javassist
12096 java-junit
12097 java-objenesis
12098 java-powermock-api-easymock
12099 java-powermock-api-support
12100 java-powermock-core
12101 java-powermock-modules-junit4
12102 java-powermock-modules-junit4-common
12103 java-snappy))
12104 (home-page "https://kafka.apache.org")
12105 (synopsis "Distributed streaming platform")
12106 (description "Kafka is a distributed streaming platform, which means:
12107@itemize
12108@item it can publish and subscribe to streams of records;
12109@item it can store streams of records in a fault-tolerant way;
12110@item it can process streams of records as they occur.
12111@end itemize")
12112 ;; Either cddl or gpl2 only.
12113 (license (list license:cddl1.1; actually cddl1.1
12114 license:gpl2)))); with classpath exception
12115
12116(define-public java-jdom
12117 (package
12118 (name "java-jdom")
12119 (version "1.1.3")
12120 (source (origin
12121 (method url-fetch)
12122 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
12123 version ".tar.gz"))
12124 (sha256
12125 (base32
12126 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
12127 (build-system ant-build-system)
12128 (arguments
12129 `(#:build-target "package"
12130 #:tests? #f; tests are run as part of the build process
12131 #:phases
12132 (modify-phases %standard-phases
12133 (replace 'install
12134 (install-jars "build")))))
12135 (home-page "http://jdom.org/")
12136 (synopsis "Access, manipulate, and output XML data")
12137 (description "Java-based solution for accessing, manipulating, and
12138outputting XML data from Java code.")
12139 (license license:bsd-4)))
12140
12141(define-public java-geronimo-xbean-reflect
12142 (package
12143 (name "java-geronimo-xbean-reflect")
12144 (version "4.5")
12145 (source (origin
12146 (method svn-fetch)
12147 (uri (svn-reference
12148 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
12149 (revision 1807396)))
12150 (file-name (string-append name "-" version))
12151 (sha256
12152 (base32
12153 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
12154 (build-system ant-build-system)
12155 (arguments
12156 `(#:jar-name "geronimo-xbean-reflect.jar"
12157 #:source-dir "xbean-reflect/src/main/java"
12158 #:test-dir "xbean-reflect/src/test"
12159 #:jdk ,icedtea-8
12160 #:test-exclude
12161 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
12162 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
12163 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
12164 #:phases
12165 (modify-phases %standard-phases
12166 (add-before 'build 'fix-source
12167 (lambda _
12168 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
12169 ;; org.apache.xbean.asm6 is actually repackaged java-asm
12170 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
12171 (("org.apache.xbean.asm5") "org.objectweb.asm"))
12172 #t)))
12173 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
12174 (inputs
12175 `(("asm" ,java-asm)
12176 ("log4j" ,java-log4j-api)
12177 ("log4j-1.2" ,java-log4j-1.2-api)
12178 ("log4j-core" ,java-log4j-core)
12179 ("logging" ,java-commons-logging-minimal)))
12180 (propagated-inputs
12181 (list java-geronimo-parent-pom))
12182 (native-inputs
12183 `(("junit" ,java-junit)))
12184 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
12185 (synopsis "Dependency injection helper")
12186 (description "Xbean-reflect provides very flexible ways to create objects
12187and graphs of objects for dependency injection frameworks")
12188 (license license:asl2.0)))
12189
12190(define-public java-geronimo-genesis-2.1
12191 (package
12192 (name "java-geronimo-genesis")
12193 (version "2.1")
12194 (source (origin
12195 (method svn-fetch)
12196 (uri (svn-reference
12197 (url (string-append "https://svn.apache.org/repos/asf/"
12198 "geronimo/genesis/tags/genesis-"
12199 version))
12200 (revision 1807396)))
12201 (file-name (string-append name "-" version "-source"))
12202 (sha256
12203 (base32
12204 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
12205 (build-system ant-build-system)
12206 (arguments
12207 `(#:tests? #f
12208 #:phases
12209 (modify-phases %standard-phases
12210 (delete 'configure)
12211 (delete 'build)
12212 (replace 'install
12213 (install-pom-file "pom.xml"))
12214 (add-after 'install 'install-enforcer-rules
12215 (install-pom-file "genesis-enforcer-rules/pom.xml"))
12216 (add-after 'install 'install-flava
12217 (install-pom-file "genesis-default-flava/pom.xml"))
12218 (add-after 'install 'install-packaging
12219 (install-pom-file "genesis-packaging/pom.xml"))
12220 (add-after 'install-flava 'install-flava-java4
12221 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
12222 (add-after 'install-flava 'install-flava-java5
12223 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
12224 (add-after 'install-flava 'install-flava-java6
12225 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
12226 (propagated-inputs
12227 `(("apache-parent-pom" ,apache-parent-pom-13)))
12228 (home-page "https://geronimo.apache.org")
12229 (synopsis "Collection of maven POM files for the Geronimo project")
12230 (description "Apache Geronimo is a server runtime. This package contains
12231only pom files used by other components in the Geronimo project.")
12232 (license license:asl2.0)))
12233
12234(define java-geronimo-parent-pom
12235 (package
12236 (inherit java-geronimo-xbean-reflect)
12237 (name "java-geronimo-parent-pom")
12238 (arguments
12239 `(#:tests? #f
12240 #:phases
12241 (modify-phases %standard-phases
12242 (delete 'configure)
12243 (delete 'build)
12244 (replace 'install
12245 (install-pom-file "pom.xml")))))
12246 (propagated-inputs
12247 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
12248
12249(define-public java-geronimo-xbean-bundleutils
12250 (package
12251 (inherit java-geronimo-xbean-reflect)
12252 (name "java-geronimo-xbean-bundleutils")
12253 (arguments
12254 `(#:jar-name "geronimo-xbean-bundleutils.jar"
12255 #:source-dir "xbean-bundleutils/src/main/java"
12256 #:test-dir "xbean-bundleutils/src/test"
12257 #:phases
12258 (modify-phases %standard-phases
12259 (add-before 'build 'fix-java
12260 (lambda _
12261 ;; We use a more recent version of osgi, so this file requires
12262 ;; more interface method implementations.
12263 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
12264 (("import org.osgi.framework.ServiceRegistration;")
12265 "import org.osgi.framework.ServiceRegistration;
12266import org.osgi.framework.ServiceFactory;
12267import java.util.Collection;
12268import org.osgi.framework.ServiceObjects;")
12269 (("public Bundle getBundle\\(\\)")
12270 "@Override
12271public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
12272 throw new UnsupportedOperationException();
12273}
12274@Override
12275public <S> ServiceRegistration<S> registerService(Class<S> clazz,
12276 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
12277 throw new UnsupportedOperationException();
12278}
12279public Bundle getBundle()"))
12280 #t)))))
12281 (inputs
12282 `(("java-slf4j" ,java-slf4j-api)
12283 ("java-asm" ,java-asm)
12284 ("java-osgi-framework" ,java-osgi-framework)
12285 ("java-eclipse-osgi" ,java-eclipse-osgi)
12286 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
12287
12288(define-public java-geronimo-xbean-asm-util
12289 (package
12290 (inherit java-geronimo-xbean-reflect)
12291 (name "java-geronimo-xbean-asm-util")
12292 (arguments
12293 `(#:jar-name "geronimo-xbean-asm-util.jar"
12294 #:source-dir "xbean-asm-util/src/main/java"
12295 #:tests? #f)); no tests
12296 (inputs
12297 (list java-asm))
12298 (native-inputs '())))
12299
12300(define-public java-geronimo-xbean-finder
12301 (package
12302 (inherit java-geronimo-xbean-reflect)
12303 (name "java-geronimo-xbean-finder")
12304 (arguments
12305 `(#:jar-name "geronimo-xbean-finder.jar"
12306 #:source-dir "xbean-finder/src/main/java"
12307 #:test-dir "xbean-finder/src/test"))
12308 (inputs
12309 (list java-slf4j-api
12310 java-asm
12311 java-geronimo-xbean-bundleutils
12312 java-geronimo-xbean-asm-util
12313 java-osgi-service-packageadmin
12314 java-osgi-framework))
12315 (native-inputs
12316 (list java-junit java-hamcrest-core))))
12317
12318(define-public java-gson
12319 (package
12320 (name "java-gson")
12321 (version "2.8.2")
12322 (source (origin
12323 (method url-fetch)
12324 (uri (string-append "https://github.com/google/gson/archive/"
12325 "gson-parent-" version ".tar.gz"))
12326 (sha256
12327 (base32
12328 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
12329 (build-system ant-build-system)
12330 (arguments
12331 `(#:jar-name "gson.jar"
12332 #:source-dir "gson/src/main/java"
12333 #:test-dir "gson/src/test"))
12334 (native-inputs
12335 (list java-junit java-hamcrest-core))
12336 (home-page "https://github.com/google/gson")
12337 (synopsis "Java serialization/deserialization library from/to JSON")
12338 (description "Gson is a Java library that can be used to convert Java
12339Objects into their JSON representation. It can also be used to convert a JSON
12340string to an equivalent Java object. Gson can work with arbitrary Java objects
12341including pre-existing objects that you do not have source-code of.")
12342 (license license:asl2.0)))
12343
12344;; This requires a different Java version than 2.8.2 above
12345(define-public java-gson-2.8.6
12346 (package
12347 (inherit java-gson)
12348 (name "java-gson")
12349 (version "2.8.6")
12350 (source (origin
12351 (method git-fetch)
12352 (uri (git-reference
12353 (url "https://github.com/google/gson")
12354 (commit (string-append "gson-parent-" version))))
12355 (file-name (git-file-name name version))
12356 (sha256
12357 (base32
12358 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
12359 (arguments
12360 `(#:jar-name "gson.jar"
12361 #:jdk ,openjdk11
12362 #:source-dir "gson/src/main/java"
12363 #:test-dir "gson/src/test"
12364 #:phases
12365 (modify-phases %standard-phases
12366 ;; avoid Maven dependency
12367 (add-before 'build 'fill-template
12368 (lambda _
12369 (with-directory-excursion "gson/src/main"
12370 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
12371 "java/com/google/gson/internal/GsonBuildConfig.java")
12372 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
12373 (("\\$\\{project.version\\}") ,version))))))))))
12374
12375(define-public java-hawtjni
12376 (package
12377 (name "java-hawtjni")
12378 (version "1.15")
12379 (source (origin
12380 (method url-fetch)
12381 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
12382 "hawtjni-project-" version ".tar.gz"))
12383 (sha256
12384 (base32
12385 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
12386 (build-system ant-build-system)
12387 (arguments
12388 `(#:jar-name "hawtjni.jar"
12389 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
12390 #:tests? #f; no tests
12391 #:phases
12392 (modify-phases %standard-phases
12393 (add-before 'build 'build-native
12394 (lambda* (#:key inputs #:allow-other-keys)
12395 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
12396 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12397 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
12398 "-fPIC" "-O2" include)
12399 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
12400 "-fPIC" "-O2" include)
12401 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
12402 "hawtjni.o" "hawtjni-callback.o")))
12403 #t))
12404 (add-after 'install 'install-native
12405 (lambda* (#:key outputs #:allow-other-keys)
12406 (let* ((out (assoc-ref outputs "out"))
12407 (lib (string-append out "/lib"))
12408 (inc (string-append out "/include")))
12409 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12410 (install-file "libhawtjni.so" lib)
12411 (install-file "hawtjni.h" inc)))
12412 #t))
12413 (add-before 'install 'install-parent
12414 (install-pom-file "pom.xml"))
12415 (replace 'install
12416 (install-from-pom "hawtjni-runtime/pom.xml")))))
12417 (inputs
12418 (list java-commons-cli java-asm java-geronimo-xbean-finder))
12419 (home-page "https://fusesource.github.io/hawtjni/")
12420 (synopsis "JNI code generator")
12421 (description "HawtJNI is a code generator that produces the JNI code needed
12422to implement Java native methods. It is based on the jnigen code generator
12423that is part of the SWT Tools project.")
12424 (license license:asl2.0)))
12425
12426(define-public java-jansi-native
12427 (package
12428 (name "java-jansi-native")
12429 (version "1.7")
12430 (source (origin
12431 (method url-fetch)
12432 (uri (string-append "https://github.com/fusesource/jansi-native/"
12433 "archive/jansi-native-" version ".tar.gz"))
12434 (sha256
12435 (base32
12436 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
12437 (build-system ant-build-system)
12438 (arguments
12439 `(#:jar-name "jansi-native.jar"
12440 #:source-dir "src/main/java"
12441 #:tests? #f; no tests
12442 #:phases
12443 (modify-phases %standard-phases
12444 (add-before 'build 'build-native
12445 (lambda* (#:key inputs #:allow-other-keys)
12446 ;; there are more required files for windows in windows/
12447 (with-directory-excursion "src/main/native-package/src"
12448 (substitute* "jansi_ttyname.c"
12449 (("#include \"jansi_.*") ""))
12450 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
12451 (string-append "-I" (assoc-ref inputs "java-hawtjni")
12452 "/include")
12453 (string-append "-I" (assoc-ref inputs "jdk")
12454 "/include/linux")
12455 "-fPIC" "-O2")
12456 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
12457 (add-before 'build 'install-native
12458 (lambda _
12459 (let ((dir (string-append "build/classes/META-INF/native/"
12460 ,(match (%current-system)
12461 ((or "i686-linux" "armhf-linux")
12462 "linux32")
12463 ((or "x86_64-linux" "aarch64-linux"
12464 "mips64el-linux")
12465 "linux64")
12466 (_ "unknown-kernel")))))
12467 (install-file "src/main/native-package/src/libjansi.so" dir))
12468 #t))
12469 (add-after 'install 'install-native
12470 (lambda* (#:key outputs #:allow-other-keys)
12471 (install-file "src/main/native-package/src/jansi.h"
12472 (string-append (assoc-ref outputs "out") "/include"))
12473 #t))
12474 (add-before 'install 'fix-pom
12475 (lambda _
12476 ;; pom contains variables to complete name, but we don't support that
12477 (substitute* "pom.xml"
12478 (("\\$\\{platform\\}") "native"))
12479 #t))
12480 (replace 'install
12481 (install-from-pom "pom.xml")))))
12482 (propagated-inputs
12483 (list java-hawtjni))
12484 (home-page "https://fusesource.github.io/jansi/")
12485 (synopsis "Native library for jansi")
12486 (description "This package provides the native library for jansi, a small
12487Java library that allows you to use ANSI escape sequences to format your
12488console output.")
12489 (license license:asl2.0)))
12490
12491(define-public java-jansi
12492 (package
12493 (name "java-jansi")
12494 (version "2.4.0")
12495 (source (origin
12496 (method git-fetch)
12497 (uri (git-reference
12498 (url "https://github.com/fusesource/jansi")
12499 (commit (string-append "jansi-" version))))
12500 (file-name (git-file-name name version))
12501 (sha256
12502 (base32
12503 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
12504 (modules '((guix build utils)))
12505 (snippet
12506 ;; contains pre-compiled libraries
12507 '(delete-file-recursively
12508 "src/main/resources/org/fusesource/jansi/internal"))))
12509 (build-system ant-build-system)
12510 (arguments
12511 `(#:jar-name "jansi.jar"
12512 #:source-dir "src/main/java"
12513 #:test-dir "src/test"
12514 #:tests? #f; require junit 3
12515 #:phases
12516 (modify-phases %standard-phases
12517 (add-before 'build 'build-native
12518 (lambda* (#:key inputs #:allow-other-keys)
12519 (with-directory-excursion "src/main/native"
12520 (for-each
12521 (lambda (cfile)
12522 (let ((cfile (basename cfile))
12523 (ofile (string-append (basename cfile ".c") ".o")))
12524 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
12525 (string-append "-I" (assoc-ref inputs "jdk")
12526 "/include/linux")
12527 "-fPIC" "-O2")))
12528 (find-files "." "\\.c$"))
12529 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
12530 (find-files "." "\\.o$")))))
12531 (add-before 'build 'install-native
12532 (lambda _
12533 (let ((dir (string-append "build/classes/org/fusesource/"
12534 "jansi/internal/native/"
12535 ,(match (or (%current-target-system) (%current-system))
12536 ("i686-linux" "Linux/x86")
12537 ("x86_64-linux" "Linux/x86_64")
12538 ("armhf-linux" "Linux/armv7")
12539 ("aarch64-linux" "Linux/arm64")
12540 ("mips64el-linux" "Linux/mips64")
12541 (_ "unknown-kernel")))))
12542 (install-file "src/main/native/libjansi.so" dir))))
12543 (add-before 'build 'copy-resources
12544 (lambda _
12545 (copy-recursively "src/main/resources" "build/classes")))
12546 (replace 'install
12547 (install-from-pom "pom.xml")))))
12548 (home-page "https://fusesource.github.io/jansi/")
12549 (synopsis "Portable ANSI escape sequences")
12550 (description "Jansi is a Java library that allows you to use ANSI escape
12551sequences to format your console output which works on every platform.")
12552 (license license:asl2.0)))
12553
12554(define-public java-jansi-1
12555 (package
12556 (inherit java-jansi)
12557 (version "1.16")
12558 (source (origin
12559 (method git-fetch)
12560 (uri (git-reference
12561 (url "https://github.com/fusesource/jansi")
12562 (commit (string-append "jansi-project-" version))))
12563 (file-name (git-file-name "jansi" version))
12564 (sha256
12565 (base32
12566 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
12567 (arguments
12568 `(#:jar-name "jansi.jar"
12569 #:source-dir "jansi/src/main/java"
12570 #:test-dir "jansi/src/test"
12571 #:phases
12572 (modify-phases %standard-phases
12573 (add-after 'check 'clear-term
12574 (lambda _
12575 (invoke "echo" "-e" "\\e[0m")))
12576 (add-before 'install 'install-parent
12577 (install-pom-file "pom.xml"))
12578 (add-before 'install 'fix-pom
12579 (lambda _
12580 ;; pom adds jansi native versions for different platforms, but we
12581 ;; only need one, so use native instead
12582 (substitute* "jansi/pom.xml"
12583 (("windows32") "native")
12584 (("windows64") "native")
12585 (("osx") "native")
12586 (("linux32") "native")
12587 (("linux64") "native")
12588 (("freebsd32") "native")
12589 (("freebsd64") "native"))
12590 #t))
12591 (replace 'install
12592 (install-from-pom "jansi/pom.xml")))))
12593 (propagated-inputs
12594 (list java-jansi-native))
12595 (native-inputs
12596 (list java-junit java-hamcrest-core))))
12597
12598(define-public java-jboss-el-api-spec
12599 (package
12600 (name "java-jboss-el-api-spec")
12601 (version "3.0")
12602 (source (origin
12603 (method url-fetch)
12604 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
12605 "archive/jboss-el-api_" version
12606 "_spec-1.0.7.Final.tar.gz"))
12607 (sha256
12608 (base32
12609 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
12610 (build-system ant-build-system)
12611 (arguments
12612 `(#:jar-name "java-jboss-el-api_spec.jar"
12613 #:phases
12614 (modify-phases %standard-phases
12615 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
12616 ;; instead, which implements the same thing. We override the pom file
12617 ;; to "rename" the package so it can be found by maven.
12618 (add-before 'install 'override-pom
12619 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
12620 #:name "el-api"))
12621 (replace 'install
12622 (install-from-pom "pom.xml")))))
12623 (inputs
12624 (list java-junit))
12625 (home-page "https://github.com/jboss/jboss-el-api_spec")
12626 (synopsis "JSR-341 expression language 3.0 API")
12627 (description "This package contains an implementation of the JSR-341
12628specification for the expression language 3.0. It implements an expression
12629language inspired by ECMAScript and XPath. This language is used with
12630JavaServer Pages (JSP).")
12631 ;; Either GPL2 only or CDDL.
12632 (license (list license:gpl2 license:cddl1.1))))
12633
12634(define-public java-jboss-interceptors-api-spec
12635 (package
12636 (name "java-jboss-interceptors-api-spec")
12637 (version "1.2")
12638 (source (origin
12639 (method url-fetch)
12640 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
12641 "archive/jboss-interceptors-api_" version
12642 "_spec-1.0.0.Final.tar.gz"))
12643 (sha256
12644 (base32
12645 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
12646 (build-system ant-build-system)
12647 (arguments
12648 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12649 #:jdk ,icedtea-8
12650 #:source-dir "."
12651 #:tests? #f; no tests
12652 #:phases
12653 (modify-phases %standard-phases
12654 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12655 ;; so we use this package instead, which implements the same thing.
12656 ;; We override the pom file to "rename" the package so it can be found
12657 ;; by maven.
12658 (add-before 'install 'override-pom
12659 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
12660 "3.0" #:name "interceptor-api"))
12661 (replace 'install
12662 (install-from-pom "pom.xml")))))
12663 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12664 (synopsis "Interceptors 1.2 API classes from JSR 318")
12665 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12666API. Interceptors are used to interpose on business method invocations and
12667specific events.")
12668 ;; Either GPL2 only or CDDL.
12669 (license (list license:gpl2 license:cddl1.1))))
12670
12671(define-public java-cdi-api
12672 (package
12673 (name "java-cdi-api")
12674 (version "2.0")
12675 (source (origin
12676 (method url-fetch)
12677 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12678 version ".tar.gz"))
12679 (file-name (string-append name "-" version ".tar.gz"))
12680 (sha256
12681 (base32
12682 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12683 (build-system ant-build-system)
12684 (arguments
12685 `(#:source-dir "api/src/main/java"
12686 #:jar-name "java-cdi-api.jar"
12687 #:test-dir "api/src/test"
12688 #:jdk ,icedtea-8
12689 #:tests? #f; Tests fail because we don't have a CDI provider yet
12690 #:phases
12691 (modify-phases %standard-phases
12692 (replace 'install
12693 (install-from-pom "api/pom.xml")))))
12694 (propagated-inputs
12695 (list java-javax-inject java-jboss-el-api-spec
12696 java-jboss-interceptors-api-spec java-weld-parent-pom))
12697 (native-inputs
12698 (list java-testng java-hamcrest-core))
12699 (home-page "https://cdi-spec.org/")
12700 (synopsis "Contexts and Dependency Injection APIs")
12701 (description "Java-cdi-api contains the required APIs for Contexts and
12702Dependency Injection (CDI).")
12703 (license license:asl2.0)))
12704
12705(define-public java-joda-convert
12706 (package
12707 (name "java-joda-convert")
12708 (version "1.9.2")
12709 (source (origin
12710 (method url-fetch)
12711 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12712 version ".tar.gz"))
12713 (file-name (string-append name "-" version ".tar.gz"))
12714 (sha256
12715 (base32
12716 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12717 (build-system ant-build-system)
12718 (arguments
12719 `(#:jar-name (string-append ,name "-" ,version ".jar")
12720 #:source-dir "src/main/java"
12721 #:test-include (list "**/Test*.java")
12722 ;; Contains only interfaces and base classes (no test)
12723 #:test-exclude (list "**/test*/**.java")))
12724 (inputs
12725 (list java-guava))
12726 (native-inputs
12727 (list java-junit java-hamcrest-core))
12728 (home-page "https://www.joda.org/joda-convert/")
12729 (synopsis "Conversion between Objects and Strings")
12730 (description "Joda-Convert provides a small set of classes to aid
12731conversion between Objects and Strings. It is not intended to tackle the
12732wider problem of Object to Object transformation.")
12733 (license license:asl2.0)))
12734
12735(define-public java-joda-time
12736 (package
12737 (name "java-joda-time")
12738 (version "2.9.9")
12739 (source (origin
12740 (method url-fetch)
12741 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12742 version ".tar.gz"))
12743 (file-name (string-append name "-" version ".tar.gz"))
12744 (sha256
12745 (base32
12746 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12747 (build-system ant-build-system)
12748 (arguments
12749 `(#:jar-name "java-joda-time.jar"
12750 #:source-dir "src/main/java"
12751 #:test-include (list "**/Test*.java")
12752 ;; There is no runnable test in these files
12753 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12754 #:phases
12755 (modify-phases %standard-phases
12756 (add-after 'build 'build-resources
12757 (lambda _
12758 (mkdir-p "build/classes/org/joda/time/tz/data")
12759 (mkdir-p "build/classes/org/joda/time/format")
12760 ;; This will produce the following exception:
12761 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12762 ;; which is normal, because it doesn't exist yet. It still generates
12763 ;; the same file as in the binary one can find on maven.
12764 (invoke "java" "-cp"
12765 (string-append "build/classes:" (getenv "CLASSPATH"))
12766 "org.joda.time.tz.ZoneInfoCompiler"
12767 "-src" "src/main/java/org/joda/time/tz/src"
12768 "-dst" "build/classes/org/joda/time/tz/data"
12769 "africa" "antarctica" "asia" "australasia"
12770 "europe" "northamerica" "southamerica"
12771 "pacificnew" "etcetera" "backward" "systemv")
12772 (for-each (lambda (f)
12773 (copy-file f (string-append
12774 "build/classes/org/joda/time/format/"
12775 (basename f))))
12776 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12777 #t))
12778 (add-before 'install 'regenerate-jar
12779 (lambda _
12780 ;; We need to regenerate the jar file to add generated data.
12781 (delete-file "build/jar/java-joda-time.jar")
12782 (invoke "ant" "jar")))
12783 (add-before 'check 'copy-test-resources
12784 (lambda _
12785 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12786 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12787 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12788 (copy-recursively "src/test/resources" "build/test-classes")
12789 #t)))))
12790 (inputs
12791 (list java-joda-convert))
12792 (native-inputs
12793 (list java-junit java-hamcrest-core tzdata))
12794 (home-page "https://www.joda.org/joda-time/")
12795 (synopsis "Replacement for the Java date and time classes")
12796 (description "Joda-Time is a replacement for the Java date and time
12797classes prior to Java SE 8.")
12798 (license license:asl2.0)))
12799
12800(define-public java-xerces
12801 (package
12802 (name "java-xerces")
12803 (version "2.12.2")
12804 (source
12805 (origin
12806 (method url-fetch)
12807 (uri (string-append "mirror://apache/xerces/j/source/"
12808 "Xerces-J-src." version ".tar.gz"))
12809 (sha256
12810 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
12811 (patches (search-patches
12812 "java-xerces-xjavac_taskdef.patch"
12813 "java-xerces-build_dont_unzip.patch"
12814 "java-xerces-bootclasspath.patch"))))
12815 (build-system ant-build-system)
12816 (arguments
12817 `(#:tests? #f;; Test files are not present
12818 #:test-target "test"
12819 #:jdk ,icedtea-8
12820 #:phases
12821 (modify-phases %standard-phases
12822 (add-after 'unpack 'create-build.properties
12823 (lambda* (#:key inputs #:allow-other-keys)
12824 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12825 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12826 (with-output-to-file "build.properties"
12827 (lambda _
12828 (format #t
12829 "jar.jaxp = ~a/share/java/jaxp.jar~@
12830 jar.apis-ext = ~a/share/java/jaxp.jar~@
12831 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12832 jaxp jaxp resolver)))
12833 ;; Make xerces use our version of jaxp in tests
12834 (substitute* "build.xml"
12835 (("xml-apis.jar")
12836 (string-append jaxp "/share/java/jaxp.jar"))
12837 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12838 "${jar.apis}")))
12839 #t))
12840 (replace 'install (install-jars "build")))))
12841 (inputs
12842 (list java-apache-xml-commons-resolver java-jaxp))
12843 (home-page "https://xerces.apache.org/xerces2-j/")
12844 (synopsis "Validating XML parser for Java with DOM level 3 support")
12845 (description "The Xerces2 Java parser is the reference implementation of
12846XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12847processor.
12848
12849Xerces2-J supports the following standards and APIs:
12850
12851@itemize
12852@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12853@item Namespaces in XML Recommendation
12854@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12855 Range Recommendations
12856@item Simple API for XML (SAX) 2.0.1 Core and Extension
12857@item Java APIs for XML Processing (JAXP) 1.2.01
12858@item XML Schema 1.0 Structures and Datatypes Recommendations
12859@item Experimental implementation of the Document Object Model (DOM) Level 3
12860 Core and Load/Save Working Drafts
12861@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12862 Candidate Recommendation
12863@end itemize
12864
12865Xerces is now able to parse documents written according to the XML 1.1
12866Candidate Recommendation, except that it does not yet provide an option to
12867enable normalization checking as described in section 2.13 of this
12868specification. It also handles namespaces according to the XML Namespaces 1.1
12869Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12870the DOM level 3 load/save API's are in use.")
12871 (license license:asl2.0)))
12872
12873(define-public java-jakarta-regexp
12874 (package
12875 (name "java-jakarta-regexp")
12876 (version "1.5")
12877 (source
12878 (origin
12879 (method url-fetch)
12880 (uri (string-append
12881 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12882 version ".tar.gz"))
12883 (sha256
12884 (base32
12885 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12886 (build-system ant-build-system)
12887 (arguments
12888 `(#:test-target "test"
12889 #:phases
12890 (modify-phases %standard-phases
12891 (replace 'install
12892 (lambda* (#:key outputs #:allow-other-keys)
12893 (let* ((out (assoc-ref outputs "out"))
12894 (out-share (string-append out "/share/java")))
12895 (mkdir-p out-share)
12896 (for-each (lambda (name)
12897 (install-file name out-share))
12898 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12899 #t))))))
12900 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12901 (synopsis "Regular expression parser generator for Java")
12902 (description "@code{jakarta-regexp} is an old regular expression parser
12903generator for Java.")
12904 (license license:asl2.0)))
12905
12906(define-public java-jline
12907 (package
12908 (name "java-jline")
12909 (version "1.0")
12910 (source (origin
12911 (method url-fetch)
12912 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12913 version ".tar.gz"))
12914 (sha256
12915 (base32
12916 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12917 (build-system ant-build-system)
12918 (arguments
12919 `(#:jar-name "jline.jar"
12920 #:source-dir "src/main/java"
12921 #:test-dir "src/test"
12922 #:phases
12923 (modify-phases %standard-phases
12924 (add-before 'build 'copy-resources
12925 (lambda _
12926 (copy-recursively "src/main/resources" "build/classes")
12927 #t)))))
12928 (native-inputs
12929 (list java-junit))
12930 (home-page "https://jline.github.io")
12931 (synopsis "Console input handling library")
12932 (description "JLine is a Java library for handling console input. It is
12933similar in functionality to BSD editline and GNU readline but with additional
12934features that bring it on par with the Z shell line editor.")
12935 (license license:bsd-3)))
12936
12937(define-public java-jline-2
12938 (package
12939 (inherit java-jline)
12940 (version "2.14.5")
12941 (source (origin
12942 (method url-fetch)
12943 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12944 version ".tar.gz"))
12945 (sha256
12946 (base32
12947 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12948 (arguments
12949 `(#:jdk ,icedtea-8
12950 ,@(package-arguments java-jline)))
12951 (inputs
12952 (list java-jansi-1 java-jansi-native))
12953 (native-inputs
12954 (list java-powermock-modules-junit4
12955 java-powermock-modules-junit4-common
12956 java-powermock-api-easymock
12957 java-powermock-api-support
12958 java-powermock-core
12959 java-powermock-reflect
12960 java-easymock
12961 java-jboss-javassist
12962 java-objenesis
12963 java-hamcrest-core
12964 java-cglib
12965 java-junit
12966 java-hawtjni))))
12967
12968(define-public java-jline-terminal
12969 (package
12970 (name "java-jline-terminal")
12971 (version "3.14.1")
12972 (source (origin
12973 (method git-fetch)
12974 (uri (git-reference
12975 (url "https://github.com/jline/jline3")
12976 (commit (string-append "jline-parent-" version))))
12977 (file-name (git-file-name name version))
12978 (sha256
12979 (base32
12980 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12981 (build-system ant-build-system)
12982 (arguments
12983 `(#:jar-name "jline-terminal.jar"
12984 #:jdk ,openjdk11
12985 #:tests? #f; TODO: tests fail on *.caps resource lookups
12986 #:source-dir "terminal/src/main/java"
12987 #:test-dir "terminal/src/test"
12988 #:phases
12989 (modify-phases %standard-phases
12990 (add-after 'unpack 'remove-build-file
12991 (lambda _
12992 ;; Conflicts with build directory generated by ant-build-system.
12993 (delete-file "build")))
12994 (add-after 'unpack 'patch-paths
12995 (lambda* (#:key inputs #:allow-other-keys)
12996 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
12997 (("= \"infocmp\"")
12998 (string-append "= \"" (assoc-ref inputs "ncurses")
12999 "/bin/infocmp\""))
13000 (("= \"(s?tty)\"" _ cmd)
13001 (string-append "= \"" (assoc-ref inputs "coreutils")
13002 "/bin/" cmd "\"")))))
13003 ;; Resources are not added to the JAR by ant-build-system.
13004 (add-after 'build 'add-resources
13005 (lambda* (#:key jar-name source-dir #:allow-other-keys)
13006 (let ((build (string-append (getcwd) "/build")))
13007 (with-directory-excursion
13008 (string-append source-dir "/../resources")
13009 (apply invoke "jar" "-uvf"
13010 (string-append build "/jar/" jar-name)
13011 (find-files ".")))))))))
13012 (inputs
13013 (list ncurses)); infocmp
13014 (home-page "https://github.com/jline/jline3")
13015 (synopsis "Java JLine Terminal API and implementations")
13016 (description "JLine is a Java library for handling console input. It is
13017similar in functionality to BSD editline and GNU readline but with additional
13018features that bring it in par with ZSH line editor. People familiar with the
13019readline/editline capabilities for modern shells (such as bash and tcsh) will
13020find most of the command editing features of JLine to be familiar.
13021
13022This package includes the @var{Terminal} API and implementations.")
13023 (license license:bsd-3)))
13024
13025(define-public java-jline-reader
13026 (package
13027 (name "java-jline-reader")
13028 (version "3.14.1")
13029 (source (origin
13030 (method git-fetch)
13031 (uri (git-reference
13032 (url "https://github.com/jline/jline3")
13033 (commit (string-append "jline-parent-" version))))
13034 (file-name (git-file-name name version))
13035 (sha256
13036 (base32
13037 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
13038 (build-system ant-build-system)
13039 (arguments
13040 `(#:jar-name "jline-reader.jar"
13041 #:jdk ,openjdk11
13042 #:source-dir "reader/src/main/java"
13043 #:test-dir "reader/src/test"
13044 #:phases
13045 (modify-phases %standard-phases
13046 (add-before 'build 'remove-build-file
13047 (lambda _
13048 ;; conflicts with build directory generated by ant-build-system
13049 (delete-file "build"))))))
13050 (native-inputs
13051 (list java-junit java-easymock))
13052 (inputs
13053 (list java-jline-terminal))
13054 (home-page "https://github.com/jline/jline3")
13055 (synopsis "Java JLine line reader")
13056 (description "JLine is a Java library for handling console input. It is
13057similar in functionality to BSD editline and GNU readline but with additional
13058features that bring it in par with ZSH line editor. People familiar with the
13059readline/editline capabilities for modern shells (such as bash and tcsh) will
13060find most of the command editing features of JLine to be familiar.
13061
13062This package includes the line reader.")
13063 (license license:bsd-3)))
13064
13065(define-public java-xmlunit
13066 (package
13067 (name "java-xmlunit")
13068 (version "2.5.1")
13069 (source (origin
13070 (method url-fetch)
13071 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
13072 version ".tar.gz"))
13073 (file-name (string-append name "-" version ".tar.gz"))
13074 (sha256
13075 (base32
13076 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
13077 (build-system ant-build-system)
13078 (arguments
13079 `(#:jar-name "java-xmlunit.jar"
13080 #:source-dir "xmlunit-core/src/main/java"
13081 #:test-dir "xmlunit-core/src/test"
13082 #:phases
13083 (modify-phases %standard-phases
13084 (add-before 'check 'copy-test-resources
13085 (lambda* (#:key inputs #:allow-other-keys)
13086 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
13087 #t)))))
13088 (native-inputs
13089 `(("java-junit" ,java-junit)
13090 ("java-mockito-1" ,java-mockito-1)
13091 ("java-hamcrest-all" ,java-hamcrest-all)
13092 ("java-objenesis" ,java-objenesis)
13093 ("java-cglib" ,java-cglib)
13094 ("resources"
13095 ,(origin
13096 (method git-fetch)
13097 (uri (git-reference
13098 (url "https://github.com/xmlunit/test-resources")
13099 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
13100 (file-name "java-xmlunit-test-resources")
13101 (sha256
13102 (base32
13103 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
13104 (home-page "https://www.xmlunit.org/")
13105 (synopsis "XML output testing")
13106 (description "XMLUnit provides you with the tools to verify the XML you
13107emit is the one you want to create. It provides helpers to validate against
13108an XML Schema, assert the values of XPath queries or compare XML documents
13109against expected outcomes.")
13110 (license license:asl2.0)))
13111
13112(define-public java-xmlunit-legacy
13113 (package
13114 (inherit java-xmlunit)
13115 (name "java-xmlunit-legacy")
13116 (arguments
13117 `(#:jar-name "java-xmlunit-legacy.jar"
13118 #:source-dir "xmlunit-legacy/src/main/java"
13119 #:test-dir "xmlunit-legacy/src/test"))
13120 (inputs
13121 (list java-xmlunit java-junit))
13122 (native-inputs
13123 `(("java-mockito-1" ,java-mockito-1)))))
13124
13125(define-public java-xmlunit-matchers
13126 (package
13127 (inherit java-xmlunit)
13128 (name "java-xmlunit-matchers")
13129 (arguments
13130 `(#:jar-name "java-xmlunit-matchers.jar"
13131 #:source-dir "xmlunit-matchers/src/main/java"
13132 #:test-dir "xmlunit-matchers/src/test"
13133 #:test-exclude
13134 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
13135 (list "**/ValidationMatcherTest.java")
13136 #:phases
13137 (modify-phases %standard-phases
13138 (add-before 'build 'copy-test-class
13139 (lambda _
13140 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
13141 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
13142 #t))
13143 (add-before 'build 'fix-test-resources-path
13144 (lambda _
13145 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
13146 (("../test-resources") "test-resources"))
13147 #t))
13148 (add-before 'check 'copy-test-resources
13149 (lambda* (#:key inputs #:allow-other-keys)
13150 (copy-recursively (assoc-ref inputs "resources") "test-resources")
13151 #t)))))
13152 (inputs
13153 (list java-xmlunit java-junit))))
13154
13155(define-public java-openchart2
13156 (package
13157 (name "java-openchart2")
13158 (version "1.4.3")
13159 (source (origin
13160 (method url-fetch)
13161 (uri (string-append "http://download.approximatrix.com/openchart2/"
13162 "openchart2-" version ".source.zip"))
13163 (sha256
13164 (base32
13165 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
13166 (build-system ant-build-system)
13167 (arguments
13168 `(#:test-target "test"
13169 #:phases
13170 (modify-phases %standard-phases
13171 (add-after 'unpack 'fix-junit-errors
13172 (lambda _
13173 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
13174 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
13175 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
13176 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
13177 "model/DefaultChartDataModelConstraintsTest.java"
13178 "model/MultiScatterDataModelConstraintsTest.java"
13179 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
13180 (("(assertEquals[^;]+);" before _)
13181 (string-append (string-drop-right before 2) ", 1E-6);"))))
13182 #t))
13183 (replace 'install (install-jars ".")))))
13184 (native-inputs
13185 (list unzip java-junit java-hamcrest-core))
13186 (home-page "https://approximatrix.com/products/openchart2/")
13187 (synopsis "Simple plotting for Java")
13188 (description "Openchart2 provides a simple, yet powerful, interface for
13189Java programmers to create two-dimensional charts and plots. The library
13190features an assortment of graph styles, including advanced scatter plots, bar
13191graphs, and pie charts.")
13192 (license license:lgpl2.1+)))
13193
13194(define-public java-commons-httpclient
13195 (package
13196 (name "java-commons-httpclient")
13197 (version "3.1")
13198 (source (origin
13199 (method url-fetch)
13200 (uri (string-append "mirror://apache/httpcomponents/"
13201 "commons-httpclient/source/commons-httpclient-"
13202 version "-src.tar.gz"))
13203 (sha256
13204 (base32
13205 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
13206 (build-system ant-build-system)
13207 (arguments
13208 `(#:build-target "compile"
13209 #:test-target "test"
13210 #:tests? #f; requires junit-textui (junit 3)
13211 #:phases
13212 (modify-phases %standard-phases
13213 (add-before 'build 'fix-accent
13214 (lambda _
13215 (for-each (lambda (file)
13216 (with-fluids ((%default-port-encoding "ISO-8859-1"))
13217 (substitute* file
13218 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
13219 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
13220 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
13221 "src/test/org/apache/commons/httpclient/TestHttps.java"
13222 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
13223 #t))
13224 (replace 'install
13225 (lambda* (#:key outputs #:allow-other-keys)
13226 (invoke "ant" "dist"
13227 (string-append "-Ddist.home=" (assoc-ref outputs "out")
13228 "/share/java"))
13229 #t)))))
13230 (propagated-inputs
13231 `(("java-commons-logging" ,java-commons-logging-minimal)
13232 ("java-commons-codec" ,java-commons-codec)))
13233 (home-page "https://hc.apache.org")
13234 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
13235 (description "This package contains an HTTP/1.1 compliant HTTP agent
13236implementation. It also provides reusable components for client-side
13237authentication, HTTP state management, and HTTP connection management.")
13238 (license license:asl2.0)))
13239
13240(define-public java-commons-vfs
13241 (package
13242 (name "java-commons-vfs")
13243 (version "2.2")
13244 (source (origin
13245 (method url-fetch)
13246 (uri (string-append "mirror://apache/commons/vfs/source/"
13247 "commons-vfs2-distribution-" version "-src.tar.gz"))
13248 (file-name (string-append name "-" version ".tar.gz"))
13249 (sha256
13250 (base32
13251 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
13252 (modules '((guix build utils)))
13253 (snippet
13254 '(begin
13255 (for-each delete-file
13256 (find-files "." "\\.jar$"))
13257 #t))))
13258 (build-system ant-build-system)
13259 (arguments
13260 `(#:jar-name "commons-vfs.jar"
13261 #:source-dir "commons-vfs2/src/main/java"
13262 #:test-dir "commons-vfs2/src/test"
13263 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
13264 #:tests? #f
13265 #:phases
13266 (modify-phases %standard-phases
13267 (add-before 'build 'remove-hadoop-and-webdav
13268 ; Remove these files as they are not required and depend on difficult
13269 ; packages.
13270 (lambda _
13271 (for-each delete-file-recursively
13272 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
13273 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
13274 #t)))))
13275 (inputs
13276 (list java-commons-collections4
13277 java-commons-compress
13278 java-commons-httpclient
13279 java-commons-logging-minimal
13280 java-commons-net
13281 java-jsch))
13282 (home-page "https://commons.apache.org/proper/commons-vfs/")
13283 (synopsis "Java file system library")
13284 (description "Commons VFS provides a single API for accessing various
13285different file systems. It presents a uniform view of the files from various
13286different sources, such as the files on local disk, on an HTTP server, or
13287inside a Zip archive.")
13288 (license license:asl2.0)))
13289
13290(define-public java-jakarta-oro
13291 (package
13292 (name "java-jakarta-oro")
13293 (version "2.0.8")
13294 (source (origin
13295 (method url-fetch)
13296 (uri (string-append "mirror://apache/jakarta/oro/"
13297 "jakarta-oro-" version ".tar.gz"))
13298 (sha256
13299 (base32
13300 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
13301 (modules '((guix build utils)))
13302 (snippet
13303 `(begin
13304 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
13305 #t))))
13306 (build-system ant-build-system)
13307 (arguments
13308 `(#:build-target "package"
13309 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
13310 #:tests? #f; tests are run as part of the build process
13311 #:phases
13312 (modify-phases %standard-phases
13313 (replace 'install
13314 (install-jars ,(string-append "jakarta-oro-" version))))))
13315 (home-page "https://jakarta.apache.org/oro/")
13316 (synopsis "Text-processing for Java")
13317 (description "The Jakarta-ORO Java classes are a set of text-processing
13318Java classes that provide Perl5 compatible regular expressions, AWK-like
13319regular expressions, glob expressions, and utility classes for performing
13320substitutions, splits, filtering filenames, etc. This library is the successor
13321of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
13322from ORO, Inc.")
13323 (license license:asl1.1)))
13324
13325(define-public java-native-access
13326 (package
13327 (name "java-native-access")
13328 (version "4.5.1")
13329 (source (origin
13330 (method url-fetch)
13331 (uri (string-append "https://github.com/java-native-access/jna/"
13332 "archive/" version ".tar.gz"))
13333 (file-name (string-append name "-" version ".tar.gz"))
13334 (sha256
13335 (base32
13336 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
13337 (modules '((guix build utils)))
13338 (snippet
13339 `(begin
13340 (for-each delete-file (find-files "." ".*.jar"))
13341 (delete-file-recursively "native/libffi")
13342 (delete-file-recursively "dist")
13343 #t))))
13344 (build-system ant-build-system)
13345 (arguments
13346 `(#:tests? #f; FIXME: tests require reflections.jar
13347 #:test-target "test"
13348 #:make-flags (list "-Ddynlink.native=true")
13349 #:phases
13350 (modify-phases %standard-phases
13351 (add-before 'build 'fix-build.xml
13352 (lambda* (#:key inputs #:allow-other-keys)
13353 (substitute* "build.xml"
13354 ;; Since we removed the bundled ant.jar, give the correct path
13355 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
13356 ;; We removed generated native libraries. We can only rebuild one
13357 ;; so don't fail if we can't find a native library for another architecture.
13358 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
13359 ;; Copy test dependencies
13360 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
13361 "lib/junit.jar")
13362 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
13363 "jar$"))
13364 "lib/hamcrest-core.jar")
13365 ;; FIXME: once reflections.jar is built, copy it to lib/test.
13366 #t))
13367 (add-before 'build 'build-native
13368 (lambda _
13369 (invoke "ant" "-Ddynlink.native=true" "native")
13370 #t))
13371 (replace 'install
13372 (install-jars "build")))))
13373 (inputs
13374 (list libffi libx11 libxt))
13375 (native-inputs
13376 (list gcc-7 java-junit java-hamcrest-core))
13377 (home-page "https://github.com/java-native-access/jna")
13378 (synopsis "Access to native shared libraries from Java")
13379 (description "JNA provides Java programs easy access to native shared
13380libraries without writing anything but Java code - no JNI or native code is
13381required. JNA allows you to call directly into native functions using natural
13382Java method invocation.")
13383 ;; Java Native Access project (JNA) is dual-licensed under 2
13384 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
13385 (license (list
13386 license:asl2.0
13387 license:lgpl2.1+))))
13388
13389(define-public java-native-access-platform
13390 (package
13391 (inherit java-native-access)
13392 (name "java-native-access-platform")
13393 (arguments
13394 `(#:test-target "test"
13395 #:tests? #f; require jna-test.jar
13396 #:phases
13397 (modify-phases %standard-phases
13398 (add-before 'build 'chdir
13399 (lambda _
13400 (chdir "contrib/platform")
13401 #t))
13402 (add-after 'chdir 'fix-ant
13403 (lambda* (#:key inputs #:allow-other-keys)
13404 (substitute* "nbproject/project.properties"
13405 (("../../build/jna.jar")
13406 (search-input-file inputs "/share/java/jna.jar"))
13407 (("../../lib/hamcrest-core-.*.jar")
13408 (car (find-files (assoc-ref inputs "java-hamcrest-core")
13409 "jar$")))
13410 (("../../lib/junit.jar")
13411 (car (find-files (assoc-ref inputs "java-junit")
13412 "jar$"))))
13413 #t))
13414 (replace 'install
13415 (install-jars "dist")))))
13416 (inputs
13417 (list java-native-access))
13418 (synopsis "Cross-platform mappings for jna")
13419 (description "java-native-access-platform has cross-platform mappings
13420and mappings for a number of commonly used platform functions, including a
13421large number of Win32 mappings as well as a set of utility classes that
13422simplify native access.")))
13423
13424(define-public java-jsch-agentproxy-core
13425 (package
13426 (name "java-jsch-agentproxy-core")
13427 (version "0.0.8")
13428 (source (origin
13429 (method url-fetch)
13430 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
13431 version ".tar.gz"))
13432 (file-name (string-append name "-" version ".tar.gz"))
13433 (sha256
13434 (base32
13435 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
13436 (build-system ant-build-system)
13437 (arguments
13438 `(#:jar-name "jsch-agentproxy-core.jar"
13439 #:source-dir "jsch-agent-proxy-core/src/main/java"
13440 #:tests? #f)); no tests
13441 (home-page "https://github.com/ymnk/jsch-agent-proxy")
13442 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
13443 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13444and Pageant included Putty. It will be easily integrated into JSch, and users
13445will be allowed to use these programs for authentication.")
13446 (license license:bsd-3)))
13447
13448(define-public java-jsch-agentproxy-sshagent
13449 (package
13450 (inherit java-jsch-agentproxy-core)
13451 (name "java-jsch-agentproxy-sshagent")
13452 (arguments
13453 `(#:jar-name "jsch-agentproxy-sshagent.jar"
13454 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
13455 #:tests? #f)); no tests
13456 (inputs
13457 (list java-jsch-agentproxy-core))
13458 (synopsis "Proxy to ssh-agent")
13459 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13460and Pageant included in Putty. This component contains the code for a proxy to
13461ssh-agent.")))
13462
13463(define-public java-jsch-agentproxy-usocket-jna
13464 (package
13465 (inherit java-jsch-agentproxy-core)
13466 (name "java-jsch-agentproxy-usocket-jna")
13467 (arguments
13468 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
13469 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
13470 #:tests? #f)); no tests
13471 (inputs
13472 (list java-jsch-agentproxy-core java-native-access))
13473 (synopsis "USocketFactory implementation using JNA")
13474 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13475and Pageant included in Putty. This component contains an implementation of
13476USocketFactory using @dfn{JNA} (Java Native Access).")))
13477
13478(define-public java-jsch-agentproxy-pageant
13479 (package
13480 (inherit java-jsch-agentproxy-core)
13481 (name "java-jsch-agentproxy-pageant")
13482 (arguments
13483 `(#:jar-name "jsch-agentproxy-pageant.jar"
13484 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
13485 #:tests? #f)); no tests
13486 (inputs
13487 (list java-jsch-agentproxy-core java-native-access
13488 java-native-access-platform))
13489 (synopsis "Proxy to pageant")
13490 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13491and Pageant included in Putty. This component contains the code for a proxy to
13492pageant.")))
13493
13494(define-public java-jsch-agentproxy-usocket-nc
13495 (package
13496 (inherit java-jsch-agentproxy-core)
13497 (name "java-jsch-agentproxy-usocket-nc")
13498 (arguments
13499 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
13500 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
13501 #:tests? #f)); no tests
13502 (inputs
13503 (list java-jsch-agentproxy-core))
13504 (synopsis "USocketFactory implementation using netcat")
13505 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13506and Pageant included in Putty. This component contains an implementation of
13507USocketFactory using netcat.")))
13508
13509(define-public java-jsch-agentproxy-connector-factory
13510 (package
13511 (inherit java-jsch-agentproxy-core)
13512 (name "java-jsch-agentproxy-connector-factory")
13513 (arguments
13514 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
13515 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
13516 #:tests? #f)); no tests
13517 (inputs
13518 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
13519 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
13520 java-jsch-agentproxy-usocket-nc))
13521 (synopsis "Connector factory for jsch agent proxy")
13522 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13523and Pageant included in Putty. This component contains a connector factory.")))
13524
13525(define-public java-jsch-agentproxy-jsch
13526 (package
13527 (inherit java-jsch-agentproxy-core)
13528 (name "java-jsch-agentproxy-jsch")
13529 (arguments
13530 `(#:jar-name "jsch-agentproxy-jsch.jar"
13531 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
13532 #:tests? #f)); no tests
13533 (inputs
13534 (list java-jsch java-jsch-agentproxy-core))
13535 (synopsis "JSch integration library for agentproxy")
13536 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13537and Pageant included in Putty. This component contains a library to use
13538jsch-agent-proxy with JSch.")))
13539
13540(define-public java-apache-ivy
13541 (package
13542 (name "java-apache-ivy")
13543 (version "2.4.0")
13544 (source (origin
13545 (method url-fetch)
13546 (uri (string-append "mirror://apache/ant/ivy/" version
13547 "/apache-ivy-" version "-src.tar.gz"))
13548 (sha256
13549 (base32
13550 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
13551 (patches
13552 (search-patches
13553 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
13554 (build-system ant-build-system)
13555 (arguments
13556 `(#:jar-name "ivy.jar"
13557 #:tests? #f
13558 #:phases
13559 (modify-phases %standard-phases
13560 (add-before 'build 'remove-example
13561 (lambda _
13562 (delete-file-recursively "src/example")
13563 #t))
13564 (add-before 'build 'copy-resources
13565 (lambda _
13566 (with-directory-excursion "src/java"
13567 (for-each (lambda (file)
13568 (install-file file (string-append "../../build/classes/" (dirname file))))
13569 (append
13570 (find-files "." ".*.css")
13571 (find-files "." ".*.ent")
13572 (find-files "." ".*.html")
13573 (find-files "." ".*.properties")
13574 (find-files "." ".*.xsd")
13575 (find-files "." ".*.xsl")
13576 (find-files "." ".*.xml"))))
13577 #t))
13578 (add-before 'build 'fix-vfs
13579 (lambda _
13580 (substitute*
13581 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
13582 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
13583 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
13584 #t))
13585 (add-before 'install 'copy-manifest
13586 (lambda _
13587 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
13588 #t))
13589 (add-before 'install 'repack
13590 (lambda _
13591 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
13592 "-C" "build/classes" ".")))
13593 (add-after 'install 'install-bin
13594 (lambda* (#:key outputs #:allow-other-keys)
13595 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
13596 (ivy (string-append bin "/ivy"))
13597 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
13598 (mkdir-p bin)
13599 (with-output-to-file ivy
13600 (lambda _
13601 (display (string-append
13602 "#!" (which "sh") "\n"
13603 "if [[ -z $CLASSPATH ]]; then\n"
13604 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
13605 "else\n"
13606 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
13607 "fi\n"
13608 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
13609 (chmod ivy #o755)
13610 #t))))))
13611 (inputs
13612 (list java-bouncycastle
13613 java-commons-cli
13614 java-commons-collections
13615 java-commons-httpclient
13616 java-commons-lang
13617 java-commons-vfs
13618 java-jakarta-oro
13619 java-jsch
13620 java-jsch-agentproxy-core
13621 java-jsch-agentproxy-connector-factory
13622 java-jsch-agentproxy-jsch
13623 java-junit))
13624 (home-page "https://ant.apache.org/ivy")
13625 (synopsis "Dependency manager for the Java programming language")
13626 (description "Ivy is a tool for managing (recording, tracking, resolving
13627and reporting) project dependencies. It is characterized by the following:
13628
13629@itemize
13630@item flexibility and configurability - Ivy is essentially process agnostic
13631 and is not tied to any methodology or structure. Instead it provides the
13632 necessary flexibility and configurability to be adapted to a broad range
13633 of dependency management and build processes.
13634@item tight integration with Apache Ant - while available as a standalone tool,
13635 Ivy works particularly well with Apache Ant providing a number of
13636 powerful Ant tasks ranging from dependency resolution to dependency
13637 reporting and publication.
13638@end itemize")
13639 (license license:asl2.0)))
13640
13641(define-public java-eclipse-sisu-inject
13642 (package
13643 (name "java-eclipse-sisu-inject")
13644 (version "0.3.5")
13645 (source (origin
13646 (method git-fetch)
13647 (uri (git-reference
13648 (url "https://github.com/eclipse/sisu.inject/")
13649 (commit (string-append "releases/" version))))
13650 (file-name (git-file-name name version))
13651 (sha256
13652 (base32
13653 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
13654 (build-system ant-build-system)
13655 (arguments
13656 `(#:jar-name "eclipse-sisu-inject.jar"
13657 #:source-dir "org.eclipse.sisu.inject/src"
13658 #:tests? #f; no tests
13659 #:phases
13660 (modify-phases %standard-phases
13661 (replace 'install
13662 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13663 (propagated-inputs
13664 (list java-guice java-sisu-inject-parent-pom))
13665 (inputs
13666 (list java-guice-servlet
13667 java-javax-inject
13668 java-javaee-servletapi
13669 java-junit
13670 java-slf4j-api
13671 java-jsr305
13672 java-jsr250
13673 java-cdi-api
13674 java-osgi-framework
13675 java-osgi-util-tracker
13676 java-testng))
13677 (home-page "https://www.eclipse.org/sisu/")
13678 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13679 (description "Sisu is a modular JSR330-based container that supports
13680classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13681Google-Guice to perform dependency injection and provide the core JSR330
13682support, but removes the need to write explicit bindings in Guice modules.
13683Integration with other containers via the Eclipse Extension Registry and the
13684OSGi Service Registry is a goal of this project.")
13685 (license license:epl1.0)))
13686
13687(define java-sisu-inject-parent-pom
13688 (package
13689 (inherit java-eclipse-sisu-inject)
13690 (name "java-sisu-inject-parent-pom")
13691 (arguments
13692 `(#:tests? #f
13693 #:phases
13694 (modify-phases %standard-phases
13695 (delete 'configure)
13696 (delete 'build)
13697 (replace 'install
13698 (install-pom-file "pom.xml")))))
13699 (propagated-inputs '())))
13700
13701(define-public java-eclipse-sisu-plexus
13702 (package
13703 (name "java-eclipse-sisu-plexus")
13704 (version "0.3.5")
13705 (source (origin
13706 (method git-fetch)
13707 (uri (git-reference
13708 (url "https://github.com/eclipse/sisu.plexus")
13709 (commit (string-append "releases/" version))))
13710 (file-name (git-file-name name version))
13711 (sha256
13712 (base32
13713 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13714 (modules '((guix build utils)))
13715 (snippet
13716 '(begin
13717 (for-each delete-file (find-files "." ".*.jar"))
13718 (rename-file "org.eclipse.sisu.plexus.tests/src"
13719 "org.eclipse.sisu.plexus.tests/java")
13720 #t))))
13721 (build-system ant-build-system)
13722 (arguments
13723 `(#:jar-name "eclipse-sisu-plexus.jar"
13724 #:source-dir "org.eclipse.sisu.plexus/src"
13725 #:test-dir "org.eclipse.sisu.plexus.tests"
13726 #:test-exclude
13727 (list
13728 ;; This test fails probably because we can't generate the necessary
13729 ;; meta-inf files.
13730 "**/PlexusLoggingTest.*"
13731 ;; FIXME: This test fails because of some injection error
13732 "**/PlexusRequirementTest.*")
13733 #:jdk ,icedtea-8
13734 #:phases
13735 (modify-phases %standard-phases
13736 (add-before 'build 'copy-resources
13737 (lambda _
13738 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13739 "build/classes/META-INF/plexus")
13740 #t))
13741 (add-before 'check 'build-test-jar
13742 (lambda _
13743 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13744 (mkdir "build")
13745 (with-directory-excursion "java"
13746 (apply invoke "javac" "-cp"
13747 (string-append (getenv "CLASSPATH")
13748 ":../../../../../build/classes")
13749 (find-files "." ".*.java"))
13750 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13751 (find-files "." ".*.jar")))
13752 (mkdir-p "build/META-INF/plexus")
13753 (copy-file "resources/META-INF/plexus/components.xml"
13754 "build/META-INF/plexus/components.xml")
13755 (with-directory-excursion "build"
13756 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13757 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13758 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13759 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13760 (("resources/component-jar")
13761 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13762 #t))
13763 (replace 'install
13764 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13765 (propagated-inputs
13766 (list java-jsr250
13767 java-plexus-classworlds
13768 java-plexus-utils
13769 java-plexus-component-annotations
13770 java-cdi-api
13771 java-eclipse-sisu-inject
13772 java-sisu-plexus-parent-pom))
13773 (inputs
13774 (list java-osgi-framework
13775 java-slf4j-api
13776 java-javax-inject
13777 java-guice
13778 java-guava
13779 java-aopalliance
13780 java-cglib))
13781 (native-inputs
13782 (list java-junit))
13783 (home-page "https://www.eclipse.org/sisu/")
13784 (synopsis "Plexus support for the sisu container")
13785 (description "Sisu is a modular JSR330-based container that supports
13786classpath scanning, auto-binding, and dynamic auto-wiring. This package
13787adds Plexus support to the Sisu-Inject container.")
13788 (license license:epl1.0)))
13789
13790(define java-sisu-plexus-parent-pom
13791 (package
13792 (inherit java-eclipse-sisu-plexus)
13793 (name "java-sisu-plexus-parent-pom")
13794 (arguments
13795 `(#:tests? #f
13796 #:phases
13797 (modify-phases %standard-phases
13798 (delete 'configure)
13799 (delete 'build)
13800 (replace 'install
13801 (install-pom-file "pom.xml")))))
13802 (propagated-inputs
13803 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13804
13805(define-public java-commons-compiler
13806 (package
13807 (name "java-commons-compiler")
13808 (version "3.0.8")
13809 (source (origin
13810 (method git-fetch)
13811 (uri (git-reference
13812 (url "https://github.com/janino-compiler/janino")
13813 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13814 (file-name (string-append name "-" version))
13815 (sha256
13816 (base32
13817 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13818 (modules '((guix build utils)))
13819 (snippet
13820 '(begin
13821 (for-each delete-file
13822 (find-files "." "\\.jar$"))
13823 #t))))
13824 (build-system ant-build-system)
13825 (arguments
13826 `(#:jar-name "commons-compiler.jar"
13827 #:source-dir "commons-compiler/src/main"
13828 #:tests? #f)); no tests
13829 (home-page "https://github.com/janino-compiler/janino")
13830 (synopsis "Java compiler")
13831 (description "Commons-compiler contains an API for janino, including the
13832@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13833and @code{ISimpleCompiler} interfaces.")
13834 (license license:bsd-3)))
13835
13836(define-public java-janino
13837 (package
13838 (inherit java-commons-compiler)
13839 (name "java-janino")
13840 (arguments
13841 `(#:jar-name "janino.jar"
13842 #:source-dir "src/main/java"
13843 #:phases
13844 (modify-phases %standard-phases
13845 (add-before 'configure 'chdir
13846 (lambda _
13847 (chdir "janino")
13848 #t)))))
13849 (inputs
13850 (list java-commons-compiler))
13851 (native-inputs
13852 (list java-junit java-hamcrest-core))
13853 (description "Janino is a Java compiler. Janino can compile a set of
13854source files to a set of class files like @code{javac}, but also compile a
13855Java expression, block, class body or source file in memory, load the bytecode
13856and execute it directly in the same JVM. @code{janino} can also be used for
13857static code analysis or code manipulation.")))
13858
13859(define-public java-logback-core
13860 (package
13861 (name "java-logback-core")
13862 (version "1.2.3")
13863 (source (origin
13864 (method git-fetch)
13865 (uri (git-reference
13866 (url "https://github.com/qos-ch/logback/")
13867 (commit (string-append "v_" version))))
13868 (file-name (git-file-name name version))
13869 (sha256
13870 (base32
13871 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
13872 (modules '((guix build utils)))
13873 (snippet
13874 '(delete-file-recursively "logback-access/lib"))))
13875 (build-system ant-build-system)
13876 (arguments
13877 `(#:jar-name "logback.jar"
13878 #:source-dir "src/main/java"
13879 #:test-dir "src/test"
13880 #:test-exclude
13881 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13882 ;; which creates FastClasses
13883 (list "**/AllCoreTest.*"
13884 "**/AutoFlushingObjectWriterTest.*"
13885 "**/PackageTest.*"
13886 "**/ResilientOutputStreamTest.*"
13887 ;; And we still don't want to run abstract classes
13888 "**/Abstract*.*")
13889 #:phases
13890 (modify-phases %standard-phases
13891 (add-before 'configure 'chdir
13892 (lambda _ (chdir "logback-core"))))))
13893 (inputs
13894 (list java-javax-mail
13895 java-javaee-servletapi
13896 java-commons-compiler
13897 java-janino))
13898 (native-inputs
13899 (list java-junit
13900 java-hamcrest-core
13901 java-mockito-1
13902 java-cglib
13903 java-objenesis
13904 java-joda-time))
13905 (home-page "https://logback.qos.ch")
13906 (synopsis "Logging for java")
13907 (description "Logback is intended as a successor to the popular log4j project.
13908This module lays the groundwork for the other two modules.")
13909 ;; Either epl1.0 or lgpl2.1
13910 (license (list license:epl1.0
13911 license:lgpl2.1))))
13912
13913(define-public java-logback-classic
13914 (package
13915 (inherit java-logback-core)
13916 (name "java-logback-classic")
13917 (arguments
13918 `(#:jar-name "logback-classic.jar"
13919 #:source-dir "src/main/java"
13920 #:test-dir "src/test"
13921 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13922 #:jdk ,icedtea-8
13923 #:phases
13924 (modify-phases %standard-phases
13925 (add-before 'configure 'chdir
13926 (lambda _
13927 (chdir "logback-classic")
13928 #t))
13929 (replace 'build
13930 (lambda* (#:key inputs #:allow-other-keys)
13931 (mkdir-p "build/classes")
13932 (setenv "CLASSPATH"
13933 (string-join
13934 (apply append (map (lambda (input)
13935 (find-files (assoc-ref inputs input)
13936 ".*.jar"))
13937 '("java-logback-core" "java-slf4j-api"
13938 "java-commons-compiler" "java-javaee-servletapi"
13939 "groovy")))
13940 ":"))
13941 (apply invoke "groovyc" "-d" "build/classes" "-j"
13942 (find-files "src/main/" ".*\\.(groovy|java)$"))
13943 (invoke "ant" "jar")
13944 #t)))))
13945 (inputs
13946 (modify-inputs (package-inputs java-logback-core)
13947 (prepend java-logback-core java-slf4j-api)))
13948 (native-inputs
13949 (list groovy))
13950 (description "Logback is intended as a successor to the popular log4j project.
13951This module can be assimilated to a significantly improved version of log4j.
13952Moreover, @code{logback-classic} natively implements the slf4j API so that you
13953can readily switch back and forth between logback and other logging frameworks
13954such as log4j or @code{java.util.logging} (JUL).")))
13955
13956(define-public java-jgit
13957 (package
13958 (name "java-jgit")
13959 (version "4.7.0.201704051617-r")
13960 (source (origin
13961 (method url-fetch)
13962 (uri (string-append "https://repo1.maven.org/maven2/"
13963 "org/eclipse/jgit/org.eclipse.jgit/"
13964 version "/org.eclipse.jgit-"
13965 version "-sources.jar"))
13966 (sha256
13967 (base32
13968 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13969 (build-system ant-build-system)
13970 (arguments
13971 `(#:tests? #f ; There are no tests to run.
13972 #:jar-name "jgit.jar"
13973 ;; JGit must be built with a JDK supporting Java 8.
13974 #:jdk ,icedtea-8
13975 ;; Target our older default JDK.
13976 #:make-flags (list "-Dtarget=1.7")
13977 #:phases
13978 (modify-phases %standard-phases
13979 ;; The jar file generated by the default build.xml does not include
13980 ;; the text properties files, so we need to add them.
13981 (add-after 'build 'add-properties
13982 (lambda* (#:key jar-name #:allow-other-keys)
13983 (with-directory-excursion "src"
13984 (apply invoke "jar" "-uf"
13985 (string-append "../build/jar/" jar-name)
13986 (find-files "." "\\.properties$")))
13987 #t)))))
13988 (inputs
13989 (list java-classpathx-servletapi java-javaewah java-jsch
13990 java-slf4j-api))
13991 (home-page "https://eclipse.org/jgit/")
13992 (synopsis "Java library implementing the Git version control system")
13993 (description "JGit is a lightweight, pure Java library implementing the
13994Git version control system, providing repository access routines, support for
13995network protocols, and core version control algorithms.")
13996 (license license:edl1.0)))
13997
13998;; For axoloti.
13999(define-public java-jgit-4.2
14000 (package (inherit java-jgit)
14001 (version "4.2.0.201601211800-r")
14002 (source (origin
14003 (method url-fetch)
14004 (uri (string-append "https://repo1.maven.org/maven2/"
14005 "org/eclipse/jgit/org.eclipse.jgit/"
14006 version "/org.eclipse.jgit-"
14007 version "-sources.jar"))
14008 (sha256
14009 (base32
14010 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
14011 (build-system ant-build-system)
14012 (arguments
14013 (substitute-keyword-arguments (package-arguments java-jgit)
14014 ((#:phases phases)
14015 `(modify-phases ,phases
14016 (add-after 'unpack 'use-latest-javaewah-API
14017 (lambda _
14018 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
14019 (("wordinbits") "WORD_IN_BITS"))))))))
14020 (inputs
14021 (list java-javaewah java-jsch java-slf4j-api))))
14022
14023(define-public abcl
14024 (package
14025 (name "abcl")
14026 (version "1.9.3")
14027 (source
14028 (origin
14029 (method url-fetch)
14030 (uri (string-append "https://abcl.org/releases/"
14031 version "/abcl-src-" version ".tar.gz"))
14032 (sha256
14033 (base32
14034 "1zxjpwv98bq2yd5qg08sbkajj17m7b8xmzqhw296161s7lia215v"))
14035 (patches
14036 (search-patches
14037 "abcl-fix-build-xml.patch"))))
14038 (build-system ant-build-system)
14039 (native-inputs
14040 (list java-junit))
14041 (arguments
14042 `(#:build-target "abcl.jar"
14043 #:test-target "abcl.test"
14044 #:phases
14045 (modify-phases %standard-phases
14046 (replace 'install
14047 (lambda* (#:key outputs #:allow-other-keys)
14048 (let ((share (string-append (assoc-ref outputs "out")
14049 "/share/java/"))
14050 (bin (string-append (assoc-ref outputs "out")
14051 "/bin/")))
14052 (mkdir-p share)
14053 (install-file "dist/abcl.jar" share)
14054 (install-file "dist/abcl-contrib.jar" share)
14055 (mkdir-p bin)
14056 (with-output-to-file (string-append bin "abcl")
14057 (lambda _
14058 (let ((classpath (string-append
14059 share "abcl.jar"
14060 ":"
14061 share "abcl-contrib.jar")))
14062 (display (string-append
14063 "#!" (which "bash") "\n"
14064 "if [[ -z $CLASSPATH ]]; then\n"
14065 " cp=\"" classpath "\"\n"
14066 "else\n"
14067 " cp=\"" classpath ":$CLASSPATH\"\n"
14068 "fi\n"
14069 "exec " (which "java")
14070 " -cp \"$cp\" org.armedbear.lisp.Main \"$@\"\n")))))
14071 (chmod (string-append bin "abcl") #o755)
14072 #t))))))
14073 (home-page "https://abcl.org/")
14074 (synopsis "Common Lisp Implementation on the JVM")
14075 (description
14076 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
14077Lisp language featuring both an interpreter and a compiler, running in the
14078JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
14079in any Java application. Additionally, it can be used to implement (parts of)
14080the application using Java to Lisp integration APIs.")
14081 (native-search-paths
14082 (list (search-path-specification
14083 (variable "XDG_DATA_DIRS")
14084 (files '("share")))))
14085 (license (list license:gpl2+
14086 ;; named-readtables is released under 3 clause BSD
14087 license:bsd-3
14088 ;; jfli is released under CPL 1.0
14089 license:cpl1.0))))
14090
14091(define-public java-jsonp-api
14092 (package
14093 (name "java-jsonp-api")
14094 (version "1.1.6")
14095 (source (origin
14096 (method git-fetch)
14097 (uri (git-reference
14098 (url "https://github.com/eclipse-ee4j/jsonp")
14099 (commit (string-append "1.1-" version "-RELEASE"))))
14100 (file-name (git-file-name name version))
14101 (sha256
14102 (base32
14103 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
14104 (build-system ant-build-system)
14105 (arguments
14106 `(#:jar-name "jsonp-api.jar"
14107 #:tests? #f
14108 #:source-dir "api/src/main/java"
14109 #:test-dir "api/src/test"))
14110 (home-page "https://eclipse-ee4j.github.io/jsonp/")
14111 (synopsis "JSON Processing in Java")
14112 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14113parse, generate, transform and query) JSON messages. It produces and
14114consumes JSON text in a streaming fashion (similar to StAX API for XML)
14115and allows building a Java object model for JSON text using API classes
14116(similar to DOM API for XML).")
14117 ;; either gpl2 only with classpath exception, or epl2.0.
14118 (license (list license:gpl2
14119 license:epl2.0))))
14120
14121(define-public java-jsonp-impl
14122 (package
14123 (inherit java-jsonp-api)
14124 (name "java-jsonp-impl")
14125 (arguments
14126 `(#:jar-name "jsonp-impl.jar"
14127 #:tests? #f
14128 #:source-dir "impl/src/main/java"
14129 #:test-dir "impl/src/test"
14130 #:phases
14131 (modify-phases %standard-phases
14132 (add-before 'build 'copy-resources
14133 (lambda _
14134 (copy-recursively
14135 "impl/src/main/resources/"
14136 "build/classes")
14137 #t)))))
14138 (propagated-inputs
14139 (list java-jsonp-api))
14140 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14141parse, generate, transform and query) JSON messages. This package contains
14142a reference implementation of that API.")))
14143
14144(define-public java-jakarta-json
14145 (package
14146 (name "java-jakarta-json")
14147 (version "2.1.3")
14148 (source (origin
14149 (method git-fetch)
14150 (uri (git-reference
14151 (url "https://github.com/jakartaee/jsonp-api")
14152 (commit (string-append version "-RELEASE"))))
14153 (file-name (git-file-name name version))
14154 (sha256
14155 (base32
14156 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
14157 (build-system ant-build-system)
14158 (arguments
14159 `(#:jar-name "jakarta-json.jar"
14160 #:source-dir "api/src/main/java"
14161 #:tests? #f; no tests
14162 #:jdk ,openjdk11))
14163 (home-page "https://github.com/jakartaee/jsonp-api")
14164 (synopsis "Portable API for JSON handling in Java")
14165 (description "This project contains API and Compatible Implementation of
14166Jakarta JSON Processing specification. Jakarta JSON Processing provides
14167portable APIs to parse, generate, transform, and query JSON documents.")
14168 ;; with classpath exception
14169 (license license:epl2.0)))
14170
14171(define-public java-parsson
14172 (package
14173 (name "java-parsson")
14174 (version "1.1.5")
14175 (source (origin
14176 (method git-fetch)
14177 (uri (git-reference
14178 (url "https://github.com/eclipse-ee4j/parsson")
14179 (commit version)))
14180 (file-name (git-file-name name version))
14181 (sha256
14182 (base32
14183 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
14184 (build-system ant-build-system)
14185 (arguments
14186 `(#:jar-name "parsson.jar"
14187 #:source-dir "impl/src/main/java"
14188 #:test-dir "impl/src/test"
14189 #:use-java-modules? #t
14190 #:jdk ,openjdk11
14191 #:phases
14192 (modify-phases %standard-phases
14193 (add-after 'unpack 'copy-resources
14194 (lambda _
14195 (copy-recursively "impl/src/main/resources"
14196 "build/classes"))))))
14197 (inputs
14198 (list java-jakarta-json))
14199 (native-inputs
14200 (list java-junit))
14201 (home-page "https://github.com/eclipse-ee4j/parsson")
14202 (synopsis "Implementation of Jakarta JSON API")
14203 (description "Eclipse Parsson is an implementation of the Jakarta JSON
14204Processing specification.")
14205 ;; with classpath exception
14206 (license license:epl2.0)))
14207
14208(define-public java-jakarta-activation-api
14209 (package
14210 (name "java-jakarta-activation-api")
14211 (version "2.1.4")
14212 (source (origin
14213 (method git-fetch)
14214 (uri (git-reference
14215 (url "https://github.com/jakartaee/jaf-api")
14216 (commit version)))
14217 (file-name (git-file-name name version))
14218 (sha256
14219 (base32
14220 "125bf475cb0mdyhn1lj3c8gbwngbd28x10vnknq86zrc1vq4m6gx"))))
14221 (build-system ant-build-system)
14222 (arguments
14223 `(#:jar-name "jakarta-activation-api.jar"
14224 #:source-dir "api/src/main/java"
14225 #:tests? #f ;; has no tests
14226 #:jdk ,openjdk11))
14227 (home-page "https://github.com/jakartaee/jaf-api")
14228 (synopsis "Collection of Java activation")
14229 (description "Jakarta Activation lets you take advantage of standard
14230services to: determine the type of arbitrary piece of data; encapsulate access
14231to it; discover the operations available on it; and instantiate the
14232appropriate bean to perform the operation(s).")
14233 (license license:bsd-3)))
14234
14235(define-public java-jakarta-annotations-api
14236 (package
14237 (name "java-jakarta-annotations-api")
14238 (version "2.1.1")
14239 (source (origin
14240 (method git-fetch)
14241 (uri (git-reference
14242 (url "https://github.com/jakartaee/common-annotations-api")
14243 (commit version)))
14244 (file-name (git-file-name name version))
14245 (sha256
14246 (base32
14247 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
14248 (build-system ant-build-system)
14249 (arguments
14250 `(#:jar-name "jakarta-annotations-api.jar"
14251 #:source-dir "api/src/main/java"
14252 #:tests? #f; no tests
14253 #:jdk ,openjdk11))
14254 (home-page "https://github.com/jakartaee/common-annotations-api")
14255 (synopsis "Collection of Java annotations")
14256 (description "Jakarta Annotations defines a collection of annotations
14257representing common semantic concepts that enable a declarative style of
14258programming that applies across a variety of Java technologies.")
14259 ;; with classpath exception
14260 (license (list license:epl2.0
14261 license:gpl2))))
14262
14263(define-public java-xmp
14264 (package
14265 (name "java-xmp")
14266 (version "5.1.3")
14267 (source (origin
14268 (method url-fetch)
14269 (uri (string-append "http://download.macromedia.com/pub/developer"
14270 "/xmp/sdk/XMPCoreJava-" version ".zip"))
14271 (sha256
14272 (base32
14273 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
14274 (build-system ant-build-system)
14275 (arguments
14276 `(#:build-target "build"
14277 #:tests? #f; no tests
14278 #:phases
14279 (modify-phases %standard-phases
14280 (add-after 'unpack 'chdir
14281 (lambda _
14282 (chdir "XMPCore")
14283 #t))
14284 (add-before 'build 'fix-timestamp
14285 (lambda _
14286 (substitute* "build.xml"
14287 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
14288 #t))
14289 (replace 'install
14290 (install-jars "."))
14291 (add-after 'install 'install-doc
14292 (lambda* (#:key outputs #:allow-other-keys)
14293 (copy-recursively
14294 "docs"
14295 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
14296 #t)))))
14297 (native-inputs
14298 (list unzip))
14299 (home-page "https://www.adobe.com/devnet/xmp.html")
14300 (synopsis "Extensible Metadat Platform (XMP) support in Java")
14301 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
14302technology that allows you to embed data about a file, known as metadata,
14303into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
14304library and the API is similar.")
14305 (license license:bsd-3)))
14306
14307(define-public java-args4j
14308 (package
14309 (name "java-args4j")
14310 (version "2.33")
14311 (source (origin
14312 (method git-fetch)
14313 (uri (git-reference
14314 (url "https://github.com/kohsuke/args4j")
14315 (commit (string-append "args4j-site-" version))))
14316 (file-name (git-file-name name version))
14317 (sha256
14318 (base32
14319 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
14320 (build-system ant-build-system)
14321 (arguments
14322 `(#:jar-name "args4j.jar"
14323 #:source-dir "args4j/src"
14324 #:test-dir "args4j/test"
14325 #:test-exclude
14326 (list "**/ExampleTest.*"
14327 "**/ExternalConfiguredTest.*" ; fails to find a file
14328 ;; We still don't want to run abstract classes
14329 "**/Abstract*.*")
14330 #:phases
14331 (modify-phases %standard-phases
14332 (add-before 'check 'fix-test-dir
14333 (lambda _
14334 (substitute* "build.xml"
14335 (("/java\">") "\">"))
14336 #t))
14337 (add-before 'build 'copy-resources
14338 (lambda _
14339 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
14340 (to-prefix "build/classes/org/kohsuke/args4j/"))
14341 (for-each (lambda (f)
14342 (install-file
14343 (string-append from-prefix f)
14344 (string-append to-prefix (dirname f))))
14345 (list "Messages.properties"
14346 "Messages_de.properties"
14347 "Messages_en.properties"
14348 "Messages_ru.properties"
14349 "spi/Messages.properties"
14350 "spi/Messages_de.properties"
14351 "spi/Messages_en.properties"
14352 "spi/Messages_ru.properties")))
14353 #t)))))
14354 (native-inputs
14355 (list java-junit))
14356 (home-page "https://args4j.kohsuke.org/")
14357 (synopsis "Command line parser library")
14358 (description "Args4j is a small Java class library that makes it easy to
14359parse command line options/arguments in your CUI application.")
14360 (license license:expat)))
14361
14362(define-public java-argparse4j
14363 (package
14364 (name "java-argparse4j")
14365 (version "0.9.0")
14366 (source (origin
14367 (method git-fetch)
14368 (uri (git-reference
14369 (url "https://github.com/argparse4j/argparse4j")
14370 (commit (string-append "argparse4j-" version))))
14371 (file-name (git-file-name name version))
14372 (sha256
14373 (base32
14374 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
14375 (build-system ant-build-system)
14376 (arguments
14377 (list #:jar-name "java-argparse4j.jar"
14378 #:source-dir "main/src/main/"
14379 #:test-dir "main/src/test/"
14380 #:jdk openjdk11
14381 #:phases #~(modify-phases %standard-phases
14382 (add-after 'unpack 'copy-resources
14383 (lambda _
14384 (copy-recursively "main/src/test/resources"
14385 "target/test-classes")
14386 (copy-recursively "main/src/main/resources"
14387 "build/classes")))
14388 (replace 'install
14389 (install-from-pom "pom.xml")))))
14390 (inputs (list java-junit))
14391 (home-page "https://argparse4j.github.io/")
14392 (synopsis "Java command-line argument parser library")
14393 (description "Argparse4j is a command line argument parser library for
14394Java based on Python's @code{argparse} module.")
14395 (license license:expat)))
14396
14397(define-public java-metadata-extractor
14398 (package
14399 (name "java-metadata-extractor")
14400 (version "2.19.0")
14401 (source (origin
14402 (method git-fetch)
14403 (uri (git-reference
14404 (url "https://github.com/drewnoakes/metadata-extractor")
14405 (commit version)))
14406 (file-name (git-file-name name version))
14407 (sha256
14408 (base32
14409 "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna"))))
14410 (build-system ant-build-system)
14411 (arguments
14412 `(#:jar-name "metadata-extractor.jar"
14413 #:source-dir "Source"
14414 #:test-dir "Tests"
14415 #:phases
14416 (modify-phases %standard-phases
14417 (add-before 'build 'fix-xmp-path
14418 (lambda _
14419 ;; This version of metadata-extractor depends on java-xmp 6, which
14420 ;; is non-free. These changes allow using java-xmp 5, which is
14421 ;; the last free-software version of java-xmp.
14422 (substitute* (find-files "." ".*.java")
14423 (("com.adobe.internal.xmp") "com.adobe.xmp"))
14424 (substitute* "Source/com/drew/metadata/xmp/XmpReader.java"
14425 (("\\.setXMPNodesToLimit.*") ";"))
14426 ;; Test failure, most likely because we use a different java-xmp
14427 ;; version.
14428 (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java")))
14429 (add-before 'check 'fix-test-dir
14430 (lambda _
14431 (substitute* "build.xml"
14432 (("/java\">") "\">"))
14433 #t)))))
14434 (propagated-inputs
14435 (list java-xmp))
14436 (native-inputs
14437 (list java-hamcrest-core java-junit))
14438 (home-page "https://github.com/drewnoakes/metadata-extractor")
14439 (synopsis "Extract metadata from image and video files")
14440 (description "Metadata-extractor is a straightforward Java library for
14441reading metadata from image files. It is able to read metadata in Exif,
14442IPTC, XMP, ICC and more formats.")
14443 (license license:asl2.0)))
14444
14445(define-public java-svg-salamander
14446 (package
14447 (name "java-svg-salamander")
14448 (version "1.1.2")
14449 (source (origin
14450 (method git-fetch)
14451 (uri (git-reference
14452 (url "https://github.com/blackears/svgSalamander")
14453 (commit (string-append "v" version))))
14454 (file-name (git-file-name name version))
14455 (sha256
14456 (base32
14457 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
14458 (modules '((guix build utils)))
14459 (snippet
14460 '(begin
14461 (for-each delete-file (find-files "." ".*.jar"))
14462 #t))
14463 (patches
14464 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
14465 (build-system ant-build-system)
14466 (arguments
14467 `(#:tests? #f; no tests
14468 #:phases
14469 (modify-phases %standard-phases
14470 (add-after 'unpack 'chdir
14471 (lambda _
14472 (chdir "svg-core")
14473 #t))
14474 (add-before 'build 'copy-jars
14475 (lambda* (#:key inputs #:allow-other-keys)
14476 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
14477 "../libraries/javacc.jar")
14478 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
14479 "../libraries/ant.jar")
14480 #t))
14481 (replace 'install
14482 (install-jars "dist")))))
14483 (native-inputs
14484 (list javacc))
14485 (home-page "https://github.com/blackears/svgSalamander")
14486 (synopsis "SVG engine for Java")
14487 (description "SVG Salamander is an SVG engine for Java that's designed
14488to be small, fast, and allow programmers to use it with a minimum of fuss.
14489It's in particular targeted for making it easy to integrate SVG into Java
14490games and making it much easier for artists to design 2D game content - from
14491rich interactive menus to charts and graphcs to complex animations.")
14492 (license license:bsd-2)))
14493
14494(define-public java-jboss-transaction-api-spec
14495 (package
14496 (name "java-jboss-transaction-api-spec")
14497 (version "1.2+1.1.1")
14498 (source (origin
14499 (method git-fetch)
14500 (uri (git-reference
14501 (url "https://github.com/jboss/jboss-transaction-api_spec")
14502 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
14503 (file-name (git-file-name name version))
14504 (sha256
14505 (base32
14506 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
14507 (build-system ant-build-system)
14508 (arguments
14509 `(#:jar-name "java-jboss-transaction-api_spec.jar"
14510 #:source-dir "src/main/java"
14511 #:tests? #f)); no tests
14512 (inputs
14513 (list java-cdi-api java-jboss-interceptors-api-spec))
14514 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
14515 (synopsis "Generic transaction management API in Java")
14516 (description "Java-jboss-transaction-api-spec implements the Transactions
14517API. A transaction is a unit of work containing one or more operations
14518involving one or more shared resources having ACID (Atomicity, Consistency,
14519Isolation and Durability) properties.")
14520 ;; either gpl2 only with classpath exception or cddl.
14521 (license (list license:gpl2 license:cddl1.0))))
14522
14523(define-public java-picocli
14524 (package
14525 (name "java-picocli")
14526 (version "4.3.2")
14527 (source (origin
14528 (method git-fetch)
14529 (uri (git-reference
14530 (url "https://github.com/remkop/picocli")
14531 (commit (string-append "v" version))))
14532 (file-name (git-file-name name version))
14533 (sha256
14534 (base32
14535 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
14536 (build-system ant-build-system)
14537 (arguments
14538 `(#:jar-name "picocli.jar"
14539 #:source-dir "src/main/java"
14540 ;; Tests require missing dependencies (junitparams, system-rules)
14541 #:tests? #f))
14542 (home-page "https://picocli.info")
14543 (synopsis "REPL for the JVM")
14544 (description "Picocli is a framework for building command line applications
14545for the JVM. It supports colors, autocompletion, subcommands, and more. Written
14546in Java, usable from Groovy, Kotlin, Scala, etc.")
14547 (license license:asl2.0)))
14548
14549(define-public java-pj
14550 (package
14551 (name "java-pj")
14552 (version "20150107")
14553 (source (origin
14554 (method url-fetch)
14555 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
14556 version ".jar"))
14557 (sha256
14558 (base32
14559 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
14560 (modules '((guix build utils)))
14561 (snippet
14562 '(for-each delete-file
14563 (find-files "." "\\.class$")))))
14564 (build-system ant-build-system)
14565 (arguments
14566 (list
14567 #:tests? #false ;there are none
14568 #:phases
14569 #~(modify-phases %standard-phases
14570 (add-after 'unpack 'chdir
14571 (lambda _ (chdir "src/pj")))
14572 (add-after 'chdir 'patch-source-directory
14573 (lambda _
14574 (substitute* "compile"
14575 (("SRCDIR1=/home/ark/public_html/pj/lib")
14576 (string-append "SRCDIR1=" (getcwd) "/lib")))))
14577 (replace 'build
14578 (lambda _
14579 (invoke "bash" "./compile" "linux")
14580 (with-directory-excursion "lib"
14581 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
14582 (find-files "." "\\.class$")))))
14583 (replace 'install (install-jars ".")))))
14584 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
14585 (synopsis "Parallel programming in Java")
14586 (description "Parallel Java (PJ) is an API and middleware for parallel
14587programming in 100% Java on shared memory multiprocessor (SMP) parallel
14588computers, cluster parallel computers, and hybrid SMP cluster parallel
14589computers.")
14590 (license license:gpl3+)))
14591
14592(define-public java-jetbrains-annotations
14593 (package
14594 (name "java-jetbrains-annotations")
14595 (version "19.0.0")
14596 (source (origin
14597 (method git-fetch)
14598 (uri (git-reference
14599 (url "https://github.com/JetBrains/java-annotations")
14600 (commit version)))
14601 (file-name (git-file-name name version))
14602 (sha256
14603 (base32
14604 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
14605 (build-system ant-build-system)
14606 (arguments
14607 `(#:jar-name "jetbrains-annotations.jar"
14608 #:source-dir "common/src/main/java:java8/src/main/java"
14609 #:tests? #f)); no tests
14610 (home-page "https://github.com/JetBrains/java-annotations")
14611 (synopsis "Annotations for Java and other JVM languages")
14612 (description "This package contains a set of Java annotations which can be
14613used in JVM-based languages. They serve as an additional documentation and
14614can be interpreted by IDEs and static analysis tools to improve code analysis.")
14615 (license license:expat)))
14616
14617(define-public java-javaparser
14618 (package
14619 (name "java-javaparser")
14620 (version "3.16.1")
14621 (source (origin
14622 (method git-fetch)
14623 (uri (git-reference
14624 (url "https://github.com/javaparser/javaparser")
14625 (commit (string-append "javaparser-parent-" version))))
14626 (file-name (git-file-name name version))
14627 (sha256
14628 (base32
14629 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
14630 (modules '((guix build utils)))
14631 (snippet
14632 '(begin
14633 (for-each delete-file
14634 (find-files "." "\\.jar$"))
14635 #t))))
14636 (build-system ant-build-system)
14637 (arguments
14638 `(#:tests? #f; tests require jbehave and junit5
14639 #:phases
14640 (modify-phases %standard-phases
14641 (add-before 'build 'fill-template
14642 (lambda _
14643 (with-directory-excursion "javaparser-core/src/main"
14644 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
14645 "java/com/github/javaparser/JavaParserBuild.java")
14646 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
14647 (("\\$\\{project.version\\}") ,version)
14648 (("\\$\\{project.name\\}") "javaparser")
14649 (("\\$\\{project.build.finalName\\}") "javaparser")
14650 (("\\$\\{maven.version\\}") "fake")
14651 (("\\$\\{maven.build.version\\}") "fake")
14652 (("\\$\\{build.timestamp\\}") "0")
14653 (("\\$\\{java.vendor\\}") "Guix")
14654 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
14655 (("\\$\\{java.version\\}") "1.8")
14656 (("\\$\\{os.arch\\}") "any")
14657 (("\\$\\{os.name\\}") "Guix")
14658 (("\\$\\{os.version\\}") "not available")))
14659 #t))
14660 (add-before 'build 'generate-javacc
14661 (lambda _
14662 (with-directory-excursion "javaparser-core/src/main/java"
14663 (invoke "java" "javacc" "../javacc/java.jj"))
14664 #t))
14665 (add-before 'build 'copy-javacc-support
14666 (lambda _
14667 (with-directory-excursion "javaparser-core/src/main"
14668 (copy-recursively "javacc-support" "java"))
14669 #t))
14670 (replace 'build
14671 (lambda _
14672 (define (build name)
14673 (format #t "Building ~a~%" name)
14674 (delete-file-recursively "build/classes")
14675 (mkdir-p "build/classes")
14676 (apply invoke "javac"
14677 "-cp" (string-append (getenv "CLASSPATH") ":"
14678 (string-join (find-files "build/jar" ".")
14679 ":"))
14680 "-d" "build/classes"
14681 (find-files (string-append name "/src/main/java")
14682 ".*.java"))
14683 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
14684 "-C" "build/classes" "."))
14685 (mkdir-p "build/classes")
14686 (mkdir-p "build/test-classes")
14687 (mkdir-p "build/jar")
14688 (build "javaparser-core")
14689 (build "javaparser-core-serialization")
14690 (build "javaparser-core-generators")
14691 (build "javaparser-core-metamodel-generator")
14692 (build "javaparser-symbol-solver-core")
14693 #t))
14694 (replace 'install
14695 (install-jars "build/jar")))))
14696 (inputs
14697 (list java-guava java-jboss-javassist java-jsonp-api))
14698 (native-inputs
14699 (list javacc))
14700 (home-page "https://javaparser.org/")
14701 (synopsis "Parser for Java")
14702 (description
14703 "This project contains a set of libraries implementing a Java 1.0 - Java
1470411 Parser with advanced analysis functionalities.")
14705 (license (list
14706 ;; either lgpl or asl
14707 license:lgpl3+
14708 license:asl2.0))))
14709
14710(define-public tla2tools
14711 ;; This package was originally based on the "v1.8.0" tag, but that merely
14712 ;; points to the moving master branch. That might be because the ‘latest
14713 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
14714 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
14715 (let* ((release "1.7.1")
14716 (revision "0")
14717 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
14718 (package
14719 (name "tla2tools")
14720 (version (git-version release revision commit))
14721 (source (origin
14722 (method git-fetch)
14723 (uri (git-reference
14724 (url "https://github.com/tlaplus/tlaplus")
14725 (commit commit)))
14726 (file-name (git-file-name name version))
14727 (sha256
14728 (base32
14729 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
14730 (patches
14731 (search-patches "tla2tools-build-xml.patch"))
14732 (modules '((guix build utils)))
14733 (snippet
14734 '(begin
14735 ;; Remove packaged libraries (see 'replace-libs below)
14736 (for-each delete-file (find-files "." ".*.jar$"))))))
14737 (build-system ant-build-system)
14738 (arguments
14739 (let* ((tlatools "tlatools/org.lamport.tlatools/")
14740 (build-xml (string-append tlatools "customBuild.xml")))
14741 `(#:jdk ,openjdk11
14742 #:modules ((guix build ant-build-system)
14743 (guix build utils)
14744 (ice-9 match)
14745 (srfi srfi-26))
14746 #:make-flags '("-f" ,build-xml)
14747 #:phases
14748 (modify-phases %standard-phases
14749 ;; Replace packed libs with references to jars in store
14750 (add-after 'unpack 'replace-libs
14751 (lambda* (#:key inputs #:allow-other-keys)
14752 (define (input-jar input)
14753 (car (find-files (assoc-ref inputs input) "\\.jar$")))
14754 (for-each
14755 (match-lambda
14756 ((file . input)
14757 (symlink (input-jar input)
14758 (string-append ,tlatools "/lib/" file))))
14759 '(("gson/gson-2.8.6.jar" . "java-gson")
14760 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
14761 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
14762 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
14763 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
14764 "java-eclipse-lsp4j-debug")
14765 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
14766 "java-eclipse-lsp4j-jsonrpc")
14767 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
14768 "java-eclipse-lsp4j-jsonrpc-debug")
14769 ("junit-4.12.jar" . "java-junit")
14770 ("easymock-3.3.1.jar" . "java-easymock")))
14771 ;; Retain a tiny subset of the original X-Git-*
14772 ;; manifest values just to aid in debugging.
14773 (substitute* ,build-xml
14774 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
14775 (add-before 'check 'prepare-tests
14776 (lambda _
14777 ;; The pcal tests write to .cfg files.
14778 (for-each (cut chmod <> #o644)
14779 (find-files (string-append ,tlatools
14780 "/test-model/pcal")
14781 "\\.cfg$"))))
14782 (replace 'install
14783 (lambda* (#:key inputs outputs #:allow-other-keys)
14784 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
14785 (jar-name "tla2tools.jar"); set in project.properties
14786 (jar (string-append ,tlatools
14787 "/dist/" jar-name))
14788 (java-cp (string-append share "/" jar-name))
14789 (bin (string-append (assoc-ref outputs "out") "/bin"))
14790 (java (search-input-file inputs "/bin/java")))
14791 (install-file jar share)
14792 (mkdir-p bin)
14793 ;; Generate wrapper scripts for bin/, which invoke common
14794 ;; commands within tla2tools.jar. Users can still invoke
14795 ;; tla2tools.jar for the rest.
14796 (for-each
14797 (match-lambda
14798 ((wrapper . class)
14799 (let ((file (string-append bin "/" wrapper)))
14800 (begin
14801 (with-output-to-file file
14802 (lambda _
14803 (display
14804 (string-append
14805 "#!/bin/sh\n"
14806 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
14807 (chmod file #o755)))))
14808 ;; bin/wrapper . java-class
14809 '(("pcal" . "pcal.trans")
14810 ("tlatex" . "tla2tex.TLA")
14811 ("tla2sany" . "tla2sany.SANY")
14812 ("tlc2" . "tlc2.TLC")
14813 ("tlc2-repl" . "tlc2.REPL"))))))))))
14814 (native-inputs
14815 (list java-junit java-easymock))
14816 (inputs
14817 (list java-javax-mail
14818 java-gson-2.8.6
14819 java-jline-terminal
14820 java-jline-reader
14821 java-eclipse-lsp4j-jsonrpc
14822 java-eclipse-lsp4j-jsonrpc-debug
14823 java-eclipse-lsp4j-debug))
14824 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14825 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14826 (description "TLA+ is a high-level language for modeling programs and
14827systems---especially concurrent and distributed ones. It's based on the idea
14828that the best way to describe things precisely is with simple
14829mathematics. TLA+ and its tools are useful for eliminating fundamental design
14830errors, which are hard to find and expensive to correct in code.
14831
14832The following TLA+ tools are available in this distribution:
14833
14834@itemize
14835@item The Syntactic Analyzer: A parser and syntax checker for
14836 TLA+ specifications;
14837@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14838 specifications;
14839@item TLATeX: A program for typesetting TLA+ specifications;
14840@item Beta test versions of 1-3 for the TLA+2 language; and
14841@item The PlusCal translator.
14842@end itemize")
14843 (license license:expat))))
14844
14845;;;
14846;;; Avoid adding new packages to the end of this file. To reduce the chances
14847;;; of a merge conflict, place them above by existing packages with similar
14848;;; functionality or similar names.
14849;;;