projects/guix·blob version-1.5.0 · refs

14709 lines · 613.2 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 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 © 2025 Zheng Junjie <[email protected]>
25;;; Copyright © 2025 Julian Flake <[email protected]>
26;;;
27;;; This file is part of GNU Guix.
28;;;
29;;; GNU Guix is free software; you can redistribute it and/or modify it
30;;; under the terms of the GNU General Public License as published by
31;;; the Free Software Foundation; either version 3 of the License, or (at
32;;; your option) any later version.
33;;;
34;;; GNU Guix is distributed in the hope that it will be useful, but
35;;; WITHOUT ANY WARRANTY; without even the implied warranty of
36;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
37;;; GNU General Public License for more details.
38;;;
39;;; You should have received a copy of the GNU General Public License
40;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
41
42(define-module (gnu packages java)
43 #:use-module ((guix licenses) #:prefix license:)
44 #:use-module (guix packages)
45 #:use-module (guix download)
46 #:use-module (guix hg-download)
47 #:use-module (guix git-download)
48 #:use-module (guix svn-download)
49 #:use-module ((guix build utils) #:select (alist-replace))
50 #:use-module (guix utils)
51 #:use-module (guix gexp)
52 #:use-module (guix build-system ant)
53 #:use-module (guix build-system cmake)
54 #:use-module (guix build-system gnu)
55 #:use-module (guix build-system maven)
56 #:use-module (guix build-system python)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages attr)
59 #:use-module (gnu packages autotools)
60 #:use-module (gnu packages base)
61 #:use-module (gnu packages bash)
62 #:use-module (gnu packages nss)
63 #:use-module (gnu packages cpio)
64 #:use-module (gnu packages cups)
65 #:use-module (gnu packages compression)
66 #:use-module (gnu packages elf)
67 #:use-module (gnu packages fontutils)
68 #:use-module (gnu packages freedesktop) ; wayland
69 #:use-module (gnu packages gawk)
70 #:use-module (gnu packages gcc)
71 #:use-module (gnu packages gettext)
72 #:use-module (gnu packages gl)
73 #:use-module (gnu packages ghostscript) ;lcms
74 #:use-module (gnu packages gnome)
75 #:use-module (gnu packages groovy)
76 #:use-module (gnu packages gtk)
77 #:use-module (gnu packages guile)
78 #:use-module (gnu packages icu4c)
79 #:use-module (gnu packages image)
80 #:use-module (gnu packages java-bootstrap)
81 #:use-module (gnu packages java-compression)
82 #:use-module (gnu packages java-xml)
83 #:use-module (gnu packages libffi)
84 #:use-module (gnu packages linux) ;alsa
85 #:use-module (gnu packages maths)
86 #:use-module (gnu packages maven)
87 #:use-module (gnu packages maven-parent-pom)
88 #:use-module (gnu packages ncurses)
89 #:use-module (gnu packages nss)
90 #:use-module (gnu packages onc-rpc)
91 #:use-module (gnu packages web)
92 #:use-module (gnu packages wget)
93 #:use-module (gnu packages pkg-config)
94 #:use-module (gnu packages perl)
95 #:use-module (gnu packages popt)
96 #:use-module (gnu packages kerberos)
97 #:use-module (gnu packages security-token)
98 #:use-module (gnu packages xml)
99 #:use-module (gnu packages xdisorg)
100 #:use-module (gnu packages xorg)
101 #:use-module (gnu packages texinfo)
102 #:use-module ((srfi srfi-1) #:select (fold alist-delete))
103 #:use-module (srfi srfi-11)
104 #:use-module (ice-9 match))
105
106(define-public icedtea-7
107 (let* ((version "2.6.13")
108 (drop (lambda* (name hash #:optional (patches '()))
109 (origin
110 (method url-fetch)
111 (uri (string-append
112 "http://icedtea.classpath.org/download/drops"
113 "/icedtea7/" version "/" name ".tar.bz2"))
114 (sha256 (base32 hash))
115 (patches patches)))))
116 (package
117 (name "icedtea")
118 (version version)
119 (source (origin
120 (method url-fetch)
121 (uri (string-append
122 "http://icedtea.wildebeest.org/download/source/icedtea-"
123 version ".tar.xz"))
124 (sha256
125 (base32
126 "1w331rdqx1dcx2xb0fmjmrkdc71xqn20fxsgw8by4xhiblh88khh"))
127 (modules '((guix build utils)))
128 (snippet
129 '(begin
130 (substitute* "Makefile.in"
131 ;; do not leak information about the build host
132 (("DISTRIBUTION_ID=\"\\$\\(DIST_ID\\)\"")
133 "DISTRIBUTION_ID=\"\\\"guix\\\"\""))
134 #t))))
135 (build-system gnu-build-system)
136 (outputs '("out" ; Java Runtime Environment
137 "jdk" ; Java Development Kit
138 "doc")) ; all documentation
139 (arguments
140 `(;; There are many test failures. Some are known to
141 ;; fail upstream, others relate to not having an X
142 ;; server running at test time, yet others are a
143 ;; complete mystery to me.
144
145 ;; hotspot: passed: 241; failed: 45; error: 2
146 ;; langtools: passed: 1,934; failed: 26
147 ;; jdk: unknown
148 #:tests? #f
149
150 ;; The DSOs use $ORIGIN to refer to each other, but (guix build
151 ;; gremlin) doesn't support it yet, so skip this phase.
152 #:validate-runpath? #f
153
154 #:modules ((guix build utils)
155 (guix build gnu-build-system)
156 (ice-9 match)
157 (ice-9 popen)
158 (srfi srfi-19)
159 (srfi srfi-26))
160
161 #:configure-flags
162 ;; TODO: package sctp and add to inputs
163 `("--disable-system-sctp"
164 "--enable-system-pcsc"
165 "--enable-system-lcms"
166 "--enable-bootstrap"
167 "--enable-nss"
168 "--without-rhino"
169 ,(string-append "--with-parallel-jobs="
170 (number->string (parallel-job-count)))
171 "--disable-downloading"
172 "--disable-tests" ;they are run in the check phase instead
173 "--with-openjdk-src-dir=./openjdk.src"
174 ,(string-append "--with-ecj="
175 (assoc-ref %build-inputs "ecj4-javac-wrapper")
176 "/bin/javac")
177 ,(string-append "--with-jdk-home="
178 (assoc-ref %build-inputs "classpath"))
179 ,(string-append "--with-java="
180 (assoc-ref %build-inputs "jamvm")
181 "/bin/jamvm")
182 ,(string-append "--with-jar="
183 (assoc-ref %build-inputs "classpath")
184 "/bin/gjar"))
185 #:phases
186 (modify-phases %standard-phases
187 (replace 'unpack
188 (lambda* (#:key source inputs #:allow-other-keys)
189 (let ((target (string-append "icedtea-" ,version))
190 (unpack (lambda* (name #:optional dir)
191 (let ((dir (or dir
192 (string-drop-right name 5))))
193 (mkdir dir)
194 (invoke "tar" "xvf"
195 (assoc-ref inputs name)
196 "-C" dir
197 "--strip-components=1")))))
198 (mkdir target)
199 (invoke "tar" "xvf" source
200 "-C" target "--strip-components=1")
201 (chdir target)
202 (unpack "openjdk-src" "openjdk.src")
203 (with-directory-excursion "openjdk.src"
204 (for-each unpack
205 (filter (cut string-suffix? "-drop" <>)
206 (map (match-lambda
207 ((name . _) name))
208 inputs)))))))
209 (add-after 'unpack 'use-classpath
210 (lambda* (#:key inputs #:allow-other-keys)
211 (let ((tools (search-input-file inputs "/share/classpath/tools.zip"))
212 (rt.jar (search-input-file inputs "/lib/rt.jar")))
213 ;; GNU Classpath does not provide rt.jar, but jamvm provides
214 ;; Classpath's glibj.zip as rt.jar, so we just use that.
215 (substitute* "Makefile.in"
216 (("\\$\\(SYSTEM_JDK_DIR\\)/jre/lib/rt.jar") rt.jar))
217 ;; Make sure we can find all classes.
218 (setenv "CLASSPATH"
219 (string-append rt.jar ":" tools))
220 (setenv "JAVACFLAGS"
221 (string-append "-cp " rt.jar ":" tools)))))
222 (add-after 'unpack 'patch-bitrot
223 (lambda _
224 (substitute* '("patches/boot/revert-6973616.patch"
225 "openjdk.src/jdk/make/common/shared/Defs-versions.gmk")
226 (("REQUIRED_FREETYPE_VERSION = 2.2.1")
227 "REQUIRED_FREETYPE_VERSION = 2.10.1"))
228 ;; As of attr 2.4.48 this header is no longer
229 ;; included. It is provided by the libc instead.
230 (substitute* '("configure"
231 "openjdk.src/jdk/src/solaris/native/sun/nio/fs/LinuxNativeDispatcher.c")
232 (("attr/xattr.h") "sys/xattr.h"))))
233 (add-after 'unpack 'fix-openjdk
234 (lambda _
235 (substitute* "openjdk.src/jdk/make/common/Defs-linux.gmk"
236 (("CFLAGS_COMMON = -fno-strict-aliasing" all)
237 (string-append all
238 " -fcommon"
239 " -Wno-error=implicit-function-declaration"
240 " -Wno-error=implicit-int"
241 " -Wno-error=incompatible-pointer-types"
242 " -Wno-error=int-conversion")))
243 (substitute*
244 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
245 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
246 (("#include <sys/sysctl.h>")
247 "#include <linux/sysctl.h>"))
248
249 ;; XXX 'ldd' in glibc 2.35 segfaults upon reading
250 ;; openjdk.build-boot/lib/amd64/libnio.so (!).
251 ;; It is only used as a verification step, so ignore it;
252 ;; try removing this substitution for newer versions of glibc.
253 (substitute* "openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
254 (("\\$\\(LDD\\) \\$1 &&")
255 ""))
256
257 ;; It looks like the "h = 31 * h + c" line of the jsum()
258 ;; function gets miscompiled. After a few iterations of the loop
259 ;; the result of "31 * h" is always 0x8000000000000000.
260 ;; Disable optimizations of dump.cpp as a workaround.
261 (substitute* "openjdk.src/hotspot/make/linux/makefiles/gcc.make"
262 (("OPT_CFLAGS/NOOPT.*" all)
263 (string-append all "\n"
264 "OPT_CFLAGS/dump.o += -O0")))))
265 (add-after 'unpack 'fix-x11-extension-include-path
266 (lambda* (#:key inputs #:allow-other-keys)
267 (substitute* "openjdk.src/jdk/make/sun/awt/mawt.gmk"
268 (((string-append "\\$\\(firstword \\$\\(wildcard "
269 "\\$\\(OPENWIN_HOME\\)"
270 "/include/X11/extensions\\).*$"))
271 (string-append (assoc-ref inputs "libxrender")
272 "/include/X11/extensions"
273 " -I" (assoc-ref inputs "libxtst")
274 "/include/X11/extensions"
275 " -I" (assoc-ref inputs "libxinerama")
276 "/include/X11/extensions"))
277 (("\\$\\(wildcard /usr/include/X11/extensions\\)\\)") ""))))
278 (add-after 'unpack 'patch-paths
279 (lambda* (#:key inputs #:allow-other-keys)
280 ;; buildtree.make generates shell scripts, so we need to replace
281 ;; the generated shebang
282 (substitute* '("openjdk.src/hotspot/make/linux/makefiles/buildtree.make")
283 (("/bin/sh") (which "bash")))
284
285 (let ((corebin (string-append
286 (assoc-ref inputs "coreutils") "/bin/"))
287 (binbin (string-append
288 (assoc-ref inputs "binutils") "/bin/"))
289 (grepbin (string-append
290 (assoc-ref inputs "grep") "/bin/")))
291 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-linux.gmk"
292 "openjdk.src/corba/make/common/shared/Defs-linux.gmk")
293 (("UNIXCOMMAND_PATH = /bin/")
294 (string-append "UNIXCOMMAND_PATH = " corebin))
295 (("USRBIN_PATH = /usr/bin/")
296 (string-append "USRBIN_PATH = " corebin))
297 (("DEVTOOLS_PATH *= */usr/bin/")
298 (string-append "DEVTOOLS_PATH = " corebin))
299 (("COMPILER_PATH *= */usr/bin/")
300 (string-append "COMPILER_PATH = "
301 (assoc-ref inputs "gcc") "/bin/"))
302 (("DEF_OBJCOPY *=.*objcopy")
303 (string-append "DEF_OBJCOPY = " (which "objcopy"))))
304
305 ;; fix path to alsa header
306 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
307 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
308 (string-append "ALSA_INCLUDE="
309 (assoc-ref inputs "alsa-lib")
310 "/include/alsa/version.h")))
311
312 ;; fix hard-coded utility paths
313 (substitute* '("openjdk.src/jdk/make/common/shared/Defs-utils.gmk"
314 "openjdk.src/corba/make/common/shared/Defs-utils.gmk")
315 (("ECHO *=.*echo")
316 (string-append "ECHO = " (which "echo")))
317 (("^GREP *=.*grep")
318 (string-append "GREP = " (which "grep")))
319 (("EGREP *=.*egrep")
320 (string-append "EGREP = " (which "egrep")))
321 (("CPIO *=.*cpio")
322 (string-append "CPIO = " (which "cpio")))
323 (("READELF *=.*readelf")
324 (string-append "READELF = " (which "readelf")))
325 (("^ *AR *=.*ar")
326 (string-append "AR = " (which "ar")))
327 (("^ *TAR *=.*tar")
328 (string-append "TAR = " (which "tar")))
329 (("AS *=.*as")
330 (string-append "AS = " (which "as")))
331 (("LD *=.*ld")
332 (string-append "LD = " (which "ld")))
333 (("STRIP *=.*strip")
334 (string-append "STRIP = " (which "strip")))
335 (("NM *=.*nm")
336 (string-append "NM = " (which "nm")))
337 (("^SH *=.*sh")
338 (string-append "SH = " (which "bash")))
339 (("^FIND *=.*find")
340 (string-append "FIND = " (which "find")))
341 (("LDD *=.*ldd")
342 (string-append "LDD = " (which "ldd")))
343 (("NAWK *=.*(n|g)awk")
344 (string-append "NAWK = " (which "gawk")))
345 (("XARGS *=.*xargs")
346 (string-append "XARGS = " (which "xargs")))
347 (("UNZIP *=.*unzip")
348 (string-append "UNZIP = " (which "unzip")))
349 (("ZIPEXE *=.*zip")
350 (string-append "ZIPEXE = " (which "zip")))
351 (("SED *=.*sed")
352 (string-append "SED = " (which "sed"))))
353
354 ;; Some of these timestamps cause problems as they are more than
355 ;; 10 years ago, failing the build process.
356 (substitute*
357 "openjdk.src/jdk/src/share/classes/java/util/CurrencyData.properties"
358 (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
359 (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
360 (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
361 (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
362 (add-before 'configure 'set-additional-paths
363 (lambda* (#:key inputs #:allow-other-keys)
364 (substitute* "openjdk.src/jdk/make/common/shared/Sanity.gmk"
365 (("ALSA_INCLUDE=/usr/include/alsa/version.h")
366 (string-append "ALSA_INCLUDE="
367 (assoc-ref inputs "alsa-lib")
368 "/include/alsa/version.h")))
369 (setenv "CC" "gcc")
370 (setenv "CPATH"
371 (string-append (assoc-ref inputs "libxcomposite")
372 "/include/X11/extensions" ":"
373 (assoc-ref inputs "libxrender")
374 "/include/X11/extensions" ":"
375 (assoc-ref inputs "libxtst")
376 "/include/X11/extensions" ":"
377 (assoc-ref inputs "libxinerama")
378 "/include/X11/extensions" ":"
379 (or (getenv "CPATH") "")))
380 (setenv "ALT_OBJCOPY" (which "objcopy"))
381 (setenv "ALT_CUPS_HEADERS_PATH"
382 (string-append (assoc-ref inputs "cups")
383 "/include"))
384 (setenv "ALT_FREETYPE_HEADERS_PATH"
385 (string-append (assoc-ref inputs "freetype")
386 "/include"))
387 (setenv "ALT_FREETYPE_LIB_PATH"
388 (string-append (assoc-ref inputs "freetype")
389 "/lib"))))
390 (add-before 'build 'disable-os-version-check
391 ;; allow build on linux major version change
392 (lambda _
393 (setenv "DISABLE_HOTSPOT_OS_VERSION_CHECK" "ok")))
394 (add-before 'check 'fix-test-framework
395 (lambda _
396 ;; Fix PATH in test environment
397 (substitute* "test/jtreg/com/sun/javatest/regtest/Main.java"
398 (("PATH=/bin:/usr/bin")
399 (string-append "PATH=" (getenv "PATH"))))
400 (substitute* "test/jtreg/com/sun/javatest/util/SysEnv.java"
401 (("/usr/bin/env") (which "env")))
402 (substitute* "openjdk.src/hotspot/test/test_env.sh"
403 (("/bin/rm") (which "rm"))
404 (("/bin/cp") (which "cp"))
405 (("/bin/mv") (which "mv")))))
406 (add-before 'check 'fix-hotspot-tests
407 (lambda _
408 (with-directory-excursion "openjdk.src/hotspot/test/"
409 (substitute* "jprt.config"
410 (("PATH=\"\\$\\{path4sdk\\}\"")
411 (string-append "PATH=" (getenv "PATH")))
412 (("make=/usr/bin/make")
413 (string-append "make=" (which "make"))))
414 (substitute* '("runtime/6626217/Test6626217.sh"
415 "runtime/7110720/Test7110720.sh")
416 (("/bin/rm") (which "rm"))
417 (("/bin/cp") (which "cp"))
418 (("/bin/mv") (which "mv"))))))
419 (add-before 'check 'fix-jdk-tests
420 (lambda _
421 (with-directory-excursion "openjdk.src/jdk/test/"
422 (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
423 (("/bin/pwd") (which "pwd")))
424 (substitute* "com/sun/jdi/ShellScaffold.sh"
425 (("/bin/kill") (which "kill")))
426 (substitute* "start-Xvfb.sh"
427 ;;(("/usr/bin/X11/Xvfb") (which "Xvfb"))
428 (("/usr/bin/nohup") (which "nohup")))
429 (substitute* "javax/security/auth/Subject/doAs/Test.sh"
430 (("/bin/rm") (which "rm")))
431 (substitute* "tools/launcher/MultipleJRE.sh"
432 (("echo \"#!/bin/sh\"")
433 (string-append "echo \"#!" (which "rm") "\""))
434 (("/usr/bin/zip") (which "zip")))
435 (substitute* "com/sun/jdi/OnThrowTest.java"
436 (("#!/bin/sh") (string-append "#!" (which "sh"))))
437 (substitute* "java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java"
438 (("/usr/bin/uptime") (which "uptime")))
439 (substitute* "java/lang/ProcessBuilder/Basic.java"
440 (("/usr/bin/env") (which "env"))
441 (("/bin/false") (which "false"))
442 (("/bin/true") (which "true"))
443 (("/bin/cp") (which "cp"))
444 (("/bin/sh") (which "sh")))
445 (substitute* "java/lang/ProcessBuilder/FeelingLucky.java"
446 (("/bin/sh") (which "sh")))
447 (substitute* "java/lang/ProcessBuilder/Zombies.java"
448 (("/usr/bin/perl") (which "perl"))
449 (("/bin/ps") (which "ps"))
450 (("/bin/true") (which "true")))
451 (substitute* "java/lang/Runtime/exec/ConcurrentRead.java"
452 (("/usr/bin/tee") (which "tee")))
453 (substitute* "java/lang/Runtime/exec/ExecWithDir.java"
454 (("/bin/true") (which "true")))
455 (substitute* "java/lang/Runtime/exec/ExecWithInput.java"
456 (("/bin/cat") (which "cat")))
457 (substitute* "java/lang/Runtime/exec/ExitValue.java"
458 (("/bin/sh") (which "sh"))
459 (("/bin/true") (which "true"))
460 (("/bin/kill") (which "kill")))
461 (substitute* "java/lang/Runtime/exec/LotsOfDestroys.java"
462 (("/usr/bin/echo") (which "echo")))
463 (substitute* "java/lang/Runtime/exec/LotsOfOutput.java"
464 (("/usr/bin/cat") (which "cat")))
465 (substitute* "java/lang/Runtime/exec/SleepyCat.java"
466 (("/bin/cat") (which "cat"))
467 (("/bin/sleep") (which "sleep"))
468 (("/bin/sh") (which "sh")))
469 (substitute* "java/lang/Runtime/exec/StreamsSurviveDestroy.java"
470 (("/bin/cat") (which "cat")))
471 (substitute* "java/rmi/activation/CommandEnvironment/SetChildEnv.java"
472 (("/bin/chmod") (which "chmod")))
473 (substitute* "java/util/zip/ZipFile/Assortment.java"
474 (("/bin/sh") (which "sh"))))))
475 (replace 'check
476 (lambda* (#:key tests? #:allow-other-keys)
477 ;; The "make check-*" targets always return zero, so we need to
478 ;; check for errors in the associated log files to determine
479 ;; whether any tests have failed.
480 (when tests?
481 (use-modules (ice-9 rdelim))
482 (let* ((error-pattern (make-regexp "^(Error|FAILED):.*"))
483 (checker (lambda (port)
484 (let loop ()
485 (let ((line (read-line port)))
486 (cond
487 ((eof-object? line) #t)
488 ((regexp-exec error-pattern line)
489 (error "test failed"))
490 (else (loop)))))))
491 (run-test (lambda (test)
492 (invoke "make" test)
493 (call-with-input-file
494 (string-append "test/" test ".log")
495 checker))))
496 (run-test "check-hotspot")
497 (run-test "check-langtools")
498 (run-test "check-jdk")))))
499 (replace 'install
500 (lambda* (#:key outputs #:allow-other-keys)
501 (let ((doc (string-append (assoc-ref outputs "doc")
502 "/share/doc/icedtea"))
503 (jre (assoc-ref outputs "out"))
504 (jdk (assoc-ref outputs "jdk")))
505 (copy-recursively "openjdk.build/docs" doc)
506 (copy-recursively "openjdk.build/j2re-image" jre)
507 (copy-recursively "openjdk.build/j2sdk-image" jdk))))
508 ;; Some of the libraries in the lib/amd64 folder link to libjvm.so.
509 ;; But that shared object is located in the server/ folder, so it
510 ;; cannot be found. This phase creates a symbolic link in the
511 ;; lib/amd64 folder so that the other libraries can find it.
512 ;;
513 ;; See:
514 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
515 ;;
516 ;; FIXME: Find the bug in the build system, so that this symlink is
517 ;; not needed.
518 (add-after 'install 'install-libjvm
519 (lambda* (#:key inputs outputs #:allow-other-keys)
520 (let* ((lib-path (string-append (assoc-ref outputs "out")
521 ;; See 'INSTALL_ARCH_DIR' in
522 ;; 'configure'.
523 ,(match (%current-system)
524 ("i686-linux"
525 "/lib/i386")
526 ("x86_64-linux"
527 "/lib/amd64")
528 ("armhf-linux"
529 "/lib/arm")
530 ("aarch64-linux"
531 "/lib/aarch64")
532 ("powerpc-linux"
533 "/lib/ppc")
534 ;; We need a catch-all, dropping
535 ;; '-linux' works in most cases.
536 (_
537 (string-append
538 "/lib/"
539 (string-drop-right
540 (%current-system) 6)))))))
541 (symlink (string-append lib-path "/server/libjvm.so")
542 (string-append lib-path "/libjvm.so")))))
543 ;; By default IcedTea only generates an empty keystore. In order to
544 ;; be able to use certificates in Java programs we need to generate a
545 ;; keystore from a set of certificates. For convenience we use the
546 ;; certificates from the nss-certs package.
547 (add-after 'install 'install-keystore
548 (lambda* (#:key inputs outputs #:allow-other-keys)
549 (use-modules (ice-9 rdelim))
550 (let* ((keystore "cacerts")
551 (certs-dir (search-input-directory inputs
552 "etc/ssl/certs"))
553 (keytool (string-append (assoc-ref outputs "jdk")
554 "/bin/keytool")))
555 (define (extract-cert file target)
556 (call-with-input-file file
557 (lambda (in)
558 (call-with-output-file target
559 (lambda (out)
560 (let loop ((line (read-line in 'concat))
561 (copying? #f))
562 (cond
563 ((eof-object? line) #t)
564 ((string-prefix? "-----BEGIN" line)
565 (display line out)
566 (loop (read-line in 'concat) #t))
567 ((string-prefix? "-----END" line)
568 (display line out)
569 #t)
570 (else
571 (when copying? (display line out))
572 (loop (read-line in 'concat) copying?)))))))))
573 (define (import-cert cert)
574 (format #t "Importing certificate ~a\n" (basename cert))
575 (let ((temp "tmpcert"))
576 (extract-cert cert temp)
577 (let ((port (open-pipe* OPEN_WRITE keytool
578 "-import"
579 "-alias" (basename cert)
580 "-keystore" keystore
581 "-storepass" "changeit"
582 "-file" temp)))
583 (display "yes\n" port)
584 (when (not (zero? (status:exit-val (close-pipe port))))
585 (format #t "failed to import ~a\n" cert)))
586 (delete-file temp)))
587
588 ;; This is necessary because the certificate directory contains
589 ;; files with non-ASCII characters in their names.
590 (setlocale LC_ALL "C.UTF-8")
591 (setenv "LC_ALL" "C.UTF-8")
592
593 (for-each import-cert (find-files certs-dir "\\.pem$"))
594 (mkdir-p (string-append (assoc-ref outputs "out")
595 "/lib/security"))
596 (mkdir-p (string-append (assoc-ref outputs "jdk")
597 "/jre/lib/security"))
598
599 ;; The cacerts files we are going to overwrite are chmod'ed as
600 ;; read-only (444) in icedtea-8 (which derives from this
601 ;; package). We have to change this so we can overwrite them.
602 (chmod (string-append (assoc-ref outputs "out")
603 "/lib/security/" keystore) #o644)
604 (chmod (string-append (assoc-ref outputs "jdk")
605 "/jre/lib/security/" keystore) #o644)
606
607 (install-file keystore
608 (string-append (assoc-ref outputs "out")
609 "/lib/security"))
610 (install-file keystore
611 (string-append (assoc-ref outputs "jdk")
612 "/jre/lib/security"))))))))
613 (native-inputs
614 ;; XXX: Compiling with gcc-14 will encounter the following error:
615 ;; BUILD FAILED:
616 ;; /tmp/guix-build-icedtea-2.6.13.drv-0/icedtea-2.6.13/openjdk/langtools/
617 ;; make/build.xml:452: The following error occurred while executing this
618 ;; line:
619 ;; java.lang.AbstractMethodError: java.lang.Throwable.toString()Ljava/lang/String;
620 `(("gcc" ,gcc-13)
621 ("openjdk-src"
622 ,(drop "openjdk"
623 "0l34ikyf62hbzlf9032alzkkqvf7bpmckz4gvirvph755w7gka8l"))
624 ("corba-drop"
625 ,(drop "corba"
626 "050gv2jbg1pi6qkn8w18bwpbklfa5b0kymjvan9pncddbj8m84fz"))
627 ("jaxp-drop"
628 ,(drop "jaxp"
629 "1k6yldwnxfzdg5926r1nlfv8d1r1j7rlp2nkz6gqh05vgyamnfhl"))
630 ("jaxws-drop"
631 ,(drop "jaxws"
632 "110j7jlz47x2gg6f7653x12mssan5kvj9l9h1m1c8c92drfxbqyk"))
633 ("jdk-drop"
634 ,(drop "jdk"
635 "0d1mca38ksxvdskp9im3pp7fdijhj1n3lwq9w13r9s4v3qyskgdd"
636 (search-patches "jdk-currency-time-bomb.patch")))
637 ("langtools-drop"
638 ,(drop "langtools"
639 "0nq5236fzxn3p6x8cgncl56mzcmsj07q9gymysnws4c8byc6n0qj"))
640 ("hotspot-drop"
641 ,(origin
642 (method url-fetch)
643 (uri (string-append
644 "http://icedtea.classpath.org/downloads/drops"
645 "/icedtea7/" version "/hotspot.tar.bz2"))
646 (sha256
647 (base32
648 "17bdv39n4lh8l5737c96f3xgamx4y305m067p01cywgp7zaddqws"))
649 (patches (search-patches
650 "icedtea-7-hotspot-aarch64-use-c++98.patch"
651 "icedtea-7-hotspot-pointer-comparison.patch"))))
652 ("ant" ,ant-bootstrap)
653 ("attr" ,attr)
654 ("classpath" ,classpath-devel)
655 ("coreutils" ,coreutils)
656 ("diffutils" ,diffutils) ;for tests
657 ("ecj4-javac-wrapper" ,ecj4-javac-wrapper)
658 ("fastjar" ,fastjar) ;only for the configure phase; we actually use gjar
659 ("gawk" ,gawk)
660 ("grep" ,grep)
661 ("jamvm" ,jamvm-with-ecj4)
662 ("libtool" ,libtool)
663 ("pkg-config" ,pkg-config)
664 ("wget" ,wget)
665 ("which" ,which)
666 ("cpio" ,cpio)
667 ("zip" ,zip)
668 ("unzip" ,unzip)
669 ("libxslt" ,libxslt) ;for xsltproc
670 ("nss-certs" ,nss-certs)
671 ("perl" ,perl)
672 ("procps" ,procps))) ;for "free", even though I'm not sure we should use it
673 (inputs
674 (list alsa-lib
675 cups
676 fontconfig
677 freetype
678 giflib
679 gtk+-2
680 lcms
681 libjpeg-turbo
682 libpng
683 libx11
684 libxcomposite
685 libxi
686 libxinerama
687 libxrender
688 libxt
689 libxtst
690 mit-krb5
691 nss
692 pcsc-lite
693 zlib))
694 (home-page "https://icedtea.classpath.org")
695 (synopsis "Java development kit")
696 (description
697 "This package provides the Java development kit OpenJDK built with the
698IcedTea build harness.")
699
700 ;; 'configure' lists "mips" and "mipsel", but not "mips64el'.
701 (supported-systems (delete "mips64el-linux" %supported-systems))
702
703 ;; IcedTea is released under the GPL2 + Classpath exception, which is the
704 ;; same license as both GNU Classpath and OpenJDK.
705 (license license:gpl2+))))
706
707(define-public icedtea-8
708 (let* ((version "3.19.0")
709 (drop (lambda* (name hash #:optional (patches '()))
710 (origin
711 (method url-fetch)
712 (uri (string-append
713 "http://icedtea.classpath.org/download/drops"
714 "/icedtea8/" version "/" name ".tar.xz"))
715 (sha256 (base32 hash))
716 (patches patches)))))
717 (package (inherit icedtea-7)
718 (version "3.19.0")
719 (source (origin
720 (method url-fetch)
721 (uri (string-append
722 "http://icedtea.wildebeest.org/download/source/icedtea-"
723 version ".tar.xz"))
724 (sha256
725 (base32
726 "1cmms7cb2sav3ywc36ynqmybzx73sl279rm6j8i5nqrmp98ixmpf"))
727 (modules '((guix build utils)))
728 (snippet
729 '(substitute* '("configure"
730 "acinclude.m4")
731 ;; Do not embed build time
732 (("(DIST_ID=\"Custom build).*$" _ prefix)
733 (string-append prefix "\"\n"))
734 ;; Do not leak information about the build host
735 (("DIST_NAME=\"\\$build_os\"")
736 "DIST_NAME=\"guix\"")))))
737 (arguments
738 `(#:imported-modules
739 ((guix build ant-build-system)
740 ,@%default-gnu-imported-modules)
741
742 #:disallowed-references ,(list (gexp-input
743 (this-package-native-input "jdk")
744 "jdk"))
745
746 ,@(substitute-keyword-arguments (package-arguments icedtea-7)
747 ((#:modules modules)
748 `((guix build utils)
749 (guix build gnu-build-system)
750 ((guix build ant-build-system) #:prefix ant:)
751 (ice-9 match)
752 (ice-9 popen)
753 (srfi srfi-19)
754 (srfi srfi-26)))
755 ((#:configure-flags flags)
756 `(let ((jdk (assoc-ref %build-inputs "jdk")))
757 `(,(string-append "CFLAGS=-fcommon"
758 " -Wno-error=implicit-function-declaration"
759 " -Wno-error=implicit-int"
760 " -Wno-error=incompatible-pointer-types"
761 " -Wno-error=int-conversion")
762 "CXXFLAGS=-fcommon"
763 "--enable-bootstrap"
764 "--enable-nss"
765 ,(string-append "--with-parallel-jobs="
766 (number->string (parallel-job-count)))
767 ;; Java Flight Recorder isn't supported on some architectures.
768 ,@(if ,(target-ppc32?)
769 `("--enable-jfr=no")
770 '())
771 "--disable-docs" ; This phase can take hours on slow machines.
772 "--disable-downloading"
773 "--disable-system-pcsc"
774 "--disable-system-sctp"
775 "--disable-tests" ;they are run in the check phase instead
776 "--with-openjdk-src-dir=./openjdk.src"
777 ,(string-append "--with-jdk-home=" jdk))))
778 ((#:phases phases)
779 `(modify-phases ,phases
780 (delete 'fix-x11-extension-include-path)
781 (delete 'patch-paths)
782 (delete 'set-additional-paths)
783 (delete 'patch-patches)
784 (delete 'patch-bitrot)
785 (delete 'use-classpath)
786 ;; Prevent passing -j (parallel-job-count) to make
787 (replace 'build
788 (lambda* (#:key (make-flags '()) #:allow-other-keys)
789 (apply invoke "make" make-flags)))
790 ;; Prevent the keytool from recording the current time when
791 ;; adding certificates at build time.
792 (add-after 'unpack 'patch-keystore
793 (lambda _
794 (substitute* "openjdk.src/jdk/src/share/classes/sun/security/provider/JavaKeyStore.java"
795 (("date = new Date\\(\\);")
796 "\
797date = (System.getenv(\"SOURCE_DATE_EPOCH\") != null) ?\
798new Date(Long.parseLong(System.getenv(\"SOURCE_DATE_EPOCH\"))) :\
799new Date();"))
800 #t))
801 (add-after 'unpack 'patch-jni-libs
802 ;; Hardcode dynamically loaded libraries.
803 (lambda _
804 (define remove
805 (@ (srfi srfi-1) remove))
806
807 (define (icedtea-or-openjdk? path)
808 (or (string-contains path "openjdk")
809 (string-contains path "icedtea")))
810
811 (let* ((library-path (remove icedtea-or-openjdk?
812 (search-path-as-string->list
813 (getenv "LIBRARY_PATH"))))
814 (find-library (lambda (name)
815 (or (search-path
816 library-path
817 (string-append "lib" name ".so"))
818 (string-append "lib" name ".so")))))
819 (for-each
820 (lambda (file)
821 (catch 'decoding-error
822 (lambda ()
823 (substitute* file
824 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
825 _ name version)
826 (string-append "\"" (find-library name) "\""))
827 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
828 (string-append "\"" (find-library name) "\""))))
829 (lambda _
830 ;; Those are safe to skip.
831 (format (current-error-port)
832 "warning: failed to substitute: ~a~%"
833 file))))
834 (find-files "openjdk.src/jdk/src/solaris/native"
835 "\\.c|\\.h")))))
836 (replace 'fix-openjdk
837 (lambda _
838 (substitute*
839 '("openjdk.src/jdk/src/solaris/native/java/net/PlainSocketImpl.c"
840 "openjdk.src/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c")
841 (("#include <sys/sysctl.h>")
842 "#include <linux/sysctl.h>"))))
843 (replace 'install
844 (lambda* (#:key outputs #:allow-other-keys)
845 (let ((doc (string-append (assoc-ref outputs "doc")
846 "/share/doc/icedtea"))
847 (jre (assoc-ref outputs "out"))
848 (jdk (assoc-ref outputs "jdk")))
849 (copy-recursively "openjdk.build/docs" doc)
850 (copy-recursively "openjdk.build/images/j2re-image" jre)
851 (copy-recursively "openjdk.build/images/j2sdk-image" jdk)
852 ;; Install the nss.cfg file to JRE to enable SSL/TLS
853 ;; support via NSS.
854 (copy-file (string-append jdk "/jre/lib/security/nss.cfg")
855 (string-append jre "/lib/security/nss.cfg")))))
856 (add-after 'install 'strip-jar-timestamps
857 (assoc-ref ant:%standard-phases 'strip-jar-timestamps)))))))
858 (native-inputs
859 `(("jdk" ,icedtea-7 "jdk")
860 ("openjdk-src"
861 ,(drop "openjdk"
862 "1l3bzmd3s38scxpwamfhnwbv7vndgjq6hz3bl58437fgl9kgbl69"))
863 ("aarch32-drop"
864 ,(drop "aarch32"
865 "0k4dwpi3x3lj41rj32xyxbn76r7cb2g2whh44r1z4iwhw1xd2lpq"))
866 ("corba-drop"
867 ,(drop "corba"
868 "0xhh6gf5gh5c6vf1607xcy49wnp5prch2rim13x14wvsn817xf0r"))
869 ("jaxp-drop"
870 ,(drop "jaxp"
871 "043g335rgi5ipl8dp3q2cc3gcfhxk77ipxs43sv344z71bn8xmxr"))
872 ("jaxws-drop"
873 ,(drop "jaxws"
874 "1pc0pv4v2mn2mjc0vp19d94v2150xigyhxsmckqasy647zcm6w0r"))
875 ("jdk-drop"
876 ,(drop "jdk"
877 "1742lcm55l8zhi522x83v65ccr0rd6511q9rj7crw44x3ymdrhrv"
878 (search-patches "jdk-currency-time-bomb2.patch")))
879 ("langtools-drop"
880 ,(drop "langtools"
881 "08iz7p2xcddlphipf6gahyabr5cawlnydap12p1n4f0md069b50b"))
882 ("hotspot-drop"
883 ,(drop "hotspot"
884 "1ffaxfnb3yn1i7crivqigc1r1q0z6cp044i6nfring4z6c8pfhd2"))
885 ("nashorn-drop"
886 ,(drop "nashorn"
887 "15fn7cpm2i1npa88h57njxg0f8qkrqhrc30pb54d3hxlx5zyjl94"))
888 ("shenandoah-drop"
889 ,(drop "shenandoah"
890 "1jjzjjx1ykyhbc4llh8249dlr8j5g1ki6r7g9baj2mxyb9whc5nq"))
891 ,@(fold alist-delete (package-native-inputs icedtea-7)
892 '("openjdk-src" "corba-drop" "jaxp-drop" "jaxws-drop"
893 "jdk-drop" "langtools-drop" "hotspot-drop"
894 "classpath" "ecj4-javac-wrapper" "jamvm" "fastjar")))))))
895
896(define-public icedtea icedtea-8)
897
898(define-public openjdk9
899 (package
900 (name "openjdk")
901 (version "9.181")
902 (source (origin
903 (method hg-fetch)
904 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
905 (changeset "jdk-9+181")))
906 (file-name (hg-file-name name version))
907 (modules '((guix build utils)))
908 (snippet '(for-each delete-file
909 (find-files "." ".*.(bin|exe|jar)$")))
910 (sha256
911 (base32
912 "1v92nzdqx07c35x945awzir4yk0fk22vky6fpp8mq9js930sxsz0"))
913 (patches
914 (search-patches "openjdk-9-pointer-comparison.patch"
915 "openjdk-9-classlist-reproducibility.patch"
916 "openjdk-currency-time-bomb.patch"
917 "openjdk-9-jar-reproducibility.patch"
918 "openjdk-9-module-reproducibility.patch"
919 "openjdk-9-module2-reproducibility.patch"
920 "openjdk-9-module3-reproducibility.patch"
921 "openjdk-9-idlj-reproducibility.patch"
922 "openjdk-9-setsignalhandler.patch"))))
923 (build-system gnu-build-system)
924 (outputs '("out" "jdk" "doc"))
925 (arguments
926 `(#:imported-modules
927 ((guix build ant-build-system)
928 ,@%default-gnu-imported-modules)
929 #:modules
930 ((guix build utils)
931 (guix build gnu-build-system)
932 (ice-9 popen))
933 #:tests? #f ; require jtreg
934 #:make-flags '("all")
935 #:disallowed-references
936 ,(list (this-package-native-input "icedtea")
937 (gexp-input (this-package-native-input "icedtea") "jdk"))
938
939 #:phases
940 (modify-phases %standard-phases
941 ,@(if (target-aarch64?)
942 `((add-after 'unpack 'patch-for-aarch64
943 (lambda _
944 (substitute* "hotspot/src/cpu/aarch64/vm/interp_masm_aarch64.hpp"
945 ;; This line is duplicated, so remove both occurrences,
946 ;; then add back one occurrence by substituting a
947 ;; comment that occurs once.
948 (("using MacroAssembler::call_VM_leaf_base;") "")
949 (("Interpreter specific version of call_VM_base")
950 "Interpreter specific version of call_VM_base
951 using MacroAssembler::call_VM_leaf_base;")))))
952 '())
953 (add-after 'patch-source-shebangs 'fix-java-shebangs
954 (lambda _
955 ;; This file was "fixed" by patch-source-shebangs, but it requires
956 ;; this exact first line.
957 (substitute* "jdk/make/data/blacklistedcertsconverter/blacklisted.certs.pem"
958 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
959 (replace 'configure
960 (lambda* (#:key inputs outputs #:allow-other-keys)
961 ;; TODO: unbundle libpng and lcms
962 (invoke "bash" "./configure"
963 ;; Add flags for compilation with gcc >= 10
964 ,(string-append "--with-extra-cflags=-fcommon"
965 " -fno-delete-null-pointer-checks"
966 " -fno-lifetime-dse"
967 ;; flags for compilation with gcc >= 14.
968 " -Wno-error=int-conversion")
969 (string-append "--with-freetype="
970 (assoc-ref inputs "freetype"))
971 "--disable-freetype-bundling"
972 "--disable-warnings-as-errors"
973 "--disable-hotspot-gtest"
974 "--with-giflib=system"
975 "--with-libjpeg=system"
976 (string-append "--prefix=" (assoc-ref outputs "out")))))
977 (add-before 'build 'write-source-revision-file
978 (lambda _
979 (with-output-to-file ".src-rev"
980 (lambda _
981 (display ,version)))))
982 (replace 'build
983 (lambda* (#:key make-flags parallel-build? #:allow-other-keys)
984 (apply invoke "make"
985 `(,@(if parallel-build?
986 (list (string-append "JOBS="
987 (number->string (parallel-job-count))))
988 '("JOBS=1"))
989 ,@make-flags))))
990 (add-after 'unpack 'patch-jni-libs
991 ;; Hardcode dynamically loaded libraries.
992 (lambda _
993 (define remove
994 (@ (srfi srfi-1) remove))
995
996 (define (icedtea-or-openjdk? path)
997 (or (string-contains path "openjdk")
998 (string-contains path "icedtea")))
999
1000 (let* ((library-path (remove icedtea-or-openjdk?
1001 (search-path-as-string->list
1002 (getenv "LIBRARY_PATH"))))
1003 (find-library (lambda (name)
1004 (or (search-path
1005 library-path
1006 (string-append "lib" name ".so"))
1007 (string-append "lib" name ".so")))))
1008 (for-each
1009 (lambda (file)
1010 (catch 'decoding-error
1011 (lambda ()
1012 (substitute* file
1013 (("VERSIONED_JNI_LIB_NAME\\(\"(.*)\", \"(.*)\"\\)"
1014 _ name version)
1015 (string-append "\"" (find-library name) "\""))
1016 (("JNI_LIB_NAME\\(\"(.*)\"\\)" _ name)
1017 (string-append "\"" (find-library name) "\""))))
1018 (lambda _
1019 ;; Those are safe to skip.
1020 (format (current-error-port)
1021 "warning: failed to substitute: ~a~%"
1022 file))))
1023 (find-files "."
1024 "\\.c$|\\.h$")))))
1025 ;; By default OpenJDK only generates an empty keystore. In order to
1026 ;; be able to use certificates in Java programs we need to generate a
1027 ;; keystore from a set of certificates. For convenience we use the
1028 ;; certificates from the nss-certs package.
1029 (add-after 'install 'install-keystore
1030 (lambda* (#:key inputs outputs #:allow-other-keys)
1031 (use-modules (ice-9 rdelim))
1032 (let* ((keystore "cacerts")
1033 (certs-dir (search-input-directory inputs
1034 "etc/ssl/certs"))
1035 (keytool (string-append (assoc-ref outputs "jdk")
1036 "/bin/keytool")))
1037 (define (extract-cert file target)
1038 (call-with-input-file file
1039 (lambda (in)
1040 (call-with-output-file target
1041 (lambda (out)
1042 (let loop ((line (read-line in 'concat))
1043 (copying? #f))
1044 (cond
1045 ((eof-object? line) #t)
1046 ((string-prefix? "-----BEGIN" line)
1047 (display line out)
1048 (loop (read-line in 'concat) #t))
1049 ((string-prefix? "-----END" line)
1050 (display line out)
1051 #t)
1052 (else
1053 (when copying? (display line out))
1054 (loop (read-line in 'concat) copying?)))))))))
1055 (define (import-cert cert)
1056 (format #t "Importing certificate ~a\n" (basename cert))
1057 (let ((temp "tmpcert"))
1058 (extract-cert cert temp)
1059 (let ((port (open-pipe* OPEN_WRITE keytool
1060 "-import"
1061 "-alias" (basename cert)
1062 "-keystore" keystore
1063 "-storepass" "changeit"
1064 "-file" temp)))
1065 (display "yes\n" port)
1066 (when (not (zero? (status:exit-val (close-pipe port))))
1067 (format #t "failed to import ~a\n" cert)))
1068 (delete-file temp)))
1069
1070 ;; This is necessary because the certificate directory contains
1071 ;; files with non-ASCII characters in their names.
1072 (setlocale LC_ALL "C.UTF-8")
1073 (setenv "LC_ALL" "C.UTF-8")
1074
1075 (copy-file (string-append (assoc-ref outputs "out")
1076 "/lib/security/cacerts")
1077 keystore)
1078 (chmod keystore #o644)
1079 (for-each import-cert (find-files certs-dir "\\.pem$"))
1080 (mkdir-p (string-append (assoc-ref outputs "out")
1081 "/lib/security"))
1082 (mkdir-p (string-append (assoc-ref outputs "jdk")
1083 "/lib/security"))
1084
1085 ;; The cacerts files we are going to overwrite are chmod'ed as
1086 ;; read-only (444) in icedtea-8 (which derives from this
1087 ;; package). We have to change this so we can overwrite them.
1088 (chmod (string-append (assoc-ref outputs "out")
1089 "/lib/security/" keystore) #o644)
1090 (chmod (string-append (assoc-ref outputs "jdk")
1091 "/lib/security/" keystore) #o644)
1092
1093 (install-file keystore
1094 (string-append (assoc-ref outputs "out")
1095 "/lib/security"))
1096 (install-file keystore
1097 (string-append (assoc-ref outputs "jdk")
1098 "/lib/security")))))
1099 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1100 ;; But that shared object is located in the server/ folder, so it
1101 ;; cannot be found. This phase creates a symbolic link in the
1102 ;; lib/ folder so that the other libraries can find it.
1103 ;;
1104 ;; See:
1105 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1106 ;;
1107 ;; FIXME: Find the bug in the build system, so that this symlink is
1108 ;; not needed.
1109 (add-after 'install 'install-libjvm
1110 (lambda* (#:key inputs outputs #:allow-other-keys)
1111 (let* ((lib-out (string-append (assoc-ref outputs "out")
1112 "/lib"))
1113 (lib-jdk (string-append (assoc-ref outputs "jdk")
1114 "/lib")))
1115 (symlink (string-append lib-jdk "/server/libjvm.so")
1116 (string-append lib-jdk "/libjvm.so"))
1117 (symlink (string-append lib-out "/server/libjvm.so")
1118 (string-append lib-out "/libjvm.so")))))
1119 (replace 'install
1120 (lambda* (#:key outputs #:allow-other-keys)
1121 (let ((out (assoc-ref outputs "out"))
1122 (jdk (assoc-ref outputs "jdk"))
1123 (doc (assoc-ref outputs "doc"))
1124 (images (car (find-files "build" ".*-server-release"
1125 #:directories? #t))))
1126 (copy-recursively (string-append images "/images/jdk") jdk)
1127 (copy-recursively (string-append images "/images/jre") out)
1128 (copy-recursively (string-append images "/images/docs") doc))))
1129 (add-after 'install 'strip-zip-timestamps
1130 (lambda* (#:key outputs #:allow-other-keys)
1131 (for-each
1132 (lambda (zip)
1133 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1134 (with-directory-excursion dir
1135 ;; This is an exact copy of the implementation of invoke,
1136 ;; but this accepts exit code 1 as OK.
1137 (let ((code (system* "unzip" "--" zip)))
1138 ;; jmod files are zip files with an extra header in
1139 ;; front. unzip will warn about that -- but otherwise
1140 ;; work.
1141 (when (> (status:exit-val code) 1) ; 1 is just a warning
1142 (raise
1143 (condition
1144 (&invoke-error
1145 (program "unzip")
1146 (arguments (list "--" zip))
1147 (exit-status (status:exit-val code))
1148 (term-signal (status:term-sig code))
1149 (stop-signal (status:stop-sig code))))))))
1150 (delete-file zip)
1151 (for-each (lambda (file)
1152 (let ((s (lstat file)))
1153 (format #t "reset ~a~%" file)
1154 (utime file 1 1 0 0
1155 AT_SYMLINK_NOFOLLOW)))
1156 (find-files dir #:directories? #t))
1157 (with-directory-excursion dir
1158 (let ((files (cons "./META-INF/MANIFEST.MF"
1159 (append
1160 (find-files "./META-INF" ".*")
1161 ;; for jmod:
1162 (list "./classes/module-info.class")
1163 (find-files "." ".*")))))
1164 (apply invoke "zip" "--symlinks" "-0" "-X" zip files)
1165 (when (string-suffix? ".jmod" zip)
1166 (let ((new-zip (string-append zip "n"))
1167 (contents (call-with-input-file zip
1168 (@ (ice-9 binary-ports)
1169 get-bytevector-all))))
1170 (call-with-output-file new-zip
1171 (lambda (output-port)
1172 ((@ (ice-9 binary-ports) put-bytevector)
1173 output-port
1174 #vu8(#x4a #x4d #x01 #x00)) ; JM
1175 ((@ (ice-9 binary-ports) put-bytevector)
1176 output-port
1177 contents)))
1178 (rename-file new-zip zip)))))))
1179 (append (find-files (string-append
1180 (assoc-ref outputs "doc")
1181 "/api")
1182 "\\.zip$")
1183 (find-files (assoc-ref outputs "doc") "src\\.zip$")
1184 (find-files (assoc-ref outputs "jdk") "src\\.zip$")
1185 (find-files (assoc-ref outputs "jdk") "\\.jmod$")
1186 (find-files (assoc-ref outputs "jdk") "\\.diz$")
1187 (find-files (assoc-ref outputs "out") "\\.diz$")
1188
1189 (list (string-append (assoc-ref outputs "jdk")
1190 "/lib/jrt-fs.jar"))
1191 (find-files (string-append (assoc-ref outputs "jdk")
1192 "/demo")
1193 "\\.jar$"))))))))
1194 (inputs
1195 (list alsa-lib
1196 cups
1197 fontconfig
1198 freetype
1199 giflib
1200 lcms
1201 elfutils
1202 libjpeg-turbo
1203 libice
1204 libpng
1205 libx11
1206 libxcomposite
1207 libxi
1208 libxinerama
1209 libxrender
1210 libxt
1211 libxtst))
1212 (native-inputs
1213 (list icedtea-8
1214 `(,icedtea-8 "jdk")
1215 ;; XXX: The build system fails with newer versions of GNU Make.
1216 gnu-make-4.2
1217 nss-certs
1218 unzip
1219 which
1220 zip))
1221 (home-page "https://openjdk.org/projects/jdk9/")
1222 (synopsis "Java development kit")
1223 (description
1224 "This package provides the Java development kit OpenJDK.")
1225 (license license:gpl2+)))
1226
1227(define-public openjdk10
1228 (package
1229 (inherit openjdk9)
1230 (name "openjdk")
1231 (version "10.46")
1232 (source (origin
1233 (method hg-fetch)
1234 (uri (hg-reference (url "https://hg.openjdk.org/jdk/jdk")
1235 (changeset "jdk-10+46")))
1236 (file-name (hg-file-name name version))
1237 (modules '((guix build utils)))
1238 (snippet `(begin
1239 (for-each delete-file
1240 (find-files "." ".*.(bin|exe|jar)$"))))
1241 (sha256
1242 (base32
1243 "0i47ar8lxzjrkkiwbzybfxs473390h4jq9ahm3xqdvy5zpchxy3y"))
1244 (patches (search-patches
1245 "openjdk-10-char-reproducibility.patch"
1246 "openjdk-10-classlist-reproducibility.patch"
1247 "openjdk-10-corba-reproducibility.patch"
1248 "openjdk-10-idlj-reproducibility.patch"
1249 "openjdk-10-module-reproducibility.patch"
1250 "openjdk-10-module3-reproducibility.patch"
1251 "openjdk-10-module4-reproducibility.patch"
1252 "openjdk-10-jar-reproducibility.patch"
1253 "openjdk-10-jtask-reproducibility.patch"
1254 "openjdk-10-pointer-comparison.patch"
1255 "openjdk-10-setsignalhandler.patch"
1256 "openjdk-currency-time-bomb2.patch"))))
1257 (arguments
1258 (substitute-keyword-arguments (package-arguments openjdk9)
1259 ((#:phases phases)
1260 `(modify-phases ,phases
1261 ,@(if (target-aarch64?)
1262 `((replace 'patch-for-aarch64
1263 (lambda _
1264 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1265 ;; This line is duplicated, so remove both occurrences,
1266 ;; then add back one occurrence by substituting a
1267 ;; comment that occurs once.
1268 (("using MacroAssembler::call_VM_leaf_base;") "")
1269 (("Interpreter specific version of call_VM_base")
1270 (string-append "Interpreter specific version of call_VM_base\n"
1271 " using MacroAssembler::call_VM_leaf_base;"))))))
1272 '())
1273 (replace 'fix-java-shebangs
1274 (lambda _
1275 ;; This file was "fixed" by patch-source-shebangs, but it requires
1276 ;; this exact first line.
1277 (substitute* "make/data/blacklistedcertsconverter/blacklisted.certs.pem"
1278 (("^#!.*") "#! java BlacklistedCertsConverter SHA-256\n"))))
1279 (add-after 'unpack 'remove-timestamping
1280 (lambda _
1281 (substitute* "./src/hotspot/share/runtime/vm_version.cpp"
1282 (("__DATE__") "")
1283 (("__TIME__") ""))))
1284 (replace 'configure
1285 (lambda* (#:key inputs outputs #:allow-other-keys)
1286 (invoke "bash" "./configure"
1287 ;; Add flags for compilation with gcc >= 10
1288 ,(string-append "--with-extra-cflags=-fcommon"
1289 " -fno-delete-null-pointer-checks"
1290 " -fno-lifetime-dse"
1291 ;; flags for compilation with gcc >= 14.
1292 " -Wno-error=int-conversion")
1293 (string-append "--with-freetype="
1294 (assoc-ref inputs "freetype"))
1295 "--disable-freetype-bundling"
1296 "--disable-warnings-as-errors"
1297 "--disable-hotspot-gtest"
1298 "--with-giflib=system"
1299 "--with-libjpeg=system"
1300 "--with-native-debug-symbols=zipped"
1301 (string-append "--prefix=" (assoc-ref outputs "out")))))
1302 (add-after 'unpack 'disable-warnings-as-errors
1303 (lambda _
1304 ;; It looks like the "--disable-warnings-as-errors" option of
1305 ;; the 'configure' phase is not working.
1306 (substitute* "make/autoconf/generated-configure.sh"
1307 (("-Werror") ""))))))
1308 ((#:disallowed-references _ '())
1309 `(,(this-package-native-input "openjdk9")
1310 ,(gexp-input (this-package-native-input "openjdk9") "jdk")))))
1311 (native-inputs
1312 `(("openjdk9" ,openjdk9)
1313 ("openjdk9:jdk" ,openjdk9 "jdk")
1314 ("[email protected]" ,gnu-make-4.2)
1315 ("nss-certs" ,nss-certs)
1316 ("unzip" ,unzip)
1317 ("which" ,which)
1318 ("zip" ,zip)))))
1319
1320(define-public openjdk11
1321 (package
1322 (name "openjdk")
1323 (version "11.0.22")
1324 (source (origin
1325 (method url-fetch)
1326 (uri (string-append "https://openjdk-sources.osci.io/openjdk11/openjdk-"
1327 version "-ga.tar.xz"))
1328 (file-name (string-append name "-" version ".tar.xz"))
1329 (sha256
1330 (base32
1331 "18ca4syp9xlrqjgyjkb1sp9835riy6aym5xs81r8byrz6jlb2473"))
1332 (modules '((guix build utils)))
1333 (snippet
1334 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1335 (patches
1336 (search-patches "openjdk-10-module3-reproducibility.patch"
1337 "openjdk-10-module4-reproducibility.patch"
1338 "openjdk-10-char-reproducibility.patch"
1339 "openjdk-11-classlist-reproducibility.patch"
1340 "openjdk-10-jar-reproducibility.patch"
1341 "openjdk-10-jtask-reproducibility.patch"
1342 "openjdk-currency-time-bomb2.patch"))))
1343 (build-system gnu-build-system)
1344 (outputs '("out" "jdk" "doc"))
1345 (arguments
1346 (list
1347 ;; Prevent a java.util.ConcurrentModificationException.
1348 #:parallel-build? #f
1349 #:modules `((guix build gnu-build-system)
1350 (guix build utils)
1351 (ice-9 match)
1352 (ice-9 popen)
1353 (srfi srfi-1)
1354 (srfi srfi-26))
1355
1356 #:disallowed-references
1357 (list (this-package-native-input "openjdk")
1358 (gexp-input (this-package-native-input "openjdk")
1359 "jdk"))
1360
1361 #:tests? #f ; requires jtreg
1362 ;; TODO package jtreg
1363 #:configure-flags
1364 #~(list
1365 ;; Add flags for compilation with gcc >= 10.
1366 #$(string-append "--with-extra-cflags=-fcommon"
1367 " -fno-delete-null-pointer-checks"
1368 " -fno-lifetime-dse"
1369 ;; flags for compilation with gcc >= 14.
1370 " -Wno-error=int-conversion")
1371 ;; Otherwise, the '--enable-fast-install' causes an error.
1372 "--disable-option-checking"
1373 "--disable-warnings-as-errors"
1374 ;; Make validate-runpath pass (see:
1375 ;; http://issues.guix.info/issue/32894).
1376 "--with-native-debug-symbols=zipped"
1377 ;; Do not use the bundled libraries.
1378 "--with-giflib=system"
1379 "--with-lcms=system"
1380 "--with-libjpeg=system"
1381 "--with-libpng=system"
1382 "--with-version-pre="
1383 ;; Should be set by SOURCE_DATE_EPOCH handler, but isn't being
1384 ;; set; do it manually.
1385 "--with-hotspot-build-time=1970-01-01T00:00:01"
1386 "--enable-reproducible-build" ; to be sure
1387 ;; Allow the build system to locate the system freetype.
1388 (string-append "--with-freetype-include="
1389 #$(this-package-input "freetype") "/include")
1390 (string-append "--with-freetype-lib="
1391 #$(this-package-input "freetype") "/lib"))
1392 #:phases
1393 #~(modify-phases %standard-phases
1394 (add-after 'patch-source-shebangs 'fix-java-shebangs
1395 (lambda _
1396 ;; This file was "fixed" by patch-source-shebangs, but it requires
1397 ;; this exact first line.
1398 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1399 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1400 (add-after 'unpack 'remove-timestamping
1401 (lambda _
1402 (substitute* "src/hotspot/share/runtime/abstract_vm_version.cpp"
1403 (("__DATE__") "")
1404 (("__TIME__") ""))))
1405 (add-after 'unpack 'patch-jni-libs
1406 ;; Hardcode dynamically loaded libraries.
1407 (lambda _
1408 (define remove
1409 (@ (srfi srfi-1) remove))
1410
1411 (define (icedtea-or-openjdk? path)
1412 (or (string-contains path "openjdk")
1413 (string-contains path "icedtea")))
1414
1415 (let* ((library-path (remove icedtea-or-openjdk?
1416 (search-path-as-string->list
1417 (getenv "LIBRARY_PATH"))))
1418 (find-library (lambda (name)
1419 (or (search-path
1420 library-path
1421 (string-append "lib" name ".so"))
1422 (string-append "lib" name ".so")))))
1423 (for-each
1424 (lambda (file)
1425 (catch 'decoding-error
1426 (lambda ()
1427 (substitute* file
1428 (("VERSIONED_JNI_LIB_NAME\\(\"([^\"]*)\", \"([^\"]*)\"\\)"
1429 _ name version)
1430 (string-append "\"" (find-library name) "\""))
1431 (("JNI_LIB_NAME\\(\"([^\"]*)\"\\)" _ name)
1432 (string-append "\"" (find-library name) "\""))))
1433 (lambda _
1434 ;; Those are safe to skip.
1435 (format (current-error-port)
1436 "warning: failed to substitute: ~a~%"
1437 file))))
1438 (find-files "." "\\.c$|\\.h$")))))
1439 (add-before 'build 'write-source-revision-file
1440 (lambda _
1441 (with-output-to-file ".src-rev"
1442 (lambda _
1443 (display #$version)))))
1444 (replace 'build
1445 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1446 (apply invoke "make" "all"
1447 `(,@(if parallel-build?
1448 (list (string-append "JOBS="
1449 (number->string (parallel-job-count))))
1450 '("JOBS=1"))
1451 ,@make-flags))))
1452 ;; jdk 11 does not build jre by default any more; so explicitly build
1453 ;; it (see:
1454 ;; https://github.com/AdoptOpenJDK/openjdk-build/issues/356).
1455 (add-after 'build 'build-jre
1456 (lambda* (#:key parallel-build? make-flags #:allow-other-keys)
1457 (apply invoke "make" "legacy-jre-image"
1458 `(,@(if parallel-build?
1459 (list (string-append "JOBS="
1460 (number->string (parallel-job-count))))
1461 '("JOBS=1"))
1462 ,@make-flags))))
1463 (replace 'install
1464 (lambda _
1465 (let ((images (car (find-files "build" "-server-release"
1466 #:directories? #t))))
1467 (copy-recursively (string-append images "/images/jdk")
1468 #$output:jdk)
1469 (copy-recursively (string-append images "/images/jre")
1470 #$output)
1471 (copy-recursively (string-append images "/images/docs")
1472 #$output:doc))))
1473 ;; Some of the libraries in the lib/ folder link to libjvm.so.
1474 ;; But that shared object is located in the server/ folder, so it
1475 ;; cannot be found. This phase creates a symbolic link in the
1476 ;; lib/ folder so that the other libraries can find it.
1477 ;;
1478 ;; See:
1479 ;; https://lists.gnu.org/archive/html/guix-devel/2017-10/msg00169.html
1480 ;;
1481 ;; FIXME: Find the bug in the build system, so that this symlink is
1482 ;; not needed.
1483 (add-after 'install 'install-libjvm
1484 (lambda _
1485 (let ((lib-out (string-append #$output "/lib"))
1486 (lib-jdk (string-append #$output:jdk "/lib")))
1487 (symlink (string-append lib-jdk "/server/libjvm.so")
1488 (string-append lib-jdk "/libjvm.so"))
1489 (symlink (string-append lib-out "/server/libjvm.so")
1490 (string-append lib-out "/libjvm.so")))))
1491 (add-after 'install 'strip-character-data-timestamps
1492 (lambda _
1493 (let ((archive (string-append #$output:jdk "/lib/src.zip"))
1494 (dir (mkdtemp "zip-contents.XXXXXX")))
1495 (with-directory-excursion dir
1496 (invoke "unzip" archive))
1497 (delete-file archive)
1498 (with-directory-excursion dir
1499 (let ((char-data-files (find-files "." "CharacterData")))
1500 (for-each (lambda (file)
1501 (substitute* file
1502 (((string-append "This file was generated "
1503 "AUTOMATICALLY from a template "
1504 "file.*"))
1505 (string-append "This file was generated "
1506 "AUTOMATICALLY from a template "
1507 "file"))))
1508 char-data-files)))
1509 (with-directory-excursion dir
1510 (let ((files (find-files "." #:directories? #t)))
1511 (apply invoke "zip" "-0" "-X" archive files))))))
1512 (add-after 'strip-character-data-timestamps 'remove-extraneous-files
1513 (lambda* (#:key outputs #:allow-other-keys)
1514 ;; Remove the *.diz and src.zip files for space considerations.
1515 ;; The former are compressed debuginfo files not typically
1516 ;; shipped with Java distributions, while the later corresponds
1517 ;; to Java core API source files.
1518 (for-each delete-file
1519 (append-map (cut find-files <> "(^src\\.zip|\\.diz)$")
1520 (map (match-lambda
1521 ((name . dir)
1522 dir))
1523 outputs)))))
1524 (add-after 'remove-extraneous-files 'strip-archive-timestamps
1525 (lambda _
1526 (use-modules (ice-9 binary-ports)
1527 (rnrs bytevectors))
1528 (letrec ((repack-archive
1529 (lambda (archive)
1530 (let ((dir (mkdtemp "zip-contents.XXXXXX")))
1531 (with-directory-excursion dir
1532 (invoke "unzip" archive))
1533 (delete-file archive)
1534 (for-each (compose repack-archive canonicalize-path)
1535 (find-files dir "(ct\\.sym|\\.jar)$"))
1536 (let ((reset-file-timestamp
1537 (lambda (file)
1538 (let ((s (lstat file)))
1539 (unless (eq? (stat:type s) 'symlink)
1540 (format #t "reset ~a~%" file)
1541 (utime file 0 0 0 0))))))
1542 (for-each reset-file-timestamp
1543 (find-files dir #:directories? #t)))
1544 (with-directory-excursion dir
1545 (let ((files (find-files "." #:directories? #t)))
1546 (apply invoke "zip" "-0" "-X" archive files)))))))
1547 (for-each repack-archive
1548 (find-files #$output:doc "\\.zip$"))
1549 (for-each repack-archive
1550 (find-files #$output:jdk "\\.(zip|jar)$"))
1551 (repack-archive (string-append #$output:jdk "/lib/ct.sym"))
1552 (let ((repack-jmod
1553 (lambda (file-name)
1554 (call-with-input-file file-name
1555 (lambda (file)
1556 (let ((header #vu8(#x4a #x4d #x01 #x00)))
1557 (if (equal? (get-bytevector-n
1558 file (bytevector-length header))
1559 header)
1560 (let* ((header-length (bytevector-length header))
1561 (temp-file (mkstemp!
1562 (string-copy
1563 "temp-file.XXXXXX")))
1564 (temp-filename (port-filename temp-file))
1565 (content-length
1566 (- (stat:size (stat file))
1567 header-length)))
1568 (sendfile temp-file file content-length header-length)
1569 (delete-file file-name)
1570 (close-port temp-file)
1571 (repack-archive (canonicalize-path temp-filename))
1572 (call-with-output-file file-name
1573 (lambda (file)
1574 (put-bytevector file header)
1575 (call-with-input-file temp-filename
1576 (lambda (temp-file)
1577 (sendfile
1578 file temp-file
1579 (stat:size (stat temp-file)) 0)))))))))))))
1580 (for-each repack-jmod
1581 (find-files #$output:jdk "\\.jmod$"))))))
1582 (add-after 'install 'remove-timestamp-from-api-summary
1583 (lambda _
1584 (substitute* (string-append #$output:doc
1585 "/api/overview-summary.html")
1586 (("Generated by javadoc \\(11-internal\\).*$")
1587 "Generated by javadoc (11-internal) -->\n")))))))
1588 (inputs
1589 (list alsa-lib
1590 cups
1591 fontconfig
1592 freetype
1593 giflib
1594 lcms
1595 libjpeg-turbo
1596 libpng
1597 libx11
1598 libxext
1599 libxrandr
1600 libxrender
1601 libxt
1602 libxtst))
1603 (native-inputs
1604 (list autoconf
1605 bash ; not bash-minimal, needs ulimit
1606 openjdk10
1607 `(,openjdk10 "jdk")
1608 gnu-make-4.2
1609 nss-certs
1610 pkg-config
1611 unzip
1612 which
1613 zip))
1614 (home-page "https://openjdk.org/projects/jdk/11/")
1615 (synopsis "Java development kit")
1616 (description
1617 "This package provides the Java development kit OpenJDK.")
1618 (license license:gpl2+)))
1619
1620(define-syntax make-openjdk
1621 ;; Return an OpenJDK package at VERSION with checksum HASH, using BOOTSTRAP,
1622 ;; the bootstrap package. One or more FIELD can be provided to further
1623 ;; refine the package definition; for convenience, the BASE, NAME and
1624 ;; VERSION are defined in their scope.
1625 (lambda (x)
1626 (syntax-case x ()
1627 ((_ bootstrap version* hash field ...)
1628 (with-syntax ((base (datum->syntax x 'base))
1629 (name (datum->syntax x 'name))
1630 (version (datum->syntax x 'version)))
1631 #'(let ((base (package
1632 (inherit bootstrap)
1633 (name "openjdk")
1634 (version version*)
1635 (source
1636 (origin
1637 (inherit (package-source bootstrap))
1638 (method git-fetch)
1639 (uri (git-reference
1640 (url (format
1641 #f "https://github.com/openjdk/jdk~au"
1642 (version-major version*)))
1643 (commit (string-append "jdk-" version*
1644 "-ga"))))
1645 (file-name (git-file-name name version))
1646 (sha256 (base32 hash))))
1647 (properties
1648 '((release-tag-prefix . "jdk-")
1649 (release-tag-suffix . "-ga")
1650 (release-tag-version-delimiter . ".")))
1651 (native-inputs
1652 (modify-inputs (package-native-inputs bootstrap)
1653 (replace "openjdk" bootstrap)))
1654 (home-page (string-append
1655 "https://openjdk.java.net/projects/jdk/"
1656 (version-major version)))))
1657 (name "openjdk")
1658 (version version*))
1659 (package
1660 (inherit base)
1661 field
1662 ...)))))))
1663
1664(define-public openjdk12
1665 (make-openjdk
1666 openjdk11 "12.33" "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"
1667 (source
1668 (origin
1669 (method url-fetch)
1670 (uri "http://hg.openjdk.java.net/jdk/jdk/archive/0276cba45aac.tar.bz2")
1671 (file-name (string-append name "-" version ".tar.bz2"))
1672 (sha256
1673 (base32
1674 "0pi2gwib3j2imi4l623iaywrmvfh9rqzh82lj2gxqbrmg55swvjf"))
1675 (modules '((guix build utils)))
1676 (snippet
1677 '(for-each delete-file (find-files "." "\\.(bin|exe|jar)$")))
1678 (patches (search-patches "openjdk-10-setsignalhandler.patch"))))
1679 (arguments
1680 (substitute-keyword-arguments (package-arguments openjdk11)
1681 ;; Re-enable parallel build.
1682 ((#:parallel-build? _ #t) #t)
1683 ((#:phases phases)
1684 #~(modify-phases #$phases
1685 #$@(if (target-aarch64?)
1686 #~((add-after 'unpack 'patch-for-aarch64
1687 (lambda _
1688 (substitute* "src/hotspot/cpu/aarch64/interp_masm_aarch64.hpp"
1689 ;; This line is duplicated, so remove both occurrences,
1690 ;; then add back one occurrence by substituting a
1691 ;; comment that occurs once.
1692 (("using MacroAssembler::call_VM_leaf_base;") "")
1693 (("Interpreter specific version of call_VM_base")
1694 (string-append "Interpreter specific version of call_VM_base\n"
1695 " using MacroAssembler::call_VM_leaf_base;"))))))
1696 #~())
1697 (replace 'remove-timestamping
1698 (lambda _
1699 (substitute* "src/hotspot/share/runtime/vm_version.cpp"
1700 (("__DATE__") "")
1701 (("__TIME__") ""))))
1702 (replace 'fix-java-shebangs
1703 (lambda _
1704 ;; 'blocked' was renamed to 'blacklisted' in this version for
1705 ;; some reason.
1706 (substitute* "make/data/blacklistedcertsconverter/\
1707blacklisted.certs.pem"
1708 (("^#!.*")
1709 "#! java BlacklistedCertsConverter SHA-256\n"))))))))))
1710
1711(define-public openjdk13
1712 (make-openjdk openjdk12 "13.0.14"
1713 "1v92i5rhahqkjw8mz09c9qasnxqc67ygy0y266kdmm534z0da755"
1714 (source (origin
1715 (inherit (package-source base))
1716 (patches (search-patches "openjdk-13-classlist-reproducibility.patch"
1717 "openjdk-10-jtask-reproducibility.patch"))))
1718 (arguments
1719 (substitute-keyword-arguments (package-arguments openjdk12)
1720 ((#:phases phases)
1721 #~(modify-phases #$phases
1722 (replace 'remove-timestamping
1723 (lambda _
1724 (substitute*
1725 "src/hotspot/share/runtime/abstract_vm_version.cpp"
1726 (("__DATE__") "")
1727 (("__TIME__") ""))))))))))
1728
1729(define-public openjdk14
1730 (make-openjdk
1731 openjdk13 "14.0.2"
1732 "07k9bsbxwyf2z2n50z96nvhsdai916mxdxcr5lm44jz7f6xrwfq6"
1733 (source (origin
1734 (inherit (package-source base))
1735 (snippet ;override snippet
1736 '(begin
1737 ;; The m4 macro uses 'help' to search for builtins, which is
1738 ;; not available in bash-minimal
1739 (substitute* "make/autoconf/basics.m4"
1740 (("if help") "if command -v"))
1741 (for-each delete-file (find-files "." "\\.(bin|exe|jar)$"))))
1742 (patches (search-patches "openjdk-10-setsignalhandler.patch"
1743 "openjdk-10-jtask-reproducibility.patch"
1744 "openjdk-13-classlist-reproducibility.patch"))))))
1745
1746(define-public openjdk15
1747 (make-openjdk
1748 openjdk14 "15.0.10"
1749 "0hdllv348bws6m992bh73jik18x0sv0k2m9l817b3zb7q802sp7x"
1750 (source (origin
1751 (inherit (package-source base))
1752 (modules '())
1753 (snippet #f)
1754 (patches
1755 (search-patches "openjdk-15-jtask-reproducibility.patch"
1756 "openjdk-15-xcursor-no-dynamic.patch"))))
1757 (inputs
1758 (modify-inputs (package-inputs base)
1759 (append libxcursor))) ;for our patch to work
1760 (native-inputs
1761 (modify-inputs (package-native-inputs base)
1762 (delete "make" ;remove old gnu-make-4.2
1763 "openjdk") ;to remove non-jdk output
1764 (append `(,openjdk14 "jdk"))))))
1765
1766(define-public openjdk16
1767 (make-openjdk openjdk15 "16.0.2"
1768 "0587px2qbz07g3xi4a3ya6m630p72dvkxcn0bj1813pxnwvcgigz"
1769 (source (origin
1770 (inherit (package-source base))
1771 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"
1772 "openjdk-10-setsignalhandler.patch"))))))
1773
1774(define-public openjdk17
1775 (make-openjdk
1776 openjdk16 "17.0.10"
1777 "1bq1rqnipz6wdr05s20gm8nlpb3328ljxckzvc5ag0gf7fzlhn5f"
1778 (source (origin
1779 (inherit (package-source base))
1780 (patches (search-patches "openjdk-15-xcursor-no-dynamic.patch"))))
1781 (arguments
1782 (substitute-keyword-arguments (package-arguments openjdk16)
1783 ((#:phases phases)
1784 #~(modify-phases #$phases
1785 (replace 'fix-java-shebangs
1786 (lambda _
1787 ;; 'blacklisted' was renamed back to 'blocked'.
1788 (substitute* "make/data/blockedcertsconverter/blocked.certs.pem"
1789 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1790
1791(define-public openjdk18
1792 (make-openjdk openjdk17 "18.0.2.1"
1793 "0zxanjzz4p3psqahlidh55vx1ldanq70c2ygk3gcfn9a94vnr9rg"))
1794
1795(define-public openjdk19
1796 (make-openjdk openjdk18 "19.0.2"
1797 "08kvx7n8qhhfl25pig966881j5h4x7y0pf4brq16x0283fc0f4d4"
1798 (arguments
1799 (substitute-keyword-arguments (package-arguments openjdk18)
1800 ((#:phases phases)
1801 #~(modify-phases #$phases
1802 (replace 'fix-java-shebangs
1803 (lambda _
1804 ;; Update file path.
1805 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1806 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))
1807 (add-before 'configure 'define-java-environment-variables
1808 (lambda* (#:key inputs #:allow-other-keys)
1809 ;; Fix for "valid range 1980-01-01T00:00:02Z to 2099-12-31T23:59:59Z".
1810 (setenv "SOURCE_DATE_EPOCH" "1234567890")))))))))
1811
1812(define-public openjdk20
1813 (make-openjdk openjdk19 "20.0.2"
1814 "1af1v2c3d8x4c6shzl6cv9qwq7a4hn5map5pjh9vjcky0hkzd489"))
1815
1816(define-public openjdk21
1817 (make-openjdk openjdk20 "21.0.2"
1818 "0d1g3wnzr5whjpq8gvxq0h7kd7lxd3xgc6bh3kg8vzz096asn0kj"
1819 (source (origin
1820 (inherit (package-source base))
1821 (patches (search-patches "openjdk-21-fix-rpath.patch"
1822 "openjdk-15-xcursor-no-dynamic.patch"))))
1823 (arguments
1824 (substitute-keyword-arguments (package-arguments base)
1825 ((#:phases phases)
1826 #~(modify-phases #$phases
1827 (replace 'fix-java-shebangs
1828 (lambda _
1829 ;; 'blacklisted' was renamed back to 'blocked'.
1830 (substitute* "src/java.base/share/data/blockedcertsconverter/blocked.certs.pem"
1831 (("^#!.*") "#! java BlockedCertsConverter SHA-256\n"))))))))))
1832
1833(define-public openjdk22
1834 (make-openjdk
1835 openjdk21 "22.0.2"
1836 "1nj414yj6v9qrlm48yv5llr4jmgj9g20v6zsd39xrdx4x4x4p3b6"
1837 (arguments
1838 (substitute-keyword-arguments (package-arguments base)
1839 ((#:phases phases)
1840 #~(modify-phases #$phases
1841 (add-after 'unpack 'do-not-disable-new-dtags
1842 (lambda _
1843 ;; Our validate-runpath phases checks for RUNPATH, not RPATH.
1844 (substitute* "make/autoconf/flags-cflags.m4"
1845 ((" -Wl,--disable-new-dtags") ""))))))))))
1846
1847(define-public openjdk23
1848 (make-openjdk
1849 openjdk22 "23.0.2"
1850 "0kxllznzhgqfn8b97krg2yp1ag41g4phmgqahrvzafd2bq6zclnf"
1851 (source (origin
1852 (inherit (package-source base))
1853 ;; The 'openjdk-21-fix-rpath.patch' no longer applies, and it
1854 ;; appears not needed anymore. The
1855 ;; 'openjdk-15-xcursor-no-dynamic.patch' doesn't apply anymore;
1856 ;; the fix should be pursued in libx11 (see:
1857 ;; https://issues.guix.gnu.org/54654)
1858 (patches '())))))
1859
1860(define-public openjdk24
1861 (make-openjdk
1862 openjdk23 "24.0.1"
1863 "0h6sbzbjyqg85iml41pswdh2z3d7h2hhb0sd5yll37r1mj5lsxmx"))
1864
1865(define-public openjdk25
1866 (make-openjdk
1867 openjdk24 "25"
1868 "15yzj370qgkh7jfcm2jzr8g7ah9x0p8m85ang7q4y6lnzk23ni76"))
1869
1870;;; Convenience alias to point to the latest version of OpenJDK.
1871(define-public openjdk openjdk25)
1872
1873
1874;; This version of JBR is here in order to be able to build custom
1875;; IntelliJ plugins. Those usually need both jbr11 and jbr17 for
1876;; tests.
1877(define-public jbr11
1878 (package
1879 (inherit openjdk11)
1880 (name "jbr")
1881 (version "11_0_16-b2248")
1882 (source (origin
1883 (method git-fetch)
1884 (uri (git-reference
1885 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1886 (commit (string-append "jb" version))))
1887 (file-name (string-append name "-" version "-checkout"))
1888 (sha256
1889 (base32
1890 "1fnrdx0wb21ghm6jczjzk7b9fz9hbdzd62512xhwpzvca57v2z09"))))
1891 (arguments
1892 (substitute-keyword-arguments (package-arguments openjdk11)
1893 ((#:configure-flags configure-flags)
1894 #~(append #$configure-flags
1895 (list "--with-jvm-features=shenandoahgc"
1896 "--enable-cds=yes"
1897 "--with-vendor-name=JetBrains s.r.o"
1898 "--with-vendor-url=https://www.jetbrains.com/"
1899 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1900 (synopsis "JetBrains Java Runtime")
1901 (description "This package provides a Java runtime environment for
1902and Java development kit. It supports enhanced class redefinition (DCEVM),
1903includes a number of improvements in font rendering, keyboards support,
1904windowing/focus subsystems, HiDPI, accessibility, and performance,
1905provides better desktop integration and bugfixes not yet present in
1906OpenJDK.")
1907 (home-page "https://www.jetbrains.com/")
1908 (license license:gpl2+)))
1909
1910(define-public jbr17
1911 (package
1912 (inherit openjdk17)
1913 (name "jbr")
1914 (version "17.0.11b1207.30")
1915 (source (origin
1916 (method git-fetch)
1917 (uri (git-reference
1918 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1919 (commit (string-append "jbr-release-" version))))
1920 (file-name (string-append name "-" version "-checkout"))
1921 (sha256
1922 (base32
1923 "5bbf5z8faf9sdkig2fwkj06hb7hs9s3bpzzvbqn2i75lbwqk3bln"))
1924 (patches (search-patches "jbr-17-xcursor-no-dynamic.patch"))))
1925 (arguments
1926 (substitute-keyword-arguments (package-arguments openjdk17)
1927 ((#:configure-flags configure-flags)
1928 #~(append #$configure-flags
1929 (list "--with-jvm-features=shenandoahgc"
1930 "--enable-cds=yes"
1931 "--with-vendor-name=JetBrains s.r.o"
1932 "--with-vendor-url=https://www.jetbrains.com/"
1933 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1934 (synopsis "JetBrains Java Runtime")
1935 (description "This package provides a Java runtime environment for
1936and Java development kit. It supports enhanced class redefinition (DCEVM),
1937includes a number of improvements in font rendering, keyboards support,
1938windowing/focus subsystems, HiDPI, accessibility, and performance,
1939provides better desktop integration and bugfixes not yet present in
1940OpenJDK.")
1941 (home-page "https://www.jetbrains.com/")
1942 (license license:gpl2+)))
1943
1944(define-public jbr21
1945 (package
1946 (inherit openjdk21)
1947 (name "jbr")
1948 (version "21.0.3b509.11")
1949 (source (origin
1950 (method git-fetch)
1951 (uri (git-reference
1952 (url "https://github.com/JetBrains/JetBrainsRuntime.git")
1953 (commit (string-append "jbr-release-" version))))
1954 (file-name (string-append name "-" version "-checkout"))
1955 (sha256
1956 (base32
1957 "03xkghbp0b1czc2ags9n8ilprf9sy4bhsma0wf8xfapqn6d2sfyd"))
1958 (patches (search-patches "openjdk-21-fix-rpath.patch"
1959 "jbr-17-xcursor-no-dynamic.patch"))))
1960 (inputs
1961 `(("wayland" ,wayland)
1962 ("libxkbcommon" ,libxkbcommon) ; for wayland
1963 ,@(package-inputs openjdk21)))
1964 (arguments
1965 (substitute-keyword-arguments (package-arguments openjdk21)
1966 ((#:configure-flags configure-flags)
1967 #~(append #$configure-flags
1968 (list "--with-jvm-features=shenandoahgc"
1969 "--enable-cds=yes"
1970 "--with-vendor-name=JetBrains s.r.o"
1971 "--with-vendor-url=https://www.jetbrains.com/"
1972 "--with-vendor-bug-url=https://youtrack.jetbrains.com/issues/JBR")))))
1973 (synopsis "JetBrains Java Runtime")
1974 (description "This package provides a Java runtime environment for
1975and Java development kit. It supports enhanced class redefinition (DCEVM),
1976includes a number of improvements in font rendering, keyboards support,
1977windowing/focus subsystems, HiDPI, accessibility, and performance,
1978provides better desktop integration and bugfixes not yet present in
1979OpenJDK.")
1980 (home-page "https://www.jetbrains.com/")
1981 (license license:gpl2+)))
1982
1983
1984(define-public ant/java8
1985 (package
1986 (name "ant")
1987 (version "1.10.15")
1988 (source (origin
1989 (method url-fetch)
1990 (uri (string-append "mirror://apache/ant/source/apache-ant-"
1991 version "-src.tar.gz"))
1992 (sha256
1993 (base32
1994 "1ccr852dxg5affdqafg04gi3l89q5c6l9lqrz50jhj05kidljax2"))
1995 (modules '((guix build utils)))
1996 (snippet
1997 '(begin
1998 (for-each delete-file
1999 (find-files "lib/optional" "\\.jar$"))
2000 #t))))
2001 (build-system gnu-build-system)
2002 (arguments
2003 (list
2004 #:modules '((srfi srfi-1)
2005 (guix build gnu-build-system)
2006 (guix build utils))
2007 #:tests? #f ;no "check" target
2008 #:phases
2009 #~(modify-phases %standard-phases
2010 (add-after 'unpack 'remove-scripts
2011 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2012 ;; wrappers.
2013 (lambda _
2014 (for-each delete-file
2015 (find-files "src/script"
2016 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))))
2017 (delete 'bootstrap)
2018 (delete 'configure)
2019 (replace 'build
2020 (lambda* (#:key inputs #:allow-other-keys)
2021 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2022
2023 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2024 ;; Ant to build. This is necessary in addition to disabling the
2025 ;; "check" phase, because the dependency on "test-jar" would always
2026 ;; result in the tests to be run.
2027 (substitute* "build.xml"
2028 (("depends=\"jars,test-jar") "depends=\"jars"))
2029 (invoke "bash" "bootstrap.sh"
2030 (string-append "-Ddist.dir=" #$output))))
2031 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2032 (lambda _
2033 (define (repack-archive jar)
2034 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2035 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2036 (with-directory-excursion dir
2037 (invoke "unzip" jar))
2038 (delete-file jar)
2039 ;; XXX: copied from (gnu build install)
2040 (for-each (lambda (file)
2041 (let ((s (lstat file)))
2042 (unless (eq? (stat:type s) 'symlink)
2043 (utime file 0 0 0 0))))
2044 (find-files dir #:directories? #t))
2045 ;; It is important that the manifest appears first.
2046 (with-directory-excursion dir
2047 (let* ((files (find-files "." ".*" #:directories? #t))
2048 ;; To ensure that the reference scanner can
2049 ;; detect all store references in the jars
2050 ;; we disable compression with the "-0" option.
2051 (command (if (file-exists? manifest)
2052 `("zip" "-0" "-X" ,jar ,manifest
2053 ,@files)
2054 `("zip" "-0" "-X" ,jar ,@files))))
2055 (apply invoke command)))))
2056 (for-each repack-archive
2057 (find-files
2058 (string-append #$output "/lib")
2059 "\\.jar$"))))
2060 (delete 'install))))
2061 (native-inputs
2062 `(("jdk" ,icedtea-8 "jdk")
2063 ("zip" ,zip)
2064 ("unzip" ,unzip)))
2065 (home-page "https://ant.apache.org")
2066 (synopsis "Build tool for Java")
2067 (description
2068 "Ant is a platform-independent build tool for Java. It is similar to
2069make but is implemented using the Java language, requires the Java platform,
2070and is best suited to building Java projects. Ant uses XML to describe the
2071build process and its dependencies, whereas Make uses Makefile format.")
2072 (license license:asl2.0)))
2073
2074;; The 1.9.x series is the last that can be built with GCJ. The 1.10.x series
2075;; requires Java 8.
2076(define-public ant
2077 (package (inherit ant/java8)
2078 (version "1.9.15")
2079 (source (origin
2080 (method url-fetch)
2081 (uri (string-append "mirror://apache/ant/source/apache-ant-"
2082 version "-src.tar.gz"))
2083 (sha256
2084 (base32
2085 "1xy30f1w5gaqk6g3f0vw7ygix4rb6032qkcw42y4z8wd9jihgygd"))))
2086 ;; XXX: we do this to avoid a rebuild. This mess will be cleaned up
2087 ;; later.
2088 (arguments
2089 (substitute-keyword-arguments
2090 `(#:modules ((srfi srfi-1)
2091 (guix build gnu-build-system)
2092 (guix build utils))
2093 #:tests? #f ; no "check" target
2094 #:phases
2095 (modify-phases %standard-phases
2096 (delete 'bootstrap)
2097 (delete 'configure)
2098 (add-before 'build 'define-java-environment-variables
2099 (lambda* (#:key inputs #:allow-other-keys)
2100 ;; First, set environment variables (eases debugging on -K).
2101 (setenv "JAVA_HOME" (assoc-ref inputs "jamvm"))
2102 (setenv "JAVACMD" (search-input-file inputs "/bin/jamvm"))
2103 (setenv "JAVAC" (search-input-file inputs "/bin/jikes"))
2104 (setenv "CLASSPATH" (search-input-file inputs "/lib/rt.jar"))))
2105 (replace 'build
2106 (lambda* (#:key inputs outputs #:allow-other-keys)
2107 ;; Ant complains if this file doesn't exist.
2108 (setenv "HOME" "/tmp")
2109 (with-output-to-file "/tmp/.ant.properties"
2110 (lambda _ (display "")))
2111
2112 ;; Use jikes instead of javac for <javac ...> tags in build.xml
2113 (setenv "ANT_OPTS" "-Dbuild.compiler=jikes")
2114
2115 ;; jikes produces lots of warnings, but they are not very
2116 ;; interesting, so we silence them.
2117 (setenv "$BOOTJAVAC_OPTS" "-nowarn")
2118
2119 ;; Without these JamVM options the build may freeze.
2120 (substitute* "bootstrap.sh"
2121 (("^\"\\$\\{JAVACMD\\}\" " m)
2122 ,@(if (string-prefix? "armhf" (or (%current-system)
2123 (%current-target-system)))
2124 `((string-append m "-Xnocompact "))
2125 `((string-append m "-Xnocompact -Xnoinlining ")))))
2126
2127 ;; Disable tests because we are bootstrapping and thus don't have
2128 ;; any of the dependencies required to build and run the tests.
2129 (substitute* "build.xml"
2130 (("depends=\"jars,test-jar\"") "depends=\"jars\""))
2131 (invoke "bash" "bootstrap.sh"
2132 (string-append "-Ddist.dir="
2133 (assoc-ref outputs "out")))))
2134 (add-after 'build 'strip-jar-timestamps ;based on ant-build-system
2135 (lambda* (#:key outputs #:allow-other-keys)
2136 (define (repack-archive jar)
2137 (let* ((dir (mkdtemp "jar-contents.XXXXXX"))
2138 (manifest (string-append dir "/META-INF/MANIFESTS.MF")))
2139 (with-directory-excursion dir
2140 (invoke "unzip" jar))
2141 (delete-file jar)
2142 ;; XXX: copied from (gnu build install)
2143 (for-each (lambda (file)
2144 (let ((s (lstat file)))
2145 (unless (eq? (stat:type s) 'symlink)
2146 (utime file 0 0 0 0))))
2147 (find-files dir #:directories? #t))
2148 ;; It is important that the manifest appears first.
2149 (with-directory-excursion dir
2150 (let* ((files (find-files "." ".*" #:directories? #t))
2151 ;; To ensure that the reference scanner can
2152 ;; detect all store references in the jars
2153 ;; we disable compression with the "-0" option.
2154 (command (if (file-exists? manifest)
2155 `("zip" "-0" "-X" ,jar ,manifest
2156 ,@files)
2157 `("zip" "-0" "-X" ,jar ,@files))))
2158 (apply invoke command)))))
2159 (for-each repack-archive
2160 (find-files
2161 (string-append (assoc-ref %outputs "out") "/lib")
2162 "\\.jar$"))))
2163 (delete 'install)))
2164 ((#:phases phases)
2165 `(modify-phases ,phases
2166 (delete 'define-java-environment-variables)
2167 (add-after 'unpack 'remove-scripts
2168 ;; Remove bat / cmd scripts for DOS as well as the antRun and runant
2169 ;; wrappers.
2170 (lambda _
2171 (for-each delete-file
2172 (find-files "src/script"
2173 "(.*\\.(bat|cmd)|runant.*|antRun.*)"))
2174 #t))
2175 (replace 'build
2176 (lambda* (#:key inputs outputs #:allow-other-keys)
2177 (setenv "JAVA_HOME" (assoc-ref inputs "jdk"))
2178
2179 ;; Disable tests to avoid dependency on hamcrest-core, which needs
2180 ;; Ant to build. This is necessary in addition to disabling the
2181 ;; "check" phase, because the dependency on "test-jar" would always
2182 ;; result in the tests to be run.
2183 (substitute* "build.xml"
2184 (("depends=\"jars,test-jar") "depends=\"jars"))
2185 (invoke "bash" "bootstrap.sh"
2186 (string-append "-Ddist.dir="
2187 (assoc-ref outputs "out")))))))))
2188 (native-inputs
2189 `(("jdk" ,icedtea-7 "jdk")
2190 ("zip" ,zip)
2191 ("unzip" ,unzip)))))
2192
2193(define-public ant-apache-bcel
2194 (package
2195 (inherit ant/java8)
2196 (name "ant-apache-bcel")
2197 (arguments
2198 (substitute-keyword-arguments (package-arguments ant/java8)
2199 ((#:phases phases)
2200 #~(modify-phases #$phases
2201 (add-after 'unpack 'link-bcel
2202 (lambda* (#:key inputs #:allow-other-keys)
2203 (for-each (lambda (file)
2204 (symlink file
2205 (string-append "lib/optional/"
2206 (basename file))))
2207 (find-files (assoc-ref inputs "java-commons-bcel")
2208 "\\.jar$"))))
2209 (add-after 'build 'install
2210 (lambda _
2211 (let ((share (string-append #$output "/share/java"))
2212 (bin (string-append #$output "/bin"))
2213 (lib (string-append #$output "/lib")))
2214 (mkdir-p share)
2215 (install-file (string-append lib "/ant-apache-bcel.jar") share)
2216 (delete-file-recursively bin)
2217 (delete-file-recursively lib))))))))
2218 (inputs
2219 (modify-inputs (package-inputs ant/java8)
2220 (prepend java-commons-bcel)))))
2221
2222(define-public ant-junit
2223 (package
2224 (inherit ant/java8)
2225 (name "ant-junit")
2226 (arguments
2227 (substitute-keyword-arguments (package-arguments ant/java8)
2228 ((#:phases phases)
2229 #~(modify-phases #$phases
2230 (add-after 'unpack 'link-junit
2231 (lambda* (#:key inputs #:allow-other-keys)
2232 (for-each (lambda (file)
2233 (symlink file
2234 (string-append "lib/optional/"
2235 (basename file))))
2236 (find-files (assoc-ref inputs "java-junit")
2237 "\\.jar$"))))
2238 (add-after 'build 'install
2239 (lambda _
2240 (let ((share (string-append #$output "/share/java"))
2241 (bin (string-append #$output "/bin"))
2242 (lib (string-append #$output "/lib")))
2243 (mkdir-p share)
2244 (install-file (string-append lib "/ant-junit.jar") share)
2245 (delete-file-recursively bin)
2246 (delete-file-recursively lib))))))))
2247 (inputs
2248 (modify-inputs (package-inputs ant/java8)
2249 (prepend java-junit)))))
2250
2251(define-public libantlr3c
2252 (package
2253 (name "libantlr3c")
2254 (version "3.4")
2255 (source
2256 (origin
2257 (method url-fetch)
2258 (uri
2259 (string-append "https://www.antlr3.org/download/C/"
2260 name "-" version ".tar.gz"))
2261 (sha256
2262 (base32 "0lpbnb4dq4azmsvlhp6khq1gy42kyqyjv8gww74g5lm2y6blm4fa"))))
2263 (build-system gnu-build-system)
2264 (arguments
2265 (list #:configure-flags
2266 #~(list "--enable-debuginfo"
2267 "--disable-static"
2268 #$@(if (target-64bit?)
2269 #~("--enable-64bit")
2270 #~())
2271 #$@(if (target-riscv64?)
2272 #~("--disable-abiflags")
2273 #~()))))
2274 (synopsis "ANTLR C Library")
2275 (description "LIBANTLR3C provides run-time C libraries for ANTLR3 (ANother
2276Tool for Language Recognition v3).")
2277 (home-page "https://www.antlr3.org/")
2278 (license license:bsd-3)))
2279
2280(define-public drip
2281 ;; Last release is from 2014, with a few important commits afterwards.
2282 (let ((commit "a4bd00df0199e78243847f06cc04ecaea31f8f08"))
2283 (package
2284 (name "drip")
2285 (version (git-version "0.2.4" "1" commit))
2286 (source (origin
2287 (method git-fetch)
2288 (uri (git-reference
2289 (url "https://github.com/ninjudd/drip")
2290 (commit commit)))
2291 (file-name (git-file-name name version))
2292 (sha256
2293 (base32
2294 "0wzmjwfyldr3jn49517xd8yn7dgdk8h88qkga3kjyg1zc375ylg2"))))
2295 (build-system gnu-build-system)
2296 (native-inputs
2297 `(("jdk" ,icedtea "jdk")))
2298 (arguments
2299 (list #:tests? #f ; No tests.
2300 #:phases
2301 #~(modify-phases %standard-phases
2302 (delete 'configure)
2303 (add-before 'build 'relax-gcc-14-strictness
2304 (lambda _
2305 (substitute* "Makefile"
2306 ((" gcc(.*)$" all options)
2307 (string-append
2308 " gcc"
2309 " -Wno-error=incompatible-pointer-types"
2310 " -Wno-error=implicit-function-declaration"
2311 options)))))
2312 (add-before 'install 'fix-wrapper
2313 (lambda* (#:key inputs #:allow-other-keys)
2314 (let ((jps (search-input-file inputs "/bin/jps")))
2315 (substitute* "bin/drip"
2316 (("jps") jps)
2317 (("brew update && brew upgrade drip") "guix pull && guix install drip")
2318 ;; No need to make:
2319 (("\\(cd -- \"\\$drip_dir\" && make -s\\) \\|\\| exit 1") "")
2320 ;; No need to include source:
2321 (("\\[\\[ -r \\$drip_dir/src/org/flatland/drip/Main\\.java \\]\\]")
2322 "true")))))
2323 (replace 'install
2324 (lambda* (#:key outputs #:allow-other-keys)
2325 (let* ((bin (string-append #$output "/bin"))
2326 (share (string-append #$output "/share/drip")))
2327 (mkdir-p bin)
2328 (for-each
2329 (lambda (file)
2330 (install-file (string-append "bin/" file) bin))
2331 '("drip" "drip_daemon" "drip_proxy"))
2332 (install-file "drip.jar" share)
2333 (substitute* (string-append bin "/drip")
2334 (("drip_dir=\\$bin_dir/..")
2335 (string-append "drip_dir=" share)))))))))
2336 (home-page "https://github.com/ninjudd/drip")
2337 (synopsis "Faster Java Virtual Machine launching")
2338 (description "Drip is a launcher for the Java Virtual Machine that
2339provides much faster startup times than the @command{java} command. The @command{drip}
2340script is intended to be a drop-in replacement for the @command{java} command,
2341only faster.")
2342 (license license:epl1.0))))
2343
2344(define-public java-openjfx-build
2345 (package
2346 (name "java-openjfx-build")
2347 ;; This is a java-8 version
2348 (version "8.202")
2349 (source (origin
2350 (method hg-fetch)
2351 (uri (hg-reference
2352 (url "http://hg.openjdk.java.net/openjfx/8u-dev/rt")
2353 (changeset (string-append
2354 (string-join (string-split version #\.) "u")
2355 "-ga"))))
2356 (file-name (string-append name "-" version "-checkout"))
2357 (modules '((guix build utils)))
2358 (snippet
2359 '(begin
2360 ;; Delete included gradle jar
2361 (delete-file-recursively "gradle/wrapper")
2362 #t))
2363 (sha256
2364 (base32
2365 "0yg38mwpivswccv9n96k06x3iv82i4px1a9xg9l8dswzwmfj259f"))
2366 (patches (search-patches "java-openjfx-build-jdk_version.patch"))))
2367 (build-system ant-build-system)
2368 (arguments
2369 `(#:jar-name "java-openjfx.jar"
2370 #:source-dir "buildSrc/src/main/java"
2371 #:test-dir "buildSrc/src/test"
2372 #:phases
2373 (modify-phases %standard-phases
2374 (add-before 'configure 'generate-jsl-parser
2375 (lambda _
2376 (invoke "antlr3" "-o"
2377 "buildSrc/src/main/java/com/sun/scenario/effect/compiler"
2378 "buildSrc/src/main/antlr/JSL.g"))))))
2379 (inputs
2380 (list antlr3 java-stringtemplate))
2381 (native-inputs
2382 (list java-junit java-hamcrest-core))
2383 (home-page "https://openjfx.io")
2384 (synopsis "Graphical application toolkit in Java")
2385 (description "OpenJFX is a client application platform for desktop,
2386mobile and embedded systems built on Java. Its goal is to produce a
2387modern, efficient, and fully featured toolkit for developing rich client
2388applications. This package contains base classes for the OpenJFX
2389distribution and helper classes for building other parts of the
2390distribution.")
2391 (license license:gpl2))) ;gpl2 only, with classpath exception
2392
2393(define-public java-openjfx-base
2394 (package (inherit java-openjfx-build)
2395 (name "java-openjfx-base")
2396 (arguments
2397 `(#:jar-name "java-openjfx-base.jar"
2398 #:source-dir "modules/base/src/main/java:modules/base/src/main/java8:modules/base/src/main/version-info"
2399 #:test-dir "modules/base/src/test"
2400 #:phases
2401 (modify-phases %standard-phases
2402 (add-before 'check 'remove-empty-file
2403 (lambda _
2404 (with-directory-excursion "modules/base/src/test/java"
2405 ;; These files are completely commented, but junit expects them to
2406 ;; contain a class, so tests fail.
2407 (delete-file
2408 "com/sun/javafx/property/adapter/PropertyDescriptorTest.java")
2409 (delete-file
2410 "com/sun/javafx/property/adapter/ReadOnlyPropertyDescriptorTest.java")
2411 (delete-file "javafx/beans/property/PropertiesTest.java")
2412 (delete-file
2413 "javafx/beans/property/adapter/ReadOnlyJavaBeanPropertyBuilder_General_Test.java")
2414 ;; This one fails
2415 (delete-file "com/sun/javafx/runtime/VersionInfoTest.java"))
2416 #t)))))
2417 (propagated-inputs
2418 (list java-openjfx-build))
2419 (description "OpenJFX is a client application platform for desktop,
2420mobile and embedded systems built on Java. Its goal is to produce a
2421modern, efficient, and fully featured toolkit for developing rich client
2422applications. This package contains base classes for the OpenJFX
2423distribution.")))
2424
2425(define-public java-openjfx-graphics
2426 (package (inherit java-openjfx-build)
2427 (name "java-openjfx-graphics")
2428 (arguments
2429 `(#:jar-name "java-openjfx-graphics.jar"
2430 #:source-dir "modules/graphics/src/main/java"
2431 #:tests? #f; require X
2432 #:test-dir "modules/graphics/src/test"
2433 #:phases
2434 (modify-phases %standard-phases
2435 (add-after 'unpack 'copy-missing-file
2436 (lambda* (#:key inputs #:allow-other-keys)
2437 (let ((target "modules/graphics/src/main/native-prism-sw/JNativeSurface.c"))
2438 (copy-file (assoc-ref inputs "JNativeSurface.c") target)
2439 ;; XXX: looks like the missing file we found isn't *quite*
2440 ;; compatible...
2441 (substitute* target
2442 (("case TYPE_INT_ARGB:") "")))))
2443 (add-after 'build 'build-native
2444 (lambda* (#:key inputs outputs #:allow-other-keys)
2445 (let ((jdk (assoc-ref inputs "jdk"))
2446 (class-file->class-name
2447 (lambda (class-file)
2448 (string-map (lambda (c)
2449 (if (char=? c #\/) #\. c))
2450 (string-drop-right class-file
2451 (string-length ".class"))))))
2452 (setenv "CPPFLAGS"
2453 (string-append "-DINLINE=inline "
2454 "-DLINUX "
2455 "-I" jdk "/include "
2456 "-I" jdk "/include/linux "
2457 "-I " (getcwd) "/build/classes/include "
2458 "-I " (getcwd) "/modules/graphics/src/main/native-prism-sw"))
2459
2460 ;; Instructions have been adapted from buildSrc/linux.gradle
2461 (with-directory-excursion "build/classes"
2462 ;; Build prism
2463 (mkdir-p "include")
2464
2465 ;; Generate headers for prism
2466 (apply invoke "javah" "-d" "include" "-cp" "."
2467 (map class-file->class-name
2468 (append (find-files "com/sun/prism/impl" "\\.class$")
2469 (find-files "com/sun/prism" "PresentableState.*\\.class$"))))
2470
2471 ;; ...then for prism_sw
2472 (apply invoke "javah" "-d" "include" "-cp" "."
2473 (map class-file->class-name
2474 (find-files "com/sun/pisces" "\\.class$")))
2475
2476 ;; ...and for prism_es2
2477 (apply invoke "javah" "-d" "include" "-cp" "."
2478 (map class-file->class-name
2479 (find-files "com/sun/prism/es2" "\\.class$")))))
2480
2481 (with-directory-excursion "netbeans/native-prism"
2482 (invoke "make" "CONF=Release"))
2483 (with-directory-excursion "netbeans/native-prism-sw"
2484 (invoke "make" "CONF=Release"))
2485 ;; TODO: This fails due to unknown EGL procedure names
2486 #;
2487 (with-directory-excursion "netbeans/native-prism-es2"
2488 (invoke "make" "CONF=Release"))
2489
2490 (let* ((out (assoc-ref outputs "out"))
2491 (dir ,(match (%current-system)
2492 ("i686-linux"
2493 "i386")
2494 ((or "armhf-linux" "aarch64-linux")
2495 "arm")
2496 ((or "x86_64-linux")
2497 "amd64")
2498 (_ "unknown")))
2499 (target (string-append out "/share/" dir "/")))
2500 (mkdir-p target)
2501 (for-each (lambda (file)
2502 (let ((new-name
2503 (string-append "lib"
2504 (string-map
2505 (lambda (c)
2506 (if (char=? c #\-) #\_ c))
2507 (string-drop (basename file)
2508 (string-length "libnative-"))))))
2509 (copy-file file
2510 (string-append target new-name))))
2511 (find-files "netbeans" "\\.so$"))))))))
2512 (propagated-inputs
2513 (list java-openjfx-base))
2514 (inputs
2515 (list java-swt))
2516 ;; XXX: for unknown reasons
2517 ;; modules/graphics/src/main/native-prism-sw/JNativeSurface.c is missing
2518 ;; in this revision.
2519 (native-inputs
2520 `(("JNativeSurface.c"
2521 ,(origin
2522 (method url-fetch)
2523 (uri "https://raw.githubusercontent.com/openjdk/jfx/8u20-b02\
2524/modules/graphics/src/main/native-prism-sw/JNativeSurface.c")
2525 (sha256
2526 (base32
2527 "1kp15wbnd6rn0nciczp5ibq0ikby2yysvx1gnz5fa05vl2mm8mbm"))))))
2528 (description "OpenJFX is a client application platform for desktop,
2529mobile and embedded systems built on Java. Its goal is to produce a
2530modern, efficient, and fully featured toolkit for developing rich client
2531applications. This package contains graphics-related classes for the
2532OpenJFX distribution.")))
2533
2534(define-public java-openjfx-media
2535 (package (inherit java-openjfx-build)
2536 (name "java-openjfx-media")
2537 (propagated-inputs
2538 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2539 (arguments
2540 `(#:jar-name "java-openjfx-media.jar"
2541 #:source-dir "modules/media/src/main/java"
2542 #:tests? #f)); no tests
2543 (description "OpenJFX is a client application platform for desktop,
2544mobile and embedded systems built on Java. Its goal is to produce a
2545modern, efficient, and fully featured toolkit for developing rich client
2546applications. This package contains media-related classes for the
2547OpenJFX distribution.")))
2548
2549(define-public java-openjfx-controls
2550 (package (inherit java-openjfx-build)
2551 (name "java-openjfx-controls")
2552 (propagated-inputs
2553 `(("java-openjxf-graphics" ,java-openjfx-graphics)))
2554 (arguments
2555 `(#:jar-name "java-openjfx-controls.jar"
2556 #:source-dir "modules/controls/src/main/java"
2557 #:test-dir "modules/controls/src/test"
2558 ;; TODO: tests require com.sun.javafx.pgstub,
2559 ;; javafx.collections.MockSetObserver, and
2560 ;; com.sun.javafx.binding.ExpressionHelperUtility
2561 #:tests? #false
2562 #:phases
2563 (modify-phases %standard-phases
2564 (add-after 'unpack 'copy-resources
2565 (lambda _
2566 (copy-recursively "modules/controls/src/test/resources"
2567 "build/test-classes")
2568 (copy-recursively "modules/controls/src/main/resources"
2569 "build/classes"))))))
2570 (description "OpenJFX is a client application platform for desktop,
2571mobile and embedded systems built on Java. Its goal is to produce a
2572modern, efficient, and fully featured toolkit for developing rich client
2573applications. This package contains UI control classes for the
2574OpenJFX distribution.")))
2575
2576(define-public javacc-4
2577 (package
2578 (name "javacc")
2579 (version "4.1")
2580 (source (origin
2581 (method git-fetch)
2582 (uri (git-reference
2583 (url "https://github.com/javacc/javacc")
2584 (commit "release_41")))
2585 (file-name (string-append "javacc-" version "-checkout"))
2586 (sha256
2587 (base32
2588 "07ysav7j8r1c6h8qxrgqk6lwdp74ly0ad1935lragxml0qqc3ka0"))
2589 (modules '((guix build utils)))
2590 ;; delete bundled jars
2591 (snippet '(begin (delete-file-recursively "lib") #t))))
2592 (build-system ant-build-system)
2593 ;; Tests fail with
2594 ;; /tmp/guix-build-javacc-4.1.drv-0/source/test/javacodeLA/build.xml:60:
2595 ;; JAVACODE failed
2596 (arguments
2597 `(#:tests? #f
2598 #:phases
2599 (modify-phases %standard-phases
2600 ;; Delete tests to avoid build failure (we don't run them anyway).
2601 (add-after 'unpack 'delete-tests
2602 (lambda _
2603 (for-each delete-file
2604 '("src/org/javacc/JavaCCTestCase.java"
2605 "src/org/javacc/parser/ExpansionTest.java"
2606 "src/org/javacc/parser/OptionsTest.java"
2607 "src/org/javacc/jjtree/JJTreeOptionsTest.java"))
2608 (for-each delete-file-recursively
2609 '("src/org/javacc/parser/test"
2610 "src/org/javacc/jjdoc/test"))
2611 #t))
2612 (replace 'install (install-jars "bin/lib")))))
2613 (home-page "https://javacc.org/")
2614 (synopsis "Java parser generator")
2615 (description "Java Compiler Compiler (JavaCC) is the most popular parser
2616generator for use with Java applications. A parser generator is a tool that
2617reads a grammar specification and converts it to a Java program that can
2618recognize matches to the grammar. In addition to the parser generator itself,
2619JavaCC provides other standard capabilities related to parser generation such
2620as tree building (via a tool called JJTree included with JavaCC), actions,
2621debugging, etc.")
2622 (license license:bsd-3)))
2623
2624;; javacc-3, as javacc-4 is not properly bootstrapped: is contains a javacc.jar
2625;; in the bootstrap/ directory.
2626(define-public javacc-3
2627 (package
2628 (inherit javacc-4)
2629 (version "3.2")
2630 (source (origin
2631 (method git-fetch)
2632 (uri (git-reference
2633 (url "https://github.com/javacc/javacc")
2634 (commit "release_32")))
2635 (file-name (string-append "javacc-" version "-checkout"))
2636 (sha256
2637 (base32
2638 "1pyf1xyh8gk83nxqn2v2mdws32l68ydznha41cxa4l2kkbq1v1g3"))))
2639 (arguments
2640 `(#:tests? #f
2641 #:phases
2642 (modify-phases %standard-phases
2643 (add-before 'build 'set-java-version
2644 (lambda _
2645 (for-each
2646 (lambda (file)
2647 (substitute* file
2648 (("debug=") "source=\"1.4\" debug=")))
2649 (find-files "." "build.xml"))
2650 #t))
2651 (replace 'install (install-jars "bin/lib")))))))
2652
2653(define-public javacc
2654 (package
2655 (inherit javacc-4)
2656 (version "7.0.4")
2657 (source
2658 (origin
2659 (method git-fetch)
2660 (uri (git-reference
2661 (url "https://github.com/javacc/javacc")
2662 (commit version)))
2663 (file-name (git-file-name "javacc" version))
2664 (sha256
2665 (base32 "18kkak3gda93gr25jrgy6q00g0jr8i24ri2wk4kybz1v234fxx9i"))
2666 (modules '((guix build utils)))
2667 ;; Delete bundled jars.
2668 (snippet '(begin (for-each delete-file-recursively
2669 '("bootstrap" "lib"))))))
2670 (arguments
2671 `(#:make-flags ; bootstrap from javacc-4
2672 ,#~(list (string-append "-Dbootstrap-jar="
2673 #$(this-package-native-input "javacc")
2674 "/share/java/javacc.jar"))
2675 #:test-target "test"
2676 #:phases
2677 (modify-phases %standard-phases
2678 (replace 'install (install-jars "target"))
2679 (add-after 'install 'install-bin
2680 (lambda* (#:key outputs inputs #:allow-other-keys)
2681 (let* ((out (assoc-ref outputs "out"))
2682 (dir (string-append out "/share/java"))
2683 (bin (string-append out "/bin"))
2684 (javacc (string-append bin "/javacc")))
2685 (mkdir-p bin)
2686 (with-output-to-file javacc
2687 (lambda _
2688 (display
2689 (string-append "#!/bin/sh\n"
2690 (assoc-ref inputs "icedtea") "/bin/java"
2691 " -cp " dir "/javacc.jar" " `basename $0`" " $*"))))
2692 (chmod javacc #o755)
2693 ;; symlink to different names to affect the first argument and
2694 ;; change the behavior of the jar file.
2695 (symlink javacc (string-append bin "/jjdoc"))
2696 (symlink javacc (string-append bin "/jjtree"))))))))
2697 (native-inputs
2698 (list javacc-4))
2699 (inputs (list icedtea-8))))
2700
2701(define-public java-ecj
2702 (package
2703 (name "java-ecj")
2704 (version "4.6.3")
2705 (source
2706 (origin
2707 (method url-fetch)
2708 (uri (string-append "http://archive.eclipse.org/eclipse/"
2709 "downloads/drops4/R-" version "-201703010400/"
2710 "ecjsrc-" version ".jar"))
2711 (sha256
2712 (base32
2713 "11cfgsdgznja1pvlxkjbqykxd7pcd5655vkm7s44xmahmap15gpl"))))
2714 (build-system ant-build-system)
2715 (arguments
2716 `(#:tests? #f ; none included
2717 #:build-target "build"
2718 #:phases
2719 (modify-phases %standard-phases
2720 (add-after 'unpack 'fix-build.xml
2721 (lambda _
2722 (substitute* "src/build.xml"
2723 (("^.*MANIFEST.*$")
2724 "")
2725 (("^.*properties.*$")
2726 "<include name=\"**/*.properties\"/>
2727 <include name=\"**/*.props\"/>"))))
2728 (add-before 'build 'chdir
2729 (lambda _ (chdir "src")))
2730 (replace 'install (install-jars ".")))))
2731 (home-page "https://eclipse.org")
2732 (synopsis "Eclipse Java development tools core batch compiler")
2733 (description "This package provides the Eclipse Java core batch compiler.")
2734 (license license:epl1.0)))
2735
2736(define-public java-cisd-base
2737 (let ((revision 38938)
2738 (base-version "14.12.0"))
2739 (package
2740 (name "java-cisd-base")
2741 (version (string-append base-version "-" (number->string revision)))
2742 (source (origin
2743 (method svn-fetch)
2744 (uri (svn-reference
2745 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2746 "base/tags/release/"
2747 (version-major+minor base-version)
2748 ".x/" base-version "/base/"))
2749 (revision revision)))
2750 (file-name (string-append "java-cisd-base-" version "-checkout"))
2751 (sha256
2752 (base32
2753 "1i5adyf7nzclb0wydgwa1az04qliid8035vpahaandmkmigbnxiy"))
2754 (modules '((guix build utils)))
2755 (snippet
2756 '(begin
2757 ;; Delete included gradle jar
2758 (delete-file-recursively "gradle/wrapper")
2759 ;; Delete pre-built native libraries
2760 (delete-file-recursively "libs")
2761 #t))))
2762 (build-system ant-build-system)
2763 (arguments
2764 `(#:make-flags '("-file" "build/build.xml")
2765 #:test-target "jar-test"
2766 #:jdk ,icedtea-8
2767 #:phases
2768 (modify-phases %standard-phases
2769 (add-after 'unpack 'unpack-build-resources
2770 (lambda* (#:key inputs #:allow-other-keys)
2771 (copy-recursively (assoc-ref inputs "build-resources")
2772 "../build_resources")
2773 #t))
2774 (add-after 'unpack-build-resources 'fix-dependencies
2775 (lambda* (#:key inputs #:allow-other-keys)
2776 (substitute* "build/build.xml"
2777 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
2778 (search-input-file inputs
2779 "/share/java/java-testng.jar"))
2780 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
2781 (search-input-file inputs
2782 (string-append
2783 "/share/java/commons-lang-"
2784 ,(package-version java-commons-lang)
2785 ".jar")))
2786 (("\\$\\{lib\\}/commons-io/commons-io.jar")
2787 (search-input-file inputs
2788 (string-append
2789 "/lib/m2/commons-io/commons-io/"
2790 ,(package-version java-commons-io)
2791 "/commons-io-"
2792 ,(package-version java-commons-io)
2793 ".jar")))
2794 ;; Remove dependency on svn
2795 (("<build-info.*") "")
2796 (("\\$\\{revision.number\\}")
2797 ,(number->string revision))
2798 (("\\$\\{version.number\\}") ,base-version))
2799 ;; Remove dependency on classycle
2800 (substitute* "../build_resources/ant/build-common.xml"
2801 (("<taskdef name=\"dependency-checker.*") "")
2802 (("classname=\"classycle.*") "")
2803 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
2804 #t))
2805 ;; A few tests fail because of the lack of a proper /etc/groups and
2806 ;; /etc/passwd file in the build container.
2807 (add-after 'unpack 'disable-broken-tests
2808 (lambda _
2809 (substitute* "sourceTest/java/ch/systemsx/cisd/base/AllTests.java"
2810 (("Unix.isOperational\\(\\)") "false"))
2811 #t))
2812 ;; These decorators are almost useless and pull in an unpackaged
2813 ;; dependency.
2814 (add-after 'unpack 'remove-useless-decorators
2815 (lambda _
2816 (substitute* "source/java/ch/systemsx/cisd/base/unix/Unix.java"
2817 (("@Private") "")
2818 (("import ch.rinn.restrictions.Private;") ""))
2819 (substitute* "sourceTest/java/ch/systemsx/cisd/base/unix/UnixTests.java"
2820 (("@Friend.*") "")
2821 (("import ch.rinn.restrictions.Friend;") ""))
2822 #t))
2823 (add-before 'configure 'build-native-code
2824 (lambda* (#:key inputs #:allow-other-keys)
2825 (let ((jdk (assoc-ref inputs "jdk"))
2826 (dir ,(match (%current-system)
2827 ("i686-linux"
2828 "i386-Linux")
2829 ((or "armhf-linux" "aarch64-linux")
2830 "arm-Linux")
2831 ((or "x86_64-linux")
2832 "amd64-Linux")
2833 (_ "unknown-Linux"))))
2834 (with-directory-excursion "source/c"
2835 (invoke "gcc" "-shared" "-O3" "-fPIC" "unix.c"
2836 (string-append "-I" jdk "/include")
2837 (string-append "-I" jdk "/include/linux")
2838 "-o" "libunix.so")
2839 (invoke "gcc" "-shared" "-O3" "-fPIC"
2840 "-DMACHINE_BYTE_ORDER=1"
2841 "copyCommon.c"
2842 "copyByteChar.c"
2843 "copyByteDouble.c"
2844 "copyByteFloat.c"
2845 "copyByteInt.c"
2846 "copyByteLong.c"
2847 "copyByteShort.c"
2848 (string-append "-I" jdk "/include")
2849 (string-append "-I" jdk "/include/linux")
2850 "-o" "libnativedata.so"))
2851 (install-file "source/c/libunix.so"
2852 (string-append "libs/native/unix/" dir))
2853 (install-file "source/c/libnativedata.so"
2854 (string-append "libs/native/nativedata/" dir))
2855 #t)))
2856 ;; In the "check" phase we only build the test executable.
2857 (add-after 'check 'run-tests
2858 (lambda _
2859 (invoke "java" "-jar" "targets/dist/sis-base-test.jar")
2860 (delete-file "targets/dist/sis-base-test.jar")
2861 #t))
2862 (replace 'install (install-jars "targets/dist")))))
2863 (native-inputs
2864 `(("jdk" ,icedtea-8)
2865 ("java-commons-lang" ,java-commons-lang)
2866 ("java-commons-io" ,java-commons-io)
2867 ("java-testng" ,java-testng)
2868 ("build-resources"
2869 ,(origin
2870 (method svn-fetch)
2871 (uri (svn-reference
2872 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2873 "base/tags/release/"
2874 (version-major+minor base-version)
2875 ".x/" base-version
2876 "/build_resources/"))
2877 (revision revision)))
2878 (sha256
2879 (base32
2880 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
2881 (home-page "https://svnsis.ethz.ch")
2882 (synopsis "Utility classes for libraries from ETH Zurich")
2883 (description "This library supplies some utility classes needed for
2884libraries from the SIS division at ETH Zurich like jHDF5.")
2885 ;; The C sources are under a non-copyleft license, which looks like a
2886 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
2887 (license (list license:asl2.0
2888 (license:non-copyleft "file://source/c/COPYING"))))))
2889
2890(define-public java-cisd-args4j
2891 (let ((revision 39162)
2892 (base-version "9.11.2"))
2893 (package
2894 (name "java-cisd-args4j")
2895 (version (string-append base-version "-" (number->string revision)))
2896 (source (origin
2897 (method svn-fetch)
2898 (uri (svn-reference
2899 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2900 "args4j/tags/release/"
2901 (version-major+minor base-version)
2902 ".x/" base-version "/args4j/"))
2903 (revision revision)))
2904 (file-name (string-append "java-cisd-args4j-" version "-checkout"))
2905 (sha256
2906 (base32
2907 "0hhqznjaivq7ips7mkwas78z42s6djsm20rrs7g1zd59rcsakxn2"))))
2908 (build-system ant-build-system)
2909 (arguments
2910 `(#:make-flags '("-file" "build/build.xml")
2911 #:tests? #f ; there are no tests
2912 #:modules ((guix build ant-build-system)
2913 (guix build utils)
2914 (guix build java-utils)
2915 (sxml simple)
2916 (sxml transform)
2917 (sxml xpath))
2918 #:phases
2919 (modify-phases %standard-phases
2920 (add-after 'unpack 'unpack-build-resources
2921 (lambda* (#:key inputs #:allow-other-keys)
2922 (mkdir-p "../build_resources")
2923 (copy-recursively (assoc-ref inputs "build-resources")
2924 "../build_resources")
2925 (mkdir-p "../build_resources/lib")))
2926 (add-after 'unpack-build-resources 'fix-dependencies
2927 (lambda* (#:key inputs #:allow-other-keys)
2928 ;; FIXME: There should be a more convenient abstraction for
2929 ;; editing XML files.
2930 (with-directory-excursion "../build_resources/ant/"
2931 (chmod "build-common.xml" #o664)
2932 (call-with-output-file "build-common.xml.new"
2933 (lambda (port)
2934 (sxml->xml
2935 (pre-post-order
2936 (with-input-from-file "build-common.xml"
2937 (lambda _ (xml->sxml #:trim-whitespace? #t)))
2938 `(;; Remove dependency on classycle and custom ant tasks
2939 (taskdef . ,(lambda (tag . kids)
2940 (let ((name ((sxpath '(name *text*)) kids)))
2941 (if (or (member "build-info" name)
2942 (member "dependency-checker" name)
2943 (member "build-java-subprojects" name)
2944 (member "project-classpath" name))
2945 '() ; skip
2946 `(,tag ,@kids)))))
2947 (typedef . ,(lambda (tag . kids)
2948 (let ((name ((sxpath '(name *text*)) kids)))
2949 (if (member "recursive-jar" name)
2950 '() ; skip
2951 `(,tag ,@kids)))))
2952 (build-java-subprojects . ,(lambda _ '()))
2953 ;; Ignore everything else
2954 (*default* . ,(lambda (tag . kids) `(,tag ,@kids)))
2955 (*text* . ,(lambda (_ txt) txt))))
2956 port)))
2957 (rename-file "build-common.xml.new" "build-common.xml"))
2958 (substitute* "build/build.xml"
2959 (("\\$\\{lib\\}/cisd-base/cisd-base.jar")
2960 (search-input-file inputs "/share/java/sis-base.jar"))
2961 ;; Remove dependency on svn
2962 (("<build-info.*") "")
2963 (("\\$\\{revision.number\\}")
2964 ,(number->string revision))
2965 (("\\$\\{version.number\\}") ,base-version)
2966 ;; Don't use custom ant tasks.
2967 (("recursive-jar") "jar")
2968 (("<project-classpath.*") ""))))
2969 (replace 'install (install-jars "targets/dist")))))
2970 (inputs
2971 (list java-cisd-base))
2972 (native-inputs
2973 `(("ecj" ,java-ecj)
2974 ("build-resources"
2975 ,(origin
2976 (method svn-fetch)
2977 (uri (svn-reference
2978 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
2979 "args4j/tags/release/"
2980 (version-major+minor base-version)
2981 ".x/" base-version
2982 "/build_resources/"))
2983 (revision revision)))
2984 (sha256
2985 (base32
2986 "056cam4k8pll7ass31sy6gwn8g8719njc41yf4l02b0342nilkyf"))
2987 (modules '((guix build utils)))
2988 ;; Delete bundled pre-built jars.
2989 (snippet
2990 '(begin (delete-file-recursively "lib/") #t))))))
2991 (home-page "https://svnsis.ethz.ch")
2992 (synopsis "Command line parser library")
2993 (description "This package provides a parser for command line arguments.")
2994 (license license:asl2.0))))
2995
2996(define-public java-cisd-jhdf5
2997 (let ((revision 39162)
2998 (base-version "14.12.6"))
2999 (package
3000 (name "java-cisd-jhdf5")
3001 (version (string-append base-version "-" (number->string revision)))
3002 (source (origin
3003 (method svn-fetch)
3004 (uri (svn-reference
3005 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3006 "jhdf5/tags/release/"
3007 (version-major+minor base-version)
3008 ".x/" base-version "/jhdf5/"))
3009 (revision revision)))
3010 (file-name (string-append "java-cisd-jhdf5-" version "-checkout"))
3011 (sha256
3012 (base32
3013 "13i17s2hn0q9drdqvp8csy7770p3hdbh9rp30ihln2ldkfawdmz0"))
3014 (modules '((guix build utils)))
3015 (snippet
3016 '(begin
3017 ;; Delete included gradle jar
3018 (delete-file-recursively "gradle/wrapper")
3019 ;; Delete pre-built native libraries
3020 (delete-file-recursively "libs")))))
3021 (build-system ant-build-system)
3022 (arguments
3023 `(#:make-flags '("-file" "build/build.xml")
3024 #:build-target "jar-all"
3025 #:test-target "jar-test"
3026 #:phases
3027 (modify-phases %standard-phases
3028 ;; FIXME: this build phase fails.
3029 (delete 'generate-jar-indices)
3030 ;; Don't erase results from the build phase when building tests.
3031 (add-after 'unpack 'separate-test-target-from-clean
3032 (lambda _
3033 (substitute* "build/build.xml"
3034 (("\"jar-test\" depends=\"clean, ")
3035 "\"jar-test\" depends=\""))))
3036 (add-after 'unpack 'unpack-build-resources
3037 (lambda* (#:key inputs #:allow-other-keys)
3038 (copy-recursively (assoc-ref inputs "build-resources")
3039 "../build_resources")
3040 (delete-file-recursively "../build_resources/lib/")
3041 (mkdir-p "../build_resources/lib")
3042 ;; Remove dependency on classycle
3043 (substitute* "../build_resources/ant/build-common.xml"
3044 (("<taskdef name=\"dependency-checker.*") "")
3045 (("classname=\"classycle.*") "")
3046 (("classpath=\"\\$\\{lib\\}/classycle.*") ""))
3047 ;; Remove dependency on svn
3048 (substitute* "build/build.xml"
3049 (("<build-info.*") "")
3050 (("\\$\\{revision.number\\}")
3051 ,(number->string revision))
3052 (("\\$\\{version.number\\}") ,base-version))))
3053 (add-after 'unpack-build-resources 'fix-dependencies
3054 (lambda* (#:key inputs #:allow-other-keys)
3055 (substitute* "../build_resources/ant/build-common.xml"
3056 (("../libraries/testng/testng-jdk15.jar")
3057 (search-input-file inputs
3058 "/share/java/java-testng.jar")))
3059 (substitute* "build/build.xml"
3060 (("\\$\\{lib\\}/sis-base/sis-base.jar")
3061 (search-input-file inputs
3062 "/share/java/sis-base.jar"))
3063 (("\\$\\{lib\\}/cisd-args4j/cisd-args4j.jar")
3064 (search-input-file inputs
3065 "/share/java/cisd-args4j.jar"))
3066 (("\\$\\{lib\\}/commons-lang/commons-lang.jar")
3067 (search-input-file inputs
3068 (string-append
3069 "/share/java/commons-lang-"
3070 ,(package-version java-commons-lang)
3071 ".jar")))
3072 (("\\$\\{lib\\}/commons-io/commons-io.jar")
3073 (search-input-file inputs
3074 (string-append
3075 "/lib/m2/commons-io/commons-io/"
3076 ,(package-version java-commons-io)
3077 "/commons-io-"
3078 ,(package-version java-commons-io)
3079 ".jar")))
3080 (("\\$\\{lib\\}/testng/testng-jdk15.jar")
3081 (search-input-file inputs
3082 "/share/java/java-testng.jar"))
3083 (("\\$\\{lib\\}/junit4/junit.jar")
3084 (car (find-files (assoc-ref inputs "java-junit") "jar$")))
3085 (("\\$\\{lib\\}/jmock/hamcrest/hamcrest-core.jar")
3086 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3087 "jar$"))))
3088 ;; Remove dependency on ch.rinn.restrictions
3089 (with-directory-excursion "source/java/ch/systemsx/cisd/hdf5/"
3090 (substitute* '("BitSetConversionUtils.java"
3091 "HDF5Utils.java")
3092 (("import ch.rinn.restrictions.Private;") "")
3093 (("@Private") "")))
3094 (with-directory-excursion "sourceTest/java/ch/systemsx/cisd/hdf5/"
3095 (substitute* '("BitSetConversionTest.java"
3096 "h5ar/HDF5ArchiverTest.java")
3097 (("import ch.rinn.restrictions.Friend;") "")
3098 (("@Friend.*") ""))
3099 ;; Remove leftovers from removing @Friend
3100 (substitute* "h5ar/HDF5ArchiverTest.java"
3101 (("\\{ HDF5Archiver.class, IdCache.class, LinkRecord.class \\}\\)")
3102 "")))))
3103 (add-before 'configure 'build-native-library
3104 (lambda* (#:key inputs #:allow-other-keys)
3105 (let ((jdk (assoc-ref inputs "jdk"))
3106 (hdf5 (assoc-ref inputs "hdf5"))
3107 (dir ,(match (%current-system)
3108 ("i686-linux"
3109 "i386-Linux")
3110 ((or "armhf-linux" "aarch64-linux")
3111 "arm-Linux")
3112 ((or "x86_64-linux")
3113 "amd64-Linux")
3114 (_ "unknown-Linux"))))
3115 (with-directory-excursion "source/c"
3116 (apply invoke `("gcc" "-shared" "-O3"
3117 "-fPIC"
3118 "-Wl,--exclude-libs,ALL"
3119 "-Wno-error=implicit-function-declaration"
3120 ,@(find-files "jhdf5" "\\.c$")
3121 ,@(find-files "hdf-java" "\\.c$")
3122 ,(string-append "-I" hdf5 "/include")
3123 ,(string-append "-I" jdk "/include")
3124 ,(string-append "-I" jdk "/include/linux")
3125 ,(string-append hdf5 "/lib/libhdf5.a")
3126 "-o" "libjhdf5.so" "-lz")))
3127 (install-file "source/c/libjhdf5.so"
3128 (string-append "libs/native/jhdf5/" dir)))))
3129 ;; In the "check" phase we only build the test executable.
3130 (add-after 'check 'run-tests
3131 (lambda _
3132 (invoke "java" "-jar" "targets/dist/sis-jhdf5-test.jar")
3133 (delete-file "targets/dist/sis-jhdf5-test.jar")))
3134 (replace 'install
3135 (install-jars "targets/dist")))))
3136 (inputs
3137 (list java-cisd-base
3138 java-cisd-args4j
3139 java-commons-lang
3140 java-commons-io
3141 hdf5-1.8
3142 zlib))
3143 (native-inputs
3144 `(("jdk" ,icedtea-8)
3145 ("java-testng" ,java-testng)
3146 ("java-junit" ,java-junit)
3147 ("java-jmock" ,java-jmock)
3148 ("java-hamcrest-core" ,java-hamcrest-core)
3149 ("build-resources"
3150 ,(origin
3151 (method svn-fetch)
3152 (uri (svn-reference
3153 (url (string-append "http://svnsis.ethz.ch/repos/cisd/"
3154 "jhdf5/tags/release/"
3155 (version-major+minor base-version)
3156 ".x/" base-version
3157 "/build_resources/"))
3158 (revision revision)))
3159 (sha256
3160 (base32
3161 "0b6335gkm4x895rac6kfg9d3rpq0sy19ph4zpg2gyw6asfsisjhk"))))))
3162 (home-page "https://wiki-bsse.ethz.ch/display/JHDF5/")
3163 (synopsis "Java binding for HDF5")
3164 (description "JHDF5 is a high-level API in Java for reading and writing
3165HDF5 files, building on the libraries provided by the HDF Group.")
3166 ;; The C sources are under a non-copyleft license, which looks like a
3167 ;; variant of the BSD licenses. The whole package is under the ASL2.0.
3168 (license (list license:asl2.0
3169 (license:non-copyleft "file://source/c/COPYING"))))))
3170
3171(define-public java-classpathx-servletapi
3172 (package
3173 (name "java-classpathx-servletapi")
3174 (version "3.0.1")
3175 (source (origin
3176 (method url-fetch)
3177 (uri (string-append "mirror://gnu/classpathx/servletapi/"
3178 "servletapi-" version ".tar.gz"))
3179 (sha256
3180 (base32
3181 "07d8h051siga2f33fra72hk12sbq1bxa4jifjg0qj0vfazjjff0x"))))
3182 (build-system ant-build-system)
3183 (arguments
3184 `(#:tests? #f ; there is no test target
3185 #:build-target "compile"
3186 #:make-flags
3187 ,#~(list "-Dbuild.compiler=javac1.8"
3188 (string-append "-Ddist=" #$output))
3189 #:phases
3190 (modify-phases %standard-phases
3191 (replace 'install
3192 (lambda* (#:key make-flags #:allow-other-keys)
3193 (apply invoke `("ant" "dist" ,@make-flags)))))))
3194 (home-page "https://www.gnu.org/software/classpathx/")
3195 (synopsis "Java servlet API implementation")
3196 (description "This is the GNU servlet API distribution, part of the
3197ClasspathX project. It provides implementations of version 3.0 of the servlet
3198API and version 2.1 of the Java ServerPages API.")
3199 (license license:gpl3+)))
3200
3201(define-public java-javaee-servletapi
3202 (package
3203 (name "java-javaee-servletapi")
3204 (version "3.1.0")
3205 (source (origin
3206 (method git-fetch)
3207 (uri (git-reference
3208 (url "https://github.com/javaee/servlet-spec")
3209 (commit version)))
3210 (file-name (git-file-name name version))
3211 (sha256
3212 (base32
3213 "0s03lj8w5an70lkqbjycgfrfk0kc07vbfav91jzk87gh3awf9ksl"))))
3214 (build-system ant-build-system)
3215 (arguments
3216 `(#:jar-name "javax-servletapi.jar"
3217 ;; no tests
3218 #:tests? #f
3219 #:source-dir "src/main/java"
3220 #:phases
3221 (modify-phases %standard-phases
3222 (add-before 'build 'copy-resources
3223 (lambda _
3224 (mkdir-p "build/classes/javax/servlet/http")
3225 (let ((from-prefix "src/main/java/javax/servlet/")
3226 (to-prefix "build/classes/javax/servlet/"))
3227 (for-each (lambda (f)
3228 (copy-file (string-append from-prefix f)
3229 (string-append to-prefix f)))
3230 (list "LocalStrings_ja.properties"
3231 "LocalStrings.properties"
3232 "LocalStrings_fr.properties"
3233 "http/LocalStrings_es.properties"
3234 "http/LocalStrings_ja.properties"
3235 "http/LocalStrings.properties"
3236 "http/LocalStrings_fr.properties")))
3237 #t)))))
3238 (native-inputs
3239 (list unzip))
3240 (home-page "https://javaee.github.io/servlet-spec/")
3241 (synopsis "Java servlet API")
3242 (description "Java Servlet is the foundation web specification in the
3243Java Enterprise Platform. Developers can build web applications using the
3244Servlet API to interact with the request/response workflow. This project
3245provides information on the continued development of the Java Servlet
3246specification.")
3247 ;; Main code is dual-licensed by Oracle under either GLP2 or CDDL 1.1.
3248 ;; Some files are licensed under ASL 2.0.
3249 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3250
3251(define-public java-swt
3252 (package
3253 (name "java-swt")
3254 (version "4.7.1a")
3255 (source
3256 ;; The types of many variables and procedures differ in the sources
3257 ;; dependent on whether the target architecture is a 32-bit system or a
3258 ;; 64-bit system. Instead of patching the sources on demand in a build
3259 ;; phase we download either the 32-bit archive (which mostly uses "int"
3260 ;; types) or the 64-bit archive (which mostly uses "long" types).
3261 (let ((hash32 "09q0cbh90d90q3a7dx9430kc4m6bijrkr4lajrmzzvi0jjdpq4v9")
3262 (hash64 "17k5hs75a87ssmc5xhwdfdm2gn4zba0r837l2455za01krnkaa2q")
3263 (file32 "x86")
3264 (file64 "x86_64"))
3265 (let-values (((hash file)
3266 (match (or (%current-target-system) (%current-system))
3267 ("x86_64-linux" (values hash64 file64))
3268 (_ (values hash32 file32)))))
3269 (origin
3270 (method url-fetch)
3271 (uri (string-append
3272 "https://archive.eclipse.org/eclipse/downloads/drops4/"
3273 "R-" version "-201710090410/swt-" version
3274 "-gtk-linux-" file ".zip"))
3275 (sha256 (base32 hash))))))
3276 (build-system ant-build-system)
3277 (arguments
3278 `(#:jar-name "swt.jar"
3279 #:jdk ,icedtea-8
3280 #:tests? #f ; no "check" target
3281 #:phases
3282 (modify-phases %standard-phases
3283 (replace 'unpack
3284 (lambda* (#:key source #:allow-other-keys)
3285 (mkdir "swt")
3286 (invoke "unzip" source "-d" "swt")
3287 (chdir "swt")
3288 (mkdir "src")
3289 (invoke "unzip" "src.zip" "-d" "src")))
3290 ;; The classpath contains invalid icecat jars. Since we don't need
3291 ;; anything other than the JDK on the classpath, we can simply unset
3292 ;; it.
3293 (add-after 'configure 'unset-classpath
3294 (lambda _ (unsetenv "CLASSPATH") #t))
3295 (add-before 'build 'build-native
3296 (lambda* (#:key inputs outputs #:allow-other-keys)
3297 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3298 ;; Build shared libraries. Users of SWT have to set the system
3299 ;; property swt.library.path to the "lib" directory of this
3300 ;; package output.
3301 (mkdir-p lib)
3302 (setenv "OUTPUT_DIR" lib)
3303 (setenv "CC" ,(cc-for-target))
3304 (with-directory-excursion "src"
3305 (invoke "bash" "build.sh")))))
3306 (add-after 'install 'install-native
3307 (lambda* (#:key outputs #:allow-other-keys)
3308 (let ((lib (string-append (assoc-ref outputs "out") "/lib")))
3309 (for-each (lambda (file)
3310 (install-file file lib))
3311 (find-files "." "\\.so$"))
3312 #t))))))
3313 (inputs
3314 `(("gtk" ,gtk+-2)
3315 ("libxtst" ,libxtst)
3316 ("libxt" ,libxt)
3317 ("mesa" ,mesa)
3318 ("glu" ,glu)))
3319 (native-inputs
3320 (list pkg-config unzip))
3321 (home-page "https://www.eclipse.org/swt/")
3322 (synopsis "Widget toolkit for Java")
3323 (description
3324 "SWT is a widget toolkit for Java designed to provide efficient, portable
3325access to the user-interface facilities of the operating systems on which it
3326is implemented.")
3327 ;; SWT code is licensed under EPL1.0
3328 ;; Gnome and Gtk+ bindings contain code licensed under LGPLv2.1
3329 ;; Cairo bindings contain code under MPL1.1
3330 ;; XULRunner 1.9 bindings contain code under MPL2.0
3331 (license (list
3332 license:epl1.0
3333 license:mpl1.1
3334 license:mpl2.0
3335 license:lgpl2.1+))))
3336
3337;; java-hamcrest-core uses qdox version 1.12. We package this version instead
3338;; of the latest release.
3339(define-public java-qdox-1.12
3340 (package
3341 (name "java-qdox")
3342 (version "1.12.1")
3343 (source (origin
3344 (method url-fetch)
3345 (uri (string-append "https://repo1.maven.org/maven2/"
3346 "com/thoughtworks/qdox/qdox/" version
3347 "/qdox-" version "-sources.jar"))
3348 (sha256
3349 (base32
3350 "0hlfbqq2avf5s26wxkksqmkdyk6zp9ggqn37c468m96mjv0n9xfl"))))
3351 (build-system ant-build-system)
3352 (arguments
3353 `(;; Tests require junit
3354 #:tests? #f
3355 #:jar-name "qdox.jar"
3356 #:phases
3357 (modify-phases %standard-phases
3358 (replace 'unpack
3359 (lambda* (#:key source #:allow-other-keys)
3360 (mkdir "src")
3361 (with-directory-excursion "src"
3362 (invoke "jar" "-xf" source))))
3363 ;; At this point we don't have junit, so we must remove the API
3364 ;; tests.
3365 (add-after 'unpack 'delete-tests
3366 (lambda _
3367 (delete-file-recursively "src/com/thoughtworks/qdox/junit")
3368 #t)))))
3369 (home-page "https://github.com/codehaus/qdox")
3370 (synopsis "Parse definitions from Java source files")
3371 (description
3372 "QDox is a high speed, small footprint parser for extracting
3373class/interface/method definitions from source files complete with JavaDoc
3374@code{@@tags}. It is designed to be used by active code generators or
3375documentation tools.")
3376 (license license:asl2.0)))
3377
3378(define-public java-qdox
3379 (package
3380 (name "java-qdox")
3381 ; Newer version exists, but this version is required by java-plexus-component-metadata
3382 (version "2.0-M2")
3383 (source (origin
3384 (method url-fetch)
3385 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3386 ;; Older releases at https://github.com/codehaus/qdox/
3387 ;; Note: The release at maven is pre-generated. The release at
3388 ;; github requires jflex.
3389 (uri (string-append "https://repo1.maven.org/maven2/"
3390 "com/thoughtworks/qdox/qdox/" version
3391 "/qdox-" version "-sources.jar"))
3392 (sha256
3393 (base32
3394 "10xxrcaicq6axszcr2jpygisa4ch4sinyx5q7kqqxv4lknrmxp5x"))))
3395 (build-system ant-build-system)
3396 (arguments
3397 `(#:jar-name "qdox.jar"
3398 #:tests? #f; no tests
3399 #:phases
3400 (modify-phases %standard-phases
3401 (add-before 'install 'create-pom
3402 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3403 #:name "QDox"))
3404 (replace 'install
3405 (install-from-pom "pom.xml")))))
3406 (home-page "https://github.com/codehaus/qdox")
3407 (synopsis "Parse definitions from Java source files")
3408 (description "QDox is a high speed, small footprint parser for extracting
3409class/interface/method definitions from source files complete with JavaDoc
3410@code{@@tags}. It is designed to be used by active code generators or
3411documentation tools.")
3412 (license license:asl2.0)))
3413
3414(define-public java-qdox-2-M9
3415 (package
3416 (inherit java-qdox)
3417 (version "2.0-M9"); required by plexus-java
3418 (source (origin
3419 (method url-fetch)
3420 ;; 2.0-M4, -M5 at https://github.com/paul-hammant/qdox
3421 ;; Older releases at https://github.com/codehaus/qdox/
3422 ;; Note: The release at maven is pre-generated. The release at
3423 ;; github requires jflex.
3424 (uri (string-append "https://repo1.maven.org/maven2/"
3425 "com/thoughtworks/qdox/qdox/" version
3426 "/qdox-" version "-sources.jar"))
3427 (sha256
3428 (base32
3429 "1s2jnmx2dkwnaha12lcj26aynywgwa8sslc47z82wx8xai13y4fg"))))
3430 (arguments
3431 (substitute-keyword-arguments (package-arguments java-qdox)
3432 ((#:phases phases)
3433 `(modify-phases ,phases
3434 (replace 'create-pom
3435 (generate-pom.xml "pom.xml" "com.thoughtworks.qdox" "qdox" ,version
3436 #:name "QDox"))))))))
3437
3438(define-public java-jarjar
3439 (package
3440 (name "java-jarjar")
3441 (version "1.4")
3442 (source (origin
3443 (method url-fetch)
3444 (uri (string-append
3445 "https://storage.googleapis.com/google-code-archive-downloads/v2/"
3446 "code.google.com/jarjar/jarjar-src-" version ".zip"))
3447 (sha256
3448 (base32
3449 "1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
3450 (modules '((guix build utils)))
3451 (snippet
3452 '(begin
3453 ;; Delete bundled thirds-party jar archives.
3454 (delete-file-recursively "lib")
3455 (delete-file "src/test/enumtest.jar")
3456 ;; the CLASSPATH needs this directory, create an empty one
3457 (mkdir-p "lib")
3458 #t))))
3459 (build-system ant-build-system)
3460 (arguments
3461 `(;; Tests require junit, which ultimately depends on this package.
3462 #:tests? #f
3463 #:build-target "jar"
3464 #:phases
3465 (modify-phases %standard-phases
3466 (add-before 'build 'do-not-use-bundled-asm
3467 (lambda* (#:key inputs #:allow-other-keys)
3468 (substitute* "build.xml"
3469 (("<path id=\"path.build\">")
3470 (string-append "<path id=\"path.build\"><fileset dir=\""
3471 (assoc-ref inputs "java-asm-bootstrap")
3472 "/lib/m2\" includes=\"**/*.jar\"/>"))
3473 (("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
3474 (("lib/asm-commons-4.0.jar")
3475 (car (find-files (assoc-ref inputs "java-asm-bootstrap")
3476 "asm-6.0.jar")))
3477 (("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
3478 (string-append "<include name=\"org/objectweb/asm/"
3479 "commons/Remap*.class\"/>"
3480 "<include name=\"org/objectweb/asm/*.class\"/>"
3481 "<include name=\"org/objectweb/asm/"
3482 "signature/*.class\"/>"
3483 "<include name=\"org/objectweb/asm/"
3484 "commons/SignatureRemapper.class\"/>")))
3485 #t))
3486 (add-before 'build 'remove-maven-dependency
3487 (lambda _
3488 ;; We do not need to build jarjar as a maven plugin just yet, so
3489 ;; remove this file. Maven requires jarjar (but not that plugin),
3490 ;; so removing it improves the bootstrap.
3491 (delete-file "src/main/com/tonicsystems/jarjar/JarJarMojo.java")
3492 #t))
3493 (replace 'install
3494 (lambda* (#:key outputs #:allow-other-keys)
3495 (let ((target (string-append (assoc-ref outputs "out")
3496 "/share/java")))
3497 (install-file (string-append "dist/jarjar-" ,version ".jar")
3498 target))
3499 #t)))))
3500 (inputs
3501 (list java-asm-bootstrap))
3502 (native-inputs
3503 (list unzip))
3504 (home-page "https://code.google.com/archive/p/jarjar/")
3505 (synopsis "Repackage Java libraries")
3506 (description
3507 "Jar Jar Links is a utility that makes it easy to repackage Java
3508libraries and embed them into your own distribution. Jar Jar Links includes
3509an Ant task that extends the built-in @code{jar} task.")
3510 (license license:asl2.0)))
3511
3512(define-public java-hamcrest-core
3513 (package
3514 (name "java-hamcrest-core")
3515 (version "1.3")
3516 (source (origin
3517 (method git-fetch)
3518 (uri (git-reference
3519 (url "https://github.com/hamcrest/JavaHamcrest/")
3520 (commit (string-append "hamcrest-java-" version))))
3521 (file-name (git-file-name name version))
3522 (sha256
3523 (base32
3524 "16fxxkrd31ahqvcaby30jgh3z1i0zxh51m24hxgz0z2agxj6bc63"))
3525 (modules '((guix build utils)))
3526 (snippet
3527 '(begin
3528 ;; Delete bundled thirds-party jar archives.
3529 (delete-file-recursively "lib")
3530 #t))))
3531 (build-system ant-build-system)
3532 (arguments
3533 `(#:tests? #f ; Tests require junit
3534 #:modules ((guix build ant-build-system)
3535 (guix build java-utils)
3536 (guix build utils)
3537 (srfi srfi-1))
3538 #:make-flags (list (string-append "-Dversion=" ,version))
3539 #:test-target "unit-test"
3540 #:build-target "core"
3541 #:phases
3542 (modify-phases %standard-phases
3543 ;; Disable unit tests, because they require junit, which requires
3544 ;; hamcrest-core. We also give a fixed value to the "Built-Date"
3545 ;; attribute from the manifest for reproducibility.
3546 (add-before 'configure 'patch-build.xml
3547 (lambda _
3548 (substitute* "build.xml"
3549 (("unit-test, ") "")
3550 (("\\$\\{build.timestamp\\}") "guix"))
3551 #t))
3552 ;; Java's "getMethods()" returns methods in an unpredictable order.
3553 ;; To make the output of the generated code deterministic we must
3554 ;; sort the array of methods.
3555 (add-after 'unpack 'make-method-order-deterministic
3556 (lambda _
3557 (substitute* "hamcrest-generator/src/main/java/org/hamcrest/generator/ReflectiveFactoryReader.java"
3558 (("import java\\.util\\.Iterator;" line)
3559 (string-append line "\n"
3560 "import java.util.Arrays; import java.util.Comparator;"))
3561 (("allMethods = cls\\.getMethods\\(\\);" line)
3562 (string-append "_" line
3563 "
3564private Method[] getSortedMethods() {
3565 Arrays.sort(_allMethods, new Comparator<Method>() {
3566 @Override
3567 public int compare(Method a, Method b) {
3568 return a.toString().compareTo(b.toString());
3569 }
3570 });
3571 return _allMethods;
3572}
3573
3574private Method[] allMethods = getSortedMethods();")))
3575 #t))
3576 (add-before 'build 'do-not-use-bundled-qdox
3577 (lambda* (#:key inputs #:allow-other-keys)
3578 (substitute* "build.xml"
3579 (("lib/generator/qdox-1.12.jar")
3580 (string-append (assoc-ref inputs "java-qdox-1.12")
3581 "/share/java/qdox.jar")))
3582 #t))
3583 ;; build.xml searches for .jar files in this directoy, which
3584 ;; we remove from the source archive.
3585 (add-before 'build 'create-dummy-directories
3586 (lambda _
3587 (mkdir-p "lib/integration")
3588 #t))
3589 (add-before 'build 'create-pom
3590 (lambda _
3591 (substitute* "pom/hamcrest-core.pom"
3592 (("@VERSION@") ,version))
3593 #t))
3594 (replace 'install
3595 (install-from-pom "pom/hamcrest-core.pom")))))
3596 (native-inputs
3597 `(("java-qdox-1.12" ,java-qdox-1.12)
3598 ("java-jarjar" ,java-jarjar)))
3599 (propagated-inputs
3600 (list java-hamcrest-parent-pom))
3601 (home-page "https://hamcrest.org/")
3602 (synopsis "Library of matchers for building test expressions")
3603 (description
3604 "This package provides a library of matcher objects (also known as
3605constraints or predicates) allowing @code{match} rules to be defined
3606declaratively, to be used in other frameworks. Typical scenarios include
3607testing frameworks, mocking libraries and UI validation rules.")
3608 (license license:bsd-2)))
3609
3610(define-public java-hamcrest-parent-pom
3611 (package
3612 (inherit java-hamcrest-core)
3613 (properties '((hidden? . #t)))
3614 (name "java-hamcrest-parent-pom")
3615 (propagated-inputs '())
3616 (native-inputs '())
3617 (arguments
3618 `(#:tests? #f
3619 #:phases
3620 (modify-phases %standard-phases
3621 (delete 'configure)
3622 (replace 'build
3623 (lambda _
3624 (substitute* "pom/hamcrest-parent.pom"
3625 (("@VERSION@") ,(package-version java-hamcrest-core)))
3626 #t))
3627 (replace 'install
3628 (install-pom-file "pom/hamcrest-parent.pom")))))))
3629
3630(define-public java-hamcrest-library
3631 (package
3632 (inherit java-hamcrest-core)
3633 (name "java-hamcrest-library")
3634 (arguments
3635 (substitute-keyword-arguments (package-arguments java-hamcrest-core)
3636 ((#:build-target _) "library")
3637 ((#:phases phases)
3638 `(modify-phases ,phases
3639 (add-after 'unpack 'patch-classpath-for-integration
3640 (lambda* (#:key inputs #:allow-other-keys)
3641 (substitute* "build.xml"
3642 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
3643 (car (find-files (assoc-ref inputs "java-hamcrest-core")
3644 "jar$"))))
3645 #t))
3646 (replace 'create-pom
3647 (lambda _
3648 (substitute* "pom/hamcrest-library.pom"
3649 (("@VERSION@") ,(package-version java-hamcrest-core)))
3650 #t))
3651 (replace 'install
3652 (install-from-pom "pom/hamcrest-library.pom"))))))
3653 (propagated-inputs
3654 (list java-hamcrest-core java-hamcrest-parent-pom))))
3655
3656(define-public java-junit
3657 (package
3658 (name "java-junit")
3659 (version "4.12")
3660 (source (origin
3661 (method git-fetch)
3662 (uri (git-reference
3663 (url "https://github.com/junit-team/junit/")
3664 (commit (string-append "r" version))))
3665 (file-name (git-file-name name version))
3666 (sha256
3667 (base32
3668 "1j8avi91px1z8rjc89cfikwrvfifdmmsarwiyrcnr59ynvpz0v8h"))
3669 (modules '((guix build utils)))
3670 (snippet
3671 '(begin
3672 ;; Delete bundled jar archives.
3673 (delete-file-recursively "lib")
3674 #t))))
3675 (build-system ant-build-system)
3676 (arguments
3677 `(#:jar-name "junit.jar"
3678 #:source-dir "src/main/java"
3679 #:test-dir "src/test"
3680 #:test-exclude (list "**/SimpleTest.java" "**/StackTracesTest.java"
3681 "**/RuleChainTest.java" "**/TestWatchmanTest.java")
3682 #:phases
3683 (modify-phases %standard-phases
3684 (add-before 'check 'copy-test-resources
3685 (lambda _
3686 (copy-recursively "src/test/resources" "build/test-classes")
3687 #t))
3688 (replace 'install
3689 (install-from-pom "pom.xml")))))
3690 (propagated-inputs
3691 (list java-hamcrest-core))
3692 (native-inputs
3693 (list java-hamcrest-library))
3694 (home-page "https://junit.org/junit4/")
3695 (synopsis "Test framework for Java")
3696 (description
3697 "JUnit is a simple framework to write repeatable tests for Java projects.
3698JUnit provides assertions for testing expected results, test fixtures for
3699sharing common test data, and test runners for running tests.")
3700 (license license:epl1.0)))
3701
3702(define-public java-junitparams
3703 (package
3704 (name "java-junitparams")
3705 (version "1.1.1")
3706 (source (origin
3707 (method git-fetch)
3708 (uri (git-reference
3709 (url "https://github.com/Pragmatists/JUnitParams")
3710 (commit (string-append "JUnitParams-" version))))
3711 (file-name (git-file-name name version))
3712 (sha256
3713 (base32
3714 "0rb52xdfp99invyjrras3w0bf0a81cz30yd47rkkiyqcqj0y1q9b"))))
3715 (build-system ant-build-system)
3716 (arguments
3717 `(#:jar-name "junitparams.jar"
3718 #:source-dir "src/main/java"
3719 #:test-dir "src/test"
3720 #:test-exclude (list "**/SuperclassTest.java")))
3721 (inputs
3722 (list java-junit))
3723 (native-inputs
3724 (list java-junit java-hamcrest-core java-assertj))
3725 (home-page "https://github.com/Pragmatists/JUnitParams")
3726 (synopsis "Parameterised test support for JUnit")
3727 (description "The JUnitParams project adds a new runner to JUnit and
3728provides much easier and readable parametrised tests for JUnit.")
3729 (license license:asl2.0)))
3730
3731(define-public java-plexus-utils
3732 (package
3733 (name "java-plexus-utils")
3734 (version "3.3.0")
3735 (source (origin
3736 (method git-fetch)
3737 (uri (git-reference
3738 (url "https://github.com/codehaus-plexus/plexus-utils")
3739 (commit (string-append "plexus-utils-" version))))
3740 (file-name (git-file-name name version))
3741 (sha256
3742 (base32
3743 "0d0fq21rzjy0j55kcp8w9k1rbq9rwr0r7cc8239p9jbz54vihp0g"))))
3744 (build-system ant-build-system)
3745 ;; FIXME: The default build.xml does not include a target to install
3746 ;; javadoc files.
3747 (arguments
3748 `(#:jar-name "plexus-utils.jar"
3749 #:source-dir "src/main"
3750 #:phases
3751 (modify-phases %standard-phases
3752 (add-after 'unpack 'fix-reference-to-/bin-and-/usr
3753 (lambda _
3754 (substitute* "src/main/java/org/codehaus/plexus/util/\
3755cli/shell/BourneShell.java"
3756 (("/bin/sh") (which "sh"))
3757 (("/usr/") (getcwd)))
3758 #t))
3759 (add-after 'unpack 'fix-or-disable-broken-tests
3760 (lambda _
3761 (with-directory-excursion "src/test/java/org/codehaus/plexus/util"
3762 (substitute* '("cli/CommandlineTest.java"
3763 "cli/shell/BourneShellTest.java")
3764 (("/bin/sh") (which "sh"))
3765 (("/bin/echo") (which "echo")))
3766
3767 ;; This test depends on MavenProjectStub, but we don't have
3768 ;; a package for Maven.
3769 (delete-file "introspection/ReflectionValueExtractorTest.java")
3770
3771 ;; FIXME: The command line tests fail, maybe because they use
3772 ;; absolute paths.
3773 (delete-file "cli/CommandlineTest.java")
3774
3775 ;; These tests require openjdk jmh, which is not packaged yet
3776 (for-each delete-file (find-files "." "PerfTest.java$")))
3777 #t))
3778 (add-before 'build 'copy-resources
3779 (lambda _
3780 (copy-recursively "src/main/resources" "build/classes")
3781 #t))
3782 (replace 'install (install-from-pom "pom.xml")))))
3783 (native-inputs
3784 (list java-hamcrest-core java-junit))
3785 (propagated-inputs
3786 (list plexus-parent-pom-5.1))
3787 (home-page "https://codehaus-plexus.github.io/plexus-utils/")
3788 (synopsis "Common utilities for the Plexus framework")
3789 (description "This package provides various Java utility classes for the
3790Plexus framework to ease working with strings, files, command lines, XML and
3791more.")
3792 (license license:asl2.0)))
3793
3794(define-public java-plexus-utils-3.2.1
3795 (package
3796 (inherit java-plexus-utils)
3797 ;; plexus-build-api needs this version, later versions don't work
3798 (version "3.2.1")
3799 (source (origin
3800 (method git-fetch)
3801 (uri (git-reference
3802 (url "https://github.com/codehaus-plexus/plexus-utils")
3803 (commit (string-append "plexus-utils-" version))))
3804 (file-name (git-file-name "java-plexus-utils" version))
3805 (sha256
3806 (base32
3807 "1w169glixyk94jbczj8jzg897lsab46jihiaa3dhw0p06g35va8b"))))))
3808
3809(define-public java-plexus-interpolation
3810 (package
3811 (name "java-plexus-interpolation")
3812 (version "1.26")
3813 (source (origin
3814 (method git-fetch)
3815 (uri (git-reference
3816 (url "https://github.com/codehaus-plexus/plexus-interpolation")
3817 (commit (string-append "plexus-interpolation-" version))))
3818 (file-name (git-file-name name version))
3819 (sha256
3820 (base32
3821 "1rahjmhywf6d5m32qzlc9izawyvcd71abfm9k03f13rs2xmfxzlh"))))
3822 (build-system ant-build-system)
3823 (arguments
3824 `(#:jar-name "plexus-interpolation.jar"
3825 #:source-dir "src/main"
3826 #:phases
3827 (modify-phases %standard-phases
3828 (replace 'install (install-from-pom "pom.xml")))))
3829 (propagated-inputs
3830 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3831 (native-inputs
3832 (list java-junit java-hamcrest-core))
3833 (home-page "https://codehaus-plexus.github.io/plexus-interpolation/")
3834 (synopsis "Java components for interpolating ${} strings and the like")
3835 (description "Plexus interpolator is a modular, flexible interpolation
3836framework for the expression language style commonly seen in Maven, Plexus,
3837and other related projects.
3838
3839It has its foundation in the @code{org.codehaus.plexus.utils.interpolation}
3840package within @code{plexus-utils}, but has been separated in order to allow
3841these two libraries to vary independently of one another.")
3842 (license license:asl2.0)))
3843
3844(define-public java-plexus-classworlds
3845 (package
3846 (name "java-plexus-classworlds")
3847 (version "2.6.0")
3848 (source (origin
3849 (method git-fetch)
3850 (uri (git-reference
3851 (url "https://github.com/codehaus-plexus/plexus-classworlds")
3852 (commit (string-append "plexus-classworlds-" version))))
3853 (file-name (git-file-name name version))
3854 (sha256
3855 (base32
3856 "034k2hgvj1saalwbnzrbg4n0zgzwcpz1lhlb8q4kgglsp9pmm03s"))))
3857 (build-system ant-build-system)
3858 (arguments
3859 `(#:jar-name "plexus-classworlds.jar"
3860 #:source-dir "src/main"
3861 #:tests? #f;; FIXME: we need to generate some resources as in pom.xml
3862 #:phases
3863 (modify-phases %standard-phases
3864 (replace 'install (install-from-pom "pom.xml")))))
3865 (propagated-inputs
3866 `(("plexus-parent-pom-5.1" ,plexus-parent-pom-5.1)))
3867 (native-inputs
3868 (list java-junit))
3869 (home-page "https://codehaus-plexus.github.io/plexus-classworlds/")
3870 (synopsis "Java class loader framework")
3871 (description "Plexus classworlds replaces the native @code{ClassLoader}
3872mechanism of Java. It is especially useful for dynamic loading of application
3873components.")
3874 (license license:asl2.0)))
3875
3876(define java-plexus-container-default-bootstrap
3877 (package
3878 (name "java-plexus-container-default-bootstrap")
3879 (version "2.1.0")
3880 (source (origin
3881 (method git-fetch)
3882 (uri (git-reference
3883 (url "https://github.com/codehaus-plexus/plexus-containers")
3884 (commit (string-append "plexus-containers-" version))))
3885 (file-name (git-file-name name version))
3886 (sha256
3887 (base32
3888 "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
3889 (build-system ant-build-system)
3890 (arguments
3891 `(#:jar-name "container-default.jar"
3892 #:source-dir "plexus-container-default/src/main/java"
3893 #:test-dir "plexus-container-default/src/test"
3894 #:tests? #f; requires plexus-archiver, which depends on this package
3895 #:phases
3896 (modify-phases %standard-phases
3897 (add-before 'build 'fix-google-collections
3898 (lambda _
3899 ;; Google collections are now replaced with guava
3900 (substitute* "plexus-container-default/pom.xml"
3901 (("google-collections") "guava")
3902 (("com.google.collections") "com.google.guava"))
3903 #t))
3904 (add-before 'build 'copy-resources
3905 (lambda _
3906 (copy-recursively
3907 "plexus-container-default/src/main/resources/"
3908 "build/classes")
3909 #t))
3910 (replace 'install
3911 (install-from-pom "plexus-container-default/pom.xml")))))
3912 (propagated-inputs
3913 `(("java-plexus-worldclass" ,java-plexus-classworlds)
3914 ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
3915 ("java-plexus-utils" ,java-plexus-utils)
3916 ("java-junit" ,java-junit)
3917 ("java-guava" ,java-guava)
3918 ("java-plexus-containers-parent-pom" ,java-plexus-containers-parent-pom)))
3919 (home-page "https://github.com/codehaus-plexus/plexus-containers")
3920 (synopsis "Inversion-of-control container")
3921 (description "Plexus-default-container is Plexus' inversion-of-control
3922(@dfn{IoC}) container. It is composed of its public API and its default
3923implementation.")
3924 (license license:asl2.0)))
3925
3926(define java-plexus-containers-parent-pom
3927 (package
3928 (inherit java-plexus-container-default-bootstrap)
3929 (name "java-plexus-containers-parent-pom")
3930 (arguments
3931 `(#:tests? #f
3932 #:phases
3933 (modify-phases %standard-phases
3934 (delete 'configure)
3935 (delete 'build)
3936 (replace 'install
3937 (install-pom-file "pom.xml")))))
3938 (propagated-inputs
3939 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
3940
3941(define-public java-plexus-io
3942 (package
3943 (name "java-plexus-io")
3944 (version "3.2.0")
3945 (source (origin
3946 (method git-fetch)
3947 (uri (git-reference
3948 (url "https://github.com/codehaus-plexus/plexus-io")
3949 (commit (string-append "plexus-io-" version))))
3950 (file-name (git-file-name name version))
3951 (sha256
3952 (base32
3953 "1r3wqfpbxq8vp4p914i8p88r0994rmcjw02hz14n11cfb6gsyvlr"))))
3954 (build-system ant-build-system)
3955 (arguments
3956 `(#:jar-name "plexus-io.jar"
3957 #:source-dir "src/main/java"
3958 #:test-dir "src/test"
3959 #:phases
3960 (modify-phases %standard-phases
3961 (add-before 'build 'copy-resources
3962 (lambda _
3963 (mkdir-p "build/classes")
3964 (copy-recursively "src/main/resources" "build/classes")
3965 (mkdir-p "build/test-classes")
3966 (copy-recursively "src/test/resources" "build/test-classes")
3967 #t))
3968 (replace 'install (install-from-pom "pom.xml")))))
3969 (propagated-inputs
3970 (list java-plexus-utils java-commons-io plexus-parent-pom-5.1))
3971 (inputs
3972 (list java-jsr305))
3973 (native-inputs
3974 `(("junit" ,java-junit)
3975 ("hamcrest" ,java-hamcrest-core)
3976 ("guava" ,java-guava)
3977 ("classworlds" ,java-plexus-classworlds)
3978 ("xbean" ,java-geronimo-xbean-reflect)
3979 ("container-default" ,java-plexus-container-default-bootstrap)))
3980 (home-page "https://github.com/codehaus-plexus/plexus-io")
3981 (synopsis "I/O plexus components")
3982 (description "Plexus IO is a set of plexus components, which are designed
3983for use in I/O operations. This implementation using plexus components allows
3984reusing it in maven.")
3985 (license license:asl2.0)))
3986
3987(define-public java-plexus-archiver
3988 (package
3989 (name "java-plexus-archiver")
3990 (version "4.2.2")
3991 (source (origin
3992 (method url-fetch)
3993 (uri (string-append "https://github.com/codehaus-plexus/plexus-archiver"
3994 "/archive/plexus-archiver-" version ".tar.gz"))
3995 (sha256
3996 (base32
3997 "144n971r3lfrx3l12nf2scm80x4xdvgbkk4bjpa4vcvvdrll6qys"))))
3998 (build-system ant-build-system)
3999 (arguments
4000 `(#:jar-name "plexus-archiver.jar"
4001 #:source-dir "src/main/java"
4002 #:test-dir "src/test"
4003 #:test-exclude (list "**/Abstract*.java" "**/Base*.java")
4004 #:phases
4005 (modify-phases %standard-phases
4006 (add-before 'check 'remove-failing
4007 (lambda _
4008 ;; Requires an older version of plexus container
4009 (delete-file
4010 "src/test/java/org/codehaus/plexus/archiver/DuplicateFilesTest.java")
4011 #t))
4012 (add-before 'check 'fix-test-building
4013 (lambda _
4014 (substitute* "build.xml"
4015 (("srcdir=\"src/test\"") "srcdir=\"src/test/java\""))
4016 #t))
4017 (add-before 'build 'copy-resources
4018 (lambda _
4019 (mkdir-p "build/classes")
4020 (copy-recursively "src/main/resources" "build/classes")
4021 (mkdir-p "build/test-classes")
4022 (copy-recursively "src/test/resources" "build/test-classes")
4023 #t))
4024 (replace 'install (install-from-pom "pom.xml")))))
4025 (propagated-inputs
4026 (list java-plexus-utils java-plexus-io java-iq80-snappy
4027 java-commons-compress plexus-parent-pom-6.1))
4028 (inputs
4029 `(("java-jsr305" ,java-jsr305)
4030 ("java-plexus-container-default"
4031 ,java-plexus-container-default-bootstrap)))
4032 (native-inputs
4033 `(("java-hamcrest-core" ,java-hamcrest-core)
4034 ("junit" ,java-junit)
4035 ("classworld" ,java-plexus-classworlds)
4036 ("xbean" ,java-geronimo-xbean-reflect)
4037 ("xz" ,java-xz)
4038 ("guava" ,java-guava)))
4039 (home-page "https://github.com/codehaus-plexus/plexus-archiver")
4040 (synopsis "Archiver component of the Plexus project")
4041 (description "Plexus-archiver contains a component to deal with project
4042archives (jar).")
4043 (license license:asl2.0)))
4044
4045(define-public java-plexus-container-default
4046 (package
4047 (inherit java-plexus-container-default-bootstrap)
4048 (name "java-plexus-container-default")
4049 (arguments
4050 `(#:jar-name "container-default.jar"
4051 #:source-dir "plexus-container-default/src/main/java"
4052 #:test-dir "plexus-container-default/src/test"
4053 #:test-exclude (list ;"**/*Test.java"
4054 "**/Abstract*.java"
4055 ;; Requires plexus-hierarchy
4056 "**/PlexusHierarchyTest.java"
4057 ;; Failures
4058 "**/ComponentRealmCompositionTest.java"
4059 "**/PlexusContainerTest.java")
4060 #:phases
4061 (modify-phases %standard-phases
4062 (add-before 'build 'fix-google-collections
4063 (lambda _
4064 ;; Google collections are now replaced with guava
4065 (substitute* "plexus-container-default/pom.xml"
4066 (("google-collections") "guava")
4067 (("com.google.collections") "com.google.guava"))
4068 #t))
4069 (add-before 'build 'copy-resources
4070 (lambda _
4071 (copy-recursively
4072 "plexus-container-default/src/main/resources/"
4073 "build/classes")
4074 #t))
4075 (add-before 'check 'fix-paths
4076 (lambda _
4077 (let ((dir "plexus-container-default/src/test/java/org/codehaus"))
4078 (substitute*
4079 (string-append
4080 dir "/plexus/component/composition/"
4081 "ComponentRealmCompositionTest.java")
4082 (("src/test") "plexus-container-default/src/test"))
4083 #t)))
4084 (replace 'install
4085 (install-from-pom "plexus-container-default/pom.xml")))))
4086 (inputs
4087 `(("worldclass" ,java-plexus-classworlds)
4088 ("xbean" ,java-geronimo-xbean-reflect)
4089 ("utils" ,java-plexus-utils)
4090 ("junit" ,java-junit)
4091 ("guava" ,java-guava)))
4092 (native-inputs
4093 `(("archiver" ,java-plexus-archiver)
4094 ("hamcrest" ,java-hamcrest-core)))))
4095
4096(define-public java-plexus-component-annotations
4097 (package
4098 (inherit java-plexus-container-default)
4099 (name "java-plexus-component-annotations")
4100 (arguments
4101 `(#:jar-name "plexus-component-annotations.jar"
4102 #:source-dir "plexus-component-annotations/src/main/java"
4103 #:tests? #f; no tests
4104 #:phases
4105 (modify-phases %standard-phases
4106 (replace 'install
4107 (install-from-pom "plexus-component-annotations/pom.xml")))))
4108 (propagated-inputs
4109 (list java-plexus-containers-parent-pom))
4110 (inputs '())
4111 (native-inputs '())
4112 (synopsis "Plexus descriptors generator")
4113 (description "This package is a Maven plugin to generate Plexus descriptors
4114from source tags and class annotations.")))
4115
4116(define-public java-plexus-component-metadata
4117 (package
4118 (inherit java-plexus-container-default)
4119 (name "java-plexus-component-metadata")
4120 (arguments
4121 `(#:jar-name "plexus-component-metadata.jar"
4122 #:source-dir "src/main/java"
4123 #:test-dir "src/test"
4124 #:jdk ,icedtea-8
4125 #:phases
4126 (modify-phases %standard-phases
4127 (add-before 'configure 'chdir
4128 (lambda _
4129 (chdir "plexus-component-metadata")
4130 #t))
4131 (add-before 'build 'copy-resources
4132 (lambda _
4133 (copy-recursively "src/main/resources"
4134 "build/classes/")
4135 #t))
4136 (add-before 'build 'fix-jdom
4137 (lambda _
4138 ;; The newer version of jdom now sets multiple features by default
4139 ;; that are not supported.
4140 ;; Skip these features
4141 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4142 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4143 "// skip"))))
4144 (add-before 'build 'reinstate-cli
4145 ;; The CLI was removed in 2.1.0, but we still need it to build some
4146 ;; maven dependencies, and some parts of maven itself. We can't use
4147 ;; the maven plugin for that yet.
4148 (lambda _
4149 (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
4150 (lambda _
4151 ;; Copied from a previous version of this package.
4152 (display "package org.codehaus.plexus.metadata;
4153
4154import java.io.File;
4155import java.util.Arrays;
4156import java.util.Collections;
4157
4158import org.apache.commons.cli.CommandLine;
4159import org.apache.commons.cli.OptionBuilder;
4160import org.apache.commons.cli.Options;
4161import org.codehaus.plexus.PlexusContainer;
4162import org.codehaus.plexus.tools.cli.AbstractCli;
4163
4164public class PlexusMetadataGeneratorCli
4165 extends AbstractCli
4166{
4167 public static final char SOURCE_DIRECTORY = 's';
4168 public static final char SOURCE_ENCODING = 'e';
4169 public static final char CLASSES_DIRECTORY = 'c';
4170 public static final char OUTPUT_FILE = 'o';
4171 public static final char DESCRIPTORS_DIRECTORY = 'm';
4172
4173 public static void main( String[] args )
4174 throws Exception
4175 {
4176 new PlexusMetadataGeneratorCli().execute( args );
4177 }
4178
4179 @Override
4180 public String getPomPropertiesPath()
4181 {
4182 return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
4183 }
4184
4185 @Override
4186 @SuppressWarnings(\"static-access\")
4187 public Options buildCliOptions( Options options )
4188 {
4189 options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
4190 options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
4191 options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
4192 options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
4193 options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
4194 return options;
4195 }
4196
4197 public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
4198 throws Exception
4199 {
4200 MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
4201
4202 MetadataGenerationRequest request = new MetadataGenerationRequest();
4203 request.classesDirectory = new File( cli.getOptionValue( CLASSES_DIRECTORY ) );
4204 request.classpath = Collections.emptyList();
4205 request.sourceDirectories = Arrays.asList( new String[]{ new File( cli.getOptionValue( SOURCE_DIRECTORY ) ).getAbsolutePath() } );
4206 request.sourceEncoding = cli.getOptionValue( SOURCE_ENCODING );
4207 request.useContextClassLoader = true;
4208 request.outputFile = new File( cli.getOptionValue( OUTPUT_FILE ) );
4209 request.componentDescriptorDirectory = new File( cli.getOptionValue( DESCRIPTORS_DIRECTORY ) );
4210
4211 metadataGenerator.generateDescriptor( request );
4212 }
4213}")))))
4214 (add-before 'check 'fix-test-location
4215 (lambda _
4216 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4217 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4218 (("target") "build")))))))
4219 (propagated-inputs
4220 `(("java-plexus-container-default" ,java-plexus-container-default)
4221 ("java-plexu-component-annotations" ,java-plexus-component-annotations)
4222 ("java-plexus-utils" ,java-plexus-utils)
4223 ("java-plexus-cli" ,java-plexus-cli)
4224 ("java-plexus-classworlds" ,java-plexus-classworlds)
4225 ("maven-plugin-api" ,maven-plugin-api)
4226 ("maven-plugin-annotations" ,maven-plugin-annotations)
4227 ("maven-core-bootstrap" ,maven-core-bootstrap)
4228 ("maven-model" ,maven-model)
4229 ("java-commons-cli" ,java-commons-cli)
4230 ("java-qdox" ,java-qdox)
4231 ("java-jdom2" ,java-jdom2)
4232 ("java-asm-8" ,java-asm-8)))
4233 (native-inputs
4234 (list java-junit java-guava java-geronimo-xbean-reflect))
4235 (synopsis "Inversion-of-control container for Maven")
4236 (description "The Plexus project provides a full software stack for creating
4237and executing software projects. Based on the Plexus container, the
4238applications can utilise component-oriented programming to build modular,
4239reusable components that can easily be assembled and reused. This package
4240provides the Maven plugin generating the component metadata.")))
4241
4242(define-public java-plexus-container-default-1.7
4243 (package
4244 (inherit java-plexus-container-default)
4245 (version "1.7.1")
4246 (source (origin
4247 (method git-fetch)
4248 (uri (git-reference
4249 (url "https://github.com/codehaus-plexus/plexus-containers")
4250 (commit (string-append "plexus-containers-" version))))
4251 (file-name (git-file-name "java-plexus-container-default" version))
4252 (sha256
4253 (base32
4254 "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))))
4255
4256(define java-plexus-containers-parent-pom-1.7
4257 (package
4258 (inherit java-plexus-container-default-1.7)
4259 (name "java-plexus-containers-parent-pom")
4260 (arguments
4261 `(#:tests? #f
4262 #:phases
4263 (modify-phases %standard-phases
4264 (delete 'configure)
4265 (delete 'build)
4266 (replace 'install
4267 (install-pom-file "pom.xml")))))
4268 (propagated-inputs
4269 `(("plexus-parent-pom" ,plexus-parent-pom-4.0)))))
4270
4271(define-public java-plexus-component-annotations-1.7
4272 (package
4273 (inherit java-plexus-container-default-1.7)
4274 (name "java-plexus-component-annotations")
4275 (arguments
4276 `(#:jar-name "plexus-component-annotations.jar"
4277 #:source-dir "plexus-component-annotations/src/main/java"
4278 #:tests? #f; no tests
4279 #:phases
4280 (modify-phases %standard-phases
4281 (replace 'install
4282 (install-from-pom "plexus-component-annotations/pom.xml")))))
4283 (propagated-inputs
4284 `(("java-plexus-containers-parent-pom-1.7" ,java-plexus-containers-parent-pom-1.7)))
4285 (inputs '())
4286 (native-inputs '())
4287 (synopsis "Plexus descriptors generator")
4288 (description "This package is a Maven plugin to generate Plexus descriptors
4289from source tags and class annotations.")))
4290
4291(define-public java-plexus-component-metadata-1.7
4292 (package
4293 (inherit java-plexus-container-default-1.7)
4294 (name "java-plexus-component-metadata")
4295 (arguments
4296 `(#:jar-name "plexus-component-metadata.jar"
4297 #:source-dir "src/main/java"
4298 #:test-dir "src/test"
4299 #:phases
4300 (modify-phases %standard-phases
4301 (add-before 'configure 'chdir
4302 (lambda _
4303 (chdir "plexus-component-metadata")
4304 #t))
4305 (add-before 'build 'copy-resources
4306 (lambda _
4307 (copy-recursively "src/main/resources"
4308 "build/classes/")
4309 #t))
4310 (add-before 'build 'fix-jdom
4311 (lambda _
4312 ;; The newer version of jdom now sets multiple features by default
4313 ;; that are not supported.
4314 ;; Skip these features
4315 (substitute* "src/main/java/org/codehaus/plexus/metadata/merge/MXParser.java"
4316 (("throw new XmlPullParserException\\(\"unsupporte feature \"\\+name\\);")
4317 "// skip"))))
4318 (add-before 'check 'fix-test-location
4319 (lambda _
4320 (substitute* '("src/test/java/org/codehaus/plexus/metadata/DefaultComponentDescriptorWriterTest.java"
4321 "src/test/java/org/codehaus/plexus/metadata/merge/ComponentsXmlMergerTest.java")
4322 (("target") "build")))))))
4323 (propagated-inputs
4324 (list java-plexus-container-default-1.7
4325 java-plexus-component-annotations-1.7
4326 java-plexus-utils
4327 java-plexus-cli
4328 java-plexus-cli
4329 java-plexus-classworlds
4330 maven-plugin-api
4331 maven-plugin-annotations
4332 maven-core-bootstrap
4333 maven-model
4334 java-commons-cli
4335 java-qdox
4336 java-jdom2
4337 java-asm-8))
4338 (native-inputs
4339 (list java-junit java-guava java-geronimo-xbean-reflect))
4340 (synopsis "Inversion-of-control container for Maven")
4341 (description "The Plexus project provides a full software stack for creating
4342and executing software projects. Based on the Plexus container, the
4343applications can utilise component-oriented programming to build modular,
4344reusable components that can easily be assembled and reused. This package
4345provides the Maven plugin generating the component metadata.")))
4346
4347(define-public java-plexus-cipher
4348 (package
4349 (name "java-plexus-cipher")
4350 (version "2.0")
4351 (source (origin
4352 (method git-fetch)
4353 (uri (git-reference
4354 (url "https://github.com/codehaus-plexus/plexus-cipher")
4355 (commit (string-append "plexus-cipher-" version))))
4356 (file-name (git-file-name name version))
4357 (sha256
4358 (base32
4359 "01fipdsm090n8j4207fl8kbxznkgkmkkgyazf53hm1nwn6na5aai"))))
4360 (build-system ant-build-system)
4361 (arguments
4362 `(#:jar-name "plexus-cipher.jar"
4363 #:source-dir "src/main/java"
4364 #:phases
4365 (modify-phases %standard-phases
4366 (add-before 'build 'generate-javax.inject.Named
4367 (lambda _
4368 (mkdir-p "build/classes/META-INF/sisu")
4369 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4370 (lambda _
4371 (display
4372 "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4373 #t))
4374 (replace 'install (install-from-pom "pom.xml")))))
4375 (inputs
4376 `(("java-cdi-api" ,java-cdi-api)
4377 ("java-javax-inject" ,java-javax-inject)))
4378 (propagated-inputs
4379 `(("java-sonatype-spice-parent-pom" ,java-sonatype-spice-parent-pom-15)
4380 ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)))
4381 (native-inputs
4382 `(("java-junit" ,java-junit)))
4383 (home-page "https://github.com/sonatype/plexus-cipher")
4384 (synopsis "Encryption/decryption Component")
4385 (description "Plexus-cipher contains a component to deal with encryption
4386and decryption.")
4387 (license license:asl2.0)))
4388
4389(define-public java-plexus-cipher-1.7
4390 (package
4391 (inherit java-plexus-cipher)
4392 (version "1.7")
4393 (source (origin
4394 (method git-fetch)
4395 (uri (git-reference
4396 (url "https://github.com/codehaus-plexus/plexus-cipher")
4397 (commit (string-append "plexus-cipher-" version))))
4398 (file-name (git-file-name "java-plexus-cipher" version))
4399 (sha256
4400 (base32
4401 "0m638nzlxbmnbcj5cwdpgs326ab584yv0k803zlx37r6iqwvf6b0"))))
4402 (arguments
4403 `(#:jar-name "plexus-cipher.jar"
4404 #:source-dir "src/main/java"
4405 #:tests? #f; FIXME: requires sisu-inject-bean
4406 #:phases
4407 (modify-phases %standard-phases
4408 (add-before 'build 'copy-resources
4409 (lambda _
4410 (copy-recursively "src/main/resources" "build/classes")
4411 (mkdir-p "build/classes/META-INF/sisu")
4412 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4413 (lambda _
4414 (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n")))
4415 #t))
4416 (add-before 'install 'fix-test-dependency
4417 (lambda _
4418 ;; sisu-inject-bean is only used for tests, but its scope is "provided".
4419 (substitute* "pom.xml"
4420 (("provided") "test"))
4421 #t))
4422 (replace 'install (install-from-pom "pom.xml")))))
4423 (propagated-inputs
4424 (list java-sonatype-spice-parent-pom-15))))
4425
4426(define-public java-plexus-java
4427 (package
4428 (name "java-plexus-java")
4429 (version "0.9.10")
4430 (source (origin
4431 (method git-fetch)
4432 (uri (git-reference
4433 (url "https://github.com/codehaus-plexus/plexus-languages")
4434 (commit (string-append "plexus-languages-" version))))
4435 (file-name (git-file-name name version))
4436 (sha256
4437 (base32
4438 "0vmvgq5hfxs90yyxgssfpwq78l7vwx1ljwpkk594mrdr8sm668b5"))
4439 (modules '((guix build utils)))
4440 (snippet
4441 `(begin
4442 (for-each delete-file (find-files "." ".*.jar$"))
4443 #t))))
4444 (build-system ant-build-system)
4445 (arguments
4446 `(#:jar-name "plexus-java.java"
4447 #:source-dir "plexus-java/src/main/java"
4448 #:test-dir "plexus-java/src/test"
4449 #:tests? #f; require mockito 2
4450 #:phases
4451 (modify-phases %standard-phases
4452 (add-after 'build 'generate-metadata
4453 (lambda _
4454 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4455 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4456 "--source" "plexus-java/src/main/java"
4457 "--output" "build/classes/META-INF/plexus/components.xml"
4458 "--classes" "build/classes"
4459 "--descriptors" "build/classes/META-INF")
4460 (invoke "ant" "jar")
4461 #t))
4462 (add-before 'install 'install-parent
4463 (install-pom-file "pom.xml"))
4464 (replace 'install
4465 (install-from-pom "plexus-java/pom.xml")))))
4466 (propagated-inputs
4467 (list java-asm java-qdox-2-M9 java-javax-inject
4468 plexus-parent-pom-4.0))
4469 (inputs
4470 (list java-plexus-component-annotations-1.7))
4471 (native-inputs
4472 (list java-plexus-component-metadata-1.7 java-junit))
4473 (home-page "https://codehaus-plexus.github.io/plexus-languages/plexus-java")
4474 (synopsis "Shared language features for Java")
4475 (description "This package contains shared language features of the Java
4476language, for the plexus project.")
4477 (license license:asl2.0)))
4478
4479(define-public java-plexus-compiler-api
4480 (package
4481 (name "java-plexus-compiler-api")
4482 (version "2.8.4")
4483 (source (origin
4484 (method git-fetch)
4485 (uri (git-reference
4486 (url "https://github.com/codehaus-plexus/plexus-compiler")
4487 (commit (string-append "plexus-compiler-" version))))
4488 (file-name (git-file-name name version))
4489 (sha256
4490 (base32
4491 "1nq1gnn3s6z1j29gmi1hqbklsmm8b1lmnafb0191914f95mn18gk"))))
4492 (build-system ant-build-system)
4493 (arguments
4494 `(#:jar-name "plexus-compiler-api.jar"
4495 #:source-dir "plexus-compiler-api/src/main/java"
4496 #:test-dir "plexus-compiler-api/src/test"
4497 #:phases
4498 (modify-phases %standard-phases
4499 (replace 'install
4500 (install-from-pom "plexus-compiler-api/pom.xml")))))
4501 (propagated-inputs
4502 `(("java-plexus-container-default" ,java-plexus-container-default)
4503 ("java-plexus-compiler-pom" ,java-plexus-compiler-pom)
4504 ("java-plexus-util" ,java-plexus-utils)))
4505 (native-inputs
4506 (list java-junit))
4507 (home-page "https://github.com/codehaus-plexus/plexus-compiler")
4508 (synopsis "Plexus Compilers component's API to manipulate compilers")
4509 (description "This package contains the API used by components to manipulate
4510compilers.")
4511 (license (list license:asl2.0
4512 license:expat))))
4513
4514(define java-plexus-compiler-pom
4515 (package
4516 (inherit java-plexus-compiler-api)
4517 (name "java-plexus-compiler-pom")
4518 (arguments
4519 `(#:tests? #f
4520 #:phases
4521 (modify-phases %standard-phases
4522 (delete 'configure)
4523 (delete 'build)
4524 (replace 'install
4525 (install-pom-file "pom.xml"))
4526 (add-after 'install 'install-compilers
4527 (install-pom-file "plexus-compilers/pom.xml")))))
4528 (propagated-inputs
4529 `(("plexus-components-parent-pom-4.0" ,plexus-components-parent-pom-4.0)))))
4530
4531(define plexus-components-parent-pom-4.0
4532 (package
4533 (name "plexus-components-parent-pom")
4534 (version "4.0")
4535 (source (origin
4536 (method git-fetch)
4537 (uri (git-reference
4538 (url "https://github.com/codehaus-plexus/plexus-components")
4539 (commit (string-append "plexus-components-" version))))
4540 (file-name (git-file-name name version))
4541 (sha256
4542 (base32
4543 "041bm8yv0m2i17mqg8zljib4ykpha7ijls2qfdwvkma4d39lhysi"))))
4544 (build-system ant-build-system)
4545 (arguments
4546 `(#:tests? #f
4547 #:phases
4548 (modify-phases %standard-phases
4549 (delete 'configure)
4550 (delete 'build)
4551 (replace 'install
4552 (install-pom-file "pom.xml")))))
4553 (propagated-inputs
4554 `(("plexus-parent-pom-4.0" ,plexus-parent-pom-4.0)))
4555 (home-page "https://codehaus-plexus.github.io/plexus-components")
4556 (synopsis "Plexus parent pom")
4557 (description "This package contains the Plexus components parent POM.")
4558 (license license:asl2.0)))
4559
4560(define-public java-plexus-compiler-manager
4561 (package
4562 (inherit java-plexus-compiler-api)
4563 (name "java-plexus-compiler-manager")
4564 (arguments
4565 `(#:jar-name "compiler-compiler-manager.java"
4566 #:source-dir "plexus-compiler-manager/src/main/java"
4567 #:test-dir "plexus-compiler-manager/src/test"
4568 #:tests? #f
4569 #:phases
4570 (modify-phases %standard-phases
4571 (add-after 'build 'generate-metadata
4572 (lambda _
4573 (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
4574 "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
4575 "--source" "plexus-compiler-manager/src/main/java"
4576 "--output" "build/classes/META-INF/plexus/components.xml"
4577 "--classes" "build/classes"
4578 "--descriptors" "build/classes/META-INF")
4579 (invoke "ant" "jar")
4580 #t))
4581 (add-after 'generate-metadata 'rebuild
4582 (lambda _
4583 (invoke "ant" "jar")
4584 #t))
4585 (replace 'install
4586 (install-from-pom "plexus-compiler-manager/pom.xml")))))
4587 (propagated-inputs
4588 (list java-plexus-compiler-api java-plexus-compiler-pom
4589 java-plexus-container-default-1.7))
4590 (native-inputs
4591 (list unzip java-plexus-component-metadata-1.7))
4592 (synopsis "Compiler management for Plexus Compiler component")
4593 (description "Plexus Compiler is a Plexus component to use different
4594compilers through a uniform API. This component chooses the compiler
4595implementation to use in a project.")))
4596
4597(define-public java-plexus-compiler-javac
4598 (package
4599 (inherit java-plexus-compiler-api)
4600 (name "java-plexus-compiler-javac")
4601 (arguments
4602 `(#:jar-name "plexus-compiler-javac.jar"
4603 #:source-dir "plexus-compilers/plexus-compiler-javac/src/main/java"
4604 #:jdk ,icedtea-8
4605 #:tests? #f; depends on compiler-test -> maven-core -> ... -> this package.
4606 #:test-dir "plexus-compilers/plexus-compiler-javac/src/test"
4607 #:modules ((guix build ant-build-system)
4608 (guix build utils)
4609 (guix build java-utils)
4610 (sxml simple))
4611 #:phases
4612 (modify-phases %standard-phases
4613 ;; We cannot use java-plexus-component-metadata to generate the metadata
4614 ;; because it ultimately depends on this package.
4615 ;; Create it manually instead
4616 (add-before 'build 'create-metadata
4617 (lambda _
4618 (let* ((dir "build/classes/META-INF/plexus")
4619 (file (string-append dir "/components.xml")))
4620 (mkdir-p dir)
4621 (with-output-to-file file
4622 (lambda _
4623 (sxml->xml
4624 `(component-set
4625 (components
4626 (component
4627 (role "org.codehaus.plexus.compiler.Compiler")
4628 (role-hint "javac")
4629 (implementation "org.codehaus.plexus.compiler.javac.JavacCompiler")
4630 (isolated-realm "false"))))))))
4631 #t))
4632 (replace 'install
4633 (install-from-pom "plexus-compilers/plexus-compiler-javac/pom.xml")))))
4634 (propagated-inputs
4635 (list java-plexus-compiler-api java-plexus-utils
4636 java-plexus-container-default))
4637 (synopsis "Javac Compiler support for Plexus Compiler component")
4638 (description "This package contains the Javac Compiler support for Plexus
4639Compiler component.")))
4640
4641(define plexus-components-pom-1.1.20
4642 (package
4643 (name "plexus-components-pom-1.1.20")
4644 (version "1.1.20")
4645 (source (origin
4646 (method git-fetch)
4647 (uri (git-reference
4648 (url "https://github.com/codehaus-plexus/plexus-components")
4649 (commit (string-append "plexus-components-" version))))
4650 (file-name (git-file-name name version))
4651 (sha256
4652 (base32
4653 "1q254k95m9icyfsvaw8c226midg8v6v436wvivhv7im825mnp5yb"))))
4654 (build-system ant-build-system)
4655 (arguments
4656 `(#:tests? #f
4657 #:phases
4658 (modify-phases %standard-phases
4659 (delete 'configure)
4660 (delete 'build)
4661 (replace 'install
4662 (install-pom-file "pom.xml")))))
4663 (propagated-inputs
4664 `(("plexus-parent-pom" ,plexus-parent-pom-3.1)))
4665 (home-page "https://github.com/codehaus-plexus/plexus-components")
4666 (synopsis "Maven parent pom for plexus packages")
4667 (description "This package contains the parent pom for plexus component
4668packages.")
4669 (license license:asl2.0)))
4670
4671(define-public java-plexus-digest
4672 (package
4673 (name "java-plexus-digest")
4674 (version "1.2")
4675 (source (origin
4676 (method git-fetch)
4677 (uri (git-reference
4678 (url "https://github.com/codehaus-plexus/plexus-digest")
4679 (commit "2a52ad1bda8297fa0e287163d2fa37245ec6a430")))
4680 (file-name (git-file-name name version))
4681 (sha256
4682 (base32
4683 "19w5wxsliz8r42niry68qa665kvjsb8081dazg9vgd3pca72w07x"))))
4684 (build-system ant-build-system)
4685 (arguments
4686 `(#:jar-name "plexus-digest.jar"
4687 #:source-dir "src/main/java"
4688 #:tests? #f
4689 #:phases
4690 (modify-phases %standard-phases
4691 (replace 'install
4692 (install-from-pom "pom.xml")))))
4693 (propagated-inputs
4694 (list java-plexus-utils plexus-components-pom-1.1.20))
4695 (native-inputs
4696 (list java-junit))
4697 (home-page "https://github.com/codehaus-plexus/plexus-digest")
4698 (synopsis "Hash function utilities for Java")
4699 (description "This package is a plexus component that contains hash
4700function utilities.")
4701 (license license:asl2.0)))
4702
4703(define-public java-plexus-sec-dispatcher
4704 (package
4705 (name "java-plexus-sec-dispatcher")
4706 (version "2.0")
4707 (source (origin
4708 (method git-fetch)
4709 (uri (git-reference
4710 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4711 (commit (string-append "plexus-sec-dispatcher-" version))))
4712 (sha256
4713 (base32
4714 "0665zcyxkv2knydxgv2dn64zvy1dx9j9af12ds9s64qmzd1rk6pk"))
4715 (file-name (git-file-name name version))))
4716 (arguments
4717 `(#:jar-name "plexus-sec-dispatcher.jar"
4718 #:source-dir "src/main/java"
4719 #:phases
4720 (modify-phases %standard-phases
4721 (add-before 'build 'generate-models
4722 (lambda* (#:key inputs #:allow-other-keys)
4723 (define (modello-single-mode file version mode)
4724 (invoke "java"
4725 "org.codehaus.modello.ModelloCli"
4726 file mode "src/main/java" version
4727 "false" "true"))
4728 (let ((file "src/main/mdo/settings-security.mdo"))
4729 (modello-single-mode file "1.0.0" "java")
4730 (modello-single-mode file "1.0.0" "xpp3-reader")
4731 (modello-single-mode file "1.0.0" "xpp3-writer"))
4732 #t))
4733 (add-before 'build 'generate-javax.inject.Named
4734 (lambda _
4735 (mkdir-p "build/classes/META-INF/sisu")
4736 (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
4737 (lambda _
4738 (display
4739 "org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher\n")))
4740 #t))
4741 (add-before 'check 'fix-paths
4742 (lambda _
4743 (copy-recursively "src/test/resources" "target")
4744 #t))
4745 (replace 'install (install-from-pom "pom.xml")))))
4746 (propagated-inputs
4747 (list java-plexus-utils java-plexus-cipher plexus-parent-pom-8))
4748 (native-inputs
4749 (list java-javax-inject
4750 java-modello-core
4751 ;; for modello
4752 java-plexus-container-default
4753 java-plexus-classworlds
4754 java-plexus-utils
4755 java-guava
4756 java-geronimo-xbean-reflect
4757 ;; modello plugins
4758 java-modello-plugins-java
4759 java-modello-plugins-xml
4760 java-modello-plugins-xpp3
4761 ;; for tests
4762 java-junit))
4763 (build-system ant-build-system)
4764 (home-page "https://github.com/sonatype/plexus-sec-dispatcher")
4765 (synopsis "Plexus Security Dispatcher Component")
4766 (description "This package is the Plexus Security Dispatcher Component.
4767This component decrypts a string passed to it.")
4768 (license license:asl2.0)))
4769
4770(define-public java-plexus-sec-dispatcher-1.4
4771 (package
4772 (inherit java-plexus-sec-dispatcher)
4773 (version "1.4")
4774 (source (origin
4775 (method git-fetch)
4776 (uri (git-reference
4777 (url "https://github.com/codehaus-plexus/plexus-sec-dispatcher")
4778 (commit (string-append "sec-dispatcher-" version))))
4779 (sha256
4780 (base32
4781 "1ng4yliy4cqpjr4fxxjbpwyk1wkch5f8vblm1kvwf328s4gibszs"))
4782 (file-name (git-file-name "java-plexus-sec-dispatcher" version))))
4783 (arguments
4784 (substitute-keyword-arguments (package-arguments java-plexus-sec-dispatcher)
4785 ((#:phases phases)
4786 `(modify-phases ,phases
4787 (delete 'generate-javax.inject.Named)
4788 (add-before 'build 'generate-components.xml
4789 (lambda _
4790 (mkdir-p "build/classes/META-INF/plexus")
4791 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4792 (lambda _
4793 (display
4794 "<component-set>\n
4795 <components>\n
4796 <component>\n
4797 <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n
4798 <role-hint>default</role-hint>\n
4799 <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n
4800 <description></description>\n
4801 <requirements>\n
4802 <requirement>\n
4803 <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n
4804 <field-name>_cipher</field-name>\n
4805 </requirement>\n
4806 <requirement>\n
4807 <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n
4808 <field-name>_decryptors</field-name>\n
4809 </requirement>\n
4810 </requirements>\n
4811 <configuration>\n
4812 <_configuration-file>~/.settings-security.xml</_configuration-file>\n
4813 </configuration>\n
4814 </component>\n
4815 </components>\n
4816</component-set>\n")))))))))
4817 (propagated-inputs
4818 (list java-plexus-utils java-plexus-cipher-1.7
4819 java-sonatype-spice-parent-pom-12))))
4820
4821(define-public java-plexus-cli
4822 (package
4823 (name "java-plexus-cli")
4824 (version "1.7")
4825 (source (origin
4826 (method git-fetch)
4827 (uri (git-reference
4828 (url "https://github.com/sonatype/plexus-cli")
4829 (commit "a776afa6bca84e5107bedb69440329cdb24ed645")))
4830 (file-name (string-append name "-" version))
4831 (sha256
4832 (base32
4833 "0xjrlay605rypv3zd7y24vlwf0039bil3n2cqw54r1ddpysq46vx"))))
4834 (build-system ant-build-system)
4835 (arguments
4836 `(#:jar-name "plexus-cli.jar"
4837 #:source-dir "src/main/java"
4838 #:jdk ,icedtea-8
4839 #:test-dir "src/test"))
4840 (inputs
4841 (list java-commons-cli java-plexus-container-default
4842 java-plexus-classworlds))
4843 (native-inputs
4844 (list java-plexus-utils java-junit java-guava))
4845 (home-page "https://codehaus-plexus.github.io/plexus-cli")
4846 (synopsis "CLI building library for plexus")
4847 (description "This package is a library to help creating CLI around
4848Plexus components.")
4849 (license license:asl2.0)))
4850
4851(define-public java-plexus-build-api
4852 (package
4853 (name "java-plexus-build-api")
4854 (version "0.0.7")
4855 (source (origin
4856 (method git-fetch)
4857 (uri (git-reference
4858 (url "https://github.com/codehaus-plexus/plexus-build-api")
4859 (commit (string-append "plexus-build-api-" version))))
4860 (file-name (git-file-name name version))
4861 (sha256
4862 (base32
4863 "1d5w6c58gkx30d51v7qwv1xrhc0ly76848gihmgshj19yf6yhca0"))))
4864 (build-system ant-build-system)
4865 (arguments
4866 `(#:jar-name "plexus-build-api.jar"
4867 #:source-dir "src/main/java"
4868 #:jdk ,icedtea-8
4869 #:tests? #f; FIXME: how to run the tests?
4870 #:phases
4871 (modify-phases %standard-phases
4872 (add-before 'build 'copy-resources
4873 (lambda _
4874 (copy-recursively "src/main/resources" "build/classes")
4875 (substitute* (find-files "build/classes")
4876 (("\\$\\{project.version\\}") ,version))
4877 #t))
4878 (add-before 'build 'generate-plexus-compontent
4879 (lambda _
4880 (mkdir-p "build/classes/META-INF/plexus")
4881 ;; This file is required for plexus to inject this package.
4882 ;; FIXME: how is it generated?
4883 (with-output-to-file "build/classes/META-INF/plexus/components.xml"
4884 (lambda _
4885 (display
4886 "<component-set>\n
4887 <components>\n
4888 <component>\n
4889 <role>org.sonatype.plexus.build.incremental.BuildContext</role>\n
4890 <role-hint>default</role-hint>\n
4891 <implementation>org.sonatype.plexus.build.incremental.DefaultBuildContext</implementation>\n
4892 <description>Filesystem based non-incremental build context implementation\n
4893which behaves as if all files were just created.</description>\n
4894 </component>\n
4895 </components>\n
4896</component-set>\n")))
4897 #t))
4898 (replace 'install
4899 (install-from-pom "pom.xml")))))
4900 (inputs
4901 (list java-plexus-utils-3.2.1 java-plexus-container-default))
4902 (home-page "https://github.com/codehaus-plexus/plexus-build-api/")
4903 (synopsis "Base build API for maven")
4904 (description "This package contains the base build API for maven and
4905a default implementation of it. This API is about scanning files in a
4906project and determining what files need to be rebuilt.")
4907 (license license:asl2.0)))
4908
4909(define-public java-modello-core
4910 (package
4911 (name "java-modello-core")
4912 (version "1.11")
4913 (source (origin
4914 (method git-fetch)
4915 (uri (git-reference
4916 (url "https://github.com/codehaus-plexus/modello")
4917 (commit (string-append "modello-" version))))
4918 (file-name (git-file-name name version))
4919 (sha256
4920 (base32
4921 "18885sim7z9j3wy19i9083y9kc8l9xxl2px823a96q4rnqj5z8s2"))))
4922 (build-system ant-build-system)
4923 (arguments
4924 `(#:jar-name "modello-core.jar"
4925 #:source-dir "modello-core/src/main/java"
4926 #:test-dir "modello-core/src/test"
4927 #:main-class "org.codehaus.modello.ModelloCli"
4928 #:jdk ,icedtea-8
4929 #:phases
4930 (modify-phases %standard-phases
4931 (add-before 'build 'copy-resources
4932 (lambda _
4933 (mkdir-p "build/classes/META-INF/plexus")
4934 (copy-file "modello-core/src/main/resources/META-INF/plexus/components.xml"
4935 "build/classes/META-INF/plexus/components.xml")
4936 #t))
4937 (add-before 'check 'fix-tests
4938 (lambda _
4939 (with-directory-excursion "modello-core/src/test/java/org/codehaus"
4940 (substitute* '("modello/core/DefaultModelloCoreTest.java"
4941 "modello/core/io/ModelReaderTest.java")
4942 (("src/test") "modello-core/src/test")))
4943 #t)))))
4944 (propagated-inputs
4945 (list java-plexus-utils java-plexus-container-default
4946 java-plexus-build-api))
4947 (native-inputs
4948 (list java-junit java-plexus-classworlds java-geronimo-xbean-reflect
4949 java-guava))
4950 (home-page "https://codehaus-plexus.github.io/modello/")
4951 (synopsis "Framework for code generation from a simple model")
4952 (description "Modello is a framework for code generation from a simple model.
4953
4954Modello generates code from a simple model format: based on a plugin
4955architecture, various types of code and descriptors can be generated from the
4956single model, including Java POJOs, XML/JSON/YAML marshallers/unmarshallers,
4957XSD and documentation.")
4958 (license (list
4959 license:expat
4960 ;; Although this package uses only files licensed under expat,
4961 ;; other parts of the source are licensed under different
4962 ;; licenses. We include them to be inherited by other packages.
4963 license:asl2.0
4964 ;; Some files in modello-plugin-java are licensed under a
4965 ;; 5-clause BSD license.
4966 (license:non-copyleft
4967 (string-append "file:///modello-plugins/modello-plugin-java/"
4968 "src/main/java/org/codehaus/modello/plugin/"
4969 "java/javasource/JNaming.java"))))))
4970
4971(define-public java-modello-plugins-java
4972 (package
4973 (inherit java-modello-core)
4974 (name "java-modello-plugins-java")
4975 (arguments
4976 `(#:jar-name "modello-plugins-java.jar"
4977 #:source-dir "modello-plugins/modello-plugin-java/src/main/java"
4978 #:test-dir "modello-plugins/modello-plugin-java/src/test"
4979 #:jdk ,icedtea-8
4980 #:tests? #f; requires maven-model, which depends on this package
4981 #:phases
4982 (modify-phases %standard-phases
4983 (add-before 'build 'copy-resources
4984 (lambda _
4985 (mkdir-p "build/classes")
4986 (copy-recursively "modello-plugins/modello-plugin-java/src/main/resources"
4987 "build/classes")
4988 #t)))))
4989 (inputs
4990 (list java-modello-core))
4991 (synopsis "Modello Java Plugin")
4992 (description "Modello Java Plugin generates Java objects for the model.")))
4993
4994(define-public java-modello-plugins-xml
4995 (package
4996 (inherit java-modello-core)
4997 (name "java-modello-plugins-xml")
4998 (arguments
4999 `(#:jar-name "modello-plugins-xml.jar"
5000 #:source-dir "modello-plugins/modello-plugin-xml/src/main/java"
5001 #:test-dir "modello-plugins/modello-plugin-xml/src/test"
5002 #:jdk ,icedtea-8
5003 #:phases
5004 (modify-phases %standard-phases
5005 (add-before 'build 'copy-resources
5006 (lambda _
5007 (mkdir-p "build/classes")
5008 (copy-recursively
5009 "modello-plugins/modello-plugin-xml/src/main/resources"
5010 "build/classes")
5011 #t))
5012 (add-before 'check 'fix-paths
5013 (lambda _
5014 (with-directory-excursion "modello-plugins/modello-plugin-xml/src/test"
5015 (substitute*
5016 "java/org/codehaus/modello/plugins/xml/XmlModelloPluginTest.java"
5017 (("src/test") "modello-plugins/modello-plugin-xml/src/test")))
5018 #t)))))
5019 (propagated-inputs
5020 (list java-modello-core java-modello-plugins-java))
5021 (synopsis "Modello XML Plugin")
5022 (description "Modello XML Plugin contains shared code for every plugins
5023working on XML representation of the model.")))
5024
5025(define-public java-modello-test
5026 (package
5027 (inherit java-modello-core)
5028 (name "java-modello-test")
5029 (arguments
5030 `(#:jar-name "modello-test.jar"
5031 #:source-dir "modello-test/src/main/java"
5032 #:tests? #f; no tests
5033 #:jdk ,icedtea-8))
5034 (inputs
5035 (list java-plexus-utils java-plexus-compiler-api
5036 java-plexus-compiler-javac java-plexus-container-default))
5037 (synopsis "Modello test package")
5038 (description "The modello test package contains the basis to create
5039Modello generator unit-tests, including sample models and xml files to test
5040every feature for every plugin.")))
5041
5042(define-public java-modello-plugins-xpp3
5043 (package
5044 (inherit java-modello-core)
5045 (name "java-modello-plugins-xpp3")
5046 (arguments
5047 `(#:jar-name "modello-plugins-xpp3.jar"
5048 #:source-dir "modello-plugins/modello-plugin-xpp3/src/main/java"
5049 #:test-dir "modello-plugins/modello-plugin-xpp3/src/test"
5050 ;; One of the test dependencies is maven-model which depends on this package.
5051 #:tests? #f
5052 #:jdk ,icedtea-8
5053 #:phases
5054 (modify-phases %standard-phases
5055 (add-before 'build 'copy-resources
5056 (lambda _
5057 (mkdir-p "build/classes")
5058 (copy-recursively "modello-plugins/modello-plugin-xpp3/src/main/resources"
5059 "build/classes")
5060 #t)))))
5061 (propagated-inputs
5062 (list java-modello-core java-modello-plugins-java
5063 java-modello-plugins-xml))
5064 (native-inputs
5065 (modify-inputs (package-native-inputs java-modello-core)
5066 (prepend java-xmlunit java-modello-test)))
5067 (synopsis "Modello XPP3 Plugin")
5068 (description "The modello XPP3 plugin generates XML readers and writers based
5069on the XPP3 API (XML Pull Parser).")))
5070
5071(define-public java-ow-util-ant-tasks
5072 (package
5073 (name "java-ow-util-ant-tasks")
5074 (version "1.3.2")
5075 (source (origin
5076 (method url-fetch)
5077 (uri (string-append
5078 "mirror://debian/pool/main/o/ow-util-ant-tasks/"
5079 "ow-util-ant-tasks_" version ".orig.tar.gz"))
5080 (sha256
5081 (base32
5082 "1y5ln1g36aligwcadqksdj18i5ghqnxn523wjbzy2zyd7w58fgy5"))))
5083 (build-system ant-build-system)
5084 (arguments
5085 `(#:jar-name "ow-util-ant-tasks.jar"
5086 #:tests? #f; no tests
5087 #:phases
5088 (modify-phases %standard-phases
5089 (add-before 'build 'delete-cyclic-dependency
5090 (lambda _
5091 ;; This file depends on asm-3, which depends on this package
5092 (delete-file "src/org/objectweb/util/ant/DependencyAnalyzer.java")
5093 ;; This file depends on xalan
5094 (delete-file "src/org/objectweb/util/ant/Xalan2Liaison.java")))
5095 (add-before 'build 'fix-new-ant
5096 (lambda _
5097 (substitute* "src/org/objectweb/util/ant/MultipleCopy.java"
5098 ((", destFile.getAbsolutePath\\(\\)")
5099 ", new String[] { destFile.getAbsolutePath() }")))))))
5100 (home-page "https://packages.debian.org/source/stretch/ow-util-ant-tasks")
5101 (synopsis "Replacement for base ant tasks")
5102 (description "This library is used in the legacy build process of several
5103key frameworks developed by ObjectWeb, among them legacy versions of the
5104ObjectWeb ASM bytecode manipulation framework.")
5105 (license license:lgpl2.0+)))
5106
5107(define-public java-asm
5108 (package
5109 (name "java-asm")
5110 (version "6.0")
5111 (source (origin
5112 (method url-fetch)
5113 (uri (string-append "https://download.forge.ow2.org/asm/"
5114 "asm-" version ".tar.gz"))
5115 (sha256
5116 (base32
5117 "115l5pqblirdkmzi32dxx7gbcm4jy0s14y5wircr6h8jdr9aix00"))))
5118 (build-system ant-build-system)
5119 (arguments
5120 `(#:build-target "compile"
5121 ;; The tests require an old version of Janino, which no longer compiles
5122 ;; with the JDK7.
5123 #:tests? #f
5124 #:make-flags
5125 (list
5126 ;; We don't need these extra ant tasks, but the build system asks us to
5127 ;; provide a path anyway.
5128 "-Dobjectweb.ant.tasks.path=dummy-path"
5129 ;; The java-aqute.bndlib JAR file will be put onto the classpath and
5130 ;; used during the build automatically by ant-build-system, but
5131 ;; java-asm's build.xml fails unless we provide something here.
5132 "-Dbiz.aQute.bnd.path=dummy-path")
5133 #:phases
5134 (modify-phases %standard-phases
5135 (add-before 'build 'remove-bnd-dependency
5136 (lambda _
5137 ;; This file is the only one to require bnd, and is not needed
5138 ;; because we don't build a bundle.
5139 (delete-file "src/org/objectweb/asm/tools/ModuleInfoBndPlugin.java")
5140 #t))
5141 (add-before 'install 'build-jars
5142 (lambda* (#:key make-flags #:allow-other-keys)
5143 ;; We cannot use the "jar" target because it depends on a couple
5144 ;; of unpackaged, complicated tools.
5145 (mkdir "dist")
5146 (invoke "jar"
5147 "-cf" (string-append "dist/asm-" ,version ".jar")
5148 "-C" "output/build/tmp" ".")))
5149 (add-before 'install 'fix-pom
5150 (lambda _
5151 (substitute* (find-files "archive" "\\.pom$")
5152 (("@product.artifact@") ,version))
5153 #t))
5154 (add-before 'install 'install-parent
5155 (install-pom-file "archive/asm-parent.pom"))
5156 (replace 'install
5157 (install-from-pom "archive/asm.pom")))))
5158 (native-inputs
5159 (list java-junit))
5160 (propagated-inputs
5161 (list java-org-ow2-parent-pom-1.3))
5162 (home-page "https://asm.ow2.io/")
5163 (synopsis "Very small and fast Java bytecode manipulation framework")
5164 (description "ASM is an all purpose Java bytecode manipulation and
5165analysis framework. It can be used to modify existing classes or dynamically
5166generate classes, directly in binary form. The provided common
5167transformations and analysis algorithms allow easily assembling custom
5168complex transformations and code analysis tools.")
5169 (license license:bsd-3)))
5170
5171(define-public java-org-ow2-parent-pom-1.3
5172 (package
5173 (name "java-org-ow2-parent-pom")
5174 (version "1.3")
5175 (source (origin
5176 (method url-fetch)
5177 (uri "https://repo1.maven.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom")
5178 (sha256
5179 (base32
5180 "1yr8hfx8gffpppa4ii6cvrsq029a6x8hzy7nsavxhs60s9kmq8ai"))))
5181 (build-system ant-build-system)
5182 (arguments
5183 `(#:tests? #f
5184 #:phases
5185 (modify-phases %standard-phases
5186 (delete 'unpack)
5187 (delete 'build)
5188 (delete 'configure)
5189 (replace 'install
5190 ,#~(install-pom-file #$source)))))
5191 (home-page "https://ow2.org")
5192 (synopsis "Ow2.org parent pom")
5193 (description "This package contains the parent pom for projects from ow2.org,
5194including java-asm.")
5195 (properties '((hidden? . #t)))
5196 (license license:lgpl2.1+)))
5197
5198(define-public java-asm-bootstrap
5199 (package
5200 (inherit java-asm)
5201 (name "java-asm-bootstrap")
5202 (properties '((hidden? . #t)))
5203 (arguments
5204 (substitute-keyword-arguments (package-arguments java-asm)
5205 ((#:tests? _) #f)))
5206 (native-inputs `())))
5207
5208(define-public java-asm-3
5209 (package
5210 (inherit java-asm)
5211 (version "3.1")
5212 (source (origin
5213 (method git-fetch)
5214 (uri (git-reference
5215 (url "https://gitlab.ow2.org/asm/asm")
5216 (commit "ASM_3_1")))
5217 (file-name (git-file-name "java-asm" version))
5218 (sha256
5219 (base32
5220 "0xbyf2sl8j6mrvfpg2da0vjdp906rac62l66gkk82x5cn3vc30h4"))
5221 (modules '((guix build utils)))
5222 (snippet `(for-each delete-file (find-files "." "\\.jar$")))))
5223 (arguments
5224 `(#:build-target "jar"
5225 #:test-target "test"
5226 #:tests? #f; require legacy test software
5227 #:phases
5228 (modify-phases %standard-phases
5229 (replace 'install (install-jars "output/dist"))
5230 (delete 'generate-jar-indices))))
5231 (native-inputs (list java-ow-util-ant-tasks))))
5232
5233(define-public java-asm-8
5234 (package
5235 (inherit java-asm)
5236 (version "8.0.1")
5237 (source (origin
5238 (method git-fetch)
5239 (uri (git-reference
5240 (url "https://gitlab.ow2.org/asm/asm")
5241 (commit (string-append
5242 "ASM_" (string-join (string-split version #\.)
5243 "_")))))
5244 (file-name (git-file-name "java-asm" version))
5245 (sha256
5246 (base32
5247 "1s6j27zc1i76gh891w2g48b1c3abp9w8zp5j54yb1vm5h8djkd69"))))
5248 (arguments
5249 `(#:jar-name "asm8.jar"
5250 #:source-dir "asm/src/main/java"
5251 #:test-dir "asm/src/test"
5252 ;; tests depend on junit5
5253 #:tests? #f))
5254 (propagated-inputs '())
5255 (native-inputs '())))
5256
5257(define-public java-asm-tree-8
5258 (package
5259 (inherit java-asm-8)
5260 (name "java-asm-tree")
5261 (arguments
5262 `(#:jar-name "asm-tree.jar"
5263 #:source-dir "asm-tree/src/main/java"
5264 #:test-dir "asm-tree/src/test"
5265 ;; tests depend on junit5
5266 #:tests? #f))
5267 (inputs
5268 (list java-asm-8))))
5269
5270(define-public java-asm-analysis-8
5271 (package
5272 (inherit java-asm-8)
5273 (name "java-asm-analysis")
5274 (arguments
5275 `(#:jar-name "asm-analysis.jar"
5276 #:source-dir "asm-analysis/src/main/java"
5277 #:test-dir "asm-analysis/src/test"
5278 ;; tests depend on junit5
5279 #:tests? #f))
5280 (inputs
5281 (list java-asm-8 java-asm-tree-8))))
5282
5283(define-public java-asm-util-8
5284 (package
5285 (inherit java-asm-8)
5286 (name "java-asm-util")
5287 (arguments
5288 `(#:jar-name "asm-util8.jar"
5289 #:source-dir "asm-util/src/main/java"
5290 #:test-dir "asm-util/src/test"
5291 ;; tests depend on junit5
5292 #:tests? #f))
5293 (inputs
5294 (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5295
5296(define-public java-asm-commons-8
5297 (package
5298 (inherit java-asm-8)
5299 (name "java-asm-commons")
5300 (arguments
5301 (list #:jar-name "asm-commons8.jar"
5302 #:source-dir "asm-commons/src/main/java"
5303 #:test-dir "asm-commons/src/test"
5304 ;; tests depend on junit5
5305 #:tests? #f))
5306 (inputs (list java-asm-8 java-asm-analysis-8 java-asm-tree-8))))
5307
5308(define-public java-asm-9
5309 (package
5310 (inherit java-asm)
5311 (version "9.4")
5312 (source (origin
5313 (method git-fetch)
5314 (uri (git-reference
5315 (url "https://gitlab.ow2.org/asm/asm")
5316 (commit (string-append
5317 "ASM_" (string-join (string-split version #\.)
5318 "_")))))
5319 (file-name (git-file-name "java-asm" version))
5320 (sha256
5321 (base32
5322 "0c00m638skr5md1p6y1c2xn11kj5w6sjapyvwp9mh70rw095bwzk"))))
5323 (arguments
5324 `(#:jar-name "asm9.jar"
5325 #:source-dir "asm/src/main/java"
5326 #:test-dir "asm/src/test"
5327 ;; tests depend on junit5
5328 #:tests? #f))
5329 (propagated-inputs '())
5330 (native-inputs '())))
5331
5332(define-public java-asm-tree-9
5333 (package
5334 (inherit java-asm-9)
5335 (name "java-asm-tree")
5336 (arguments
5337 `(#:jar-name "asm-tree.jar"
5338 #:source-dir "asm-tree/src/main/java"
5339 #:test-dir "asm-tree/src/test"
5340 ;; tests depend on junit5
5341 #:tests? #f))
5342 (inputs
5343 (list java-asm-9))))
5344
5345(define-public java-asm-analysis-9
5346 (package
5347 (inherit java-asm-9)
5348 (name "java-asm-analysis")
5349 (arguments
5350 `(#:jar-name "asm-analysis.jar"
5351 #:source-dir "asm-analysis/src/main/java"
5352 #:test-dir "asm-analysis/src/test"
5353 ;; tests depend on junit5
5354 #:tests? #f))
5355 (inputs
5356 (list java-asm-9 java-asm-tree-9))))
5357
5358(define-public java-asm-util-9
5359 (package
5360 (inherit java-asm-9)
5361 (name "java-asm-util")
5362 (arguments
5363 `(#:jar-name "asm-util8.jar"
5364 #:source-dir "asm-util/src/main/java"
5365 #:test-dir "asm-util/src/test"
5366 ;; tests depend on junit5
5367 #:tests? #f))
5368 (inputs
5369 (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5370
5371(define-public java-asm-commons-9
5372 (package
5373 (inherit java-asm-9)
5374 (name "java-asm-commons")
5375 (arguments
5376 (list #:jar-name "asm-commons8.jar"
5377 #:source-dir "asm-commons/src/main/java"
5378 #:test-dir "asm-commons/src/test"
5379 ;; tests depend on junit5
5380 #:tests? #f))
5381 (inputs (list java-asm-9 java-asm-analysis-9 java-asm-tree-9))))
5382
5383(define-public java-cglib
5384 (package
5385 (name "java-cglib")
5386 (version "3.3.0")
5387 (source
5388 (origin
5389 (method git-fetch)
5390 (uri (git-reference
5391 (url "https://github.com/cglib/cglib")
5392 (commit (string-append
5393 "RELEASE_"
5394 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
5395 version)))))
5396 (file-name (git-file-name name version))
5397 (sha256
5398 (base32 "1lnscamc6bnhh7jgij5garxagp3zn2jp4cbq0rsn4xr3l0cnd014"))))
5399 (build-system ant-build-system)
5400 (arguments
5401 `(;; FIXME: tests fail because junit runs
5402 ;; "net.sf.cglib.transform.AbstractTransformTest", which does not seem
5403 ;; to describe a test at all.
5404 #:tests? #f
5405 #:jar-name "cglib.jar"
5406 #:phases
5407 (modify-phases %standard-phases
5408 (add-after 'unpack 'chdir
5409 (lambda _ (chdir "cglib") #t)))))
5410 (native-inputs (list java-junit))
5411 (propagated-inputs (list java-asm-8))
5412 (home-page "https://github.com/cglib/cglib/")
5413 (synopsis "Java byte code generation library")
5414 (description "The byte code generation library CGLIB is a high level API
5415to generate and transform Java byte code.")
5416 (license license:asl2.0)))
5417
5418(define-public java-objenesis
5419 (package
5420 (name "java-objenesis")
5421 (version "3.3")
5422 (source (origin
5423 (method git-fetch)
5424 (uri (git-reference
5425 (url "https://github.com/easymock/objenesis")
5426 (commit version)))
5427 (file-name (git-file-name name version))
5428 (sha256
5429 (base32
5430 "1brlcn536p4s1v1f3vzxhr38lvyhc33wjrbj2x06kdrd8agy90cr"))))
5431 (build-system ant-build-system)
5432 (arguments
5433 `(#:tests? #f; require junit-5
5434 #:jar-name "objenesis.jar"
5435 #:source-dir "main/src/main/java"
5436 #:test-dir "main/src/test/"))
5437 (native-inputs
5438 (list java-junit java-hamcrest-core))
5439 (home-page "http://objenesis.org/")
5440 (synopsis "Bypass the constructor when creating an object")
5441 (description "Objenesis is a small Java library that serves one purpose:
5442to instantiate a new object of a particular class. It is common to see
5443restrictions in libraries stating that classes must require a default
5444constructor. Objenesis aims to overcome these restrictions by bypassing the
5445constructor on object instantiation.")
5446 (license license:asl2.0)))
5447
5448(define-public java-easymock
5449 (package
5450 (name "java-easymock")
5451 (version "3.4")
5452 (source (origin
5453 (method git-fetch)
5454 (uri (git-reference
5455 (url "https://github.com/easymock/easymock/")
5456 (commit (string-append "easymock-" version))))
5457 (file-name (git-file-name name version))
5458 (sha256
5459 (base32
5460 "02vybm8hc0i0n9sp2f2iiqn54zwqhq835f76wc6b2m7819z5a8dq"))))
5461 (build-system ant-build-system)
5462 (arguments
5463 `(#:jar-name "easymock.jar"
5464 #:source-dir "core/src/main"
5465 #:test-dir "core/src/test"
5466 #:phases
5467 (modify-phases %standard-phases
5468 ;; FIXME: Android support requires the following packages to be
5469 ;; available: com.google.dexmaker.stock.ProxyBuilder
5470 (add-after 'unpack 'delete-android-support
5471 (lambda _
5472 (with-directory-excursion "core/src/main/java/org/easymock/internal"
5473 (substitute* "MocksControl.java"
5474 (("AndroidSupport.isAndroid\\(\\)") "false")
5475 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5476 (delete-file "AndroidClassProxyFactory.java"))
5477 #t))
5478 (add-after 'unpack 'delete-broken-tests
5479 (lambda _
5480 (with-directory-excursion "core/src/test/java/org/easymock"
5481 ;; This test depends on dexmaker.
5482 (delete-file "tests2/ClassExtensionHelperTest.java")
5483
5484 ;; This is not a test.
5485 (delete-file "tests/BaseEasyMockRunnerTest.java")
5486
5487 ;; This test should be executed with a different runner...
5488 (delete-file "tests2/EasyMockAnnotationsTest.java")
5489 ;; ...but deleting it means that we also have to delete these
5490 ;; dependent files.
5491 (delete-file "tests2/EasyMockRunnerTest.java")
5492 (delete-file "tests2/EasyMockRuleTest.java")
5493
5494 ;; This test fails because the file "easymock.properties" does
5495 ;; not exist.
5496 (delete-file "tests2/EasyMockPropertiesTest.java"))
5497 #t)))))
5498 (inputs
5499 (list java-cglib java-objenesis))
5500 (native-inputs
5501 (list java-junit java-hamcrest-core))
5502 (home-page "https://easymock.org/")
5503 (synopsis "Java library providing mock objects for unit tests")
5504 (description "EasyMock is a Java library that provides an easy way to use
5505mock objects in unit testing.")
5506 (license license:asl2.0)))
5507
5508(define-public java-easymock-3.2
5509 (package
5510 (inherit java-easymock)
5511 (name "java-easymock")
5512 (version "3.2")
5513 (source (origin
5514 (method git-fetch)
5515 (uri (git-reference
5516 (url "https://github.com/easymock/easymock/")
5517 (commit (string-append "easymock-" version))))
5518 (file-name (git-file-name name version))
5519 (sha256
5520 (base32
5521 "0cn6qqa261mhk9mwxrsz39lkkknfv2h7iprr5zw7wpz9p96dwgv4"))))
5522 (arguments
5523 (list #:jar-name "easymock.jar"
5524 #:source-dir "easymock/src/main"
5525 #:test-dir "easymock/src/test"
5526 #:phases
5527 #~(modify-phases %standard-phases
5528 (add-after 'unpack 'delete-android-support
5529 (lambda _
5530 (with-directory-excursion "easymock/src/main/java/org/easymock/internal"
5531 (substitute* "MocksControl.java"
5532 (("AndroidSupport.isAndroid\\(\\)") "false")
5533 (("return classProxyFactory = new AndroidClassProxyFactory\\(\\);") ""))
5534 (delete-file "AndroidClassProxyFactory.java"))))
5535 (add-after 'unpack 'delete-broken-tests
5536 (lambda _
5537 (with-directory-excursion "easymock/src/test/java/org/easymock"
5538 ;; This test depends on dexmaker.
5539 (delete-file "tests2/ClassExtensionHelperTest.java")
5540 ;; This is not a test.
5541 (delete-file "tests/BaseEasyMockRunnerTest.java")
5542 ;; ...but deleting it means that we also have to delete these
5543 ;; dependent files.
5544 (delete-file "tests2/EasyMockRunnerTest.java")
5545 ;; This test fails because the file "easymock.properties" does
5546 ;; not exist.
5547 (delete-file "tests2/EasyMockPropertiesTest.java")))))))))
5548
5549(define-public java-easymock-class-extension
5550 (package
5551 (inherit java-easymock-3.2)
5552 (name "java-easymock-class-extension")
5553 (build-system ant-build-system)
5554 (arguments
5555 (list #:jar-name "easymock-class-extensions.jar"
5556 #:source-dir "easymock-classextension/src/main/java"
5557 #:test-dir "easymock-classextension/src/test"))
5558 (inputs (list java-asm-8
5559 java-easymock-3.2
5560 java-cglib
5561 java-objenesis))
5562 (native-inputs
5563 (list java-junit java-hamcrest-core))
5564 (home-page "https://easymock.org/")
5565 (synopsis "Easymock extension to mock classes")
5566 (description "This package provides an extension to earlier versions of
5567easymock that allows mocking classes.")
5568 (license license:asl2.0)))
5569
5570(define-public java-jmock-1
5571 (package
5572 (name "java-jmock")
5573 (version "1.2.0")
5574 (source (origin
5575 (method git-fetch)
5576 (uri (git-reference
5577 (url "https://github.com/jmock-developers/jmock-library")
5578 (commit version)))
5579 (file-name (git-file-name name version))
5580 (sha256
5581 (base32
5582 "0lkga995xd9b9mmzxmcd301hlw83p1h78nibh7djlx7wydscr85z"))))
5583 (build-system ant-build-system)
5584 (arguments
5585 `(#:build-target "jars"
5586 #:test-target "run.tests"
5587 #:phases
5588 (modify-phases %standard-phases
5589 (replace 'install (install-jars "build")))))
5590 (home-page "http://jmock.org/")
5591 (synopsis "Mock object library for test-driven development")
5592 (description "JMock is a library that supports test-driven development of
5593Java code with mock objects. Mock objects help you design and test the
5594interactions between the objects in your programs.
5595
5596The jMock library
5597
5598@itemize
5599@item makes it quick and easy to define mock objects
5600@item lets you precisely specify the interactions between
5601 your objects, reducing the brittleness of your tests
5602@item plugs into your favourite test framework
5603@item is easy to extend.
5604@end itemize\n")
5605 (license license:bsd-3)))
5606
5607(define-public java-jmock
5608 (package
5609 (inherit java-jmock-1)
5610 (name "java-jmock")
5611 (version "2.8.2")
5612 (source (origin
5613 (method git-fetch)
5614 (uri (git-reference
5615 (url "https://github.com/jmock-developers/jmock-library")
5616 (commit version)))
5617 (file-name (git-file-name name version))
5618 (sha256
5619 (base32
5620 "12b7l22g3nrjvf2dzcw3z03fpd2chrgp0d8xkvn8w55rwb57pax6"))))
5621 (inputs
5622 (list java-hamcrest-all java-bsh java-junit))
5623 (native-inputs
5624 `(("cglib" ,java-cglib)))
5625 (arguments
5626 `(#:jar-name "java-jmock.jar"
5627 #:source-dir "jmock/src/main/java"
5628 #:test-dir "jmock/src/test"))))
5629
5630(define-public java-jmock-junit4
5631 (package
5632 (inherit java-jmock)
5633 (name "java-jmock-junit4")
5634 (arguments
5635 `(#:jar-name "java-jmock-junit4.jar"
5636 #:source-dir "jmock-junit4/src/main/java"
5637 #:test-dir "jmock-junit4/src/test"))
5638 (inputs
5639 `(("java-hamcrest-all" ,java-hamcrest-all)
5640 ("java-bsh" ,java-bsh)
5641 ("java-jmock" ,java-jmock)
5642 ("java-jumit" ,java-junit)))))
5643
5644(define-public java-jmock-legacy
5645 (package
5646 (inherit java-jmock)
5647 (name "java-jmock-legacy")
5648 (arguments
5649 `(#:jar-name "java-jmock-legacy.jar"
5650 #:source-dir "jmock-legacy/src/main/java"
5651 #:test-dir "jmock-legacy/src/test"
5652 #:phases
5653 (modify-phases %standard-phases
5654 (add-before 'check 'copy-tests
5655 (lambda _
5656 ;; This file is a dependancy of some tests
5657 (let ((file "org/jmock/test/acceptance/PackageProtectedType.java"))
5658 (copy-file (string-append "jmock/src/test/java/" file)
5659 (string-append "jmock-legacy/src/test/java/" file))
5660 #t))))))
5661 (inputs
5662 (list java-hamcrest-all
5663 java-objenesis
5664 java-cglib
5665 java-jmock
5666 java-bsh
5667 java-junit))
5668 (native-inputs
5669 (list java-jmock-junit4))))
5670
5671(define-public java-hamcrest-all
5672 (package (inherit java-hamcrest-core)
5673 (name "java-hamcrest-all")
5674 (arguments
5675 `(#:jdk ,icedtea-8
5676 ,@(substitute-keyword-arguments (package-arguments java-hamcrest-core)
5677 ((#:build-target _) "bigjar")
5678 ((#:phases phases)
5679 `(modify-phases ,phases
5680 ;; Some build targets override the classpath, so we need to patch
5681 ;; the build.xml to ensure that required dependencies are on the
5682 ;; classpath.
5683 (add-after 'unpack 'patch-classpath-for-integration
5684 (lambda* (#:key inputs #:allow-other-keys)
5685 (substitute* "build.xml"
5686 ((" build/hamcrest-library-\\$\\{version\\}.jar" line)
5687 (string-join
5688 (cons line
5689 (append
5690 (find-files (assoc-ref inputs "java-junit") "\\.jar$")
5691 (find-files (assoc-ref inputs "java-jmock") "\\.jar$")
5692 (find-files (assoc-ref inputs "java-easymock") "\\.jar$")))
5693 ";"))
5694 (("build/hamcrest-core-\\$\\{version\\}\\.jar")
5695 (car (find-files (assoc-ref inputs "java-hamcrest-core")
5696 "jar$"))))
5697 #t))
5698 (replace 'install
5699 (lambda* (#:key outputs #:allow-other-keys)
5700 (let* ((target (string-append (assoc-ref outputs "out")
5701 "/share/java/"))
5702 (version-suffix
5703 ,(string-append
5704 "-" (package-version java-hamcrest-core) ".jar"))
5705 (install-without-version-suffix
5706 (lambda (jar)
5707 (copy-file jar
5708 (string-append target
5709 (basename jar version-suffix)
5710 ".jar")))))
5711 (mkdir-p target)
5712 (for-each
5713 install-without-version-suffix
5714 (find-files "build"
5715 (lambda (name _)
5716 (and (string-suffix? ".jar" name)
5717 (not (string-suffix? "-sources.jar" name)))))))
5718 #t)))))))
5719 (inputs
5720 (modify-inputs (package-inputs java-hamcrest-core)
5721 (prepend java-junit
5722 java-jmock-1
5723 ;; This is necessary because of what seems to be a race condition.
5724 ;; This package would sometimes fail to build because hamcrest-core.jar
5725 ;; could not be found, even though it is built as part of this package.
5726 ;; Adding java-hamcrest-core appears to fix this problem. See
5727 ;; https://debbugs.gnu.org/31390 for more information.
5728 java-hamcrest-core
5729 java-easymock)))))
5730
5731(define-public java-jopt-simple
5732 (package
5733 (name "java-jopt-simple")
5734 (version "5.0.3")
5735 (source (origin
5736 (method url-fetch)
5737 (uri (string-append "https://repo1.maven.org/maven2/"
5738 "net/sf/jopt-simple/jopt-simple/"
5739 version "/jopt-simple-"
5740 version "-sources.jar"))
5741 (sha256
5742 (base32
5743 "1v8bzmwmw6qq20gm42xyay6vrd567dra4vqwhgjnqqjz1gs9f8qa"))))
5744 (build-system ant-build-system)
5745 (arguments
5746 `(#:tests? #f ; there are no tests
5747 #:jar-name "jopt-simple.jar"
5748 #:phases
5749 (modify-phases %standard-phases
5750 (add-before 'install 'create-pom
5751 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple" ,version))
5752 (replace 'install
5753 (install-from-pom "pom.xml")))))
5754 (home-page "https://jopt-simple.github.io/jopt-simple/")
5755 (synopsis "Java library for parsing command line options")
5756 (description "JOpt Simple is a Java library for parsing command line
5757options, such as those you might pass to an invocation of @code{javac}. In
5758the interest of striving for simplicity, as closely as possible JOpt Simple
5759attempts to honor the command line option syntaxes of POSIX @code{getopt} and
5760GNU @code{getopt_long}. It also aims to make option parser configuration and
5761retrieval of options and their arguments simple and expressive, without being
5762overly clever.")
5763 (license license:expat)))
5764
5765;; Required by jmh
5766(define-public java-jopt-simple-4
5767 (package
5768 (inherit java-jopt-simple)
5769 (version "4.6")
5770 (source (origin
5771 (method url-fetch)
5772 (uri (string-append "https://repo1.maven.org/maven2/"
5773 "net/sf/jopt-simple/jopt-simple/"
5774 version "/jopt-simple-"
5775 version "-sources.jar"))
5776 (sha256
5777 (base32
5778 "0ny82zczxkn201ld0b7rps0ifzjhfs8m1ncdmy1f50145ciszkpd"))))
5779 (arguments
5780 (substitute-keyword-arguments (package-arguments java-jopt-simple)
5781 ((#:phases phases)
5782 `(modify-phases ,phases
5783 (replace 'create-pom
5784 (generate-pom.xml "pom.xml" "net.sf.jopt-simple" "jopt-simple"
5785 ,version))))))))
5786
5787(define-public java-commons-math3
5788 (package
5789 (name "java-commons-math3")
5790 (version "3.6.1")
5791 (source (origin
5792 (method url-fetch)
5793 (uri (string-append "mirror://apache/commons/math/source/"
5794 "commons-math3-" version "-src.tar.gz"))
5795 (sha256
5796 (base32
5797 "19l6yp44qc5g7wg816nbn5z3zq3xxzwimvbm4a8pczgvpi4i85s6"))))
5798 (build-system ant-build-system)
5799 (arguments
5800 `(#:build-target "jar"
5801 #:test-target "test"
5802 #:make-flags
5803 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5804 (junit #$(this-package-native-input "java-junit")))
5805 (list (string-append "-Djunit.jar="
5806 (car (find-files junit "jar$")))
5807 (string-append "-Dhamcrest.jar="
5808 (car (find-files hamcrest ".*.jar$")))))
5809 #:phases
5810 (modify-phases %standard-phases
5811 ;; We want to build the jar in the build phase and run the tests
5812 ;; later in a separate phase.
5813 (add-after 'unpack 'untangle-targets
5814 (lambda _
5815 (substitute* "build.xml"
5816 (("name=\"jar\" depends=\"test\"")
5817 "name=\"jar\" depends=\"compile\""))))
5818 ;; There is no install target.
5819 (replace 'install
5820 (install-from-pom "pom.xml")))))
5821 (native-inputs
5822 (list java-junit java-hamcrest-core))
5823 (home-page "https://commons.apache.org/math/")
5824 (synopsis "Apache Commons mathematics library")
5825 (description "Commons Math is a library of lightweight, self-contained
5826mathematics and statistics components addressing the most common problems not
5827available in the Java programming language or Commons Lang.")
5828 (license license:asl2.0)))
5829
5830(define-public java-jmh
5831 (package
5832 (name "java-jmh")
5833 (version "1.32")
5834 (source (origin
5835 (method git-fetch)
5836 (uri (git-reference
5837 (url "https://github.com/openjdk/jmh")
5838 (commit version)))
5839 (file-name (git-file-name name version))
5840 (sha256
5841 (base32
5842 "0i7fa7l3gdqkkgz5ddayp6m46dgbj9rqlz35xffrcbyiz3gpljy0"))))
5843 (build-system maven-build-system)
5844 (arguments
5845 `(#:exclude
5846 (("org.apache.maven.plugins" .
5847 ("maven-source-plugin" "maven-archetype-plugin" "maven-shade-plugin"
5848 "maven-site-plugin" "maven-javadoc-plugin" "maven-eclipse-plugin"))
5849 ("com.mycila.maven-license-plugin" . ("maven-license-plugin"))
5850 ("org.apache.maven.wagon" . ("wagon-ssh")))
5851 #:maven-plugins
5852 (("maven-enforcer-plugin" ,maven-enforcer-plugin)
5853 ,@(default-maven-plugins))
5854 #:phases
5855 (modify-phases %standard-phases
5856 (add-after 'unpack 'remove-unnecessary
5857 (lambda _
5858 ;; requires org.apache.maven.archetype:archetype-packaging.
5859 ;; Its subprojects also require groovy, kotlin and scala,
5860 ;; respectively.
5861 (delete-file-recursively "jmh-archetypes"))))))
5862 (propagated-inputs
5863 (list java-jopt-simple-4 java-commons-math3))
5864 (native-inputs
5865 (list java-junit java-hamcrest-core))
5866 (home-page "https://openjdk.java.net/projects/code-tools/jmh/")
5867 (synopsis "Benchmark harness for the JVM")
5868 (description "JMH is a Java harness for building, running, and analysing
5869nano/micro/milli/macro benchmarks written in Java and other languages
5870targeting the JVM.")
5871 ;; GPLv2 only
5872 (license license:gpl2)))
5873
5874(define-public java-commons-collections4
5875 (package
5876 (name "java-commons-collections4")
5877 (version "4.1")
5878 (source (origin
5879 (method url-fetch)
5880 (uri (string-append "mirror://apache/commons/collections/source/"
5881 "commons-collections4-" version "-src.tar.gz"))
5882 (sha256
5883 (base32
5884 "1krfhvggympq4avk7gh6qafzf6b9ip6r1m4lmacikyx04039m0wl"))))
5885 (build-system ant-build-system)
5886 (arguments
5887 `(#:test-target "test"
5888 #:make-flags
5889 ,#~(let ((hamcrest #$(this-package-native-input "java-hamcrest-core"))
5890 (junit #$(this-package-native-input "java-junit"))
5891 (easymock #$(this-package-native-input "java-easymock")))
5892 (list (string-append "-Djunit.jar="
5893 (car (find-files junit "jar$")))
5894 (string-append "-Dhamcrest.jar="
5895 (car (find-files hamcrest "jar$")))
5896 (string-append "-Deasymock.jar=" easymock
5897 "/share/java/easymock.jar")))
5898 #:phases
5899 (modify-phases %standard-phases
5900 (replace 'install
5901 (install-jars "target")))))
5902 (native-inputs
5903 (list java-junit java-hamcrest-core java-easymock))
5904 (home-page "https://commons.apache.org/collections/")
5905 (synopsis "Collections framework")
5906 (description "The Java Collections Framework is the recognised standard
5907for collection handling in Java. Commons-Collections seek to build upon the
5908JDK classes by providing new interfaces, implementations and utilities. There
5909are many features, including:
5910
5911@itemize
5912@item @code{Bag} interface for collections that have a number of copies of
5913 each object
5914@item @code{BidiMap} interface for maps that can be looked up from value to
5915 key as well and key to value
5916@item @code{MapIterator} interface to provide simple and quick iteration over
5917 maps
5918@item Transforming decorators that alter each object as it is added to the
5919 collection
5920@item Composite collections that make multiple collections look like one
5921@item Ordered maps and sets that retain the order elements are added in,
5922 including an LRU based map
5923@item Reference map that allows keys and/or values to be garbage collected
5924 under close control
5925@item Many comparator implementations
5926@item Many iterator implementations
5927@item Adapter classes from array and enumerations to collections
5928@item Utilities to test or create typical set-theory properties of collections
5929 such as union, intersection, and closure.
5930@end itemize\n")
5931 (license license:asl2.0)))
5932
5933(define-public java-commons-collections
5934 (package
5935 (inherit java-commons-collections4)
5936 (name "java-commons-collections")
5937 (version "3.2.2")
5938 (source (origin
5939 (method url-fetch)
5940 (uri (string-append "mirror://apache/commons/collections/source/"
5941 "commons-collections-" version "-src.tar.gz"))
5942 (sha256
5943 (base32
5944 "055r51a5lfc3z7rkxnxmnn1npvkvda7636hjpm4qk7cnfzz98387"))
5945 (patches
5946 (search-patches "java-commons-collections-fix-java8.patch"))))
5947 (arguments
5948 (substitute-keyword-arguments (package-arguments java-commons-collections4)
5949 ((#:phases phases)
5950 `(modify-phases ,phases
5951 ;; The manifest is required by the build procedure
5952 (add-before 'build 'add-manifest
5953 (lambda _
5954 (mkdir-p "build/conf")
5955 (call-with-output-file "build/conf/MANIFEST.MF"
5956 (lambda (file)
5957 (format file "Manifest-Version: 1.0\n")))
5958 #t))
5959 (replace 'install
5960 (install-jars "build"))))))))
5961
5962(define java-commons-collections-test-classes
5963 (package
5964 (inherit java-commons-collections)
5965 (arguments
5966 `(#:jar-name "commons-collections-test-classes.jar"
5967 #:source-dir "src/test"
5968 #:tests? #f))
5969 (inputs
5970 `(("collection" ,java-commons-collections)))))
5971
5972(define-public java-commons-beanutils
5973 (package
5974 (name "java-commons-beanutils")
5975 (version "1.9.3")
5976 (source (origin
5977 (method url-fetch)
5978 (uri (string-append "mirror://apache/commons/beanutils/source/"
5979 "commons-beanutils-" version "-src.tar.gz"))
5980 (sha256
5981 (base32
5982 "03cs0bq3sl1sdc7py9g3qnf8n9h473nrkvd3d251kaqv6a2ab7qk"))))
5983 (build-system ant-build-system)
5984 (arguments
5985 `(#:test-target "test"
5986 #:tests? #f
5987 #:phases
5988 (modify-phases %standard-phases
5989 (replace 'install
5990 (lambda* (#:key outputs #:allow-other-keys)
5991 (rename-file (string-append "dist/commons-beanutils-" ,version
5992 "-SNAPSHOT.jar")
5993 "commons-beanutils.jar")
5994 (install-file "commons-beanutils.jar"
5995 (string-append (assoc-ref outputs "out") "/share/java/"))
5996 #t)))))
5997 (inputs
5998 `(("logging" ,java-commons-logging-minimal)
5999 ("collections" ,java-commons-collections)))
6000 (native-inputs
6001 `(("junit" ,java-junit)
6002 ("collections-test" ,java-commons-collections-test-classes)))
6003 (home-page "https://commons.apache.org/beanutils/")
6004 (synopsis "Dynamically set or get properties in Java")
6005 (description "BeanUtils provides a simplified interface to reflection and
6006introspection to set or get dynamically determined properties through their
6007setter and getter method.")
6008 (license license:asl2.0)))
6009
6010(define-public java-commons-io
6011 (package
6012 (name "java-commons-io")
6013 (version "2.5")
6014 (source
6015 (origin
6016 (method url-fetch)
6017 (uri (string-append "mirror://apache/commons/io/source/"
6018 "commons-io-" version "-src.tar.gz"))
6019 (sha256
6020 (base32
6021 "0q5y41jrcjvx9hzs47x5kdhnasdy6rm4bzqd2jxl02w717m7a7v3"))))
6022 (build-system ant-build-system)
6023 (outputs '("out" "doc"))
6024 (arguments
6025 `(#:test-target "test"
6026 #:make-flags
6027 ,#~(list (string-append "-Djunit.jar="
6028 (car (find-files #$(this-package-native-input "java-junit")
6029 "jar$"))))
6030 #:phases
6031 (modify-phases %standard-phases
6032 (add-after 'build 'build-javadoc ant-build-javadoc)
6033 (replace 'install (install-from-pom "pom.xml"))
6034 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6035 (native-inputs
6036 (list java-junit java-hamcrest-core))
6037 (propagated-inputs
6038 (list apache-commons-parent-pom-39))
6039 (home-page "https://commons.apache.org/io/")
6040 (synopsis "Common useful IO related classes")
6041 (description "Commons-IO contains utility classes, stream implementations,
6042file filters and endian classes.")
6043 (license license:asl2.0)))
6044
6045(define-public java-commons-exec-1.1
6046 (package
6047 (name "java-commons-exec")
6048 (version "1.1")
6049 (source
6050 (origin
6051 (method url-fetch)
6052 (uri (string-append "mirror://apache/commons/exec/source/"
6053 "commons-exec-" version "-src.tar.gz"))
6054 (sha256
6055 (base32
6056 "025dk8xgj10lxwwwqp0hng2rn7fr4vcirxzydqzx9k4dim667alk"))))
6057 (build-system ant-build-system)
6058 (arguments
6059 `(#:test-target "test"
6060 #:make-flags
6061 ,#~(list (string-append "-Dmaven.junit.jar="
6062 (car (find-files #$(this-package-native-input "java-junit")
6063 "jar$"))))
6064 #:phases
6065 (modify-phases %standard-phases
6066 (add-before 'build 'delete-network-tests
6067 (lambda _
6068 (delete-file "src/test/java/org/apache/commons/exec/DefaultExecutorTest.java")
6069 (substitute* "src/test/java/org/apache/commons/exec/TestRunner.java"
6070 (("suite\\.addTestSuite\\(DefaultExecutorTest\\.class\\);") ""))
6071 #t))
6072 ;; The "build" phase automatically tests.
6073 (delete 'check)
6074 (replace 'install (install-jars "target")))))
6075 (native-inputs
6076 (list java-junit))
6077 (home-page "https://commons.apache.org/proper/commons-exec/")
6078 (synopsis "Common program execution related classes")
6079 (description "Commons-Exec simplifies executing external processes.")
6080 (license license:asl2.0)))
6081
6082(define-public java-commons-exec
6083 (package
6084 (inherit java-commons-exec-1.1)
6085 (version "1.3")
6086 (source
6087 (origin
6088 (method url-fetch)
6089 (uri (string-append "mirror://apache/commons/exec/source/"
6090 "commons-exec-" version "-src.tar.gz"))
6091 (sha256
6092 (base32
6093 "17yb4h6f8l49c5iyyvda4z2nmw0bxrx857nrwmsr7mmpb7x441yv"))))
6094 (arguments
6095 `(#:test-target "test"
6096 #:make-flags
6097 ,#~(list (string-append "-Dmaven.junit.jar="
6098 (car (find-files #$(this-package-native-input "java-junit")
6099 "jar$")))
6100 "-Dmaven.compiler.source=1.7"
6101 "-Dmaven.compiler.target=1.7")
6102 #:phases
6103 (modify-phases %standard-phases
6104 (add-before 'build 'delete-network-tests
6105 (lambda* (#:key inputs #:allow-other-keys)
6106 ;; This test hangs indefinitely.
6107 (delete-file "src/test/java/org/apache/commons/exec/issues/Exec60Test.java")
6108 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec41Test.java"
6109 (("ping -c 10 127.0.0.1") "sleep 10"))
6110 (substitute* "src/test/java/org/apache/commons/exec/issues/Exec49Test.java"
6111 (("/bin/ls") "ls"))
6112 (call-with-output-file "src/test/scripts/ping.sh"
6113 (lambda (port)
6114 (format port "#!~a/bin/sh\nsleep $1\n"
6115 (assoc-ref inputs "bash"))))
6116 #t))
6117 ;; The "build" phase automatically tests.
6118 (delete 'check)
6119 (replace 'install (install-jars "target")))))
6120 (native-inputs
6121 (list java-junit java-hamcrest-core))))
6122
6123(define-public java-commons-lang
6124 (package
6125 (name "java-commons-lang")
6126 (version "2.6")
6127 (source
6128 (origin
6129 (method url-fetch)
6130 (uri (string-append "mirror://apache/commons/lang/source/"
6131 "commons-lang-" version "-src.tar.gz"))
6132 (sha256
6133 (base32 "1mxwagqadzx1b2al7i0z1v0r235aj2njdyijf02szq0vhmqrfiq5"))))
6134 (build-system ant-build-system)
6135 (outputs '("out" "doc"))
6136 (arguments
6137 `(#:test-target "test"
6138 #:test-exclude (list "**/Abstract*.java" "**/Random*.java")
6139 #:phases
6140 (modify-phases %standard-phases
6141 (add-after 'build 'build-javadoc ant-build-javadoc)
6142 (add-before 'check 'disable-failing-test
6143 (lambda _
6144 ;; Disable a failing test
6145 (substitute* "src/test/java/org/apache/commons/lang/\
6146time/FastDateFormatTest.java"
6147 (("public void testFormat\\(\\)")
6148 "public void disabled_testFormat()"))
6149 #t))
6150 (replace 'install (install-jars "target"))
6151 (add-after 'install 'install-doc (install-javadoc "target/apidocs")))))
6152 (native-inputs
6153 (list java-junit))
6154 (home-page "https://commons.apache.org/lang/")
6155 (synopsis "Extension of the java.lang package")
6156 (description "The Commons Lang components contains a set of Java classes
6157that provide helper methods for standard Java classes, especially those found
6158in the @code{java.lang} package in the Sun JDK. The following classes are
6159included:
6160
6161@itemize
6162@item StringUtils - Helper for @code{java.lang.String}.
6163@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets
6164 of characters such as @code{[a-z]} and @code{[abcdez]}.
6165@item RandomStringUtils - Helper for creating randomised strings.
6166@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6167@item NumberRange - A range of numbers with an upper and lower bound.
6168@item ObjectUtils - Helper for @code{java.lang.Object}.
6169@item SerializationUtils - Helper for serializing objects.
6170@item SystemUtils - Utility class defining the Java system properties.
6171@item NestedException package - A sub-package for the creation of nested
6172 exceptions.
6173@item Enum package - A sub-package for the creation of enumerated types.
6174@item Builder package - A sub-package for the creation of @code{equals},
6175 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6176@end itemize\n")
6177 (license license:asl2.0)))
6178
6179(define-public java-commons-lang3
6180 (package
6181 (name "java-commons-lang3")
6182 (version "3.12.0")
6183 (source
6184 (origin
6185 (method url-fetch)
6186 (uri (string-append "mirror://apache/commons/lang/source/"
6187 "commons-lang3-" version "-src.tar.gz"))
6188 (sha256
6189 (base32 "09dcv1pkdx3hpf06py8p9511f1wkin6jpacdll0c8vxpbi3yfwzv"))
6190 (patches
6191 (search-patches "java-commons-lang-fix-dependency.patch"))))
6192 (build-system ant-build-system)
6193 (arguments
6194 `(#:jar-name "commons-lang3.jar"
6195 #:source-dir "src/main/java"
6196 #:tests? #f; require junit5
6197 #:phases
6198 (modify-phases %standard-phases
6199 (replace 'install (install-from-pom "pom.xml")))))
6200 (propagated-inputs
6201 (list apache-commons-parent-pom-48))
6202 (home-page "https://commons.apache.org/lang/")
6203 (synopsis "Extension of the java.lang package")
6204 (description "The Commons Lang components contains a set of Java classes
6205that provide helper methods for standard Java classes, especially those found
6206in the @code{java.lang} package. The following classes are included:
6207
6208@itemize
6209@item StringUtils - Helper for @code{java.lang.String}.
6210@item CharSetUtils - Methods for dealing with @code{CharSets}, which are sets of
6211 characters such as @code{[a-z]} and @code{[abcdez]}.
6212@item RandomStringUtils - Helper for creating randomised strings.
6213@item NumberUtils - Helper for @code{java.lang.Number} and its subclasses.
6214@item NumberRange - A range of numbers with an upper and lower bound.
6215@item ObjectUtils - Helper for @code{java.lang.Object}.
6216@item SerializationUtils - Helper for serializing objects.
6217@item SystemUtils - Utility class defining the Java system properties.
6218@item NestedException package - A sub-package for the creation of nested
6219 exceptions.
6220@item Enum package - A sub-package for the creation of enumerated types.
6221@item Builder package - A sub-package for the creation of @code{equals},
6222 @code{hashCode}, @code{compareTo} and @code{toString} methods.
6223@end itemize\n")
6224 (license license:asl2.0)))
6225
6226(define-public java-commons-bsf
6227 (package
6228 (name "java-commons-bsf")
6229 (version "2.4.0")
6230 (source (origin
6231 (method url-fetch)
6232 (uri (string-append "mirror://apache/commons/bsf/source/bsf-src-"
6233 version ".tar.gz"))
6234 (sha256
6235 (base32
6236 "1sbamr8jl32p1jgf59nw0b2w9qivyg145954hm6ly54cfgsqrdas"))
6237 (modules '((guix build utils)))
6238 (snippet
6239 '(begin
6240 (for-each delete-file
6241 (find-files "." "\\.jar$"))
6242 #t))))
6243 (build-system ant-build-system)
6244 (arguments
6245 `(#:build-target "jar"
6246 #:tests? #f; No test file
6247 #:modules ((guix build ant-build-system)
6248 (guix build utils)
6249 (guix build java-utils)
6250 (sxml simple))
6251 #:phases
6252 (modify-phases %standard-phases
6253 (add-before 'build 'create-properties
6254 (lambda _
6255 ;; This file is missing from the distribution
6256 (call-with-output-file "build-properties.xml"
6257 (lambda (port)
6258 (sxml->xml
6259 `(project (@ (basedir ".") (name "build-properties") (default ""))
6260 (property (@ (name "project.name") (value "bsf")))
6261 (property (@ (name "source.level") (value "1.5")))
6262 (property (@ (name "build.lib") (value "build/jar")))
6263 (property (@ (name "src.dir") (value "src")))
6264 (property (@ (name "tests.dir") (value "src/org/apache/bsf/test")))
6265 (property (@ (name "build.tests") (value "build/test-classes")))
6266 (property (@ (name "build.dest") (value "build/classes"))))
6267 port)))
6268 #t))
6269 (replace 'install (install-jars "build")))))
6270 (native-inputs
6271 (list java-junit))
6272 (inputs
6273 (list java-commons-logging-minimal))
6274 (home-page "https://commons.apache.org/proper/commons-bsf")
6275 (synopsis "Bean Scripting Framework")
6276 (description "The Bean Scripting Framework (BSF) is a set of Java classes
6277which provides scripting language support within Java applications, and access
6278to Java objects and methods from scripting languages. BSF allows one to write
6279JSPs in languages other than Java while providing access to the Java class
6280library. In addition, BSF permits any Java application to be implemented in
6281part (or dynamically extended) by a language that is embedded within it. This
6282is achieved by providing an API that permits calling scripting language engines
6283from within Java, as well as an object registry that exposes Java objects to
6284these scripting language engines.")
6285 (license license:asl2.0)))
6286
6287(define-public java-commons-jxpath
6288 (package
6289 (name "java-commons-jxpath")
6290 (version "1.3")
6291 (source (origin
6292 (method url-fetch)
6293 (uri (string-append "mirror://apache/commons/jxpath/source/"
6294 "commons-jxpath-" version "-src.tar.gz"))
6295 (sha256
6296 (base32
6297 "1rpgg31ayn9fwr4bfi2i1ij0npcg79ad2fv0w9hacvawsyc42cfs"))))
6298 (build-system ant-build-system)
6299 (arguments
6300 `(#:jar-name "commons-jxpath.jar"
6301 ;; tests require more dependencies, including mockrunner which depends on old software
6302 #:tests? #f
6303 #:source-dir "src/java"))
6304 (inputs
6305 `(("servlet" ,java-classpathx-servletapi)
6306 ("java-jdom" ,java-jdom)
6307 ("java-commons-beanutils" ,java-commons-beanutils)))
6308 (native-inputs
6309 (list java-junit))
6310 (home-page "https://commons.apache.org/jxpath/")
6311 (synopsis "Simple interpreter of an expression language called XPath")
6312 (description "The org.apache.commons.jxpath package defines a simple
6313interpreter of an expression language called XPath. JXPath applies XPath
6314expressions to graphs of objects of all kinds: JavaBeans, Maps, Servlet
6315contexts, DOM etc, including mixtures thereof.")
6316 (license license:asl2.0)))
6317
6318(define-public java-commons-pool
6319 (package
6320 (name "java-commons-pool")
6321 (version "2.6.2")
6322 (source (origin
6323 (method url-fetch)
6324 (uri (string-append "mirror://apache/commons/pool/source/"
6325 "commons-pool2-" version "-src.tar.gz"))
6326 (sha256
6327 (base32
6328 "1fi1hgqmq01bs6azbj3sfswxzadp2r8sjjfiq6ryilz1m50kvrv6"))))
6329 (arguments
6330 `(#:jar-name "common-pool.jar"
6331 #:source-dir "src/main/java"
6332 #:test-exclude
6333 (list "**/PerformanceTest.java")))
6334 (build-system ant-build-system)
6335 (inputs
6336 (list java-cglib))
6337 (native-inputs
6338 (list java-junit java-hamcrest-core java-asm java-objenesis))
6339 (home-page "https://commons.apache.org/proper/commons-pool/")
6340 (synopsis "Object-pooling API in Java")
6341 (description "The commons-pool package provides an object-pooling API
6342and a number of object pool implementations. This package defines a
6343handful of pooling interfaces and some base classes that may be useful when
6344creating new pool implementations.")
6345 (license license:asl2.0)))
6346
6347(define-public java-commons-dbcp
6348 (package
6349 (name "java-commons-dbcp")
6350 (version "2.6.0")
6351 (source (origin
6352 (method url-fetch)
6353 (uri (string-append "mirror://apache/commons/dbcp/source/"
6354 "commons-dbcp2-" version "-src.tar.gz"))
6355 (sha256
6356 (base32
6357 "0axbvcbnf2l70fc3ybrlp3siw2w4ka9mia2pnx4py8gz54cpw3rc"))))
6358 (arguments
6359 `(#:source-dir "src/main/java"
6360 #:jar-name "java-commons-dbcp.jar"
6361 #:tests? #f)); requires apache-geronimo
6362 (inputs
6363 `(("java-commons-pool" ,java-commons-pool)
6364 ("java-commons-logging" ,java-commons-logging-minimal)
6365 ("java-jboss-transaction-api-spec" ,java-jboss-transaction-api-spec)))
6366 (native-inputs
6367 (list java-junit))
6368 (build-system ant-build-system)
6369 (home-page "https://commons.apache.org/proper/commons-dbcp/")
6370 (synopsis "Database Connection Pool for Java")
6371 (description "Commons-dbcp allows you to share a pool of database
6372connections between users. Creating a new connection for each user can be
6373time consuming and even unfeasible when the number of simultaneous users is
6374very large. This package provides a way to share a poole of connections to
6375reduce that load.")
6376 (license license:asl2.0)))
6377
6378(define-public java-commons-jcs
6379 (package
6380 (name "java-commons-jcs")
6381 (version "3.1")
6382 (source (origin
6383 (method url-fetch)
6384 (uri (string-append "mirror://apache/commons/jcs/source/"
6385 "commons-jcs3-dist-" version "-src.tar.gz"))
6386 (sha256
6387 (base32
6388 "0y1lm1xnsj99bf7y9mkvbzqfy8dr7ac8zcbkpsjgzb9vhabfsbac"))))
6389 (build-system ant-build-system)
6390 (arguments
6391 `(#:jar-name "commons-jcs.jar"
6392 #:source-dir "commons-jcs-core/src/main/java"
6393 #:test-dir "commons-jcs-core/src/test"
6394 #:tests? #f; requires hsqldb
6395 #:phases
6396 (modify-phases %standard-phases
6397 (add-before 'build 'copy-resources
6398 (lambda _
6399 (copy-recursively "commons-jcs-core/src/main/resources"
6400 "build/classes"))))))
6401 (propagated-inputs
6402 (list java-classpathx-servletapi
6403 java-commons-dbcp
6404 java-httpcomponents-httpclient
6405 java-httpcomponents-httpcore
6406 java-log4j-api))
6407 (native-inputs
6408 (list java-junit))
6409 (home-page "https://commons.apache.org/proper/commons-jcs/")
6410 (synopsis "Distributed caching system in Java")
6411 (description "JCS is a distributed caching system written in Java. It
6412is intended to speed up applications by providing a means to manage cached
6413data of various dynamic natures. Like any caching system, JCS is most useful
6414for high read, low put applications. Latency times drop sharply and
6415bottlenecks move away from the database in an effectively cached system.")
6416 (license license:asl2.0)))
6417
6418(define-public java-jsr250
6419 (package
6420 (name "java-jsr250")
6421 (version "1.3")
6422 (source (origin
6423 (method git-fetch)
6424 (uri (git-reference
6425 (url "https://github.com/javaee/javax.annotation")
6426 (commit version)))
6427 (file-name (git-file-name name version))
6428 (sha256
6429 (base32
6430 "1g22a9d75g01s9yxgdig0ss7i30j4ysnnp08gn4krn0wly4lpqq0"))))
6431 (build-system ant-build-system)
6432 (arguments
6433 `(#:tests? #f ; no tests included
6434 #:jdk ,icedtea-8
6435 #:jar-name "jsr250.jar"
6436 #:phases
6437 (modify-phases %standard-phases
6438 (replace 'install
6439 (install-from-pom "pom.xml")))))
6440 (propagated-inputs (list java-jvnet-parent-pom-3))
6441 (home-page "https://jcp.org/en/jsr/detail?id=250")
6442 (synopsis "Security-related annotations")
6443 (description "This package provides annotations for security. It provides
6444packages in the @code{javax.annotation} and @code{javax.annotation.security}
6445namespaces.")
6446 ;; either cddl or gpl2 only, with classpath exception
6447 (license (list license:cddl1.0
6448 license:gpl2))))
6449
6450(define-public java-jsr305
6451 (package
6452 (name "java-jsr305")
6453 (version "3.0.1")
6454 (source (origin
6455 (method url-fetch)
6456 (uri (string-append "https://repo1.maven.org/maven2/"
6457 "com/google/code/findbugs/"
6458 "jsr305/" version "/jsr305-"
6459 version "-sources.jar"))
6460 (sha256
6461 (base32
6462 "1rh6jin9v7jqpq3kf1swl868l8i94r636n03pzpsmgr8v0lh9j2n"))))
6463 (build-system ant-build-system)
6464 (arguments
6465 `(#:tests? #f ; no tests included
6466 #:jar-name "jsr305.jar"
6467 #:phases
6468 (modify-phases %standard-phases
6469 (add-before 'install 'create-pom
6470 (generate-pom.xml "pom.xml" "com.google.code.findbugs" "jsr305" ,version))
6471 (replace 'install
6472 (install-from-pom "pom.xml")))))
6473 (home-page "https://findbugs.sourceforge.net/")
6474 (synopsis "Annotations for the static analyzer called findbugs")
6475 (description "This package provides annotations for the findbugs package.
6476It provides packages in the @code{javax.annotations} namespace.")
6477 (license license:asl2.0)))
6478
6479(define-public java-error-prone-annotations
6480 (package
6481 (name "java-error-prone-annotations")
6482 (version "2.18.0")
6483 (source (origin
6484 (method git-fetch)
6485 (uri (git-reference
6486 (url "https://github.com/google/error-prone")
6487 (commit (string-append "v" version))))
6488 (file-name (git-file-name "java-error-prone" version))
6489 (sha256
6490 (base32
6491 "19sqsz0b308rhadr3ff10azdbqjq37nvrn9c06224dwpxap0931f"))))
6492 (build-system ant-build-system)
6493 (arguments
6494 `(#:tests? #f; no tests
6495 #:jar-name (string-append ,name "-" ,version ".jar")
6496 #:source-dir "annotations/src/main/java"
6497 #:test-dir "annotations/src/altest"
6498 #:phases
6499 (modify-phases %standard-phases
6500 (replace 'install (install-from-pom "annotations/pom.xml")))))
6501 (propagated-inputs (list java-error-prone-parent-pom java-jsr305))
6502 (home-page "https://errorprone.info")
6503 (synopsis "Java static analyzer at compile-time")
6504 (description "Error Prone is a static analysis tool for Java that catches
6505common programming mistakes at compile-time. This package contains annotations
6506used by programmers to guide the static analysis.")
6507 (license license:asl2.0)))
6508
6509(define java-error-prone-parent-pom
6510 (package
6511 (inherit java-error-prone-annotations)
6512 (name "java-error-prone-parent-pom")
6513 (arguments
6514 `(#:tests? #f
6515 #:phases
6516 (modify-phases %standard-phases
6517 (delete 'configure)
6518 (delete 'build)
6519 (replace 'install
6520 (install-pom-file "pom.xml")))))
6521 (propagated-inputs '())))
6522
6523(define-public java-guava
6524 (package
6525 (name "java-guava")
6526 (version "31.1")
6527 (source (origin
6528 (method git-fetch)
6529 (uri (git-reference
6530 (url "https://github.com/google/guava/")
6531 (commit (string-append "v" version))))
6532 (file-name (git-file-name name version))
6533 (sha256
6534 (base32
6535 "0sv1w5cnids9ad3l7qhrh3dh1wdqwc946iinsxryafr25wg5z1lp"))
6536 (patches
6537 (search-patches "java-guava-remove-annotation-deps.patch"))))
6538 (build-system ant-build-system)
6539 (arguments
6540 `(#:tests? #f ; no tests included
6541 #:jar-name "guava.jar"
6542 #:source-dir "guava/src"
6543 #:phases
6544 (modify-phases %standard-phases
6545 (add-after 'unpack 'trim-sources
6546 (lambda _
6547 (with-directory-excursion "guava/src/com/google/common"
6548 ;; Remove annotations to avoid extra dependencies:
6549 ;; * "j2objc" annotations are used when converting Java to
6550 ;; Objective C;
6551 ;; * "IgnoreJRERequirement" is used for Android.
6552 ;; * "Nullable" is used to catch NPE at build time.
6553 (substitute* (find-files "." "\\.java$")
6554 (("import com.google.j2objc.*") "")
6555 (("import org.checkerframework.checker.*") "")
6556 (("@ReflectionSupport.*") "")
6557 (("@WeakOuter") "")
6558 (("@RetainedWith") "")
6559 (("@Weak") "")
6560 (("@J2ObjCIncompatible") "")
6561 (("@IgnoreJRERequirement") "")
6562 (("@Nullable") "")))))
6563 ;; This is required by guava, but this is just an empty stub
6564 (add-before 'install 'install-listenablefuture-stub
6565 (install-pom-file "futures/listenablefuture9999/pom.xml"))
6566 (replace 'install (install-from-pom "guava/pom.xml")))))
6567 (inputs
6568 (list java-error-prone-annotations java-jsr305))
6569 (propagated-inputs
6570 (list java-guava-futures-failureaccess java-guava-parent-pom))
6571 (home-page "https://github.com/google/guava")
6572 (synopsis "Google core libraries for Java")
6573 (description "Guava is a set of core libraries that includes new
6574collection types (such as multimap and multiset), immutable collections, a
6575graph library, functional types, an in-memory cache, and APIs/utilities for
6576concurrency, I/O, hashing, primitives, reflection, string processing, and much
6577more!")
6578 (license license:asl2.0)))
6579
6580(define-public java-guava-futures-failureaccess
6581 (package
6582 (inherit java-guava)
6583 (name "java-guava-futures-failureaccess")
6584 (arguments
6585 `(#:tests? #f; no tests
6586 #:jar-name "guava-futures-failureaccess.jar"
6587 #:source-dir "futures/failureaccess/src"
6588 #:phases
6589 (modify-phases %standard-phases
6590 (replace 'install
6591 (install-from-pom "futures/failureaccess/pom.xml")))))
6592 (propagated-inputs
6593 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6594
6595(define java-guava-parent-pom
6596 (package
6597 (inherit java-guava)
6598 (name "java-guava-parent-pom")
6599 (arguments
6600 `(#:tests? #f
6601 #:phases
6602 (modify-phases %standard-phases
6603 (delete 'configure)
6604 (delete 'build)
6605 (replace 'install
6606 (install-pom-file "pom.xml")))))
6607 (propagated-inputs
6608 `(("java-sonatype-oss-parent-pom" ,java-sonatype-oss-parent-pom-7)))))
6609
6610;; The java-commons-logging package provides adapters to many different
6611;; logging frameworks. To avoid an excessive dependency graph we try to build
6612;; it with only a minimal set of adapters.
6613(define-public java-commons-logging-minimal
6614 (package
6615 (name "java-commons-logging-minimal")
6616 (version "1.2")
6617 (source (origin
6618 (method url-fetch)
6619 (uri (string-append "mirror://apache/commons/logging/source/"
6620 "commons-logging-" version "-src.tar.gz"))
6621 (sha256
6622 (base32
6623 "10bwcy5w8d7y39n0krlwhnp8ds3kj5zhmzj0zxnkw0qdlsjmsrj9"))))
6624 (build-system ant-build-system)
6625 (arguments
6626 `(#:tests? #f ; avoid dependency on logging frameworks
6627 #:jar-name "commons-logging-minimal.jar"
6628 #:phases
6629 (modify-phases %standard-phases
6630 (add-after 'unpack 'delete-adapters-and-tests
6631 (lambda _
6632 ;; Delete all adapters except for NoOpLog, SimpleLog, and
6633 ;; LogFactoryImpl. NoOpLog is required to build; LogFactoryImpl
6634 ;; is used by applications; SimpleLog is the only actually usable
6635 ;; implementation that does not depend on another logging
6636 ;; framework.
6637 (for-each
6638 (lambda (file)
6639 (delete-file (string-append
6640 "src/main/java/org/apache/commons/logging/impl/" file)))
6641 (list "Jdk13LumberjackLogger.java"
6642 "WeakHashtable.java"
6643 "Log4JLogger.java"
6644 "ServletContextCleaner.java"
6645 "Jdk14Logger.java"
6646 "AvalonLogger.java"
6647 "LogKitLogger.java"))
6648 (delete-file-recursively "src/test")
6649 #t)))))
6650 (home-page "https://commons.apache.org/logging/")
6651 (synopsis "Common API for logging implementations")
6652 (description "The Logging package is a thin bridge between different
6653logging implementations. A library that uses the commons-logging API can be
6654used with any logging implementation at runtime.")
6655 (license license:asl2.0)))
6656
6657;; This is the last release of the 1.x series.
6658(define-public java-mockito-1
6659 (package
6660 (name "java-mockito")
6661 (version "1.10.19")
6662 (source (origin
6663 (method url-fetch)
6664 (uri (string-append "https://repo1.maven.org/maven2/"
6665 "org/mockito/mockito-core/" version
6666 "/mockito-core-" version "-sources.jar"))
6667 (sha256
6668 (base32
6669 "0vmiwnwpf83g2q7kj1rislmja8fpvqkixjhawh7nxnygx6pq11kc"))))
6670 (build-system ant-build-system)
6671 (arguments
6672 `(#:jar-name "mockito.jar"
6673 #:tests? #f ; no tests included
6674 ;; FIXME: patch-and-repack does not support jars, so we have to apply
6675 ;; patches in build phases.
6676 #:phases
6677 (modify-phases %standard-phases
6678 ;; Mockito was developed against a different version of hamcrest,
6679 ;; which does not require matcher implementations to provide an
6680 ;; implementation of the "describeMismatch" method. We add this
6681 ;; simple definition to pass the build with our version of hamcrest.
6682 (add-after 'unpack 'fix-hamcrest-build-error
6683 (lambda _
6684 (substitute* "src/org/mockito/internal/matchers/LocalizedMatcher.java"
6685 (("public Matcher getActualMatcher\\(\\) .*" line)
6686 (string-append "
6687 public void describeMismatch(Object item, Description description) {
6688 actualMatcher.describeMismatch(item, description);
6689 }"
6690 line)))
6691 #t))
6692 ;; Mockito bundles cglib. We have a cglib package, so let's use
6693 ;; that instead.
6694 (add-after 'unpack 'use-system-libraries
6695 (lambda _
6696 (with-directory-excursion "src/org/mockito/internal/creation/cglib"
6697 (substitute* '("CGLIBHacker.java"
6698 "CglibMockMaker.java"
6699 "ClassImposterizer.java"
6700 "DelegatingMockitoMethodProxy.java"
6701 "MethodInterceptorFilter.java"
6702 "MockitoNamingPolicy.java"
6703 "SerializableMockitoMethodProxy.java"
6704 "SerializableNoOp.java")
6705 (("import org.mockito.cglib") "import net.sf.cglib")))
6706 #t)))))
6707 (inputs
6708 (list java-junit java-objenesis java-cglib java-hamcrest-core))
6709 (home-page "http://mockito.org")
6710 (synopsis "Mockito is a mock library for Java")
6711 (description "Mockito is a mocking library for Java which lets you write
6712tests with a clean and simple API. It generates mocks using reflection, and
6713it records all mock invocations, including methods arguments.")
6714 (license license:asl2.0)))
6715
6716(define-public java-httpcomponents-httpcore
6717 (package
6718 (name "java-httpcomponents-httpcore")
6719 (version "4.4.6")
6720 (source (origin
6721 (method url-fetch)
6722 (uri (string-append "mirror://apache//httpcomponents/httpcore/"
6723 "source/httpcomponents-core-"
6724 version "-src.tar.gz"))
6725 (sha256
6726 (base32
6727 "02bwcf38y4vgwq7kj2s6q7qrmma641r5lacivm16kgxvb2j6h1vy"))))
6728 (build-system ant-build-system)
6729 (arguments
6730 `(#:jar-name "httpcomponents-httpcore.jar"
6731 #:phases
6732 (modify-phases %standard-phases
6733 (add-after 'unpack 'chdir
6734 (lambda _ (chdir "httpcore") #t)))))
6735 (inputs
6736 (list java-commons-logging-minimal java-commons-lang3))
6737 (native-inputs
6738 (list java-junit java-mockito-1))
6739 (home-page "https://hc.apache.org/httpcomponents-core-4.4.x/index.html")
6740 (synopsis "Low level HTTP transport components")
6741 (description "HttpCore is a set of low level HTTP transport components
6742that can be used to build custom client and server side HTTP services with a
6743minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6744on the classic Java I/O and non-blocking, event driven I/O model based on Java
6745NIO.
6746
6747This package provides the blocking I/O model library.")
6748 (license license:asl2.0)))
6749
6750(define-public java-httpcomponents-httpcore-nio
6751 (package (inherit java-httpcomponents-httpcore)
6752 (name "java-httpcomponents-httpcore-nio")
6753 (arguments
6754 `(#:jar-name "httpcomponents-httpcore-nio.jar"
6755 #:phases
6756 (modify-phases %standard-phases
6757 (add-after 'unpack 'chdir
6758 (lambda _ (chdir "httpcore-nio") #t)))))
6759 (inputs
6760 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6761 (prepend java-httpcomponents-httpcore java-hamcrest-core)))
6762 (description "HttpCore is a set of low level HTTP transport components
6763that can be used to build custom client and server side HTTP services with a
6764minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6765on the classic Java I/O and non-blocking, event driven I/O model based on Java
6766NIO.
6767
6768This package provides the non-blocking I/O model library based on Java
6769NIO.")))
6770
6771(define-public java-httpcomponents-httpcore-ab
6772 (package (inherit java-httpcomponents-httpcore)
6773 (name "java-httpcomponents-httpcore-ab")
6774 (arguments
6775 `(#:jar-name "httpcomponents-httpcore-ab.jar"
6776 #:phases
6777 (modify-phases %standard-phases
6778 (add-after 'unpack 'chdir
6779 (lambda _ (chdir "httpcore-ab") #t)))))
6780 (inputs
6781 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6782 (prepend java-httpcomponents-httpcore java-commons-cli
6783 java-hamcrest-core)))
6784 (synopsis "Apache HttpCore benchmarking tool")
6785 (description "This package provides the HttpCore benchmarking tool. It is
6786an Apache AB clone based on HttpCore.")))
6787
6788(define-public java-httpcomponents-httpcore-osgi
6789 (package (inherit java-httpcomponents-httpcore)
6790 (name "java-httpcomponents-httpcore-osgi")
6791 (arguments
6792 `(#:jar-name "httpcomponents-httpcore-osgi.jar"
6793 #:phases
6794 (modify-phases %standard-phases
6795 (add-after 'unpack 'chdir
6796 (lambda _ (chdir "httpcore-osgi"))))))
6797 (inputs
6798 (modify-inputs (package-inputs java-httpcomponents-httpcore)
6799 (prepend java-httpcomponents-httpcore
6800 java-httpcomponents-httpcore-nio
6801 java-hamcrest-core)))
6802 (native-inputs (list java-ops4j-pax-exam-core
6803 java-ops4j-pax-exam-core-junit
6804 java-ops4j-pax-exam-core-spi
6805 java-junit))
6806 (description "HttpCore is a set of low level HTTP transport components
6807that can be used to build custom client and server side HTTP services with a
6808minimal footprint. HttpCore supports two I/O models: blocking I/O model based
6809on the classic Java I/O and non-blocking, event driven I/O model based on Java
6810NIO.
6811
6812This package provides... some tests.")))
6813
6814(define-public java-httpcomponents-httpclient
6815 (package
6816 (name "java-httpcomponents-httpclient")
6817 (version "4.5.12")
6818 (source (origin
6819 (method url-fetch)
6820 (uri (string-append "mirror://apache/httpcomponents/httpclient/"
6821 "source/httpcomponents-client-"
6822 version "-src.tar.gz"))
6823 (sha256
6824 (base32
6825 "1va99m2zc2liv0v9vn72p5ja8yz4s5wq7zpahaai5nr966kvxzkb"))))
6826 (build-system ant-build-system)
6827 (arguments
6828 `(#:jar-name "httpcomponents-httpclient.jar"
6829 #:phases
6830 (modify-phases %standard-phases
6831 (add-after 'unpack 'chdir
6832 (lambda _ (chdir "httpclient") #t)))))
6833 (inputs
6834 (list java-commons-logging-minimal
6835 java-commons-codec
6836 java-hamcrest-core
6837 java-httpcomponents-httpcore
6838 java-mockito-1
6839 java-junit))
6840 (home-page "https://hc.apache.org/httpcomponents-client-ga/")
6841 (synopsis "HTTP client library for Java")
6842 (description "Although the @code{java.net} package provides basic
6843functionality for accessing resources via HTTP, it doesn't provide the full
6844flexibility or functionality needed by many applications. @code{HttpClient}
6845seeks to fill this void by providing an efficient, up-to-date, and
6846feature-rich package implementing the client side of the most recent HTTP
6847standards and recommendations.")
6848 (license license:asl2.0)))
6849
6850(define-public java-httpcomponents-httpclient-cache
6851 (package (inherit java-httpcomponents-httpclient)
6852 (name "java-httpcomponents-httpclient-cache")
6853 (arguments
6854 `(#:jar-name "httpcomponents-httpclient-cache.jar"
6855 #:source-dir "src/main/java"
6856 #:test-dir "src/test"
6857 #:tests? #f; tests are broken with current cglib.
6858 #:phases
6859 (modify-phases %standard-phases
6860 (add-after 'unpack 'delete-unused-impls
6861 (lambda _
6862 (for-each
6863 delete-file-recursively
6864 '("src/main/java/org/apache/http/impl/client/cache/ehcache/"
6865 "src/main/java/org/apache/http/impl/client/cache/memcached/"
6866 "src/test/java/org/apache/http/impl/client/cache/ehcache/"
6867 "src/test/java/org/apache/http/impl/client/cache/memcached/"))))
6868 (add-after 'unpack 'chdir
6869 (lambda _ (chdir "httpclient-cache"))))))
6870 (inputs
6871 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6872 (prepend java-httpcomponents-httpclient
6873 java-httpcomponents-httpmime
6874 java-hamcrest-core)))
6875 (description "This package provides an API for caching accessed HTTP
6876resources.")))
6877
6878(define-public java-httpcomponents-httpclient-osgi
6879 (package (inherit java-httpcomponents-httpclient)
6880 (name "java-httpcomponents-httpclient-osgi")
6881 (arguments
6882 `(#:jar-name "httpcomponents-httpclient-osgi.jar"
6883 #:tests? #f; tests are broken with current cglib.
6884 #:phases
6885 (modify-phases %standard-phases
6886 (add-after 'unpack 'chdir
6887 (lambda _ (chdir "httpclient-osgi") #t)))))
6888 (inputs
6889 (modify-inputs (package-inputs java-httpcomponents-httpclient)
6890 (prepend java-httpcomponents-httpclient
6891 java-httpcomponents-httpclient-cache
6892 java-osgi-framework
6893 java-osgi-service-cm
6894 java-hamcrest-core)))))
6895
6896(define-public java-httpcomponents-httpmime
6897 (package (inherit java-httpcomponents-httpclient)
6898 (name "java-httpcomponents-httpmime")
6899 (arguments
6900 `(#:jar-name "httpcomponents-httpmime.jar"
6901 #:phases
6902 (modify-phases %standard-phases
6903 (add-after 'unpack 'chdir
6904 (lambda _ (chdir "httpmime") #t)))))
6905 (inputs
6906 (list java-httpcomponents-httpclient java-httpcomponents-httpcore
6907 java-junit java-hamcrest-core))))
6908
6909(define-public java-commons-net
6910 (package
6911 (name "java-commons-net")
6912 (version "3.6")
6913 (source (origin
6914 (method url-fetch)
6915 (uri (string-append "mirror://apache/commons/net/source/"
6916 "commons-net-" version "-src.tar.gz"))
6917 (sha256
6918 (base32
6919 "0n0cmnddk9qdqhjvka8pc6hd9mn2qi3166f1s6xk32h7rfy1adxr"))))
6920 (build-system ant-build-system)
6921 (arguments
6922 `(;; FIXME: MainTest.java tries to read "examples.properties" (which
6923 ;; should be "resources/examples/examples.properties"), but gets "null"
6924 ;; instead.
6925 #:tests? #f
6926 #:jar-name "commons-net.jar"))
6927 (native-inputs
6928 (list java-junit java-hamcrest-core))
6929 (home-page "https://commons.apache.org/net/")
6930 (synopsis "Client library for many basic Internet protocols")
6931 (description "The Apache Commons Net library implements the client side of
6932many basic Internet protocols. The purpose of the library is to provide
6933fundamental protocol access, not higher-level abstractions.")
6934 (license license:asl2.0)))
6935
6936(define-public java-jsch
6937 (package
6938 (name "java-jsch")
6939 (version "0.1.55")
6940 (source (origin
6941 (method url-fetch)
6942 (uri (string-append "mirror://sourceforge/jsch/jsch/"
6943 version "/jsch-" version ".zip"))
6944 (sha256
6945 (base32
6946 "1lxyjwvmwa723wcf3bqn816hkvc03vz4xhbsi7bvfhrz2rpgcfq6"))))
6947 (build-system ant-build-system)
6948 (arguments
6949 `(#:build-target "dist"
6950 #:tests? #f ; no tests included
6951 #:phases
6952 (modify-phases %standard-phases
6953 (replace 'install (install-jars "dist")))))
6954 (native-inputs
6955 (list unzip))
6956 (home-page "http://www.jcraft.com/jsch/")
6957 (synopsis "Pure Java implementation of SSH2")
6958 (description "JSch is a pure Java implementation of SSH2. JSch allows you
6959to connect to an SSH server and use port forwarding, X11 forwarding, file
6960transfer, etc., and you can integrate its functionality into your own Java
6961programs.")
6962 (license license:bsd-3)))
6963
6964(define-public java-commons-compress
6965 (package
6966 (name "java-commons-compress")
6967 (version "1.21")
6968 (source (origin
6969 (method url-fetch)
6970 (uri (string-append "mirror://apache/commons/compress/source/"
6971 "commons-compress-" version "-src.tar.gz"))
6972 (sha256
6973 (base32
6974 "1rkpb6xcyly1wnbx4q6iq6p5hrr0h1d0ppb5r07psc75cbmizjry"))))
6975 (build-system ant-build-system)
6976 (arguments
6977 `(#:jar-name "commons-compress.jar"
6978 #:source-dir "src/main/java"
6979 #:tests? #f; requires java-mockito-3
6980 #:phases
6981 (modify-phases %standard-phases
6982 (replace 'install (install-from-pom "pom.xml")))))
6983 (propagated-inputs
6984 (list java-asm-3
6985 java-brotli
6986 java-osgi-core
6987 java-xz
6988 java-zstd
6989 apache-commons-parent-pom-52))
6990 (home-page "https://commons.apache.org/proper/commons-compress/")
6991 (synopsis "Java library for working with compressed files")
6992 (description "The Apache Commons Compress library defines an API for
6993working with compressed files such as ar, cpio, Unix dump, tar, zip, gzip, XZ,
6994Pack200, bzip2, 7z, arj, lzma, snappy, DEFLATE, lz4 and Z files.")
6995 (license license:asl2.0)))
6996
6997(define-public java-commons-csv
6998 (package
6999 (name "java-commons-csv")
7000 (version "1.4")
7001 (source (origin
7002 (method url-fetch)
7003 (uri (string-append "mirror://apache/commons/csv/source/"
7004 "commons-csv-" version "-src.tar.gz"))
7005 (sha256
7006 (base32
7007 "1l89m0fm2s3xx3v3iynvangymfg2vlyngaj6fgsi457nmsw7m7ij"))))
7008 (build-system ant-build-system)
7009 (arguments
7010 `(#:jar-name "commons-csv.jar"
7011 #:source-dir "src/main/java"
7012 #:tests? #f)); FIXME: requires java-h2
7013 (inputs
7014 `(("java-hamcrest-core" ,java-hamcrest-core)
7015 ("java-commons-io" ,java-commons-io)
7016 ("java-commons-lang3" ,java-commons-lang3)
7017 ("junit" ,java-junit)))
7018 (home-page "https://commons.apache.org/proper/commons-csv/")
7019 (synopsis "Read and write CSV documents")
7020 (description "Commons CSV reads and writes files in variations of the Comma
7021Separated Value (CSV) format. The most common CSV formats are predefined in the
7022CSVFormat class:
7023
7024@itemize
7025@item Microsoft Excel
7026@item Informix UNLOAD
7027@item Informix UNLOAD CSV
7028@item MySQL
7029@item RFC 4180
7030@item TDF
7031@end itemize
7032
7033Custom formats can be created using a fluent style API.")
7034 (license license:asl2.0)))
7035
7036(define-public java-osgi-annotation
7037 (package
7038 (name "java-osgi-annotation")
7039 (version "6.0.0")
7040 (source (origin
7041 (method url-fetch)
7042 (uri (string-append "https://repo1.maven.org/maven2/"
7043 "org/osgi/org.osgi.annotation/" version "/"
7044 "org.osgi.annotation-" version "-sources.jar"))
7045 (sha256
7046 (base32
7047 "1q718mb7gqg726rh6pc2hcisn8v50nv35abbir0jypmffhiii85w"))))
7048 (build-system ant-build-system)
7049 (arguments
7050 `(#:tests? #f ; no tests
7051 #:jar-name "osgi-annotation.jar"
7052 #:phases
7053 (modify-phases %standard-phases
7054 (add-before 'install 'create-pom
7055 (generate-pom.xml "pom.xml" "osgi" "osgi-annotation" ,version))
7056 (replace 'install (install-from-pom "pom.xml")))))
7057 (home-page "https://www.osgi.org")
7058 (synopsis "Annotation module of OSGi framework")
7059 (description
7060 "OSGi, for Open Services Gateway initiative framework, is a module system
7061and service platform for the Java programming language. This package contains
7062the OSGi annotation module, providing additional services to help dynamic
7063components.")
7064 (license license:asl2.0)))
7065
7066(define-public java-osgi-core
7067 (package
7068 (name "java-osgi-core")
7069 (version "6.0.0")
7070 (source (origin
7071 (method url-fetch)
7072 (uri (string-append "https://repo1.maven.org/maven2/"
7073 "org/osgi/org.osgi.core/" version "/"
7074 "org.osgi.core-" version "-sources.jar"))
7075 (sha256
7076 (base32
7077 "19bpf5jx32jq9789gyhin35q5v7flmw0p9mk7wbgqpxqfmxyiabv"))))
7078 (build-system ant-build-system)
7079 (arguments
7080 `(#:tests? #f ; no tests
7081 #:jar-name "osgi-core.jar"
7082 #:phases
7083 (modify-phases %standard-phases
7084 (add-before 'install 'create-pom
7085 (generate-pom.xml "pom.xml" "org.osgi" "org.osgi.core" ,version))
7086 (replace 'install (install-from-pom "pom.xml")))))
7087 (inputs
7088 (list java-osgi-annotation))
7089 (home-page "https://www.osgi.org")
7090 (synopsis "Core module of OSGi framework")
7091 (description
7092 "OSGi, for Open Services Gateway initiative framework, is a module system
7093and service platform for the Java programming language. This package contains
7094the OSGi Core module.")
7095 (license license:asl2.0)))
7096
7097(define-public java-osgi-service-event
7098 (package
7099 (name "java-osgi-service-event")
7100 (version "1.3.1")
7101 (source (origin
7102 (method url-fetch)
7103 (uri (string-append "https://repo1.maven.org/maven2/"
7104 "org/osgi/org.osgi.service.event/"
7105 version "/org.osgi.service.event-"
7106 version "-sources.jar"))
7107 (sha256
7108 (base32
7109 "1nyhlgagwym75bycnjczwbnpymv2iw84zbhvvzk84g9q736i6qxm"))))
7110 (build-system ant-build-system)
7111 (arguments
7112 `(#:tests? #f ; no tests
7113 #:jar-name "osgi-service-event.jar"))
7114 (inputs
7115 (list java-osgi-annotation java-osgi-core))
7116 (home-page "https://www.osgi.org")
7117 (synopsis "OSGi service event module")
7118 (description
7119 "OSGi, for Open Services Gateway initiative framework, is a module system
7120and service platform for the Java programming language. This package contains
7121the OSGi @code{org.osgi.service.event} module.")
7122 (license license:asl2.0)))
7123
7124(define-public java-eclipse-osgi
7125 (package
7126 (name "java-eclipse-osgi")
7127 (version "3.11.3")
7128 (source (origin
7129 (method url-fetch)
7130 (uri (string-append "https://repo1.maven.org/maven2/"
7131 "org/eclipse/platform/org.eclipse.osgi/"
7132 version "/org.eclipse.osgi-"
7133 version "-sources.jar"))
7134 (sha256
7135 (base32
7136 "00cqc6lb29n0zv68b4l842vzkwawvbr7gshfdygsk8sicvcq2c7b"))))
7137 (build-system ant-build-system)
7138 (arguments
7139 `(#:tests? #f ; no tests included
7140 #:jar-name "eclipse-equinox-osgi.jar"))
7141 (inputs
7142 (list java-osgi-annotation))
7143 (home-page "https://www.eclipse.org/equinox/")
7144 (synopsis "Eclipse Equinox OSGi framework")
7145 (description "This package provides an implementation of the OSGi Core
7146specification.")
7147 (license license:epl1.0)))
7148
7149(define-public java-eclipse-equinox-common
7150 (package
7151 (name "java-eclipse-equinox-common")
7152 (version "3.10.200")
7153 (source (origin
7154 (method url-fetch)
7155 (uri (string-append "https://repo1.maven.org/maven2/"
7156 "org/eclipse/platform/org.eclipse.equinox.common/"
7157 version "/org.eclipse.equinox.common-"
7158 version "-sources.jar"))
7159 (sha256
7160 (base32
7161 "1yn8ij6xsljlf35sr2l7wvyvc0ss4n1rv0ry5zkgb49dj4hyrqrj"))))
7162 (build-system ant-build-system)
7163 (arguments
7164 `(#:tests? #f ; no tests included
7165 #:jar-name "eclipse-equinox-common.jar"))
7166 (inputs
7167 (list java-eclipse-osgi))
7168 (home-page "https://www.eclipse.org/equinox/")
7169 (synopsis "Common Eclipse runtime")
7170 (description "This package provides the common Eclipse runtime.")
7171 (license license:epl1.0)))
7172
7173(define-public java-eclipse-core-jobs
7174 (package
7175 (name "java-eclipse-core-jobs")
7176 (version "3.8.0")
7177 (source (origin
7178 (method url-fetch)
7179 (uri (string-append "https://repo1.maven.org/maven2/"
7180 "org/eclipse/platform/org.eclipse.core.jobs/"
7181 version "/org.eclipse.core.jobs-"
7182 version "-sources.jar"))
7183 (sha256
7184 (base32
7185 "0395b8lh0km8vhzjnchvs1rii1qz48hyvb2wqfaq4yhklbwihq4b"))))
7186 (build-system ant-build-system)
7187 (arguments
7188 `(#:tests? #f ; no tests included
7189 #:jar-name "eclipse-core-jobs.jar"))
7190 (inputs
7191 (list java-eclipse-equinox-common java-eclipse-osgi))
7192 (home-page "https://www.eclipse.org/equinox/")
7193 (synopsis "Eclipse jobs mechanism")
7194 (description "This package provides the Eclipse jobs mechanism.")
7195 (license license:epl1.0)))
7196
7197(define-public java-eclipse-equinox-registry
7198 (package
7199 (name "java-eclipse-equinox-registry")
7200 (version "3.6.100")
7201 (source (origin
7202 (method url-fetch)
7203 (uri (string-append "https://repo1.maven.org/maven2/"
7204 "org/eclipse/platform/org.eclipse.equinox.registry/"
7205 version "/org.eclipse.equinox.registry-"
7206 version "-sources.jar"))
7207 (sha256
7208 (base32
7209 "1i9sgymh2fy5vdgk5y7s3qvrlbgh4l93ddqi3v4zmca7hwrlhf9k"))))
7210 (build-system ant-build-system)
7211 (arguments
7212 `(#:tests? #f ; no tests included
7213 #:jar-name "eclipse-equinox-registry.jar"))
7214 (inputs
7215 (list java-eclipse-core-jobs java-eclipse-equinox-common
7216 java-eclipse-osgi))
7217 (home-page "https://www.eclipse.org/equinox/")
7218 (synopsis "Eclipse extension registry support")
7219 (description "This package provides support for the Eclipse extension
7220registry.")
7221 (license license:epl1.0)))
7222
7223(define-public java-eclipse-equinox-app
7224 (package
7225 (name "java-eclipse-equinox-app")
7226 (version "1.3.400")
7227 (source (origin
7228 (method url-fetch)
7229 (uri (string-append "https://repo1.maven.org/maven2/"
7230 "org/eclipse/platform/org.eclipse.equinox.app/"
7231 version "/org.eclipse.equinox.app-"
7232 version "-sources.jar"))
7233 (sha256
7234 (base32
7235 "0nhvbp93y203ar7y59gb0mz3w2d3jlqhr0c9hii9bcfpmr7imdab"))))
7236 (build-system ant-build-system)
7237 (arguments
7238 `(#:tests? #f ; no tests included
7239 #:jar-name "eclipse-equinox-app.jar"))
7240 (inputs
7241 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7242 java-eclipse-osgi java-osgi-service-event))
7243 (home-page "https://www.eclipse.org/equinox/")
7244 (synopsis "Equinox application container")
7245 (description "This package provides the Equinox application container for
7246Eclipse.")
7247 (license license:epl1.0)))
7248
7249(define-public java-eclipse-equinox-preferences
7250 (package
7251 (name "java-eclipse-equinox-preferences")
7252 (version "3.6.1")
7253 (source (origin
7254 (method url-fetch)
7255 (uri (string-append "https://repo1.maven.org/maven2/"
7256 "org/eclipse/platform/org.eclipse.equinox.preferences/"
7257 version "/org.eclipse.equinox.preferences-"
7258 version "-sources.jar"))
7259 (sha256
7260 (base32
7261 "0k7w6c141sqym4fy3af0qkwpy4pdh2vsjpjba6rp5fxyqa24v0a2"))))
7262 (build-system ant-build-system)
7263 (arguments
7264 `(#:tests? #f ; no tests included
7265 #:jar-name "eclipse-equinox-preferences.jar"))
7266 (inputs
7267 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7268 java-eclipse-osgi))
7269 (home-page "https://www.eclipse.org/equinox/")
7270 (synopsis "Eclipse preferences mechanism")
7271 (description "This package provides the Eclipse preferences mechanism with
7272the module @code{org.eclipse.equinox.preferences}.")
7273 (license license:epl1.0)))
7274
7275(define-public java-eclipse-core-contenttype
7276 (package
7277 (name "java-eclipse-core-contenttype")
7278 (version "3.5.100")
7279 (source (origin
7280 (method url-fetch)
7281 (uri (string-append "https://repo1.maven.org/maven2/"
7282 "org/eclipse/platform/org.eclipse.core.contenttype/"
7283 version "/org.eclipse.core.contenttype-"
7284 version "-sources.jar"))
7285 (sha256
7286 (base32
7287 "1wcqcv7ijwv5rh748vz3x9pkmjl9w1r0k0026k56n8yjl4rrmspi"))))
7288 (build-system ant-build-system)
7289 (arguments
7290 `(#:tests? #f ; no tests included
7291 #:jar-name "eclipse-core-contenttype.jar"))
7292 (inputs
7293 (list java-eclipse-equinox-common java-eclipse-equinox-preferences
7294 java-eclipse-equinox-registry java-eclipse-osgi))
7295 (home-page "https://www.eclipse.org/")
7296 (synopsis "Eclipse content mechanism")
7297 (description "This package provides the Eclipse content mechanism in the
7298@code{org.eclipse.core.contenttype} module.")
7299 (license license:epl1.0)))
7300
7301(define-public java-eclipse-core-runtime
7302 (package
7303 (name "java-eclipse-core-runtime")
7304 (version "3.15.100")
7305 (source (origin
7306 (method url-fetch)
7307 (uri (string-append "https://repo1.maven.org/maven2/"
7308 "org/eclipse/platform/org.eclipse.core.runtime/"
7309 version "/org.eclipse.core.runtime-"
7310 version "-sources.jar"))
7311 (sha256
7312 (base32
7313 "0l8xayacsbjvz5hypx2fv47vpw2n4dspamcfb3hx30x9hj8vmg7r"))))
7314 (build-system ant-build-system)
7315 (arguments
7316 `(#:tests? #f ; no tests included
7317 #:jar-name "eclipse-core-runtime.jar"))
7318 (inputs
7319 (list java-eclipse-core-contenttype
7320 java-eclipse-core-jobs
7321 java-eclipse-equinox-app
7322 java-eclipse-equinox-common
7323 java-eclipse-equinox-registry
7324 java-eclipse-equinox-preferences
7325 java-eclipse-osgi))
7326 (home-page "https://www.eclipse.org/")
7327 (synopsis "Eclipse core runtime")
7328 (description "This package provides the Eclipse core runtime with the
7329module @code{org.eclipse.core.runtime}.")
7330 (license license:epl1.0)))
7331
7332(define-public java-eclipse-core-filesystem
7333 (package
7334 (name "java-eclipse-core-filesystem")
7335 (version "1.6.1")
7336 (source (origin
7337 (method url-fetch)
7338 (uri (string-append "https://repo1.maven.org/maven2/"
7339 "org/eclipse/platform/org.eclipse.core.filesystem/"
7340 version "/org.eclipse.core.filesystem-"
7341 version "-sources.jar"))
7342 (sha256
7343 (base32
7344 "0km1bhwjim4rfy3pkvjhvy31kgsyf2ncx0mlkmbf5n6g57pphdyj"))))
7345 (build-system ant-build-system)
7346 (arguments
7347 `(#:tests? #f ; no tests included
7348 #:jar-name "eclipse-core-filesystem.jar"))
7349 (inputs
7350 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7351 java-eclipse-osgi))
7352 (home-page "https://www.eclipse.org/")
7353 (synopsis "Eclipse core file system")
7354 (description "This package provides the Eclipse core file system with the
7355module @code{org.eclipse.core.filesystem}.")
7356 (license license:epl1.0)))
7357
7358(define-public java-eclipse-core-expressions
7359 (package
7360 (name "java-eclipse-core-expressions")
7361 (version "3.5.100")
7362 (source (origin
7363 (method url-fetch)
7364 (uri (string-append "https://repo1.maven.org/maven2/"
7365 "org/eclipse/platform/org.eclipse.core.expressions/"
7366 version "/org.eclipse.core.expressions-"
7367 version "-sources.jar"))
7368 (sha256
7369 (base32
7370 "18bw2l875gmygvpagpgk9l24qzbdjia4ag12nw6fi8v8yaq4987f"))))
7371 (build-system ant-build-system)
7372 (arguments
7373 `(#:tests? #f ; no tests included
7374 #:jar-name "eclipse-core-expressions.jar"))
7375 (inputs
7376 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7377 java-eclipse-equinox-preferences java-eclipse-core-runtime
7378 java-eclipse-osgi))
7379 (home-page "https://www.eclipse.org/")
7380 (synopsis "Eclipse core expression language")
7381 (description "This package provides the Eclipse core expression language
7382with the @code{org.eclipse.core.expressions} module.")
7383 (license license:epl1.0)))
7384
7385(define-public java-eclipse-core-variables
7386 (package
7387 (name "java-eclipse-core-variables")
7388 (version "3.3.0")
7389 (source (origin
7390 (method url-fetch)
7391 (uri (string-append "https://repo1.maven.org/maven2/"
7392 "org/eclipse/platform/org.eclipse.core.variables/"
7393 version "/org.eclipse.core.variables-"
7394 version "-sources.jar"))
7395 (sha256
7396 (base32
7397 "12dirh03zi4n5x5cj07vzrhkmnqy6h9q10h9j605pagmpmifyxmy"))))
7398 (build-system ant-build-system)
7399 (arguments
7400 `(#:tests? #f ; no tests included
7401 #:jar-name "eclipse-core-variables.jar"))
7402 (inputs
7403 (list java-eclipse-equinox-common java-eclipse-equinox-registry
7404 java-eclipse-equinox-preferences java-eclipse-core-runtime
7405 java-eclipse-osgi))
7406 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7407 (synopsis "Eclipse core variables")
7408 (description "This package provides the Eclipse core variables module
7409@code{org.eclipse.core.variables}.")
7410 (license license:epl1.0)))
7411
7412(define-public java-eclipse-ant-core
7413 (package
7414 (name "java-eclipse-ant-core")
7415 (version "3.4.100")
7416 (source (origin
7417 (method url-fetch)
7418 (uri (string-append "https://repo1.maven.org/maven2/"
7419 "org/eclipse/platform/org.eclipse.ant.core/"
7420 version "/org.eclipse.ant.core-"
7421 version "-sources.jar"))
7422 (sha256
7423 (base32
7424 "11g3if794qjlk98mz9zch22rr56sd7z63vn4i7k2icr8cq5bfqg7"))))
7425 (build-system ant-build-system)
7426 (arguments
7427 `(#:tests? #f ; no tests included
7428 #:jar-name "eclipse-ant-core.jar"))
7429 (inputs
7430 (list java-eclipse-equinox-app
7431 java-eclipse-equinox-common
7432 java-eclipse-equinox-registry
7433 java-eclipse-equinox-preferences
7434 java-eclipse-core-contenttype
7435 java-eclipse-core-runtime
7436 java-eclipse-core-variables
7437 java-eclipse-osgi))
7438 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7439 (synopsis "Ant build tool core libraries")
7440 (description "This package provides the ant build tool core libraries with
7441the module @code{org.eclipse.ant.core}.")
7442 (license license:epl1.0)))
7443
7444(define-public java-eclipse-core-resources
7445 (package
7446 (name "java-eclipse-core-resources")
7447 (version "3.13.200")
7448 (source (origin
7449 (method url-fetch)
7450 (uri (string-append "https://repo1.maven.org/maven2/"
7451 "org/eclipse/platform/org.eclipse.core.resources/"
7452 version "/org.eclipse.core.resources-"
7453 version "-sources.jar"))
7454 (sha256
7455 (base32
7456 "1sn3b6ky72hkvxcgf9b2jkpbdh3y8lbhi9xxwv1dsiddpkkq91hs"))))
7457 (build-system ant-build-system)
7458 (arguments
7459 `(#:tests? #f ; no tests included
7460 #:jar-name "eclipse-core-resources.jar"))
7461 (inputs
7462 (list java-eclipse-equinox-common
7463 java-eclipse-equinox-preferences
7464 java-eclipse-equinox-registry
7465 java-eclipse-core-contenttype
7466 java-eclipse-core-expressions
7467 java-eclipse-core-filesystem
7468 java-eclipse-core-jobs
7469 java-eclipse-core-runtime
7470 java-eclipse-ant-core
7471 java-eclipse-osgi))
7472 (home-page "https://www.eclipse.org/")
7473 (synopsis "Eclipse core resource management")
7474 (description "This package provides the Eclipse core resource management
7475module @code{org.eclipse.core.resources}.")
7476 (license license:epl1.0)))
7477
7478(define-public java-eclipse-compare-core
7479 (package
7480 (name "java-eclipse-compare-core")
7481 (version "3.6.0")
7482 (source (origin
7483 (method url-fetch)
7484 (uri (string-append "https://repo1.maven.org/maven2/"
7485 "org/eclipse/platform/org.eclipse.compare.core/"
7486 version "/org.eclipse.compare.core-"
7487 version "-sources.jar"))
7488 (sha256
7489 (base32
7490 "10g37r0pbiffyv2wk35c6g5lwzkdipkl0kkjp41v84dln46xm4dg"))))
7491 (build-system ant-build-system)
7492 (arguments
7493 `(#:tests? #f ; no tests included
7494 #:jar-name "eclipse-compare-core.jar"))
7495 (inputs
7496 (list java-eclipse-core-runtime java-eclipse-equinox-common
7497 java-eclipse-osgi java-icu4j))
7498 (home-page "https://www.eclipse.org/")
7499 (synopsis "Eclipse core compare support")
7500 (description "This package provides the Eclipse core compare support
7501module @code{org.eclipse.compare.core}.")
7502 (license license:epl1.0)))
7503
7504(define-public java-eclipse-team-core
7505 (package
7506 (name "java-eclipse-team-core")
7507 (version "3.8.0")
7508 (source (origin
7509 (method url-fetch)
7510 (uri (string-append "https://repo1.maven.org/maven2/"
7511 "org/eclipse/platform/org.eclipse.team.core/"
7512 version "/org.eclipse.team.core-"
7513 version "-sources.jar"))
7514 (sha256
7515 (base32
7516 "02j2jzqgb26zx2d5ahxmvijw6j4r0la90zl5c3i65x6z19ciyam7"))))
7517 (build-system ant-build-system)
7518 (arguments
7519 `(#:tests? #f ; no tests included
7520 #:jar-name "eclipse-team-core.jar"))
7521 (inputs
7522 (list java-eclipse-compare-core
7523 java-eclipse-core-contenttype
7524 java-eclipse-core-filesystem
7525 java-eclipse-core-jobs
7526 java-eclipse-core-resources
7527 java-eclipse-core-runtime
7528 java-eclipse-equinox-common
7529 java-eclipse-equinox-registry
7530 java-eclipse-equinox-preferences
7531 java-eclipse-osgi))
7532 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7533 (synopsis "Eclipse team support core")
7534 (description "This package provides the Eclipse team support core module
7535@code{org.eclipse.team.core}.")
7536 (license license:epl1.0)))
7537
7538(define-public java-eclipse-core-commands
7539 (package
7540 (name "java-eclipse-core-commands")
7541 (version "3.8.1")
7542 (source (origin
7543 (method url-fetch)
7544 (uri (string-append "https://repo1.maven.org/maven2/"
7545 "org/eclipse/platform/org.eclipse.core.commands/"
7546 version "/org.eclipse.core.commands-"
7547 version "-sources.jar"))
7548 (sha256
7549 (base32
7550 "0yjn482qndcfrsq3jd6vnhcylp16420f5aqkrwr8spsprjigjcr9"))))
7551 (build-system ant-build-system)
7552 (arguments
7553 `(#:tests? #f ; no tests included
7554 #:jar-name "eclipse-core-commands.jar"))
7555 (inputs
7556 (list java-eclipse-equinox-common))
7557 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7558 (synopsis "Eclipse core commands")
7559 (description "This package provides Eclipse core commands in the module
7560@code{org.eclipse.core.commands}.")
7561 (license license:epl1.0)))
7562
7563(define-public java-eclipse-text
7564 (package
7565 (name "java-eclipse-text")
7566 (version "3.6.0")
7567 (source (origin
7568 (method url-fetch)
7569 (uri (string-append "https://repo1.maven.org/maven2/"
7570 "org/eclipse/platform/org.eclipse.text/"
7571 version "/org.eclipse.text-"
7572 version "-sources.jar"))
7573 (sha256
7574 (base32
7575 "0scz70vzz5qs5caji9f5q01vkqnvip7dpri1q07l8wbbdcxn4cq1"))))
7576 (build-system ant-build-system)
7577 (arguments
7578 `(#:tests? #f ; no tests included
7579 #:jar-name "eclipse-text.jar"
7580 #:phases
7581 (modify-phases %standard-phases
7582 ;; When creating a new category we must make sure that the new list
7583 ;; matches List<Position>. By default it seems to be too generic
7584 ;; (ArrayList<Object>), so we specialize it to ArrayList<Position>.
7585 ;; Without this we get this error:
7586 ;;
7587 ;; [javac] .../src/org/eclipse/jface/text/AbstractDocument.java:376:
7588 ;; error: method put in interface Map<K,V> cannot be applied to given types;
7589 ;; [javac] fPositions.put(category, new ArrayList<>());
7590 ;; [javac] ^
7591 ;; [javac] required: String,List<Position>
7592 ;; [javac] found: String,ArrayList<Object>
7593 ;; [javac] reason: actual argument ArrayList<Object> cannot be converted
7594 ;; to List<Position> by method invocation conversion
7595 ;; [javac] where K,V are type-variables:
7596 ;; [javac] K extends Object declared in interface Map
7597 ;; [javac] V extends Object declared in interface Map
7598 ;;
7599 ;; I don't know if this is a good fix. I suspect it is not, but it
7600 ;; seems to work.
7601 (add-after 'unpack 'fix-compilation-error
7602 (lambda _
7603 (substitute* "src/org/eclipse/jface/text/AbstractDocument.java"
7604 (("Positions.put\\(category, new ArrayList<>\\(\\)\\);")
7605 "Positions.put(category, new ArrayList<Position>());"))
7606 #t)))))
7607 (inputs
7608 (list java-eclipse-equinox-common java-eclipse-core-commands
7609 java-icu4j))
7610 (home-page "https://projects.eclipse.org/projects/eclipse.platform")
7611 (synopsis "Eclipse text library")
7612 (description "Platform Text is part of the Platform UI project and
7613provides the basic building blocks for text and text editors within Eclipse
7614and contributes the Eclipse default text editor.")
7615 (license license:epl1.0)))
7616
7617(define-public java-eclipse-jdt-core
7618 (package
7619 (name "java-eclipse-jdt-core")
7620 (version "3.16.0")
7621 (source (origin
7622 (method url-fetch)
7623 (uri (string-append "https://repo1.maven.org/maven2/"
7624 "org/eclipse/jdt/org.eclipse.jdt.core/"
7625 version "/org.eclipse.jdt.core-"
7626 version "-sources.jar"))
7627 (sha256
7628 (base32
7629 "1g560yr9v2kzv34gc2m3ifpgnj7krcdd6h4gd4z83pwqacwkfz0k"))))
7630 (build-system ant-build-system)
7631 (arguments
7632 `(#:tests? #f ; no tests included
7633 #:jar-name "eclipse-jdt-core.jar"
7634 #:phases
7635 (modify-phases %standard-phases
7636 (add-after 'unpack 'move-sources
7637 (lambda _
7638 (with-directory-excursion "src/jdtCompilerAdaptersrc/"
7639 (for-each (lambda (file)
7640 (install-file file (string-append "../" (dirname file))))
7641 (find-files "." ".*")))
7642 (delete-file-recursively "src/jdtCompilerAdaptersrc/")
7643 #t))
7644 (add-before 'build 'copy-resources
7645 (lambda _
7646 (with-directory-excursion "src"
7647 (for-each (lambda (file)
7648 (install-file file (string-append "../build/classes/" (dirname file))))
7649 (find-files "." ".*.(props|properties|rsc)")))
7650 #t)))))
7651 (inputs
7652 (list java-eclipse-core-contenttype
7653 java-eclipse-core-filesystem
7654 java-eclipse-core-jobs
7655 java-eclipse-core-resources
7656 java-eclipse-core-runtime
7657 java-eclipse-equinox-app
7658 java-eclipse-equinox-common
7659 java-eclipse-equinox-preferences
7660 java-eclipse-equinox-registry
7661 java-eclipse-osgi
7662 java-eclipse-text))
7663 (home-page "https://www.eclipse.org/jdt")
7664 (synopsis "Java development tools core libraries")
7665 (description "This package provides the core libraries of the Eclipse Java
7666development tools.")
7667 (license license:epl1.0)))
7668
7669(define-public java-eclipse-jdt-compiler-apt
7670 (package
7671 (name "java-eclipse-jdt-compiler-apt")
7672 (version "1.3.400")
7673 (source (origin
7674 (method url-fetch)
7675 (uri (string-append "https://repo1.maven.org/maven2/"
7676 "org/eclipse/jdt/org.eclipse.jdt.compiler.apt/"
7677 version "/org.eclipse.jdt.compiler.apt-"
7678 version "-sources.jar"))
7679 (sha256
7680 (base32
7681 "1s285k9p2ixdqrknb40jbbvw682n9a7l5lqpn583a8pvlzg2l6r8"))))
7682 (build-system ant-build-system)
7683 (arguments
7684 `(#:tests? #f ; no tests included
7685 #:jar-name "eclipse-jdt-compiler-apt.jar"
7686 #:jdk ,openjdk11))
7687 (inputs
7688 (list java-eclipse-jdt-core))
7689 (home-page "https://www.eclipse.org/jdt/apt/")
7690 (synopsis "Annotation processing tool")
7691 (description "APT stands for Annotation Processing Tool. APT provides a
7692means for generating files and compiling new Java classes based on annotations
7693found in your source code.")
7694 (license license:epl2.0)))
7695
7696(define-public java-eclipse-lsp4j-common
7697 (package
7698 (name "java-eclipse-lsp4j-common")
7699 (version "0.10.0")
7700 (source (origin
7701 (method git-fetch)
7702 (uri (git-reference
7703 (url "https://github.com/eclipse/lsp4j")
7704 (commit (string-append "v" version))))
7705 (file-name (git-file-name name version))
7706 (sha256
7707 (base32
7708 "17srrac0pkpybwwc21rzdvn762zzl9m80rlqihc9b4l55hkqpk98"))))
7709 (build-system ant-build-system)
7710 (home-page "https://eclipse.org/lsp4j/")
7711 (synopsis "LSP4J common package")
7712 (description "Eclipse LSP4J provides Java bindings for the Language
7713Server Protocol and the Debug Adapter Protocol. This package is a common
7714definition intended to be inherited by other packages.")
7715 (license license:epl2.0)))
7716
7717(define-public java-eclipse-lsp4j-debug
7718 (package
7719 (inherit java-eclipse-lsp4j-common)
7720 (name "java-eclipse-lsp4j-debug")
7721 (arguments
7722 `(#:jar-name "eclipse-lsp4j-debug.jar"
7723 #:jdk ,openjdk11
7724 #:tests? #f; tests fail with reflection errors
7725 #:source-dir "org.eclipse.lsp4j.debug/src/main/java"
7726 #:test-dir "org.eclipse.lsp4j.debug/src/test"
7727 #:phases
7728 (modify-phases %standard-phases
7729 (add-before 'build 'copy-xtend
7730 (lambda _
7731 (copy-recursively "org.eclipse.lsp4j.debug/src/main/xtend-gen"
7732 "org.eclipse.lsp4j.debug/src/main/java"))))))
7733 (native-inputs
7734 (list java-junit))
7735 (inputs
7736 `(("java-gson" ,java-gson-2.8.6)
7737 ("java-eclipse-lsp4j-generaor" ,java-eclipse-lsp4j-generator)
7738 ("java-eclipse-lsp4j-jsonrpc" ,java-eclipse-lsp4j-jsonrpc)
7739 ("java-eclipse-lsp4j-jsonrpc-debug" ,java-eclipse-lsp4j-jsonrpc-debug)
7740 ("java-eclipse-xtext-xbase-lib" ,java-eclipse-xtext-xbase-lib)))
7741 (synopsis "Eclipse LSP4J Java bindings for the Debug Server Protocol")
7742 (description "Eclipse LSP4J provides Java bindings for the Language
7743Server Protocol and the Debug Adapter Protocol. This package contains its
7744LSP4J Java bindings for the Debug Server Protocol.")))
7745
7746(define-public java-eclipse-lsp4j-generator
7747 (package
7748 (inherit java-eclipse-lsp4j-common)
7749 (name "java-eclipse-lsp4j-generator")
7750 (arguments
7751 `(#:jar-name "eclipse-lsp4j-generator.jar"
7752 #:jdk ,openjdk11
7753 #:tests? #f; no tests
7754 #:source-dir "org.eclipse.lsp4j.generator/src/main/java"))
7755 (inputs
7756 (list java-eclipse-lsp4j-jsonrpc))
7757 (synopsis "Eclipse LSP4J Generator")
7758 (description "Eclipse LSP4J provides Java bindings for the Language
7759Server Protocol and the Debug Adapter Protocol. This package contains its
7760LSP4J code generator for Language Server Protocol classes.")))
7761
7762(define-public java-eclipse-lsp4j-jsonrpc
7763 (package
7764 (inherit java-eclipse-lsp4j-common)
7765 (name "java-eclipse-lsp4j-jsonrpc")
7766 (arguments
7767 `(#:jar-name "eclipse-lsp4j-jsonrpc.jar"
7768 #:jdk ,openjdk11
7769 #:source-dir "org.eclipse.lsp4j.jsonrpc/src/main/java"
7770 #:test-dir "org.eclipse.lsp4j.jsonrpc/src/test"))
7771 (native-inputs
7772 (list java-junit))
7773 (inputs
7774 (list java-gson-2.8.6))
7775 (synopsis "Java JSON-RPC implementation")
7776 (description "Eclipse LSP4J provides Java bindings for the Language
7777Server Protocol and the Debug Adapter Protocol. This package contains its
7778JSON-RPC implementation.")))
7779
7780(define-public java-eclipse-lsp4j-jsonrpc-debug
7781 (package
7782 (inherit java-eclipse-lsp4j-common)
7783 (name "java-eclipse-lsp4j-jsonrpc-debug")
7784 (arguments
7785 `(#:jar-name "eclipse-lsp4j-jsonrpc-debug.jar"
7786 #:jdk ,openjdk11
7787 #:source-dir "org.eclipse.lsp4j.jsonrpc.debug/src/main/java"
7788 #:test-dir "org.eclipse.lsp4j.jsonrpc.debug/src/test"))
7789 (native-inputs
7790 (list java-junit))
7791 (inputs
7792 (list java-eclipse-lsp4j-jsonrpc java-gson-2.8.6))
7793 (synopsis "Java JSON-RPC implementation (debug protocol)")
7794 (description "Eclipse LSP4J provides Java bindings for the Language
7795Server Protocol and the Debug Adapter Protocol. This package contains its
7796JSON-RPC implementation's debug protocol.")))
7797
7798(define-public java-eclipse-xtext-xbase-lib
7799 (package
7800 (name "java-eclipse-xtext-xbase-lib")
7801 (version "2.25.0")
7802 (source (origin
7803 (method git-fetch)
7804 (uri (git-reference
7805 (url "https://github.com/eclipse/xtext-lib")
7806 (commit (string-append "v" version))))
7807 (file-name (git-file-name name version))
7808 (sha256
7809 (base32
7810 "13b9lf6lnsprkik665m1qcyyc8cs16k33xm7as4rjcfcpn4pln71"))))
7811 (build-system ant-build-system)
7812 (arguments
7813 `(#:jar-name "eclipse-xtext-xbase-lib.jar"
7814 #:jdk ,openjdk11
7815 #:tests? #f; TODO (maybe needs newer guava version?)
7816 #:source-dir "org.eclipse.xtext.xbase.lib/src"
7817 #:test-dir "org.eclipse.xtext.xbase.lib.tests/src"))
7818 (native-inputs
7819 (list java-junit))
7820 (inputs
7821 (list java-guava))
7822 (home-page "https://www.eclipse.org/Xtext/")
7823 (synopsis "Eclipse Xbase Runtime Library")
7824 (description "This package contains runtime libraries for Xbase languages
7825such as Xtend.")
7826 (license license:epl2.0)))
7827
7828(define-public java-javax-mail
7829 (package
7830 (name "java-javax-mail")
7831 (version "1.5.6")
7832 (source (origin
7833 (method url-fetch)
7834 (uri (string-append "https://repo1.maven.org/maven2/"
7835 "com/sun/mail/javax.mail/"
7836 version "/javax.mail-"
7837 version "-sources.jar"))
7838 (sha256
7839 (base32
7840 "0sdlfgsc2b5s89xv1261y8i0jijcja019k2x1c8ngfn582w4jly9"))))
7841 (build-system ant-build-system)
7842 (arguments
7843 `(#:tests? #f ; no tests
7844 #:jar-name "javax-mail.jar"))
7845 (home-page "https://javamail.java.net")
7846 (synopsis "Reference implementation of the JavaMail API")
7847 (description
7848 "This package provides versions of the JavaMail API implementation, IMAP,
7849SMTP, and POP3 service providers, some examples, and documentation for the
7850JavaMail API.")
7851 ;; GPLv2 only with "classpath exception".
7852 (license license:gpl2)))
7853
7854(define-public java-log4j-api
7855 (package
7856 (name "java-log4j-api")
7857 (version "2.17.1")
7858 (source (origin
7859 (method url-fetch)
7860 (uri (string-append "mirror://apache/logging/log4j/" version
7861 "/apache-log4j-" version "-src.tar.gz"))
7862 (sha256
7863 (base32
7864 "05xssljdgxfv8ql42db8ydjfsvvbdqmsgip75phybm259ydzbsd6"))))
7865 (build-system ant-build-system)
7866 (arguments
7867 `(#:tests? #f ; tests require unpackaged software
7868 #:jar-name "log4j-api.jar"
7869 #:make-flags
7870 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7871 #:phases
7872 (modify-phases %standard-phases
7873 (add-after 'unpack 'enter-dir
7874 (lambda _ (chdir "log4j-api") #t))
7875 ;; FIXME: The tests require additional software that has not been
7876 ;; packaged yet, such as
7877 ;; * org.apache.maven
7878 ;; * org.apache.felix
7879 (add-after 'enter-dir 'delete-tests
7880 (lambda _ (delete-file-recursively "src/test") #t)))))
7881 (inputs
7882 (list java-osgi-core java-hamcrest-core java-junit))
7883 (properties '((cpe-name . "log4j")))
7884 (home-page "https://logging.apache.org/log4j/2.x/")
7885 (synopsis "API module of the Log4j logging framework for Java")
7886 (description
7887 "This package provides the API module of the Log4j logging framework for
7888Java.")
7889 (license license:asl2.0)))
7890
7891(define-public java-log4j-core
7892 (package
7893 (inherit java-log4j-api)
7894 (name "java-log4j-core")
7895 (inputs
7896 `(("java-osgi-core" ,java-osgi-core)
7897 ("java-hamcrest-core" ,java-hamcrest-core)
7898 ("java-log4j-api" ,java-log4j-api)
7899 ("java-mail" ,java-mail)
7900 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7901 ("java-conversant-disruptor" ,java-conversant-disruptor)
7902 ("java-lmax-disruptor" ,java-lmax-disruptor)
7903 ("java-jctools-core" ,java-jctools-core-1)
7904 ("java-stax2-api" ,java-stax2-api)
7905 ("java-jansi" ,java-jansi)
7906 ("java-kafka" ,java-kafka-clients)
7907 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
7908 ("java-fasterxml-jackson-annotations" ,java-fasterxml-jackson-annotations)
7909 ("java-fasterxml-jackson-core" ,java-fasterxml-jackson-core)
7910 ("java-fasterxml-jackson-databind" ,java-fasterxml-jackson-databind)
7911 ("java-fasterxml-jackson-dataformat-xml" ,java-fasterxml-jackson-dataformat-xml)
7912 ("java-fasterxml-jackson-dataformat-yaml" ,java-fasterxml-jackson-dataformat-yaml)
7913 ("java-commons-compress" ,java-commons-compress)
7914 ("java-commons-csv" ,java-commons-csv)
7915 ("java-jeromq" ,java-jeromq)
7916 ("java-junit" ,java-junit)))
7917 (native-inputs
7918 `(("hamcrest" ,java-hamcrest-all)
7919 ("java-commons-io" ,java-commons-io)
7920 ("java-commons-lang3" ,java-commons-lang3)
7921 ("slf4j" ,java-slf4j-api)))
7922 (arguments
7923 `(#:tests? #f ; tests require more dependencies
7924 #:test-dir "src/test"
7925 #:source-dir "src/main/java"
7926 #:jar-name "log4j-core.jar"
7927 #:jdk ,icedtea-8
7928 #:make-flags
7929 ,#~(list (string-append "-Ddist.dir=" #$output "/share/java"))
7930 #:phases
7931 (modify-phases %standard-phases
7932 (add-after 'unpack 'enter-dir
7933 (lambda _ (chdir "log4j-core") #t)))))
7934 (synopsis "Core component of the Log4j framework")
7935 (description "This package provides the core component of the Log4j
7936logging framework for Java.")))
7937
7938(define-public java-log4j-1.2-api
7939 (package
7940 (inherit java-log4j-api)
7941 (name "java-log4j-1.2-api")
7942 (arguments
7943 `(#:jar-name "java-log4j-1.2-api.jar"
7944 #:source-dir "log4j-1.2-api/src/main/java"
7945 #:jdk ,icedtea-8
7946 ;; Tests require maven-model (and other maven subprojects), which is a
7947 ;; cyclic dependency.
7948 #:tests? #f))
7949 (inputs
7950 `(("log4j-api" ,java-log4j-api)
7951 ("log4j-core" ,java-log4j-core)
7952 ("java-jboss-jms-api-spec" ,java-jboss-jms-api-spec)
7953 ("osgi-core" ,java-osgi-core)
7954 ("eclipse-osgi" ,java-eclipse-osgi)
7955 ("java-lmax-disruptor" ,java-lmax-disruptor)))))
7956
7957(define-public java-commons-cli
7958 (package
7959 (name "java-commons-cli")
7960 (version "1.4")
7961 (source (origin
7962 (method url-fetch)
7963 (uri (string-append "mirror://apache/commons/cli/source/"
7964 "commons-cli-" version "-src.tar.gz"))
7965 (sha256
7966 (base32
7967 "05hgi2z01fqz374y719gl1dxzqvzci5af071zm7vxrjg9vczipm1"))))
7968 (build-system ant-build-system)
7969 ;; TODO: javadoc
7970 (arguments
7971 `(#:jar-name "commons-cli.jar"
7972 #:phases
7973 (modify-phases %standard-phases
7974 (replace 'install
7975 (install-from-pom "pom.xml")))))
7976 (native-inputs
7977 (list java-junit java-hamcrest-core))
7978 (home-page "https://commons.apache.org/cli/")
7979 (synopsis "Command line arguments and options parsing library")
7980 (description "The Apache Commons CLI library provides an API for parsing
7981command line options passed to programs. It is also able to print help
7982messages detailing the options available for a command line tool.
7983
7984Commons CLI supports different types of options:
7985
7986@itemize
7987@item POSIX like options (ie. tar -zxvf foo.tar.gz)
7988@item GNU like long options (ie. du --human-readable --max-depth=1)
7989@item Java like properties (ie. java -Djava.awt.headless=true Foo)
7990@item Short options with value attached (ie. gcc -O2 foo.c)
7991@item long options with single hyphen (ie. ant -projecthelp)
7992@end itemize
7993
7994This is a part of the Apache Commons Project.")
7995 (license license:asl2.0)))
7996
7997(define-public java-commons-text
7998 (package
7999 (name "java-commons-text")
8000 (version "1.9")
8001 (source (origin
8002 (method url-fetch)
8003 (uri (string-append "mirror://apache/commons/text/source/"
8004 "commons-text-" version "-src.tar.gz"))
8005 (sha256
8006 (base32
8007 "1k99ib2dxlqxb5y94kpzf4ix8xgxz1j3n9kq3ddssqqcccsp5ik2"))))
8008 (build-system ant-build-system)
8009 (arguments
8010 (list #:jar-name "java-commons-text.jar"
8011 #:source-dir "src/main/java"
8012 #:test-dir "src/test"
8013 #:tests? #f ; Tests require JUnit5.
8014 #:phases
8015 #~(modify-phases %standard-phases
8016 (replace 'install
8017 (install-from-pom "pom.xml")))))
8018 (inputs
8019 (list java-commons-io))
8020 (propagated-inputs
8021 (list java-commons-lang3
8022 apache-commons-parent-pom-51))
8023 (home-page "https://commons.apache.org/text/")
8024 (synopsis "Library focused on algorithms working on strings")
8025 (description "Apache Commons Text is a library focused on algorithms
8026working on strings.
8027
8028This is a part of the Apache Commons Project.")
8029 (license license:asl2.0)))
8030
8031(define-public java-commons-codec
8032 (package
8033 (name "java-commons-codec")
8034 (version "1.15")
8035 (source (origin
8036 (method url-fetch)
8037 (uri (string-append "mirror://apache/commons/codec/source/"
8038 "commons-codec-" version "-src.tar.gz"))
8039 (sha256
8040 (base32
8041 "01z9qmg8fd8d7p7xxipwj1vi9bmvpgqyi29kldjz2x6vzwm171jj"))))
8042 (build-system ant-build-system)
8043 (arguments
8044 `(#:jar-name "java-commons-codec.jar"
8045 #:source-dir "src/main/java"
8046 #:test-dir "src/test"
8047 #:test-exclude (list "**/*AbstractTest.java")
8048 #:phases
8049 (modify-phases %standard-phases
8050 (add-before 'build 'copy-resources
8051 (lambda _
8052 (copy-recursively "src/main/resources"
8053 "build/classes")))
8054 (add-before 'check 'copy-test-resources
8055 (lambda _
8056 (copy-recursively "src/test/resources"
8057 "build/test-classes")))
8058 (add-before 'check 'skip-ravenous-test
8059 (lambda _
8060 ;; This test admits to being "memory hungry", but reliably fails
8061 ;; even on a machine that should have plenty (12 GiB). Skip it.
8062 (substitute*
8063 "src/test/java/org/apache/commons/codec/binary/BaseNCodecTest.java"
8064 (("\\bassertEnsureBufferSizeExpandsToMaxBufferSize.*;")
8065 "return;"))))
8066 (replace 'install (install-from-pom "pom.xml")))))
8067 (native-inputs
8068 (list java-commons-lang3 java-junit))
8069 (propagated-inputs
8070 (list apache-commons-parent-pom-52))
8071 (home-page "https://commons.apache.org/codec/")
8072 (synopsis "Common encoders and decoders such as Base64, Hex, Phonetic and URLs")
8073 (description "The codec package contains simple encoder and decoders for
8074various formats such as Base64 and Hexadecimal. In addition to these widely
8075used encoders and decoders, the codec package also maintains a collection of
8076phonetic encoding utilities.
8077
8078This is a part of the Apache Commons Project.")
8079 (license license:asl2.0)))
8080
8081(define-public java-commons-daemon
8082 (package
8083 (name "java-commons-daemon")
8084 (version "1.1.0")
8085 (source (origin
8086 (method url-fetch)
8087 (uri (string-append "mirror://apache/commons/daemon/source/"
8088 "commons-daemon-" version "-src.tar.gz"))
8089 (sha256
8090 (base32
8091 "141gkhfzv5v3pdhic6y4ardq2dhsa3v36j8wmmhy6f8mac48fp7n"))))
8092 (build-system ant-build-system)
8093 (arguments
8094 `(#:test-target "test"
8095 #:phases
8096 (modify-phases %standard-phases
8097 (add-after 'build 'build-javadoc ant-build-javadoc)
8098 (replace 'install (install-jars "dist"))
8099 (add-after 'install 'install-doc (install-javadoc "dist/docs/api")))))
8100 (native-inputs
8101 (list java-junit))
8102 (home-page "https://commons.apache.org/daemon/")
8103 (synopsis "Library to launch Java applications as daemons")
8104 (description "The Daemon package from Apache Commons can be used to
8105implement Java applications which can be launched as daemons. For example the
8106program will be notified about a shutdown so that it can perform cleanup tasks
8107before its process of execution is destroyed by the operation system.
8108
8109This package contains the Java library. You will also need the actual binary
8110for your architecture which is provided by the jsvc package.
8111
8112This is a part of the Apache Commons Project.")
8113 (license license:asl2.0)))
8114
8115(define-public java-javaewah
8116 (package
8117 (name "java-javaewah")
8118 (version "1.1.6")
8119 (source (origin
8120 (method git-fetch)
8121 (uri (git-reference
8122 (url "https://github.com/lemire/javaewah/")
8123 (commit (string-append "JavaEWAH-" version))))
8124 (file-name (git-file-name name version))
8125 (sha256
8126 (base32
8127 "1m8qcb1py76v7avbjjrkvyy6fhr5dk2ywy73gbsxqry04gkm2nhw"))))
8128 (build-system ant-build-system)
8129 (arguments `(#:jar-name "javaewah.jar"))
8130 (inputs
8131 (list java-junit java-hamcrest-core))
8132 (home-page "https://github.com/lemire/javaewah")
8133 (synopsis "Compressed alternative to the Java @code{BitSet} class")
8134 (description "This is a word-aligned compressed variant of the Java
8135@code{Bitset} class. It provides both a 64-bit and a 32-bit RLE-like
8136compression scheme. It can be used to implement bitmap indexes.
8137
8138The goal of word-aligned compression is not to achieve the best compression,
8139but rather to improve query processing time. Hence, JavaEWAH tries to save CPU
8140cycles, maybe at the expense of storage. However, the EWAH scheme is always
8141more efficient storage-wise than an uncompressed bitmap (as implemented in the
8142@code{BitSet} class by Sun).")
8143 ;; GPL2.0 derivates are explicitly allowed.
8144 (license license:asl2.0)))
8145
8146(define-public java-slf4j-api
8147 (package
8148 (name "java-slf4j-api")
8149 (version "1.7.25")
8150 (source (origin
8151 (method git-fetch)
8152 (uri (git-reference
8153 (url "https://github.com/qos-ch/slf4j")
8154 (commit (string-append "v_" version))))
8155 (file-name (git-file-name name version))
8156 (sha256
8157 (base32
8158 "15n42zq3k1iyn752nwdcbs44hxns2rmxhglwjfr4np7lxx56apjl"))
8159 (modules '((guix build utils)))
8160 ;; Delete bundled jars.
8161 (snippet
8162 '(begin
8163 (for-each delete-file (find-files "." "\\.jar$"))
8164 #t))))
8165 (build-system ant-build-system)
8166 (arguments
8167 `(#:jar-name "slf4j-api.jar"
8168 #:source-dir "slf4j-api/src/main"
8169 #:test-dir "slf4j-api/src/test"
8170 #:phases
8171 (modify-phases %standard-phases
8172 (add-after 'build 'regenerate-jar
8173 (lambda _
8174 ;; pom.xml ignores these files in the jar creation process. If we don't,
8175 ;; we get the error "This code should have never made it into slf4j-api.jar"
8176 (delete-file-recursively "build/classes/org/slf4j/impl")
8177 (invoke "jar" "-cf" "build/jar/slf4j-api.jar" "-C"
8178 "build/classes" ".")))
8179 (add-before 'check 'dont-test-abstract-classes
8180 (lambda _
8181 ;; abstract classes are not meant to be run with junit
8182 (substitute* "build.xml"
8183 (("<include name=\"\\*\\*/\\*Test.java\" />")
8184 (string-append "<include name=\"**/*Test.java\" />"
8185 "<exclude name=\"**/MultithreadedInitializationTest"
8186 ".java\" />")))
8187 #t))
8188 (replace 'install
8189 (install-from-pom "slf4j-api/pom.xml")))))
8190 (propagated-inputs
8191 (list java-slf4j-parent))
8192 (native-inputs
8193 (list java-junit java-hamcrest-core))
8194 (home-page "https://www.slf4j.org/")
8195 (synopsis "Simple logging facade for Java")
8196 (description "The Simple Logging Facade for Java (SLF4J) serves as a
8197simple facade or abstraction for various logging
8198frameworks (e.g. @code{java.util.logging}, @code{logback}, @code{log4j})
8199allowing the end user to plug in the desired logging framework at deployment
8200time.")
8201 (license license:expat)))
8202
8203(define java-slf4j-parent
8204 (package
8205 (inherit java-slf4j-api)
8206 (name "java-slf4j-parent")
8207 (native-inputs `())
8208 (propagated-inputs '())
8209 (arguments
8210 `(#:tests? #f
8211 #:phases
8212 (modify-phases %standard-phases
8213 (delete 'build)
8214 (delete 'configure)
8215 (replace 'install
8216 (install-pom-file "pom.xml")))))))
8217
8218(define-public java-slf4j-simple
8219 (package
8220 (name "java-slf4j-simple")
8221 (version "1.7.25")
8222 (source (package-source java-slf4j-api))
8223 (build-system ant-build-system)
8224 (arguments
8225 `(#:jar-name "slf4j-simple.jar"
8226 #:source-dir "slf4j-simple/src/main"
8227 #:test-dir "slf4j-simple/src/test"
8228 #:test-exclude (list "**/*SimpleLoggerMultithreadedInitializationTest.java")
8229 #:phases
8230 (modify-phases %standard-phases
8231 ;; The tests need some test classes from slf4j-api
8232 (add-before 'check 'build-slf4j-api-test-helpers
8233 (lambda _
8234 ;; Add current dir to CLASSPATH ...
8235 (setenv "CLASSPATH"
8236 (string-append (getcwd) ":" (getenv "CLASSPATH")))
8237 ;; ... and build test helper classes here:
8238 (apply invoke
8239 `("javac" "-d" "."
8240 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8241 (replace 'install
8242 (install-from-pom "slf4j-simple/pom.xml")))))
8243 (propagated-inputs
8244 (list java-slf4j-api))
8245 (native-inputs
8246 (list java-junit java-hamcrest-core))
8247 (home-page "https://www.slf4j.org/")
8248 (synopsis "Simple implementation of simple logging facade for Java")
8249 (description "SLF4J binding for the Simple implementation, which outputs
8250all events to System.err. Only messages of level INFO and higher are
8251printed.")
8252 (license license:expat)))
8253
8254(define-public java-slf4j-nop
8255 (package
8256 (name "java-slf4j-nop")
8257 (version "1.7.25")
8258 (source (package-source java-slf4j-api))
8259 (build-system ant-build-system)
8260 (arguments
8261 `(#:jar-name "slf4j-nop.jar"
8262 #:source-dir "slf4j-nop/src/main"
8263 #:test-dir "slf4j-nop/src/test"
8264 #:phases (modify-phases %standard-phases
8265 ;; The tests need some test classes from slf4j-api
8266 (add-before 'check 'build-slf4j-api-test-helpers
8267 (lambda _
8268 ;; Add current dir to CLASSPATH ...
8269 (setenv "CLASSPATH"
8270 (string-append (getcwd) ":"
8271 (getenv "CLASSPATH")))
8272 ;; ... and build test helper classes here:
8273 (apply invoke
8274 `("javac" "-d" "."
8275 ,@(find-files "slf4j-api/src/test" ".*\\.java")))))
8276 (replace 'install
8277 (install-from-pom "slf4j-nop/pom.xml")))))
8278 (propagated-inputs (list java-slf4j-api))
8279 (native-inputs (list java-junit java-hamcrest-core))
8280 (home-page "https://www.slf4j.org/")
8281 (synopsis "SLF4J binding that silently discards all logging messages")
8282 (description "Binding/provider for NOP, an implementation that silently
8283discards all logging messages.")
8284 (license license:expat)))
8285
8286(define-public antlr2
8287 (package
8288 (name "antlr2")
8289 (version "2.7.7")
8290 (source (origin
8291 (method url-fetch)
8292 (uri (string-append "https://www.antlr2.org/download/antlr-"
8293 version ".tar.gz"))
8294 (sha256
8295 (base32
8296 "1ffvcwdw73id0dk6pj2mlxjvbg0662qacx4ylayqcxgg381fnfl5"))
8297 (modules '((guix build utils)))
8298 (snippet
8299 '(begin
8300 (delete-file "antlr.jar")
8301 (substitute* "lib/cpp/antlr/CharScanner.hpp"
8302 (("#include <map>")
8303 (string-append
8304 "#include <map>\n"
8305 "#define EOF (-1)\n"
8306 "#include <strings.h>")))
8307 (substitute* "configure"
8308 (("/bin/sh") "sh"))
8309 #t))))
8310 (build-system gnu-build-system)
8311 (arguments
8312 `(#:tests? #f ; no test target
8313 #:imported-modules ((guix build ant-build-system)
8314 ,@%default-gnu-imported-modules)
8315 #:modules (((guix build ant-build-system) #:prefix ant:)
8316 (guix build gnu-build-system)
8317 (guix build utils))
8318 #:phases
8319 (modify-phases %standard-phases
8320 (add-after 'install 'strip-jar-timestamps
8321 (assoc-ref ant:%standard-phases 'strip-jar-timestamps))
8322 (add-before 'configure 'fix-timestamp
8323 (lambda _
8324 (substitute* "configure"
8325 (("^TIMESTAMP.*") "TIMESTAMP=19700101\n"))
8326 #t))
8327 (add-after 'configure 'fix-bin-ls
8328 (lambda _
8329 (substitute* (find-files "." "Makefile")
8330 (("/bin/ls") "ls"))
8331 #t)))))
8332 (native-inputs
8333 `(("which" ,which)
8334 ("zip" ,zip)
8335 ("java" ,icedtea "jdk")))
8336 (inputs
8337 `(("java" ,icedtea)))
8338 (home-page "https://www.antlr2.org")
8339 (synopsis "Framework for constructing recognizers, compilers, and translators")
8340 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8341is a language tool that provides a framework for constructing recognizers,
8342compilers, and translators from grammatical descriptions containing Java, C#,
8343C++, or Python actions. ANTLR provides excellent support for tree construction,
8344tree walking, and translation.")
8345 (license license:public-domain)))
8346
8347(define-public java-stringtemplate-3
8348 (package
8349 (name "java-stringtemplate")
8350 (version "3.2.1")
8351 (source (origin
8352 (method url-fetch)
8353 (uri (string-append "https://github.com/antlr/website-st4/raw/"
8354 "gh-pages/download/stringtemplate-"
8355 version ".tar.gz"))
8356 (sha256
8357 (base32
8358 "086yj68np1vqhkj7483diz3km6s6y4gmwqswa7524a0ca6vxn2is"))))
8359 (build-system ant-build-system)
8360 (arguments
8361 `(#:jar-name (string-append ,name "-" ,version ".jar")
8362 #:test-dir "test"
8363 #:modules ((guix build ant-build-system)
8364 (guix build utils)
8365 (srfi srfi-1))
8366 #:phases
8367 (modify-phases %standard-phases
8368 (add-before 'check 'fix-tests
8369 (lambda _
8370 (substitute* "build.xml"
8371 (("\\$\\{test.home\\}/java")
8372 "${test.home}/org"))
8373 #t))
8374 (add-before 'build 'generate-grammar
8375 (lambda _
8376 (with-directory-excursion "src/org/antlr/stringtemplate/language/"
8377 (for-each (lambda (file)
8378 (format #t "~a\n" file)
8379 (invoke "antlr" file))
8380 '("template.g" "angle.bracket.template.g" "action.g"
8381 "eval.g" "group.g" "interface.g")))
8382 #t)))))
8383 (native-inputs
8384 `(("antlr" ,antlr2)
8385 ("java-junit" ,java-junit)))
8386 (home-page "https://www.stringtemplate.org")
8387 (synopsis "Template engine to generate formatted text output")
8388 (description "StringTemplate is a java template engine (with ports for C#,
8389Objective-C, JavaScript, Scala) for generating source code, web pages, emails,
8390or any other formatted text output. StringTemplate is particularly good at
8391code generators, multiple site skins, and internationalization / localization.
8392StringTemplate also powers ANTLR.")
8393 (license license:bsd-3)))
8394
8395;; antlr3 is partially written using antlr3 grammar files. It also depends on
8396;; ST4 (stringtemplate4), which is also partially written using antlr3 grammar
8397;; files and uses antlr3 at runtime. The latest version requires a recent version
8398;; of antlr3 at runtime.
8399;; Fortunately, ST4 4.0.6 can be built with an older antlr3, and we use antlr3.3.
8400;; This version of ST4 is sufficient for the latest antlr3.
8401;; We use ST4 4.0.6 to build a boostrap antlr3 (latest version), and build
8402;; the latest ST4 with it. Then we build our final antlr3 that will be linked
8403;; against the latest ST4.
8404;; antlr3.3 still depends on antlr3 to generate some files, so we use an
8405;; even older version, antlr3.1, to generate them. Fortunately antlr3.1 uses
8406;; only grammar files with the antlr2 syntax.
8407;; So we build antlr3.1 -> antlr3.3 -> ST4.0.6 -> antlr3-bootstrap -> ST4 -> antlr3.
8408
8409(define-public java-stringtemplate
8410 (package (inherit java-stringtemplate-3)
8411 (name "java-stringtemplate")
8412 (version "4.0.8")
8413 (source (origin
8414 (method url-fetch)
8415 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/"
8416 version ".tar.gz"))
8417 (file-name (string-append name "-" version ".tar.gz"))
8418 (sha256
8419 (base32
8420 "1pri8hqa95rfdkjy55icl5q1m09zwp5k67ib14abas39s4v3w087"))))
8421 (build-system ant-build-system)
8422 (arguments
8423 `(#:jar-name (string-append ,name "-" ,version ".jar")
8424 #:tests? #f ; FIXME: tests fail for unknown reasons
8425 #:test-dir "test"
8426 #:modules ((guix build ant-build-system)
8427 (guix build utils)
8428 (srfi srfi-1))
8429 #:phases
8430 (modify-phases %standard-phases
8431 (add-before 'check 'fix-test-target
8432 (lambda _
8433 (substitute* "build.xml"
8434 (("\\$\\{test.home\\}/java") "${test.home}/")
8435 (("\\*Test.java") "Test*.java"))
8436 #t))
8437 (add-before 'build 'generate-grammar
8438 (lambda _
8439 (with-directory-excursion "src/org/stringtemplate/v4/compiler/"
8440 (for-each (lambda (file)
8441 (format #t "~a\n" file)
8442 (invoke "antlr3" file))
8443 '("STParser.g" "Group.g" "CodeGenerator.g")))
8444 #t)))))
8445 (inputs
8446 `(("antlr3" ,antlr3-bootstrap)
8447 ("antlr2" ,antlr2)
8448 ("java-stringtemplate" ,java-stringtemplate-3)
8449 ("java-junit" ,java-junit)))))
8450
8451(define java-stringtemplate-4.0.6
8452 (package (inherit java-stringtemplate)
8453 (name "java-stringtemplate")
8454 (version "4.0.6")
8455 (source (origin
8456 (method url-fetch)
8457 (uri (string-append "https://github.com/antlr/stringtemplate4/archive/ST-"
8458 version ".tar.gz"))
8459 (file-name (string-append name "-" version ".tar.gz"))
8460 (sha256
8461 (base32
8462 "0hjmh1ahdsh3w825i67mli9l4nncc4l6hdbf9ma91jvlj590sljp"))))
8463 (inputs
8464 `(("antlr3" ,antlr3-3.3)
8465 ("antlr2" ,antlr2)
8466 ("java-stringtemplate" ,java-stringtemplate-3)))))
8467
8468(define-public antlr3
8469 (package
8470 (name "antlr3")
8471 (version "3.5.2")
8472 (source (origin
8473 (method git-fetch)
8474 (uri (git-reference
8475 (url "https://github.com/antlr/antlr3")
8476 (commit version)))
8477 (file-name (git-file-name name version))
8478 (sha256
8479 (base32
8480 "0cafavrjmzqhklghrk8c2jqxkdwxgzskm20pbrfd3r41cn00dpnf"))))
8481 (build-system ant-build-system)
8482 (arguments
8483 `(#:jar-name (string-append ,name "-" ,version ".jar")
8484 #:source-dir "tool/src/main/java:runtime/Java/src/main/java:tool/src/main/antlr3"
8485 #:tests? #f
8486 #:phases
8487 (modify-phases %standard-phases
8488 (add-after 'install 'bin-install
8489 (lambda* (#:key inputs outputs #:allow-other-keys)
8490 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8491 (bin (string-append (assoc-ref outputs "out") "/bin")))
8492 (mkdir-p bin)
8493 (with-output-to-file (string-append bin "/antlr3")
8494 (lambda _
8495 (display
8496 (string-append "#!" (which "sh") "\n"
8497 "java -cp " jar "/" ,name "-" ,version ".jar:"
8498 (string-concatenate
8499 (find-files (assoc-ref inputs "stringtemplate")
8500 ".*\\.jar"))
8501 ":"
8502 (string-concatenate
8503 (find-files (assoc-ref inputs "stringtemplate4")
8504 ".*\\.jar"))
8505 ":"
8506 (string-concatenate
8507 (find-files (string-append
8508 (assoc-ref inputs "antlr")
8509 "/lib")
8510 ".*\\.jar"))
8511 " org.antlr.Tool $*"))))
8512 (chmod (string-append bin "/antlr3") #o755))
8513 #t))
8514 (add-before 'build 'generate-grammar
8515 (lambda _
8516 (chdir "tool/src/main/antlr3/org/antlr/grammar/v3/")
8517 (for-each (lambda (file)
8518 (display file)
8519 (newline)
8520 (invoke "antlr3" file))
8521 '("ANTLR.g" "ANTLRTreePrinter.g" "ActionAnalysis.g"
8522 "AssignTokenTypesWalker.g"
8523 "ActionTranslator.g" "TreeToNFAConverter.g"
8524 "ANTLRv3.g" "ANTLRv3Tree.g" "LeftRecursiveRuleWalker.g"
8525 "CodeGenTreeWalker.g" "DefineGrammarItemsWalker.g"))
8526 (substitute* "ANTLRParser.java"
8527 (("public Object getTree") "public GrammarAST getTree"))
8528 (substitute* "ANTLRv3Parser.java"
8529 (("public Object getTree") "public CommonTree getTree"))
8530 (chdir "../../../../../java")
8531 (substitute* "org/antlr/tool/LeftRecursiveRuleAnalyzer.java"
8532 (("import org.antlr.grammar.v3.\\*;") "import org.antlr.grammar.v3.*;
8533import org.antlr.grammar.v3.ANTLRTreePrinter;"))
8534 (substitute* "org/antlr/tool/ErrorManager.java"
8535 (("case NO_SUCH_ATTRIBUTE_PASS_THROUGH:") ""))
8536 (chdir "../../../..")
8537 #t))
8538 (add-before 'build 'fix-build-xml
8539 (lambda _
8540 (substitute* "build.xml"
8541 (("target name=\"compile\">")
8542 "target name=\"compile\">
8543<copy todir=\"${classes.dir}\">
8544<fileset dir=\"tool/src/main/resources\">
8545<include name=\"**/*.stg\"/>
8546<include name=\"**/*.st\"/>
8547<include name=\"**/*.sti\"/>
8548<include name=\"**/STLexer.tokens\"/>
8549</fileset>
8550</copy>"))
8551 #t)))))
8552 (native-inputs
8553 `(("antlr" ,antlr2)
8554 ("antlr3" ,antlr3-bootstrap)))
8555 (inputs
8556 `(("junit" ,java-junit)
8557 ("stringtemplate" ,java-stringtemplate-3)
8558 ("stringtemplate4" ,java-stringtemplate)))
8559 (propagated-inputs
8560 `(("stringtemplate" ,java-stringtemplate-3)
8561 ("antlr" ,antlr2)
8562 ("stringtemplate4" ,java-stringtemplate-4.0.6)))
8563 (home-page "https://www.antlr3.org")
8564 (synopsis "Framework for constructing recognizers, compilers, and translators")
8565 (description "ANTLR, ANother Tool for Language Recognition, (formerly PCCTS)
8566is a language tool that provides a framework for constructing recognizers,
8567compilers, and translators from grammatical descriptions containing Java, C#,
8568C++, or Python actions. ANTLR provides excellent support for tree construction,
8569tree walking, and translation.")
8570 (license license:bsd-3)))
8571
8572(define antlr3-bootstrap
8573 (package
8574 (inherit antlr3)
8575 (name "antlr3-bootstrap")
8576 (native-inputs
8577 `(("antlr" ,antlr2)
8578 ("antlr3" ,antlr3-3.3)))
8579 (inputs
8580 `(("junit" ,java-junit)))))
8581
8582(define-public antlr3-3.3
8583 (package
8584 (inherit antlr3)
8585 (name "antlr3")
8586 (version "3.3")
8587 (source (origin
8588 (method url-fetch)
8589 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8590 "gh-pages/download/antlr-"
8591 version ".tar.gz"))
8592 (sha256
8593 (base32
8594 "0qgg5vgsm4l1d6dj9pfbaa25dpv2ry2gny8ajy4vvgvfklw97b3m"))
8595 (patches
8596 (search-patches "antlr3-3_3-fix-java8-compilation.patch"))))
8597 (arguments
8598 `(#:jar-name (string-append ,name "-" ,version ".jar")
8599 #:source-dir (string-join '("tool/src/main/java"
8600 "runtime/Java/src/main/java"
8601 "tool/src/main/antlr2"
8602 "tool/src/main/antlr3")
8603 ":")
8604 #:tests? #f ; FIXME: tests seem to require maven plugin
8605 #:modules ((guix build ant-build-system)
8606 (guix build utils)
8607 (srfi srfi-1))
8608 #:phases
8609 (modify-phases %standard-phases
8610 (add-after 'install 'bin-install
8611 (lambda* (#:key inputs outputs #:allow-other-keys)
8612 (let* ((out (assoc-ref outputs "out"))
8613 (jar (string-append out "/share/java"))
8614 (bin (string-append out "/bin")))
8615 (mkdir-p bin)
8616 (with-output-to-file (string-append bin "/antlr3")
8617 (lambda _
8618 (display
8619 (string-append
8620 "#!" (which "sh") "\n"
8621 "java -cp " jar "/antlr3-3.3.jar:"
8622 (string-join
8623 (append (find-files (assoc-ref inputs "java-stringtemplate")
8624 ".*\\.jar$")
8625 (find-files (string-append (assoc-ref inputs "antlr")
8626 "/lib")
8627 ".*\\.jar$"))
8628 ":")
8629 " org.antlr.Tool $*"))))
8630 (chmod (string-append bin "/antlr3") #o755)
8631 #t)))
8632 (add-before 'build 'generate-grammar
8633 (lambda _
8634 (substitute* "tool/src/main/java/org/antlr/tool/Grammar.java"
8635 (("import org.antlr.grammar.v2.\\*;")
8636 "import org.antlr.grammar.v2.*;\n
8637import org.antlr.grammar.v2.TreeToNFAConverter;\n
8638import org.antlr.grammar.v2.DefineGrammarItemsWalker;\n
8639import org.antlr.grammar.v2.ANTLRTreePrinter;"))
8640 (with-directory-excursion "tool/src/main/antlr2/org/antlr/grammar/v2/"
8641 (for-each (lambda (file)
8642 (format #t "~a\n" file)
8643 (invoke "antlr" file))
8644 '("antlr.g" "antlr.print.g" "assign.types.g"
8645 "buildnfa.g" "codegen.g" "define.g")))
8646 (with-directory-excursion "tool/src/main/antlr3/org/antlr/grammar/v3/"
8647 (for-each (lambda (file)
8648 (format #t "~a\n" file)
8649 (invoke "antlr3" file))
8650 '("ActionAnalysis.g" "ActionTranslator.g" "ANTLRv3.g"
8651 "ANTLRv3Tree.g")))
8652 #t))
8653 (add-before 'build 'fix-build-xml
8654 (lambda _
8655 (substitute* "build.xml"
8656 (("target name=\"compile\">")
8657 "target name=\"compile\">
8658<copy todir=\"${classes.dir}\">
8659<fileset dir=\"tool/src/main/resources\">
8660<include name=\"**/*.stg\"/>
8661<include name=\"**/*.st\"/>
8662<include name=\"**/*.sti\"/>
8663<include name=\"**/STLexer.tokens\"/>
8664</fileset>
8665</copy>"))
8666 #t)))))
8667 (native-inputs
8668 `(("antlr" ,antlr2)
8669 ("antlr3" ,antlr3-3.1)))
8670 (inputs
8671 `(("junit" ,java-junit)))
8672 (propagated-inputs
8673 `(("java-stringtemplate" ,java-stringtemplate-3)
8674 ("antlr" ,antlr2)))))
8675
8676(define-public antlr3-3.1
8677 (package
8678 (inherit antlr3)
8679 (version "3.1")
8680 (source (origin
8681 (method url-fetch)
8682 (uri (string-append "https://github.com/antlr/website-antlr3/raw/"
8683 "gh-pages/download/antlr-"
8684 version ".tar.gz"))
8685 (sha256
8686 (base32
8687 "0sfimc9cpbgrihz4giyygc8afgpma2c93yqpwb951giriri6x66z"))
8688 (patches
8689 (search-patches "antlr3-3_1-fix-java8-compilation.patch"))))
8690 (arguments
8691 `(#:jar-name (string-append "antlr3-" ,version ".jar")
8692 #:source-dir "src:runtime/Java/src"
8693 #:tests? #f
8694 #:phases
8695 (modify-phases %standard-phases
8696 (add-after 'install 'bin-install
8697 (lambda* (#:key inputs outputs #:allow-other-keys)
8698 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8699 (bin (string-append (assoc-ref outputs "out") "/bin")))
8700 (mkdir-p bin)
8701 (with-output-to-file (string-append bin "/antlr3")
8702 (lambda _
8703 (display
8704 (string-append "#!" (which "sh") "\n"
8705 "java -cp " jar "/antlr3-3.1.jar:"
8706 (string-concatenate
8707 (find-files (assoc-ref inputs "stringtemplate")
8708 ".*\\.jar"))
8709 ":"
8710 (string-concatenate
8711 (find-files (string-append
8712 (assoc-ref inputs "antlr")
8713 "/lib")
8714 ".*\\.jar"))
8715 " org.antlr.Tool $*"))))
8716 (chmod (string-append bin "/antlr3") #o755))
8717 #t))
8718 (add-before 'build 'generate-grammar
8719 (lambda _
8720 (let ((dir "src/org/antlr/tool/"))
8721 (for-each (lambda (file)
8722 (display file)
8723 (newline)
8724 (invoke "antlr" "-o" dir (string-append dir file)))
8725 '("antlr.g" "antlr.print.g" "assign.types.g"
8726 "buildnfa.g" "define.g")))
8727 (format #t "codegen.g\n")
8728 (invoke "antlr" "-o" "src/org/antlr/codegen"
8729 "src/org/antlr/codegen/codegen.g")
8730 #t))
8731 (add-before 'build 'fix-build-xml
8732 (lambda _
8733 (substitute* "build.xml"
8734 (("target name=\"compile\">")
8735 "target name=\"compile\">
8736<copy todir=\"${classes.dir}\">
8737<fileset dir=\"src\">
8738<include name=\"**/*.stg\"/>
8739<include name=\"**/*.st\"/>
8740<include name=\"**/*.sti\"/>
8741<include name=\"**/STLexer.tokens\"/>
8742</fileset>
8743</copy>"))
8744 #t)))))
8745 (native-inputs
8746 `(("antlr" ,antlr2)))
8747 (inputs
8748 `(("junit" ,java-junit)))
8749 (propagated-inputs
8750 `(("stringtemplate" ,java-stringtemplate-3)))))
8751
8752(define-public java-treelayout
8753 (package
8754 (name "java-treelayout")
8755 (version "1.0.3")
8756 (source (origin
8757 (method git-fetch)
8758 (uri (git-reference
8759 (url "https://github.com/abego/treelayout")
8760 (commit (string-append "v" version))))
8761 (file-name (git-file-name name version))
8762 (sha256
8763 (base32
8764 "18my8ql9b1y0n0zrvkih7xfhf3dpgfhyfifvkcfhmwcvw3divxak"))))
8765 (build-system ant-build-system)
8766 (arguments
8767 `(#:jar-name (string-append ,name "-" ,version ".jar")
8768 #:source-dir "org.abego.treelayout/src/main/java"
8769 #:test-dir "org.abego.treelayout/src/test"))
8770 (inputs
8771 (list java-junit))
8772 (native-inputs
8773 (list java-hamcrest-core))
8774 (home-page "https://treelayout.sourceforge.net")
8775 (synopsis "Tree Layout Algorithm in Java")
8776 (description "TreeLayout creates tree layouts for arbitrary trees. It is
8777not restricted to a specific output or format, but can be used for any kind of
8778two dimensional diagram. Examples are Swing based components, SVG files, etc.
8779This is possible because TreeLayout separates the layout of a tree from the
8780actual rendering.")
8781 (license license:bsd-3)))
8782
8783(define-public java-antlr4-runtime
8784 (package
8785 (name "java-antlr4-runtime")
8786 (version "4.10.1")
8787 (source (origin
8788 (method git-fetch)
8789 (uri (git-reference
8790 (url "https://github.com/antlr/antlr4")
8791 (commit version)))
8792 (file-name (git-file-name name version))
8793 (sha256
8794 (base32
8795 "0ldvd9jm4nrivaw7i7wh1q40q6xgzmzirsywiakbhg8sppagqlv7"))
8796 (patches
8797 (search-patches "java-antlr4-Add-standalone-generator.patch"))))
8798 (build-system ant-build-system)
8799 (arguments
8800 `(#:jar-name "java-antlr4-runtime.jar"
8801 #:source-dir "runtime/Java/src/org"
8802 #:tests? #f; tests depend on java-antlr4 itself
8803 #:phases
8804 (modify-phases %standard-phases
8805 (add-before 'build 'copy-resources
8806 (lambda _
8807 (copy-recursively "runtime/Java/src/main/dot"
8808 "build/classes")
8809 #t)))))
8810 (home-page "https://www.antlr.org")
8811 (synopsis "ANTLR runtime library")
8812 (description "This package contains the runtime library used with generated
8813sources by ANTLR.")
8814 (license license:bsd-3)))
8815
8816(define-public java-antlr4-runtime-cpp
8817 (package
8818 (inherit java-antlr4-runtime)
8819 (name "java-antlr4-runtime-cpp")
8820 (outputs '("out" "static"))
8821 (build-system cmake-build-system)
8822 (arguments
8823 (list
8824 ;; TODO: try to run the tests under
8825 ;; runtime-testsuite/test/org/antlr/v4/test/runtime/cpp with antlr4.
8826 #:tests? #f ;no CMake test target
8827 ;; TODO: Building the tests wants to download googletest.
8828 #:configure-flags #~'("-DANTLR_BUILD_CPP_TESTS=OFF")
8829 #:phases
8830 #~(modify-phases %standard-phases
8831 (add-after 'unpack 'chdir
8832 (lambda _
8833 (chdir "runtime/Cpp")))
8834 (add-after 'install 'move-static-library
8835 (lambda* (#:key outputs #:allow-other-keys)
8836 (let ((static (assoc-ref outputs "static"))
8837 (libantlr4-runtime.a (search-input-file
8838 outputs "lib/libantlr4-runtime.a")))
8839 (mkdir-p (string-append static "/lib"))
8840 (rename-file
8841 libantlr4-runtime.a
8842 (string-append static "/lib/"
8843 (basename libantlr4-runtime.a)))))))))
8844 (native-inputs (list pkg-config))
8845 (inputs (list `(,util-linux "lib"))) ;libuuid
8846 (synopsis "ANTL C++ runtime library")
8847 (description "This package contains the C++ runtime library used with C++
8848generated sources by ANTLR.")))
8849
8850(define-public java-antlr4-runtime-python
8851 (package
8852 (inherit java-antlr4-runtime)
8853 (name "java-antlr4-runtime-python")
8854 (outputs '("out"))
8855 (build-system python-build-system)
8856 (arguments
8857 (list
8858 #:tests? #f ; tests require antlr
8859 #:phases
8860 #~(modify-phases %standard-phases
8861 (add-after 'unpack 'chdir
8862 (lambda _
8863 (chdir "runtime/Python3"))))))
8864 (native-inputs (list pkg-config))
8865 (inputs (list `(,util-linux "lib"))) ; libuuid
8866 (synopsis "ANTLR Python runtime library")
8867 (description "This package contains the Python runtime library used with
8868Python generated sources by ANTLR.")))
8869
8870(define-public antlr4
8871 (package
8872 (inherit java-antlr4-runtime)
8873 (name "antlr4")
8874 (arguments
8875 `(#:jar-name "antlr4.jar"
8876 #:source-dir "tool/src"
8877 #:test-dir "tool-testsuite/test:runtime-testsuite/test"
8878 #:test-include (list "**/Test*.java")
8879 #:test-exclude (list
8880 ;; These have no runnable methods and fail because
8881 ;; test-include above is too broad.
8882 "**/TestContext.java"
8883 "**/TestOutputReading.java"
8884 ;; no @Test methods
8885 "**/TestParserErrors.java"
8886 "**/TestSemPredEvalParser.java"
8887 "**/TestSets.java"
8888 "**/TestListeners.java"
8889 "**/TestParseTrees.java"
8890 "**/TestParserExec.java"
8891 "**/TestLexerErrors.java"
8892 "**/TestPerformance.java"
8893 "**/TestCompositeParsers.java"
8894 "**/TestLexerExec.java"
8895 "**/TestSemPredEvalLexer.java"
8896 "**/TestLeftRecursion.java"
8897 "**/TestFullContextParsing.java"
8898 "**/TestCompositeLexers.java"
8899 ;; Null pointer exception
8900 "**/TestCompositeGrammars.java")
8901 #:phases
8902 (modify-phases %standard-phases
8903 (add-before 'build 'fix-build.xml
8904 (lambda _
8905 ;; tests are not in a java subdirectory
8906 (substitute* "build.xml"
8907 (("\\$\\{test.home\\}/java") "${test.home}"))
8908 #t))
8909 ;; tests require to have a working antlr4 binary
8910 (delete 'check)
8911 (add-after 'install 'check
8912 (lambda _
8913 (invoke "ant" "compile-tests")
8914 (invoke "ant" "check" "-Dtest.home=runtime-testsuite/test")
8915 (invoke "ant" "check" "-Dtest.home=tool-testsuite/test")
8916 #t))
8917 (add-before 'check 'remove-unrelated-languages
8918 (lambda _
8919 ;; There are tests for other languages that ANTLR can generate, but
8920 ;; we don't have the infrastructure for that yet. Let's test Java
8921 ;; generation only.
8922 (for-each
8923 (lambda (language)
8924 (delete-file-recursively
8925 (string-append "runtime-testsuite/test/org/antlr/v4/test/runtime/"
8926 language)))
8927 '("cpp" "csharp" "go" "javascript" "php" "python" "python2"
8928 "python3" "swift"))
8929 #t))
8930 (add-before 'check 'generate-test-parsers
8931 (lambda* (#:key outputs #:allow-other-keys)
8932 (define (run-antlr dir filename package)
8933 (invoke "antlr4" "-lib" dir "-visitor" "-no-listener"
8934 "-package" package (string-append dir "/" filename)
8935 "-Xlog"))
8936 (setenv "PATH" (string-append (getenv "PATH") ":"
8937 (assoc-ref outputs "out") "/bin"))
8938 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8939 "Java.g4" "org.antlr.v4.test.runtime.java.api")
8940 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8941 "VisitorBasic.g4" "org.antlr.v4.test.runtime.java.api")
8942 (run-antlr "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api"
8943 "VisitorCalc.g4" "org.antlr.v4.test.runtime.java.api")
8944 #t))
8945 (add-before 'check 'remove-graphemes
8946 (lambda _
8947 ;; When running antlr on grahemes.g4, we get a runtime exception:
8948 ;; set is empty. So delete the file that depends on it.
8949 (delete-file
8950 "runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java")
8951 #t))
8952 (add-after 'install 'bin-install
8953 (lambda* (#:key inputs outputs #:allow-other-keys)
8954 (let ((jar (string-append (assoc-ref outputs "out") "/share/java"))
8955 (bin (string-append (assoc-ref outputs "out") "/bin")))
8956 (mkdir-p bin)
8957 (with-output-to-file (string-append bin "/antlr4")
8958 (lambda _
8959 (display
8960 (string-append "#!" (which "sh") "\n"
8961 "java -cp " jar "/antlr4.jar:"
8962 (string-join
8963 (apply
8964 append
8965 (map
8966 (lambda (input)
8967 (find-files (assoc-ref inputs input)
8968 ".*\\.jar"))
8969 '("antlr3" "java-stringtemplate"
8970 "java-antlr4-runtime" "java-treelayout"
8971 "java-jsonp-api" "java-icu4j")))
8972 ":")
8973 " org.antlr.v4.Tool $*"))))
8974 (chmod (string-append bin "/antlr4") #o755)
8975 #t)))
8976 (add-before 'build 'copy-resources
8977 (lambda _
8978 (copy-recursively "tool/resources/" "build/classes")
8979 #t))
8980 (add-before 'build 'generate-unicode
8981 (lambda _
8982 ;; First: build the generator
8983 (invoke "javac" "-cp" (getenv "CLASSPATH")
8984 "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java"
8985 "tool/src/org/antlr/v4/unicode/UnicodeDataTemplateController.java")
8986 ;; Then use it
8987 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
8988 ":tool/src:runtime/Java")
8989 "org.antlr.v4.unicode.UnicodeRenderer"
8990 "tool/resources/org/antlr/v4/tool/templates"
8991 "unicodedata"
8992 "tool/src/org/antlr/v4/unicode/UnicodeData.java")
8993 ;; It seems there is a bug with our ST4
8994 (substitute* "tool/src/org/antlr/v4/unicode/UnicodeData.java"
8995 (("\\\\>") ">"))
8996 ;; Remove the additional file
8997 (delete-file "tool/src/org/antlr/v4/unicode/UnicodeRenderer.java")
8998 #t))
8999 (add-before 'build 'generate-grammar
9000 (lambda* (#:key inputs #:allow-other-keys)
9001 (with-directory-excursion "tool/src/org/antlr/v4/parse"
9002 (for-each (lambda (file)
9003 (display file)
9004 (newline)
9005 (invoke "antlr3" file))
9006 '("ANTLRLexer.g" "ANTLRParser.g" "BlockSetTransformer.g"
9007 "GrammarTreeVisitor.g" "ATNBuilder.g"
9008 "ActionSplitter.g" "LeftRecursiveRuleWalker.g")))
9009 (with-directory-excursion "tool/src/org/antlr/v4/codegen"
9010 (install-file "../parse/ANTLRParser.tokens" ".")
9011 (display "SourceGenTriggers.g\n")
9012 (invoke "antlr3" "SourceGenTriggers.g"))
9013 #t)))))
9014 (inputs
9015 (list antlr3
9016 java-antlr4-runtime
9017 java-icu4j
9018 java-jsonp-api
9019 java-stringtemplate
9020 java-treelayout))
9021 (native-inputs
9022 (list java-junit))
9023 (synopsis "Parser and lexer generator in Java")
9024 (description "ANTLR (ANother Tool for Language Recognition) is a powerful
9025parser generator for reading, processing, executing, or translating structured
9026text or binary files. It's widely used to build languages, tools, and
9027frameworks. From a grammar, ANTLR generates a parser that can build and walk
9028parse trees.")))
9029
9030(define-public java-antlr4-runtime-4.1
9031 (package
9032 (inherit java-antlr4-runtime)
9033 (version "4.1")
9034 (source (origin
9035 (method git-fetch)
9036 (uri (git-reference
9037 (url "https://github.com/antlr/antlr4")
9038 (commit version)))
9039 (file-name (git-file-name "antlr4" version))
9040 (sha256
9041 (base32
9042 "1i8hmx5an58cjyvhji0xgpvd6lq00z1k1mjys025q2wqc25wv4c1"))))
9043 (arguments
9044 (substitute-keyword-arguments (package-arguments java-antlr4-runtime)
9045 ((#:phases phases)
9046 `(modify-phases ,phases
9047 (add-before 'configure 'chmod
9048 (lambda _
9049 (chmod "build.xml" #o644)
9050 #t))))))
9051 (inputs
9052 (list java-treelayout))))
9053
9054(define-public antlr4-4.1
9055 (package
9056 (inherit antlr4)
9057 (version (package-version java-antlr4-runtime-4.1))
9058 (source (package-source java-antlr4-runtime-4.1))
9059 (arguments
9060 (substitute-keyword-arguments (package-arguments antlr4)
9061 ((#:test-dir _)
9062 "tool/test")
9063 ((#:test-exclude excludes)
9064 `(list "**/TestParseErrors.java"
9065 "**/TestTopologicalSort.java"
9066 ,@excludes))
9067 ((#:phases phases)
9068 `(modify-phases ,phases
9069 (delete 'generate-unicode)
9070 (replace 'check
9071 (lambda _
9072 (invoke "ant" "check")
9073 #t))
9074 (add-before 'configure 'chmod
9075 (lambda _
9076 (chmod "build.xml" #o644)
9077 #t))
9078 (delete 'remove-graphemes)
9079 (delete 'remove-unrelated-languages)
9080 (delete 'generate-test-parsers)))))
9081 (inputs
9082 (alist-replace
9083 "java-antlr4-runtime" (list java-antlr4-runtime-4.1)
9084 (package-inputs antlr4)))))
9085
9086(define-public java-tunnelvisionlabs-antlr4-runtime-annotations
9087 (package
9088 (inherit java-antlr4-runtime)
9089 (name "java-tunnelvisionlabs-antlr4-runtime-annotations")
9090 (version "4.7.4")
9091 (source (origin
9092 (method git-fetch)
9093 (uri (git-reference
9094 (url "https://github.com/tunnelvisionlabs/antlr4")
9095 (commit (string-append version "-opt"))))
9096 (file-name (git-file-name "java-tunnelvisionlabs-antlr4" version))
9097 (sha256
9098 (base32
9099 "1mf2lvvsszpialsk23ma83pwp50nd32lrbjpa847zlm5gmranbr8"))
9100 (patches
9101 (search-patches "java-antlr4-Add-standalone-generator.patch"
9102 "java-tunnelvisionlabs-antlr-code-too-large.patch"))))
9103 (arguments
9104 `(#:jar-name "java-antlr4-runtime-annotations.jar"
9105 #:source-dir "runtime/JavaAnnotations/src"
9106 #:tests? #f; no tests
9107 #:phases
9108 (modify-phases %standard-phases
9109 (add-after 'build 'copy-resources
9110 (lambda _
9111 (copy-recursively "runtime/JavaAnnotations/resources"
9112 "build/classes")
9113 #t))
9114 (add-after 'copy-resources 'rebuild-jar
9115 (lambda _
9116 (invoke "ant" "jar")
9117 #t)))))
9118 (inputs '())
9119 (native-inputs '())
9120 (synopsis "Annotations for ANTLR's runtime library")
9121 (description "This package contains annotations used during the build of
9122the runtime library of ANTLR.")))
9123
9124;; the runtime of this library requires a lexer that is generated by antlr4.
9125;; However, antlr4 itself requires this library at build and run-time. We
9126;; use [email protected], the closest version of antlr that doesn't need this
9127;; bootstrap process, to generate the lexer. The generated lexer is built
9128;; for the 4.1 runtime, which is slightly different from this runtime.
9129;; So, we build the runtime with antlr 4.1, with a broken xml lexer, that we
9130;; use to build antlr4. We then re-use this antlr4 to build the runtime, and
9131;; the proper, working, runtime to build antlr4 again.
9132(define java-tunnelvisionlabs-antlr4-runtime-bootstrap
9133 (package
9134 (inherit java-antlr4-runtime)
9135 (name "java-tunnelvisionlabs-antlr4-runtime")
9136 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9137 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9138 (arguments
9139 `(#:jar-name "java-antlr4-runtime.jar"
9140 #:source-dir "runtime/Java/src"
9141 #:tests? #f; tests require antlr4, but antlr4 depends on this package
9142 #:phases
9143 (modify-phases %standard-phases
9144 (add-before 'build 'generate-xpath-lexer
9145 (lambda _
9146 (invoke "antlr4" "-lib" "runtime/Java/src/org/antlr/v4/runtime/tree/xpath"
9147 "-visitor" "-no-listener"
9148 "-package" "org.antlr.v4.runtime.tree.xpath"
9149 "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.g4")
9150 ;; Generated code is for an incompatible version of the runtime
9151 (substitute* "runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPathLexer.java"
9152 (("LexerATNSimulator\\(this,_ATN,_decisionToDFA,_sharedContextCache\\)")
9153 "LexerATNSimulator(this,_ATN)"))
9154 #t))
9155 (add-before 'build 'copy-resources
9156 (lambda _
9157 (copy-recursively "runtime/Java/src/main/dot"
9158 "build/classes")
9159 #t)))))
9160 (native-inputs
9161 `(("antlr4" ,antlr4-4.1)
9162 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9163 ,java-tunnelvisionlabs-antlr4-runtime-annotations)))))
9164
9165(define java-tunnelvisionlabs-antlr4-bootstrap
9166 (package
9167 (inherit antlr4)
9168 (name "java-tunnelvisionlabs-antlr4")
9169 (version (package-version java-tunnelvisionlabs-antlr4-runtime-annotations))
9170 (source (package-source java-tunnelvisionlabs-antlr4-runtime-annotations))
9171 (arguments
9172 (substitute-keyword-arguments (package-arguments antlr4)
9173 ((#:test-dir _)
9174 "tool/test:runtime-testsuite/src")
9175 ((#:phases phases)
9176 `(modify-phases ,phases
9177 (delete 'remove-unrelated-languages)
9178 (delete 'remove-graphemes)
9179 (delete 'generate-test-parsers)
9180 (delete 'check)))))
9181 (native-inputs '())
9182 (inputs
9183 `(("antlr3" ,antlr3)
9184 ("java-antlr4-runtime" ,java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9185 ("java-tunnelvisionlabs-antlr4-runtime-annotations"
9186 ,java-tunnelvisionlabs-antlr4-runtime-annotations)
9187 ("java-icu4j" ,java-icu4j)
9188 ("java-jsonp-api" ,java-jsonp-api)
9189 ("java-stringtemplate" ,java-stringtemplate)
9190 ("java-treelayout" ,java-treelayout)))))
9191
9192(define-public java-tunnelvisionlabs-antlr4-runtime
9193 (package
9194 (inherit java-tunnelvisionlabs-antlr4-runtime-bootstrap)
9195 (native-inputs
9196 (alist-replace
9197 "antlr4" (list java-tunnelvisionlabs-antlr4-bootstrap)
9198 (package-native-inputs java-tunnelvisionlabs-antlr4-runtime-bootstrap)))))
9199
9200(define-public java-tunnelvisionlabs-antlr4
9201 (package
9202 (inherit java-tunnelvisionlabs-antlr4-bootstrap)
9203 (inputs
9204 (alist-replace
9205 "java-antlr4-runtime" (list java-tunnelvisionlabs-antlr4-runtime)
9206 (package-inputs java-tunnelvisionlabs-antlr4-bootstrap)))))
9207
9208(define-public java-commons-cli-1.2
9209 ;; This is a bootstrap dependency for Maven2.
9210 (package
9211 (inherit java-commons-cli)
9212 (version "1.2")
9213 (source (origin
9214 (method url-fetch)
9215 (uri (string-append "mirror://apache/commons/cli/source/"
9216 "commons-cli-" version "-src.tar.gz"))
9217 (sha256
9218 (base32
9219 "0rvfgzgv2pc1m091dfj3ih9ddsjjppr1f1wf0qmc3bk6b1kwv2dm"))))
9220 (arguments
9221 `(#:jar-name "commons-cli.jar"
9222 #:phases
9223 (modify-phases %standard-phases
9224 (add-before 'check 'fix-build-xml
9225 (lambda* (#:key inputs #:allow-other-keys)
9226 (substitute* "build.xml"
9227 (("dir=\"\\$\\{test.home\\}/java\"")
9228 "dir=\"${test.home}\""))
9229 #t)))))
9230 (native-inputs
9231 (list java-junit))))
9232
9233(define-public java-microemulator-cldc
9234 (package
9235 (name "java-microemulator-cldc")
9236 (version "2.0.4")
9237 (source (origin
9238 (method url-fetch)
9239 (uri (string-append "https://github.com/barteo/microemu/archive/"
9240 "microemulator_"
9241 (string-map (lambda (c) (if (char=? c #\.) #\_ c))
9242 version)
9243 ".tar.gz"))
9244 (file-name (string-append name "-" version ".tar.gz"))
9245 (sha256
9246 (base32
9247 "1x1apmz38gkppxnwnygwmi12j54v4p258v8ddzn6dldkk7vak1ll"))))
9248 (build-system ant-build-system)
9249 (arguments
9250 `(#:jar-name "microemulator-cldc.jar"
9251 #:source-dir "microemu-cldc/src/main/java"
9252 #:tests? #f)); Requires even older software
9253 (home-page "https://github.com/barteo/microemu")
9254 (synopsis "J2ME CLDC emulator")
9255 (description "Microemulator is a Java 2 Micro Edition (J2ME) CLDC/MIDP
9256Emulator. It demonstrates MIDlet based applications in web browser
9257applet and can be run as a standalone java application.")
9258 (license (list license:asl2.0
9259 ;; or altenatively:
9260 license:lgpl2.1+))))
9261
9262(define-public java-datanucleus-javax-persistence
9263 (package
9264 (name "java-datanucleus-javax-persistence")
9265 (version "2.2.0")
9266 (source (origin
9267 (method url-fetch)
9268 (uri (string-append "https://github.com/datanucleus/"
9269 "javax.persistence/archive/javax.persistence-"
9270 version "-release.tar.gz"))
9271 (sha256
9272 (base32
9273 "11jx0fjwgc2hhbqqgdd6m1pf2fplf9vslppygax0y1z5csnqjhpx"))))
9274 (build-system ant-build-system)
9275 (arguments
9276 `(#:jar-name "java-datanucleus-javax-persistence.jar"
9277 #:jdk ,icedtea-8
9278 #:source-dir "src/main/java"
9279 #:tests? #f)); no tests
9280 (home-page "https://github.com/datanucleus/javax.persistence")
9281 (synopsis "JPA API")
9282 (description "This package contains a clean definition of JPA API intended
9283for use with DataNucleus JPA since the JCP haven't provided an official JPA API
9284jar. See @url{http://java.net/projects/jpa-spec/downloads} for the specification
9285used to generate this API.")
9286 (license (list license:edl1.0 license:epl1.0))))
9287
9288(define-public java-osgi-cmpn
9289 (package
9290 (name "java-osgi-cmpn")
9291 (version "6.0.0")
9292 (source (origin
9293 (method url-fetch)
9294 (uri (string-append "https://repo1.maven.org/maven2/"
9295 "org/osgi/osgi.cmpn/" version "/osgi.cmpn-"
9296 version "-sources.jar"))
9297 (sha256
9298 (base32
9299 "1lmb6xyrmkqdhv1kayf0514rlwq6ypvs4m44ibrck3snp8241wys"))))
9300 (build-system ant-build-system)
9301 (arguments
9302 `(#:jar-name "osgi-cmpn.jar"
9303 #:tests? #f)); no tests
9304 (inputs
9305 `(("annotation" ,java-osgi-annotation)
9306 ("core" ,java-osgi-core)
9307 ("java-datanucleus-javax-persistence" ,java-datanucleus-javax-persistence)
9308 ("microemulator" ,java-microemulator-cldc)
9309 ("servlet" ,java-classpathx-servletapi)))
9310 (home-page "https://www.osgi.org")
9311 (synopsis "Compendium specification module of OSGi framework")
9312 (description
9313 "OSGi, for Open Services Gateway initiative framework, is a module system
9314and service platform for the Java programming language. This package contains
9315the compendium specification module, providing interfaces and classes for use
9316in compiling bundles.")
9317 (license license:asl2.0)))
9318
9319(define-public java-osgi-service-component-annotations
9320 (package
9321 (name "java-osgi-service-component-annotations")
9322 (version "1.3.0")
9323 (source (origin
9324 (method url-fetch)
9325 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9326 "org.osgi.service.component.annotations/"
9327 version "/org.osgi.service.component.annotations-"
9328 version "-sources.jar"))
9329 (sha256
9330 (base32
9331 "15rq9cmp4fpn74q44m4j35qsqmjf5lx3hcrk6pzvbhc08igic2f0"))))
9332 (build-system ant-build-system)
9333 (arguments
9334 `(#:jar-name "osgi-service-component-annotations.jar"
9335 #:tests? #f)); no tests
9336 (inputs
9337 `(("annotation" ,java-osgi-annotation)))
9338 (home-page "https://www.osgi.org")
9339 (synopsis "Support annotations for osgi-service-component")
9340 (description
9341 "OSGi, for Open Services Gateway initiative framework, is a module system
9342and service platform for the Java programming language. This package contains
9343the support annotations for osgi-service-component.")
9344 (license license:asl2.0)))
9345
9346(define-public java-osgi-dto
9347 (package
9348 (name "java-osgi-dto")
9349 (version "1.0.0")
9350 (source (origin
9351 (method url-fetch)
9352 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9353 "org.osgi.dto/" version "/org.osgi.dto-"
9354 version "-sources.jar"))
9355 (sha256
9356 (base32
9357 "0f4bqjzadn0hwk6sd3h5gvbyfp3yci1s6r0v770cc15p0pg627yr"))))
9358 (build-system ant-build-system)
9359 (arguments
9360 `(#:jar-name "osgi-dto.jar"
9361 #:tests? #f)); no tests
9362 (inputs
9363 `(("annotation" ,java-osgi-annotation)))
9364 (home-page "https://www.osgi.org")
9365 (synopsis "Data Transfer Objects")
9366 (description
9367 "OSGi, for Open Services Gateway initiative framework, is a module system
9368and service platform for the Java programming language. This package contains
9369the Data Transfer Objects. It is easily serializable having only public fields
9370of primitive types and their wrapper classes, Strings, and DTOs. List, Set,
9371Map and array aggregates may also be used. The aggregates must only hold
9372objects of the listed types or aggregates.")
9373 (license license:asl2.0)))
9374
9375(define-public java-osgi-resource
9376 (package
9377 (name "java-osgi-resource")
9378 (version "1.0.0")
9379 (source (origin
9380 (method url-fetch)
9381 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9382 "org.osgi.resource/"
9383 version "/org.osgi.resource-"
9384 version "-sources.jar"))
9385 (sha256
9386 (base32
9387 "0hi0fsc5v99q22bd7lrkvpz1y0ds4w9arjldpwsrcpqvz2js7q2d"))))
9388 (build-system ant-build-system)
9389 (arguments
9390 `(#:jar-name "osgi-resource.jar"
9391 #:tests? #f)); no tests
9392 (inputs
9393 `(("annotation" ,java-osgi-annotation)
9394 ("dto" ,java-osgi-dto)))
9395 (home-page "https://www.osgi.org")
9396 (synopsis "OSGI Resource")
9397 (description
9398 "OSGi, for Open Services Gateway initiative framework, is a module system
9399and service platform for the Java programming language. This package contains
9400the definition of common types in osgi packages.")
9401 (license license:asl2.0)))
9402
9403(define-public java-osgi-namespace-contract
9404 (package
9405 (name "java-osgi-namespace-contract")
9406 (version "1.0.0")
9407 (source (origin
9408 (method url-fetch)
9409 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9410 "org.osgi.namespace.contract/"
9411 version "/org.osgi.namespace.contract-"
9412 version "-sources.jar"))
9413 (sha256
9414 (base32
9415 "1iz4f2i0fvqrlq90ki9nfzcfpvy2av434ri25bglywqssx8mmp36"))))
9416 (build-system ant-build-system)
9417 (inputs
9418 `(("resource" ,java-osgi-resource)
9419 ("annotation" ,java-osgi-annotation)))
9420 (arguments
9421 `(#:jar-name "osgi-namespace-contract.jar"
9422 #:tests? #f)); no tests
9423 (home-page "https://www.osgi.org")
9424 (synopsis "Contract Capability and Requirement Namespace")
9425 (description
9426 "OSGi, for Open Services Gateway initiative framework, is a module system
9427and service platform for the Java programming language. This package contains
9428the names for the attributes and directives for a namespace with contracts.")
9429 (license license:asl2.0)))
9430
9431(define-public java-osgi-namespace-extender
9432 (package
9433 (name "java-osgi-namespace-extender")
9434 (version "1.0.1")
9435 (source (origin
9436 (method url-fetch)
9437 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9438 "org.osgi.namespace.extender/"
9439 version "/org.osgi.namespace.extender-"
9440 version "-sources.jar"))
9441 (sha256
9442 (base32
9443 "0jgqiak2i05qv6j3gd33xlaifzzc0ylxxk376v2x0apfg3vvixmz"))))
9444 (build-system ant-build-system)
9445 (inputs
9446 `(("resource" ,java-osgi-resource)
9447 ("annotation" ,java-osgi-annotation)))
9448 (arguments
9449 `(#:jar-name "osgi-namespace-extendent.jar"
9450 #:tests? #f)); no tests
9451 (home-page "https://www.osgi.org")
9452 (synopsis "Extender Capability and Requirement Namespace")
9453 (description
9454 "OSGi, for Open Services Gateway initiative framework, is a module system
9455and service platform for the Java programming language. This package contains
9456the names for the attributes and directives for an extender namespace.")
9457 (license license:asl2.0)))
9458
9459(define-public java-osgi-namespace-service
9460 (package
9461 (name "java-osgi-namespace-service")
9462 (version "1.0.0")
9463 (source (origin
9464 (method url-fetch)
9465 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9466 "org.osgi.namespace.service/"
9467 version "/org.osgi.namespace.service-"
9468 version "-sources.jar"))
9469 (sha256
9470 (base32
9471 "0qmw8n2449nkmm56d1znz9zhazb6ya3vsimd5bf5jg23zzhgl8c8"))))
9472 (build-system ant-build-system)
9473 (inputs
9474 `(("resource" ,java-osgi-resource)
9475 ("annotation" ,java-osgi-annotation)))
9476 (arguments
9477 `(#:jar-name "osgi-namespace-service.jar"
9478 #:tests? #f)); no tests
9479 (home-page "https://www.osgi.org")
9480 (synopsis "Service Capability and Requirement Namespace")
9481 (description
9482 "OSGi, for Open Services Gateway initiative framework, is a module system
9483and service platform for the Java programming language. This package contains
9484the names for the attributes and directives for a service namespace.")
9485 (license license:asl2.0)))
9486
9487(define-public java-osgi-util-function
9488 (package
9489 (name "java-osgi-util-function")
9490 (version "1.0.0")
9491 (source (origin
9492 (method url-fetch)
9493 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9494 "org.osgi.util.function/"
9495 version "/org.osgi.util.function-"
9496 version "-sources.jar"))
9497 (sha256
9498 (base32
9499 "04l7j3hwmmj28w23m7paca0afzncs42j2mdr3liqq8kvp548sc6x"))))
9500 (build-system ant-build-system)
9501 (arguments
9502 `(#:jar-name "osgi-util-function.jar"
9503 #:tests? #f)); no tests
9504 (inputs
9505 `(("annotation" ,java-osgi-annotation)))
9506 (home-page "https://www.osgi.org")
9507 (synopsis "OSGI Util Function")
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
9511an interface for a function that accepts a single argument and produces a result.")
9512 (license license:asl2.0)))
9513
9514(define-public java-osgi-util-promise
9515 (package
9516 (name "java-osgi-util-promise")
9517 (version "1.0.0")
9518 (source (origin
9519 (method url-fetch)
9520 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9521 "org.osgi.util.promise/"
9522 version "/org.osgi.util.promise-"
9523 version "-sources.jar"))
9524 (sha256
9525 (base32
9526 "0y34dwiflg1c4ahvkswpf9z02xph2sr9fm04ia5493x3lshpw22c"))))
9527 (build-system ant-build-system)
9528 (arguments
9529 `(#:jar-name "osgi-util-promise.jar"
9530 #:tests? #f)); no tests
9531 (inputs
9532 `(("annotation" ,java-osgi-annotation)
9533 ("function" ,java-osgi-util-function)))
9534 (home-page "https://www.osgi.org")
9535 (synopsis "Promise of a value")
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
9539an interface and utilitary classes for promises. A Promise represents a future
9540value. It handles the interactions for asynchronous processing.")
9541 (license license:asl2.0)))
9542
9543(define-public java-osgi-service-metatype-annotations
9544 (package
9545 (name "java-osgi-service-metatype-annotations")
9546 (version "1.3.0")
9547 (source (origin
9548 (method url-fetch)
9549 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9550 "org.osgi.service.metatype.annotations/"
9551 version "/org.osgi.service.metatype.annotations-"
9552 version "-sources.jar"))
9553 (sha256
9554 (base32
9555 "12rwm3349wk80vm88rcdgs4435m4jxkpkj5mrx326skkz2c6hyw6"))))
9556 (build-system ant-build-system)
9557 (arguments
9558 `(#:jar-name "osgi-service-metatype-annotations.jar"
9559 #:tests? #f)); no tests
9560 (inputs
9561 `(("annotation" ,java-osgi-annotation)))
9562 (home-page "https://www.osgi.org")
9563 (synopsis "Support annotations for metatype")
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 support annotations for metatype.")
9568 (license license:asl2.0)))
9569
9570(define-public java-osgi-service-repository
9571 (package
9572 (name "java-osgi-service-repository")
9573 (version "1.1.0")
9574 (source (origin
9575 (method url-fetch)
9576 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9577 "org.osgi.service.repository/"
9578 version "/org.osgi.service.repository-"
9579 version "-sources.jar"))
9580 (sha256
9581 (base32
9582 "1k41mhg7b58pd8nsghr2qwcjrxdnf1p9spsw9v11k4257g6rl06n"))))
9583 (build-system ant-build-system)
9584 (arguments
9585 `(#:jar-name "osgi-service-repository.jar"
9586 #:tests? #f)); no tests
9587 (inputs
9588 `(("annotation" ,java-osgi-annotation)
9589 ("promise" ,java-osgi-util-promise)
9590 ("resource" ,java-osgi-resource)))
9591 (home-page "https://www.osgi.org")
9592 (synopsis "OSGI service repository")
9593 (description
9594 "OSGi, for Open Services Gateway initiative framework, is a module system
9595and service platform for the Java programming language. This package contains
9596a repository service that contains resources.")
9597 (license license:asl2.0)))
9598
9599(define-public java-osgi-framework
9600 (package
9601 (name "java-osgi-framework")
9602 (version "1.8.0")
9603 (source (origin
9604 (method url-fetch)
9605 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9606 "org.osgi.framework/" version "/org.osgi.framework-"
9607 version "-sources.jar"))
9608 (sha256
9609 (base32
9610 "1lwp2zfad3rybcc6q9bwz8xsgkc92ypzy5p6x54387f1qj65m73s"))))
9611 (build-system ant-build-system)
9612 (arguments
9613 `(#:jar-name "osgi-framework.jar"
9614 #:tests? #f)); no tests
9615 (inputs
9616 `(("annotation" ,java-osgi-annotation)
9617 ("resource" ,java-osgi-resource)
9618 ("dto" ,java-osgi-dto)))
9619 (home-page "https://www.osgi.org")
9620 (synopsis "OSGi framework")
9621 (description
9622 "OSGi, for Open Services Gateway initiative framework, is a module system
9623and service platform for the Java programming language.")
9624 (license license:asl2.0)))
9625
9626(define-public java-osgi-service-log
9627 (package
9628 (name "java-osgi-service-log")
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.log/"
9634 version "/org.osgi.service.log-"
9635 version "-sources.jar"))
9636 (sha256
9637 (base32
9638 "1029j30dzcwializzca0j3fkhwwz08kmmsha5agw1iccscimj6r0"))))
9639 (build-system ant-build-system)
9640 (arguments
9641 `(#:jar-name "osgi-service-log.jar"
9642 #:tests? #f)); no tests
9643 (inputs
9644 (list java-osgi-framework))
9645 (home-page "https://www.osgi.org")
9646 (synopsis "Provides methods for bundles to write messages to the log")
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 log service.")
9651 (license license:asl2.0)))
9652
9653(define-public java-osgi-service-jdbc
9654 (package
9655 (name "java-osgi-service-jdbc")
9656 (version "1.0.0")
9657 (source (origin
9658 (method url-fetch)
9659 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9660 "org.osgi.service.jdbc/"
9661 version "/org.osgi.service.jdbc-"
9662 version "-sources.jar"))
9663 (sha256
9664 (base32
9665 "11iln5v7bk469cgb9ddkrz9sa95b3733gqgaqw9xf5g6wq652yjz"))))
9666 (build-system ant-build-system)
9667 (arguments
9668 `(#:jar-name "osgi-service-jdbc.jar"
9669 #:tests? #f)); no tests
9670 (home-page "https://www.osgi.org")
9671 (synopsis "Factory for JDBC connection factories")
9672 (description
9673 "OSGi, for Open Services Gateway initiative framework, is a module system
9674and service platform for the Java programming language. This package contains
9675a factory for JDBC connection factories. There are 3 preferred connection
9676factories for getting JDBC connections:
9677
9678@itemize
9679@item @code{javax.sql.DataSource};
9680@item @code{javax.sql.ConnectionPoolDataSource};
9681@item @code{javax.sql.XADataSource}.
9682@end itemize")
9683 (license license:asl2.0)))
9684
9685(define-public java-osgi-service-resolver
9686 (package
9687 (name "java-osgi-service-resolver")
9688 (version "1.0.1")
9689 (source (origin
9690 (method url-fetch)
9691 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9692 "org.osgi.service.resolver/"
9693 version "/org.osgi.service.resolver-"
9694 version "-sources.jar"))
9695 (sha256
9696 (base32
9697 "1dzqn1ryfi2rq4zwsgp44bmj2wlfydjg1qbxw2b0z4xdjjy55vxd"))))
9698 (build-system ant-build-system)
9699 (arguments
9700 `(#:jar-name "osgi-service-resolver.jar"
9701 #:tests? #f)); no tests
9702 (inputs
9703 `(("annotation" ,java-osgi-annotation)
9704 ("resource" ,java-osgi-resource)))
9705 (home-page "https://www.osgi.org")
9706 (synopsis "OSGI Resolver service")
9707 (description
9708 "OSGi, for Open Services Gateway initiative framework, is a module system
9709and service platform for the Java programming language. This package contains
9710a resolver service that resolves the specified resources in the context supplied
9711by the caller.")
9712 (license license:asl2.0)))
9713
9714(define-public java-osgi-util-tracker
9715 (package
9716 (name "java-osgi-util-tracker")
9717 (version "1.5.1")
9718 (source (origin
9719 (method url-fetch)
9720 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9721 "org.osgi.util.tracker/"
9722 version "/org.osgi.util.tracker-"
9723 version "-sources.jar"))
9724 (sha256
9725 (base32
9726 "0c4fh9vxwzsx59r8dygda0gq2gx3z5vfhc3jsphlqwf5w0h403lz"))))
9727 (build-system ant-build-system)
9728 (arguments
9729 `(#:jar-name "osgi-util-tracker.jar"
9730 #:tests? #f)); no tests
9731 (inputs
9732 `(("framework" ,java-osgi-framework)
9733 ("annotation" ,java-osgi-annotation)))
9734 (home-page "https://www.osgi.org")
9735 (synopsis "Bundle tracking")
9736 (description
9737 "OSGi, for Open Services Gateway initiative framework, is a module system
9738and service platform for the Java programming language. This package contains
9739bundle tracking utility classes.")
9740 (license license:asl2.0)))
9741
9742(define-public java-osgi-service-cm
9743 (package
9744 (name "java-osgi-service-cm")
9745 (version "1.5.0")
9746 (source (origin
9747 (method url-fetch)
9748 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9749 "org.osgi.service.cm/"
9750 version "/org.osgi.service.cm-"
9751 version "-sources.jar"))
9752 (sha256
9753 (base32
9754 "1z8kap48y3xi0ggj8v6czglfnpnd94mmismgi2wbqhj1nl5fzbp6"))))
9755 (build-system ant-build-system)
9756 (arguments
9757 `(#:jar-name "osgi-service-cm.jar"
9758 #:tests? #f)); no tests
9759 (inputs
9760 `(("framework" ,java-osgi-framework)
9761 ("annotation" ,java-osgi-annotation)))
9762 (home-page "https://www.osgi.org")
9763 (synopsis "OSGI Configuration Management")
9764 (description
9765 "OSGi, for Open Services Gateway initiative framework, is a module system
9766and service platform for the Java programming language. This package contains
9767utility classes for the configuration of services.")
9768 (license license:asl2.0)))
9769
9770(define-public java-osgi-service-packageadmin
9771 (package
9772 (name "java-osgi-service-packageadmin")
9773 (version "1.2.0")
9774 (source (origin
9775 (method url-fetch)
9776 (uri (string-append "https://repo1.maven.org/maven2/org/osgi/"
9777 "org.osgi.service.packageadmin/"
9778 version "/org.osgi.service.packageadmin-"
9779 version "-sources.jar"))
9780 (sha256
9781 (base32
9782 "041mpxzi7g36wmcily6y4ccn3jx15akpdy8gmhyb7m98x7qfvn52"))))
9783 (build-system ant-build-system)
9784 (arguments
9785 `(#:jar-name "osgi-service-packageadmin.jar"
9786 #:tests? #f)); no tests
9787 (inputs
9788 `(("framework" ,java-osgi-framework)))
9789 (home-page "https://www.osgi.org")
9790 (synopsis "OSGI Package Administration")
9791 (description
9792 "OSGi, for Open Services Gateway initiative framework, is a module system
9793and service platform for the Java programming language. This package contains
9794the packageadmin service.")
9795 (license license:asl2.0)))
9796
9797(define-public java-ops4j-base-lang
9798 (package
9799 (name "java-ops4j-base-lang")
9800 (version "1.5.0")
9801 (source (origin
9802 (method url-fetch)
9803 (uri (string-append "https://github.com/ops4j/org.ops4j.base/"
9804 "archive/base-" version ".tar.gz"))
9805 (sha256
9806 (base32
9807 "18hl3lpchgpv8yh5rlk39l2gif5dlfgb8gxjmncf39pr2dprkniw"))))
9808 (build-system ant-build-system)
9809 (arguments
9810 `(#:jar-name "java-ops4j-base-lang.jar"
9811 #:source-dir "ops4j-base-lang/src/main/java"
9812 #:tests? #f; no tests
9813 #:phases
9814 (modify-phases %standard-phases
9815 (add-before 'build 'add-test-file
9816 (lambda _
9817 ;; That file is required by a test in ops4j-pax-exam-core-spi
9818 (mkdir-p "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang")
9819 (with-output-to-file "build/classes/META-INF/maven/org.ops4j.base/ops4j-base-lang/pom.properties"
9820 (lambda _
9821 (display
9822 (string-append
9823 "version=" ,version "\n"
9824 "groupId=org.ops4j.base"
9825 "artifactId=ops4j-base-lang\n"))))
9826 #t)))))
9827 (home-page "https://ops4j1.jira.com/wiki/spaces/base/overview")
9828 (synopsis "Utility classes and extensions to be used in OPS4J projects")
9829 (description "OPS4J stands for Open Participation Software for Java. This
9830package contains utilities and extensions related to @code{java.lang}.")
9831 (license license:asl2.0)))
9832
9833(define-public java-ops4j-base-monitors
9834 (package
9835 (inherit java-ops4j-base-lang)
9836 (name "java-ops4j-base-monitors")
9837 (arguments
9838 `(#:jar-name "java-ops4j-base-monitors.jar"
9839 #:source-dir "ops4j-base-monitors/src/main/java"
9840 #:tests? #f)); no tests
9841 (inputs
9842 `(("lang" ,java-ops4j-base-lang)))
9843 (description "OPS4J stands for Open Participation Software for Java. This
9844package contains utilities and extensions related to monitoring.")))
9845
9846(define-public java-ops4j-base-io
9847 (package
9848 (inherit java-ops4j-base-lang)
9849 (name "java-ops4j-base-io")
9850 (arguments
9851 `(#:jar-name "java-ops4j-base-io.jar"
9852 #:source-dir "ops4j-base-io/src/main/java"
9853 #:test-dir "ops4j-base-io/src/test"
9854 #:test-exclude
9855 (list "**/ListerTest.java")))
9856 (inputs
9857 `(("lang" ,java-ops4j-base-monitors)
9858 ("lang" ,java-ops4j-base-lang)))
9859 (native-inputs
9860 `(("junit" ,java-junit)
9861 ("hamcrest" ,java-hamcrest-core)))
9862 (description "OPS4J stands for Open Participation Software for Java. This
9863package contains utilities and extensions related to handling streams and files.")))
9864
9865(define-public java-ops4j-base-util
9866 (package
9867 (inherit java-ops4j-base-lang)
9868 (name "java-ops4j-base-util")
9869 (arguments
9870 `(#:jar-name "java-ops4j-base-util.jar"
9871 #:source-dir "ops4j-base-util/src/main/java"
9872 #:test-dir "ops4j-base-util/src/test"))
9873 (inputs
9874 `(("lang" ,java-ops4j-base-lang)))
9875 (native-inputs
9876 `(("junit" ,java-junit)))
9877 (description "OPS4J stands for Open Participation Software for Java. This
9878package contains utilities and extensions related to environment, i18n and
9879mime types.")))
9880
9881(define-public java-ops4j-base-util-property
9882 (package
9883 (inherit java-ops4j-base-lang)
9884 (name "java-ops4j-base-util-property")
9885 (arguments
9886 `(#:jar-name "java-ops4j-base-util-property.jar"
9887 #:source-dir "ops4j-base-util-property/src/main/java"
9888 #:tests? #f)); no tests
9889 (inputs
9890 `(("lang" ,java-ops4j-base-lang)
9891 ("util" ,java-ops4j-base-util)))
9892 (description "OPS4J stands for Open Participation Software for Java. This
9893package contains utilities and extensions related to resolving properties from
9894different sources.")))
9895
9896(define-public java-ops4j-base-store
9897 (package
9898 (inherit java-ops4j-base-lang)
9899 (name "java-ops4j-base-store")
9900 (arguments
9901 `(#:jar-name "java-ops4j-base-store.jar"
9902 #:source-dir "ops4j-base-store/src/main/java"
9903 #:tests? #f)); no tests
9904 (inputs
9905 `(("lang" ,java-ops4j-base-lang)
9906 ("slf4j" ,java-slf4j-api)
9907 ("io" ,java-ops4j-base-io)))
9908 (description "OPS4J stands for Open Participation Software for Java. This
9909package contains utilities for storing and retrieving data from an
9910@code{InputStream}.")))
9911
9912(define-public java-ops4j-base-spi
9913 (package
9914 (inherit java-ops4j-base-lang)
9915 (name "java-ops4j-base-spi")
9916 (arguments
9917 `(#:jar-name "java-ops4j-base-spi.jar"
9918 #:source-dir "ops4j-base-spi/src/main/java"
9919 #:test-dir "ops4j-base-spi/src/test"))
9920 (native-inputs
9921 `(("junit" ,java-junit)
9922 ("hamcrest" ,java-hamcrest-core)))
9923 (description "OPS4J stands for Open Participation Software for Java. This
9924package contains utilities for obtaining services via the Java SE 6
9925@code{ServiceLoader}.")))
9926
9927(define-public java-aqute-bnd-annotation
9928 (package
9929 (name "java-aqute-bnd-annotation")
9930 (version "3.5.0")
9931 (source (origin
9932 (method url-fetch)
9933 (uri (string-append "https://github.com/bndtools/bnd/archive/"
9934 version ".REL.tar.gz"))
9935 (file-name (string-append name "-" version ".tar.gz"))
9936 (sha256
9937 (base32
9938 "1ggyiq0as0f6cz333a0dh98j72kmvv5pf2s47v9554yh905lfqdl"))))
9939 (build-system ant-build-system)
9940 (arguments
9941 `(#:jar-name "java-aqute-bnd-annotation.jar"
9942 #:source-dir "biz.aQute.bnd.annotation/src"
9943 #:tests? #f)); empty test dir
9944 (home-page "https://bnd.bndtools.org/")
9945 (synopsis "Tools for OSGi")
9946 (description "Bnd is a swiss army knife for OSGi, it creates manifest
9947headers based on analyzing the class code, it verifies the project settings,
9948it manages project dependencies, gives diffs jars, and much more.")
9949 (license license:asl2.0)))
9950
9951(define-public java-aqute-libg
9952 (package
9953 (inherit java-aqute-bnd-annotation)
9954 (name "java-aqute-libg")
9955 (arguments
9956 `(#:jar-name "java-aqute-libg.jar"
9957 ;; The build fails when source/target more recent than 1.7. This
9958 ;; is a known issue. See: https://github.com/bndtools/bnd/issues/1327
9959 ;;
9960 ;; It is closed as won't fix. There is no way to change the source
9961 ;; so that it works on 1.8, and still works on 1.6, the upstream
9962 ;; target. It work fine on 1.7, so we use 1.7.
9963 #:make-flags (list "-Dant.build.javac.source=1.7"
9964 "-Dant.build.javac.target=1.7")
9965 #:phases
9966 (modify-phases %standard-phases
9967 (add-before 'configure 'chdir
9968 ;; Change to aQute.libg directory, so that the relative
9969 ;; paths in the tests aren't broken.
9970 (lambda _
9971 (chdir "aQute.libg")
9972 #t))
9973 (add-before 'check 'create-test-directory
9974 ;; Copy the test directory to test/java, since that's where
9975 ;; ant-build-system's default project in build.xml expects to find
9976 ;; the test classes. Leave a copy in the original place to not
9977 ;; break paths in tests.
9978 (lambda _
9979 (mkdir "src/test")
9980 (copy-recursively "test" "src/test/java")
9981 #t)))))
9982 (inputs
9983 `(("slf4j" ,java-slf4j-api)
9984 ("osgi-annot" ,java-osgi-annotation)
9985 ("java-osgi-cmpn" ,java-osgi-cmpn)
9986 ("osgi" ,java-osgi-core)))
9987 (native-inputs
9988 `(("hamcrest" ,java-hamcrest-core)
9989 ("java-junit" ,java-junit)))))
9990
9991(define-public java-aqute-bndlib
9992 (package
9993 (inherit java-aqute-bnd-annotation)
9994 (name "java-aqute-bndlib")
9995 (arguments
9996 `(#:jar-name "java-bndlib.jar"
9997 #:source-dir "biz.aQute.bndlib/src"
9998 #:tests? #f)); no tests
9999 (inputs
10000 `(("slf4j" ,java-slf4j-api)
10001 ("osgi-annot" ,java-osgi-annotation)
10002 ("java-aqute-libg" ,java-aqute-libg)
10003 ("java-aqute-bnd-annotation" ,java-aqute-bnd-annotation)
10004 ("java-osgi-service-component-annotations" ,java-osgi-service-component-annotations)
10005 ("java-osgi-service-repository" ,java-osgi-service-repository)
10006 ("java-osgi-service-log" ,java-osgi-service-log)
10007 ("java-osgi-service-metatype-annotations" ,java-osgi-service-metatype-annotations)
10008 ("java-osgi-namespace-contract" ,java-osgi-namespace-contract)
10009 ("java-osgi-namespace-extender" ,java-osgi-namespace-extender)
10010 ("java-osgi-namespace-service" ,java-osgi-namespace-service)
10011 ("promise" ,java-osgi-util-promise)
10012 ("osgi" ,java-osgi-core)))))
10013
10014(define-public java-ops4j-pax-tinybundles
10015 (package
10016 (name "java-ops4j-pax-tinybundles")
10017 (version "2.1.1")
10018 (source (origin
10019 (method url-fetch)
10020 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.tinybundles/"
10021 "archive/tinybundles-" version ".tar.gz"))
10022 (sha256
10023 (base32
10024 "0y0gq3pvv0iir2b885lmlwnvr724vv7vklzhhr4fs27d7mdkj871"))))
10025 (arguments
10026 `(#:jar-name "java-ops4j-pax-tinybundles.jar"
10027 #:source-dir "src/main/java"
10028 #:test-exclude
10029 ;; Abstract base classes for other tests
10030 (list "**/BndTest.java" "**/CoreTest.java")
10031 #:phases
10032 (modify-phases %standard-phases
10033 (add-before 'check 'fix-version
10034 (lambda _
10035 ;; This test has a reference to an old version of bndlib we are not
10036 ;; packaging. It uses the version referenced in pom.xml. We replace
10037 ;; it with our own version.
10038 (substitute* "src/test/java/org/ops4j/pax/tinybundles/bnd/BndTest.java"
10039 (("[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*\\.[0-9][0-9]*")
10040 ,(package-version java-aqute-bndlib)))
10041 #t)))))
10042 (inputs
10043 `(("lang" ,java-ops4j-base-lang)
10044 ("io" ,java-ops4j-base-io)
10045 ("store" ,java-ops4j-base-store)
10046 ("slf4j" ,java-slf4j-api)
10047 ("libg" ,java-aqute-libg)
10048 ("bndlib" ,java-aqute-bndlib)))
10049 (native-inputs
10050 `(("junit" ,java-junit)
10051 ("hamcrest" ,java-hamcrest-core)
10052 ("log4j" ,java-log4j-api)
10053 ("bndannotation" ,java-aqute-bnd-annotation)
10054 ("framework" ,java-osgi-framework)))
10055 (build-system ant-build-system)
10056 (home-page "https://ops4j1.jira.com/wiki/spaces/ops4j/pages/12060312/Tinybundles")
10057 (synopsis "Java APIs to create OSGi related artifacts")
10058 (description "Tinybundles is all about creating OSGi related artifacts like
10059Bundles, Fragments and Deployment Packages with Java Api. It is very convenient
10060to create such artifacts on-the-fly inside Tests (like in Pax Exam). On the
10061other hand, this library can be a foundation of real end user tools that need
10062to create those artifacts.")
10063 (license license:asl2.0)))
10064
10065(define-public java-ops4j-pax-exam-core
10066 (package
10067 (name "java-ops4j-pax-exam-core")
10068 (version "4.11.0")
10069 (source (origin
10070 (method url-fetch)
10071 (uri (string-append "https://github.com/ops4j/org.ops4j.pax.exam2/"
10072 "archive/exam-reactor-" version ".tar.gz"))
10073 (sha256
10074 (base32
10075 "1b0f89gawxyl0pkqx9sicp6n58pirkzhjw41y749bwrkb6h99i26"))))
10076 (arguments
10077 (list #:jar-name "java-ops4j-pax-exam-core.jar"
10078 #:source-dir "core/pax-exam/src/main/java"
10079 #:test-dir "core/pax-exam/src/test"))
10080 (inputs
10081 (list java-slf4j-api
10082 java-ops4j-base-lang
10083 java-ops4j-base-io
10084 java-ops4j-base-util-property
10085 java-ops4j-base-store
10086 java-osgi-core))
10087 (native-inputs
10088 (list java-junit
10089 java-hamcrest-core))
10090 (build-system ant-build-system)
10091 (home-page "https://ops4j1.jira.com/wiki/spaces/PAXEXAM4/overview")
10092 (synopsis "In-Container Testing for OSGi, Java EE and CDI")
10093 (description "Pax Exam creates OSGi bundles for testing purposes. It lets
10094the user take control of the OSGi framework, the test framework (e.g. JUnit) and
10095the system under test at the same time.")
10096 (license license:asl2.0)))
10097
10098(define-public java-ops4j-pax-exam-core-spi
10099 (package
10100 (inherit java-ops4j-pax-exam-core)
10101 (name "java-ops4j-pax-exam-core-spi")
10102 (arguments
10103 `(#:jar-name "java-ops4j-pax-exam-spi.jar"
10104 #:source-dir "src/main/java"
10105 #:test-exclude
10106 (list
10107 ;; Abstract base class, not a test
10108 "**/BaseStagedReactorTest.java"
10109 ;; Depends on org.mortbay.jetty.testwars:test-war-dump
10110 "**/WarBuilderTest.java")
10111 #:phases
10112 (modify-phases %standard-phases
10113 (add-before 'configure 'chdir
10114 (lambda _
10115 ;; Tests assume we are in this directory
10116 (chdir "core/pax-exam-spi")
10117 #t))
10118 (add-before 'check 'fix-tests
10119 (lambda _
10120 ;; One test checks that this file is present.
10121 (mkdir-p "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi")
10122 (with-output-to-file
10123 "build/classes/META-INF/maven/org.ops4j.pax.exam/pax-exam-spi/pom.properties"
10124 (lambda _
10125 (display
10126 (string-append "artifactId = pax-exam-spi\n"
10127 "version = " ,(package-version java-ops4j-pax-exam-core-spi)))))
10128 ;; Maven puts compilation results in the target directory, while we
10129 ;; put them in the build directory.
10130 (substitute* '("src/test/java/org/ops4j/pax/exam/spi/war/WarBuilderTest.java"
10131 "src/test/java/org/ops4j/pax/exam/spi/war/WarTestProbeBuilderTest.java"
10132 "src/test/java/org/ops4j/pax/exam/spi/war/ZipBuilderTest.java")
10133 (("target") "build"))
10134 ;; One test is expected to fail, but it doesn't throw the expected exception
10135 (substitute* "src/test/java/org/ops4j/pax/exam/spi/reactors/BaseStagedReactorTest.java"
10136 (("AssertionError") "IllegalArgumentException"))
10137 #t)))))
10138 (inputs
10139 `(("java-ops4j-pax-exam-core" ,java-ops4j-pax-exam-core)
10140 ("lang" ,java-ops4j-base-lang)
10141 ("monitors" ,java-ops4j-base-monitors)
10142 ("store" ,java-ops4j-base-store)
10143 ("io" ,java-ops4j-base-io)
10144 ("spi" ,java-ops4j-base-spi)
10145 ("osgi" ,java-osgi-core)
10146 ("slf4j" ,java-slf4j-api)
10147 ("tinybundles" ,java-ops4j-pax-tinybundles)))
10148 (native-inputs
10149 `(("mockito" ,java-mockito-1)
10150 ("junit" ,java-junit)
10151 ("hamcrest" ,java-hamcrest-core)
10152 ("cglib" ,java-cglib)
10153 ("objenesis" ,java-objenesis)))))
10154
10155(define-public java-ops4j-pax-exam-core-junit
10156 (package
10157 (inherit java-ops4j-pax-exam-core)
10158 (name "java-ops4j-pax-exam-core-junit")
10159 (arguments
10160 `(#:jar-name "ops4j-pax-exam-core-junit.jar"
10161 #:source-dir "drivers/pax-exam-junit4/src/main/java"
10162 #:tests? #f)); no tests
10163 (inputs
10164 `(("junit" ,java-junit)
10165 ("slf4j" ,java-slf4j-api)
10166 ("core" ,java-ops4j-pax-exam-core)
10167 ("spi" ,java-ops4j-pax-exam-core-spi)))
10168 (native-inputs '())))
10169
10170(define-public java-fasterxml-jackson-annotations
10171 (package
10172 (name "java-fasterxml-jackson-annotations")
10173 (version "2.9.4")
10174 (source (origin
10175 (method url-fetch)
10176 (uri (string-append "https://github.com/FasterXML/"
10177 "jackson-annotations/archive/"
10178 "jackson-annotations-" version ".tar.gz"))
10179 (sha256
10180 (base32
10181 "0mr95xd0da6a4g95zvrl1ryk5n5zv2rc696w3xnsr5hxk2gicfc4"))))
10182 (build-system ant-build-system)
10183 (arguments
10184 `(#:jar-name "jackson-annotations.jar"
10185 #:source-dir "src/main/java"
10186 #:test-dir "src/test"))
10187 (native-inputs
10188 `(("junit" ,java-junit)))
10189 (home-page "https://github.com/FasterXML/jackson-annotations")
10190 (synopsis "General purpose annotations for the Jackson Data Processor")
10191 (description "This package contains general purpose annotations for the
10192Jackson Data Processor, used on value and handler types. The only annotations
10193not included are ones that require dependency to the Databind package.")
10194 (license license:asl2.0)))
10195
10196(define-public java-fasterxml-jackson-core
10197 (package
10198 (name "java-fasterxml-jackson-core")
10199 (version "2.9.4")
10200 (source (origin
10201 (method url-fetch)
10202 (uri (string-append "https://github.com/FasterXML/"
10203 "jackson-core/archive/"
10204 "jackson-core-" version ".tar.gz"))
10205 (sha256
10206 (base32
10207 "159hsnk17jr1gyzkf01cxvsn45srnk37g949r7364qlsr527gjgd"))))
10208 (build-system ant-build-system)
10209 (arguments
10210 `(#:jar-name "jackson-core.jar"
10211 #:source-dir "src/main/java"
10212 #:test-dir "src/test"
10213 #:test-exclude
10214 (list
10215 ;; Expected failure. pom.xml excludes these
10216 "**/failing/**"
10217 ;; Base classes that have no constructor for junit
10218 "**/BaseTest.java"
10219 "**/ConcurrencyReadTest.java"
10220 "**/ManualCharAccessTest.java"
10221 "**/ManualCharAccessTest.java"
10222 "**/TrailingCommasTest.java"
10223 "**/AsyncMissingValuesInObjectTest.java"
10224 "**/AsyncMissingValuesInArrayTest.java")
10225 #:phases
10226 (modify-phases %standard-phases
10227 (add-before 'configure 'generate-PackageVersion.java
10228 (lambda _
10229 (let* ((out "src/main/java/com/fasterxml/jackson/core/json/PackageVersion.java")
10230 (in (string-append out ".in")))
10231 (copy-file in out)
10232 (substitute* out
10233 (("@package@") "com.fasterxml.jackson.core.json")
10234 (("@projectversion@") ,version)
10235 (("@projectgroupid@") "com.fasterxml.jackson.core")
10236 (("@projectartifactid@") "jackson-core")))
10237 #t))
10238 (add-before 'build 'copy-resources
10239 (lambda _
10240 (copy-recursively "src/main/resources"
10241 "build/classes")
10242 #t))
10243 (add-before 'check 'copy-test-resources
10244 (lambda _
10245 (copy-recursively "src/test/resources"
10246 "build/test-classes")
10247 #t)))))
10248 (native-inputs
10249 `(("junit" ,java-junit)
10250 ("hamcrest" ,java-hamcrest-core)))
10251 (home-page "https://github.com/FasterXML/jackson-core")
10252 (synopsis "Low-level streaming parser and generator abstractions")
10253 (description "This package contains core low-level incremental
10254(streaming) parser and generator abstractions used by the Jackson Data
10255Processor. It also includes the default implementation of handler types
10256(parser, generator) that handle JSON format.")
10257 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10258
10259(define-public java-fasterxml-jackson-databind
10260 (package
10261 (name "java-fasterxml-jackson-databind")
10262 (version "2.9.4")
10263 (source (origin
10264 (method url-fetch)
10265 (uri (string-append "https://github.com/FasterXML/"
10266 "jackson-databind/archive/"
10267 "jackson-databind-" version ".tar.gz"))
10268 (sha256
10269 (base32
10270 "1zd2cw4z6kdkbx8za96xh9pyicv2a2l7y0rkcx2fqd8hv6d47s08"))))
10271 (build-system ant-build-system)
10272 (arguments
10273 `(#:jar-name "jackson-databind.jar"
10274 #:source-dir "src/main/java"
10275 #:tests? #f; requires javax.measures for which I can't find a free implementation
10276 #:phases
10277 (modify-phases %standard-phases
10278 (add-before 'configure 'generate-PackageVersion.java
10279 (lambda _
10280 (let* ((out "src/main/java/com/fasterxml/jackson/databind/cfg/PackageVersion.java")
10281 (in (string-append out ".in")))
10282 (copy-file in out)
10283 (substitute* out
10284 (("@package@") "com.fasterxml.jackson.databind.cfg")
10285 (("@projectversion@") ,version)
10286 (("@projectgroupid@") "com.fasterxml.jackson.databind")
10287 (("@projectartifactid@") "jackson-databind")))
10288 #t))
10289 (add-before 'build 'copy-resources
10290 (lambda _
10291 (copy-recursively "src/main/resources" "build/classes")
10292 #t)))))
10293 (inputs
10294 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core))
10295 (home-page "https://github.com/FasterXML/jackson-databind")
10296 (synopsis "Data-binding functionality and tree-model for the Jackson Data Processor")
10297 (description "This package contains the general-purpose data-binding
10298functionality and tree-model for Jackson Data Processor. It builds on core
10299streaming parser/generator package, and uses Jackson Annotations for
10300configuration.")
10301 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10302
10303(define-public java-fasterxml-jackson-modules-base-jaxb
10304 (package
10305 (name "java-fasterxml-jackson-modules-base-jaxb")
10306 (version "2.9.4")
10307 (source (origin
10308 (method url-fetch)
10309 (uri (string-append "https://github.com/FasterXML/"
10310 "jackson-modules-base/archive/"
10311 "jackson-modules-base-" version ".tar.gz"))
10312 (sha256
10313 (base32
10314 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10315 (build-system ant-build-system)
10316 (arguments
10317 `(#:jar-name "jackson-modules-base-jaxb.jar"
10318 #:source-dir "jaxb/src/main/java"
10319 #:test-dir "jaxb/src/test"
10320 #:test-exclude
10321 ;; Base class for tests
10322 (list "**/BaseJaxbTest.java")
10323 #:phases
10324 (modify-phases %standard-phases
10325 (add-before 'configure 'generate-PackageVersion.java
10326 (lambda _
10327 (let* ((out (string-append "jaxb/src/main/java/com/fasterxml/"
10328 "jackson/module/jaxb/PackageVersion.java"))
10329 (in (string-append out ".in")))
10330 (copy-file in out)
10331 (substitute* out
10332 (("@package@") "com.fasterxml.jackson.module.jaxb")
10333 (("@projectversion@") ,version)
10334 (("@projectgroupid@") "com.fasterxml.jackson.module.jaxb")
10335 (("@projectartifactid@") "jackson-module-jaxb")))
10336 #t))
10337 (add-before 'build 'copy-resources
10338 (lambda _
10339 (copy-recursively "jaxb/src/main/resources" "build/classes")
10340 #t)))))
10341 (inputs
10342 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10343 java-fasterxml-jackson-databind))
10344 (native-inputs
10345 (list java-junit))
10346 (home-page "https://github.com/FasterXML/jackson-modules-base")
10347 (synopsis "Jaxb annotations jackson module")
10348 (description "This package is the jaxb annotations module for jackson.")
10349 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10350
10351(define-public java-fasterxml-jackson-modules-base-mrbean
10352 (package
10353 (name "java-fasterxml-jackson-modules-base-mrbean")
10354 (version "2.9.4")
10355 (source (origin
10356 (method url-fetch)
10357 (uri (string-append "https://github.com/FasterXML/"
10358 "jackson-modules-base/archive/"
10359 "jackson-modules-base-" version ".tar.gz"))
10360 (sha256
10361 (base32
10362 "1wws95xi8sppp6b0k2vvjdjyynl20r1a4dwrhai08lzlria6blp5"))))
10363 (build-system ant-build-system)
10364 (arguments
10365 `(#:jar-name "jackson-modules-base-mrbean.jar"
10366 #:source-dir "mrbean/src/main/java"
10367 #:test-dir "mrbean/src/test"
10368 #:test-exclude
10369 ;; Base class for tests
10370 (list "**/BaseTest.java")
10371 #:phases
10372 (modify-phases %standard-phases
10373 (add-before 'configure 'generate-PackageVersion.java
10374 (lambda _
10375 (let* ((out (string-append "mrbean/src/main/java/com/fasterxml/"
10376 "jackson/module/mrbean/PackageVersion.java"))
10377 (in (string-append out ".in")))
10378 (copy-file in out)
10379 (substitute* out
10380 (("@package@") "com.fasterxml.jackson.module.mrbean")
10381 (("@projectversion@") ,version)
10382 (("@projectgroupid@") "com.fasterxml.jackson.module.mrbean")
10383 (("@projectartifactid@") "jackson-module-mrbean")))
10384 #t)))))
10385 (inputs
10386 (list java-asm java-fasterxml-jackson-annotations
10387 java-fasterxml-jackson-core java-fasterxml-jackson-databind))
10388 (native-inputs
10389 (list java-junit))
10390 (home-page "https://github.com/FasterXML/jackson-modules-base")
10391 (synopsis "POJO type materialization for Java")
10392 (description "This package implements POJO type materialization.
10393Databinders can construct implementation classes for Java interfaces as part
10394of deserialization.")
10395 (license license:asl2.0)))
10396
10397(define-public java-snakeyaml
10398 (package
10399 (name "java-snakeyaml")
10400 (version "1.18")
10401 (source (origin
10402 (method url-fetch)
10403 (uri (string-append "https://bitbucket.org/asomov/snakeyaml/get/v"
10404 version ".tar.gz"))
10405 (file-name (string-append name "-" version ".tar.gz"))
10406 (sha256
10407 (base32
10408 "0474cqcv46zgv9bhms2vgawakq1vyj0hp3h3f1bfys46msia90bh"))))
10409 (build-system ant-build-system)
10410 (arguments
10411 `(#:jar-name "java-snakeyaml.jar"
10412 #:source-dir "src/main/java"
10413 ;; Tests require velocity, a cyclic dependency, and
10414 ;; java-spring-framework-context which is not packaged.
10415 #:tests? #f))
10416 (home-page "https://bitbucket.org/asomov/snakeyaml")
10417 (synopsis "YAML processor")
10418 (description "SnakeYAML is a YAML processor for the Java Virtual Machine.")
10419 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10420
10421(define-public java-fasterxml-jackson-dataformat-yaml
10422 (package
10423 (name "java-fasterxml-jackson-dataformat-yaml")
10424 (version "2.9.4")
10425 (source (origin
10426 (method url-fetch)
10427 (uri (string-append "https://github.com/FasterXML/"
10428 "jackson-dataformats-text/archive/"
10429 "jackson-dataformats-text-" version ".tar.gz"))
10430 (sha256
10431 (base32
10432 "1hikl06khaxbg439avf442qifcadap8w0lx13f0nnhp2vh3dkbz7"))))
10433 (build-system ant-build-system)
10434 (arguments
10435 `(#:jar-name "jackson-dataformat-yaml.jar"
10436 #:source-dir "yaml/src/main/java"
10437 #:test-dir "yaml/src/test"
10438 #:test-exclude (list "**/failing/**.java")
10439 #:phases
10440 (modify-phases %standard-phases
10441 (add-before 'configure 'generate-PackageVersion.java
10442 (lambda _
10443 (let* ((out "yaml/src/main/java/com/fasterxml/jackson/dataformat/yaml/PackageVersion.java")
10444 (in (string-append out ".in")))
10445 (copy-file in out)
10446 (substitute* out
10447 (("@package@") "com.fasterxml.jackson.dataformat.yaml")
10448 (("@projectversion@") ,version)
10449 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.yaml")
10450 (("@projectartifactid@") "jackson-dataformat-yaml")))
10451 #t)))))
10452 (inputs
10453 (list java-fasterxml-jackson-annotations java-fasterxml-jackson-core
10454 java-fasterxml-jackson-databind java-snakeyaml))
10455 (native-inputs
10456 `(("junit" ,java-junit)
10457 ("hamcrest" ,java-hamcrest-core)
10458 ("java-ops4j-pax-exam-core-spi" ,java-ops4j-pax-exam-core-spi)
10459 ("java-ops4j-pax-exam-core-junit" ,java-ops4j-pax-exam-core-junit)
10460 ("java-ops4j-pax-exam" ,java-ops4j-pax-exam-core)))
10461 (home-page "https://github.com/FasterXML/jackson-dataformats-text")
10462 (synopsis "Yaml backend for Jackson")
10463 (description "Dataformat backends are used to support format alternatives
10464to JSON, supported by default. This is done by sub-classing Jackson core
10465abstractions.")
10466 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10467
10468(define-public java-stax2-api
10469 (package
10470 (name "java-stax2-api")
10471 (version "4.0.0")
10472 (source (origin
10473 (method url-fetch)
10474 (uri (string-append "https://github.com/FasterXML/stax2-api/archive/"
10475 "stax2-api-" version ".tar.gz"))
10476 (sha256
10477 (base32
10478 "1amc1si0l0hyyw2sawmnzy4hkna3z6fp195y4nm5m9wb9ld5awkq"))))
10479 (build-system ant-build-system)
10480 (arguments
10481 `(#:jar-name "java-stax2-api.jar"
10482 #:source-dir "src/main/java"
10483 #:tests? #f)); no tests
10484 (home-page "https://github.com/FasterXML/stax2-api")
10485 (synopsis "Stax2 API")
10486 (description "Stax2 API is an extension to basic Stax 1.0 API that adds
10487significant new functionalities, such as full-featured bi-direction validation
10488interface and high-performance Typed Access API.")
10489 (license license:bsd-2)))
10490
10491(define-public java-woodstox-core
10492 (package
10493 (name "java-woodstox-core")
10494 (version "5.0.3")
10495 (source (origin
10496 (method git-fetch)
10497 (uri (git-reference
10498 (url "https://github.com/FasterXML/woodstox")
10499 (commit (string-append "woodstox-core-" version))))
10500 (file-name (git-file-name name version))
10501 (sha256
10502 (base32
10503 "0bfylk24a967hwxprxqbg6cdvm6n4ldcarp54yg980viwvjiglyp"))))
10504 (build-system ant-build-system)
10505 (arguments
10506 `(#:jar-name "woodstox.jar"
10507 #:test-exclude
10508 (list "**/Base*.java" "failing/**")
10509 #:phases
10510 (modify-phases %standard-phases
10511 (add-before 'build 'remove-msv-dep
10512 (lambda _
10513 ;; we don't need osgi, and it depends on msv
10514 (delete-file-recursively "src/main/java/com/ctc/wstx/osgi")
10515 ;; msv's latest release is from 2011 and we don't need it
10516 (delete-file-recursively "src/main/java/com/ctc/wstx/msv")
10517 (delete-file-recursively "src/test/java/wstxtest/osgi")
10518 (delete-file-recursively "src/test/java/wstxtest/msv")
10519 #t))
10520 (add-before 'build 'copy-resources
10521 (lambda _
10522 (copy-recursively "src/main/resources" "build/classes")
10523 #t)))))
10524 (inputs
10525 `(("stax2" ,java-stax2-api)))
10526 (native-inputs
10527 `(("junit" ,java-junit)))
10528 (home-page "https://github.com/FasterXML/woodstox")
10529 (synopsis "Stax XML API implementation")
10530 (description "Woodstox is a stax XML API implementation.")
10531 (license license:asl2.0)))
10532
10533(define-public java-fasterxml-jackson-dataformat-xml
10534 (package
10535 (name "java-fasterxml-jackson-dataformat-xml")
10536 (version "2.9.4")
10537 (source (origin
10538 (method git-fetch)
10539 (uri (git-reference
10540 (url "https://github.com/FasterXML/jackson-dataformat-xml")
10541 (commit (string-append "jackson-dataformat-xml-" version))))
10542 (file-name (git-file-name name version))
10543 (sha256
10544 (base32
10545 "0s1wl65mbs57c2hz2v8rnh8i04y5lpyyvnjz562j5j6b83vwwpfx"))))
10546 (build-system ant-build-system)
10547 (arguments
10548 `(#:jar-name "jackson-dataformat-xml.jar"
10549 #:source-dir "src/main/java"
10550 #:test-exclude
10551 (list "**/failing/**")
10552 #:phases
10553 (modify-phases %standard-phases
10554 (add-before 'configure 'generate-PackageVersion.java
10555 (lambda _
10556 (let* ((out "src/main/java/com/fasterxml/jackson/dataformat/xml/PackageVersion.java")
10557 (in (string-append out ".in")))
10558 (copy-file in out)
10559 (newline)
10560 (substitute* out
10561 (("@package@") "com.fasterxml.jackson.dataformat.xml")
10562 (("@projectversion@") ,version)
10563 (("@projectgroupid@") "com.fasterxml.jackson.dataformat.xml")
10564 (("@projectartifactid@") "jackson-dataformat-xml")))
10565 #t))
10566 (add-before 'build 'copy-resources
10567 (lambda _
10568 (copy-recursively "src/main/resources" "build/classes")
10569 #t)))))
10570 (inputs
10571 `(("jackson-annotations" ,java-fasterxml-jackson-annotations)
10572 ("jackson-core" ,java-fasterxml-jackson-core)
10573 ("jackson-modules-base-jaxb" ,java-fasterxml-jackson-modules-base-jaxb)
10574 ("jackson-databind" ,java-fasterxml-jackson-databind)
10575 ("stax2-api" ,java-stax2-api)
10576 ("woodstox" ,java-woodstox-core)))
10577 (native-inputs
10578 `(("junit" ,java-junit)
10579 ("hamcrest" ,java-hamcrest-core)))
10580 (home-page "https://github.com/FasterXML/jackson-dataformat-xml")
10581 (synopsis "Read and write XML")
10582 (description "This package contains Jackson extension component for reading
10583and writing XML encoded data.
10584
10585Further, the goal is to emulate how JAXB data-binding works with \"Code-first\"
10586approach (that is, no support is added for \"Schema-first\" approach). Support
10587for JAXB annotations is provided by JAXB annotation module; this module
10588provides low-level abstractions (@code{JsonParser}, @code{JsonGenerator},
10589@code{JsonFactory}) as well as small number of higher level overrides needed to
10590make data-binding work.")
10591 (license license:asl2.0))); found on wiki.fasterxml.com/JacksonLicensing
10592
10593(define-public java-hdrhistogram
10594 (package
10595 (name "java-hdrhistogram")
10596 (version "2.1.9")
10597 (source (origin
10598 (method git-fetch)
10599 (uri (git-reference
10600 (url "https://github.com/HdrHistogram/HdrHistogram")
10601 (commit (string-append "HdrHistogram-" version))))
10602 (file-name (git-file-name name version))
10603 (sha256
10604 (base32
10605 "1cw8aa1vk258k42xs6wpy72m4gbai540jq032qsa7c5586iawx2d"))))
10606 (build-system ant-build-system)
10607 (arguments
10608 `(#:jar-name "java-hdrhistogram.jar"
10609 #:source-dir "src/main/java"
10610 #:phases
10611 (modify-phases %standard-phases
10612 (add-after 'unpack 'make-files-writable
10613 (lambda _
10614 (for-each make-file-writable (find-files "."))
10615 #t))
10616 (add-before 'configure 'set-version
10617 (lambda _
10618 (let* ((version-java "src/main/java/org/HdrHistogram/Version.java")
10619 (template (string-append version-java ".template")))
10620 (copy-file template version-java)
10621 (substitute* version-java
10622 (("\\$VERSION\\$") ,version)
10623 (("\\$BUILD_TIME\\$") "0"))
10624 #t))))))
10625 (native-inputs
10626 `(("junit" ,java-junit)
10627 ("hamcrest" ,java-hamcrest-core)))
10628 (home-page "https://hdrhistogram.github.io/HdrHistogram")
10629 (synopsis "High dynamic range histogram")
10630 (description "Hdrhistogram creates histograms that support
10631recording and analyzing sampled data value counts across a configurable integer
10632value range with configurable value precision within the range. Value precision
10633is expressed as the number of significant digits in the value recording, and
10634provides control over value quantization behavior across the value range and
10635the subsequent value resolution at any given level.")
10636 (license license:public-domain)))
10637
10638(define-public java-cofoja
10639 (package
10640 (name "java-cofoja")
10641 (version "1.3")
10642 (source (origin
10643 (method git-fetch)
10644 (uri (git-reference
10645 (url "https://github.com/nhatminhle/cofoja")
10646 (commit (string-append "v" version))))
10647 (file-name (string-append "java-cofoja-" version "-checkout"))
10648 (sha256
10649 (base32
10650 "0p7sz8y5xgpi5rx1qwn6587fkd52qr3ha3ybh14gqcyxhikl525w"))))
10651 (build-system ant-build-system)
10652 (arguments
10653 `(#:build-target "dist"
10654 #:test-target "test"
10655 #:jdk ,icedtea-8
10656 #:make-flags
10657 (list "-Ddist.dir=dist")
10658 #:modules ((guix build ant-build-system)
10659 (guix build java-utils)
10660 (guix build utils)
10661 (srfi srfi-1)
10662 (ice-9 match))
10663 #:phases
10664 (modify-phases %standard-phases
10665 ;; The bulid system ignores the class path the ant-build-system sets
10666 ;; up and instead expects to find all dependencies in the "lib"
10667 ;; directory.
10668 (add-after 'unpack 'create-libdir
10669 (lambda* (#:key inputs #:allow-other-keys)
10670 (mkdir-p "lib")
10671 (for-each
10672 (lambda (file)
10673 (let ((target (string-append "lib/" (basename file))))
10674 (unless (file-exists? target)
10675 (symlink file target))))
10676 (append-map (match-lambda
10677 ((label . dir)
10678 (find-files dir "\\.jar$")))
10679 inputs))
10680 #t))
10681 (replace 'install (install-jars "dist")))))
10682 (inputs
10683 (list java-asm))
10684 (native-inputs
10685 (list java-junit))
10686 (home-page "https://github.com/nhatminhle/cofoja")
10687 (synopsis "Contracts for Java")
10688 (description "Contracts for Java, or Cofoja for short, is a contract
10689programming framework and test tool for Java, which uses annotation processing
10690and bytecode instrumentation to provide run-time checking. (In particular,
10691this is not a static analysis tool.)")
10692 (license license:lgpl3+)))
10693
10694(define-public java-aopalliance
10695 (package
10696 (name "java-aopalliance")
10697 (version "1.0")
10698 (source (origin
10699 (method git-fetch)
10700 ;; Note: this git repository is not official, but contains the
10701 ;; source code that is in the CVS repository. Downloading the
10702 ;; tarball from sourceforge is undeterministic, and the cvs download
10703 ;; fails.
10704 (uri (git-reference
10705 (url "https://github.com/hoverruan/aopalliance")
10706 (commit "0d7757ae204e5876f69431421fe9bc2a4f01e8a0")))
10707 (file-name (string-append name "-" version))
10708 (sha256
10709 (base32
10710 "0rsg2b0v3hxlq2yk1i3m2gw3xwq689j3cwx9wbxvqfpdcjbca0qr"))))
10711 (build-system ant-build-system)
10712 (arguments
10713 `(#:jar-name "java-aopalliance.jar"
10714 #:jdk ,icedtea-8
10715 #:tests? #f; no tests
10716 #:source-dir "aopalliance/src/main"
10717 #:phases
10718 (modify-phases %standard-phases
10719 (add-before 'install 'create-pom
10720 (generate-pom.xml "pom.xml" "aopalliance" "aopalliance" ,version))
10721 (replace 'install
10722 (install-from-pom "pom.xml")))))
10723 (home-page "https://aopalliance.sourceforge.net")
10724 (synopsis "Aspect-Oriented Programming")
10725 (description "The AOP Alliance project is a joint project between several
10726software engineering people who are interested in Aspect-Oriented Programming
10727(AOP) and Java.")
10728 (license license:public-domain)))
10729
10730(define-public java-javax-inject
10731 (package
10732 (name "java-javax-inject")
10733 (version "1")
10734 (source (origin
10735 (method git-fetch)
10736 (uri (git-reference
10737 (url "https://github.com/javax-inject/javax-inject")
10738 (commit version)))
10739 (file-name (git-file-name name version))
10740 (sha256
10741 (base32
10742 "1rspl0nkvk1jif6nccikw93xic6ljj2b6kpy2mffwi2mnvc13j7x"))))
10743 (build-system ant-build-system)
10744 (arguments
10745 `(#:jar-name "java-javax-inject.jar"
10746 #:tests? #f; no tests
10747 #:phases
10748 (modify-phases %standard-phases
10749 (replace 'install
10750 (install-from-pom "pom.xml")))))
10751 (home-page "https://github.com/javax-inject/javax-inject")
10752 (synopsis "JSR-330: Dependency Injection for Java")
10753 (description "This package specifies a means for obtaining objects in such
10754a way as to maximize reusability, testability and maintainability compared to
10755traditional approaches such as constructors, factories, and service locators
10756(e.g., JNDI). This process, known as dependency injection, is beneficial to
10757most nontrivial applications.
10758
10759Many types depend on other types. For example, a @var{Stopwatch} might depend
10760on a @var{TimeSource}. The types on which a type depends are known as its
10761dependencies. The process of finding an instance of a dependency to use at run
10762time is known as resolving the dependency. If no such instance can be found,
10763the dependency is said to be unsatisfied, and the application is broken.")
10764 (license license:asl2.0)))
10765
10766(define-public java-guice
10767 (package
10768 (name "java-guice")
10769 (version "4.1")
10770 (source (origin
10771 (method git-fetch)
10772 (uri (git-reference
10773 (url "https://github.com/google/guice")
10774 (commit version)))
10775 (file-name (git-file-name name version))
10776 (modules '((guix build utils)))
10777 (snippet
10778 `(begin
10779 (for-each delete-file (find-files "." ".*.jar")) #t))
10780 (sha256
10781 (base32
10782 "18im5hdfl4q1b9chww2s1ii60sn3ydyyar32a2sf2p2g8zlbdswq"))))
10783 (build-system ant-build-system)
10784 (arguments
10785 `(#:jar-name "java-guice.jar"
10786 #:jdk ,icedtea-8
10787 #:tests? #f; FIXME: tests are not in a java sub directory
10788 #:source-dir "core/src"
10789 #:phases
10790 (modify-phases %standard-phases
10791 (add-after 'unpack 'make-files-writable
10792 (lambda _
10793 (for-each make-file-writable (find-files "."))
10794 #t))
10795 (replace 'install
10796 (install-from-pom "core/pom.xml")))))
10797 (propagated-inputs
10798 (list java-aopalliance
10799 java-cglib
10800 java-guava
10801 java-javax-inject
10802 java-guice-parent-pom))
10803 (home-page "https://github.com/google/guice")
10804 (synopsis "Lightweight dependency injection framework")
10805 (description "Guice is a lightweight dependency injection framework for
10806Java 6 and above.")
10807 (license license:asl2.0)))
10808
10809(define-public java-guice-servlet
10810 (package
10811 (inherit java-guice)
10812 (name "java-guice-servlet")
10813 (arguments
10814 `(#:jar-name "guice-servlet.jar"
10815 #:source-dir "extensions/servlet/src/"
10816 #:jdk ,icedtea-8
10817 #:tests? #f ; FIXME: not in a java subdir
10818 #:phases
10819 (modify-phases %standard-phases
10820 (add-after 'unpack 'make-files-writable
10821 (lambda _
10822 (for-each make-file-writable (find-files "."))
10823 #t)))))
10824 (inputs
10825 `(("guice" ,java-guice)
10826 ("servlet" ,java-classpathx-servletapi)
10827 ,@(package-inputs java-guice)))))
10828
10829(define java-guice-parent-pom
10830 (package
10831 (inherit java-guice)
10832 (name "java-guice-parent-pom")
10833 (arguments
10834 `(#:tests? #f
10835 #:phases
10836 (modify-phases %standard-phases
10837 (delete 'configure)
10838 (delete 'build)
10839 (add-after 'install 'install-extensions
10840 (install-pom-file "extensions/pom.xml"))
10841 (replace 'install
10842 (install-pom-file "pom.xml")))))
10843 (propagated-inputs
10844 `(("java-google-parent-pom" ,java-google-parent-pom-5)))))
10845
10846(define java-google-parent-pom-5
10847 (package
10848 (name "java-google-parent-pom")
10849 (version "5")
10850 (source (origin
10851 (method git-fetch)
10852 (uri (git-reference
10853 (url "https://github.com/google/google-maven-parents")
10854 (commit (string-append "google-" version))))
10855 (file-name (git-file-name name version))
10856 (sha256
10857 (base32
10858 "0zb7hx24p8k8rfdvix2vsbfqn73jhrycdndvhf8j5gbii9wbqibv"))))
10859 (build-system ant-build-system)
10860 (arguments
10861 `(#:tests? #f
10862 #:phases
10863 (modify-phases %standard-phases
10864 (delete 'configure)
10865 (delete 'build)
10866 (replace 'install
10867 (install-pom-file "pom.xml")))))
10868 (home-page "https://github.com/google/google-maven-parents")
10869 (synopsis "Google parent pom")
10870 (description "This package contains the Maven parent POM for other Google
10871Java projects.")
10872 (license license:asl2.0)))
10873
10874(define-public java-assertj
10875 (package
10876 (name "java-assertj")
10877 (version "3.8.0")
10878 (source (origin
10879 (method git-fetch)
10880 (uri (git-reference
10881 (url "https://github.com/joel-costigliola/assertj-core")
10882 (commit (string-append "assertj-core-" version))))
10883 (file-name (git-file-name name version))
10884 (sha256
10885 (base32
10886 "1k35cg2in7pzk4pbdjryr0pll5lgk1r6ngrn0j8cdlgi7w8zh2d1"))))
10887 (build-system ant-build-system)
10888 (arguments
10889 `(#:jar-name "java-assertj.jar"
10890 #:jdk ,icedtea-8
10891 #:source-dir "src/main/java"
10892 #:tests? #f)); depends on tng-junit which depends on assertj
10893 (inputs
10894 `(("cglib" ,java-cglib)
10895 ("junit" ,java-junit)
10896 ("hamcrest" ,java-hamcrest-core)))
10897 (native-inputs
10898 `(("mockito" ,java-mockito-1)))
10899 (home-page "https://joel-costigliola.github.io/assertj/index.html")
10900 (synopsis "Fluent assertions for java")
10901 (description "AssertJ core is a Java library that provides a fluent
10902interface for writing assertions. Its main goal is to improve test code
10903readability and make maintenance of tests easier.")
10904 (license license:asl2.0)))
10905
10906(define-public java-jboss-javassist
10907 (package
10908 (name "java-jboss-javassist")
10909 (version "3.21.0")
10910 (source (origin
10911 (method git-fetch)
10912 (uri (git-reference
10913 (url "https://github.com/jboss-javassist/javassist")
10914 (commit
10915 (string-append "rel_"
10916 (string-map
10917 (lambda (x) (if (eq? x #\.) #\_ x)) version)
10918 "_ga"))))
10919 (file-name (git-file-name name version))
10920 (sha256
10921 (base32
10922 "0h3zlcyqiaq01fspm69h7vki67raw305w89p4ha8vlhpzw02qifm"))
10923 (modules '((guix build utils)))
10924 (snippet
10925 '(begin
10926 (delete-file "javassist.jar")))))
10927 (build-system ant-build-system)
10928 (arguments
10929 `(#:jar-name "java-jboss-javassist.jar"
10930 #:jdk ,icedtea-8
10931 #:source-dir "src/main"
10932 #:tests? #f; FIXME: requires junit-awtui and junit-swingui from junit3
10933 #:phases
10934 (modify-phases %standard-phases
10935 (add-after 'unpack 'make-files-writable
10936 (lambda _
10937 (for-each make-file-writable (find-files "."))
10938 #t)))))
10939 (native-inputs
10940 `(("junit" ,java-junit)))
10941 (home-page "https://github.com/jboss-javassist/javassist")
10942 (synopsis "Java bytecode engineering toolkit")
10943 (description "Javassist (JAVA programming ASSISTant) makes Java bytecode
10944manipulation simple. It is a class library for editing bytecodes in Java; it
10945enables Java programs to define a new class at runtime and to modify a class
10946file when the JVM loads it.")
10947 (license (list license:gpl2 license:cddl1.0)))); either gpl2 only or cddl.
10948
10949(define-public java-jcommander
10950 (package
10951 (name "java-jcommander")
10952 (version "1.71")
10953 (source (origin
10954 (method git-fetch)
10955 (uri (git-reference
10956 (url "https://github.com/cbeust/jcommander")
10957 (commit version)))
10958 (file-name (git-file-name name version))
10959 (sha256
10960 (base32
10961 "12vcpc19sd7jhvjgp7xz1qjanfix162xb3x2q5zah93rjklj1h57"))))
10962 (build-system ant-build-system)
10963 (arguments
10964 `(#:jar-name "java-jcommander.jar"
10965 #:jdk ,icedtea-8
10966 #:tests? #f; requires testng which depends on jcommander
10967 #:source-dir "src/main/java"))
10968 (home-page "https://jcommander.org")
10969 (synopsis "Command line parameters parser")
10970 (description "JCommander is a very small Java framework that makes it
10971trivial to parse command line parameters. Parameters are declared with
10972annotations.")
10973 (license license:asl2.0)))
10974
10975(define-public java-bsh
10976 (package
10977 (name "java-bsh")
10978 (version "2.1.1")
10979 (source (origin
10980 (method git-fetch)
10981 (uri (git-reference
10982 (url "https://github.com/beanshell/beanshell")
10983 (commit version)))
10984 (file-name (git-file-name name version))
10985 (sha256
10986 (base32
10987 "1a6y46yz2ba4mnlfv4bpd5pmzhgxrzk3s10xp05jz377nbp2izwg"))
10988 (modules '((guix build utils)))
10989 (snippet
10990 '(begin
10991 ;; Delete bundled third-party jar archives.
10992 (for-each delete-file (find-files "." ".*.jar$"))
10993 (for-each (lambda (file) (chmod file #o644))
10994 (find-files "." "."))
10995 #t))))
10996 (build-system ant-build-system)
10997 (arguments
10998 `(#:build-target "jarall"
10999 #:test-target "junit-tests-all"
11000 #:make-flags (list "-DDATE" "(no date for reproducibility)")
11001 #:phases
11002 (modify-phases %standard-phases
11003 (add-before 'check 'fix-test
11004 (lambda _
11005 (substitute* "tests/junitTests/src/bsh/Issue_55_Test.java"
11006 ((" BshScriptEngineFactory") " bsh.engine.BshScriptEngineFactory"))))
11007 (replace 'install
11008 (install-from-pom "pom.xml")))))
11009 (inputs
11010 (list java-classpathx-servletapi java-commons-bsf))
11011 (native-inputs
11012 (list java-junit javacc-3))
11013 (home-page "http://beanshell.org/")
11014 (synopsis "Lightweight Scripting for Java")
11015 (description "BeanShell is a small, free, embeddable Java source
11016interpreter with object scripting language features, written in Java.
11017BeanShell dynamically executes standard Java syntax and extends it with common
11018scripting conveniences such as loose types, commands, and method closures like
11019those in Perl and JavaScript.")
11020 (license license:asl2.0)))
11021
11022(define-public java-fest-util
11023 (package
11024 (name "java-fest-util")
11025 (version "1.2.5")
11026 (source (origin
11027 (method git-fetch)
11028 (uri (git-reference
11029 (url "https://github.com/alexruiz/fest-util/")
11030 (commit (string-append "fest-util-" version))))
11031 (file-name (git-file-name name version))
11032 (sha256
11033 (base32
11034 "02kgal7v85snyyvcsxvn4qphid455f4smh2wri1il8d9asw0djbz"))))
11035 (build-system ant-build-system)
11036 (arguments
11037 `(#:jar-name "java-fest-util.jar"
11038 #:source-dir "src/main/java"))
11039 (native-inputs
11040 `(("junit" ,java-junit)
11041 ("hamcrest" ,java-hamcrest-core)))
11042 (home-page "https://github.com/alexruiz/fest-util")
11043 (synopsis "FEST common utilities")
11044 (description "Common utilities used in all FEST module.")
11045 (license license:asl2.0)))
11046
11047(define-public java-fest-test
11048 (package
11049 (name "java-fest-test")
11050 (version "2.1.0")
11051 (source (origin
11052 (method git-fetch)
11053 (uri (git-reference
11054 (url "https://github.com/alexruiz/fest-test/")
11055 (commit (string-append "fest-test-" version))))
11056 (file-name (git-file-name name version))
11057 (sha256
11058 (base32
11059 "0mg1d2jfh7kbx2c40dchbjr6d8pv59snsyb13mfxsr7xk5n69qbn"))))
11060 (build-system ant-build-system)
11061 (arguments
11062 `(#:jar-name "java-fest-test.jar"
11063 #:source-dir "src/main/java"
11064 #:tests? #f)); no tests
11065 (inputs
11066 `(("junit" ,java-junit)))
11067 (home-page "https://github.com/alexruiz/fest-test")
11068 (synopsis "Common FEST testing infrastructure")
11069 (description "Fest-test contains the common FEST testing infrastructure.")
11070 (license license:asl2.0)))
11071
11072(define-public java-fest-assert
11073 (package
11074 (name "java-fest-assert")
11075 (version "2.0M10")
11076 (source (origin
11077 (method git-fetch)
11078 (uri (git-reference
11079 (url "https://github.com/alexruiz/fest-assert-2.x/")
11080 (commit (string-append "fest-assert-core-" version))))
11081 (file-name (git-file-name name version))
11082 (sha256
11083 (base32
11084 "1cp8zzyag3s85fz2w68sda9zzaal1y5f9wl8g72wkm12an40w6by"))))
11085 (build-system ant-build-system)
11086 (arguments
11087 `(#:jar-name "java-fest-assert.jar"
11088 #:source-dir "src/main/java"
11089 #:test-exclude
11090 (list
11091 "**/Abstract*.java"
11092 "**/*BaseTest.java"
11093 ;; Unable to set MockitoNamingPolicy on cglib generator which creates FastClasses
11094 "**/MessageFormatter_format_Test.java"
11095 "**/internal/*/*_assert*_Test.java")))
11096 (inputs
11097 (list java-fest-util))
11098 (native-inputs
11099 (list java-junit
11100 java-fest-test
11101 java-hamcrest-core
11102 java-mockito-1
11103 java-cglib
11104 java-objenesis))
11105 (home-page "https://github.com/alexruiz/fest-assert-2.x")
11106 (synopsis "FEST fluent assertions")
11107 (description "FEST-Assert provides a fluent interface for assertions.")
11108 (license license:asl2.0)))
11109
11110(define-public java-testng
11111 (package
11112 (name "java-testng")
11113 (version "6.14.3")
11114 (source (origin
11115 (method git-fetch)
11116 (uri (git-reference
11117 (url "https://github.com/cbeust/testng")
11118 (commit version)))
11119 (file-name (string-append name "-" version "-checkout"))
11120 (sha256
11121 (base32
11122 "0y6vq30i5g276kw0v2bhbvci22ijg7ax49ap2611yqlhbs4d6dqv"))))
11123 (build-system ant-build-system)
11124 (arguments
11125 (list
11126 #:jdk icedtea-8; java.util.function
11127 #:jar-name "java-testng.jar"
11128 #:source-dir "src/main/java"
11129 #:phases
11130 '(modify-phases %standard-phases
11131 (add-after 'unpack 'delete-failing-tests
11132 (lambda _
11133 ;; FIXME: I don't know why these tests fail
11134 (substitute* "src/test/resources/testng.xml"
11135 ;; expected:<[0]> but was:<[3]>
11136 (("<class name=\"test.configuration.github1625.TestRunnerIssue1625\"/>") "")
11137 ;; expected [3] but found [2]
11138 (("<class name=\"test.serviceloader.ServiceLoaderTest\" />") "")
11139 ;; This is a parallel test and we've observed that it fails
11140 ;; sometimes.
11141 (("<class name=\"test.dataprovider.DataProviderTest\"/>") ""))))
11142 ;; We don't have groovy
11143 (add-after 'unpack 'delete-groovy-tests
11144 (lambda _
11145 (delete-file-recursively "src/test/java/test/dependent/issue1648/")
11146 (substitute* "src/test/resources/testng.xml"
11147 (("<class name=\"test.dependent.issue1648.TestRunner\"/>") ""))))
11148 (add-before 'build 'copy-resources
11149 (lambda _
11150 (copy-recursively "src/main/resources" "build/classes")))
11151 (add-before 'check 'copy-test-resources
11152 (lambda _
11153 (copy-recursively "src/test/resources" "build/test-classes")))
11154 (replace 'check
11155 (lambda _
11156 (invoke "ant" "compile-tests")
11157 ;; we don't have groovy
11158 (substitute* "src/test/resources/testng.xml"
11159 (("<class name=\"test.groovy.GroovyTest\" />") ""))
11160 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11161 ":build/classes"
11162 ":build/test-classes")
11163 "-Dtest.resources.dir=src/test/resources"
11164 "org.testng.TestNG" "src/test/resources/testng.xml"))))))
11165 (propagated-inputs
11166 (list java-junit
11167 java-jsr305
11168 java-bsh
11169 java-jcommander
11170 java-guice
11171 java-snakeyaml))
11172 (native-inputs
11173 (list java-guava
11174 java-javax-inject
11175 java-hamcrest-all
11176 java-assertj
11177 java-mockito-1
11178 java-cglib
11179 java-aopalliance))
11180 (home-page "https://testng.org")
11181 (synopsis "Testing framework")
11182 (description "TestNG is a testing framework inspired from JUnit and NUnit
11183but introducing some new functionalities that make it more powerful and easier
11184to use.")
11185 (license license:asl2.0)))
11186
11187(define-public java-jnacl
11188 (let ((commit "094e819afdd63ea81a499b3bcb42a271006bebd9")
11189 (revision "2"))
11190 (package
11191 (name "java-jnacl")
11192 (version (string-append "0.1.0-" revision "." (string-take commit 7)))
11193 (source (origin
11194 (method git-fetch)
11195 (uri (git-reference
11196 (url "https://github.com/neilalexander/jnacl")
11197 (commit commit)))
11198 (file-name (git-file-name name version))
11199 (sha256
11200 (base32
11201 "1d6g6xhn83byv5943n7935wwjsk0ibk0qdvqgr699qqgqqmwisbb"))))
11202 (build-system ant-build-system)
11203 (arguments
11204 `(#:jar-name "jnacl.jar"
11205 #:source-dir "src/main/java"
11206 #:jdk ,icedtea-8
11207 #:phases
11208 (modify-phases %standard-phases
11209 (add-before 'build 'fix-tests
11210 (lambda _
11211 (substitute* '("src/test/java/com/neilalexander/jnacl/NaClTest.java"
11212 "src/test/java/com/neilalexander/jnacl/NaclSecretBoxTest.java")
11213 (("assertions.Assertions") "assertions.api.Assertions"))
11214 #t))
11215 (replace 'check
11216 (lambda _
11217 (invoke "ant" "compile-tests")
11218 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11219 ":build/classes"
11220 ":build/test-classes")
11221 "org.testng.TestNG" "-testclass"
11222 "build/test-classes/com/neilalexander/jnacl/NaclSecretBoxTest.class")
11223 (invoke "java" "-cp" (string-append (getenv "CLASSPATH")
11224 ":build/classes"
11225 ":build/test-classes")
11226 "org.testng.TestNG" "-testclass"
11227 "build/test-classes/com/neilalexander/jnacl/NaClTest.class"))))))
11228 (native-inputs
11229 (list java-testng java-fest-util java-fest-assert))
11230 (home-page "https://github.com/neilalexander/jnacl")
11231 (synopsis "Java implementation of NaCl")
11232 (description "Pure Java implementation of the NaCl: Networking and
11233Cryptography library.")
11234 (license license:bsd-2))))
11235
11236(define-public java-mvel2
11237 (package
11238 (name "java-mvel2")
11239 (version "2.3.1")
11240 (source (origin
11241 (method url-fetch)
11242 (uri (string-append "https://github.com/mvel/mvel/archive/mvel2-"
11243 version ".Final.tar.gz"))
11244 (sha256
11245 (base32
11246 "01ph5s9gm16l2qz58lg21w6fna7xmmrj7f9bzqr1jim7h9557d3z"))))
11247 (build-system ant-build-system)
11248 (arguments
11249 `(#:jar-name "mvel2.jar"
11250 #:source-dir "src/main/java"
11251 #:test-exclude
11252 (list "**/Abstract*.java"
11253 ;; Base class with no tests
11254 "**/MVELThreadTest.java")
11255 #:phases
11256 (modify-phases %standard-phases
11257 (add-after 'install 'install-bin
11258 (lambda* (#:key outputs #:allow-other-keys)
11259 (let ((bin (string-append (assoc-ref outputs "out") "/bin")))
11260 (mkdir-p bin)
11261 (with-output-to-file (string-append bin "/mvel2")
11262 (lambda _
11263 (display
11264 (string-append
11265 "#!" (which "bash") "\n"
11266 "if [ \"$#\" -ne \"2\" ]; then\n"
11267 "echo 'Usage: mvel2 <script> <out.dir>'\n"
11268 "exit\n"
11269 "fi\n"
11270 "java -Dout.dir=$2 -cp " (getenv "CLASSPATH")
11271 ":" (assoc-ref outputs "out") "/share/java/mvel2.jar"
11272 " org.mvel2.sh.Main $1"))))
11273 (chmod (string-append bin "/mvel2") #o755))
11274 #t)))))
11275 (native-inputs
11276 `(("junit" ,java-junit)
11277 ("hamcrest" ,java-hamcrest-core)))
11278 (home-page "https://github.com/mvel/mvel")
11279 (synopsis "MVFLEX Expression Language")
11280 (description "MVEL has largely been inspired by Java syntax, but has some
11281fundamental differences aimed at making it more efficient as an expression
11282language, such as operators that directly support collection, array and string
11283matching, as well as regular expressions. MVEL is used to evaluate expressions
11284written using Java syntax.
11285
11286In addition to the expression language, MVEL serves as a templating language for
11287configuration and string construction.")
11288 (license license:asl2.0)))
11289
11290(define-public java-commons-jexl-2
11291 (package
11292 (name "java-commons-jexl")
11293 (version "2.1.1")
11294 (source (origin
11295 (method url-fetch)
11296 (uri (string-append "mirror://apache/commons/jexl/source/"
11297 "commons-jexl-" version "-src.tar.gz"))
11298 (sha256
11299 (base32
11300 "1ai7632bwwaxglb0nbpblpr2jw5g20afrsaq372ipkphi3ncy1jz"))))
11301 (build-system ant-build-system)
11302 (arguments
11303 `(#:jar-name "commons-jexl-2.jar"
11304 #:jdk ,icedtea-8
11305 #:source-dir "src/main/java"
11306 #:phases
11307 (modify-phases %standard-phases
11308 (add-before 'check 'disable-broken-tests
11309 (lambda* (#:key inputs #:allow-other-keys)
11310 (with-directory-excursion "src/test/java/org/apache/commons/jexl2/"
11311 (substitute* "ArithmeticTest.java"
11312 (("asserter.assertExpression\\(\"3 / 0\"") "//")
11313 (("asserter.assertExpression\\(\"imanull") "//"))
11314 ;; This test fails with "ambiguous method invocation"
11315 (delete-file "CacheTest.java")
11316 ;; This test doesn't have access to the temp directory
11317 (substitute* "ClassCreatorTest.java"
11318 (("java.io.tmpdir") "user.dir"))
11319 ;; This test fails in trying to detect whether it can run.
11320 (substitute* "ClassCreator.java"
11321 (("boolean canRun =.*") "boolean canRun = false;\n"))
11322 ;; ...and these tests depend on it.
11323 (delete-file "scripting/JexlScriptEngineOptionalTest.java")
11324 (delete-file "scripting/JexlScriptEngineTest.java"))
11325 #t))
11326 (add-before 'build 'run-javacc
11327 (lambda _
11328 (with-directory-excursion "src/main/java/org/apache/commons/jexl2/parser/"
11329 (invoke "java" "jjtree" "Parser.jjt")
11330 (invoke "java" "javacc" "Parser.jj"))
11331 #t)))))
11332 (inputs
11333 (list java-commons-logging-minimal))
11334 (native-inputs
11335 (list java-junit java-hamcrest-core javacc-4))
11336 (home-page "https://commons.apache.org/proper/commons-jexl/")
11337 (synopsis "Java Expression Language")
11338 (description "JEXL is a library intended to facilitate the implementation
11339of dynamic and scripting features in applications and frameworks written in
11340Java. JEXL implements an Expression Language based on some extensions to the
11341JSTL Expression Language supporting most of the constructs seen in
11342shell-script or ECMAScript. Its goal is to expose scripting features usable
11343by technical operatives or consultants working with enterprise platforms.")
11344 (license license:asl2.0)))
11345
11346(define-public java-lz4
11347 (package
11348 (name "java-lz4")
11349 (version "1.4.0")
11350 (source (origin
11351 (method git-fetch)
11352 (uri (git-reference
11353 (url "https://github.com/lz4/lz4-java")
11354 (commit version)))
11355 (file-name (git-file-name name version))
11356 (sha256
11357 (base32
11358 "0ydjakhv3cz34mfvv14qrh2ksdxifgjwwagjy7r46qr3f68hnf6y"))))
11359 (build-system ant-build-system)
11360 (arguments
11361 `(#:jar-name "lz4.jar"
11362 #:jdk ,icedtea-8
11363 #:source-dir "src/java:src/java-unsafe"
11364 #:tests? #f; FIXME: requires more dependencies
11365 #:phases
11366 (modify-phases %standard-phases
11367 (add-after 'unpack 'make-files-writable
11368 (lambda _
11369 (for-each make-file-writable (find-files "."))
11370 #t))
11371 (add-before 'configure 'generate-source
11372 (lambda _
11373 (with-directory-excursion "src/build/source_templates"
11374 (invoke "mvel2" "../gen_sources.mvel" "../../java"))
11375 #t)))))
11376 (native-inputs
11377 `(("mvel" ,java-mvel2)))
11378 (home-page "https://jpountz.github.io/lz4-java")
11379 (synopsis "Compression algorithm")
11380 (description "LZ4 - Java is a Java port of the popular lz4 compression
11381algorithms and xxHash hashing algorithm.")
11382 (license license:asl2.0)))
11383
11384(define-public java-bouncycastle
11385 (package
11386 (name "java-bouncycastle")
11387 (version "1.67")
11388 (source (origin
11389 (method git-fetch)
11390 (uri (git-reference
11391 (url "http://git.bouncycastle.org/repositories/bc-java")
11392 ;(url "https://github.com/bcgit/bc-java")
11393 (commit (string-append "r1rv" (substring version 2 4)))))
11394 (file-name (git-file-name name version))
11395 (sha256
11396 (base32
11397 "1449q7fyh03s1q0bqljcrhgacwcyqmg2bbvb3z084avgapwsainz"))
11398 (modules '((guix build utils)))
11399 (snippet
11400 '(begin
11401 (for-each delete-file
11402 (find-files "." "\\.jar$"))
11403 #t))))
11404 (build-system ant-build-system)
11405 (arguments
11406 `(#:jdk ,icedtea-8
11407 #:tests? #f
11408 #:phases
11409 (modify-phases %standard-phases
11410 (replace 'build
11411 (lambda _
11412 (invoke "ant" "-f" "ant/jdk15+.xml" "build-provider")
11413 (invoke "ant" "-f" "ant/jdk15+.xml" "build")))
11414 ;; FIXME: the tests freeze.
11415 ;; (replace 'check
11416 ;; (lambda _
11417 ;; (invoke "ant" "-f" "ant/jdk15+.xml" "test")))
11418 (replace 'install
11419 (install-jars "build/artifacts/jdk1.5/jars")))))
11420 (inputs
11421 (list java-javax-mail))
11422 (native-inputs
11423 `(("unzip" ,unzip)
11424 ("junit" ,java-junit)
11425 ("java-native-access" ,java-native-access)
11426 ("java-native-access-platform" ,java-native-access-platform)))
11427 (home-page "https://www.bouncycastle.org")
11428 (synopsis "Cryptographic library")
11429 (description "Bouncy Castle is a cryptographic library for the Java
11430programming language.")
11431 (license license:expat)))
11432
11433(define-public java-lmax-disruptor
11434 (package
11435 (name "java-lmax-disruptor")
11436 (version "3.4.4")
11437 (source (origin
11438 (method git-fetch)
11439 (uri (git-reference
11440 (url "https://github.com/LMAX-Exchange/disruptor")
11441 (commit version)))
11442 (file-name (git-file-name name version))
11443 (sha256
11444 (base32
11445 "02c5kp3n8a73dq9ay7ar53s1k3x61z9yzc5ikqb03m6snr1wpfqn"))))
11446 (build-system ant-build-system)
11447 (arguments
11448 `(#:jar-name "java-lmax-disruptor.jar"
11449 #:jdk ,icedtea-8
11450 #:tests? #f)); tests hang
11451 (inputs
11452 `(("junit" ,java-junit)
11453 ("java-hdrhistogram" ,java-hdrhistogram)
11454 ("java-jmock" ,java-jmock)
11455 ("java-jmock-legacy" ,java-jmock-legacy)
11456 ("java-jmock-junit4" ,java-jmock-junit4)
11457 ("java-hamcrest-all" ,java-hamcrest-all)))
11458 (native-inputs
11459 `(("cglib" ,java-cglib)
11460 ("objenesis" ,java-objenesis)))
11461 (home-page "https://www.lmax.com/disruptor")
11462 (synopsis "High performance inter-thread communication")
11463 (description "LMAX Disruptor is a software pattern and software component
11464for high performance inter-thread communication that avoids the need for
11465message queues or resource locking.")
11466 (license license:asl2.0)))
11467
11468(define-public java-conversant-disruptor
11469 (package
11470 (name "java-conversant-disruptor")
11471 (version "1.2.19")
11472 (source (origin
11473 (method git-fetch)
11474 (uri (git-reference
11475 (url "https://github.com/conversant/disruptor")
11476 (commit version)))
11477 (file-name (git-file-name name version))
11478 (sha256
11479 (base32
11480 "0gx1dm7sfg7pa05cs4qby10gfcplai5b5lf1f7ik1a76dh3vhl0g"))))
11481 (build-system ant-build-system)
11482 (arguments
11483 `(#:jar-name "java-conversant-disruptor.jar"
11484 #:source-dir "src/main/java"
11485 #:phases
11486 (modify-phases %standard-phases
11487 (add-before 'build 'copy-resources
11488 (lambda _
11489 (copy-recursively "src/main/resources" "build/classes")))
11490 (add-before 'build 'remove-module
11491 (lambda _
11492 (delete-file "src/main/java/module-info.java"))))))
11493 (native-inputs
11494 (list java-junit))
11495 (home-page "https://github.com/conversant/disruptor")
11496 (synopsis "High performance intra-thread communication")
11497 (description "Conversant Disruptor is the highest performing intra-thread
11498transfer mechanism available in Java. Conversant Disruptor is an implementation
11499of this type of ring buffer that has almost no overhead and that exploits a
11500particularly simple design.")
11501 (license license:asl2.0)))
11502
11503(define-public java-jctools-core-1
11504 (package
11505 (name "java-jctools-core")
11506 (version "1.2.1")
11507 (source (origin
11508 (method git-fetch)
11509 (uri (git-reference
11510 (url "https://github.com/JCTools/JCTools")
11511 (commit (string-append "v" version))))
11512 (file-name (git-file-name name version))
11513 (sha256
11514 (base32
11515 "105my29nwd4djvdllmq8s3jdzbyplbkxzwmddxiiilb4yqr1pghb"))))
11516 (build-system ant-build-system)
11517 (arguments
11518 `(#:jar-name "java-jctools-core.jar"
11519 #:source-dir "jctools-core/src/main/java"
11520 #:test-dir "jctools-core/src/test"
11521 ;; The tests timeout on some architectures.
11522 #:tests? ,(not (or (target-aarch64?)
11523 (%current-target-system)))))
11524 (native-inputs
11525 (list java-junit java-hamcrest-all))
11526 (home-page "https://github.com/JCTools/JCTools")
11527 (synopsis "Concurrency tools for Java")
11528 (description "This library implements concurrent data structures that are
11529not natively available in Java.")
11530 (license license:asl2.0)))
11531
11532(define-public java-commons-bcel
11533 (package
11534 (name "java-commons-bcel")
11535 (version "6.1")
11536 (source (origin
11537 (method url-fetch)
11538 (uri (string-append "mirror://apache/commons/bcel/source/bcel-"
11539 version "-src.tar.gz"))
11540 (sha256
11541 (base32
11542 "0j3x1rxd673k07psclk8k13rqh0x0mf2yy5qiwkiw4z3afa568jy"))))
11543 (build-system ant-build-system)
11544 (arguments
11545 `(#:jar-name "bcel.jar"
11546 #:jdk ,icedtea-8
11547 #:source-dir "src/main/java"
11548 #:test-dir "src/test/java"
11549 ;; FIXME: Tests require the unpackaged jna.
11550 #:tests? #f))
11551 (home-page "https://commons.apache.org/proper/commons-bcel/")
11552 (synopsis "Byte code engineering library")
11553 (description "The Byte Code Engineering Library (Apache Commons BCEL) is
11554intended to give users a convenient way to analyze, create, and
11555manipulate (binary) Java class files. Classes are represented by objects
11556which contain all the symbolic information of the given class: methods, fields
11557and byte code instructions, in particular.
11558
11559Such objects can be read from an existing file, be transformed by a
11560program (e.g. a class loader at run-time) and written to a file again. An
11561even more interesting application is the creation of classes from scratch at
11562run-time. The @dfn{Byte Code Engineering Library} (BCEL) may be also useful
11563if you want to learn about the @dfn{Java Virtual Machine} (JVM) and the format
11564of Java @code{.class} files.")
11565 (license license:asl2.0)))
11566
11567(define-public java-xerial-core
11568 (package
11569 (name "java-xerial-core")
11570 (version "2.1")
11571 (source (origin
11572 (method url-fetch)
11573 (uri (string-append "https://github.com/xerial/xerial-java/archive/"
11574 version ".tar.gz"))
11575 (file-name (string-append name "-" version ".tar.gz"))
11576 (sha256
11577 (base32
11578 "0d3g863i41bgalpa4xr3vm1h140l091n8iwgq5qvby5yivns9y8d"))))
11579 (build-system ant-build-system)
11580 (arguments
11581 `(#:jar-name "xerial-core.jar"
11582 #:source-dir "xerial-core/src/main/java"
11583 #:test-dir "xerial-core/src/test"
11584 #:phases
11585 (modify-phases %standard-phases
11586 (add-before 'build 'copy-resources
11587 (lambda _
11588 (copy-recursively "xerial-core/src/main/resources"
11589 "build/classes")
11590 #t)))))
11591 (native-inputs
11592 `(("junit" ,java-junit)
11593 ("hamcrest" ,java-hamcrest-core)))
11594 (home-page "https://github.com/xerial/xerial-java")
11595 (synopsis "Data management libraries for Java")
11596 (description "Xerial is a set of data management libraries for the Java
11597programming language. The ultimate goal of the Xerial project is to manage
11598everything as database, including class objects, text format data, data
11599streams, etc.")
11600 (license license:asl2.0)))
11601
11602(define-public java-byte-buddy-dep
11603 (package
11604 (name "java-byte-buddy-dep")
11605 (version "1.14.0")
11606 (source (origin
11607 (method git-fetch)
11608 (uri (git-reference
11609 (url "https://github.com/raphw/byte-buddy")
11610 (commit (string-append "byte-buddy-" version))))
11611 (file-name (git-file-name name version))
11612 (sha256
11613 (base32
11614 "03jmsnkjb9d3z9brqs8fc512hhs5b5iab3a5wbax9zi03dskgvh2"))))
11615 (build-system ant-build-system)
11616 (arguments
11617 `(#:jar-name "byte-buddy-dep.jar"
11618 #:source-dir "byte-buddy-dep/src/main/java"
11619 #:test-dir "byte-buddy-dep/src/test"
11620 #:tests? #f; would build java files that are incompatible with current jdk
11621 #:phases
11622 (modify-phases %standard-phases
11623 (add-before 'build 'remove-annotations
11624 (lambda _
11625 (with-directory-excursion "byte-buddy-dep/src/main/java/net/bytebuddy"
11626 (substitute* (find-files "." ".*.java")
11627 (("@EqualsAndHashCode.*") "")
11628 (("import lombok.EqualsAndHashCode;") "")
11629 (("@SuppressFBWarnings.*") "")
11630 (("import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;") ""))
11631 (substitute* '("description/type/TypeDescription.java"
11632 "dynamic/loading/ClassInjector.java")
11633 (("^ *value = .*") "")
11634 (("^ *justification = .*") ""))))))))
11635 (inputs
11636 (list java-asm-9 java-asm-commons-9 java-jsr305 java-native-access))
11637 (home-page "http://bytebuddy.net/")
11638 (synopsis "Runtime code generation for the Java virtual machine")
11639 (description "Byte Buddy is a code generation and manipulation library for
11640creating and modifying Java classes during the runtime of a Java application
11641and without the help of a compiler.")
11642 (license license:asl2.0)))
11643
11644(define-public java-powermock-reflect
11645 (package
11646 (name "java-powermock-reflect")
11647 (version "2.0.9")
11648 (source (origin
11649 (method git-fetch)
11650 (uri (git-reference
11651 (url "https://github.com/powermock/powermock")
11652 (commit (string-append "powermock-" version))))
11653 (file-name (git-file-name name version))
11654 (sha256
11655 (base32
11656 "03y8szi9iwxnv431z2mn2ivc1ak30vcvfvkyrwmfq7wq93bj2c5v"))
11657 (patches
11658 (search-patches "java-powermock-fix-java-files.patch"))))
11659 (build-system ant-build-system)
11660 (arguments
11661 `(#:jar-name "java-powermock-reflect.jar"
11662 #:source-dir "powermock-reflect/src/main/java"
11663 #:test-dir "powermock-reflect/src/test"))
11664 (inputs
11665 (list java-asm-9 java-objenesis))
11666 (native-inputs
11667 (list java-assertj java-cglib java-hamcrest-core java-junit))
11668 (home-page "https://github.com/powermock/powermock")
11669 (synopsis "Mock library extension framework")
11670 (description "PowerMock is a framework that extends other mock libraries
11671such as EasyMock with more powerful capabilities. PowerMock uses a custom
11672classloader and bytecode manipulation to enable mocking of static methods,
11673constructors, final classes and methods, private methods, removal of static
11674initializers and more. By using a custom classloader no changes need to be
11675done to the IDE or continuous integration servers which simplifies adoption.")
11676 (license license:asl2.0)))
11677
11678(define-public java-powermock-core
11679 (package
11680 (inherit java-powermock-reflect)
11681 (name "java-powermock-core")
11682 (arguments
11683 `(#:jar-name "java-powermock-core.jar"
11684 #:source-dir "powermock-core/src/main/java"
11685 #:test-dir "powermock-core/src/test"
11686 #:tests? #f; requires powermock-api
11687 #:jdk ,icedtea-8
11688 #:phases
11689 (modify-phases %standard-phases
11690 (add-before 'build 'copy-resources
11691 (lambda _
11692 (copy-recursively "powermock-core/src/main/resources"
11693 "build/classes")
11694 #t)))))
11695 (inputs
11696 (list java-asm-9
11697 java-byte-buddy-dep
11698 java-jboss-javassist
11699 java-powermock-reflect))
11700 (native-inputs
11701 (list java-assertj java-mockito-1 java-junit))))
11702
11703(define-public java-powermock-api-support
11704 (package
11705 (inherit java-powermock-reflect)
11706 (name "java-powermock-api-support")
11707 (build-system ant-build-system)
11708 (arguments
11709 `(#:jar-name "java-powermock-api-support.jar"
11710 #:jdk ,icedtea-8
11711 #:source-dir "powermock-api/powermock-api-support/src/main/java"
11712 #:tests? #f)); no tests
11713 (inputs
11714 (list java-powermock-core java-powermock-reflect))))
11715
11716(define-public java-powermock-modules-junit4-common
11717 (package
11718 (inherit java-powermock-reflect)
11719 (name "java-powermock-modules-junit4-common")
11720 (build-system ant-build-system)
11721 (arguments
11722 `(#:jar-name "java-powermock-modules-junit4-common.jar"
11723 #:jdk ,icedtea-8
11724 #:source-dir "powermock-modules/powermock-module-junit4-common/src/main/java"
11725 #:test-dir "powermock-modules/powermock-module-junit4-common/src/test"))
11726 (inputs
11727 (list java-cglib
11728 java-easymock
11729 java-hamcrest-core
11730 java-powermock-core
11731 java-powermock-reflect))))
11732
11733(define-public java-powermock-modules-junit4
11734 (package
11735 (inherit java-powermock-reflect)
11736 (name "java-powermock-modules-junit4")
11737 (build-system ant-build-system)
11738 (arguments
11739 `(#:jar-name "java-powermock-modules-junit4.jar"
11740 #:tests? #f; require easymock 4, which introduces a loop with testng
11741 #:source-dir "powermock-modules/powermock-module-junit4/src/main/java"
11742 #:test-dir "powermock-modules/powermock-module-junit4/src/test"
11743 #:phases
11744 (modify-phases %standard-phases
11745 (add-before 'build 'fix-junit-detection
11746 (lambda _
11747 ;; Our junit version is 4.12-SNAPSHOT
11748 (substitute* (find-files "powermock-modules/powermock-module-junit4"
11749 "PowerMockJUnit4MethodValidator.java")
11750 (("4.12") "4.12-SNAPSHOT"))
11751 #t)))))
11752 (inputs
11753 (list java-cglib
11754 java-powermock-core
11755 java-powermock-reflect
11756 java-powermock-modules-junit4-common))
11757 (native-inputs
11758 (list java-easymock
11759 java-hamcrest-core
11760 java-junit
11761 java-objenesis))))
11762
11763(define-public java-powermock-api-easymock
11764 (package
11765 (inherit java-powermock-reflect)
11766 (name "java-powermock-api-easymock")
11767 (build-system ant-build-system)
11768 (arguments
11769 `(#:jar-name "java-powermock-api-easymock.jar"
11770 #:jdk ,icedtea-8
11771 #:source-dir "powermock-api/powermock-api-easymock/src/main/java"
11772 #:tests? #f; no tests
11773 #:phases
11774 (modify-phases %standard-phases
11775 (add-before 'build 'fix-file
11776 (lambda _
11777 ;; FIXME: This looks wrong, but it fixes a build error.
11778 (with-directory-excursion "powermock-api/powermock-api-easymock"
11779 (substitute* "src/main/java/org/powermock/api/easymock/PowerMock.java"
11780 (("classLoader instanceof MockClassLoader") "false")
11781 (("\\(\\(MockClassLoader\\) classLoader\\).*;") ";")))
11782 #t)))))
11783 (inputs
11784 (list java-cglib
11785 java-easymock
11786 java-powermock-api-support
11787 java-powermock-core
11788 java-powermock-reflect))))
11789
11790(define-public java-jboss-jms-api-spec
11791 (package
11792 (name "java-jboss-jms-api-spec")
11793 (version "2.0")
11794 (source (origin
11795 (method url-fetch)
11796 (uri (string-append "https://github.com/jboss/jboss-jms-api_spec/"
11797 "archive/jboss-jms-api_" version
11798 "_spec-1.0.1.Final.tar.gz"))
11799 (sha256
11800 (base32
11801 "07bqblw9kq2i8q92bz70fvavq5xjfkaixl8xa0m0cypjgy82rb7m"))))
11802 (build-system ant-build-system)
11803 (arguments
11804 `(#:jar-name "java-jboss-jms-api_spec.jar"
11805 #:jdk ,icedtea-8
11806 #:source-dir "."
11807 #:tests? #f)); no tests
11808 (home-page "https://github.com/jboss/jboss-jms-api_spec")
11809 (synopsis "Java Message Service API specification")
11810 (description "Java Message Service (JMS) API is used to send messages
11811messages between two or more clients. It is a messaging standard that allows
11812application components to create, send, receive, and read messages.")
11813 ; either gpl2 only with GPL Classpath Exception, or cddl.
11814 (license (list license:gpl2 license:cddl1.0))))
11815
11816(define-public java-mail
11817 (package
11818 (name "java-mail")
11819 (version "1.6.0")
11820 (source (origin
11821 (method url-fetch)
11822 (uri (string-append "https://github.com/javaee/javamail/archive/"
11823 "JAVAMAIL-1_6_0.tar.gz"))
11824 (sha256
11825 (base32
11826 "1b4rg7fpj50ld90a71iz2m4gm3f5cnw18p3q3rbrrryjip46kx92"))))
11827 (build-system ant-build-system)
11828 (arguments
11829 `(#:jar-name "java-mail.jar"
11830 #:jdk ,icedtea-8
11831 #:source-dir "mail/src/main/java"
11832 #:test-dir "mail/src/test"
11833 #:test-exclude
11834 (list "**/CollectorFormatterTest.java"
11835 "**/CompactFormatterTest.java"
11836 "**/DurationFilterTest.java"
11837 "**/MailHandlerTest.java"
11838 "**/GetLocalAddressTest.java"
11839 ;; SSLHandshakeException: No appropriate protocol
11840 "**/WriteTimeoutSocketTest.java"
11841 ;; FIXME: both end with:
11842 ;; java.lang.ClassNotFoundException:
11843 ;; javax.mail.internet.MimeMultipartParseTest
11844 "**/MimeMultipartParseTest.java"
11845 "**/SearchTermSerializationTest.java")
11846 #:phases
11847 (modify-phases %standard-phases
11848 (add-before 'configure 'move-version.java
11849 (lambda _
11850 (copy-file "mail/src/main/resources/javax/mail/Version.java"
11851 "mail/src/main/java/javax/mail/Version.java")))
11852 (add-before 'build 'copy-resources
11853 (lambda _
11854 (copy-recursively "mail/src/main/resources/META-INF"
11855 "build/classes/META-INF"))))))
11856 (native-inputs
11857 (list java-junit java-hamcrest-core))
11858 (home-page "https://javaee.github.io/javamail/")
11859 (synopsis "Mail-related functionality in Java")
11860 (description "The JavaMail API provides a platform-independent and
11861protocol-independent framework to build mail and messaging applications.")
11862 ;; General Public License Version 2 only ("GPL") or the Common Development
11863 ;; and Distribution License("CDDL")
11864 (license (list license:cddl1.1
11865 license:gpl2)))); with classpath exception
11866
11867(define-public java-mapdb
11868 (package
11869 (name "java-mapdb")
11870 (version "1.0.9")
11871 (source (origin
11872 (method git-fetch)
11873 (uri (git-reference
11874 (url "https://github.com/jankotek/mapdb")
11875 (commit (string-append "mapdb-" version))))
11876 (file-name (git-file-name name version))
11877 (sha256
11878 (base32
11879 "1slb4h282jqvk16896lcvgm65pj3v6crcp2wvjdvad7nx7d2f1kv"))))
11880 (build-system ant-build-system)
11881 (arguments
11882 (list #:jar-name "mapdb.jar"
11883 #:source-dir "src/main/java"
11884 #:test-dir "src/test"
11885 #:test-exclude (list "**/ClosedThrowsExceptionTest.java"
11886 "**/ConcurrentMapInterfaceTest.java"
11887 "**/EngineTest.java"
11888 "**/Issue664Test.java"
11889 "**/MapInterfaceTest.java")
11890 #:phases #~(modify-phases %standard-phases
11891 (replace 'install (install-from-pom "pom.xml")))))
11892 (native-inputs (list java-junit))
11893 (home-page "https://mapdb.org/")
11894 (synopsis "Concurrent data structures")
11895 (description "MapDB provides concurrent maps, sets and queues backed by
11896disk storage or off-heap memory.")
11897 (license license:bsd-3)))
11898
11899(define-public java-jeromq
11900 (package
11901 (name "java-jeromq")
11902 (version "0.4.3")
11903 (source (origin
11904 (method git-fetch)
11905 (uri (git-reference
11906 (url "https://github.com/zeromq/jeromq")
11907 (commit (string-append "v" version))))
11908 (file-name (string-append name "-" version "-checkout"))
11909 (sha256
11910 (base32
11911 "1gxkp7lv2ahymgrqdw94ncq54bmp4m4sw5m1x9gkp7l5bxn0xsyj"))
11912 (patches (search-patches "java-jeromq-fix-tests.patch"))))
11913 (build-system ant-build-system)
11914 (arguments
11915 `(#:jar-name "java-jeromq.jar"
11916 #:source-dir "src/main/java"
11917 #:jdk ,icedtea-8
11918 #:test-exclude
11919 (list
11920 "**/Abstract*.java"
11921 ;; Requires network
11922 "**/ZBeaconTest.java"
11923 ;; Failures
11924 "**/DealerSpecTest.java"
11925 "**/CustomDecoderTest.java"
11926 "**/CustomEncoderTest.java"
11927 "**/ConnectRidTest.java"
11928 "**/ReqSpecTest.java"
11929 "**/PushPullSpecTest.java"
11930 "**/PubSubHwmTest.java"
11931 "**/RouterSpecTest.java"
11932 "**/ProxyTest.java")))
11933 (inputs
11934 (list java-jnacl))
11935 (native-inputs
11936 `(("java-hamcrest-core" ,java-hamcrest-core)
11937 ("junit" ,java-junit)))
11938 (home-page "https://zeromq.org/bindings:java")
11939 (synopsis "Java binding for 0MQ")
11940 (description "Jeromq provides the java bindings for 0MQ.")
11941 (license license:mpl2.0)))
11942
11943(define-public java-kafka-clients
11944 (package
11945 (name "java-kafka-clients")
11946 (version "1.1.1")
11947 (source (origin
11948 (method url-fetch)
11949 (uri (string-append "mirror://apache/kafka/" version "/kafka-"
11950 version "-src.tgz"))
11951 (sha256
11952 (base32
11953 "1jn62q7z383nwhzv4ippsddf98sa1gnkszjjncj4ii3r8rzgw566"))))
11954 (build-system ant-build-system)
11955 (arguments
11956 `(#:jar-name "java-kafka-clients.jar"
11957 #:jdk ,icedtea-8
11958 #:source-dir "clients/src/main/java"
11959 #:test-dir "clients/src/test"
11960 #:test-exclude
11961 (list
11962 ;; This file does not contain a class
11963 "**/IntegrationTest.java"
11964 ;; Requires network
11965 "**/ClientUtilsTest.java"
11966 ;; This test fails on i686
11967 "**/SerializationTest.java"
11968 ;; "protocol is disabled or cipher suites are inappropriate"
11969 "**/SslTransportLayerTest.java"
11970 ;; End with errors that seem related to our powermock
11971 "**/KafkaProducerTest.java"
11972 "**/BufferPoolTest.java"
11973 ;; Undeterministic failure, seems to affect mostly ci
11974 "**/GarbageCollectedMemoryPoolTest.java")))
11975 (inputs
11976 (list java-slf4j-api java-lz4))
11977 (native-inputs
11978 (list java-bouncycastle
11979 java-cglib
11980 java-easymock
11981 java-hamcrest-all
11982 java-jboss-javassist
11983 java-junit
11984 java-objenesis
11985 java-powermock-api-easymock
11986 java-powermock-api-support
11987 java-powermock-core
11988 java-powermock-modules-junit4
11989 java-powermock-modules-junit4-common
11990 java-snappy))
11991 (home-page "https://kafka.apache.org")
11992 (synopsis "Distributed streaming platform")
11993 (description "Kafka is a distributed streaming platform, which means:
11994@itemize
11995@item it can publish and subscribe to streams of records;
11996@item it can store streams of records in a fault-tolerant way;
11997@item it can process streams of records as they occur.
11998@end itemize")
11999 ;; Either cddl or gpl2 only.
12000 (license (list license:cddl1.1; actually cddl1.1
12001 license:gpl2)))); with classpath exception
12002
12003(define-public java-jdom
12004 (package
12005 (name "java-jdom")
12006 (version "1.1.3")
12007 (source (origin
12008 (method url-fetch)
12009 (uri (string-append "http://jdom.org/dist/binary/archive/jdom-"
12010 version ".tar.gz"))
12011 (sha256
12012 (base32
12013 "07wdpm3jwwc9q38kmdw40fvbmv6jzjrkrf8m0zqs58f79a672wfl"))))
12014 (build-system ant-build-system)
12015 (arguments
12016 `(#:build-target "package"
12017 #:tests? #f; tests are run as part of the build process
12018 #:phases
12019 (modify-phases %standard-phases
12020 (replace 'install
12021 (install-jars "build")))))
12022 (home-page "http://jdom.org/")
12023 (synopsis "Access, manipulate, and output XML data")
12024 (description "Java-based solution for accessing, manipulating, and
12025outputting XML data from Java code.")
12026 (license license:bsd-4)))
12027
12028(define-public java-geronimo-xbean-reflect
12029 (package
12030 (name "java-geronimo-xbean-reflect")
12031 (version "4.5")
12032 (source (origin
12033 (method svn-fetch)
12034 (uri (svn-reference
12035 (url "https://svn.apache.org/repos/asf/geronimo/xbean/tags/xbean-4.5/")
12036 (revision 1807396)))
12037 (file-name (string-append name "-" version))
12038 (sha256
12039 (base32
12040 "0zjqmsad4xk0iar23hdyvx19nxczybd2bh0i35xrafli5cmh720k"))))
12041 (build-system ant-build-system)
12042 (arguments
12043 `(#:jar-name "geronimo-xbean-reflect.jar"
12044 #:source-dir "xbean-reflect/src/main/java"
12045 #:test-dir "xbean-reflect/src/test"
12046 #:jdk ,icedtea-8
12047 #:test-exclude
12048 (list "**/Abstract*.java" "**/AsmParameterNameLoaderTest.java"
12049 "**/ObjectRecipeTest.java" "**/ParameterNameLoaderTest.java"
12050 "**/RecipeHelperTest.java" "**/XbeanAsmParameterNameLoaderTest.java")
12051 #:phases
12052 (modify-phases %standard-phases
12053 (add-before 'build 'fix-source
12054 (lambda _
12055 (let ((dir "xbean-reflect/src/main/java/org/apache/xbean/recipe/"))
12056 ;; org.apache.xbean.asm6 is actually repackaged java-asm
12057 (substitute* (string-append dir "XbeanAsmParameterNameLoader.java")
12058 (("org.apache.xbean.asm5") "org.objectweb.asm"))
12059 #t)))
12060 (replace 'install (install-from-pom "xbean-reflect/pom.xml")))))
12061 (inputs
12062 `(("asm" ,java-asm)
12063 ("log4j" ,java-log4j-api)
12064 ("log4j-1.2" ,java-log4j-1.2-api)
12065 ("log4j-core" ,java-log4j-core)
12066 ("logging" ,java-commons-logging-minimal)))
12067 (propagated-inputs
12068 (list java-geronimo-parent-pom))
12069 (native-inputs
12070 `(("junit" ,java-junit)))
12071 (home-page "https://geronimo.apache.org/maven/xbean/3.6/xbean-reflect/")
12072 (synopsis "Dependency injection helper")
12073 (description "Xbean-reflect provides very flexible ways to create objects
12074and graphs of objects for dependency injection frameworks")
12075 (license license:asl2.0)))
12076
12077(define java-geronimo-genesis-2.1
12078 (package
12079 (name "java-geronimo-genesis")
12080 (version "2.1")
12081 (source (origin
12082 (method svn-fetch)
12083 (uri (svn-reference
12084 (url (string-append "https://svn.apache.org/repos/asf/"
12085 "geronimo/genesis/tags/genesis-"
12086 version))
12087 (revision 1807396)))
12088 (file-name (string-append name "-" version "-source"))
12089 (sha256
12090 (base32
12091 "1mky4zyl2xsqlgrkairaj5971byvhwk2z9bq8snsgvlr11ydc0zf"))))
12092 (build-system ant-build-system)
12093 (arguments
12094 `(#:tests? #f
12095 #:phases
12096 (modify-phases %standard-phases
12097 (delete 'configure)
12098 (delete 'build)
12099 (replace 'install
12100 (install-pom-file "pom.xml"))
12101 (add-after 'install 'install-enforcer-rules
12102 (install-pom-file "genesis-enforcer-rules/pom.xml"))
12103 (add-after 'install 'install-flava
12104 (install-pom-file "genesis-default-flava/pom.xml"))
12105 (add-after 'install 'install-packaging
12106 (install-pom-file "genesis-packaging/pom.xml"))
12107 (add-after 'install-flava 'install-flava-java4
12108 (install-pom-file "genesis-default-flava/genesis-java1.4-flava/pom.xml"))
12109 (add-after 'install-flava 'install-flava-java5
12110 (install-pom-file "genesis-default-flava/genesis-java5-flava/pom.xml"))
12111 (add-after 'install-flava 'install-flava-java6
12112 (install-pom-file "genesis-default-flava/genesis-java6-flava/pom.xml")))))
12113 (propagated-inputs
12114 `(("apache-parent-pom" ,apache-parent-pom-13)))
12115 (home-page "https://geronimo.apache.org")
12116 (synopsis "Collection of maven POM files for the Geronimo project")
12117 (description "Apache Geronimo is a server runtime. This package contains
12118only pom files used by other components in the Geronimo project.")
12119 (license license:asl2.0)))
12120
12121(define java-geronimo-parent-pom
12122 (package
12123 (inherit java-geronimo-xbean-reflect)
12124 (name "java-geronimo-parent-pom")
12125 (arguments
12126 `(#:tests? #f
12127 #:phases
12128 (modify-phases %standard-phases
12129 (delete 'configure)
12130 (delete 'build)
12131 (replace 'install
12132 (install-pom-file "pom.xml")))))
12133 (propagated-inputs
12134 `(("java-geronimo-genesis" ,java-geronimo-genesis-2.1)))))
12135
12136(define-public java-geronimo-xbean-bundleutils
12137 (package
12138 (inherit java-geronimo-xbean-reflect)
12139 (name "java-geronimo-xbean-bundleutils")
12140 (arguments
12141 `(#:jar-name "geronimo-xbean-bundleutils.jar"
12142 #:source-dir "xbean-bundleutils/src/main/java"
12143 #:test-dir "xbean-bundleutils/src/test"
12144 #:phases
12145 (modify-phases %standard-phases
12146 (add-before 'build 'fix-java
12147 (lambda _
12148 ;; We use a more recent version of osgi, so this file requires
12149 ;; more interface method implementations.
12150 (substitute* "xbean-bundleutils/src/main/java/org/apache/xbean/osgi/bundle/util/DelegatingBundleContext.java"
12151 (("import org.osgi.framework.ServiceRegistration;")
12152 "import org.osgi.framework.ServiceRegistration;
12153import org.osgi.framework.ServiceFactory;
12154import java.util.Collection;
12155import org.osgi.framework.ServiceObjects;")
12156 (("public Bundle getBundle\\(\\)")
12157 "@Override
12158public <S> ServiceObjects<S> getServiceObjects(ServiceReference<S> reference) {
12159 throw new UnsupportedOperationException();
12160}
12161@Override
12162public <S> ServiceRegistration<S> registerService(Class<S> clazz,
12163 ServiceFactory<S> factory, Dictionary<String, ?> properties) {
12164 throw new UnsupportedOperationException();
12165}
12166public Bundle getBundle()"))
12167 #t)))))
12168 (inputs
12169 `(("java-slf4j" ,java-slf4j-api)
12170 ("java-asm" ,java-asm)
12171 ("java-osgi-framework" ,java-osgi-framework)
12172 ("java-eclipse-osgi" ,java-eclipse-osgi)
12173 ("java-osgi-service-packageadmin" ,java-osgi-service-packageadmin)))))
12174
12175(define-public java-geronimo-xbean-asm-util
12176 (package
12177 (inherit java-geronimo-xbean-reflect)
12178 (name "java-geronimo-xbean-asm-util")
12179 (arguments
12180 `(#:jar-name "geronimo-xbean-asm-util.jar"
12181 #:source-dir "xbean-asm-util/src/main/java"
12182 #:tests? #f)); no tests
12183 (inputs
12184 (list java-asm))
12185 (native-inputs '())))
12186
12187(define-public java-geronimo-xbean-finder
12188 (package
12189 (inherit java-geronimo-xbean-reflect)
12190 (name "java-geronimo-xbean-finder")
12191 (arguments
12192 `(#:jar-name "geronimo-xbean-finder.jar"
12193 #:source-dir "xbean-finder/src/main/java"
12194 #:test-dir "xbean-finder/src/test"))
12195 (inputs
12196 (list java-slf4j-api
12197 java-asm
12198 java-geronimo-xbean-bundleutils
12199 java-geronimo-xbean-asm-util
12200 java-osgi-service-packageadmin
12201 java-osgi-framework))
12202 (native-inputs
12203 (list java-junit java-hamcrest-core))))
12204
12205(define-public java-gson
12206 (package
12207 (name "java-gson")
12208 (version "2.8.2")
12209 (source (origin
12210 (method url-fetch)
12211 (uri (string-append "https://github.com/google/gson/archive/"
12212 "gson-parent-" version ".tar.gz"))
12213 (sha256
12214 (base32
12215 "1j4qnp7v046q0k48c4kyf69sxaasx2h949d3cqwsm3kzxms3x0f9"))))
12216 (build-system ant-build-system)
12217 (arguments
12218 `(#:jar-name "gson.jar"
12219 #:source-dir "gson/src/main/java"
12220 #:test-dir "gson/src/test"))
12221 (native-inputs
12222 (list java-junit java-hamcrest-core))
12223 (home-page "https://github.com/google/gson")
12224 (synopsis "Java serialization/deserialization library from/to JSON")
12225 (description "Gson is a Java library that can be used to convert Java
12226Objects into their JSON representation. It can also be used to convert a JSON
12227string to an equivalent Java object. Gson can work with arbitrary Java objects
12228including pre-existing objects that you do not have source-code of.")
12229 (license license:asl2.0)))
12230
12231;; This requires a different Java version than 2.8.2 above
12232(define-public java-gson-2.8.6
12233 (package
12234 (inherit java-gson)
12235 (name "java-gson")
12236 (version "2.8.6")
12237 (source (origin
12238 (method git-fetch)
12239 (uri (git-reference
12240 (url "https://github.com/google/gson")
12241 (commit (string-append "gson-parent-" version))))
12242 (file-name (git-file-name name version))
12243 (sha256
12244 (base32
12245 "0kk5p3vichdb0ph1lzknrcpbklgnmq455mngmjpxvvj29p3rgpk3"))))
12246 (arguments
12247 `(#:jar-name "gson.jar"
12248 #:jdk ,openjdk11
12249 #:source-dir "gson/src/main/java"
12250 #:test-dir "gson/src/test"
12251 #:phases
12252 (modify-phases %standard-phases
12253 ;; avoid Maven dependency
12254 (add-before 'build 'fill-template
12255 (lambda _
12256 (with-directory-excursion "gson/src/main"
12257 (copy-file "java-templates/com/google/gson/internal/GsonBuildConfig.java"
12258 "java/com/google/gson/internal/GsonBuildConfig.java")
12259 (substitute* "java/com/google/gson/internal/GsonBuildConfig.java"
12260 (("\\$\\{project.version\\}") ,version))))))))))
12261
12262(define-public java-hawtjni
12263 (package
12264 (name "java-hawtjni")
12265 (version "1.15")
12266 (source (origin
12267 (method url-fetch)
12268 (uri (string-append "https://github.com/fusesource/hawtjni/archive/"
12269 "hawtjni-project-" version ".tar.gz"))
12270 (sha256
12271 (base32
12272 "1bqfd732rmh6svyx17fpw9175gc9gzkcbyps2yyrf50c3zzjas6g"))))
12273 (build-system ant-build-system)
12274 (arguments
12275 `(#:jar-name "hawtjni.jar"
12276 #:source-dir "hawtjni-generator/src/main/java:hawtjni-runtime/src/main/java"
12277 #:tests? #f; no tests
12278 #:phases
12279 (modify-phases %standard-phases
12280 (add-before 'build 'build-native
12281 (lambda* (#:key inputs #:allow-other-keys)
12282 (let ((include (string-append "-I" (assoc-ref inputs "jdk") "/include/linux")))
12283 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12284 (invoke "gcc" "-c" "hawtjni.c" "-o" "hawtjni.o"
12285 "-fPIC" "-O2" include)
12286 (invoke "gcc" "-c" "hawtjni-callback.c" "-o" "hawtjni-callback.o"
12287 "-fPIC" "-O2" include)
12288 (invoke "gcc" "-o" "libhawtjni.so" "-shared"
12289 "hawtjni.o" "hawtjni-callback.o")))
12290 #t))
12291 (add-after 'install 'install-native
12292 (lambda* (#:key outputs #:allow-other-keys)
12293 (let* ((out (assoc-ref outputs "out"))
12294 (lib (string-append out "/lib"))
12295 (inc (string-append out "/include")))
12296 (with-directory-excursion "hawtjni-generator/src/main/resources/"
12297 (install-file "libhawtjni.so" lib)
12298 (install-file "hawtjni.h" inc)))
12299 #t))
12300 (add-before 'install 'install-parent
12301 (install-pom-file "pom.xml"))
12302 (replace 'install
12303 (install-from-pom "hawtjni-runtime/pom.xml")))))
12304 (inputs
12305 (list java-commons-cli java-asm java-geronimo-xbean-finder))
12306 (home-page "https://fusesource.github.io/hawtjni/")
12307 (synopsis "JNI code generator")
12308 (description "HawtJNI is a code generator that produces the JNI code needed
12309to implement Java native methods. It is based on the jnigen code generator
12310that is part of the SWT Tools project.")
12311 (license license:asl2.0)))
12312
12313(define-public java-jansi-native
12314 (package
12315 (name "java-jansi-native")
12316 (version "1.7")
12317 (source (origin
12318 (method url-fetch)
12319 (uri (string-append "https://github.com/fusesource/jansi-native/"
12320 "archive/jansi-native-" version ".tar.gz"))
12321 (sha256
12322 (base32
12323 "0j2ydlgxbzbgshqkwghbxxxnbnx1mmjgd6k5fw6xfvxw1z956yqf"))))
12324 (build-system ant-build-system)
12325 (arguments
12326 `(#:jar-name "jansi-native.jar"
12327 #:source-dir "src/main/java"
12328 #:tests? #f; no tests
12329 #:phases
12330 (modify-phases %standard-phases
12331 (add-before 'build 'build-native
12332 (lambda* (#:key inputs #:allow-other-keys)
12333 ;; there are more required files for windows in windows/
12334 (with-directory-excursion "src/main/native-package/src"
12335 (substitute* "jansi_ttyname.c"
12336 (("#include \"jansi_.*") ""))
12337 (invoke "gcc" "-c" "jansi_ttyname.c" "-o" "jansi_ttyname.o"
12338 (string-append "-I" (assoc-ref inputs "java-hawtjni")
12339 "/include")
12340 (string-append "-I" (assoc-ref inputs "jdk")
12341 "/include/linux")
12342 "-fPIC" "-O2")
12343 (invoke "gcc" "-o" "libjansi.so" "-shared" "jansi_ttyname.o"))))
12344 (add-before 'build 'install-native
12345 (lambda _
12346 (let ((dir (string-append "build/classes/META-INF/native/"
12347 ,(match (%current-system)
12348 ((or "i686-linux" "armhf-linux")
12349 "linux32")
12350 ((or "x86_64-linux" "aarch64-linux"
12351 "mips64el-linux")
12352 "linux64")
12353 (_ "unknown-kernel")))))
12354 (install-file "src/main/native-package/src/libjansi.so" dir))
12355 #t))
12356 (add-after 'install 'install-native
12357 (lambda* (#:key outputs #:allow-other-keys)
12358 (install-file "src/main/native-package/src/jansi.h"
12359 (string-append (assoc-ref outputs "out") "/include"))
12360 #t))
12361 (add-before 'install 'fix-pom
12362 (lambda _
12363 ;; pom contains variables to complete name, but we don't support that
12364 (substitute* "pom.xml"
12365 (("\\$\\{platform\\}") "native"))
12366 #t))
12367 (replace 'install
12368 (install-from-pom "pom.xml")))))
12369 (propagated-inputs
12370 (list java-hawtjni))
12371 (home-page "https://fusesource.github.io/jansi/")
12372 (synopsis "Native library for jansi")
12373 (description "This package provides the native library for jansi, a small
12374Java library that allows you to use ANSI escape sequences to format your
12375console output.")
12376 (license license:asl2.0)))
12377
12378(define-public java-jansi
12379 (package
12380 (name "java-jansi")
12381 (version "2.4.0")
12382 (source (origin
12383 (method git-fetch)
12384 (uri (git-reference
12385 (url "https://github.com/fusesource/jansi")
12386 (commit (string-append "jansi-" version))))
12387 (file-name (git-file-name name version))
12388 (sha256
12389 (base32
12390 "1s6fva06990798b5fyxqzr30zwyj1byq5wrm54j2larcydaryggf"))
12391 (modules '((guix build utils)))
12392 (snippet
12393 ;; contains pre-compiled libraries
12394 '(delete-file-recursively
12395 "src/main/resources/org/fusesource/jansi/internal"))))
12396 (build-system ant-build-system)
12397 (arguments
12398 `(#:jar-name "jansi.jar"
12399 #:source-dir "src/main/java"
12400 #:test-dir "src/test"
12401 #:tests? #f; require junit 3
12402 #:phases
12403 (modify-phases %standard-phases
12404 (add-before 'build 'build-native
12405 (lambda* (#:key inputs #:allow-other-keys)
12406 (with-directory-excursion "src/main/native"
12407 (for-each
12408 (lambda (cfile)
12409 (let ((cfile (basename cfile))
12410 (ofile (string-append (basename cfile ".c") ".o")))
12411 (invoke ,(cc-for-target) "-c" cfile "-o" ofile
12412 (string-append "-I" (assoc-ref inputs "jdk")
12413 "/include/linux")
12414 "-fPIC" "-O2")))
12415 (find-files "." "\\.c$"))
12416 (apply invoke ,(cc-for-target) "-o" "libjansi.so" "-shared"
12417 (find-files "." "\\.o$")))))
12418 (add-before 'build 'install-native
12419 (lambda _
12420 (let ((dir (string-append "build/classes/org/fusesource/"
12421 "jansi/internal/native/"
12422 ,(match (or (%current-target-system) (%current-system))
12423 ("i686-linux" "Linux/x86")
12424 ("x86_64-linux" "Linux/x86_64")
12425 ("armhf-linux" "Linux/armv7")
12426 ("aarch64-linux" "Linux/arm64")
12427 ("mips64el-linux" "Linux/mips64")
12428 (_ "unknown-kernel")))))
12429 (install-file "src/main/native/libjansi.so" dir))))
12430 (add-before 'build 'copy-resources
12431 (lambda _
12432 (copy-recursively "src/main/resources" "build/classes")))
12433 (replace 'install
12434 (install-from-pom "pom.xml")))))
12435 (home-page "https://fusesource.github.io/jansi/")
12436 (synopsis "Portable ANSI escape sequences")
12437 (description "Jansi is a Java library that allows you to use ANSI escape
12438sequences to format your console output which works on every platform.")
12439 (license license:asl2.0)))
12440
12441(define-public java-jansi-1
12442 (package
12443 (inherit java-jansi)
12444 (version "1.16")
12445 (source (origin
12446 (method git-fetch)
12447 (uri (git-reference
12448 (url "https://github.com/fusesource/jansi")
12449 (commit (string-append "jansi-project-" version))))
12450 (file-name (git-file-name "jansi" version))
12451 (sha256
12452 (base32
12453 "0ikk0x352gh30b42qn1jd89xwsjj0mavrc5kms7fss15bd8vsayx"))))
12454 (arguments
12455 `(#:jar-name "jansi.jar"
12456 #:source-dir "jansi/src/main/java"
12457 #:test-dir "jansi/src/test"
12458 #:phases
12459 (modify-phases %standard-phases
12460 (add-after 'check 'clear-term
12461 (lambda _
12462 (invoke "echo" "-e" "\\e[0m")))
12463 (add-before 'install 'install-parent
12464 (install-pom-file "pom.xml"))
12465 (add-before 'install 'fix-pom
12466 (lambda _
12467 ;; pom adds jansi native versions for different platforms, but we
12468 ;; only need one, so use native instead
12469 (substitute* "jansi/pom.xml"
12470 (("windows32") "native")
12471 (("windows64") "native")
12472 (("osx") "native")
12473 (("linux32") "native")
12474 (("linux64") "native")
12475 (("freebsd32") "native")
12476 (("freebsd64") "native"))
12477 #t))
12478 (replace 'install
12479 (install-from-pom "jansi/pom.xml")))))
12480 (propagated-inputs
12481 (list java-jansi-native))
12482 (native-inputs
12483 (list java-junit java-hamcrest-core))))
12484
12485(define-public java-jboss-el-api-spec
12486 (package
12487 (name "java-jboss-el-api-spec")
12488 (version "3.0")
12489 (source (origin
12490 (method url-fetch)
12491 (uri (string-append "https://github.com/jboss/jboss-el-api_spec/"
12492 "archive/jboss-el-api_" version
12493 "_spec-1.0.7.Final.tar.gz"))
12494 (sha256
12495 (base32
12496 "1j45ljxalwlibxl7g7iv952sjxkw275m8vyxxij8l6wdd5pf0pdh"))))
12497 (build-system ant-build-system)
12498 (arguments
12499 `(#:jar-name "java-jboss-el-api_spec.jar"
12500 #:phases
12501 (modify-phases %standard-phases
12502 ;; the origin of javax.el:javax.el-api is unknown, so we use this package
12503 ;; instead, which implements the same thing. We override the pom file
12504 ;; to "rename" the package so it can be found by maven.
12505 (add-before 'install 'override-pom
12506 (generate-pom.xml "pom.xml" "javax.el" "javax.el-api" "3.0"
12507 #:name "el-api"))
12508 (replace 'install
12509 (install-from-pom "pom.xml")))))
12510 (inputs
12511 (list java-junit))
12512 (home-page "https://github.com/jboss/jboss-el-api_spec")
12513 (synopsis "JSR-341 expression language 3.0 API")
12514 (description "This package contains an implementation of the JSR-341
12515specification for the expression language 3.0. It implements an expression
12516language inspired by ECMAScript and XPath. This language is used with
12517JavaServer Pages (JSP).")
12518 ;; Either GPL2 only or CDDL.
12519 (license (list license:gpl2 license:cddl1.1))))
12520
12521(define-public java-jboss-interceptors-api-spec
12522 (package
12523 (name "java-jboss-interceptors-api-spec")
12524 (version "1.2")
12525 (source (origin
12526 (method url-fetch)
12527 (uri (string-append "https://github.com/jboss/jboss-interceptors-api_spec/"
12528 "archive/jboss-interceptors-api_" version
12529 "_spec-1.0.0.Final.tar.gz"))
12530 (sha256
12531 (base32
12532 "0wv8x0jp9a5qxlrgkhb5jdk2gr6vi87b4j4kjb8ryxiy9gn8g51z"))))
12533 (build-system ant-build-system)
12534 (arguments
12535 `(#:jar-name "java-jboss-interceptors-api_spec.jar"
12536 #:jdk ,icedtea-8
12537 #:source-dir "."
12538 #:tests? #f; no tests
12539 #:phases
12540 (modify-phases %standard-phases
12541 ;; the origin of javax.interceptor:javax.interceptor-api is unknown,
12542 ;; so we use this package instead, which implements the same thing.
12543 ;; We override the pom file to "rename" the package so it can be found
12544 ;; by maven.
12545 (add-before 'install 'override-pom
12546 (generate-pom.xml "pom.xml" "javax.interceptor" "javax.interceptor-api"
12547 "3.0" #:name "interceptor-api"))
12548 (replace 'install
12549 (install-from-pom "pom.xml")))))
12550 (home-page "https://github.com/jboss/jboss-interceptors-api_spec")
12551 (synopsis "Interceptors 1.2 API classes from JSR 318")
12552 (description "Java-jboss-interceptors-api-spec implements the Interceptors
12553API. Interceptors are used to interpose on business method invocations and
12554specific events.")
12555 ;; Either GPL2 only or CDDL.
12556 (license (list license:gpl2 license:cddl1.1))))
12557
12558(define-public java-cdi-api
12559 (package
12560 (name "java-cdi-api")
12561 (version "2.0")
12562 (source (origin
12563 (method url-fetch)
12564 (uri (string-append "https://github.com/cdi-spec/cdi/archive/"
12565 version ".tar.gz"))
12566 (file-name (string-append name "-" version ".tar.gz"))
12567 (sha256
12568 (base32
12569 "1iv8b8bp07c5kmqic14jsr868vycjv4qv02lf3pkgp9z21mnfg5y"))))
12570 (build-system ant-build-system)
12571 (arguments
12572 `(#:source-dir "api/src/main/java"
12573 #:jar-name "java-cdi-api.jar"
12574 #:test-dir "api/src/test"
12575 #:jdk ,icedtea-8
12576 #:tests? #f; Tests fail because we don't have a CDI provider yet
12577 #:phases
12578 (modify-phases %standard-phases
12579 (replace 'install
12580 (install-from-pom "api/pom.xml")))))
12581 (propagated-inputs
12582 (list java-javax-inject java-jboss-el-api-spec
12583 java-jboss-interceptors-api-spec java-weld-parent-pom))
12584 (native-inputs
12585 (list java-testng java-hamcrest-core))
12586 (home-page "https://cdi-spec.org/")
12587 (synopsis "Contexts and Dependency Injection APIs")
12588 (description "Java-cdi-api contains the required APIs for Contexts and
12589Dependency Injection (CDI).")
12590 (license license:asl2.0)))
12591
12592(define-public java-joda-convert
12593 (package
12594 (name "java-joda-convert")
12595 (version "1.9.2")
12596 (source (origin
12597 (method url-fetch)
12598 (uri (string-append "https://github.com/JodaOrg/joda-convert/archive/v"
12599 version ".tar.gz"))
12600 (file-name (string-append name "-" version ".tar.gz"))
12601 (sha256
12602 (base32
12603 "0vp346xz7dh9br4q7xazhc7hvzf76a6hf95fki9bg67q5jr0kjh7"))))
12604 (build-system ant-build-system)
12605 (arguments
12606 `(#:jar-name (string-append ,name "-" ,version ".jar")
12607 #:source-dir "src/main/java"
12608 #:test-include (list "**/Test*.java")
12609 ;; Contains only interfaces and base classes (no test)
12610 #:test-exclude (list "**/test*/**.java")))
12611 (inputs
12612 (list java-guava))
12613 (native-inputs
12614 (list java-junit java-hamcrest-core))
12615 (home-page "https://www.joda.org/joda-convert/")
12616 (synopsis "Conversion between Objects and Strings")
12617 (description "Joda-Convert provides a small set of classes to aid
12618conversion between Objects and Strings. It is not intended to tackle the
12619wider problem of Object to Object transformation.")
12620 (license license:asl2.0)))
12621
12622(define-public java-joda-time
12623 (package
12624 (name "java-joda-time")
12625 (version "2.9.9")
12626 (source (origin
12627 (method url-fetch)
12628 (uri (string-append "https://github.com/JodaOrg/joda-time/archive/v"
12629 version ".tar.gz"))
12630 (file-name (string-append name "-" version ".tar.gz"))
12631 (sha256
12632 (base32
12633 "1i9x91mi7yg2pasl0k3912f1pg46n37sps6rdb0v1gs8hj9ppwc1"))))
12634 (build-system ant-build-system)
12635 (arguments
12636 `(#:jar-name "java-joda-time.jar"
12637 #:source-dir "src/main/java"
12638 #:test-include (list "**/Test*.java")
12639 ;; There is no runnable test in these files
12640 #:test-exclude (list "**/Test*Chronology.java" "**/Test*Field.java")
12641 #:phases
12642 (modify-phases %standard-phases
12643 (add-after 'build 'build-resources
12644 (lambda _
12645 (mkdir-p "build/classes/org/joda/time/tz/data")
12646 (mkdir-p "build/classes/org/joda/time/format")
12647 ;; This will produce the following exception:
12648 ;; java.io.IOException: Resource not found: "org/joda/time/tz/data/ZoneInfoMap"
12649 ;; which is normal, because it doesn't exist yet. It still generates
12650 ;; the same file as in the binary one can find on maven.
12651 (invoke "java" "-cp"
12652 (string-append "build/classes:" (getenv "CLASSPATH"))
12653 "org.joda.time.tz.ZoneInfoCompiler"
12654 "-src" "src/main/java/org/joda/time/tz/src"
12655 "-dst" "build/classes/org/joda/time/tz/data"
12656 "africa" "antarctica" "asia" "australasia"
12657 "europe" "northamerica" "southamerica"
12658 "pacificnew" "etcetera" "backward" "systemv")
12659 (for-each (lambda (f)
12660 (copy-file f (string-append
12661 "build/classes/org/joda/time/format/"
12662 (basename f))))
12663 (find-files "src/main/java/org/joda/time/format" ".*.properties"))
12664 #t))
12665 (add-before 'install 'regenerate-jar
12666 (lambda _
12667 ;; We need to regenerate the jar file to add generated data.
12668 (delete-file "build/jar/java-joda-time.jar")
12669 (invoke "ant" "jar")))
12670 (add-before 'check 'copy-test-resources
12671 (lambda _
12672 (mkdir-p "build/test-classes/org/joda/time/tz/data")
12673 (copy-file "src/test/resources/tzdata/ZoneInfoMap"
12674 "build/test-classes/org/joda/time/tz/data/ZoneInfoMap")
12675 (copy-recursively "src/test/resources" "build/test-classes")
12676 #t)))))
12677 (inputs
12678 (list java-joda-convert))
12679 (native-inputs
12680 (list java-junit java-hamcrest-core tzdata))
12681 (home-page "https://www.joda.org/joda-time/")
12682 (synopsis "Replacement for the Java date and time classes")
12683 (description "Joda-Time is a replacement for the Java date and time
12684classes prior to Java SE 8.")
12685 (license license:asl2.0)))
12686
12687(define-public java-xerces
12688 (package
12689 (name "java-xerces")
12690 (version "2.12.2")
12691 (source
12692 (origin
12693 (method url-fetch)
12694 (uri (string-append "mirror://apache/xerces/j/source/"
12695 "Xerces-J-src." version ".tar.gz"))
12696 (sha256
12697 (base32 "1s2fnfx5flmhs3q30bxdsa6vs52m6vbnqd3m4cc5r4wfr3afplbd"))
12698 (patches (search-patches
12699 "java-xerces-xjavac_taskdef.patch"
12700 "java-xerces-build_dont_unzip.patch"
12701 "java-xerces-bootclasspath.patch"))))
12702 (build-system ant-build-system)
12703 (arguments
12704 `(#:tests? #f;; Test files are not present
12705 #:test-target "test"
12706 #:jdk ,icedtea-8
12707 #:phases
12708 (modify-phases %standard-phases
12709 (add-after 'unpack 'create-build.properties
12710 (lambda* (#:key inputs #:allow-other-keys)
12711 (let ((jaxp (assoc-ref inputs "java-jaxp"))
12712 (resolver (assoc-ref inputs "java-apache-xml-commons-resolver")))
12713 (with-output-to-file "build.properties"
12714 (lambda _
12715 (format #t
12716 "jar.jaxp = ~a/share/java/jaxp.jar~@
12717 jar.apis-ext = ~a/share/java/jaxp.jar~@
12718 jar.resolver = ~a/share/java/xml-resolver.jar~%"
12719 jaxp jaxp resolver)))
12720 ;; Make xerces use our version of jaxp in tests
12721 (substitute* "build.xml"
12722 (("xml-apis.jar")
12723 (string-append jaxp "/share/java/jaxp.jar"))
12724 (("\\$\\{tools.dir\\}/\\$\\{jar.apis\\}")
12725 "${jar.apis}")))
12726 #t))
12727 (replace 'install (install-jars "build")))))
12728 (inputs
12729 (list java-apache-xml-commons-resolver java-jaxp))
12730 (home-page "https://xerces.apache.org/xerces2-j/")
12731 (synopsis "Validating XML parser for Java with DOM level 3 support")
12732 (description "The Xerces2 Java parser is the reference implementation of
12733XNI, the Xerces Native Interface, and also a fully conforming XML Schema
12734processor.
12735
12736Xerces2-J supports the following standards and APIs:
12737
12738@itemize
12739@item eXtensible Markup Language (XML) 1.0 Second Edition Recommendation
12740@item Namespaces in XML Recommendation
12741@item Document Object Model (DOM) Level 2 Core, Events, and Traversal and
12742 Range Recommendations
12743@item Simple API for XML (SAX) 2.0.1 Core and Extension
12744@item Java APIs for XML Processing (JAXP) 1.2.01
12745@item XML Schema 1.0 Structures and Datatypes Recommendations
12746@item Experimental implementation of the Document Object Model (DOM) Level 3
12747 Core and Load/Save Working Drafts
12748@item Provides a partial implementation of the XML Inclusions (XInclude) W3C
12749 Candidate Recommendation
12750@end itemize
12751
12752Xerces is now able to parse documents written according to the XML 1.1
12753Candidate Recommendation, except that it does not yet provide an option to
12754enable normalization checking as described in section 2.13 of this
12755specification. It also handles namespaces according to the XML Namespaces 1.1
12756Candidate Recommendation, and will correctly serialize XML 1.1 documents if
12757the DOM level 3 load/save API's are in use.")
12758 (license license:asl2.0)))
12759
12760(define-public java-jakarta-regexp
12761 (package
12762 (name "java-jakarta-regexp")
12763 (version "1.5")
12764 (source
12765 (origin
12766 (method url-fetch)
12767 (uri (string-append
12768 "https://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-"
12769 version ".tar.gz"))
12770 (sha256
12771 (base32
12772 "0zg9rmyif48dck0cv6ynpxv23mmcsx265am1fnnxss7brgw0ms3r"))))
12773 (build-system ant-build-system)
12774 (arguments
12775 `(#:test-target "test"
12776 #:phases
12777 (modify-phases %standard-phases
12778 (replace 'install
12779 (lambda* (#:key outputs #:allow-other-keys)
12780 (let* ((out (assoc-ref outputs "out"))
12781 (out-share (string-append out "/share/java")))
12782 (mkdir-p out-share)
12783 (for-each (lambda (name)
12784 (install-file name out-share))
12785 (find-files "build" "^jakarta-regexp-.*\\.jar$"))
12786 #t))))))
12787 (home-page "https://attic.apache.org/projects/jakarta-regexp.html")
12788 (synopsis "Regular expression parser generator for Java")
12789 (description "@code{jakarta-regexp} is an old regular expression parser
12790generator for Java.")
12791 (license license:asl2.0)))
12792
12793(define-public java-jline
12794 (package
12795 (name "java-jline")
12796 (version "1.0")
12797 (source (origin
12798 (method url-fetch)
12799 (uri (string-append "https://github.com/jline/jline1/archive/jline-"
12800 version ".tar.gz"))
12801 (sha256
12802 (base32
12803 "0bi3p6vrh7a6v0fbpb6rx9plpmx5zk3lr352xzdbz2jcxg499wir"))))
12804 (build-system ant-build-system)
12805 (arguments
12806 `(#:jar-name "jline.jar"
12807 #:source-dir "src/main/java"
12808 #:test-dir "src/test"
12809 #:phases
12810 (modify-phases %standard-phases
12811 (add-before 'build 'copy-resources
12812 (lambda _
12813 (copy-recursively "src/main/resources" "build/classes")
12814 #t)))))
12815 (native-inputs
12816 (list java-junit))
12817 (home-page "https://jline.github.io")
12818 (synopsis "Console input handling library")
12819 (description "JLine is a Java library for handling console input. It is
12820similar in functionality to BSD editline and GNU readline but with additional
12821features that bring it on par with the Z shell line editor.")
12822 (license license:bsd-3)))
12823
12824(define-public java-jline-2
12825 (package
12826 (inherit java-jline)
12827 (version "2.14.5")
12828 (source (origin
12829 (method url-fetch)
12830 (uri (string-append "https://github.com/jline/jline2/archive/jline-"
12831 version ".tar.gz"))
12832 (sha256
12833 (base32
12834 "1c6qa26mf0viw8hg4jnv72s7i1qb1gh1l8rrzcdvqhqhx82rkdlf"))))
12835 (arguments
12836 `(#:jdk ,icedtea-8
12837 ,@(package-arguments java-jline)))
12838 (inputs
12839 (list java-jansi-1 java-jansi-native))
12840 (native-inputs
12841 (list java-powermock-modules-junit4
12842 java-powermock-modules-junit4-common
12843 java-powermock-api-easymock
12844 java-powermock-api-support
12845 java-powermock-core
12846 java-powermock-reflect
12847 java-easymock
12848 java-jboss-javassist
12849 java-objenesis
12850 java-hamcrest-core
12851 java-cglib
12852 java-junit
12853 java-hawtjni))))
12854
12855(define-public java-jline-terminal
12856 (package
12857 (name "java-jline-terminal")
12858 (version "3.14.1")
12859 (source (origin
12860 (method git-fetch)
12861 (uri (git-reference
12862 (url "https://github.com/jline/jline3")
12863 (commit (string-append "jline-parent-" version))))
12864 (file-name (git-file-name name version))
12865 (sha256
12866 (base32
12867 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12868 (build-system ant-build-system)
12869 (arguments
12870 `(#:jar-name "jline-terminal.jar"
12871 #:jdk ,openjdk11
12872 #:tests? #f; TODO: tests fail on *.caps resource lookups
12873 #:source-dir "terminal/src/main/java"
12874 #:test-dir "terminal/src/test"
12875 #:phases
12876 (modify-phases %standard-phases
12877 (add-after 'unpack 'remove-build-file
12878 (lambda _
12879 ;; Conflicts with build directory generated by ant-build-system.
12880 (delete-file "build")))
12881 (add-after 'unpack 'patch-paths
12882 (lambda* (#:key inputs #:allow-other-keys)
12883 (substitute* "terminal/src/main/java/org/jline/utils/OSUtils.java"
12884 (("= \"infocmp\"")
12885 (string-append "= \"" (assoc-ref inputs "ncurses")
12886 "/bin/infocmp\""))
12887 (("= \"(s?tty)\"" _ cmd)
12888 (string-append "= \"" (assoc-ref inputs "coreutils")
12889 "/bin/" cmd "\"")))))
12890 ;; Resources are not added to the JAR by ant-build-system.
12891 (add-after 'build 'add-resources
12892 (lambda* (#:key jar-name source-dir #:allow-other-keys)
12893 (let ((build (string-append (getcwd) "/build")))
12894 (with-directory-excursion
12895 (string-append source-dir "/../resources")
12896 (apply invoke "jar" "-uvf"
12897 (string-append build "/jar/" jar-name)
12898 (find-files ".")))))))))
12899 (inputs
12900 (list ncurses)); infocmp
12901 (home-page "https://github.com/jline/jline3")
12902 (synopsis "Java JLine Terminal API and implementations")
12903 (description "JLine is a Java library for handling console input. It is
12904similar in functionality to BSD editline and GNU readline but with additional
12905features that bring it in par with ZSH line editor. People familiar with the
12906readline/editline capabilities for modern shells (such as bash and tcsh) will
12907find most of the command editing features of JLine to be familiar.
12908
12909This package includes the @var{Terminal} API and implementations.")
12910 (license license:bsd-3)))
12911
12912(define-public java-jline-reader
12913 (package
12914 (name "java-jline-reader")
12915 (version "3.14.1")
12916 (source (origin
12917 (method git-fetch)
12918 (uri (git-reference
12919 (url "https://github.com/jline/jline3")
12920 (commit (string-append "jline-parent-" version))))
12921 (file-name (git-file-name name version))
12922 (sha256
12923 (base32
12924 "0ilhk9ljp0pivl1rn0bb06syshc67p6imcjhrg6vr7kv15p3w4lr"))))
12925 (build-system ant-build-system)
12926 (arguments
12927 `(#:jar-name "jline-reader.jar"
12928 #:jdk ,openjdk11
12929 #:source-dir "reader/src/main/java"
12930 #:test-dir "reader/src/test"
12931 #:phases
12932 (modify-phases %standard-phases
12933 (add-before 'build 'remove-build-file
12934 (lambda _
12935 ;; conflicts with build directory generated by ant-build-system
12936 (delete-file "build"))))))
12937 (native-inputs
12938 (list java-junit java-easymock))
12939 (inputs
12940 (list java-jline-terminal))
12941 (home-page "https://github.com/jline/jline3")
12942 (synopsis "Java JLine line reader")
12943 (description "JLine is a Java library for handling console input. It is
12944similar in functionality to BSD editline and GNU readline but with additional
12945features that bring it in par with ZSH line editor. People familiar with the
12946readline/editline capabilities for modern shells (such as bash and tcsh) will
12947find most of the command editing features of JLine to be familiar.
12948
12949This package includes the line reader.")
12950 (license license:bsd-3)))
12951
12952(define-public java-xmlunit
12953 (package
12954 (name "java-xmlunit")
12955 (version "2.5.1")
12956 (source (origin
12957 (method url-fetch)
12958 (uri (string-append "https://github.com/xmlunit/xmlunit/archive/v"
12959 version ".tar.gz"))
12960 (file-name (string-append name "-" version ".tar.gz"))
12961 (sha256
12962 (base32
12963 "035rivlnmwhfqj0fzviciv0bkh1h95ps1iwnh2kjcvdbk5nccm4z"))))
12964 (build-system ant-build-system)
12965 (arguments
12966 `(#:jar-name "java-xmlunit.jar"
12967 #:source-dir "xmlunit-core/src/main/java"
12968 #:test-dir "xmlunit-core/src/test"
12969 #:phases
12970 (modify-phases %standard-phases
12971 (add-before 'check 'copy-test-resources
12972 (lambda* (#:key inputs #:allow-other-keys)
12973 (copy-recursively (assoc-ref inputs "resources") "../test-resources")
12974 #t)))))
12975 (native-inputs
12976 `(("java-junit" ,java-junit)
12977 ("java-mockito-1" ,java-mockito-1)
12978 ("java-hamcrest-all" ,java-hamcrest-all)
12979 ("java-objenesis" ,java-objenesis)
12980 ("java-cglib" ,java-cglib)
12981 ("resources"
12982 ,(origin
12983 (method git-fetch)
12984 (uri (git-reference
12985 (url "https://github.com/xmlunit/test-resources")
12986 (commit "a590d2ae865c3e0455691d76ba8eefccc2215aec")))
12987 (file-name "java-xmlunit-test-resources")
12988 (sha256
12989 (base32
12990 "0r0glj37pg5l868yjz78gckr91cs8fysxxbp9p328dssssi91agr"))))))
12991 (home-page "https://www.xmlunit.org/")
12992 (synopsis "XML output testing")
12993 (description "XMLUnit provides you with the tools to verify the XML you
12994emit is the one you want to create. It provides helpers to validate against
12995an XML Schema, assert the values of XPath queries or compare XML documents
12996against expected outcomes.")
12997 (license license:asl2.0)))
12998
12999(define-public java-xmlunit-legacy
13000 (package
13001 (inherit java-xmlunit)
13002 (name "java-xmlunit-legacy")
13003 (arguments
13004 `(#:jar-name "java-xmlunit-legacy.jar"
13005 #:source-dir "xmlunit-legacy/src/main/java"
13006 #:test-dir "xmlunit-legacy/src/test"))
13007 (inputs
13008 (list java-xmlunit java-junit))
13009 (native-inputs
13010 `(("java-mockito-1" ,java-mockito-1)))))
13011
13012(define-public java-xmlunit-matchers
13013 (package
13014 (inherit java-xmlunit)
13015 (name "java-xmlunit-matchers")
13016 (arguments
13017 `(#:jar-name "java-xmlunit-matchers.jar"
13018 #:source-dir "xmlunit-matchers/src/main/java"
13019 #:test-dir "xmlunit-matchers/src/test"
13020 #:test-exclude
13021 ;; Cannot open xsd for http://www.xmlunit.org/test-support/Book.xsd
13022 (list "**/ValidationMatcherTest.java")
13023 #:phases
13024 (modify-phases %standard-phases
13025 (add-before 'build 'copy-test-class
13026 (lambda _
13027 (copy-file "xmlunit-core/src/test/java/org/xmlunit/TestResources.java"
13028 "xmlunit-matchers/src/test/java/org/xmlunit/TestResources.java")
13029 #t))
13030 (add-before 'build 'fix-test-resources-path
13031 (lambda _
13032 (substitute* (find-files "xmlunit-matchers/src/test" ".*.java")
13033 (("../test-resources") "test-resources"))
13034 #t))
13035 (add-before 'check 'copy-test-resources
13036 (lambda* (#:key inputs #:allow-other-keys)
13037 (copy-recursively (assoc-ref inputs "resources") "test-resources")
13038 #t)))))
13039 (inputs
13040 (list java-xmlunit java-junit))))
13041
13042(define-public java-openchart2
13043 (package
13044 (name "java-openchart2")
13045 (version "1.4.3")
13046 (source (origin
13047 (method url-fetch)
13048 (uri (string-append "http://download.approximatrix.com/openchart2/"
13049 "openchart2-" version ".source.zip"))
13050 (sha256
13051 (base32
13052 "1xq96zm5r02n1blja0072jmmsifmxc40lbyfbnmcnr6mw42frh4g"))))
13053 (build-system ant-build-system)
13054 (arguments
13055 `(#:test-target "test"
13056 #:phases
13057 (modify-phases %standard-phases
13058 (add-after 'unpack 'fix-junit-errors
13059 (lambda _
13060 (with-directory-excursion "unittest/src/com/approximatrix/charting/"
13061 (substitute* '("coordsystem/ticklocator/NumericXTickLocatorTest.java"
13062 "coordsystem/ticklocator/NumericYTickLocatorTest.java"
13063 "coordsystem/ticklocator/ObjectXTickLocatorTest.java"
13064 "model/DefaultChartDataModelConstraintsTest.java"
13065 "model/MultiScatterDataModelConstraintsTest.java"
13066 "model/threedimensional/DotPlotDataModelConstraintsTest.java")
13067 (("(assertEquals[^;]+);" before _)
13068 (string-append (string-drop-right before 2) ", 1E-6);"))))
13069 #t))
13070 (replace 'install (install-jars ".")))))
13071 (native-inputs
13072 (list unzip java-junit java-hamcrest-core))
13073 (home-page "https://approximatrix.com/products/openchart2/")
13074 (synopsis "Simple plotting for Java")
13075 (description "Openchart2 provides a simple, yet powerful, interface for
13076Java programmers to create two-dimensional charts and plots. The library
13077features an assortment of graph styles, including advanced scatter plots, bar
13078graphs, and pie charts.")
13079 (license license:lgpl2.1+)))
13080
13081(define-public java-commons-httpclient
13082 (package
13083 (name "java-commons-httpclient")
13084 (version "3.1")
13085 (source (origin
13086 (method url-fetch)
13087 (uri (string-append "mirror://apache/httpcomponents/"
13088 "commons-httpclient/source/commons-httpclient-"
13089 version "-src.tar.gz"))
13090 (sha256
13091 (base32
13092 "1wlpn3cfy3d4inxy6g7wxcsa8p7sshn6aldk9y4ia3lb879rd97r"))))
13093 (build-system ant-build-system)
13094 (arguments
13095 `(#:build-target "compile"
13096 #:test-target "test"
13097 #:tests? #f; requires junit-textui (junit 3)
13098 #:phases
13099 (modify-phases %standard-phases
13100 (add-before 'build 'fix-accent
13101 (lambda _
13102 (for-each (lambda (file)
13103 (with-fluids ((%default-port-encoding "ISO-8859-1"))
13104 (substitute* file
13105 (("\\* @author Ortwin .*") "* @author Ortwin Glueck\n"))))
13106 '("src/java/org/apache/commons/httpclient/HttpContentTooLargeException.java"
13107 "src/examples/TrivialApp.java" "src/examples/ClientApp.java"
13108 "src/test/org/apache/commons/httpclient/TestHttps.java"
13109 "src/test/org/apache/commons/httpclient/TestURIUtil2.java"))
13110 #t))
13111 (replace 'install
13112 (lambda* (#:key outputs #:allow-other-keys)
13113 (invoke "ant" "dist"
13114 (string-append "-Ddist.home=" (assoc-ref outputs "out")
13115 "/share/java"))
13116 #t)))))
13117 (propagated-inputs
13118 `(("java-commons-logging" ,java-commons-logging-minimal)
13119 ("java-commons-codec" ,java-commons-codec)))
13120 (home-page "https://hc.apache.org")
13121 (synopsis "HTTP/1.1 compliant HTTP agent implementation")
13122 (description "This package contains an HTTP/1.1 compliant HTTP agent
13123implementation. It also provides reusable components for client-side
13124authentication, HTTP state management, and HTTP connection management.")
13125 (license license:asl2.0)))
13126
13127(define-public java-commons-vfs
13128 (package
13129 (name "java-commons-vfs")
13130 (version "2.2")
13131 (source (origin
13132 (method url-fetch)
13133 (uri (string-append "mirror://apache/commons/vfs/source/"
13134 "commons-vfs2-distribution-" version "-src.tar.gz"))
13135 (file-name (string-append name "-" version ".tar.gz"))
13136 (sha256
13137 (base32
13138 "1cnq1iaghbp4cslpnvwbp83i5v234x87irssqynhwpfgw7caf1s3"))
13139 (modules '((guix build utils)))
13140 (snippet
13141 '(begin
13142 (for-each delete-file
13143 (find-files "." "\\.jar$"))
13144 #t))))
13145 (build-system ant-build-system)
13146 (arguments
13147 `(#:jar-name "commons-vfs.jar"
13148 #:source-dir "commons-vfs2/src/main/java"
13149 #:test-dir "commons-vfs2/src/test"
13150 ; FIXME: tests depend on many things: apache sshd, hadoop, ftpserver, ...
13151 #:tests? #f
13152 #:phases
13153 (modify-phases %standard-phases
13154 (add-before 'build 'remove-hadoop-and-webdav
13155 ; Remove these files as they are not required and depend on difficult
13156 ; packages.
13157 (lambda _
13158 (for-each delete-file-recursively
13159 '("commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/webdav"
13160 "commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/hdfs"))
13161 #t)))))
13162 (inputs
13163 (list java-commons-collections4
13164 java-commons-compress
13165 java-commons-httpclient
13166 java-commons-logging-minimal
13167 java-commons-net
13168 java-jsch))
13169 (home-page "https://commons.apache.org/proper/commons-vfs/")
13170 (synopsis "Java file system library")
13171 (description "Commons VFS provides a single API for accessing various
13172different file systems. It presents a uniform view of the files from various
13173different sources, such as the files on local disk, on an HTTP server, or
13174inside a Zip archive.")
13175 (license license:asl2.0)))
13176
13177(define-public java-jakarta-oro
13178 (package
13179 (name "java-jakarta-oro")
13180 (version "2.0.8")
13181 (source (origin
13182 (method url-fetch)
13183 (uri (string-append "mirror://apache/jakarta/oro/"
13184 "jakarta-oro-" version ".tar.gz"))
13185 (sha256
13186 (base32
13187 "0rpmnsskiwmsy8r0sckz5n5dbvh3vkxx8hpm177c754r8xy3qksc"))
13188 (modules '((guix build utils)))
13189 (snippet
13190 `(begin
13191 (delete-file (string-append "jakarta-oro-" ,version ".jar"))
13192 #t))))
13193 (build-system ant-build-system)
13194 (arguments
13195 `(#:build-target "package"
13196 #:make-flags (list "-DDATE" "(no recorded date for reproducibility)")
13197 #:tests? #f; tests are run as part of the build process
13198 #:phases
13199 (modify-phases %standard-phases
13200 (replace 'install
13201 (install-jars ,(string-append "jakarta-oro-" version))))))
13202 (home-page "https://jakarta.apache.org/oro/")
13203 (synopsis "Text-processing for Java")
13204 (description "The Jakarta-ORO Java classes are a set of text-processing
13205Java classes that provide Perl5 compatible regular expressions, AWK-like
13206regular expressions, glob expressions, and utility classes for performing
13207substitutions, splits, filtering filenames, etc. This library is the successor
13208of the OROMatcher, AwkTools, PerlTools, and TextTools libraries originally
13209from ORO, Inc.")
13210 (license license:asl1.1)))
13211
13212(define-public java-native-access
13213 (package
13214 (name "java-native-access")
13215 (version "4.5.1")
13216 (source (origin
13217 (method url-fetch)
13218 (uri (string-append "https://github.com/java-native-access/jna/"
13219 "archive/" version ".tar.gz"))
13220 (file-name (string-append name "-" version ".tar.gz"))
13221 (sha256
13222 (base32
13223 "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
13224 (modules '((guix build utils)))
13225 (snippet
13226 `(begin
13227 (for-each delete-file (find-files "." ".*.jar"))
13228 (delete-file-recursively "native/libffi")
13229 (delete-file-recursively "dist")
13230 #t))))
13231 (build-system ant-build-system)
13232 (arguments
13233 `(#:tests? #f; FIXME: tests require reflections.jar
13234 #:test-target "test"
13235 #:make-flags (list "-Ddynlink.native=true")
13236 #:phases
13237 (modify-phases %standard-phases
13238 (add-before 'build 'fix-build.xml
13239 (lambda* (#:key inputs #:allow-other-keys)
13240 (substitute* "build.xml"
13241 ;; Since we removed the bundled ant.jar, give the correct path
13242 (("lib/ant.jar") (search-input-file inputs "/lib/ant.jar"))
13243 ;; We removed generated native libraries. We can only rebuild one
13244 ;; so don't fail if we can't find a native library for another architecture.
13245 (("zipfileset") "zipfileset erroronmissingarchive=\"false\""))
13246 ;; Copy test dependencies
13247 (copy-file (car (find-files (assoc-ref inputs "java-junit") "jar$"))
13248 "lib/junit.jar")
13249 (copy-file (car (find-files (assoc-ref inputs "java-hamcrest-core")
13250 "jar$"))
13251 "lib/hamcrest-core.jar")
13252 ;; FIXME: once reflections.jar is built, copy it to lib/test.
13253 #t))
13254 (add-before 'build 'build-native
13255 (lambda _
13256 (invoke "ant" "-Ddynlink.native=true" "native")
13257 #t))
13258 (replace 'install
13259 (install-jars "build")))))
13260 (inputs
13261 (list libffi libx11 libxt))
13262 (native-inputs
13263 (list gcc-7 java-junit java-hamcrest-core))
13264 (home-page "https://github.com/java-native-access/jna")
13265 (synopsis "Access to native shared libraries from Java")
13266 (description "JNA provides Java programs easy access to native shared
13267libraries without writing anything but Java code - no JNI or native code is
13268required. JNA allows you to call directly into native functions using natural
13269Java method invocation.")
13270 ;; Java Native Access project (JNA) is dual-licensed under 2
13271 ;; alternative Free licenses: LGPL 2.1 or later and Apache License 2.0.
13272 (license (list
13273 license:asl2.0
13274 license:lgpl2.1+))))
13275
13276(define-public java-native-access-platform
13277 (package
13278 (inherit java-native-access)
13279 (name "java-native-access-platform")
13280 (arguments
13281 `(#:test-target "test"
13282 #:tests? #f; require jna-test.jar
13283 #:phases
13284 (modify-phases %standard-phases
13285 (add-before 'build 'chdir
13286 (lambda _
13287 (chdir "contrib/platform")
13288 #t))
13289 (add-after 'chdir 'fix-ant
13290 (lambda* (#:key inputs #:allow-other-keys)
13291 (substitute* "nbproject/project.properties"
13292 (("../../build/jna.jar")
13293 (search-input-file inputs "/share/java/jna.jar"))
13294 (("../../lib/hamcrest-core-.*.jar")
13295 (car (find-files (assoc-ref inputs "java-hamcrest-core")
13296 "jar$")))
13297 (("../../lib/junit.jar")
13298 (car (find-files (assoc-ref inputs "java-junit")
13299 "jar$"))))
13300 #t))
13301 (replace 'install
13302 (install-jars "dist")))))
13303 (inputs
13304 (list java-native-access))
13305 (synopsis "Cross-platform mappings for jna")
13306 (description "java-native-access-platform has cross-platform mappings
13307and mappings for a number of commonly used platform functions, including a
13308large number of Win32 mappings as well as a set of utility classes that
13309simplify native access.")))
13310
13311(define-public java-jsch-agentproxy-core
13312 (package
13313 (name "java-jsch-agentproxy-core")
13314 (version "0.0.8")
13315 (source (origin
13316 (method url-fetch)
13317 (uri (string-append "https://github.com/ymnk/jsch-agent-proxy/archive/"
13318 version ".tar.gz"))
13319 (file-name (string-append name "-" version ".tar.gz"))
13320 (sha256
13321 (base32
13322 "02iqg6jbc1kxvfzqcg6wy9ygqxfm82bw5rf6vnswqy4y572niz4q"))))
13323 (build-system ant-build-system)
13324 (arguments
13325 `(#:jar-name "jsch-agentproxy-core.jar"
13326 #:source-dir "jsch-agent-proxy-core/src/main/java"
13327 #:tests? #f)); no tests
13328 (home-page "https://github.com/ymnk/jsch-agent-proxy")
13329 (synopsis "Core component of the proxy to ssh-agent and Pageant in Java")
13330 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13331and Pageant included Putty. It will be easily integrated into JSch, and users
13332will be allowed to use these programs for authentication.")
13333 (license license:bsd-3)))
13334
13335(define-public java-jsch-agentproxy-sshagent
13336 (package
13337 (inherit java-jsch-agentproxy-core)
13338 (name "java-jsch-agentproxy-sshagent")
13339 (arguments
13340 `(#:jar-name "jsch-agentproxy-sshagent.jar"
13341 #:source-dir "jsch-agent-proxy-sshagent/src/main/java"
13342 #:tests? #f)); no tests
13343 (inputs
13344 (list java-jsch-agentproxy-core))
13345 (synopsis "Proxy to ssh-agent")
13346 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13347and Pageant included in Putty. This component contains the code for a proxy to
13348ssh-agent.")))
13349
13350(define-public java-jsch-agentproxy-usocket-jna
13351 (package
13352 (inherit java-jsch-agentproxy-core)
13353 (name "java-jsch-agentproxy-usocket-jna")
13354 (arguments
13355 `(#:jar-name "jsch-agentproxy-usocket-jna.jar"
13356 #:source-dir "jsch-agent-proxy-usocket-jna/src/main/java"
13357 #:tests? #f)); no tests
13358 (inputs
13359 (list java-jsch-agentproxy-core java-native-access))
13360 (synopsis "USocketFactory implementation using JNA")
13361 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13362and Pageant included in Putty. This component contains an implementation of
13363USocketFactory using @dfn{JNA} (Java Native Access).")))
13364
13365(define-public java-jsch-agentproxy-pageant
13366 (package
13367 (inherit java-jsch-agentproxy-core)
13368 (name "java-jsch-agentproxy-pageant")
13369 (arguments
13370 `(#:jar-name "jsch-agentproxy-pageant.jar"
13371 #:source-dir "jsch-agent-proxy-pageant/src/main/java"
13372 #:tests? #f)); no tests
13373 (inputs
13374 (list java-jsch-agentproxy-core java-native-access
13375 java-native-access-platform))
13376 (synopsis "Proxy to pageant")
13377 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13378and Pageant included in Putty. This component contains the code for a proxy to
13379pageant.")))
13380
13381(define-public java-jsch-agentproxy-usocket-nc
13382 (package
13383 (inherit java-jsch-agentproxy-core)
13384 (name "java-jsch-agentproxy-usocket-nc")
13385 (arguments
13386 `(#:jar-name "jsch-agentproxy-usocket-nc.jar"
13387 #:source-dir "jsch-agent-proxy-usocket-nc/src/main/java"
13388 #:tests? #f)); no tests
13389 (inputs
13390 (list java-jsch-agentproxy-core))
13391 (synopsis "USocketFactory implementation using netcat")
13392 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13393and Pageant included in Putty. This component contains an implementation of
13394USocketFactory using netcat.")))
13395
13396(define-public java-jsch-agentproxy-connector-factory
13397 (package
13398 (inherit java-jsch-agentproxy-core)
13399 (name "java-jsch-agentproxy-connector-factory")
13400 (arguments
13401 `(#:jar-name "jsch-agentproxy-connector-factory.jar"
13402 #:source-dir "jsch-agent-proxy-connector-factory/src/main/java"
13403 #:tests? #f)); no tests
13404 (inputs
13405 (list java-jsch-agentproxy-core java-jsch-agentproxy-sshagent
13406 java-jsch-agentproxy-usocket-jna java-jsch-agentproxy-pageant
13407 java-jsch-agentproxy-usocket-nc))
13408 (synopsis "Connector factory for jsch agent proxy")
13409 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13410and Pageant included in Putty. This component contains a connector factory.")))
13411
13412(define-public java-jsch-agentproxy-jsch
13413 (package
13414 (inherit java-jsch-agentproxy-core)
13415 (name "java-jsch-agentproxy-jsch")
13416 (arguments
13417 `(#:jar-name "jsch-agentproxy-jsch.jar"
13418 #:source-dir "jsch-agent-proxy-jsch/src/main/java"
13419 #:tests? #f)); no tests
13420 (inputs
13421 (list java-jsch java-jsch-agentproxy-core))
13422 (synopsis "JSch integration library for agentproxy")
13423 (description "jsch-agent-proxy is a proxy program to OpenSSH's ssh-agent
13424and Pageant included in Putty. This component contains a library to use
13425jsch-agent-proxy with JSch.")))
13426
13427(define-public java-apache-ivy
13428 (package
13429 (name "java-apache-ivy")
13430 (version "2.4.0")
13431 (source (origin
13432 (method url-fetch)
13433 (uri (string-append "mirror://apache//ant/ivy/" version
13434 "/apache-ivy-" version "-src.tar.gz"))
13435 (sha256
13436 (base32
13437 "1xkfn57g2m7l6y0xdq75x5rnrgk52m9jx2xah70g3ggl8750hbr0"))
13438 (patches
13439 (search-patches
13440 "java-apache-ivy-port-to-latest-bouncycastle.patch"))))
13441 (build-system ant-build-system)
13442 (arguments
13443 `(#:jar-name "ivy.jar"
13444 #:tests? #f
13445 #:phases
13446 (modify-phases %standard-phases
13447 (add-before 'build 'remove-example
13448 (lambda _
13449 (delete-file-recursively "src/example")
13450 #t))
13451 (add-before 'build 'copy-resources
13452 (lambda _
13453 (with-directory-excursion "src/java"
13454 (for-each (lambda (file)
13455 (install-file file (string-append "../../build/classes/" (dirname file))))
13456 (append
13457 (find-files "." ".*.css")
13458 (find-files "." ".*.ent")
13459 (find-files "." ".*.html")
13460 (find-files "." ".*.properties")
13461 (find-files "." ".*.xsd")
13462 (find-files "." ".*.xsl")
13463 (find-files "." ".*.xml"))))
13464 #t))
13465 (add-before 'build 'fix-vfs
13466 (lambda _
13467 (substitute*
13468 '("src/java/org/apache/ivy/plugins/repository/vfs/VfsRepository.java"
13469 "src/java/org/apache/ivy/plugins/repository/vfs/VfsResource.java")
13470 (("import org.apache.commons.vfs") "import org.apache.commons.vfs2"))
13471 #t))
13472 (add-before 'install 'copy-manifest
13473 (lambda _
13474 (install-file "META-INF/MANIFEST.MF" "build/classes/META-INF")
13475 #t))
13476 (add-before 'install 'repack
13477 (lambda _
13478 (invoke "jar" "-cmf" "build/classes/META-INF/MANIFEST.MF" "build/jar/ivy.jar"
13479 "-C" "build/classes" ".")))
13480 (add-after 'install 'install-bin
13481 (lambda* (#:key outputs #:allow-other-keys)
13482 (let* ((bin (string-append (assoc-ref outputs "out") "/bin"))
13483 (ivy (string-append bin "/ivy"))
13484 (jar (string-append (assoc-ref outputs "out") "/share/java/ivy.jar")))
13485 (mkdir-p bin)
13486 (with-output-to-file ivy
13487 (lambda _
13488 (display (string-append
13489 "#!" (which "sh") "\n"
13490 "if [[ -z $CLASSPATH ]]; then\n"
13491 " cp=\"" (getenv "CLASSPATH") ":" jar "\"\n"
13492 "else\n"
13493 " cp=\"" (getenv "CLASSPATH") ":" jar ":$CLASSPATH\"\n"
13494 "fi\n"
13495 (which "java") " -cp $cp org.apache.ivy.Main $@\n"))))
13496 (chmod ivy #o755)
13497 #t))))))
13498 (inputs
13499 (list java-bouncycastle
13500 java-commons-cli
13501 java-commons-collections
13502 java-commons-httpclient
13503 java-commons-lang
13504 java-commons-vfs
13505 java-jakarta-oro
13506 java-jsch
13507 java-jsch-agentproxy-core
13508 java-jsch-agentproxy-connector-factory
13509 java-jsch-agentproxy-jsch
13510 java-junit))
13511 (home-page "https://ant.apache.org/ivy")
13512 (synopsis "Dependency manager for the Java programming language")
13513 (description "Ivy is a tool for managing (recording, tracking, resolving
13514and reporting) project dependencies. It is characterized by the following:
13515
13516@itemize
13517@item flexibility and configurability - Ivy is essentially process agnostic
13518 and is not tied to any methodology or structure. Instead it provides the
13519 necessary flexibility and configurability to be adapted to a broad range
13520 of dependency management and build processes.
13521@item tight integration with Apache Ant - while available as a standalone tool,
13522 Ivy works particularly well with Apache Ant providing a number of
13523 powerful Ant tasks ranging from dependency resolution to dependency
13524 reporting and publication.
13525@end itemize")
13526 (license license:asl2.0)))
13527
13528(define-public java-eclipse-sisu-inject
13529 (package
13530 (name "java-eclipse-sisu-inject")
13531 (version "0.3.5")
13532 (source (origin
13533 (method git-fetch)
13534 (uri (git-reference
13535 (url "https://github.com/eclipse/sisu.inject/")
13536 (commit (string-append "releases/" version))))
13537 (file-name (git-file-name name version))
13538 (sha256
13539 (base32
13540 "1yh434b8pi8cwmpk825fbvbnkkk2cwd4gxxjaygg8i9j0q3l9zp3"))))
13541 (build-system ant-build-system)
13542 (arguments
13543 `(#:jar-name "eclipse-sisu-inject.jar"
13544 #:source-dir "org.eclipse.sisu.inject/src"
13545 #:tests? #f; no tests
13546 #:phases
13547 (modify-phases %standard-phases
13548 (replace 'install
13549 (install-from-pom "org.eclipse.sisu.inject/pom.xml")))))
13550 (propagated-inputs
13551 (list java-guice java-sisu-inject-parent-pom))
13552 (inputs
13553 (list java-guice-servlet
13554 java-javax-inject
13555 java-javaee-servletapi
13556 java-junit
13557 java-slf4j-api
13558 java-jsr305
13559 java-jsr250
13560 java-cdi-api
13561 java-osgi-framework
13562 java-osgi-util-tracker
13563 java-testng))
13564 (home-page "https://www.eclipse.org/sisu/")
13565 (synopsis "Classpath scanning, auto-binding, and dynamic auto-wiring")
13566 (description "Sisu is a modular JSR330-based container that supports
13567classpath scanning, auto-binding, and dynamic auto-wiring. Sisu uses
13568Google-Guice to perform dependency injection and provide the core JSR330
13569support, but removes the need to write explicit bindings in Guice modules.
13570Integration with other containers via the Eclipse Extension Registry and the
13571OSGi Service Registry is a goal of this project.")
13572 (license license:epl1.0)))
13573
13574(define java-sisu-inject-parent-pom
13575 (package
13576 (inherit java-eclipse-sisu-inject)
13577 (name "java-sisu-inject-parent-pom")
13578 (arguments
13579 `(#:tests? #f
13580 #:phases
13581 (modify-phases %standard-phases
13582 (delete 'configure)
13583 (delete 'build)
13584 (replace 'install
13585 (install-pom-file "pom.xml")))))
13586 (propagated-inputs '())))
13587
13588(define-public java-eclipse-sisu-plexus
13589 (package
13590 (name "java-eclipse-sisu-plexus")
13591 (version "0.3.5")
13592 (source (origin
13593 (method git-fetch)
13594 (uri (git-reference
13595 (url "https://github.com/eclipse/sisu.plexus")
13596 (commit (string-append "releases/" version))))
13597 (file-name (git-file-name name version))
13598 (sha256
13599 (base32
13600 "0lm5h0dmh41ffcwd32qnk3a87d360am36yq7168ikkyqa8jxkx28"))
13601 (modules '((guix build utils)))
13602 (snippet
13603 '(begin
13604 (for-each delete-file (find-files "." ".*.jar"))
13605 (rename-file "org.eclipse.sisu.plexus.tests/src"
13606 "org.eclipse.sisu.plexus.tests/java")
13607 #t))))
13608 (build-system ant-build-system)
13609 (arguments
13610 `(#:jar-name "eclipse-sisu-plexus.jar"
13611 #:source-dir "org.eclipse.sisu.plexus/src"
13612 #:test-dir "org.eclipse.sisu.plexus.tests"
13613 #:test-exclude
13614 (list
13615 ;; This test fails probably because we can't generate the necessary
13616 ;; meta-inf files.
13617 "**/PlexusLoggingTest.*"
13618 ;; FIXME: This test fails because of some injection error
13619 "**/PlexusRequirementTest.*")
13620 #:jdk ,icedtea-8
13621 #:phases
13622 (modify-phases %standard-phases
13623 (add-before 'build 'copy-resources
13624 (lambda _
13625 (install-file "org.eclipse.sisu.plexus/META-INF/plexus/components.xml"
13626 "build/classes/META-INF/plexus")
13627 #t))
13628 (add-before 'check 'build-test-jar
13629 (lambda _
13630 (with-directory-excursion "org.eclipse.sisu.plexus.tests/resources/component-jar/src/main/"
13631 (mkdir "build")
13632 (with-directory-excursion "java"
13633 (apply invoke "javac" "-cp"
13634 (string-append (getenv "CLASSPATH")
13635 ":../../../../../build/classes")
13636 (find-files "." ".*.java"))
13637 (for-each (lambda (file) (install-file file (string-append "../build/" file)))
13638 (find-files "." ".*.jar")))
13639 (mkdir-p "build/META-INF/plexus")
13640 (copy-file "resources/META-INF/plexus/components.xml"
13641 "build/META-INF/plexus/components.xml")
13642 (with-directory-excursion "build"
13643 (invoke "jar" "cf" "../../../component-jar-0.1.jar" ".")))
13644 (with-directory-excursion "org.eclipse.sisu.plexus.tests/"
13645 (copy-recursively "META-INF" "../build/test-classes/META-INF")
13646 (substitute* "java/org/eclipse/sisu/plexus/DefaultPlexusContainerTest.java"
13647 (("resources/component-jar")
13648 "org.eclipse.sisu.plexus.tests/resources/component-jar")))
13649 #t))
13650 (replace 'install
13651 (install-from-pom "org.eclipse.sisu.plexus/pom.xml")))))
13652 (propagated-inputs
13653 (list java-jsr250
13654 java-plexus-classworlds
13655 java-plexus-utils
13656 java-plexus-component-annotations
13657 java-cdi-api
13658 java-eclipse-sisu-inject
13659 java-sisu-plexus-parent-pom))
13660 (inputs
13661 (list java-osgi-framework
13662 java-slf4j-api
13663 java-javax-inject
13664 java-guice
13665 java-guava
13666 java-aopalliance
13667 java-cglib))
13668 (native-inputs
13669 (list java-junit))
13670 (home-page "https://www.eclipse.org/sisu/")
13671 (synopsis "Plexus support for the sisu container")
13672 (description "Sisu is a modular JSR330-based container that supports
13673classpath scanning, auto-binding, and dynamic auto-wiring. This package
13674adds Plexus support to the Sisu-Inject container.")
13675 (license license:epl1.0)))
13676
13677(define java-sisu-plexus-parent-pom
13678 (package
13679 (inherit java-eclipse-sisu-plexus)
13680 (name "java-sisu-plexus-parent-pom")
13681 (arguments
13682 `(#:tests? #f
13683 #:phases
13684 (modify-phases %standard-phases
13685 (delete 'configure)
13686 (delete 'build)
13687 (replace 'install
13688 (install-pom-file "pom.xml")))))
13689 (propagated-inputs
13690 `(("java-sonatype-oss-parent-pom-9" ,java-sonatype-oss-parent-pom-9)))))
13691
13692(define-public java-commons-compiler
13693 (package
13694 (name "java-commons-compiler")
13695 (version "3.0.8")
13696 (source (origin
13697 (method git-fetch)
13698 (uri (git-reference
13699 (url "https://github.com/janino-compiler/janino")
13700 (commit "91aa95686d1e4ca3b16a984a03a38686572331b2")))
13701 (file-name (string-append name "-" version))
13702 (sha256
13703 (base32
13704 "04hfdl59sgh20qkxzgnibvs8f9hy6n7znxwpk611y5d89977y62r"))
13705 (modules '((guix build utils)))
13706 (snippet
13707 '(begin
13708 (for-each delete-file
13709 (find-files "." "\\.jar$"))
13710 #t))))
13711 (build-system ant-build-system)
13712 (arguments
13713 `(#:jar-name "commons-compiler.jar"
13714 #:source-dir "commons-compiler/src/main"
13715 #:tests? #f)); no tests
13716 (home-page "https://github.com/janino-compiler/janino")
13717 (synopsis "Java compiler")
13718 (description "Commons-compiler contains an API for janino, including the
13719@code{IExpressionEvaluator}, @code{IScriptEvaluator}, @code{IClassBodyEvaluator}
13720and @code{ISimpleCompiler} interfaces.")
13721 (license license:bsd-3)))
13722
13723(define-public java-janino
13724 (package
13725 (inherit java-commons-compiler)
13726 (name "java-janino")
13727 (arguments
13728 `(#:jar-name "janino.jar"
13729 #:source-dir "src/main/java"
13730 #:phases
13731 (modify-phases %standard-phases
13732 (add-before 'configure 'chdir
13733 (lambda _
13734 (chdir "janino")
13735 #t)))))
13736 (inputs
13737 (list java-commons-compiler))
13738 (native-inputs
13739 (list java-junit java-hamcrest-core))
13740 (description "Janino is a Java compiler. Janino can compile a set of
13741source files to a set of class files like @code{javac}, but also compile a
13742Java expression, block, class body or source file in memory, load the bytecode
13743and execute it directly in the same JVM. @code{janino} can also be used for
13744static code analysis or code manipulation.")))
13745
13746(define-public java-logback-core
13747 (package
13748 (name "java-logback-core")
13749 (version "1.2.3")
13750 (source (origin
13751 (method git-fetch)
13752 (uri (git-reference
13753 (url "https://github.com/qos-ch/logback/")
13754 (commit (string-append "v_" version))))
13755 (file-name (git-file-name name version))
13756 (sha256
13757 (base32
13758 "055jbfpg3l5qw7pw2snkdag0gjkb4vcxfg9110cqqyc40k2nd17z"))
13759 (modules '((guix build utils)))
13760 (snippet
13761 '(delete-file-recursively "logback-access/lib"))))
13762 (build-system ant-build-system)
13763 (arguments
13764 `(#:jar-name "logback.jar"
13765 #:source-dir "src/main/java"
13766 #:test-dir "src/test"
13767 #:test-exclude
13768 ;; These tests fail with Unable to set MockitoNamingPolicy on cglib generator
13769 ;; which creates FastClasses
13770 (list "**/AllCoreTest.*"
13771 "**/AutoFlushingObjectWriterTest.*"
13772 "**/PackageTest.*"
13773 "**/ResilientOutputStreamTest.*"
13774 ;; And we still don't want to run abstract classes
13775 "**/Abstract*.*")
13776 #:phases
13777 (modify-phases %standard-phases
13778 (add-before 'configure 'chdir
13779 (lambda _ (chdir "logback-core"))))))
13780 (inputs
13781 (list java-javax-mail
13782 java-javaee-servletapi
13783 java-commons-compiler
13784 java-janino))
13785 (native-inputs
13786 (list java-junit
13787 java-hamcrest-core
13788 java-mockito-1
13789 java-cglib
13790 java-objenesis
13791 java-joda-time))
13792 (home-page "https://logback.qos.ch")
13793 (synopsis "Logging for java")
13794 (description "Logback is intended as a successor to the popular log4j project.
13795This module lays the groundwork for the other two modules.")
13796 ;; Either epl1.0 or lgpl2.1
13797 (license (list license:epl1.0
13798 license:lgpl2.1))))
13799
13800(define-public java-logback-classic
13801 (package
13802 (inherit java-logback-core)
13803 (name "java-logback-classic")
13804 (arguments
13805 `(#:jar-name "logback-classic.jar"
13806 #:source-dir "src/main/java"
13807 #:test-dir "src/test"
13808 #:tests? #f; tests require more packages: h2, greenmail, hsql, subethamail, slf4j, log4j, felix
13809 #:jdk ,icedtea-8
13810 #:phases
13811 (modify-phases %standard-phases
13812 (add-before 'configure 'chdir
13813 (lambda _
13814 (chdir "logback-classic")
13815 #t))
13816 (replace 'build
13817 (lambda* (#:key inputs #:allow-other-keys)
13818 (mkdir-p "build/classes")
13819 (setenv "CLASSPATH"
13820 (string-join
13821 (apply append (map (lambda (input)
13822 (find-files (assoc-ref inputs input)
13823 ".*.jar"))
13824 '("java-logback-core" "java-slf4j-api"
13825 "java-commons-compiler" "java-javaee-servletapi"
13826 "groovy")))
13827 ":"))
13828 (apply invoke "groovyc" "-d" "build/classes" "-j"
13829 (find-files "src/main/" ".*\\.(groovy|java)$"))
13830 (invoke "ant" "jar")
13831 #t)))))
13832 (inputs
13833 (modify-inputs (package-inputs java-logback-core)
13834 (prepend java-logback-core java-slf4j-api)))
13835 (native-inputs
13836 (list groovy))
13837 (description "Logback is intended as a successor to the popular log4j project.
13838This module can be assimilated to a significantly improved version of log4j.
13839Moreover, @code{logback-classic} natively implements the slf4j API so that you
13840can readily switch back and forth between logback and other logging frameworks
13841such as log4j or @code{java.util.logging} (JUL).")))
13842
13843(define-public java-jgit
13844 (package
13845 (name "java-jgit")
13846 (version "4.7.0.201704051617-r")
13847 (source (origin
13848 (method url-fetch)
13849 (uri (string-append "https://repo1.maven.org/maven2/"
13850 "org/eclipse/jgit/org.eclipse.jgit/"
13851 version "/org.eclipse.jgit-"
13852 version "-sources.jar"))
13853 (sha256
13854 (base32
13855 "13ii4jn02ynzq6i7gsyi21k2i94jpc85wf6bcm31q4cyvzv0mk4k"))))
13856 (build-system ant-build-system)
13857 (arguments
13858 `(#:tests? #f ; There are no tests to run.
13859 #:jar-name "jgit.jar"
13860 ;; JGit must be built with a JDK supporting Java 8.
13861 #:jdk ,icedtea-8
13862 ;; Target our older default JDK.
13863 #:make-flags (list "-Dtarget=1.7")
13864 #:phases
13865 (modify-phases %standard-phases
13866 ;; The jar file generated by the default build.xml does not include
13867 ;; the text properties files, so we need to add them.
13868 (add-after 'build 'add-properties
13869 (lambda* (#:key jar-name #:allow-other-keys)
13870 (with-directory-excursion "src"
13871 (apply invoke "jar" "-uf"
13872 (string-append "../build/jar/" jar-name)
13873 (find-files "." "\\.properties$")))
13874 #t)))))
13875 (inputs
13876 (list java-classpathx-servletapi java-javaewah java-jsch
13877 java-slf4j-api))
13878 (home-page "https://eclipse.org/jgit/")
13879 (synopsis "Java library implementing the Git version control system")
13880 (description "JGit is a lightweight, pure Java library implementing the
13881Git version control system, providing repository access routines, support for
13882network protocols, and core version control algorithms.")
13883 (license license:edl1.0)))
13884
13885;; For axoloti.
13886(define-public java-jgit-4.2
13887 (package (inherit java-jgit)
13888 (version "4.2.0.201601211800-r")
13889 (source (origin
13890 (method url-fetch)
13891 (uri (string-append "https://repo1.maven.org/maven2/"
13892 "org/eclipse/jgit/org.eclipse.jgit/"
13893 version "/org.eclipse.jgit-"
13894 version "-sources.jar"))
13895 (sha256
13896 (base32
13897 "15gm537iivhnzlkjym4x3wn5jqdjdragsw9pdpzqqg21nrc817mm"))))
13898 (build-system ant-build-system)
13899 (arguments
13900 (substitute-keyword-arguments (package-arguments java-jgit)
13901 ((#:phases phases)
13902 `(modify-phases ,phases
13903 (add-after 'unpack 'use-latest-javaewah-API
13904 (lambda _
13905 (substitute* "src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java"
13906 (("wordinbits") "WORD_IN_BITS"))))))))
13907 (inputs
13908 (list java-javaewah java-jsch java-slf4j-api))))
13909
13910(define-public abcl
13911 (package
13912 (name "abcl")
13913 (version "1.9.3")
13914 (source
13915 (origin
13916 (method url-fetch)
13917 (uri (string-append "https://abcl.org/releases/"
13918 version "/abcl-src-" version ".tar.gz"))
13919 (sha256
13920 (base32
13921 "1zxjpwv98bq2yd5qg08sbkajj17m7b8xmzqhw296161s7lia215v"))
13922 (patches
13923 (search-patches
13924 "abcl-fix-build-xml.patch"))))
13925 (build-system ant-build-system)
13926 (native-inputs
13927 (list java-junit))
13928 (arguments
13929 `(#:build-target "abcl.jar"
13930 #:test-target "abcl.test"
13931 #:phases
13932 (modify-phases %standard-phases
13933 (replace 'install
13934 (lambda* (#:key outputs #:allow-other-keys)
13935 (let ((share (string-append (assoc-ref outputs "out")
13936 "/share/java/"))
13937 (bin (string-append (assoc-ref outputs "out")
13938 "/bin/")))
13939 (mkdir-p share)
13940 (install-file "dist/abcl.jar" share)
13941 (install-file "dist/abcl-contrib.jar" share)
13942 (mkdir-p bin)
13943 (with-output-to-file (string-append bin "abcl")
13944 (lambda _
13945 (let ((classpath (string-append
13946 share "abcl.jar"
13947 ":"
13948 share "abcl-contrib.jar")))
13949 (display (string-append
13950 "#!" (which "bash") "\n"
13951 "if [[ -z $CLASSPATH ]]; then\n"
13952 " cp=\"" classpath "\"\n"
13953 "else\n"
13954 " cp=\"" classpath ":$CLASSPATH\"\n"
13955 "fi\n"
13956 "exec " (which "java")
13957 " -cp \"$cp\" org.armedbear.lisp.Main \"$@\"\n")))))
13958 (chmod (string-append bin "abcl") #o755)
13959 #t))))))
13960 (home-page "https://abcl.org/")
13961 (synopsis "Common Lisp Implementation on the JVM")
13962 (description
13963 "@dfn{Armed Bear Common Lisp} (ABCL) is a full implementation of the Common
13964Lisp language featuring both an interpreter and a compiler, running in the
13965JVM. It supports JSR-223 (Java scripting API): it can be a scripting engine
13966in any Java application. Additionally, it can be used to implement (parts of)
13967the application using Java to Lisp integration APIs.")
13968 (native-search-paths
13969 (list (search-path-specification
13970 (variable "XDG_DATA_DIRS")
13971 (files '("share")))))
13972 (license (list license:gpl2+
13973 ;; named-readtables is released under 3 clause BSD
13974 license:bsd-3
13975 ;; jfli is released under CPL 1.0
13976 license:cpl1.0))))
13977
13978(define-public java-jsonp-api
13979 (package
13980 (name "java-jsonp-api")
13981 (version "1.1.6")
13982 (source (origin
13983 (method git-fetch)
13984 (uri (git-reference
13985 (url "https://github.com/eclipse-ee4j/jsonp")
13986 (commit (string-append "1.1-" version "-RELEASE"))))
13987 (file-name (git-file-name name version))
13988 (sha256
13989 (base32
13990 "0zrj03hkr3jdmqlb4ipjr37cqpp2q2814qpmxi7srlwpdqs0ibgc"))))
13991 (build-system ant-build-system)
13992 (arguments
13993 `(#:jar-name "jsonp-api.jar"
13994 #:tests? #f
13995 #:source-dir "api/src/main/java"
13996 #:test-dir "api/src/test"))
13997 (home-page "https://eclipse-ee4j.github.io/jsonp/")
13998 (synopsis "JSON Processing in Java")
13999 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14000parse, generate, transform and query) JSON messages. It produces and
14001consumes JSON text in a streaming fashion (similar to StAX API for XML)
14002and allows building a Java object model for JSON text using API classes
14003(similar to DOM API for XML).")
14004 ;; either gpl2 only with classpath exception, or epl2.0.
14005 (license (list license:gpl2
14006 license:epl2.0))))
14007
14008(define-public java-jsonp-impl
14009 (package
14010 (inherit java-jsonp-api)
14011 (name "java-jsonp-impl")
14012 (arguments
14013 `(#:jar-name "jsonp-impl.jar"
14014 #:tests? #f
14015 #:source-dir "impl/src/main/java"
14016 #:test-dir "impl/src/test"
14017 #:phases
14018 (modify-phases %standard-phases
14019 (add-before 'build 'copy-resources
14020 (lambda _
14021 (copy-recursively
14022 "impl/src/main/resources/"
14023 "build/classes")
14024 #t)))))
14025 (propagated-inputs
14026 (list java-jsonp-api))
14027 (description "JSON Processing (JSON-P) is a Java API to process (e.g.
14028parse, generate, transform and query) JSON messages. This package contains
14029a reference implementation of that API.")))
14030
14031(define-public java-jakarta-json
14032 (package
14033 (name "java-jakarta-json")
14034 (version "2.1.3")
14035 (source (origin
14036 (method git-fetch)
14037 (uri (git-reference
14038 (url "https://github.com/jakartaee/jsonp-api")
14039 (commit (string-append version "-RELEASE"))))
14040 (file-name (git-file-name name version))
14041 (sha256
14042 (base32
14043 "1q600harqfhlf763l75j4fx7ai7ybp7ga06aiky2a2hg8mhz0s5f"))))
14044 (build-system ant-build-system)
14045 (arguments
14046 `(#:jar-name "jakarta-json.jar"
14047 #:source-dir "api/src/main/java"
14048 #:tests? #f; no tests
14049 #:jdk ,openjdk11))
14050 (home-page "https://github.com/jakartaee/jsonp-api")
14051 (synopsis "Portable API for JSON handling in Java")
14052 (description "This project contains API and Compatible Implementation of
14053Jakarta JSON Processing specification. Jakarta JSON Processing provides
14054portable APIs to parse, generate, transform, and query JSON documents.")
14055 ;; with classpath exception
14056 (license license:epl2.0)))
14057
14058(define-public java-parsson
14059 (package
14060 (name "java-parsson")
14061 (version "1.1.5")
14062 (source (origin
14063 (method git-fetch)
14064 (uri (git-reference
14065 (url "https://github.com/eclipse-ee4j/parsson")
14066 (commit version)))
14067 (file-name (git-file-name name version))
14068 (sha256
14069 (base32
14070 "06vvr6qv1ihnk212gdxg4x0sd61lgxk7wf062s7gym5k2h7fms0p"))))
14071 (build-system ant-build-system)
14072 (arguments
14073 `(#:jar-name "parsson.jar"
14074 #:source-dir "impl/src/main/java"
14075 #:test-dir "impl/src/test"
14076 #:use-java-modules? #t
14077 #:jdk ,openjdk11
14078 #:phases
14079 (modify-phases %standard-phases
14080 (add-after 'unpack 'copy-resources
14081 (lambda _
14082 (copy-recursively "impl/src/main/resources"
14083 "build/classes"))))))
14084 (inputs
14085 (list java-jakarta-json))
14086 (native-inputs
14087 (list java-junit))
14088 (home-page "https://github.com/eclipse-ee4j/parsson")
14089 (synopsis "Implementation of Jakarta JSON API")
14090 (description "Eclipse Parsson is an implementation of the Jakarta JSON
14091Processing specification.")
14092 ;; with classpath exception
14093 (license license:epl2.0)))
14094
14095(define-public java-jakarta-annotations-api
14096 (package
14097 (name "java-jakarta-annotations-api")
14098 (version "2.1.1")
14099 (source (origin
14100 (method git-fetch)
14101 (uri (git-reference
14102 (url "https://github.com/jakartaee/common-annotations-api")
14103 (commit version)))
14104 (file-name (git-file-name name version))
14105 (sha256
14106 (base32
14107 "0xq2n2pijal5p75vl9dz10i6hhdmaxw5q8j3aza717xkpxxby9p6"))))
14108 (build-system ant-build-system)
14109 (arguments
14110 `(#:jar-name "jakarta-annotations-api.jar"
14111 #:source-dir "api/src/main/java"
14112 #:tests? #f; no tests
14113 #:jdk ,openjdk11))
14114 (home-page "https://github.com/jakartaee/common-annotations-api")
14115 (synopsis "Collection of Java annotations")
14116 (description "Jakarta Annotations defines a collection of annotations
14117representing common semantic concepts that enable a declarative style of
14118programming that applies across a variety of Java technologies.")
14119 ;; with classpath exception
14120 (license (list license:epl2.0
14121 license:gpl2))))
14122
14123(define-public java-xmp
14124 (package
14125 (name "java-xmp")
14126 (version "5.1.3")
14127 (source (origin
14128 (method url-fetch)
14129 (uri (string-append "http://download.macromedia.com/pub/developer"
14130 "/xmp/sdk/XMPCoreJava-" version ".zip"))
14131 (sha256
14132 (base32
14133 "14nai2mmsg7l5ya2y5mx4w4lr1az3sk2fjz6hiy4zdrsavgvl1g7"))))
14134 (build-system ant-build-system)
14135 (arguments
14136 `(#:build-target "build"
14137 #:tests? #f; no tests
14138 #:phases
14139 (modify-phases %standard-phases
14140 (add-after 'unpack 'chdir
14141 (lambda _
14142 (chdir "XMPCore")
14143 #t))
14144 (add-before 'build 'fix-timestamp
14145 (lambda _
14146 (substitute* "build.xml"
14147 (("\\$\\{BuildDate\\}") "1970 Jan 01 00:00:00-GMT"))
14148 #t))
14149 (replace 'install
14150 (install-jars "."))
14151 (add-after 'install 'install-doc
14152 (lambda* (#:key outputs #:allow-other-keys)
14153 (copy-recursively
14154 "docs"
14155 (string-append (assoc-ref outputs "out") "/share/doc/java-xmp"))
14156 #t)))))
14157 (native-inputs
14158 (list unzip))
14159 (home-page "https://www.adobe.com/devnet/xmp.html")
14160 (synopsis "Extensible Metadat Platform (XMP) support in Java")
14161 (description "Adobe's Extensible Metadata Platform (XMP) is a labeling
14162technology that allows you to embed data about a file, known as metadata,
14163into the file itself. The XMP Toolkit for Java is based on the C++ XMPCore
14164library and the API is similar.")
14165 (license license:bsd-3)))
14166
14167(define-public java-args4j
14168 (package
14169 (name "java-args4j")
14170 (version "2.33")
14171 (source (origin
14172 (method git-fetch)
14173 (uri (git-reference
14174 (url "https://github.com/kohsuke/args4j")
14175 (commit (string-append "args4j-site-" version))))
14176 (file-name (git-file-name name version))
14177 (sha256
14178 (base32
14179 "0w061fg65qrsm1a0lz0vyprsyidj31krjb459qi2lw0y78xza26s"))))
14180 (build-system ant-build-system)
14181 (arguments
14182 `(#:jar-name "args4j.jar"
14183 #:source-dir "args4j/src"
14184 #:test-dir "args4j/test"
14185 #:test-exclude
14186 (list "**/ExampleTest.*"
14187 "**/ExternalConfiguredTest.*" ; fails to find a file
14188 ;; We still don't want to run abstract classes
14189 "**/Abstract*.*")
14190 #:phases
14191 (modify-phases %standard-phases
14192 (add-before 'check 'fix-test-dir
14193 (lambda _
14194 (substitute* "build.xml"
14195 (("/java\">") "\">"))
14196 #t))
14197 (add-before 'build 'copy-resources
14198 (lambda _
14199 (let ((from-prefix "args4j/src/org/kohsuke/args4j/")
14200 (to-prefix "build/classes/org/kohsuke/args4j/"))
14201 (for-each (lambda (f)
14202 (install-file
14203 (string-append from-prefix f)
14204 (string-append to-prefix (dirname f))))
14205 (list "Messages.properties"
14206 "Messages_de.properties"
14207 "Messages_en.properties"
14208 "Messages_ru.properties"
14209 "spi/Messages.properties"
14210 "spi/Messages_de.properties"
14211 "spi/Messages_en.properties"
14212 "spi/Messages_ru.properties")))
14213 #t)))))
14214 (native-inputs
14215 (list java-junit))
14216 (home-page "https://args4j.kohsuke.org/")
14217 (synopsis "Command line parser library")
14218 (description "Args4j is a small Java class library that makes it easy to
14219parse command line options/arguments in your CUI application.")
14220 (license license:expat)))
14221
14222(define-public java-argparse4j
14223 (package
14224 (name "java-argparse4j")
14225 (version "0.9.0")
14226 (source (origin
14227 (method git-fetch)
14228 (uri (git-reference
14229 (url "https://github.com/argparse4j/argparse4j")
14230 (commit (string-append "argparse4j-" version))))
14231 (file-name (git-file-name name version))
14232 (sha256
14233 (base32
14234 "1i0j3zs1ln48n0g8a90vqbv6528mcswhzys6252yp0c8w1ai64fb"))))
14235 (build-system ant-build-system)
14236 (arguments
14237 (list #:jar-name "java-argparse4j.jar"
14238 #:source-dir "main/src/main/"
14239 #:test-dir "main/src/test/"
14240 #:jdk openjdk11
14241 #:phases #~(modify-phases %standard-phases
14242 (add-after 'unpack 'copy-resources
14243 (lambda _
14244 (copy-recursively "main/src/test/resources"
14245 "target/test-classes")
14246 (copy-recursively "main/src/main/resources"
14247 "build/classes")))
14248 (replace 'install
14249 (install-from-pom "pom.xml")))))
14250 (inputs (list java-junit))
14251 (home-page "https://argparse4j.github.io/")
14252 (synopsis "Java command-line argument parser library")
14253 (description "Argparse4j is a command line argument parser library for
14254Java based on Python's @code{argparse} module.")
14255 (license license:expat)))
14256
14257(define-public java-metadata-extractor
14258 (package
14259 (name "java-metadata-extractor")
14260 (version "2.19.0")
14261 (source (origin
14262 (method git-fetch)
14263 (uri (git-reference
14264 (url "https://github.com/drewnoakes/metadata-extractor")
14265 (commit version)))
14266 (file-name (git-file-name name version))
14267 (sha256
14268 (base32
14269 "1axnw47n06a116g8bml2l6rxx92grxp935gspyhz4pz868m7hrna"))))
14270 (build-system ant-build-system)
14271 (arguments
14272 `(#:jar-name "metadata-extractor.jar"
14273 #:source-dir "Source"
14274 #:test-dir "Tests"
14275 #:phases
14276 (modify-phases %standard-phases
14277 (add-before 'build 'fix-xmp-path
14278 (lambda _
14279 ;; This version of metadata-extractor depends on java-xmp 6, which
14280 ;; is non-free. These changes allow using java-xmp 5, which is
14281 ;; the last free-software version of java-xmp.
14282 (substitute* (find-files "." ".*.java")
14283 (("com.adobe.internal.xmp") "com.adobe.xmp"))
14284 (substitute* "Source/com/drew/metadata/xmp/XmpReader.java"
14285 (("\\.setXMPNodesToLimit.*") ";"))
14286 ;; Test failure, most likely because we use a different java-xmp
14287 ;; version.
14288 (delete-file "Tests/com/drew/metadata/xmp/XmpReaderTest.java")))
14289 (add-before 'check 'fix-test-dir
14290 (lambda _
14291 (substitute* "build.xml"
14292 (("/java\">") "\">"))
14293 #t)))))
14294 (propagated-inputs
14295 (list java-xmp))
14296 (native-inputs
14297 (list java-hamcrest-core java-junit))
14298 (home-page "https://github.com/drewnoakes/metadata-extractor")
14299 (synopsis "Extract metadata from image and video files")
14300 (description "Metadata-extractor is a straightforward Java library for
14301reading metadata from image files. It is able to read metadata in Exif,
14302IPTC, XMP, ICC and more formats.")
14303 (license license:asl2.0)))
14304
14305(define-public java-svg-salamander
14306 (package
14307 (name "java-svg-salamander")
14308 (version "1.1.2")
14309 (source (origin
14310 (method git-fetch)
14311 (uri (git-reference
14312 (url "https://github.com/blackears/svgSalamander")
14313 (commit (string-append "v" version))))
14314 (file-name (git-file-name name version))
14315 (sha256
14316 (base32
14317 "1zv3kjdkf6iqf02x6ln76254y634j2ji448y706a65lsbfjmmicf"))
14318 (modules '((guix build utils)))
14319 (snippet
14320 '(begin
14321 (for-each delete-file (find-files "." ".*.jar"))
14322 #t))
14323 (patches
14324 (search-patches "java-svg-salamander-Fix-non-det.patch"))))
14325 (build-system ant-build-system)
14326 (arguments
14327 `(#:tests? #f; no tests
14328 #:phases
14329 (modify-phases %standard-phases
14330 (add-after 'unpack 'chdir
14331 (lambda _
14332 (chdir "svg-core")
14333 #t))
14334 (add-before 'build 'copy-jars
14335 (lambda* (#:key inputs #:allow-other-keys)
14336 (copy-file (car (find-files (assoc-ref inputs "javacc") "\\.jar$"))
14337 "../libraries/javacc.jar")
14338 (copy-file (car (find-files (assoc-ref inputs "ant") "ant\\.jar$"))
14339 "../libraries/ant.jar")
14340 #t))
14341 (replace 'install
14342 (install-jars "dist")))))
14343 (native-inputs
14344 (list javacc))
14345 (home-page "https://github.com/blackears/svgSalamander")
14346 (synopsis "SVG engine for Java")
14347 (description "SVG Salamander is an SVG engine for Java that's designed
14348to be small, fast, and allow programmers to use it with a minimum of fuss.
14349It's in particular targeted for making it easy to integrate SVG into Java
14350games and making it much easier for artists to design 2D game content - from
14351rich interactive menus to charts and graphcs to complex animations.")
14352 (license license:bsd-2)))
14353
14354(define-public java-jboss-transaction-api-spec
14355 (package
14356 (name "java-jboss-transaction-api-spec")
14357 (version "1.2+1.1.1")
14358 (source (origin
14359 (method git-fetch)
14360 (uri (git-reference
14361 (url "https://github.com/jboss/jboss-transaction-api_spec")
14362 (commit "jboss-transaction-api_1.2_spec-1.1.1.Final")))
14363 (file-name (git-file-name name version))
14364 (sha256
14365 (base32
14366 "1xbfq5hvb86izflydxrqqv3k26c1ba2m0ap6m97shqrsdi9by4wy"))))
14367 (build-system ant-build-system)
14368 (arguments
14369 `(#:jar-name "java-jboss-transaction-api_spec.jar"
14370 #:source-dir "src/main/java"
14371 #:tests? #f)); no tests
14372 (inputs
14373 (list java-cdi-api java-jboss-interceptors-api-spec))
14374 (home-page "https://github.com/jboss/jboss-transaction-api_spec")
14375 (synopsis "Generic transaction management API in Java")
14376 (description "Java-jboss-transaction-api-spec implements the Transactions
14377API. A transaction is a unit of work containing one or more operations
14378involving one or more shared resources having ACID (Atomicity, Consistency,
14379Isolation and Durability) properties.")
14380 ;; either gpl2 only with classpath exception or cddl.
14381 (license (list license:gpl2 license:cddl1.0))))
14382
14383(define-public java-picocli
14384 (package
14385 (name "java-picocli")
14386 (version "4.3.2")
14387 (source (origin
14388 (method git-fetch)
14389 (uri (git-reference
14390 (url "https://github.com/remkop/picocli")
14391 (commit (string-append "v" version))))
14392 (file-name (git-file-name name version))
14393 (sha256
14394 (base32
14395 "1sxp6rxjfgjd98ly14b3d15dvxkm5wg4g46w12jyhmr0kmkaca3c"))))
14396 (build-system ant-build-system)
14397 (arguments
14398 `(#:jar-name "picocli.jar"
14399 #:source-dir "src/main/java"
14400 ;; Tests require missing dependencies (junitparams, system-rules)
14401 #:tests? #f))
14402 (home-page "https://picocli.info")
14403 (synopsis "REPL for the JVM")
14404 (description "Picocli is a framework for building command line applications
14405for the JVM. It supports colors, autocompletion, subcommands, and more. Written
14406in Java, usable from Groovy, Kotlin, Scala, etc.")
14407 (license license:asl2.0)))
14408
14409(define-public java-pj
14410 (package
14411 (name "java-pj")
14412 (version "20150107")
14413 (source (origin
14414 (method url-fetch)
14415 (uri (string-append "https://www.cs.rit.edu/~ark/pjsrc"
14416 version ".jar"))
14417 (sha256
14418 (base32
14419 "078xwaivl2qqjc07r0vk6kzpqlcb1bcar80p8r5qigh34hpr86d3"))
14420 (modules '((guix build utils)))
14421 (snippet
14422 '(for-each delete-file
14423 (find-files "." "\\.class$")))))
14424 (build-system ant-build-system)
14425 (arguments
14426 (list
14427 #:tests? #false ;there are none
14428 #:phases
14429 #~(modify-phases %standard-phases
14430 (add-after 'unpack 'chdir
14431 (lambda _ (chdir "src/pj")))
14432 (add-after 'chdir 'patch-source-directory
14433 (lambda _
14434 (substitute* "compile"
14435 (("SRCDIR1=/home/ark/public_html/pj/lib")
14436 (string-append "SRCDIR1=" (getcwd) "/lib")))))
14437 (replace 'build
14438 (lambda _
14439 (invoke "bash" "./compile" "linux")
14440 (with-directory-excursion "lib"
14441 (apply invoke "jar" "cf" (string-append "pj" #$version ".jar")
14442 (find-files "." "\\.class$")))))
14443 (replace 'install (install-jars ".")))))
14444 (home-page "https://www.cs.rit.edu/~ark/pj.shtml")
14445 (synopsis "Parallel programming in Java")
14446 (description "Parallel Java (PJ) is an API and middleware for parallel
14447programming in 100% Java on shared memory multiprocessor (SMP) parallel
14448computers, cluster parallel computers, and hybrid SMP cluster parallel
14449computers.")
14450 (license license:gpl3+)))
14451
14452(define-public java-jetbrains-annotations
14453 (package
14454 (name "java-jetbrains-annotations")
14455 (version "19.0.0")
14456 (source (origin
14457 (method git-fetch)
14458 (uri (git-reference
14459 (url "https://github.com/JetBrains/java-annotations")
14460 (commit version)))
14461 (file-name (git-file-name name version))
14462 (sha256
14463 (base32
14464 "0z6i1xs60cd5ffz23c49sq68wn5mphhs3xpar1n93ppama2ng80v"))))
14465 (build-system ant-build-system)
14466 (arguments
14467 `(#:jar-name "jetbrains-annotations.jar"
14468 #:source-dir "common/src/main/java:java8/src/main/java"
14469 #:tests? #f)); no tests
14470 (home-page "https://github.com/JetBrains/java-annotations")
14471 (synopsis "Annotations for Java and other JVM languages")
14472 (description "This package contains a set of Java annotations which can be
14473used in JVM-based languages. They serve as an additional documentation and
14474can be interpreted by IDEs and static analysis tools to improve code analysis.")
14475 (license license:expat)))
14476
14477(define-public java-javaparser
14478 (package
14479 (name "java-javaparser")
14480 (version "3.16.1")
14481 (source (origin
14482 (method git-fetch)
14483 (uri (git-reference
14484 (url "https://github.com/javaparser/javaparser")
14485 (commit (string-append "javaparser-parent-" version))))
14486 (file-name (git-file-name name version))
14487 (sha256
14488 (base32
14489 "1a4jk12ffa31fa0y8vda0739vpfj1206p0nha842b7bixbvwamv9"))
14490 (modules '((guix build utils)))
14491 (snippet
14492 '(begin
14493 (for-each delete-file
14494 (find-files "." "\\.jar$"))
14495 #t))))
14496 (build-system ant-build-system)
14497 (arguments
14498 `(#:tests? #f; tests require jbehave and junit5
14499 #:phases
14500 (modify-phases %standard-phases
14501 (add-before 'build 'fill-template
14502 (lambda _
14503 (with-directory-excursion "javaparser-core/src/main"
14504 (copy-file "java-templates/com/github/javaparser/JavaParserBuild.java"
14505 "java/com/github/javaparser/JavaParserBuild.java")
14506 (substitute* "java/com/github/javaparser/JavaParserBuild.java"
14507 (("\\$\\{project.version\\}") ,version)
14508 (("\\$\\{project.name\\}") "javaparser")
14509 (("\\$\\{project.build.finalName\\}") "javaparser")
14510 (("\\$\\{maven.version\\}") "fake")
14511 (("\\$\\{maven.build.version\\}") "fake")
14512 (("\\$\\{build.timestamp\\}") "0")
14513 (("\\$\\{java.vendor\\}") "Guix")
14514 (("\\$\\{java.vendor.url\\}") "https://gnu.org/software/guix")
14515 (("\\$\\{java.version\\}") "1.8")
14516 (("\\$\\{os.arch\\}") "any")
14517 (("\\$\\{os.name\\}") "Guix")
14518 (("\\$\\{os.version\\}") "not available")))
14519 #t))
14520 (add-before 'build 'generate-javacc
14521 (lambda _
14522 (with-directory-excursion "javaparser-core/src/main/java"
14523 (invoke "java" "javacc" "../javacc/java.jj"))
14524 #t))
14525 (add-before 'build 'copy-javacc-support
14526 (lambda _
14527 (with-directory-excursion "javaparser-core/src/main"
14528 (copy-recursively "javacc-support" "java"))
14529 #t))
14530 (replace 'build
14531 (lambda _
14532 (define (build name)
14533 (format #t "Building ~a~%" name)
14534 (delete-file-recursively "build/classes")
14535 (mkdir-p "build/classes")
14536 (apply invoke "javac"
14537 "-cp" (string-append (getenv "CLASSPATH") ":"
14538 (string-join (find-files "build/jar" ".")
14539 ":"))
14540 "-d" "build/classes"
14541 (find-files (string-append name "/src/main/java")
14542 ".*.java"))
14543 (invoke "jar" "-cf" (string-append "build/jar/" name ".jar")
14544 "-C" "build/classes" "."))
14545 (mkdir-p "build/classes")
14546 (mkdir-p "build/test-classes")
14547 (mkdir-p "build/jar")
14548 (build "javaparser-core")
14549 (build "javaparser-core-serialization")
14550 (build "javaparser-core-generators")
14551 (build "javaparser-core-metamodel-generator")
14552 (build "javaparser-symbol-solver-core")
14553 #t))
14554 (replace 'install
14555 (install-jars "build/jar")))))
14556 (inputs
14557 (list java-guava java-jboss-javassist java-jsonp-api))
14558 (native-inputs
14559 (list javacc))
14560 (home-page "https://javaparser.org/")
14561 (synopsis "Parser for Java")
14562 (description
14563 "This project contains a set of libraries implementing a Java 1.0 - Java
1456411 Parser with advanced analysis functionalities.")
14565 (license (list
14566 ;; either lgpl or asl
14567 license:lgpl3+
14568 license:asl2.0))))
14569
14570(define-public tla2tools
14571 ;; This package was originally based on the "v1.8.0" tag, but that merely
14572 ;; points to the moving master branch. That might be because the ‘latest
14573 ;; release’ at GitHub is currently 1.7.1. We'll see! For now, rather than
14574 ;; downgrade to 1.7.1 proper, use the commit that we originally dubbed 1.8.0.
14575 (let* ((release "1.7.1")
14576 (revision "0")
14577 (commit "6932e19083fc6df42473464857fc1280cb5aaecc"))
14578 (package
14579 (name "tla2tools")
14580 (version (git-version release revision commit))
14581 (source (origin
14582 (method git-fetch)
14583 (uri (git-reference
14584 (url "https://github.com/tlaplus/tlaplus")
14585 (commit commit)))
14586 (file-name (git-file-name name version))
14587 (sha256
14588 (base32
14589 "1hhx8gmn81k8qrkx4p7ppinmygxga9fqffd626wkvhjgg2ky8lhs"))
14590 (patches
14591 (search-patches "tla2tools-build-xml.patch"))
14592 (modules '((guix build utils)))
14593 (snippet
14594 '(begin
14595 ;; Remove packaged libraries (see 'replace-libs below)
14596 (for-each delete-file (find-files "." ".*.jar$"))))))
14597 (build-system ant-build-system)
14598 (arguments
14599 (let* ((tlatools "tlatools/org.lamport.tlatools/")
14600 (build-xml (string-append tlatools "customBuild.xml")))
14601 `(#:jdk ,openjdk11
14602 #:modules ((guix build ant-build-system)
14603 (guix build utils)
14604 (ice-9 match)
14605 (srfi srfi-26))
14606 #:make-flags '("-f" ,build-xml)
14607 #:phases
14608 (modify-phases %standard-phases
14609 ;; Replace packed libs with references to jars in store
14610 (add-after 'unpack 'replace-libs
14611 (lambda* (#:key inputs #:allow-other-keys)
14612 (define (input-jar input)
14613 (car (find-files (assoc-ref inputs input) "\\.jar$")))
14614 (for-each
14615 (match-lambda
14616 ((file . input)
14617 (symlink (input-jar input)
14618 (string-append ,tlatools "/lib/" file))))
14619 '(("gson/gson-2.8.6.jar" . "java-gson")
14620 ("javax.mail/mailapi-1.6.3.jar" . "java-javax-mail")
14621 ("jline/jline-terminal-3.14.1.jar" . "java-jline-terminal")
14622 ("jline/jline-reader-3.14.1.jar" . "java-jline-reader")
14623 ("lsp/org.eclipse.lsp4j.debug-0.10.0.jar" .
14624 "java-eclipse-lsp4j-debug")
14625 ("lsp/org.eclipse.lsp4j.jsonrpc-0.10.0.jar" .
14626 "java-eclipse-lsp4j-jsonrpc")
14627 ("lsp/org.eclipse.lsp4j.jsonrpc.debug-0.10.0.jar" .
14628 "java-eclipse-lsp4j-jsonrpc-debug")
14629 ("junit-4.12.jar" . "java-junit")
14630 ("easymock-3.3.1.jar" . "java-easymock")))
14631 ;; Retain a tiny subset of the original X-Git-*
14632 ;; manifest values just to aid in debugging.
14633 (substitute* ,build-xml
14634 (("\\$\\{git.tag\\}") (string-append "v" ,release)))))
14635 (add-before 'check 'prepare-tests
14636 (lambda _
14637 ;; The pcal tests write to .cfg files.
14638 (for-each (cut chmod <> #o644)
14639 (find-files (string-append ,tlatools
14640 "/test-model/pcal")
14641 "\\.cfg$"))))
14642 (replace 'install
14643 (lambda* (#:key inputs outputs #:allow-other-keys)
14644 (let* ((share (string-append (assoc-ref outputs "out") "/share/java"))
14645 (jar-name "tla2tools.jar"); set in project.properties
14646 (jar (string-append ,tlatools
14647 "/dist/" jar-name))
14648 (java-cp (string-append share "/" jar-name))
14649 (bin (string-append (assoc-ref outputs "out") "/bin"))
14650 (java (search-input-file inputs "/bin/java")))
14651 (install-file jar share)
14652 (mkdir-p bin)
14653 ;; Generate wrapper scripts for bin/, which invoke common
14654 ;; commands within tla2tools.jar. Users can still invoke
14655 ;; tla2tools.jar for the rest.
14656 (for-each
14657 (match-lambda
14658 ((wrapper . class)
14659 (let ((file (string-append bin "/" wrapper)))
14660 (begin
14661 (with-output-to-file file
14662 (lambda _
14663 (display
14664 (string-append
14665 "#!/bin/sh\n"
14666 java " -XX:+UseParallelGC " " -cp " java-cp " " class " \"$@\""))))
14667 (chmod file #o755)))))
14668 ;; bin/wrapper . java-class
14669 '(("pcal" . "pcal.trans")
14670 ("tlatex" . "tla2tex.TLA")
14671 ("tla2sany" . "tla2sany.SANY")
14672 ("tlc2" . "tlc2.TLC")
14673 ("tlc2-repl" . "tlc2.REPL"))))))))))
14674 (native-inputs
14675 (list java-junit java-easymock))
14676 (inputs
14677 (list java-javax-mail
14678 java-gson-2.8.6
14679 java-jline-terminal
14680 java-jline-reader
14681 java-eclipse-lsp4j-jsonrpc
14682 java-eclipse-lsp4j-jsonrpc-debug
14683 java-eclipse-lsp4j-debug))
14684 (home-page "https://lamport.azurewebsites.net/tla/tools.html")
14685 (synopsis "TLA+ tools (analyzer, TLC, TLATeX, PlusCal translator)")
14686 (description "TLA+ is a high-level language for modeling programs and
14687systems---especially concurrent and distributed ones. It's based on the idea
14688that the best way to describe things precisely is with simple
14689mathematics. TLA+ and its tools are useful for eliminating fundamental design
14690errors, which are hard to find and expensive to correct in code.
14691
14692The following TLA+ tools are available in this distribution:
14693
14694@itemize
14695@item The Syntactic Analyzer: A parser and syntax checker for
14696 TLA+ specifications;
14697@item TLC: A model checker and simulator for a subclass of \"executable\" TLA+
14698 specifications;
14699@item TLATeX: A program for typesetting TLA+ specifications;
14700@item Beta test versions of 1-3 for the TLA+2 language; and
14701@item The PlusCal translator.
14702@end itemize")
14703 (license license:expat))))
14704
14705;;;
14706;;; Avoid adding new packages to the end of this file. To reduce the chances
14707;;; of a merge conflict, place them above by existing packages with similar
14708;;; functionality or similar names.
14709;;;